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::NullableHandle>,
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::NullableHandle,
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 shutdown_with_epitaph(&self, status: zx_status::Status) {
717        self.inner.shutdown_with_epitaph(status)
718    }
719
720    fn is_closed(&self) -> bool {
721        self.inner.channel().is_closed()
722    }
723    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
724        self.inner.channel().on_closed()
725    }
726}
727
728impl AdvisoryLockingControlHandle {}
729
730#[must_use = "FIDL methods require a response to be sent"]
731#[derive(Debug)]
732pub struct AdvisoryLockingAdvisoryLockResponder {
733    control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
734    tx_id: u32,
735}
736
737/// Set the the channel to be shutdown (see [`AdvisoryLockingControlHandle::shutdown`])
738/// if the responder is dropped without sending a response, so that the client
739/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
740impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
741    fn drop(&mut self) {
742        self.control_handle.shutdown();
743        // Safety: drops once, never accessed again
744        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
745    }
746}
747
748impl fdomain_client::fidl::Responder for AdvisoryLockingAdvisoryLockResponder {
749    type ControlHandle = AdvisoryLockingControlHandle;
750
751    fn control_handle(&self) -> &AdvisoryLockingControlHandle {
752        &self.control_handle
753    }
754
755    fn drop_without_shutdown(mut self) {
756        // Safety: drops once, never accessed again due to mem::forget
757        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
758        // Prevent Drop from running (which would shut down the channel)
759        std::mem::forget(self);
760    }
761}
762
763impl AdvisoryLockingAdvisoryLockResponder {
764    /// Sends a response to the FIDL transaction.
765    ///
766    /// Sets the channel to shutdown if an error occurs.
767    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
768        let _result = self.send_raw(result);
769        if _result.is_err() {
770            self.control_handle.shutdown();
771        }
772        self.drop_without_shutdown();
773        _result
774    }
775
776    /// Similar to "send" but does not shutdown the channel if an error occurs.
777    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
778        let _result = self.send_raw(result);
779        self.drop_without_shutdown();
780        _result
781    }
782
783    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
784        self.control_handle
785            .inner
786            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
787                result,
788                self.tx_id,
789                0x6ee9c0ad53ec87aa,
790                fidl::encoding::DynamicFlags::empty(),
791            )
792    }
793}
794
795#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
796pub struct DirectoryMarker;
797
798impl fdomain_client::fidl::ProtocolMarker for DirectoryMarker {
799    type Proxy = DirectoryProxy;
800    type RequestStream = DirectoryRequestStream;
801
802    const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
803}
804impl fdomain_client::fidl::DiscoverableProtocolMarker for DirectoryMarker {}
805pub type DirectoryUnlinkResult = Result<(), i32>;
806pub type DirectoryRenameResult = Result<(), i32>;
807pub type DirectoryCreateSymlinkResult = Result<(), i32>;
808
809pub trait DirectoryProxyInterface: Send + Sync {
810    type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
811        + Send;
812    fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
813    fn r#clone(
814        &self,
815        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
816    ) -> Result<(), fidl::Error>;
817    type CloseResponseFut: std::future::Future<
818            Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
819        > + Send;
820    fn r#close(&self) -> Self::CloseResponseFut;
821    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
822    fn r#query(&self) -> Self::QueryResponseFut;
823    fn r#deprecated_clone(
824        &self,
825        flags: OpenFlags,
826        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
827    ) -> Result<(), fidl::Error>;
828    type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
829        + Send;
830    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
831    type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
832    fn r#deprecated_set_attr(
833        &self,
834        flags: NodeAttributeFlags,
835        attributes: &NodeAttributes,
836    ) -> Self::DeprecatedSetAttrResponseFut;
837    type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
838        + Send;
839    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
840    type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
841        + Send;
842    fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
843    type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
844        + Send;
845    fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
846    type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
847        + Send;
848    fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
849    type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
850        + Send;
851    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
852    type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
853        + Send;
854    fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
855    type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
856        + Send;
857    fn r#update_attributes(
858        &self,
859        payload: &MutableNodeAttributes,
860    ) -> Self::UpdateAttributesResponseFut;
861    type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
862    fn r#sync(&self) -> Self::SyncResponseFut;
863    fn r#list_extended_attributes(
864        &self,
865        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
866    ) -> Result<(), fidl::Error>;
867    type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
868        + Send;
869    fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
870    type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
871        + Send;
872    fn r#set_extended_attribute(
873        &self,
874        name: &[u8],
875        value: ExtendedAttributeValue,
876        mode: SetExtendedAttributeMode,
877    ) -> Self::SetExtendedAttributeResponseFut;
878    type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
879        + Send;
880    fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
881    fn r#deprecated_open(
882        &self,
883        flags: OpenFlags,
884        mode: ModeType,
885        path: &str,
886        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
887    ) -> Result<(), fidl::Error>;
888    fn r#open(
889        &self,
890        path: &str,
891        flags: Flags,
892        options: &Options,
893        object: fdomain_client::Channel,
894    ) -> Result<(), fidl::Error>;
895    type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
896        + Send;
897    fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
898    type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
899    fn r#rewind(&self) -> Self::RewindResponseFut;
900    type GetTokenResponseFut: std::future::Future<
901            Output = Result<(i32, Option<fdomain_client::NullableHandle>), fidl::Error>,
902        > + Send;
903    fn r#get_token(&self) -> Self::GetTokenResponseFut;
904    type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
905    fn r#link(
906        &self,
907        src: &str,
908        dst_parent_token: fdomain_client::NullableHandle,
909        dst: &str,
910    ) -> Self::LinkResponseFut;
911    type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
912        + Send;
913    fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
914    type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
915        + Send;
916    fn r#rename(
917        &self,
918        src: &str,
919        dst_parent_token: fdomain_client::Event,
920        dst: &str,
921    ) -> Self::RenameResponseFut;
922    type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
923        + Send;
924    fn r#create_symlink(
925        &self,
926        name: &str,
927        target: &[u8],
928        connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
929    ) -> Self::CreateSymlinkResponseFut;
930    type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
931    fn r#watch(
932        &self,
933        mask: WatchMask,
934        options: u32,
935        watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
936    ) -> Self::WatchResponseFut;
937}
938
939#[derive(Debug, Clone)]
940pub struct DirectoryProxy {
941    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
942}
943
944impl fdomain_client::fidl::Proxy for DirectoryProxy {
945    type Protocol = DirectoryMarker;
946
947    fn from_channel(inner: fdomain_client::Channel) -> Self {
948        Self::new(inner)
949    }
950
951    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
952        self.client.into_channel().map_err(|client| Self { client })
953    }
954
955    fn as_channel(&self) -> &fdomain_client::Channel {
956        self.client.as_channel()
957    }
958}
959
960impl DirectoryProxy {
961    /// Create a new Proxy for fuchsia.io/Directory.
962    pub fn new(channel: fdomain_client::Channel) -> Self {
963        let protocol_name = <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
964        Self { client: fidl::client::Client::new(channel, protocol_name) }
965    }
966
967    /// Get a Stream of events from the remote end of the protocol.
968    ///
969    /// # Panics
970    ///
971    /// Panics if the event stream was already taken.
972    pub fn take_event_stream(&self) -> DirectoryEventStream {
973        DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
974    }
975
976    /// Acquires an advisory lock on the underlying file.
977    ///
978    /// The lock lasts until either this connection is closed or
979    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
980    /// explicitly.
981    ///
982    /// Advisory locks are purely advisory. They do not prevent actual read or
983    /// write operations from occurring on the file, either through this
984    /// connection or through other connections.
985    ///
986    /// This method requires the following rights:
987    ///
988    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
989    /// * [`Rights.WRITE_BYTES`] if `request.type` is
990    ///   [`AdvisoryLockType.WRITE`].
991    ///
992    /// # Errors
993    ///
994    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
995    ///   example, another connection might hold a conflicting lock type.
996    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
997    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
998    ///   to acquire the given type of lock.
999    pub fn r#advisory_lock(
1000        &self,
1001        mut request: &AdvisoryLockRequest,
1002    ) -> fidl::client::QueryResponseFut<
1003        AdvisoryLockingAdvisoryLockResult,
1004        fdomain_client::fidl::FDomainResourceDialect,
1005    > {
1006        DirectoryProxyInterface::r#advisory_lock(self, request)
1007    }
1008
1009    pub fn r#clone(
1010        &self,
1011        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1012    ) -> Result<(), fidl::Error> {
1013        DirectoryProxyInterface::r#clone(self, request)
1014    }
1015
1016    /// Terminates the connection.
1017    ///
1018    /// After calling `Close`, the client must not send any other requests.
1019    ///
1020    /// Servers, after sending the status response, should close the connection
1021    /// regardless of status and without sending an epitaph.
1022    ///
1023    /// Closing the client end of the channel should be semantically equivalent
1024    /// to calling `Close` without knowing when the close has completed or its
1025    /// status.
1026    pub fn r#close(
1027        &self,
1028    ) -> fidl::client::QueryResponseFut<
1029        fdomain_fuchsia_unknown::CloseableCloseResult,
1030        fdomain_client::fidl::FDomainResourceDialect,
1031    > {
1032        DirectoryProxyInterface::r#close(self)
1033    }
1034
1035    pub fn r#query(
1036        &self,
1037    ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
1038        DirectoryProxyInterface::r#query(self)
1039    }
1040
1041    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
1042    pub fn r#deprecated_clone(
1043        &self,
1044        mut flags: OpenFlags,
1045        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1046    ) -> Result<(), fidl::Error> {
1047        DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1048    }
1049
1050    /// DEPRECATED - Use `Node.GetAttributes` instead.
1051    pub fn r#deprecated_get_attr(
1052        &self,
1053    ) -> fidl::client::QueryResponseFut<
1054        (i32, NodeAttributes),
1055        fdomain_client::fidl::FDomainResourceDialect,
1056    > {
1057        DirectoryProxyInterface::r#deprecated_get_attr(self)
1058    }
1059
1060    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
1061    pub fn r#deprecated_set_attr(
1062        &self,
1063        mut flags: NodeAttributeFlags,
1064        mut attributes: &NodeAttributes,
1065    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1066        DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1067    }
1068
1069    /// [DEPRECATED - Use new GetFlags method instead.]
1070    pub fn r#deprecated_get_flags(
1071        &self,
1072    ) -> fidl::client::QueryResponseFut<
1073        (i32, OpenFlags),
1074        fdomain_client::fidl::FDomainResourceDialect,
1075    > {
1076        DirectoryProxyInterface::r#deprecated_get_flags(self)
1077    }
1078
1079    /// [DEPRECATED - Use new SetFlags method instead.]
1080    pub fn r#deprecated_set_flags(
1081        &self,
1082        mut flags: OpenFlags,
1083    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1084        DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1085    }
1086
1087    /// Queries the flags that apply to this node after it has been opened/created. This method does
1088    /// not require any rights.
1089    ///
1090    /// Note that the final set of flags that apply to the connection may differ from those
1091    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
1092    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
1093    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
1094    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
1095    pub fn r#get_flags(
1096        &self,
1097    ) -> fidl::client::QueryResponseFut<
1098        NodeGetFlagsResult,
1099        fdomain_client::fidl::FDomainResourceDialect,
1100    > {
1101        DirectoryProxyInterface::r#get_flags(self)
1102    }
1103
1104    /// Sets the flags that apply to this node after it has been opened. This method does not
1105    /// require any rights.
1106    ///
1107    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
1108    /// clear append mode.
1109    ///
1110    /// Errors:
1111    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
1112    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
1113    pub fn r#set_flags(
1114        &self,
1115        mut flags: Flags,
1116    ) -> fidl::client::QueryResponseFut<
1117        NodeSetFlagsResult,
1118        fdomain_client::fidl::FDomainResourceDialect,
1119    > {
1120        DirectoryProxyInterface::r#set_flags(self, flags)
1121    }
1122
1123    /// Query the filesystem for details specific to the filesystem and/or volume. If the current
1124    /// volume has different settings or the storage is accounted seperately from the rest of the
1125    /// filesystem that may be reported instead of filesystem-wide details.
1126    pub fn r#query_filesystem(
1127        &self,
1128    ) -> fidl::client::QueryResponseFut<
1129        (i32, Option<Box<FilesystemInfo>>),
1130        fdomain_client::fidl::FDomainResourceDialect,
1131    > {
1132        DirectoryProxyInterface::r#query_filesystem(self)
1133    }
1134
1135    /// Acquires information about the node.
1136    ///
1137    /// The attributes of a node should be stable, independent of the
1138    /// specific protocol used to access it.
1139    ///
1140    /// If a particular attribute is not applicable or not supported,
1141    /// filesystems should leave the corresponding field absent.
1142    ///
1143    /// + `query` a bit-mask specifying which attributes to fetch. The server
1144    ///   should not return more than necessary.
1145    /// - `attributes` the returned attributes.
1146    ///
1147    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
1148    pub fn r#get_attributes(
1149        &self,
1150        mut query: NodeAttributesQuery,
1151    ) -> fidl::client::QueryResponseFut<
1152        NodeGetAttributesResult,
1153        fdomain_client::fidl::FDomainResourceDialect,
1154    > {
1155        DirectoryProxyInterface::r#get_attributes(self, query)
1156    }
1157
1158    /// Updates information about the node.
1159    ///
1160    /// + `attributes` the presence of a table field in `attributes` indicates
1161    /// the intent to update the corresponding attribute.
1162    ///
1163    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
1164    ///
1165    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
1166    pub fn r#update_attributes(
1167        &self,
1168        mut payload: &MutableNodeAttributes,
1169    ) -> fidl::client::QueryResponseFut<
1170        NodeUpdateAttributesResult,
1171        fdomain_client::fidl::FDomainResourceDialect,
1172    > {
1173        DirectoryProxyInterface::r#update_attributes(self, payload)
1174    }
1175
1176    /// Synchronizes updates to the node to the underlying media, if it exists.
1177    ///
1178    /// This method will return when the filesystem server has flushed the
1179    /// relevant updates to the underlying media, but does not guarantee the
1180    /// underlying media has persisted the information, nor that any information
1181    /// is committed to hardware. Clients may use `Sync` to ensure ordering
1182    /// between operations.
1183    ///
1184    /// This method does not require any rights.
1185    pub fn r#sync(
1186        &self,
1187    ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
1188    {
1189        DirectoryProxyInterface::r#sync(self)
1190    }
1191
1192    /// Creates an iterator over all the extended attribute names associated
1193    /// with this node. If an error occurs it is returned as an epitaph on the
1194    /// iterator request channel, and then the channel is closed.
1195    ///
1196    /// GetExtendedAttributes can be used with any of these names to retrieve
1197    /// the associated value.
1198    ///
1199    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
1200    pub fn r#list_extended_attributes(
1201        &self,
1202        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1203    ) -> Result<(), fidl::Error> {
1204        DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
1205    }
1206
1207    /// Get the value associated with the given attribute `name` for this node.
1208    ///
1209    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
1210    /// particular structure is imposed on them.
1211    ///
1212    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
1213    pub fn r#get_extended_attribute(
1214        &self,
1215        mut name: &[u8],
1216    ) -> fidl::client::QueryResponseFut<
1217        NodeGetExtendedAttributeResult,
1218        fdomain_client::fidl::FDomainResourceDialect,
1219    > {
1220        DirectoryProxyInterface::r#get_extended_attribute(self, name)
1221    }
1222
1223    /// Set the value for the given attribute `name` to `value` for this node.
1224    ///
1225    /// The attribute name may exist, in which case the attribute is updated.
1226    /// If the attribute doesn't exist, it is created. The name should have no
1227    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
1228    ///
1229    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
1230    pub fn r#set_extended_attribute(
1231        &self,
1232        mut name: &[u8],
1233        mut value: ExtendedAttributeValue,
1234        mut mode: SetExtendedAttributeMode,
1235    ) -> fidl::client::QueryResponseFut<
1236        NodeSetExtendedAttributeResult,
1237        fdomain_client::fidl::FDomainResourceDialect,
1238    > {
1239        DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
1240    }
1241
1242    /// Remove the specified extended attribute.
1243    ///
1244    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
1245    ///
1246    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
1247    pub fn r#remove_extended_attribute(
1248        &self,
1249        mut name: &[u8],
1250    ) -> fidl::client::QueryResponseFut<
1251        NodeRemoveExtendedAttributeResult,
1252        fdomain_client::fidl::FDomainResourceDialect,
1253    > {
1254        DirectoryProxyInterface::r#remove_extended_attribute(self, name)
1255    }
1256
1257    /// DEPRECATED - Use `fuchsia.io/Directory.Open` instead.
1258    pub fn r#deprecated_open(
1259        &self,
1260        mut flags: OpenFlags,
1261        mut mode: ModeType,
1262        mut path: &str,
1263        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1264    ) -> Result<(), fidl::Error> {
1265        DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
1266    }
1267
1268    /// Open (or create) a node relative to this directory. Any errors are communicated via an
1269    /// epitaph sent on the `object` channel.
1270    ///
1271    /// Errors:
1272    /// * `ZX_ERR_BAD_PATH` if `path` is invalid
1273    /// * See [`Flags`] for other errors which may be communicated based on `flags`
1274    pub fn r#open(
1275        &self,
1276        mut path: &str,
1277        mut flags: Flags,
1278        mut options: &Options,
1279        mut object: fdomain_client::Channel,
1280    ) -> Result<(), fidl::Error> {
1281        DirectoryProxyInterface::r#open(self, path, flags, options, object)
1282    }
1283
1284    /// Reads a collection of variably sized dirents into a buffer.
1285    /// The number of dirents in a directory may be very large: akin to
1286    /// calling read multiple times on a file, directories have a seek
1287    /// offset which is updated on subsequent calls to ReadDirents.
1288    /// Each call to ReadDirents will only return whole dirent structures,
1289    /// they will not get split across ReadDirent calls. When the seek
1290    /// offset reaches the end, `dirents` will be empty.
1291    ///
1292    /// These dirents are of the form:
1293    /// ```
1294    /// struct dirent {
1295    ///   // Describes the inode of the entry.
1296    ///   uint64 ino;
1297    ///   // Describes the length of the dirent name in bytes.
1298    ///   uint8 size;
1299    ///   // Describes the type of the entry. Aligned with the
1300    ///   // POSIX d_type values. Use `DirentType` constants.
1301    ///   uint8 type;
1302    ///   // Unterminated name of entry.
1303    ///   char name[0];
1304    /// }
1305    /// ```
1306    ///
1307    /// This method does not require any rights, since one could always probe for
1308    /// directory contents by triggering name conflicts during file creation.
1309    pub fn r#read_dirents(
1310        &self,
1311        mut max_bytes: u64,
1312    ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fdomain_client::fidl::FDomainResourceDialect>
1313    {
1314        DirectoryProxyInterface::r#read_dirents(self, max_bytes)
1315    }
1316
1317    /// Resets the directory seek offset.
1318    ///
1319    /// This method does not require any rights, similar to ReadDirents.
1320    pub fn r#rewind(
1321        &self,
1322    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1323        DirectoryProxyInterface::r#rewind(self)
1324    }
1325
1326    /// Acquires a token to a Directory which can be used to identify access to it at a later point
1327    /// in time. The token will remain valid for as long as the connection requesting the token
1328    /// remains open.
1329    ///
1330    /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns
1331    /// `ZX_ERR_BAD_HANDLE`.
1332    pub fn r#get_token(
1333        &self,
1334    ) -> fidl::client::QueryResponseFut<
1335        (i32, Option<fdomain_client::NullableHandle>),
1336        fdomain_client::fidl::FDomainResourceDialect,
1337    > {
1338        DirectoryProxyInterface::r#get_token(self)
1339    }
1340
1341    /// Creates a link to an object named src by the name dst, within a directory represented by
1342    /// token.
1343    ///
1344    /// `src` must be a resolved object name. Including "/" in the string will
1345    /// return `ZX_ERR_INVALID_ARGS`.
1346    ///
1347    /// `dst` must be a resolved object name. Including "/" in the string will
1348    /// return `ZX_ERR_INVALID_ARGS`.
1349    ///
1350    /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and
1351    /// `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.
1352    ///
1353    /// This will be atomic with respect to renaming or unlinking the source concurrently e.g. if
1354    /// there are two actors operating concurrently, and one actor performs a rename that affects
1355    /// the source within this directory, and the other does a link, each will appear to occur
1356    /// atomically in an unspecified order.
1357    pub fn r#link(
1358        &self,
1359        mut src: &str,
1360        mut dst_parent_token: fdomain_client::NullableHandle,
1361        mut dst: &str,
1362    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1363        DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
1364    }
1365
1366    /// Removes a child node from the this directory's list of entries.
1367    ///
1368    /// Note: this does not guarantee that the underlying object is destroyed.
1369    /// Although the link will be removed from the containing directory,
1370    /// objects with multiple references (such as files which are still open)
1371    /// will not actually be destroyed until all references are closed.
1372    ///
1373    /// * error `ZX_ERR_ACCESS_DENIED` if the connection does not have
1374    ///   [`Rights.WRITE_BYTES`].
1375    /// * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not
1376    ///   support writing.
1377    /// * error `ZX_ERR_BAD_PATH` if `name` is invalid.
1378    /// * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.
1379    /// * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,
1380    ///   containing a remote channel.
1381    /// * error `ZX_ERR_NOT_DIR` if the options requested a directory but
1382    ///     something other than a directory was found.
1383    ///
1384    /// Other errors may be returned for filesystem-specific reasons.
1385    ///
1386    /// This method requires the following rights:
1387    ///
1388    /// * [`Rights.ENUMERATE`]
1389    /// * [`Rights.MODIFY_DIRECTORY`]
1390    pub fn r#unlink(
1391        &self,
1392        mut name: &str,
1393        mut options: &UnlinkOptions,
1394    ) -> fidl::client::QueryResponseFut<
1395        DirectoryUnlinkResult,
1396        fdomain_client::fidl::FDomainResourceDialect,
1397    > {
1398        DirectoryProxyInterface::r#unlink(self, name, options)
1399    }
1400
1401    /// Renames a node named `src` to the name `dst`, in a directory represented
1402    /// by `dst_parent_token`.
1403    ///
1404    /// `src` and `dst` must be valid node names.
1405    /// See [`Name`] for what constitutes a valid name.
1406    ///
1407    /// This method requires the following rights on both the current connection, and the connection
1408    /// identified by `dst_parent_token`:
1409    ///
1410    /// * [`Rights.ENUMERATE`]
1411    /// * [`Rights.MODIFY_DIRECTORY`]
1412    ///
1413    /// The following requirements are necessary to avoid rights escalations.
1414    ///
1415    /// If the source and destination directory differ, the source directory must also have the
1416    /// maximal set of abilities supported for files, which would typically be
1417    /// [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and
1418    /// [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]
1419    /// right.
1420    ///
1421    /// If `src` refers to a directory, and differs from the destination directory, then the source
1422    /// directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.
1423    ///
1424    /// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
1425    /// * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.
1426    pub fn r#rename(
1427        &self,
1428        mut src: &str,
1429        mut dst_parent_token: fdomain_client::Event,
1430        mut dst: &str,
1431    ) -> fidl::client::QueryResponseFut<
1432        DirectoryRenameResult,
1433        fdomain_client::fidl::FDomainResourceDialect,
1434    > {
1435        DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
1436    }
1437
1438    /// Creates a symbolic link.
1439    ///
1440    /// `name` is the name to be given to the created symbolic link.
1441    /// `target` is the target of the symbolic link, which has no meaning on the server. The server
1442    /// will perform no validation of `target` except for a server chosen maximum length.
1443    /// `connection` is an optional server end of a channel that will speak the Symlink protocol
1444    /// on the successfully created node.
1445    ///
1446    /// * [`Rights.MODIFY_DIRECTORY`]
1447    ///
1448    /// * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.
1449    /// * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.
1450    /// * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].
1451    /// * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.
1452    pub fn r#create_symlink(
1453        &self,
1454        mut name: &str,
1455        mut target: &[u8],
1456        mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
1457    ) -> fidl::client::QueryResponseFut<
1458        DirectoryCreateSymlinkResult,
1459        fdomain_client::fidl::FDomainResourceDialect,
1460    > {
1461        DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
1462    }
1463
1464    /// Watches a directory, receiving events of added messages on the
1465    /// watcher request channel.
1466    ///
1467    /// Options must be zero; it is reserved.
1468    ///
1469    /// This method does not require any rights, similar to ReadDirents.
1470    pub fn r#watch(
1471        &self,
1472        mut mask: WatchMask,
1473        mut options: u32,
1474        mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
1475    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
1476        DirectoryProxyInterface::r#watch(self, mask, options, watcher)
1477    }
1478}
1479
1480impl DirectoryProxyInterface for DirectoryProxy {
1481    type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
1482        AdvisoryLockingAdvisoryLockResult,
1483        fdomain_client::fidl::FDomainResourceDialect,
1484    >;
1485    fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
1486        fn _decode(
1487            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1488        ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1489            let _response = fidl::client::decode_transaction_body::<
1490                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1491                fdomain_client::fidl::FDomainResourceDialect,
1492                0x6ee9c0ad53ec87aa,
1493            >(_buf?)?;
1494            Ok(_response.map(|x| x))
1495        }
1496        self.client.send_query_and_decode::<
1497            AdvisoryLockingAdvisoryLockRequest,
1498            AdvisoryLockingAdvisoryLockResult,
1499        >(
1500            (request,),
1501            0x6ee9c0ad53ec87aa,
1502            fidl::encoding::DynamicFlags::empty(),
1503            _decode,
1504        )
1505    }
1506
1507    fn r#clone(
1508        &self,
1509        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
1510    ) -> Result<(), fidl::Error> {
1511        self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
1512            (request,),
1513            0x20d8a7aba2168a79,
1514            fidl::encoding::DynamicFlags::empty(),
1515        )
1516    }
1517
1518    type CloseResponseFut = fidl::client::QueryResponseFut<
1519        fdomain_fuchsia_unknown::CloseableCloseResult,
1520        fdomain_client::fidl::FDomainResourceDialect,
1521    >;
1522    fn r#close(&self) -> Self::CloseResponseFut {
1523        fn _decode(
1524            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1525        ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1526            let _response = fidl::client::decode_transaction_body::<
1527                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1528                fdomain_client::fidl::FDomainResourceDialect,
1529                0x5ac5d459ad7f657e,
1530            >(_buf?)?;
1531            Ok(_response.map(|x| x))
1532        }
1533        self.client.send_query_and_decode::<
1534            fidl::encoding::EmptyPayload,
1535            fdomain_fuchsia_unknown::CloseableCloseResult,
1536        >(
1537            (),
1538            0x5ac5d459ad7f657e,
1539            fidl::encoding::DynamicFlags::empty(),
1540            _decode,
1541        )
1542    }
1543
1544    type QueryResponseFut =
1545        fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
1546    fn r#query(&self) -> Self::QueryResponseFut {
1547        fn _decode(
1548            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1549        ) -> Result<Vec<u8>, fidl::Error> {
1550            let _response = fidl::client::decode_transaction_body::<
1551                fdomain_fuchsia_unknown::QueryableQueryResponse,
1552                fdomain_client::fidl::FDomainResourceDialect,
1553                0x2658edee9decfc06,
1554            >(_buf?)?;
1555            Ok(_response.protocol)
1556        }
1557        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
1558            (),
1559            0x2658edee9decfc06,
1560            fidl::encoding::DynamicFlags::empty(),
1561            _decode,
1562        )
1563    }
1564
1565    fn r#deprecated_clone(
1566        &self,
1567        mut flags: OpenFlags,
1568        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1569    ) -> Result<(), fidl::Error> {
1570        self.client.send::<NodeDeprecatedCloneRequest>(
1571            (flags, object),
1572            0x5a61678f293ce16f,
1573            fidl::encoding::DynamicFlags::FLEXIBLE,
1574        )
1575    }
1576
1577    type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
1578        (i32, NodeAttributes),
1579        fdomain_client::fidl::FDomainResourceDialect,
1580    >;
1581    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
1582        fn _decode(
1583            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1584        ) -> Result<(i32, NodeAttributes), fidl::Error> {
1585            let _response = fidl::client::decode_transaction_body::<
1586                NodeDeprecatedGetAttrResponse,
1587                fdomain_client::fidl::FDomainResourceDialect,
1588                0x78985e216314dafd,
1589            >(_buf?)?;
1590            Ok((_response.s, _response.attributes))
1591        }
1592        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
1593            (),
1594            0x78985e216314dafd,
1595            fidl::encoding::DynamicFlags::empty(),
1596            _decode,
1597        )
1598    }
1599
1600    type DeprecatedSetAttrResponseFut =
1601        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1602    fn r#deprecated_set_attr(
1603        &self,
1604        mut flags: NodeAttributeFlags,
1605        mut attributes: &NodeAttributes,
1606    ) -> Self::DeprecatedSetAttrResponseFut {
1607        fn _decode(
1608            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1609        ) -> Result<i32, fidl::Error> {
1610            let _response = fidl::client::decode_transaction_body::<
1611                NodeDeprecatedSetAttrResponse,
1612                fdomain_client::fidl::FDomainResourceDialect,
1613                0x4186c0f40d938f46,
1614            >(_buf?)?;
1615            Ok(_response.s)
1616        }
1617        self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
1618            (flags, attributes),
1619            0x4186c0f40d938f46,
1620            fidl::encoding::DynamicFlags::empty(),
1621            _decode,
1622        )
1623    }
1624
1625    type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
1626        (i32, OpenFlags),
1627        fdomain_client::fidl::FDomainResourceDialect,
1628    >;
1629    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
1630        fn _decode(
1631            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1632        ) -> Result<(i32, OpenFlags), fidl::Error> {
1633            let _response = fidl::client::decode_transaction_body::<
1634                NodeDeprecatedGetFlagsResponse,
1635                fdomain_client::fidl::FDomainResourceDialect,
1636                0x5b88fffb8eda3aa1,
1637            >(_buf?)?;
1638            Ok((_response.s, _response.flags))
1639        }
1640        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
1641            (),
1642            0x5b88fffb8eda3aa1,
1643            fidl::encoding::DynamicFlags::empty(),
1644            _decode,
1645        )
1646    }
1647
1648    type DeprecatedSetFlagsResponseFut =
1649        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1650    fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
1651        fn _decode(
1652            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1653        ) -> Result<i32, fidl::Error> {
1654            let _response = fidl::client::decode_transaction_body::<
1655                NodeDeprecatedSetFlagsResponse,
1656                fdomain_client::fidl::FDomainResourceDialect,
1657                0x5295b76c71fde733,
1658            >(_buf?)?;
1659            Ok(_response.s)
1660        }
1661        self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
1662            (flags,),
1663            0x5295b76c71fde733,
1664            fidl::encoding::DynamicFlags::empty(),
1665            _decode,
1666        )
1667    }
1668
1669    type GetFlagsResponseFut = fidl::client::QueryResponseFut<
1670        NodeGetFlagsResult,
1671        fdomain_client::fidl::FDomainResourceDialect,
1672    >;
1673    fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
1674        fn _decode(
1675            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1676        ) -> Result<NodeGetFlagsResult, fidl::Error> {
1677            let _response = fidl::client::decode_transaction_body::<
1678                fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1679                fdomain_client::fidl::FDomainResourceDialect,
1680                0x176eb318f64ec23,
1681            >(_buf?)?
1682            .into_result_fdomain::<DirectoryMarker>("get_flags")?;
1683            Ok(_response.map(|x| x.flags))
1684        }
1685        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
1686            (),
1687            0x176eb318f64ec23,
1688            fidl::encoding::DynamicFlags::FLEXIBLE,
1689            _decode,
1690        )
1691    }
1692
1693    type SetFlagsResponseFut = fidl::client::QueryResponseFut<
1694        NodeSetFlagsResult,
1695        fdomain_client::fidl::FDomainResourceDialect,
1696    >;
1697    fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
1698        fn _decode(
1699            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1700        ) -> Result<NodeSetFlagsResult, fidl::Error> {
1701            let _response = fidl::client::decode_transaction_body::<
1702                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1703                fdomain_client::fidl::FDomainResourceDialect,
1704                0x55a8028685791ea8,
1705            >(_buf?)?
1706            .into_result_fdomain::<DirectoryMarker>("set_flags")?;
1707            Ok(_response.map(|x| x))
1708        }
1709        self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
1710            (flags,),
1711            0x55a8028685791ea8,
1712            fidl::encoding::DynamicFlags::FLEXIBLE,
1713            _decode,
1714        )
1715    }
1716
1717    type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
1718        (i32, Option<Box<FilesystemInfo>>),
1719        fdomain_client::fidl::FDomainResourceDialect,
1720    >;
1721    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
1722        fn _decode(
1723            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1724        ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1725            let _response = fidl::client::decode_transaction_body::<
1726                NodeQueryFilesystemResponse,
1727                fdomain_client::fidl::FDomainResourceDialect,
1728                0x6f344a1c6b0a0610,
1729            >(_buf?)?;
1730            Ok((_response.s, _response.info))
1731        }
1732        self.client.send_query_and_decode::<
1733            fidl::encoding::EmptyPayload,
1734            (i32, Option<Box<FilesystemInfo>>),
1735        >(
1736            (),
1737            0x6f344a1c6b0a0610,
1738            fidl::encoding::DynamicFlags::empty(),
1739            _decode,
1740        )
1741    }
1742
1743    type GetAttributesResponseFut = fidl::client::QueryResponseFut<
1744        NodeGetAttributesResult,
1745        fdomain_client::fidl::FDomainResourceDialect,
1746    >;
1747    fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
1748        fn _decode(
1749            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1750        ) -> Result<NodeGetAttributesResult, fidl::Error> {
1751            let _response = fidl::client::decode_transaction_body::<
1752                fidl::encoding::ResultType<NodeAttributes2, i32>,
1753                fdomain_client::fidl::FDomainResourceDialect,
1754                0x3d4396a638ea053b,
1755            >(_buf?)?;
1756            Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1757        }
1758        self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
1759            (query,),
1760            0x3d4396a638ea053b,
1761            fidl::encoding::DynamicFlags::empty(),
1762            _decode,
1763        )
1764    }
1765
1766    type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
1767        NodeUpdateAttributesResult,
1768        fdomain_client::fidl::FDomainResourceDialect,
1769    >;
1770    fn r#update_attributes(
1771        &self,
1772        mut payload: &MutableNodeAttributes,
1773    ) -> Self::UpdateAttributesResponseFut {
1774        fn _decode(
1775            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1776        ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1777            let _response = fidl::client::decode_transaction_body::<
1778                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1779                fdomain_client::fidl::FDomainResourceDialect,
1780                0x3308c1da5a89bf08,
1781            >(_buf?)?;
1782            Ok(_response.map(|x| x))
1783        }
1784        self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
1785            payload,
1786            0x3308c1da5a89bf08,
1787            fidl::encoding::DynamicFlags::empty(),
1788            _decode,
1789        )
1790    }
1791
1792    type SyncResponseFut = fidl::client::QueryResponseFut<
1793        NodeSyncResult,
1794        fdomain_client::fidl::FDomainResourceDialect,
1795    >;
1796    fn r#sync(&self) -> Self::SyncResponseFut {
1797        fn _decode(
1798            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1799        ) -> Result<NodeSyncResult, fidl::Error> {
1800            let _response = fidl::client::decode_transaction_body::<
1801                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1802                fdomain_client::fidl::FDomainResourceDialect,
1803                0x2c5c27ca0ab5dc49,
1804            >(_buf?)?;
1805            Ok(_response.map(|x| x))
1806        }
1807        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
1808            (),
1809            0x2c5c27ca0ab5dc49,
1810            fidl::encoding::DynamicFlags::empty(),
1811            _decode,
1812        )
1813    }
1814
1815    fn r#list_extended_attributes(
1816        &self,
1817        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
1818    ) -> Result<(), fidl::Error> {
1819        self.client.send::<NodeListExtendedAttributesRequest>(
1820            (iterator,),
1821            0x4b61033de007fcd0,
1822            fidl::encoding::DynamicFlags::empty(),
1823        )
1824    }
1825
1826    type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1827        NodeGetExtendedAttributeResult,
1828        fdomain_client::fidl::FDomainResourceDialect,
1829    >;
1830    fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
1831        fn _decode(
1832            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1833        ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1834            let _response = fidl::client::decode_transaction_body::<
1835                fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1836                fdomain_client::fidl::FDomainResourceDialect,
1837                0x45ffa3ccfdeb76db,
1838            >(_buf?)?;
1839            Ok(_response.map(|x| x))
1840        }
1841        self.client.send_query_and_decode::<
1842            NodeGetExtendedAttributeRequest,
1843            NodeGetExtendedAttributeResult,
1844        >(
1845            (name,),
1846            0x45ffa3ccfdeb76db,
1847            fidl::encoding::DynamicFlags::empty(),
1848            _decode,
1849        )
1850    }
1851
1852    type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1853        NodeSetExtendedAttributeResult,
1854        fdomain_client::fidl::FDomainResourceDialect,
1855    >;
1856    fn r#set_extended_attribute(
1857        &self,
1858        mut name: &[u8],
1859        mut value: ExtendedAttributeValue,
1860        mut mode: SetExtendedAttributeMode,
1861    ) -> Self::SetExtendedAttributeResponseFut {
1862        fn _decode(
1863            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1864        ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1865            let _response = fidl::client::decode_transaction_body::<
1866                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1867                fdomain_client::fidl::FDomainResourceDialect,
1868                0x4a951362f681f23c,
1869            >(_buf?)?;
1870            Ok(_response.map(|x| x))
1871        }
1872        self.client.send_query_and_decode::<
1873            NodeSetExtendedAttributeRequest,
1874            NodeSetExtendedAttributeResult,
1875        >(
1876            (name, &mut value, mode,),
1877            0x4a951362f681f23c,
1878            fidl::encoding::DynamicFlags::empty(),
1879            _decode,
1880        )
1881    }
1882
1883    type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
1884        NodeRemoveExtendedAttributeResult,
1885        fdomain_client::fidl::FDomainResourceDialect,
1886    >;
1887    fn r#remove_extended_attribute(
1888        &self,
1889        mut name: &[u8],
1890    ) -> Self::RemoveExtendedAttributeResponseFut {
1891        fn _decode(
1892            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1893        ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1894            let _response = fidl::client::decode_transaction_body::<
1895                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1896                fdomain_client::fidl::FDomainResourceDialect,
1897                0x7a0b9f3a9bf9032d,
1898            >(_buf?)?;
1899            Ok(_response.map(|x| x))
1900        }
1901        self.client.send_query_and_decode::<
1902            NodeRemoveExtendedAttributeRequest,
1903            NodeRemoveExtendedAttributeResult,
1904        >(
1905            (name,),
1906            0x7a0b9f3a9bf9032d,
1907            fidl::encoding::DynamicFlags::empty(),
1908            _decode,
1909        )
1910    }
1911
1912    fn r#deprecated_open(
1913        &self,
1914        mut flags: OpenFlags,
1915        mut mode: ModeType,
1916        mut path: &str,
1917        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
1918    ) -> Result<(), fidl::Error> {
1919        self.client.send::<DirectoryDeprecatedOpenRequest>(
1920            (flags, mode, path, object),
1921            0x2c5044561d685ec0,
1922            fidl::encoding::DynamicFlags::FLEXIBLE,
1923        )
1924    }
1925
1926    fn r#open(
1927        &self,
1928        mut path: &str,
1929        mut flags: Flags,
1930        mut options: &Options,
1931        mut object: fdomain_client::Channel,
1932    ) -> Result<(), fidl::Error> {
1933        self.client.send::<DirectoryOpenRequest>(
1934            (path, flags, options, object),
1935            0x568ddcb9a9cbb6d9,
1936            fidl::encoding::DynamicFlags::empty(),
1937        )
1938    }
1939
1940    type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
1941        (i32, Vec<u8>),
1942        fdomain_client::fidl::FDomainResourceDialect,
1943    >;
1944    fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
1945        fn _decode(
1946            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1947        ) -> Result<(i32, Vec<u8>), fidl::Error> {
1948            let _response = fidl::client::decode_transaction_body::<
1949                DirectoryReadDirentsResponse,
1950                fdomain_client::fidl::FDomainResourceDialect,
1951                0x3582806bf27faa0a,
1952            >(_buf?)?;
1953            Ok((_response.s, _response.dirents))
1954        }
1955        self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
1956            (max_bytes,),
1957            0x3582806bf27faa0a,
1958            fidl::encoding::DynamicFlags::empty(),
1959            _decode,
1960        )
1961    }
1962
1963    type RewindResponseFut =
1964        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
1965    fn r#rewind(&self) -> Self::RewindResponseFut {
1966        fn _decode(
1967            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1968        ) -> Result<i32, fidl::Error> {
1969            let _response = fidl::client::decode_transaction_body::<
1970                DirectoryRewindResponse,
1971                fdomain_client::fidl::FDomainResourceDialect,
1972                0x16b1202af0f34c71,
1973            >(_buf?)?;
1974            Ok(_response.s)
1975        }
1976        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
1977            (),
1978            0x16b1202af0f34c71,
1979            fidl::encoding::DynamicFlags::empty(),
1980            _decode,
1981        )
1982    }
1983
1984    type GetTokenResponseFut = fidl::client::QueryResponseFut<
1985        (i32, Option<fdomain_client::NullableHandle>),
1986        fdomain_client::fidl::FDomainResourceDialect,
1987    >;
1988    fn r#get_token(&self) -> Self::GetTokenResponseFut {
1989        fn _decode(
1990            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1991        ) -> Result<(i32, Option<fdomain_client::NullableHandle>), fidl::Error> {
1992            let _response = fidl::client::decode_transaction_body::<
1993                DirectoryGetTokenResponse,
1994                fdomain_client::fidl::FDomainResourceDialect,
1995                0x26ae9d18763c8655,
1996            >(_buf?)?;
1997            Ok((_response.s, _response.token))
1998        }
1999        self.client.send_query_and_decode::<
2000            fidl::encoding::EmptyPayload,
2001            (i32, Option<fdomain_client::NullableHandle>),
2002        >(
2003            (),
2004            0x26ae9d18763c8655,
2005            fidl::encoding::DynamicFlags::empty(),
2006            _decode,
2007        )
2008    }
2009
2010    type LinkResponseFut =
2011        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2012    fn r#link(
2013        &self,
2014        mut src: &str,
2015        mut dst_parent_token: fdomain_client::NullableHandle,
2016        mut dst: &str,
2017    ) -> Self::LinkResponseFut {
2018        fn _decode(
2019            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2020        ) -> Result<i32, fidl::Error> {
2021            let _response = fidl::client::decode_transaction_body::<
2022                DirectoryLinkResponse,
2023                fdomain_client::fidl::FDomainResourceDialect,
2024                0x740604c0c7c930e7,
2025            >(_buf?)?;
2026            Ok(_response.s)
2027        }
2028        self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2029            (src, dst_parent_token, dst),
2030            0x740604c0c7c930e7,
2031            fidl::encoding::DynamicFlags::empty(),
2032            _decode,
2033        )
2034    }
2035
2036    type UnlinkResponseFut = fidl::client::QueryResponseFut<
2037        DirectoryUnlinkResult,
2038        fdomain_client::fidl::FDomainResourceDialect,
2039    >;
2040    fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2041        fn _decode(
2042            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2043        ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2044            let _response = fidl::client::decode_transaction_body::<
2045                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2046                fdomain_client::fidl::FDomainResourceDialect,
2047                0x750a0326a78d7bed,
2048            >(_buf?)?;
2049            Ok(_response.map(|x| x))
2050        }
2051        self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2052            (name, options),
2053            0x750a0326a78d7bed,
2054            fidl::encoding::DynamicFlags::empty(),
2055            _decode,
2056        )
2057    }
2058
2059    type RenameResponseFut = fidl::client::QueryResponseFut<
2060        DirectoryRenameResult,
2061        fdomain_client::fidl::FDomainResourceDialect,
2062    >;
2063    fn r#rename(
2064        &self,
2065        mut src: &str,
2066        mut dst_parent_token: fdomain_client::Event,
2067        mut dst: &str,
2068    ) -> Self::RenameResponseFut {
2069        fn _decode(
2070            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2071        ) -> Result<DirectoryRenameResult, fidl::Error> {
2072            let _response = fidl::client::decode_transaction_body::<
2073                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2074                fdomain_client::fidl::FDomainResourceDialect,
2075                0x7060e7723b9928de,
2076            >(_buf?)?;
2077            Ok(_response.map(|x| x))
2078        }
2079        self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2080            (src, dst_parent_token, dst),
2081            0x7060e7723b9928de,
2082            fidl::encoding::DynamicFlags::empty(),
2083            _decode,
2084        )
2085    }
2086
2087    type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2088        DirectoryCreateSymlinkResult,
2089        fdomain_client::fidl::FDomainResourceDialect,
2090    >;
2091    fn r#create_symlink(
2092        &self,
2093        mut name: &str,
2094        mut target: &[u8],
2095        mut connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
2096    ) -> Self::CreateSymlinkResponseFut {
2097        fn _decode(
2098            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2099        ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2100            let _response = fidl::client::decode_transaction_body::<
2101                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2102                fdomain_client::fidl::FDomainResourceDialect,
2103                0x21ce0f19ec043889,
2104            >(_buf?)?;
2105            Ok(_response.map(|x| x))
2106        }
2107        self.client
2108            .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2109                (name, target, connection),
2110                0x21ce0f19ec043889,
2111                fidl::encoding::DynamicFlags::empty(),
2112                _decode,
2113            )
2114    }
2115
2116    type WatchResponseFut =
2117        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
2118    fn r#watch(
2119        &self,
2120        mut mask: WatchMask,
2121        mut options: u32,
2122        mut watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
2123    ) -> Self::WatchResponseFut {
2124        fn _decode(
2125            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2126        ) -> Result<i32, fidl::Error> {
2127            let _response = fidl::client::decode_transaction_body::<
2128                DirectoryWatchResponse,
2129                fdomain_client::fidl::FDomainResourceDialect,
2130                0x5717193a59d66d91,
2131            >(_buf?)?;
2132            Ok(_response.s)
2133        }
2134        self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
2135            (mask, options, watcher),
2136            0x5717193a59d66d91,
2137            fidl::encoding::DynamicFlags::empty(),
2138            _decode,
2139        )
2140    }
2141}
2142
2143pub struct DirectoryEventStream {
2144    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
2145}
2146
2147impl std::marker::Unpin for DirectoryEventStream {}
2148
2149impl futures::stream::FusedStream for DirectoryEventStream {
2150    fn is_terminated(&self) -> bool {
2151        self.event_receiver.is_terminated()
2152    }
2153}
2154
2155impl futures::Stream for DirectoryEventStream {
2156    type Item = Result<DirectoryEvent, fidl::Error>;
2157
2158    fn poll_next(
2159        mut self: std::pin::Pin<&mut Self>,
2160        cx: &mut std::task::Context<'_>,
2161    ) -> std::task::Poll<Option<Self::Item>> {
2162        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2163            &mut self.event_receiver,
2164            cx
2165        )?) {
2166            Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
2167            None => std::task::Poll::Ready(None),
2168        }
2169    }
2170}
2171
2172#[derive(Debug)]
2173pub enum DirectoryEvent {
2174    OnOpen_ {
2175        s: i32,
2176        info: Option<Box<NodeInfoDeprecated>>,
2177    },
2178    OnRepresentation {
2179        payload: Representation,
2180    },
2181    #[non_exhaustive]
2182    _UnknownEvent {
2183        /// Ordinal of the event that was sent.
2184        ordinal: u64,
2185    },
2186}
2187
2188impl DirectoryEvent {
2189    #[allow(irrefutable_let_patterns)]
2190    pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
2191        if let DirectoryEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
2192    }
2193    #[allow(irrefutable_let_patterns)]
2194    pub fn into_on_representation(self) -> Option<Representation> {
2195        if let DirectoryEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
2196    }
2197
2198    /// Decodes a message buffer as a [`DirectoryEvent`].
2199    fn decode(
2200        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2201    ) -> Result<DirectoryEvent, fidl::Error> {
2202        let (bytes, _handles) = buf.split_mut();
2203        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2204        debug_assert_eq!(tx_header.tx_id, 0);
2205        match tx_header.ordinal {
2206            0x7fc7bbb1dbfd1972 => {
2207                let mut out = fidl::new_empty!(
2208                    NodeOnOpenRequest,
2209                    fdomain_client::fidl::FDomainResourceDialect
2210                );
2211                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
2212                Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
2213            }
2214            0x5cb40567d80a510c => {
2215                let mut out =
2216                    fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
2217                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
2218                Ok((DirectoryEvent::OnRepresentation { payload: out }))
2219            }
2220            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2221                Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2222            }
2223            _ => Err(fidl::Error::UnknownOrdinal {
2224                ordinal: tx_header.ordinal,
2225                protocol_name:
2226                    <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2227            }),
2228        }
2229    }
2230}
2231
2232/// A Stream of incoming requests for fuchsia.io/Directory.
2233pub struct DirectoryRequestStream {
2234    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2235    is_terminated: bool,
2236}
2237
2238impl std::marker::Unpin for DirectoryRequestStream {}
2239
2240impl futures::stream::FusedStream for DirectoryRequestStream {
2241    fn is_terminated(&self) -> bool {
2242        self.is_terminated
2243    }
2244}
2245
2246impl fdomain_client::fidl::RequestStream for DirectoryRequestStream {
2247    type Protocol = DirectoryMarker;
2248    type ControlHandle = DirectoryControlHandle;
2249
2250    fn from_channel(channel: fdomain_client::Channel) -> Self {
2251        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2252    }
2253
2254    fn control_handle(&self) -> Self::ControlHandle {
2255        DirectoryControlHandle { inner: self.inner.clone() }
2256    }
2257
2258    fn into_inner(
2259        self,
2260    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
2261    {
2262        (self.inner, self.is_terminated)
2263    }
2264
2265    fn from_inner(
2266        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
2267        is_terminated: bool,
2268    ) -> Self {
2269        Self { inner, is_terminated }
2270    }
2271}
2272
2273impl futures::Stream for DirectoryRequestStream {
2274    type Item = Result<DirectoryRequest, fidl::Error>;
2275
2276    fn poll_next(
2277        mut self: std::pin::Pin<&mut Self>,
2278        cx: &mut std::task::Context<'_>,
2279    ) -> std::task::Poll<Option<Self::Item>> {
2280        let this = &mut *self;
2281        if this.inner.check_shutdown(cx) {
2282            this.is_terminated = true;
2283            return std::task::Poll::Ready(None);
2284        }
2285        if this.is_terminated {
2286            panic!("polled DirectoryRequestStream after completion");
2287        }
2288        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
2289            |bytes, handles| {
2290                match this.inner.channel().read_etc(cx, bytes, handles) {
2291                    std::task::Poll::Ready(Ok(())) => {}
2292                    std::task::Poll::Pending => return std::task::Poll::Pending,
2293                    std::task::Poll::Ready(Err(None)) => {
2294                        this.is_terminated = true;
2295                        return std::task::Poll::Ready(None);
2296                    }
2297                    std::task::Poll::Ready(Err(Some(e))) => {
2298                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2299                            e.into(),
2300                        ))));
2301                    }
2302                }
2303
2304                // A message has been received from the channel
2305                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2306
2307                std::task::Poll::Ready(Some(match header.ordinal {
2308                    0x6ee9c0ad53ec87aa => {
2309                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2310                        let mut req = fidl::new_empty!(
2311                            AdvisoryLockingAdvisoryLockRequest,
2312                            fdomain_client::fidl::FDomainResourceDialect
2313                        );
2314                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
2315                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2316                        Ok(DirectoryRequest::AdvisoryLock {
2317                            request: req.request,
2318
2319                            responder: DirectoryAdvisoryLockResponder {
2320                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2321                                tx_id: header.tx_id,
2322                            },
2323                        })
2324                    }
2325                    0x20d8a7aba2168a79 => {
2326                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2327                        let mut req = fidl::new_empty!(
2328                            fdomain_fuchsia_unknown::CloneableCloneRequest,
2329                            fdomain_client::fidl::FDomainResourceDialect
2330                        );
2331                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2332                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2333                        Ok(DirectoryRequest::Clone { request: req.request, control_handle })
2334                    }
2335                    0x5ac5d459ad7f657e => {
2336                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2337                        let mut req = fidl::new_empty!(
2338                            fidl::encoding::EmptyPayload,
2339                            fdomain_client::fidl::FDomainResourceDialect
2340                        );
2341                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2342                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2343                        Ok(DirectoryRequest::Close {
2344                            responder: DirectoryCloseResponder {
2345                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2346                                tx_id: header.tx_id,
2347                            },
2348                        })
2349                    }
2350                    0x2658edee9decfc06 => {
2351                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2352                        let mut req = fidl::new_empty!(
2353                            fidl::encoding::EmptyPayload,
2354                            fdomain_client::fidl::FDomainResourceDialect
2355                        );
2356                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2357                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2358                        Ok(DirectoryRequest::Query {
2359                            responder: DirectoryQueryResponder {
2360                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2361                                tx_id: header.tx_id,
2362                            },
2363                        })
2364                    }
2365                    0x5a61678f293ce16f => {
2366                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2367                        let mut req = fidl::new_empty!(
2368                            NodeDeprecatedCloneRequest,
2369                            fdomain_client::fidl::FDomainResourceDialect
2370                        );
2371                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
2372                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2373                        Ok(DirectoryRequest::DeprecatedClone {
2374                            flags: req.flags,
2375                            object: req.object,
2376
2377                            control_handle,
2378                        })
2379                    }
2380                    0x78985e216314dafd => {
2381                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2382                        let mut req = fidl::new_empty!(
2383                            fidl::encoding::EmptyPayload,
2384                            fdomain_client::fidl::FDomainResourceDialect
2385                        );
2386                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2387                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2388                        Ok(DirectoryRequest::DeprecatedGetAttr {
2389                            responder: DirectoryDeprecatedGetAttrResponder {
2390                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2391                                tx_id: header.tx_id,
2392                            },
2393                        })
2394                    }
2395                    0x4186c0f40d938f46 => {
2396                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2397                        let mut req = fidl::new_empty!(
2398                            NodeDeprecatedSetAttrRequest,
2399                            fdomain_client::fidl::FDomainResourceDialect
2400                        );
2401                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
2402                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2403                        Ok(DirectoryRequest::DeprecatedSetAttr {
2404                            flags: req.flags,
2405                            attributes: req.attributes,
2406
2407                            responder: DirectoryDeprecatedSetAttrResponder {
2408                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2409                                tx_id: header.tx_id,
2410                            },
2411                        })
2412                    }
2413                    0x5b88fffb8eda3aa1 => {
2414                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2415                        let mut req = fidl::new_empty!(
2416                            fidl::encoding::EmptyPayload,
2417                            fdomain_client::fidl::FDomainResourceDialect
2418                        );
2419                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2420                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2421                        Ok(DirectoryRequest::DeprecatedGetFlags {
2422                            responder: DirectoryDeprecatedGetFlagsResponder {
2423                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2424                                tx_id: header.tx_id,
2425                            },
2426                        })
2427                    }
2428                    0x5295b76c71fde733 => {
2429                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2430                        let mut req = fidl::new_empty!(
2431                            NodeDeprecatedSetFlagsRequest,
2432                            fdomain_client::fidl::FDomainResourceDialect
2433                        );
2434                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2435                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2436                        Ok(DirectoryRequest::DeprecatedSetFlags {
2437                            flags: req.flags,
2438
2439                            responder: DirectoryDeprecatedSetFlagsResponder {
2440                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2441                                tx_id: header.tx_id,
2442                            },
2443                        })
2444                    }
2445                    0x176eb318f64ec23 => {
2446                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2447                        let mut req = fidl::new_empty!(
2448                            fidl::encoding::EmptyPayload,
2449                            fdomain_client::fidl::FDomainResourceDialect
2450                        );
2451                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2452                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2453                        Ok(DirectoryRequest::GetFlags {
2454                            responder: DirectoryGetFlagsResponder {
2455                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2456                                tx_id: header.tx_id,
2457                            },
2458                        })
2459                    }
2460                    0x55a8028685791ea8 => {
2461                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2462                        let mut req = fidl::new_empty!(
2463                            NodeSetFlagsRequest,
2464                            fdomain_client::fidl::FDomainResourceDialect
2465                        );
2466                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
2467                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2468                        Ok(DirectoryRequest::SetFlags {
2469                            flags: req.flags,
2470
2471                            responder: DirectorySetFlagsResponder {
2472                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2473                                tx_id: header.tx_id,
2474                            },
2475                        })
2476                    }
2477                    0x6f344a1c6b0a0610 => {
2478                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2479                        let mut req = fidl::new_empty!(
2480                            fidl::encoding::EmptyPayload,
2481                            fdomain_client::fidl::FDomainResourceDialect
2482                        );
2483                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2484                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2485                        Ok(DirectoryRequest::QueryFilesystem {
2486                            responder: DirectoryQueryFilesystemResponder {
2487                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2488                                tx_id: header.tx_id,
2489                            },
2490                        })
2491                    }
2492                    0x3d4396a638ea053b => {
2493                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2494                        let mut req = fidl::new_empty!(
2495                            NodeGetAttributesRequest,
2496                            fdomain_client::fidl::FDomainResourceDialect
2497                        );
2498                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2499                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2500                        Ok(DirectoryRequest::GetAttributes {
2501                            query: req.query,
2502
2503                            responder: DirectoryGetAttributesResponder {
2504                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2505                                tx_id: header.tx_id,
2506                            },
2507                        })
2508                    }
2509                    0x3308c1da5a89bf08 => {
2510                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2511                        let mut req = fidl::new_empty!(
2512                            MutableNodeAttributes,
2513                            fdomain_client::fidl::FDomainResourceDialect
2514                        );
2515                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
2516                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2517                        Ok(DirectoryRequest::UpdateAttributes {
2518                            payload: req,
2519                            responder: DirectoryUpdateAttributesResponder {
2520                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2521                                tx_id: header.tx_id,
2522                            },
2523                        })
2524                    }
2525                    0x2c5c27ca0ab5dc49 => {
2526                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2527                        let mut req = fidl::new_empty!(
2528                            fidl::encoding::EmptyPayload,
2529                            fdomain_client::fidl::FDomainResourceDialect
2530                        );
2531                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2532                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2533                        Ok(DirectoryRequest::Sync {
2534                            responder: DirectorySyncResponder {
2535                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2536                                tx_id: header.tx_id,
2537                            },
2538                        })
2539                    }
2540                    0x4b61033de007fcd0 => {
2541                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2542                        let mut req = fidl::new_empty!(
2543                            NodeListExtendedAttributesRequest,
2544                            fdomain_client::fidl::FDomainResourceDialect
2545                        );
2546                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
2547                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2548                        Ok(DirectoryRequest::ListExtendedAttributes {
2549                            iterator: req.iterator,
2550
2551                            control_handle,
2552                        })
2553                    }
2554                    0x45ffa3ccfdeb76db => {
2555                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2556                        let mut req = fidl::new_empty!(
2557                            NodeGetExtendedAttributeRequest,
2558                            fdomain_client::fidl::FDomainResourceDialect
2559                        );
2560                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2561                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2562                        Ok(DirectoryRequest::GetExtendedAttribute {
2563                            name: req.name,
2564
2565                            responder: DirectoryGetExtendedAttributeResponder {
2566                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2567                                tx_id: header.tx_id,
2568                            },
2569                        })
2570                    }
2571                    0x4a951362f681f23c => {
2572                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2573                        let mut req = fidl::new_empty!(
2574                            NodeSetExtendedAttributeRequest,
2575                            fdomain_client::fidl::FDomainResourceDialect
2576                        );
2577                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2578                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2579                        Ok(DirectoryRequest::SetExtendedAttribute {
2580                            name: req.name,
2581                            value: req.value,
2582                            mode: req.mode,
2583
2584                            responder: DirectorySetExtendedAttributeResponder {
2585                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2586                                tx_id: header.tx_id,
2587                            },
2588                        })
2589                    }
2590                    0x7a0b9f3a9bf9032d => {
2591                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2592                        let mut req = fidl::new_empty!(
2593                            NodeRemoveExtendedAttributeRequest,
2594                            fdomain_client::fidl::FDomainResourceDialect
2595                        );
2596                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
2597                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2598                        Ok(DirectoryRequest::RemoveExtendedAttribute {
2599                            name: req.name,
2600
2601                            responder: DirectoryRemoveExtendedAttributeResponder {
2602                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2603                                tx_id: header.tx_id,
2604                            },
2605                        })
2606                    }
2607                    0x2c5044561d685ec0 => {
2608                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2609                        let mut req = fidl::new_empty!(
2610                            DirectoryDeprecatedOpenRequest,
2611                            fdomain_client::fidl::FDomainResourceDialect
2612                        );
2613                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2614                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2615                        Ok(DirectoryRequest::DeprecatedOpen {
2616                            flags: req.flags,
2617                            mode: req.mode,
2618                            path: req.path,
2619                            object: req.object,
2620
2621                            control_handle,
2622                        })
2623                    }
2624                    0x568ddcb9a9cbb6d9 => {
2625                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2626                        let mut req = fidl::new_empty!(
2627                            DirectoryOpenRequest,
2628                            fdomain_client::fidl::FDomainResourceDialect
2629                        );
2630                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
2631                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2632                        Ok(DirectoryRequest::Open {
2633                            path: req.path,
2634                            flags: req.flags,
2635                            options: req.options,
2636                            object: req.object,
2637
2638                            control_handle,
2639                        })
2640                    }
2641                    0x3582806bf27faa0a => {
2642                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2643                        let mut req = fidl::new_empty!(
2644                            DirectoryReadDirentsRequest,
2645                            fdomain_client::fidl::FDomainResourceDialect
2646                        );
2647                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
2648                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2649                        Ok(DirectoryRequest::ReadDirents {
2650                            max_bytes: req.max_bytes,
2651
2652                            responder: DirectoryReadDirentsResponder {
2653                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2654                                tx_id: header.tx_id,
2655                            },
2656                        })
2657                    }
2658                    0x16b1202af0f34c71 => {
2659                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2660                        let mut req = fidl::new_empty!(
2661                            fidl::encoding::EmptyPayload,
2662                            fdomain_client::fidl::FDomainResourceDialect
2663                        );
2664                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2665                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2666                        Ok(DirectoryRequest::Rewind {
2667                            responder: DirectoryRewindResponder {
2668                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2669                                tx_id: header.tx_id,
2670                            },
2671                        })
2672                    }
2673                    0x26ae9d18763c8655 => {
2674                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2675                        let mut req = fidl::new_empty!(
2676                            fidl::encoding::EmptyPayload,
2677                            fdomain_client::fidl::FDomainResourceDialect
2678                        );
2679                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2680                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2681                        Ok(DirectoryRequest::GetToken {
2682                            responder: DirectoryGetTokenResponder {
2683                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2684                                tx_id: header.tx_id,
2685                            },
2686                        })
2687                    }
2688                    0x740604c0c7c930e7 => {
2689                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2690                        let mut req = fidl::new_empty!(
2691                            DirectoryLinkRequest,
2692                            fdomain_client::fidl::FDomainResourceDialect
2693                        );
2694                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
2695                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2696                        Ok(DirectoryRequest::Link {
2697                            src: req.src,
2698                            dst_parent_token: req.dst_parent_token,
2699                            dst: req.dst,
2700
2701                            responder: DirectoryLinkResponder {
2702                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2703                                tx_id: header.tx_id,
2704                            },
2705                        })
2706                    }
2707                    0x750a0326a78d7bed => {
2708                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2709                        let mut req = fidl::new_empty!(
2710                            DirectoryUnlinkRequest,
2711                            fdomain_client::fidl::FDomainResourceDialect
2712                        );
2713                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2714                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2715                        Ok(DirectoryRequest::Unlink {
2716                            name: req.name,
2717                            options: req.options,
2718
2719                            responder: DirectoryUnlinkResponder {
2720                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2721                                tx_id: header.tx_id,
2722                            },
2723                        })
2724                    }
2725                    0x7060e7723b9928de => {
2726                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2727                        let mut req = fidl::new_empty!(
2728                            DirectoryRenameRequest,
2729                            fdomain_client::fidl::FDomainResourceDialect
2730                        );
2731                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
2732                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2733                        Ok(DirectoryRequest::Rename {
2734                            src: req.src,
2735                            dst_parent_token: req.dst_parent_token,
2736                            dst: req.dst,
2737
2738                            responder: DirectoryRenameResponder {
2739                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2740                                tx_id: header.tx_id,
2741                            },
2742                        })
2743                    }
2744                    0x21ce0f19ec043889 => {
2745                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2746                        let mut req = fidl::new_empty!(
2747                            DirectoryCreateSymlinkRequest,
2748                            fdomain_client::fidl::FDomainResourceDialect
2749                        );
2750                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
2751                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2752                        Ok(DirectoryRequest::CreateSymlink {
2753                            name: req.name,
2754                            target: req.target,
2755                            connection: req.connection,
2756
2757                            responder: DirectoryCreateSymlinkResponder {
2758                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2759                                tx_id: header.tx_id,
2760                            },
2761                        })
2762                    }
2763                    0x5717193a59d66d91 => {
2764                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2765                        let mut req = fidl::new_empty!(
2766                            DirectoryWatchRequest,
2767                            fdomain_client::fidl::FDomainResourceDialect
2768                        );
2769                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
2770                        let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
2771                        Ok(DirectoryRequest::Watch {
2772                            mask: req.mask,
2773                            options: req.options,
2774                            watcher: req.watcher,
2775
2776                            responder: DirectoryWatchResponder {
2777                                control_handle: std::mem::ManuallyDrop::new(control_handle),
2778                                tx_id: header.tx_id,
2779                            },
2780                        })
2781                    }
2782                    _ if header.tx_id == 0
2783                        && header
2784                            .dynamic_flags()
2785                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2786                    {
2787                        Ok(DirectoryRequest::_UnknownMethod {
2788                            ordinal: header.ordinal,
2789                            control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2790                            method_type: fidl::MethodType::OneWay,
2791                        })
2792                    }
2793                    _ if header
2794                        .dynamic_flags()
2795                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2796                    {
2797                        this.inner.send_framework_err(
2798                            fidl::encoding::FrameworkErr::UnknownMethod,
2799                            header.tx_id,
2800                            header.ordinal,
2801                            header.dynamic_flags(),
2802                            (bytes, handles),
2803                        )?;
2804                        Ok(DirectoryRequest::_UnknownMethod {
2805                            ordinal: header.ordinal,
2806                            control_handle: DirectoryControlHandle { inner: this.inner.clone() },
2807                            method_type: fidl::MethodType::TwoWay,
2808                        })
2809                    }
2810                    _ => Err(fidl::Error::UnknownOrdinal {
2811                        ordinal: header.ordinal,
2812                        protocol_name:
2813                            <DirectoryMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
2814                    }),
2815                }))
2816            },
2817        )
2818    }
2819}
2820
2821/// Directory defines a node which is capable of containing other Objects.
2822#[derive(Debug)]
2823pub enum DirectoryRequest {
2824    /// Acquires an advisory lock on the underlying file.
2825    ///
2826    /// The lock lasts until either this connection is closed or
2827    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
2828    /// explicitly.
2829    ///
2830    /// Advisory locks are purely advisory. They do not prevent actual read or
2831    /// write operations from occurring on the file, either through this
2832    /// connection or through other connections.
2833    ///
2834    /// This method requires the following rights:
2835    ///
2836    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
2837    /// * [`Rights.WRITE_BYTES`] if `request.type` is
2838    ///   [`AdvisoryLockType.WRITE`].
2839    ///
2840    /// # Errors
2841    ///
2842    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
2843    ///   example, another connection might hold a conflicting lock type.
2844    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
2845    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
2846    ///   to acquire the given type of lock.
2847    AdvisoryLock {
2848        request: AdvisoryLockRequest,
2849        responder: DirectoryAdvisoryLockResponder,
2850    },
2851    Clone {
2852        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
2853        control_handle: DirectoryControlHandle,
2854    },
2855    /// Terminates the connection.
2856    ///
2857    /// After calling `Close`, the client must not send any other requests.
2858    ///
2859    /// Servers, after sending the status response, should close the connection
2860    /// regardless of status and without sending an epitaph.
2861    ///
2862    /// Closing the client end of the channel should be semantically equivalent
2863    /// to calling `Close` without knowing when the close has completed or its
2864    /// status.
2865    Close {
2866        responder: DirectoryCloseResponder,
2867    },
2868    Query {
2869        responder: DirectoryQueryResponder,
2870    },
2871    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
2872    DeprecatedClone {
2873        flags: OpenFlags,
2874        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
2875        control_handle: DirectoryControlHandle,
2876    },
2877    /// DEPRECATED - Use `Node.GetAttributes` instead.
2878    DeprecatedGetAttr {
2879        responder: DirectoryDeprecatedGetAttrResponder,
2880    },
2881    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
2882    DeprecatedSetAttr {
2883        flags: NodeAttributeFlags,
2884        attributes: NodeAttributes,
2885        responder: DirectoryDeprecatedSetAttrResponder,
2886    },
2887    /// [DEPRECATED - Use new GetFlags method instead.]
2888    DeprecatedGetFlags {
2889        responder: DirectoryDeprecatedGetFlagsResponder,
2890    },
2891    /// [DEPRECATED - Use new SetFlags method instead.]
2892    DeprecatedSetFlags {
2893        flags: OpenFlags,
2894        responder: DirectoryDeprecatedSetFlagsResponder,
2895    },
2896    /// Queries the flags that apply to this node after it has been opened/created. This method does
2897    /// not require any rights.
2898    ///
2899    /// Note that the final set of flags that apply to the connection may differ from those
2900    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
2901    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
2902    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
2903    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
2904    GetFlags {
2905        responder: DirectoryGetFlagsResponder,
2906    },
2907    /// Sets the flags that apply to this node after it has been opened. This method does not
2908    /// require any rights.
2909    ///
2910    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
2911    /// clear append mode.
2912    ///
2913    /// Errors:
2914    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
2915    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
2916    SetFlags {
2917        flags: Flags,
2918        responder: DirectorySetFlagsResponder,
2919    },
2920    /// Query the filesystem for details specific to the filesystem and/or volume. If the current
2921    /// volume has different settings or the storage is accounted seperately from the rest of the
2922    /// filesystem that may be reported instead of filesystem-wide details.
2923    QueryFilesystem {
2924        responder: DirectoryQueryFilesystemResponder,
2925    },
2926    /// Acquires information about the node.
2927    ///
2928    /// The attributes of a node should be stable, independent of the
2929    /// specific protocol used to access it.
2930    ///
2931    /// If a particular attribute is not applicable or not supported,
2932    /// filesystems should leave the corresponding field absent.
2933    ///
2934    /// + `query` a bit-mask specifying which attributes to fetch. The server
2935    ///   should not return more than necessary.
2936    /// - `attributes` the returned attributes.
2937    ///
2938    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
2939    GetAttributes {
2940        query: NodeAttributesQuery,
2941        responder: DirectoryGetAttributesResponder,
2942    },
2943    /// Updates information about the node.
2944    ///
2945    /// + `attributes` the presence of a table field in `attributes` indicates
2946    /// the intent to update the corresponding attribute.
2947    ///
2948    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
2949    ///
2950    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
2951    UpdateAttributes {
2952        payload: MutableNodeAttributes,
2953        responder: DirectoryUpdateAttributesResponder,
2954    },
2955    /// Synchronizes updates to the node to the underlying media, if it exists.
2956    ///
2957    /// This method will return when the filesystem server has flushed the
2958    /// relevant updates to the underlying media, but does not guarantee the
2959    /// underlying media has persisted the information, nor that any information
2960    /// is committed to hardware. Clients may use `Sync` to ensure ordering
2961    /// between operations.
2962    ///
2963    /// This method does not require any rights.
2964    Sync {
2965        responder: DirectorySyncResponder,
2966    },
2967    /// Creates an iterator over all the extended attribute names associated
2968    /// with this node. If an error occurs it is returned as an epitaph on the
2969    /// iterator request channel, and then the channel is closed.
2970    ///
2971    /// GetExtendedAttributes can be used with any of these names to retrieve
2972    /// the associated value.
2973    ///
2974    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
2975    ListExtendedAttributes {
2976        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
2977        control_handle: DirectoryControlHandle,
2978    },
2979    /// Get the value associated with the given attribute `name` for this node.
2980    ///
2981    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
2982    /// particular structure is imposed on them.
2983    ///
2984    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
2985    GetExtendedAttribute {
2986        name: Vec<u8>,
2987        responder: DirectoryGetExtendedAttributeResponder,
2988    },
2989    /// Set the value for the given attribute `name` to `value` for this node.
2990    ///
2991    /// The attribute name may exist, in which case the attribute is updated.
2992    /// If the attribute doesn't exist, it is created. The name should have no
2993    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
2994    ///
2995    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
2996    SetExtendedAttribute {
2997        name: Vec<u8>,
2998        value: ExtendedAttributeValue,
2999        mode: SetExtendedAttributeMode,
3000        responder: DirectorySetExtendedAttributeResponder,
3001    },
3002    /// Remove the specified extended attribute.
3003    ///
3004    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
3005    ///
3006    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
3007    RemoveExtendedAttribute {
3008        name: Vec<u8>,
3009        responder: DirectoryRemoveExtendedAttributeResponder,
3010    },
3011    /// DEPRECATED - Use `fuchsia.io/Directory.Open` instead.
3012    DeprecatedOpen {
3013        flags: OpenFlags,
3014        mode: ModeType,
3015        path: String,
3016        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
3017        control_handle: DirectoryControlHandle,
3018    },
3019    /// Open (or create) a node relative to this directory. Any errors are communicated via an
3020    /// epitaph sent on the `object` channel.
3021    ///
3022    /// Errors:
3023    /// * `ZX_ERR_BAD_PATH` if `path` is invalid
3024    /// * See [`Flags`] for other errors which may be communicated based on `flags`
3025    Open {
3026        path: String,
3027        flags: Flags,
3028        options: Options,
3029        object: fdomain_client::Channel,
3030        control_handle: DirectoryControlHandle,
3031    },
3032    /// Reads a collection of variably sized dirents into a buffer.
3033    /// The number of dirents in a directory may be very large: akin to
3034    /// calling read multiple times on a file, directories have a seek
3035    /// offset which is updated on subsequent calls to ReadDirents.
3036    /// Each call to ReadDirents will only return whole dirent structures,
3037    /// they will not get split across ReadDirent calls. When the seek
3038    /// offset reaches the end, `dirents` will be empty.
3039    ///
3040    /// These dirents are of the form:
3041    /// ```
3042    /// struct dirent {
3043    ///   // Describes the inode of the entry.
3044    ///   uint64 ino;
3045    ///   // Describes the length of the dirent name in bytes.
3046    ///   uint8 size;
3047    ///   // Describes the type of the entry. Aligned with the
3048    ///   // POSIX d_type values. Use `DirentType` constants.
3049    ///   uint8 type;
3050    ///   // Unterminated name of entry.
3051    ///   char name[0];
3052    /// }
3053    /// ```
3054    ///
3055    /// This method does not require any rights, since one could always probe for
3056    /// directory contents by triggering name conflicts during file creation.
3057    ReadDirents {
3058        max_bytes: u64,
3059        responder: DirectoryReadDirentsResponder,
3060    },
3061    /// Resets the directory seek offset.
3062    ///
3063    /// This method does not require any rights, similar to ReadDirents.
3064    Rewind {
3065        responder: DirectoryRewindResponder,
3066    },
3067    /// Acquires a token to a Directory which can be used to identify access to it at a later point
3068    /// in time. The token will remain valid for as long as the connection requesting the token
3069    /// remains open.
3070    ///
3071    /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns
3072    /// `ZX_ERR_BAD_HANDLE`.
3073    GetToken {
3074        responder: DirectoryGetTokenResponder,
3075    },
3076    /// Creates a link to an object named src by the name dst, within a directory represented by
3077    /// token.
3078    ///
3079    /// `src` must be a resolved object name. Including "/" in the string will
3080    /// return `ZX_ERR_INVALID_ARGS`.
3081    ///
3082    /// `dst` must be a resolved object name. Including "/" in the string will
3083    /// return `ZX_ERR_INVALID_ARGS`.
3084    ///
3085    /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and
3086    /// `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.
3087    ///
3088    /// This will be atomic with respect to renaming or unlinking the source concurrently e.g. if
3089    /// there are two actors operating concurrently, and one actor performs a rename that affects
3090    /// the source within this directory, and the other does a link, each will appear to occur
3091    /// atomically in an unspecified order.
3092    Link {
3093        src: String,
3094        dst_parent_token: fdomain_client::NullableHandle,
3095        dst: String,
3096        responder: DirectoryLinkResponder,
3097    },
3098    /// Removes a child node from the this directory's list of entries.
3099    ///
3100    /// Note: this does not guarantee that the underlying object is destroyed.
3101    /// Although the link will be removed from the containing directory,
3102    /// objects with multiple references (such as files which are still open)
3103    /// will not actually be destroyed until all references are closed.
3104    ///
3105    /// * error `ZX_ERR_ACCESS_DENIED` if the connection does not have
3106    ///   [`Rights.WRITE_BYTES`].
3107    /// * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not
3108    ///   support writing.
3109    /// * error `ZX_ERR_BAD_PATH` if `name` is invalid.
3110    /// * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.
3111    /// * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,
3112    ///   containing a remote channel.
3113    /// * error `ZX_ERR_NOT_DIR` if the options requested a directory but
3114    ///     something other than a directory was found.
3115    ///
3116    /// Other errors may be returned for filesystem-specific reasons.
3117    ///
3118    /// This method requires the following rights:
3119    ///
3120    /// * [`Rights.ENUMERATE`]
3121    /// * [`Rights.MODIFY_DIRECTORY`]
3122    Unlink {
3123        name: String,
3124        options: UnlinkOptions,
3125        responder: DirectoryUnlinkResponder,
3126    },
3127    /// Renames a node named `src` to the name `dst`, in a directory represented
3128    /// by `dst_parent_token`.
3129    ///
3130    /// `src` and `dst` must be valid node names.
3131    /// See [`Name`] for what constitutes a valid name.
3132    ///
3133    /// This method requires the following rights on both the current connection, and the connection
3134    /// identified by `dst_parent_token`:
3135    ///
3136    /// * [`Rights.ENUMERATE`]
3137    /// * [`Rights.MODIFY_DIRECTORY`]
3138    ///
3139    /// The following requirements are necessary to avoid rights escalations.
3140    ///
3141    /// If the source and destination directory differ, the source directory must also have the
3142    /// maximal set of abilities supported for files, which would typically be
3143    /// [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and
3144    /// [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]
3145    /// right.
3146    ///
3147    /// If `src` refers to a directory, and differs from the destination directory, then the source
3148    /// directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.
3149    ///
3150    /// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
3151    /// * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.
3152    Rename {
3153        src: String,
3154        dst_parent_token: fdomain_client::Event,
3155        dst: String,
3156        responder: DirectoryRenameResponder,
3157    },
3158    /// Creates a symbolic link.
3159    ///
3160    /// `name` is the name to be given to the created symbolic link.
3161    /// `target` is the target of the symbolic link, which has no meaning on the server. The server
3162    /// will perform no validation of `target` except for a server chosen maximum length.
3163    /// `connection` is an optional server end of a channel that will speak the Symlink protocol
3164    /// on the successfully created node.
3165    ///
3166    /// * [`Rights.MODIFY_DIRECTORY`]
3167    ///
3168    /// * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.
3169    /// * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.
3170    /// * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].
3171    /// * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.
3172    CreateSymlink {
3173        name: String,
3174        target: Vec<u8>,
3175        connection: Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3176        responder: DirectoryCreateSymlinkResponder,
3177    },
3178    /// Watches a directory, receiving events of added messages on the
3179    /// watcher request channel.
3180    ///
3181    /// Options must be zero; it is reserved.
3182    ///
3183    /// This method does not require any rights, similar to ReadDirents.
3184    Watch {
3185        mask: WatchMask,
3186        options: u32,
3187        watcher: fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3188        responder: DirectoryWatchResponder,
3189    },
3190    /// An interaction was received which does not match any known method.
3191    #[non_exhaustive]
3192    _UnknownMethod {
3193        /// Ordinal of the method that was called.
3194        ordinal: u64,
3195        control_handle: DirectoryControlHandle,
3196        method_type: fidl::MethodType,
3197    },
3198}
3199
3200impl DirectoryRequest {
3201    #[allow(irrefutable_let_patterns)]
3202    pub fn into_advisory_lock(
3203        self,
3204    ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
3205        if let DirectoryRequest::AdvisoryLock { request, responder } = self {
3206            Some((request, responder))
3207        } else {
3208            None
3209        }
3210    }
3211
3212    #[allow(irrefutable_let_patterns)]
3213    pub fn into_clone(
3214        self,
3215    ) -> Option<(
3216        fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
3217        DirectoryControlHandle,
3218    )> {
3219        if let DirectoryRequest::Clone { request, control_handle } = self {
3220            Some((request, control_handle))
3221        } else {
3222            None
3223        }
3224    }
3225
3226    #[allow(irrefutable_let_patterns)]
3227    pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
3228        if let DirectoryRequest::Close { responder } = self { Some((responder)) } else { None }
3229    }
3230
3231    #[allow(irrefutable_let_patterns)]
3232    pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
3233        if let DirectoryRequest::Query { responder } = self { Some((responder)) } else { None }
3234    }
3235
3236    #[allow(irrefutable_let_patterns)]
3237    pub fn into_deprecated_clone(
3238        self,
3239    ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, DirectoryControlHandle)>
3240    {
3241        if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
3242            Some((flags, object, control_handle))
3243        } else {
3244            None
3245        }
3246    }
3247
3248    #[allow(irrefutable_let_patterns)]
3249    pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
3250        if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
3251            Some((responder))
3252        } else {
3253            None
3254        }
3255    }
3256
3257    #[allow(irrefutable_let_patterns)]
3258    pub fn into_deprecated_set_attr(
3259        self,
3260    ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
3261        if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
3262            Some((flags, attributes, responder))
3263        } else {
3264            None
3265        }
3266    }
3267
3268    #[allow(irrefutable_let_patterns)]
3269    pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
3270        if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
3271            Some((responder))
3272        } else {
3273            None
3274        }
3275    }
3276
3277    #[allow(irrefutable_let_patterns)]
3278    pub fn into_deprecated_set_flags(
3279        self,
3280    ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
3281        if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
3282            Some((flags, responder))
3283        } else {
3284            None
3285        }
3286    }
3287
3288    #[allow(irrefutable_let_patterns)]
3289    pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
3290        if let DirectoryRequest::GetFlags { responder } = self { Some((responder)) } else { None }
3291    }
3292
3293    #[allow(irrefutable_let_patterns)]
3294    pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
3295        if let DirectoryRequest::SetFlags { flags, responder } = self {
3296            Some((flags, responder))
3297        } else {
3298            None
3299        }
3300    }
3301
3302    #[allow(irrefutable_let_patterns)]
3303    pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
3304        if let DirectoryRequest::QueryFilesystem { responder } = self {
3305            Some((responder))
3306        } else {
3307            None
3308        }
3309    }
3310
3311    #[allow(irrefutable_let_patterns)]
3312    pub fn into_get_attributes(
3313        self,
3314    ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
3315        if let DirectoryRequest::GetAttributes { query, responder } = self {
3316            Some((query, responder))
3317        } else {
3318            None
3319        }
3320    }
3321
3322    #[allow(irrefutable_let_patterns)]
3323    pub fn into_update_attributes(
3324        self,
3325    ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
3326        if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
3327            Some((payload, responder))
3328        } else {
3329            None
3330        }
3331    }
3332
3333    #[allow(irrefutable_let_patterns)]
3334    pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
3335        if let DirectoryRequest::Sync { responder } = self { Some((responder)) } else { None }
3336    }
3337
3338    #[allow(irrefutable_let_patterns)]
3339    pub fn into_list_extended_attributes(
3340        self,
3341    ) -> Option<(
3342        fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
3343        DirectoryControlHandle,
3344    )> {
3345        if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
3346            Some((iterator, control_handle))
3347        } else {
3348            None
3349        }
3350    }
3351
3352    #[allow(irrefutable_let_patterns)]
3353    pub fn into_get_extended_attribute(
3354        self,
3355    ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
3356        if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
3357            Some((name, responder))
3358        } else {
3359            None
3360        }
3361    }
3362
3363    #[allow(irrefutable_let_patterns)]
3364    pub fn into_set_extended_attribute(
3365        self,
3366    ) -> Option<(
3367        Vec<u8>,
3368        ExtendedAttributeValue,
3369        SetExtendedAttributeMode,
3370        DirectorySetExtendedAttributeResponder,
3371    )> {
3372        if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
3373            Some((name, value, mode, responder))
3374        } else {
3375            None
3376        }
3377    }
3378
3379    #[allow(irrefutable_let_patterns)]
3380    pub fn into_remove_extended_attribute(
3381        self,
3382    ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
3383        if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
3384            Some((name, responder))
3385        } else {
3386            None
3387        }
3388    }
3389
3390    #[allow(irrefutable_let_patterns)]
3391    pub fn into_deprecated_open(
3392        self,
3393    ) -> Option<(
3394        OpenFlags,
3395        ModeType,
3396        String,
3397        fdomain_client::fidl::ServerEnd<NodeMarker>,
3398        DirectoryControlHandle,
3399    )> {
3400        if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
3401        {
3402            Some((flags, mode, path, object, control_handle))
3403        } else {
3404            None
3405        }
3406    }
3407
3408    #[allow(irrefutable_let_patterns)]
3409    pub fn into_open(
3410        self,
3411    ) -> Option<(String, Flags, Options, fdomain_client::Channel, DirectoryControlHandle)> {
3412        if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
3413            Some((path, flags, options, object, control_handle))
3414        } else {
3415            None
3416        }
3417    }
3418
3419    #[allow(irrefutable_let_patterns)]
3420    pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
3421        if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
3422            Some((max_bytes, responder))
3423        } else {
3424            None
3425        }
3426    }
3427
3428    #[allow(irrefutable_let_patterns)]
3429    pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
3430        if let DirectoryRequest::Rewind { responder } = self { Some((responder)) } else { None }
3431    }
3432
3433    #[allow(irrefutable_let_patterns)]
3434    pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
3435        if let DirectoryRequest::GetToken { responder } = self { Some((responder)) } else { None }
3436    }
3437
3438    #[allow(irrefutable_let_patterns)]
3439    pub fn into_link(
3440        self,
3441    ) -> Option<(String, fdomain_client::NullableHandle, String, DirectoryLinkResponder)> {
3442        if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
3443            Some((src, dst_parent_token, dst, responder))
3444        } else {
3445            None
3446        }
3447    }
3448
3449    #[allow(irrefutable_let_patterns)]
3450    pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
3451        if let DirectoryRequest::Unlink { name, options, responder } = self {
3452            Some((name, options, responder))
3453        } else {
3454            None
3455        }
3456    }
3457
3458    #[allow(irrefutable_let_patterns)]
3459    pub fn into_rename(
3460        self,
3461    ) -> Option<(String, fdomain_client::Event, String, DirectoryRenameResponder)> {
3462        if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
3463            Some((src, dst_parent_token, dst, responder))
3464        } else {
3465            None
3466        }
3467    }
3468
3469    #[allow(irrefutable_let_patterns)]
3470    pub fn into_create_symlink(
3471        self,
3472    ) -> Option<(
3473        String,
3474        Vec<u8>,
3475        Option<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
3476        DirectoryCreateSymlinkResponder,
3477    )> {
3478        if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
3479            Some((name, target, connection, responder))
3480        } else {
3481            None
3482        }
3483    }
3484
3485    #[allow(irrefutable_let_patterns)]
3486    pub fn into_watch(
3487        self,
3488    ) -> Option<(
3489        WatchMask,
3490        u32,
3491        fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
3492        DirectoryWatchResponder,
3493    )> {
3494        if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
3495            Some((mask, options, watcher, responder))
3496        } else {
3497            None
3498        }
3499    }
3500
3501    /// Name of the method defined in FIDL
3502    pub fn method_name(&self) -> &'static str {
3503        match *self {
3504            DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
3505            DirectoryRequest::Clone { .. } => "clone",
3506            DirectoryRequest::Close { .. } => "close",
3507            DirectoryRequest::Query { .. } => "query",
3508            DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
3509            DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
3510            DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
3511            DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
3512            DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
3513            DirectoryRequest::GetFlags { .. } => "get_flags",
3514            DirectoryRequest::SetFlags { .. } => "set_flags",
3515            DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
3516            DirectoryRequest::GetAttributes { .. } => "get_attributes",
3517            DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
3518            DirectoryRequest::Sync { .. } => "sync",
3519            DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
3520            DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
3521            DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
3522            DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
3523            DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
3524            DirectoryRequest::Open { .. } => "open",
3525            DirectoryRequest::ReadDirents { .. } => "read_dirents",
3526            DirectoryRequest::Rewind { .. } => "rewind",
3527            DirectoryRequest::GetToken { .. } => "get_token",
3528            DirectoryRequest::Link { .. } => "link",
3529            DirectoryRequest::Unlink { .. } => "unlink",
3530            DirectoryRequest::Rename { .. } => "rename",
3531            DirectoryRequest::CreateSymlink { .. } => "create_symlink",
3532            DirectoryRequest::Watch { .. } => "watch",
3533            DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3534                "unknown one-way method"
3535            }
3536            DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3537                "unknown two-way method"
3538            }
3539        }
3540    }
3541}
3542
3543#[derive(Debug, Clone)]
3544pub struct DirectoryControlHandle {
3545    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
3546}
3547
3548impl fdomain_client::fidl::ControlHandle for DirectoryControlHandle {
3549    fn shutdown(&self) {
3550        self.inner.shutdown()
3551    }
3552
3553    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3554        self.inner.shutdown_with_epitaph(status)
3555    }
3556
3557    fn is_closed(&self) -> bool {
3558        self.inner.channel().is_closed()
3559    }
3560    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
3561        self.inner.channel().on_closed()
3562    }
3563}
3564
3565impl DirectoryControlHandle {
3566    pub fn send_on_open_(
3567        &self,
3568        mut s: i32,
3569        mut info: Option<NodeInfoDeprecated>,
3570    ) -> Result<(), fidl::Error> {
3571        self.inner.send::<NodeOnOpenRequest>(
3572            (s, info.as_mut()),
3573            0,
3574            0x7fc7bbb1dbfd1972,
3575            fidl::encoding::DynamicFlags::FLEXIBLE,
3576        )
3577    }
3578
3579    pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
3580        self.inner.send::<Representation>(
3581            &mut payload,
3582            0,
3583            0x5cb40567d80a510c,
3584            fidl::encoding::DynamicFlags::empty(),
3585        )
3586    }
3587}
3588
3589#[must_use = "FIDL methods require a response to be sent"]
3590#[derive(Debug)]
3591pub struct DirectoryAdvisoryLockResponder {
3592    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3593    tx_id: u32,
3594}
3595
3596/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3597/// if the responder is dropped without sending a response, so that the client
3598/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3599impl std::ops::Drop for DirectoryAdvisoryLockResponder {
3600    fn drop(&mut self) {
3601        self.control_handle.shutdown();
3602        // Safety: drops once, never accessed again
3603        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3604    }
3605}
3606
3607impl fdomain_client::fidl::Responder for DirectoryAdvisoryLockResponder {
3608    type ControlHandle = DirectoryControlHandle;
3609
3610    fn control_handle(&self) -> &DirectoryControlHandle {
3611        &self.control_handle
3612    }
3613
3614    fn drop_without_shutdown(mut self) {
3615        // Safety: drops once, never accessed again due to mem::forget
3616        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3617        // Prevent Drop from running (which would shut down the channel)
3618        std::mem::forget(self);
3619    }
3620}
3621
3622impl DirectoryAdvisoryLockResponder {
3623    /// Sends a response to the FIDL transaction.
3624    ///
3625    /// Sets the channel to shutdown if an error occurs.
3626    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3627        let _result = self.send_raw(result);
3628        if _result.is_err() {
3629            self.control_handle.shutdown();
3630        }
3631        self.drop_without_shutdown();
3632        _result
3633    }
3634
3635    /// Similar to "send" but does not shutdown the channel if an error occurs.
3636    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3637        let _result = self.send_raw(result);
3638        self.drop_without_shutdown();
3639        _result
3640    }
3641
3642    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3643        self.control_handle
3644            .inner
3645            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3646                result,
3647                self.tx_id,
3648                0x6ee9c0ad53ec87aa,
3649                fidl::encoding::DynamicFlags::empty(),
3650            )
3651    }
3652}
3653
3654#[must_use = "FIDL methods require a response to be sent"]
3655#[derive(Debug)]
3656pub struct DirectoryCloseResponder {
3657    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3658    tx_id: u32,
3659}
3660
3661/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3662/// if the responder is dropped without sending a response, so that the client
3663/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3664impl std::ops::Drop for DirectoryCloseResponder {
3665    fn drop(&mut self) {
3666        self.control_handle.shutdown();
3667        // Safety: drops once, never accessed again
3668        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3669    }
3670}
3671
3672impl fdomain_client::fidl::Responder for DirectoryCloseResponder {
3673    type ControlHandle = DirectoryControlHandle;
3674
3675    fn control_handle(&self) -> &DirectoryControlHandle {
3676        &self.control_handle
3677    }
3678
3679    fn drop_without_shutdown(mut self) {
3680        // Safety: drops once, never accessed again due to mem::forget
3681        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3682        // Prevent Drop from running (which would shut down the channel)
3683        std::mem::forget(self);
3684    }
3685}
3686
3687impl DirectoryCloseResponder {
3688    /// Sends a response to the FIDL transaction.
3689    ///
3690    /// Sets the channel to shutdown if an error occurs.
3691    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3692        let _result = self.send_raw(result);
3693        if _result.is_err() {
3694            self.control_handle.shutdown();
3695        }
3696        self.drop_without_shutdown();
3697        _result
3698    }
3699
3700    /// Similar to "send" but does not shutdown the channel if an error occurs.
3701    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3702        let _result = self.send_raw(result);
3703        self.drop_without_shutdown();
3704        _result
3705    }
3706
3707    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3708        self.control_handle
3709            .inner
3710            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3711                result,
3712                self.tx_id,
3713                0x5ac5d459ad7f657e,
3714                fidl::encoding::DynamicFlags::empty(),
3715            )
3716    }
3717}
3718
3719#[must_use = "FIDL methods require a response to be sent"]
3720#[derive(Debug)]
3721pub struct DirectoryQueryResponder {
3722    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3723    tx_id: u32,
3724}
3725
3726/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3727/// if the responder is dropped without sending a response, so that the client
3728/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3729impl std::ops::Drop for DirectoryQueryResponder {
3730    fn drop(&mut self) {
3731        self.control_handle.shutdown();
3732        // Safety: drops once, never accessed again
3733        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3734    }
3735}
3736
3737impl fdomain_client::fidl::Responder for DirectoryQueryResponder {
3738    type ControlHandle = DirectoryControlHandle;
3739
3740    fn control_handle(&self) -> &DirectoryControlHandle {
3741        &self.control_handle
3742    }
3743
3744    fn drop_without_shutdown(mut self) {
3745        // Safety: drops once, never accessed again due to mem::forget
3746        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3747        // Prevent Drop from running (which would shut down the channel)
3748        std::mem::forget(self);
3749    }
3750}
3751
3752impl DirectoryQueryResponder {
3753    /// Sends a response to the FIDL transaction.
3754    ///
3755    /// Sets the channel to shutdown if an error occurs.
3756    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3757        let _result = self.send_raw(protocol);
3758        if _result.is_err() {
3759            self.control_handle.shutdown();
3760        }
3761        self.drop_without_shutdown();
3762        _result
3763    }
3764
3765    /// Similar to "send" but does not shutdown the channel if an error occurs.
3766    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3767        let _result = self.send_raw(protocol);
3768        self.drop_without_shutdown();
3769        _result
3770    }
3771
3772    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
3773        self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
3774            (protocol,),
3775            self.tx_id,
3776            0x2658edee9decfc06,
3777            fidl::encoding::DynamicFlags::empty(),
3778        )
3779    }
3780}
3781
3782#[must_use = "FIDL methods require a response to be sent"]
3783#[derive(Debug)]
3784pub struct DirectoryDeprecatedGetAttrResponder {
3785    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3786    tx_id: u32,
3787}
3788
3789/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3790/// if the responder is dropped without sending a response, so that the client
3791/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3792impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
3793    fn drop(&mut self) {
3794        self.control_handle.shutdown();
3795        // Safety: drops once, never accessed again
3796        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3797    }
3798}
3799
3800impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetAttrResponder {
3801    type ControlHandle = DirectoryControlHandle;
3802
3803    fn control_handle(&self) -> &DirectoryControlHandle {
3804        &self.control_handle
3805    }
3806
3807    fn drop_without_shutdown(mut self) {
3808        // Safety: drops once, never accessed again due to mem::forget
3809        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3810        // Prevent Drop from running (which would shut down the channel)
3811        std::mem::forget(self);
3812    }
3813}
3814
3815impl DirectoryDeprecatedGetAttrResponder {
3816    /// Sends a response to the FIDL transaction.
3817    ///
3818    /// Sets the channel to shutdown if an error occurs.
3819    pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3820        let _result = self.send_raw(s, attributes);
3821        if _result.is_err() {
3822            self.control_handle.shutdown();
3823        }
3824        self.drop_without_shutdown();
3825        _result
3826    }
3827
3828    /// Similar to "send" but does not shutdown the channel if an error occurs.
3829    pub fn send_no_shutdown_on_err(
3830        self,
3831        mut s: i32,
3832        mut attributes: &NodeAttributes,
3833    ) -> Result<(), fidl::Error> {
3834        let _result = self.send_raw(s, attributes);
3835        self.drop_without_shutdown();
3836        _result
3837    }
3838
3839    fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
3840        self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
3841            (s, attributes),
3842            self.tx_id,
3843            0x78985e216314dafd,
3844            fidl::encoding::DynamicFlags::empty(),
3845        )
3846    }
3847}
3848
3849#[must_use = "FIDL methods require a response to be sent"]
3850#[derive(Debug)]
3851pub struct DirectoryDeprecatedSetAttrResponder {
3852    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3853    tx_id: u32,
3854}
3855
3856/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3857/// if the responder is dropped without sending a response, so that the client
3858/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3859impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
3860    fn drop(&mut self) {
3861        self.control_handle.shutdown();
3862        // Safety: drops once, never accessed again
3863        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3864    }
3865}
3866
3867impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetAttrResponder {
3868    type ControlHandle = DirectoryControlHandle;
3869
3870    fn control_handle(&self) -> &DirectoryControlHandle {
3871        &self.control_handle
3872    }
3873
3874    fn drop_without_shutdown(mut self) {
3875        // Safety: drops once, never accessed again due to mem::forget
3876        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3877        // Prevent Drop from running (which would shut down the channel)
3878        std::mem::forget(self);
3879    }
3880}
3881
3882impl DirectoryDeprecatedSetAttrResponder {
3883    /// Sends a response to the FIDL transaction.
3884    ///
3885    /// Sets the channel to shutdown if an error occurs.
3886    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
3887        let _result = self.send_raw(s);
3888        if _result.is_err() {
3889            self.control_handle.shutdown();
3890        }
3891        self.drop_without_shutdown();
3892        _result
3893    }
3894
3895    /// Similar to "send" but does not shutdown the channel if an error occurs.
3896    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
3897        let _result = self.send_raw(s);
3898        self.drop_without_shutdown();
3899        _result
3900    }
3901
3902    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
3903        self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
3904            (s,),
3905            self.tx_id,
3906            0x4186c0f40d938f46,
3907            fidl::encoding::DynamicFlags::empty(),
3908        )
3909    }
3910}
3911
3912#[must_use = "FIDL methods require a response to be sent"]
3913#[derive(Debug)]
3914pub struct DirectoryDeprecatedGetFlagsResponder {
3915    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3916    tx_id: u32,
3917}
3918
3919/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3920/// if the responder is dropped without sending a response, so that the client
3921/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3922impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
3923    fn drop(&mut self) {
3924        self.control_handle.shutdown();
3925        // Safety: drops once, never accessed again
3926        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3927    }
3928}
3929
3930impl fdomain_client::fidl::Responder for DirectoryDeprecatedGetFlagsResponder {
3931    type ControlHandle = DirectoryControlHandle;
3932
3933    fn control_handle(&self) -> &DirectoryControlHandle {
3934        &self.control_handle
3935    }
3936
3937    fn drop_without_shutdown(mut self) {
3938        // Safety: drops once, never accessed again due to mem::forget
3939        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3940        // Prevent Drop from running (which would shut down the channel)
3941        std::mem::forget(self);
3942    }
3943}
3944
3945impl DirectoryDeprecatedGetFlagsResponder {
3946    /// Sends a response to the FIDL transaction.
3947    ///
3948    /// Sets the channel to shutdown if an error occurs.
3949    pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3950        let _result = self.send_raw(s, flags);
3951        if _result.is_err() {
3952            self.control_handle.shutdown();
3953        }
3954        self.drop_without_shutdown();
3955        _result
3956    }
3957
3958    /// Similar to "send" but does not shutdown the channel if an error occurs.
3959    pub fn send_no_shutdown_on_err(
3960        self,
3961        mut s: i32,
3962        mut flags: OpenFlags,
3963    ) -> Result<(), fidl::Error> {
3964        let _result = self.send_raw(s, flags);
3965        self.drop_without_shutdown();
3966        _result
3967    }
3968
3969    fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
3970        self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
3971            (s, flags),
3972            self.tx_id,
3973            0x5b88fffb8eda3aa1,
3974            fidl::encoding::DynamicFlags::empty(),
3975        )
3976    }
3977}
3978
3979#[must_use = "FIDL methods require a response to be sent"]
3980#[derive(Debug)]
3981pub struct DirectoryDeprecatedSetFlagsResponder {
3982    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
3983    tx_id: u32,
3984}
3985
3986/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
3987/// if the responder is dropped without sending a response, so that the client
3988/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
3989impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
3990    fn drop(&mut self) {
3991        self.control_handle.shutdown();
3992        // Safety: drops once, never accessed again
3993        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3994    }
3995}
3996
3997impl fdomain_client::fidl::Responder for DirectoryDeprecatedSetFlagsResponder {
3998    type ControlHandle = DirectoryControlHandle;
3999
4000    fn control_handle(&self) -> &DirectoryControlHandle {
4001        &self.control_handle
4002    }
4003
4004    fn drop_without_shutdown(mut self) {
4005        // Safety: drops once, never accessed again due to mem::forget
4006        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4007        // Prevent Drop from running (which would shut down the channel)
4008        std::mem::forget(self);
4009    }
4010}
4011
4012impl DirectoryDeprecatedSetFlagsResponder {
4013    /// Sends a response to the FIDL transaction.
4014    ///
4015    /// Sets the channel to shutdown if an error occurs.
4016    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4017        let _result = self.send_raw(s);
4018        if _result.is_err() {
4019            self.control_handle.shutdown();
4020        }
4021        self.drop_without_shutdown();
4022        _result
4023    }
4024
4025    /// Similar to "send" but does not shutdown the channel if an error occurs.
4026    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4027        let _result = self.send_raw(s);
4028        self.drop_without_shutdown();
4029        _result
4030    }
4031
4032    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4033        self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4034            (s,),
4035            self.tx_id,
4036            0x5295b76c71fde733,
4037            fidl::encoding::DynamicFlags::empty(),
4038        )
4039    }
4040}
4041
4042#[must_use = "FIDL methods require a response to be sent"]
4043#[derive(Debug)]
4044pub struct DirectoryGetFlagsResponder {
4045    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4046    tx_id: u32,
4047}
4048
4049/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4050/// if the responder is dropped without sending a response, so that the client
4051/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4052impl std::ops::Drop for DirectoryGetFlagsResponder {
4053    fn drop(&mut self) {
4054        self.control_handle.shutdown();
4055        // Safety: drops once, never accessed again
4056        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4057    }
4058}
4059
4060impl fdomain_client::fidl::Responder for DirectoryGetFlagsResponder {
4061    type ControlHandle = DirectoryControlHandle;
4062
4063    fn control_handle(&self) -> &DirectoryControlHandle {
4064        &self.control_handle
4065    }
4066
4067    fn drop_without_shutdown(mut self) {
4068        // Safety: drops once, never accessed again due to mem::forget
4069        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4070        // Prevent Drop from running (which would shut down the channel)
4071        std::mem::forget(self);
4072    }
4073}
4074
4075impl DirectoryGetFlagsResponder {
4076    /// Sends a response to the FIDL transaction.
4077    ///
4078    /// Sets the channel to shutdown if an error occurs.
4079    pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4080        let _result = self.send_raw(result);
4081        if _result.is_err() {
4082            self.control_handle.shutdown();
4083        }
4084        self.drop_without_shutdown();
4085        _result
4086    }
4087
4088    /// Similar to "send" but does not shutdown the channel if an error occurs.
4089    pub fn send_no_shutdown_on_err(
4090        self,
4091        mut result: Result<Flags, i32>,
4092    ) -> Result<(), fidl::Error> {
4093        let _result = self.send_raw(result);
4094        self.drop_without_shutdown();
4095        _result
4096    }
4097
4098    fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4099        self.control_handle
4100            .inner
4101            .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
4102                fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
4103                self.tx_id,
4104                0x176eb318f64ec23,
4105                fidl::encoding::DynamicFlags::FLEXIBLE,
4106            )
4107    }
4108}
4109
4110#[must_use = "FIDL methods require a response to be sent"]
4111#[derive(Debug)]
4112pub struct DirectorySetFlagsResponder {
4113    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4114    tx_id: u32,
4115}
4116
4117/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4118/// if the responder is dropped without sending a response, so that the client
4119/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4120impl std::ops::Drop for DirectorySetFlagsResponder {
4121    fn drop(&mut self) {
4122        self.control_handle.shutdown();
4123        // Safety: drops once, never accessed again
4124        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4125    }
4126}
4127
4128impl fdomain_client::fidl::Responder for DirectorySetFlagsResponder {
4129    type ControlHandle = DirectoryControlHandle;
4130
4131    fn control_handle(&self) -> &DirectoryControlHandle {
4132        &self.control_handle
4133    }
4134
4135    fn drop_without_shutdown(mut self) {
4136        // Safety: drops once, never accessed again due to mem::forget
4137        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4138        // Prevent Drop from running (which would shut down the channel)
4139        std::mem::forget(self);
4140    }
4141}
4142
4143impl DirectorySetFlagsResponder {
4144    /// Sends a response to the FIDL transaction.
4145    ///
4146    /// Sets the channel to shutdown if an error occurs.
4147    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4148        let _result = self.send_raw(result);
4149        if _result.is_err() {
4150            self.control_handle.shutdown();
4151        }
4152        self.drop_without_shutdown();
4153        _result
4154    }
4155
4156    /// Similar to "send" but does not shutdown the channel if an error occurs.
4157    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4158        let _result = self.send_raw(result);
4159        self.drop_without_shutdown();
4160        _result
4161    }
4162
4163    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4164        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
4165            fidl::encoding::EmptyStruct,
4166            i32,
4167        >>(
4168            fidl::encoding::FlexibleResult::new(result),
4169            self.tx_id,
4170            0x55a8028685791ea8,
4171            fidl::encoding::DynamicFlags::FLEXIBLE,
4172        )
4173    }
4174}
4175
4176#[must_use = "FIDL methods require a response to be sent"]
4177#[derive(Debug)]
4178pub struct DirectoryQueryFilesystemResponder {
4179    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4180    tx_id: u32,
4181}
4182
4183/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4184/// if the responder is dropped without sending a response, so that the client
4185/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4186impl std::ops::Drop for DirectoryQueryFilesystemResponder {
4187    fn drop(&mut self) {
4188        self.control_handle.shutdown();
4189        // Safety: drops once, never accessed again
4190        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4191    }
4192}
4193
4194impl fdomain_client::fidl::Responder for DirectoryQueryFilesystemResponder {
4195    type ControlHandle = DirectoryControlHandle;
4196
4197    fn control_handle(&self) -> &DirectoryControlHandle {
4198        &self.control_handle
4199    }
4200
4201    fn drop_without_shutdown(mut self) {
4202        // Safety: drops once, never accessed again due to mem::forget
4203        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4204        // Prevent Drop from running (which would shut down the channel)
4205        std::mem::forget(self);
4206    }
4207}
4208
4209impl DirectoryQueryFilesystemResponder {
4210    /// Sends a response to the FIDL transaction.
4211    ///
4212    /// Sets the channel to shutdown if an error occurs.
4213    pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4214        let _result = self.send_raw(s, info);
4215        if _result.is_err() {
4216            self.control_handle.shutdown();
4217        }
4218        self.drop_without_shutdown();
4219        _result
4220    }
4221
4222    /// Similar to "send" but does not shutdown the channel if an error occurs.
4223    pub fn send_no_shutdown_on_err(
4224        self,
4225        mut s: i32,
4226        mut info: Option<&FilesystemInfo>,
4227    ) -> Result<(), fidl::Error> {
4228        let _result = self.send_raw(s, info);
4229        self.drop_without_shutdown();
4230        _result
4231    }
4232
4233    fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
4234        self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
4235            (s, info),
4236            self.tx_id,
4237            0x6f344a1c6b0a0610,
4238            fidl::encoding::DynamicFlags::empty(),
4239        )
4240    }
4241}
4242
4243#[must_use = "FIDL methods require a response to be sent"]
4244#[derive(Debug)]
4245pub struct DirectoryGetAttributesResponder {
4246    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4247    tx_id: u32,
4248}
4249
4250/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4251/// if the responder is dropped without sending a response, so that the client
4252/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4253impl std::ops::Drop for DirectoryGetAttributesResponder {
4254    fn drop(&mut self) {
4255        self.control_handle.shutdown();
4256        // Safety: drops once, never accessed again
4257        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4258    }
4259}
4260
4261impl fdomain_client::fidl::Responder for DirectoryGetAttributesResponder {
4262    type ControlHandle = DirectoryControlHandle;
4263
4264    fn control_handle(&self) -> &DirectoryControlHandle {
4265        &self.control_handle
4266    }
4267
4268    fn drop_without_shutdown(mut self) {
4269        // Safety: drops once, never accessed again due to mem::forget
4270        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4271        // Prevent Drop from running (which would shut down the channel)
4272        std::mem::forget(self);
4273    }
4274}
4275
4276impl DirectoryGetAttributesResponder {
4277    /// Sends a response to the FIDL transaction.
4278    ///
4279    /// Sets the channel to shutdown if an error occurs.
4280    pub fn send(
4281        self,
4282        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4283    ) -> Result<(), fidl::Error> {
4284        let _result = self.send_raw(result);
4285        if _result.is_err() {
4286            self.control_handle.shutdown();
4287        }
4288        self.drop_without_shutdown();
4289        _result
4290    }
4291
4292    /// Similar to "send" but does not shutdown the channel if an error occurs.
4293    pub fn send_no_shutdown_on_err(
4294        self,
4295        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4296    ) -> Result<(), fidl::Error> {
4297        let _result = self.send_raw(result);
4298        self.drop_without_shutdown();
4299        _result
4300    }
4301
4302    fn send_raw(
4303        &self,
4304        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
4305    ) -> Result<(), fidl::Error> {
4306        self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
4307            result,
4308            self.tx_id,
4309            0x3d4396a638ea053b,
4310            fidl::encoding::DynamicFlags::empty(),
4311        )
4312    }
4313}
4314
4315#[must_use = "FIDL methods require a response to be sent"]
4316#[derive(Debug)]
4317pub struct DirectoryUpdateAttributesResponder {
4318    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4319    tx_id: u32,
4320}
4321
4322/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4323/// if the responder is dropped without sending a response, so that the client
4324/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4325impl std::ops::Drop for DirectoryUpdateAttributesResponder {
4326    fn drop(&mut self) {
4327        self.control_handle.shutdown();
4328        // Safety: drops once, never accessed again
4329        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4330    }
4331}
4332
4333impl fdomain_client::fidl::Responder for DirectoryUpdateAttributesResponder {
4334    type ControlHandle = DirectoryControlHandle;
4335
4336    fn control_handle(&self) -> &DirectoryControlHandle {
4337        &self.control_handle
4338    }
4339
4340    fn drop_without_shutdown(mut self) {
4341        // Safety: drops once, never accessed again due to mem::forget
4342        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4343        // Prevent Drop from running (which would shut down the channel)
4344        std::mem::forget(self);
4345    }
4346}
4347
4348impl DirectoryUpdateAttributesResponder {
4349    /// Sends a response to the FIDL transaction.
4350    ///
4351    /// Sets the channel to shutdown if an error occurs.
4352    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4353        let _result = self.send_raw(result);
4354        if _result.is_err() {
4355            self.control_handle.shutdown();
4356        }
4357        self.drop_without_shutdown();
4358        _result
4359    }
4360
4361    /// Similar to "send" but does not shutdown the channel if an error occurs.
4362    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4363        let _result = self.send_raw(result);
4364        self.drop_without_shutdown();
4365        _result
4366    }
4367
4368    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4369        self.control_handle
4370            .inner
4371            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4372                result,
4373                self.tx_id,
4374                0x3308c1da5a89bf08,
4375                fidl::encoding::DynamicFlags::empty(),
4376            )
4377    }
4378}
4379
4380#[must_use = "FIDL methods require a response to be sent"]
4381#[derive(Debug)]
4382pub struct DirectorySyncResponder {
4383    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4384    tx_id: u32,
4385}
4386
4387/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4388/// if the responder is dropped without sending a response, so that the client
4389/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4390impl std::ops::Drop for DirectorySyncResponder {
4391    fn drop(&mut self) {
4392        self.control_handle.shutdown();
4393        // Safety: drops once, never accessed again
4394        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4395    }
4396}
4397
4398impl fdomain_client::fidl::Responder for DirectorySyncResponder {
4399    type ControlHandle = DirectoryControlHandle;
4400
4401    fn control_handle(&self) -> &DirectoryControlHandle {
4402        &self.control_handle
4403    }
4404
4405    fn drop_without_shutdown(mut self) {
4406        // Safety: drops once, never accessed again due to mem::forget
4407        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4408        // Prevent Drop from running (which would shut down the channel)
4409        std::mem::forget(self);
4410    }
4411}
4412
4413impl DirectorySyncResponder {
4414    /// Sends a response to the FIDL transaction.
4415    ///
4416    /// Sets the channel to shutdown if an error occurs.
4417    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4418        let _result = self.send_raw(result);
4419        if _result.is_err() {
4420            self.control_handle.shutdown();
4421        }
4422        self.drop_without_shutdown();
4423        _result
4424    }
4425
4426    /// Similar to "send" but does not shutdown the channel if an error occurs.
4427    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4428        let _result = self.send_raw(result);
4429        self.drop_without_shutdown();
4430        _result
4431    }
4432
4433    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4434        self.control_handle
4435            .inner
4436            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4437                result,
4438                self.tx_id,
4439                0x2c5c27ca0ab5dc49,
4440                fidl::encoding::DynamicFlags::empty(),
4441            )
4442    }
4443}
4444
4445#[must_use = "FIDL methods require a response to be sent"]
4446#[derive(Debug)]
4447pub struct DirectoryGetExtendedAttributeResponder {
4448    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4449    tx_id: u32,
4450}
4451
4452/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4453/// if the responder is dropped without sending a response, so that the client
4454/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4455impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
4456    fn drop(&mut self) {
4457        self.control_handle.shutdown();
4458        // Safety: drops once, never accessed again
4459        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4460    }
4461}
4462
4463impl fdomain_client::fidl::Responder for DirectoryGetExtendedAttributeResponder {
4464    type ControlHandle = DirectoryControlHandle;
4465
4466    fn control_handle(&self) -> &DirectoryControlHandle {
4467        &self.control_handle
4468    }
4469
4470    fn drop_without_shutdown(mut self) {
4471        // Safety: drops once, never accessed again due to mem::forget
4472        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4473        // Prevent Drop from running (which would shut down the channel)
4474        std::mem::forget(self);
4475    }
4476}
4477
4478impl DirectoryGetExtendedAttributeResponder {
4479    /// Sends a response to the FIDL transaction.
4480    ///
4481    /// Sets the channel to shutdown if an error occurs.
4482    pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4483        let _result = self.send_raw(result);
4484        if _result.is_err() {
4485            self.control_handle.shutdown();
4486        }
4487        self.drop_without_shutdown();
4488        _result
4489    }
4490
4491    /// Similar to "send" but does not shutdown the channel if an error occurs.
4492    pub fn send_no_shutdown_on_err(
4493        self,
4494        mut result: Result<ExtendedAttributeValue, i32>,
4495    ) -> Result<(), fidl::Error> {
4496        let _result = self.send_raw(result);
4497        self.drop_without_shutdown();
4498        _result
4499    }
4500
4501    fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
4502        self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
4503            result.as_mut().map_err(|e| *e),
4504            self.tx_id,
4505            0x45ffa3ccfdeb76db,
4506            fidl::encoding::DynamicFlags::empty(),
4507        )
4508    }
4509}
4510
4511#[must_use = "FIDL methods require a response to be sent"]
4512#[derive(Debug)]
4513pub struct DirectorySetExtendedAttributeResponder {
4514    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4515    tx_id: u32,
4516}
4517
4518/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4519/// if the responder is dropped without sending a response, so that the client
4520/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4521impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
4522    fn drop(&mut self) {
4523        self.control_handle.shutdown();
4524        // Safety: drops once, never accessed again
4525        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4526    }
4527}
4528
4529impl fdomain_client::fidl::Responder for DirectorySetExtendedAttributeResponder {
4530    type ControlHandle = DirectoryControlHandle;
4531
4532    fn control_handle(&self) -> &DirectoryControlHandle {
4533        &self.control_handle
4534    }
4535
4536    fn drop_without_shutdown(mut self) {
4537        // Safety: drops once, never accessed again due to mem::forget
4538        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4539        // Prevent Drop from running (which would shut down the channel)
4540        std::mem::forget(self);
4541    }
4542}
4543
4544impl DirectorySetExtendedAttributeResponder {
4545    /// Sends a response to the FIDL transaction.
4546    ///
4547    /// Sets the channel to shutdown if an error occurs.
4548    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4549        let _result = self.send_raw(result);
4550        if _result.is_err() {
4551            self.control_handle.shutdown();
4552        }
4553        self.drop_without_shutdown();
4554        _result
4555    }
4556
4557    /// Similar to "send" but does not shutdown the channel if an error occurs.
4558    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4559        let _result = self.send_raw(result);
4560        self.drop_without_shutdown();
4561        _result
4562    }
4563
4564    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4565        self.control_handle
4566            .inner
4567            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4568                result,
4569                self.tx_id,
4570                0x4a951362f681f23c,
4571                fidl::encoding::DynamicFlags::empty(),
4572            )
4573    }
4574}
4575
4576#[must_use = "FIDL methods require a response to be sent"]
4577#[derive(Debug)]
4578pub struct DirectoryRemoveExtendedAttributeResponder {
4579    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4580    tx_id: u32,
4581}
4582
4583/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4584/// if the responder is dropped without sending a response, so that the client
4585/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4586impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
4587    fn drop(&mut self) {
4588        self.control_handle.shutdown();
4589        // Safety: drops once, never accessed again
4590        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4591    }
4592}
4593
4594impl fdomain_client::fidl::Responder for DirectoryRemoveExtendedAttributeResponder {
4595    type ControlHandle = DirectoryControlHandle;
4596
4597    fn control_handle(&self) -> &DirectoryControlHandle {
4598        &self.control_handle
4599    }
4600
4601    fn drop_without_shutdown(mut self) {
4602        // Safety: drops once, never accessed again due to mem::forget
4603        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4604        // Prevent Drop from running (which would shut down the channel)
4605        std::mem::forget(self);
4606    }
4607}
4608
4609impl DirectoryRemoveExtendedAttributeResponder {
4610    /// Sends a response to the FIDL transaction.
4611    ///
4612    /// Sets the channel to shutdown if an error occurs.
4613    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4614        let _result = self.send_raw(result);
4615        if _result.is_err() {
4616            self.control_handle.shutdown();
4617        }
4618        self.drop_without_shutdown();
4619        _result
4620    }
4621
4622    /// Similar to "send" but does not shutdown the channel if an error occurs.
4623    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4624        let _result = self.send_raw(result);
4625        self.drop_without_shutdown();
4626        _result
4627    }
4628
4629    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4630        self.control_handle
4631            .inner
4632            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4633                result,
4634                self.tx_id,
4635                0x7a0b9f3a9bf9032d,
4636                fidl::encoding::DynamicFlags::empty(),
4637            )
4638    }
4639}
4640
4641#[must_use = "FIDL methods require a response to be sent"]
4642#[derive(Debug)]
4643pub struct DirectoryReadDirentsResponder {
4644    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4645    tx_id: u32,
4646}
4647
4648/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4649/// if the responder is dropped without sending a response, so that the client
4650/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4651impl std::ops::Drop for DirectoryReadDirentsResponder {
4652    fn drop(&mut self) {
4653        self.control_handle.shutdown();
4654        // Safety: drops once, never accessed again
4655        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4656    }
4657}
4658
4659impl fdomain_client::fidl::Responder for DirectoryReadDirentsResponder {
4660    type ControlHandle = DirectoryControlHandle;
4661
4662    fn control_handle(&self) -> &DirectoryControlHandle {
4663        &self.control_handle
4664    }
4665
4666    fn drop_without_shutdown(mut self) {
4667        // Safety: drops once, never accessed again due to mem::forget
4668        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4669        // Prevent Drop from running (which would shut down the channel)
4670        std::mem::forget(self);
4671    }
4672}
4673
4674impl DirectoryReadDirentsResponder {
4675    /// Sends a response to the FIDL transaction.
4676    ///
4677    /// Sets the channel to shutdown if an error occurs.
4678    pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4679        let _result = self.send_raw(s, dirents);
4680        if _result.is_err() {
4681            self.control_handle.shutdown();
4682        }
4683        self.drop_without_shutdown();
4684        _result
4685    }
4686
4687    /// Similar to "send" but does not shutdown the channel if an error occurs.
4688    pub fn send_no_shutdown_on_err(
4689        self,
4690        mut s: i32,
4691        mut dirents: &[u8],
4692    ) -> Result<(), fidl::Error> {
4693        let _result = self.send_raw(s, dirents);
4694        self.drop_without_shutdown();
4695        _result
4696    }
4697
4698    fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
4699        self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
4700            (s, dirents),
4701            self.tx_id,
4702            0x3582806bf27faa0a,
4703            fidl::encoding::DynamicFlags::empty(),
4704        )
4705    }
4706}
4707
4708#[must_use = "FIDL methods require a response to be sent"]
4709#[derive(Debug)]
4710pub struct DirectoryRewindResponder {
4711    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4712    tx_id: u32,
4713}
4714
4715/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4716/// if the responder is dropped without sending a response, so that the client
4717/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4718impl std::ops::Drop for DirectoryRewindResponder {
4719    fn drop(&mut self) {
4720        self.control_handle.shutdown();
4721        // Safety: drops once, never accessed again
4722        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4723    }
4724}
4725
4726impl fdomain_client::fidl::Responder for DirectoryRewindResponder {
4727    type ControlHandle = DirectoryControlHandle;
4728
4729    fn control_handle(&self) -> &DirectoryControlHandle {
4730        &self.control_handle
4731    }
4732
4733    fn drop_without_shutdown(mut self) {
4734        // Safety: drops once, never accessed again due to mem::forget
4735        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4736        // Prevent Drop from running (which would shut down the channel)
4737        std::mem::forget(self);
4738    }
4739}
4740
4741impl DirectoryRewindResponder {
4742    /// Sends a response to the FIDL transaction.
4743    ///
4744    /// Sets the channel to shutdown if an error occurs.
4745    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4746        let _result = self.send_raw(s);
4747        if _result.is_err() {
4748            self.control_handle.shutdown();
4749        }
4750        self.drop_without_shutdown();
4751        _result
4752    }
4753
4754    /// Similar to "send" but does not shutdown the channel if an error occurs.
4755    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4756        let _result = self.send_raw(s);
4757        self.drop_without_shutdown();
4758        _result
4759    }
4760
4761    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4762        self.control_handle.inner.send::<DirectoryRewindResponse>(
4763            (s,),
4764            self.tx_id,
4765            0x16b1202af0f34c71,
4766            fidl::encoding::DynamicFlags::empty(),
4767        )
4768    }
4769}
4770
4771#[must_use = "FIDL methods require a response to be sent"]
4772#[derive(Debug)]
4773pub struct DirectoryGetTokenResponder {
4774    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4775    tx_id: u32,
4776}
4777
4778/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4779/// if the responder is dropped without sending a response, so that the client
4780/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4781impl std::ops::Drop for DirectoryGetTokenResponder {
4782    fn drop(&mut self) {
4783        self.control_handle.shutdown();
4784        // Safety: drops once, never accessed again
4785        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4786    }
4787}
4788
4789impl fdomain_client::fidl::Responder for DirectoryGetTokenResponder {
4790    type ControlHandle = DirectoryControlHandle;
4791
4792    fn control_handle(&self) -> &DirectoryControlHandle {
4793        &self.control_handle
4794    }
4795
4796    fn drop_without_shutdown(mut self) {
4797        // Safety: drops once, never accessed again due to mem::forget
4798        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4799        // Prevent Drop from running (which would shut down the channel)
4800        std::mem::forget(self);
4801    }
4802}
4803
4804impl DirectoryGetTokenResponder {
4805    /// Sends a response to the FIDL transaction.
4806    ///
4807    /// Sets the channel to shutdown if an error occurs.
4808    pub fn send(
4809        self,
4810        mut s: i32,
4811        mut token: Option<fdomain_client::NullableHandle>,
4812    ) -> Result<(), fidl::Error> {
4813        let _result = self.send_raw(s, token);
4814        if _result.is_err() {
4815            self.control_handle.shutdown();
4816        }
4817        self.drop_without_shutdown();
4818        _result
4819    }
4820
4821    /// Similar to "send" but does not shutdown the channel if an error occurs.
4822    pub fn send_no_shutdown_on_err(
4823        self,
4824        mut s: i32,
4825        mut token: Option<fdomain_client::NullableHandle>,
4826    ) -> Result<(), fidl::Error> {
4827        let _result = self.send_raw(s, token);
4828        self.drop_without_shutdown();
4829        _result
4830    }
4831
4832    fn send_raw(
4833        &self,
4834        mut s: i32,
4835        mut token: Option<fdomain_client::NullableHandle>,
4836    ) -> Result<(), fidl::Error> {
4837        self.control_handle.inner.send::<DirectoryGetTokenResponse>(
4838            (s, token),
4839            self.tx_id,
4840            0x26ae9d18763c8655,
4841            fidl::encoding::DynamicFlags::empty(),
4842        )
4843    }
4844}
4845
4846#[must_use = "FIDL methods require a response to be sent"]
4847#[derive(Debug)]
4848pub struct DirectoryLinkResponder {
4849    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4850    tx_id: u32,
4851}
4852
4853/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4854/// if the responder is dropped without sending a response, so that the client
4855/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4856impl std::ops::Drop for DirectoryLinkResponder {
4857    fn drop(&mut self) {
4858        self.control_handle.shutdown();
4859        // Safety: drops once, never accessed again
4860        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4861    }
4862}
4863
4864impl fdomain_client::fidl::Responder for DirectoryLinkResponder {
4865    type ControlHandle = DirectoryControlHandle;
4866
4867    fn control_handle(&self) -> &DirectoryControlHandle {
4868        &self.control_handle
4869    }
4870
4871    fn drop_without_shutdown(mut self) {
4872        // Safety: drops once, never accessed again due to mem::forget
4873        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4874        // Prevent Drop from running (which would shut down the channel)
4875        std::mem::forget(self);
4876    }
4877}
4878
4879impl DirectoryLinkResponder {
4880    /// Sends a response to the FIDL transaction.
4881    ///
4882    /// Sets the channel to shutdown if an error occurs.
4883    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4884        let _result = self.send_raw(s);
4885        if _result.is_err() {
4886            self.control_handle.shutdown();
4887        }
4888        self.drop_without_shutdown();
4889        _result
4890    }
4891
4892    /// Similar to "send" but does not shutdown the channel if an error occurs.
4893    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4894        let _result = self.send_raw(s);
4895        self.drop_without_shutdown();
4896        _result
4897    }
4898
4899    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4900        self.control_handle.inner.send::<DirectoryLinkResponse>(
4901            (s,),
4902            self.tx_id,
4903            0x740604c0c7c930e7,
4904            fidl::encoding::DynamicFlags::empty(),
4905        )
4906    }
4907}
4908
4909#[must_use = "FIDL methods require a response to be sent"]
4910#[derive(Debug)]
4911pub struct DirectoryUnlinkResponder {
4912    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4913    tx_id: u32,
4914}
4915
4916/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4917/// if the responder is dropped without sending a response, so that the client
4918/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4919impl std::ops::Drop for DirectoryUnlinkResponder {
4920    fn drop(&mut self) {
4921        self.control_handle.shutdown();
4922        // Safety: drops once, never accessed again
4923        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4924    }
4925}
4926
4927impl fdomain_client::fidl::Responder for DirectoryUnlinkResponder {
4928    type ControlHandle = DirectoryControlHandle;
4929
4930    fn control_handle(&self) -> &DirectoryControlHandle {
4931        &self.control_handle
4932    }
4933
4934    fn drop_without_shutdown(mut self) {
4935        // Safety: drops once, never accessed again due to mem::forget
4936        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4937        // Prevent Drop from running (which would shut down the channel)
4938        std::mem::forget(self);
4939    }
4940}
4941
4942impl DirectoryUnlinkResponder {
4943    /// Sends a response to the FIDL transaction.
4944    ///
4945    /// Sets the channel to shutdown if an error occurs.
4946    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4947        let _result = self.send_raw(result);
4948        if _result.is_err() {
4949            self.control_handle.shutdown();
4950        }
4951        self.drop_without_shutdown();
4952        _result
4953    }
4954
4955    /// Similar to "send" but does not shutdown the channel if an error occurs.
4956    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4957        let _result = self.send_raw(result);
4958        self.drop_without_shutdown();
4959        _result
4960    }
4961
4962    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4963        self.control_handle
4964            .inner
4965            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4966                result,
4967                self.tx_id,
4968                0x750a0326a78d7bed,
4969                fidl::encoding::DynamicFlags::empty(),
4970            )
4971    }
4972}
4973
4974#[must_use = "FIDL methods require a response to be sent"]
4975#[derive(Debug)]
4976pub struct DirectoryRenameResponder {
4977    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4978    tx_id: u32,
4979}
4980
4981/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
4982/// if the responder is dropped without sending a response, so that the client
4983/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4984impl std::ops::Drop for DirectoryRenameResponder {
4985    fn drop(&mut self) {
4986        self.control_handle.shutdown();
4987        // Safety: drops once, never accessed again
4988        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4989    }
4990}
4991
4992impl fdomain_client::fidl::Responder for DirectoryRenameResponder {
4993    type ControlHandle = DirectoryControlHandle;
4994
4995    fn control_handle(&self) -> &DirectoryControlHandle {
4996        &self.control_handle
4997    }
4998
4999    fn drop_without_shutdown(mut self) {
5000        // Safety: drops once, never accessed again due to mem::forget
5001        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5002        // Prevent Drop from running (which would shut down the channel)
5003        std::mem::forget(self);
5004    }
5005}
5006
5007impl DirectoryRenameResponder {
5008    /// Sends a response to the FIDL transaction.
5009    ///
5010    /// Sets the channel to shutdown if an error occurs.
5011    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5012        let _result = self.send_raw(result);
5013        if _result.is_err() {
5014            self.control_handle.shutdown();
5015        }
5016        self.drop_without_shutdown();
5017        _result
5018    }
5019
5020    /// Similar to "send" but does not shutdown the channel if an error occurs.
5021    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5022        let _result = self.send_raw(result);
5023        self.drop_without_shutdown();
5024        _result
5025    }
5026
5027    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5028        self.control_handle
5029            .inner
5030            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5031                result,
5032                self.tx_id,
5033                0x7060e7723b9928de,
5034                fidl::encoding::DynamicFlags::empty(),
5035            )
5036    }
5037}
5038
5039#[must_use = "FIDL methods require a response to be sent"]
5040#[derive(Debug)]
5041pub struct DirectoryCreateSymlinkResponder {
5042    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5043    tx_id: u32,
5044}
5045
5046/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
5047/// if the responder is dropped without sending a response, so that the client
5048/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5049impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5050    fn drop(&mut self) {
5051        self.control_handle.shutdown();
5052        // Safety: drops once, never accessed again
5053        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5054    }
5055}
5056
5057impl fdomain_client::fidl::Responder for DirectoryCreateSymlinkResponder {
5058    type ControlHandle = DirectoryControlHandle;
5059
5060    fn control_handle(&self) -> &DirectoryControlHandle {
5061        &self.control_handle
5062    }
5063
5064    fn drop_without_shutdown(mut self) {
5065        // Safety: drops once, never accessed again due to mem::forget
5066        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5067        // Prevent Drop from running (which would shut down the channel)
5068        std::mem::forget(self);
5069    }
5070}
5071
5072impl DirectoryCreateSymlinkResponder {
5073    /// Sends a response to the FIDL transaction.
5074    ///
5075    /// Sets the channel to shutdown if an error occurs.
5076    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5077        let _result = self.send_raw(result);
5078        if _result.is_err() {
5079            self.control_handle.shutdown();
5080        }
5081        self.drop_without_shutdown();
5082        _result
5083    }
5084
5085    /// Similar to "send" but does not shutdown the channel if an error occurs.
5086    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5087        let _result = self.send_raw(result);
5088        self.drop_without_shutdown();
5089        _result
5090    }
5091
5092    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5093        self.control_handle
5094            .inner
5095            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5096                result,
5097                self.tx_id,
5098                0x21ce0f19ec043889,
5099                fidl::encoding::DynamicFlags::empty(),
5100            )
5101    }
5102}
5103
5104#[must_use = "FIDL methods require a response to be sent"]
5105#[derive(Debug)]
5106pub struct DirectoryWatchResponder {
5107    control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5108    tx_id: u32,
5109}
5110
5111/// Set the the channel to be shutdown (see [`DirectoryControlHandle::shutdown`])
5112/// if the responder is dropped without sending a response, so that the client
5113/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5114impl std::ops::Drop for DirectoryWatchResponder {
5115    fn drop(&mut self) {
5116        self.control_handle.shutdown();
5117        // Safety: drops once, never accessed again
5118        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5119    }
5120}
5121
5122impl fdomain_client::fidl::Responder for DirectoryWatchResponder {
5123    type ControlHandle = DirectoryControlHandle;
5124
5125    fn control_handle(&self) -> &DirectoryControlHandle {
5126        &self.control_handle
5127    }
5128
5129    fn drop_without_shutdown(mut self) {
5130        // Safety: drops once, never accessed again due to mem::forget
5131        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5132        // Prevent Drop from running (which would shut down the channel)
5133        std::mem::forget(self);
5134    }
5135}
5136
5137impl DirectoryWatchResponder {
5138    /// Sends a response to the FIDL transaction.
5139    ///
5140    /// Sets the channel to shutdown if an error occurs.
5141    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5142        let _result = self.send_raw(s);
5143        if _result.is_err() {
5144            self.control_handle.shutdown();
5145        }
5146        self.drop_without_shutdown();
5147        _result
5148    }
5149
5150    /// Similar to "send" but does not shutdown the channel if an error occurs.
5151    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5152        let _result = self.send_raw(s);
5153        self.drop_without_shutdown();
5154        _result
5155    }
5156
5157    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5158        self.control_handle.inner.send::<DirectoryWatchResponse>(
5159            (s,),
5160            self.tx_id,
5161            0x5717193a59d66d91,
5162            fidl::encoding::DynamicFlags::empty(),
5163        )
5164    }
5165}
5166
5167#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5168pub struct DirectoryWatcherMarker;
5169
5170impl fdomain_client::fidl::ProtocolMarker for DirectoryWatcherMarker {
5171    type Proxy = DirectoryWatcherProxy;
5172    type RequestStream = DirectoryWatcherRequestStream;
5173
5174    const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
5175}
5176
5177pub trait DirectoryWatcherProxyInterface: Send + Sync {}
5178
5179#[derive(Debug, Clone)]
5180pub struct DirectoryWatcherProxy {
5181    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5182}
5183
5184impl fdomain_client::fidl::Proxy for DirectoryWatcherProxy {
5185    type Protocol = DirectoryWatcherMarker;
5186
5187    fn from_channel(inner: fdomain_client::Channel) -> Self {
5188        Self::new(inner)
5189    }
5190
5191    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5192        self.client.into_channel().map_err(|client| Self { client })
5193    }
5194
5195    fn as_channel(&self) -> &fdomain_client::Channel {
5196        self.client.as_channel()
5197    }
5198}
5199
5200impl DirectoryWatcherProxy {
5201    /// Create a new Proxy for fuchsia.io/DirectoryWatcher.
5202    pub fn new(channel: fdomain_client::Channel) -> Self {
5203        let protocol_name =
5204            <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5205        Self { client: fidl::client::Client::new(channel, protocol_name) }
5206    }
5207
5208    /// Get a Stream of events from the remote end of the protocol.
5209    ///
5210    /// # Panics
5211    ///
5212    /// Panics if the event stream was already taken.
5213    pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
5214        DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
5215    }
5216}
5217
5218impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
5219
5220pub struct DirectoryWatcherEventStream {
5221    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5222}
5223
5224impl std::marker::Unpin for DirectoryWatcherEventStream {}
5225
5226impl futures::stream::FusedStream for DirectoryWatcherEventStream {
5227    fn is_terminated(&self) -> bool {
5228        self.event_receiver.is_terminated()
5229    }
5230}
5231
5232impl futures::Stream for DirectoryWatcherEventStream {
5233    type Item = Result<DirectoryWatcherEvent, fidl::Error>;
5234
5235    fn poll_next(
5236        mut self: std::pin::Pin<&mut Self>,
5237        cx: &mut std::task::Context<'_>,
5238    ) -> std::task::Poll<Option<Self::Item>> {
5239        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5240            &mut self.event_receiver,
5241            cx
5242        )?) {
5243            Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
5244            None => std::task::Poll::Ready(None),
5245        }
5246    }
5247}
5248
5249#[derive(Debug)]
5250pub enum DirectoryWatcherEvent {}
5251
5252impl DirectoryWatcherEvent {
5253    /// Decodes a message buffer as a [`DirectoryWatcherEvent`].
5254    fn decode(
5255        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5256    ) -> Result<DirectoryWatcherEvent, fidl::Error> {
5257        let (bytes, _handles) = buf.split_mut();
5258        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5259        debug_assert_eq!(tx_header.tx_id, 0);
5260        match tx_header.ordinal {
5261            _ => Err(fidl::Error::UnknownOrdinal {
5262                ordinal: tx_header.ordinal,
5263                protocol_name:
5264                    <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5265            }),
5266        }
5267    }
5268}
5269
5270/// A Stream of incoming requests for fuchsia.io/DirectoryWatcher.
5271pub struct DirectoryWatcherRequestStream {
5272    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5273    is_terminated: bool,
5274}
5275
5276impl std::marker::Unpin for DirectoryWatcherRequestStream {}
5277
5278impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
5279    fn is_terminated(&self) -> bool {
5280        self.is_terminated
5281    }
5282}
5283
5284impl fdomain_client::fidl::RequestStream for DirectoryWatcherRequestStream {
5285    type Protocol = DirectoryWatcherMarker;
5286    type ControlHandle = DirectoryWatcherControlHandle;
5287
5288    fn from_channel(channel: fdomain_client::Channel) -> Self {
5289        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5290    }
5291
5292    fn control_handle(&self) -> Self::ControlHandle {
5293        DirectoryWatcherControlHandle { inner: self.inner.clone() }
5294    }
5295
5296    fn into_inner(
5297        self,
5298    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5299    {
5300        (self.inner, self.is_terminated)
5301    }
5302
5303    fn from_inner(
5304        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5305        is_terminated: bool,
5306    ) -> Self {
5307        Self { inner, is_terminated }
5308    }
5309}
5310
5311impl futures::Stream for DirectoryWatcherRequestStream {
5312    type Item = Result<DirectoryWatcherRequest, fidl::Error>;
5313
5314    fn poll_next(
5315        mut self: std::pin::Pin<&mut Self>,
5316        cx: &mut std::task::Context<'_>,
5317    ) -> std::task::Poll<Option<Self::Item>> {
5318        let this = &mut *self;
5319        if this.inner.check_shutdown(cx) {
5320            this.is_terminated = true;
5321            return std::task::Poll::Ready(None);
5322        }
5323        if this.is_terminated {
5324            panic!("polled DirectoryWatcherRequestStream after completion");
5325        }
5326        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5327            |bytes, handles| {
5328                match this.inner.channel().read_etc(cx, bytes, handles) {
5329                    std::task::Poll::Ready(Ok(())) => {}
5330                    std::task::Poll::Pending => return std::task::Poll::Pending,
5331                    std::task::Poll::Ready(Err(None)) => {
5332                        this.is_terminated = true;
5333                        return std::task::Poll::Ready(None);
5334                    }
5335                    std::task::Poll::Ready(Err(Some(e))) => {
5336                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5337                            e.into(),
5338                        ))));
5339                    }
5340                }
5341
5342                // A message has been received from the channel
5343                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5344
5345                std::task::Poll::Ready(Some(match header.ordinal {
5346                _ => Err(fidl::Error::UnknownOrdinal {
5347                    ordinal: header.ordinal,
5348                    protocol_name: <DirectoryWatcherMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5349                }),
5350            }))
5351            },
5352        )
5353    }
5354}
5355
5356/// DirectoryWatcher transmits messages from a filesystem server
5357/// about events happening in the filesystem. Clients can register
5358/// new watchers using the `Directory.Watch` method, where they can
5359/// filter which events they want to receive notifications for.
5360///
5361/// The DirectoryWatcher will send messages of the form:
5362/// ```
5363/// struct {
5364///   uint8 event;
5365///   uint8 len;
5366///   char name[];
5367/// };
5368/// ```
5369/// Where names are NOT null-terminated. The name is the relative
5370/// path to the entry the event is refering to. It will be empty if
5371/// the event isn't referencing a particular entry (e.g. for the
5372/// `IDLE` event).
5373#[derive(Debug)]
5374pub enum DirectoryWatcherRequest {}
5375
5376impl DirectoryWatcherRequest {
5377    /// Name of the method defined in FIDL
5378    pub fn method_name(&self) -> &'static str {
5379        match *self {}
5380    }
5381}
5382
5383#[derive(Debug, Clone)]
5384pub struct DirectoryWatcherControlHandle {
5385    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5386}
5387
5388impl fdomain_client::fidl::ControlHandle for DirectoryWatcherControlHandle {
5389    fn shutdown(&self) {
5390        self.inner.shutdown()
5391    }
5392
5393    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5394        self.inner.shutdown_with_epitaph(status)
5395    }
5396
5397    fn is_closed(&self) -> bool {
5398        self.inner.channel().is_closed()
5399    }
5400    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5401        self.inner.channel().on_closed()
5402    }
5403}
5404
5405impl DirectoryWatcherControlHandle {}
5406
5407#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5408pub struct ExtendedAttributeIteratorMarker;
5409
5410impl fdomain_client::fidl::ProtocolMarker for ExtendedAttributeIteratorMarker {
5411    type Proxy = ExtendedAttributeIteratorProxy;
5412    type RequestStream = ExtendedAttributeIteratorRequestStream;
5413
5414    const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
5415}
5416pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
5417
5418pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
5419    type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
5420        + Send;
5421    fn r#get_next(&self) -> Self::GetNextResponseFut;
5422}
5423
5424#[derive(Debug, Clone)]
5425pub struct ExtendedAttributeIteratorProxy {
5426    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5427}
5428
5429impl fdomain_client::fidl::Proxy for ExtendedAttributeIteratorProxy {
5430    type Protocol = ExtendedAttributeIteratorMarker;
5431
5432    fn from_channel(inner: fdomain_client::Channel) -> Self {
5433        Self::new(inner)
5434    }
5435
5436    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5437        self.client.into_channel().map_err(|client| Self { client })
5438    }
5439
5440    fn as_channel(&self) -> &fdomain_client::Channel {
5441        self.client.as_channel()
5442    }
5443}
5444
5445impl ExtendedAttributeIteratorProxy {
5446    /// Create a new Proxy for fuchsia.io/ExtendedAttributeIterator.
5447    pub fn new(channel: fdomain_client::Channel) -> Self {
5448        let protocol_name =
5449            <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5450        Self { client: fidl::client::Client::new(channel, protocol_name) }
5451    }
5452
5453    /// Get a Stream of events from the remote end of the protocol.
5454    ///
5455    /// # Panics
5456    ///
5457    /// Panics if the event stream was already taken.
5458    pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
5459        ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
5460    }
5461
5462    /// Get the next chunk of extended attribute names. If this is the last
5463    /// chunk, last will be true, and the channel will be closed after the
5464    /// call.
5465    pub fn r#get_next(
5466        &self,
5467    ) -> fidl::client::QueryResponseFut<
5468        ExtendedAttributeIteratorGetNextResult,
5469        fdomain_client::fidl::FDomainResourceDialect,
5470    > {
5471        ExtendedAttributeIteratorProxyInterface::r#get_next(self)
5472    }
5473}
5474
5475impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
5476    type GetNextResponseFut = fidl::client::QueryResponseFut<
5477        ExtendedAttributeIteratorGetNextResult,
5478        fdomain_client::fidl::FDomainResourceDialect,
5479    >;
5480    fn r#get_next(&self) -> Self::GetNextResponseFut {
5481        fn _decode(
5482            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5483        ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
5484            let _response = fidl::client::decode_transaction_body::<
5485                fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
5486                fdomain_client::fidl::FDomainResourceDialect,
5487                0x3ba664a1c2e45a7,
5488            >(_buf?)?;
5489            Ok(_response.map(|x| (x.attributes, x.last)))
5490        }
5491        self.client.send_query_and_decode::<
5492            fidl::encoding::EmptyPayload,
5493            ExtendedAttributeIteratorGetNextResult,
5494        >(
5495            (),
5496            0x3ba664a1c2e45a7,
5497            fidl::encoding::DynamicFlags::empty(),
5498            _decode,
5499        )
5500    }
5501}
5502
5503pub struct ExtendedAttributeIteratorEventStream {
5504    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
5505}
5506
5507impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
5508
5509impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
5510    fn is_terminated(&self) -> bool {
5511        self.event_receiver.is_terminated()
5512    }
5513}
5514
5515impl futures::Stream for ExtendedAttributeIteratorEventStream {
5516    type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
5517
5518    fn poll_next(
5519        mut self: std::pin::Pin<&mut Self>,
5520        cx: &mut std::task::Context<'_>,
5521    ) -> std::task::Poll<Option<Self::Item>> {
5522        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5523            &mut self.event_receiver,
5524            cx
5525        )?) {
5526            Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
5527            None => std::task::Poll::Ready(None),
5528        }
5529    }
5530}
5531
5532#[derive(Debug)]
5533pub enum ExtendedAttributeIteratorEvent {}
5534
5535impl ExtendedAttributeIteratorEvent {
5536    /// Decodes a message buffer as a [`ExtendedAttributeIteratorEvent`].
5537    fn decode(
5538        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5539    ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
5540        let (bytes, _handles) = buf.split_mut();
5541        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5542        debug_assert_eq!(tx_header.tx_id, 0);
5543        match tx_header.ordinal {
5544            _ => Err(fidl::Error::UnknownOrdinal {
5545                ordinal: tx_header.ordinal,
5546                protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5547            })
5548        }
5549    }
5550}
5551
5552/// A Stream of incoming requests for fuchsia.io/ExtendedAttributeIterator.
5553pub struct ExtendedAttributeIteratorRequestStream {
5554    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5555    is_terminated: bool,
5556}
5557
5558impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
5559
5560impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
5561    fn is_terminated(&self) -> bool {
5562        self.is_terminated
5563    }
5564}
5565
5566impl fdomain_client::fidl::RequestStream for ExtendedAttributeIteratorRequestStream {
5567    type Protocol = ExtendedAttributeIteratorMarker;
5568    type ControlHandle = ExtendedAttributeIteratorControlHandle;
5569
5570    fn from_channel(channel: fdomain_client::Channel) -> Self {
5571        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5572    }
5573
5574    fn control_handle(&self) -> Self::ControlHandle {
5575        ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
5576    }
5577
5578    fn into_inner(
5579        self,
5580    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
5581    {
5582        (self.inner, self.is_terminated)
5583    }
5584
5585    fn from_inner(
5586        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5587        is_terminated: bool,
5588    ) -> Self {
5589        Self { inner, is_terminated }
5590    }
5591}
5592
5593impl futures::Stream for ExtendedAttributeIteratorRequestStream {
5594    type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
5595
5596    fn poll_next(
5597        mut self: std::pin::Pin<&mut Self>,
5598        cx: &mut std::task::Context<'_>,
5599    ) -> std::task::Poll<Option<Self::Item>> {
5600        let this = &mut *self;
5601        if this.inner.check_shutdown(cx) {
5602            this.is_terminated = true;
5603            return std::task::Poll::Ready(None);
5604        }
5605        if this.is_terminated {
5606            panic!("polled ExtendedAttributeIteratorRequestStream after completion");
5607        }
5608        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
5609            |bytes, handles| {
5610                match this.inner.channel().read_etc(cx, bytes, handles) {
5611                    std::task::Poll::Ready(Ok(())) => {}
5612                    std::task::Poll::Pending => return std::task::Poll::Pending,
5613                    std::task::Poll::Ready(Err(None)) => {
5614                        this.is_terminated = true;
5615                        return std::task::Poll::Ready(None);
5616                    }
5617                    std::task::Poll::Ready(Err(Some(e))) => {
5618                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5619                            e.into(),
5620                        ))));
5621                    }
5622                }
5623
5624                // A message has been received from the channel
5625                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5626
5627                std::task::Poll::Ready(Some(match header.ordinal {
5628                0x3ba664a1c2e45a7 => {
5629                    header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5630                    let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fdomain_client::fidl::FDomainResourceDialect);
5631                    fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5632                    let control_handle = ExtendedAttributeIteratorControlHandle {
5633                        inner: this.inner.clone(),
5634                    };
5635                    Ok(ExtendedAttributeIteratorRequest::GetNext {
5636                        responder: ExtendedAttributeIteratorGetNextResponder {
5637                            control_handle: std::mem::ManuallyDrop::new(control_handle),
5638                            tx_id: header.tx_id,
5639                        },
5640                    })
5641                }
5642                _ => Err(fidl::Error::UnknownOrdinal {
5643                    ordinal: header.ordinal,
5644                    protocol_name: <ExtendedAttributeIteratorMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
5645                }),
5646            }))
5647            },
5648        )
5649    }
5650}
5651
5652#[derive(Debug)]
5653pub enum ExtendedAttributeIteratorRequest {
5654    /// Get the next chunk of extended attribute names. If this is the last
5655    /// chunk, last will be true, and the channel will be closed after the
5656    /// call.
5657    GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
5658}
5659
5660impl ExtendedAttributeIteratorRequest {
5661    #[allow(irrefutable_let_patterns)]
5662    pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
5663        if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
5664            Some((responder))
5665        } else {
5666            None
5667        }
5668    }
5669
5670    /// Name of the method defined in FIDL
5671    pub fn method_name(&self) -> &'static str {
5672        match *self {
5673            ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
5674        }
5675    }
5676}
5677
5678#[derive(Debug, Clone)]
5679pub struct ExtendedAttributeIteratorControlHandle {
5680    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
5681}
5682
5683impl fdomain_client::fidl::ControlHandle for ExtendedAttributeIteratorControlHandle {
5684    fn shutdown(&self) {
5685        self.inner.shutdown()
5686    }
5687
5688    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5689        self.inner.shutdown_with_epitaph(status)
5690    }
5691
5692    fn is_closed(&self) -> bool {
5693        self.inner.channel().is_closed()
5694    }
5695    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
5696        self.inner.channel().on_closed()
5697    }
5698}
5699
5700impl ExtendedAttributeIteratorControlHandle {}
5701
5702#[must_use = "FIDL methods require a response to be sent"]
5703#[derive(Debug)]
5704pub struct ExtendedAttributeIteratorGetNextResponder {
5705    control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
5706    tx_id: u32,
5707}
5708
5709/// Set the the channel to be shutdown (see [`ExtendedAttributeIteratorControlHandle::shutdown`])
5710/// if the responder is dropped without sending a response, so that the client
5711/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5712impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
5713    fn drop(&mut self) {
5714        self.control_handle.shutdown();
5715        // Safety: drops once, never accessed again
5716        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5717    }
5718}
5719
5720impl fdomain_client::fidl::Responder for ExtendedAttributeIteratorGetNextResponder {
5721    type ControlHandle = ExtendedAttributeIteratorControlHandle;
5722
5723    fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
5724        &self.control_handle
5725    }
5726
5727    fn drop_without_shutdown(mut self) {
5728        // Safety: drops once, never accessed again due to mem::forget
5729        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5730        // Prevent Drop from running (which would shut down the channel)
5731        std::mem::forget(self);
5732    }
5733}
5734
5735impl ExtendedAttributeIteratorGetNextResponder {
5736    /// Sends a response to the FIDL transaction.
5737    ///
5738    /// Sets the channel to shutdown if an error occurs.
5739    pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5740        let _result = self.send_raw(result);
5741        if _result.is_err() {
5742            self.control_handle.shutdown();
5743        }
5744        self.drop_without_shutdown();
5745        _result
5746    }
5747
5748    /// Similar to "send" but does not shutdown the channel if an error occurs.
5749    pub fn send_no_shutdown_on_err(
5750        self,
5751        mut result: Result<(&[Vec<u8>], bool), i32>,
5752    ) -> Result<(), fidl::Error> {
5753        let _result = self.send_raw(result);
5754        self.drop_without_shutdown();
5755        _result
5756    }
5757
5758    fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
5759        self.control_handle.inner.send::<fidl::encoding::ResultType<
5760            ExtendedAttributeIteratorGetNextResponse,
5761            i32,
5762        >>(
5763            result,
5764            self.tx_id,
5765            0x3ba664a1c2e45a7,
5766            fidl::encoding::DynamicFlags::empty(),
5767        )
5768    }
5769}
5770
5771#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5772pub struct FileMarker;
5773
5774impl fdomain_client::fidl::ProtocolMarker for FileMarker {
5775    type Proxy = FileProxy;
5776    type RequestStream = FileRequestStream;
5777
5778    const DEBUG_NAME: &'static str = "fuchsia.io.File";
5779}
5780impl fdomain_client::fidl::DiscoverableProtocolMarker for FileMarker {}
5781pub type FileSeekResult = Result<u64, i32>;
5782pub type FileReadAtResult = Result<Vec<u8>, i32>;
5783pub type FileWriteAtResult = Result<u64, i32>;
5784pub type FileResizeResult = Result<(), i32>;
5785pub type FileGetBackingMemoryResult = Result<fdomain_client::Vmo, i32>;
5786pub type FileAllocateResult = Result<(), i32>;
5787pub type FileEnableVerityResult = Result<(), i32>;
5788
5789pub trait FileProxyInterface: Send + Sync {
5790    type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
5791        + Send;
5792    fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
5793    type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
5794        + Send;
5795    fn r#link_into(
5796        &self,
5797        dst_parent_token: fdomain_client::Event,
5798        dst: &str,
5799    ) -> Self::LinkIntoResponseFut;
5800    fn r#clone(
5801        &self,
5802        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
5803    ) -> Result<(), fidl::Error>;
5804    type CloseResponseFut: std::future::Future<
5805            Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
5806        > + Send;
5807    fn r#close(&self) -> Self::CloseResponseFut;
5808    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
5809    fn r#query(&self) -> Self::QueryResponseFut;
5810    fn r#deprecated_clone(
5811        &self,
5812        flags: OpenFlags,
5813        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
5814    ) -> Result<(), fidl::Error>;
5815    type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
5816        + Send;
5817    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
5818    type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
5819    fn r#deprecated_set_attr(
5820        &self,
5821        flags: NodeAttributeFlags,
5822        attributes: &NodeAttributes,
5823    ) -> Self::DeprecatedSetAttrResponseFut;
5824    type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
5825        + Send;
5826    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
5827    type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
5828        + Send;
5829    fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
5830    type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
5831        + Send;
5832    fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
5833    type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
5834        + Send;
5835    fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
5836    type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
5837        + Send;
5838    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
5839    type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
5840        + Send;
5841    fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
5842    type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
5843        + Send;
5844    fn r#update_attributes(
5845        &self,
5846        payload: &MutableNodeAttributes,
5847    ) -> Self::UpdateAttributesResponseFut;
5848    type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
5849    fn r#sync(&self) -> Self::SyncResponseFut;
5850    fn r#list_extended_attributes(
5851        &self,
5852        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
5853    ) -> Result<(), fidl::Error>;
5854    type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
5855        + Send;
5856    fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
5857    type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
5858        + Send;
5859    fn r#set_extended_attribute(
5860        &self,
5861        name: &[u8],
5862        value: ExtendedAttributeValue,
5863        mode: SetExtendedAttributeMode,
5864    ) -> Self::SetExtendedAttributeResponseFut;
5865    type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
5866        + Send;
5867    fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
5868    type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
5869        + Send;
5870    fn r#read(&self, count: u64) -> Self::ReadResponseFut;
5871    type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
5872        + Send;
5873    fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
5874    type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
5875    fn r#describe(&self) -> Self::DescribeResponseFut;
5876    type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
5877    fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
5878    type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
5879        + Send;
5880    fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
5881    type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
5882        + Send;
5883    fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
5884    type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
5885        + Send;
5886    fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
5887    type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
5888        + Send;
5889    fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
5890    type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
5891        + Send;
5892    fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
5893    -> Self::AllocateResponseFut;
5894    type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
5895        + Send;
5896    fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
5897}
5898
5899#[derive(Debug, Clone)]
5900pub struct FileProxy {
5901    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
5902}
5903
5904impl fdomain_client::fidl::Proxy for FileProxy {
5905    type Protocol = FileMarker;
5906
5907    fn from_channel(inner: fdomain_client::Channel) -> Self {
5908        Self::new(inner)
5909    }
5910
5911    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
5912        self.client.into_channel().map_err(|client| Self { client })
5913    }
5914
5915    fn as_channel(&self) -> &fdomain_client::Channel {
5916        self.client.as_channel()
5917    }
5918}
5919
5920impl FileProxy {
5921    /// Create a new Proxy for fuchsia.io/File.
5922    pub fn new(channel: fdomain_client::Channel) -> Self {
5923        let protocol_name = <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
5924        Self { client: fidl::client::Client::new(channel, protocol_name) }
5925    }
5926
5927    /// Get a Stream of events from the remote end of the protocol.
5928    ///
5929    /// # Panics
5930    ///
5931    /// Panics if the event stream was already taken.
5932    pub fn take_event_stream(&self) -> FileEventStream {
5933        FileEventStream { event_receiver: self.client.take_event_receiver() }
5934    }
5935
5936    /// Acquires an advisory lock on the underlying file.
5937    ///
5938    /// The lock lasts until either this connection is closed or
5939    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
5940    /// explicitly.
5941    ///
5942    /// Advisory locks are purely advisory. They do not prevent actual read or
5943    /// write operations from occurring on the file, either through this
5944    /// connection or through other connections.
5945    ///
5946    /// This method requires the following rights:
5947    ///
5948    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
5949    /// * [`Rights.WRITE_BYTES`] if `request.type` is
5950    ///   [`AdvisoryLockType.WRITE`].
5951    ///
5952    /// # Errors
5953    ///
5954    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
5955    ///   example, another connection might hold a conflicting lock type.
5956    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
5957    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
5958    ///   to acquire the given type of lock.
5959    pub fn r#advisory_lock(
5960        &self,
5961        mut request: &AdvisoryLockRequest,
5962    ) -> fidl::client::QueryResponseFut<
5963        AdvisoryLockingAdvisoryLockResult,
5964        fdomain_client::fidl::FDomainResourceDialect,
5965    > {
5966        FileProxyInterface::r#advisory_lock(self, request)
5967    }
5968
5969    /// Creates a link to this this object with name `dst` in the directory represented by
5970    /// `dst_parent_token`.
5971    ///
5972    /// `dst` must be a resolved object name. Including "/" in the string will return
5973    /// `ZX_ERR_INVALID_ARGS`.
5974    ///
5975    /// This method requires the maximal set of rights supported by the filesystem for this object.
5976    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
5977    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
5978    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
5979    /// `ZX_ERR_ACCESS_DENIED`.
5980    ///
5981    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
5982    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
5983    ///
5984    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
5985    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
5986    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
5987    ///
5988    /// This method does not have the same atomicity properties has the `Directory::Link` method,
5989    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
5990    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
5991    pub fn r#link_into(
5992        &self,
5993        mut dst_parent_token: fdomain_client::Event,
5994        mut dst: &str,
5995    ) -> fidl::client::QueryResponseFut<
5996        LinkableLinkIntoResult,
5997        fdomain_client::fidl::FDomainResourceDialect,
5998    > {
5999        FileProxyInterface::r#link_into(self, dst_parent_token, dst)
6000    }
6001
6002    pub fn r#clone(
6003        &self,
6004        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6005    ) -> Result<(), fidl::Error> {
6006        FileProxyInterface::r#clone(self, request)
6007    }
6008
6009    /// Terminates the connection.
6010    ///
6011    /// After calling `Close`, the client must not send any other requests.
6012    ///
6013    /// Servers, after sending the status response, should close the connection
6014    /// regardless of status and without sending an epitaph.
6015    ///
6016    /// Closing the client end of the channel should be semantically equivalent
6017    /// to calling `Close` without knowing when the close has completed or its
6018    /// status.
6019    pub fn r#close(
6020        &self,
6021    ) -> fidl::client::QueryResponseFut<
6022        fdomain_fuchsia_unknown::CloseableCloseResult,
6023        fdomain_client::fidl::FDomainResourceDialect,
6024    > {
6025        FileProxyInterface::r#close(self)
6026    }
6027
6028    pub fn r#query(
6029        &self,
6030    ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
6031        FileProxyInterface::r#query(self)
6032    }
6033
6034    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
6035    pub fn r#deprecated_clone(
6036        &self,
6037        mut flags: OpenFlags,
6038        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6039    ) -> Result<(), fidl::Error> {
6040        FileProxyInterface::r#deprecated_clone(self, flags, object)
6041    }
6042
6043    /// DEPRECATED - Use `Node.GetAttributes` instead.
6044    pub fn r#deprecated_get_attr(
6045        &self,
6046    ) -> fidl::client::QueryResponseFut<
6047        (i32, NodeAttributes),
6048        fdomain_client::fidl::FDomainResourceDialect,
6049    > {
6050        FileProxyInterface::r#deprecated_get_attr(self)
6051    }
6052
6053    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
6054    pub fn r#deprecated_set_attr(
6055        &self,
6056        mut flags: NodeAttributeFlags,
6057        mut attributes: &NodeAttributes,
6058    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6059        FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
6060    }
6061
6062    /// [DEPRECATED - Use new GetFlags method instead.]
6063    pub fn r#deprecated_get_flags(
6064        &self,
6065    ) -> fidl::client::QueryResponseFut<
6066        (i32, OpenFlags),
6067        fdomain_client::fidl::FDomainResourceDialect,
6068    > {
6069        FileProxyInterface::r#deprecated_get_flags(self)
6070    }
6071
6072    /// [DEPRECATED - Use new SetFlags method instead.]
6073    pub fn r#deprecated_set_flags(
6074        &self,
6075        mut flags: OpenFlags,
6076    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
6077        FileProxyInterface::r#deprecated_set_flags(self, flags)
6078    }
6079
6080    /// Queries the flags that apply to this node after it has been opened/created. This method does
6081    /// not require any rights.
6082    ///
6083    /// Note that the final set of flags that apply to the connection may differ from those
6084    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
6085    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
6086    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
6087    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
6088    pub fn r#get_flags(
6089        &self,
6090    ) -> fidl::client::QueryResponseFut<
6091        NodeGetFlagsResult,
6092        fdomain_client::fidl::FDomainResourceDialect,
6093    > {
6094        FileProxyInterface::r#get_flags(self)
6095    }
6096
6097    /// Sets the flags that apply to this node after it has been opened. This method does not
6098    /// require any rights.
6099    ///
6100    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
6101    /// clear append mode.
6102    ///
6103    /// Errors:
6104    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
6105    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
6106    pub fn r#set_flags(
6107        &self,
6108        mut flags: Flags,
6109    ) -> fidl::client::QueryResponseFut<
6110        NodeSetFlagsResult,
6111        fdomain_client::fidl::FDomainResourceDialect,
6112    > {
6113        FileProxyInterface::r#set_flags(self, flags)
6114    }
6115
6116    /// Query the filesystem for details specific to the filesystem and/or volume. If the current
6117    /// volume has different settings or the storage is accounted seperately from the rest of the
6118    /// filesystem that may be reported instead of filesystem-wide details.
6119    pub fn r#query_filesystem(
6120        &self,
6121    ) -> fidl::client::QueryResponseFut<
6122        (i32, Option<Box<FilesystemInfo>>),
6123        fdomain_client::fidl::FDomainResourceDialect,
6124    > {
6125        FileProxyInterface::r#query_filesystem(self)
6126    }
6127
6128    /// Acquires information about the node.
6129    ///
6130    /// The attributes of a node should be stable, independent of the
6131    /// specific protocol used to access it.
6132    ///
6133    /// If a particular attribute is not applicable or not supported,
6134    /// filesystems should leave the corresponding field absent.
6135    ///
6136    /// + `query` a bit-mask specifying which attributes to fetch. The server
6137    ///   should not return more than necessary.
6138    /// - `attributes` the returned attributes.
6139    ///
6140    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
6141    pub fn r#get_attributes(
6142        &self,
6143        mut query: NodeAttributesQuery,
6144    ) -> fidl::client::QueryResponseFut<
6145        NodeGetAttributesResult,
6146        fdomain_client::fidl::FDomainResourceDialect,
6147    > {
6148        FileProxyInterface::r#get_attributes(self, query)
6149    }
6150
6151    /// Updates information about the node.
6152    ///
6153    /// + `attributes` the presence of a table field in `attributes` indicates
6154    /// the intent to update the corresponding attribute.
6155    ///
6156    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
6157    ///
6158    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
6159    pub fn r#update_attributes(
6160        &self,
6161        mut payload: &MutableNodeAttributes,
6162    ) -> fidl::client::QueryResponseFut<
6163        NodeUpdateAttributesResult,
6164        fdomain_client::fidl::FDomainResourceDialect,
6165    > {
6166        FileProxyInterface::r#update_attributes(self, payload)
6167    }
6168
6169    /// Synchronizes updates to the node to the underlying media, if it exists.
6170    ///
6171    /// This method will return when the filesystem server has flushed the
6172    /// relevant updates to the underlying media, but does not guarantee the
6173    /// underlying media has persisted the information, nor that any information
6174    /// is committed to hardware. Clients may use `Sync` to ensure ordering
6175    /// between operations.
6176    ///
6177    /// This method does not require any rights.
6178    pub fn r#sync(
6179        &self,
6180    ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
6181    {
6182        FileProxyInterface::r#sync(self)
6183    }
6184
6185    /// Creates an iterator over all the extended attribute names associated
6186    /// with this node. If an error occurs it is returned as an epitaph on the
6187    /// iterator request channel, and then the channel is closed.
6188    ///
6189    /// GetExtendedAttributes can be used with any of these names to retrieve
6190    /// the associated value.
6191    ///
6192    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
6193    pub fn r#list_extended_attributes(
6194        &self,
6195        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6196    ) -> Result<(), fidl::Error> {
6197        FileProxyInterface::r#list_extended_attributes(self, iterator)
6198    }
6199
6200    /// Get the value associated with the given attribute `name` for this node.
6201    ///
6202    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
6203    /// particular structure is imposed on them.
6204    ///
6205    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
6206    pub fn r#get_extended_attribute(
6207        &self,
6208        mut name: &[u8],
6209    ) -> fidl::client::QueryResponseFut<
6210        NodeGetExtendedAttributeResult,
6211        fdomain_client::fidl::FDomainResourceDialect,
6212    > {
6213        FileProxyInterface::r#get_extended_attribute(self, name)
6214    }
6215
6216    /// Set the value for the given attribute `name` to `value` for this node.
6217    ///
6218    /// The attribute name may exist, in which case the attribute is updated.
6219    /// If the attribute doesn't exist, it is created. The name should have no
6220    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
6221    ///
6222    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
6223    pub fn r#set_extended_attribute(
6224        &self,
6225        mut name: &[u8],
6226        mut value: ExtendedAttributeValue,
6227        mut mode: SetExtendedAttributeMode,
6228    ) -> fidl::client::QueryResponseFut<
6229        NodeSetExtendedAttributeResult,
6230        fdomain_client::fidl::FDomainResourceDialect,
6231    > {
6232        FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
6233    }
6234
6235    /// Remove the specified extended attribute.
6236    ///
6237    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
6238    ///
6239    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
6240    pub fn r#remove_extended_attribute(
6241        &self,
6242        mut name: &[u8],
6243    ) -> fidl::client::QueryResponseFut<
6244        NodeRemoveExtendedAttributeResult,
6245        fdomain_client::fidl::FDomainResourceDialect,
6246    > {
6247        FileProxyInterface::r#remove_extended_attribute(self, name)
6248    }
6249
6250    /// Reads up to 'count' bytes at the seek offset.
6251    /// The seek offset is moved forward by the number of bytes read.
6252    ///
6253    /// ## Invariants
6254    ///
6255    /// * The returned `data.length` will never be greater than `count`.
6256    /// * If `data.length` is less than `count`, it means that the seek offset
6257    ///   has reached the end of file as part of this operation.
6258    /// * If `data.length` is zero while `count` is not, it means that the
6259    ///   seek offset is already at or beyond the end of file, and no data could
6260    ///   be read.
6261    /// * If `count` is zero, the server should perform all the checks ensuring
6262    ///   read access without actually read anything, and return an empty
6263    ///   `data` vector.
6264    ///
6265    /// This method requires the [`Rights.READ_BYTES`] right.
6266    ///
6267    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
6268    pub fn r#read(
6269        &self,
6270        mut count: u64,
6271    ) -> fidl::client::QueryResponseFut<
6272        ReadableReadResult,
6273        fdomain_client::fidl::FDomainResourceDialect,
6274    > {
6275        FileProxyInterface::r#read(self, count)
6276    }
6277
6278    /// Writes data at the seek offset.
6279    /// The seek offset is moved forward by the number of bytes written.
6280    /// If the file is in append mode, the seek offset is first set to the end
6281    /// of the file, followed by the write, in one atomic step.
6282    ///
6283    /// The file size may grow if the seek offset plus `data.length` is beyond
6284    /// the current end of file.
6285    ///
6286    /// + request `data` the byte buffer to write to the file.
6287    /// - response `actual_count` the number of bytes written.
6288    ///
6289    /// ## Invariants
6290    ///
6291    /// * The returned `actual_count` will never be greater than `data.length`.
6292    /// * If the server is unable to write all the data due to e.g. not enough
6293    ///   space, `actual_count` may be less than `data.length`.  If no bytes
6294    ///   could be written, an error is returned.
6295    /// * If `data.length` is zero, the server should perform all the checks
6296    ///   ensuring write access without mutating the file and return a
6297    ///   successful write of zero bytes.  The seek offset is still updated if
6298    ///   in append mode.
6299    ///
6300    /// This method requires the [`Rights.WRITE_BYTES`] right.
6301    pub fn r#write(
6302        &self,
6303        mut data: &[u8],
6304    ) -> fidl::client::QueryResponseFut<
6305        WritableWriteResult,
6306        fdomain_client::fidl::FDomainResourceDialect,
6307    > {
6308        FileProxyInterface::r#write(self, data)
6309    }
6310
6311    pub fn r#describe(
6312        &self,
6313    ) -> fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
6314    {
6315        FileProxyInterface::r#describe(self)
6316    }
6317
6318    /// Moves the offset at which the next invocation of [`Read`] or [`Write`]
6319    /// will occur. The seek offset is specific to each file connection.
6320    ///
6321    /// + request `origin` the reference point where `offset` will be based on.
6322    /// + request `offset` the number of bytes to seek.
6323    /// - response `offset_from_start` the adjusted seek offset, from the start
6324    ///   of the file.
6325    ///
6326    /// This method does not require any rights.
6327    pub fn r#seek(
6328        &self,
6329        mut origin: SeekOrigin,
6330        mut offset: i64,
6331    ) -> fidl::client::QueryResponseFut<FileSeekResult, fdomain_client::fidl::FDomainResourceDialect>
6332    {
6333        FileProxyInterface::r#seek(self, origin, offset)
6334    }
6335
6336    /// Reads up to 'count' bytes at the provided offset.
6337    /// Does not affect the seek offset.
6338    ///
6339    /// ## Invariants
6340    ///
6341    /// * The returned `data.length` will never be greater than `count`.
6342    /// * If `data.length` is less than `count`, it means that `ReadAt` has hit
6343    ///   the end of file as part of this operation.
6344    /// * If `data.length` is zero while `count` is not, it means that `offset`
6345    ///   is at or past the end of file, and no data can be read.
6346    /// * If `count` is zero, the server should perform all the checks ensuring
6347    ///   read access without actually reading anything, and return an empty
6348    ///   `data` vector.
6349    ///
6350    /// This method requires the [`Rights.READ_BYTES`] right.
6351    ///
6352    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
6353    pub fn r#read_at(
6354        &self,
6355        mut count: u64,
6356        mut offset: u64,
6357    ) -> fidl::client::QueryResponseFut<
6358        FileReadAtResult,
6359        fdomain_client::fidl::FDomainResourceDialect,
6360    > {
6361        FileProxyInterface::r#read_at(self, count, offset)
6362    }
6363
6364    /// Writes data at the provided offset.
6365    /// Does not affect the seek offset.
6366    ///
6367    /// The file size may grow if `offset` plus `data.length` is past the
6368    /// current end of file.
6369    ///
6370    /// + request `data` the byte buffer to write to the file.
6371    /// + request `offset` the offset from start of the file to begin writing.
6372    /// - response `actual_count` the number of bytes written.
6373    ///
6374    /// ## Invariants
6375    ///
6376    /// * The returned `actual_count` will never be greater than `data.length`.
6377    /// * If the server is unable to write all the data due to e.g. not enough
6378    ///   space, `actual_count` may be less than `data.length`.  If no bytes
6379    ///   could be written, an error is returned.
6380    /// * If `data.length` is zero, the server should perform all the checks
6381    ///   ensuring write access without mutating the file, and will return a
6382    ///   successful write of zero bytes.
6383    ///
6384    /// This method requires the [`Rights.WRITE_BYTES`] right.
6385    pub fn r#write_at(
6386        &self,
6387        mut data: &[u8],
6388        mut offset: u64,
6389    ) -> fidl::client::QueryResponseFut<
6390        FileWriteAtResult,
6391        fdomain_client::fidl::FDomainResourceDialect,
6392    > {
6393        FileProxyInterface::r#write_at(self, data, offset)
6394    }
6395
6396    /// Shrinks or grows the file size to 'length' bytes.
6397    ///
6398    /// If file size is reduced by this operation, the extra trailing data'
6399    /// is discarded.
6400    /// If file size is increased by this operation, the extended area appears
6401    /// as if it was zeroed.
6402    ///
6403    /// This method requires the [`Rights.WRITE_BYTES`] right.
6404    pub fn r#resize(
6405        &self,
6406        mut length: u64,
6407    ) -> fidl::client::QueryResponseFut<
6408        FileResizeResult,
6409        fdomain_client::fidl::FDomainResourceDialect,
6410    > {
6411        FileProxyInterface::r#resize(self, length)
6412    }
6413
6414    /// Acquires a [`zx.Handle:VMO`] representing this file, if there is one,
6415    /// with the requested access rights.
6416    ///
6417    /// Implementations are not required to implement files backed by VMOs so
6418    /// this request may fail. Additionally, implementations may only support
6419    /// a certain subset of the flags. Clients should be prepared with fallback
6420    /// behavior if this request fails.
6421    ///
6422    /// If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the
6423    /// implementation is free to choose the semantics of the returned VMO.
6424    ///
6425    /// + request `flags` a [`VmoFlags`] indicating the desired mode of access.
6426    /// - response `vmo` the requested [`zx.Handle:VMO`].
6427    /// * error a [`zx.Status`] value indicating the failure.
6428    ///
6429    /// This method requires the following rights:
6430    ///
6431    /// * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].
6432    /// * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].
6433    /// * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].
6434    pub fn r#get_backing_memory(
6435        &self,
6436        mut flags: VmoFlags,
6437    ) -> fidl::client::QueryResponseFut<
6438        FileGetBackingMemoryResult,
6439        fdomain_client::fidl::FDomainResourceDialect,
6440    > {
6441        FileProxyInterface::r#get_backing_memory(self, flags)
6442    }
6443
6444    /// Pre-allocate on-disk space for this file.
6445    pub fn r#allocate(
6446        &self,
6447        mut offset: u64,
6448        mut length: u64,
6449        mut mode: AllocateMode,
6450    ) -> fidl::client::QueryResponseFut<
6451        FileAllocateResult,
6452        fdomain_client::fidl::FDomainResourceDialect,
6453    > {
6454        FileProxyInterface::r#allocate(self, offset, length, mode)
6455    }
6456
6457    /// Enables verification for the file (permanently) which involves computing a merkle tree for
6458    /// the file. Forces a flush prior to building the merkle tree to ensure cached data is
6459    /// captured. Future reads will be verified against the computed merkle tree and writes will be
6460    /// rejected. This method can take some time to complete as it depends on the size of the file.
6461    /// This method can be aborted by closing the connection that this method was issued on.
6462    ///
6463    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
6464    /// Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.
6465    /// Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.
6466    /// Also returns any error that might arise from reading the file, or from flushing the file,
6467    /// such as `ZX_ERR_IO`.
6468    pub fn r#enable_verity(
6469        &self,
6470        mut options: &VerificationOptions,
6471    ) -> fidl::client::QueryResponseFut<
6472        FileEnableVerityResult,
6473        fdomain_client::fidl::FDomainResourceDialect,
6474    > {
6475        FileProxyInterface::r#enable_verity(self, options)
6476    }
6477}
6478
6479impl FileProxyInterface for FileProxy {
6480    type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
6481        AdvisoryLockingAdvisoryLockResult,
6482        fdomain_client::fidl::FDomainResourceDialect,
6483    >;
6484    fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
6485        fn _decode(
6486            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6487        ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
6488            let _response = fidl::client::decode_transaction_body::<
6489                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6490                fdomain_client::fidl::FDomainResourceDialect,
6491                0x6ee9c0ad53ec87aa,
6492            >(_buf?)?;
6493            Ok(_response.map(|x| x))
6494        }
6495        self.client.send_query_and_decode::<
6496            AdvisoryLockingAdvisoryLockRequest,
6497            AdvisoryLockingAdvisoryLockResult,
6498        >(
6499            (request,),
6500            0x6ee9c0ad53ec87aa,
6501            fidl::encoding::DynamicFlags::empty(),
6502            _decode,
6503        )
6504    }
6505
6506    type LinkIntoResponseFut = fidl::client::QueryResponseFut<
6507        LinkableLinkIntoResult,
6508        fdomain_client::fidl::FDomainResourceDialect,
6509    >;
6510    fn r#link_into(
6511        &self,
6512        mut dst_parent_token: fdomain_client::Event,
6513        mut dst: &str,
6514    ) -> Self::LinkIntoResponseFut {
6515        fn _decode(
6516            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6517        ) -> Result<LinkableLinkIntoResult, fidl::Error> {
6518            let _response = fidl::client::decode_transaction_body::<
6519                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6520                fdomain_client::fidl::FDomainResourceDialect,
6521                0x54f3949246a03e74,
6522            >(_buf?)?;
6523            Ok(_response.map(|x| x))
6524        }
6525        self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
6526            (dst_parent_token, dst),
6527            0x54f3949246a03e74,
6528            fidl::encoding::DynamicFlags::empty(),
6529            _decode,
6530        )
6531    }
6532
6533    fn r#clone(
6534        &self,
6535        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
6536    ) -> Result<(), fidl::Error> {
6537        self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
6538            (request,),
6539            0x20d8a7aba2168a79,
6540            fidl::encoding::DynamicFlags::empty(),
6541        )
6542    }
6543
6544    type CloseResponseFut = fidl::client::QueryResponseFut<
6545        fdomain_fuchsia_unknown::CloseableCloseResult,
6546        fdomain_client::fidl::FDomainResourceDialect,
6547    >;
6548    fn r#close(&self) -> Self::CloseResponseFut {
6549        fn _decode(
6550            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6551        ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
6552            let _response = fidl::client::decode_transaction_body::<
6553                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6554                fdomain_client::fidl::FDomainResourceDialect,
6555                0x5ac5d459ad7f657e,
6556            >(_buf?)?;
6557            Ok(_response.map(|x| x))
6558        }
6559        self.client.send_query_and_decode::<
6560            fidl::encoding::EmptyPayload,
6561            fdomain_fuchsia_unknown::CloseableCloseResult,
6562        >(
6563            (),
6564            0x5ac5d459ad7f657e,
6565            fidl::encoding::DynamicFlags::empty(),
6566            _decode,
6567        )
6568    }
6569
6570    type QueryResponseFut =
6571        fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
6572    fn r#query(&self) -> Self::QueryResponseFut {
6573        fn _decode(
6574            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6575        ) -> Result<Vec<u8>, fidl::Error> {
6576            let _response = fidl::client::decode_transaction_body::<
6577                fdomain_fuchsia_unknown::QueryableQueryResponse,
6578                fdomain_client::fidl::FDomainResourceDialect,
6579                0x2658edee9decfc06,
6580            >(_buf?)?;
6581            Ok(_response.protocol)
6582        }
6583        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
6584            (),
6585            0x2658edee9decfc06,
6586            fidl::encoding::DynamicFlags::empty(),
6587            _decode,
6588        )
6589    }
6590
6591    fn r#deprecated_clone(
6592        &self,
6593        mut flags: OpenFlags,
6594        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
6595    ) -> Result<(), fidl::Error> {
6596        self.client.send::<NodeDeprecatedCloneRequest>(
6597            (flags, object),
6598            0x5a61678f293ce16f,
6599            fidl::encoding::DynamicFlags::FLEXIBLE,
6600        )
6601    }
6602
6603    type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
6604        (i32, NodeAttributes),
6605        fdomain_client::fidl::FDomainResourceDialect,
6606    >;
6607    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
6608        fn _decode(
6609            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6610        ) -> Result<(i32, NodeAttributes), fidl::Error> {
6611            let _response = fidl::client::decode_transaction_body::<
6612                NodeDeprecatedGetAttrResponse,
6613                fdomain_client::fidl::FDomainResourceDialect,
6614                0x78985e216314dafd,
6615            >(_buf?)?;
6616            Ok((_response.s, _response.attributes))
6617        }
6618        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
6619            (),
6620            0x78985e216314dafd,
6621            fidl::encoding::DynamicFlags::empty(),
6622            _decode,
6623        )
6624    }
6625
6626    type DeprecatedSetAttrResponseFut =
6627        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6628    fn r#deprecated_set_attr(
6629        &self,
6630        mut flags: NodeAttributeFlags,
6631        mut attributes: &NodeAttributes,
6632    ) -> Self::DeprecatedSetAttrResponseFut {
6633        fn _decode(
6634            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6635        ) -> Result<i32, fidl::Error> {
6636            let _response = fidl::client::decode_transaction_body::<
6637                NodeDeprecatedSetAttrResponse,
6638                fdomain_client::fidl::FDomainResourceDialect,
6639                0x4186c0f40d938f46,
6640            >(_buf?)?;
6641            Ok(_response.s)
6642        }
6643        self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
6644            (flags, attributes),
6645            0x4186c0f40d938f46,
6646            fidl::encoding::DynamicFlags::empty(),
6647            _decode,
6648        )
6649    }
6650
6651    type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
6652        (i32, OpenFlags),
6653        fdomain_client::fidl::FDomainResourceDialect,
6654    >;
6655    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
6656        fn _decode(
6657            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6658        ) -> Result<(i32, OpenFlags), fidl::Error> {
6659            let _response = fidl::client::decode_transaction_body::<
6660                NodeDeprecatedGetFlagsResponse,
6661                fdomain_client::fidl::FDomainResourceDialect,
6662                0x5b88fffb8eda3aa1,
6663            >(_buf?)?;
6664            Ok((_response.s, _response.flags))
6665        }
6666        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
6667            (),
6668            0x5b88fffb8eda3aa1,
6669            fidl::encoding::DynamicFlags::empty(),
6670            _decode,
6671        )
6672    }
6673
6674    type DeprecatedSetFlagsResponseFut =
6675        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
6676    fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
6677        fn _decode(
6678            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6679        ) -> Result<i32, fidl::Error> {
6680            let _response = fidl::client::decode_transaction_body::<
6681                NodeDeprecatedSetFlagsResponse,
6682                fdomain_client::fidl::FDomainResourceDialect,
6683                0x5295b76c71fde733,
6684            >(_buf?)?;
6685            Ok(_response.s)
6686        }
6687        self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
6688            (flags,),
6689            0x5295b76c71fde733,
6690            fidl::encoding::DynamicFlags::empty(),
6691            _decode,
6692        )
6693    }
6694
6695    type GetFlagsResponseFut = fidl::client::QueryResponseFut<
6696        NodeGetFlagsResult,
6697        fdomain_client::fidl::FDomainResourceDialect,
6698    >;
6699    fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
6700        fn _decode(
6701            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6702        ) -> Result<NodeGetFlagsResult, fidl::Error> {
6703            let _response = fidl::client::decode_transaction_body::<
6704                fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
6705                fdomain_client::fidl::FDomainResourceDialect,
6706                0x176eb318f64ec23,
6707            >(_buf?)?
6708            .into_result_fdomain::<FileMarker>("get_flags")?;
6709            Ok(_response.map(|x| x.flags))
6710        }
6711        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
6712            (),
6713            0x176eb318f64ec23,
6714            fidl::encoding::DynamicFlags::FLEXIBLE,
6715            _decode,
6716        )
6717    }
6718
6719    type SetFlagsResponseFut = fidl::client::QueryResponseFut<
6720        NodeSetFlagsResult,
6721        fdomain_client::fidl::FDomainResourceDialect,
6722    >;
6723    fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
6724        fn _decode(
6725            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6726        ) -> Result<NodeSetFlagsResult, fidl::Error> {
6727            let _response = fidl::client::decode_transaction_body::<
6728                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
6729                fdomain_client::fidl::FDomainResourceDialect,
6730                0x55a8028685791ea8,
6731            >(_buf?)?
6732            .into_result_fdomain::<FileMarker>("set_flags")?;
6733            Ok(_response.map(|x| x))
6734        }
6735        self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
6736            (flags,),
6737            0x55a8028685791ea8,
6738            fidl::encoding::DynamicFlags::FLEXIBLE,
6739            _decode,
6740        )
6741    }
6742
6743    type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
6744        (i32, Option<Box<FilesystemInfo>>),
6745        fdomain_client::fidl::FDomainResourceDialect,
6746    >;
6747    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
6748        fn _decode(
6749            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6750        ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
6751            let _response = fidl::client::decode_transaction_body::<
6752                NodeQueryFilesystemResponse,
6753                fdomain_client::fidl::FDomainResourceDialect,
6754                0x6f344a1c6b0a0610,
6755            >(_buf?)?;
6756            Ok((_response.s, _response.info))
6757        }
6758        self.client.send_query_and_decode::<
6759            fidl::encoding::EmptyPayload,
6760            (i32, Option<Box<FilesystemInfo>>),
6761        >(
6762            (),
6763            0x6f344a1c6b0a0610,
6764            fidl::encoding::DynamicFlags::empty(),
6765            _decode,
6766        )
6767    }
6768
6769    type GetAttributesResponseFut = fidl::client::QueryResponseFut<
6770        NodeGetAttributesResult,
6771        fdomain_client::fidl::FDomainResourceDialect,
6772    >;
6773    fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
6774        fn _decode(
6775            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6776        ) -> Result<NodeGetAttributesResult, fidl::Error> {
6777            let _response = fidl::client::decode_transaction_body::<
6778                fidl::encoding::ResultType<NodeAttributes2, i32>,
6779                fdomain_client::fidl::FDomainResourceDialect,
6780                0x3d4396a638ea053b,
6781            >(_buf?)?;
6782            Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
6783        }
6784        self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
6785            (query,),
6786            0x3d4396a638ea053b,
6787            fidl::encoding::DynamicFlags::empty(),
6788            _decode,
6789        )
6790    }
6791
6792    type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
6793        NodeUpdateAttributesResult,
6794        fdomain_client::fidl::FDomainResourceDialect,
6795    >;
6796    fn r#update_attributes(
6797        &self,
6798        mut payload: &MutableNodeAttributes,
6799    ) -> Self::UpdateAttributesResponseFut {
6800        fn _decode(
6801            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6802        ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
6803            let _response = fidl::client::decode_transaction_body::<
6804                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6805                fdomain_client::fidl::FDomainResourceDialect,
6806                0x3308c1da5a89bf08,
6807            >(_buf?)?;
6808            Ok(_response.map(|x| x))
6809        }
6810        self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
6811            payload,
6812            0x3308c1da5a89bf08,
6813            fidl::encoding::DynamicFlags::empty(),
6814            _decode,
6815        )
6816    }
6817
6818    type SyncResponseFut = fidl::client::QueryResponseFut<
6819        NodeSyncResult,
6820        fdomain_client::fidl::FDomainResourceDialect,
6821    >;
6822    fn r#sync(&self) -> Self::SyncResponseFut {
6823        fn _decode(
6824            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6825        ) -> Result<NodeSyncResult, fidl::Error> {
6826            let _response = fidl::client::decode_transaction_body::<
6827                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6828                fdomain_client::fidl::FDomainResourceDialect,
6829                0x2c5c27ca0ab5dc49,
6830            >(_buf?)?;
6831            Ok(_response.map(|x| x))
6832        }
6833        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
6834            (),
6835            0x2c5c27ca0ab5dc49,
6836            fidl::encoding::DynamicFlags::empty(),
6837            _decode,
6838        )
6839    }
6840
6841    fn r#list_extended_attributes(
6842        &self,
6843        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
6844    ) -> Result<(), fidl::Error> {
6845        self.client.send::<NodeListExtendedAttributesRequest>(
6846            (iterator,),
6847            0x4b61033de007fcd0,
6848            fidl::encoding::DynamicFlags::empty(),
6849        )
6850    }
6851
6852    type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6853        NodeGetExtendedAttributeResult,
6854        fdomain_client::fidl::FDomainResourceDialect,
6855    >;
6856    fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
6857        fn _decode(
6858            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6859        ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
6860            let _response = fidl::client::decode_transaction_body::<
6861                fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
6862                fdomain_client::fidl::FDomainResourceDialect,
6863                0x45ffa3ccfdeb76db,
6864            >(_buf?)?;
6865            Ok(_response.map(|x| x))
6866        }
6867        self.client.send_query_and_decode::<
6868            NodeGetExtendedAttributeRequest,
6869            NodeGetExtendedAttributeResult,
6870        >(
6871            (name,),
6872            0x45ffa3ccfdeb76db,
6873            fidl::encoding::DynamicFlags::empty(),
6874            _decode,
6875        )
6876    }
6877
6878    type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6879        NodeSetExtendedAttributeResult,
6880        fdomain_client::fidl::FDomainResourceDialect,
6881    >;
6882    fn r#set_extended_attribute(
6883        &self,
6884        mut name: &[u8],
6885        mut value: ExtendedAttributeValue,
6886        mut mode: SetExtendedAttributeMode,
6887    ) -> Self::SetExtendedAttributeResponseFut {
6888        fn _decode(
6889            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6890        ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
6891            let _response = fidl::client::decode_transaction_body::<
6892                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6893                fdomain_client::fidl::FDomainResourceDialect,
6894                0x4a951362f681f23c,
6895            >(_buf?)?;
6896            Ok(_response.map(|x| x))
6897        }
6898        self.client.send_query_and_decode::<
6899            NodeSetExtendedAttributeRequest,
6900            NodeSetExtendedAttributeResult,
6901        >(
6902            (name, &mut value, mode,),
6903            0x4a951362f681f23c,
6904            fidl::encoding::DynamicFlags::empty(),
6905            _decode,
6906        )
6907    }
6908
6909    type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
6910        NodeRemoveExtendedAttributeResult,
6911        fdomain_client::fidl::FDomainResourceDialect,
6912    >;
6913    fn r#remove_extended_attribute(
6914        &self,
6915        mut name: &[u8],
6916    ) -> Self::RemoveExtendedAttributeResponseFut {
6917        fn _decode(
6918            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6919        ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
6920            let _response = fidl::client::decode_transaction_body::<
6921                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
6922                fdomain_client::fidl::FDomainResourceDialect,
6923                0x7a0b9f3a9bf9032d,
6924            >(_buf?)?;
6925            Ok(_response.map(|x| x))
6926        }
6927        self.client.send_query_and_decode::<
6928            NodeRemoveExtendedAttributeRequest,
6929            NodeRemoveExtendedAttributeResult,
6930        >(
6931            (name,),
6932            0x7a0b9f3a9bf9032d,
6933            fidl::encoding::DynamicFlags::empty(),
6934            _decode,
6935        )
6936    }
6937
6938    type ReadResponseFut = fidl::client::QueryResponseFut<
6939        ReadableReadResult,
6940        fdomain_client::fidl::FDomainResourceDialect,
6941    >;
6942    fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
6943        fn _decode(
6944            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6945        ) -> Result<ReadableReadResult, fidl::Error> {
6946            let _response = fidl::client::decode_transaction_body::<
6947                fidl::encoding::ResultType<ReadableReadResponse, i32>,
6948                fdomain_client::fidl::FDomainResourceDialect,
6949                0x57e419a298c8ede,
6950            >(_buf?)?;
6951            Ok(_response.map(|x| x.data))
6952        }
6953        self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
6954            (count,),
6955            0x57e419a298c8ede,
6956            fidl::encoding::DynamicFlags::empty(),
6957            _decode,
6958        )
6959    }
6960
6961    type WriteResponseFut = fidl::client::QueryResponseFut<
6962        WritableWriteResult,
6963        fdomain_client::fidl::FDomainResourceDialect,
6964    >;
6965    fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
6966        fn _decode(
6967            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6968        ) -> Result<WritableWriteResult, fidl::Error> {
6969            let _response = fidl::client::decode_transaction_body::<
6970                fidl::encoding::ResultType<WritableWriteResponse, i32>,
6971                fdomain_client::fidl::FDomainResourceDialect,
6972                0x6a31437832469f82,
6973            >(_buf?)?;
6974            Ok(_response.map(|x| x.actual_count))
6975        }
6976        self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
6977            (data,),
6978            0x6a31437832469f82,
6979            fidl::encoding::DynamicFlags::empty(),
6980            _decode,
6981        )
6982    }
6983
6984    type DescribeResponseFut =
6985        fidl::client::QueryResponseFut<FileInfo, fdomain_client::fidl::FDomainResourceDialect>;
6986    fn r#describe(&self) -> Self::DescribeResponseFut {
6987        fn _decode(
6988            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6989        ) -> Result<FileInfo, fidl::Error> {
6990            let _response = fidl::client::decode_transaction_body::<
6991                FileInfo,
6992                fdomain_client::fidl::FDomainResourceDialect,
6993                0x68b5ac00c62906bc,
6994            >(_buf?)?;
6995            Ok(_response)
6996        }
6997        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
6998            (),
6999            0x68b5ac00c62906bc,
7000            fidl::encoding::DynamicFlags::empty(),
7001            _decode,
7002        )
7003    }
7004
7005    type SeekResponseFut = fidl::client::QueryResponseFut<
7006        FileSeekResult,
7007        fdomain_client::fidl::FDomainResourceDialect,
7008    >;
7009    fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
7010        fn _decode(
7011            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7012        ) -> Result<FileSeekResult, fidl::Error> {
7013            let _response = fidl::client::decode_transaction_body::<
7014                fidl::encoding::ResultType<FileSeekResponse, i32>,
7015                fdomain_client::fidl::FDomainResourceDialect,
7016                0x78079168162c5207,
7017            >(_buf?)?;
7018            Ok(_response.map(|x| x.offset_from_start))
7019        }
7020        self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
7021            (origin, offset),
7022            0x78079168162c5207,
7023            fidl::encoding::DynamicFlags::empty(),
7024            _decode,
7025        )
7026    }
7027
7028    type ReadAtResponseFut = fidl::client::QueryResponseFut<
7029        FileReadAtResult,
7030        fdomain_client::fidl::FDomainResourceDialect,
7031    >;
7032    fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
7033        fn _decode(
7034            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7035        ) -> Result<FileReadAtResult, fidl::Error> {
7036            let _response = fidl::client::decode_transaction_body::<
7037                fidl::encoding::ResultType<FileReadAtResponse, i32>,
7038                fdomain_client::fidl::FDomainResourceDialect,
7039                0x1607a293a60d723e,
7040            >(_buf?)?;
7041            Ok(_response.map(|x| x.data))
7042        }
7043        self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
7044            (count, offset),
7045            0x1607a293a60d723e,
7046            fidl::encoding::DynamicFlags::empty(),
7047            _decode,
7048        )
7049    }
7050
7051    type WriteAtResponseFut = fidl::client::QueryResponseFut<
7052        FileWriteAtResult,
7053        fdomain_client::fidl::FDomainResourceDialect,
7054    >;
7055    fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
7056        fn _decode(
7057            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7058        ) -> Result<FileWriteAtResult, fidl::Error> {
7059            let _response = fidl::client::decode_transaction_body::<
7060                fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7061                fdomain_client::fidl::FDomainResourceDialect,
7062                0x793eefc0045e792b,
7063            >(_buf?)?;
7064            Ok(_response.map(|x| x.actual_count))
7065        }
7066        self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
7067            (data, offset),
7068            0x793eefc0045e792b,
7069            fidl::encoding::DynamicFlags::empty(),
7070            _decode,
7071        )
7072    }
7073
7074    type ResizeResponseFut = fidl::client::QueryResponseFut<
7075        FileResizeResult,
7076        fdomain_client::fidl::FDomainResourceDialect,
7077    >;
7078    fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
7079        fn _decode(
7080            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7081        ) -> Result<FileResizeResult, fidl::Error> {
7082            let _response = fidl::client::decode_transaction_body::<
7083                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7084                fdomain_client::fidl::FDomainResourceDialect,
7085                0x2b80825f0535743a,
7086            >(_buf?)?;
7087            Ok(_response.map(|x| x))
7088        }
7089        self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
7090            (length,),
7091            0x2b80825f0535743a,
7092            fidl::encoding::DynamicFlags::empty(),
7093            _decode,
7094        )
7095    }
7096
7097    type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
7098        FileGetBackingMemoryResult,
7099        fdomain_client::fidl::FDomainResourceDialect,
7100    >;
7101    fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
7102        fn _decode(
7103            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7104        ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7105            let _response = fidl::client::decode_transaction_body::<
7106                fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7107                fdomain_client::fidl::FDomainResourceDialect,
7108                0xa6a9e654cbf62b,
7109            >(_buf?)?;
7110            Ok(_response.map(|x| x.vmo))
7111        }
7112        self.client
7113            .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
7114                (flags,),
7115                0xa6a9e654cbf62b,
7116                fidl::encoding::DynamicFlags::empty(),
7117                _decode,
7118            )
7119    }
7120
7121    type AllocateResponseFut = fidl::client::QueryResponseFut<
7122        FileAllocateResult,
7123        fdomain_client::fidl::FDomainResourceDialect,
7124    >;
7125    fn r#allocate(
7126        &self,
7127        mut offset: u64,
7128        mut length: u64,
7129        mut mode: AllocateMode,
7130    ) -> Self::AllocateResponseFut {
7131        fn _decode(
7132            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7133        ) -> Result<FileAllocateResult, fidl::Error> {
7134            let _response = fidl::client::decode_transaction_body::<
7135                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7136                fdomain_client::fidl::FDomainResourceDialect,
7137                0x77fa0c330b57fd2e,
7138            >(_buf?)?
7139            .into_result_fdomain::<FileMarker>("allocate")?;
7140            Ok(_response.map(|x| x))
7141        }
7142        self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
7143            (offset, length, mode),
7144            0x77fa0c330b57fd2e,
7145            fidl::encoding::DynamicFlags::FLEXIBLE,
7146            _decode,
7147        )
7148    }
7149
7150    type EnableVerityResponseFut = fidl::client::QueryResponseFut<
7151        FileEnableVerityResult,
7152        fdomain_client::fidl::FDomainResourceDialect,
7153    >;
7154    fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
7155        fn _decode(
7156            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7157        ) -> Result<FileEnableVerityResult, fidl::Error> {
7158            let _response = fidl::client::decode_transaction_body::<
7159                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7160                fdomain_client::fidl::FDomainResourceDialect,
7161                0x2c421ec3faaeb8bb,
7162            >(_buf?)?
7163            .into_result_fdomain::<FileMarker>("enable_verity")?;
7164            Ok(_response.map(|x| x))
7165        }
7166        self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
7167            (options,),
7168            0x2c421ec3faaeb8bb,
7169            fidl::encoding::DynamicFlags::FLEXIBLE,
7170            _decode,
7171        )
7172    }
7173}
7174
7175pub struct FileEventStream {
7176    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
7177}
7178
7179impl std::marker::Unpin for FileEventStream {}
7180
7181impl futures::stream::FusedStream for FileEventStream {
7182    fn is_terminated(&self) -> bool {
7183        self.event_receiver.is_terminated()
7184    }
7185}
7186
7187impl futures::Stream for FileEventStream {
7188    type Item = Result<FileEvent, fidl::Error>;
7189
7190    fn poll_next(
7191        mut self: std::pin::Pin<&mut Self>,
7192        cx: &mut std::task::Context<'_>,
7193    ) -> std::task::Poll<Option<Self::Item>> {
7194        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7195            &mut self.event_receiver,
7196            cx
7197        )?) {
7198            Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
7199            None => std::task::Poll::Ready(None),
7200        }
7201    }
7202}
7203
7204#[derive(Debug)]
7205pub enum FileEvent {
7206    OnOpen_ {
7207        s: i32,
7208        info: Option<Box<NodeInfoDeprecated>>,
7209    },
7210    OnRepresentation {
7211        payload: Representation,
7212    },
7213    #[non_exhaustive]
7214    _UnknownEvent {
7215        /// Ordinal of the event that was sent.
7216        ordinal: u64,
7217    },
7218}
7219
7220impl FileEvent {
7221    #[allow(irrefutable_let_patterns)]
7222    pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
7223        if let FileEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
7224    }
7225    #[allow(irrefutable_let_patterns)]
7226    pub fn into_on_representation(self) -> Option<Representation> {
7227        if let FileEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
7228    }
7229
7230    /// Decodes a message buffer as a [`FileEvent`].
7231    fn decode(
7232        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7233    ) -> Result<FileEvent, fidl::Error> {
7234        let (bytes, _handles) = buf.split_mut();
7235        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7236        debug_assert_eq!(tx_header.tx_id, 0);
7237        match tx_header.ordinal {
7238            0x7fc7bbb1dbfd1972 => {
7239                let mut out = fidl::new_empty!(
7240                    NodeOnOpenRequest,
7241                    fdomain_client::fidl::FDomainResourceDialect
7242                );
7243                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
7244                Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
7245            }
7246            0x5cb40567d80a510c => {
7247                let mut out =
7248                    fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
7249                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
7250                Ok((FileEvent::OnRepresentation { payload: out }))
7251            }
7252            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
7253                Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
7254            }
7255            _ => Err(fidl::Error::UnknownOrdinal {
7256                ordinal: tx_header.ordinal,
7257                protocol_name: <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7258            }),
7259        }
7260    }
7261}
7262
7263/// A Stream of incoming requests for fuchsia.io/File.
7264pub struct FileRequestStream {
7265    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7266    is_terminated: bool,
7267}
7268
7269impl std::marker::Unpin for FileRequestStream {}
7270
7271impl futures::stream::FusedStream for FileRequestStream {
7272    fn is_terminated(&self) -> bool {
7273        self.is_terminated
7274    }
7275}
7276
7277impl fdomain_client::fidl::RequestStream for FileRequestStream {
7278    type Protocol = FileMarker;
7279    type ControlHandle = FileControlHandle;
7280
7281    fn from_channel(channel: fdomain_client::Channel) -> Self {
7282        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7283    }
7284
7285    fn control_handle(&self) -> Self::ControlHandle {
7286        FileControlHandle { inner: self.inner.clone() }
7287    }
7288
7289    fn into_inner(
7290        self,
7291    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
7292    {
7293        (self.inner, self.is_terminated)
7294    }
7295
7296    fn from_inner(
7297        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
7298        is_terminated: bool,
7299    ) -> Self {
7300        Self { inner, is_terminated }
7301    }
7302}
7303
7304impl futures::Stream for FileRequestStream {
7305    type Item = Result<FileRequest, fidl::Error>;
7306
7307    fn poll_next(
7308        mut self: std::pin::Pin<&mut Self>,
7309        cx: &mut std::task::Context<'_>,
7310    ) -> std::task::Poll<Option<Self::Item>> {
7311        let this = &mut *self;
7312        if this.inner.check_shutdown(cx) {
7313            this.is_terminated = true;
7314            return std::task::Poll::Ready(None);
7315        }
7316        if this.is_terminated {
7317            panic!("polled FileRequestStream after completion");
7318        }
7319        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
7320            |bytes, handles| {
7321                match this.inner.channel().read_etc(cx, bytes, handles) {
7322                    std::task::Poll::Ready(Ok(())) => {}
7323                    std::task::Poll::Pending => return std::task::Poll::Pending,
7324                    std::task::Poll::Ready(Err(None)) => {
7325                        this.is_terminated = true;
7326                        return std::task::Poll::Ready(None);
7327                    }
7328                    std::task::Poll::Ready(Err(Some(e))) => {
7329                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7330                            e.into(),
7331                        ))));
7332                    }
7333                }
7334
7335                // A message has been received from the channel
7336                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7337
7338                std::task::Poll::Ready(Some(match header.ordinal {
7339                    0x6ee9c0ad53ec87aa => {
7340                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7341                        let mut req = fidl::new_empty!(
7342                            AdvisoryLockingAdvisoryLockRequest,
7343                            fdomain_client::fidl::FDomainResourceDialect
7344                        );
7345                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
7346                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7347                        Ok(FileRequest::AdvisoryLock {
7348                            request: req.request,
7349
7350                            responder: FileAdvisoryLockResponder {
7351                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7352                                tx_id: header.tx_id,
7353                            },
7354                        })
7355                    }
7356                    0x54f3949246a03e74 => {
7357                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7358                        let mut req = fidl::new_empty!(
7359                            LinkableLinkIntoRequest,
7360                            fdomain_client::fidl::FDomainResourceDialect
7361                        );
7362                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
7363                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7364                        Ok(FileRequest::LinkInto {
7365                            dst_parent_token: req.dst_parent_token,
7366                            dst: req.dst,
7367
7368                            responder: FileLinkIntoResponder {
7369                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7370                                tx_id: header.tx_id,
7371                            },
7372                        })
7373                    }
7374                    0x20d8a7aba2168a79 => {
7375                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7376                        let mut req = fidl::new_empty!(
7377                            fdomain_fuchsia_unknown::CloneableCloneRequest,
7378                            fdomain_client::fidl::FDomainResourceDialect
7379                        );
7380                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7381                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7382                        Ok(FileRequest::Clone { request: req.request, control_handle })
7383                    }
7384                    0x5ac5d459ad7f657e => {
7385                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7386                        let mut req = fidl::new_empty!(
7387                            fidl::encoding::EmptyPayload,
7388                            fdomain_client::fidl::FDomainResourceDialect
7389                        );
7390                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7391                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7392                        Ok(FileRequest::Close {
7393                            responder: FileCloseResponder {
7394                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7395                                tx_id: header.tx_id,
7396                            },
7397                        })
7398                    }
7399                    0x2658edee9decfc06 => {
7400                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7401                        let mut req = fidl::new_empty!(
7402                            fidl::encoding::EmptyPayload,
7403                            fdomain_client::fidl::FDomainResourceDialect
7404                        );
7405                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7406                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7407                        Ok(FileRequest::Query {
7408                            responder: FileQueryResponder {
7409                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7410                                tx_id: header.tx_id,
7411                            },
7412                        })
7413                    }
7414                    0x5a61678f293ce16f => {
7415                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7416                        let mut req = fidl::new_empty!(
7417                            NodeDeprecatedCloneRequest,
7418                            fdomain_client::fidl::FDomainResourceDialect
7419                        );
7420                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
7421                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7422                        Ok(FileRequest::DeprecatedClone {
7423                            flags: req.flags,
7424                            object: req.object,
7425
7426                            control_handle,
7427                        })
7428                    }
7429                    0x78985e216314dafd => {
7430                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7431                        let mut req = fidl::new_empty!(
7432                            fidl::encoding::EmptyPayload,
7433                            fdomain_client::fidl::FDomainResourceDialect
7434                        );
7435                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7436                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7437                        Ok(FileRequest::DeprecatedGetAttr {
7438                            responder: FileDeprecatedGetAttrResponder {
7439                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7440                                tx_id: header.tx_id,
7441                            },
7442                        })
7443                    }
7444                    0x4186c0f40d938f46 => {
7445                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7446                        let mut req = fidl::new_empty!(
7447                            NodeDeprecatedSetAttrRequest,
7448                            fdomain_client::fidl::FDomainResourceDialect
7449                        );
7450                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
7451                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7452                        Ok(FileRequest::DeprecatedSetAttr {
7453                            flags: req.flags,
7454                            attributes: req.attributes,
7455
7456                            responder: FileDeprecatedSetAttrResponder {
7457                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7458                                tx_id: header.tx_id,
7459                            },
7460                        })
7461                    }
7462                    0x5b88fffb8eda3aa1 => {
7463                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7464                        let mut req = fidl::new_empty!(
7465                            fidl::encoding::EmptyPayload,
7466                            fdomain_client::fidl::FDomainResourceDialect
7467                        );
7468                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7469                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7470                        Ok(FileRequest::DeprecatedGetFlags {
7471                            responder: FileDeprecatedGetFlagsResponder {
7472                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7473                                tx_id: header.tx_id,
7474                            },
7475                        })
7476                    }
7477                    0x5295b76c71fde733 => {
7478                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7479                        let mut req = fidl::new_empty!(
7480                            NodeDeprecatedSetFlagsRequest,
7481                            fdomain_client::fidl::FDomainResourceDialect
7482                        );
7483                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7484                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7485                        Ok(FileRequest::DeprecatedSetFlags {
7486                            flags: req.flags,
7487
7488                            responder: FileDeprecatedSetFlagsResponder {
7489                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7490                                tx_id: header.tx_id,
7491                            },
7492                        })
7493                    }
7494                    0x176eb318f64ec23 => {
7495                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7496                        let mut req = fidl::new_empty!(
7497                            fidl::encoding::EmptyPayload,
7498                            fdomain_client::fidl::FDomainResourceDialect
7499                        );
7500                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7501                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7502                        Ok(FileRequest::GetFlags {
7503                            responder: FileGetFlagsResponder {
7504                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7505                                tx_id: header.tx_id,
7506                            },
7507                        })
7508                    }
7509                    0x55a8028685791ea8 => {
7510                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7511                        let mut req = fidl::new_empty!(
7512                            NodeSetFlagsRequest,
7513                            fdomain_client::fidl::FDomainResourceDialect
7514                        );
7515                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
7516                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7517                        Ok(FileRequest::SetFlags {
7518                            flags: req.flags,
7519
7520                            responder: FileSetFlagsResponder {
7521                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7522                                tx_id: header.tx_id,
7523                            },
7524                        })
7525                    }
7526                    0x6f344a1c6b0a0610 => {
7527                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7528                        let mut req = fidl::new_empty!(
7529                            fidl::encoding::EmptyPayload,
7530                            fdomain_client::fidl::FDomainResourceDialect
7531                        );
7532                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7533                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7534                        Ok(FileRequest::QueryFilesystem {
7535                            responder: FileQueryFilesystemResponder {
7536                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7537                                tx_id: header.tx_id,
7538                            },
7539                        })
7540                    }
7541                    0x3d4396a638ea053b => {
7542                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7543                        let mut req = fidl::new_empty!(
7544                            NodeGetAttributesRequest,
7545                            fdomain_client::fidl::FDomainResourceDialect
7546                        );
7547                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7548                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7549                        Ok(FileRequest::GetAttributes {
7550                            query: req.query,
7551
7552                            responder: FileGetAttributesResponder {
7553                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7554                                tx_id: header.tx_id,
7555                            },
7556                        })
7557                    }
7558                    0x3308c1da5a89bf08 => {
7559                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7560                        let mut req = fidl::new_empty!(
7561                            MutableNodeAttributes,
7562                            fdomain_client::fidl::FDomainResourceDialect
7563                        );
7564                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
7565                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7566                        Ok(FileRequest::UpdateAttributes {
7567                            payload: req,
7568                            responder: FileUpdateAttributesResponder {
7569                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7570                                tx_id: header.tx_id,
7571                            },
7572                        })
7573                    }
7574                    0x2c5c27ca0ab5dc49 => {
7575                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7576                        let mut req = fidl::new_empty!(
7577                            fidl::encoding::EmptyPayload,
7578                            fdomain_client::fidl::FDomainResourceDialect
7579                        );
7580                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7581                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7582                        Ok(FileRequest::Sync {
7583                            responder: FileSyncResponder {
7584                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7585                                tx_id: header.tx_id,
7586                            },
7587                        })
7588                    }
7589                    0x4b61033de007fcd0 => {
7590                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
7591                        let mut req = fidl::new_empty!(
7592                            NodeListExtendedAttributesRequest,
7593                            fdomain_client::fidl::FDomainResourceDialect
7594                        );
7595                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
7596                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7597                        Ok(FileRequest::ListExtendedAttributes {
7598                            iterator: req.iterator,
7599
7600                            control_handle,
7601                        })
7602                    }
7603                    0x45ffa3ccfdeb76db => {
7604                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7605                        let mut req = fidl::new_empty!(
7606                            NodeGetExtendedAttributeRequest,
7607                            fdomain_client::fidl::FDomainResourceDialect
7608                        );
7609                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7610                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7611                        Ok(FileRequest::GetExtendedAttribute {
7612                            name: req.name,
7613
7614                            responder: FileGetExtendedAttributeResponder {
7615                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7616                                tx_id: header.tx_id,
7617                            },
7618                        })
7619                    }
7620                    0x4a951362f681f23c => {
7621                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7622                        let mut req = fidl::new_empty!(
7623                            NodeSetExtendedAttributeRequest,
7624                            fdomain_client::fidl::FDomainResourceDialect
7625                        );
7626                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7627                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7628                        Ok(FileRequest::SetExtendedAttribute {
7629                            name: req.name,
7630                            value: req.value,
7631                            mode: req.mode,
7632
7633                            responder: FileSetExtendedAttributeResponder {
7634                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7635                                tx_id: header.tx_id,
7636                            },
7637                        })
7638                    }
7639                    0x7a0b9f3a9bf9032d => {
7640                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7641                        let mut req = fidl::new_empty!(
7642                            NodeRemoveExtendedAttributeRequest,
7643                            fdomain_client::fidl::FDomainResourceDialect
7644                        );
7645                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
7646                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7647                        Ok(FileRequest::RemoveExtendedAttribute {
7648                            name: req.name,
7649
7650                            responder: FileRemoveExtendedAttributeResponder {
7651                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7652                                tx_id: header.tx_id,
7653                            },
7654                        })
7655                    }
7656                    0x57e419a298c8ede => {
7657                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7658                        let mut req = fidl::new_empty!(
7659                            ReadableReadRequest,
7660                            fdomain_client::fidl::FDomainResourceDialect
7661                        );
7662                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
7663                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7664                        Ok(FileRequest::Read {
7665                            count: req.count,
7666
7667                            responder: FileReadResponder {
7668                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7669                                tx_id: header.tx_id,
7670                            },
7671                        })
7672                    }
7673                    0x6a31437832469f82 => {
7674                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7675                        let mut req = fidl::new_empty!(
7676                            WritableWriteRequest,
7677                            fdomain_client::fidl::FDomainResourceDialect
7678                        );
7679                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7680                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7681                        Ok(FileRequest::Write {
7682                            data: req.data,
7683
7684                            responder: FileWriteResponder {
7685                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7686                                tx_id: header.tx_id,
7687                            },
7688                        })
7689                    }
7690                    0x68b5ac00c62906bc => {
7691                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7692                        let mut req = fidl::new_empty!(
7693                            fidl::encoding::EmptyPayload,
7694                            fdomain_client::fidl::FDomainResourceDialect
7695                        );
7696                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7697                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7698                        Ok(FileRequest::Describe {
7699                            responder: FileDescribeResponder {
7700                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7701                                tx_id: header.tx_id,
7702                            },
7703                        })
7704                    }
7705                    0x78079168162c5207 => {
7706                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7707                        let mut req = fidl::new_empty!(
7708                            FileSeekRequest,
7709                            fdomain_client::fidl::FDomainResourceDialect
7710                        );
7711                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
7712                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7713                        Ok(FileRequest::Seek {
7714                            origin: req.origin,
7715                            offset: req.offset,
7716
7717                            responder: FileSeekResponder {
7718                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7719                                tx_id: header.tx_id,
7720                            },
7721                        })
7722                    }
7723                    0x1607a293a60d723e => {
7724                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7725                        let mut req = fidl::new_empty!(
7726                            FileReadAtRequest,
7727                            fdomain_client::fidl::FDomainResourceDialect
7728                        );
7729                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
7730                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7731                        Ok(FileRequest::ReadAt {
7732                            count: req.count,
7733                            offset: req.offset,
7734
7735                            responder: FileReadAtResponder {
7736                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7737                                tx_id: header.tx_id,
7738                            },
7739                        })
7740                    }
7741                    0x793eefc0045e792b => {
7742                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7743                        let mut req = fidl::new_empty!(
7744                            FileWriteAtRequest,
7745                            fdomain_client::fidl::FDomainResourceDialect
7746                        );
7747                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
7748                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7749                        Ok(FileRequest::WriteAt {
7750                            data: req.data,
7751                            offset: req.offset,
7752
7753                            responder: FileWriteAtResponder {
7754                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7755                                tx_id: header.tx_id,
7756                            },
7757                        })
7758                    }
7759                    0x2b80825f0535743a => {
7760                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7761                        let mut req = fidl::new_empty!(
7762                            FileResizeRequest,
7763                            fdomain_client::fidl::FDomainResourceDialect
7764                        );
7765                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
7766                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7767                        Ok(FileRequest::Resize {
7768                            length: req.length,
7769
7770                            responder: FileResizeResponder {
7771                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7772                                tx_id: header.tx_id,
7773                            },
7774                        })
7775                    }
7776                    0xa6a9e654cbf62b => {
7777                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7778                        let mut req = fidl::new_empty!(
7779                            FileGetBackingMemoryRequest,
7780                            fdomain_client::fidl::FDomainResourceDialect
7781                        );
7782                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
7783                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7784                        Ok(FileRequest::GetBackingMemory {
7785                            flags: req.flags,
7786
7787                            responder: FileGetBackingMemoryResponder {
7788                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7789                                tx_id: header.tx_id,
7790                            },
7791                        })
7792                    }
7793                    0x77fa0c330b57fd2e => {
7794                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7795                        let mut req = fidl::new_empty!(
7796                            FileAllocateRequest,
7797                            fdomain_client::fidl::FDomainResourceDialect
7798                        );
7799                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
7800                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7801                        Ok(FileRequest::Allocate {
7802                            offset: req.offset,
7803                            length: req.length,
7804                            mode: req.mode,
7805
7806                            responder: FileAllocateResponder {
7807                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7808                                tx_id: header.tx_id,
7809                            },
7810                        })
7811                    }
7812                    0x2c421ec3faaeb8bb => {
7813                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7814                        let mut req = fidl::new_empty!(
7815                            FileEnableVerityRequest,
7816                            fdomain_client::fidl::FDomainResourceDialect
7817                        );
7818                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
7819                        let control_handle = FileControlHandle { inner: this.inner.clone() };
7820                        Ok(FileRequest::EnableVerity {
7821                            options: req.options,
7822
7823                            responder: FileEnableVerityResponder {
7824                                control_handle: std::mem::ManuallyDrop::new(control_handle),
7825                                tx_id: header.tx_id,
7826                            },
7827                        })
7828                    }
7829                    _ if header.tx_id == 0
7830                        && header
7831                            .dynamic_flags()
7832                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7833                    {
7834                        Ok(FileRequest::_UnknownMethod {
7835                            ordinal: header.ordinal,
7836                            control_handle: FileControlHandle { inner: this.inner.clone() },
7837                            method_type: fidl::MethodType::OneWay,
7838                        })
7839                    }
7840                    _ if header
7841                        .dynamic_flags()
7842                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
7843                    {
7844                        this.inner.send_framework_err(
7845                            fidl::encoding::FrameworkErr::UnknownMethod,
7846                            header.tx_id,
7847                            header.ordinal,
7848                            header.dynamic_flags(),
7849                            (bytes, handles),
7850                        )?;
7851                        Ok(FileRequest::_UnknownMethod {
7852                            ordinal: header.ordinal,
7853                            control_handle: FileControlHandle { inner: this.inner.clone() },
7854                            method_type: fidl::MethodType::TwoWay,
7855                        })
7856                    }
7857                    _ => Err(fidl::Error::UnknownOrdinal {
7858                        ordinal: header.ordinal,
7859                        protocol_name:
7860                            <FileMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
7861                    }),
7862                }))
7863            },
7864        )
7865    }
7866}
7867
7868/// A [`Node`] which contains a sequence of bytes of definite length.
7869///
7870/// NOTE: cloned connections do not share their seek offset with their source
7871/// connection.
7872#[derive(Debug)]
7873pub enum FileRequest {
7874    /// Acquires an advisory lock on the underlying file.
7875    ///
7876    /// The lock lasts until either this connection is closed or
7877    /// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
7878    /// explicitly.
7879    ///
7880    /// Advisory locks are purely advisory. They do not prevent actual read or
7881    /// write operations from occurring on the file, either through this
7882    /// connection or through other connections.
7883    ///
7884    /// This method requires the following rights:
7885    ///
7886    /// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
7887    /// * [`Rights.WRITE_BYTES`] if `request.type` is
7888    ///   [`AdvisoryLockType.WRITE`].
7889    ///
7890    /// # Errors
7891    ///
7892    /// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
7893    ///   example, another connection might hold a conflicting lock type.
7894    /// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
7895    /// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
7896    ///   to acquire the given type of lock.
7897    AdvisoryLock {
7898        request: AdvisoryLockRequest,
7899        responder: FileAdvisoryLockResponder,
7900    },
7901    /// Creates a link to this this object with name `dst` in the directory represented by
7902    /// `dst_parent_token`.
7903    ///
7904    /// `dst` must be a resolved object name. Including "/" in the string will return
7905    /// `ZX_ERR_INVALID_ARGS`.
7906    ///
7907    /// This method requires the maximal set of rights supported by the filesystem for this object.
7908    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
7909    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
7910    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
7911    /// `ZX_ERR_ACCESS_DENIED`.
7912    ///
7913    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
7914    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
7915    ///
7916    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
7917    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
7918    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
7919    ///
7920    /// This method does not have the same atomicity properties has the `Directory::Link` method,
7921    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
7922    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
7923    LinkInto {
7924        dst_parent_token: fdomain_client::Event,
7925        dst: String,
7926        responder: FileLinkIntoResponder,
7927    },
7928    Clone {
7929        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
7930        control_handle: FileControlHandle,
7931    },
7932    /// Terminates the connection.
7933    ///
7934    /// After calling `Close`, the client must not send any other requests.
7935    ///
7936    /// Servers, after sending the status response, should close the connection
7937    /// regardless of status and without sending an epitaph.
7938    ///
7939    /// Closing the client end of the channel should be semantically equivalent
7940    /// to calling `Close` without knowing when the close has completed or its
7941    /// status.
7942    Close {
7943        responder: FileCloseResponder,
7944    },
7945    Query {
7946        responder: FileQueryResponder,
7947    },
7948    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
7949    DeprecatedClone {
7950        flags: OpenFlags,
7951        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
7952        control_handle: FileControlHandle,
7953    },
7954    /// DEPRECATED - Use `Node.GetAttributes` instead.
7955    DeprecatedGetAttr {
7956        responder: FileDeprecatedGetAttrResponder,
7957    },
7958    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
7959    DeprecatedSetAttr {
7960        flags: NodeAttributeFlags,
7961        attributes: NodeAttributes,
7962        responder: FileDeprecatedSetAttrResponder,
7963    },
7964    /// [DEPRECATED - Use new GetFlags method instead.]
7965    DeprecatedGetFlags {
7966        responder: FileDeprecatedGetFlagsResponder,
7967    },
7968    /// [DEPRECATED - Use new SetFlags method instead.]
7969    DeprecatedSetFlags {
7970        flags: OpenFlags,
7971        responder: FileDeprecatedSetFlagsResponder,
7972    },
7973    /// Queries the flags that apply to this node after it has been opened/created. This method does
7974    /// not require any rights.
7975    ///
7976    /// Note that the final set of flags that apply to the connection may differ from those
7977    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
7978    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
7979    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
7980    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
7981    GetFlags {
7982        responder: FileGetFlagsResponder,
7983    },
7984    /// Sets the flags that apply to this node after it has been opened. This method does not
7985    /// require any rights.
7986    ///
7987    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
7988    /// clear append mode.
7989    ///
7990    /// Errors:
7991    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
7992    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
7993    SetFlags {
7994        flags: Flags,
7995        responder: FileSetFlagsResponder,
7996    },
7997    /// Query the filesystem for details specific to the filesystem and/or volume. If the current
7998    /// volume has different settings or the storage is accounted seperately from the rest of the
7999    /// filesystem that may be reported instead of filesystem-wide details.
8000    QueryFilesystem {
8001        responder: FileQueryFilesystemResponder,
8002    },
8003    /// Acquires information about the node.
8004    ///
8005    /// The attributes of a node should be stable, independent of the
8006    /// specific protocol used to access it.
8007    ///
8008    /// If a particular attribute is not applicable or not supported,
8009    /// filesystems should leave the corresponding field absent.
8010    ///
8011    /// + `query` a bit-mask specifying which attributes to fetch. The server
8012    ///   should not return more than necessary.
8013    /// - `attributes` the returned attributes.
8014    ///
8015    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
8016    GetAttributes {
8017        query: NodeAttributesQuery,
8018        responder: FileGetAttributesResponder,
8019    },
8020    /// Updates information about the node.
8021    ///
8022    /// + `attributes` the presence of a table field in `attributes` indicates
8023    /// the intent to update the corresponding attribute.
8024    ///
8025    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
8026    ///
8027    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
8028    UpdateAttributes {
8029        payload: MutableNodeAttributes,
8030        responder: FileUpdateAttributesResponder,
8031    },
8032    /// Synchronizes updates to the node to the underlying media, if it exists.
8033    ///
8034    /// This method will return when the filesystem server has flushed the
8035    /// relevant updates to the underlying media, but does not guarantee the
8036    /// underlying media has persisted the information, nor that any information
8037    /// is committed to hardware. Clients may use `Sync` to ensure ordering
8038    /// between operations.
8039    ///
8040    /// This method does not require any rights.
8041    Sync {
8042        responder: FileSyncResponder,
8043    },
8044    /// Creates an iterator over all the extended attribute names associated
8045    /// with this node. If an error occurs it is returned as an epitaph on the
8046    /// iterator request channel, and then the channel is closed.
8047    ///
8048    /// GetExtendedAttributes can be used with any of these names to retrieve
8049    /// the associated value.
8050    ///
8051    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
8052    ListExtendedAttributes {
8053        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
8054        control_handle: FileControlHandle,
8055    },
8056    /// Get the value associated with the given attribute `name` for this node.
8057    ///
8058    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
8059    /// particular structure is imposed on them.
8060    ///
8061    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
8062    GetExtendedAttribute {
8063        name: Vec<u8>,
8064        responder: FileGetExtendedAttributeResponder,
8065    },
8066    /// Set the value for the given attribute `name` to `value` for this node.
8067    ///
8068    /// The attribute name may exist, in which case the attribute is updated.
8069    /// If the attribute doesn't exist, it is created. The name should have no
8070    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
8071    ///
8072    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
8073    SetExtendedAttribute {
8074        name: Vec<u8>,
8075        value: ExtendedAttributeValue,
8076        mode: SetExtendedAttributeMode,
8077        responder: FileSetExtendedAttributeResponder,
8078    },
8079    /// Remove the specified extended attribute.
8080    ///
8081    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
8082    ///
8083    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
8084    RemoveExtendedAttribute {
8085        name: Vec<u8>,
8086        responder: FileRemoveExtendedAttributeResponder,
8087    },
8088    /// Reads up to 'count' bytes at the seek offset.
8089    /// The seek offset is moved forward by the number of bytes read.
8090    ///
8091    /// ## Invariants
8092    ///
8093    /// * The returned `data.length` will never be greater than `count`.
8094    /// * If `data.length` is less than `count`, it means that the seek offset
8095    ///   has reached the end of file as part of this operation.
8096    /// * If `data.length` is zero while `count` is not, it means that the
8097    ///   seek offset is already at or beyond the end of file, and no data could
8098    ///   be read.
8099    /// * If `count` is zero, the server should perform all the checks ensuring
8100    ///   read access without actually read anything, and return an empty
8101    ///   `data` vector.
8102    ///
8103    /// This method requires the [`Rights.READ_BYTES`] right.
8104    ///
8105    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
8106    Read {
8107        count: u64,
8108        responder: FileReadResponder,
8109    },
8110    /// Writes data at the seek offset.
8111    /// The seek offset is moved forward by the number of bytes written.
8112    /// If the file is in append mode, the seek offset is first set to the end
8113    /// of the file, followed by the write, in one atomic step.
8114    ///
8115    /// The file size may grow if the seek offset plus `data.length` is beyond
8116    /// the current end of file.
8117    ///
8118    /// + request `data` the byte buffer to write to the file.
8119    /// - response `actual_count` the number of bytes written.
8120    ///
8121    /// ## Invariants
8122    ///
8123    /// * The returned `actual_count` will never be greater than `data.length`.
8124    /// * If the server is unable to write all the data due to e.g. not enough
8125    ///   space, `actual_count` may be less than `data.length`.  If no bytes
8126    ///   could be written, an error is returned.
8127    /// * If `data.length` is zero, the server should perform all the checks
8128    ///   ensuring write access without mutating the file and return a
8129    ///   successful write of zero bytes.  The seek offset is still updated if
8130    ///   in append mode.
8131    ///
8132    /// This method requires the [`Rights.WRITE_BYTES`] right.
8133    Write {
8134        data: Vec<u8>,
8135        responder: FileWriteResponder,
8136    },
8137    Describe {
8138        responder: FileDescribeResponder,
8139    },
8140    /// Moves the offset at which the next invocation of [`Read`] or [`Write`]
8141    /// will occur. The seek offset is specific to each file connection.
8142    ///
8143    /// + request `origin` the reference point where `offset` will be based on.
8144    /// + request `offset` the number of bytes to seek.
8145    /// - response `offset_from_start` the adjusted seek offset, from the start
8146    ///   of the file.
8147    ///
8148    /// This method does not require any rights.
8149    Seek {
8150        origin: SeekOrigin,
8151        offset: i64,
8152        responder: FileSeekResponder,
8153    },
8154    /// Reads up to 'count' bytes at the provided offset.
8155    /// Does not affect the seek offset.
8156    ///
8157    /// ## Invariants
8158    ///
8159    /// * The returned `data.length` will never be greater than `count`.
8160    /// * If `data.length` is less than `count`, it means that `ReadAt` has hit
8161    ///   the end of file as part of this operation.
8162    /// * If `data.length` is zero while `count` is not, it means that `offset`
8163    ///   is at or past the end of file, and no data can be read.
8164    /// * If `count` is zero, the server should perform all the checks ensuring
8165    ///   read access without actually reading anything, and return an empty
8166    ///   `data` vector.
8167    ///
8168    /// This method requires the [`Rights.READ_BYTES`] right.
8169    ///
8170    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
8171    ReadAt {
8172        count: u64,
8173        offset: u64,
8174        responder: FileReadAtResponder,
8175    },
8176    /// Writes data at the provided offset.
8177    /// Does not affect the seek offset.
8178    ///
8179    /// The file size may grow if `offset` plus `data.length` is past the
8180    /// current end of file.
8181    ///
8182    /// + request `data` the byte buffer to write to the file.
8183    /// + request `offset` the offset from start of the file to begin writing.
8184    /// - response `actual_count` the number of bytes written.
8185    ///
8186    /// ## Invariants
8187    ///
8188    /// * The returned `actual_count` will never be greater than `data.length`.
8189    /// * If the server is unable to write all the data due to e.g. not enough
8190    ///   space, `actual_count` may be less than `data.length`.  If no bytes
8191    ///   could be written, an error is returned.
8192    /// * If `data.length` is zero, the server should perform all the checks
8193    ///   ensuring write access without mutating the file, and will return a
8194    ///   successful write of zero bytes.
8195    ///
8196    /// This method requires the [`Rights.WRITE_BYTES`] right.
8197    WriteAt {
8198        data: Vec<u8>,
8199        offset: u64,
8200        responder: FileWriteAtResponder,
8201    },
8202    /// Shrinks or grows the file size to 'length' bytes.
8203    ///
8204    /// If file size is reduced by this operation, the extra trailing data'
8205    /// is discarded.
8206    /// If file size is increased by this operation, the extended area appears
8207    /// as if it was zeroed.
8208    ///
8209    /// This method requires the [`Rights.WRITE_BYTES`] right.
8210    Resize {
8211        length: u64,
8212        responder: FileResizeResponder,
8213    },
8214    /// Acquires a [`zx.Handle:VMO`] representing this file, if there is one,
8215    /// with the requested access rights.
8216    ///
8217    /// Implementations are not required to implement files backed by VMOs so
8218    /// this request may fail. Additionally, implementations may only support
8219    /// a certain subset of the flags. Clients should be prepared with fallback
8220    /// behavior if this request fails.
8221    ///
8222    /// If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the
8223    /// implementation is free to choose the semantics of the returned VMO.
8224    ///
8225    /// + request `flags` a [`VmoFlags`] indicating the desired mode of access.
8226    /// - response `vmo` the requested [`zx.Handle:VMO`].
8227    /// * error a [`zx.Status`] value indicating the failure.
8228    ///
8229    /// This method requires the following rights:
8230    ///
8231    /// * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].
8232    /// * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].
8233    /// * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].
8234    GetBackingMemory {
8235        flags: VmoFlags,
8236        responder: FileGetBackingMemoryResponder,
8237    },
8238    /// Pre-allocate on-disk space for this file.
8239    Allocate {
8240        offset: u64,
8241        length: u64,
8242        mode: AllocateMode,
8243        responder: FileAllocateResponder,
8244    },
8245    /// Enables verification for the file (permanently) which involves computing a merkle tree for
8246    /// the file. Forces a flush prior to building the merkle tree to ensure cached data is
8247    /// captured. Future reads will be verified against the computed merkle tree and writes will be
8248    /// rejected. This method can take some time to complete as it depends on the size of the file.
8249    /// This method can be aborted by closing the connection that this method was issued on.
8250    ///
8251    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
8252    /// Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.
8253    /// Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.
8254    /// Also returns any error that might arise from reading the file, or from flushing the file,
8255    /// such as `ZX_ERR_IO`.
8256    EnableVerity {
8257        options: VerificationOptions,
8258        responder: FileEnableVerityResponder,
8259    },
8260    /// An interaction was received which does not match any known method.
8261    #[non_exhaustive]
8262    _UnknownMethod {
8263        /// Ordinal of the method that was called.
8264        ordinal: u64,
8265        control_handle: FileControlHandle,
8266        method_type: fidl::MethodType,
8267    },
8268}
8269
8270impl FileRequest {
8271    #[allow(irrefutable_let_patterns)]
8272    pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
8273        if let FileRequest::AdvisoryLock { request, responder } = self {
8274            Some((request, responder))
8275        } else {
8276            None
8277        }
8278    }
8279
8280    #[allow(irrefutable_let_patterns)]
8281    pub fn into_link_into(self) -> Option<(fdomain_client::Event, String, FileLinkIntoResponder)> {
8282        if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
8283            Some((dst_parent_token, dst, responder))
8284        } else {
8285            None
8286        }
8287    }
8288
8289    #[allow(irrefutable_let_patterns)]
8290    pub fn into_clone(
8291        self,
8292    ) -> Option<(
8293        fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
8294        FileControlHandle,
8295    )> {
8296        if let FileRequest::Clone { request, control_handle } = self {
8297            Some((request, control_handle))
8298        } else {
8299            None
8300        }
8301    }
8302
8303    #[allow(irrefutable_let_patterns)]
8304    pub fn into_close(self) -> Option<(FileCloseResponder)> {
8305        if let FileRequest::Close { responder } = self { Some((responder)) } else { None }
8306    }
8307
8308    #[allow(irrefutable_let_patterns)]
8309    pub fn into_query(self) -> Option<(FileQueryResponder)> {
8310        if let FileRequest::Query { responder } = self { Some((responder)) } else { None }
8311    }
8312
8313    #[allow(irrefutable_let_patterns)]
8314    pub fn into_deprecated_clone(
8315        self,
8316    ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, FileControlHandle)> {
8317        if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
8318            Some((flags, object, control_handle))
8319        } else {
8320            None
8321        }
8322    }
8323
8324    #[allow(irrefutable_let_patterns)]
8325    pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
8326        if let FileRequest::DeprecatedGetAttr { responder } = self {
8327            Some((responder))
8328        } else {
8329            None
8330        }
8331    }
8332
8333    #[allow(irrefutable_let_patterns)]
8334    pub fn into_deprecated_set_attr(
8335        self,
8336    ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
8337        if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
8338            Some((flags, attributes, responder))
8339        } else {
8340            None
8341        }
8342    }
8343
8344    #[allow(irrefutable_let_patterns)]
8345    pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
8346        if let FileRequest::DeprecatedGetFlags { responder } = self {
8347            Some((responder))
8348        } else {
8349            None
8350        }
8351    }
8352
8353    #[allow(irrefutable_let_patterns)]
8354    pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
8355        if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
8356            Some((flags, responder))
8357        } else {
8358            None
8359        }
8360    }
8361
8362    #[allow(irrefutable_let_patterns)]
8363    pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
8364        if let FileRequest::GetFlags { responder } = self { Some((responder)) } else { None }
8365    }
8366
8367    #[allow(irrefutable_let_patterns)]
8368    pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
8369        if let FileRequest::SetFlags { flags, responder } = self {
8370            Some((flags, responder))
8371        } else {
8372            None
8373        }
8374    }
8375
8376    #[allow(irrefutable_let_patterns)]
8377    pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
8378        if let FileRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
8379    }
8380
8381    #[allow(irrefutable_let_patterns)]
8382    pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
8383        if let FileRequest::GetAttributes { query, responder } = self {
8384            Some((query, responder))
8385        } else {
8386            None
8387        }
8388    }
8389
8390    #[allow(irrefutable_let_patterns)]
8391    pub fn into_update_attributes(
8392        self,
8393    ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
8394        if let FileRequest::UpdateAttributes { payload, responder } = self {
8395            Some((payload, responder))
8396        } else {
8397            None
8398        }
8399    }
8400
8401    #[allow(irrefutable_let_patterns)]
8402    pub fn into_sync(self) -> Option<(FileSyncResponder)> {
8403        if let FileRequest::Sync { responder } = self { Some((responder)) } else { None }
8404    }
8405
8406    #[allow(irrefutable_let_patterns)]
8407    pub fn into_list_extended_attributes(
8408        self,
8409    ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
8410    {
8411        if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
8412            Some((iterator, control_handle))
8413        } else {
8414            None
8415        }
8416    }
8417
8418    #[allow(irrefutable_let_patterns)]
8419    pub fn into_get_extended_attribute(
8420        self,
8421    ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
8422        if let FileRequest::GetExtendedAttribute { name, responder } = self {
8423            Some((name, responder))
8424        } else {
8425            None
8426        }
8427    }
8428
8429    #[allow(irrefutable_let_patterns)]
8430    pub fn into_set_extended_attribute(
8431        self,
8432    ) -> Option<(
8433        Vec<u8>,
8434        ExtendedAttributeValue,
8435        SetExtendedAttributeMode,
8436        FileSetExtendedAttributeResponder,
8437    )> {
8438        if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
8439            Some((name, value, mode, responder))
8440        } else {
8441            None
8442        }
8443    }
8444
8445    #[allow(irrefutable_let_patterns)]
8446    pub fn into_remove_extended_attribute(
8447        self,
8448    ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
8449        if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
8450            Some((name, responder))
8451        } else {
8452            None
8453        }
8454    }
8455
8456    #[allow(irrefutable_let_patterns)]
8457    pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
8458        if let FileRequest::Read { count, responder } = self {
8459            Some((count, responder))
8460        } else {
8461            None
8462        }
8463    }
8464
8465    #[allow(irrefutable_let_patterns)]
8466    pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
8467        if let FileRequest::Write { data, responder } = self {
8468            Some((data, responder))
8469        } else {
8470            None
8471        }
8472    }
8473
8474    #[allow(irrefutable_let_patterns)]
8475    pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
8476        if let FileRequest::Describe { responder } = self { Some((responder)) } else { None }
8477    }
8478
8479    #[allow(irrefutable_let_patterns)]
8480    pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
8481        if let FileRequest::Seek { origin, offset, responder } = self {
8482            Some((origin, offset, responder))
8483        } else {
8484            None
8485        }
8486    }
8487
8488    #[allow(irrefutable_let_patterns)]
8489    pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
8490        if let FileRequest::ReadAt { count, offset, responder } = self {
8491            Some((count, offset, responder))
8492        } else {
8493            None
8494        }
8495    }
8496
8497    #[allow(irrefutable_let_patterns)]
8498    pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
8499        if let FileRequest::WriteAt { data, offset, responder } = self {
8500            Some((data, offset, responder))
8501        } else {
8502            None
8503        }
8504    }
8505
8506    #[allow(irrefutable_let_patterns)]
8507    pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
8508        if let FileRequest::Resize { length, responder } = self {
8509            Some((length, responder))
8510        } else {
8511            None
8512        }
8513    }
8514
8515    #[allow(irrefutable_let_patterns)]
8516    pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
8517        if let FileRequest::GetBackingMemory { flags, responder } = self {
8518            Some((flags, responder))
8519        } else {
8520            None
8521        }
8522    }
8523
8524    #[allow(irrefutable_let_patterns)]
8525    pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
8526        if let FileRequest::Allocate { offset, length, mode, responder } = self {
8527            Some((offset, length, mode, responder))
8528        } else {
8529            None
8530        }
8531    }
8532
8533    #[allow(irrefutable_let_patterns)]
8534    pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
8535        if let FileRequest::EnableVerity { options, responder } = self {
8536            Some((options, responder))
8537        } else {
8538            None
8539        }
8540    }
8541
8542    /// Name of the method defined in FIDL
8543    pub fn method_name(&self) -> &'static str {
8544        match *self {
8545            FileRequest::AdvisoryLock { .. } => "advisory_lock",
8546            FileRequest::LinkInto { .. } => "link_into",
8547            FileRequest::Clone { .. } => "clone",
8548            FileRequest::Close { .. } => "close",
8549            FileRequest::Query { .. } => "query",
8550            FileRequest::DeprecatedClone { .. } => "deprecated_clone",
8551            FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
8552            FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
8553            FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
8554            FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
8555            FileRequest::GetFlags { .. } => "get_flags",
8556            FileRequest::SetFlags { .. } => "set_flags",
8557            FileRequest::QueryFilesystem { .. } => "query_filesystem",
8558            FileRequest::GetAttributes { .. } => "get_attributes",
8559            FileRequest::UpdateAttributes { .. } => "update_attributes",
8560            FileRequest::Sync { .. } => "sync",
8561            FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
8562            FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
8563            FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
8564            FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
8565            FileRequest::Read { .. } => "read",
8566            FileRequest::Write { .. } => "write",
8567            FileRequest::Describe { .. } => "describe",
8568            FileRequest::Seek { .. } => "seek",
8569            FileRequest::ReadAt { .. } => "read_at",
8570            FileRequest::WriteAt { .. } => "write_at",
8571            FileRequest::Resize { .. } => "resize",
8572            FileRequest::GetBackingMemory { .. } => "get_backing_memory",
8573            FileRequest::Allocate { .. } => "allocate",
8574            FileRequest::EnableVerity { .. } => "enable_verity",
8575            FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
8576                "unknown one-way method"
8577            }
8578            FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
8579                "unknown two-way method"
8580            }
8581        }
8582    }
8583}
8584
8585#[derive(Debug, Clone)]
8586pub struct FileControlHandle {
8587    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
8588}
8589
8590impl fdomain_client::fidl::ControlHandle for FileControlHandle {
8591    fn shutdown(&self) {
8592        self.inner.shutdown()
8593    }
8594
8595    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8596        self.inner.shutdown_with_epitaph(status)
8597    }
8598
8599    fn is_closed(&self) -> bool {
8600        self.inner.channel().is_closed()
8601    }
8602    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
8603        self.inner.channel().on_closed()
8604    }
8605}
8606
8607impl FileControlHandle {
8608    pub fn send_on_open_(
8609        &self,
8610        mut s: i32,
8611        mut info: Option<NodeInfoDeprecated>,
8612    ) -> Result<(), fidl::Error> {
8613        self.inner.send::<NodeOnOpenRequest>(
8614            (s, info.as_mut()),
8615            0,
8616            0x7fc7bbb1dbfd1972,
8617            fidl::encoding::DynamicFlags::FLEXIBLE,
8618        )
8619    }
8620
8621    pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
8622        self.inner.send::<Representation>(
8623            &mut payload,
8624            0,
8625            0x5cb40567d80a510c,
8626            fidl::encoding::DynamicFlags::empty(),
8627        )
8628    }
8629}
8630
8631#[must_use = "FIDL methods require a response to be sent"]
8632#[derive(Debug)]
8633pub struct FileAdvisoryLockResponder {
8634    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8635    tx_id: u32,
8636}
8637
8638/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8639/// if the responder is dropped without sending a response, so that the client
8640/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8641impl std::ops::Drop for FileAdvisoryLockResponder {
8642    fn drop(&mut self) {
8643        self.control_handle.shutdown();
8644        // Safety: drops once, never accessed again
8645        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8646    }
8647}
8648
8649impl fdomain_client::fidl::Responder for FileAdvisoryLockResponder {
8650    type ControlHandle = FileControlHandle;
8651
8652    fn control_handle(&self) -> &FileControlHandle {
8653        &self.control_handle
8654    }
8655
8656    fn drop_without_shutdown(mut self) {
8657        // Safety: drops once, never accessed again due to mem::forget
8658        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8659        // Prevent Drop from running (which would shut down the channel)
8660        std::mem::forget(self);
8661    }
8662}
8663
8664impl FileAdvisoryLockResponder {
8665    /// Sends a response to the FIDL transaction.
8666    ///
8667    /// Sets the channel to shutdown if an error occurs.
8668    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8669        let _result = self.send_raw(result);
8670        if _result.is_err() {
8671            self.control_handle.shutdown();
8672        }
8673        self.drop_without_shutdown();
8674        _result
8675    }
8676
8677    /// Similar to "send" but does not shutdown the channel if an error occurs.
8678    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8679        let _result = self.send_raw(result);
8680        self.drop_without_shutdown();
8681        _result
8682    }
8683
8684    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8685        self.control_handle
8686            .inner
8687            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8688                result,
8689                self.tx_id,
8690                0x6ee9c0ad53ec87aa,
8691                fidl::encoding::DynamicFlags::empty(),
8692            )
8693    }
8694}
8695
8696#[must_use = "FIDL methods require a response to be sent"]
8697#[derive(Debug)]
8698pub struct FileLinkIntoResponder {
8699    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8700    tx_id: u32,
8701}
8702
8703/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8704/// if the responder is dropped without sending a response, so that the client
8705/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8706impl std::ops::Drop for FileLinkIntoResponder {
8707    fn drop(&mut self) {
8708        self.control_handle.shutdown();
8709        // Safety: drops once, never accessed again
8710        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8711    }
8712}
8713
8714impl fdomain_client::fidl::Responder for FileLinkIntoResponder {
8715    type ControlHandle = FileControlHandle;
8716
8717    fn control_handle(&self) -> &FileControlHandle {
8718        &self.control_handle
8719    }
8720
8721    fn drop_without_shutdown(mut self) {
8722        // Safety: drops once, never accessed again due to mem::forget
8723        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8724        // Prevent Drop from running (which would shut down the channel)
8725        std::mem::forget(self);
8726    }
8727}
8728
8729impl FileLinkIntoResponder {
8730    /// Sends a response to the FIDL transaction.
8731    ///
8732    /// Sets the channel to shutdown if an error occurs.
8733    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8734        let _result = self.send_raw(result);
8735        if _result.is_err() {
8736            self.control_handle.shutdown();
8737        }
8738        self.drop_without_shutdown();
8739        _result
8740    }
8741
8742    /// Similar to "send" but does not shutdown the channel if an error occurs.
8743    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8744        let _result = self.send_raw(result);
8745        self.drop_without_shutdown();
8746        _result
8747    }
8748
8749    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8750        self.control_handle
8751            .inner
8752            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8753                result,
8754                self.tx_id,
8755                0x54f3949246a03e74,
8756                fidl::encoding::DynamicFlags::empty(),
8757            )
8758    }
8759}
8760
8761#[must_use = "FIDL methods require a response to be sent"]
8762#[derive(Debug)]
8763pub struct FileCloseResponder {
8764    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8765    tx_id: u32,
8766}
8767
8768/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8769/// if the responder is dropped without sending a response, so that the client
8770/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8771impl std::ops::Drop for FileCloseResponder {
8772    fn drop(&mut self) {
8773        self.control_handle.shutdown();
8774        // Safety: drops once, never accessed again
8775        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8776    }
8777}
8778
8779impl fdomain_client::fidl::Responder for FileCloseResponder {
8780    type ControlHandle = FileControlHandle;
8781
8782    fn control_handle(&self) -> &FileControlHandle {
8783        &self.control_handle
8784    }
8785
8786    fn drop_without_shutdown(mut self) {
8787        // Safety: drops once, never accessed again due to mem::forget
8788        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8789        // Prevent Drop from running (which would shut down the channel)
8790        std::mem::forget(self);
8791    }
8792}
8793
8794impl FileCloseResponder {
8795    /// Sends a response to the FIDL transaction.
8796    ///
8797    /// Sets the channel to shutdown if an error occurs.
8798    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8799        let _result = self.send_raw(result);
8800        if _result.is_err() {
8801            self.control_handle.shutdown();
8802        }
8803        self.drop_without_shutdown();
8804        _result
8805    }
8806
8807    /// Similar to "send" but does not shutdown the channel if an error occurs.
8808    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8809        let _result = self.send_raw(result);
8810        self.drop_without_shutdown();
8811        _result
8812    }
8813
8814    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
8815        self.control_handle
8816            .inner
8817            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
8818                result,
8819                self.tx_id,
8820                0x5ac5d459ad7f657e,
8821                fidl::encoding::DynamicFlags::empty(),
8822            )
8823    }
8824}
8825
8826#[must_use = "FIDL methods require a response to be sent"]
8827#[derive(Debug)]
8828pub struct FileQueryResponder {
8829    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8830    tx_id: u32,
8831}
8832
8833/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8834/// if the responder is dropped without sending a response, so that the client
8835/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8836impl std::ops::Drop for FileQueryResponder {
8837    fn drop(&mut self) {
8838        self.control_handle.shutdown();
8839        // Safety: drops once, never accessed again
8840        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8841    }
8842}
8843
8844impl fdomain_client::fidl::Responder for FileQueryResponder {
8845    type ControlHandle = FileControlHandle;
8846
8847    fn control_handle(&self) -> &FileControlHandle {
8848        &self.control_handle
8849    }
8850
8851    fn drop_without_shutdown(mut self) {
8852        // Safety: drops once, never accessed again due to mem::forget
8853        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8854        // Prevent Drop from running (which would shut down the channel)
8855        std::mem::forget(self);
8856    }
8857}
8858
8859impl FileQueryResponder {
8860    /// Sends a response to the FIDL transaction.
8861    ///
8862    /// Sets the channel to shutdown if an error occurs.
8863    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8864        let _result = self.send_raw(protocol);
8865        if _result.is_err() {
8866            self.control_handle.shutdown();
8867        }
8868        self.drop_without_shutdown();
8869        _result
8870    }
8871
8872    /// Similar to "send" but does not shutdown the channel if an error occurs.
8873    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8874        let _result = self.send_raw(protocol);
8875        self.drop_without_shutdown();
8876        _result
8877    }
8878
8879    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
8880        self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
8881            (protocol,),
8882            self.tx_id,
8883            0x2658edee9decfc06,
8884            fidl::encoding::DynamicFlags::empty(),
8885        )
8886    }
8887}
8888
8889#[must_use = "FIDL methods require a response to be sent"]
8890#[derive(Debug)]
8891pub struct FileDeprecatedGetAttrResponder {
8892    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8893    tx_id: u32,
8894}
8895
8896/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8897/// if the responder is dropped without sending a response, so that the client
8898/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8899impl std::ops::Drop for FileDeprecatedGetAttrResponder {
8900    fn drop(&mut self) {
8901        self.control_handle.shutdown();
8902        // Safety: drops once, never accessed again
8903        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8904    }
8905}
8906
8907impl fdomain_client::fidl::Responder for FileDeprecatedGetAttrResponder {
8908    type ControlHandle = FileControlHandle;
8909
8910    fn control_handle(&self) -> &FileControlHandle {
8911        &self.control_handle
8912    }
8913
8914    fn drop_without_shutdown(mut self) {
8915        // Safety: drops once, never accessed again due to mem::forget
8916        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8917        // Prevent Drop from running (which would shut down the channel)
8918        std::mem::forget(self);
8919    }
8920}
8921
8922impl FileDeprecatedGetAttrResponder {
8923    /// Sends a response to the FIDL transaction.
8924    ///
8925    /// Sets the channel to shutdown if an error occurs.
8926    pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8927        let _result = self.send_raw(s, attributes);
8928        if _result.is_err() {
8929            self.control_handle.shutdown();
8930        }
8931        self.drop_without_shutdown();
8932        _result
8933    }
8934
8935    /// Similar to "send" but does not shutdown the channel if an error occurs.
8936    pub fn send_no_shutdown_on_err(
8937        self,
8938        mut s: i32,
8939        mut attributes: &NodeAttributes,
8940    ) -> Result<(), fidl::Error> {
8941        let _result = self.send_raw(s, attributes);
8942        self.drop_without_shutdown();
8943        _result
8944    }
8945
8946    fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
8947        self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
8948            (s, attributes),
8949            self.tx_id,
8950            0x78985e216314dafd,
8951            fidl::encoding::DynamicFlags::empty(),
8952        )
8953    }
8954}
8955
8956#[must_use = "FIDL methods require a response to be sent"]
8957#[derive(Debug)]
8958pub struct FileDeprecatedSetAttrResponder {
8959    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
8960    tx_id: u32,
8961}
8962
8963/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
8964/// if the responder is dropped without sending a response, so that the client
8965/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
8966impl std::ops::Drop for FileDeprecatedSetAttrResponder {
8967    fn drop(&mut self) {
8968        self.control_handle.shutdown();
8969        // Safety: drops once, never accessed again
8970        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8971    }
8972}
8973
8974impl fdomain_client::fidl::Responder for FileDeprecatedSetAttrResponder {
8975    type ControlHandle = FileControlHandle;
8976
8977    fn control_handle(&self) -> &FileControlHandle {
8978        &self.control_handle
8979    }
8980
8981    fn drop_without_shutdown(mut self) {
8982        // Safety: drops once, never accessed again due to mem::forget
8983        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8984        // Prevent Drop from running (which would shut down the channel)
8985        std::mem::forget(self);
8986    }
8987}
8988
8989impl FileDeprecatedSetAttrResponder {
8990    /// Sends a response to the FIDL transaction.
8991    ///
8992    /// Sets the channel to shutdown if an error occurs.
8993    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
8994        let _result = self.send_raw(s);
8995        if _result.is_err() {
8996            self.control_handle.shutdown();
8997        }
8998        self.drop_without_shutdown();
8999        _result
9000    }
9001
9002    /// Similar to "send" but does not shutdown the channel if an error occurs.
9003    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9004        let _result = self.send_raw(s);
9005        self.drop_without_shutdown();
9006        _result
9007    }
9008
9009    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9010        self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
9011            (s,),
9012            self.tx_id,
9013            0x4186c0f40d938f46,
9014            fidl::encoding::DynamicFlags::empty(),
9015        )
9016    }
9017}
9018
9019#[must_use = "FIDL methods require a response to be sent"]
9020#[derive(Debug)]
9021pub struct FileDeprecatedGetFlagsResponder {
9022    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9023    tx_id: u32,
9024}
9025
9026/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9027/// if the responder is dropped without sending a response, so that the client
9028/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9029impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
9030    fn drop(&mut self) {
9031        self.control_handle.shutdown();
9032        // Safety: drops once, never accessed again
9033        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9034    }
9035}
9036
9037impl fdomain_client::fidl::Responder for FileDeprecatedGetFlagsResponder {
9038    type ControlHandle = FileControlHandle;
9039
9040    fn control_handle(&self) -> &FileControlHandle {
9041        &self.control_handle
9042    }
9043
9044    fn drop_without_shutdown(mut self) {
9045        // Safety: drops once, never accessed again due to mem::forget
9046        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9047        // Prevent Drop from running (which would shut down the channel)
9048        std::mem::forget(self);
9049    }
9050}
9051
9052impl FileDeprecatedGetFlagsResponder {
9053    /// Sends a response to the FIDL transaction.
9054    ///
9055    /// Sets the channel to shutdown if an error occurs.
9056    pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9057        let _result = self.send_raw(s, flags);
9058        if _result.is_err() {
9059            self.control_handle.shutdown();
9060        }
9061        self.drop_without_shutdown();
9062        _result
9063    }
9064
9065    /// Similar to "send" but does not shutdown the channel if an error occurs.
9066    pub fn send_no_shutdown_on_err(
9067        self,
9068        mut s: i32,
9069        mut flags: OpenFlags,
9070    ) -> Result<(), fidl::Error> {
9071        let _result = self.send_raw(s, flags);
9072        self.drop_without_shutdown();
9073        _result
9074    }
9075
9076    fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
9077        self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
9078            (s, flags),
9079            self.tx_id,
9080            0x5b88fffb8eda3aa1,
9081            fidl::encoding::DynamicFlags::empty(),
9082        )
9083    }
9084}
9085
9086#[must_use = "FIDL methods require a response to be sent"]
9087#[derive(Debug)]
9088pub struct FileDeprecatedSetFlagsResponder {
9089    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9090    tx_id: u32,
9091}
9092
9093/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9094/// if the responder is dropped without sending a response, so that the client
9095/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9096impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
9097    fn drop(&mut self) {
9098        self.control_handle.shutdown();
9099        // Safety: drops once, never accessed again
9100        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9101    }
9102}
9103
9104impl fdomain_client::fidl::Responder for FileDeprecatedSetFlagsResponder {
9105    type ControlHandle = FileControlHandle;
9106
9107    fn control_handle(&self) -> &FileControlHandle {
9108        &self.control_handle
9109    }
9110
9111    fn drop_without_shutdown(mut self) {
9112        // Safety: drops once, never accessed again due to mem::forget
9113        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9114        // Prevent Drop from running (which would shut down the channel)
9115        std::mem::forget(self);
9116    }
9117}
9118
9119impl FileDeprecatedSetFlagsResponder {
9120    /// Sends a response to the FIDL transaction.
9121    ///
9122    /// Sets the channel to shutdown if an error occurs.
9123    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
9124        let _result = self.send_raw(s);
9125        if _result.is_err() {
9126            self.control_handle.shutdown();
9127        }
9128        self.drop_without_shutdown();
9129        _result
9130    }
9131
9132    /// Similar to "send" but does not shutdown the channel if an error occurs.
9133    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
9134        let _result = self.send_raw(s);
9135        self.drop_without_shutdown();
9136        _result
9137    }
9138
9139    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
9140        self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
9141            (s,),
9142            self.tx_id,
9143            0x5295b76c71fde733,
9144            fidl::encoding::DynamicFlags::empty(),
9145        )
9146    }
9147}
9148
9149#[must_use = "FIDL methods require a response to be sent"]
9150#[derive(Debug)]
9151pub struct FileGetFlagsResponder {
9152    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9153    tx_id: u32,
9154}
9155
9156/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9157/// if the responder is dropped without sending a response, so that the client
9158/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9159impl std::ops::Drop for FileGetFlagsResponder {
9160    fn drop(&mut self) {
9161        self.control_handle.shutdown();
9162        // Safety: drops once, never accessed again
9163        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9164    }
9165}
9166
9167impl fdomain_client::fidl::Responder for FileGetFlagsResponder {
9168    type ControlHandle = FileControlHandle;
9169
9170    fn control_handle(&self) -> &FileControlHandle {
9171        &self.control_handle
9172    }
9173
9174    fn drop_without_shutdown(mut self) {
9175        // Safety: drops once, never accessed again due to mem::forget
9176        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9177        // Prevent Drop from running (which would shut down the channel)
9178        std::mem::forget(self);
9179    }
9180}
9181
9182impl FileGetFlagsResponder {
9183    /// Sends a response to the FIDL transaction.
9184    ///
9185    /// Sets the channel to shutdown if an error occurs.
9186    pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9187        let _result = self.send_raw(result);
9188        if _result.is_err() {
9189            self.control_handle.shutdown();
9190        }
9191        self.drop_without_shutdown();
9192        _result
9193    }
9194
9195    /// Similar to "send" but does not shutdown the channel if an error occurs.
9196    pub fn send_no_shutdown_on_err(
9197        self,
9198        mut result: Result<Flags, i32>,
9199    ) -> Result<(), fidl::Error> {
9200        let _result = self.send_raw(result);
9201        self.drop_without_shutdown();
9202        _result
9203    }
9204
9205    fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
9206        self.control_handle
9207            .inner
9208            .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
9209                fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
9210                self.tx_id,
9211                0x176eb318f64ec23,
9212                fidl::encoding::DynamicFlags::FLEXIBLE,
9213            )
9214    }
9215}
9216
9217#[must_use = "FIDL methods require a response to be sent"]
9218#[derive(Debug)]
9219pub struct FileSetFlagsResponder {
9220    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9221    tx_id: u32,
9222}
9223
9224/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9225/// if the responder is dropped without sending a response, so that the client
9226/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9227impl std::ops::Drop for FileSetFlagsResponder {
9228    fn drop(&mut self) {
9229        self.control_handle.shutdown();
9230        // Safety: drops once, never accessed again
9231        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9232    }
9233}
9234
9235impl fdomain_client::fidl::Responder for FileSetFlagsResponder {
9236    type ControlHandle = FileControlHandle;
9237
9238    fn control_handle(&self) -> &FileControlHandle {
9239        &self.control_handle
9240    }
9241
9242    fn drop_without_shutdown(mut self) {
9243        // Safety: drops once, never accessed again due to mem::forget
9244        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9245        // Prevent Drop from running (which would shut down the channel)
9246        std::mem::forget(self);
9247    }
9248}
9249
9250impl FileSetFlagsResponder {
9251    /// Sends a response to the FIDL transaction.
9252    ///
9253    /// Sets the channel to shutdown if an error occurs.
9254    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9255        let _result = self.send_raw(result);
9256        if _result.is_err() {
9257            self.control_handle.shutdown();
9258        }
9259        self.drop_without_shutdown();
9260        _result
9261    }
9262
9263    /// Similar to "send" but does not shutdown the channel if an error occurs.
9264    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9265        let _result = self.send_raw(result);
9266        self.drop_without_shutdown();
9267        _result
9268    }
9269
9270    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9271        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
9272            fidl::encoding::EmptyStruct,
9273            i32,
9274        >>(
9275            fidl::encoding::FlexibleResult::new(result),
9276            self.tx_id,
9277            0x55a8028685791ea8,
9278            fidl::encoding::DynamicFlags::FLEXIBLE,
9279        )
9280    }
9281}
9282
9283#[must_use = "FIDL methods require a response to be sent"]
9284#[derive(Debug)]
9285pub struct FileQueryFilesystemResponder {
9286    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9287    tx_id: u32,
9288}
9289
9290/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9291/// if the responder is dropped without sending a response, so that the client
9292/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9293impl std::ops::Drop for FileQueryFilesystemResponder {
9294    fn drop(&mut self) {
9295        self.control_handle.shutdown();
9296        // Safety: drops once, never accessed again
9297        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9298    }
9299}
9300
9301impl fdomain_client::fidl::Responder for FileQueryFilesystemResponder {
9302    type ControlHandle = FileControlHandle;
9303
9304    fn control_handle(&self) -> &FileControlHandle {
9305        &self.control_handle
9306    }
9307
9308    fn drop_without_shutdown(mut self) {
9309        // Safety: drops once, never accessed again due to mem::forget
9310        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9311        // Prevent Drop from running (which would shut down the channel)
9312        std::mem::forget(self);
9313    }
9314}
9315
9316impl FileQueryFilesystemResponder {
9317    /// Sends a response to the FIDL transaction.
9318    ///
9319    /// Sets the channel to shutdown if an error occurs.
9320    pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9321        let _result = self.send_raw(s, info);
9322        if _result.is_err() {
9323            self.control_handle.shutdown();
9324        }
9325        self.drop_without_shutdown();
9326        _result
9327    }
9328
9329    /// Similar to "send" but does not shutdown the channel if an error occurs.
9330    pub fn send_no_shutdown_on_err(
9331        self,
9332        mut s: i32,
9333        mut info: Option<&FilesystemInfo>,
9334    ) -> Result<(), fidl::Error> {
9335        let _result = self.send_raw(s, info);
9336        self.drop_without_shutdown();
9337        _result
9338    }
9339
9340    fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
9341        self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
9342            (s, info),
9343            self.tx_id,
9344            0x6f344a1c6b0a0610,
9345            fidl::encoding::DynamicFlags::empty(),
9346        )
9347    }
9348}
9349
9350#[must_use = "FIDL methods require a response to be sent"]
9351#[derive(Debug)]
9352pub struct FileGetAttributesResponder {
9353    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9354    tx_id: u32,
9355}
9356
9357/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9358/// if the responder is dropped without sending a response, so that the client
9359/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9360impl std::ops::Drop for FileGetAttributesResponder {
9361    fn drop(&mut self) {
9362        self.control_handle.shutdown();
9363        // Safety: drops once, never accessed again
9364        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9365    }
9366}
9367
9368impl fdomain_client::fidl::Responder for FileGetAttributesResponder {
9369    type ControlHandle = FileControlHandle;
9370
9371    fn control_handle(&self) -> &FileControlHandle {
9372        &self.control_handle
9373    }
9374
9375    fn drop_without_shutdown(mut self) {
9376        // Safety: drops once, never accessed again due to mem::forget
9377        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9378        // Prevent Drop from running (which would shut down the channel)
9379        std::mem::forget(self);
9380    }
9381}
9382
9383impl FileGetAttributesResponder {
9384    /// Sends a response to the FIDL transaction.
9385    ///
9386    /// Sets the channel to shutdown if an error occurs.
9387    pub fn send(
9388        self,
9389        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9390    ) -> Result<(), fidl::Error> {
9391        let _result = self.send_raw(result);
9392        if _result.is_err() {
9393            self.control_handle.shutdown();
9394        }
9395        self.drop_without_shutdown();
9396        _result
9397    }
9398
9399    /// Similar to "send" but does not shutdown the channel if an error occurs.
9400    pub fn send_no_shutdown_on_err(
9401        self,
9402        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9403    ) -> Result<(), fidl::Error> {
9404        let _result = self.send_raw(result);
9405        self.drop_without_shutdown();
9406        _result
9407    }
9408
9409    fn send_raw(
9410        &self,
9411        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
9412    ) -> Result<(), fidl::Error> {
9413        self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
9414            result,
9415            self.tx_id,
9416            0x3d4396a638ea053b,
9417            fidl::encoding::DynamicFlags::empty(),
9418        )
9419    }
9420}
9421
9422#[must_use = "FIDL methods require a response to be sent"]
9423#[derive(Debug)]
9424pub struct FileUpdateAttributesResponder {
9425    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9426    tx_id: u32,
9427}
9428
9429/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9430/// if the responder is dropped without sending a response, so that the client
9431/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9432impl std::ops::Drop for FileUpdateAttributesResponder {
9433    fn drop(&mut self) {
9434        self.control_handle.shutdown();
9435        // Safety: drops once, never accessed again
9436        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9437    }
9438}
9439
9440impl fdomain_client::fidl::Responder for FileUpdateAttributesResponder {
9441    type ControlHandle = FileControlHandle;
9442
9443    fn control_handle(&self) -> &FileControlHandle {
9444        &self.control_handle
9445    }
9446
9447    fn drop_without_shutdown(mut self) {
9448        // Safety: drops once, never accessed again due to mem::forget
9449        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9450        // Prevent Drop from running (which would shut down the channel)
9451        std::mem::forget(self);
9452    }
9453}
9454
9455impl FileUpdateAttributesResponder {
9456    /// Sends a response to the FIDL transaction.
9457    ///
9458    /// Sets the channel to shutdown if an error occurs.
9459    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9460        let _result = self.send_raw(result);
9461        if _result.is_err() {
9462            self.control_handle.shutdown();
9463        }
9464        self.drop_without_shutdown();
9465        _result
9466    }
9467
9468    /// Similar to "send" but does not shutdown the channel if an error occurs.
9469    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9470        let _result = self.send_raw(result);
9471        self.drop_without_shutdown();
9472        _result
9473    }
9474
9475    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9476        self.control_handle
9477            .inner
9478            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9479                result,
9480                self.tx_id,
9481                0x3308c1da5a89bf08,
9482                fidl::encoding::DynamicFlags::empty(),
9483            )
9484    }
9485}
9486
9487#[must_use = "FIDL methods require a response to be sent"]
9488#[derive(Debug)]
9489pub struct FileSyncResponder {
9490    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9491    tx_id: u32,
9492}
9493
9494/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9495/// if the responder is dropped without sending a response, so that the client
9496/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9497impl std::ops::Drop for FileSyncResponder {
9498    fn drop(&mut self) {
9499        self.control_handle.shutdown();
9500        // Safety: drops once, never accessed again
9501        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9502    }
9503}
9504
9505impl fdomain_client::fidl::Responder for FileSyncResponder {
9506    type ControlHandle = FileControlHandle;
9507
9508    fn control_handle(&self) -> &FileControlHandle {
9509        &self.control_handle
9510    }
9511
9512    fn drop_without_shutdown(mut self) {
9513        // Safety: drops once, never accessed again due to mem::forget
9514        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9515        // Prevent Drop from running (which would shut down the channel)
9516        std::mem::forget(self);
9517    }
9518}
9519
9520impl FileSyncResponder {
9521    /// Sends a response to the FIDL transaction.
9522    ///
9523    /// Sets the channel to shutdown if an error occurs.
9524    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9525        let _result = self.send_raw(result);
9526        if _result.is_err() {
9527            self.control_handle.shutdown();
9528        }
9529        self.drop_without_shutdown();
9530        _result
9531    }
9532
9533    /// Similar to "send" but does not shutdown the channel if an error occurs.
9534    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9535        let _result = self.send_raw(result);
9536        self.drop_without_shutdown();
9537        _result
9538    }
9539
9540    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9541        self.control_handle
9542            .inner
9543            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9544                result,
9545                self.tx_id,
9546                0x2c5c27ca0ab5dc49,
9547                fidl::encoding::DynamicFlags::empty(),
9548            )
9549    }
9550}
9551
9552#[must_use = "FIDL methods require a response to be sent"]
9553#[derive(Debug)]
9554pub struct FileGetExtendedAttributeResponder {
9555    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9556    tx_id: u32,
9557}
9558
9559/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9560/// if the responder is dropped without sending a response, so that the client
9561/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9562impl std::ops::Drop for FileGetExtendedAttributeResponder {
9563    fn drop(&mut self) {
9564        self.control_handle.shutdown();
9565        // Safety: drops once, never accessed again
9566        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9567    }
9568}
9569
9570impl fdomain_client::fidl::Responder for FileGetExtendedAttributeResponder {
9571    type ControlHandle = FileControlHandle;
9572
9573    fn control_handle(&self) -> &FileControlHandle {
9574        &self.control_handle
9575    }
9576
9577    fn drop_without_shutdown(mut self) {
9578        // Safety: drops once, never accessed again due to mem::forget
9579        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9580        // Prevent Drop from running (which would shut down the channel)
9581        std::mem::forget(self);
9582    }
9583}
9584
9585impl FileGetExtendedAttributeResponder {
9586    /// Sends a response to the FIDL transaction.
9587    ///
9588    /// Sets the channel to shutdown if an error occurs.
9589    pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9590        let _result = self.send_raw(result);
9591        if _result.is_err() {
9592            self.control_handle.shutdown();
9593        }
9594        self.drop_without_shutdown();
9595        _result
9596    }
9597
9598    /// Similar to "send" but does not shutdown the channel if an error occurs.
9599    pub fn send_no_shutdown_on_err(
9600        self,
9601        mut result: Result<ExtendedAttributeValue, i32>,
9602    ) -> Result<(), fidl::Error> {
9603        let _result = self.send_raw(result);
9604        self.drop_without_shutdown();
9605        _result
9606    }
9607
9608    fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
9609        self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
9610            result.as_mut().map_err(|e| *e),
9611            self.tx_id,
9612            0x45ffa3ccfdeb76db,
9613            fidl::encoding::DynamicFlags::empty(),
9614        )
9615    }
9616}
9617
9618#[must_use = "FIDL methods require a response to be sent"]
9619#[derive(Debug)]
9620pub struct FileSetExtendedAttributeResponder {
9621    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9622    tx_id: u32,
9623}
9624
9625/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9626/// if the responder is dropped without sending a response, so that the client
9627/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9628impl std::ops::Drop for FileSetExtendedAttributeResponder {
9629    fn drop(&mut self) {
9630        self.control_handle.shutdown();
9631        // Safety: drops once, never accessed again
9632        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9633    }
9634}
9635
9636impl fdomain_client::fidl::Responder for FileSetExtendedAttributeResponder {
9637    type ControlHandle = FileControlHandle;
9638
9639    fn control_handle(&self) -> &FileControlHandle {
9640        &self.control_handle
9641    }
9642
9643    fn drop_without_shutdown(mut self) {
9644        // Safety: drops once, never accessed again due to mem::forget
9645        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9646        // Prevent Drop from running (which would shut down the channel)
9647        std::mem::forget(self);
9648    }
9649}
9650
9651impl FileSetExtendedAttributeResponder {
9652    /// Sends a response to the FIDL transaction.
9653    ///
9654    /// Sets the channel to shutdown if an error occurs.
9655    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9656        let _result = self.send_raw(result);
9657        if _result.is_err() {
9658            self.control_handle.shutdown();
9659        }
9660        self.drop_without_shutdown();
9661        _result
9662    }
9663
9664    /// Similar to "send" but does not shutdown the channel if an error occurs.
9665    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9666        let _result = self.send_raw(result);
9667        self.drop_without_shutdown();
9668        _result
9669    }
9670
9671    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9672        self.control_handle
9673            .inner
9674            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9675                result,
9676                self.tx_id,
9677                0x4a951362f681f23c,
9678                fidl::encoding::DynamicFlags::empty(),
9679            )
9680    }
9681}
9682
9683#[must_use = "FIDL methods require a response to be sent"]
9684#[derive(Debug)]
9685pub struct FileRemoveExtendedAttributeResponder {
9686    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9687    tx_id: u32,
9688}
9689
9690/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9691/// if the responder is dropped without sending a response, so that the client
9692/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9693impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
9694    fn drop(&mut self) {
9695        self.control_handle.shutdown();
9696        // Safety: drops once, never accessed again
9697        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9698    }
9699}
9700
9701impl fdomain_client::fidl::Responder for FileRemoveExtendedAttributeResponder {
9702    type ControlHandle = FileControlHandle;
9703
9704    fn control_handle(&self) -> &FileControlHandle {
9705        &self.control_handle
9706    }
9707
9708    fn drop_without_shutdown(mut self) {
9709        // Safety: drops once, never accessed again due to mem::forget
9710        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9711        // Prevent Drop from running (which would shut down the channel)
9712        std::mem::forget(self);
9713    }
9714}
9715
9716impl FileRemoveExtendedAttributeResponder {
9717    /// Sends a response to the FIDL transaction.
9718    ///
9719    /// Sets the channel to shutdown if an error occurs.
9720    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9721        let _result = self.send_raw(result);
9722        if _result.is_err() {
9723            self.control_handle.shutdown();
9724        }
9725        self.drop_without_shutdown();
9726        _result
9727    }
9728
9729    /// Similar to "send" but does not shutdown the channel if an error occurs.
9730    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9731        let _result = self.send_raw(result);
9732        self.drop_without_shutdown();
9733        _result
9734    }
9735
9736    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
9737        self.control_handle
9738            .inner
9739            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
9740                result,
9741                self.tx_id,
9742                0x7a0b9f3a9bf9032d,
9743                fidl::encoding::DynamicFlags::empty(),
9744            )
9745    }
9746}
9747
9748#[must_use = "FIDL methods require a response to be sent"]
9749#[derive(Debug)]
9750pub struct FileReadResponder {
9751    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9752    tx_id: u32,
9753}
9754
9755/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9756/// if the responder is dropped without sending a response, so that the client
9757/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9758impl std::ops::Drop for FileReadResponder {
9759    fn drop(&mut self) {
9760        self.control_handle.shutdown();
9761        // Safety: drops once, never accessed again
9762        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9763    }
9764}
9765
9766impl fdomain_client::fidl::Responder for FileReadResponder {
9767    type ControlHandle = FileControlHandle;
9768
9769    fn control_handle(&self) -> &FileControlHandle {
9770        &self.control_handle
9771    }
9772
9773    fn drop_without_shutdown(mut self) {
9774        // Safety: drops once, never accessed again due to mem::forget
9775        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9776        // Prevent Drop from running (which would shut down the channel)
9777        std::mem::forget(self);
9778    }
9779}
9780
9781impl FileReadResponder {
9782    /// Sends a response to the FIDL transaction.
9783    ///
9784    /// Sets the channel to shutdown if an error occurs.
9785    pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9786        let _result = self.send_raw(result);
9787        if _result.is_err() {
9788            self.control_handle.shutdown();
9789        }
9790        self.drop_without_shutdown();
9791        _result
9792    }
9793
9794    /// Similar to "send" but does not shutdown the channel if an error occurs.
9795    pub fn send_no_shutdown_on_err(
9796        self,
9797        mut result: Result<&[u8], i32>,
9798    ) -> Result<(), fidl::Error> {
9799        let _result = self.send_raw(result);
9800        self.drop_without_shutdown();
9801        _result
9802    }
9803
9804    fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
9805        self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
9806            result.map(|data| (data,)),
9807            self.tx_id,
9808            0x57e419a298c8ede,
9809            fidl::encoding::DynamicFlags::empty(),
9810        )
9811    }
9812}
9813
9814#[must_use = "FIDL methods require a response to be sent"]
9815#[derive(Debug)]
9816pub struct FileWriteResponder {
9817    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9818    tx_id: u32,
9819}
9820
9821/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9822/// if the responder is dropped without sending a response, so that the client
9823/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9824impl std::ops::Drop for FileWriteResponder {
9825    fn drop(&mut self) {
9826        self.control_handle.shutdown();
9827        // Safety: drops once, never accessed again
9828        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9829    }
9830}
9831
9832impl fdomain_client::fidl::Responder for FileWriteResponder {
9833    type ControlHandle = FileControlHandle;
9834
9835    fn control_handle(&self) -> &FileControlHandle {
9836        &self.control_handle
9837    }
9838
9839    fn drop_without_shutdown(mut self) {
9840        // Safety: drops once, never accessed again due to mem::forget
9841        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9842        // Prevent Drop from running (which would shut down the channel)
9843        std::mem::forget(self);
9844    }
9845}
9846
9847impl FileWriteResponder {
9848    /// Sends a response to the FIDL transaction.
9849    ///
9850    /// Sets the channel to shutdown if an error occurs.
9851    pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9852        let _result = self.send_raw(result);
9853        if _result.is_err() {
9854            self.control_handle.shutdown();
9855        }
9856        self.drop_without_shutdown();
9857        _result
9858    }
9859
9860    /// Similar to "send" but does not shutdown the channel if an error occurs.
9861    pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9862        let _result = self.send_raw(result);
9863        self.drop_without_shutdown();
9864        _result
9865    }
9866
9867    fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9868        self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
9869            result.map(|actual_count| (actual_count,)),
9870            self.tx_id,
9871            0x6a31437832469f82,
9872            fidl::encoding::DynamicFlags::empty(),
9873        )
9874    }
9875}
9876
9877#[must_use = "FIDL methods require a response to be sent"]
9878#[derive(Debug)]
9879pub struct FileDescribeResponder {
9880    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9881    tx_id: u32,
9882}
9883
9884/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9885/// if the responder is dropped without sending a response, so that the client
9886/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9887impl std::ops::Drop for FileDescribeResponder {
9888    fn drop(&mut self) {
9889        self.control_handle.shutdown();
9890        // Safety: drops once, never accessed again
9891        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9892    }
9893}
9894
9895impl fdomain_client::fidl::Responder for FileDescribeResponder {
9896    type ControlHandle = FileControlHandle;
9897
9898    fn control_handle(&self) -> &FileControlHandle {
9899        &self.control_handle
9900    }
9901
9902    fn drop_without_shutdown(mut self) {
9903        // Safety: drops once, never accessed again due to mem::forget
9904        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9905        // Prevent Drop from running (which would shut down the channel)
9906        std::mem::forget(self);
9907    }
9908}
9909
9910impl FileDescribeResponder {
9911    /// Sends a response to the FIDL transaction.
9912    ///
9913    /// Sets the channel to shutdown if an error occurs.
9914    pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9915        let _result = self.send_raw(payload);
9916        if _result.is_err() {
9917            self.control_handle.shutdown();
9918        }
9919        self.drop_without_shutdown();
9920        _result
9921    }
9922
9923    /// Similar to "send" but does not shutdown the channel if an error occurs.
9924    pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9925        let _result = self.send_raw(payload);
9926        self.drop_without_shutdown();
9927        _result
9928    }
9929
9930    fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
9931        self.control_handle.inner.send::<FileInfo>(
9932            &mut payload,
9933            self.tx_id,
9934            0x68b5ac00c62906bc,
9935            fidl::encoding::DynamicFlags::empty(),
9936        )
9937    }
9938}
9939
9940#[must_use = "FIDL methods require a response to be sent"]
9941#[derive(Debug)]
9942pub struct FileSeekResponder {
9943    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
9944    tx_id: u32,
9945}
9946
9947/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
9948/// if the responder is dropped without sending a response, so that the client
9949/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
9950impl std::ops::Drop for FileSeekResponder {
9951    fn drop(&mut self) {
9952        self.control_handle.shutdown();
9953        // Safety: drops once, never accessed again
9954        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9955    }
9956}
9957
9958impl fdomain_client::fidl::Responder for FileSeekResponder {
9959    type ControlHandle = FileControlHandle;
9960
9961    fn control_handle(&self) -> &FileControlHandle {
9962        &self.control_handle
9963    }
9964
9965    fn drop_without_shutdown(mut self) {
9966        // Safety: drops once, never accessed again due to mem::forget
9967        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
9968        // Prevent Drop from running (which would shut down the channel)
9969        std::mem::forget(self);
9970    }
9971}
9972
9973impl FileSeekResponder {
9974    /// Sends a response to the FIDL transaction.
9975    ///
9976    /// Sets the channel to shutdown if an error occurs.
9977    pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9978        let _result = self.send_raw(result);
9979        if _result.is_err() {
9980            self.control_handle.shutdown();
9981        }
9982        self.drop_without_shutdown();
9983        _result
9984    }
9985
9986    /// Similar to "send" but does not shutdown the channel if an error occurs.
9987    pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9988        let _result = self.send_raw(result);
9989        self.drop_without_shutdown();
9990        _result
9991    }
9992
9993    fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
9994        self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
9995            result.map(|offset_from_start| (offset_from_start,)),
9996            self.tx_id,
9997            0x78079168162c5207,
9998            fidl::encoding::DynamicFlags::empty(),
9999        )
10000    }
10001}
10002
10003#[must_use = "FIDL methods require a response to be sent"]
10004#[derive(Debug)]
10005pub struct FileReadAtResponder {
10006    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10007    tx_id: u32,
10008}
10009
10010/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10011/// if the responder is dropped without sending a response, so that the client
10012/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10013impl std::ops::Drop for FileReadAtResponder {
10014    fn drop(&mut self) {
10015        self.control_handle.shutdown();
10016        // Safety: drops once, never accessed again
10017        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10018    }
10019}
10020
10021impl fdomain_client::fidl::Responder for FileReadAtResponder {
10022    type ControlHandle = FileControlHandle;
10023
10024    fn control_handle(&self) -> &FileControlHandle {
10025        &self.control_handle
10026    }
10027
10028    fn drop_without_shutdown(mut self) {
10029        // Safety: drops once, never accessed again due to mem::forget
10030        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10031        // Prevent Drop from running (which would shut down the channel)
10032        std::mem::forget(self);
10033    }
10034}
10035
10036impl FileReadAtResponder {
10037    /// Sends a response to the FIDL transaction.
10038    ///
10039    /// Sets the channel to shutdown if an error occurs.
10040    pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10041        let _result = self.send_raw(result);
10042        if _result.is_err() {
10043            self.control_handle.shutdown();
10044        }
10045        self.drop_without_shutdown();
10046        _result
10047    }
10048
10049    /// Similar to "send" but does not shutdown the channel if an error occurs.
10050    pub fn send_no_shutdown_on_err(
10051        self,
10052        mut result: Result<&[u8], i32>,
10053    ) -> Result<(), fidl::Error> {
10054        let _result = self.send_raw(result);
10055        self.drop_without_shutdown();
10056        _result
10057    }
10058
10059    fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
10060        self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
10061            result.map(|data| (data,)),
10062            self.tx_id,
10063            0x1607a293a60d723e,
10064            fidl::encoding::DynamicFlags::empty(),
10065        )
10066    }
10067}
10068
10069#[must_use = "FIDL methods require a response to be sent"]
10070#[derive(Debug)]
10071pub struct FileWriteAtResponder {
10072    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10073    tx_id: u32,
10074}
10075
10076/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10077/// if the responder is dropped without sending a response, so that the client
10078/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10079impl std::ops::Drop for FileWriteAtResponder {
10080    fn drop(&mut self) {
10081        self.control_handle.shutdown();
10082        // Safety: drops once, never accessed again
10083        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10084    }
10085}
10086
10087impl fdomain_client::fidl::Responder for FileWriteAtResponder {
10088    type ControlHandle = FileControlHandle;
10089
10090    fn control_handle(&self) -> &FileControlHandle {
10091        &self.control_handle
10092    }
10093
10094    fn drop_without_shutdown(mut self) {
10095        // Safety: drops once, never accessed again due to mem::forget
10096        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10097        // Prevent Drop from running (which would shut down the channel)
10098        std::mem::forget(self);
10099    }
10100}
10101
10102impl FileWriteAtResponder {
10103    /// Sends a response to the FIDL transaction.
10104    ///
10105    /// Sets the channel to shutdown if an error occurs.
10106    pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10107        let _result = self.send_raw(result);
10108        if _result.is_err() {
10109            self.control_handle.shutdown();
10110        }
10111        self.drop_without_shutdown();
10112        _result
10113    }
10114
10115    /// Similar to "send" but does not shutdown the channel if an error occurs.
10116    pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10117        let _result = self.send_raw(result);
10118        self.drop_without_shutdown();
10119        _result
10120    }
10121
10122    fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
10123        self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
10124            result.map(|actual_count| (actual_count,)),
10125            self.tx_id,
10126            0x793eefc0045e792b,
10127            fidl::encoding::DynamicFlags::empty(),
10128        )
10129    }
10130}
10131
10132#[must_use = "FIDL methods require a response to be sent"]
10133#[derive(Debug)]
10134pub struct FileResizeResponder {
10135    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10136    tx_id: u32,
10137}
10138
10139/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10140/// if the responder is dropped without sending a response, so that the client
10141/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10142impl std::ops::Drop for FileResizeResponder {
10143    fn drop(&mut self) {
10144        self.control_handle.shutdown();
10145        // Safety: drops once, never accessed again
10146        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10147    }
10148}
10149
10150impl fdomain_client::fidl::Responder for FileResizeResponder {
10151    type ControlHandle = FileControlHandle;
10152
10153    fn control_handle(&self) -> &FileControlHandle {
10154        &self.control_handle
10155    }
10156
10157    fn drop_without_shutdown(mut self) {
10158        // Safety: drops once, never accessed again due to mem::forget
10159        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10160        // Prevent Drop from running (which would shut down the channel)
10161        std::mem::forget(self);
10162    }
10163}
10164
10165impl FileResizeResponder {
10166    /// Sends a response to the FIDL transaction.
10167    ///
10168    /// Sets the channel to shutdown if an error occurs.
10169    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10170        let _result = self.send_raw(result);
10171        if _result.is_err() {
10172            self.control_handle.shutdown();
10173        }
10174        self.drop_without_shutdown();
10175        _result
10176    }
10177
10178    /// Similar to "send" but does not shutdown the channel if an error occurs.
10179    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10180        let _result = self.send_raw(result);
10181        self.drop_without_shutdown();
10182        _result
10183    }
10184
10185    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10186        self.control_handle
10187            .inner
10188            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10189                result,
10190                self.tx_id,
10191                0x2b80825f0535743a,
10192                fidl::encoding::DynamicFlags::empty(),
10193            )
10194    }
10195}
10196
10197#[must_use = "FIDL methods require a response to be sent"]
10198#[derive(Debug)]
10199pub struct FileGetBackingMemoryResponder {
10200    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10201    tx_id: u32,
10202}
10203
10204/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10205/// if the responder is dropped without sending a response, so that the client
10206/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10207impl std::ops::Drop for FileGetBackingMemoryResponder {
10208    fn drop(&mut self) {
10209        self.control_handle.shutdown();
10210        // Safety: drops once, never accessed again
10211        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10212    }
10213}
10214
10215impl fdomain_client::fidl::Responder for FileGetBackingMemoryResponder {
10216    type ControlHandle = FileControlHandle;
10217
10218    fn control_handle(&self) -> &FileControlHandle {
10219        &self.control_handle
10220    }
10221
10222    fn drop_without_shutdown(mut self) {
10223        // Safety: drops once, never accessed again due to mem::forget
10224        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10225        // Prevent Drop from running (which would shut down the channel)
10226        std::mem::forget(self);
10227    }
10228}
10229
10230impl FileGetBackingMemoryResponder {
10231    /// Sends a response to the FIDL transaction.
10232    ///
10233    /// Sets the channel to shutdown if an error occurs.
10234    pub fn send(self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10235        let _result = self.send_raw(result);
10236        if _result.is_err() {
10237            self.control_handle.shutdown();
10238        }
10239        self.drop_without_shutdown();
10240        _result
10241    }
10242
10243    /// Similar to "send" but does not shutdown the channel if an error occurs.
10244    pub fn send_no_shutdown_on_err(
10245        self,
10246        mut result: Result<fdomain_client::Vmo, i32>,
10247    ) -> Result<(), fidl::Error> {
10248        let _result = self.send_raw(result);
10249        self.drop_without_shutdown();
10250        _result
10251    }
10252
10253    fn send_raw(&self, mut result: Result<fdomain_client::Vmo, i32>) -> Result<(), fidl::Error> {
10254        self.control_handle
10255            .inner
10256            .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
10257                result.map(|vmo| (vmo,)),
10258                self.tx_id,
10259                0xa6a9e654cbf62b,
10260                fidl::encoding::DynamicFlags::empty(),
10261            )
10262    }
10263}
10264
10265#[must_use = "FIDL methods require a response to be sent"]
10266#[derive(Debug)]
10267pub struct FileAllocateResponder {
10268    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10269    tx_id: u32,
10270}
10271
10272/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10273/// if the responder is dropped without sending a response, so that the client
10274/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10275impl std::ops::Drop for FileAllocateResponder {
10276    fn drop(&mut self) {
10277        self.control_handle.shutdown();
10278        // Safety: drops once, never accessed again
10279        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10280    }
10281}
10282
10283impl fdomain_client::fidl::Responder for FileAllocateResponder {
10284    type ControlHandle = FileControlHandle;
10285
10286    fn control_handle(&self) -> &FileControlHandle {
10287        &self.control_handle
10288    }
10289
10290    fn drop_without_shutdown(mut self) {
10291        // Safety: drops once, never accessed again due to mem::forget
10292        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10293        // Prevent Drop from running (which would shut down the channel)
10294        std::mem::forget(self);
10295    }
10296}
10297
10298impl FileAllocateResponder {
10299    /// Sends a response to the FIDL transaction.
10300    ///
10301    /// Sets the channel to shutdown if an error occurs.
10302    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10303        let _result = self.send_raw(result);
10304        if _result.is_err() {
10305            self.control_handle.shutdown();
10306        }
10307        self.drop_without_shutdown();
10308        _result
10309    }
10310
10311    /// Similar to "send" but does not shutdown the channel if an error occurs.
10312    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10313        let _result = self.send_raw(result);
10314        self.drop_without_shutdown();
10315        _result
10316    }
10317
10318    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10319        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10320            fidl::encoding::EmptyStruct,
10321            i32,
10322        >>(
10323            fidl::encoding::FlexibleResult::new(result),
10324            self.tx_id,
10325            0x77fa0c330b57fd2e,
10326            fidl::encoding::DynamicFlags::FLEXIBLE,
10327        )
10328    }
10329}
10330
10331#[must_use = "FIDL methods require a response to be sent"]
10332#[derive(Debug)]
10333pub struct FileEnableVerityResponder {
10334    control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10335    tx_id: u32,
10336}
10337
10338/// Set the the channel to be shutdown (see [`FileControlHandle::shutdown`])
10339/// if the responder is dropped without sending a response, so that the client
10340/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10341impl std::ops::Drop for FileEnableVerityResponder {
10342    fn drop(&mut self) {
10343        self.control_handle.shutdown();
10344        // Safety: drops once, never accessed again
10345        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10346    }
10347}
10348
10349impl fdomain_client::fidl::Responder for FileEnableVerityResponder {
10350    type ControlHandle = FileControlHandle;
10351
10352    fn control_handle(&self) -> &FileControlHandle {
10353        &self.control_handle
10354    }
10355
10356    fn drop_without_shutdown(mut self) {
10357        // Safety: drops once, never accessed again due to mem::forget
10358        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10359        // Prevent Drop from running (which would shut down the channel)
10360        std::mem::forget(self);
10361    }
10362}
10363
10364impl FileEnableVerityResponder {
10365    /// Sends a response to the FIDL transaction.
10366    ///
10367    /// Sets the channel to shutdown if an error occurs.
10368    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10369        let _result = self.send_raw(result);
10370        if _result.is_err() {
10371            self.control_handle.shutdown();
10372        }
10373        self.drop_without_shutdown();
10374        _result
10375    }
10376
10377    /// Similar to "send" but does not shutdown the channel if an error occurs.
10378    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10379        let _result = self.send_raw(result);
10380        self.drop_without_shutdown();
10381        _result
10382    }
10383
10384    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10385        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
10386            fidl::encoding::EmptyStruct,
10387            i32,
10388        >>(
10389            fidl::encoding::FlexibleResult::new(result),
10390            self.tx_id,
10391            0x2c421ec3faaeb8bb,
10392            fidl::encoding::DynamicFlags::FLEXIBLE,
10393        )
10394    }
10395}
10396
10397#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10398pub struct LinkableMarker;
10399
10400impl fdomain_client::fidl::ProtocolMarker for LinkableMarker {
10401    type Proxy = LinkableProxy;
10402    type RequestStream = LinkableRequestStream;
10403
10404    const DEBUG_NAME: &'static str = "(anonymous) Linkable";
10405}
10406pub type LinkableLinkIntoResult = Result<(), i32>;
10407
10408pub trait LinkableProxyInterface: Send + Sync {
10409    type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
10410        + Send;
10411    fn r#link_into(
10412        &self,
10413        dst_parent_token: fdomain_client::Event,
10414        dst: &str,
10415    ) -> Self::LinkIntoResponseFut;
10416}
10417
10418#[derive(Debug, Clone)]
10419pub struct LinkableProxy {
10420    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10421}
10422
10423impl fdomain_client::fidl::Proxy for LinkableProxy {
10424    type Protocol = LinkableMarker;
10425
10426    fn from_channel(inner: fdomain_client::Channel) -> Self {
10427        Self::new(inner)
10428    }
10429
10430    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10431        self.client.into_channel().map_err(|client| Self { client })
10432    }
10433
10434    fn as_channel(&self) -> &fdomain_client::Channel {
10435        self.client.as_channel()
10436    }
10437}
10438
10439impl LinkableProxy {
10440    /// Create a new Proxy for fuchsia.io/Linkable.
10441    pub fn new(channel: fdomain_client::Channel) -> Self {
10442        let protocol_name = <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10443        Self { client: fidl::client::Client::new(channel, protocol_name) }
10444    }
10445
10446    /// Get a Stream of events from the remote end of the protocol.
10447    ///
10448    /// # Panics
10449    ///
10450    /// Panics if the event stream was already taken.
10451    pub fn take_event_stream(&self) -> LinkableEventStream {
10452        LinkableEventStream { event_receiver: self.client.take_event_receiver() }
10453    }
10454
10455    /// Creates a link to this this object with name `dst` in the directory represented by
10456    /// `dst_parent_token`.
10457    ///
10458    /// `dst` must be a resolved object name. Including "/" in the string will return
10459    /// `ZX_ERR_INVALID_ARGS`.
10460    ///
10461    /// This method requires the maximal set of rights supported by the filesystem for this object.
10462    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
10463    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
10464    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
10465    /// `ZX_ERR_ACCESS_DENIED`.
10466    ///
10467    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
10468    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
10469    ///
10470    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
10471    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
10472    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
10473    ///
10474    /// This method does not have the same atomicity properties has the `Directory::Link` method,
10475    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
10476    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
10477    pub fn r#link_into(
10478        &self,
10479        mut dst_parent_token: fdomain_client::Event,
10480        mut dst: &str,
10481    ) -> fidl::client::QueryResponseFut<
10482        LinkableLinkIntoResult,
10483        fdomain_client::fidl::FDomainResourceDialect,
10484    > {
10485        LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
10486    }
10487}
10488
10489impl LinkableProxyInterface for LinkableProxy {
10490    type LinkIntoResponseFut = fidl::client::QueryResponseFut<
10491        LinkableLinkIntoResult,
10492        fdomain_client::fidl::FDomainResourceDialect,
10493    >;
10494    fn r#link_into(
10495        &self,
10496        mut dst_parent_token: fdomain_client::Event,
10497        mut dst: &str,
10498    ) -> Self::LinkIntoResponseFut {
10499        fn _decode(
10500            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
10501        ) -> Result<LinkableLinkIntoResult, fidl::Error> {
10502            let _response = fidl::client::decode_transaction_body::<
10503                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
10504                fdomain_client::fidl::FDomainResourceDialect,
10505                0x54f3949246a03e74,
10506            >(_buf?)?;
10507            Ok(_response.map(|x| x))
10508        }
10509        self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
10510            (dst_parent_token, dst),
10511            0x54f3949246a03e74,
10512            fidl::encoding::DynamicFlags::empty(),
10513            _decode,
10514        )
10515    }
10516}
10517
10518pub struct LinkableEventStream {
10519    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
10520}
10521
10522impl std::marker::Unpin for LinkableEventStream {}
10523
10524impl futures::stream::FusedStream for LinkableEventStream {
10525    fn is_terminated(&self) -> bool {
10526        self.event_receiver.is_terminated()
10527    }
10528}
10529
10530impl futures::Stream for LinkableEventStream {
10531    type Item = Result<LinkableEvent, fidl::Error>;
10532
10533    fn poll_next(
10534        mut self: std::pin::Pin<&mut Self>,
10535        cx: &mut std::task::Context<'_>,
10536    ) -> std::task::Poll<Option<Self::Item>> {
10537        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
10538            &mut self.event_receiver,
10539            cx
10540        )?) {
10541            Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
10542            None => std::task::Poll::Ready(None),
10543        }
10544    }
10545}
10546
10547#[derive(Debug)]
10548pub enum LinkableEvent {}
10549
10550impl LinkableEvent {
10551    /// Decodes a message buffer as a [`LinkableEvent`].
10552    fn decode(
10553        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
10554    ) -> Result<LinkableEvent, fidl::Error> {
10555        let (bytes, _handles) = buf.split_mut();
10556        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10557        debug_assert_eq!(tx_header.tx_id, 0);
10558        match tx_header.ordinal {
10559            _ => Err(fidl::Error::UnknownOrdinal {
10560                ordinal: tx_header.ordinal,
10561                protocol_name: <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10562            }),
10563        }
10564    }
10565}
10566
10567/// A Stream of incoming requests for fuchsia.io/Linkable.
10568pub struct LinkableRequestStream {
10569    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10570    is_terminated: bool,
10571}
10572
10573impl std::marker::Unpin for LinkableRequestStream {}
10574
10575impl futures::stream::FusedStream for LinkableRequestStream {
10576    fn is_terminated(&self) -> bool {
10577        self.is_terminated
10578    }
10579}
10580
10581impl fdomain_client::fidl::RequestStream for LinkableRequestStream {
10582    type Protocol = LinkableMarker;
10583    type ControlHandle = LinkableControlHandle;
10584
10585    fn from_channel(channel: fdomain_client::Channel) -> Self {
10586        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
10587    }
10588
10589    fn control_handle(&self) -> Self::ControlHandle {
10590        LinkableControlHandle { inner: self.inner.clone() }
10591    }
10592
10593    fn into_inner(
10594        self,
10595    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
10596    {
10597        (self.inner, self.is_terminated)
10598    }
10599
10600    fn from_inner(
10601        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10602        is_terminated: bool,
10603    ) -> Self {
10604        Self { inner, is_terminated }
10605    }
10606}
10607
10608impl futures::Stream for LinkableRequestStream {
10609    type Item = Result<LinkableRequest, fidl::Error>;
10610
10611    fn poll_next(
10612        mut self: std::pin::Pin<&mut Self>,
10613        cx: &mut std::task::Context<'_>,
10614    ) -> std::task::Poll<Option<Self::Item>> {
10615        let this = &mut *self;
10616        if this.inner.check_shutdown(cx) {
10617            this.is_terminated = true;
10618            return std::task::Poll::Ready(None);
10619        }
10620        if this.is_terminated {
10621            panic!("polled LinkableRequestStream after completion");
10622        }
10623        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
10624            |bytes, handles| {
10625                match this.inner.channel().read_etc(cx, bytes, handles) {
10626                    std::task::Poll::Ready(Ok(())) => {}
10627                    std::task::Poll::Pending => return std::task::Poll::Pending,
10628                    std::task::Poll::Ready(Err(None)) => {
10629                        this.is_terminated = true;
10630                        return std::task::Poll::Ready(None);
10631                    }
10632                    std::task::Poll::Ready(Err(Some(e))) => {
10633                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
10634                            e.into(),
10635                        ))));
10636                    }
10637                }
10638
10639                // A message has been received from the channel
10640                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
10641
10642                std::task::Poll::Ready(Some(match header.ordinal {
10643                    0x54f3949246a03e74 => {
10644                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
10645                        let mut req = fidl::new_empty!(
10646                            LinkableLinkIntoRequest,
10647                            fdomain_client::fidl::FDomainResourceDialect
10648                        );
10649                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
10650                        let control_handle = LinkableControlHandle { inner: this.inner.clone() };
10651                        Ok(LinkableRequest::LinkInto {
10652                            dst_parent_token: req.dst_parent_token,
10653                            dst: req.dst,
10654
10655                            responder: LinkableLinkIntoResponder {
10656                                control_handle: std::mem::ManuallyDrop::new(control_handle),
10657                                tx_id: header.tx_id,
10658                            },
10659                        })
10660                    }
10661                    _ => Err(fidl::Error::UnknownOrdinal {
10662                        ordinal: header.ordinal,
10663                        protocol_name:
10664                            <LinkableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
10665                    }),
10666                }))
10667            },
10668        )
10669    }
10670}
10671
10672#[derive(Debug)]
10673pub enum LinkableRequest {
10674    /// Creates a link to this this object with name `dst` in the directory represented by
10675    /// `dst_parent_token`.
10676    ///
10677    /// `dst` must be a resolved object name. Including "/" in the string will return
10678    /// `ZX_ERR_INVALID_ARGS`.
10679    ///
10680    /// This method requires the maximal set of rights supported by the filesystem for this object.
10681    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
10682    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
10683    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
10684    /// `ZX_ERR_ACCESS_DENIED`.
10685    ///
10686    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
10687    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
10688    ///
10689    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
10690    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
10691    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
10692    ///
10693    /// This method does not have the same atomicity properties has the `Directory::Link` method,
10694    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
10695    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
10696    LinkInto {
10697        dst_parent_token: fdomain_client::Event,
10698        dst: String,
10699        responder: LinkableLinkIntoResponder,
10700    },
10701}
10702
10703impl LinkableRequest {
10704    #[allow(irrefutable_let_patterns)]
10705    pub fn into_link_into(
10706        self,
10707    ) -> Option<(fdomain_client::Event, String, LinkableLinkIntoResponder)> {
10708        if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
10709            Some((dst_parent_token, dst, responder))
10710        } else {
10711            None
10712        }
10713    }
10714
10715    /// Name of the method defined in FIDL
10716    pub fn method_name(&self) -> &'static str {
10717        match *self {
10718            LinkableRequest::LinkInto { .. } => "link_into",
10719        }
10720    }
10721}
10722
10723#[derive(Debug, Clone)]
10724pub struct LinkableControlHandle {
10725    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
10726}
10727
10728impl fdomain_client::fidl::ControlHandle for LinkableControlHandle {
10729    fn shutdown(&self) {
10730        self.inner.shutdown()
10731    }
10732
10733    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10734        self.inner.shutdown_with_epitaph(status)
10735    }
10736
10737    fn is_closed(&self) -> bool {
10738        self.inner.channel().is_closed()
10739    }
10740    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
10741        self.inner.channel().on_closed()
10742    }
10743}
10744
10745impl LinkableControlHandle {}
10746
10747#[must_use = "FIDL methods require a response to be sent"]
10748#[derive(Debug)]
10749pub struct LinkableLinkIntoResponder {
10750    control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
10751    tx_id: u32,
10752}
10753
10754/// Set the the channel to be shutdown (see [`LinkableControlHandle::shutdown`])
10755/// if the responder is dropped without sending a response, so that the client
10756/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
10757impl std::ops::Drop for LinkableLinkIntoResponder {
10758    fn drop(&mut self) {
10759        self.control_handle.shutdown();
10760        // Safety: drops once, never accessed again
10761        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10762    }
10763}
10764
10765impl fdomain_client::fidl::Responder for LinkableLinkIntoResponder {
10766    type ControlHandle = LinkableControlHandle;
10767
10768    fn control_handle(&self) -> &LinkableControlHandle {
10769        &self.control_handle
10770    }
10771
10772    fn drop_without_shutdown(mut self) {
10773        // Safety: drops once, never accessed again due to mem::forget
10774        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10775        // Prevent Drop from running (which would shut down the channel)
10776        std::mem::forget(self);
10777    }
10778}
10779
10780impl LinkableLinkIntoResponder {
10781    /// Sends a response to the FIDL transaction.
10782    ///
10783    /// Sets the channel to shutdown if an error occurs.
10784    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10785        let _result = self.send_raw(result);
10786        if _result.is_err() {
10787            self.control_handle.shutdown();
10788        }
10789        self.drop_without_shutdown();
10790        _result
10791    }
10792
10793    /// Similar to "send" but does not shutdown the channel if an error occurs.
10794    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10795        let _result = self.send_raw(result);
10796        self.drop_without_shutdown();
10797        _result
10798    }
10799
10800    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10801        self.control_handle
10802            .inner
10803            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10804                result,
10805                self.tx_id,
10806                0x54f3949246a03e74,
10807                fidl::encoding::DynamicFlags::empty(),
10808            )
10809    }
10810}
10811
10812#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
10813pub struct NodeMarker;
10814
10815impl fdomain_client::fidl::ProtocolMarker for NodeMarker {
10816    type Proxy = NodeProxy;
10817    type RequestStream = NodeRequestStream;
10818
10819    const DEBUG_NAME: &'static str = "fuchsia.io.Node";
10820}
10821impl fdomain_client::fidl::DiscoverableProtocolMarker for NodeMarker {}
10822pub type NodeGetFlagsResult = Result<Flags, i32>;
10823pub type NodeSetFlagsResult = Result<(), i32>;
10824pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
10825pub type NodeUpdateAttributesResult = Result<(), i32>;
10826pub type NodeSyncResult = Result<(), i32>;
10827pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
10828pub type NodeSetExtendedAttributeResult = Result<(), i32>;
10829pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
10830
10831pub trait NodeProxyInterface: Send + Sync {
10832    fn r#clone(
10833        &self,
10834        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10835    ) -> Result<(), fidl::Error>;
10836    type CloseResponseFut: std::future::Future<
10837            Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
10838        > + Send;
10839    fn r#close(&self) -> Self::CloseResponseFut;
10840    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
10841    fn r#query(&self) -> Self::QueryResponseFut;
10842    fn r#deprecated_clone(
10843        &self,
10844        flags: OpenFlags,
10845        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10846    ) -> Result<(), fidl::Error>;
10847    type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
10848        + Send;
10849    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
10850    type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
10851    fn r#deprecated_set_attr(
10852        &self,
10853        flags: NodeAttributeFlags,
10854        attributes: &NodeAttributes,
10855    ) -> Self::DeprecatedSetAttrResponseFut;
10856    type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
10857        + Send;
10858    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
10859    type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
10860        + Send;
10861    fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
10862    type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
10863        + Send;
10864    fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
10865    type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
10866        + Send;
10867    fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
10868    type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
10869        + Send;
10870    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
10871    type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
10872        + Send;
10873    fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
10874    type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
10875        + Send;
10876    fn r#update_attributes(
10877        &self,
10878        payload: &MutableNodeAttributes,
10879    ) -> Self::UpdateAttributesResponseFut;
10880    type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
10881    fn r#sync(&self) -> Self::SyncResponseFut;
10882    fn r#list_extended_attributes(
10883        &self,
10884        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
10885    ) -> Result<(), fidl::Error>;
10886    type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
10887        + Send;
10888    fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
10889    type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
10890        + Send;
10891    fn r#set_extended_attribute(
10892        &self,
10893        name: &[u8],
10894        value: ExtendedAttributeValue,
10895        mode: SetExtendedAttributeMode,
10896    ) -> Self::SetExtendedAttributeResponseFut;
10897    type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
10898        + Send;
10899    fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
10900}
10901
10902#[derive(Debug, Clone)]
10903pub struct NodeProxy {
10904    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
10905}
10906
10907impl fdomain_client::fidl::Proxy for NodeProxy {
10908    type Protocol = NodeMarker;
10909
10910    fn from_channel(inner: fdomain_client::Channel) -> Self {
10911        Self::new(inner)
10912    }
10913
10914    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
10915        self.client.into_channel().map_err(|client| Self { client })
10916    }
10917
10918    fn as_channel(&self) -> &fdomain_client::Channel {
10919        self.client.as_channel()
10920    }
10921}
10922
10923impl NodeProxy {
10924    /// Create a new Proxy for fuchsia.io/Node.
10925    pub fn new(channel: fdomain_client::Channel) -> Self {
10926        let protocol_name = <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
10927        Self { client: fidl::client::Client::new(channel, protocol_name) }
10928    }
10929
10930    /// Get a Stream of events from the remote end of the protocol.
10931    ///
10932    /// # Panics
10933    ///
10934    /// Panics if the event stream was already taken.
10935    pub fn take_event_stream(&self) -> NodeEventStream {
10936        NodeEventStream { event_receiver: self.client.take_event_receiver() }
10937    }
10938
10939    pub fn r#clone(
10940        &self,
10941        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
10942    ) -> Result<(), fidl::Error> {
10943        NodeProxyInterface::r#clone(self, request)
10944    }
10945
10946    /// Terminates the connection.
10947    ///
10948    /// After calling `Close`, the client must not send any other requests.
10949    ///
10950    /// Servers, after sending the status response, should close the connection
10951    /// regardless of status and without sending an epitaph.
10952    ///
10953    /// Closing the client end of the channel should be semantically equivalent
10954    /// to calling `Close` without knowing when the close has completed or its
10955    /// status.
10956    pub fn r#close(
10957        &self,
10958    ) -> fidl::client::QueryResponseFut<
10959        fdomain_fuchsia_unknown::CloseableCloseResult,
10960        fdomain_client::fidl::FDomainResourceDialect,
10961    > {
10962        NodeProxyInterface::r#close(self)
10963    }
10964
10965    pub fn r#query(
10966        &self,
10967    ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
10968        NodeProxyInterface::r#query(self)
10969    }
10970
10971    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
10972    pub fn r#deprecated_clone(
10973        &self,
10974        mut flags: OpenFlags,
10975        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
10976    ) -> Result<(), fidl::Error> {
10977        NodeProxyInterface::r#deprecated_clone(self, flags, object)
10978    }
10979
10980    /// DEPRECATED - Use `Node.GetAttributes` instead.
10981    pub fn r#deprecated_get_attr(
10982        &self,
10983    ) -> fidl::client::QueryResponseFut<
10984        (i32, NodeAttributes),
10985        fdomain_client::fidl::FDomainResourceDialect,
10986    > {
10987        NodeProxyInterface::r#deprecated_get_attr(self)
10988    }
10989
10990    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
10991    pub fn r#deprecated_set_attr(
10992        &self,
10993        mut flags: NodeAttributeFlags,
10994        mut attributes: &NodeAttributes,
10995    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
10996        NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
10997    }
10998
10999    /// [DEPRECATED - Use new GetFlags method instead.]
11000    pub fn r#deprecated_get_flags(
11001        &self,
11002    ) -> fidl::client::QueryResponseFut<
11003        (i32, OpenFlags),
11004        fdomain_client::fidl::FDomainResourceDialect,
11005    > {
11006        NodeProxyInterface::r#deprecated_get_flags(self)
11007    }
11008
11009    /// [DEPRECATED - Use new SetFlags method instead.]
11010    pub fn r#deprecated_set_flags(
11011        &self,
11012        mut flags: OpenFlags,
11013    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
11014        NodeProxyInterface::r#deprecated_set_flags(self, flags)
11015    }
11016
11017    /// Queries the flags that apply to this node after it has been opened/created. This method does
11018    /// not require any rights.
11019    ///
11020    /// Note that the final set of flags that apply to the connection may differ from those
11021    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
11022    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
11023    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
11024    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
11025    pub fn r#get_flags(
11026        &self,
11027    ) -> fidl::client::QueryResponseFut<
11028        NodeGetFlagsResult,
11029        fdomain_client::fidl::FDomainResourceDialect,
11030    > {
11031        NodeProxyInterface::r#get_flags(self)
11032    }
11033
11034    /// Sets the flags that apply to this node after it has been opened. This method does not
11035    /// require any rights.
11036    ///
11037    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
11038    /// clear append mode.
11039    ///
11040    /// Errors:
11041    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
11042    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
11043    pub fn r#set_flags(
11044        &self,
11045        mut flags: Flags,
11046    ) -> fidl::client::QueryResponseFut<
11047        NodeSetFlagsResult,
11048        fdomain_client::fidl::FDomainResourceDialect,
11049    > {
11050        NodeProxyInterface::r#set_flags(self, flags)
11051    }
11052
11053    /// Query the filesystem for details specific to the filesystem and/or volume. If the current
11054    /// volume has different settings or the storage is accounted seperately from the rest of the
11055    /// filesystem that may be reported instead of filesystem-wide details.
11056    pub fn r#query_filesystem(
11057        &self,
11058    ) -> fidl::client::QueryResponseFut<
11059        (i32, Option<Box<FilesystemInfo>>),
11060        fdomain_client::fidl::FDomainResourceDialect,
11061    > {
11062        NodeProxyInterface::r#query_filesystem(self)
11063    }
11064
11065    /// Acquires information about the node.
11066    ///
11067    /// The attributes of a node should be stable, independent of the
11068    /// specific protocol used to access it.
11069    ///
11070    /// If a particular attribute is not applicable or not supported,
11071    /// filesystems should leave the corresponding field absent.
11072    ///
11073    /// + `query` a bit-mask specifying which attributes to fetch. The server
11074    ///   should not return more than necessary.
11075    /// - `attributes` the returned attributes.
11076    ///
11077    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
11078    pub fn r#get_attributes(
11079        &self,
11080        mut query: NodeAttributesQuery,
11081    ) -> fidl::client::QueryResponseFut<
11082        NodeGetAttributesResult,
11083        fdomain_client::fidl::FDomainResourceDialect,
11084    > {
11085        NodeProxyInterface::r#get_attributes(self, query)
11086    }
11087
11088    /// Updates information about the node.
11089    ///
11090    /// + `attributes` the presence of a table field in `attributes` indicates
11091    /// the intent to update the corresponding attribute.
11092    ///
11093    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
11094    ///
11095    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
11096    pub fn r#update_attributes(
11097        &self,
11098        mut payload: &MutableNodeAttributes,
11099    ) -> fidl::client::QueryResponseFut<
11100        NodeUpdateAttributesResult,
11101        fdomain_client::fidl::FDomainResourceDialect,
11102    > {
11103        NodeProxyInterface::r#update_attributes(self, payload)
11104    }
11105
11106    /// Synchronizes updates to the node to the underlying media, if it exists.
11107    ///
11108    /// This method will return when the filesystem server has flushed the
11109    /// relevant updates to the underlying media, but does not guarantee the
11110    /// underlying media has persisted the information, nor that any information
11111    /// is committed to hardware. Clients may use `Sync` to ensure ordering
11112    /// between operations.
11113    ///
11114    /// This method does not require any rights.
11115    pub fn r#sync(
11116        &self,
11117    ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
11118    {
11119        NodeProxyInterface::r#sync(self)
11120    }
11121
11122    /// Creates an iterator over all the extended attribute names associated
11123    /// with this node. If an error occurs it is returned as an epitaph on the
11124    /// iterator request channel, and then the channel is closed.
11125    ///
11126    /// GetExtendedAttributes can be used with any of these names to retrieve
11127    /// the associated value.
11128    ///
11129    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
11130    pub fn r#list_extended_attributes(
11131        &self,
11132        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11133    ) -> Result<(), fidl::Error> {
11134        NodeProxyInterface::r#list_extended_attributes(self, iterator)
11135    }
11136
11137    /// Get the value associated with the given attribute `name` for this node.
11138    ///
11139    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
11140    /// particular structure is imposed on them.
11141    ///
11142    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
11143    pub fn r#get_extended_attribute(
11144        &self,
11145        mut name: &[u8],
11146    ) -> fidl::client::QueryResponseFut<
11147        NodeGetExtendedAttributeResult,
11148        fdomain_client::fidl::FDomainResourceDialect,
11149    > {
11150        NodeProxyInterface::r#get_extended_attribute(self, name)
11151    }
11152
11153    /// Set the value for the given attribute `name` to `value` for this node.
11154    ///
11155    /// The attribute name may exist, in which case the attribute is updated.
11156    /// If the attribute doesn't exist, it is created. The name should have no
11157    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
11158    ///
11159    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
11160    pub fn r#set_extended_attribute(
11161        &self,
11162        mut name: &[u8],
11163        mut value: ExtendedAttributeValue,
11164        mut mode: SetExtendedAttributeMode,
11165    ) -> fidl::client::QueryResponseFut<
11166        NodeSetExtendedAttributeResult,
11167        fdomain_client::fidl::FDomainResourceDialect,
11168    > {
11169        NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
11170    }
11171
11172    /// Remove the specified extended attribute.
11173    ///
11174    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
11175    ///
11176    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
11177    pub fn r#remove_extended_attribute(
11178        &self,
11179        mut name: &[u8],
11180    ) -> fidl::client::QueryResponseFut<
11181        NodeRemoveExtendedAttributeResult,
11182        fdomain_client::fidl::FDomainResourceDialect,
11183    > {
11184        NodeProxyInterface::r#remove_extended_attribute(self, name)
11185    }
11186}
11187
11188impl NodeProxyInterface for NodeProxy {
11189    fn r#clone(
11190        &self,
11191        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
11192    ) -> Result<(), fidl::Error> {
11193        self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
11194            (request,),
11195            0x20d8a7aba2168a79,
11196            fidl::encoding::DynamicFlags::empty(),
11197        )
11198    }
11199
11200    type CloseResponseFut = fidl::client::QueryResponseFut<
11201        fdomain_fuchsia_unknown::CloseableCloseResult,
11202        fdomain_client::fidl::FDomainResourceDialect,
11203    >;
11204    fn r#close(&self) -> Self::CloseResponseFut {
11205        fn _decode(
11206            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11207        ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
11208            let _response = fidl::client::decode_transaction_body::<
11209                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11210                fdomain_client::fidl::FDomainResourceDialect,
11211                0x5ac5d459ad7f657e,
11212            >(_buf?)?;
11213            Ok(_response.map(|x| x))
11214        }
11215        self.client.send_query_and_decode::<
11216            fidl::encoding::EmptyPayload,
11217            fdomain_fuchsia_unknown::CloseableCloseResult,
11218        >(
11219            (),
11220            0x5ac5d459ad7f657e,
11221            fidl::encoding::DynamicFlags::empty(),
11222            _decode,
11223        )
11224    }
11225
11226    type QueryResponseFut =
11227        fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
11228    fn r#query(&self) -> Self::QueryResponseFut {
11229        fn _decode(
11230            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11231        ) -> Result<Vec<u8>, fidl::Error> {
11232            let _response = fidl::client::decode_transaction_body::<
11233                fdomain_fuchsia_unknown::QueryableQueryResponse,
11234                fdomain_client::fidl::FDomainResourceDialect,
11235                0x2658edee9decfc06,
11236            >(_buf?)?;
11237            Ok(_response.protocol)
11238        }
11239        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
11240            (),
11241            0x2658edee9decfc06,
11242            fidl::encoding::DynamicFlags::empty(),
11243            _decode,
11244        )
11245    }
11246
11247    fn r#deprecated_clone(
11248        &self,
11249        mut flags: OpenFlags,
11250        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
11251    ) -> Result<(), fidl::Error> {
11252        self.client.send::<NodeDeprecatedCloneRequest>(
11253            (flags, object),
11254            0x5a61678f293ce16f,
11255            fidl::encoding::DynamicFlags::FLEXIBLE,
11256        )
11257    }
11258
11259    type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
11260        (i32, NodeAttributes),
11261        fdomain_client::fidl::FDomainResourceDialect,
11262    >;
11263    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
11264        fn _decode(
11265            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11266        ) -> Result<(i32, NodeAttributes), fidl::Error> {
11267            let _response = fidl::client::decode_transaction_body::<
11268                NodeDeprecatedGetAttrResponse,
11269                fdomain_client::fidl::FDomainResourceDialect,
11270                0x78985e216314dafd,
11271            >(_buf?)?;
11272            Ok((_response.s, _response.attributes))
11273        }
11274        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
11275            (),
11276            0x78985e216314dafd,
11277            fidl::encoding::DynamicFlags::empty(),
11278            _decode,
11279        )
11280    }
11281
11282    type DeprecatedSetAttrResponseFut =
11283        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11284    fn r#deprecated_set_attr(
11285        &self,
11286        mut flags: NodeAttributeFlags,
11287        mut attributes: &NodeAttributes,
11288    ) -> Self::DeprecatedSetAttrResponseFut {
11289        fn _decode(
11290            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11291        ) -> Result<i32, fidl::Error> {
11292            let _response = fidl::client::decode_transaction_body::<
11293                NodeDeprecatedSetAttrResponse,
11294                fdomain_client::fidl::FDomainResourceDialect,
11295                0x4186c0f40d938f46,
11296            >(_buf?)?;
11297            Ok(_response.s)
11298        }
11299        self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
11300            (flags, attributes),
11301            0x4186c0f40d938f46,
11302            fidl::encoding::DynamicFlags::empty(),
11303            _decode,
11304        )
11305    }
11306
11307    type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
11308        (i32, OpenFlags),
11309        fdomain_client::fidl::FDomainResourceDialect,
11310    >;
11311    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
11312        fn _decode(
11313            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11314        ) -> Result<(i32, OpenFlags), fidl::Error> {
11315            let _response = fidl::client::decode_transaction_body::<
11316                NodeDeprecatedGetFlagsResponse,
11317                fdomain_client::fidl::FDomainResourceDialect,
11318                0x5b88fffb8eda3aa1,
11319            >(_buf?)?;
11320            Ok((_response.s, _response.flags))
11321        }
11322        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
11323            (),
11324            0x5b88fffb8eda3aa1,
11325            fidl::encoding::DynamicFlags::empty(),
11326            _decode,
11327        )
11328    }
11329
11330    type DeprecatedSetFlagsResponseFut =
11331        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
11332    fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
11333        fn _decode(
11334            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11335        ) -> Result<i32, fidl::Error> {
11336            let _response = fidl::client::decode_transaction_body::<
11337                NodeDeprecatedSetFlagsResponse,
11338                fdomain_client::fidl::FDomainResourceDialect,
11339                0x5295b76c71fde733,
11340            >(_buf?)?;
11341            Ok(_response.s)
11342        }
11343        self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
11344            (flags,),
11345            0x5295b76c71fde733,
11346            fidl::encoding::DynamicFlags::empty(),
11347            _decode,
11348        )
11349    }
11350
11351    type GetFlagsResponseFut = fidl::client::QueryResponseFut<
11352        NodeGetFlagsResult,
11353        fdomain_client::fidl::FDomainResourceDialect,
11354    >;
11355    fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
11356        fn _decode(
11357            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11358        ) -> Result<NodeGetFlagsResult, fidl::Error> {
11359            let _response = fidl::client::decode_transaction_body::<
11360                fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
11361                fdomain_client::fidl::FDomainResourceDialect,
11362                0x176eb318f64ec23,
11363            >(_buf?)?
11364            .into_result_fdomain::<NodeMarker>("get_flags")?;
11365            Ok(_response.map(|x| x.flags))
11366        }
11367        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
11368            (),
11369            0x176eb318f64ec23,
11370            fidl::encoding::DynamicFlags::FLEXIBLE,
11371            _decode,
11372        )
11373    }
11374
11375    type SetFlagsResponseFut = fidl::client::QueryResponseFut<
11376        NodeSetFlagsResult,
11377        fdomain_client::fidl::FDomainResourceDialect,
11378    >;
11379    fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
11380        fn _decode(
11381            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11382        ) -> Result<NodeSetFlagsResult, fidl::Error> {
11383            let _response = fidl::client::decode_transaction_body::<
11384                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
11385                fdomain_client::fidl::FDomainResourceDialect,
11386                0x55a8028685791ea8,
11387            >(_buf?)?
11388            .into_result_fdomain::<NodeMarker>("set_flags")?;
11389            Ok(_response.map(|x| x))
11390        }
11391        self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
11392            (flags,),
11393            0x55a8028685791ea8,
11394            fidl::encoding::DynamicFlags::FLEXIBLE,
11395            _decode,
11396        )
11397    }
11398
11399    type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
11400        (i32, Option<Box<FilesystemInfo>>),
11401        fdomain_client::fidl::FDomainResourceDialect,
11402    >;
11403    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
11404        fn _decode(
11405            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11406        ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
11407            let _response = fidl::client::decode_transaction_body::<
11408                NodeQueryFilesystemResponse,
11409                fdomain_client::fidl::FDomainResourceDialect,
11410                0x6f344a1c6b0a0610,
11411            >(_buf?)?;
11412            Ok((_response.s, _response.info))
11413        }
11414        self.client.send_query_and_decode::<
11415            fidl::encoding::EmptyPayload,
11416            (i32, Option<Box<FilesystemInfo>>),
11417        >(
11418            (),
11419            0x6f344a1c6b0a0610,
11420            fidl::encoding::DynamicFlags::empty(),
11421            _decode,
11422        )
11423    }
11424
11425    type GetAttributesResponseFut = fidl::client::QueryResponseFut<
11426        NodeGetAttributesResult,
11427        fdomain_client::fidl::FDomainResourceDialect,
11428    >;
11429    fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
11430        fn _decode(
11431            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11432        ) -> Result<NodeGetAttributesResult, fidl::Error> {
11433            let _response = fidl::client::decode_transaction_body::<
11434                fidl::encoding::ResultType<NodeAttributes2, i32>,
11435                fdomain_client::fidl::FDomainResourceDialect,
11436                0x3d4396a638ea053b,
11437            >(_buf?)?;
11438            Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
11439        }
11440        self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
11441            (query,),
11442            0x3d4396a638ea053b,
11443            fidl::encoding::DynamicFlags::empty(),
11444            _decode,
11445        )
11446    }
11447
11448    type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
11449        NodeUpdateAttributesResult,
11450        fdomain_client::fidl::FDomainResourceDialect,
11451    >;
11452    fn r#update_attributes(
11453        &self,
11454        mut payload: &MutableNodeAttributes,
11455    ) -> Self::UpdateAttributesResponseFut {
11456        fn _decode(
11457            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11458        ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
11459            let _response = fidl::client::decode_transaction_body::<
11460                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11461                fdomain_client::fidl::FDomainResourceDialect,
11462                0x3308c1da5a89bf08,
11463            >(_buf?)?;
11464            Ok(_response.map(|x| x))
11465        }
11466        self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
11467            payload,
11468            0x3308c1da5a89bf08,
11469            fidl::encoding::DynamicFlags::empty(),
11470            _decode,
11471        )
11472    }
11473
11474    type SyncResponseFut = fidl::client::QueryResponseFut<
11475        NodeSyncResult,
11476        fdomain_client::fidl::FDomainResourceDialect,
11477    >;
11478    fn r#sync(&self) -> Self::SyncResponseFut {
11479        fn _decode(
11480            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11481        ) -> Result<NodeSyncResult, fidl::Error> {
11482            let _response = fidl::client::decode_transaction_body::<
11483                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11484                fdomain_client::fidl::FDomainResourceDialect,
11485                0x2c5c27ca0ab5dc49,
11486            >(_buf?)?;
11487            Ok(_response.map(|x| x))
11488        }
11489        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
11490            (),
11491            0x2c5c27ca0ab5dc49,
11492            fidl::encoding::DynamicFlags::empty(),
11493            _decode,
11494        )
11495    }
11496
11497    fn r#list_extended_attributes(
11498        &self,
11499        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
11500    ) -> Result<(), fidl::Error> {
11501        self.client.send::<NodeListExtendedAttributesRequest>(
11502            (iterator,),
11503            0x4b61033de007fcd0,
11504            fidl::encoding::DynamicFlags::empty(),
11505        )
11506    }
11507
11508    type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11509        NodeGetExtendedAttributeResult,
11510        fdomain_client::fidl::FDomainResourceDialect,
11511    >;
11512    fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
11513        fn _decode(
11514            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11515        ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
11516            let _response = fidl::client::decode_transaction_body::<
11517                fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
11518                fdomain_client::fidl::FDomainResourceDialect,
11519                0x45ffa3ccfdeb76db,
11520            >(_buf?)?;
11521            Ok(_response.map(|x| x))
11522        }
11523        self.client.send_query_and_decode::<
11524            NodeGetExtendedAttributeRequest,
11525            NodeGetExtendedAttributeResult,
11526        >(
11527            (name,),
11528            0x45ffa3ccfdeb76db,
11529            fidl::encoding::DynamicFlags::empty(),
11530            _decode,
11531        )
11532    }
11533
11534    type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11535        NodeSetExtendedAttributeResult,
11536        fdomain_client::fidl::FDomainResourceDialect,
11537    >;
11538    fn r#set_extended_attribute(
11539        &self,
11540        mut name: &[u8],
11541        mut value: ExtendedAttributeValue,
11542        mut mode: SetExtendedAttributeMode,
11543    ) -> Self::SetExtendedAttributeResponseFut {
11544        fn _decode(
11545            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11546        ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
11547            let _response = fidl::client::decode_transaction_body::<
11548                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11549                fdomain_client::fidl::FDomainResourceDialect,
11550                0x4a951362f681f23c,
11551            >(_buf?)?;
11552            Ok(_response.map(|x| x))
11553        }
11554        self.client.send_query_and_decode::<
11555            NodeSetExtendedAttributeRequest,
11556            NodeSetExtendedAttributeResult,
11557        >(
11558            (name, &mut value, mode,),
11559            0x4a951362f681f23c,
11560            fidl::encoding::DynamicFlags::empty(),
11561            _decode,
11562        )
11563    }
11564
11565    type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
11566        NodeRemoveExtendedAttributeResult,
11567        fdomain_client::fidl::FDomainResourceDialect,
11568    >;
11569    fn r#remove_extended_attribute(
11570        &self,
11571        mut name: &[u8],
11572    ) -> Self::RemoveExtendedAttributeResponseFut {
11573        fn _decode(
11574            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
11575        ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
11576            let _response = fidl::client::decode_transaction_body::<
11577                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
11578                fdomain_client::fidl::FDomainResourceDialect,
11579                0x7a0b9f3a9bf9032d,
11580            >(_buf?)?;
11581            Ok(_response.map(|x| x))
11582        }
11583        self.client.send_query_and_decode::<
11584            NodeRemoveExtendedAttributeRequest,
11585            NodeRemoveExtendedAttributeResult,
11586        >(
11587            (name,),
11588            0x7a0b9f3a9bf9032d,
11589            fidl::encoding::DynamicFlags::empty(),
11590            _decode,
11591        )
11592    }
11593}
11594
11595pub struct NodeEventStream {
11596    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
11597}
11598
11599impl std::marker::Unpin for NodeEventStream {}
11600
11601impl futures::stream::FusedStream for NodeEventStream {
11602    fn is_terminated(&self) -> bool {
11603        self.event_receiver.is_terminated()
11604    }
11605}
11606
11607impl futures::Stream for NodeEventStream {
11608    type Item = Result<NodeEvent, fidl::Error>;
11609
11610    fn poll_next(
11611        mut self: std::pin::Pin<&mut Self>,
11612        cx: &mut std::task::Context<'_>,
11613    ) -> std::task::Poll<Option<Self::Item>> {
11614        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
11615            &mut self.event_receiver,
11616            cx
11617        )?) {
11618            Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
11619            None => std::task::Poll::Ready(None),
11620        }
11621    }
11622}
11623
11624#[derive(Debug)]
11625pub enum NodeEvent {
11626    OnOpen_ {
11627        s: i32,
11628        info: Option<Box<NodeInfoDeprecated>>,
11629    },
11630    OnRepresentation {
11631        payload: Representation,
11632    },
11633    #[non_exhaustive]
11634    _UnknownEvent {
11635        /// Ordinal of the event that was sent.
11636        ordinal: u64,
11637    },
11638}
11639
11640impl NodeEvent {
11641    #[allow(irrefutable_let_patterns)]
11642    pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
11643        if let NodeEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
11644    }
11645    #[allow(irrefutable_let_patterns)]
11646    pub fn into_on_representation(self) -> Option<Representation> {
11647        if let NodeEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
11648    }
11649
11650    /// Decodes a message buffer as a [`NodeEvent`].
11651    fn decode(
11652        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
11653    ) -> Result<NodeEvent, fidl::Error> {
11654        let (bytes, _handles) = buf.split_mut();
11655        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11656        debug_assert_eq!(tx_header.tx_id, 0);
11657        match tx_header.ordinal {
11658            0x7fc7bbb1dbfd1972 => {
11659                let mut out = fidl::new_empty!(
11660                    NodeOnOpenRequest,
11661                    fdomain_client::fidl::FDomainResourceDialect
11662                );
11663                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
11664                Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
11665            }
11666            0x5cb40567d80a510c => {
11667                let mut out =
11668                    fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
11669                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
11670                Ok((NodeEvent::OnRepresentation { payload: out }))
11671            }
11672            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
11673                Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
11674            }
11675            _ => Err(fidl::Error::UnknownOrdinal {
11676                ordinal: tx_header.ordinal,
11677                protocol_name: <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
11678            }),
11679        }
11680    }
11681}
11682
11683/// A Stream of incoming requests for fuchsia.io/Node.
11684pub struct NodeRequestStream {
11685    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11686    is_terminated: bool,
11687}
11688
11689impl std::marker::Unpin for NodeRequestStream {}
11690
11691impl futures::stream::FusedStream for NodeRequestStream {
11692    fn is_terminated(&self) -> bool {
11693        self.is_terminated
11694    }
11695}
11696
11697impl fdomain_client::fidl::RequestStream for NodeRequestStream {
11698    type Protocol = NodeMarker;
11699    type ControlHandle = NodeControlHandle;
11700
11701    fn from_channel(channel: fdomain_client::Channel) -> Self {
11702        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
11703    }
11704
11705    fn control_handle(&self) -> Self::ControlHandle {
11706        NodeControlHandle { inner: self.inner.clone() }
11707    }
11708
11709    fn into_inner(
11710        self,
11711    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
11712    {
11713        (self.inner, self.is_terminated)
11714    }
11715
11716    fn from_inner(
11717        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
11718        is_terminated: bool,
11719    ) -> Self {
11720        Self { inner, is_terminated }
11721    }
11722}
11723
11724impl futures::Stream for NodeRequestStream {
11725    type Item = Result<NodeRequest, fidl::Error>;
11726
11727    fn poll_next(
11728        mut self: std::pin::Pin<&mut Self>,
11729        cx: &mut std::task::Context<'_>,
11730    ) -> std::task::Poll<Option<Self::Item>> {
11731        let this = &mut *self;
11732        if this.inner.check_shutdown(cx) {
11733            this.is_terminated = true;
11734            return std::task::Poll::Ready(None);
11735        }
11736        if this.is_terminated {
11737            panic!("polled NodeRequestStream after completion");
11738        }
11739        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
11740            |bytes, handles| {
11741                match this.inner.channel().read_etc(cx, bytes, handles) {
11742                    std::task::Poll::Ready(Ok(())) => {}
11743                    std::task::Poll::Pending => return std::task::Poll::Pending,
11744                    std::task::Poll::Ready(Err(None)) => {
11745                        this.is_terminated = true;
11746                        return std::task::Poll::Ready(None);
11747                    }
11748                    std::task::Poll::Ready(Err(Some(e))) => {
11749                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
11750                            e.into(),
11751                        ))));
11752                    }
11753                }
11754
11755                // A message has been received from the channel
11756                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
11757
11758                std::task::Poll::Ready(Some(match header.ordinal {
11759                    0x20d8a7aba2168a79 => {
11760                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11761                        let mut req = fidl::new_empty!(
11762                            fdomain_fuchsia_unknown::CloneableCloneRequest,
11763                            fdomain_client::fidl::FDomainResourceDialect
11764                        );
11765                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11766                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11767                        Ok(NodeRequest::Clone { request: req.request, control_handle })
11768                    }
11769                    0x5ac5d459ad7f657e => {
11770                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11771                        let mut req = fidl::new_empty!(
11772                            fidl::encoding::EmptyPayload,
11773                            fdomain_client::fidl::FDomainResourceDialect
11774                        );
11775                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11776                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11777                        Ok(NodeRequest::Close {
11778                            responder: NodeCloseResponder {
11779                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11780                                tx_id: header.tx_id,
11781                            },
11782                        })
11783                    }
11784                    0x2658edee9decfc06 => {
11785                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11786                        let mut req = fidl::new_empty!(
11787                            fidl::encoding::EmptyPayload,
11788                            fdomain_client::fidl::FDomainResourceDialect
11789                        );
11790                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11791                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11792                        Ok(NodeRequest::Query {
11793                            responder: NodeQueryResponder {
11794                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11795                                tx_id: header.tx_id,
11796                            },
11797                        })
11798                    }
11799                    0x5a61678f293ce16f => {
11800                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11801                        let mut req = fidl::new_empty!(
11802                            NodeDeprecatedCloneRequest,
11803                            fdomain_client::fidl::FDomainResourceDialect
11804                        );
11805                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
11806                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11807                        Ok(NodeRequest::DeprecatedClone {
11808                            flags: req.flags,
11809                            object: req.object,
11810
11811                            control_handle,
11812                        })
11813                    }
11814                    0x78985e216314dafd => {
11815                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11816                        let mut req = fidl::new_empty!(
11817                            fidl::encoding::EmptyPayload,
11818                            fdomain_client::fidl::FDomainResourceDialect
11819                        );
11820                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11821                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11822                        Ok(NodeRequest::DeprecatedGetAttr {
11823                            responder: NodeDeprecatedGetAttrResponder {
11824                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11825                                tx_id: header.tx_id,
11826                            },
11827                        })
11828                    }
11829                    0x4186c0f40d938f46 => {
11830                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11831                        let mut req = fidl::new_empty!(
11832                            NodeDeprecatedSetAttrRequest,
11833                            fdomain_client::fidl::FDomainResourceDialect
11834                        );
11835                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
11836                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11837                        Ok(NodeRequest::DeprecatedSetAttr {
11838                            flags: req.flags,
11839                            attributes: req.attributes,
11840
11841                            responder: NodeDeprecatedSetAttrResponder {
11842                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11843                                tx_id: header.tx_id,
11844                            },
11845                        })
11846                    }
11847                    0x5b88fffb8eda3aa1 => {
11848                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11849                        let mut req = fidl::new_empty!(
11850                            fidl::encoding::EmptyPayload,
11851                            fdomain_client::fidl::FDomainResourceDialect
11852                        );
11853                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11854                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11855                        Ok(NodeRequest::DeprecatedGetFlags {
11856                            responder: NodeDeprecatedGetFlagsResponder {
11857                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11858                                tx_id: header.tx_id,
11859                            },
11860                        })
11861                    }
11862                    0x5295b76c71fde733 => {
11863                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11864                        let mut req = fidl::new_empty!(
11865                            NodeDeprecatedSetFlagsRequest,
11866                            fdomain_client::fidl::FDomainResourceDialect
11867                        );
11868                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11869                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11870                        Ok(NodeRequest::DeprecatedSetFlags {
11871                            flags: req.flags,
11872
11873                            responder: NodeDeprecatedSetFlagsResponder {
11874                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11875                                tx_id: header.tx_id,
11876                            },
11877                        })
11878                    }
11879                    0x176eb318f64ec23 => {
11880                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11881                        let mut req = fidl::new_empty!(
11882                            fidl::encoding::EmptyPayload,
11883                            fdomain_client::fidl::FDomainResourceDialect
11884                        );
11885                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11886                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11887                        Ok(NodeRequest::GetFlags {
11888                            responder: NodeGetFlagsResponder {
11889                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11890                                tx_id: header.tx_id,
11891                            },
11892                        })
11893                    }
11894                    0x55a8028685791ea8 => {
11895                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11896                        let mut req = fidl::new_empty!(
11897                            NodeSetFlagsRequest,
11898                            fdomain_client::fidl::FDomainResourceDialect
11899                        );
11900                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
11901                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11902                        Ok(NodeRequest::SetFlags {
11903                            flags: req.flags,
11904
11905                            responder: NodeSetFlagsResponder {
11906                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11907                                tx_id: header.tx_id,
11908                            },
11909                        })
11910                    }
11911                    0x6f344a1c6b0a0610 => {
11912                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11913                        let mut req = fidl::new_empty!(
11914                            fidl::encoding::EmptyPayload,
11915                            fdomain_client::fidl::FDomainResourceDialect
11916                        );
11917                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11918                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11919                        Ok(NodeRequest::QueryFilesystem {
11920                            responder: NodeQueryFilesystemResponder {
11921                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11922                                tx_id: header.tx_id,
11923                            },
11924                        })
11925                    }
11926                    0x3d4396a638ea053b => {
11927                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11928                        let mut req = fidl::new_empty!(
11929                            NodeGetAttributesRequest,
11930                            fdomain_client::fidl::FDomainResourceDialect
11931                        );
11932                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11933                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11934                        Ok(NodeRequest::GetAttributes {
11935                            query: req.query,
11936
11937                            responder: NodeGetAttributesResponder {
11938                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11939                                tx_id: header.tx_id,
11940                            },
11941                        })
11942                    }
11943                    0x3308c1da5a89bf08 => {
11944                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11945                        let mut req = fidl::new_empty!(
11946                            MutableNodeAttributes,
11947                            fdomain_client::fidl::FDomainResourceDialect
11948                        );
11949                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
11950                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11951                        Ok(NodeRequest::UpdateAttributes {
11952                            payload: req,
11953                            responder: NodeUpdateAttributesResponder {
11954                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11955                                tx_id: header.tx_id,
11956                            },
11957                        })
11958                    }
11959                    0x2c5c27ca0ab5dc49 => {
11960                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11961                        let mut req = fidl::new_empty!(
11962                            fidl::encoding::EmptyPayload,
11963                            fdomain_client::fidl::FDomainResourceDialect
11964                        );
11965                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
11966                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11967                        Ok(NodeRequest::Sync {
11968                            responder: NodeSyncResponder {
11969                                control_handle: std::mem::ManuallyDrop::new(control_handle),
11970                                tx_id: header.tx_id,
11971                            },
11972                        })
11973                    }
11974                    0x4b61033de007fcd0 => {
11975                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
11976                        let mut req = fidl::new_empty!(
11977                            NodeListExtendedAttributesRequest,
11978                            fdomain_client::fidl::FDomainResourceDialect
11979                        );
11980                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
11981                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11982                        Ok(NodeRequest::ListExtendedAttributes {
11983                            iterator: req.iterator,
11984
11985                            control_handle,
11986                        })
11987                    }
11988                    0x45ffa3ccfdeb76db => {
11989                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
11990                        let mut req = fidl::new_empty!(
11991                            NodeGetExtendedAttributeRequest,
11992                            fdomain_client::fidl::FDomainResourceDialect
11993                        );
11994                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
11995                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
11996                        Ok(NodeRequest::GetExtendedAttribute {
11997                            name: req.name,
11998
11999                            responder: NodeGetExtendedAttributeResponder {
12000                                control_handle: std::mem::ManuallyDrop::new(control_handle),
12001                                tx_id: header.tx_id,
12002                            },
12003                        })
12004                    }
12005                    0x4a951362f681f23c => {
12006                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12007                        let mut req = fidl::new_empty!(
12008                            NodeSetExtendedAttributeRequest,
12009                            fdomain_client::fidl::FDomainResourceDialect
12010                        );
12011                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12012                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
12013                        Ok(NodeRequest::SetExtendedAttribute {
12014                            name: req.name,
12015                            value: req.value,
12016                            mode: req.mode,
12017
12018                            responder: NodeSetExtendedAttributeResponder {
12019                                control_handle: std::mem::ManuallyDrop::new(control_handle),
12020                                tx_id: header.tx_id,
12021                            },
12022                        })
12023                    }
12024                    0x7a0b9f3a9bf9032d => {
12025                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12026                        let mut req = fidl::new_empty!(
12027                            NodeRemoveExtendedAttributeRequest,
12028                            fdomain_client::fidl::FDomainResourceDialect
12029                        );
12030                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
12031                        let control_handle = NodeControlHandle { inner: this.inner.clone() };
12032                        Ok(NodeRequest::RemoveExtendedAttribute {
12033                            name: req.name,
12034
12035                            responder: NodeRemoveExtendedAttributeResponder {
12036                                control_handle: std::mem::ManuallyDrop::new(control_handle),
12037                                tx_id: header.tx_id,
12038                            },
12039                        })
12040                    }
12041                    _ if header.tx_id == 0
12042                        && header
12043                            .dynamic_flags()
12044                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12045                    {
12046                        Ok(NodeRequest::_UnknownMethod {
12047                            ordinal: header.ordinal,
12048                            control_handle: NodeControlHandle { inner: this.inner.clone() },
12049                            method_type: fidl::MethodType::OneWay,
12050                        })
12051                    }
12052                    _ if header
12053                        .dynamic_flags()
12054                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
12055                    {
12056                        this.inner.send_framework_err(
12057                            fidl::encoding::FrameworkErr::UnknownMethod,
12058                            header.tx_id,
12059                            header.ordinal,
12060                            header.dynamic_flags(),
12061                            (bytes, handles),
12062                        )?;
12063                        Ok(NodeRequest::_UnknownMethod {
12064                            ordinal: header.ordinal,
12065                            control_handle: NodeControlHandle { inner: this.inner.clone() },
12066                            method_type: fidl::MethodType::TwoWay,
12067                        })
12068                    }
12069                    _ => Err(fidl::Error::UnknownOrdinal {
12070                        ordinal: header.ordinal,
12071                        protocol_name:
12072                            <NodeMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
12073                    }),
12074                }))
12075            },
12076        )
12077    }
12078}
12079
12080/// Node defines the minimal interface for entities which can be accessed in a filesystem.
12081#[derive(Debug)]
12082pub enum NodeRequest {
12083    Clone {
12084        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12085        control_handle: NodeControlHandle,
12086    },
12087    /// Terminates the connection.
12088    ///
12089    /// After calling `Close`, the client must not send any other requests.
12090    ///
12091    /// Servers, after sending the status response, should close the connection
12092    /// regardless of status and without sending an epitaph.
12093    ///
12094    /// Closing the client end of the channel should be semantically equivalent
12095    /// to calling `Close` without knowing when the close has completed or its
12096    /// status.
12097    Close {
12098        responder: NodeCloseResponder,
12099    },
12100    Query {
12101        responder: NodeQueryResponder,
12102    },
12103    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
12104    DeprecatedClone {
12105        flags: OpenFlags,
12106        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
12107        control_handle: NodeControlHandle,
12108    },
12109    /// DEPRECATED - Use `Node.GetAttributes` instead.
12110    DeprecatedGetAttr {
12111        responder: NodeDeprecatedGetAttrResponder,
12112    },
12113    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
12114    DeprecatedSetAttr {
12115        flags: NodeAttributeFlags,
12116        attributes: NodeAttributes,
12117        responder: NodeDeprecatedSetAttrResponder,
12118    },
12119    /// [DEPRECATED - Use new GetFlags method instead.]
12120    DeprecatedGetFlags {
12121        responder: NodeDeprecatedGetFlagsResponder,
12122    },
12123    /// [DEPRECATED - Use new SetFlags method instead.]
12124    DeprecatedSetFlags {
12125        flags: OpenFlags,
12126        responder: NodeDeprecatedSetFlagsResponder,
12127    },
12128    /// Queries the flags that apply to this node after it has been opened/created. This method does
12129    /// not require any rights.
12130    ///
12131    /// Note that the final set of flags that apply to the connection may differ from those
12132    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
12133    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
12134    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
12135    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
12136    GetFlags {
12137        responder: NodeGetFlagsResponder,
12138    },
12139    /// Sets the flags that apply to this node after it has been opened. This method does not
12140    /// require any rights.
12141    ///
12142    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
12143    /// clear append mode.
12144    ///
12145    /// Errors:
12146    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
12147    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
12148    SetFlags {
12149        flags: Flags,
12150        responder: NodeSetFlagsResponder,
12151    },
12152    /// Query the filesystem for details specific to the filesystem and/or volume. If the current
12153    /// volume has different settings or the storage is accounted seperately from the rest of the
12154    /// filesystem that may be reported instead of filesystem-wide details.
12155    QueryFilesystem {
12156        responder: NodeQueryFilesystemResponder,
12157    },
12158    /// Acquires information about the node.
12159    ///
12160    /// The attributes of a node should be stable, independent of the
12161    /// specific protocol used to access it.
12162    ///
12163    /// If a particular attribute is not applicable or not supported,
12164    /// filesystems should leave the corresponding field absent.
12165    ///
12166    /// + `query` a bit-mask specifying which attributes to fetch. The server
12167    ///   should not return more than necessary.
12168    /// - `attributes` the returned attributes.
12169    ///
12170    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
12171    GetAttributes {
12172        query: NodeAttributesQuery,
12173        responder: NodeGetAttributesResponder,
12174    },
12175    /// Updates information about the node.
12176    ///
12177    /// + `attributes` the presence of a table field in `attributes` indicates
12178    /// the intent to update the corresponding attribute.
12179    ///
12180    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
12181    ///
12182    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
12183    UpdateAttributes {
12184        payload: MutableNodeAttributes,
12185        responder: NodeUpdateAttributesResponder,
12186    },
12187    /// Synchronizes updates to the node to the underlying media, if it exists.
12188    ///
12189    /// This method will return when the filesystem server has flushed the
12190    /// relevant updates to the underlying media, but does not guarantee the
12191    /// underlying media has persisted the information, nor that any information
12192    /// is committed to hardware. Clients may use `Sync` to ensure ordering
12193    /// between operations.
12194    ///
12195    /// This method does not require any rights.
12196    Sync {
12197        responder: NodeSyncResponder,
12198    },
12199    /// Creates an iterator over all the extended attribute names associated
12200    /// with this node. If an error occurs it is returned as an epitaph on the
12201    /// iterator request channel, and then the channel is closed.
12202    ///
12203    /// GetExtendedAttributes can be used with any of these names to retrieve
12204    /// the associated value.
12205    ///
12206    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
12207    ListExtendedAttributes {
12208        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
12209        control_handle: NodeControlHandle,
12210    },
12211    /// Get the value associated with the given attribute `name` for this node.
12212    ///
12213    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
12214    /// particular structure is imposed on them.
12215    ///
12216    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
12217    GetExtendedAttribute {
12218        name: Vec<u8>,
12219        responder: NodeGetExtendedAttributeResponder,
12220    },
12221    /// Set the value for the given attribute `name` to `value` for this node.
12222    ///
12223    /// The attribute name may exist, in which case the attribute is updated.
12224    /// If the attribute doesn't exist, it is created. The name should have no
12225    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
12226    ///
12227    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
12228    SetExtendedAttribute {
12229        name: Vec<u8>,
12230        value: ExtendedAttributeValue,
12231        mode: SetExtendedAttributeMode,
12232        responder: NodeSetExtendedAttributeResponder,
12233    },
12234    /// Remove the specified extended attribute.
12235    ///
12236    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
12237    ///
12238    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
12239    RemoveExtendedAttribute {
12240        name: Vec<u8>,
12241        responder: NodeRemoveExtendedAttributeResponder,
12242    },
12243    /// An interaction was received which does not match any known method.
12244    #[non_exhaustive]
12245    _UnknownMethod {
12246        /// Ordinal of the method that was called.
12247        ordinal: u64,
12248        control_handle: NodeControlHandle,
12249        method_type: fidl::MethodType,
12250    },
12251}
12252
12253impl NodeRequest {
12254    #[allow(irrefutable_let_patterns)]
12255    pub fn into_clone(
12256        self,
12257    ) -> Option<(
12258        fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
12259        NodeControlHandle,
12260    )> {
12261        if let NodeRequest::Clone { request, control_handle } = self {
12262            Some((request, control_handle))
12263        } else {
12264            None
12265        }
12266    }
12267
12268    #[allow(irrefutable_let_patterns)]
12269    pub fn into_close(self) -> Option<(NodeCloseResponder)> {
12270        if let NodeRequest::Close { responder } = self { Some((responder)) } else { None }
12271    }
12272
12273    #[allow(irrefutable_let_patterns)]
12274    pub fn into_query(self) -> Option<(NodeQueryResponder)> {
12275        if let NodeRequest::Query { responder } = self { Some((responder)) } else { None }
12276    }
12277
12278    #[allow(irrefutable_let_patterns)]
12279    pub fn into_deprecated_clone(
12280        self,
12281    ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, NodeControlHandle)> {
12282        if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
12283            Some((flags, object, control_handle))
12284        } else {
12285            None
12286        }
12287    }
12288
12289    #[allow(irrefutable_let_patterns)]
12290    pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
12291        if let NodeRequest::DeprecatedGetAttr { responder } = self {
12292            Some((responder))
12293        } else {
12294            None
12295        }
12296    }
12297
12298    #[allow(irrefutable_let_patterns)]
12299    pub fn into_deprecated_set_attr(
12300        self,
12301    ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
12302        if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
12303            Some((flags, attributes, responder))
12304        } else {
12305            None
12306        }
12307    }
12308
12309    #[allow(irrefutable_let_patterns)]
12310    pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
12311        if let NodeRequest::DeprecatedGetFlags { responder } = self {
12312            Some((responder))
12313        } else {
12314            None
12315        }
12316    }
12317
12318    #[allow(irrefutable_let_patterns)]
12319    pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
12320        if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
12321            Some((flags, responder))
12322        } else {
12323            None
12324        }
12325    }
12326
12327    #[allow(irrefutable_let_patterns)]
12328    pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
12329        if let NodeRequest::GetFlags { responder } = self { Some((responder)) } else { None }
12330    }
12331
12332    #[allow(irrefutable_let_patterns)]
12333    pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
12334        if let NodeRequest::SetFlags { flags, responder } = self {
12335            Some((flags, responder))
12336        } else {
12337            None
12338        }
12339    }
12340
12341    #[allow(irrefutable_let_patterns)]
12342    pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
12343        if let NodeRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
12344    }
12345
12346    #[allow(irrefutable_let_patterns)]
12347    pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
12348        if let NodeRequest::GetAttributes { query, responder } = self {
12349            Some((query, responder))
12350        } else {
12351            None
12352        }
12353    }
12354
12355    #[allow(irrefutable_let_patterns)]
12356    pub fn into_update_attributes(
12357        self,
12358    ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
12359        if let NodeRequest::UpdateAttributes { payload, responder } = self {
12360            Some((payload, responder))
12361        } else {
12362            None
12363        }
12364    }
12365
12366    #[allow(irrefutable_let_patterns)]
12367    pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
12368        if let NodeRequest::Sync { responder } = self { Some((responder)) } else { None }
12369    }
12370
12371    #[allow(irrefutable_let_patterns)]
12372    pub fn into_list_extended_attributes(
12373        self,
12374    ) -> Option<(fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
12375    {
12376        if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
12377            Some((iterator, control_handle))
12378        } else {
12379            None
12380        }
12381    }
12382
12383    #[allow(irrefutable_let_patterns)]
12384    pub fn into_get_extended_attribute(
12385        self,
12386    ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
12387        if let NodeRequest::GetExtendedAttribute { name, responder } = self {
12388            Some((name, responder))
12389        } else {
12390            None
12391        }
12392    }
12393
12394    #[allow(irrefutable_let_patterns)]
12395    pub fn into_set_extended_attribute(
12396        self,
12397    ) -> Option<(
12398        Vec<u8>,
12399        ExtendedAttributeValue,
12400        SetExtendedAttributeMode,
12401        NodeSetExtendedAttributeResponder,
12402    )> {
12403        if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
12404            Some((name, value, mode, responder))
12405        } else {
12406            None
12407        }
12408    }
12409
12410    #[allow(irrefutable_let_patterns)]
12411    pub fn into_remove_extended_attribute(
12412        self,
12413    ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
12414        if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
12415            Some((name, responder))
12416        } else {
12417            None
12418        }
12419    }
12420
12421    /// Name of the method defined in FIDL
12422    pub fn method_name(&self) -> &'static str {
12423        match *self {
12424            NodeRequest::Clone { .. } => "clone",
12425            NodeRequest::Close { .. } => "close",
12426            NodeRequest::Query { .. } => "query",
12427            NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
12428            NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
12429            NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
12430            NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
12431            NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
12432            NodeRequest::GetFlags { .. } => "get_flags",
12433            NodeRequest::SetFlags { .. } => "set_flags",
12434            NodeRequest::QueryFilesystem { .. } => "query_filesystem",
12435            NodeRequest::GetAttributes { .. } => "get_attributes",
12436            NodeRequest::UpdateAttributes { .. } => "update_attributes",
12437            NodeRequest::Sync { .. } => "sync",
12438            NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
12439            NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
12440            NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
12441            NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
12442            NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
12443                "unknown one-way method"
12444            }
12445            NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
12446                "unknown two-way method"
12447            }
12448        }
12449    }
12450}
12451
12452#[derive(Debug, Clone)]
12453pub struct NodeControlHandle {
12454    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
12455}
12456
12457impl fdomain_client::fidl::ControlHandle for NodeControlHandle {
12458    fn shutdown(&self) {
12459        self.inner.shutdown()
12460    }
12461
12462    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
12463        self.inner.shutdown_with_epitaph(status)
12464    }
12465
12466    fn is_closed(&self) -> bool {
12467        self.inner.channel().is_closed()
12468    }
12469    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
12470        self.inner.channel().on_closed()
12471    }
12472}
12473
12474impl NodeControlHandle {
12475    pub fn send_on_open_(
12476        &self,
12477        mut s: i32,
12478        mut info: Option<NodeInfoDeprecated>,
12479    ) -> Result<(), fidl::Error> {
12480        self.inner.send::<NodeOnOpenRequest>(
12481            (s, info.as_mut()),
12482            0,
12483            0x7fc7bbb1dbfd1972,
12484            fidl::encoding::DynamicFlags::FLEXIBLE,
12485        )
12486    }
12487
12488    pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
12489        self.inner.send::<Representation>(
12490            &mut payload,
12491            0,
12492            0x5cb40567d80a510c,
12493            fidl::encoding::DynamicFlags::empty(),
12494        )
12495    }
12496}
12497
12498#[must_use = "FIDL methods require a response to be sent"]
12499#[derive(Debug)]
12500pub struct NodeCloseResponder {
12501    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12502    tx_id: u32,
12503}
12504
12505/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12506/// if the responder is dropped without sending a response, so that the client
12507/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12508impl std::ops::Drop for NodeCloseResponder {
12509    fn drop(&mut self) {
12510        self.control_handle.shutdown();
12511        // Safety: drops once, never accessed again
12512        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12513    }
12514}
12515
12516impl fdomain_client::fidl::Responder for NodeCloseResponder {
12517    type ControlHandle = NodeControlHandle;
12518
12519    fn control_handle(&self) -> &NodeControlHandle {
12520        &self.control_handle
12521    }
12522
12523    fn drop_without_shutdown(mut self) {
12524        // Safety: drops once, never accessed again due to mem::forget
12525        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12526        // Prevent Drop from running (which would shut down the channel)
12527        std::mem::forget(self);
12528    }
12529}
12530
12531impl NodeCloseResponder {
12532    /// Sends a response to the FIDL transaction.
12533    ///
12534    /// Sets the channel to shutdown if an error occurs.
12535    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12536        let _result = self.send_raw(result);
12537        if _result.is_err() {
12538            self.control_handle.shutdown();
12539        }
12540        self.drop_without_shutdown();
12541        _result
12542    }
12543
12544    /// Similar to "send" but does not shutdown the channel if an error occurs.
12545    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12546        let _result = self.send_raw(result);
12547        self.drop_without_shutdown();
12548        _result
12549    }
12550
12551    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12552        self.control_handle
12553            .inner
12554            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12555                result,
12556                self.tx_id,
12557                0x5ac5d459ad7f657e,
12558                fidl::encoding::DynamicFlags::empty(),
12559            )
12560    }
12561}
12562
12563#[must_use = "FIDL methods require a response to be sent"]
12564#[derive(Debug)]
12565pub struct NodeQueryResponder {
12566    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12567    tx_id: u32,
12568}
12569
12570/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12571/// if the responder is dropped without sending a response, so that the client
12572/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12573impl std::ops::Drop for NodeQueryResponder {
12574    fn drop(&mut self) {
12575        self.control_handle.shutdown();
12576        // Safety: drops once, never accessed again
12577        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12578    }
12579}
12580
12581impl fdomain_client::fidl::Responder for NodeQueryResponder {
12582    type ControlHandle = NodeControlHandle;
12583
12584    fn control_handle(&self) -> &NodeControlHandle {
12585        &self.control_handle
12586    }
12587
12588    fn drop_without_shutdown(mut self) {
12589        // Safety: drops once, never accessed again due to mem::forget
12590        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12591        // Prevent Drop from running (which would shut down the channel)
12592        std::mem::forget(self);
12593    }
12594}
12595
12596impl NodeQueryResponder {
12597    /// Sends a response to the FIDL transaction.
12598    ///
12599    /// Sets the channel to shutdown if an error occurs.
12600    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12601        let _result = self.send_raw(protocol);
12602        if _result.is_err() {
12603            self.control_handle.shutdown();
12604        }
12605        self.drop_without_shutdown();
12606        _result
12607    }
12608
12609    /// Similar to "send" but does not shutdown the channel if an error occurs.
12610    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12611        let _result = self.send_raw(protocol);
12612        self.drop_without_shutdown();
12613        _result
12614    }
12615
12616    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
12617        self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
12618            (protocol,),
12619            self.tx_id,
12620            0x2658edee9decfc06,
12621            fidl::encoding::DynamicFlags::empty(),
12622        )
12623    }
12624}
12625
12626#[must_use = "FIDL methods require a response to be sent"]
12627#[derive(Debug)]
12628pub struct NodeDeprecatedGetAttrResponder {
12629    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12630    tx_id: u32,
12631}
12632
12633/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12634/// if the responder is dropped without sending a response, so that the client
12635/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12636impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
12637    fn drop(&mut self) {
12638        self.control_handle.shutdown();
12639        // Safety: drops once, never accessed again
12640        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12641    }
12642}
12643
12644impl fdomain_client::fidl::Responder for NodeDeprecatedGetAttrResponder {
12645    type ControlHandle = NodeControlHandle;
12646
12647    fn control_handle(&self) -> &NodeControlHandle {
12648        &self.control_handle
12649    }
12650
12651    fn drop_without_shutdown(mut self) {
12652        // Safety: drops once, never accessed again due to mem::forget
12653        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12654        // Prevent Drop from running (which would shut down the channel)
12655        std::mem::forget(self);
12656    }
12657}
12658
12659impl NodeDeprecatedGetAttrResponder {
12660    /// Sends a response to the FIDL transaction.
12661    ///
12662    /// Sets the channel to shutdown if an error occurs.
12663    pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12664        let _result = self.send_raw(s, attributes);
12665        if _result.is_err() {
12666            self.control_handle.shutdown();
12667        }
12668        self.drop_without_shutdown();
12669        _result
12670    }
12671
12672    /// Similar to "send" but does not shutdown the channel if an error occurs.
12673    pub fn send_no_shutdown_on_err(
12674        self,
12675        mut s: i32,
12676        mut attributes: &NodeAttributes,
12677    ) -> Result<(), fidl::Error> {
12678        let _result = self.send_raw(s, attributes);
12679        self.drop_without_shutdown();
12680        _result
12681    }
12682
12683    fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
12684        self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
12685            (s, attributes),
12686            self.tx_id,
12687            0x78985e216314dafd,
12688            fidl::encoding::DynamicFlags::empty(),
12689        )
12690    }
12691}
12692
12693#[must_use = "FIDL methods require a response to be sent"]
12694#[derive(Debug)]
12695pub struct NodeDeprecatedSetAttrResponder {
12696    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12697    tx_id: u32,
12698}
12699
12700/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12701/// if the responder is dropped without sending a response, so that the client
12702/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12703impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
12704    fn drop(&mut self) {
12705        self.control_handle.shutdown();
12706        // Safety: drops once, never accessed again
12707        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12708    }
12709}
12710
12711impl fdomain_client::fidl::Responder for NodeDeprecatedSetAttrResponder {
12712    type ControlHandle = NodeControlHandle;
12713
12714    fn control_handle(&self) -> &NodeControlHandle {
12715        &self.control_handle
12716    }
12717
12718    fn drop_without_shutdown(mut self) {
12719        // Safety: drops once, never accessed again due to mem::forget
12720        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12721        // Prevent Drop from running (which would shut down the channel)
12722        std::mem::forget(self);
12723    }
12724}
12725
12726impl NodeDeprecatedSetAttrResponder {
12727    /// Sends a response to the FIDL transaction.
12728    ///
12729    /// Sets the channel to shutdown if an error occurs.
12730    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12731        let _result = self.send_raw(s);
12732        if _result.is_err() {
12733            self.control_handle.shutdown();
12734        }
12735        self.drop_without_shutdown();
12736        _result
12737    }
12738
12739    /// Similar to "send" but does not shutdown the channel if an error occurs.
12740    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12741        let _result = self.send_raw(s);
12742        self.drop_without_shutdown();
12743        _result
12744    }
12745
12746    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12747        self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
12748            (s,),
12749            self.tx_id,
12750            0x4186c0f40d938f46,
12751            fidl::encoding::DynamicFlags::empty(),
12752        )
12753    }
12754}
12755
12756#[must_use = "FIDL methods require a response to be sent"]
12757#[derive(Debug)]
12758pub struct NodeDeprecatedGetFlagsResponder {
12759    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12760    tx_id: u32,
12761}
12762
12763/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12764/// if the responder is dropped without sending a response, so that the client
12765/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12766impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
12767    fn drop(&mut self) {
12768        self.control_handle.shutdown();
12769        // Safety: drops once, never accessed again
12770        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12771    }
12772}
12773
12774impl fdomain_client::fidl::Responder for NodeDeprecatedGetFlagsResponder {
12775    type ControlHandle = NodeControlHandle;
12776
12777    fn control_handle(&self) -> &NodeControlHandle {
12778        &self.control_handle
12779    }
12780
12781    fn drop_without_shutdown(mut self) {
12782        // Safety: drops once, never accessed again due to mem::forget
12783        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12784        // Prevent Drop from running (which would shut down the channel)
12785        std::mem::forget(self);
12786    }
12787}
12788
12789impl NodeDeprecatedGetFlagsResponder {
12790    /// Sends a response to the FIDL transaction.
12791    ///
12792    /// Sets the channel to shutdown if an error occurs.
12793    pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12794        let _result = self.send_raw(s, flags);
12795        if _result.is_err() {
12796            self.control_handle.shutdown();
12797        }
12798        self.drop_without_shutdown();
12799        _result
12800    }
12801
12802    /// Similar to "send" but does not shutdown the channel if an error occurs.
12803    pub fn send_no_shutdown_on_err(
12804        self,
12805        mut s: i32,
12806        mut flags: OpenFlags,
12807    ) -> Result<(), fidl::Error> {
12808        let _result = self.send_raw(s, flags);
12809        self.drop_without_shutdown();
12810        _result
12811    }
12812
12813    fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
12814        self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
12815            (s, flags),
12816            self.tx_id,
12817            0x5b88fffb8eda3aa1,
12818            fidl::encoding::DynamicFlags::empty(),
12819        )
12820    }
12821}
12822
12823#[must_use = "FIDL methods require a response to be sent"]
12824#[derive(Debug)]
12825pub struct NodeDeprecatedSetFlagsResponder {
12826    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12827    tx_id: u32,
12828}
12829
12830/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12831/// if the responder is dropped without sending a response, so that the client
12832/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12833impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
12834    fn drop(&mut self) {
12835        self.control_handle.shutdown();
12836        // Safety: drops once, never accessed again
12837        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12838    }
12839}
12840
12841impl fdomain_client::fidl::Responder for NodeDeprecatedSetFlagsResponder {
12842    type ControlHandle = NodeControlHandle;
12843
12844    fn control_handle(&self) -> &NodeControlHandle {
12845        &self.control_handle
12846    }
12847
12848    fn drop_without_shutdown(mut self) {
12849        // Safety: drops once, never accessed again due to mem::forget
12850        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12851        // Prevent Drop from running (which would shut down the channel)
12852        std::mem::forget(self);
12853    }
12854}
12855
12856impl NodeDeprecatedSetFlagsResponder {
12857    /// Sends a response to the FIDL transaction.
12858    ///
12859    /// Sets the channel to shutdown if an error occurs.
12860    pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
12861        let _result = self.send_raw(s);
12862        if _result.is_err() {
12863            self.control_handle.shutdown();
12864        }
12865        self.drop_without_shutdown();
12866        _result
12867    }
12868
12869    /// Similar to "send" but does not shutdown the channel if an error occurs.
12870    pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
12871        let _result = self.send_raw(s);
12872        self.drop_without_shutdown();
12873        _result
12874    }
12875
12876    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
12877        self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
12878            (s,),
12879            self.tx_id,
12880            0x5295b76c71fde733,
12881            fidl::encoding::DynamicFlags::empty(),
12882        )
12883    }
12884}
12885
12886#[must_use = "FIDL methods require a response to be sent"]
12887#[derive(Debug)]
12888pub struct NodeGetFlagsResponder {
12889    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12890    tx_id: u32,
12891}
12892
12893/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12894/// if the responder is dropped without sending a response, so that the client
12895/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12896impl std::ops::Drop for NodeGetFlagsResponder {
12897    fn drop(&mut self) {
12898        self.control_handle.shutdown();
12899        // Safety: drops once, never accessed again
12900        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12901    }
12902}
12903
12904impl fdomain_client::fidl::Responder for NodeGetFlagsResponder {
12905    type ControlHandle = NodeControlHandle;
12906
12907    fn control_handle(&self) -> &NodeControlHandle {
12908        &self.control_handle
12909    }
12910
12911    fn drop_without_shutdown(mut self) {
12912        // Safety: drops once, never accessed again due to mem::forget
12913        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12914        // Prevent Drop from running (which would shut down the channel)
12915        std::mem::forget(self);
12916    }
12917}
12918
12919impl NodeGetFlagsResponder {
12920    /// Sends a response to the FIDL transaction.
12921    ///
12922    /// Sets the channel to shutdown if an error occurs.
12923    pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12924        let _result = self.send_raw(result);
12925        if _result.is_err() {
12926            self.control_handle.shutdown();
12927        }
12928        self.drop_without_shutdown();
12929        _result
12930    }
12931
12932    /// Similar to "send" but does not shutdown the channel if an error occurs.
12933    pub fn send_no_shutdown_on_err(
12934        self,
12935        mut result: Result<Flags, i32>,
12936    ) -> Result<(), fidl::Error> {
12937        let _result = self.send_raw(result);
12938        self.drop_without_shutdown();
12939        _result
12940    }
12941
12942    fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
12943        self.control_handle
12944            .inner
12945            .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
12946                fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
12947                self.tx_id,
12948                0x176eb318f64ec23,
12949                fidl::encoding::DynamicFlags::FLEXIBLE,
12950            )
12951    }
12952}
12953
12954#[must_use = "FIDL methods require a response to be sent"]
12955#[derive(Debug)]
12956pub struct NodeSetFlagsResponder {
12957    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
12958    tx_id: u32,
12959}
12960
12961/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
12962/// if the responder is dropped without sending a response, so that the client
12963/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
12964impl std::ops::Drop for NodeSetFlagsResponder {
12965    fn drop(&mut self) {
12966        self.control_handle.shutdown();
12967        // Safety: drops once, never accessed again
12968        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12969    }
12970}
12971
12972impl fdomain_client::fidl::Responder for NodeSetFlagsResponder {
12973    type ControlHandle = NodeControlHandle;
12974
12975    fn control_handle(&self) -> &NodeControlHandle {
12976        &self.control_handle
12977    }
12978
12979    fn drop_without_shutdown(mut self) {
12980        // Safety: drops once, never accessed again due to mem::forget
12981        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12982        // Prevent Drop from running (which would shut down the channel)
12983        std::mem::forget(self);
12984    }
12985}
12986
12987impl NodeSetFlagsResponder {
12988    /// Sends a response to the FIDL transaction.
12989    ///
12990    /// Sets the channel to shutdown if an error occurs.
12991    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12992        let _result = self.send_raw(result);
12993        if _result.is_err() {
12994            self.control_handle.shutdown();
12995        }
12996        self.drop_without_shutdown();
12997        _result
12998    }
12999
13000    /// Similar to "send" but does not shutdown the channel if an error occurs.
13001    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13002        let _result = self.send_raw(result);
13003        self.drop_without_shutdown();
13004        _result
13005    }
13006
13007    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13008        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
13009            fidl::encoding::EmptyStruct,
13010            i32,
13011        >>(
13012            fidl::encoding::FlexibleResult::new(result),
13013            self.tx_id,
13014            0x55a8028685791ea8,
13015            fidl::encoding::DynamicFlags::FLEXIBLE,
13016        )
13017    }
13018}
13019
13020#[must_use = "FIDL methods require a response to be sent"]
13021#[derive(Debug)]
13022pub struct NodeQueryFilesystemResponder {
13023    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13024    tx_id: u32,
13025}
13026
13027/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13028/// if the responder is dropped without sending a response, so that the client
13029/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13030impl std::ops::Drop for NodeQueryFilesystemResponder {
13031    fn drop(&mut self) {
13032        self.control_handle.shutdown();
13033        // Safety: drops once, never accessed again
13034        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13035    }
13036}
13037
13038impl fdomain_client::fidl::Responder for NodeQueryFilesystemResponder {
13039    type ControlHandle = NodeControlHandle;
13040
13041    fn control_handle(&self) -> &NodeControlHandle {
13042        &self.control_handle
13043    }
13044
13045    fn drop_without_shutdown(mut self) {
13046        // Safety: drops once, never accessed again due to mem::forget
13047        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13048        // Prevent Drop from running (which would shut down the channel)
13049        std::mem::forget(self);
13050    }
13051}
13052
13053impl NodeQueryFilesystemResponder {
13054    /// Sends a response to the FIDL transaction.
13055    ///
13056    /// Sets the channel to shutdown if an error occurs.
13057    pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13058        let _result = self.send_raw(s, info);
13059        if _result.is_err() {
13060            self.control_handle.shutdown();
13061        }
13062        self.drop_without_shutdown();
13063        _result
13064    }
13065
13066    /// Similar to "send" but does not shutdown the channel if an error occurs.
13067    pub fn send_no_shutdown_on_err(
13068        self,
13069        mut s: i32,
13070        mut info: Option<&FilesystemInfo>,
13071    ) -> Result<(), fidl::Error> {
13072        let _result = self.send_raw(s, info);
13073        self.drop_without_shutdown();
13074        _result
13075    }
13076
13077    fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
13078        self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
13079            (s, info),
13080            self.tx_id,
13081            0x6f344a1c6b0a0610,
13082            fidl::encoding::DynamicFlags::empty(),
13083        )
13084    }
13085}
13086
13087#[must_use = "FIDL methods require a response to be sent"]
13088#[derive(Debug)]
13089pub struct NodeGetAttributesResponder {
13090    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13091    tx_id: u32,
13092}
13093
13094/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13095/// if the responder is dropped without sending a response, so that the client
13096/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13097impl std::ops::Drop for NodeGetAttributesResponder {
13098    fn drop(&mut self) {
13099        self.control_handle.shutdown();
13100        // Safety: drops once, never accessed again
13101        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13102    }
13103}
13104
13105impl fdomain_client::fidl::Responder for NodeGetAttributesResponder {
13106    type ControlHandle = NodeControlHandle;
13107
13108    fn control_handle(&self) -> &NodeControlHandle {
13109        &self.control_handle
13110    }
13111
13112    fn drop_without_shutdown(mut self) {
13113        // Safety: drops once, never accessed again due to mem::forget
13114        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13115        // Prevent Drop from running (which would shut down the channel)
13116        std::mem::forget(self);
13117    }
13118}
13119
13120impl NodeGetAttributesResponder {
13121    /// Sends a response to the FIDL transaction.
13122    ///
13123    /// Sets the channel to shutdown if an error occurs.
13124    pub fn send(
13125        self,
13126        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13127    ) -> Result<(), fidl::Error> {
13128        let _result = self.send_raw(result);
13129        if _result.is_err() {
13130            self.control_handle.shutdown();
13131        }
13132        self.drop_without_shutdown();
13133        _result
13134    }
13135
13136    /// Similar to "send" but does not shutdown the channel if an error occurs.
13137    pub fn send_no_shutdown_on_err(
13138        self,
13139        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13140    ) -> Result<(), fidl::Error> {
13141        let _result = self.send_raw(result);
13142        self.drop_without_shutdown();
13143        _result
13144    }
13145
13146    fn send_raw(
13147        &self,
13148        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
13149    ) -> Result<(), fidl::Error> {
13150        self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
13151            result,
13152            self.tx_id,
13153            0x3d4396a638ea053b,
13154            fidl::encoding::DynamicFlags::empty(),
13155        )
13156    }
13157}
13158
13159#[must_use = "FIDL methods require a response to be sent"]
13160#[derive(Debug)]
13161pub struct NodeUpdateAttributesResponder {
13162    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13163    tx_id: u32,
13164}
13165
13166/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13167/// if the responder is dropped without sending a response, so that the client
13168/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13169impl std::ops::Drop for NodeUpdateAttributesResponder {
13170    fn drop(&mut self) {
13171        self.control_handle.shutdown();
13172        // Safety: drops once, never accessed again
13173        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13174    }
13175}
13176
13177impl fdomain_client::fidl::Responder for NodeUpdateAttributesResponder {
13178    type ControlHandle = NodeControlHandle;
13179
13180    fn control_handle(&self) -> &NodeControlHandle {
13181        &self.control_handle
13182    }
13183
13184    fn drop_without_shutdown(mut self) {
13185        // Safety: drops once, never accessed again due to mem::forget
13186        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13187        // Prevent Drop from running (which would shut down the channel)
13188        std::mem::forget(self);
13189    }
13190}
13191
13192impl NodeUpdateAttributesResponder {
13193    /// Sends a response to the FIDL transaction.
13194    ///
13195    /// Sets the channel to shutdown if an error occurs.
13196    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13197        let _result = self.send_raw(result);
13198        if _result.is_err() {
13199            self.control_handle.shutdown();
13200        }
13201        self.drop_without_shutdown();
13202        _result
13203    }
13204
13205    /// Similar to "send" but does not shutdown the channel if an error occurs.
13206    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13207        let _result = self.send_raw(result);
13208        self.drop_without_shutdown();
13209        _result
13210    }
13211
13212    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13213        self.control_handle
13214            .inner
13215            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13216                result,
13217                self.tx_id,
13218                0x3308c1da5a89bf08,
13219                fidl::encoding::DynamicFlags::empty(),
13220            )
13221    }
13222}
13223
13224#[must_use = "FIDL methods require a response to be sent"]
13225#[derive(Debug)]
13226pub struct NodeSyncResponder {
13227    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13228    tx_id: u32,
13229}
13230
13231/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13232/// if the responder is dropped without sending a response, so that the client
13233/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13234impl std::ops::Drop for NodeSyncResponder {
13235    fn drop(&mut self) {
13236        self.control_handle.shutdown();
13237        // Safety: drops once, never accessed again
13238        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13239    }
13240}
13241
13242impl fdomain_client::fidl::Responder for NodeSyncResponder {
13243    type ControlHandle = NodeControlHandle;
13244
13245    fn control_handle(&self) -> &NodeControlHandle {
13246        &self.control_handle
13247    }
13248
13249    fn drop_without_shutdown(mut self) {
13250        // Safety: drops once, never accessed again due to mem::forget
13251        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13252        // Prevent Drop from running (which would shut down the channel)
13253        std::mem::forget(self);
13254    }
13255}
13256
13257impl NodeSyncResponder {
13258    /// Sends a response to the FIDL transaction.
13259    ///
13260    /// Sets the channel to shutdown if an error occurs.
13261    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13262        let _result = self.send_raw(result);
13263        if _result.is_err() {
13264            self.control_handle.shutdown();
13265        }
13266        self.drop_without_shutdown();
13267        _result
13268    }
13269
13270    /// Similar to "send" but does not shutdown the channel if an error occurs.
13271    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13272        let _result = self.send_raw(result);
13273        self.drop_without_shutdown();
13274        _result
13275    }
13276
13277    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13278        self.control_handle
13279            .inner
13280            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13281                result,
13282                self.tx_id,
13283                0x2c5c27ca0ab5dc49,
13284                fidl::encoding::DynamicFlags::empty(),
13285            )
13286    }
13287}
13288
13289#[must_use = "FIDL methods require a response to be sent"]
13290#[derive(Debug)]
13291pub struct NodeGetExtendedAttributeResponder {
13292    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13293    tx_id: u32,
13294}
13295
13296/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13297/// if the responder is dropped without sending a response, so that the client
13298/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13299impl std::ops::Drop for NodeGetExtendedAttributeResponder {
13300    fn drop(&mut self) {
13301        self.control_handle.shutdown();
13302        // Safety: drops once, never accessed again
13303        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13304    }
13305}
13306
13307impl fdomain_client::fidl::Responder for NodeGetExtendedAttributeResponder {
13308    type ControlHandle = NodeControlHandle;
13309
13310    fn control_handle(&self) -> &NodeControlHandle {
13311        &self.control_handle
13312    }
13313
13314    fn drop_without_shutdown(mut self) {
13315        // Safety: drops once, never accessed again due to mem::forget
13316        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13317        // Prevent Drop from running (which would shut down the channel)
13318        std::mem::forget(self);
13319    }
13320}
13321
13322impl NodeGetExtendedAttributeResponder {
13323    /// Sends a response to the FIDL transaction.
13324    ///
13325    /// Sets the channel to shutdown if an error occurs.
13326    pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13327        let _result = self.send_raw(result);
13328        if _result.is_err() {
13329            self.control_handle.shutdown();
13330        }
13331        self.drop_without_shutdown();
13332        _result
13333    }
13334
13335    /// Similar to "send" but does not shutdown the channel if an error occurs.
13336    pub fn send_no_shutdown_on_err(
13337        self,
13338        mut result: Result<ExtendedAttributeValue, i32>,
13339    ) -> Result<(), fidl::Error> {
13340        let _result = self.send_raw(result);
13341        self.drop_without_shutdown();
13342        _result
13343    }
13344
13345    fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
13346        self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
13347            result.as_mut().map_err(|e| *e),
13348            self.tx_id,
13349            0x45ffa3ccfdeb76db,
13350            fidl::encoding::DynamicFlags::empty(),
13351        )
13352    }
13353}
13354
13355#[must_use = "FIDL methods require a response to be sent"]
13356#[derive(Debug)]
13357pub struct NodeSetExtendedAttributeResponder {
13358    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13359    tx_id: u32,
13360}
13361
13362/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13363/// if the responder is dropped without sending a response, so that the client
13364/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13365impl std::ops::Drop for NodeSetExtendedAttributeResponder {
13366    fn drop(&mut self) {
13367        self.control_handle.shutdown();
13368        // Safety: drops once, never accessed again
13369        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13370    }
13371}
13372
13373impl fdomain_client::fidl::Responder for NodeSetExtendedAttributeResponder {
13374    type ControlHandle = NodeControlHandle;
13375
13376    fn control_handle(&self) -> &NodeControlHandle {
13377        &self.control_handle
13378    }
13379
13380    fn drop_without_shutdown(mut self) {
13381        // Safety: drops once, never accessed again due to mem::forget
13382        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13383        // Prevent Drop from running (which would shut down the channel)
13384        std::mem::forget(self);
13385    }
13386}
13387
13388impl NodeSetExtendedAttributeResponder {
13389    /// Sends a response to the FIDL transaction.
13390    ///
13391    /// Sets the channel to shutdown if an error occurs.
13392    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13393        let _result = self.send_raw(result);
13394        if _result.is_err() {
13395            self.control_handle.shutdown();
13396        }
13397        self.drop_without_shutdown();
13398        _result
13399    }
13400
13401    /// Similar to "send" but does not shutdown the channel if an error occurs.
13402    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13403        let _result = self.send_raw(result);
13404        self.drop_without_shutdown();
13405        _result
13406    }
13407
13408    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13409        self.control_handle
13410            .inner
13411            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13412                result,
13413                self.tx_id,
13414                0x4a951362f681f23c,
13415                fidl::encoding::DynamicFlags::empty(),
13416            )
13417    }
13418}
13419
13420#[must_use = "FIDL methods require a response to be sent"]
13421#[derive(Debug)]
13422pub struct NodeRemoveExtendedAttributeResponder {
13423    control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
13424    tx_id: u32,
13425}
13426
13427/// Set the the channel to be shutdown (see [`NodeControlHandle::shutdown`])
13428/// if the responder is dropped without sending a response, so that the client
13429/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13430impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
13431    fn drop(&mut self) {
13432        self.control_handle.shutdown();
13433        // Safety: drops once, never accessed again
13434        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13435    }
13436}
13437
13438impl fdomain_client::fidl::Responder for NodeRemoveExtendedAttributeResponder {
13439    type ControlHandle = NodeControlHandle;
13440
13441    fn control_handle(&self) -> &NodeControlHandle {
13442        &self.control_handle
13443    }
13444
13445    fn drop_without_shutdown(mut self) {
13446        // Safety: drops once, never accessed again due to mem::forget
13447        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13448        // Prevent Drop from running (which would shut down the channel)
13449        std::mem::forget(self);
13450    }
13451}
13452
13453impl NodeRemoveExtendedAttributeResponder {
13454    /// Sends a response to the FIDL transaction.
13455    ///
13456    /// Sets the channel to shutdown if an error occurs.
13457    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13458        let _result = self.send_raw(result);
13459        if _result.is_err() {
13460            self.control_handle.shutdown();
13461        }
13462        self.drop_without_shutdown();
13463        _result
13464    }
13465
13466    /// Similar to "send" but does not shutdown the channel if an error occurs.
13467    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13468        let _result = self.send_raw(result);
13469        self.drop_without_shutdown();
13470        _result
13471    }
13472
13473    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
13474        self.control_handle
13475            .inner
13476            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
13477                result,
13478                self.tx_id,
13479                0x7a0b9f3a9bf9032d,
13480                fidl::encoding::DynamicFlags::empty(),
13481            )
13482    }
13483}
13484
13485#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13486pub struct ReadableMarker;
13487
13488impl fdomain_client::fidl::ProtocolMarker for ReadableMarker {
13489    type Proxy = ReadableProxy;
13490    type RequestStream = ReadableRequestStream;
13491
13492    const DEBUG_NAME: &'static str = "(anonymous) Readable";
13493}
13494pub type ReadableReadResult = Result<Vec<u8>, i32>;
13495
13496pub trait ReadableProxyInterface: Send + Sync {
13497    type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
13498        + Send;
13499    fn r#read(&self, count: u64) -> Self::ReadResponseFut;
13500}
13501
13502#[derive(Debug, Clone)]
13503pub struct ReadableProxy {
13504    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13505}
13506
13507impl fdomain_client::fidl::Proxy for ReadableProxy {
13508    type Protocol = ReadableMarker;
13509
13510    fn from_channel(inner: fdomain_client::Channel) -> Self {
13511        Self::new(inner)
13512    }
13513
13514    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13515        self.client.into_channel().map_err(|client| Self { client })
13516    }
13517
13518    fn as_channel(&self) -> &fdomain_client::Channel {
13519        self.client.as_channel()
13520    }
13521}
13522
13523impl ReadableProxy {
13524    /// Create a new Proxy for fuchsia.io/Readable.
13525    pub fn new(channel: fdomain_client::Channel) -> Self {
13526        let protocol_name = <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13527        Self { client: fidl::client::Client::new(channel, protocol_name) }
13528    }
13529
13530    /// Get a Stream of events from the remote end of the protocol.
13531    ///
13532    /// # Panics
13533    ///
13534    /// Panics if the event stream was already taken.
13535    pub fn take_event_stream(&self) -> ReadableEventStream {
13536        ReadableEventStream { event_receiver: self.client.take_event_receiver() }
13537    }
13538
13539    /// Reads up to 'count' bytes at the seek offset.
13540    /// The seek offset is moved forward by the number of bytes read.
13541    ///
13542    /// ## Invariants
13543    ///
13544    /// * The returned `data.length` will never be greater than `count`.
13545    /// * If `data.length` is less than `count`, it means that the seek offset
13546    ///   has reached the end of file as part of this operation.
13547    /// * If `data.length` is zero while `count` is not, it means that the
13548    ///   seek offset is already at or beyond the end of file, and no data could
13549    ///   be read.
13550    /// * If `count` is zero, the server should perform all the checks ensuring
13551    ///   read access without actually read anything, and return an empty
13552    ///   `data` vector.
13553    ///
13554    /// This method requires the [`Rights.READ_BYTES`] right.
13555    ///
13556    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
13557    pub fn r#read(
13558        &self,
13559        mut count: u64,
13560    ) -> fidl::client::QueryResponseFut<
13561        ReadableReadResult,
13562        fdomain_client::fidl::FDomainResourceDialect,
13563    > {
13564        ReadableProxyInterface::r#read(self, count)
13565    }
13566}
13567
13568impl ReadableProxyInterface for ReadableProxy {
13569    type ReadResponseFut = fidl::client::QueryResponseFut<
13570        ReadableReadResult,
13571        fdomain_client::fidl::FDomainResourceDialect,
13572    >;
13573    fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
13574        fn _decode(
13575            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13576        ) -> Result<ReadableReadResult, fidl::Error> {
13577            let _response = fidl::client::decode_transaction_body::<
13578                fidl::encoding::ResultType<ReadableReadResponse, i32>,
13579                fdomain_client::fidl::FDomainResourceDialect,
13580                0x57e419a298c8ede,
13581            >(_buf?)?;
13582            Ok(_response.map(|x| x.data))
13583        }
13584        self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
13585            (count,),
13586            0x57e419a298c8ede,
13587            fidl::encoding::DynamicFlags::empty(),
13588            _decode,
13589        )
13590    }
13591}
13592
13593pub struct ReadableEventStream {
13594    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
13595}
13596
13597impl std::marker::Unpin for ReadableEventStream {}
13598
13599impl futures::stream::FusedStream for ReadableEventStream {
13600    fn is_terminated(&self) -> bool {
13601        self.event_receiver.is_terminated()
13602    }
13603}
13604
13605impl futures::Stream for ReadableEventStream {
13606    type Item = Result<ReadableEvent, fidl::Error>;
13607
13608    fn poll_next(
13609        mut self: std::pin::Pin<&mut Self>,
13610        cx: &mut std::task::Context<'_>,
13611    ) -> std::task::Poll<Option<Self::Item>> {
13612        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
13613            &mut self.event_receiver,
13614            cx
13615        )?) {
13616            Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
13617            None => std::task::Poll::Ready(None),
13618        }
13619    }
13620}
13621
13622#[derive(Debug)]
13623pub enum ReadableEvent {}
13624
13625impl ReadableEvent {
13626    /// Decodes a message buffer as a [`ReadableEvent`].
13627    fn decode(
13628        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
13629    ) -> Result<ReadableEvent, fidl::Error> {
13630        let (bytes, _handles) = buf.split_mut();
13631        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13632        debug_assert_eq!(tx_header.tx_id, 0);
13633        match tx_header.ordinal {
13634            _ => Err(fidl::Error::UnknownOrdinal {
13635                ordinal: tx_header.ordinal,
13636                protocol_name: <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13637            }),
13638        }
13639    }
13640}
13641
13642/// A Stream of incoming requests for fuchsia.io/Readable.
13643pub struct ReadableRequestStream {
13644    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13645    is_terminated: bool,
13646}
13647
13648impl std::marker::Unpin for ReadableRequestStream {}
13649
13650impl futures::stream::FusedStream for ReadableRequestStream {
13651    fn is_terminated(&self) -> bool {
13652        self.is_terminated
13653    }
13654}
13655
13656impl fdomain_client::fidl::RequestStream for ReadableRequestStream {
13657    type Protocol = ReadableMarker;
13658    type ControlHandle = ReadableControlHandle;
13659
13660    fn from_channel(channel: fdomain_client::Channel) -> Self {
13661        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
13662    }
13663
13664    fn control_handle(&self) -> Self::ControlHandle {
13665        ReadableControlHandle { inner: self.inner.clone() }
13666    }
13667
13668    fn into_inner(
13669        self,
13670    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
13671    {
13672        (self.inner, self.is_terminated)
13673    }
13674
13675    fn from_inner(
13676        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13677        is_terminated: bool,
13678    ) -> Self {
13679        Self { inner, is_terminated }
13680    }
13681}
13682
13683impl futures::Stream for ReadableRequestStream {
13684    type Item = Result<ReadableRequest, fidl::Error>;
13685
13686    fn poll_next(
13687        mut self: std::pin::Pin<&mut Self>,
13688        cx: &mut std::task::Context<'_>,
13689    ) -> std::task::Poll<Option<Self::Item>> {
13690        let this = &mut *self;
13691        if this.inner.check_shutdown(cx) {
13692            this.is_terminated = true;
13693            return std::task::Poll::Ready(None);
13694        }
13695        if this.is_terminated {
13696            panic!("polled ReadableRequestStream after completion");
13697        }
13698        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
13699            |bytes, handles| {
13700                match this.inner.channel().read_etc(cx, bytes, handles) {
13701                    std::task::Poll::Ready(Ok(())) => {}
13702                    std::task::Poll::Pending => return std::task::Poll::Pending,
13703                    std::task::Poll::Ready(Err(None)) => {
13704                        this.is_terminated = true;
13705                        return std::task::Poll::Ready(None);
13706                    }
13707                    std::task::Poll::Ready(Err(Some(e))) => {
13708                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
13709                            e.into(),
13710                        ))));
13711                    }
13712                }
13713
13714                // A message has been received from the channel
13715                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
13716
13717                std::task::Poll::Ready(Some(match header.ordinal {
13718                    0x57e419a298c8ede => {
13719                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
13720                        let mut req = fidl::new_empty!(
13721                            ReadableReadRequest,
13722                            fdomain_client::fidl::FDomainResourceDialect
13723                        );
13724                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
13725                        let control_handle = ReadableControlHandle { inner: this.inner.clone() };
13726                        Ok(ReadableRequest::Read {
13727                            count: req.count,
13728
13729                            responder: ReadableReadResponder {
13730                                control_handle: std::mem::ManuallyDrop::new(control_handle),
13731                                tx_id: header.tx_id,
13732                            },
13733                        })
13734                    }
13735                    _ => Err(fidl::Error::UnknownOrdinal {
13736                        ordinal: header.ordinal,
13737                        protocol_name:
13738                            <ReadableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
13739                    }),
13740                }))
13741            },
13742        )
13743    }
13744}
13745
13746#[derive(Debug)]
13747pub enum ReadableRequest {
13748    /// Reads up to 'count' bytes at the seek offset.
13749    /// The seek offset is moved forward by the number of bytes read.
13750    ///
13751    /// ## Invariants
13752    ///
13753    /// * The returned `data.length` will never be greater than `count`.
13754    /// * If `data.length` is less than `count`, it means that the seek offset
13755    ///   has reached the end of file as part of this operation.
13756    /// * If `data.length` is zero while `count` is not, it means that the
13757    ///   seek offset is already at or beyond the end of file, and no data could
13758    ///   be read.
13759    /// * If `count` is zero, the server should perform all the checks ensuring
13760    ///   read access without actually read anything, and return an empty
13761    ///   `data` vector.
13762    ///
13763    /// This method requires the [`Rights.READ_BYTES`] right.
13764    ///
13765    /// Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.
13766    Read { count: u64, responder: ReadableReadResponder },
13767}
13768
13769impl ReadableRequest {
13770    #[allow(irrefutable_let_patterns)]
13771    pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
13772        if let ReadableRequest::Read { count, responder } = self {
13773            Some((count, responder))
13774        } else {
13775            None
13776        }
13777    }
13778
13779    /// Name of the method defined in FIDL
13780    pub fn method_name(&self) -> &'static str {
13781        match *self {
13782            ReadableRequest::Read { .. } => "read",
13783        }
13784    }
13785}
13786
13787#[derive(Debug, Clone)]
13788pub struct ReadableControlHandle {
13789    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
13790}
13791
13792impl fdomain_client::fidl::ControlHandle for ReadableControlHandle {
13793    fn shutdown(&self) {
13794        self.inner.shutdown()
13795    }
13796
13797    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
13798        self.inner.shutdown_with_epitaph(status)
13799    }
13800
13801    fn is_closed(&self) -> bool {
13802        self.inner.channel().is_closed()
13803    }
13804    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
13805        self.inner.channel().on_closed()
13806    }
13807}
13808
13809impl ReadableControlHandle {}
13810
13811#[must_use = "FIDL methods require a response to be sent"]
13812#[derive(Debug)]
13813pub struct ReadableReadResponder {
13814    control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
13815    tx_id: u32,
13816}
13817
13818/// Set the the channel to be shutdown (see [`ReadableControlHandle::shutdown`])
13819/// if the responder is dropped without sending a response, so that the client
13820/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
13821impl std::ops::Drop for ReadableReadResponder {
13822    fn drop(&mut self) {
13823        self.control_handle.shutdown();
13824        // Safety: drops once, never accessed again
13825        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13826    }
13827}
13828
13829impl fdomain_client::fidl::Responder for ReadableReadResponder {
13830    type ControlHandle = ReadableControlHandle;
13831
13832    fn control_handle(&self) -> &ReadableControlHandle {
13833        &self.control_handle
13834    }
13835
13836    fn drop_without_shutdown(mut self) {
13837        // Safety: drops once, never accessed again due to mem::forget
13838        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
13839        // Prevent Drop from running (which would shut down the channel)
13840        std::mem::forget(self);
13841    }
13842}
13843
13844impl ReadableReadResponder {
13845    /// Sends a response to the FIDL transaction.
13846    ///
13847    /// Sets the channel to shutdown if an error occurs.
13848    pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13849        let _result = self.send_raw(result);
13850        if _result.is_err() {
13851            self.control_handle.shutdown();
13852        }
13853        self.drop_without_shutdown();
13854        _result
13855    }
13856
13857    /// Similar to "send" but does not shutdown the channel if an error occurs.
13858    pub fn send_no_shutdown_on_err(
13859        self,
13860        mut result: Result<&[u8], i32>,
13861    ) -> Result<(), fidl::Error> {
13862        let _result = self.send_raw(result);
13863        self.drop_without_shutdown();
13864        _result
13865    }
13866
13867    fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
13868        self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
13869            result.map(|data| (data,)),
13870            self.tx_id,
13871            0x57e419a298c8ede,
13872            fidl::encoding::DynamicFlags::empty(),
13873        )
13874    }
13875}
13876
13877#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
13878pub struct SymlinkMarker;
13879
13880impl fdomain_client::fidl::ProtocolMarker for SymlinkMarker {
13881    type Proxy = SymlinkProxy;
13882    type RequestStream = SymlinkRequestStream;
13883
13884    const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
13885}
13886impl fdomain_client::fidl::DiscoverableProtocolMarker for SymlinkMarker {}
13887
13888pub trait SymlinkProxyInterface: Send + Sync {
13889    type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
13890        + Send;
13891    fn r#link_into(
13892        &self,
13893        dst_parent_token: fdomain_client::Event,
13894        dst: &str,
13895    ) -> Self::LinkIntoResponseFut;
13896    fn r#clone(
13897        &self,
13898        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
13899    ) -> Result<(), fidl::Error>;
13900    type CloseResponseFut: std::future::Future<
13901            Output = Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
13902        > + Send;
13903    fn r#close(&self) -> Self::CloseResponseFut;
13904    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
13905    fn r#query(&self) -> Self::QueryResponseFut;
13906    fn r#deprecated_clone(
13907        &self,
13908        flags: OpenFlags,
13909        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
13910    ) -> Result<(), fidl::Error>;
13911    type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
13912        + Send;
13913    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
13914    type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
13915    fn r#deprecated_set_attr(
13916        &self,
13917        flags: NodeAttributeFlags,
13918        attributes: &NodeAttributes,
13919    ) -> Self::DeprecatedSetAttrResponseFut;
13920    type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
13921        + Send;
13922    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
13923    type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
13924        + Send;
13925    fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
13926    type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
13927        + Send;
13928    fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
13929    type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
13930        + Send;
13931    fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
13932    type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
13933        + Send;
13934    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
13935    type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
13936        + Send;
13937    fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
13938    type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
13939        + Send;
13940    fn r#update_attributes(
13941        &self,
13942        payload: &MutableNodeAttributes,
13943    ) -> Self::UpdateAttributesResponseFut;
13944    type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
13945    fn r#sync(&self) -> Self::SyncResponseFut;
13946    fn r#list_extended_attributes(
13947        &self,
13948        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
13949    ) -> Result<(), fidl::Error>;
13950    type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
13951        + Send;
13952    fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
13953    type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
13954        + Send;
13955    fn r#set_extended_attribute(
13956        &self,
13957        name: &[u8],
13958        value: ExtendedAttributeValue,
13959        mode: SetExtendedAttributeMode,
13960    ) -> Self::SetExtendedAttributeResponseFut;
13961    type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
13962        + Send;
13963    fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
13964    type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
13965    fn r#describe(&self) -> Self::DescribeResponseFut;
13966}
13967
13968#[derive(Debug, Clone)]
13969pub struct SymlinkProxy {
13970    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
13971}
13972
13973impl fdomain_client::fidl::Proxy for SymlinkProxy {
13974    type Protocol = SymlinkMarker;
13975
13976    fn from_channel(inner: fdomain_client::Channel) -> Self {
13977        Self::new(inner)
13978    }
13979
13980    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
13981        self.client.into_channel().map_err(|client| Self { client })
13982    }
13983
13984    fn as_channel(&self) -> &fdomain_client::Channel {
13985        self.client.as_channel()
13986    }
13987}
13988
13989impl SymlinkProxy {
13990    /// Create a new Proxy for fuchsia.io/Symlink.
13991    pub fn new(channel: fdomain_client::Channel) -> Self {
13992        let protocol_name = <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
13993        Self { client: fidl::client::Client::new(channel, protocol_name) }
13994    }
13995
13996    /// Get a Stream of events from the remote end of the protocol.
13997    ///
13998    /// # Panics
13999    ///
14000    /// Panics if the event stream was already taken.
14001    pub fn take_event_stream(&self) -> SymlinkEventStream {
14002        SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
14003    }
14004
14005    /// Creates a link to this this object with name `dst` in the directory represented by
14006    /// `dst_parent_token`.
14007    ///
14008    /// `dst` must be a resolved object name. Including "/" in the string will return
14009    /// `ZX_ERR_INVALID_ARGS`.
14010    ///
14011    /// This method requires the maximal set of rights supported by the filesystem for this object.
14012    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
14013    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
14014    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
14015    /// `ZX_ERR_ACCESS_DENIED`.
14016    ///
14017    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
14018    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
14019    ///
14020    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
14021    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
14022    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
14023    ///
14024    /// This method does not have the same atomicity properties has the `Directory::Link` method,
14025    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
14026    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
14027    pub fn r#link_into(
14028        &self,
14029        mut dst_parent_token: fdomain_client::Event,
14030        mut dst: &str,
14031    ) -> fidl::client::QueryResponseFut<
14032        LinkableLinkIntoResult,
14033        fdomain_client::fidl::FDomainResourceDialect,
14034    > {
14035        SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
14036    }
14037
14038    pub fn r#clone(
14039        &self,
14040        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14041    ) -> Result<(), fidl::Error> {
14042        SymlinkProxyInterface::r#clone(self, request)
14043    }
14044
14045    /// Terminates the connection.
14046    ///
14047    /// After calling `Close`, the client must not send any other requests.
14048    ///
14049    /// Servers, after sending the status response, should close the connection
14050    /// regardless of status and without sending an epitaph.
14051    ///
14052    /// Closing the client end of the channel should be semantically equivalent
14053    /// to calling `Close` without knowing when the close has completed or its
14054    /// status.
14055    pub fn r#close(
14056        &self,
14057    ) -> fidl::client::QueryResponseFut<
14058        fdomain_fuchsia_unknown::CloseableCloseResult,
14059        fdomain_client::fidl::FDomainResourceDialect,
14060    > {
14061        SymlinkProxyInterface::r#close(self)
14062    }
14063
14064    pub fn r#query(
14065        &self,
14066    ) -> fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect> {
14067        SymlinkProxyInterface::r#query(self)
14068    }
14069
14070    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
14071    pub fn r#deprecated_clone(
14072        &self,
14073        mut flags: OpenFlags,
14074        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14075    ) -> Result<(), fidl::Error> {
14076        SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
14077    }
14078
14079    /// DEPRECATED - Use `Node.GetAttributes` instead.
14080    pub fn r#deprecated_get_attr(
14081        &self,
14082    ) -> fidl::client::QueryResponseFut<
14083        (i32, NodeAttributes),
14084        fdomain_client::fidl::FDomainResourceDialect,
14085    > {
14086        SymlinkProxyInterface::r#deprecated_get_attr(self)
14087    }
14088
14089    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
14090    pub fn r#deprecated_set_attr(
14091        &self,
14092        mut flags: NodeAttributeFlags,
14093        mut attributes: &NodeAttributes,
14094    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14095        SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
14096    }
14097
14098    /// [DEPRECATED - Use new GetFlags method instead.]
14099    pub fn r#deprecated_get_flags(
14100        &self,
14101    ) -> fidl::client::QueryResponseFut<
14102        (i32, OpenFlags),
14103        fdomain_client::fidl::FDomainResourceDialect,
14104    > {
14105        SymlinkProxyInterface::r#deprecated_get_flags(self)
14106    }
14107
14108    /// [DEPRECATED - Use new SetFlags method instead.]
14109    pub fn r#deprecated_set_flags(
14110        &self,
14111        mut flags: OpenFlags,
14112    ) -> fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect> {
14113        SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
14114    }
14115
14116    /// Queries the flags that apply to this node after it has been opened/created. This method does
14117    /// not require any rights.
14118    ///
14119    /// Note that the final set of flags that apply to the connection may differ from those
14120    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
14121    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
14122    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
14123    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
14124    pub fn r#get_flags(
14125        &self,
14126    ) -> fidl::client::QueryResponseFut<
14127        NodeGetFlagsResult,
14128        fdomain_client::fidl::FDomainResourceDialect,
14129    > {
14130        SymlinkProxyInterface::r#get_flags(self)
14131    }
14132
14133    /// Sets the flags that apply to this node after it has been opened. This method does not
14134    /// require any rights.
14135    ///
14136    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
14137    /// clear append mode.
14138    ///
14139    /// Errors:
14140    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
14141    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
14142    pub fn r#set_flags(
14143        &self,
14144        mut flags: Flags,
14145    ) -> fidl::client::QueryResponseFut<
14146        NodeSetFlagsResult,
14147        fdomain_client::fidl::FDomainResourceDialect,
14148    > {
14149        SymlinkProxyInterface::r#set_flags(self, flags)
14150    }
14151
14152    /// Query the filesystem for details specific to the filesystem and/or volume. If the current
14153    /// volume has different settings or the storage is accounted seperately from the rest of the
14154    /// filesystem that may be reported instead of filesystem-wide details.
14155    pub fn r#query_filesystem(
14156        &self,
14157    ) -> fidl::client::QueryResponseFut<
14158        (i32, Option<Box<FilesystemInfo>>),
14159        fdomain_client::fidl::FDomainResourceDialect,
14160    > {
14161        SymlinkProxyInterface::r#query_filesystem(self)
14162    }
14163
14164    /// Acquires information about the node.
14165    ///
14166    /// The attributes of a node should be stable, independent of the
14167    /// specific protocol used to access it.
14168    ///
14169    /// If a particular attribute is not applicable or not supported,
14170    /// filesystems should leave the corresponding field absent.
14171    ///
14172    /// + `query` a bit-mask specifying which attributes to fetch. The server
14173    ///   should not return more than necessary.
14174    /// - `attributes` the returned attributes.
14175    ///
14176    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
14177    pub fn r#get_attributes(
14178        &self,
14179        mut query: NodeAttributesQuery,
14180    ) -> fidl::client::QueryResponseFut<
14181        NodeGetAttributesResult,
14182        fdomain_client::fidl::FDomainResourceDialect,
14183    > {
14184        SymlinkProxyInterface::r#get_attributes(self, query)
14185    }
14186
14187    /// Updates information about the node.
14188    ///
14189    /// + `attributes` the presence of a table field in `attributes` indicates
14190    /// the intent to update the corresponding attribute.
14191    ///
14192    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
14193    ///
14194    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
14195    pub fn r#update_attributes(
14196        &self,
14197        mut payload: &MutableNodeAttributes,
14198    ) -> fidl::client::QueryResponseFut<
14199        NodeUpdateAttributesResult,
14200        fdomain_client::fidl::FDomainResourceDialect,
14201    > {
14202        SymlinkProxyInterface::r#update_attributes(self, payload)
14203    }
14204
14205    /// Synchronizes updates to the node to the underlying media, if it exists.
14206    ///
14207    /// This method will return when the filesystem server has flushed the
14208    /// relevant updates to the underlying media, but does not guarantee the
14209    /// underlying media has persisted the information, nor that any information
14210    /// is committed to hardware. Clients may use `Sync` to ensure ordering
14211    /// between operations.
14212    ///
14213    /// This method does not require any rights.
14214    pub fn r#sync(
14215        &self,
14216    ) -> fidl::client::QueryResponseFut<NodeSyncResult, fdomain_client::fidl::FDomainResourceDialect>
14217    {
14218        SymlinkProxyInterface::r#sync(self)
14219    }
14220
14221    /// Creates an iterator over all the extended attribute names associated
14222    /// with this node. If an error occurs it is returned as an epitaph on the
14223    /// iterator request channel, and then the channel is closed.
14224    ///
14225    /// GetExtendedAttributes can be used with any of these names to retrieve
14226    /// the associated value.
14227    ///
14228    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
14229    pub fn r#list_extended_attributes(
14230        &self,
14231        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14232    ) -> Result<(), fidl::Error> {
14233        SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
14234    }
14235
14236    /// Get the value associated with the given attribute `name` for this node.
14237    ///
14238    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
14239    /// particular structure is imposed on them.
14240    ///
14241    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
14242    pub fn r#get_extended_attribute(
14243        &self,
14244        mut name: &[u8],
14245    ) -> fidl::client::QueryResponseFut<
14246        NodeGetExtendedAttributeResult,
14247        fdomain_client::fidl::FDomainResourceDialect,
14248    > {
14249        SymlinkProxyInterface::r#get_extended_attribute(self, name)
14250    }
14251
14252    /// Set the value for the given attribute `name` to `value` for this node.
14253    ///
14254    /// The attribute name may exist, in which case the attribute is updated.
14255    /// If the attribute doesn't exist, it is created. The name should have no
14256    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
14257    ///
14258    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
14259    pub fn r#set_extended_attribute(
14260        &self,
14261        mut name: &[u8],
14262        mut value: ExtendedAttributeValue,
14263        mut mode: SetExtendedAttributeMode,
14264    ) -> fidl::client::QueryResponseFut<
14265        NodeSetExtendedAttributeResult,
14266        fdomain_client::fidl::FDomainResourceDialect,
14267    > {
14268        SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
14269    }
14270
14271    /// Remove the specified extended attribute.
14272    ///
14273    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
14274    ///
14275    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
14276    pub fn r#remove_extended_attribute(
14277        &self,
14278        mut name: &[u8],
14279    ) -> fidl::client::QueryResponseFut<
14280        NodeRemoveExtendedAttributeResult,
14281        fdomain_client::fidl::FDomainResourceDialect,
14282    > {
14283        SymlinkProxyInterface::r#remove_extended_attribute(self, name)
14284    }
14285
14286    pub fn r#describe(
14287        &self,
14288    ) -> fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>
14289    {
14290        SymlinkProxyInterface::r#describe(self)
14291    }
14292}
14293
14294impl SymlinkProxyInterface for SymlinkProxy {
14295    type LinkIntoResponseFut = fidl::client::QueryResponseFut<
14296        LinkableLinkIntoResult,
14297        fdomain_client::fidl::FDomainResourceDialect,
14298    >;
14299    fn r#link_into(
14300        &self,
14301        mut dst_parent_token: fdomain_client::Event,
14302        mut dst: &str,
14303    ) -> Self::LinkIntoResponseFut {
14304        fn _decode(
14305            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14306        ) -> Result<LinkableLinkIntoResult, fidl::Error> {
14307            let _response = fidl::client::decode_transaction_body::<
14308                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14309                fdomain_client::fidl::FDomainResourceDialect,
14310                0x54f3949246a03e74,
14311            >(_buf?)?;
14312            Ok(_response.map(|x| x))
14313        }
14314        self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
14315            (dst_parent_token, dst),
14316            0x54f3949246a03e74,
14317            fidl::encoding::DynamicFlags::empty(),
14318            _decode,
14319        )
14320    }
14321
14322    fn r#clone(
14323        &self,
14324        mut request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
14325    ) -> Result<(), fidl::Error> {
14326        self.client.send::<fdomain_fuchsia_unknown::CloneableCloneRequest>(
14327            (request,),
14328            0x20d8a7aba2168a79,
14329            fidl::encoding::DynamicFlags::empty(),
14330        )
14331    }
14332
14333    type CloseResponseFut = fidl::client::QueryResponseFut<
14334        fdomain_fuchsia_unknown::CloseableCloseResult,
14335        fdomain_client::fidl::FDomainResourceDialect,
14336    >;
14337    fn r#close(&self) -> Self::CloseResponseFut {
14338        fn _decode(
14339            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14340        ) -> Result<fdomain_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
14341            let _response = fidl::client::decode_transaction_body::<
14342                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14343                fdomain_client::fidl::FDomainResourceDialect,
14344                0x5ac5d459ad7f657e,
14345            >(_buf?)?;
14346            Ok(_response.map(|x| x))
14347        }
14348        self.client.send_query_and_decode::<
14349            fidl::encoding::EmptyPayload,
14350            fdomain_fuchsia_unknown::CloseableCloseResult,
14351        >(
14352            (),
14353            0x5ac5d459ad7f657e,
14354            fidl::encoding::DynamicFlags::empty(),
14355            _decode,
14356        )
14357    }
14358
14359    type QueryResponseFut =
14360        fidl::client::QueryResponseFut<Vec<u8>, fdomain_client::fidl::FDomainResourceDialect>;
14361    fn r#query(&self) -> Self::QueryResponseFut {
14362        fn _decode(
14363            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14364        ) -> Result<Vec<u8>, fidl::Error> {
14365            let _response = fidl::client::decode_transaction_body::<
14366                fdomain_fuchsia_unknown::QueryableQueryResponse,
14367                fdomain_client::fidl::FDomainResourceDialect,
14368                0x2658edee9decfc06,
14369            >(_buf?)?;
14370            Ok(_response.protocol)
14371        }
14372        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
14373            (),
14374            0x2658edee9decfc06,
14375            fidl::encoding::DynamicFlags::empty(),
14376            _decode,
14377        )
14378    }
14379
14380    fn r#deprecated_clone(
14381        &self,
14382        mut flags: OpenFlags,
14383        mut object: fdomain_client::fidl::ServerEnd<NodeMarker>,
14384    ) -> Result<(), fidl::Error> {
14385        self.client.send::<NodeDeprecatedCloneRequest>(
14386            (flags, object),
14387            0x5a61678f293ce16f,
14388            fidl::encoding::DynamicFlags::FLEXIBLE,
14389        )
14390    }
14391
14392    type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
14393        (i32, NodeAttributes),
14394        fdomain_client::fidl::FDomainResourceDialect,
14395    >;
14396    fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
14397        fn _decode(
14398            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14399        ) -> Result<(i32, NodeAttributes), fidl::Error> {
14400            let _response = fidl::client::decode_transaction_body::<
14401                NodeDeprecatedGetAttrResponse,
14402                fdomain_client::fidl::FDomainResourceDialect,
14403                0x78985e216314dafd,
14404            >(_buf?)?;
14405            Ok((_response.s, _response.attributes))
14406        }
14407        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
14408            (),
14409            0x78985e216314dafd,
14410            fidl::encoding::DynamicFlags::empty(),
14411            _decode,
14412        )
14413    }
14414
14415    type DeprecatedSetAttrResponseFut =
14416        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14417    fn r#deprecated_set_attr(
14418        &self,
14419        mut flags: NodeAttributeFlags,
14420        mut attributes: &NodeAttributes,
14421    ) -> Self::DeprecatedSetAttrResponseFut {
14422        fn _decode(
14423            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14424        ) -> Result<i32, fidl::Error> {
14425            let _response = fidl::client::decode_transaction_body::<
14426                NodeDeprecatedSetAttrResponse,
14427                fdomain_client::fidl::FDomainResourceDialect,
14428                0x4186c0f40d938f46,
14429            >(_buf?)?;
14430            Ok(_response.s)
14431        }
14432        self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
14433            (flags, attributes),
14434            0x4186c0f40d938f46,
14435            fidl::encoding::DynamicFlags::empty(),
14436            _decode,
14437        )
14438    }
14439
14440    type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
14441        (i32, OpenFlags),
14442        fdomain_client::fidl::FDomainResourceDialect,
14443    >;
14444    fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
14445        fn _decode(
14446            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14447        ) -> Result<(i32, OpenFlags), fidl::Error> {
14448            let _response = fidl::client::decode_transaction_body::<
14449                NodeDeprecatedGetFlagsResponse,
14450                fdomain_client::fidl::FDomainResourceDialect,
14451                0x5b88fffb8eda3aa1,
14452            >(_buf?)?;
14453            Ok((_response.s, _response.flags))
14454        }
14455        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
14456            (),
14457            0x5b88fffb8eda3aa1,
14458            fidl::encoding::DynamicFlags::empty(),
14459            _decode,
14460        )
14461    }
14462
14463    type DeprecatedSetFlagsResponseFut =
14464        fidl::client::QueryResponseFut<i32, fdomain_client::fidl::FDomainResourceDialect>;
14465    fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
14466        fn _decode(
14467            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14468        ) -> Result<i32, fidl::Error> {
14469            let _response = fidl::client::decode_transaction_body::<
14470                NodeDeprecatedSetFlagsResponse,
14471                fdomain_client::fidl::FDomainResourceDialect,
14472                0x5295b76c71fde733,
14473            >(_buf?)?;
14474            Ok(_response.s)
14475        }
14476        self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
14477            (flags,),
14478            0x5295b76c71fde733,
14479            fidl::encoding::DynamicFlags::empty(),
14480            _decode,
14481        )
14482    }
14483
14484    type GetFlagsResponseFut = fidl::client::QueryResponseFut<
14485        NodeGetFlagsResult,
14486        fdomain_client::fidl::FDomainResourceDialect,
14487    >;
14488    fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
14489        fn _decode(
14490            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14491        ) -> Result<NodeGetFlagsResult, fidl::Error> {
14492            let _response = fidl::client::decode_transaction_body::<
14493                fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
14494                fdomain_client::fidl::FDomainResourceDialect,
14495                0x176eb318f64ec23,
14496            >(_buf?)?
14497            .into_result_fdomain::<SymlinkMarker>("get_flags")?;
14498            Ok(_response.map(|x| x.flags))
14499        }
14500        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
14501            (),
14502            0x176eb318f64ec23,
14503            fidl::encoding::DynamicFlags::FLEXIBLE,
14504            _decode,
14505        )
14506    }
14507
14508    type SetFlagsResponseFut = fidl::client::QueryResponseFut<
14509        NodeSetFlagsResult,
14510        fdomain_client::fidl::FDomainResourceDialect,
14511    >;
14512    fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
14513        fn _decode(
14514            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14515        ) -> Result<NodeSetFlagsResult, fidl::Error> {
14516            let _response = fidl::client::decode_transaction_body::<
14517                fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
14518                fdomain_client::fidl::FDomainResourceDialect,
14519                0x55a8028685791ea8,
14520            >(_buf?)?
14521            .into_result_fdomain::<SymlinkMarker>("set_flags")?;
14522            Ok(_response.map(|x| x))
14523        }
14524        self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
14525            (flags,),
14526            0x55a8028685791ea8,
14527            fidl::encoding::DynamicFlags::FLEXIBLE,
14528            _decode,
14529        )
14530    }
14531
14532    type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
14533        (i32, Option<Box<FilesystemInfo>>),
14534        fdomain_client::fidl::FDomainResourceDialect,
14535    >;
14536    fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
14537        fn _decode(
14538            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14539        ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
14540            let _response = fidl::client::decode_transaction_body::<
14541                NodeQueryFilesystemResponse,
14542                fdomain_client::fidl::FDomainResourceDialect,
14543                0x6f344a1c6b0a0610,
14544            >(_buf?)?;
14545            Ok((_response.s, _response.info))
14546        }
14547        self.client.send_query_and_decode::<
14548            fidl::encoding::EmptyPayload,
14549            (i32, Option<Box<FilesystemInfo>>),
14550        >(
14551            (),
14552            0x6f344a1c6b0a0610,
14553            fidl::encoding::DynamicFlags::empty(),
14554            _decode,
14555        )
14556    }
14557
14558    type GetAttributesResponseFut = fidl::client::QueryResponseFut<
14559        NodeGetAttributesResult,
14560        fdomain_client::fidl::FDomainResourceDialect,
14561    >;
14562    fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
14563        fn _decode(
14564            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14565        ) -> Result<NodeGetAttributesResult, fidl::Error> {
14566            let _response = fidl::client::decode_transaction_body::<
14567                fidl::encoding::ResultType<NodeAttributes2, i32>,
14568                fdomain_client::fidl::FDomainResourceDialect,
14569                0x3d4396a638ea053b,
14570            >(_buf?)?;
14571            Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
14572        }
14573        self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
14574            (query,),
14575            0x3d4396a638ea053b,
14576            fidl::encoding::DynamicFlags::empty(),
14577            _decode,
14578        )
14579    }
14580
14581    type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
14582        NodeUpdateAttributesResult,
14583        fdomain_client::fidl::FDomainResourceDialect,
14584    >;
14585    fn r#update_attributes(
14586        &self,
14587        mut payload: &MutableNodeAttributes,
14588    ) -> Self::UpdateAttributesResponseFut {
14589        fn _decode(
14590            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14591        ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
14592            let _response = fidl::client::decode_transaction_body::<
14593                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14594                fdomain_client::fidl::FDomainResourceDialect,
14595                0x3308c1da5a89bf08,
14596            >(_buf?)?;
14597            Ok(_response.map(|x| x))
14598        }
14599        self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
14600            payload,
14601            0x3308c1da5a89bf08,
14602            fidl::encoding::DynamicFlags::empty(),
14603            _decode,
14604        )
14605    }
14606
14607    type SyncResponseFut = fidl::client::QueryResponseFut<
14608        NodeSyncResult,
14609        fdomain_client::fidl::FDomainResourceDialect,
14610    >;
14611    fn r#sync(&self) -> Self::SyncResponseFut {
14612        fn _decode(
14613            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14614        ) -> Result<NodeSyncResult, fidl::Error> {
14615            let _response = fidl::client::decode_transaction_body::<
14616                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14617                fdomain_client::fidl::FDomainResourceDialect,
14618                0x2c5c27ca0ab5dc49,
14619            >(_buf?)?;
14620            Ok(_response.map(|x| x))
14621        }
14622        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
14623            (),
14624            0x2c5c27ca0ab5dc49,
14625            fidl::encoding::DynamicFlags::empty(),
14626            _decode,
14627        )
14628    }
14629
14630    fn r#list_extended_attributes(
14631        &self,
14632        mut iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
14633    ) -> Result<(), fidl::Error> {
14634        self.client.send::<NodeListExtendedAttributesRequest>(
14635            (iterator,),
14636            0x4b61033de007fcd0,
14637            fidl::encoding::DynamicFlags::empty(),
14638        )
14639    }
14640
14641    type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14642        NodeGetExtendedAttributeResult,
14643        fdomain_client::fidl::FDomainResourceDialect,
14644    >;
14645    fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
14646        fn _decode(
14647            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14648        ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
14649            let _response = fidl::client::decode_transaction_body::<
14650                fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
14651                fdomain_client::fidl::FDomainResourceDialect,
14652                0x45ffa3ccfdeb76db,
14653            >(_buf?)?;
14654            Ok(_response.map(|x| x))
14655        }
14656        self.client.send_query_and_decode::<
14657            NodeGetExtendedAttributeRequest,
14658            NodeGetExtendedAttributeResult,
14659        >(
14660            (name,),
14661            0x45ffa3ccfdeb76db,
14662            fidl::encoding::DynamicFlags::empty(),
14663            _decode,
14664        )
14665    }
14666
14667    type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14668        NodeSetExtendedAttributeResult,
14669        fdomain_client::fidl::FDomainResourceDialect,
14670    >;
14671    fn r#set_extended_attribute(
14672        &self,
14673        mut name: &[u8],
14674        mut value: ExtendedAttributeValue,
14675        mut mode: SetExtendedAttributeMode,
14676    ) -> Self::SetExtendedAttributeResponseFut {
14677        fn _decode(
14678            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14679        ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
14680            let _response = fidl::client::decode_transaction_body::<
14681                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14682                fdomain_client::fidl::FDomainResourceDialect,
14683                0x4a951362f681f23c,
14684            >(_buf?)?;
14685            Ok(_response.map(|x| x))
14686        }
14687        self.client.send_query_and_decode::<
14688            NodeSetExtendedAttributeRequest,
14689            NodeSetExtendedAttributeResult,
14690        >(
14691            (name, &mut value, mode,),
14692            0x4a951362f681f23c,
14693            fidl::encoding::DynamicFlags::empty(),
14694            _decode,
14695        )
14696    }
14697
14698    type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14699        NodeRemoveExtendedAttributeResult,
14700        fdomain_client::fidl::FDomainResourceDialect,
14701    >;
14702    fn r#remove_extended_attribute(
14703        &self,
14704        mut name: &[u8],
14705    ) -> Self::RemoveExtendedAttributeResponseFut {
14706        fn _decode(
14707            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14708        ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14709            let _response = fidl::client::decode_transaction_body::<
14710                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14711                fdomain_client::fidl::FDomainResourceDialect,
14712                0x7a0b9f3a9bf9032d,
14713            >(_buf?)?;
14714            Ok(_response.map(|x| x))
14715        }
14716        self.client.send_query_and_decode::<
14717            NodeRemoveExtendedAttributeRequest,
14718            NodeRemoveExtendedAttributeResult,
14719        >(
14720            (name,),
14721            0x7a0b9f3a9bf9032d,
14722            fidl::encoding::DynamicFlags::empty(),
14723            _decode,
14724        )
14725    }
14726
14727    type DescribeResponseFut =
14728        fidl::client::QueryResponseFut<SymlinkInfo, fdomain_client::fidl::FDomainResourceDialect>;
14729    fn r#describe(&self) -> Self::DescribeResponseFut {
14730        fn _decode(
14731            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14732        ) -> Result<SymlinkInfo, fidl::Error> {
14733            let _response = fidl::client::decode_transaction_body::<
14734                fidl::encoding::FlexibleType<SymlinkInfo>,
14735                fdomain_client::fidl::FDomainResourceDialect,
14736                0x742c2ea5e89831f3,
14737            >(_buf?)?
14738            .into_result_fdomain::<SymlinkMarker>("describe")?;
14739            Ok(_response)
14740        }
14741        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
14742            (),
14743            0x742c2ea5e89831f3,
14744            fidl::encoding::DynamicFlags::FLEXIBLE,
14745            _decode,
14746        )
14747    }
14748}
14749
14750pub struct SymlinkEventStream {
14751    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
14752}
14753
14754impl std::marker::Unpin for SymlinkEventStream {}
14755
14756impl futures::stream::FusedStream for SymlinkEventStream {
14757    fn is_terminated(&self) -> bool {
14758        self.event_receiver.is_terminated()
14759    }
14760}
14761
14762impl futures::Stream for SymlinkEventStream {
14763    type Item = Result<SymlinkEvent, fidl::Error>;
14764
14765    fn poll_next(
14766        mut self: std::pin::Pin<&mut Self>,
14767        cx: &mut std::task::Context<'_>,
14768    ) -> std::task::Poll<Option<Self::Item>> {
14769        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14770            &mut self.event_receiver,
14771            cx
14772        )?) {
14773            Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
14774            None => std::task::Poll::Ready(None),
14775        }
14776    }
14777}
14778
14779#[derive(Debug)]
14780pub enum SymlinkEvent {
14781    OnOpen_ {
14782        s: i32,
14783        info: Option<Box<NodeInfoDeprecated>>,
14784    },
14785    OnRepresentation {
14786        payload: Representation,
14787    },
14788    #[non_exhaustive]
14789    _UnknownEvent {
14790        /// Ordinal of the event that was sent.
14791        ordinal: u64,
14792    },
14793}
14794
14795impl SymlinkEvent {
14796    #[allow(irrefutable_let_patterns)]
14797    pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14798        if let SymlinkEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
14799    }
14800    #[allow(irrefutable_let_patterns)]
14801    pub fn into_on_representation(self) -> Option<Representation> {
14802        if let SymlinkEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
14803    }
14804
14805    /// Decodes a message buffer as a [`SymlinkEvent`].
14806    fn decode(
14807        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14808    ) -> Result<SymlinkEvent, fidl::Error> {
14809        let (bytes, _handles) = buf.split_mut();
14810        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14811        debug_assert_eq!(tx_header.tx_id, 0);
14812        match tx_header.ordinal {
14813            0x7fc7bbb1dbfd1972 => {
14814                let mut out = fidl::new_empty!(
14815                    NodeOnOpenRequest,
14816                    fdomain_client::fidl::FDomainResourceDialect
14817                );
14818                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14819                Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
14820            }
14821            0x5cb40567d80a510c => {
14822                let mut out =
14823                    fidl::new_empty!(Representation, fdomain_client::fidl::FDomainResourceDialect);
14824                fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14825                Ok((SymlinkEvent::OnRepresentation { payload: out }))
14826            }
14827            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14828                Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14829            }
14830            _ => Err(fidl::Error::UnknownOrdinal {
14831                ordinal: tx_header.ordinal,
14832                protocol_name: <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
14833            }),
14834        }
14835    }
14836}
14837
14838/// A Stream of incoming requests for fuchsia.io/Symlink.
14839pub struct SymlinkRequestStream {
14840    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14841    is_terminated: bool,
14842}
14843
14844impl std::marker::Unpin for SymlinkRequestStream {}
14845
14846impl futures::stream::FusedStream for SymlinkRequestStream {
14847    fn is_terminated(&self) -> bool {
14848        self.is_terminated
14849    }
14850}
14851
14852impl fdomain_client::fidl::RequestStream for SymlinkRequestStream {
14853    type Protocol = SymlinkMarker;
14854    type ControlHandle = SymlinkControlHandle;
14855
14856    fn from_channel(channel: fdomain_client::Channel) -> Self {
14857        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14858    }
14859
14860    fn control_handle(&self) -> Self::ControlHandle {
14861        SymlinkControlHandle { inner: self.inner.clone() }
14862    }
14863
14864    fn into_inner(
14865        self,
14866    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
14867    {
14868        (self.inner, self.is_terminated)
14869    }
14870
14871    fn from_inner(
14872        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
14873        is_terminated: bool,
14874    ) -> Self {
14875        Self { inner, is_terminated }
14876    }
14877}
14878
14879impl futures::Stream for SymlinkRequestStream {
14880    type Item = Result<SymlinkRequest, fidl::Error>;
14881
14882    fn poll_next(
14883        mut self: std::pin::Pin<&mut Self>,
14884        cx: &mut std::task::Context<'_>,
14885    ) -> std::task::Poll<Option<Self::Item>> {
14886        let this = &mut *self;
14887        if this.inner.check_shutdown(cx) {
14888            this.is_terminated = true;
14889            return std::task::Poll::Ready(None);
14890        }
14891        if this.is_terminated {
14892            panic!("polled SymlinkRequestStream after completion");
14893        }
14894        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
14895            |bytes, handles| {
14896                match this.inner.channel().read_etc(cx, bytes, handles) {
14897                    std::task::Poll::Ready(Ok(())) => {}
14898                    std::task::Poll::Pending => return std::task::Poll::Pending,
14899                    std::task::Poll::Ready(Err(None)) => {
14900                        this.is_terminated = true;
14901                        return std::task::Poll::Ready(None);
14902                    }
14903                    std::task::Poll::Ready(Err(Some(e))) => {
14904                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14905                            e.into(),
14906                        ))));
14907                    }
14908                }
14909
14910                // A message has been received from the channel
14911                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14912
14913                std::task::Poll::Ready(Some(match header.ordinal {
14914                    0x54f3949246a03e74 => {
14915                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14916                        let mut req = fidl::new_empty!(
14917                            LinkableLinkIntoRequest,
14918                            fdomain_client::fidl::FDomainResourceDialect
14919                        );
14920                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
14921                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14922                        Ok(SymlinkRequest::LinkInto {
14923                            dst_parent_token: req.dst_parent_token,
14924                            dst: req.dst,
14925
14926                            responder: SymlinkLinkIntoResponder {
14927                                control_handle: std::mem::ManuallyDrop::new(control_handle),
14928                                tx_id: header.tx_id,
14929                            },
14930                        })
14931                    }
14932                    0x20d8a7aba2168a79 => {
14933                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14934                        let mut req = fidl::new_empty!(
14935                            fdomain_fuchsia_unknown::CloneableCloneRequest,
14936                            fdomain_client::fidl::FDomainResourceDialect
14937                        );
14938                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fdomain_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14939                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14940                        Ok(SymlinkRequest::Clone { request: req.request, control_handle })
14941                    }
14942                    0x5ac5d459ad7f657e => {
14943                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14944                        let mut req = fidl::new_empty!(
14945                            fidl::encoding::EmptyPayload,
14946                            fdomain_client::fidl::FDomainResourceDialect
14947                        );
14948                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14949                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14950                        Ok(SymlinkRequest::Close {
14951                            responder: SymlinkCloseResponder {
14952                                control_handle: std::mem::ManuallyDrop::new(control_handle),
14953                                tx_id: header.tx_id,
14954                            },
14955                        })
14956                    }
14957                    0x2658edee9decfc06 => {
14958                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14959                        let mut req = fidl::new_empty!(
14960                            fidl::encoding::EmptyPayload,
14961                            fdomain_client::fidl::FDomainResourceDialect
14962                        );
14963                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14964                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14965                        Ok(SymlinkRequest::Query {
14966                            responder: SymlinkQueryResponder {
14967                                control_handle: std::mem::ManuallyDrop::new(control_handle),
14968                                tx_id: header.tx_id,
14969                            },
14970                        })
14971                    }
14972                    0x5a61678f293ce16f => {
14973                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14974                        let mut req = fidl::new_empty!(
14975                            NodeDeprecatedCloneRequest,
14976                            fdomain_client::fidl::FDomainResourceDialect
14977                        );
14978                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14979                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14980                        Ok(SymlinkRequest::DeprecatedClone {
14981                            flags: req.flags,
14982                            object: req.object,
14983
14984                            control_handle,
14985                        })
14986                    }
14987                    0x78985e216314dafd => {
14988                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14989                        let mut req = fidl::new_empty!(
14990                            fidl::encoding::EmptyPayload,
14991                            fdomain_client::fidl::FDomainResourceDialect
14992                        );
14993                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14994                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
14995                        Ok(SymlinkRequest::DeprecatedGetAttr {
14996                            responder: SymlinkDeprecatedGetAttrResponder {
14997                                control_handle: std::mem::ManuallyDrop::new(control_handle),
14998                                tx_id: header.tx_id,
14999                            },
15000                        })
15001                    }
15002                    0x4186c0f40d938f46 => {
15003                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15004                        let mut req = fidl::new_empty!(
15005                            NodeDeprecatedSetAttrRequest,
15006                            fdomain_client::fidl::FDomainResourceDialect
15007                        );
15008                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
15009                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15010                        Ok(SymlinkRequest::DeprecatedSetAttr {
15011                            flags: req.flags,
15012                            attributes: req.attributes,
15013
15014                            responder: SymlinkDeprecatedSetAttrResponder {
15015                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15016                                tx_id: header.tx_id,
15017                            },
15018                        })
15019                    }
15020                    0x5b88fffb8eda3aa1 => {
15021                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15022                        let mut req = fidl::new_empty!(
15023                            fidl::encoding::EmptyPayload,
15024                            fdomain_client::fidl::FDomainResourceDialect
15025                        );
15026                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15027                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15028                        Ok(SymlinkRequest::DeprecatedGetFlags {
15029                            responder: SymlinkDeprecatedGetFlagsResponder {
15030                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15031                                tx_id: header.tx_id,
15032                            },
15033                        })
15034                    }
15035                    0x5295b76c71fde733 => {
15036                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15037                        let mut req = fidl::new_empty!(
15038                            NodeDeprecatedSetFlagsRequest,
15039                            fdomain_client::fidl::FDomainResourceDialect
15040                        );
15041                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15042                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15043                        Ok(SymlinkRequest::DeprecatedSetFlags {
15044                            flags: req.flags,
15045
15046                            responder: SymlinkDeprecatedSetFlagsResponder {
15047                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15048                                tx_id: header.tx_id,
15049                            },
15050                        })
15051                    }
15052                    0x176eb318f64ec23 => {
15053                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15054                        let mut req = fidl::new_empty!(
15055                            fidl::encoding::EmptyPayload,
15056                            fdomain_client::fidl::FDomainResourceDialect
15057                        );
15058                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15059                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15060                        Ok(SymlinkRequest::GetFlags {
15061                            responder: SymlinkGetFlagsResponder {
15062                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15063                                tx_id: header.tx_id,
15064                            },
15065                        })
15066                    }
15067                    0x55a8028685791ea8 => {
15068                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15069                        let mut req = fidl::new_empty!(
15070                            NodeSetFlagsRequest,
15071                            fdomain_client::fidl::FDomainResourceDialect
15072                        );
15073                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
15074                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15075                        Ok(SymlinkRequest::SetFlags {
15076                            flags: req.flags,
15077
15078                            responder: SymlinkSetFlagsResponder {
15079                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15080                                tx_id: header.tx_id,
15081                            },
15082                        })
15083                    }
15084                    0x6f344a1c6b0a0610 => {
15085                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15086                        let mut req = fidl::new_empty!(
15087                            fidl::encoding::EmptyPayload,
15088                            fdomain_client::fidl::FDomainResourceDialect
15089                        );
15090                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15091                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15092                        Ok(SymlinkRequest::QueryFilesystem {
15093                            responder: SymlinkQueryFilesystemResponder {
15094                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15095                                tx_id: header.tx_id,
15096                            },
15097                        })
15098                    }
15099                    0x3d4396a638ea053b => {
15100                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15101                        let mut req = fidl::new_empty!(
15102                            NodeGetAttributesRequest,
15103                            fdomain_client::fidl::FDomainResourceDialect
15104                        );
15105                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15106                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15107                        Ok(SymlinkRequest::GetAttributes {
15108                            query: req.query,
15109
15110                            responder: SymlinkGetAttributesResponder {
15111                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15112                                tx_id: header.tx_id,
15113                            },
15114                        })
15115                    }
15116                    0x3308c1da5a89bf08 => {
15117                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15118                        let mut req = fidl::new_empty!(
15119                            MutableNodeAttributes,
15120                            fdomain_client::fidl::FDomainResourceDialect
15121                        );
15122                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
15123                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15124                        Ok(SymlinkRequest::UpdateAttributes {
15125                            payload: req,
15126                            responder: SymlinkUpdateAttributesResponder {
15127                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15128                                tx_id: header.tx_id,
15129                            },
15130                        })
15131                    }
15132                    0x2c5c27ca0ab5dc49 => {
15133                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15134                        let mut req = fidl::new_empty!(
15135                            fidl::encoding::EmptyPayload,
15136                            fdomain_client::fidl::FDomainResourceDialect
15137                        );
15138                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15139                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15140                        Ok(SymlinkRequest::Sync {
15141                            responder: SymlinkSyncResponder {
15142                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15143                                tx_id: header.tx_id,
15144                            },
15145                        })
15146                    }
15147                    0x4b61033de007fcd0 => {
15148                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
15149                        let mut req = fidl::new_empty!(
15150                            NodeListExtendedAttributesRequest,
15151                            fdomain_client::fidl::FDomainResourceDialect
15152                        );
15153                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
15154                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15155                        Ok(SymlinkRequest::ListExtendedAttributes {
15156                            iterator: req.iterator,
15157
15158                            control_handle,
15159                        })
15160                    }
15161                    0x45ffa3ccfdeb76db => {
15162                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15163                        let mut req = fidl::new_empty!(
15164                            NodeGetExtendedAttributeRequest,
15165                            fdomain_client::fidl::FDomainResourceDialect
15166                        );
15167                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15168                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15169                        Ok(SymlinkRequest::GetExtendedAttribute {
15170                            name: req.name,
15171
15172                            responder: SymlinkGetExtendedAttributeResponder {
15173                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15174                                tx_id: header.tx_id,
15175                            },
15176                        })
15177                    }
15178                    0x4a951362f681f23c => {
15179                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15180                        let mut req = fidl::new_empty!(
15181                            NodeSetExtendedAttributeRequest,
15182                            fdomain_client::fidl::FDomainResourceDialect
15183                        );
15184                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15185                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15186                        Ok(SymlinkRequest::SetExtendedAttribute {
15187                            name: req.name,
15188                            value: req.value,
15189                            mode: req.mode,
15190
15191                            responder: SymlinkSetExtendedAttributeResponder {
15192                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15193                                tx_id: header.tx_id,
15194                            },
15195                        })
15196                    }
15197                    0x7a0b9f3a9bf9032d => {
15198                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15199                        let mut req = fidl::new_empty!(
15200                            NodeRemoveExtendedAttributeRequest,
15201                            fdomain_client::fidl::FDomainResourceDialect
15202                        );
15203                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
15204                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15205                        Ok(SymlinkRequest::RemoveExtendedAttribute {
15206                            name: req.name,
15207
15208                            responder: SymlinkRemoveExtendedAttributeResponder {
15209                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15210                                tx_id: header.tx_id,
15211                            },
15212                        })
15213                    }
15214                    0x742c2ea5e89831f3 => {
15215                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
15216                        let mut req = fidl::new_empty!(
15217                            fidl::encoding::EmptyPayload,
15218                            fdomain_client::fidl::FDomainResourceDialect
15219                        );
15220                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
15221                        let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
15222                        Ok(SymlinkRequest::Describe {
15223                            responder: SymlinkDescribeResponder {
15224                                control_handle: std::mem::ManuallyDrop::new(control_handle),
15225                                tx_id: header.tx_id,
15226                            },
15227                        })
15228                    }
15229                    _ if header.tx_id == 0
15230                        && header
15231                            .dynamic_flags()
15232                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15233                    {
15234                        Ok(SymlinkRequest::_UnknownMethod {
15235                            ordinal: header.ordinal,
15236                            control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15237                            method_type: fidl::MethodType::OneWay,
15238                        })
15239                    }
15240                    _ if header
15241                        .dynamic_flags()
15242                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
15243                    {
15244                        this.inner.send_framework_err(
15245                            fidl::encoding::FrameworkErr::UnknownMethod,
15246                            header.tx_id,
15247                            header.ordinal,
15248                            header.dynamic_flags(),
15249                            (bytes, handles),
15250                        )?;
15251                        Ok(SymlinkRequest::_UnknownMethod {
15252                            ordinal: header.ordinal,
15253                            control_handle: SymlinkControlHandle { inner: this.inner.clone() },
15254                            method_type: fidl::MethodType::TwoWay,
15255                        })
15256                    }
15257                    _ => Err(fidl::Error::UnknownOrdinal {
15258                        ordinal: header.ordinal,
15259                        protocol_name:
15260                            <SymlinkMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
15261                    }),
15262                }))
15263            },
15264        )
15265    }
15266}
15267
15268/// A ['Node'] which contains a symbolic link.
15269#[derive(Debug)]
15270pub enum SymlinkRequest {
15271    /// Creates a link to this this object with name `dst` in the directory represented by
15272    /// `dst_parent_token`.
15273    ///
15274    /// `dst` must be a resolved object name. Including "/" in the string will return
15275    /// `ZX_ERR_INVALID_ARGS`.
15276    ///
15277    /// This method requires the maximal set of rights supported by the filesystem for this object.
15278    /// For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],
15279    /// [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also
15280    /// support the [`Rights.EXECUTE`] right. Insufficient rights will result in
15281    /// `ZX_ERR_ACCESS_DENIED`.
15282    ///
15283    /// If this object has no links and is *NOT* an unnamed temporary object (objects opened with
15284    /// `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.
15285    ///
15286    /// For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,
15287    /// the object will be permanently linked to the filesystem. Requires that the unnamed temporary
15288    /// object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.
15289    ///
15290    /// This method does not have the same atomicity properties has the `Directory::Link` method,
15291    /// which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`
15292    /// because `LinkInto` will not prevent the source from being renamed or unlinked.
15293    LinkInto {
15294        dst_parent_token: fdomain_client::Event,
15295        dst: String,
15296        responder: SymlinkLinkIntoResponder,
15297    },
15298    Clone {
15299        request: fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15300        control_handle: SymlinkControlHandle,
15301    },
15302    /// Terminates the connection.
15303    ///
15304    /// After calling `Close`, the client must not send any other requests.
15305    ///
15306    /// Servers, after sending the status response, should close the connection
15307    /// regardless of status and without sending an epitaph.
15308    ///
15309    /// Closing the client end of the channel should be semantically equivalent
15310    /// to calling `Close` without knowing when the close has completed or its
15311    /// status.
15312    Close {
15313        responder: SymlinkCloseResponder,
15314    },
15315    Query {
15316        responder: SymlinkQueryResponder,
15317    },
15318    /// DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.
15319    DeprecatedClone {
15320        flags: OpenFlags,
15321        object: fdomain_client::fidl::ServerEnd<NodeMarker>,
15322        control_handle: SymlinkControlHandle,
15323    },
15324    /// DEPRECATED - Use `Node.GetAttributes` instead.
15325    DeprecatedGetAttr {
15326        responder: SymlinkDeprecatedGetAttrResponder,
15327    },
15328    /// DEPRECATED - Use `Node.UpdateAttributes` instead.
15329    DeprecatedSetAttr {
15330        flags: NodeAttributeFlags,
15331        attributes: NodeAttributes,
15332        responder: SymlinkDeprecatedSetAttrResponder,
15333    },
15334    /// [DEPRECATED - Use new GetFlags method instead.]
15335    DeprecatedGetFlags {
15336        responder: SymlinkDeprecatedGetFlagsResponder,
15337    },
15338    /// [DEPRECATED - Use new SetFlags method instead.]
15339    DeprecatedSetFlags {
15340        flags: OpenFlags,
15341        responder: SymlinkDeprecatedSetFlagsResponder,
15342    },
15343    /// Queries the flags that apply to this node after it has been opened/created. This method does
15344    /// not require any rights.
15345    ///
15346    /// Note that the final set of flags that apply to the connection may differ from those
15347    /// specified with the `fuchsia.io/Directory.Open` request used to create it:
15348    ///  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.
15349    ///  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.
15350    ///  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.
15351    GetFlags {
15352        responder: SymlinkGetFlagsResponder,
15353    },
15354    /// Sets the flags that apply to this node after it has been opened. This method does not
15355    /// require any rights.
15356    ///
15357    /// Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will
15358    /// clear append mode.
15359    ///
15360    /// Errors:
15361    ///  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.
15362    ///  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.
15363    SetFlags {
15364        flags: Flags,
15365        responder: SymlinkSetFlagsResponder,
15366    },
15367    /// Query the filesystem for details specific to the filesystem and/or volume. If the current
15368    /// volume has different settings or the storage is accounted seperately from the rest of the
15369    /// filesystem that may be reported instead of filesystem-wide details.
15370    QueryFilesystem {
15371        responder: SymlinkQueryFilesystemResponder,
15372    },
15373    /// Acquires information about the node.
15374    ///
15375    /// The attributes of a node should be stable, independent of the
15376    /// specific protocol used to access it.
15377    ///
15378    /// If a particular attribute is not applicable or not supported,
15379    /// filesystems should leave the corresponding field absent.
15380    ///
15381    /// + `query` a bit-mask specifying which attributes to fetch. The server
15382    ///   should not return more than necessary.
15383    /// - `attributes` the returned attributes.
15384    ///
15385    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
15386    GetAttributes {
15387        query: NodeAttributesQuery,
15388        responder: SymlinkGetAttributesResponder,
15389    },
15390    /// Updates information about the node.
15391    ///
15392    /// + `attributes` the presence of a table field in `attributes` indicates
15393    /// the intent to update the corresponding attribute.
15394    ///
15395    /// Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.
15396    ///
15397    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
15398    UpdateAttributes {
15399        payload: MutableNodeAttributes,
15400        responder: SymlinkUpdateAttributesResponder,
15401    },
15402    /// Synchronizes updates to the node to the underlying media, if it exists.
15403    ///
15404    /// This method will return when the filesystem server has flushed the
15405    /// relevant updates to the underlying media, but does not guarantee the
15406    /// underlying media has persisted the information, nor that any information
15407    /// is committed to hardware. Clients may use `Sync` to ensure ordering
15408    /// between operations.
15409    ///
15410    /// This method does not require any rights.
15411    Sync {
15412        responder: SymlinkSyncResponder,
15413    },
15414    /// Creates an iterator over all the extended attribute names associated
15415    /// with this node. If an error occurs it is returned as an epitaph on the
15416    /// iterator request channel, and then the channel is closed.
15417    ///
15418    /// GetExtendedAttributes can be used with any of these names to retrieve
15419    /// the associated value.
15420    ///
15421    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
15422    ListExtendedAttributes {
15423        iterator: fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15424        control_handle: SymlinkControlHandle,
15425    },
15426    /// Get the value associated with the given attribute `name` for this node.
15427    ///
15428    /// Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No
15429    /// particular structure is imposed on them.
15430    ///
15431    /// This method requires the [`Rights.GET_ATTRIBUTES`] right.
15432    GetExtendedAttribute {
15433        name: Vec<u8>,
15434        responder: SymlinkGetExtendedAttributeResponder,
15435    },
15436    /// Set the value for the given attribute `name` to `value` for this node.
15437    ///
15438    /// The attribute name may exist, in which case the attribute is updated.
15439    /// If the attribute doesn't exist, it is created. The name should have no
15440    /// null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.
15441    ///
15442    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
15443    SetExtendedAttribute {
15444        name: Vec<u8>,
15445        value: ExtendedAttributeValue,
15446        mode: SetExtendedAttributeMode,
15447        responder: SymlinkSetExtendedAttributeResponder,
15448    },
15449    /// Remove the specified extended attribute.
15450    ///
15451    /// If the attribute doesn't exist, ZX_ERR_NOT_FOUND is returned.
15452    ///
15453    /// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
15454    RemoveExtendedAttribute {
15455        name: Vec<u8>,
15456        responder: SymlinkRemoveExtendedAttributeResponder,
15457    },
15458    Describe {
15459        responder: SymlinkDescribeResponder,
15460    },
15461    /// An interaction was received which does not match any known method.
15462    #[non_exhaustive]
15463    _UnknownMethod {
15464        /// Ordinal of the method that was called.
15465        ordinal: u64,
15466        control_handle: SymlinkControlHandle,
15467        method_type: fidl::MethodType,
15468    },
15469}
15470
15471impl SymlinkRequest {
15472    #[allow(irrefutable_let_patterns)]
15473    pub fn into_link_into(
15474        self,
15475    ) -> Option<(fdomain_client::Event, String, SymlinkLinkIntoResponder)> {
15476        if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
15477            Some((dst_parent_token, dst, responder))
15478        } else {
15479            None
15480        }
15481    }
15482
15483    #[allow(irrefutable_let_patterns)]
15484    pub fn into_clone(
15485        self,
15486    ) -> Option<(
15487        fdomain_client::fidl::ServerEnd<fdomain_fuchsia_unknown::CloneableMarker>,
15488        SymlinkControlHandle,
15489    )> {
15490        if let SymlinkRequest::Clone { request, control_handle } = self {
15491            Some((request, control_handle))
15492        } else {
15493            None
15494        }
15495    }
15496
15497    #[allow(irrefutable_let_patterns)]
15498    pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
15499        if let SymlinkRequest::Close { responder } = self { Some((responder)) } else { None }
15500    }
15501
15502    #[allow(irrefutable_let_patterns)]
15503    pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
15504        if let SymlinkRequest::Query { responder } = self { Some((responder)) } else { None }
15505    }
15506
15507    #[allow(irrefutable_let_patterns)]
15508    pub fn into_deprecated_clone(
15509        self,
15510    ) -> Option<(OpenFlags, fdomain_client::fidl::ServerEnd<NodeMarker>, SymlinkControlHandle)>
15511    {
15512        if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
15513            Some((flags, object, control_handle))
15514        } else {
15515            None
15516        }
15517    }
15518
15519    #[allow(irrefutable_let_patterns)]
15520    pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
15521        if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
15522            Some((responder))
15523        } else {
15524            None
15525        }
15526    }
15527
15528    #[allow(irrefutable_let_patterns)]
15529    pub fn into_deprecated_set_attr(
15530        self,
15531    ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
15532        if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
15533            Some((flags, attributes, responder))
15534        } else {
15535            None
15536        }
15537    }
15538
15539    #[allow(irrefutable_let_patterns)]
15540    pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
15541        if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
15542            Some((responder))
15543        } else {
15544            None
15545        }
15546    }
15547
15548    #[allow(irrefutable_let_patterns)]
15549    pub fn into_deprecated_set_flags(
15550        self,
15551    ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
15552        if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
15553            Some((flags, responder))
15554        } else {
15555            None
15556        }
15557    }
15558
15559    #[allow(irrefutable_let_patterns)]
15560    pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
15561        if let SymlinkRequest::GetFlags { responder } = self { Some((responder)) } else { None }
15562    }
15563
15564    #[allow(irrefutable_let_patterns)]
15565    pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
15566        if let SymlinkRequest::SetFlags { flags, responder } = self {
15567            Some((flags, responder))
15568        } else {
15569            None
15570        }
15571    }
15572
15573    #[allow(irrefutable_let_patterns)]
15574    pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
15575        if let SymlinkRequest::QueryFilesystem { responder } = self {
15576            Some((responder))
15577        } else {
15578            None
15579        }
15580    }
15581
15582    #[allow(irrefutable_let_patterns)]
15583    pub fn into_get_attributes(
15584        self,
15585    ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
15586        if let SymlinkRequest::GetAttributes { query, responder } = self {
15587            Some((query, responder))
15588        } else {
15589            None
15590        }
15591    }
15592
15593    #[allow(irrefutable_let_patterns)]
15594    pub fn into_update_attributes(
15595        self,
15596    ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
15597        if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
15598            Some((payload, responder))
15599        } else {
15600            None
15601        }
15602    }
15603
15604    #[allow(irrefutable_let_patterns)]
15605    pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
15606        if let SymlinkRequest::Sync { responder } = self { Some((responder)) } else { None }
15607    }
15608
15609    #[allow(irrefutable_let_patterns)]
15610    pub fn into_list_extended_attributes(
15611        self,
15612    ) -> Option<(
15613        fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
15614        SymlinkControlHandle,
15615    )> {
15616        if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
15617            Some((iterator, control_handle))
15618        } else {
15619            None
15620        }
15621    }
15622
15623    #[allow(irrefutable_let_patterns)]
15624    pub fn into_get_extended_attribute(
15625        self,
15626    ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
15627        if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
15628            Some((name, responder))
15629        } else {
15630            None
15631        }
15632    }
15633
15634    #[allow(irrefutable_let_patterns)]
15635    pub fn into_set_extended_attribute(
15636        self,
15637    ) -> Option<(
15638        Vec<u8>,
15639        ExtendedAttributeValue,
15640        SetExtendedAttributeMode,
15641        SymlinkSetExtendedAttributeResponder,
15642    )> {
15643        if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
15644            Some((name, value, mode, responder))
15645        } else {
15646            None
15647        }
15648    }
15649
15650    #[allow(irrefutable_let_patterns)]
15651    pub fn into_remove_extended_attribute(
15652        self,
15653    ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
15654        if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
15655            Some((name, responder))
15656        } else {
15657            None
15658        }
15659    }
15660
15661    #[allow(irrefutable_let_patterns)]
15662    pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
15663        if let SymlinkRequest::Describe { responder } = self { Some((responder)) } else { None }
15664    }
15665
15666    /// Name of the method defined in FIDL
15667    pub fn method_name(&self) -> &'static str {
15668        match *self {
15669            SymlinkRequest::LinkInto { .. } => "link_into",
15670            SymlinkRequest::Clone { .. } => "clone",
15671            SymlinkRequest::Close { .. } => "close",
15672            SymlinkRequest::Query { .. } => "query",
15673            SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
15674            SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
15675            SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
15676            SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
15677            SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
15678            SymlinkRequest::GetFlags { .. } => "get_flags",
15679            SymlinkRequest::SetFlags { .. } => "set_flags",
15680            SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
15681            SymlinkRequest::GetAttributes { .. } => "get_attributes",
15682            SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
15683            SymlinkRequest::Sync { .. } => "sync",
15684            SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
15685            SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
15686            SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
15687            SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
15688            SymlinkRequest::Describe { .. } => "describe",
15689            SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
15690                "unknown one-way method"
15691            }
15692            SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
15693                "unknown two-way method"
15694            }
15695        }
15696    }
15697}
15698
15699#[derive(Debug, Clone)]
15700pub struct SymlinkControlHandle {
15701    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
15702}
15703
15704impl fdomain_client::fidl::ControlHandle for SymlinkControlHandle {
15705    fn shutdown(&self) {
15706        self.inner.shutdown()
15707    }
15708
15709    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
15710        self.inner.shutdown_with_epitaph(status)
15711    }
15712
15713    fn is_closed(&self) -> bool {
15714        self.inner.channel().is_closed()
15715    }
15716    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
15717        self.inner.channel().on_closed()
15718    }
15719}
15720
15721impl SymlinkControlHandle {
15722    pub fn send_on_open_(
15723        &self,
15724        mut s: i32,
15725        mut info: Option<NodeInfoDeprecated>,
15726    ) -> Result<(), fidl::Error> {
15727        self.inner.send::<NodeOnOpenRequest>(
15728            (s, info.as_mut()),
15729            0,
15730            0x7fc7bbb1dbfd1972,
15731            fidl::encoding::DynamicFlags::FLEXIBLE,
15732        )
15733    }
15734
15735    pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
15736        self.inner.send::<Representation>(
15737            &mut payload,
15738            0,
15739            0x5cb40567d80a510c,
15740            fidl::encoding::DynamicFlags::empty(),
15741        )
15742    }
15743}
15744
15745#[must_use = "FIDL methods require a response to be sent"]
15746#[derive(Debug)]
15747pub struct SymlinkLinkIntoResponder {
15748    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15749    tx_id: u32,
15750}
15751
15752/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
15753/// if the responder is dropped without sending a response, so that the client
15754/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
15755impl std::ops::Drop for SymlinkLinkIntoResponder {
15756    fn drop(&mut self) {
15757        self.control_handle.shutdown();
15758        // Safety: drops once, never accessed again
15759        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15760    }
15761}
15762
15763impl fdomain_client::fidl::Responder for SymlinkLinkIntoResponder {
15764    type ControlHandle = SymlinkControlHandle;
15765
15766    fn control_handle(&self) -> &SymlinkControlHandle {
15767        &self.control_handle
15768    }
15769
15770    fn drop_without_shutdown(mut self) {
15771        // Safety: drops once, never accessed again due to mem::forget
15772        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15773        // Prevent Drop from running (which would shut down the channel)
15774        std::mem::forget(self);
15775    }
15776}
15777
15778impl SymlinkLinkIntoResponder {
15779    /// Sends a response to the FIDL transaction.
15780    ///
15781    /// Sets the channel to shutdown if an error occurs.
15782    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15783        let _result = self.send_raw(result);
15784        if _result.is_err() {
15785            self.control_handle.shutdown();
15786        }
15787        self.drop_without_shutdown();
15788        _result
15789    }
15790
15791    /// Similar to "send" but does not shutdown the channel if an error occurs.
15792    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15793        let _result = self.send_raw(result);
15794        self.drop_without_shutdown();
15795        _result
15796    }
15797
15798    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15799        self.control_handle
15800            .inner
15801            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15802                result,
15803                self.tx_id,
15804                0x54f3949246a03e74,
15805                fidl::encoding::DynamicFlags::empty(),
15806            )
15807    }
15808}
15809
15810#[must_use = "FIDL methods require a response to be sent"]
15811#[derive(Debug)]
15812pub struct SymlinkCloseResponder {
15813    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15814    tx_id: u32,
15815}
15816
15817/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
15818/// if the responder is dropped without sending a response, so that the client
15819/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
15820impl std::ops::Drop for SymlinkCloseResponder {
15821    fn drop(&mut self) {
15822        self.control_handle.shutdown();
15823        // Safety: drops once, never accessed again
15824        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15825    }
15826}
15827
15828impl fdomain_client::fidl::Responder for SymlinkCloseResponder {
15829    type ControlHandle = SymlinkControlHandle;
15830
15831    fn control_handle(&self) -> &SymlinkControlHandle {
15832        &self.control_handle
15833    }
15834
15835    fn drop_without_shutdown(mut self) {
15836        // Safety: drops once, never accessed again due to mem::forget
15837        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15838        // Prevent Drop from running (which would shut down the channel)
15839        std::mem::forget(self);
15840    }
15841}
15842
15843impl SymlinkCloseResponder {
15844    /// Sends a response to the FIDL transaction.
15845    ///
15846    /// Sets the channel to shutdown if an error occurs.
15847    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15848        let _result = self.send_raw(result);
15849        if _result.is_err() {
15850            self.control_handle.shutdown();
15851        }
15852        self.drop_without_shutdown();
15853        _result
15854    }
15855
15856    /// Similar to "send" but does not shutdown the channel if an error occurs.
15857    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15858        let _result = self.send_raw(result);
15859        self.drop_without_shutdown();
15860        _result
15861    }
15862
15863    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15864        self.control_handle
15865            .inner
15866            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15867                result,
15868                self.tx_id,
15869                0x5ac5d459ad7f657e,
15870                fidl::encoding::DynamicFlags::empty(),
15871            )
15872    }
15873}
15874
15875#[must_use = "FIDL methods require a response to be sent"]
15876#[derive(Debug)]
15877pub struct SymlinkQueryResponder {
15878    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15879    tx_id: u32,
15880}
15881
15882/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
15883/// if the responder is dropped without sending a response, so that the client
15884/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
15885impl std::ops::Drop for SymlinkQueryResponder {
15886    fn drop(&mut self) {
15887        self.control_handle.shutdown();
15888        // Safety: drops once, never accessed again
15889        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15890    }
15891}
15892
15893impl fdomain_client::fidl::Responder for SymlinkQueryResponder {
15894    type ControlHandle = SymlinkControlHandle;
15895
15896    fn control_handle(&self) -> &SymlinkControlHandle {
15897        &self.control_handle
15898    }
15899
15900    fn drop_without_shutdown(mut self) {
15901        // Safety: drops once, never accessed again due to mem::forget
15902        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15903        // Prevent Drop from running (which would shut down the channel)
15904        std::mem::forget(self);
15905    }
15906}
15907
15908impl SymlinkQueryResponder {
15909    /// Sends a response to the FIDL transaction.
15910    ///
15911    /// Sets the channel to shutdown if an error occurs.
15912    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15913        let _result = self.send_raw(protocol);
15914        if _result.is_err() {
15915            self.control_handle.shutdown();
15916        }
15917        self.drop_without_shutdown();
15918        _result
15919    }
15920
15921    /// Similar to "send" but does not shutdown the channel if an error occurs.
15922    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15923        let _result = self.send_raw(protocol);
15924        self.drop_without_shutdown();
15925        _result
15926    }
15927
15928    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15929        self.control_handle.inner.send::<fdomain_fuchsia_unknown::QueryableQueryResponse>(
15930            (protocol,),
15931            self.tx_id,
15932            0x2658edee9decfc06,
15933            fidl::encoding::DynamicFlags::empty(),
15934        )
15935    }
15936}
15937
15938#[must_use = "FIDL methods require a response to be sent"]
15939#[derive(Debug)]
15940pub struct SymlinkDeprecatedGetAttrResponder {
15941    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
15942    tx_id: u32,
15943}
15944
15945/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
15946/// if the responder is dropped without sending a response, so that the client
15947/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
15948impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
15949    fn drop(&mut self) {
15950        self.control_handle.shutdown();
15951        // Safety: drops once, never accessed again
15952        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15953    }
15954}
15955
15956impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetAttrResponder {
15957    type ControlHandle = SymlinkControlHandle;
15958
15959    fn control_handle(&self) -> &SymlinkControlHandle {
15960        &self.control_handle
15961    }
15962
15963    fn drop_without_shutdown(mut self) {
15964        // Safety: drops once, never accessed again due to mem::forget
15965        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15966        // Prevent Drop from running (which would shut down the channel)
15967        std::mem::forget(self);
15968    }
15969}
15970
15971impl SymlinkDeprecatedGetAttrResponder {
15972    /// Sends a response to the FIDL transaction.
15973    ///
15974    /// Sets the channel to shutdown if an error occurs.
15975    pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15976        let _result = self.send_raw(s, attributes);
15977        if _result.is_err() {
15978            self.control_handle.shutdown();
15979        }
15980        self.drop_without_shutdown();
15981        _result
15982    }
15983
15984    /// Similar to "send" but does not shutdown the channel if an error occurs.
15985    pub fn send_no_shutdown_on_err(
15986        self,
15987        mut s: i32,
15988        mut attributes: &NodeAttributes,
15989    ) -> Result<(), fidl::Error> {
15990        let _result = self.send_raw(s, attributes);
15991        self.drop_without_shutdown();
15992        _result
15993    }
15994
15995    fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15996        self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15997            (s, attributes),
15998            self.tx_id,
15999            0x78985e216314dafd,
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 SymlinkDeprecatedSetAttrResponder {
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 SymlinkDeprecatedSetAttrResponder {
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 SymlinkDeprecatedSetAttrResponder {
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 SymlinkDeprecatedSetAttrResponder {
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) -> Result<(), fidl::Error> {
16043        let _result = self.send_raw(s);
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(self, mut s: i32) -> Result<(), fidl::Error> {
16053        let _result = self.send_raw(s);
16054        self.drop_without_shutdown();
16055        _result
16056    }
16057
16058    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16059        self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
16060            (s,),
16061            self.tx_id,
16062            0x4186c0f40d938f46,
16063            fidl::encoding::DynamicFlags::empty(),
16064        )
16065    }
16066}
16067
16068#[must_use = "FIDL methods require a response to be sent"]
16069#[derive(Debug)]
16070pub struct SymlinkDeprecatedGetFlagsResponder {
16071    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16072    tx_id: u32,
16073}
16074
16075/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16076/// if the responder is dropped without sending a response, so that the client
16077/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16078impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
16079    fn drop(&mut self) {
16080        self.control_handle.shutdown();
16081        // Safety: drops once, never accessed again
16082        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16083    }
16084}
16085
16086impl fdomain_client::fidl::Responder for SymlinkDeprecatedGetFlagsResponder {
16087    type ControlHandle = SymlinkControlHandle;
16088
16089    fn control_handle(&self) -> &SymlinkControlHandle {
16090        &self.control_handle
16091    }
16092
16093    fn drop_without_shutdown(mut self) {
16094        // Safety: drops once, never accessed again due to mem::forget
16095        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16096        // Prevent Drop from running (which would shut down the channel)
16097        std::mem::forget(self);
16098    }
16099}
16100
16101impl SymlinkDeprecatedGetFlagsResponder {
16102    /// Sends a response to the FIDL transaction.
16103    ///
16104    /// Sets the channel to shutdown if an error occurs.
16105    pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16106        let _result = self.send_raw(s, flags);
16107        if _result.is_err() {
16108            self.control_handle.shutdown();
16109        }
16110        self.drop_without_shutdown();
16111        _result
16112    }
16113
16114    /// Similar to "send" but does not shutdown the channel if an error occurs.
16115    pub fn send_no_shutdown_on_err(
16116        self,
16117        mut s: i32,
16118        mut flags: OpenFlags,
16119    ) -> Result<(), fidl::Error> {
16120        let _result = self.send_raw(s, flags);
16121        self.drop_without_shutdown();
16122        _result
16123    }
16124
16125    fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
16126        self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
16127            (s, flags),
16128            self.tx_id,
16129            0x5b88fffb8eda3aa1,
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 SymlinkDeprecatedSetFlagsResponder {
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 SymlinkDeprecatedSetFlagsResponder {
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 SymlinkDeprecatedSetFlagsResponder {
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 SymlinkDeprecatedSetFlagsResponder {
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) -> Result<(), fidl::Error> {
16173        let _result = self.send_raw(s);
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(self, mut s: i32) -> Result<(), fidl::Error> {
16183        let _result = self.send_raw(s);
16184        self.drop_without_shutdown();
16185        _result
16186    }
16187
16188    fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
16189        self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
16190            (s,),
16191            self.tx_id,
16192            0x5295b76c71fde733,
16193            fidl::encoding::DynamicFlags::empty(),
16194        )
16195    }
16196}
16197
16198#[must_use = "FIDL methods require a response to be sent"]
16199#[derive(Debug)]
16200pub struct SymlinkGetFlagsResponder {
16201    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16202    tx_id: u32,
16203}
16204
16205/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16206/// if the responder is dropped without sending a response, so that the client
16207/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16208impl std::ops::Drop for SymlinkGetFlagsResponder {
16209    fn drop(&mut self) {
16210        self.control_handle.shutdown();
16211        // Safety: drops once, never accessed again
16212        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16213    }
16214}
16215
16216impl fdomain_client::fidl::Responder for SymlinkGetFlagsResponder {
16217    type ControlHandle = SymlinkControlHandle;
16218
16219    fn control_handle(&self) -> &SymlinkControlHandle {
16220        &self.control_handle
16221    }
16222
16223    fn drop_without_shutdown(mut self) {
16224        // Safety: drops once, never accessed again due to mem::forget
16225        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16226        // Prevent Drop from running (which would shut down the channel)
16227        std::mem::forget(self);
16228    }
16229}
16230
16231impl SymlinkGetFlagsResponder {
16232    /// Sends a response to the FIDL transaction.
16233    ///
16234    /// Sets the channel to shutdown if an error occurs.
16235    pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16236        let _result = self.send_raw(result);
16237        if _result.is_err() {
16238            self.control_handle.shutdown();
16239        }
16240        self.drop_without_shutdown();
16241        _result
16242    }
16243
16244    /// Similar to "send" but does not shutdown the channel if an error occurs.
16245    pub fn send_no_shutdown_on_err(
16246        self,
16247        mut result: Result<Flags, i32>,
16248    ) -> Result<(), fidl::Error> {
16249        let _result = self.send_raw(result);
16250        self.drop_without_shutdown();
16251        _result
16252    }
16253
16254    fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
16255        self.control_handle
16256            .inner
16257            .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
16258                fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
16259                self.tx_id,
16260                0x176eb318f64ec23,
16261                fidl::encoding::DynamicFlags::FLEXIBLE,
16262            )
16263    }
16264}
16265
16266#[must_use = "FIDL methods require a response to be sent"]
16267#[derive(Debug)]
16268pub struct SymlinkSetFlagsResponder {
16269    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16270    tx_id: u32,
16271}
16272
16273/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16274/// if the responder is dropped without sending a response, so that the client
16275/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16276impl std::ops::Drop for SymlinkSetFlagsResponder {
16277    fn drop(&mut self) {
16278        self.control_handle.shutdown();
16279        // Safety: drops once, never accessed again
16280        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16281    }
16282}
16283
16284impl fdomain_client::fidl::Responder for SymlinkSetFlagsResponder {
16285    type ControlHandle = SymlinkControlHandle;
16286
16287    fn control_handle(&self) -> &SymlinkControlHandle {
16288        &self.control_handle
16289    }
16290
16291    fn drop_without_shutdown(mut self) {
16292        // Safety: drops once, never accessed again due to mem::forget
16293        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16294        // Prevent Drop from running (which would shut down the channel)
16295        std::mem::forget(self);
16296    }
16297}
16298
16299impl SymlinkSetFlagsResponder {
16300    /// Sends a response to the FIDL transaction.
16301    ///
16302    /// Sets the channel to shutdown if an error occurs.
16303    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16304        let _result = self.send_raw(result);
16305        if _result.is_err() {
16306            self.control_handle.shutdown();
16307        }
16308        self.drop_without_shutdown();
16309        _result
16310    }
16311
16312    /// Similar to "send" but does not shutdown the channel if an error occurs.
16313    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16314        let _result = self.send_raw(result);
16315        self.drop_without_shutdown();
16316        _result
16317    }
16318
16319    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16320        self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
16321            fidl::encoding::EmptyStruct,
16322            i32,
16323        >>(
16324            fidl::encoding::FlexibleResult::new(result),
16325            self.tx_id,
16326            0x55a8028685791ea8,
16327            fidl::encoding::DynamicFlags::FLEXIBLE,
16328        )
16329    }
16330}
16331
16332#[must_use = "FIDL methods require a response to be sent"]
16333#[derive(Debug)]
16334pub struct SymlinkQueryFilesystemResponder {
16335    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16336    tx_id: u32,
16337}
16338
16339/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16340/// if the responder is dropped without sending a response, so that the client
16341/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16342impl std::ops::Drop for SymlinkQueryFilesystemResponder {
16343    fn drop(&mut self) {
16344        self.control_handle.shutdown();
16345        // Safety: drops once, never accessed again
16346        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16347    }
16348}
16349
16350impl fdomain_client::fidl::Responder for SymlinkQueryFilesystemResponder {
16351    type ControlHandle = SymlinkControlHandle;
16352
16353    fn control_handle(&self) -> &SymlinkControlHandle {
16354        &self.control_handle
16355    }
16356
16357    fn drop_without_shutdown(mut self) {
16358        // Safety: drops once, never accessed again due to mem::forget
16359        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16360        // Prevent Drop from running (which would shut down the channel)
16361        std::mem::forget(self);
16362    }
16363}
16364
16365impl SymlinkQueryFilesystemResponder {
16366    /// Sends a response to the FIDL transaction.
16367    ///
16368    /// Sets the channel to shutdown if an error occurs.
16369    pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16370        let _result = self.send_raw(s, info);
16371        if _result.is_err() {
16372            self.control_handle.shutdown();
16373        }
16374        self.drop_without_shutdown();
16375        _result
16376    }
16377
16378    /// Similar to "send" but does not shutdown the channel if an error occurs.
16379    pub fn send_no_shutdown_on_err(
16380        self,
16381        mut s: i32,
16382        mut info: Option<&FilesystemInfo>,
16383    ) -> Result<(), fidl::Error> {
16384        let _result = self.send_raw(s, info);
16385        self.drop_without_shutdown();
16386        _result
16387    }
16388
16389    fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
16390        self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
16391            (s, info),
16392            self.tx_id,
16393            0x6f344a1c6b0a0610,
16394            fidl::encoding::DynamicFlags::empty(),
16395        )
16396    }
16397}
16398
16399#[must_use = "FIDL methods require a response to be sent"]
16400#[derive(Debug)]
16401pub struct SymlinkGetAttributesResponder {
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 SymlinkGetAttributesResponder {
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 SymlinkGetAttributesResponder {
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 SymlinkGetAttributesResponder {
16433    /// Sends a response to the FIDL transaction.
16434    ///
16435    /// Sets the channel to shutdown if an error occurs.
16436    pub fn send(
16437        self,
16438        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16439    ) -> Result<(), fidl::Error> {
16440        let _result = self.send_raw(result);
16441        if _result.is_err() {
16442            self.control_handle.shutdown();
16443        }
16444        self.drop_without_shutdown();
16445        _result
16446    }
16447
16448    /// Similar to "send" but does not shutdown the channel if an error occurs.
16449    pub fn send_no_shutdown_on_err(
16450        self,
16451        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16452    ) -> Result<(), fidl::Error> {
16453        let _result = self.send_raw(result);
16454        self.drop_without_shutdown();
16455        _result
16456    }
16457
16458    fn send_raw(
16459        &self,
16460        mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
16461    ) -> Result<(), fidl::Error> {
16462        self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
16463            result,
16464            self.tx_id,
16465            0x3d4396a638ea053b,
16466            fidl::encoding::DynamicFlags::empty(),
16467        )
16468    }
16469}
16470
16471#[must_use = "FIDL methods require a response to be sent"]
16472#[derive(Debug)]
16473pub struct SymlinkUpdateAttributesResponder {
16474    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16475    tx_id: u32,
16476}
16477
16478/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16479/// if the responder is dropped without sending a response, so that the client
16480/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16481impl std::ops::Drop for SymlinkUpdateAttributesResponder {
16482    fn drop(&mut self) {
16483        self.control_handle.shutdown();
16484        // Safety: drops once, never accessed again
16485        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16486    }
16487}
16488
16489impl fdomain_client::fidl::Responder for SymlinkUpdateAttributesResponder {
16490    type ControlHandle = SymlinkControlHandle;
16491
16492    fn control_handle(&self) -> &SymlinkControlHandle {
16493        &self.control_handle
16494    }
16495
16496    fn drop_without_shutdown(mut self) {
16497        // Safety: drops once, never accessed again due to mem::forget
16498        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16499        // Prevent Drop from running (which would shut down the channel)
16500        std::mem::forget(self);
16501    }
16502}
16503
16504impl SymlinkUpdateAttributesResponder {
16505    /// Sends a response to the FIDL transaction.
16506    ///
16507    /// Sets the channel to shutdown if an error occurs.
16508    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16509        let _result = self.send_raw(result);
16510        if _result.is_err() {
16511            self.control_handle.shutdown();
16512        }
16513        self.drop_without_shutdown();
16514        _result
16515    }
16516
16517    /// Similar to "send" but does not shutdown the channel if an error occurs.
16518    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16519        let _result = self.send_raw(result);
16520        self.drop_without_shutdown();
16521        _result
16522    }
16523
16524    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16525        self.control_handle
16526            .inner
16527            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16528                result,
16529                self.tx_id,
16530                0x3308c1da5a89bf08,
16531                fidl::encoding::DynamicFlags::empty(),
16532            )
16533    }
16534}
16535
16536#[must_use = "FIDL methods require a response to be sent"]
16537#[derive(Debug)]
16538pub struct SymlinkSyncResponder {
16539    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16540    tx_id: u32,
16541}
16542
16543/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16544/// if the responder is dropped without sending a response, so that the client
16545/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16546impl std::ops::Drop for SymlinkSyncResponder {
16547    fn drop(&mut self) {
16548        self.control_handle.shutdown();
16549        // Safety: drops once, never accessed again
16550        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16551    }
16552}
16553
16554impl fdomain_client::fidl::Responder for SymlinkSyncResponder {
16555    type ControlHandle = SymlinkControlHandle;
16556
16557    fn control_handle(&self) -> &SymlinkControlHandle {
16558        &self.control_handle
16559    }
16560
16561    fn drop_without_shutdown(mut self) {
16562        // Safety: drops once, never accessed again due to mem::forget
16563        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16564        // Prevent Drop from running (which would shut down the channel)
16565        std::mem::forget(self);
16566    }
16567}
16568
16569impl SymlinkSyncResponder {
16570    /// Sends a response to the FIDL transaction.
16571    ///
16572    /// Sets the channel to shutdown if an error occurs.
16573    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16574        let _result = self.send_raw(result);
16575        if _result.is_err() {
16576            self.control_handle.shutdown();
16577        }
16578        self.drop_without_shutdown();
16579        _result
16580    }
16581
16582    /// Similar to "send" but does not shutdown the channel if an error occurs.
16583    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16584        let _result = self.send_raw(result);
16585        self.drop_without_shutdown();
16586        _result
16587    }
16588
16589    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16590        self.control_handle
16591            .inner
16592            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16593                result,
16594                self.tx_id,
16595                0x2c5c27ca0ab5dc49,
16596                fidl::encoding::DynamicFlags::empty(),
16597            )
16598    }
16599}
16600
16601#[must_use = "FIDL methods require a response to be sent"]
16602#[derive(Debug)]
16603pub struct SymlinkGetExtendedAttributeResponder {
16604    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16605    tx_id: u32,
16606}
16607
16608/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16609/// if the responder is dropped without sending a response, so that the client
16610/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16611impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
16612    fn drop(&mut self) {
16613        self.control_handle.shutdown();
16614        // Safety: drops once, never accessed again
16615        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16616    }
16617}
16618
16619impl fdomain_client::fidl::Responder for SymlinkGetExtendedAttributeResponder {
16620    type ControlHandle = SymlinkControlHandle;
16621
16622    fn control_handle(&self) -> &SymlinkControlHandle {
16623        &self.control_handle
16624    }
16625
16626    fn drop_without_shutdown(mut self) {
16627        // Safety: drops once, never accessed again due to mem::forget
16628        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16629        // Prevent Drop from running (which would shut down the channel)
16630        std::mem::forget(self);
16631    }
16632}
16633
16634impl SymlinkGetExtendedAttributeResponder {
16635    /// Sends a response to the FIDL transaction.
16636    ///
16637    /// Sets the channel to shutdown if an error occurs.
16638    pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16639        let _result = self.send_raw(result);
16640        if _result.is_err() {
16641            self.control_handle.shutdown();
16642        }
16643        self.drop_without_shutdown();
16644        _result
16645    }
16646
16647    /// Similar to "send" but does not shutdown the channel if an error occurs.
16648    pub fn send_no_shutdown_on_err(
16649        self,
16650        mut result: Result<ExtendedAttributeValue, i32>,
16651    ) -> Result<(), fidl::Error> {
16652        let _result = self.send_raw(result);
16653        self.drop_without_shutdown();
16654        _result
16655    }
16656
16657    fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
16658        self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
16659            result.as_mut().map_err(|e| *e),
16660            self.tx_id,
16661            0x45ffa3ccfdeb76db,
16662            fidl::encoding::DynamicFlags::empty(),
16663        )
16664    }
16665}
16666
16667#[must_use = "FIDL methods require a response to be sent"]
16668#[derive(Debug)]
16669pub struct SymlinkSetExtendedAttributeResponder {
16670    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16671    tx_id: u32,
16672}
16673
16674/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16675/// if the responder is dropped without sending a response, so that the client
16676/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16677impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
16678    fn drop(&mut self) {
16679        self.control_handle.shutdown();
16680        // Safety: drops once, never accessed again
16681        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16682    }
16683}
16684
16685impl fdomain_client::fidl::Responder for SymlinkSetExtendedAttributeResponder {
16686    type ControlHandle = SymlinkControlHandle;
16687
16688    fn control_handle(&self) -> &SymlinkControlHandle {
16689        &self.control_handle
16690    }
16691
16692    fn drop_without_shutdown(mut self) {
16693        // Safety: drops once, never accessed again due to mem::forget
16694        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16695        // Prevent Drop from running (which would shut down the channel)
16696        std::mem::forget(self);
16697    }
16698}
16699
16700impl SymlinkSetExtendedAttributeResponder {
16701    /// Sends a response to the FIDL transaction.
16702    ///
16703    /// Sets the channel to shutdown if an error occurs.
16704    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16705        let _result = self.send_raw(result);
16706        if _result.is_err() {
16707            self.control_handle.shutdown();
16708        }
16709        self.drop_without_shutdown();
16710        _result
16711    }
16712
16713    /// Similar to "send" but does not shutdown the channel if an error occurs.
16714    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16715        let _result = self.send_raw(result);
16716        self.drop_without_shutdown();
16717        _result
16718    }
16719
16720    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16721        self.control_handle
16722            .inner
16723            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16724                result,
16725                self.tx_id,
16726                0x4a951362f681f23c,
16727                fidl::encoding::DynamicFlags::empty(),
16728            )
16729    }
16730}
16731
16732#[must_use = "FIDL methods require a response to be sent"]
16733#[derive(Debug)]
16734pub struct SymlinkRemoveExtendedAttributeResponder {
16735    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16736    tx_id: u32,
16737}
16738
16739/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16740/// if the responder is dropped without sending a response, so that the client
16741/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16742impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
16743    fn drop(&mut self) {
16744        self.control_handle.shutdown();
16745        // Safety: drops once, never accessed again
16746        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16747    }
16748}
16749
16750impl fdomain_client::fidl::Responder for SymlinkRemoveExtendedAttributeResponder {
16751    type ControlHandle = SymlinkControlHandle;
16752
16753    fn control_handle(&self) -> &SymlinkControlHandle {
16754        &self.control_handle
16755    }
16756
16757    fn drop_without_shutdown(mut self) {
16758        // Safety: drops once, never accessed again due to mem::forget
16759        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16760        // Prevent Drop from running (which would shut down the channel)
16761        std::mem::forget(self);
16762    }
16763}
16764
16765impl SymlinkRemoveExtendedAttributeResponder {
16766    /// Sends a response to the FIDL transaction.
16767    ///
16768    /// Sets the channel to shutdown if an error occurs.
16769    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16770        let _result = self.send_raw(result);
16771        if _result.is_err() {
16772            self.control_handle.shutdown();
16773        }
16774        self.drop_without_shutdown();
16775        _result
16776    }
16777
16778    /// Similar to "send" but does not shutdown the channel if an error occurs.
16779    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16780        let _result = self.send_raw(result);
16781        self.drop_without_shutdown();
16782        _result
16783    }
16784
16785    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16786        self.control_handle
16787            .inner
16788            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16789                result,
16790                self.tx_id,
16791                0x7a0b9f3a9bf9032d,
16792                fidl::encoding::DynamicFlags::empty(),
16793            )
16794    }
16795}
16796
16797#[must_use = "FIDL methods require a response to be sent"]
16798#[derive(Debug)]
16799pub struct SymlinkDescribeResponder {
16800    control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
16801    tx_id: u32,
16802}
16803
16804/// Set the the channel to be shutdown (see [`SymlinkControlHandle::shutdown`])
16805/// if the responder is dropped without sending a response, so that the client
16806/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
16807impl std::ops::Drop for SymlinkDescribeResponder {
16808    fn drop(&mut self) {
16809        self.control_handle.shutdown();
16810        // Safety: drops once, never accessed again
16811        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16812    }
16813}
16814
16815impl fdomain_client::fidl::Responder for SymlinkDescribeResponder {
16816    type ControlHandle = SymlinkControlHandle;
16817
16818    fn control_handle(&self) -> &SymlinkControlHandle {
16819        &self.control_handle
16820    }
16821
16822    fn drop_without_shutdown(mut self) {
16823        // Safety: drops once, never accessed again due to mem::forget
16824        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16825        // Prevent Drop from running (which would shut down the channel)
16826        std::mem::forget(self);
16827    }
16828}
16829
16830impl SymlinkDescribeResponder {
16831    /// Sends a response to the FIDL transaction.
16832    ///
16833    /// Sets the channel to shutdown if an error occurs.
16834    pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16835        let _result = self.send_raw(payload);
16836        if _result.is_err() {
16837            self.control_handle.shutdown();
16838        }
16839        self.drop_without_shutdown();
16840        _result
16841    }
16842
16843    /// Similar to "send" but does not shutdown the channel if an error occurs.
16844    pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16845        let _result = self.send_raw(payload);
16846        self.drop_without_shutdown();
16847        _result
16848    }
16849
16850    fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
16851        self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
16852            fidl::encoding::Flexible::new(payload),
16853            self.tx_id,
16854            0x742c2ea5e89831f3,
16855            fidl::encoding::DynamicFlags::FLEXIBLE,
16856        )
16857    }
16858}
16859
16860#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16861pub struct WritableMarker;
16862
16863impl fdomain_client::fidl::ProtocolMarker for WritableMarker {
16864    type Proxy = WritableProxy;
16865    type RequestStream = WritableRequestStream;
16866
16867    const DEBUG_NAME: &'static str = "(anonymous) Writable";
16868}
16869pub type WritableWriteResult = Result<u64, i32>;
16870
16871pub trait WritableProxyInterface: Send + Sync {
16872    type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
16873        + Send;
16874    fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
16875}
16876
16877#[derive(Debug, Clone)]
16878pub struct WritableProxy {
16879    client: fidl::client::Client<fdomain_client::fidl::FDomainResourceDialect>,
16880}
16881
16882impl fdomain_client::fidl::Proxy for WritableProxy {
16883    type Protocol = WritableMarker;
16884
16885    fn from_channel(inner: fdomain_client::Channel) -> Self {
16886        Self::new(inner)
16887    }
16888
16889    fn into_channel(self) -> Result<fdomain_client::Channel, Self> {
16890        self.client.into_channel().map_err(|client| Self { client })
16891    }
16892
16893    fn as_channel(&self) -> &fdomain_client::Channel {
16894        self.client.as_channel()
16895    }
16896}
16897
16898impl WritableProxy {
16899    /// Create a new Proxy for fuchsia.io/Writable.
16900    pub fn new(channel: fdomain_client::Channel) -> Self {
16901        let protocol_name = <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME;
16902        Self { client: fidl::client::Client::new(channel, protocol_name) }
16903    }
16904
16905    /// Get a Stream of events from the remote end of the protocol.
16906    ///
16907    /// # Panics
16908    ///
16909    /// Panics if the event stream was already taken.
16910    pub fn take_event_stream(&self) -> WritableEventStream {
16911        WritableEventStream { event_receiver: self.client.take_event_receiver() }
16912    }
16913
16914    /// Writes data at the seek offset.
16915    /// The seek offset is moved forward by the number of bytes written.
16916    /// If the file is in append mode, the seek offset is first set to the end
16917    /// of the file, followed by the write, in one atomic step.
16918    ///
16919    /// The file size may grow if the seek offset plus `data.length` is beyond
16920    /// the current end of file.
16921    ///
16922    /// + request `data` the byte buffer to write to the file.
16923    /// - response `actual_count` the number of bytes written.
16924    ///
16925    /// ## Invariants
16926    ///
16927    /// * The returned `actual_count` will never be greater than `data.length`.
16928    /// * If the server is unable to write all the data due to e.g. not enough
16929    ///   space, `actual_count` may be less than `data.length`.  If no bytes
16930    ///   could be written, an error is returned.
16931    /// * If `data.length` is zero, the server should perform all the checks
16932    ///   ensuring write access without mutating the file and return a
16933    ///   successful write of zero bytes.  The seek offset is still updated if
16934    ///   in append mode.
16935    ///
16936    /// This method requires the [`Rights.WRITE_BYTES`] right.
16937    pub fn r#write(
16938        &self,
16939        mut data: &[u8],
16940    ) -> fidl::client::QueryResponseFut<
16941        WritableWriteResult,
16942        fdomain_client::fidl::FDomainResourceDialect,
16943    > {
16944        WritableProxyInterface::r#write(self, data)
16945    }
16946}
16947
16948impl WritableProxyInterface for WritableProxy {
16949    type WriteResponseFut = fidl::client::QueryResponseFut<
16950        WritableWriteResult,
16951        fdomain_client::fidl::FDomainResourceDialect,
16952    >;
16953    fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
16954        fn _decode(
16955            mut _buf: Result<<fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
16956        ) -> Result<WritableWriteResult, fidl::Error> {
16957            let _response = fidl::client::decode_transaction_body::<
16958                fidl::encoding::ResultType<WritableWriteResponse, i32>,
16959                fdomain_client::fidl::FDomainResourceDialect,
16960                0x6a31437832469f82,
16961            >(_buf?)?;
16962            Ok(_response.map(|x| x.actual_count))
16963        }
16964        self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
16965            (data,),
16966            0x6a31437832469f82,
16967            fidl::encoding::DynamicFlags::empty(),
16968            _decode,
16969        )
16970    }
16971}
16972
16973pub struct WritableEventStream {
16974    event_receiver: fidl::client::EventReceiver<fdomain_client::fidl::FDomainResourceDialect>,
16975}
16976
16977impl std::marker::Unpin for WritableEventStream {}
16978
16979impl futures::stream::FusedStream for WritableEventStream {
16980    fn is_terminated(&self) -> bool {
16981        self.event_receiver.is_terminated()
16982    }
16983}
16984
16985impl futures::Stream for WritableEventStream {
16986    type Item = Result<WritableEvent, fidl::Error>;
16987
16988    fn poll_next(
16989        mut self: std::pin::Pin<&mut Self>,
16990        cx: &mut std::task::Context<'_>,
16991    ) -> std::task::Poll<Option<Self::Item>> {
16992        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16993            &mut self.event_receiver,
16994            cx
16995        )?) {
16996            Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
16997            None => std::task::Poll::Ready(None),
16998        }
16999    }
17000}
17001
17002#[derive(Debug)]
17003pub enum WritableEvent {}
17004
17005impl WritableEvent {
17006    /// Decodes a message buffer as a [`WritableEvent`].
17007    fn decode(
17008        mut buf: <fdomain_client::fidl::FDomainResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17009    ) -> Result<WritableEvent, fidl::Error> {
17010        let (bytes, _handles) = buf.split_mut();
17011        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17012        debug_assert_eq!(tx_header.tx_id, 0);
17013        match tx_header.ordinal {
17014            _ => Err(fidl::Error::UnknownOrdinal {
17015                ordinal: tx_header.ordinal,
17016                protocol_name: <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17017            }),
17018        }
17019    }
17020}
17021
17022/// A Stream of incoming requests for fuchsia.io/Writable.
17023pub struct WritableRequestStream {
17024    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17025    is_terminated: bool,
17026}
17027
17028impl std::marker::Unpin for WritableRequestStream {}
17029
17030impl futures::stream::FusedStream for WritableRequestStream {
17031    fn is_terminated(&self) -> bool {
17032        self.is_terminated
17033    }
17034}
17035
17036impl fdomain_client::fidl::RequestStream for WritableRequestStream {
17037    type Protocol = WritableMarker;
17038    type ControlHandle = WritableControlHandle;
17039
17040    fn from_channel(channel: fdomain_client::Channel) -> Self {
17041        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17042    }
17043
17044    fn control_handle(&self) -> Self::ControlHandle {
17045        WritableControlHandle { inner: self.inner.clone() }
17046    }
17047
17048    fn into_inner(
17049        self,
17050    ) -> (::std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>, bool)
17051    {
17052        (self.inner, self.is_terminated)
17053    }
17054
17055    fn from_inner(
17056        inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17057        is_terminated: bool,
17058    ) -> Self {
17059        Self { inner, is_terminated }
17060    }
17061}
17062
17063impl futures::Stream for WritableRequestStream {
17064    type Item = Result<WritableRequest, fidl::Error>;
17065
17066    fn poll_next(
17067        mut self: std::pin::Pin<&mut Self>,
17068        cx: &mut std::task::Context<'_>,
17069    ) -> std::task::Poll<Option<Self::Item>> {
17070        let this = &mut *self;
17071        if this.inner.check_shutdown(cx) {
17072            this.is_terminated = true;
17073            return std::task::Poll::Ready(None);
17074        }
17075        if this.is_terminated {
17076            panic!("polled WritableRequestStream after completion");
17077        }
17078        fidl::encoding::with_tls_decode_buf::<_, fdomain_client::fidl::FDomainResourceDialect>(
17079            |bytes, handles| {
17080                match this.inner.channel().read_etc(cx, bytes, handles) {
17081                    std::task::Poll::Ready(Ok(())) => {}
17082                    std::task::Poll::Pending => return std::task::Poll::Pending,
17083                    std::task::Poll::Ready(Err(None)) => {
17084                        this.is_terminated = true;
17085                        return std::task::Poll::Ready(None);
17086                    }
17087                    std::task::Poll::Ready(Err(Some(e))) => {
17088                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17089                            e.into(),
17090                        ))));
17091                    }
17092                }
17093
17094                // A message has been received from the channel
17095                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17096
17097                std::task::Poll::Ready(Some(match header.ordinal {
17098                    0x6a31437832469f82 => {
17099                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17100                        let mut req = fidl::new_empty!(
17101                            WritableWriteRequest,
17102                            fdomain_client::fidl::FDomainResourceDialect
17103                        );
17104                        fidl::encoding::Decoder::<fdomain_client::fidl::FDomainResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
17105                        let control_handle = WritableControlHandle { inner: this.inner.clone() };
17106                        Ok(WritableRequest::Write {
17107                            data: req.data,
17108
17109                            responder: WritableWriteResponder {
17110                                control_handle: std::mem::ManuallyDrop::new(control_handle),
17111                                tx_id: header.tx_id,
17112                            },
17113                        })
17114                    }
17115                    _ => Err(fidl::Error::UnknownOrdinal {
17116                        ordinal: header.ordinal,
17117                        protocol_name:
17118                            <WritableMarker as fdomain_client::fidl::ProtocolMarker>::DEBUG_NAME,
17119                    }),
17120                }))
17121            },
17122        )
17123    }
17124}
17125
17126#[derive(Debug)]
17127pub enum WritableRequest {
17128    /// Writes data at the seek offset.
17129    /// The seek offset is moved forward by the number of bytes written.
17130    /// If the file is in append mode, the seek offset is first set to the end
17131    /// of the file, followed by the write, in one atomic step.
17132    ///
17133    /// The file size may grow if the seek offset plus `data.length` is beyond
17134    /// the current end of file.
17135    ///
17136    /// + request `data` the byte buffer to write to the file.
17137    /// - response `actual_count` the number of bytes written.
17138    ///
17139    /// ## Invariants
17140    ///
17141    /// * The returned `actual_count` will never be greater than `data.length`.
17142    /// * If the server is unable to write all the data due to e.g. not enough
17143    ///   space, `actual_count` may be less than `data.length`.  If no bytes
17144    ///   could be written, an error is returned.
17145    /// * If `data.length` is zero, the server should perform all the checks
17146    ///   ensuring write access without mutating the file and return a
17147    ///   successful write of zero bytes.  The seek offset is still updated if
17148    ///   in append mode.
17149    ///
17150    /// This method requires the [`Rights.WRITE_BYTES`] right.
17151    Write { data: Vec<u8>, responder: WritableWriteResponder },
17152}
17153
17154impl WritableRequest {
17155    #[allow(irrefutable_let_patterns)]
17156    pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
17157        if let WritableRequest::Write { data, responder } = self {
17158            Some((data, responder))
17159        } else {
17160            None
17161        }
17162    }
17163
17164    /// Name of the method defined in FIDL
17165    pub fn method_name(&self) -> &'static str {
17166        match *self {
17167            WritableRequest::Write { .. } => "write",
17168        }
17169    }
17170}
17171
17172#[derive(Debug, Clone)]
17173pub struct WritableControlHandle {
17174    inner: std::sync::Arc<fidl::ServeInner<fdomain_client::fidl::FDomainResourceDialect>>,
17175}
17176
17177impl fdomain_client::fidl::ControlHandle for WritableControlHandle {
17178    fn shutdown(&self) {
17179        self.inner.shutdown()
17180    }
17181
17182    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
17183        self.inner.shutdown_with_epitaph(status)
17184    }
17185
17186    fn is_closed(&self) -> bool {
17187        self.inner.channel().is_closed()
17188    }
17189    fn on_closed(&self) -> fdomain_client::OnFDomainSignals {
17190        self.inner.channel().on_closed()
17191    }
17192}
17193
17194impl WritableControlHandle {}
17195
17196#[must_use = "FIDL methods require a response to be sent"]
17197#[derive(Debug)]
17198pub struct WritableWriteResponder {
17199    control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
17200    tx_id: u32,
17201}
17202
17203/// Set the the channel to be shutdown (see [`WritableControlHandle::shutdown`])
17204/// if the responder is dropped without sending a response, so that the client
17205/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
17206impl std::ops::Drop for WritableWriteResponder {
17207    fn drop(&mut self) {
17208        self.control_handle.shutdown();
17209        // Safety: drops once, never accessed again
17210        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17211    }
17212}
17213
17214impl fdomain_client::fidl::Responder for WritableWriteResponder {
17215    type ControlHandle = WritableControlHandle;
17216
17217    fn control_handle(&self) -> &WritableControlHandle {
17218        &self.control_handle
17219    }
17220
17221    fn drop_without_shutdown(mut self) {
17222        // Safety: drops once, never accessed again due to mem::forget
17223        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
17224        // Prevent Drop from running (which would shut down the channel)
17225        std::mem::forget(self);
17226    }
17227}
17228
17229impl WritableWriteResponder {
17230    /// Sends a response to the FIDL transaction.
17231    ///
17232    /// Sets the channel to shutdown if an error occurs.
17233    pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17234        let _result = self.send_raw(result);
17235        if _result.is_err() {
17236            self.control_handle.shutdown();
17237        }
17238        self.drop_without_shutdown();
17239        _result
17240    }
17241
17242    /// Similar to "send" but does not shutdown the channel if an error occurs.
17243    pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17244        let _result = self.send_raw(result);
17245        self.drop_without_shutdown();
17246        _result
17247    }
17248
17249    fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
17250        self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
17251            result.map(|actual_count| (actual_count,)),
17252            self.tx_id,
17253            0x6a31437832469f82,
17254            fidl::encoding::DynamicFlags::empty(),
17255        )
17256    }
17257}
17258
17259mod internal {
17260    use super::*;
17261
17262    impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
17263        type Borrowed<'a> = &'a mut Self;
17264        fn take_or_borrow<'a>(
17265            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17266        ) -> Self::Borrowed<'a> {
17267            value
17268        }
17269    }
17270
17271    unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
17272        type Owned = Self;
17273
17274        #[inline(always)]
17275        fn inline_align(_context: fidl::encoding::Context) -> usize {
17276            8
17277        }
17278
17279        #[inline(always)]
17280        fn inline_size(_context: fidl::encoding::Context) -> usize {
17281            40
17282        }
17283    }
17284
17285    unsafe impl
17286        fidl::encoding::Encode<
17287            DirectoryCreateSymlinkRequest,
17288            fdomain_client::fidl::FDomainResourceDialect,
17289        > for &mut DirectoryCreateSymlinkRequest
17290    {
17291        #[inline]
17292        unsafe fn encode(
17293            self,
17294            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17295            offset: usize,
17296            _depth: fidl::encoding::Depth,
17297        ) -> fidl::Result<()> {
17298            encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17299            // Delegate to tuple encoding.
17300            fidl::encoding::Encode::<
17301                DirectoryCreateSymlinkRequest,
17302                fdomain_client::fidl::FDomainResourceDialect,
17303            >::encode(
17304                (
17305                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17306                        &self.name,
17307                    ),
17308                    <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
17309                        &self.target,
17310                    ),
17311                    <fidl::encoding::Optional<
17312                        fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17313                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17314                        &mut self.connection
17315                    ),
17316                ),
17317                encoder,
17318                offset,
17319                _depth,
17320            )
17321        }
17322    }
17323    unsafe impl<
17324        T0: fidl::encoding::Encode<
17325                fidl::encoding::BoundedString<255>,
17326                fdomain_client::fidl::FDomainResourceDialect,
17327            >,
17328        T1: fidl::encoding::Encode<
17329                fidl::encoding::Vector<u8, 4095>,
17330                fdomain_client::fidl::FDomainResourceDialect,
17331            >,
17332        T2: fidl::encoding::Encode<
17333                fidl::encoding::Optional<
17334                    fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17335                >,
17336                fdomain_client::fidl::FDomainResourceDialect,
17337            >,
17338    >
17339        fidl::encoding::Encode<
17340            DirectoryCreateSymlinkRequest,
17341            fdomain_client::fidl::FDomainResourceDialect,
17342        > for (T0, T1, T2)
17343    {
17344        #[inline]
17345        unsafe fn encode(
17346            self,
17347            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17348            offset: usize,
17349            depth: fidl::encoding::Depth,
17350        ) -> fidl::Result<()> {
17351            encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
17352            // Zero out padding regions. There's no need to apply masks
17353            // because the unmasked parts will be overwritten by fields.
17354            unsafe {
17355                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
17356                (ptr as *mut u64).write_unaligned(0);
17357            }
17358            // Write the fields.
17359            self.0.encode(encoder, offset + 0, depth)?;
17360            self.1.encode(encoder, offset + 16, depth)?;
17361            self.2.encode(encoder, offset + 32, depth)?;
17362            Ok(())
17363        }
17364    }
17365
17366    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17367        for DirectoryCreateSymlinkRequest
17368    {
17369        #[inline(always)]
17370        fn new_empty() -> Self {
17371            Self {
17372                name: fidl::new_empty!(
17373                    fidl::encoding::BoundedString<255>,
17374                    fdomain_client::fidl::FDomainResourceDialect
17375                ),
17376                target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect),
17377                connection: fidl::new_empty!(
17378                    fidl::encoding::Optional<
17379                        fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17380                    >,
17381                    fdomain_client::fidl::FDomainResourceDialect
17382                ),
17383            }
17384        }
17385
17386        #[inline]
17387        unsafe fn decode(
17388            &mut self,
17389            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17390            offset: usize,
17391            _depth: fidl::encoding::Depth,
17392        ) -> fidl::Result<()> {
17393            decoder.debug_check_bounds::<Self>(offset);
17394            // Verify that padding bytes are zero.
17395            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
17396            let padval = unsafe { (ptr as *const u64).read_unaligned() };
17397            let mask = 0xffffffff00000000u64;
17398            let maskedval = padval & mask;
17399            if maskedval != 0 {
17400                return Err(fidl::Error::NonZeroPadding {
17401                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
17402                });
17403            }
17404            fidl::decode!(
17405                fidl::encoding::BoundedString<255>,
17406                fdomain_client::fidl::FDomainResourceDialect,
17407                &mut self.name,
17408                decoder,
17409                offset + 0,
17410                _depth
17411            )?;
17412            fidl::decode!(fidl::encoding::Vector<u8, 4095>, fdomain_client::fidl::FDomainResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
17413            fidl::decode!(
17414                fidl::encoding::Optional<
17415                    fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<SymlinkMarker>>,
17416                >,
17417                fdomain_client::fidl::FDomainResourceDialect,
17418                &mut self.connection,
17419                decoder,
17420                offset + 32,
17421                _depth
17422            )?;
17423            Ok(())
17424        }
17425    }
17426
17427    impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
17428        type Borrowed<'a> = &'a mut Self;
17429        fn take_or_borrow<'a>(
17430            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17431        ) -> Self::Borrowed<'a> {
17432            value
17433        }
17434    }
17435
17436    unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
17437        type Owned = Self;
17438
17439        #[inline(always)]
17440        fn inline_align(_context: fidl::encoding::Context) -> usize {
17441            8
17442        }
17443
17444        #[inline(always)]
17445        fn inline_size(_context: fidl::encoding::Context) -> usize {
17446            32
17447        }
17448    }
17449
17450    unsafe impl
17451        fidl::encoding::Encode<
17452            DirectoryDeprecatedOpenRequest,
17453            fdomain_client::fidl::FDomainResourceDialect,
17454        > for &mut DirectoryDeprecatedOpenRequest
17455    {
17456        #[inline]
17457        unsafe fn encode(
17458            self,
17459            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17460            offset: usize,
17461            _depth: fidl::encoding::Depth,
17462        ) -> fidl::Result<()> {
17463            encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17464            // Delegate to tuple encoding.
17465            fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17466                (
17467                    <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17468                    <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
17469                    <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17470                    <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17471                ),
17472                encoder, offset, _depth
17473            )
17474        }
17475    }
17476    unsafe impl<
17477        T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
17478        T1: fidl::encoding::Encode<ModeType, fdomain_client::fidl::FDomainResourceDialect>,
17479        T2: fidl::encoding::Encode<
17480                fidl::encoding::BoundedString<4095>,
17481                fdomain_client::fidl::FDomainResourceDialect,
17482            >,
17483        T3: fidl::encoding::Encode<
17484                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17485                fdomain_client::fidl::FDomainResourceDialect,
17486            >,
17487    >
17488        fidl::encoding::Encode<
17489            DirectoryDeprecatedOpenRequest,
17490            fdomain_client::fidl::FDomainResourceDialect,
17491        > for (T0, T1, T2, T3)
17492    {
17493        #[inline]
17494        unsafe fn encode(
17495            self,
17496            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17497            offset: usize,
17498            depth: fidl::encoding::Depth,
17499        ) -> fidl::Result<()> {
17500            encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
17501            // Zero out padding regions. There's no need to apply masks
17502            // because the unmasked parts will be overwritten by fields.
17503            unsafe {
17504                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
17505                (ptr as *mut u64).write_unaligned(0);
17506            }
17507            // Write the fields.
17508            self.0.encode(encoder, offset + 0, depth)?;
17509            self.1.encode(encoder, offset + 4, depth)?;
17510            self.2.encode(encoder, offset + 8, depth)?;
17511            self.3.encode(encoder, offset + 24, depth)?;
17512            Ok(())
17513        }
17514    }
17515
17516    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17517        for DirectoryDeprecatedOpenRequest
17518    {
17519        #[inline(always)]
17520        fn new_empty() -> Self {
17521            Self {
17522                flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
17523                mode: fidl::new_empty!(ModeType, fdomain_client::fidl::FDomainResourceDialect),
17524                path: fidl::new_empty!(
17525                    fidl::encoding::BoundedString<4095>,
17526                    fdomain_client::fidl::FDomainResourceDialect
17527                ),
17528                object: fidl::new_empty!(
17529                    fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17530                    fdomain_client::fidl::FDomainResourceDialect
17531                ),
17532            }
17533        }
17534
17535        #[inline]
17536        unsafe fn decode(
17537            &mut self,
17538            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17539            offset: usize,
17540            _depth: fidl::encoding::Depth,
17541        ) -> fidl::Result<()> {
17542            decoder.debug_check_bounds::<Self>(offset);
17543            // Verify that padding bytes are zero.
17544            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
17545            let padval = unsafe { (ptr as *const u64).read_unaligned() };
17546            let mask = 0xffffffff00000000u64;
17547            let maskedval = padval & mask;
17548            if maskedval != 0 {
17549                return Err(fidl::Error::NonZeroPadding {
17550                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
17551                });
17552            }
17553            fidl::decode!(
17554                OpenFlags,
17555                fdomain_client::fidl::FDomainResourceDialect,
17556                &mut self.flags,
17557                decoder,
17558                offset + 0,
17559                _depth
17560            )?;
17561            fidl::decode!(
17562                ModeType,
17563                fdomain_client::fidl::FDomainResourceDialect,
17564                &mut self.mode,
17565                decoder,
17566                offset + 4,
17567                _depth
17568            )?;
17569            fidl::decode!(
17570                fidl::encoding::BoundedString<4095>,
17571                fdomain_client::fidl::FDomainResourceDialect,
17572                &mut self.path,
17573                decoder,
17574                offset + 8,
17575                _depth
17576            )?;
17577            fidl::decode!(
17578                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
17579                fdomain_client::fidl::FDomainResourceDialect,
17580                &mut self.object,
17581                decoder,
17582                offset + 24,
17583                _depth
17584            )?;
17585            Ok(())
17586        }
17587    }
17588
17589    impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
17590        type Borrowed<'a> = &'a mut Self;
17591        fn take_or_borrow<'a>(
17592            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17593        ) -> Self::Borrowed<'a> {
17594            value
17595        }
17596    }
17597
17598    unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
17599        type Owned = Self;
17600
17601        #[inline(always)]
17602        fn inline_align(_context: fidl::encoding::Context) -> usize {
17603            4
17604        }
17605
17606        #[inline(always)]
17607        fn inline_size(_context: fidl::encoding::Context) -> usize {
17608            8
17609        }
17610    }
17611
17612    unsafe impl
17613        fidl::encoding::Encode<
17614            DirectoryGetTokenResponse,
17615            fdomain_client::fidl::FDomainResourceDialect,
17616        > for &mut DirectoryGetTokenResponse
17617    {
17618        #[inline]
17619        unsafe fn encode(
17620            self,
17621            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17622            offset: usize,
17623            _depth: fidl::encoding::Depth,
17624        ) -> fidl::Result<()> {
17625            encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17626            // Delegate to tuple encoding.
17627            fidl::encoding::Encode::<
17628                DirectoryGetTokenResponse,
17629                fdomain_client::fidl::FDomainResourceDialect,
17630            >::encode(
17631                (
17632                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
17633                    <fidl::encoding::Optional<
17634                        fidl::encoding::HandleType<
17635                            fdomain_client::NullableHandle,
17636                            { fidl::ObjectType::NONE.into_raw() },
17637                            2147483648,
17638                        >,
17639                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17640                        &mut self.token
17641                    ),
17642                ),
17643                encoder,
17644                offset,
17645                _depth,
17646            )
17647        }
17648    }
17649    unsafe impl<
17650        T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
17651        T1: fidl::encoding::Encode<
17652                fidl::encoding::Optional<
17653                    fidl::encoding::HandleType<
17654                        fdomain_client::NullableHandle,
17655                        { fidl::ObjectType::NONE.into_raw() },
17656                        2147483648,
17657                    >,
17658                >,
17659                fdomain_client::fidl::FDomainResourceDialect,
17660            >,
17661    >
17662        fidl::encoding::Encode<
17663            DirectoryGetTokenResponse,
17664            fdomain_client::fidl::FDomainResourceDialect,
17665        > for (T0, T1)
17666    {
17667        #[inline]
17668        unsafe fn encode(
17669            self,
17670            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17671            offset: usize,
17672            depth: fidl::encoding::Depth,
17673        ) -> fidl::Result<()> {
17674            encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
17675            // Zero out padding regions. There's no need to apply masks
17676            // because the unmasked parts will be overwritten by fields.
17677            // Write the fields.
17678            self.0.encode(encoder, offset + 0, depth)?;
17679            self.1.encode(encoder, offset + 4, depth)?;
17680            Ok(())
17681        }
17682    }
17683
17684    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17685        for DirectoryGetTokenResponse
17686    {
17687        #[inline(always)]
17688        fn new_empty() -> Self {
17689            Self {
17690                s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
17691                token: fidl::new_empty!(
17692                    fidl::encoding::Optional<
17693                        fidl::encoding::HandleType<
17694                            fdomain_client::NullableHandle,
17695                            { fidl::ObjectType::NONE.into_raw() },
17696                            2147483648,
17697                        >,
17698                    >,
17699                    fdomain_client::fidl::FDomainResourceDialect
17700                ),
17701            }
17702        }
17703
17704        #[inline]
17705        unsafe fn decode(
17706            &mut self,
17707            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17708            offset: usize,
17709            _depth: fidl::encoding::Depth,
17710        ) -> fidl::Result<()> {
17711            decoder.debug_check_bounds::<Self>(offset);
17712            // Verify that padding bytes are zero.
17713            fidl::decode!(
17714                i32,
17715                fdomain_client::fidl::FDomainResourceDialect,
17716                &mut self.s,
17717                decoder,
17718                offset + 0,
17719                _depth
17720            )?;
17721            fidl::decode!(
17722                fidl::encoding::Optional<
17723                    fidl::encoding::HandleType<
17724                        fdomain_client::NullableHandle,
17725                        { fidl::ObjectType::NONE.into_raw() },
17726                        2147483648,
17727                    >,
17728                >,
17729                fdomain_client::fidl::FDomainResourceDialect,
17730                &mut self.token,
17731                decoder,
17732                offset + 4,
17733                _depth
17734            )?;
17735            Ok(())
17736        }
17737    }
17738
17739    impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
17740        type Borrowed<'a> = &'a mut Self;
17741        fn take_or_borrow<'a>(
17742            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17743        ) -> Self::Borrowed<'a> {
17744            value
17745        }
17746    }
17747
17748    unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
17749        type Owned = Self;
17750
17751        #[inline(always)]
17752        fn inline_align(_context: fidl::encoding::Context) -> usize {
17753            8
17754        }
17755
17756        #[inline(always)]
17757        fn inline_size(_context: fidl::encoding::Context) -> usize {
17758            40
17759        }
17760    }
17761
17762    unsafe impl
17763        fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17764        for &mut DirectoryLinkRequest
17765    {
17766        #[inline]
17767        unsafe fn encode(
17768            self,
17769            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17770            offset: usize,
17771            _depth: fidl::encoding::Depth,
17772        ) -> fidl::Result<()> {
17773            encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17774            // Delegate to tuple encoding.
17775            fidl::encoding::Encode::<
17776                DirectoryLinkRequest,
17777                fdomain_client::fidl::FDomainResourceDialect,
17778            >::encode(
17779                (
17780                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17781                        &self.src,
17782                    ),
17783                    <fidl::encoding::HandleType<
17784                        fdomain_client::NullableHandle,
17785                        { fidl::ObjectType::NONE.into_raw() },
17786                        2147483648,
17787                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17788                        &mut self.dst_parent_token,
17789                    ),
17790                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
17791                        &self.dst,
17792                    ),
17793                ),
17794                encoder,
17795                offset,
17796                _depth,
17797            )
17798        }
17799    }
17800    unsafe impl<
17801        T0: fidl::encoding::Encode<
17802                fidl::encoding::BoundedString<255>,
17803                fdomain_client::fidl::FDomainResourceDialect,
17804            >,
17805        T1: fidl::encoding::Encode<
17806                fidl::encoding::HandleType<
17807                    fdomain_client::NullableHandle,
17808                    { fidl::ObjectType::NONE.into_raw() },
17809                    2147483648,
17810                >,
17811                fdomain_client::fidl::FDomainResourceDialect,
17812            >,
17813        T2: fidl::encoding::Encode<
17814                fidl::encoding::BoundedString<255>,
17815                fdomain_client::fidl::FDomainResourceDialect,
17816            >,
17817    > fidl::encoding::Encode<DirectoryLinkRequest, fdomain_client::fidl::FDomainResourceDialect>
17818        for (T0, T1, T2)
17819    {
17820        #[inline]
17821        unsafe fn encode(
17822            self,
17823            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17824            offset: usize,
17825            depth: fidl::encoding::Depth,
17826        ) -> fidl::Result<()> {
17827            encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
17828            // Zero out padding regions. There's no need to apply masks
17829            // because the unmasked parts will be overwritten by fields.
17830            unsafe {
17831                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
17832                (ptr as *mut u64).write_unaligned(0);
17833            }
17834            // Write the fields.
17835            self.0.encode(encoder, offset + 0, depth)?;
17836            self.1.encode(encoder, offset + 16, depth)?;
17837            self.2.encode(encoder, offset + 24, depth)?;
17838            Ok(())
17839        }
17840    }
17841
17842    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17843        for DirectoryLinkRequest
17844    {
17845        #[inline(always)]
17846        fn new_empty() -> Self {
17847            Self {
17848                src: fidl::new_empty!(
17849                    fidl::encoding::BoundedString<255>,
17850                    fdomain_client::fidl::FDomainResourceDialect
17851                ),
17852                dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
17853                dst: fidl::new_empty!(
17854                    fidl::encoding::BoundedString<255>,
17855                    fdomain_client::fidl::FDomainResourceDialect
17856                ),
17857            }
17858        }
17859
17860        #[inline]
17861        unsafe fn decode(
17862            &mut self,
17863            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17864            offset: usize,
17865            _depth: fidl::encoding::Depth,
17866        ) -> fidl::Result<()> {
17867            decoder.debug_check_bounds::<Self>(offset);
17868            // Verify that padding bytes are zero.
17869            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
17870            let padval = unsafe { (ptr as *const u64).read_unaligned() };
17871            let mask = 0xffffffff00000000u64;
17872            let maskedval = padval & mask;
17873            if maskedval != 0 {
17874                return Err(fidl::Error::NonZeroPadding {
17875                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
17876                });
17877            }
17878            fidl::decode!(
17879                fidl::encoding::BoundedString<255>,
17880                fdomain_client::fidl::FDomainResourceDialect,
17881                &mut self.src,
17882                decoder,
17883                offset + 0,
17884                _depth
17885            )?;
17886            fidl::decode!(fidl::encoding::HandleType<fdomain_client::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
17887            fidl::decode!(
17888                fidl::encoding::BoundedString<255>,
17889                fdomain_client::fidl::FDomainResourceDialect,
17890                &mut self.dst,
17891                decoder,
17892                offset + 24,
17893                _depth
17894            )?;
17895            Ok(())
17896        }
17897    }
17898
17899    impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
17900        type Borrowed<'a> = &'a mut Self;
17901        fn take_or_borrow<'a>(
17902            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17903        ) -> Self::Borrowed<'a> {
17904            value
17905        }
17906    }
17907
17908    unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
17909        type Owned = Self;
17910
17911        #[inline(always)]
17912        fn inline_align(_context: fidl::encoding::Context) -> usize {
17913            8
17914        }
17915
17916        #[inline(always)]
17917        fn inline_size(_context: fidl::encoding::Context) -> usize {
17918            48
17919        }
17920    }
17921
17922    unsafe impl
17923        fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
17924        for &mut DirectoryOpenRequest
17925    {
17926        #[inline]
17927        unsafe fn encode(
17928            self,
17929            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17930            offset: usize,
17931            _depth: fidl::encoding::Depth,
17932        ) -> fidl::Result<()> {
17933            encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
17934            // Delegate to tuple encoding.
17935            fidl::encoding::Encode::<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
17936                (
17937                    <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
17938                    <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
17939                    <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
17940                    <fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
17941                ),
17942                encoder, offset, _depth
17943            )
17944        }
17945    }
17946    unsafe impl<
17947        T0: fidl::encoding::Encode<
17948                fidl::encoding::BoundedString<4095>,
17949                fdomain_client::fidl::FDomainResourceDialect,
17950            >,
17951        T1: fidl::encoding::Encode<Flags, fdomain_client::fidl::FDomainResourceDialect>,
17952        T2: fidl::encoding::Encode<Options, fdomain_client::fidl::FDomainResourceDialect>,
17953        T3: fidl::encoding::Encode<
17954                fidl::encoding::HandleType<
17955                    fdomain_client::Channel,
17956                    { fidl::ObjectType::CHANNEL.into_raw() },
17957                    2147483648,
17958                >,
17959                fdomain_client::fidl::FDomainResourceDialect,
17960            >,
17961    > fidl::encoding::Encode<DirectoryOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
17962        for (T0, T1, T2, T3)
17963    {
17964        #[inline]
17965        unsafe fn encode(
17966            self,
17967            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
17968            offset: usize,
17969            depth: fidl::encoding::Depth,
17970        ) -> fidl::Result<()> {
17971            encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
17972            // Zero out padding regions. There's no need to apply masks
17973            // because the unmasked parts will be overwritten by fields.
17974            unsafe {
17975                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
17976                (ptr as *mut u64).write_unaligned(0);
17977            }
17978            // Write the fields.
17979            self.0.encode(encoder, offset + 0, depth)?;
17980            self.1.encode(encoder, offset + 16, depth)?;
17981            self.2.encode(encoder, offset + 24, depth)?;
17982            self.3.encode(encoder, offset + 40, depth)?;
17983            Ok(())
17984        }
17985    }
17986
17987    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
17988        for DirectoryOpenRequest
17989    {
17990        #[inline(always)]
17991        fn new_empty() -> Self {
17992            Self {
17993                path: fidl::new_empty!(
17994                    fidl::encoding::BoundedString<4095>,
17995                    fdomain_client::fidl::FDomainResourceDialect
17996                ),
17997                flags: fidl::new_empty!(Flags, fdomain_client::fidl::FDomainResourceDialect),
17998                options: fidl::new_empty!(Options, fdomain_client::fidl::FDomainResourceDialect),
17999                object: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18000            }
18001        }
18002
18003        #[inline]
18004        unsafe fn decode(
18005            &mut self,
18006            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18007            offset: usize,
18008            _depth: fidl::encoding::Depth,
18009        ) -> fidl::Result<()> {
18010            decoder.debug_check_bounds::<Self>(offset);
18011            // Verify that padding bytes are zero.
18012            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
18013            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18014            let mask = 0xffffffff00000000u64;
18015            let maskedval = padval & mask;
18016            if maskedval != 0 {
18017                return Err(fidl::Error::NonZeroPadding {
18018                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
18019                });
18020            }
18021            fidl::decode!(
18022                fidl::encoding::BoundedString<4095>,
18023                fdomain_client::fidl::FDomainResourceDialect,
18024                &mut self.path,
18025                decoder,
18026                offset + 0,
18027                _depth
18028            )?;
18029            fidl::decode!(
18030                Flags,
18031                fdomain_client::fidl::FDomainResourceDialect,
18032                &mut self.flags,
18033                decoder,
18034                offset + 16,
18035                _depth
18036            )?;
18037            fidl::decode!(
18038                Options,
18039                fdomain_client::fidl::FDomainResourceDialect,
18040                &mut self.options,
18041                decoder,
18042                offset + 24,
18043                _depth
18044            )?;
18045            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)?;
18046            Ok(())
18047        }
18048    }
18049
18050    impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
18051        type Borrowed<'a> = &'a mut Self;
18052        fn take_or_borrow<'a>(
18053            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18054        ) -> Self::Borrowed<'a> {
18055            value
18056        }
18057    }
18058
18059    unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
18060        type Owned = Self;
18061
18062        #[inline(always)]
18063        fn inline_align(_context: fidl::encoding::Context) -> usize {
18064            8
18065        }
18066
18067        #[inline(always)]
18068        fn inline_size(_context: fidl::encoding::Context) -> usize {
18069            40
18070        }
18071    }
18072
18073    unsafe impl
18074        fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18075        for &mut DirectoryRenameRequest
18076    {
18077        #[inline]
18078        unsafe fn encode(
18079            self,
18080            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18081            offset: usize,
18082            _depth: fidl::encoding::Depth,
18083        ) -> fidl::Result<()> {
18084            encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18085            // Delegate to tuple encoding.
18086            fidl::encoding::Encode::<
18087                DirectoryRenameRequest,
18088                fdomain_client::fidl::FDomainResourceDialect,
18089            >::encode(
18090                (
18091                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18092                        &self.src,
18093                    ),
18094                    <fidl::encoding::HandleType<
18095                        fdomain_client::Event,
18096                        { fidl::ObjectType::EVENT.into_raw() },
18097                        2147483648,
18098                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18099                        &mut self.dst_parent_token,
18100                    ),
18101                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18102                        &self.dst,
18103                    ),
18104                ),
18105                encoder,
18106                offset,
18107                _depth,
18108            )
18109        }
18110    }
18111    unsafe impl<
18112        T0: fidl::encoding::Encode<
18113                fidl::encoding::BoundedString<255>,
18114                fdomain_client::fidl::FDomainResourceDialect,
18115            >,
18116        T1: fidl::encoding::Encode<
18117                fidl::encoding::HandleType<
18118                    fdomain_client::Event,
18119                    { fidl::ObjectType::EVENT.into_raw() },
18120                    2147483648,
18121                >,
18122                fdomain_client::fidl::FDomainResourceDialect,
18123            >,
18124        T2: fidl::encoding::Encode<
18125                fidl::encoding::BoundedString<255>,
18126                fdomain_client::fidl::FDomainResourceDialect,
18127            >,
18128    >
18129        fidl::encoding::Encode<DirectoryRenameRequest, fdomain_client::fidl::FDomainResourceDialect>
18130        for (T0, T1, T2)
18131    {
18132        #[inline]
18133        unsafe fn encode(
18134            self,
18135            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18136            offset: usize,
18137            depth: fidl::encoding::Depth,
18138        ) -> fidl::Result<()> {
18139            encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
18140            // Zero out padding regions. There's no need to apply masks
18141            // because the unmasked parts will be overwritten by fields.
18142            unsafe {
18143                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18144                (ptr as *mut u64).write_unaligned(0);
18145            }
18146            // Write the fields.
18147            self.0.encode(encoder, offset + 0, depth)?;
18148            self.1.encode(encoder, offset + 16, depth)?;
18149            self.2.encode(encoder, offset + 24, depth)?;
18150            Ok(())
18151        }
18152    }
18153
18154    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18155        for DirectoryRenameRequest
18156    {
18157        #[inline(always)]
18158        fn new_empty() -> Self {
18159            Self {
18160                src: fidl::new_empty!(
18161                    fidl::encoding::BoundedString<255>,
18162                    fdomain_client::fidl::FDomainResourceDialect
18163                ),
18164                dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18165                dst: fidl::new_empty!(
18166                    fidl::encoding::BoundedString<255>,
18167                    fdomain_client::fidl::FDomainResourceDialect
18168                ),
18169            }
18170        }
18171
18172        #[inline]
18173        unsafe fn decode(
18174            &mut self,
18175            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18176            offset: usize,
18177            _depth: fidl::encoding::Depth,
18178        ) -> fidl::Result<()> {
18179            decoder.debug_check_bounds::<Self>(offset);
18180            // Verify that padding bytes are zero.
18181            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18182            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18183            let mask = 0xffffffff00000000u64;
18184            let maskedval = padval & mask;
18185            if maskedval != 0 {
18186                return Err(fidl::Error::NonZeroPadding {
18187                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18188                });
18189            }
18190            fidl::decode!(
18191                fidl::encoding::BoundedString<255>,
18192                fdomain_client::fidl::FDomainResourceDialect,
18193                &mut self.src,
18194                decoder,
18195                offset + 0,
18196                _depth
18197            )?;
18198            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)?;
18199            fidl::decode!(
18200                fidl::encoding::BoundedString<255>,
18201                fdomain_client::fidl::FDomainResourceDialect,
18202                &mut self.dst,
18203                decoder,
18204                offset + 24,
18205                _depth
18206            )?;
18207            Ok(())
18208        }
18209    }
18210
18211    impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
18212        type Borrowed<'a> = &'a mut Self;
18213        fn take_or_borrow<'a>(
18214            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18215        ) -> Self::Borrowed<'a> {
18216            value
18217        }
18218    }
18219
18220    unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
18221        type Owned = Self;
18222
18223        #[inline(always)]
18224        fn inline_align(_context: fidl::encoding::Context) -> usize {
18225            4
18226        }
18227
18228        #[inline(always)]
18229        fn inline_size(_context: fidl::encoding::Context) -> usize {
18230            12
18231        }
18232    }
18233
18234    unsafe impl
18235        fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18236        for &mut DirectoryWatchRequest
18237    {
18238        #[inline]
18239        unsafe fn encode(
18240            self,
18241            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18242            offset: usize,
18243            _depth: fidl::encoding::Depth,
18244        ) -> fidl::Result<()> {
18245            encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18246            // Delegate to tuple encoding.
18247            fidl::encoding::Encode::<
18248                DirectoryWatchRequest,
18249                fdomain_client::fidl::FDomainResourceDialect,
18250            >::encode(
18251                (
18252                    <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
18253                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
18254                    <fidl::encoding::Endpoint<
18255                        fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18256                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18257                        &mut self.watcher
18258                    ),
18259                ),
18260                encoder,
18261                offset,
18262                _depth,
18263            )
18264        }
18265    }
18266    unsafe impl<
18267        T0: fidl::encoding::Encode<WatchMask, fdomain_client::fidl::FDomainResourceDialect>,
18268        T1: fidl::encoding::Encode<u32, fdomain_client::fidl::FDomainResourceDialect>,
18269        T2: fidl::encoding::Encode<
18270                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18271                fdomain_client::fidl::FDomainResourceDialect,
18272            >,
18273    >
18274        fidl::encoding::Encode<DirectoryWatchRequest, fdomain_client::fidl::FDomainResourceDialect>
18275        for (T0, T1, T2)
18276    {
18277        #[inline]
18278        unsafe fn encode(
18279            self,
18280            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18281            offset: usize,
18282            depth: fidl::encoding::Depth,
18283        ) -> fidl::Result<()> {
18284            encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
18285            // Zero out padding regions. There's no need to apply masks
18286            // because the unmasked parts will be overwritten by fields.
18287            // Write the fields.
18288            self.0.encode(encoder, offset + 0, depth)?;
18289            self.1.encode(encoder, offset + 4, depth)?;
18290            self.2.encode(encoder, offset + 8, depth)?;
18291            Ok(())
18292        }
18293    }
18294
18295    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18296        for DirectoryWatchRequest
18297    {
18298        #[inline(always)]
18299        fn new_empty() -> Self {
18300            Self {
18301                mask: fidl::new_empty!(WatchMask, fdomain_client::fidl::FDomainResourceDialect),
18302                options: fidl::new_empty!(u32, fdomain_client::fidl::FDomainResourceDialect),
18303                watcher: fidl::new_empty!(
18304                    fidl::encoding::Endpoint<
18305                        fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>,
18306                    >,
18307                    fdomain_client::fidl::FDomainResourceDialect
18308                ),
18309            }
18310        }
18311
18312        #[inline]
18313        unsafe fn decode(
18314            &mut self,
18315            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18316            offset: usize,
18317            _depth: fidl::encoding::Depth,
18318        ) -> fidl::Result<()> {
18319            decoder.debug_check_bounds::<Self>(offset);
18320            // Verify that padding bytes are zero.
18321            fidl::decode!(
18322                WatchMask,
18323                fdomain_client::fidl::FDomainResourceDialect,
18324                &mut self.mask,
18325                decoder,
18326                offset + 0,
18327                _depth
18328            )?;
18329            fidl::decode!(
18330                u32,
18331                fdomain_client::fidl::FDomainResourceDialect,
18332                &mut self.options,
18333                decoder,
18334                offset + 4,
18335                _depth
18336            )?;
18337            fidl::decode!(
18338                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<DirectoryWatcherMarker>>,
18339                fdomain_client::fidl::FDomainResourceDialect,
18340                &mut self.watcher,
18341                decoder,
18342                offset + 8,
18343                _depth
18344            )?;
18345            Ok(())
18346        }
18347    }
18348
18349    impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
18350        type Borrowed<'a> = &'a mut Self;
18351        fn take_or_borrow<'a>(
18352            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18353        ) -> Self::Borrowed<'a> {
18354            value
18355        }
18356    }
18357
18358    unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
18359        type Owned = Self;
18360
18361        #[inline(always)]
18362        fn inline_align(_context: fidl::encoding::Context) -> usize {
18363            8
18364        }
18365
18366        #[inline(always)]
18367        fn inline_size(_context: fidl::encoding::Context) -> usize {
18368            24
18369        }
18370    }
18371
18372    unsafe impl
18373        fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18374        for &mut FileAllocateRequest
18375    {
18376        #[inline]
18377        unsafe fn encode(
18378            self,
18379            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18380            offset: usize,
18381            _depth: fidl::encoding::Depth,
18382        ) -> fidl::Result<()> {
18383            encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18384            // Delegate to tuple encoding.
18385            fidl::encoding::Encode::<
18386                FileAllocateRequest,
18387                fdomain_client::fidl::FDomainResourceDialect,
18388            >::encode(
18389                (
18390                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
18391                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
18392                    <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
18393                ),
18394                encoder,
18395                offset,
18396                _depth,
18397            )
18398        }
18399    }
18400    unsafe impl<
18401        T0: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18402        T1: fidl::encoding::Encode<u64, fdomain_client::fidl::FDomainResourceDialect>,
18403        T2: fidl::encoding::Encode<AllocateMode, fdomain_client::fidl::FDomainResourceDialect>,
18404    > fidl::encoding::Encode<FileAllocateRequest, fdomain_client::fidl::FDomainResourceDialect>
18405        for (T0, T1, T2)
18406    {
18407        #[inline]
18408        unsafe fn encode(
18409            self,
18410            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18411            offset: usize,
18412            depth: fidl::encoding::Depth,
18413        ) -> fidl::Result<()> {
18414            encoder.debug_check_bounds::<FileAllocateRequest>(offset);
18415            // Zero out padding regions. There's no need to apply masks
18416            // because the unmasked parts will be overwritten by fields.
18417            unsafe {
18418                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
18419                (ptr as *mut u64).write_unaligned(0);
18420            }
18421            // Write the fields.
18422            self.0.encode(encoder, offset + 0, depth)?;
18423            self.1.encode(encoder, offset + 8, depth)?;
18424            self.2.encode(encoder, offset + 16, depth)?;
18425            Ok(())
18426        }
18427    }
18428
18429    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18430        for FileAllocateRequest
18431    {
18432        #[inline(always)]
18433        fn new_empty() -> Self {
18434            Self {
18435                offset: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18436                length: fidl::new_empty!(u64, fdomain_client::fidl::FDomainResourceDialect),
18437                mode: fidl::new_empty!(AllocateMode, fdomain_client::fidl::FDomainResourceDialect),
18438            }
18439        }
18440
18441        #[inline]
18442        unsafe fn decode(
18443            &mut self,
18444            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18445            offset: usize,
18446            _depth: fidl::encoding::Depth,
18447        ) -> fidl::Result<()> {
18448            decoder.debug_check_bounds::<Self>(offset);
18449            // Verify that padding bytes are zero.
18450            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
18451            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18452            let mask = 0xffffffff00000000u64;
18453            let maskedval = padval & mask;
18454            if maskedval != 0 {
18455                return Err(fidl::Error::NonZeroPadding {
18456                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
18457                });
18458            }
18459            fidl::decode!(
18460                u64,
18461                fdomain_client::fidl::FDomainResourceDialect,
18462                &mut self.offset,
18463                decoder,
18464                offset + 0,
18465                _depth
18466            )?;
18467            fidl::decode!(
18468                u64,
18469                fdomain_client::fidl::FDomainResourceDialect,
18470                &mut self.length,
18471                decoder,
18472                offset + 8,
18473                _depth
18474            )?;
18475            fidl::decode!(
18476                AllocateMode,
18477                fdomain_client::fidl::FDomainResourceDialect,
18478                &mut self.mode,
18479                decoder,
18480                offset + 16,
18481                _depth
18482            )?;
18483            Ok(())
18484        }
18485    }
18486
18487    impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
18488        type Borrowed<'a> = &'a mut Self;
18489        fn take_or_borrow<'a>(
18490            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18491        ) -> Self::Borrowed<'a> {
18492            value
18493        }
18494    }
18495
18496    unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
18497        type Owned = Self;
18498
18499        #[inline(always)]
18500        fn inline_align(_context: fidl::encoding::Context) -> usize {
18501            8
18502        }
18503
18504        #[inline(always)]
18505        fn inline_size(_context: fidl::encoding::Context) -> usize {
18506            16
18507        }
18508    }
18509
18510    unsafe impl
18511        fidl::encoding::Encode<
18512            FileEnableVerityRequest,
18513            fdomain_client::fidl::FDomainResourceDialect,
18514        > for &mut FileEnableVerityRequest
18515    {
18516        #[inline]
18517        unsafe fn encode(
18518            self,
18519            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18520            offset: usize,
18521            _depth: fidl::encoding::Depth,
18522        ) -> fidl::Result<()> {
18523            encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18524            // Delegate to tuple encoding.
18525            fidl::encoding::Encode::<
18526                FileEnableVerityRequest,
18527                fdomain_client::fidl::FDomainResourceDialect,
18528            >::encode(
18529                (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
18530                encoder,
18531                offset,
18532                _depth,
18533            )
18534        }
18535    }
18536    unsafe impl<
18537        T0: fidl::encoding::Encode<VerificationOptions, fdomain_client::fidl::FDomainResourceDialect>,
18538    >
18539        fidl::encoding::Encode<
18540            FileEnableVerityRequest,
18541            fdomain_client::fidl::FDomainResourceDialect,
18542        > for (T0,)
18543    {
18544        #[inline]
18545        unsafe fn encode(
18546            self,
18547            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18548            offset: usize,
18549            depth: fidl::encoding::Depth,
18550        ) -> fidl::Result<()> {
18551            encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
18552            // Zero out padding regions. There's no need to apply masks
18553            // because the unmasked parts will be overwritten by fields.
18554            // Write the fields.
18555            self.0.encode(encoder, offset + 0, depth)?;
18556            Ok(())
18557        }
18558    }
18559
18560    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18561        for FileEnableVerityRequest
18562    {
18563        #[inline(always)]
18564        fn new_empty() -> Self {
18565            Self {
18566                options: fidl::new_empty!(
18567                    VerificationOptions,
18568                    fdomain_client::fidl::FDomainResourceDialect
18569                ),
18570            }
18571        }
18572
18573        #[inline]
18574        unsafe fn decode(
18575            &mut self,
18576            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18577            offset: usize,
18578            _depth: fidl::encoding::Depth,
18579        ) -> fidl::Result<()> {
18580            decoder.debug_check_bounds::<Self>(offset);
18581            // Verify that padding bytes are zero.
18582            fidl::decode!(
18583                VerificationOptions,
18584                fdomain_client::fidl::FDomainResourceDialect,
18585                &mut self.options,
18586                decoder,
18587                offset + 0,
18588                _depth
18589            )?;
18590            Ok(())
18591        }
18592    }
18593
18594    impl fidl::encoding::ResourceTypeMarker for FileObject {
18595        type Borrowed<'a> = &'a mut Self;
18596        fn take_or_borrow<'a>(
18597            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18598        ) -> Self::Borrowed<'a> {
18599            value
18600        }
18601    }
18602
18603    unsafe impl fidl::encoding::TypeMarker for FileObject {
18604        type Owned = Self;
18605
18606        #[inline(always)]
18607        fn inline_align(_context: fidl::encoding::Context) -> usize {
18608            4
18609        }
18610
18611        #[inline(always)]
18612        fn inline_size(_context: fidl::encoding::Context) -> usize {
18613            8
18614        }
18615    }
18616
18617    unsafe impl fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18618        for &mut FileObject
18619    {
18620        #[inline]
18621        unsafe fn encode(
18622            self,
18623            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18624            offset: usize,
18625            _depth: fidl::encoding::Depth,
18626        ) -> fidl::Result<()> {
18627            encoder.debug_check_bounds::<FileObject>(offset);
18628            // Delegate to tuple encoding.
18629            fidl::encoding::Encode::<FileObject, fdomain_client::fidl::FDomainResourceDialect>::encode(
18630                (
18631                    <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),
18632                    <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),
18633                ),
18634                encoder, offset, _depth
18635            )
18636        }
18637    }
18638    unsafe impl<
18639        T0: fidl::encoding::Encode<
18640                fidl::encoding::Optional<
18641                    fidl::encoding::HandleType<
18642                        fdomain_client::Event,
18643                        { fidl::ObjectType::EVENT.into_raw() },
18644                        2147483648,
18645                    >,
18646                >,
18647                fdomain_client::fidl::FDomainResourceDialect,
18648            >,
18649        T1: fidl::encoding::Encode<
18650                fidl::encoding::Optional<
18651                    fidl::encoding::HandleType<
18652                        fdomain_client::Stream,
18653                        { fidl::ObjectType::STREAM.into_raw() },
18654                        2147483648,
18655                    >,
18656                >,
18657                fdomain_client::fidl::FDomainResourceDialect,
18658            >,
18659    > fidl::encoding::Encode<FileObject, fdomain_client::fidl::FDomainResourceDialect>
18660        for (T0, T1)
18661    {
18662        #[inline]
18663        unsafe fn encode(
18664            self,
18665            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18666            offset: usize,
18667            depth: fidl::encoding::Depth,
18668        ) -> fidl::Result<()> {
18669            encoder.debug_check_bounds::<FileObject>(offset);
18670            // Zero out padding regions. There's no need to apply masks
18671            // because the unmasked parts will be overwritten by fields.
18672            // Write the fields.
18673            self.0.encode(encoder, offset + 0, depth)?;
18674            self.1.encode(encoder, offset + 4, depth)?;
18675            Ok(())
18676        }
18677    }
18678
18679    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileObject {
18680        #[inline(always)]
18681        fn new_empty() -> Self {
18682            Self {
18683                event: fidl::new_empty!(
18684                    fidl::encoding::Optional<
18685                        fidl::encoding::HandleType<
18686                            fdomain_client::Event,
18687                            { fidl::ObjectType::EVENT.into_raw() },
18688                            2147483648,
18689                        >,
18690                    >,
18691                    fdomain_client::fidl::FDomainResourceDialect
18692                ),
18693                stream: fidl::new_empty!(
18694                    fidl::encoding::Optional<
18695                        fidl::encoding::HandleType<
18696                            fdomain_client::Stream,
18697                            { fidl::ObjectType::STREAM.into_raw() },
18698                            2147483648,
18699                        >,
18700                    >,
18701                    fdomain_client::fidl::FDomainResourceDialect
18702                ),
18703            }
18704        }
18705
18706        #[inline]
18707        unsafe fn decode(
18708            &mut self,
18709            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18710            offset: usize,
18711            _depth: fidl::encoding::Depth,
18712        ) -> fidl::Result<()> {
18713            decoder.debug_check_bounds::<Self>(offset);
18714            // Verify that padding bytes are zero.
18715            fidl::decode!(
18716                fidl::encoding::Optional<
18717                    fidl::encoding::HandleType<
18718                        fdomain_client::Event,
18719                        { fidl::ObjectType::EVENT.into_raw() },
18720                        2147483648,
18721                    >,
18722                >,
18723                fdomain_client::fidl::FDomainResourceDialect,
18724                &mut self.event,
18725                decoder,
18726                offset + 0,
18727                _depth
18728            )?;
18729            fidl::decode!(
18730                fidl::encoding::Optional<
18731                    fidl::encoding::HandleType<
18732                        fdomain_client::Stream,
18733                        { fidl::ObjectType::STREAM.into_raw() },
18734                        2147483648,
18735                    >,
18736                >,
18737                fdomain_client::fidl::FDomainResourceDialect,
18738                &mut self.stream,
18739                decoder,
18740                offset + 4,
18741                _depth
18742            )?;
18743            Ok(())
18744        }
18745    }
18746
18747    impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
18748        type Borrowed<'a> = &'a mut Self;
18749        fn take_or_borrow<'a>(
18750            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18751        ) -> Self::Borrowed<'a> {
18752            value
18753        }
18754    }
18755
18756    unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
18757        type Owned = Self;
18758
18759        #[inline(always)]
18760        fn inline_align(_context: fidl::encoding::Context) -> usize {
18761            4
18762        }
18763
18764        #[inline(always)]
18765        fn inline_size(_context: fidl::encoding::Context) -> usize {
18766            4
18767        }
18768    }
18769
18770    unsafe impl
18771        fidl::encoding::Encode<
18772            FileGetBackingMemoryResponse,
18773            fdomain_client::fidl::FDomainResourceDialect,
18774        > for &mut FileGetBackingMemoryResponse
18775    {
18776        #[inline]
18777        unsafe fn encode(
18778            self,
18779            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18780            offset: usize,
18781            _depth: fidl::encoding::Depth,
18782        ) -> fidl::Result<()> {
18783            encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18784            // Delegate to tuple encoding.
18785            fidl::encoding::Encode::<
18786                FileGetBackingMemoryResponse,
18787                fdomain_client::fidl::FDomainResourceDialect,
18788            >::encode(
18789                (<fidl::encoding::HandleType<
18790                    fdomain_client::Vmo,
18791                    { fidl::ObjectType::VMO.into_raw() },
18792                    2147483648,
18793                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18794                    &mut self.vmo
18795                ),),
18796                encoder,
18797                offset,
18798                _depth,
18799            )
18800        }
18801    }
18802    unsafe impl<
18803        T0: fidl::encoding::Encode<
18804                fidl::encoding::HandleType<
18805                    fdomain_client::Vmo,
18806                    { fidl::ObjectType::VMO.into_raw() },
18807                    2147483648,
18808                >,
18809                fdomain_client::fidl::FDomainResourceDialect,
18810            >,
18811    >
18812        fidl::encoding::Encode<
18813            FileGetBackingMemoryResponse,
18814            fdomain_client::fidl::FDomainResourceDialect,
18815        > for (T0,)
18816    {
18817        #[inline]
18818        unsafe fn encode(
18819            self,
18820            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18821            offset: usize,
18822            depth: fidl::encoding::Depth,
18823        ) -> fidl::Result<()> {
18824            encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
18825            // Zero out padding regions. There's no need to apply masks
18826            // because the unmasked parts will be overwritten by fields.
18827            // Write the fields.
18828            self.0.encode(encoder, offset + 0, depth)?;
18829            Ok(())
18830        }
18831    }
18832
18833    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18834        for FileGetBackingMemoryResponse
18835    {
18836        #[inline(always)]
18837        fn new_empty() -> Self {
18838            Self {
18839                vmo: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18840            }
18841        }
18842
18843        #[inline]
18844        unsafe fn decode(
18845            &mut self,
18846            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18847            offset: usize,
18848            _depth: fidl::encoding::Depth,
18849        ) -> fidl::Result<()> {
18850            decoder.debug_check_bounds::<Self>(offset);
18851            // Verify that padding bytes are zero.
18852            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)?;
18853            Ok(())
18854        }
18855    }
18856
18857    impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
18858        type Borrowed<'a> = &'a mut Self;
18859        fn take_or_borrow<'a>(
18860            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18861        ) -> Self::Borrowed<'a> {
18862            value
18863        }
18864    }
18865
18866    unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
18867        type Owned = Self;
18868
18869        #[inline(always)]
18870        fn inline_align(_context: fidl::encoding::Context) -> usize {
18871            8
18872        }
18873
18874        #[inline(always)]
18875        fn inline_size(_context: fidl::encoding::Context) -> usize {
18876            24
18877        }
18878    }
18879
18880    unsafe impl
18881        fidl::encoding::Encode<
18882            LinkableLinkIntoRequest,
18883            fdomain_client::fidl::FDomainResourceDialect,
18884        > for &mut LinkableLinkIntoRequest
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::<LinkableLinkIntoRequest>(offset);
18894            // Delegate to tuple encoding.
18895            fidl::encoding::Encode::<
18896                LinkableLinkIntoRequest,
18897                fdomain_client::fidl::FDomainResourceDialect,
18898            >::encode(
18899                (
18900                    <fidl::encoding::HandleType<
18901                        fdomain_client::Event,
18902                        { fidl::ObjectType::EVENT.into_raw() },
18903                        2147483648,
18904                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18905                        &mut self.dst_parent_token,
18906                    ),
18907                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
18908                        &self.dst,
18909                    ),
18910                ),
18911                encoder,
18912                offset,
18913                _depth,
18914            )
18915        }
18916    }
18917    unsafe impl<
18918        T0: fidl::encoding::Encode<
18919                fidl::encoding::HandleType<
18920                    fdomain_client::Event,
18921                    { fidl::ObjectType::EVENT.into_raw() },
18922                    2147483648,
18923                >,
18924                fdomain_client::fidl::FDomainResourceDialect,
18925            >,
18926        T1: fidl::encoding::Encode<
18927                fidl::encoding::BoundedString<255>,
18928                fdomain_client::fidl::FDomainResourceDialect,
18929            >,
18930    >
18931        fidl::encoding::Encode<
18932            LinkableLinkIntoRequest,
18933            fdomain_client::fidl::FDomainResourceDialect,
18934        > for (T0, T1)
18935    {
18936        #[inline]
18937        unsafe fn encode(
18938            self,
18939            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18940            offset: usize,
18941            depth: fidl::encoding::Depth,
18942        ) -> fidl::Result<()> {
18943            encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
18944            // Zero out padding regions. There's no need to apply masks
18945            // because the unmasked parts will be overwritten by fields.
18946            unsafe {
18947                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18948                (ptr as *mut u64).write_unaligned(0);
18949            }
18950            // Write the fields.
18951            self.0.encode(encoder, offset + 0, depth)?;
18952            self.1.encode(encoder, offset + 8, depth)?;
18953            Ok(())
18954        }
18955    }
18956
18957    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
18958        for LinkableLinkIntoRequest
18959    {
18960        #[inline(always)]
18961        fn new_empty() -> Self {
18962            Self {
18963                dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
18964                dst: fidl::new_empty!(
18965                    fidl::encoding::BoundedString<255>,
18966                    fdomain_client::fidl::FDomainResourceDialect
18967                ),
18968            }
18969        }
18970
18971        #[inline]
18972        unsafe fn decode(
18973            &mut self,
18974            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
18975            offset: usize,
18976            _depth: fidl::encoding::Depth,
18977        ) -> fidl::Result<()> {
18978            decoder.debug_check_bounds::<Self>(offset);
18979            // Verify that padding bytes are zero.
18980            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
18981            let padval = unsafe { (ptr as *const u64).read_unaligned() };
18982            let mask = 0xffffffff00000000u64;
18983            let maskedval = padval & mask;
18984            if maskedval != 0 {
18985                return Err(fidl::Error::NonZeroPadding {
18986                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18987                });
18988            }
18989            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)?;
18990            fidl::decode!(
18991                fidl::encoding::BoundedString<255>,
18992                fdomain_client::fidl::FDomainResourceDialect,
18993                &mut self.dst,
18994                decoder,
18995                offset + 8,
18996                _depth
18997            )?;
18998            Ok(())
18999        }
19000    }
19001
19002    impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
19003        type Borrowed<'a> = &'a mut Self;
19004        fn take_or_borrow<'a>(
19005            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19006        ) -> Self::Borrowed<'a> {
19007            value
19008        }
19009    }
19010
19011    unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
19012        type Owned = Self;
19013
19014        #[inline(always)]
19015        fn inline_align(_context: fidl::encoding::Context) -> usize {
19016            4
19017        }
19018
19019        #[inline(always)]
19020        fn inline_size(_context: fidl::encoding::Context) -> usize {
19021            8
19022        }
19023    }
19024
19025    unsafe impl
19026        fidl::encoding::Encode<
19027            NodeDeprecatedCloneRequest,
19028            fdomain_client::fidl::FDomainResourceDialect,
19029        > for &mut NodeDeprecatedCloneRequest
19030    {
19031        #[inline]
19032        unsafe fn encode(
19033            self,
19034            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19035            offset: usize,
19036            _depth: fidl::encoding::Depth,
19037        ) -> fidl::Result<()> {
19038            encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19039            // Delegate to tuple encoding.
19040            fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19041                (
19042                    <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
19043                    <fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
19044                ),
19045                encoder, offset, _depth
19046            )
19047        }
19048    }
19049    unsafe impl<
19050        T0: fidl::encoding::Encode<OpenFlags, fdomain_client::fidl::FDomainResourceDialect>,
19051        T1: fidl::encoding::Encode<
19052                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19053                fdomain_client::fidl::FDomainResourceDialect,
19054            >,
19055    >
19056        fidl::encoding::Encode<
19057            NodeDeprecatedCloneRequest,
19058            fdomain_client::fidl::FDomainResourceDialect,
19059        > for (T0, T1)
19060    {
19061        #[inline]
19062        unsafe fn encode(
19063            self,
19064            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19065            offset: usize,
19066            depth: fidl::encoding::Depth,
19067        ) -> fidl::Result<()> {
19068            encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
19069            // Zero out padding regions. There's no need to apply masks
19070            // because the unmasked parts will be overwritten by fields.
19071            // Write the fields.
19072            self.0.encode(encoder, offset + 0, depth)?;
19073            self.1.encode(encoder, offset + 4, depth)?;
19074            Ok(())
19075        }
19076    }
19077
19078    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19079        for NodeDeprecatedCloneRequest
19080    {
19081        #[inline(always)]
19082        fn new_empty() -> Self {
19083            Self {
19084                flags: fidl::new_empty!(OpenFlags, fdomain_client::fidl::FDomainResourceDialect),
19085                object: fidl::new_empty!(
19086                    fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19087                    fdomain_client::fidl::FDomainResourceDialect
19088                ),
19089            }
19090        }
19091
19092        #[inline]
19093        unsafe fn decode(
19094            &mut self,
19095            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19096            offset: usize,
19097            _depth: fidl::encoding::Depth,
19098        ) -> fidl::Result<()> {
19099            decoder.debug_check_bounds::<Self>(offset);
19100            // Verify that padding bytes are zero.
19101            fidl::decode!(
19102                OpenFlags,
19103                fdomain_client::fidl::FDomainResourceDialect,
19104                &mut self.flags,
19105                decoder,
19106                offset + 0,
19107                _depth
19108            )?;
19109            fidl::decode!(
19110                fidl::encoding::Endpoint<fdomain_client::fidl::ServerEnd<NodeMarker>>,
19111                fdomain_client::fidl::FDomainResourceDialect,
19112                &mut self.object,
19113                decoder,
19114                offset + 4,
19115                _depth
19116            )?;
19117            Ok(())
19118        }
19119    }
19120
19121    impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
19122        type Borrowed<'a> = &'a mut Self;
19123        fn take_or_borrow<'a>(
19124            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19125        ) -> Self::Borrowed<'a> {
19126            value
19127        }
19128    }
19129
19130    unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
19131        type Owned = Self;
19132
19133        #[inline(always)]
19134        fn inline_align(_context: fidl::encoding::Context) -> usize {
19135            4
19136        }
19137
19138        #[inline(always)]
19139        fn inline_size(_context: fidl::encoding::Context) -> usize {
19140            4
19141        }
19142    }
19143
19144    unsafe impl
19145        fidl::encoding::Encode<
19146            NodeListExtendedAttributesRequest,
19147            fdomain_client::fidl::FDomainResourceDialect,
19148        > for &mut NodeListExtendedAttributesRequest
19149    {
19150        #[inline]
19151        unsafe fn encode(
19152            self,
19153            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19154            offset: usize,
19155            _depth: fidl::encoding::Depth,
19156        ) -> fidl::Result<()> {
19157            encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19158            // Delegate to tuple encoding.
19159            fidl::encoding::Encode::<
19160                NodeListExtendedAttributesRequest,
19161                fdomain_client::fidl::FDomainResourceDialect,
19162            >::encode(
19163                (<fidl::encoding::Endpoint<
19164                    fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19165                > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19166                    &mut self.iterator
19167                ),),
19168                encoder,
19169                offset,
19170                _depth,
19171            )
19172        }
19173    }
19174    unsafe impl<
19175        T0: fidl::encoding::Encode<
19176                fidl::encoding::Endpoint<
19177                    fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19178                >,
19179                fdomain_client::fidl::FDomainResourceDialect,
19180            >,
19181    >
19182        fidl::encoding::Encode<
19183            NodeListExtendedAttributesRequest,
19184            fdomain_client::fidl::FDomainResourceDialect,
19185        > for (T0,)
19186    {
19187        #[inline]
19188        unsafe fn encode(
19189            self,
19190            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19191            offset: usize,
19192            depth: fidl::encoding::Depth,
19193        ) -> fidl::Result<()> {
19194            encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
19195            // Zero out padding regions. There's no need to apply masks
19196            // because the unmasked parts will be overwritten by fields.
19197            // Write the fields.
19198            self.0.encode(encoder, offset + 0, depth)?;
19199            Ok(())
19200        }
19201    }
19202
19203    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19204        for NodeListExtendedAttributesRequest
19205    {
19206        #[inline(always)]
19207        fn new_empty() -> Self {
19208            Self {
19209                iterator: fidl::new_empty!(
19210                    fidl::encoding::Endpoint<
19211                        fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19212                    >,
19213                    fdomain_client::fidl::FDomainResourceDialect
19214                ),
19215            }
19216        }
19217
19218        #[inline]
19219        unsafe fn decode(
19220            &mut self,
19221            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19222            offset: usize,
19223            _depth: fidl::encoding::Depth,
19224        ) -> fidl::Result<()> {
19225            decoder.debug_check_bounds::<Self>(offset);
19226            // Verify that padding bytes are zero.
19227            fidl::decode!(
19228                fidl::encoding::Endpoint<
19229                    fdomain_client::fidl::ServerEnd<ExtendedAttributeIteratorMarker>,
19230                >,
19231                fdomain_client::fidl::FDomainResourceDialect,
19232                &mut self.iterator,
19233                decoder,
19234                offset + 0,
19235                _depth
19236            )?;
19237            Ok(())
19238        }
19239    }
19240
19241    impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
19242        type Borrowed<'a> = &'a mut Self;
19243        fn take_or_borrow<'a>(
19244            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19245        ) -> Self::Borrowed<'a> {
19246            value
19247        }
19248    }
19249
19250    unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
19251        type Owned = Self;
19252
19253        #[inline(always)]
19254        fn inline_align(_context: fidl::encoding::Context) -> usize {
19255            8
19256        }
19257
19258        #[inline(always)]
19259        fn inline_size(_context: fidl::encoding::Context) -> usize {
19260            24
19261        }
19262    }
19263
19264    unsafe impl
19265        fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19266        for &mut NodeOnOpenRequest
19267    {
19268        #[inline]
19269        unsafe fn encode(
19270            self,
19271            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19272            offset: usize,
19273            _depth: fidl::encoding::Depth,
19274        ) -> fidl::Result<()> {
19275            encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19276            // Delegate to tuple encoding.
19277            fidl::encoding::Encode::<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>::encode(
19278                (
19279                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
19280                    <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
19281                ),
19282                encoder, offset, _depth
19283            )
19284        }
19285    }
19286    unsafe impl<
19287        T0: fidl::encoding::Encode<i32, fdomain_client::fidl::FDomainResourceDialect>,
19288        T1: fidl::encoding::Encode<
19289                fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19290                fdomain_client::fidl::FDomainResourceDialect,
19291            >,
19292    > fidl::encoding::Encode<NodeOnOpenRequest, fdomain_client::fidl::FDomainResourceDialect>
19293        for (T0, T1)
19294    {
19295        #[inline]
19296        unsafe fn encode(
19297            self,
19298            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19299            offset: usize,
19300            depth: fidl::encoding::Depth,
19301        ) -> fidl::Result<()> {
19302            encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
19303            // Zero out padding regions. There's no need to apply masks
19304            // because the unmasked parts will be overwritten by fields.
19305            unsafe {
19306                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
19307                (ptr as *mut u64).write_unaligned(0);
19308            }
19309            // Write the fields.
19310            self.0.encode(encoder, offset + 0, depth)?;
19311            self.1.encode(encoder, offset + 8, depth)?;
19312            Ok(())
19313        }
19314    }
19315
19316    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19317        for NodeOnOpenRequest
19318    {
19319        #[inline(always)]
19320        fn new_empty() -> Self {
19321            Self {
19322                s: fidl::new_empty!(i32, fdomain_client::fidl::FDomainResourceDialect),
19323                info: fidl::new_empty!(
19324                    fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19325                    fdomain_client::fidl::FDomainResourceDialect
19326                ),
19327            }
19328        }
19329
19330        #[inline]
19331        unsafe fn decode(
19332            &mut self,
19333            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19334            offset: usize,
19335            _depth: fidl::encoding::Depth,
19336        ) -> fidl::Result<()> {
19337            decoder.debug_check_bounds::<Self>(offset);
19338            // Verify that padding bytes are zero.
19339            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
19340            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19341            let mask = 0xffffffff00000000u64;
19342            let maskedval = padval & mask;
19343            if maskedval != 0 {
19344                return Err(fidl::Error::NonZeroPadding {
19345                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
19346                });
19347            }
19348            fidl::decode!(
19349                i32,
19350                fdomain_client::fidl::FDomainResourceDialect,
19351                &mut self.s,
19352                decoder,
19353                offset + 0,
19354                _depth
19355            )?;
19356            fidl::decode!(
19357                fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
19358                fdomain_client::fidl::FDomainResourceDialect,
19359                &mut self.info,
19360                decoder,
19361                offset + 8,
19362                _depth
19363            )?;
19364            Ok(())
19365        }
19366    }
19367
19368    impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
19369        type Borrowed<'a> = &'a mut Self;
19370        fn take_or_borrow<'a>(
19371            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19372        ) -> Self::Borrowed<'a> {
19373            value
19374        }
19375    }
19376
19377    unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
19378        type Owned = Self;
19379
19380        #[inline(always)]
19381        fn inline_align(_context: fidl::encoding::Context) -> usize {
19382            8
19383        }
19384
19385        #[inline(always)]
19386        fn inline_size(_context: fidl::encoding::Context) -> usize {
19387            40
19388        }
19389    }
19390
19391    unsafe impl
19392        fidl::encoding::Encode<
19393            NodeSetExtendedAttributeRequest,
19394            fdomain_client::fidl::FDomainResourceDialect,
19395        > for &mut NodeSetExtendedAttributeRequest
19396    {
19397        #[inline]
19398        unsafe fn encode(
19399            self,
19400            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19401            offset: usize,
19402            _depth: fidl::encoding::Depth,
19403        ) -> fidl::Result<()> {
19404            encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19405            // Delegate to tuple encoding.
19406            fidl::encoding::Encode::<
19407                NodeSetExtendedAttributeRequest,
19408                fdomain_client::fidl::FDomainResourceDialect,
19409            >::encode(
19410                (
19411                    <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
19412                        &self.name,
19413                    ),
19414                    <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
19415                        &mut self.value,
19416                    ),
19417                    <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
19418                        &self.mode,
19419                    ),
19420                ),
19421                encoder,
19422                offset,
19423                _depth,
19424            )
19425        }
19426    }
19427    unsafe impl<
19428        T0: fidl::encoding::Encode<
19429                fidl::encoding::Vector<u8, 255>,
19430                fdomain_client::fidl::FDomainResourceDialect,
19431            >,
19432        T1: fidl::encoding::Encode<
19433                ExtendedAttributeValue,
19434                fdomain_client::fidl::FDomainResourceDialect,
19435            >,
19436        T2: fidl::encoding::Encode<
19437                SetExtendedAttributeMode,
19438                fdomain_client::fidl::FDomainResourceDialect,
19439            >,
19440    >
19441        fidl::encoding::Encode<
19442            NodeSetExtendedAttributeRequest,
19443            fdomain_client::fidl::FDomainResourceDialect,
19444        > for (T0, T1, T2)
19445    {
19446        #[inline]
19447        unsafe fn encode(
19448            self,
19449            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19450            offset: usize,
19451            depth: fidl::encoding::Depth,
19452        ) -> fidl::Result<()> {
19453            encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
19454            // Zero out padding regions. There's no need to apply masks
19455            // because the unmasked parts will be overwritten by fields.
19456            unsafe {
19457                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
19458                (ptr as *mut u64).write_unaligned(0);
19459            }
19460            // Write the fields.
19461            self.0.encode(encoder, offset + 0, depth)?;
19462            self.1.encode(encoder, offset + 16, depth)?;
19463            self.2.encode(encoder, offset + 32, depth)?;
19464            Ok(())
19465        }
19466    }
19467
19468    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
19469        for NodeSetExtendedAttributeRequest
19470    {
19471        #[inline(always)]
19472        fn new_empty() -> Self {
19473            Self {
19474                name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect),
19475                value: fidl::new_empty!(
19476                    ExtendedAttributeValue,
19477                    fdomain_client::fidl::FDomainResourceDialect
19478                ),
19479                mode: fidl::new_empty!(
19480                    SetExtendedAttributeMode,
19481                    fdomain_client::fidl::FDomainResourceDialect
19482                ),
19483            }
19484        }
19485
19486        #[inline]
19487        unsafe fn decode(
19488            &mut self,
19489            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19490            offset: usize,
19491            _depth: fidl::encoding::Depth,
19492        ) -> fidl::Result<()> {
19493            decoder.debug_check_bounds::<Self>(offset);
19494            // Verify that padding bytes are zero.
19495            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
19496            let padval = unsafe { (ptr as *const u64).read_unaligned() };
19497            let mask = 0xffffffff00000000u64;
19498            let maskedval = padval & mask;
19499            if maskedval != 0 {
19500                return Err(fidl::Error::NonZeroPadding {
19501                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
19502                });
19503            }
19504            fidl::decode!(fidl::encoding::Vector<u8, 255>, fdomain_client::fidl::FDomainResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
19505            fidl::decode!(
19506                ExtendedAttributeValue,
19507                fdomain_client::fidl::FDomainResourceDialect,
19508                &mut self.value,
19509                decoder,
19510                offset + 16,
19511                _depth
19512            )?;
19513            fidl::decode!(
19514                SetExtendedAttributeMode,
19515                fdomain_client::fidl::FDomainResourceDialect,
19516                &mut self.mode,
19517                decoder,
19518                offset + 32,
19519                _depth
19520            )?;
19521            Ok(())
19522        }
19523    }
19524
19525    impl ConnectionInfo {
19526        #[inline(always)]
19527        fn max_ordinal_present(&self) -> u64 {
19528            if let Some(_) = self.rights {
19529                return 1;
19530            }
19531            0
19532        }
19533    }
19534
19535    impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
19536        type Borrowed<'a> = &'a mut Self;
19537        fn take_or_borrow<'a>(
19538            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19539        ) -> Self::Borrowed<'a> {
19540            value
19541        }
19542    }
19543
19544    unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
19545        type Owned = Self;
19546
19547        #[inline(always)]
19548        fn inline_align(_context: fidl::encoding::Context) -> usize {
19549            8
19550        }
19551
19552        #[inline(always)]
19553        fn inline_size(_context: fidl::encoding::Context) -> usize {
19554            16
19555        }
19556    }
19557
19558    unsafe impl fidl::encoding::Encode<ConnectionInfo, fdomain_client::fidl::FDomainResourceDialect>
19559        for &mut ConnectionInfo
19560    {
19561        unsafe fn encode(
19562            self,
19563            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19564            offset: usize,
19565            mut depth: fidl::encoding::Depth,
19566        ) -> fidl::Result<()> {
19567            encoder.debug_check_bounds::<ConnectionInfo>(offset);
19568            // Vector header
19569            let max_ordinal: u64 = self.max_ordinal_present();
19570            encoder.write_num(max_ordinal, offset);
19571            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19572            // Calling encoder.out_of_line_offset(0) is not allowed.
19573            if max_ordinal == 0 {
19574                return Ok(());
19575            }
19576            depth.increment()?;
19577            let envelope_size = 8;
19578            let bytes_len = max_ordinal as usize * envelope_size;
19579            #[allow(unused_variables)]
19580            let offset = encoder.out_of_line_offset(bytes_len);
19581            let mut _prev_end_offset: usize = 0;
19582            if 1 > max_ordinal {
19583                return Ok(());
19584            }
19585
19586            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19587            // are envelope_size bytes.
19588            let cur_offset: usize = (1 - 1) * envelope_size;
19589
19590            // Zero reserved fields.
19591            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19592
19593            // Safety:
19594            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19595            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19596            //   envelope_size bytes, there is always sufficient room.
19597            fidl::encoding::encode_in_envelope_optional::<
19598                Operations,
19599                fdomain_client::fidl::FDomainResourceDialect,
19600            >(
19601                self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
19602                encoder,
19603                offset + cur_offset,
19604                depth,
19605            )?;
19606
19607            _prev_end_offset = cur_offset + envelope_size;
19608
19609            Ok(())
19610        }
19611    }
19612
19613    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for ConnectionInfo {
19614        #[inline(always)]
19615        fn new_empty() -> Self {
19616            Self::default()
19617        }
19618
19619        unsafe fn decode(
19620            &mut self,
19621            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19622            offset: usize,
19623            mut depth: fidl::encoding::Depth,
19624        ) -> fidl::Result<()> {
19625            decoder.debug_check_bounds::<Self>(offset);
19626            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19627                None => return Err(fidl::Error::NotNullable),
19628                Some(len) => len,
19629            };
19630            // Calling decoder.out_of_line_offset(0) is not allowed.
19631            if len == 0 {
19632                return Ok(());
19633            };
19634            depth.increment()?;
19635            let envelope_size = 8;
19636            let bytes_len = len * envelope_size;
19637            let offset = decoder.out_of_line_offset(bytes_len)?;
19638            // Decode the envelope for each type.
19639            let mut _next_ordinal_to_read = 0;
19640            let mut next_offset = offset;
19641            let end_offset = offset + bytes_len;
19642            _next_ordinal_to_read += 1;
19643            if next_offset >= end_offset {
19644                return Ok(());
19645            }
19646
19647            // Decode unknown envelopes for gaps in ordinals.
19648            while _next_ordinal_to_read < 1 {
19649                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19650                _next_ordinal_to_read += 1;
19651                next_offset += envelope_size;
19652            }
19653
19654            let next_out_of_line = decoder.next_out_of_line();
19655            let handles_before = decoder.remaining_handles();
19656            if let Some((inlined, num_bytes, num_handles)) =
19657                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19658            {
19659                let member_inline_size =
19660                    <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19661                if inlined != (member_inline_size <= 4) {
19662                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19663                }
19664                let inner_offset;
19665                let mut inner_depth = depth.clone();
19666                if inlined {
19667                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19668                    inner_offset = next_offset;
19669                } else {
19670                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19671                    inner_depth.increment()?;
19672                }
19673                let val_ref = self.rights.get_or_insert_with(|| {
19674                    fidl::new_empty!(Operations, fdomain_client::fidl::FDomainResourceDialect)
19675                });
19676                fidl::decode!(
19677                    Operations,
19678                    fdomain_client::fidl::FDomainResourceDialect,
19679                    val_ref,
19680                    decoder,
19681                    inner_offset,
19682                    inner_depth
19683                )?;
19684                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19685                {
19686                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19687                }
19688                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19689                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19690                }
19691            }
19692
19693            next_offset += envelope_size;
19694
19695            // Decode the remaining unknown envelopes.
19696            while next_offset < end_offset {
19697                _next_ordinal_to_read += 1;
19698                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19699                next_offset += envelope_size;
19700            }
19701
19702            Ok(())
19703        }
19704    }
19705
19706    impl FileInfo {
19707        #[inline(always)]
19708        fn max_ordinal_present(&self) -> u64 {
19709            if let Some(_) = self.attributes {
19710                return 4;
19711            }
19712            if let Some(_) = self.stream {
19713                return 3;
19714            }
19715            if let Some(_) = self.observer {
19716                return 2;
19717            }
19718            if let Some(_) = self.is_append {
19719                return 1;
19720            }
19721            0
19722        }
19723    }
19724
19725    impl fidl::encoding::ResourceTypeMarker for FileInfo {
19726        type Borrowed<'a> = &'a mut Self;
19727        fn take_or_borrow<'a>(
19728            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
19729        ) -> Self::Borrowed<'a> {
19730            value
19731        }
19732    }
19733
19734    unsafe impl fidl::encoding::TypeMarker for FileInfo {
19735        type Owned = Self;
19736
19737        #[inline(always)]
19738        fn inline_align(_context: fidl::encoding::Context) -> usize {
19739            8
19740        }
19741
19742        #[inline(always)]
19743        fn inline_size(_context: fidl::encoding::Context) -> usize {
19744            16
19745        }
19746    }
19747
19748    unsafe impl fidl::encoding::Encode<FileInfo, fdomain_client::fidl::FDomainResourceDialect>
19749        for &mut FileInfo
19750    {
19751        unsafe fn encode(
19752            self,
19753            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19754            offset: usize,
19755            mut depth: fidl::encoding::Depth,
19756        ) -> fidl::Result<()> {
19757            encoder.debug_check_bounds::<FileInfo>(offset);
19758            // Vector header
19759            let max_ordinal: u64 = self.max_ordinal_present();
19760            encoder.write_num(max_ordinal, offset);
19761            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
19762            // Calling encoder.out_of_line_offset(0) is not allowed.
19763            if max_ordinal == 0 {
19764                return Ok(());
19765            }
19766            depth.increment()?;
19767            let envelope_size = 8;
19768            let bytes_len = max_ordinal as usize * envelope_size;
19769            #[allow(unused_variables)]
19770            let offset = encoder.out_of_line_offset(bytes_len);
19771            let mut _prev_end_offset: usize = 0;
19772            if 1 > max_ordinal {
19773                return Ok(());
19774            }
19775
19776            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19777            // are envelope_size bytes.
19778            let cur_offset: usize = (1 - 1) * envelope_size;
19779
19780            // Zero reserved fields.
19781            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19782
19783            // Safety:
19784            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19785            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19786            //   envelope_size bytes, there is always sufficient room.
19787            fidl::encoding::encode_in_envelope_optional::<
19788                bool,
19789                fdomain_client::fidl::FDomainResourceDialect,
19790            >(
19791                self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
19792                encoder,
19793                offset + cur_offset,
19794                depth,
19795            )?;
19796
19797            _prev_end_offset = cur_offset + envelope_size;
19798            if 2 > max_ordinal {
19799                return Ok(());
19800            }
19801
19802            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19803            // are envelope_size bytes.
19804            let cur_offset: usize = (2 - 1) * envelope_size;
19805
19806            // Zero reserved fields.
19807            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19808
19809            // Safety:
19810            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19811            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19812            //   envelope_size bytes, there is always sufficient room.
19813            fidl::encoding::encode_in_envelope_optional::<
19814                fidl::encoding::HandleType<
19815                    fdomain_client::Event,
19816                    { fidl::ObjectType::EVENT.into_raw() },
19817                    2147483648,
19818                >,
19819                fdomain_client::fidl::FDomainResourceDialect,
19820            >(
19821                self.observer.as_mut().map(
19822                    <fidl::encoding::HandleType<
19823                        fdomain_client::Event,
19824                        { fidl::ObjectType::EVENT.into_raw() },
19825                        2147483648,
19826                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19827                ),
19828                encoder,
19829                offset + cur_offset,
19830                depth,
19831            )?;
19832
19833            _prev_end_offset = cur_offset + envelope_size;
19834            if 3 > max_ordinal {
19835                return Ok(());
19836            }
19837
19838            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19839            // are envelope_size bytes.
19840            let cur_offset: usize = (3 - 1) * envelope_size;
19841
19842            // Zero reserved fields.
19843            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19844
19845            // Safety:
19846            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19847            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19848            //   envelope_size bytes, there is always sufficient room.
19849            fidl::encoding::encode_in_envelope_optional::<
19850                fidl::encoding::HandleType<
19851                    fdomain_client::Stream,
19852                    { fidl::ObjectType::STREAM.into_raw() },
19853                    2147483648,
19854                >,
19855                fdomain_client::fidl::FDomainResourceDialect,
19856            >(
19857                self.stream.as_mut().map(
19858                    <fidl::encoding::HandleType<
19859                        fdomain_client::Stream,
19860                        { fidl::ObjectType::STREAM.into_raw() },
19861                        2147483648,
19862                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
19863                ),
19864                encoder,
19865                offset + cur_offset,
19866                depth,
19867            )?;
19868
19869            _prev_end_offset = cur_offset + envelope_size;
19870            if 4 > max_ordinal {
19871                return Ok(());
19872            }
19873
19874            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
19875            // are envelope_size bytes.
19876            let cur_offset: usize = (4 - 1) * envelope_size;
19877
19878            // Zero reserved fields.
19879            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
19880
19881            // Safety:
19882            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
19883            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
19884            //   envelope_size bytes, there is always sufficient room.
19885            fidl::encoding::encode_in_envelope_optional::<
19886                NodeAttributes2,
19887                fdomain_client::fidl::FDomainResourceDialect,
19888            >(
19889                self.attributes
19890                    .as_ref()
19891                    .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
19892                encoder,
19893                offset + cur_offset,
19894                depth,
19895            )?;
19896
19897            _prev_end_offset = cur_offset + envelope_size;
19898
19899            Ok(())
19900        }
19901    }
19902
19903    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for FileInfo {
19904        #[inline(always)]
19905        fn new_empty() -> Self {
19906            Self::default()
19907        }
19908
19909        unsafe fn decode(
19910            &mut self,
19911            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
19912            offset: usize,
19913            mut depth: fidl::encoding::Depth,
19914        ) -> fidl::Result<()> {
19915            decoder.debug_check_bounds::<Self>(offset);
19916            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
19917                None => return Err(fidl::Error::NotNullable),
19918                Some(len) => len,
19919            };
19920            // Calling decoder.out_of_line_offset(0) is not allowed.
19921            if len == 0 {
19922                return Ok(());
19923            };
19924            depth.increment()?;
19925            let envelope_size = 8;
19926            let bytes_len = len * envelope_size;
19927            let offset = decoder.out_of_line_offset(bytes_len)?;
19928            // Decode the envelope for each type.
19929            let mut _next_ordinal_to_read = 0;
19930            let mut next_offset = offset;
19931            let end_offset = offset + bytes_len;
19932            _next_ordinal_to_read += 1;
19933            if next_offset >= end_offset {
19934                return Ok(());
19935            }
19936
19937            // Decode unknown envelopes for gaps in ordinals.
19938            while _next_ordinal_to_read < 1 {
19939                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19940                _next_ordinal_to_read += 1;
19941                next_offset += envelope_size;
19942            }
19943
19944            let next_out_of_line = decoder.next_out_of_line();
19945            let handles_before = decoder.remaining_handles();
19946            if let Some((inlined, num_bytes, num_handles)) =
19947                fidl::encoding::decode_envelope_header(decoder, next_offset)?
19948            {
19949                let member_inline_size =
19950                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
19951                if inlined != (member_inline_size <= 4) {
19952                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
19953                }
19954                let inner_offset;
19955                let mut inner_depth = depth.clone();
19956                if inlined {
19957                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
19958                    inner_offset = next_offset;
19959                } else {
19960                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19961                    inner_depth.increment()?;
19962                }
19963                let val_ref = self.is_append.get_or_insert_with(|| {
19964                    fidl::new_empty!(bool, fdomain_client::fidl::FDomainResourceDialect)
19965                });
19966                fidl::decode!(
19967                    bool,
19968                    fdomain_client::fidl::FDomainResourceDialect,
19969                    val_ref,
19970                    decoder,
19971                    inner_offset,
19972                    inner_depth
19973                )?;
19974                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
19975                {
19976                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
19977                }
19978                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19979                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19980                }
19981            }
19982
19983            next_offset += envelope_size;
19984            _next_ordinal_to_read += 1;
19985            if next_offset >= end_offset {
19986                return Ok(());
19987            }
19988
19989            // Decode unknown envelopes for gaps in ordinals.
19990            while _next_ordinal_to_read < 2 {
19991                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
19992                _next_ordinal_to_read += 1;
19993                next_offset += envelope_size;
19994            }
19995
19996            let next_out_of_line = decoder.next_out_of_line();
19997            let handles_before = decoder.remaining_handles();
19998            if let Some((inlined, num_bytes, num_handles)) =
19999                fidl::encoding::decode_envelope_header(decoder, next_offset)?
20000            {
20001                let member_inline_size = <fidl::encoding::HandleType<
20002                    fdomain_client::Event,
20003                    { fidl::ObjectType::EVENT.into_raw() },
20004                    2147483648,
20005                > as fidl::encoding::TypeMarker>::inline_size(
20006                    decoder.context
20007                );
20008                if inlined != (member_inline_size <= 4) {
20009                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
20010                }
20011                let inner_offset;
20012                let mut inner_depth = depth.clone();
20013                if inlined {
20014                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20015                    inner_offset = next_offset;
20016                } else {
20017                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20018                    inner_depth.increment()?;
20019                }
20020                let val_ref =
20021                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));
20022                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)?;
20023                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20024                {
20025                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
20026                }
20027                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20028                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20029                }
20030            }
20031
20032            next_offset += envelope_size;
20033            _next_ordinal_to_read += 1;
20034            if next_offset >= end_offset {
20035                return Ok(());
20036            }
20037
20038            // Decode unknown envelopes for gaps in ordinals.
20039            while _next_ordinal_to_read < 3 {
20040                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20041                _next_ordinal_to_read += 1;
20042                next_offset += envelope_size;
20043            }
20044
20045            let next_out_of_line = decoder.next_out_of_line();
20046            let handles_before = decoder.remaining_handles();
20047            if let Some((inlined, num_bytes, num_handles)) =
20048                fidl::encoding::decode_envelope_header(decoder, next_offset)?
20049            {
20050                let member_inline_size = <fidl::encoding::HandleType<
20051                    fdomain_client::Stream,
20052                    { fidl::ObjectType::STREAM.into_raw() },
20053                    2147483648,
20054                > as fidl::encoding::TypeMarker>::inline_size(
20055                    decoder.context
20056                );
20057                if inlined != (member_inline_size <= 4) {
20058                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
20059                }
20060                let inner_offset;
20061                let mut inner_depth = depth.clone();
20062                if inlined {
20063                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20064                    inner_offset = next_offset;
20065                } else {
20066                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20067                    inner_depth.increment()?;
20068                }
20069                let val_ref =
20070                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));
20071                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)?;
20072                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20073                {
20074                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
20075                }
20076                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20077                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20078                }
20079            }
20080
20081            next_offset += envelope_size;
20082            _next_ordinal_to_read += 1;
20083            if next_offset >= end_offset {
20084                return Ok(());
20085            }
20086
20087            // Decode unknown envelopes for gaps in ordinals.
20088            while _next_ordinal_to_read < 4 {
20089                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20090                _next_ordinal_to_read += 1;
20091                next_offset += envelope_size;
20092            }
20093
20094            let next_out_of_line = decoder.next_out_of_line();
20095            let handles_before = decoder.remaining_handles();
20096            if let Some((inlined, num_bytes, num_handles)) =
20097                fidl::encoding::decode_envelope_header(decoder, next_offset)?
20098            {
20099                let member_inline_size =
20100                    <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
20101                if inlined != (member_inline_size <= 4) {
20102                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
20103                }
20104                let inner_offset;
20105                let mut inner_depth = depth.clone();
20106                if inlined {
20107                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
20108                    inner_offset = next_offset;
20109                } else {
20110                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20111                    inner_depth.increment()?;
20112                }
20113                let val_ref = self.attributes.get_or_insert_with(|| {
20114                    fidl::new_empty!(NodeAttributes2, fdomain_client::fidl::FDomainResourceDialect)
20115                });
20116                fidl::decode!(
20117                    NodeAttributes2,
20118                    fdomain_client::fidl::FDomainResourceDialect,
20119                    val_ref,
20120                    decoder,
20121                    inner_offset,
20122                    inner_depth
20123                )?;
20124                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
20125                {
20126                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
20127                }
20128                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20129                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20130                }
20131            }
20132
20133            next_offset += envelope_size;
20134
20135            // Decode the remaining unknown envelopes.
20136            while next_offset < end_offset {
20137                _next_ordinal_to_read += 1;
20138                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
20139                next_offset += envelope_size;
20140            }
20141
20142            Ok(())
20143        }
20144    }
20145
20146    impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
20147        type Borrowed<'a> = &'a mut Self;
20148        fn take_or_borrow<'a>(
20149            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20150        ) -> Self::Borrowed<'a> {
20151            value
20152        }
20153    }
20154
20155    unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
20156        type Owned = Self;
20157
20158        #[inline(always)]
20159        fn inline_align(_context: fidl::encoding::Context) -> usize {
20160            8
20161        }
20162
20163        #[inline(always)]
20164        fn inline_size(_context: fidl::encoding::Context) -> usize {
20165            16
20166        }
20167    }
20168
20169    unsafe impl
20170        fidl::encoding::Encode<ExtendedAttributeValue, fdomain_client::fidl::FDomainResourceDialect>
20171        for &mut ExtendedAttributeValue
20172    {
20173        #[inline]
20174        unsafe fn encode(
20175            self,
20176            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20177            offset: usize,
20178            _depth: fidl::encoding::Depth,
20179        ) -> fidl::Result<()> {
20180            encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
20181            encoder.write_num::<u64>(self.ordinal(), offset);
20182            match self {
20183                ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
20184                    fidl::encoding::Vector<u8, 32768>,
20185                    fdomain_client::fidl::FDomainResourceDialect,
20186                >(
20187                    <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
20188                        val,
20189                    ),
20190                    encoder,
20191                    offset + 8,
20192                    _depth,
20193                ),
20194                ExtendedAttributeValue::Buffer(ref mut val) => {
20195                    fidl::encoding::encode_in_envelope::<
20196                        fidl::encoding::HandleType<
20197                            fdomain_client::Vmo,
20198                            { fidl::ObjectType::VMO.into_raw() },
20199                            2147483648,
20200                        >,
20201                        fdomain_client::fidl::FDomainResourceDialect,
20202                    >(
20203                        <fidl::encoding::HandleType<
20204                            fdomain_client::Vmo,
20205                            { fidl::ObjectType::VMO.into_raw() },
20206                            2147483648,
20207                        > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20208                            val
20209                        ),
20210                        encoder,
20211                        offset + 8,
20212                        _depth,
20213                    )
20214                }
20215                ExtendedAttributeValue::__SourceBreaking { .. } => {
20216                    Err(fidl::Error::UnknownUnionTag)
20217                }
20218            }
20219        }
20220    }
20221
20222    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20223        for ExtendedAttributeValue
20224    {
20225        #[inline(always)]
20226        fn new_empty() -> Self {
20227            Self::__SourceBreaking { unknown_ordinal: 0 }
20228        }
20229
20230        #[inline]
20231        unsafe fn decode(
20232            &mut self,
20233            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20234            offset: usize,
20235            mut depth: fidl::encoding::Depth,
20236        ) -> fidl::Result<()> {
20237            decoder.debug_check_bounds::<Self>(offset);
20238            #[allow(unused_variables)]
20239            let next_out_of_line = decoder.next_out_of_line();
20240            let handles_before = decoder.remaining_handles();
20241            let (ordinal, inlined, num_bytes, num_handles) =
20242                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20243
20244            let member_inline_size = match ordinal {
20245                1 => {
20246                    <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
20247                        decoder.context,
20248                    )
20249                }
20250                2 => <fidl::encoding::HandleType<
20251                    fdomain_client::Vmo,
20252                    { fidl::ObjectType::VMO.into_raw() },
20253                    2147483648,
20254                > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20255                0 => return Err(fidl::Error::UnknownUnionTag),
20256                _ => num_bytes as usize,
20257            };
20258
20259            if inlined != (member_inline_size <= 4) {
20260                return Err(fidl::Error::InvalidInlineBitInEnvelope);
20261            }
20262            let _inner_offset;
20263            if inlined {
20264                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20265                _inner_offset = offset + 8;
20266            } else {
20267                depth.increment()?;
20268                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20269            }
20270            match ordinal {
20271                1 => {
20272                    #[allow(irrefutable_let_patterns)]
20273                    if let ExtendedAttributeValue::Bytes(_) = self {
20274                        // Do nothing, read the value into the object
20275                    } else {
20276                        // Initialize `self` to the right variant
20277                        *self = ExtendedAttributeValue::Bytes(
20278                            fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect),
20279                        );
20280                    }
20281                    #[allow(irrefutable_let_patterns)]
20282                    if let ExtendedAttributeValue::Bytes(ref mut val) = self {
20283                        fidl::decode!(fidl::encoding::Vector<u8, 32768>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20284                    } else {
20285                        unreachable!()
20286                    }
20287                }
20288                2 => {
20289                    #[allow(irrefutable_let_patterns)]
20290                    if let ExtendedAttributeValue::Buffer(_) = self {
20291                        // Do nothing, read the value into the object
20292                    } else {
20293                        // Initialize `self` to the right variant
20294                        *self = ExtendedAttributeValue::Buffer(
20295                            fidl::new_empty!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect),
20296                        );
20297                    }
20298                    #[allow(irrefutable_let_patterns)]
20299                    if let ExtendedAttributeValue::Buffer(ref mut val) = self {
20300                        fidl::decode!(fidl::encoding::HandleType<fdomain_client::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fdomain_client::fidl::FDomainResourceDialect, val, decoder, _inner_offset, depth)?;
20301                    } else {
20302                        unreachable!()
20303                    }
20304                }
20305                #[allow(deprecated)]
20306                ordinal => {
20307                    for _ in 0..num_handles {
20308                        decoder.drop_next_handle()?;
20309                    }
20310                    *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
20311                }
20312            }
20313            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20314                return Err(fidl::Error::InvalidNumBytesInEnvelope);
20315            }
20316            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20317                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20318            }
20319            Ok(())
20320        }
20321    }
20322
20323    impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
20324        type Borrowed<'a> = &'a mut Self;
20325        fn take_or_borrow<'a>(
20326            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20327        ) -> Self::Borrowed<'a> {
20328            value
20329        }
20330    }
20331
20332    unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
20333        type Owned = Self;
20334
20335        #[inline(always)]
20336        fn inline_align(_context: fidl::encoding::Context) -> usize {
20337            8
20338        }
20339
20340        #[inline(always)]
20341        fn inline_size(_context: fidl::encoding::Context) -> usize {
20342            16
20343        }
20344    }
20345
20346    unsafe impl
20347        fidl::encoding::Encode<NodeInfoDeprecated, fdomain_client::fidl::FDomainResourceDialect>
20348        for &mut NodeInfoDeprecated
20349    {
20350        #[inline]
20351        unsafe fn encode(
20352            self,
20353            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20354            offset: usize,
20355            _depth: fidl::encoding::Depth,
20356        ) -> fidl::Result<()> {
20357            encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
20358            encoder.write_num::<u64>(self.ordinal(), offset);
20359            match self {
20360                NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
20361                    Service,
20362                    fdomain_client::fidl::FDomainResourceDialect,
20363                >(
20364                    <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
20365                    encoder,
20366                    offset + 8,
20367                    _depth,
20368                ),
20369                NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20370                    FileObject,
20371                    fdomain_client::fidl::FDomainResourceDialect,
20372                >(
20373                    <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20374                    encoder,
20375                    offset + 8,
20376                    _depth,
20377                ),
20378                NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20379                    DirectoryObject,
20380                    fdomain_client::fidl::FDomainResourceDialect,
20381                >(
20382                    <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20383                    encoder,
20384                    offset + 8,
20385                    _depth,
20386                ),
20387                NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20388                    SymlinkObject,
20389                    fdomain_client::fidl::FDomainResourceDialect,
20390                >(
20391                    <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
20392                    encoder,
20393                    offset + 8,
20394                    _depth,
20395                ),
20396            }
20397        }
20398    }
20399
20400    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect>
20401        for NodeInfoDeprecated
20402    {
20403        #[inline(always)]
20404        fn new_empty() -> Self {
20405            Self::Service(fidl::new_empty!(Service, fdomain_client::fidl::FDomainResourceDialect))
20406        }
20407
20408        #[inline]
20409        unsafe fn decode(
20410            &mut self,
20411            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20412            offset: usize,
20413            mut depth: fidl::encoding::Depth,
20414        ) -> fidl::Result<()> {
20415            decoder.debug_check_bounds::<Self>(offset);
20416            #[allow(unused_variables)]
20417            let next_out_of_line = decoder.next_out_of_line();
20418            let handles_before = decoder.remaining_handles();
20419            let (ordinal, inlined, num_bytes, num_handles) =
20420                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20421
20422            let member_inline_size = match ordinal {
20423                1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20424                2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20425                3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20426                4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20427                _ => return Err(fidl::Error::UnknownUnionTag),
20428            };
20429
20430            if inlined != (member_inline_size <= 4) {
20431                return Err(fidl::Error::InvalidInlineBitInEnvelope);
20432            }
20433            let _inner_offset;
20434            if inlined {
20435                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20436                _inner_offset = offset + 8;
20437            } else {
20438                depth.increment()?;
20439                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20440            }
20441            match ordinal {
20442                1 => {
20443                    #[allow(irrefutable_let_patterns)]
20444                    if let NodeInfoDeprecated::Service(_) = self {
20445                        // Do nothing, read the value into the object
20446                    } else {
20447                        // Initialize `self` to the right variant
20448                        *self = NodeInfoDeprecated::Service(fidl::new_empty!(
20449                            Service,
20450                            fdomain_client::fidl::FDomainResourceDialect
20451                        ));
20452                    }
20453                    #[allow(irrefutable_let_patterns)]
20454                    if let NodeInfoDeprecated::Service(ref mut val) = self {
20455                        fidl::decode!(
20456                            Service,
20457                            fdomain_client::fidl::FDomainResourceDialect,
20458                            val,
20459                            decoder,
20460                            _inner_offset,
20461                            depth
20462                        )?;
20463                    } else {
20464                        unreachable!()
20465                    }
20466                }
20467                2 => {
20468                    #[allow(irrefutable_let_patterns)]
20469                    if let NodeInfoDeprecated::File(_) = self {
20470                        // Do nothing, read the value into the object
20471                    } else {
20472                        // Initialize `self` to the right variant
20473                        *self = NodeInfoDeprecated::File(fidl::new_empty!(
20474                            FileObject,
20475                            fdomain_client::fidl::FDomainResourceDialect
20476                        ));
20477                    }
20478                    #[allow(irrefutable_let_patterns)]
20479                    if let NodeInfoDeprecated::File(ref mut val) = self {
20480                        fidl::decode!(
20481                            FileObject,
20482                            fdomain_client::fidl::FDomainResourceDialect,
20483                            val,
20484                            decoder,
20485                            _inner_offset,
20486                            depth
20487                        )?;
20488                    } else {
20489                        unreachable!()
20490                    }
20491                }
20492                3 => {
20493                    #[allow(irrefutable_let_patterns)]
20494                    if let NodeInfoDeprecated::Directory(_) = self {
20495                        // Do nothing, read the value into the object
20496                    } else {
20497                        // Initialize `self` to the right variant
20498                        *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
20499                            DirectoryObject,
20500                            fdomain_client::fidl::FDomainResourceDialect
20501                        ));
20502                    }
20503                    #[allow(irrefutable_let_patterns)]
20504                    if let NodeInfoDeprecated::Directory(ref mut val) = self {
20505                        fidl::decode!(
20506                            DirectoryObject,
20507                            fdomain_client::fidl::FDomainResourceDialect,
20508                            val,
20509                            decoder,
20510                            _inner_offset,
20511                            depth
20512                        )?;
20513                    } else {
20514                        unreachable!()
20515                    }
20516                }
20517                4 => {
20518                    #[allow(irrefutable_let_patterns)]
20519                    if let NodeInfoDeprecated::Symlink(_) = self {
20520                        // Do nothing, read the value into the object
20521                    } else {
20522                        // Initialize `self` to the right variant
20523                        *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
20524                            SymlinkObject,
20525                            fdomain_client::fidl::FDomainResourceDialect
20526                        ));
20527                    }
20528                    #[allow(irrefutable_let_patterns)]
20529                    if let NodeInfoDeprecated::Symlink(ref mut val) = self {
20530                        fidl::decode!(
20531                            SymlinkObject,
20532                            fdomain_client::fidl::FDomainResourceDialect,
20533                            val,
20534                            decoder,
20535                            _inner_offset,
20536                            depth
20537                        )?;
20538                    } else {
20539                        unreachable!()
20540                    }
20541                }
20542                ordinal => panic!("unexpected ordinal {:?}", ordinal),
20543            }
20544            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20545                return Err(fidl::Error::InvalidNumBytesInEnvelope);
20546            }
20547            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20548                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20549            }
20550            Ok(())
20551        }
20552    }
20553
20554    impl fidl::encoding::ResourceTypeMarker for Representation {
20555        type Borrowed<'a> = &'a mut Self;
20556        fn take_or_borrow<'a>(
20557            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20558        ) -> Self::Borrowed<'a> {
20559            value
20560        }
20561    }
20562
20563    unsafe impl fidl::encoding::TypeMarker for Representation {
20564        type Owned = Self;
20565
20566        #[inline(always)]
20567        fn inline_align(_context: fidl::encoding::Context) -> usize {
20568            8
20569        }
20570
20571        #[inline(always)]
20572        fn inline_size(_context: fidl::encoding::Context) -> usize {
20573            16
20574        }
20575    }
20576
20577    unsafe impl fidl::encoding::Encode<Representation, fdomain_client::fidl::FDomainResourceDialect>
20578        for &mut Representation
20579    {
20580        #[inline]
20581        unsafe fn encode(
20582            self,
20583            encoder: &mut fidl::encoding::Encoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20584            offset: usize,
20585            _depth: fidl::encoding::Depth,
20586        ) -> fidl::Result<()> {
20587            encoder.debug_check_bounds::<Representation>(offset);
20588            encoder.write_num::<u64>(self.ordinal(), offset);
20589            match self {
20590                Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
20591                    NodeInfo,
20592                    fdomain_client::fidl::FDomainResourceDialect,
20593                >(
20594                    <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20595                    encoder,
20596                    offset + 8,
20597                    _depth,
20598                ),
20599                Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
20600                    DirectoryInfo,
20601                    fdomain_client::fidl::FDomainResourceDialect,
20602                >(
20603                    <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20604                    encoder,
20605                    offset + 8,
20606                    _depth,
20607                ),
20608                Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
20609                    FileInfo,
20610                    fdomain_client::fidl::FDomainResourceDialect,
20611                >(
20612                    <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
20613                    encoder,
20614                    offset + 8,
20615                    _depth,
20616                ),
20617                Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
20618                    SymlinkInfo,
20619                    fdomain_client::fidl::FDomainResourceDialect,
20620                >(
20621                    <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
20622                    encoder,
20623                    offset + 8,
20624                    _depth,
20625                ),
20626                Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
20627            }
20628        }
20629    }
20630
20631    impl fidl::encoding::Decode<Self, fdomain_client::fidl::FDomainResourceDialect> for Representation {
20632        #[inline(always)]
20633        fn new_empty() -> Self {
20634            Self::__SourceBreaking { unknown_ordinal: 0 }
20635        }
20636
20637        #[inline]
20638        unsafe fn decode(
20639            &mut self,
20640            decoder: &mut fidl::encoding::Decoder<'_, fdomain_client::fidl::FDomainResourceDialect>,
20641            offset: usize,
20642            mut depth: fidl::encoding::Depth,
20643        ) -> fidl::Result<()> {
20644            decoder.debug_check_bounds::<Self>(offset);
20645            #[allow(unused_variables)]
20646            let next_out_of_line = decoder.next_out_of_line();
20647            let handles_before = decoder.remaining_handles();
20648            let (ordinal, inlined, num_bytes, num_handles) =
20649                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
20650
20651            let member_inline_size = match ordinal {
20652                1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20653                2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20654                3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20655                4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
20656                0 => return Err(fidl::Error::UnknownUnionTag),
20657                _ => num_bytes as usize,
20658            };
20659
20660            if inlined != (member_inline_size <= 4) {
20661                return Err(fidl::Error::InvalidInlineBitInEnvelope);
20662            }
20663            let _inner_offset;
20664            if inlined {
20665                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
20666                _inner_offset = offset + 8;
20667            } else {
20668                depth.increment()?;
20669                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
20670            }
20671            match ordinal {
20672                1 => {
20673                    #[allow(irrefutable_let_patterns)]
20674                    if let Representation::Node(_) = self {
20675                        // Do nothing, read the value into the object
20676                    } else {
20677                        // Initialize `self` to the right variant
20678                        *self = Representation::Node(fidl::new_empty!(
20679                            NodeInfo,
20680                            fdomain_client::fidl::FDomainResourceDialect
20681                        ));
20682                    }
20683                    #[allow(irrefutable_let_patterns)]
20684                    if let Representation::Node(ref mut val) = self {
20685                        fidl::decode!(
20686                            NodeInfo,
20687                            fdomain_client::fidl::FDomainResourceDialect,
20688                            val,
20689                            decoder,
20690                            _inner_offset,
20691                            depth
20692                        )?;
20693                    } else {
20694                        unreachable!()
20695                    }
20696                }
20697                2 => {
20698                    #[allow(irrefutable_let_patterns)]
20699                    if let Representation::Directory(_) = self {
20700                        // Do nothing, read the value into the object
20701                    } else {
20702                        // Initialize `self` to the right variant
20703                        *self = Representation::Directory(fidl::new_empty!(
20704                            DirectoryInfo,
20705                            fdomain_client::fidl::FDomainResourceDialect
20706                        ));
20707                    }
20708                    #[allow(irrefutable_let_patterns)]
20709                    if let Representation::Directory(ref mut val) = self {
20710                        fidl::decode!(
20711                            DirectoryInfo,
20712                            fdomain_client::fidl::FDomainResourceDialect,
20713                            val,
20714                            decoder,
20715                            _inner_offset,
20716                            depth
20717                        )?;
20718                    } else {
20719                        unreachable!()
20720                    }
20721                }
20722                3 => {
20723                    #[allow(irrefutable_let_patterns)]
20724                    if let Representation::File(_) = self {
20725                        // Do nothing, read the value into the object
20726                    } else {
20727                        // Initialize `self` to the right variant
20728                        *self = Representation::File(fidl::new_empty!(
20729                            FileInfo,
20730                            fdomain_client::fidl::FDomainResourceDialect
20731                        ));
20732                    }
20733                    #[allow(irrefutable_let_patterns)]
20734                    if let Representation::File(ref mut val) = self {
20735                        fidl::decode!(
20736                            FileInfo,
20737                            fdomain_client::fidl::FDomainResourceDialect,
20738                            val,
20739                            decoder,
20740                            _inner_offset,
20741                            depth
20742                        )?;
20743                    } else {
20744                        unreachable!()
20745                    }
20746                }
20747                4 => {
20748                    #[allow(irrefutable_let_patterns)]
20749                    if let Representation::Symlink(_) = self {
20750                        // Do nothing, read the value into the object
20751                    } else {
20752                        // Initialize `self` to the right variant
20753                        *self = Representation::Symlink(fidl::new_empty!(
20754                            SymlinkInfo,
20755                            fdomain_client::fidl::FDomainResourceDialect
20756                        ));
20757                    }
20758                    #[allow(irrefutable_let_patterns)]
20759                    if let Representation::Symlink(ref mut val) = self {
20760                        fidl::decode!(
20761                            SymlinkInfo,
20762                            fdomain_client::fidl::FDomainResourceDialect,
20763                            val,
20764                            decoder,
20765                            _inner_offset,
20766                            depth
20767                        )?;
20768                    } else {
20769                        unreachable!()
20770                    }
20771                }
20772                #[allow(deprecated)]
20773                ordinal => {
20774                    for _ in 0..num_handles {
20775                        decoder.drop_next_handle()?;
20776                    }
20777                    *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
20778                }
20779            }
20780            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
20781                return Err(fidl::Error::InvalidNumBytesInEnvelope);
20782            }
20783            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
20784                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
20785            }
20786            Ok(())
20787        }
20788    }
20789}