fidl_next_fuchsia_io/
fidl_next_fuchsia_io.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5::fidl_next::bitflags! {
6    #[doc = " The common members definition behind [`Rights`] and [`Abilities`]. Some operations may apply\n only to certain node types (e.g. [`Operations.MODIFY_DIRECTORY`] only applies to directories).\n"]#[derive(
7        Clone,
8        Copy,
9        Debug,
10        PartialEq,
11        Eq,
12        Hash,
13    )]
14    pub struct Operations: u64 {
15        #[doc = " Connecting to a service in a directory.\n"]const CONNECT = 1;
16        #[doc = " Read byte contents of a node or its children.\n"]const READ_BYTES = 2;
17        #[doc = " Writing to the byte contents of a node or its children.\n"]const WRITE_BYTES = 4;
18        #[doc = " Execute the byte contents of a node or its children.\n"]const EXECUTE = 8;
19        #[doc = " Reading the attributes of a node and/or its children.\n"]const GET_ATTRIBUTES = 16;
20        #[doc = " Updating the attributes of a node and/or its children.\n"]const UPDATE_ATTRIBUTES = 32;
21        #[doc = " Reading the list of nodes in a directory.\n"]const ENUMERATE = 64;
22        #[doc = " Opening a node from a directory. Must be specified with [`Rights.ENUMERATE`], as directory\n contents can be probed by opening children.\n"]const TRAVERSE = 128;
23        #[doc = " Modifying the list of nodes in a directory, e.g. creating, renaming, link/unlink, etc...\n Must be specified with [`Rights.ENUMERATE`], as directory contents can be probed via name\n conflicts during node creation.\n"]const MODIFY_DIRECTORY = 256;
24
25    }
26}
27
28impl ::fidl_next::Encodable for Operations {
29    type Encoded = WireOperations;
30}
31
32unsafe impl<___E> ::fidl_next::Encode<___E> for Operations
33where
34    ___E: ?Sized,
35{
36    #[inline]
37    fn encode(
38        self,
39        encoder: &mut ___E,
40        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
41    ) -> Result<(), ::fidl_next::EncodeError> {
42        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
43    }
44}
45
46unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Operations
47where
48    ___E: ?Sized,
49{
50    #[inline]
51    fn encode_ref(
52        &self,
53        _: &mut ___E,
54        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
55    ) -> Result<(), ::fidl_next::EncodeError> {
56        ::fidl_next::munge!(let WireOperations { value } = out);
57        let _ = value.write(::fidl_next::WireU64::from(self.bits()));
58        Ok(())
59    }
60}
61
62impl ::core::convert::From<WireOperations> for Operations {
63    fn from(wire: WireOperations) -> Self {
64        Self::from_bits_retain(u64::from(wire.value))
65    }
66}
67
68impl ::fidl_next::FromWire<WireOperations> for Operations {
69    #[inline]
70    fn from_wire(wire: WireOperations) -> Self {
71        Self::from(wire)
72    }
73}
74
75impl ::fidl_next::FromWireRef<WireOperations> for Operations {
76    #[inline]
77    fn from_wire_ref(wire: &WireOperations) -> Self {
78        Self::from(*wire)
79    }
80}
81
82/// The wire type corresponding to [`Operations`].
83#[derive(Clone, Copy, Debug)]
84#[repr(transparent)]
85pub struct WireOperations {
86    value: ::fidl_next::WireU64,
87}
88
89unsafe impl ::fidl_next::Wire for WireOperations {
90    type Decoded<'de> = Self;
91
92    #[inline]
93    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
94        // Wire bits have no padding
95    }
96}
97
98unsafe impl<___D> ::fidl_next::Decode<___D> for WireOperations
99where
100    ___D: ?Sized,
101{
102    fn decode(
103        slot: ::fidl_next::Slot<'_, Self>,
104        _: &mut ___D,
105    ) -> Result<(), ::fidl_next::DecodeError> {
106        ::fidl_next::munge!(let Self { value } = slot);
107        let set = u64::from(*value);
108        if set & !Operations::all().bits() != 0 {
109            return Err(::fidl_next::DecodeError::InvalidBits {
110                expected: Operations::all().bits() as usize,
111                actual: set as usize,
112            });
113        }
114
115        Ok(())
116    }
117}
118
119impl ::core::convert::From<Operations> for WireOperations {
120    fn from(natural: Operations) -> Self {
121        Self { value: ::fidl_next::WireU64::from(natural.bits()) }
122    }
123}
124
125#[doc = " Abilities are properties intrinsic to a node. They specify which operations are supported by it.\n\n Invoking an operation on a node that does not support it results in `ZX_ERR_NOT_SUPPORTED`.\n Note `ZX_ERR_ACCESS_DENIED` takes precedence over `ZX_ERR_NOT_SUPPORTED` when both apply.\n"]
126pub type Abilities = crate::Operations;
127
128/// The wire type corresponding to [`Abilities`].
129pub type WireAbilities = crate::WireOperations;
130
131#[doc = " The reference point for updating the seek offset. See [`File.Seek`].\n\n This enum matches the `zx_stream_seek_origin_t` enum.\n"]
132#[derive(Clone, Copy, Debug, PartialEq, Eq)]
133#[repr(u32)]
134pub enum SeekOrigin {
135    Start = 0,
136    Current = 1,
137    End = 2,
138}
139
140impl ::fidl_next::Encodable for SeekOrigin {
141    type Encoded = WireSeekOrigin;
142}
143impl ::std::convert::TryFrom<u32> for SeekOrigin {
144    type Error = ::fidl_next::UnknownStrictEnumMemberError;
145    fn try_from(value: u32) -> Result<Self, Self::Error> {
146        match value {
147            0 => Ok(Self::Start),
148            1 => Ok(Self::Current),
149            2 => Ok(Self::End),
150
151            _ => Err(Self::Error::new(value.into())),
152        }
153    }
154}
155
156unsafe impl<___E> ::fidl_next::Encode<___E> for SeekOrigin
157where
158    ___E: ?Sized,
159{
160    #[inline]
161    fn encode(
162        self,
163        encoder: &mut ___E,
164        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
165    ) -> Result<(), ::fidl_next::EncodeError> {
166        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
167    }
168}
169
170unsafe impl<___E> ::fidl_next::EncodeRef<___E> for SeekOrigin
171where
172    ___E: ?Sized,
173{
174    #[inline]
175    fn encode_ref(
176        &self,
177        encoder: &mut ___E,
178        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
179    ) -> Result<(), ::fidl_next::EncodeError> {
180        ::fidl_next::munge!(let WireSeekOrigin { value } = out);
181        let _ = value.write(::fidl_next::WireU32::from(match *self {
182            Self::Start => 0,
183
184            Self::Current => 1,
185
186            Self::End => 2,
187        }));
188
189        Ok(())
190    }
191}
192
193impl ::core::convert::From<WireSeekOrigin> for SeekOrigin {
194    fn from(wire: WireSeekOrigin) -> Self {
195        match u32::from(wire.value) {
196            0 => Self::Start,
197
198            1 => Self::Current,
199
200            2 => Self::End,
201
202            _ => unsafe { ::core::hint::unreachable_unchecked() },
203        }
204    }
205}
206
207impl ::fidl_next::FromWire<WireSeekOrigin> for SeekOrigin {
208    #[inline]
209    fn from_wire(wire: WireSeekOrigin) -> Self {
210        Self::from(wire)
211    }
212}
213
214impl ::fidl_next::FromWireRef<WireSeekOrigin> for SeekOrigin {
215    #[inline]
216    fn from_wire_ref(wire: &WireSeekOrigin) -> Self {
217        Self::from(*wire)
218    }
219}
220
221/// The wire type corresponding to [`SeekOrigin`].
222#[derive(Clone, Copy, Debug, PartialEq, Eq)]
223#[repr(transparent)]
224pub struct WireSeekOrigin {
225    value: ::fidl_next::WireU32,
226}
227
228unsafe impl ::fidl_next::Wire for WireSeekOrigin {
229    type Decoded<'de> = Self;
230
231    #[inline]
232    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
233        // Wire enums have no padding
234    }
235}
236
237impl WireSeekOrigin {
238    pub const START: WireSeekOrigin = WireSeekOrigin { value: ::fidl_next::WireU32(0) };
239
240    pub const CURRENT: WireSeekOrigin = WireSeekOrigin { value: ::fidl_next::WireU32(1) };
241
242    pub const END: WireSeekOrigin = WireSeekOrigin { value: ::fidl_next::WireU32(2) };
243}
244
245unsafe impl<___D> ::fidl_next::Decode<___D> for WireSeekOrigin
246where
247    ___D: ?Sized,
248{
249    fn decode(
250        slot: ::fidl_next::Slot<'_, Self>,
251        _: &mut ___D,
252    ) -> Result<(), ::fidl_next::DecodeError> {
253        ::fidl_next::munge!(let Self { value } = slot);
254
255        match u32::from(*value) {
256            0 | 1 | 2 => (),
257            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
258        }
259
260        Ok(())
261    }
262}
263
264impl ::core::convert::From<SeekOrigin> for WireSeekOrigin {
265    fn from(natural: SeekOrigin) -> Self {
266        match natural {
267            SeekOrigin::Start => WireSeekOrigin::START,
268
269            SeekOrigin::Current => WireSeekOrigin::CURRENT,
270
271            SeekOrigin::End => WireSeekOrigin::END,
272        }
273    }
274}
275
276#[derive(Clone, Debug)]
277pub struct AdvisoryLockRange {
278    pub origin: crate::SeekOrigin,
279
280    pub offset: i64,
281
282    pub length: i64,
283}
284
285impl ::fidl_next::Encodable for AdvisoryLockRange {
286    type Encoded = WireAdvisoryLockRange;
287}
288
289unsafe impl<___E> ::fidl_next::Encode<___E> for AdvisoryLockRange
290where
291    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
292{
293    #[inline]
294    fn encode(
295        self,
296        encoder: &mut ___E,
297        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
298    ) -> Result<(), ::fidl_next::EncodeError> {
299        ::fidl_next::munge! {
300            let Self::Encoded {
301                origin,
302                offset,
303                length,
304
305            } = out;
306        }
307
308        ::fidl_next::Encode::encode(self.origin, encoder, origin)?;
309
310        ::fidl_next::Encode::encode(self.offset, encoder, offset)?;
311
312        ::fidl_next::Encode::encode(self.length, encoder, length)?;
313
314        Ok(())
315    }
316}
317
318unsafe impl<___E> ::fidl_next::EncodeRef<___E> for AdvisoryLockRange
319where
320    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
321{
322    #[inline]
323    fn encode_ref(
324        &self,
325        encoder: &mut ___E,
326        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
327    ) -> Result<(), ::fidl_next::EncodeError> {
328        ::fidl_next::munge! {
329            let Self::Encoded {
330                origin,
331                offset,
332                length,
333
334            } = out;
335        }
336
337        ::fidl_next::EncodeRef::encode_ref(&self.origin, encoder, origin)?;
338
339        ::fidl_next::EncodeRef::encode_ref(&self.offset, encoder, offset)?;
340
341        ::fidl_next::EncodeRef::encode_ref(&self.length, encoder, length)?;
342
343        Ok(())
344    }
345}
346
347impl ::fidl_next::EncodableOption for AdvisoryLockRange {
348    type EncodedOption = ::fidl_next::WireBox<'static, WireAdvisoryLockRange>;
349}
350
351unsafe impl<___E> ::fidl_next::EncodeOption<___E> for AdvisoryLockRange
352where
353    ___E: ::fidl_next::Encoder + ?Sized,
354    AdvisoryLockRange: ::fidl_next::Encode<___E>,
355{
356    #[inline]
357    fn encode_option(
358        this: Option<Self>,
359        encoder: &mut ___E,
360        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
361    ) -> Result<(), ::fidl_next::EncodeError> {
362        if let Some(inner) = this {
363            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
364            ::fidl_next::WireBox::encode_present(out);
365        } else {
366            ::fidl_next::WireBox::encode_absent(out);
367        }
368
369        Ok(())
370    }
371}
372
373unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for AdvisoryLockRange
374where
375    ___E: ::fidl_next::Encoder + ?Sized,
376    AdvisoryLockRange: ::fidl_next::EncodeRef<___E>,
377{
378    #[inline]
379    fn encode_option_ref(
380        this: Option<&Self>,
381        encoder: &mut ___E,
382        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
383    ) -> Result<(), ::fidl_next::EncodeError> {
384        if let Some(inner) = this {
385            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
386            ::fidl_next::WireBox::encode_present(out);
387        } else {
388            ::fidl_next::WireBox::encode_absent(out);
389        }
390
391        Ok(())
392    }
393}
394
395impl ::fidl_next::FromWire<WireAdvisoryLockRange> for AdvisoryLockRange {
396    #[inline]
397    fn from_wire(wire: WireAdvisoryLockRange) -> Self {
398        Self {
399            origin: ::fidl_next::FromWire::from_wire(wire.origin),
400
401            offset: ::fidl_next::FromWire::from_wire(wire.offset),
402
403            length: ::fidl_next::FromWire::from_wire(wire.length),
404        }
405    }
406}
407
408impl ::fidl_next::FromWireRef<WireAdvisoryLockRange> for AdvisoryLockRange {
409    #[inline]
410    fn from_wire_ref(wire: &WireAdvisoryLockRange) -> Self {
411        Self {
412            origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
413
414            offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
415
416            length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length),
417        }
418    }
419}
420
421/// The wire type corresponding to [`AdvisoryLockRange`].
422#[derive(Clone, Debug)]
423#[repr(C)]
424pub struct WireAdvisoryLockRange {
425    pub origin: crate::WireSeekOrigin,
426
427    pub offset: ::fidl_next::WireI64,
428
429    pub length: ::fidl_next::WireI64,
430}
431
432unsafe impl ::fidl_next::Wire for WireAdvisoryLockRange {
433    type Decoded<'de> = WireAdvisoryLockRange;
434
435    #[inline]
436    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
437        unsafe {
438            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
439        }
440    }
441}
442
443unsafe impl<___D> ::fidl_next::Decode<___D> for WireAdvisoryLockRange
444where
445    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
446{
447    fn decode(
448        slot: ::fidl_next::Slot<'_, Self>,
449        decoder: &mut ___D,
450    ) -> Result<(), ::fidl_next::DecodeError> {
451        ::fidl_next::munge! {
452            let Self {
453                mut origin,
454                mut offset,
455                mut length,
456
457            } = slot;
458        }
459
460        ::fidl_next::Decode::decode(origin.as_mut(), decoder)?;
461
462        ::fidl_next::Decode::decode(offset.as_mut(), decoder)?;
463
464        ::fidl_next::Decode::decode(length.as_mut(), decoder)?;
465
466        Ok(())
467    }
468}
469
470#[derive(Clone, Copy, Debug, PartialEq, Eq)]
471#[repr(u32)]
472pub enum AdvisoryLockType {
473    Read = 1,
474    Write = 2,
475    Unlock = 3,
476}
477
478impl ::fidl_next::Encodable for AdvisoryLockType {
479    type Encoded = WireAdvisoryLockType;
480}
481impl ::std::convert::TryFrom<u32> for AdvisoryLockType {
482    type Error = ::fidl_next::UnknownStrictEnumMemberError;
483    fn try_from(value: u32) -> Result<Self, Self::Error> {
484        match value {
485            1 => Ok(Self::Read),
486            2 => Ok(Self::Write),
487            3 => Ok(Self::Unlock),
488
489            _ => Err(Self::Error::new(value.into())),
490        }
491    }
492}
493
494unsafe impl<___E> ::fidl_next::Encode<___E> for AdvisoryLockType
495where
496    ___E: ?Sized,
497{
498    #[inline]
499    fn encode(
500        self,
501        encoder: &mut ___E,
502        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
503    ) -> Result<(), ::fidl_next::EncodeError> {
504        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
505    }
506}
507
508unsafe impl<___E> ::fidl_next::EncodeRef<___E> for AdvisoryLockType
509where
510    ___E: ?Sized,
511{
512    #[inline]
513    fn encode_ref(
514        &self,
515        encoder: &mut ___E,
516        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
517    ) -> Result<(), ::fidl_next::EncodeError> {
518        ::fidl_next::munge!(let WireAdvisoryLockType { value } = out);
519        let _ = value.write(::fidl_next::WireU32::from(match *self {
520            Self::Read => 1,
521
522            Self::Write => 2,
523
524            Self::Unlock => 3,
525        }));
526
527        Ok(())
528    }
529}
530
531impl ::core::convert::From<WireAdvisoryLockType> for AdvisoryLockType {
532    fn from(wire: WireAdvisoryLockType) -> Self {
533        match u32::from(wire.value) {
534            1 => Self::Read,
535
536            2 => Self::Write,
537
538            3 => Self::Unlock,
539
540            _ => unsafe { ::core::hint::unreachable_unchecked() },
541        }
542    }
543}
544
545impl ::fidl_next::FromWire<WireAdvisoryLockType> for AdvisoryLockType {
546    #[inline]
547    fn from_wire(wire: WireAdvisoryLockType) -> Self {
548        Self::from(wire)
549    }
550}
551
552impl ::fidl_next::FromWireRef<WireAdvisoryLockType> for AdvisoryLockType {
553    #[inline]
554    fn from_wire_ref(wire: &WireAdvisoryLockType) -> Self {
555        Self::from(*wire)
556    }
557}
558
559/// The wire type corresponding to [`AdvisoryLockType`].
560#[derive(Clone, Copy, Debug, PartialEq, Eq)]
561#[repr(transparent)]
562pub struct WireAdvisoryLockType {
563    value: ::fidl_next::WireU32,
564}
565
566unsafe impl ::fidl_next::Wire for WireAdvisoryLockType {
567    type Decoded<'de> = Self;
568
569    #[inline]
570    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
571        // Wire enums have no padding
572    }
573}
574
575impl WireAdvisoryLockType {
576    pub const READ: WireAdvisoryLockType = WireAdvisoryLockType { value: ::fidl_next::WireU32(1) };
577
578    pub const WRITE: WireAdvisoryLockType = WireAdvisoryLockType { value: ::fidl_next::WireU32(2) };
579
580    pub const UNLOCK: WireAdvisoryLockType =
581        WireAdvisoryLockType { value: ::fidl_next::WireU32(3) };
582}
583
584unsafe impl<___D> ::fidl_next::Decode<___D> for WireAdvisoryLockType
585where
586    ___D: ?Sized,
587{
588    fn decode(
589        slot: ::fidl_next::Slot<'_, Self>,
590        _: &mut ___D,
591    ) -> Result<(), ::fidl_next::DecodeError> {
592        ::fidl_next::munge!(let Self { value } = slot);
593
594        match u32::from(*value) {
595            1 | 2 | 3 => (),
596            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
597        }
598
599        Ok(())
600    }
601}
602
603impl ::core::convert::From<AdvisoryLockType> for WireAdvisoryLockType {
604    fn from(natural: AdvisoryLockType) -> Self {
605        match natural {
606            AdvisoryLockType::Read => WireAdvisoryLockType::READ,
607
608            AdvisoryLockType::Write => WireAdvisoryLockType::WRITE,
609
610            AdvisoryLockType::Unlock => WireAdvisoryLockType::UNLOCK,
611        }
612    }
613}
614
615#[derive(Clone, Debug, Default)]
616pub struct AdvisoryLockRequest {
617    pub type_: Option<crate::AdvisoryLockType>,
618
619    pub range: Option<crate::AdvisoryLockRange>,
620
621    pub wait: Option<bool>,
622}
623
624impl AdvisoryLockRequest {
625    fn __max_ordinal(&self) -> usize {
626        if self.wait.is_some() {
627            return 3;
628        }
629
630        if self.range.is_some() {
631            return 2;
632        }
633
634        if self.type_.is_some() {
635            return 1;
636        }
637
638        0
639    }
640}
641
642impl ::fidl_next::Encodable for AdvisoryLockRequest {
643    type Encoded = WireAdvisoryLockRequest<'static>;
644}
645
646unsafe impl<___E> ::fidl_next::Encode<___E> for AdvisoryLockRequest
647where
648    ___E: ::fidl_next::Encoder + ?Sized,
649{
650    #[inline]
651    fn encode(
652        mut self,
653        encoder: &mut ___E,
654        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
655    ) -> Result<(), ::fidl_next::EncodeError> {
656        ::fidl_next::munge!(let WireAdvisoryLockRequest { table } = out);
657
658        let max_ord = self.__max_ordinal();
659
660        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
661        ::fidl_next::Wire::zero_padding(&mut out);
662
663        let mut preallocated =
664            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
665
666        for i in 1..=max_ord {
667            match i {
668                3 => {
669                    if let Some(wait) = self.wait.take() {
670                        ::fidl_next::WireEnvelope::encode_value(
671                            wait,
672                            preallocated.encoder,
673                            &mut out,
674                        )?;
675                    } else {
676                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
677                    }
678                }
679
680                2 => {
681                    if let Some(range) = self.range.take() {
682                        ::fidl_next::WireEnvelope::encode_value(
683                            range,
684                            preallocated.encoder,
685                            &mut out,
686                        )?;
687                    } else {
688                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
689                    }
690                }
691
692                1 => {
693                    if let Some(type_) = self.type_.take() {
694                        ::fidl_next::WireEnvelope::encode_value(
695                            type_,
696                            preallocated.encoder,
697                            &mut out,
698                        )?;
699                    } else {
700                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
701                    }
702                }
703
704                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
705            }
706            unsafe {
707                preallocated.write_next(out.assume_init_ref());
708            }
709        }
710
711        ::fidl_next::WireTable::encode_len(table, max_ord);
712
713        Ok(())
714    }
715}
716
717unsafe impl<___E> ::fidl_next::EncodeRef<___E> for AdvisoryLockRequest
718where
719    ___E: ::fidl_next::Encoder + ?Sized,
720{
721    #[inline]
722    fn encode_ref(
723        &self,
724        encoder: &mut ___E,
725        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
726    ) -> Result<(), ::fidl_next::EncodeError> {
727        ::fidl_next::munge!(let WireAdvisoryLockRequest { table } = out);
728
729        let max_ord = self.__max_ordinal();
730
731        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
732        ::fidl_next::Wire::zero_padding(&mut out);
733
734        let mut preallocated =
735            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
736
737        for i in 1..=max_ord {
738            match i {
739                3 => {
740                    if let Some(wait) = &self.wait {
741                        ::fidl_next::WireEnvelope::encode_value(
742                            wait,
743                            preallocated.encoder,
744                            &mut out,
745                        )?;
746                    } else {
747                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
748                    }
749                }
750
751                2 => {
752                    if let Some(range) = &self.range {
753                        ::fidl_next::WireEnvelope::encode_value(
754                            range,
755                            preallocated.encoder,
756                            &mut out,
757                        )?;
758                    } else {
759                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
760                    }
761                }
762
763                1 => {
764                    if let Some(type_) = &self.type_ {
765                        ::fidl_next::WireEnvelope::encode_value(
766                            type_,
767                            preallocated.encoder,
768                            &mut out,
769                        )?;
770                    } else {
771                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
772                    }
773                }
774
775                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
776            }
777            unsafe {
778                preallocated.write_next(out.assume_init_ref());
779            }
780        }
781
782        ::fidl_next::WireTable::encode_len(table, max_ord);
783
784        Ok(())
785    }
786}
787
788impl<'de> ::fidl_next::FromWire<WireAdvisoryLockRequest<'de>> for AdvisoryLockRequest {
789    #[inline]
790    fn from_wire(wire: WireAdvisoryLockRequest<'de>) -> Self {
791        let wire = ::core::mem::ManuallyDrop::new(wire);
792
793        let type_ = wire.table.get(1);
794
795        let range = wire.table.get(2);
796
797        let wait = wire.table.get(3);
798
799        Self {
800            type_: type_.map(|envelope| {
801                ::fidl_next::FromWire::from_wire(unsafe {
802                    envelope.read_unchecked::<crate::WireAdvisoryLockType>()
803                })
804            }),
805
806            range: range.map(|envelope| {
807                ::fidl_next::FromWire::from_wire(unsafe {
808                    envelope.read_unchecked::<crate::WireAdvisoryLockRange>()
809                })
810            }),
811
812            wait: wait.map(|envelope| {
813                ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
814            }),
815        }
816    }
817}
818
819impl<'de> ::fidl_next::FromWireRef<WireAdvisoryLockRequest<'de>> for AdvisoryLockRequest {
820    #[inline]
821    fn from_wire_ref(wire: &WireAdvisoryLockRequest<'de>) -> Self {
822        Self {
823            type_: wire.table.get(1).map(|envelope| {
824                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
825                    envelope.deref_unchecked::<crate::WireAdvisoryLockType>()
826                })
827            }),
828
829            range: wire.table.get(2).map(|envelope| {
830                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
831                    envelope.deref_unchecked::<crate::WireAdvisoryLockRange>()
832                })
833            }),
834
835            wait: wire.table.get(3).map(|envelope| {
836                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
837                    envelope.deref_unchecked::<bool>()
838                })
839            }),
840        }
841    }
842}
843
844/// The wire type corresponding to [`AdvisoryLockRequest`].
845#[repr(C)]
846pub struct WireAdvisoryLockRequest<'de> {
847    table: ::fidl_next::WireTable<'de>,
848}
849
850impl<'de> Drop for WireAdvisoryLockRequest<'de> {
851    fn drop(&mut self) {
852        let _ = self
853            .table
854            .get(1)
855            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireAdvisoryLockType>() });
856
857        let _ = self
858            .table
859            .get(2)
860            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireAdvisoryLockRange>() });
861
862        let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
863    }
864}
865
866unsafe impl ::fidl_next::Wire for WireAdvisoryLockRequest<'static> {
867    type Decoded<'de> = WireAdvisoryLockRequest<'de>;
868
869    #[inline]
870    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
871        ::fidl_next::munge!(let Self { table } = out);
872        ::fidl_next::WireTable::zero_padding(table);
873    }
874}
875
876unsafe impl<___D> ::fidl_next::Decode<___D> for WireAdvisoryLockRequest<'static>
877where
878    ___D: ::fidl_next::Decoder + ?Sized,
879{
880    fn decode(
881        slot: ::fidl_next::Slot<'_, Self>,
882        decoder: &mut ___D,
883    ) -> Result<(), ::fidl_next::DecodeError> {
884        ::fidl_next::munge!(let Self { table } = slot);
885
886        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
887            match ordinal {
888                0 => unsafe { ::core::hint::unreachable_unchecked() },
889
890                1 => {
891                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireAdvisoryLockType>(
892                        slot.as_mut(),
893                        decoder,
894                    )?;
895
896                    Ok(())
897                }
898
899                2 => {
900                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireAdvisoryLockRange>(
901                        slot.as_mut(),
902                        decoder,
903                    )?;
904
905                    Ok(())
906                }
907
908                3 => {
909                    ::fidl_next::WireEnvelope::decode_as::<___D, bool>(slot.as_mut(), decoder)?;
910
911                    Ok(())
912                }
913
914                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
915            }
916        })
917    }
918}
919
920impl<'de> WireAdvisoryLockRequest<'de> {
921    pub fn type_(&self) -> Option<&crate::WireAdvisoryLockType> {
922        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
923    }
924
925    pub fn range(&self) -> Option<&crate::WireAdvisoryLockRange> {
926        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
927    }
928
929    pub fn wait(&self) -> Option<&bool> {
930        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
931    }
932}
933
934impl<'de> ::core::fmt::Debug for WireAdvisoryLockRequest<'de> {
935    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
936        f.debug_struct("AdvisoryLockRequest")
937            .field("type_", &self.type_())
938            .field("range", &self.range())
939            .field("wait", &self.wait())
940            .finish()
941    }
942}
943
944#[derive(Clone, Debug)]
945pub struct AdvisoryLockingAdvisoryLockRequest {
946    pub request: crate::AdvisoryLockRequest,
947}
948
949impl ::fidl_next::Encodable for AdvisoryLockingAdvisoryLockRequest {
950    type Encoded = WireAdvisoryLockingAdvisoryLockRequest<'static>;
951}
952
953unsafe impl<___E> ::fidl_next::Encode<___E> for AdvisoryLockingAdvisoryLockRequest
954where
955    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
956
957    ___E: ::fidl_next::Encoder,
958{
959    #[inline]
960    fn encode(
961        self,
962        encoder: &mut ___E,
963        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
964    ) -> Result<(), ::fidl_next::EncodeError> {
965        ::fidl_next::munge! {
966            let Self::Encoded {
967                request,
968
969            } = out;
970        }
971
972        ::fidl_next::Encode::encode(self.request, encoder, request)?;
973
974        Ok(())
975    }
976}
977
978unsafe impl<___E> ::fidl_next::EncodeRef<___E> for AdvisoryLockingAdvisoryLockRequest
979where
980    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
981
982    ___E: ::fidl_next::Encoder,
983{
984    #[inline]
985    fn encode_ref(
986        &self,
987        encoder: &mut ___E,
988        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
989    ) -> Result<(), ::fidl_next::EncodeError> {
990        ::fidl_next::munge! {
991            let Self::Encoded {
992                request,
993
994            } = out;
995        }
996
997        ::fidl_next::EncodeRef::encode_ref(&self.request, encoder, request)?;
998
999        Ok(())
1000    }
1001}
1002
1003impl ::fidl_next::EncodableOption for AdvisoryLockingAdvisoryLockRequest {
1004    type EncodedOption =
1005        ::fidl_next::WireBox<'static, WireAdvisoryLockingAdvisoryLockRequest<'static>>;
1006}
1007
1008unsafe impl<___E> ::fidl_next::EncodeOption<___E> for AdvisoryLockingAdvisoryLockRequest
1009where
1010    ___E: ::fidl_next::Encoder + ?Sized,
1011    AdvisoryLockingAdvisoryLockRequest: ::fidl_next::Encode<___E>,
1012{
1013    #[inline]
1014    fn encode_option(
1015        this: Option<Self>,
1016        encoder: &mut ___E,
1017        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1018    ) -> Result<(), ::fidl_next::EncodeError> {
1019        if let Some(inner) = this {
1020            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1021            ::fidl_next::WireBox::encode_present(out);
1022        } else {
1023            ::fidl_next::WireBox::encode_absent(out);
1024        }
1025
1026        Ok(())
1027    }
1028}
1029
1030unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for AdvisoryLockingAdvisoryLockRequest
1031where
1032    ___E: ::fidl_next::Encoder + ?Sized,
1033    AdvisoryLockingAdvisoryLockRequest: ::fidl_next::EncodeRef<___E>,
1034{
1035    #[inline]
1036    fn encode_option_ref(
1037        this: Option<&Self>,
1038        encoder: &mut ___E,
1039        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1040    ) -> Result<(), ::fidl_next::EncodeError> {
1041        if let Some(inner) = this {
1042            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1043            ::fidl_next::WireBox::encode_present(out);
1044        } else {
1045            ::fidl_next::WireBox::encode_absent(out);
1046        }
1047
1048        Ok(())
1049    }
1050}
1051
1052impl<'de> ::fidl_next::FromWire<WireAdvisoryLockingAdvisoryLockRequest<'de>>
1053    for AdvisoryLockingAdvisoryLockRequest
1054{
1055    #[inline]
1056    fn from_wire(wire: WireAdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
1057        Self { request: ::fidl_next::FromWire::from_wire(wire.request) }
1058    }
1059}
1060
1061impl<'de> ::fidl_next::FromWireRef<WireAdvisoryLockingAdvisoryLockRequest<'de>>
1062    for AdvisoryLockingAdvisoryLockRequest
1063{
1064    #[inline]
1065    fn from_wire_ref(wire: &WireAdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
1066        Self { request: ::fidl_next::FromWireRef::from_wire_ref(&wire.request) }
1067    }
1068}
1069
1070/// The wire type corresponding to [`AdvisoryLockingAdvisoryLockRequest`].
1071#[derive(Debug)]
1072#[repr(C)]
1073pub struct WireAdvisoryLockingAdvisoryLockRequest<'de> {
1074    pub request: crate::WireAdvisoryLockRequest<'de>,
1075}
1076
1077unsafe impl ::fidl_next::Wire for WireAdvisoryLockingAdvisoryLockRequest<'static> {
1078    type Decoded<'de> = WireAdvisoryLockingAdvisoryLockRequest<'de>;
1079
1080    #[inline]
1081    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1082}
1083
1084unsafe impl<___D> ::fidl_next::Decode<___D> for WireAdvisoryLockingAdvisoryLockRequest<'static>
1085where
1086    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1087
1088    ___D: ::fidl_next::Decoder,
1089{
1090    fn decode(
1091        slot: ::fidl_next::Slot<'_, Self>,
1092        decoder: &mut ___D,
1093    ) -> Result<(), ::fidl_next::DecodeError> {
1094        ::fidl_next::munge! {
1095            let Self {
1096                mut request,
1097
1098            } = slot;
1099        }
1100
1101        ::fidl_next::Decode::decode(request.as_mut(), decoder)?;
1102
1103        Ok(())
1104    }
1105}
1106
1107pub type AdvisoryLockingAdvisoryLockResponse = ();
1108
1109/// The wire type corresponding to [`AdvisoryLockingAdvisoryLockResponse`].
1110pub type WireAdvisoryLockingAdvisoryLockResponse = ();
1111
1112/// The type corresponding to the AdvisoryLocking protocol.
1113#[doc = " Advisory locking protocol.\n\n This protocol is intended to be composed into the |File| protocol to\n provide support for advisory locking.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n These primitives are designed to support the flock() and fcntl(),\n specifically F_SETLK, F_SETLKW, and F_GETLK, functionality that code\n running on Fuchsia expects from other operating systems.\n"]
1114#[derive(Debug)]
1115pub struct AdvisoryLocking;
1116
1117pub mod advisory_locking {
1118    pub mod prelude {
1119        pub use crate::{
1120            advisory_locking, AdvisoryLocking, AdvisoryLockingClientHandler,
1121            AdvisoryLockingClientSender, AdvisoryLockingServerHandler, AdvisoryLockingServerSender,
1122        };
1123
1124        pub use crate::AdvisoryLockingAdvisoryLockRequest;
1125
1126        pub use crate::AdvisoryLockingAdvisoryLockResponse;
1127    }
1128
1129    pub struct AdvisoryLock;
1130
1131    impl ::fidl_next::Method for AdvisoryLock {
1132        const ORDINAL: u64 = 7992130864415541162;
1133
1134        type Protocol = crate::AdvisoryLocking;
1135
1136        type Request = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>;
1137
1138        type Response = ::fidl_next::WireResult<
1139            'static,
1140            crate::WireAdvisoryLockingAdvisoryLockResponse,
1141            ::fidl_next::WireI32,
1142        >;
1143    }
1144}
1145
1146/// A helper trait for the `AdvisoryLocking` client sender.
1147pub trait AdvisoryLockingClientSender {
1148    type Transport: ::fidl_next::Transport;
1149
1150    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
1151    fn advisory_lock<___R>(
1152        &self,
1153        request: ___R,
1154    ) -> Result<
1155        ::fidl_next::ResponseFuture<'_, Self::Transport, advisory_locking::AdvisoryLock>,
1156        ::fidl_next::EncodeError,
1157    >
1158    where
1159        ___R: ::fidl_next::Encode<
1160            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1161            Encoded = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>,
1162        >;
1163}
1164
1165impl<___T> AdvisoryLockingClientSender for ::fidl_next::ClientSender<___T, AdvisoryLocking>
1166where
1167    ___T: ::fidl_next::Transport,
1168{
1169    type Transport = ___T;
1170
1171    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
1172    fn advisory_lock<___R>(
1173        &self,
1174        request: ___R,
1175    ) -> Result<
1176        ::fidl_next::ResponseFuture<'_, Self::Transport, advisory_locking::AdvisoryLock>,
1177        ::fidl_next::EncodeError,
1178    >
1179    where
1180        ___R: ::fidl_next::Encode<
1181            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
1182            Encoded = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>,
1183        >,
1184    {
1185        self.as_untyped()
1186            .send_two_way(7992130864415541162, request)
1187            .map(::fidl_next::ResponseFuture::from_untyped)
1188    }
1189}
1190
1191/// A client handler for the AdvisoryLocking protocol.
1192///
1193/// See [`AdvisoryLocking`] for more details.
1194pub trait AdvisoryLockingClientHandler<___T: ::fidl_next::Transport> {}
1195
1196impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for AdvisoryLocking
1197where
1198    ___T: ::fidl_next::Transport,
1199    ___H: AdvisoryLockingClientHandler<___T>,
1200
1201    <advisory_locking::AdvisoryLock as ::fidl_next::Method>::Response:
1202        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1203{
1204    fn on_event(
1205        handler: &mut ___H,
1206        sender: &::fidl_next::ClientSender<___T, Self>,
1207        ordinal: u64,
1208        buffer: ___T::RecvBuffer,
1209    ) {
1210        match ordinal {
1211            ordinal => {
1212                sender.close();
1213            }
1214        }
1215    }
1216}
1217
1218/// A helper trait for the `AdvisoryLocking` server sender.
1219pub trait AdvisoryLockingServerSender {
1220    type Transport: ::fidl_next::Transport;
1221}
1222
1223impl<___T> AdvisoryLockingServerSender for ::fidl_next::ServerSender<___T, AdvisoryLocking>
1224where
1225    ___T: ::fidl_next::Transport,
1226{
1227    type Transport = ___T;
1228}
1229
1230/// A server handler for the AdvisoryLocking protocol.
1231///
1232/// See [`AdvisoryLocking`] for more details.
1233pub trait AdvisoryLockingServerHandler<___T: ::fidl_next::Transport> {
1234    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
1235    fn advisory_lock(
1236        &mut self,
1237        sender: &::fidl_next::ServerSender<___T, AdvisoryLocking>,
1238
1239        request: ::fidl_next::Request<___T, advisory_locking::AdvisoryLock>,
1240
1241        responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock>,
1242    );
1243}
1244
1245impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for AdvisoryLocking
1246where
1247    ___T: ::fidl_next::Transport,
1248    ___H: AdvisoryLockingServerHandler<___T>,
1249
1250    <advisory_locking::AdvisoryLock as ::fidl_next::Method>::Request:
1251        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1252{
1253    fn on_one_way(
1254        handler: &mut ___H,
1255        sender: &::fidl_next::ServerSender<___T, Self>,
1256        ordinal: u64,
1257        buffer: ___T::RecvBuffer,
1258    ) {
1259        match ordinal {
1260            ordinal => {
1261                sender.close();
1262            }
1263        }
1264    }
1265
1266    fn on_two_way(
1267        handler: &mut ___H,
1268        sender: &::fidl_next::ServerSender<___T, Self>,
1269        ordinal: u64,
1270        buffer: ___T::RecvBuffer,
1271        responder: ::fidl_next::protocol::Responder,
1272    ) {
1273        match ordinal {
1274            7992130864415541162 => {
1275                let responder = ::fidl_next::Responder::from_untyped(responder);
1276
1277                match ::fidl_next::DecoderExt::decode(buffer) {
1278                    Ok(decoded) => handler.advisory_lock(sender, decoded, responder),
1279                    Err(e) => {
1280                        sender.close();
1281                    }
1282                }
1283            }
1284
1285            ordinal => {
1286                sender.close();
1287            }
1288        }
1289    }
1290}
1291
1292::fidl_next::bitflags! {
1293    #[derive(
1294        Clone,
1295        Copy,
1296        Debug,
1297        PartialEq,
1298        Eq,
1299        Hash,
1300    )]
1301    pub struct AllocateMode: u32 {
1302        const KEEP_SIZE = 1;
1303        const UNSHARE_RANGE = 2;
1304        const PUNCH_HOLE = 4;
1305        const COLLAPSE_RANGE = 8;
1306        const ZERO_RANGE = 16;
1307        const INSERT_RANGE = 32;
1308        const _ = !0;
1309    }
1310}
1311
1312impl ::fidl_next::Encodable for AllocateMode {
1313    type Encoded = WireAllocateMode;
1314}
1315
1316unsafe impl<___E> ::fidl_next::Encode<___E> for AllocateMode
1317where
1318    ___E: ?Sized,
1319{
1320    #[inline]
1321    fn encode(
1322        self,
1323        encoder: &mut ___E,
1324        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1325    ) -> Result<(), ::fidl_next::EncodeError> {
1326        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
1327    }
1328}
1329
1330unsafe impl<___E> ::fidl_next::EncodeRef<___E> for AllocateMode
1331where
1332    ___E: ?Sized,
1333{
1334    #[inline]
1335    fn encode_ref(
1336        &self,
1337        _: &mut ___E,
1338        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1339    ) -> Result<(), ::fidl_next::EncodeError> {
1340        ::fidl_next::munge!(let WireAllocateMode { value } = out);
1341        let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1342        Ok(())
1343    }
1344}
1345
1346impl ::core::convert::From<WireAllocateMode> for AllocateMode {
1347    fn from(wire: WireAllocateMode) -> Self {
1348        Self::from_bits_retain(u32::from(wire.value))
1349    }
1350}
1351
1352impl ::fidl_next::FromWire<WireAllocateMode> for AllocateMode {
1353    #[inline]
1354    fn from_wire(wire: WireAllocateMode) -> Self {
1355        Self::from(wire)
1356    }
1357}
1358
1359impl ::fidl_next::FromWireRef<WireAllocateMode> for AllocateMode {
1360    #[inline]
1361    fn from_wire_ref(wire: &WireAllocateMode) -> Self {
1362        Self::from(*wire)
1363    }
1364}
1365
1366/// The wire type corresponding to [`AllocateMode`].
1367#[derive(Clone, Copy, Debug)]
1368#[repr(transparent)]
1369pub struct WireAllocateMode {
1370    value: ::fidl_next::WireU32,
1371}
1372
1373unsafe impl ::fidl_next::Wire for WireAllocateMode {
1374    type Decoded<'de> = Self;
1375
1376    #[inline]
1377    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1378        // Wire bits have no padding
1379    }
1380}
1381
1382unsafe impl<___D> ::fidl_next::Decode<___D> for WireAllocateMode
1383where
1384    ___D: ?Sized,
1385{
1386    fn decode(
1387        slot: ::fidl_next::Slot<'_, Self>,
1388        _: &mut ___D,
1389    ) -> Result<(), ::fidl_next::DecodeError> {
1390        Ok(())
1391    }
1392}
1393
1394impl ::core::convert::From<AllocateMode> for WireAllocateMode {
1395    fn from(natural: AllocateMode) -> Self {
1396        Self { value: ::fidl_next::WireU32::from(natural.bits()) }
1397    }
1398}
1399
1400#[doc = " Rights are properties specific to a connection. They limit which operations are allowed on a\n connection, including those which may be granted to new connections.\n\n Invoking an operation without the corresponding right results in `ZX_ERR_ACCESS_DENIED`\n even if the node does not have support for the operation.\n"]
1401pub type Rights = crate::Operations;
1402
1403/// The wire type corresponding to [`Rights`].
1404pub type WireRights = crate::WireOperations;
1405
1406#[derive(Debug, Default)]
1407pub struct ConnectionInfo {
1408    pub rights: Option<crate::Operations>,
1409}
1410
1411impl ConnectionInfo {
1412    fn __max_ordinal(&self) -> usize {
1413        if self.rights.is_some() {
1414            return 1;
1415        }
1416
1417        0
1418    }
1419}
1420
1421impl ::fidl_next::Encodable for ConnectionInfo {
1422    type Encoded = WireConnectionInfo<'static>;
1423}
1424
1425unsafe impl<___E> ::fidl_next::Encode<___E> for ConnectionInfo
1426where
1427    ___E: ::fidl_next::Encoder + ?Sized,
1428
1429    ___E: ::fidl_next::fuchsia::HandleEncoder,
1430{
1431    #[inline]
1432    fn encode(
1433        mut self,
1434        encoder: &mut ___E,
1435        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1436    ) -> Result<(), ::fidl_next::EncodeError> {
1437        ::fidl_next::munge!(let WireConnectionInfo { table } = out);
1438
1439        let max_ord = self.__max_ordinal();
1440
1441        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1442        ::fidl_next::Wire::zero_padding(&mut out);
1443
1444        let mut preallocated =
1445            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1446
1447        for i in 1..=max_ord {
1448            match i {
1449                1 => {
1450                    if let Some(rights) = self.rights.take() {
1451                        ::fidl_next::WireEnvelope::encode_value(
1452                            rights,
1453                            preallocated.encoder,
1454                            &mut out,
1455                        )?;
1456                    } else {
1457                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1458                    }
1459                }
1460
1461                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1462            }
1463            unsafe {
1464                preallocated.write_next(out.assume_init_ref());
1465            }
1466        }
1467
1468        ::fidl_next::WireTable::encode_len(table, max_ord);
1469
1470        Ok(())
1471    }
1472}
1473
1474impl<'de> ::fidl_next::FromWire<WireConnectionInfo<'de>> for ConnectionInfo {
1475    #[inline]
1476    fn from_wire(wire: WireConnectionInfo<'de>) -> Self {
1477        let wire = ::core::mem::ManuallyDrop::new(wire);
1478
1479        let rights = wire.table.get(1);
1480
1481        Self {
1482            rights: rights.map(|envelope| {
1483                ::fidl_next::FromWire::from_wire(unsafe {
1484                    envelope.read_unchecked::<crate::WireOperations>()
1485                })
1486            }),
1487        }
1488    }
1489}
1490
1491/// The wire type corresponding to [`ConnectionInfo`].
1492#[repr(C)]
1493pub struct WireConnectionInfo<'de> {
1494    table: ::fidl_next::WireTable<'de>,
1495}
1496
1497impl<'de> Drop for WireConnectionInfo<'de> {
1498    fn drop(&mut self) {
1499        let _ = self
1500            .table
1501            .get(1)
1502            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireOperations>() });
1503    }
1504}
1505
1506unsafe impl ::fidl_next::Wire for WireConnectionInfo<'static> {
1507    type Decoded<'de> = WireConnectionInfo<'de>;
1508
1509    #[inline]
1510    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1511        ::fidl_next::munge!(let Self { table } = out);
1512        ::fidl_next::WireTable::zero_padding(table);
1513    }
1514}
1515
1516unsafe impl<___D> ::fidl_next::Decode<___D> for WireConnectionInfo<'static>
1517where
1518    ___D: ::fidl_next::Decoder + ?Sized,
1519
1520    ___D: ::fidl_next::fuchsia::HandleDecoder,
1521{
1522    fn decode(
1523        slot: ::fidl_next::Slot<'_, Self>,
1524        decoder: &mut ___D,
1525    ) -> Result<(), ::fidl_next::DecodeError> {
1526        ::fidl_next::munge!(let Self { table } = slot);
1527
1528        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1529            match ordinal {
1530                0 => unsafe { ::core::hint::unreachable_unchecked() },
1531
1532                1 => {
1533                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireOperations>(
1534                        slot.as_mut(),
1535                        decoder,
1536                    )?;
1537
1538                    Ok(())
1539                }
1540
1541                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1542            }
1543        })
1544    }
1545}
1546
1547impl<'de> WireConnectionInfo<'de> {
1548    pub fn rights(&self) -> Option<&crate::WireOperations> {
1549        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1550    }
1551}
1552
1553impl<'de> ::core::fmt::Debug for WireConnectionInfo<'de> {
1554    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
1555        f.debug_struct("ConnectionInfo").field("rights", &self.rights()).finish()
1556    }
1557}
1558
1559#[doc = " The type to identify a node, if the implementation supports some notion of\n unique node ID.\n\n ## Uniqueness Guarantees\n\n A client is usually presented with a directory tree that is the result\n of composing together multiple backing implementation instances. An ID\n would be unique within the corresponding instance only.\n Their boundaries are rather implicit on Fuchsia, as a result of\n transparently-forwarding directory proxies. It could be common for a client\n to observe identical `Id`s when traversing a directory tree, when it\n encounters nodes from different backing instances. Therefore, the ID is best\n used for debugging and informational purposes.\n\n The [`fuchsia.fs/FilesystemInfo.fs_id`] field may be used to disambiguate\n IDs from different backing instances.\n"]
1560pub type Id = u64;
1561
1562/// The wire type corresponding to [`Id`].
1563pub type WireId = ::fidl_next::WireU64;
1564
1565pub const DIRECTORY_PROTOCOL_NAME: &str = "fuchsia.io/Directory";
1566
1567::fidl_next::bitflags! {
1568    #[doc = " DEPRECATED - Use Flags instead.\n"]#[derive(
1569        Clone,
1570        Copy,
1571        Debug,
1572        PartialEq,
1573        Eq,
1574        Hash,
1575    )]
1576    pub struct OpenFlags: u32 {
1577        #[doc = " Can read from target object.\n"]const RIGHT_READABLE = 1;
1578        #[doc = " Can write to target object.\n"]const RIGHT_WRITABLE = 2;
1579        #[doc = " Connection can map target object executable.\n"]const RIGHT_EXECUTABLE = 8;
1580        #[doc = " Create the object if it doesn\'t exist.\n"]const CREATE = 65536;
1581        #[doc = " (with Create) Fail if the object already exists.\n"]const CREATE_IF_ABSENT = 131072;
1582        #[doc = " Truncate the object before usage.\n"]const TRUNCATE = 262144;
1583        #[doc = " Assert that the object to be opened is a directory.\n Return an error if the target object is not a directory.\n"]const DIRECTORY = 524288;
1584        #[doc = " Seek to the end of the object before all writes.\n"]const APPEND = 1048576;
1585        #[doc = " Open a reference to the object, not the object itself.\n It is ONLY valid to pass the following flags together with `NODE_REFERENCE`:\n - `DIRECTORY`\n - `NOT_DIRECTORY`\n - `DESCRIBE`\n otherwise an error is returned.\n If an object is opened or cloned using this method, the resulting connection does not carry\n any permission flags.\n The resulting connection allows a limited set of operations: `GetAttr`, `Clone`, `Close`,\n `Describe`, and `GetFlags`. The connection will speak the `Node` protocol. Calling `SetAttr`\n or `SetFlags` will result in `ZX_ERR_BAD_HANDLE`.\n"]const NODE_REFERENCE = 4194304;
1586        #[doc = " Requests that an \"OnOpen\" event is sent to the interface request.\n\n The event will contain a non-null `NodeInfoDeprecated` if the open/clone is successful. This\n can be used to open a protocol that does not compose fuchsia.io/Node; the event is sent as\n if the protocol is fuchsia.io/Node and then the target protocol is used exclusively.\n"]const DESCRIBE = 8388608;
1587        #[doc = " Specify this flag to request POSIX-compatibility with respect to write permission handling.\n Currently, it affects permission handling specifically during Open:\n - If the target path is a directory, the rights on the new connection expand to include\n   `WRITABLE` if and only if the current connection and all intermediate mount points\n   are writable.\n - Otherwise, this flag is ignored. It is an access denied error to request more rights\n   than those on the current connection, or any intermediate mount points.\n\n If this flag is omitted, opening always uses the requested rights, failing the operation with\n access denied error if requested rights exceeds the rights attached to the current connection.\n\n If the requesting connection is read-only and the requested rights are read-only, the flag\n may be ignored by the server, and is not forwarded downstream. This is an implementation detail,\n necessary to enforce hierarchical permissions across mount points, and should have no effect\n on the expected behavior for clients.\n"]const POSIX_WRITABLE = 134217728;
1588        #[doc = " Specify this flag to request POSIX-compatibility with respect to execute permission handling.\n Currently, it affects permission handling specifically during Open:\n - If the target path is a directory, the rights on the new connection expand to include\n   `EXECUTABLE` if and only if the current connection and all intermediate mount\n   points are executable.\n - Otherwise, this flag is ignored. It is an access denied error to request more rights\n   than those on the current connection, or any intermediate mount points.\n\n If this flag is omitted, opening always uses the requested rights, failing the operation with\n access denied error if requested rights exceeds the rights attached to the current connection.\n\n If the requesting connection is read-only and the requested rights are read-only, the flag\n may be ignored by the server, and is not forwarded downstream. This is an implementation detail,\n necessary to enforce hierarchical permissions across mount points, and should have no effect\n on the expected behavior for clients.\n"]const POSIX_EXECUTABLE = 268435456;
1589        #[doc = " Assert that the object to be opened is not a directory.\n Return an error if the target object is a directory.\n"]const NOT_DIRECTORY = 33554432;
1590        #[doc = " When used during clone, the new connection inherits the rights on the source connection,\n regardless if it is a file or directory. Otherwise, clone attempts to use the requested rights.\n It is invalid to pass any of the `RIGHT_*` flags together with `OpenFlags.CLONE_SAME_RIGHTS`.\n"]const CLONE_SAME_RIGHTS = 67108864;
1591        #[doc = " Open the target object as a block device.\n"]const BLOCK_DEVICE = 16777216;
1592
1593    }
1594}
1595
1596impl ::fidl_next::Encodable for OpenFlags {
1597    type Encoded = WireOpenFlags;
1598}
1599
1600unsafe impl<___E> ::fidl_next::Encode<___E> for OpenFlags
1601where
1602    ___E: ?Sized,
1603{
1604    #[inline]
1605    fn encode(
1606        self,
1607        encoder: &mut ___E,
1608        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1609    ) -> Result<(), ::fidl_next::EncodeError> {
1610        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
1611    }
1612}
1613
1614unsafe impl<___E> ::fidl_next::EncodeRef<___E> for OpenFlags
1615where
1616    ___E: ?Sized,
1617{
1618    #[inline]
1619    fn encode_ref(
1620        &self,
1621        _: &mut ___E,
1622        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1623    ) -> Result<(), ::fidl_next::EncodeError> {
1624        ::fidl_next::munge!(let WireOpenFlags { value } = out);
1625        let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1626        Ok(())
1627    }
1628}
1629
1630impl ::core::convert::From<WireOpenFlags> for OpenFlags {
1631    fn from(wire: WireOpenFlags) -> Self {
1632        Self::from_bits_retain(u32::from(wire.value))
1633    }
1634}
1635
1636impl ::fidl_next::FromWire<WireOpenFlags> for OpenFlags {
1637    #[inline]
1638    fn from_wire(wire: WireOpenFlags) -> Self {
1639        Self::from(wire)
1640    }
1641}
1642
1643impl ::fidl_next::FromWireRef<WireOpenFlags> for OpenFlags {
1644    #[inline]
1645    fn from_wire_ref(wire: &WireOpenFlags) -> Self {
1646        Self::from(*wire)
1647    }
1648}
1649
1650/// The wire type corresponding to [`OpenFlags`].
1651#[derive(Clone, Copy, Debug)]
1652#[repr(transparent)]
1653pub struct WireOpenFlags {
1654    value: ::fidl_next::WireU32,
1655}
1656
1657unsafe impl ::fidl_next::Wire for WireOpenFlags {
1658    type Decoded<'de> = Self;
1659
1660    #[inline]
1661    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1662        // Wire bits have no padding
1663    }
1664}
1665
1666unsafe impl<___D> ::fidl_next::Decode<___D> for WireOpenFlags
1667where
1668    ___D: ?Sized,
1669{
1670    fn decode(
1671        slot: ::fidl_next::Slot<'_, Self>,
1672        _: &mut ___D,
1673    ) -> Result<(), ::fidl_next::DecodeError> {
1674        ::fidl_next::munge!(let Self { value } = slot);
1675        let set = u32::from(*value);
1676        if set & !OpenFlags::all().bits() != 0 {
1677            return Err(::fidl_next::DecodeError::InvalidBits {
1678                expected: OpenFlags::all().bits() as usize,
1679                actual: set as usize,
1680            });
1681        }
1682
1683        Ok(())
1684    }
1685}
1686
1687impl ::core::convert::From<OpenFlags> for WireOpenFlags {
1688    fn from(natural: OpenFlags) -> Self {
1689        Self { value: ::fidl_next::WireU32::from(natural.bits()) }
1690    }
1691}
1692
1693#[doc = " NodeAttributes defines generic information about a filesystem node.\n"]
1694#[derive(Clone, Debug)]
1695pub struct NodeAttributes {
1696    pub mode: u32,
1697
1698    pub id: u64,
1699
1700    pub content_size: u64,
1701
1702    pub storage_size: u64,
1703
1704    pub link_count: u64,
1705
1706    pub creation_time: u64,
1707
1708    pub modification_time: u64,
1709}
1710
1711impl ::fidl_next::Encodable for NodeAttributes {
1712    type Encoded = WireNodeAttributes;
1713}
1714
1715unsafe impl<___E> ::fidl_next::Encode<___E> for NodeAttributes
1716where
1717    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1718{
1719    #[inline]
1720    fn encode(
1721        self,
1722        encoder: &mut ___E,
1723        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1724    ) -> Result<(), ::fidl_next::EncodeError> {
1725        ::fidl_next::munge! {
1726            let Self::Encoded {
1727                mode,
1728                id,
1729                content_size,
1730                storage_size,
1731                link_count,
1732                creation_time,
1733                modification_time,
1734
1735            } = out;
1736        }
1737
1738        ::fidl_next::Encode::encode(self.mode, encoder, mode)?;
1739
1740        ::fidl_next::Encode::encode(self.id, encoder, id)?;
1741
1742        ::fidl_next::Encode::encode(self.content_size, encoder, content_size)?;
1743
1744        ::fidl_next::Encode::encode(self.storage_size, encoder, storage_size)?;
1745
1746        ::fidl_next::Encode::encode(self.link_count, encoder, link_count)?;
1747
1748        ::fidl_next::Encode::encode(self.creation_time, encoder, creation_time)?;
1749
1750        ::fidl_next::Encode::encode(self.modification_time, encoder, modification_time)?;
1751
1752        Ok(())
1753    }
1754}
1755
1756unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeAttributes
1757where
1758    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1759{
1760    #[inline]
1761    fn encode_ref(
1762        &self,
1763        encoder: &mut ___E,
1764        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1765    ) -> Result<(), ::fidl_next::EncodeError> {
1766        ::fidl_next::munge! {
1767            let Self::Encoded {
1768                mode,
1769                id,
1770                content_size,
1771                storage_size,
1772                link_count,
1773                creation_time,
1774                modification_time,
1775
1776            } = out;
1777        }
1778
1779        ::fidl_next::EncodeRef::encode_ref(&self.mode, encoder, mode)?;
1780
1781        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
1782
1783        ::fidl_next::EncodeRef::encode_ref(&self.content_size, encoder, content_size)?;
1784
1785        ::fidl_next::EncodeRef::encode_ref(&self.storage_size, encoder, storage_size)?;
1786
1787        ::fidl_next::EncodeRef::encode_ref(&self.link_count, encoder, link_count)?;
1788
1789        ::fidl_next::EncodeRef::encode_ref(&self.creation_time, encoder, creation_time)?;
1790
1791        ::fidl_next::EncodeRef::encode_ref(&self.modification_time, encoder, modification_time)?;
1792
1793        Ok(())
1794    }
1795}
1796
1797impl ::fidl_next::EncodableOption for NodeAttributes {
1798    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeAttributes>;
1799}
1800
1801unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeAttributes
1802where
1803    ___E: ::fidl_next::Encoder + ?Sized,
1804    NodeAttributes: ::fidl_next::Encode<___E>,
1805{
1806    #[inline]
1807    fn encode_option(
1808        this: Option<Self>,
1809        encoder: &mut ___E,
1810        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1811    ) -> Result<(), ::fidl_next::EncodeError> {
1812        if let Some(inner) = this {
1813            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1814            ::fidl_next::WireBox::encode_present(out);
1815        } else {
1816            ::fidl_next::WireBox::encode_absent(out);
1817        }
1818
1819        Ok(())
1820    }
1821}
1822
1823unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeAttributes
1824where
1825    ___E: ::fidl_next::Encoder + ?Sized,
1826    NodeAttributes: ::fidl_next::EncodeRef<___E>,
1827{
1828    #[inline]
1829    fn encode_option_ref(
1830        this: Option<&Self>,
1831        encoder: &mut ___E,
1832        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1833    ) -> Result<(), ::fidl_next::EncodeError> {
1834        if let Some(inner) = this {
1835            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1836            ::fidl_next::WireBox::encode_present(out);
1837        } else {
1838            ::fidl_next::WireBox::encode_absent(out);
1839        }
1840
1841        Ok(())
1842    }
1843}
1844
1845impl ::fidl_next::FromWire<WireNodeAttributes> for NodeAttributes {
1846    #[inline]
1847    fn from_wire(wire: WireNodeAttributes) -> Self {
1848        Self {
1849            mode: ::fidl_next::FromWire::from_wire(wire.mode),
1850
1851            id: ::fidl_next::FromWire::from_wire(wire.id),
1852
1853            content_size: ::fidl_next::FromWire::from_wire(wire.content_size),
1854
1855            storage_size: ::fidl_next::FromWire::from_wire(wire.storage_size),
1856
1857            link_count: ::fidl_next::FromWire::from_wire(wire.link_count),
1858
1859            creation_time: ::fidl_next::FromWire::from_wire(wire.creation_time),
1860
1861            modification_time: ::fidl_next::FromWire::from_wire(wire.modification_time),
1862        }
1863    }
1864}
1865
1866impl ::fidl_next::FromWireRef<WireNodeAttributes> for NodeAttributes {
1867    #[inline]
1868    fn from_wire_ref(wire: &WireNodeAttributes) -> Self {
1869        Self {
1870            mode: ::fidl_next::FromWireRef::from_wire_ref(&wire.mode),
1871
1872            id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
1873
1874            content_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.content_size),
1875
1876            storage_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.storage_size),
1877
1878            link_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.link_count),
1879
1880            creation_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.creation_time),
1881
1882            modification_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.modification_time),
1883        }
1884    }
1885}
1886
1887/// The wire type corresponding to [`NodeAttributes`].
1888#[derive(Clone, Debug)]
1889#[repr(C)]
1890pub struct WireNodeAttributes {
1891    pub mode: ::fidl_next::WireU32,
1892
1893    pub id: ::fidl_next::WireU64,
1894
1895    pub content_size: ::fidl_next::WireU64,
1896
1897    pub storage_size: ::fidl_next::WireU64,
1898
1899    pub link_count: ::fidl_next::WireU64,
1900
1901    pub creation_time: ::fidl_next::WireU64,
1902
1903    pub modification_time: ::fidl_next::WireU64,
1904}
1905
1906unsafe impl ::fidl_next::Wire for WireNodeAttributes {
1907    type Decoded<'de> = WireNodeAttributes;
1908
1909    #[inline]
1910    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1911        unsafe {
1912            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1913        }
1914    }
1915}
1916
1917unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeAttributes
1918where
1919    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1920{
1921    fn decode(
1922        slot: ::fidl_next::Slot<'_, Self>,
1923        decoder: &mut ___D,
1924    ) -> Result<(), ::fidl_next::DecodeError> {
1925        ::fidl_next::munge! {
1926            let Self {
1927                mut mode,
1928                mut id,
1929                mut content_size,
1930                mut storage_size,
1931                mut link_count,
1932                mut creation_time,
1933                mut modification_time,
1934
1935            } = slot;
1936        }
1937
1938        ::fidl_next::Decode::decode(mode.as_mut(), decoder)?;
1939
1940        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
1941
1942        ::fidl_next::Decode::decode(content_size.as_mut(), decoder)?;
1943
1944        ::fidl_next::Decode::decode(storage_size.as_mut(), decoder)?;
1945
1946        ::fidl_next::Decode::decode(link_count.as_mut(), decoder)?;
1947
1948        ::fidl_next::Decode::decode(creation_time.as_mut(), decoder)?;
1949
1950        ::fidl_next::Decode::decode(modification_time.as_mut(), decoder)?;
1951
1952        Ok(())
1953    }
1954}
1955
1956::fidl_next::bitflags! {
1957    #[doc = " The fields of \'attributes\' which are used to update the Node are indicated\n by the \'flags\' argument.\n"]#[derive(
1958        Clone,
1959        Copy,
1960        Debug,
1961        PartialEq,
1962        Eq,
1963        Hash,
1964    )]
1965    pub struct NodeAttributeFlags: u32 {
1966        const CREATION_TIME = 1;
1967        const MODIFICATION_TIME = 2;
1968
1969    }
1970}
1971
1972impl ::fidl_next::Encodable for NodeAttributeFlags {
1973    type Encoded = WireNodeAttributeFlags;
1974}
1975
1976unsafe impl<___E> ::fidl_next::Encode<___E> for NodeAttributeFlags
1977where
1978    ___E: ?Sized,
1979{
1980    #[inline]
1981    fn encode(
1982        self,
1983        encoder: &mut ___E,
1984        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1985    ) -> Result<(), ::fidl_next::EncodeError> {
1986        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
1987    }
1988}
1989
1990unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeAttributeFlags
1991where
1992    ___E: ?Sized,
1993{
1994    #[inline]
1995    fn encode_ref(
1996        &self,
1997        _: &mut ___E,
1998        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1999    ) -> Result<(), ::fidl_next::EncodeError> {
2000        ::fidl_next::munge!(let WireNodeAttributeFlags { value } = out);
2001        let _ = value.write(::fidl_next::WireU32::from(self.bits()));
2002        Ok(())
2003    }
2004}
2005
2006impl ::core::convert::From<WireNodeAttributeFlags> for NodeAttributeFlags {
2007    fn from(wire: WireNodeAttributeFlags) -> Self {
2008        Self::from_bits_retain(u32::from(wire.value))
2009    }
2010}
2011
2012impl ::fidl_next::FromWire<WireNodeAttributeFlags> for NodeAttributeFlags {
2013    #[inline]
2014    fn from_wire(wire: WireNodeAttributeFlags) -> Self {
2015        Self::from(wire)
2016    }
2017}
2018
2019impl ::fidl_next::FromWireRef<WireNodeAttributeFlags> for NodeAttributeFlags {
2020    #[inline]
2021    fn from_wire_ref(wire: &WireNodeAttributeFlags) -> Self {
2022        Self::from(*wire)
2023    }
2024}
2025
2026/// The wire type corresponding to [`NodeAttributeFlags`].
2027#[derive(Clone, Copy, Debug)]
2028#[repr(transparent)]
2029pub struct WireNodeAttributeFlags {
2030    value: ::fidl_next::WireU32,
2031}
2032
2033unsafe impl ::fidl_next::Wire for WireNodeAttributeFlags {
2034    type Decoded<'de> = Self;
2035
2036    #[inline]
2037    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2038        // Wire bits have no padding
2039    }
2040}
2041
2042unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeAttributeFlags
2043where
2044    ___D: ?Sized,
2045{
2046    fn decode(
2047        slot: ::fidl_next::Slot<'_, Self>,
2048        _: &mut ___D,
2049    ) -> Result<(), ::fidl_next::DecodeError> {
2050        ::fidl_next::munge!(let Self { value } = slot);
2051        let set = u32::from(*value);
2052        if set & !NodeAttributeFlags::all().bits() != 0 {
2053            return Err(::fidl_next::DecodeError::InvalidBits {
2054                expected: NodeAttributeFlags::all().bits() as usize,
2055                actual: set as usize,
2056            });
2057        }
2058
2059        Ok(())
2060    }
2061}
2062
2063impl ::core::convert::From<NodeAttributeFlags> for WireNodeAttributeFlags {
2064    fn from(natural: NodeAttributeFlags) -> Self {
2065        Self { value: ::fidl_next::WireU32::from(natural.bits()) }
2066    }
2067}
2068
2069#[derive(Clone, Debug)]
2070pub struct NodeQueryFilesystemResponse {
2071    pub s: i32,
2072
2073    pub info: Option<Box<crate::FilesystemInfo>>,
2074}
2075
2076impl ::fidl_next::Encodable for NodeQueryFilesystemResponse {
2077    type Encoded = WireNodeQueryFilesystemResponse<'static>;
2078}
2079
2080unsafe impl<___E> ::fidl_next::Encode<___E> for NodeQueryFilesystemResponse
2081where
2082    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2083
2084    ___E: ::fidl_next::Encoder,
2085{
2086    #[inline]
2087    fn encode(
2088        self,
2089        encoder: &mut ___E,
2090        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2091    ) -> Result<(), ::fidl_next::EncodeError> {
2092        ::fidl_next::munge! {
2093            let Self::Encoded {
2094                s,
2095                info,
2096
2097            } = out;
2098        }
2099
2100        ::fidl_next::Encode::encode(self.s, encoder, s)?;
2101
2102        ::fidl_next::Encode::encode(self.info, encoder, info)?;
2103
2104        Ok(())
2105    }
2106}
2107
2108unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeQueryFilesystemResponse
2109where
2110    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2111
2112    ___E: ::fidl_next::Encoder,
2113{
2114    #[inline]
2115    fn encode_ref(
2116        &self,
2117        encoder: &mut ___E,
2118        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2119    ) -> Result<(), ::fidl_next::EncodeError> {
2120        ::fidl_next::munge! {
2121            let Self::Encoded {
2122                s,
2123                info,
2124
2125            } = out;
2126        }
2127
2128        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
2129
2130        ::fidl_next::EncodeRef::encode_ref(&self.info, encoder, info)?;
2131
2132        Ok(())
2133    }
2134}
2135
2136impl ::fidl_next::EncodableOption for NodeQueryFilesystemResponse {
2137    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeQueryFilesystemResponse<'static>>;
2138}
2139
2140unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeQueryFilesystemResponse
2141where
2142    ___E: ::fidl_next::Encoder + ?Sized,
2143    NodeQueryFilesystemResponse: ::fidl_next::Encode<___E>,
2144{
2145    #[inline]
2146    fn encode_option(
2147        this: Option<Self>,
2148        encoder: &mut ___E,
2149        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2150    ) -> Result<(), ::fidl_next::EncodeError> {
2151        if let Some(inner) = this {
2152            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2153            ::fidl_next::WireBox::encode_present(out);
2154        } else {
2155            ::fidl_next::WireBox::encode_absent(out);
2156        }
2157
2158        Ok(())
2159    }
2160}
2161
2162unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeQueryFilesystemResponse
2163where
2164    ___E: ::fidl_next::Encoder + ?Sized,
2165    NodeQueryFilesystemResponse: ::fidl_next::EncodeRef<___E>,
2166{
2167    #[inline]
2168    fn encode_option_ref(
2169        this: Option<&Self>,
2170        encoder: &mut ___E,
2171        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2172    ) -> Result<(), ::fidl_next::EncodeError> {
2173        if let Some(inner) = this {
2174            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2175            ::fidl_next::WireBox::encode_present(out);
2176        } else {
2177            ::fidl_next::WireBox::encode_absent(out);
2178        }
2179
2180        Ok(())
2181    }
2182}
2183
2184impl<'de> ::fidl_next::FromWire<WireNodeQueryFilesystemResponse<'de>>
2185    for NodeQueryFilesystemResponse
2186{
2187    #[inline]
2188    fn from_wire(wire: WireNodeQueryFilesystemResponse<'de>) -> Self {
2189        Self {
2190            s: ::fidl_next::FromWire::from_wire(wire.s),
2191
2192            info: ::fidl_next::FromWire::from_wire(wire.info),
2193        }
2194    }
2195}
2196
2197impl<'de> ::fidl_next::FromWireRef<WireNodeQueryFilesystemResponse<'de>>
2198    for NodeQueryFilesystemResponse
2199{
2200    #[inline]
2201    fn from_wire_ref(wire: &WireNodeQueryFilesystemResponse<'de>) -> Self {
2202        Self {
2203            s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
2204
2205            info: ::fidl_next::FromWireRef::from_wire_ref(&wire.info),
2206        }
2207    }
2208}
2209
2210/// The wire type corresponding to [`NodeQueryFilesystemResponse`].
2211#[derive(Debug)]
2212#[repr(C)]
2213pub struct WireNodeQueryFilesystemResponse<'de> {
2214    pub s: ::fidl_next::WireI32,
2215
2216    pub info: ::fidl_next::WireBox<'de, crate::WireFilesystemInfo>,
2217}
2218
2219unsafe impl ::fidl_next::Wire for WireNodeQueryFilesystemResponse<'static> {
2220    type Decoded<'de> = WireNodeQueryFilesystemResponse<'de>;
2221
2222    #[inline]
2223    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2224        unsafe {
2225            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2226        }
2227    }
2228}
2229
2230unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeQueryFilesystemResponse<'static>
2231where
2232    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2233
2234    ___D: ::fidl_next::Decoder,
2235{
2236    fn decode(
2237        slot: ::fidl_next::Slot<'_, Self>,
2238        decoder: &mut ___D,
2239    ) -> Result<(), ::fidl_next::DecodeError> {
2240        ::fidl_next::munge! {
2241            let Self {
2242                mut s,
2243                mut info,
2244
2245            } = slot;
2246        }
2247
2248        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
2249
2250        ::fidl_next::Decode::decode(info.as_mut(), decoder)?;
2251
2252        Ok(())
2253    }
2254}
2255
2256pub type NodeUpdateAttributesResponse = ();
2257
2258/// The wire type corresponding to [`NodeUpdateAttributesResponse`].
2259pub type WireNodeUpdateAttributesResponse = ();
2260
2261pub type NodeSyncResponse = ();
2262
2263/// The wire type corresponding to [`NodeSyncResponse`].
2264pub type WireNodeSyncResponse = ();
2265
2266::fidl_next::bitflags! {
2267    #[derive(
2268        Clone,
2269        Copy,
2270        Debug,
2271        PartialEq,
2272        Eq,
2273        Hash,
2274    )]
2275    pub struct ModeType: u32 {
2276        const DO_NOT_USE = 2147483648;
2277
2278    }
2279}
2280
2281impl ::fidl_next::Encodable for ModeType {
2282    type Encoded = WireModeType;
2283}
2284
2285unsafe impl<___E> ::fidl_next::Encode<___E> for ModeType
2286where
2287    ___E: ?Sized,
2288{
2289    #[inline]
2290    fn encode(
2291        self,
2292        encoder: &mut ___E,
2293        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2294    ) -> Result<(), ::fidl_next::EncodeError> {
2295        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
2296    }
2297}
2298
2299unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ModeType
2300where
2301    ___E: ?Sized,
2302{
2303    #[inline]
2304    fn encode_ref(
2305        &self,
2306        _: &mut ___E,
2307        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2308    ) -> Result<(), ::fidl_next::EncodeError> {
2309        ::fidl_next::munge!(let WireModeType { value } = out);
2310        let _ = value.write(::fidl_next::WireU32::from(self.bits()));
2311        Ok(())
2312    }
2313}
2314
2315impl ::core::convert::From<WireModeType> for ModeType {
2316    fn from(wire: WireModeType) -> Self {
2317        Self::from_bits_retain(u32::from(wire.value))
2318    }
2319}
2320
2321impl ::fidl_next::FromWire<WireModeType> for ModeType {
2322    #[inline]
2323    fn from_wire(wire: WireModeType) -> Self {
2324        Self::from(wire)
2325    }
2326}
2327
2328impl ::fidl_next::FromWireRef<WireModeType> for ModeType {
2329    #[inline]
2330    fn from_wire_ref(wire: &WireModeType) -> Self {
2331        Self::from(*wire)
2332    }
2333}
2334
2335/// The wire type corresponding to [`ModeType`].
2336#[derive(Clone, Copy, Debug)]
2337#[repr(transparent)]
2338pub struct WireModeType {
2339    value: ::fidl_next::WireU32,
2340}
2341
2342unsafe impl ::fidl_next::Wire for WireModeType {
2343    type Decoded<'de> = Self;
2344
2345    #[inline]
2346    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2347        // Wire bits have no padding
2348    }
2349}
2350
2351unsafe impl<___D> ::fidl_next::Decode<___D> for WireModeType
2352where
2353    ___D: ?Sized,
2354{
2355    fn decode(
2356        slot: ::fidl_next::Slot<'_, Self>,
2357        _: &mut ___D,
2358    ) -> Result<(), ::fidl_next::DecodeError> {
2359        ::fidl_next::munge!(let Self { value } = slot);
2360        let set = u32::from(*value);
2361        if set & !ModeType::all().bits() != 0 {
2362            return Err(::fidl_next::DecodeError::InvalidBits {
2363                expected: ModeType::all().bits() as usize,
2364                actual: set as usize,
2365            });
2366        }
2367
2368        Ok(())
2369    }
2370}
2371
2372impl ::core::convert::From<ModeType> for WireModeType {
2373    fn from(natural: ModeType) -> Self {
2374        Self { value: ::fidl_next::WireU32::from(natural.bits()) }
2375    }
2376}
2377
2378#[doc = " The maximum length, in bytes, of a filesystem path.\n"]
2379pub const MAX_PATH_LENGTH: u64 = 4095;
2380
2381#[doc = " A path is a string of one or more components, separated by \"/\".\n E.g. `foo/bar/baz`\n\n ## Invariants\n\n A valid path must meet the following criteria:\n\n * It cannot be empty.\n * It cannot be longer than [`MAX_PATH_LENGTH`].\n * It cannot have a leading \"/\".\n * It cannot have a trailing \"/\".\n * It must be exactly \".\" OR each of its components must be a valid [`Name`].\n\n Paths should be transformed into their canonical forms at client side.\n For example, a client should convert `\"foo/bar/.././baz/\"` to `\"foo/baz\"`\n before using it as a path.\n"]
2382pub type Path = String;
2383
2384/// The wire type corresponding to [`Path`].
2385pub type WirePath<'de> = ::fidl_next::WireString<'de>;
2386
2387#[derive(Clone, Debug)]
2388#[repr(C)]
2389pub struct DirectoryReadDirentsRequest {
2390    pub max_bytes: u64,
2391}
2392
2393impl ::fidl_next::Encodable for DirectoryReadDirentsRequest {
2394    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirectoryReadDirentsRequest> = unsafe {
2395        ::fidl_next::CopyOptimization::enable_if(
2396            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2397        )
2398    };
2399
2400    type Encoded = WireDirectoryReadDirentsRequest;
2401}
2402
2403unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryReadDirentsRequest
2404where
2405    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2406{
2407    #[inline]
2408    fn encode(
2409        self,
2410        encoder: &mut ___E,
2411        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2412    ) -> Result<(), ::fidl_next::EncodeError> {
2413        ::fidl_next::munge! {
2414            let Self::Encoded {
2415                max_bytes,
2416
2417            } = out;
2418        }
2419
2420        ::fidl_next::Encode::encode(self.max_bytes, encoder, max_bytes)?;
2421
2422        Ok(())
2423    }
2424}
2425
2426unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirectoryReadDirentsRequest
2427where
2428    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2429{
2430    #[inline]
2431    fn encode_ref(
2432        &self,
2433        encoder: &mut ___E,
2434        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2435    ) -> Result<(), ::fidl_next::EncodeError> {
2436        ::fidl_next::munge! {
2437            let Self::Encoded {
2438                max_bytes,
2439
2440            } = out;
2441        }
2442
2443        ::fidl_next::EncodeRef::encode_ref(&self.max_bytes, encoder, max_bytes)?;
2444
2445        Ok(())
2446    }
2447}
2448
2449impl ::fidl_next::EncodableOption for DirectoryReadDirentsRequest {
2450    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryReadDirentsRequest>;
2451}
2452
2453unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryReadDirentsRequest
2454where
2455    ___E: ::fidl_next::Encoder + ?Sized,
2456    DirectoryReadDirentsRequest: ::fidl_next::Encode<___E>,
2457{
2458    #[inline]
2459    fn encode_option(
2460        this: Option<Self>,
2461        encoder: &mut ___E,
2462        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2463    ) -> Result<(), ::fidl_next::EncodeError> {
2464        if let Some(inner) = this {
2465            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2466            ::fidl_next::WireBox::encode_present(out);
2467        } else {
2468            ::fidl_next::WireBox::encode_absent(out);
2469        }
2470
2471        Ok(())
2472    }
2473}
2474
2475unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DirectoryReadDirentsRequest
2476where
2477    ___E: ::fidl_next::Encoder + ?Sized,
2478    DirectoryReadDirentsRequest: ::fidl_next::EncodeRef<___E>,
2479{
2480    #[inline]
2481    fn encode_option_ref(
2482        this: Option<&Self>,
2483        encoder: &mut ___E,
2484        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2485    ) -> Result<(), ::fidl_next::EncodeError> {
2486        if let Some(inner) = this {
2487            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2488            ::fidl_next::WireBox::encode_present(out);
2489        } else {
2490            ::fidl_next::WireBox::encode_absent(out);
2491        }
2492
2493        Ok(())
2494    }
2495}
2496
2497impl ::fidl_next::FromWire<WireDirectoryReadDirentsRequest> for DirectoryReadDirentsRequest {
2498    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirectoryReadDirentsRequest, Self> = unsafe {
2499        ::fidl_next::CopyOptimization::enable_if(
2500            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
2501                .is_enabled(),
2502        )
2503    };
2504
2505    #[inline]
2506    fn from_wire(wire: WireDirectoryReadDirentsRequest) -> Self {
2507        Self { max_bytes: ::fidl_next::FromWire::from_wire(wire.max_bytes) }
2508    }
2509}
2510
2511impl ::fidl_next::FromWireRef<WireDirectoryReadDirentsRequest> for DirectoryReadDirentsRequest {
2512    #[inline]
2513    fn from_wire_ref(wire: &WireDirectoryReadDirentsRequest) -> Self {
2514        Self { max_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_bytes) }
2515    }
2516}
2517
2518/// The wire type corresponding to [`DirectoryReadDirentsRequest`].
2519#[derive(Clone, Debug)]
2520#[repr(C)]
2521pub struct WireDirectoryReadDirentsRequest {
2522    pub max_bytes: ::fidl_next::WireU64,
2523}
2524
2525unsafe impl ::fidl_next::Wire for WireDirectoryReadDirentsRequest {
2526    type Decoded<'de> = WireDirectoryReadDirentsRequest;
2527
2528    #[inline]
2529    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2530}
2531
2532unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryReadDirentsRequest
2533where
2534    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2535{
2536    fn decode(
2537        slot: ::fidl_next::Slot<'_, Self>,
2538        decoder: &mut ___D,
2539    ) -> Result<(), ::fidl_next::DecodeError> {
2540        ::fidl_next::munge! {
2541            let Self {
2542                mut max_bytes,
2543
2544            } = slot;
2545        }
2546
2547        ::fidl_next::Decode::decode(max_bytes.as_mut(), decoder)?;
2548
2549        Ok(())
2550    }
2551}
2552
2553#[doc = " The maximal buffer size which can be transmitted for buffered operations.\n This capacity is currently set somewhat arbitrarily.\n"]
2554pub const MAX_BUF: u64 = 8192;
2555
2556#[derive(Clone, Debug)]
2557pub struct DirectoryReadDirentsResponse {
2558    pub s: i32,
2559
2560    pub dirents: Vec<u8>,
2561}
2562
2563impl ::fidl_next::Encodable for DirectoryReadDirentsResponse {
2564    type Encoded = WireDirectoryReadDirentsResponse<'static>;
2565}
2566
2567unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryReadDirentsResponse
2568where
2569    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2570
2571    ___E: ::fidl_next::Encoder,
2572{
2573    #[inline]
2574    fn encode(
2575        self,
2576        encoder: &mut ___E,
2577        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2578    ) -> Result<(), ::fidl_next::EncodeError> {
2579        ::fidl_next::munge! {
2580            let Self::Encoded {
2581                s,
2582                dirents,
2583
2584            } = out;
2585        }
2586
2587        ::fidl_next::Encode::encode(self.s, encoder, s)?;
2588
2589        ::fidl_next::Encode::encode(self.dirents, encoder, dirents)?;
2590
2591        Ok(())
2592    }
2593}
2594
2595unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirectoryReadDirentsResponse
2596where
2597    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2598
2599    ___E: ::fidl_next::Encoder,
2600{
2601    #[inline]
2602    fn encode_ref(
2603        &self,
2604        encoder: &mut ___E,
2605        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2606    ) -> Result<(), ::fidl_next::EncodeError> {
2607        ::fidl_next::munge! {
2608            let Self::Encoded {
2609                s,
2610                dirents,
2611
2612            } = out;
2613        }
2614
2615        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
2616
2617        ::fidl_next::EncodeRef::encode_ref(&self.dirents, encoder, dirents)?;
2618
2619        Ok(())
2620    }
2621}
2622
2623impl ::fidl_next::EncodableOption for DirectoryReadDirentsResponse {
2624    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryReadDirentsResponse<'static>>;
2625}
2626
2627unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryReadDirentsResponse
2628where
2629    ___E: ::fidl_next::Encoder + ?Sized,
2630    DirectoryReadDirentsResponse: ::fidl_next::Encode<___E>,
2631{
2632    #[inline]
2633    fn encode_option(
2634        this: Option<Self>,
2635        encoder: &mut ___E,
2636        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2637    ) -> Result<(), ::fidl_next::EncodeError> {
2638        if let Some(inner) = this {
2639            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2640            ::fidl_next::WireBox::encode_present(out);
2641        } else {
2642            ::fidl_next::WireBox::encode_absent(out);
2643        }
2644
2645        Ok(())
2646    }
2647}
2648
2649unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DirectoryReadDirentsResponse
2650where
2651    ___E: ::fidl_next::Encoder + ?Sized,
2652    DirectoryReadDirentsResponse: ::fidl_next::EncodeRef<___E>,
2653{
2654    #[inline]
2655    fn encode_option_ref(
2656        this: Option<&Self>,
2657        encoder: &mut ___E,
2658        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2659    ) -> Result<(), ::fidl_next::EncodeError> {
2660        if let Some(inner) = this {
2661            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2662            ::fidl_next::WireBox::encode_present(out);
2663        } else {
2664            ::fidl_next::WireBox::encode_absent(out);
2665        }
2666
2667        Ok(())
2668    }
2669}
2670
2671impl<'de> ::fidl_next::FromWire<WireDirectoryReadDirentsResponse<'de>>
2672    for DirectoryReadDirentsResponse
2673{
2674    #[inline]
2675    fn from_wire(wire: WireDirectoryReadDirentsResponse<'de>) -> Self {
2676        Self {
2677            s: ::fidl_next::FromWire::from_wire(wire.s),
2678
2679            dirents: ::fidl_next::FromWire::from_wire(wire.dirents),
2680        }
2681    }
2682}
2683
2684impl<'de> ::fidl_next::FromWireRef<WireDirectoryReadDirentsResponse<'de>>
2685    for DirectoryReadDirentsResponse
2686{
2687    #[inline]
2688    fn from_wire_ref(wire: &WireDirectoryReadDirentsResponse<'de>) -> Self {
2689        Self {
2690            s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
2691
2692            dirents: ::fidl_next::FromWireRef::from_wire_ref(&wire.dirents),
2693        }
2694    }
2695}
2696
2697/// The wire type corresponding to [`DirectoryReadDirentsResponse`].
2698#[derive(Debug)]
2699#[repr(C)]
2700pub struct WireDirectoryReadDirentsResponse<'de> {
2701    pub s: ::fidl_next::WireI32,
2702
2703    pub dirents: ::fidl_next::WireVector<'de, u8>,
2704}
2705
2706unsafe impl ::fidl_next::Wire for WireDirectoryReadDirentsResponse<'static> {
2707    type Decoded<'de> = WireDirectoryReadDirentsResponse<'de>;
2708
2709    #[inline]
2710    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2711        unsafe {
2712            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2713        }
2714    }
2715}
2716
2717unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryReadDirentsResponse<'static>
2718where
2719    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2720
2721    ___D: ::fidl_next::Decoder,
2722{
2723    fn decode(
2724        slot: ::fidl_next::Slot<'_, Self>,
2725        decoder: &mut ___D,
2726    ) -> Result<(), ::fidl_next::DecodeError> {
2727        ::fidl_next::munge! {
2728            let Self {
2729                mut s,
2730                mut dirents,
2731
2732            } = slot;
2733        }
2734
2735        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
2736
2737        ::fidl_next::Decode::decode(dirents.as_mut(), decoder)?;
2738
2739        let dirents = unsafe { dirents.deref_unchecked() };
2740
2741        if dirents.len() > 8192 {
2742            return Err(::fidl_next::DecodeError::VectorTooLong {
2743                size: dirents.len() as u64,
2744                limit: 8192,
2745            });
2746        }
2747
2748        Ok(())
2749    }
2750}
2751
2752#[derive(Clone, Debug)]
2753#[repr(C)]
2754pub struct DirectoryRewindResponse {
2755    pub s: i32,
2756}
2757
2758impl ::fidl_next::Encodable for DirectoryRewindResponse {
2759    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirectoryRewindResponse> = unsafe {
2760        ::fidl_next::CopyOptimization::enable_if(
2761            true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2762        )
2763    };
2764
2765    type Encoded = WireDirectoryRewindResponse;
2766}
2767
2768unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryRewindResponse
2769where
2770    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2771{
2772    #[inline]
2773    fn encode(
2774        self,
2775        encoder: &mut ___E,
2776        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2777    ) -> Result<(), ::fidl_next::EncodeError> {
2778        ::fidl_next::munge! {
2779            let Self::Encoded {
2780                s,
2781
2782            } = out;
2783        }
2784
2785        ::fidl_next::Encode::encode(self.s, encoder, s)?;
2786
2787        Ok(())
2788    }
2789}
2790
2791unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirectoryRewindResponse
2792where
2793    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2794{
2795    #[inline]
2796    fn encode_ref(
2797        &self,
2798        encoder: &mut ___E,
2799        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2800    ) -> Result<(), ::fidl_next::EncodeError> {
2801        ::fidl_next::munge! {
2802            let Self::Encoded {
2803                s,
2804
2805            } = out;
2806        }
2807
2808        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
2809
2810        Ok(())
2811    }
2812}
2813
2814impl ::fidl_next::EncodableOption for DirectoryRewindResponse {
2815    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryRewindResponse>;
2816}
2817
2818unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryRewindResponse
2819where
2820    ___E: ::fidl_next::Encoder + ?Sized,
2821    DirectoryRewindResponse: ::fidl_next::Encode<___E>,
2822{
2823    #[inline]
2824    fn encode_option(
2825        this: Option<Self>,
2826        encoder: &mut ___E,
2827        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2828    ) -> Result<(), ::fidl_next::EncodeError> {
2829        if let Some(inner) = this {
2830            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2831            ::fidl_next::WireBox::encode_present(out);
2832        } else {
2833            ::fidl_next::WireBox::encode_absent(out);
2834        }
2835
2836        Ok(())
2837    }
2838}
2839
2840unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DirectoryRewindResponse
2841where
2842    ___E: ::fidl_next::Encoder + ?Sized,
2843    DirectoryRewindResponse: ::fidl_next::EncodeRef<___E>,
2844{
2845    #[inline]
2846    fn encode_option_ref(
2847        this: Option<&Self>,
2848        encoder: &mut ___E,
2849        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2850    ) -> Result<(), ::fidl_next::EncodeError> {
2851        if let Some(inner) = this {
2852            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2853            ::fidl_next::WireBox::encode_present(out);
2854        } else {
2855            ::fidl_next::WireBox::encode_absent(out);
2856        }
2857
2858        Ok(())
2859    }
2860}
2861
2862impl ::fidl_next::FromWire<WireDirectoryRewindResponse> for DirectoryRewindResponse {
2863    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirectoryRewindResponse, Self> = unsafe {
2864        ::fidl_next::CopyOptimization::enable_if(
2865            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
2866                .is_enabled(),
2867        )
2868    };
2869
2870    #[inline]
2871    fn from_wire(wire: WireDirectoryRewindResponse) -> Self {
2872        Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2873    }
2874}
2875
2876impl ::fidl_next::FromWireRef<WireDirectoryRewindResponse> for DirectoryRewindResponse {
2877    #[inline]
2878    fn from_wire_ref(wire: &WireDirectoryRewindResponse) -> Self {
2879        Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2880    }
2881}
2882
2883/// The wire type corresponding to [`DirectoryRewindResponse`].
2884#[derive(Clone, Debug)]
2885#[repr(C)]
2886pub struct WireDirectoryRewindResponse {
2887    pub s: ::fidl_next::WireI32,
2888}
2889
2890unsafe impl ::fidl_next::Wire for WireDirectoryRewindResponse {
2891    type Decoded<'de> = WireDirectoryRewindResponse;
2892
2893    #[inline]
2894    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2895}
2896
2897unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryRewindResponse
2898where
2899    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2900{
2901    fn decode(
2902        slot: ::fidl_next::Slot<'_, Self>,
2903        decoder: &mut ___D,
2904    ) -> Result<(), ::fidl_next::DecodeError> {
2905        ::fidl_next::munge! {
2906            let Self {
2907                mut s,
2908
2909            } = slot;
2910        }
2911
2912        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
2913
2914        Ok(())
2915    }
2916}
2917
2918#[derive(Debug)]
2919#[repr(C)]
2920pub struct DirectoryGetTokenResponse {
2921    pub s: i32,
2922
2923    pub token: Option<::fidl_next::fuchsia::zx::Handle>,
2924}
2925
2926impl ::fidl_next::Encodable for DirectoryGetTokenResponse {
2927    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirectoryGetTokenResponse> = unsafe {
2928        ::fidl_next::CopyOptimization::enable_if(
2929            true
2930
2931                && <
2932                    i32 as ::fidl_next::Encodable
2933                >::COPY_OPTIMIZATION.is_enabled()
2934
2935                && <
2936                    Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::Encodable
2937                >::COPY_OPTIMIZATION.is_enabled()
2938
2939        )
2940    };
2941
2942    type Encoded = WireDirectoryGetTokenResponse;
2943}
2944
2945unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryGetTokenResponse
2946where
2947    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2948
2949    ___E: ::fidl_next::fuchsia::HandleEncoder,
2950{
2951    #[inline]
2952    fn encode(
2953        self,
2954        encoder: &mut ___E,
2955        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2956    ) -> Result<(), ::fidl_next::EncodeError> {
2957        ::fidl_next::munge! {
2958            let Self::Encoded {
2959                s,
2960                token,
2961
2962            } = out;
2963        }
2964
2965        ::fidl_next::Encode::encode(self.s, encoder, s)?;
2966
2967        ::fidl_next::Encode::encode(self.token, encoder, token)?;
2968
2969        Ok(())
2970    }
2971}
2972
2973impl ::fidl_next::EncodableOption for DirectoryGetTokenResponse {
2974    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryGetTokenResponse>;
2975}
2976
2977unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryGetTokenResponse
2978where
2979    ___E: ::fidl_next::Encoder + ?Sized,
2980    DirectoryGetTokenResponse: ::fidl_next::Encode<___E>,
2981{
2982    #[inline]
2983    fn encode_option(
2984        this: Option<Self>,
2985        encoder: &mut ___E,
2986        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2987    ) -> Result<(), ::fidl_next::EncodeError> {
2988        if let Some(inner) = this {
2989            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2990            ::fidl_next::WireBox::encode_present(out);
2991        } else {
2992            ::fidl_next::WireBox::encode_absent(out);
2993        }
2994
2995        Ok(())
2996    }
2997}
2998
2999impl ::fidl_next::FromWire<WireDirectoryGetTokenResponse> for DirectoryGetTokenResponse {
3000    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirectoryGetTokenResponse, Self> = unsafe {
3001        ::fidl_next::CopyOptimization::enable_if(
3002            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
3003                .is_enabled()
3004                && <Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::FromWire<
3005                    ::fidl_next::fuchsia::WireOptionalHandle,
3006                >>::COPY_OPTIMIZATION
3007                    .is_enabled(),
3008        )
3009    };
3010
3011    #[inline]
3012    fn from_wire(wire: WireDirectoryGetTokenResponse) -> Self {
3013        Self {
3014            s: ::fidl_next::FromWire::from_wire(wire.s),
3015
3016            token: ::fidl_next::FromWire::from_wire(wire.token),
3017        }
3018    }
3019}
3020
3021/// The wire type corresponding to [`DirectoryGetTokenResponse`].
3022#[derive(Debug)]
3023#[repr(C)]
3024pub struct WireDirectoryGetTokenResponse {
3025    pub s: ::fidl_next::WireI32,
3026
3027    pub token: ::fidl_next::fuchsia::WireOptionalHandle,
3028}
3029
3030unsafe impl ::fidl_next::Wire for WireDirectoryGetTokenResponse {
3031    type Decoded<'de> = WireDirectoryGetTokenResponse;
3032
3033    #[inline]
3034    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3035}
3036
3037unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryGetTokenResponse
3038where
3039    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3040
3041    ___D: ::fidl_next::fuchsia::HandleDecoder,
3042{
3043    fn decode(
3044        slot: ::fidl_next::Slot<'_, Self>,
3045        decoder: &mut ___D,
3046    ) -> Result<(), ::fidl_next::DecodeError> {
3047        ::fidl_next::munge! {
3048            let Self {
3049                mut s,
3050                mut token,
3051
3052            } = slot;
3053        }
3054
3055        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
3056
3057        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
3058
3059        Ok(())
3060    }
3061}
3062
3063#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
3064pub const MAX_NAME_LENGTH: u64 = 255;
3065
3066#[doc = " The type for the name of a node, i.e. a single path component.\n E.g. `foo`\n\n ## Invariants\n\n A valid node name must meet the following criteria:\n\n * It cannot be longer than [`MAX_NAME_LENGTH`].\n * It cannot be empty.\n * It cannot be \"..\" (dot-dot).\n * It cannot be \".\" (single dot).\n * It cannot contain \"/\".\n * It cannot contain embedded NUL.\n"]
3067pub type Name = String;
3068
3069/// The wire type corresponding to [`Name`].
3070pub type WireName<'de> = ::fidl_next::WireString<'de>;
3071
3072#[derive(Debug)]
3073pub struct DirectoryLinkRequest {
3074    pub src: String,
3075
3076    pub dst_parent_token: ::fidl_next::fuchsia::zx::Handle,
3077
3078    pub dst: String,
3079}
3080
3081impl ::fidl_next::Encodable for DirectoryLinkRequest {
3082    type Encoded = WireDirectoryLinkRequest<'static>;
3083}
3084
3085unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryLinkRequest
3086where
3087    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3088
3089    ___E: ::fidl_next::Encoder,
3090
3091    ___E: ::fidl_next::fuchsia::HandleEncoder,
3092{
3093    #[inline]
3094    fn encode(
3095        self,
3096        encoder: &mut ___E,
3097        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3098    ) -> Result<(), ::fidl_next::EncodeError> {
3099        ::fidl_next::munge! {
3100            let Self::Encoded {
3101                src,
3102                dst_parent_token,
3103                dst,
3104
3105            } = out;
3106        }
3107
3108        ::fidl_next::Encode::encode(self.src, encoder, src)?;
3109
3110        ::fidl_next::Encode::encode(self.dst_parent_token, encoder, dst_parent_token)?;
3111
3112        ::fidl_next::Encode::encode(self.dst, encoder, dst)?;
3113
3114        Ok(())
3115    }
3116}
3117
3118impl ::fidl_next::EncodableOption for DirectoryLinkRequest {
3119    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryLinkRequest<'static>>;
3120}
3121
3122unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryLinkRequest
3123where
3124    ___E: ::fidl_next::Encoder + ?Sized,
3125    DirectoryLinkRequest: ::fidl_next::Encode<___E>,
3126{
3127    #[inline]
3128    fn encode_option(
3129        this: Option<Self>,
3130        encoder: &mut ___E,
3131        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3132    ) -> Result<(), ::fidl_next::EncodeError> {
3133        if let Some(inner) = this {
3134            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3135            ::fidl_next::WireBox::encode_present(out);
3136        } else {
3137            ::fidl_next::WireBox::encode_absent(out);
3138        }
3139
3140        Ok(())
3141    }
3142}
3143
3144impl<'de> ::fidl_next::FromWire<WireDirectoryLinkRequest<'de>> for DirectoryLinkRequest {
3145    #[inline]
3146    fn from_wire(wire: WireDirectoryLinkRequest<'de>) -> Self {
3147        Self {
3148            src: ::fidl_next::FromWire::from_wire(wire.src),
3149
3150            dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
3151
3152            dst: ::fidl_next::FromWire::from_wire(wire.dst),
3153        }
3154    }
3155}
3156
3157/// The wire type corresponding to [`DirectoryLinkRequest`].
3158#[derive(Debug)]
3159#[repr(C)]
3160pub struct WireDirectoryLinkRequest<'de> {
3161    pub src: ::fidl_next::WireString<'de>,
3162
3163    pub dst_parent_token: ::fidl_next::fuchsia::WireHandle,
3164
3165    pub dst: ::fidl_next::WireString<'de>,
3166}
3167
3168unsafe impl ::fidl_next::Wire for WireDirectoryLinkRequest<'static> {
3169    type Decoded<'de> = WireDirectoryLinkRequest<'de>;
3170
3171    #[inline]
3172    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3173        unsafe {
3174            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
3175        }
3176    }
3177}
3178
3179unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryLinkRequest<'static>
3180where
3181    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3182
3183    ___D: ::fidl_next::Decoder,
3184
3185    ___D: ::fidl_next::fuchsia::HandleDecoder,
3186{
3187    fn decode(
3188        slot: ::fidl_next::Slot<'_, Self>,
3189        decoder: &mut ___D,
3190    ) -> Result<(), ::fidl_next::DecodeError> {
3191        ::fidl_next::munge! {
3192            let Self {
3193                mut src,
3194                mut dst_parent_token,
3195                mut dst,
3196
3197            } = slot;
3198        }
3199
3200        ::fidl_next::Decode::decode(src.as_mut(), decoder)?;
3201
3202        let src = unsafe { src.deref_unchecked() };
3203
3204        if src.len() > 255 {
3205            return Err(::fidl_next::DecodeError::VectorTooLong {
3206                size: src.len() as u64,
3207                limit: 255,
3208            });
3209        }
3210
3211        ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder)?;
3212
3213        ::fidl_next::Decode::decode(dst.as_mut(), decoder)?;
3214
3215        let dst = unsafe { dst.deref_unchecked() };
3216
3217        if dst.len() > 255 {
3218            return Err(::fidl_next::DecodeError::VectorTooLong {
3219                size: dst.len() as u64,
3220                limit: 255,
3221            });
3222        }
3223
3224        Ok(())
3225    }
3226}
3227
3228#[derive(Clone, Debug)]
3229#[repr(C)]
3230pub struct DirectoryLinkResponse {
3231    pub s: i32,
3232}
3233
3234impl ::fidl_next::Encodable for DirectoryLinkResponse {
3235    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirectoryLinkResponse> = unsafe {
3236        ::fidl_next::CopyOptimization::enable_if(
3237            true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
3238        )
3239    };
3240
3241    type Encoded = WireDirectoryLinkResponse;
3242}
3243
3244unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryLinkResponse
3245where
3246    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3247{
3248    #[inline]
3249    fn encode(
3250        self,
3251        encoder: &mut ___E,
3252        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3253    ) -> Result<(), ::fidl_next::EncodeError> {
3254        ::fidl_next::munge! {
3255            let Self::Encoded {
3256                s,
3257
3258            } = out;
3259        }
3260
3261        ::fidl_next::Encode::encode(self.s, encoder, s)?;
3262
3263        Ok(())
3264    }
3265}
3266
3267unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirectoryLinkResponse
3268where
3269    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3270{
3271    #[inline]
3272    fn encode_ref(
3273        &self,
3274        encoder: &mut ___E,
3275        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3276    ) -> Result<(), ::fidl_next::EncodeError> {
3277        ::fidl_next::munge! {
3278            let Self::Encoded {
3279                s,
3280
3281            } = out;
3282        }
3283
3284        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
3285
3286        Ok(())
3287    }
3288}
3289
3290impl ::fidl_next::EncodableOption for DirectoryLinkResponse {
3291    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryLinkResponse>;
3292}
3293
3294unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryLinkResponse
3295where
3296    ___E: ::fidl_next::Encoder + ?Sized,
3297    DirectoryLinkResponse: ::fidl_next::Encode<___E>,
3298{
3299    #[inline]
3300    fn encode_option(
3301        this: Option<Self>,
3302        encoder: &mut ___E,
3303        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3304    ) -> Result<(), ::fidl_next::EncodeError> {
3305        if let Some(inner) = this {
3306            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3307            ::fidl_next::WireBox::encode_present(out);
3308        } else {
3309            ::fidl_next::WireBox::encode_absent(out);
3310        }
3311
3312        Ok(())
3313    }
3314}
3315
3316unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DirectoryLinkResponse
3317where
3318    ___E: ::fidl_next::Encoder + ?Sized,
3319    DirectoryLinkResponse: ::fidl_next::EncodeRef<___E>,
3320{
3321    #[inline]
3322    fn encode_option_ref(
3323        this: Option<&Self>,
3324        encoder: &mut ___E,
3325        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3326    ) -> Result<(), ::fidl_next::EncodeError> {
3327        if let Some(inner) = this {
3328            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3329            ::fidl_next::WireBox::encode_present(out);
3330        } else {
3331            ::fidl_next::WireBox::encode_absent(out);
3332        }
3333
3334        Ok(())
3335    }
3336}
3337
3338impl ::fidl_next::FromWire<WireDirectoryLinkResponse> for DirectoryLinkResponse {
3339    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirectoryLinkResponse, Self> = unsafe {
3340        ::fidl_next::CopyOptimization::enable_if(
3341            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
3342                .is_enabled(),
3343        )
3344    };
3345
3346    #[inline]
3347    fn from_wire(wire: WireDirectoryLinkResponse) -> Self {
3348        Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
3349    }
3350}
3351
3352impl ::fidl_next::FromWireRef<WireDirectoryLinkResponse> for DirectoryLinkResponse {
3353    #[inline]
3354    fn from_wire_ref(wire: &WireDirectoryLinkResponse) -> Self {
3355        Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
3356    }
3357}
3358
3359/// The wire type corresponding to [`DirectoryLinkResponse`].
3360#[derive(Clone, Debug)]
3361#[repr(C)]
3362pub struct WireDirectoryLinkResponse {
3363    pub s: ::fidl_next::WireI32,
3364}
3365
3366unsafe impl ::fidl_next::Wire for WireDirectoryLinkResponse {
3367    type Decoded<'de> = WireDirectoryLinkResponse;
3368
3369    #[inline]
3370    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3371}
3372
3373unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryLinkResponse
3374where
3375    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3376{
3377    fn decode(
3378        slot: ::fidl_next::Slot<'_, Self>,
3379        decoder: &mut ___D,
3380    ) -> Result<(), ::fidl_next::DecodeError> {
3381        ::fidl_next::munge! {
3382            let Self {
3383                mut s,
3384
3385            } = slot;
3386        }
3387
3388        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
3389
3390        Ok(())
3391    }
3392}
3393
3394::fidl_next::bitflags! {
3395    #[derive(
3396        Clone,
3397        Copy,
3398        Debug,
3399        PartialEq,
3400        Eq,
3401        Hash,
3402    )]
3403    pub struct UnlinkFlags: u64 {
3404        #[doc = " If set, the unlink will fail (with ZX_ERR_NOT_DIR) if the\n object is not a directory.\n"]const MUST_BE_DIRECTORY = 1;
3405        const _ = !0;
3406    }
3407}
3408
3409impl ::fidl_next::Encodable for UnlinkFlags {
3410    type Encoded = WireUnlinkFlags;
3411}
3412
3413unsafe impl<___E> ::fidl_next::Encode<___E> for UnlinkFlags
3414where
3415    ___E: ?Sized,
3416{
3417    #[inline]
3418    fn encode(
3419        self,
3420        encoder: &mut ___E,
3421        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3422    ) -> Result<(), ::fidl_next::EncodeError> {
3423        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
3424    }
3425}
3426
3427unsafe impl<___E> ::fidl_next::EncodeRef<___E> for UnlinkFlags
3428where
3429    ___E: ?Sized,
3430{
3431    #[inline]
3432    fn encode_ref(
3433        &self,
3434        _: &mut ___E,
3435        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3436    ) -> Result<(), ::fidl_next::EncodeError> {
3437        ::fidl_next::munge!(let WireUnlinkFlags { value } = out);
3438        let _ = value.write(::fidl_next::WireU64::from(self.bits()));
3439        Ok(())
3440    }
3441}
3442
3443impl ::core::convert::From<WireUnlinkFlags> for UnlinkFlags {
3444    fn from(wire: WireUnlinkFlags) -> Self {
3445        Self::from_bits_retain(u64::from(wire.value))
3446    }
3447}
3448
3449impl ::fidl_next::FromWire<WireUnlinkFlags> for UnlinkFlags {
3450    #[inline]
3451    fn from_wire(wire: WireUnlinkFlags) -> Self {
3452        Self::from(wire)
3453    }
3454}
3455
3456impl ::fidl_next::FromWireRef<WireUnlinkFlags> for UnlinkFlags {
3457    #[inline]
3458    fn from_wire_ref(wire: &WireUnlinkFlags) -> Self {
3459        Self::from(*wire)
3460    }
3461}
3462
3463/// The wire type corresponding to [`UnlinkFlags`].
3464#[derive(Clone, Copy, Debug)]
3465#[repr(transparent)]
3466pub struct WireUnlinkFlags {
3467    value: ::fidl_next::WireU64,
3468}
3469
3470unsafe impl ::fidl_next::Wire for WireUnlinkFlags {
3471    type Decoded<'de> = Self;
3472
3473    #[inline]
3474    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3475        // Wire bits have no padding
3476    }
3477}
3478
3479unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnlinkFlags
3480where
3481    ___D: ?Sized,
3482{
3483    fn decode(
3484        slot: ::fidl_next::Slot<'_, Self>,
3485        _: &mut ___D,
3486    ) -> Result<(), ::fidl_next::DecodeError> {
3487        Ok(())
3488    }
3489}
3490
3491impl ::core::convert::From<UnlinkFlags> for WireUnlinkFlags {
3492    fn from(natural: UnlinkFlags) -> Self {
3493        Self { value: ::fidl_next::WireU64::from(natural.bits()) }
3494    }
3495}
3496
3497#[derive(Clone, Debug, Default)]
3498pub struct UnlinkOptions {
3499    pub flags: Option<crate::UnlinkFlags>,
3500}
3501
3502impl UnlinkOptions {
3503    fn __max_ordinal(&self) -> usize {
3504        if self.flags.is_some() {
3505            return 1;
3506        }
3507
3508        0
3509    }
3510}
3511
3512impl ::fidl_next::Encodable for UnlinkOptions {
3513    type Encoded = WireUnlinkOptions<'static>;
3514}
3515
3516unsafe impl<___E> ::fidl_next::Encode<___E> for UnlinkOptions
3517where
3518    ___E: ::fidl_next::Encoder + ?Sized,
3519{
3520    #[inline]
3521    fn encode(
3522        mut self,
3523        encoder: &mut ___E,
3524        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3525    ) -> Result<(), ::fidl_next::EncodeError> {
3526        ::fidl_next::munge!(let WireUnlinkOptions { table } = out);
3527
3528        let max_ord = self.__max_ordinal();
3529
3530        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3531        ::fidl_next::Wire::zero_padding(&mut out);
3532
3533        let mut preallocated =
3534            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3535
3536        for i in 1..=max_ord {
3537            match i {
3538                1 => {
3539                    if let Some(flags) = self.flags.take() {
3540                        ::fidl_next::WireEnvelope::encode_value(
3541                            flags,
3542                            preallocated.encoder,
3543                            &mut out,
3544                        )?;
3545                    } else {
3546                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
3547                    }
3548                }
3549
3550                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3551            }
3552            unsafe {
3553                preallocated.write_next(out.assume_init_ref());
3554            }
3555        }
3556
3557        ::fidl_next::WireTable::encode_len(table, max_ord);
3558
3559        Ok(())
3560    }
3561}
3562
3563unsafe impl<___E> ::fidl_next::EncodeRef<___E> for UnlinkOptions
3564where
3565    ___E: ::fidl_next::Encoder + ?Sized,
3566{
3567    #[inline]
3568    fn encode_ref(
3569        &self,
3570        encoder: &mut ___E,
3571        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3572    ) -> Result<(), ::fidl_next::EncodeError> {
3573        ::fidl_next::munge!(let WireUnlinkOptions { table } = out);
3574
3575        let max_ord = self.__max_ordinal();
3576
3577        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3578        ::fidl_next::Wire::zero_padding(&mut out);
3579
3580        let mut preallocated =
3581            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3582
3583        for i in 1..=max_ord {
3584            match i {
3585                1 => {
3586                    if let Some(flags) = &self.flags {
3587                        ::fidl_next::WireEnvelope::encode_value(
3588                            flags,
3589                            preallocated.encoder,
3590                            &mut out,
3591                        )?;
3592                    } else {
3593                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
3594                    }
3595                }
3596
3597                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3598            }
3599            unsafe {
3600                preallocated.write_next(out.assume_init_ref());
3601            }
3602        }
3603
3604        ::fidl_next::WireTable::encode_len(table, max_ord);
3605
3606        Ok(())
3607    }
3608}
3609
3610impl<'de> ::fidl_next::FromWire<WireUnlinkOptions<'de>> for UnlinkOptions {
3611    #[inline]
3612    fn from_wire(wire: WireUnlinkOptions<'de>) -> Self {
3613        let wire = ::core::mem::ManuallyDrop::new(wire);
3614
3615        let flags = wire.table.get(1);
3616
3617        Self {
3618            flags: flags.map(|envelope| {
3619                ::fidl_next::FromWire::from_wire(unsafe {
3620                    envelope.read_unchecked::<crate::WireUnlinkFlags>()
3621                })
3622            }),
3623        }
3624    }
3625}
3626
3627impl<'de> ::fidl_next::FromWireRef<WireUnlinkOptions<'de>> for UnlinkOptions {
3628    #[inline]
3629    fn from_wire_ref(wire: &WireUnlinkOptions<'de>) -> Self {
3630        Self {
3631            flags: wire.table.get(1).map(|envelope| {
3632                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3633                    envelope.deref_unchecked::<crate::WireUnlinkFlags>()
3634                })
3635            }),
3636        }
3637    }
3638}
3639
3640/// The wire type corresponding to [`UnlinkOptions`].
3641#[repr(C)]
3642pub struct WireUnlinkOptions<'de> {
3643    table: ::fidl_next::WireTable<'de>,
3644}
3645
3646impl<'de> Drop for WireUnlinkOptions<'de> {
3647    fn drop(&mut self) {
3648        let _ = self
3649            .table
3650            .get(1)
3651            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireUnlinkFlags>() });
3652    }
3653}
3654
3655unsafe impl ::fidl_next::Wire for WireUnlinkOptions<'static> {
3656    type Decoded<'de> = WireUnlinkOptions<'de>;
3657
3658    #[inline]
3659    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3660        ::fidl_next::munge!(let Self { table } = out);
3661        ::fidl_next::WireTable::zero_padding(table);
3662    }
3663}
3664
3665unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnlinkOptions<'static>
3666where
3667    ___D: ::fidl_next::Decoder + ?Sized,
3668{
3669    fn decode(
3670        slot: ::fidl_next::Slot<'_, Self>,
3671        decoder: &mut ___D,
3672    ) -> Result<(), ::fidl_next::DecodeError> {
3673        ::fidl_next::munge!(let Self { table } = slot);
3674
3675        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3676            match ordinal {
3677                0 => unsafe { ::core::hint::unreachable_unchecked() },
3678
3679                1 => {
3680                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireUnlinkFlags>(
3681                        slot.as_mut(),
3682                        decoder,
3683                    )?;
3684
3685                    Ok(())
3686                }
3687
3688                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3689            }
3690        })
3691    }
3692}
3693
3694impl<'de> WireUnlinkOptions<'de> {
3695    pub fn flags(&self) -> Option<&crate::WireUnlinkFlags> {
3696        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3697    }
3698}
3699
3700impl<'de> ::core::fmt::Debug for WireUnlinkOptions<'de> {
3701    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3702        f.debug_struct("UnlinkOptions").field("flags", &self.flags()).finish()
3703    }
3704}
3705
3706#[derive(Clone, Debug)]
3707pub struct DirectoryUnlinkRequest {
3708    pub name: String,
3709
3710    pub options: crate::UnlinkOptions,
3711}
3712
3713impl ::fidl_next::Encodable for DirectoryUnlinkRequest {
3714    type Encoded = WireDirectoryUnlinkRequest<'static>;
3715}
3716
3717unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryUnlinkRequest
3718where
3719    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3720
3721    ___E: ::fidl_next::Encoder,
3722{
3723    #[inline]
3724    fn encode(
3725        self,
3726        encoder: &mut ___E,
3727        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3728    ) -> Result<(), ::fidl_next::EncodeError> {
3729        ::fidl_next::munge! {
3730            let Self::Encoded {
3731                name,
3732                options,
3733
3734            } = out;
3735        }
3736
3737        ::fidl_next::Encode::encode(self.name, encoder, name)?;
3738
3739        ::fidl_next::Encode::encode(self.options, encoder, options)?;
3740
3741        Ok(())
3742    }
3743}
3744
3745unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirectoryUnlinkRequest
3746where
3747    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3748
3749    ___E: ::fidl_next::Encoder,
3750{
3751    #[inline]
3752    fn encode_ref(
3753        &self,
3754        encoder: &mut ___E,
3755        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3756    ) -> Result<(), ::fidl_next::EncodeError> {
3757        ::fidl_next::munge! {
3758            let Self::Encoded {
3759                name,
3760                options,
3761
3762            } = out;
3763        }
3764
3765        ::fidl_next::EncodeRef::encode_ref(&self.name, encoder, name)?;
3766
3767        ::fidl_next::EncodeRef::encode_ref(&self.options, encoder, options)?;
3768
3769        Ok(())
3770    }
3771}
3772
3773impl ::fidl_next::EncodableOption for DirectoryUnlinkRequest {
3774    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryUnlinkRequest<'static>>;
3775}
3776
3777unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryUnlinkRequest
3778where
3779    ___E: ::fidl_next::Encoder + ?Sized,
3780    DirectoryUnlinkRequest: ::fidl_next::Encode<___E>,
3781{
3782    #[inline]
3783    fn encode_option(
3784        this: Option<Self>,
3785        encoder: &mut ___E,
3786        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3787    ) -> Result<(), ::fidl_next::EncodeError> {
3788        if let Some(inner) = this {
3789            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3790            ::fidl_next::WireBox::encode_present(out);
3791        } else {
3792            ::fidl_next::WireBox::encode_absent(out);
3793        }
3794
3795        Ok(())
3796    }
3797}
3798
3799unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DirectoryUnlinkRequest
3800where
3801    ___E: ::fidl_next::Encoder + ?Sized,
3802    DirectoryUnlinkRequest: ::fidl_next::EncodeRef<___E>,
3803{
3804    #[inline]
3805    fn encode_option_ref(
3806        this: Option<&Self>,
3807        encoder: &mut ___E,
3808        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3809    ) -> Result<(), ::fidl_next::EncodeError> {
3810        if let Some(inner) = this {
3811            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3812            ::fidl_next::WireBox::encode_present(out);
3813        } else {
3814            ::fidl_next::WireBox::encode_absent(out);
3815        }
3816
3817        Ok(())
3818    }
3819}
3820
3821impl<'de> ::fidl_next::FromWire<WireDirectoryUnlinkRequest<'de>> for DirectoryUnlinkRequest {
3822    #[inline]
3823    fn from_wire(wire: WireDirectoryUnlinkRequest<'de>) -> Self {
3824        Self {
3825            name: ::fidl_next::FromWire::from_wire(wire.name),
3826
3827            options: ::fidl_next::FromWire::from_wire(wire.options),
3828        }
3829    }
3830}
3831
3832impl<'de> ::fidl_next::FromWireRef<WireDirectoryUnlinkRequest<'de>> for DirectoryUnlinkRequest {
3833    #[inline]
3834    fn from_wire_ref(wire: &WireDirectoryUnlinkRequest<'de>) -> Self {
3835        Self {
3836            name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
3837
3838            options: ::fidl_next::FromWireRef::from_wire_ref(&wire.options),
3839        }
3840    }
3841}
3842
3843/// The wire type corresponding to [`DirectoryUnlinkRequest`].
3844#[derive(Debug)]
3845#[repr(C)]
3846pub struct WireDirectoryUnlinkRequest<'de> {
3847    pub name: ::fidl_next::WireString<'de>,
3848
3849    pub options: crate::WireUnlinkOptions<'de>,
3850}
3851
3852unsafe impl ::fidl_next::Wire for WireDirectoryUnlinkRequest<'static> {
3853    type Decoded<'de> = WireDirectoryUnlinkRequest<'de>;
3854
3855    #[inline]
3856    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3857}
3858
3859unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryUnlinkRequest<'static>
3860where
3861    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3862
3863    ___D: ::fidl_next::Decoder,
3864{
3865    fn decode(
3866        slot: ::fidl_next::Slot<'_, Self>,
3867        decoder: &mut ___D,
3868    ) -> Result<(), ::fidl_next::DecodeError> {
3869        ::fidl_next::munge! {
3870            let Self {
3871                mut name,
3872                mut options,
3873
3874            } = slot;
3875        }
3876
3877        ::fidl_next::Decode::decode(name.as_mut(), decoder)?;
3878
3879        let name = unsafe { name.deref_unchecked() };
3880
3881        if name.len() > 255 {
3882            return Err(::fidl_next::DecodeError::VectorTooLong {
3883                size: name.len() as u64,
3884                limit: 255,
3885            });
3886        }
3887
3888        ::fidl_next::Decode::decode(options.as_mut(), decoder)?;
3889
3890        Ok(())
3891    }
3892}
3893
3894pub type DirectoryUnlinkResponse = ();
3895
3896/// The wire type corresponding to [`DirectoryUnlinkResponse`].
3897pub type WireDirectoryUnlinkResponse = ();
3898
3899#[doc = " The type to identify a connection to a node.\n It represents a capability: a reference to a node with associated rights.\n"]
3900pub type Token = ::fidl_next::fuchsia::zx::Handle;
3901
3902/// The wire type corresponding to [`Token`].
3903pub type WireToken = ::fidl_next::fuchsia::WireHandle;
3904
3905#[derive(Debug)]
3906pub struct DirectoryRenameRequest {
3907    pub src: String,
3908
3909    pub dst_parent_token: ::fidl_next::fuchsia::zx::Handle,
3910
3911    pub dst: String,
3912}
3913
3914impl ::fidl_next::Encodable for DirectoryRenameRequest {
3915    type Encoded = WireDirectoryRenameRequest<'static>;
3916}
3917
3918unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryRenameRequest
3919where
3920    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3921
3922    ___E: ::fidl_next::Encoder,
3923
3924    ___E: ::fidl_next::fuchsia::HandleEncoder,
3925{
3926    #[inline]
3927    fn encode(
3928        self,
3929        encoder: &mut ___E,
3930        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3931    ) -> Result<(), ::fidl_next::EncodeError> {
3932        ::fidl_next::munge! {
3933            let Self::Encoded {
3934                src,
3935                dst_parent_token,
3936                dst,
3937
3938            } = out;
3939        }
3940
3941        ::fidl_next::Encode::encode(self.src, encoder, src)?;
3942
3943        ::fidl_next::Encode::encode(self.dst_parent_token, encoder, dst_parent_token)?;
3944
3945        ::fidl_next::Encode::encode(self.dst, encoder, dst)?;
3946
3947        Ok(())
3948    }
3949}
3950
3951impl ::fidl_next::EncodableOption for DirectoryRenameRequest {
3952    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryRenameRequest<'static>>;
3953}
3954
3955unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryRenameRequest
3956where
3957    ___E: ::fidl_next::Encoder + ?Sized,
3958    DirectoryRenameRequest: ::fidl_next::Encode<___E>,
3959{
3960    #[inline]
3961    fn encode_option(
3962        this: Option<Self>,
3963        encoder: &mut ___E,
3964        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3965    ) -> Result<(), ::fidl_next::EncodeError> {
3966        if let Some(inner) = this {
3967            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3968            ::fidl_next::WireBox::encode_present(out);
3969        } else {
3970            ::fidl_next::WireBox::encode_absent(out);
3971        }
3972
3973        Ok(())
3974    }
3975}
3976
3977impl<'de> ::fidl_next::FromWire<WireDirectoryRenameRequest<'de>> for DirectoryRenameRequest {
3978    #[inline]
3979    fn from_wire(wire: WireDirectoryRenameRequest<'de>) -> Self {
3980        Self {
3981            src: ::fidl_next::FromWire::from_wire(wire.src),
3982
3983            dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
3984
3985            dst: ::fidl_next::FromWire::from_wire(wire.dst),
3986        }
3987    }
3988}
3989
3990/// The wire type corresponding to [`DirectoryRenameRequest`].
3991#[derive(Debug)]
3992#[repr(C)]
3993pub struct WireDirectoryRenameRequest<'de> {
3994    pub src: ::fidl_next::WireString<'de>,
3995
3996    pub dst_parent_token: ::fidl_next::fuchsia::WireHandle,
3997
3998    pub dst: ::fidl_next::WireString<'de>,
3999}
4000
4001unsafe impl ::fidl_next::Wire for WireDirectoryRenameRequest<'static> {
4002    type Decoded<'de> = WireDirectoryRenameRequest<'de>;
4003
4004    #[inline]
4005    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4006        unsafe {
4007            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4008        }
4009    }
4010}
4011
4012unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryRenameRequest<'static>
4013where
4014    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4015
4016    ___D: ::fidl_next::Decoder,
4017
4018    ___D: ::fidl_next::fuchsia::HandleDecoder,
4019{
4020    fn decode(
4021        slot: ::fidl_next::Slot<'_, Self>,
4022        decoder: &mut ___D,
4023    ) -> Result<(), ::fidl_next::DecodeError> {
4024        ::fidl_next::munge! {
4025            let Self {
4026                mut src,
4027                mut dst_parent_token,
4028                mut dst,
4029
4030            } = slot;
4031        }
4032
4033        ::fidl_next::Decode::decode(src.as_mut(), decoder)?;
4034
4035        let src = unsafe { src.deref_unchecked() };
4036
4037        if src.len() > 255 {
4038            return Err(::fidl_next::DecodeError::VectorTooLong {
4039                size: src.len() as u64,
4040                limit: 255,
4041            });
4042        }
4043
4044        ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder)?;
4045
4046        ::fidl_next::Decode::decode(dst.as_mut(), decoder)?;
4047
4048        let dst = unsafe { dst.deref_unchecked() };
4049
4050        if dst.len() > 255 {
4051            return Err(::fidl_next::DecodeError::VectorTooLong {
4052                size: dst.len() as u64,
4053                limit: 255,
4054            });
4055        }
4056
4057        Ok(())
4058    }
4059}
4060
4061pub type DirectoryRenameResponse = ();
4062
4063/// The wire type corresponding to [`DirectoryRenameResponse`].
4064pub type WireDirectoryRenameResponse = ();
4065
4066::fidl_next::bitflags! {
4067    #[derive(
4068        Clone,
4069        Copy,
4070        Debug,
4071        PartialEq,
4072        Eq,
4073        Hash,
4074    )]
4075    pub struct WatchMask: u32 {
4076        #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.DELETED`.\n"]const DELETED = 1;
4077        #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.ADDED`.\n"]const ADDED = 2;
4078        #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.REMOVED`.\n"]const REMOVED = 4;
4079        #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.EXISTING`.\n"]const EXISTING = 8;
4080        #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.IDLE`.\n"]const IDLE = 16;
4081
4082    }
4083}
4084
4085impl ::fidl_next::Encodable for WatchMask {
4086    type Encoded = WireWatchMask;
4087}
4088
4089unsafe impl<___E> ::fidl_next::Encode<___E> for WatchMask
4090where
4091    ___E: ?Sized,
4092{
4093    #[inline]
4094    fn encode(
4095        self,
4096        encoder: &mut ___E,
4097        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4098    ) -> Result<(), ::fidl_next::EncodeError> {
4099        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
4100    }
4101}
4102
4103unsafe impl<___E> ::fidl_next::EncodeRef<___E> for WatchMask
4104where
4105    ___E: ?Sized,
4106{
4107    #[inline]
4108    fn encode_ref(
4109        &self,
4110        _: &mut ___E,
4111        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4112    ) -> Result<(), ::fidl_next::EncodeError> {
4113        ::fidl_next::munge!(let WireWatchMask { value } = out);
4114        let _ = value.write(::fidl_next::WireU32::from(self.bits()));
4115        Ok(())
4116    }
4117}
4118
4119impl ::core::convert::From<WireWatchMask> for WatchMask {
4120    fn from(wire: WireWatchMask) -> Self {
4121        Self::from_bits_retain(u32::from(wire.value))
4122    }
4123}
4124
4125impl ::fidl_next::FromWire<WireWatchMask> for WatchMask {
4126    #[inline]
4127    fn from_wire(wire: WireWatchMask) -> Self {
4128        Self::from(wire)
4129    }
4130}
4131
4132impl ::fidl_next::FromWireRef<WireWatchMask> for WatchMask {
4133    #[inline]
4134    fn from_wire_ref(wire: &WireWatchMask) -> Self {
4135        Self::from(*wire)
4136    }
4137}
4138
4139/// The wire type corresponding to [`WatchMask`].
4140#[derive(Clone, Copy, Debug)]
4141#[repr(transparent)]
4142pub struct WireWatchMask {
4143    value: ::fidl_next::WireU32,
4144}
4145
4146unsafe impl ::fidl_next::Wire for WireWatchMask {
4147    type Decoded<'de> = Self;
4148
4149    #[inline]
4150    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
4151        // Wire bits have no padding
4152    }
4153}
4154
4155unsafe impl<___D> ::fidl_next::Decode<___D> for WireWatchMask
4156where
4157    ___D: ?Sized,
4158{
4159    fn decode(
4160        slot: ::fidl_next::Slot<'_, Self>,
4161        _: &mut ___D,
4162    ) -> Result<(), ::fidl_next::DecodeError> {
4163        ::fidl_next::munge!(let Self { value } = slot);
4164        let set = u32::from(*value);
4165        if set & !WatchMask::all().bits() != 0 {
4166            return Err(::fidl_next::DecodeError::InvalidBits {
4167                expected: WatchMask::all().bits() as usize,
4168                actual: set as usize,
4169            });
4170        }
4171
4172        Ok(())
4173    }
4174}
4175
4176impl ::core::convert::From<WatchMask> for WireWatchMask {
4177    fn from(natural: WatchMask) -> Self {
4178        Self { value: ::fidl_next::WireU32::from(natural.bits()) }
4179    }
4180}
4181
4182#[derive(Debug)]
4183#[repr(C)]
4184pub struct DirectoryWatchRequest {
4185    pub mask: crate::WatchMask,
4186
4187    pub options: u32,
4188
4189    pub watcher: ::fidl_next::ServerEnd<::fidl_next::fuchsia::zx::Channel, crate::DirectoryWatcher>,
4190}
4191
4192impl ::fidl_next::Encodable for DirectoryWatchRequest {
4193    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirectoryWatchRequest> = unsafe {
4194        ::fidl_next::CopyOptimization::enable_if(
4195            true && <crate::WatchMask as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
4196                && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
4197                && <::fidl_next::ServerEnd<
4198                    ::fidl_next::fuchsia::zx::Channel,
4199                    crate::DirectoryWatcher,
4200                > as ::fidl_next::Encodable>::COPY_OPTIMIZATION
4201                    .is_enabled(),
4202        )
4203    };
4204
4205    type Encoded = WireDirectoryWatchRequest;
4206}
4207
4208unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryWatchRequest
4209where
4210    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4211
4212    ___E: ::fidl_next::fuchsia::HandleEncoder,
4213{
4214    #[inline]
4215    fn encode(
4216        self,
4217        encoder: &mut ___E,
4218        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4219    ) -> Result<(), ::fidl_next::EncodeError> {
4220        ::fidl_next::munge! {
4221            let Self::Encoded {
4222                mask,
4223                options,
4224                watcher,
4225
4226            } = out;
4227        }
4228
4229        ::fidl_next::Encode::encode(self.mask, encoder, mask)?;
4230
4231        ::fidl_next::Encode::encode(self.options, encoder, options)?;
4232
4233        ::fidl_next::Encode::encode(self.watcher, encoder, watcher)?;
4234
4235        Ok(())
4236    }
4237}
4238
4239impl ::fidl_next::EncodableOption for DirectoryWatchRequest {
4240    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryWatchRequest>;
4241}
4242
4243unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryWatchRequest
4244where
4245    ___E: ::fidl_next::Encoder + ?Sized,
4246    DirectoryWatchRequest: ::fidl_next::Encode<___E>,
4247{
4248    #[inline]
4249    fn encode_option(
4250        this: Option<Self>,
4251        encoder: &mut ___E,
4252        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4253    ) -> Result<(), ::fidl_next::EncodeError> {
4254        if let Some(inner) = this {
4255            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4256            ::fidl_next::WireBox::encode_present(out);
4257        } else {
4258            ::fidl_next::WireBox::encode_absent(out);
4259        }
4260
4261        Ok(())
4262    }
4263}
4264
4265impl ::fidl_next::FromWire<WireDirectoryWatchRequest> for DirectoryWatchRequest {
4266    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirectoryWatchRequest, Self> = unsafe {
4267        ::fidl_next::CopyOptimization::enable_if(
4268            true
4269
4270                && <
4271                    crate::WatchMask as ::fidl_next::FromWire<crate::WireWatchMask>
4272                >::COPY_OPTIMIZATION.is_enabled()
4273
4274                && <
4275                    u32 as ::fidl_next::FromWire<::fidl_next::WireU32>
4276                >::COPY_OPTIMIZATION.is_enabled()
4277
4278                && <
4279                    ::fidl_next::ServerEnd<::fidl_next::fuchsia::zx::Channel,crate::DirectoryWatcher,
4280        > as ::fidl_next::FromWire<::fidl_next::ServerEnd<::fidl_next::fuchsia::WireChannel,crate::DirectoryWatcher,
4281        >>
4282                >::COPY_OPTIMIZATION.is_enabled()
4283
4284        )
4285    };
4286
4287    #[inline]
4288    fn from_wire(wire: WireDirectoryWatchRequest) -> Self {
4289        Self {
4290            mask: ::fidl_next::FromWire::from_wire(wire.mask),
4291
4292            options: ::fidl_next::FromWire::from_wire(wire.options),
4293
4294            watcher: ::fidl_next::FromWire::from_wire(wire.watcher),
4295        }
4296    }
4297}
4298
4299/// The wire type corresponding to [`DirectoryWatchRequest`].
4300#[derive(Debug)]
4301#[repr(C)]
4302pub struct WireDirectoryWatchRequest {
4303    pub mask: crate::WireWatchMask,
4304
4305    pub options: ::fidl_next::WireU32,
4306
4307    pub watcher: ::fidl_next::ServerEnd<::fidl_next::fuchsia::WireChannel, crate::DirectoryWatcher>,
4308}
4309
4310unsafe impl ::fidl_next::Wire for WireDirectoryWatchRequest {
4311    type Decoded<'de> = WireDirectoryWatchRequest;
4312
4313    #[inline]
4314    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
4315}
4316
4317unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryWatchRequest
4318where
4319    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4320
4321    ___D: ::fidl_next::fuchsia::HandleDecoder,
4322{
4323    fn decode(
4324        slot: ::fidl_next::Slot<'_, Self>,
4325        decoder: &mut ___D,
4326    ) -> Result<(), ::fidl_next::DecodeError> {
4327        ::fidl_next::munge! {
4328            let Self {
4329                mut mask,
4330                mut options,
4331                mut watcher,
4332
4333            } = slot;
4334        }
4335
4336        ::fidl_next::Decode::decode(mask.as_mut(), decoder)?;
4337
4338        ::fidl_next::Decode::decode(options.as_mut(), decoder)?;
4339
4340        ::fidl_next::Decode::decode(watcher.as_mut(), decoder)?;
4341
4342        Ok(())
4343    }
4344}
4345
4346#[derive(Clone, Debug)]
4347#[repr(C)]
4348pub struct DirectoryWatchResponse {
4349    pub s: i32,
4350}
4351
4352impl ::fidl_next::Encodable for DirectoryWatchResponse {
4353    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirectoryWatchResponse> = unsafe {
4354        ::fidl_next::CopyOptimization::enable_if(
4355            true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
4356        )
4357    };
4358
4359    type Encoded = WireDirectoryWatchResponse;
4360}
4361
4362unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryWatchResponse
4363where
4364    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4365{
4366    #[inline]
4367    fn encode(
4368        self,
4369        encoder: &mut ___E,
4370        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4371    ) -> Result<(), ::fidl_next::EncodeError> {
4372        ::fidl_next::munge! {
4373            let Self::Encoded {
4374                s,
4375
4376            } = out;
4377        }
4378
4379        ::fidl_next::Encode::encode(self.s, encoder, s)?;
4380
4381        Ok(())
4382    }
4383}
4384
4385unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirectoryWatchResponse
4386where
4387    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4388{
4389    #[inline]
4390    fn encode_ref(
4391        &self,
4392        encoder: &mut ___E,
4393        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4394    ) -> Result<(), ::fidl_next::EncodeError> {
4395        ::fidl_next::munge! {
4396            let Self::Encoded {
4397                s,
4398
4399            } = out;
4400        }
4401
4402        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
4403
4404        Ok(())
4405    }
4406}
4407
4408impl ::fidl_next::EncodableOption for DirectoryWatchResponse {
4409    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryWatchResponse>;
4410}
4411
4412unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryWatchResponse
4413where
4414    ___E: ::fidl_next::Encoder + ?Sized,
4415    DirectoryWatchResponse: ::fidl_next::Encode<___E>,
4416{
4417    #[inline]
4418    fn encode_option(
4419        this: Option<Self>,
4420        encoder: &mut ___E,
4421        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4422    ) -> Result<(), ::fidl_next::EncodeError> {
4423        if let Some(inner) = this {
4424            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4425            ::fidl_next::WireBox::encode_present(out);
4426        } else {
4427            ::fidl_next::WireBox::encode_absent(out);
4428        }
4429
4430        Ok(())
4431    }
4432}
4433
4434unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DirectoryWatchResponse
4435where
4436    ___E: ::fidl_next::Encoder + ?Sized,
4437    DirectoryWatchResponse: ::fidl_next::EncodeRef<___E>,
4438{
4439    #[inline]
4440    fn encode_option_ref(
4441        this: Option<&Self>,
4442        encoder: &mut ___E,
4443        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4444    ) -> Result<(), ::fidl_next::EncodeError> {
4445        if let Some(inner) = this {
4446            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4447            ::fidl_next::WireBox::encode_present(out);
4448        } else {
4449            ::fidl_next::WireBox::encode_absent(out);
4450        }
4451
4452        Ok(())
4453    }
4454}
4455
4456impl ::fidl_next::FromWire<WireDirectoryWatchResponse> for DirectoryWatchResponse {
4457    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirectoryWatchResponse, Self> = unsafe {
4458        ::fidl_next::CopyOptimization::enable_if(
4459            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
4460                .is_enabled(),
4461        )
4462    };
4463
4464    #[inline]
4465    fn from_wire(wire: WireDirectoryWatchResponse) -> Self {
4466        Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
4467    }
4468}
4469
4470impl ::fidl_next::FromWireRef<WireDirectoryWatchResponse> for DirectoryWatchResponse {
4471    #[inline]
4472    fn from_wire_ref(wire: &WireDirectoryWatchResponse) -> Self {
4473        Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
4474    }
4475}
4476
4477/// The wire type corresponding to [`DirectoryWatchResponse`].
4478#[derive(Clone, Debug)]
4479#[repr(C)]
4480pub struct WireDirectoryWatchResponse {
4481    pub s: ::fidl_next::WireI32,
4482}
4483
4484unsafe impl ::fidl_next::Wire for WireDirectoryWatchResponse {
4485    type Decoded<'de> = WireDirectoryWatchResponse;
4486
4487    #[inline]
4488    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
4489}
4490
4491unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryWatchResponse
4492where
4493    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4494{
4495    fn decode(
4496        slot: ::fidl_next::Slot<'_, Self>,
4497        decoder: &mut ___D,
4498    ) -> Result<(), ::fidl_next::DecodeError> {
4499        ::fidl_next::munge! {
4500            let Self {
4501                mut s,
4502
4503            } = slot;
4504        }
4505
4506        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
4507
4508        Ok(())
4509    }
4510}
4511
4512#[derive(Debug)]
4513pub struct NodeOnOpenRequest {
4514    pub s: i32,
4515
4516    pub info: Option<Box<crate::NodeInfoDeprecated>>,
4517}
4518
4519impl ::fidl_next::Encodable for NodeOnOpenRequest {
4520    type Encoded = WireNodeOnOpenRequest<'static>;
4521}
4522
4523unsafe impl<___E> ::fidl_next::Encode<___E> for NodeOnOpenRequest
4524where
4525    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4526
4527    ___E: ::fidl_next::Encoder,
4528
4529    ___E: ::fidl_next::fuchsia::HandleEncoder,
4530{
4531    #[inline]
4532    fn encode(
4533        self,
4534        encoder: &mut ___E,
4535        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4536    ) -> Result<(), ::fidl_next::EncodeError> {
4537        ::fidl_next::munge! {
4538            let Self::Encoded {
4539                s,
4540                info,
4541
4542            } = out;
4543        }
4544
4545        ::fidl_next::Encode::encode(self.s, encoder, s)?;
4546
4547        ::fidl_next::Encode::encode(self.info, encoder, info)?;
4548
4549        Ok(())
4550    }
4551}
4552
4553impl ::fidl_next::EncodableOption for NodeOnOpenRequest {
4554    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeOnOpenRequest<'static>>;
4555}
4556
4557unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeOnOpenRequest
4558where
4559    ___E: ::fidl_next::Encoder + ?Sized,
4560    NodeOnOpenRequest: ::fidl_next::Encode<___E>,
4561{
4562    #[inline]
4563    fn encode_option(
4564        this: Option<Self>,
4565        encoder: &mut ___E,
4566        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4567    ) -> Result<(), ::fidl_next::EncodeError> {
4568        if let Some(inner) = this {
4569            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4570            ::fidl_next::WireBox::encode_present(out);
4571        } else {
4572            ::fidl_next::WireBox::encode_absent(out);
4573        }
4574
4575        Ok(())
4576    }
4577}
4578
4579impl<'de> ::fidl_next::FromWire<WireNodeOnOpenRequest<'de>> for NodeOnOpenRequest {
4580    #[inline]
4581    fn from_wire(wire: WireNodeOnOpenRequest<'de>) -> Self {
4582        Self {
4583            s: ::fidl_next::FromWire::from_wire(wire.s),
4584
4585            info: ::fidl_next::FromWire::from_wire(wire.info),
4586        }
4587    }
4588}
4589
4590/// The wire type corresponding to [`NodeOnOpenRequest`].
4591#[derive(Debug)]
4592#[repr(C)]
4593pub struct WireNodeOnOpenRequest<'de> {
4594    pub s: ::fidl_next::WireI32,
4595
4596    pub info: crate::WireOptionalNodeInfoDeprecated<'de>,
4597}
4598
4599unsafe impl ::fidl_next::Wire for WireNodeOnOpenRequest<'static> {
4600    type Decoded<'de> = WireNodeOnOpenRequest<'de>;
4601
4602    #[inline]
4603    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4604        unsafe {
4605            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4606        }
4607    }
4608}
4609
4610unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeOnOpenRequest<'static>
4611where
4612    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4613
4614    ___D: ::fidl_next::Decoder,
4615
4616    ___D: ::fidl_next::fuchsia::HandleDecoder,
4617{
4618    fn decode(
4619        slot: ::fidl_next::Slot<'_, Self>,
4620        decoder: &mut ___D,
4621    ) -> Result<(), ::fidl_next::DecodeError> {
4622        ::fidl_next::munge! {
4623            let Self {
4624                mut s,
4625                mut info,
4626
4627            } = slot;
4628        }
4629
4630        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
4631
4632        ::fidl_next::Decode::decode(info.as_mut(), decoder)?;
4633
4634        Ok(())
4635    }
4636}
4637
4638pub type SymlinkTarget = Vec<u8>;
4639
4640/// The wire type corresponding to [`SymlinkTarget`].
4641pub type WireSymlinkTarget<'de> = ::fidl_next::WireVector<'de, u8>;
4642
4643#[derive(Debug)]
4644#[repr(C)]
4645pub struct NodeListExtendedAttributesRequest {
4646    pub iterator:
4647        ::fidl_next::ServerEnd<::fidl_next::fuchsia::zx::Channel, crate::ExtendedAttributeIterator>,
4648}
4649
4650impl ::fidl_next::Encodable for NodeListExtendedAttributesRequest {
4651    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4652        Self,
4653        WireNodeListExtendedAttributesRequest,
4654    > = unsafe {
4655        ::fidl_next::CopyOptimization::enable_if(
4656            true && <::fidl_next::ServerEnd<
4657                ::fidl_next::fuchsia::zx::Channel,
4658                crate::ExtendedAttributeIterator,
4659            > as ::fidl_next::Encodable>::COPY_OPTIMIZATION
4660                .is_enabled(),
4661        )
4662    };
4663
4664    type Encoded = WireNodeListExtendedAttributesRequest;
4665}
4666
4667unsafe impl<___E> ::fidl_next::Encode<___E> for NodeListExtendedAttributesRequest
4668where
4669    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4670
4671    ___E: ::fidl_next::fuchsia::HandleEncoder,
4672{
4673    #[inline]
4674    fn encode(
4675        self,
4676        encoder: &mut ___E,
4677        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4678    ) -> Result<(), ::fidl_next::EncodeError> {
4679        ::fidl_next::munge! {
4680            let Self::Encoded {
4681                iterator,
4682
4683            } = out;
4684        }
4685
4686        ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
4687
4688        Ok(())
4689    }
4690}
4691
4692impl ::fidl_next::EncodableOption for NodeListExtendedAttributesRequest {
4693    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeListExtendedAttributesRequest>;
4694}
4695
4696unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeListExtendedAttributesRequest
4697where
4698    ___E: ::fidl_next::Encoder + ?Sized,
4699    NodeListExtendedAttributesRequest: ::fidl_next::Encode<___E>,
4700{
4701    #[inline]
4702    fn encode_option(
4703        this: Option<Self>,
4704        encoder: &mut ___E,
4705        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4706    ) -> Result<(), ::fidl_next::EncodeError> {
4707        if let Some(inner) = this {
4708            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4709            ::fidl_next::WireBox::encode_present(out);
4710        } else {
4711            ::fidl_next::WireBox::encode_absent(out);
4712        }
4713
4714        Ok(())
4715    }
4716}
4717
4718impl ::fidl_next::FromWire<WireNodeListExtendedAttributesRequest>
4719    for NodeListExtendedAttributesRequest
4720{
4721    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4722        WireNodeListExtendedAttributesRequest,
4723        Self,
4724    > = unsafe {
4725        ::fidl_next::CopyOptimization::enable_if(
4726            true && <::fidl_next::ServerEnd<
4727                ::fidl_next::fuchsia::zx::Channel,
4728                crate::ExtendedAttributeIterator,
4729            > as ::fidl_next::FromWire<
4730                ::fidl_next::ServerEnd<
4731                    ::fidl_next::fuchsia::WireChannel,
4732                    crate::ExtendedAttributeIterator,
4733                >,
4734            >>::COPY_OPTIMIZATION
4735                .is_enabled(),
4736        )
4737    };
4738
4739    #[inline]
4740    fn from_wire(wire: WireNodeListExtendedAttributesRequest) -> Self {
4741        Self { iterator: ::fidl_next::FromWire::from_wire(wire.iterator) }
4742    }
4743}
4744
4745/// The wire type corresponding to [`NodeListExtendedAttributesRequest`].
4746#[derive(Debug)]
4747#[repr(C)]
4748pub struct WireNodeListExtendedAttributesRequest {
4749    pub iterator:
4750        ::fidl_next::ServerEnd<::fidl_next::fuchsia::WireChannel, crate::ExtendedAttributeIterator>,
4751}
4752
4753unsafe impl ::fidl_next::Wire for WireNodeListExtendedAttributesRequest {
4754    type Decoded<'de> = WireNodeListExtendedAttributesRequest;
4755
4756    #[inline]
4757    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
4758}
4759
4760unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeListExtendedAttributesRequest
4761where
4762    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4763
4764    ___D: ::fidl_next::fuchsia::HandleDecoder,
4765{
4766    fn decode(
4767        slot: ::fidl_next::Slot<'_, Self>,
4768        decoder: &mut ___D,
4769    ) -> Result<(), ::fidl_next::DecodeError> {
4770        ::fidl_next::munge! {
4771            let Self {
4772                mut iterator,
4773
4774            } = slot;
4775        }
4776
4777        ::fidl_next::Decode::decode(iterator.as_mut(), decoder)?;
4778
4779        Ok(())
4780    }
4781}
4782
4783#[doc = " The maximum size for an extended attribute name.\n"]
4784pub const MAX_ATTRIBUTE_NAME: u64 = 255;
4785
4786#[doc = " The name of an extended attribute. It can not contain any null bytes. Other\n than that and the maximum size, no particular structure is imposed on the\n name.\n"]
4787pub type ExtendedAttributeName = Vec<u8>;
4788
4789/// The wire type corresponding to [`ExtendedAttributeName`].
4790pub type WireExtendedAttributeName<'de> = ::fidl_next::WireVector<'de, u8>;
4791
4792#[derive(Clone, Debug)]
4793pub struct NodeGetExtendedAttributeRequest {
4794    pub name: Vec<u8>,
4795}
4796
4797impl ::fidl_next::Encodable for NodeGetExtendedAttributeRequest {
4798    type Encoded = WireNodeGetExtendedAttributeRequest<'static>;
4799}
4800
4801unsafe impl<___E> ::fidl_next::Encode<___E> for NodeGetExtendedAttributeRequest
4802where
4803    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4804
4805    ___E: ::fidl_next::Encoder,
4806{
4807    #[inline]
4808    fn encode(
4809        self,
4810        encoder: &mut ___E,
4811        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4812    ) -> Result<(), ::fidl_next::EncodeError> {
4813        ::fidl_next::munge! {
4814            let Self::Encoded {
4815                name,
4816
4817            } = out;
4818        }
4819
4820        ::fidl_next::Encode::encode(self.name, encoder, name)?;
4821
4822        Ok(())
4823    }
4824}
4825
4826unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeGetExtendedAttributeRequest
4827where
4828    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4829
4830    ___E: ::fidl_next::Encoder,
4831{
4832    #[inline]
4833    fn encode_ref(
4834        &self,
4835        encoder: &mut ___E,
4836        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4837    ) -> Result<(), ::fidl_next::EncodeError> {
4838        ::fidl_next::munge! {
4839            let Self::Encoded {
4840                name,
4841
4842            } = out;
4843        }
4844
4845        ::fidl_next::EncodeRef::encode_ref(&self.name, encoder, name)?;
4846
4847        Ok(())
4848    }
4849}
4850
4851impl ::fidl_next::EncodableOption for NodeGetExtendedAttributeRequest {
4852    type EncodedOption =
4853        ::fidl_next::WireBox<'static, WireNodeGetExtendedAttributeRequest<'static>>;
4854}
4855
4856unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeGetExtendedAttributeRequest
4857where
4858    ___E: ::fidl_next::Encoder + ?Sized,
4859    NodeGetExtendedAttributeRequest: ::fidl_next::Encode<___E>,
4860{
4861    #[inline]
4862    fn encode_option(
4863        this: Option<Self>,
4864        encoder: &mut ___E,
4865        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4866    ) -> Result<(), ::fidl_next::EncodeError> {
4867        if let Some(inner) = this {
4868            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4869            ::fidl_next::WireBox::encode_present(out);
4870        } else {
4871            ::fidl_next::WireBox::encode_absent(out);
4872        }
4873
4874        Ok(())
4875    }
4876}
4877
4878unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeGetExtendedAttributeRequest
4879where
4880    ___E: ::fidl_next::Encoder + ?Sized,
4881    NodeGetExtendedAttributeRequest: ::fidl_next::EncodeRef<___E>,
4882{
4883    #[inline]
4884    fn encode_option_ref(
4885        this: Option<&Self>,
4886        encoder: &mut ___E,
4887        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4888    ) -> Result<(), ::fidl_next::EncodeError> {
4889        if let Some(inner) = this {
4890            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4891            ::fidl_next::WireBox::encode_present(out);
4892        } else {
4893            ::fidl_next::WireBox::encode_absent(out);
4894        }
4895
4896        Ok(())
4897    }
4898}
4899
4900impl<'de> ::fidl_next::FromWire<WireNodeGetExtendedAttributeRequest<'de>>
4901    for NodeGetExtendedAttributeRequest
4902{
4903    #[inline]
4904    fn from_wire(wire: WireNodeGetExtendedAttributeRequest<'de>) -> Self {
4905        Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
4906    }
4907}
4908
4909impl<'de> ::fidl_next::FromWireRef<WireNodeGetExtendedAttributeRequest<'de>>
4910    for NodeGetExtendedAttributeRequest
4911{
4912    #[inline]
4913    fn from_wire_ref(wire: &WireNodeGetExtendedAttributeRequest<'de>) -> Self {
4914        Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
4915    }
4916}
4917
4918/// The wire type corresponding to [`NodeGetExtendedAttributeRequest`].
4919#[derive(Debug)]
4920#[repr(C)]
4921pub struct WireNodeGetExtendedAttributeRequest<'de> {
4922    pub name: ::fidl_next::WireVector<'de, u8>,
4923}
4924
4925unsafe impl ::fidl_next::Wire for WireNodeGetExtendedAttributeRequest<'static> {
4926    type Decoded<'de> = WireNodeGetExtendedAttributeRequest<'de>;
4927
4928    #[inline]
4929    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
4930}
4931
4932unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeGetExtendedAttributeRequest<'static>
4933where
4934    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4935
4936    ___D: ::fidl_next::Decoder,
4937{
4938    fn decode(
4939        slot: ::fidl_next::Slot<'_, Self>,
4940        decoder: &mut ___D,
4941    ) -> Result<(), ::fidl_next::DecodeError> {
4942        ::fidl_next::munge! {
4943            let Self {
4944                mut name,
4945
4946            } = slot;
4947        }
4948
4949        ::fidl_next::Decode::decode(name.as_mut(), decoder)?;
4950
4951        let name = unsafe { name.deref_unchecked() };
4952
4953        if name.len() > 255 {
4954            return Err(::fidl_next::DecodeError::VectorTooLong {
4955                size: name.len() as u64,
4956                limit: 255,
4957            });
4958        }
4959
4960        Ok(())
4961    }
4962}
4963
4964#[doc = " The maximum size for an extended attribute value to be included inline.\n Values larger than this size are passed in a vmo.\n"]
4965pub const MAX_INLINE_ATTRIBUTE_VALUE: u64 = 32768;
4966
4967#[doc = " The value type for an extended attribute. If the value is less than 32768\n bytes, then it is included inline. Values larger than this size are written\n into a vmo buffer.\n"]
4968#[derive(Debug)]
4969pub enum ExtendedAttributeValue {
4970    Bytes(Vec<u8>),
4971
4972    Buffer(::fidl_next::fuchsia::zx::Handle),
4973
4974    UnknownOrdinal_(u64),
4975}
4976
4977impl ::fidl_next::Encodable for ExtendedAttributeValue {
4978    type Encoded = WireExtendedAttributeValue<'static>;
4979}
4980
4981unsafe impl<___E> ::fidl_next::Encode<___E> for ExtendedAttributeValue
4982where
4983    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4984
4985    ___E: ::fidl_next::Encoder,
4986
4987    ___E: ::fidl_next::fuchsia::HandleEncoder,
4988{
4989    #[inline]
4990    fn encode(
4991        self,
4992        encoder: &mut ___E,
4993        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4994    ) -> Result<(), ::fidl_next::EncodeError> {
4995        ::fidl_next::munge!(let WireExtendedAttributeValue { raw, _phantom: _ } = out);
4996
4997        match self {
4998            Self::Bytes(value) => {
4999                ::fidl_next::RawWireUnion::encode_as::<___E, Vec<u8>>(value, 1, encoder, raw)?
5000            }
5001
5002            Self::Buffer(value) => ::fidl_next::RawWireUnion::encode_as::<
5003                ___E,
5004                ::fidl_next::fuchsia::zx::Handle,
5005            >(value, 2, encoder, raw)?,
5006
5007            Self::UnknownOrdinal_(ordinal) => {
5008                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize))
5009            }
5010        }
5011
5012        Ok(())
5013    }
5014}
5015
5016impl ::fidl_next::EncodableOption for ExtendedAttributeValue {
5017    type EncodedOption = WireOptionalExtendedAttributeValue<'static>;
5018}
5019
5020unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ExtendedAttributeValue
5021where
5022    ___E: ?Sized,
5023    ExtendedAttributeValue: ::fidl_next::Encode<___E>,
5024{
5025    #[inline]
5026    fn encode_option(
5027        this: Option<Self>,
5028        encoder: &mut ___E,
5029        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5030    ) -> Result<(), ::fidl_next::EncodeError> {
5031        ::fidl_next::munge!(let WireOptionalExtendedAttributeValue { raw, _phantom: _ } = &mut *out);
5032
5033        if let Some(inner) = this {
5034            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
5035            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
5036        } else {
5037            ::fidl_next::RawWireUnion::encode_absent(raw);
5038        }
5039
5040        Ok(())
5041    }
5042}
5043
5044impl<'de> ::fidl_next::FromWire<WireExtendedAttributeValue<'de>> for ExtendedAttributeValue {
5045    #[inline]
5046    fn from_wire(wire: WireExtendedAttributeValue<'de>) -> Self {
5047        let wire = ::core::mem::ManuallyDrop::new(wire);
5048        match wire.raw.ordinal() {
5049            1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
5050                wire.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>()
5051            })),
5052
5053            2 => Self::Buffer(::fidl_next::FromWire::from_wire(unsafe {
5054                wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireHandle>()
5055            })),
5056
5057            _ => unsafe { ::core::hint::unreachable_unchecked() },
5058        }
5059    }
5060}
5061
5062impl<'de> ::fidl_next::FromWireOption<WireOptionalExtendedAttributeValue<'de>>
5063    for Box<ExtendedAttributeValue>
5064{
5065    #[inline]
5066    fn from_wire_option(wire: WireOptionalExtendedAttributeValue<'de>) -> Option<Self> {
5067        if let Some(inner) = wire.into_option() {
5068            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
5069        } else {
5070            None
5071        }
5072    }
5073}
5074
5075/// The wire type corresponding to [`ExtendedAttributeValue`].
5076#[repr(transparent)]
5077pub struct WireExtendedAttributeValue<'de> {
5078    raw: ::fidl_next::RawWireUnion,
5079    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5080}
5081
5082impl<'de> Drop for WireExtendedAttributeValue<'de> {
5083    fn drop(&mut self) {
5084        match self.raw.ordinal() {
5085            1 => {
5086                let _ =
5087                    unsafe { self.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>() };
5088            }
5089
5090            2 => {
5091                let _ =
5092                    unsafe { self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireHandle>() };
5093            }
5094
5095            _ => (),
5096        }
5097    }
5098}
5099
5100unsafe impl ::fidl_next::Wire for WireExtendedAttributeValue<'static> {
5101    type Decoded<'de> = WireExtendedAttributeValue<'de>;
5102
5103    #[inline]
5104    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5105        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5106        ::fidl_next::RawWireUnion::zero_padding(raw);
5107    }
5108}
5109
5110pub mod extended_attribute_value {
5111    pub enum Ref<'de> {
5112        Bytes(&'de ::fidl_next::WireVector<'de, u8>),
5113
5114        Buffer(&'de ::fidl_next::fuchsia::WireHandle),
5115
5116        UnknownOrdinal_(u64),
5117    }
5118}
5119
5120impl<'de> WireExtendedAttributeValue<'de> {
5121    pub fn as_ref(&self) -> crate::extended_attribute_value::Ref<'_> {
5122        match self.raw.ordinal() {
5123            1 => crate::extended_attribute_value::Ref::Bytes(unsafe {
5124                self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
5125            }),
5126
5127            2 => crate::extended_attribute_value::Ref::Buffer(unsafe {
5128                self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireHandle>()
5129            }),
5130
5131            unknown => crate::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
5132        }
5133    }
5134}
5135
5136unsafe impl<___D> ::fidl_next::Decode<___D> for WireExtendedAttributeValue<'static>
5137where
5138    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5139
5140    ___D: ::fidl_next::Decoder,
5141
5142    ___D: ::fidl_next::fuchsia::HandleDecoder,
5143{
5144    fn decode(
5145        mut slot: ::fidl_next::Slot<'_, Self>,
5146        decoder: &mut ___D,
5147    ) -> Result<(), ::fidl_next::DecodeError> {
5148        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5149        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5150            1 => {
5151                ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireVector<'static, u8>>(
5152                    raw, decoder,
5153                )?
5154            }
5155
5156            2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
5157                raw, decoder,
5158            )?,
5159
5160            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5161        }
5162
5163        Ok(())
5164    }
5165}
5166
5167impl<'de> ::core::fmt::Debug for WireExtendedAttributeValue<'de> {
5168    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5169        match self.raw.ordinal() {
5170            1 => unsafe {
5171                self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>().fmt(f)
5172            },
5173            2 => unsafe {
5174                self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireHandle>().fmt(f)
5175            },
5176            _ => unsafe { ::core::hint::unreachable_unchecked() },
5177        }
5178    }
5179}
5180
5181#[repr(transparent)]
5182pub struct WireOptionalExtendedAttributeValue<'de> {
5183    raw: ::fidl_next::RawWireUnion,
5184    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5185}
5186
5187unsafe impl ::fidl_next::Wire for WireOptionalExtendedAttributeValue<'static> {
5188    type Decoded<'de> = WireOptionalExtendedAttributeValue<'de>;
5189
5190    #[inline]
5191    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5192        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5193        ::fidl_next::RawWireUnion::zero_padding(raw);
5194    }
5195}
5196
5197impl<'de> WireOptionalExtendedAttributeValue<'de> {
5198    pub fn is_some(&self) -> bool {
5199        self.raw.is_some()
5200    }
5201
5202    pub fn is_none(&self) -> bool {
5203        self.raw.is_none()
5204    }
5205
5206    pub fn as_ref(&self) -> Option<&WireExtendedAttributeValue<'de>> {
5207        if self.is_some() {
5208            Some(unsafe { &*(self as *const Self).cast() })
5209        } else {
5210            None
5211        }
5212    }
5213
5214    pub fn into_option(self) -> Option<WireExtendedAttributeValue<'de>> {
5215        if self.is_some() {
5216            Some(WireExtendedAttributeValue {
5217                raw: self.raw,
5218                _phantom: ::core::marker::PhantomData,
5219            })
5220        } else {
5221            None
5222        }
5223    }
5224}
5225
5226unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalExtendedAttributeValue<'static>
5227where
5228    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5229
5230    ___D: ::fidl_next::Decoder,
5231
5232    ___D: ::fidl_next::fuchsia::HandleDecoder,
5233{
5234    fn decode(
5235        mut slot: ::fidl_next::Slot<'_, Self>,
5236        decoder: &mut ___D,
5237    ) -> Result<(), ::fidl_next::DecodeError> {
5238        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5239        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5240            1 => {
5241                ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireVector<'static, u8>>(
5242                    raw, decoder,
5243                )?
5244            }
5245
5246            2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
5247                raw, decoder,
5248            )?,
5249
5250            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
5251            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5252        }
5253
5254        Ok(())
5255    }
5256}
5257
5258impl<'de> ::core::fmt::Debug for WireOptionalExtendedAttributeValue<'de> {
5259    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5260        self.as_ref().fmt(f)
5261    }
5262}
5263
5264#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5265#[repr(u32)]
5266pub enum SetExtendedAttributeMode {
5267    Set = 1,
5268    Create = 2,
5269    Replace = 3,
5270}
5271
5272impl ::fidl_next::Encodable for SetExtendedAttributeMode {
5273    type Encoded = WireSetExtendedAttributeMode;
5274}
5275impl ::std::convert::TryFrom<u32> for SetExtendedAttributeMode {
5276    type Error = ::fidl_next::UnknownStrictEnumMemberError;
5277    fn try_from(value: u32) -> Result<Self, Self::Error> {
5278        match value {
5279            1 => Ok(Self::Set),
5280            2 => Ok(Self::Create),
5281            3 => Ok(Self::Replace),
5282
5283            _ => Err(Self::Error::new(value.into())),
5284        }
5285    }
5286}
5287
5288unsafe impl<___E> ::fidl_next::Encode<___E> for SetExtendedAttributeMode
5289where
5290    ___E: ?Sized,
5291{
5292    #[inline]
5293    fn encode(
5294        self,
5295        encoder: &mut ___E,
5296        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5297    ) -> Result<(), ::fidl_next::EncodeError> {
5298        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
5299    }
5300}
5301
5302unsafe impl<___E> ::fidl_next::EncodeRef<___E> for SetExtendedAttributeMode
5303where
5304    ___E: ?Sized,
5305{
5306    #[inline]
5307    fn encode_ref(
5308        &self,
5309        encoder: &mut ___E,
5310        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5311    ) -> Result<(), ::fidl_next::EncodeError> {
5312        ::fidl_next::munge!(let WireSetExtendedAttributeMode { value } = out);
5313        let _ = value.write(::fidl_next::WireU32::from(match *self {
5314            Self::Set => 1,
5315
5316            Self::Create => 2,
5317
5318            Self::Replace => 3,
5319        }));
5320
5321        Ok(())
5322    }
5323}
5324
5325impl ::core::convert::From<WireSetExtendedAttributeMode> for SetExtendedAttributeMode {
5326    fn from(wire: WireSetExtendedAttributeMode) -> Self {
5327        match u32::from(wire.value) {
5328            1 => Self::Set,
5329
5330            2 => Self::Create,
5331
5332            3 => Self::Replace,
5333
5334            _ => unsafe { ::core::hint::unreachable_unchecked() },
5335        }
5336    }
5337}
5338
5339impl ::fidl_next::FromWire<WireSetExtendedAttributeMode> for SetExtendedAttributeMode {
5340    #[inline]
5341    fn from_wire(wire: WireSetExtendedAttributeMode) -> Self {
5342        Self::from(wire)
5343    }
5344}
5345
5346impl ::fidl_next::FromWireRef<WireSetExtendedAttributeMode> for SetExtendedAttributeMode {
5347    #[inline]
5348    fn from_wire_ref(wire: &WireSetExtendedAttributeMode) -> Self {
5349        Self::from(*wire)
5350    }
5351}
5352
5353/// The wire type corresponding to [`SetExtendedAttributeMode`].
5354#[derive(Clone, Copy, Debug, PartialEq, Eq)]
5355#[repr(transparent)]
5356pub struct WireSetExtendedAttributeMode {
5357    value: ::fidl_next::WireU32,
5358}
5359
5360unsafe impl ::fidl_next::Wire for WireSetExtendedAttributeMode {
5361    type Decoded<'de> = Self;
5362
5363    #[inline]
5364    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
5365        // Wire enums have no padding
5366    }
5367}
5368
5369impl WireSetExtendedAttributeMode {
5370    pub const SET: WireSetExtendedAttributeMode =
5371        WireSetExtendedAttributeMode { value: ::fidl_next::WireU32(1) };
5372
5373    pub const CREATE: WireSetExtendedAttributeMode =
5374        WireSetExtendedAttributeMode { value: ::fidl_next::WireU32(2) };
5375
5376    pub const REPLACE: WireSetExtendedAttributeMode =
5377        WireSetExtendedAttributeMode { value: ::fidl_next::WireU32(3) };
5378}
5379
5380unsafe impl<___D> ::fidl_next::Decode<___D> for WireSetExtendedAttributeMode
5381where
5382    ___D: ?Sized,
5383{
5384    fn decode(
5385        slot: ::fidl_next::Slot<'_, Self>,
5386        _: &mut ___D,
5387    ) -> Result<(), ::fidl_next::DecodeError> {
5388        ::fidl_next::munge!(let Self { value } = slot);
5389
5390        match u32::from(*value) {
5391            1 | 2 | 3 => (),
5392            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
5393        }
5394
5395        Ok(())
5396    }
5397}
5398
5399impl ::core::convert::From<SetExtendedAttributeMode> for WireSetExtendedAttributeMode {
5400    fn from(natural: SetExtendedAttributeMode) -> Self {
5401        match natural {
5402            SetExtendedAttributeMode::Set => WireSetExtendedAttributeMode::SET,
5403
5404            SetExtendedAttributeMode::Create => WireSetExtendedAttributeMode::CREATE,
5405
5406            SetExtendedAttributeMode::Replace => WireSetExtendedAttributeMode::REPLACE,
5407        }
5408    }
5409}
5410
5411#[derive(Debug)]
5412pub struct NodeSetExtendedAttributeRequest {
5413    pub name: Vec<u8>,
5414
5415    pub value: crate::ExtendedAttributeValue,
5416
5417    pub mode: crate::SetExtendedAttributeMode,
5418}
5419
5420impl ::fidl_next::Encodable for NodeSetExtendedAttributeRequest {
5421    type Encoded = WireNodeSetExtendedAttributeRequest<'static>;
5422}
5423
5424unsafe impl<___E> ::fidl_next::Encode<___E> for NodeSetExtendedAttributeRequest
5425where
5426    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5427
5428    ___E: ::fidl_next::Encoder,
5429
5430    ___E: ::fidl_next::fuchsia::HandleEncoder,
5431{
5432    #[inline]
5433    fn encode(
5434        self,
5435        encoder: &mut ___E,
5436        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5437    ) -> Result<(), ::fidl_next::EncodeError> {
5438        ::fidl_next::munge! {
5439            let Self::Encoded {
5440                name,
5441                value,
5442                mode,
5443
5444            } = out;
5445        }
5446
5447        ::fidl_next::Encode::encode(self.name, encoder, name)?;
5448
5449        ::fidl_next::Encode::encode(self.value, encoder, value)?;
5450
5451        ::fidl_next::Encode::encode(self.mode, encoder, mode)?;
5452
5453        Ok(())
5454    }
5455}
5456
5457impl ::fidl_next::EncodableOption for NodeSetExtendedAttributeRequest {
5458    type EncodedOption =
5459        ::fidl_next::WireBox<'static, WireNodeSetExtendedAttributeRequest<'static>>;
5460}
5461
5462unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeSetExtendedAttributeRequest
5463where
5464    ___E: ::fidl_next::Encoder + ?Sized,
5465    NodeSetExtendedAttributeRequest: ::fidl_next::Encode<___E>,
5466{
5467    #[inline]
5468    fn encode_option(
5469        this: Option<Self>,
5470        encoder: &mut ___E,
5471        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5472    ) -> Result<(), ::fidl_next::EncodeError> {
5473        if let Some(inner) = this {
5474            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5475            ::fidl_next::WireBox::encode_present(out);
5476        } else {
5477            ::fidl_next::WireBox::encode_absent(out);
5478        }
5479
5480        Ok(())
5481    }
5482}
5483
5484impl<'de> ::fidl_next::FromWire<WireNodeSetExtendedAttributeRequest<'de>>
5485    for NodeSetExtendedAttributeRequest
5486{
5487    #[inline]
5488    fn from_wire(wire: WireNodeSetExtendedAttributeRequest<'de>) -> Self {
5489        Self {
5490            name: ::fidl_next::FromWire::from_wire(wire.name),
5491
5492            value: ::fidl_next::FromWire::from_wire(wire.value),
5493
5494            mode: ::fidl_next::FromWire::from_wire(wire.mode),
5495        }
5496    }
5497}
5498
5499/// The wire type corresponding to [`NodeSetExtendedAttributeRequest`].
5500#[derive(Debug)]
5501#[repr(C)]
5502pub struct WireNodeSetExtendedAttributeRequest<'de> {
5503    pub name: ::fidl_next::WireVector<'de, u8>,
5504
5505    pub value: crate::WireExtendedAttributeValue<'de>,
5506
5507    pub mode: crate::WireSetExtendedAttributeMode,
5508}
5509
5510unsafe impl ::fidl_next::Wire for WireNodeSetExtendedAttributeRequest<'static> {
5511    type Decoded<'de> = WireNodeSetExtendedAttributeRequest<'de>;
5512
5513    #[inline]
5514    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5515        unsafe {
5516            out.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
5517        }
5518    }
5519}
5520
5521unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeSetExtendedAttributeRequest<'static>
5522where
5523    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5524
5525    ___D: ::fidl_next::Decoder,
5526
5527    ___D: ::fidl_next::fuchsia::HandleDecoder,
5528{
5529    fn decode(
5530        slot: ::fidl_next::Slot<'_, Self>,
5531        decoder: &mut ___D,
5532    ) -> Result<(), ::fidl_next::DecodeError> {
5533        ::fidl_next::munge! {
5534            let Self {
5535                mut name,
5536                mut value,
5537                mut mode,
5538
5539            } = slot;
5540        }
5541
5542        ::fidl_next::Decode::decode(name.as_mut(), decoder)?;
5543
5544        let name = unsafe { name.deref_unchecked() };
5545
5546        if name.len() > 255 {
5547            return Err(::fidl_next::DecodeError::VectorTooLong {
5548                size: name.len() as u64,
5549                limit: 255,
5550            });
5551        }
5552
5553        ::fidl_next::Decode::decode(value.as_mut(), decoder)?;
5554
5555        ::fidl_next::Decode::decode(mode.as_mut(), decoder)?;
5556
5557        Ok(())
5558    }
5559}
5560
5561pub type NodeSetExtendedAttributeResponse = ();
5562
5563/// The wire type corresponding to [`NodeSetExtendedAttributeResponse`].
5564pub type WireNodeSetExtendedAttributeResponse = ();
5565
5566#[derive(Clone, Debug)]
5567pub struct NodeRemoveExtendedAttributeRequest {
5568    pub name: Vec<u8>,
5569}
5570
5571impl ::fidl_next::Encodable for NodeRemoveExtendedAttributeRequest {
5572    type Encoded = WireNodeRemoveExtendedAttributeRequest<'static>;
5573}
5574
5575unsafe impl<___E> ::fidl_next::Encode<___E> for NodeRemoveExtendedAttributeRequest
5576where
5577    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5578
5579    ___E: ::fidl_next::Encoder,
5580{
5581    #[inline]
5582    fn encode(
5583        self,
5584        encoder: &mut ___E,
5585        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5586    ) -> Result<(), ::fidl_next::EncodeError> {
5587        ::fidl_next::munge! {
5588            let Self::Encoded {
5589                name,
5590
5591            } = out;
5592        }
5593
5594        ::fidl_next::Encode::encode(self.name, encoder, name)?;
5595
5596        Ok(())
5597    }
5598}
5599
5600unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeRemoveExtendedAttributeRequest
5601where
5602    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5603
5604    ___E: ::fidl_next::Encoder,
5605{
5606    #[inline]
5607    fn encode_ref(
5608        &self,
5609        encoder: &mut ___E,
5610        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5611    ) -> Result<(), ::fidl_next::EncodeError> {
5612        ::fidl_next::munge! {
5613            let Self::Encoded {
5614                name,
5615
5616            } = out;
5617        }
5618
5619        ::fidl_next::EncodeRef::encode_ref(&self.name, encoder, name)?;
5620
5621        Ok(())
5622    }
5623}
5624
5625impl ::fidl_next::EncodableOption for NodeRemoveExtendedAttributeRequest {
5626    type EncodedOption =
5627        ::fidl_next::WireBox<'static, WireNodeRemoveExtendedAttributeRequest<'static>>;
5628}
5629
5630unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeRemoveExtendedAttributeRequest
5631where
5632    ___E: ::fidl_next::Encoder + ?Sized,
5633    NodeRemoveExtendedAttributeRequest: ::fidl_next::Encode<___E>,
5634{
5635    #[inline]
5636    fn encode_option(
5637        this: Option<Self>,
5638        encoder: &mut ___E,
5639        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5640    ) -> Result<(), ::fidl_next::EncodeError> {
5641        if let Some(inner) = this {
5642            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5643            ::fidl_next::WireBox::encode_present(out);
5644        } else {
5645            ::fidl_next::WireBox::encode_absent(out);
5646        }
5647
5648        Ok(())
5649    }
5650}
5651
5652unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeRemoveExtendedAttributeRequest
5653where
5654    ___E: ::fidl_next::Encoder + ?Sized,
5655    NodeRemoveExtendedAttributeRequest: ::fidl_next::EncodeRef<___E>,
5656{
5657    #[inline]
5658    fn encode_option_ref(
5659        this: Option<&Self>,
5660        encoder: &mut ___E,
5661        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5662    ) -> Result<(), ::fidl_next::EncodeError> {
5663        if let Some(inner) = this {
5664            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5665            ::fidl_next::WireBox::encode_present(out);
5666        } else {
5667            ::fidl_next::WireBox::encode_absent(out);
5668        }
5669
5670        Ok(())
5671    }
5672}
5673
5674impl<'de> ::fidl_next::FromWire<WireNodeRemoveExtendedAttributeRequest<'de>>
5675    for NodeRemoveExtendedAttributeRequest
5676{
5677    #[inline]
5678    fn from_wire(wire: WireNodeRemoveExtendedAttributeRequest<'de>) -> Self {
5679        Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
5680    }
5681}
5682
5683impl<'de> ::fidl_next::FromWireRef<WireNodeRemoveExtendedAttributeRequest<'de>>
5684    for NodeRemoveExtendedAttributeRequest
5685{
5686    #[inline]
5687    fn from_wire_ref(wire: &WireNodeRemoveExtendedAttributeRequest<'de>) -> Self {
5688        Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
5689    }
5690}
5691
5692/// The wire type corresponding to [`NodeRemoveExtendedAttributeRequest`].
5693#[derive(Debug)]
5694#[repr(C)]
5695pub struct WireNodeRemoveExtendedAttributeRequest<'de> {
5696    pub name: ::fidl_next::WireVector<'de, u8>,
5697}
5698
5699unsafe impl ::fidl_next::Wire for WireNodeRemoveExtendedAttributeRequest<'static> {
5700    type Decoded<'de> = WireNodeRemoveExtendedAttributeRequest<'de>;
5701
5702    #[inline]
5703    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
5704}
5705
5706unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeRemoveExtendedAttributeRequest<'static>
5707where
5708    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5709
5710    ___D: ::fidl_next::Decoder,
5711{
5712    fn decode(
5713        slot: ::fidl_next::Slot<'_, Self>,
5714        decoder: &mut ___D,
5715    ) -> Result<(), ::fidl_next::DecodeError> {
5716        ::fidl_next::munge! {
5717            let Self {
5718                mut name,
5719
5720            } = slot;
5721        }
5722
5723        ::fidl_next::Decode::decode(name.as_mut(), decoder)?;
5724
5725        let name = unsafe { name.deref_unchecked() };
5726
5727        if name.len() > 255 {
5728            return Err(::fidl_next::DecodeError::VectorTooLong {
5729                size: name.len() as u64,
5730                limit: 255,
5731            });
5732        }
5733
5734        Ok(())
5735    }
5736}
5737
5738pub type NodeRemoveExtendedAttributeResponse = ();
5739
5740/// The wire type corresponding to [`NodeRemoveExtendedAttributeResponse`].
5741pub type WireNodeRemoveExtendedAttributeResponse = ();
5742
5743pub type DirectoryCreateSymlinkResponse = ();
5744
5745/// The wire type corresponding to [`DirectoryCreateSymlinkResponse`].
5746pub type WireDirectoryCreateSymlinkResponse = ();
5747
5748pub type NodeSetFlagsResponse = ();
5749
5750/// The wire type corresponding to [`NodeSetFlagsResponse`].
5751pub type WireNodeSetFlagsResponse = ();
5752
5753#[derive(Debug)]
5754#[repr(C)]
5755pub struct NodeDeprecatedCloneRequest {
5756    pub flags: crate::OpenFlags,
5757
5758    pub object: ::fidl_next::ServerEnd<::fidl_next::fuchsia::zx::Channel, crate::Node>,
5759}
5760
5761impl ::fidl_next::Encodable for NodeDeprecatedCloneRequest {
5762    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireNodeDeprecatedCloneRequest> = unsafe {
5763        ::fidl_next::CopyOptimization::enable_if(
5764            true
5765
5766                && <
5767                    crate::OpenFlags as ::fidl_next::Encodable
5768                >::COPY_OPTIMIZATION.is_enabled()
5769
5770                && <
5771                    ::fidl_next::ServerEnd<::fidl_next::fuchsia::zx::Channel,crate::Node,
5772        > as ::fidl_next::Encodable
5773                >::COPY_OPTIMIZATION.is_enabled()
5774
5775        )
5776    };
5777
5778    type Encoded = WireNodeDeprecatedCloneRequest;
5779}
5780
5781unsafe impl<___E> ::fidl_next::Encode<___E> for NodeDeprecatedCloneRequest
5782where
5783    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5784
5785    ___E: ::fidl_next::fuchsia::HandleEncoder,
5786{
5787    #[inline]
5788    fn encode(
5789        self,
5790        encoder: &mut ___E,
5791        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5792    ) -> Result<(), ::fidl_next::EncodeError> {
5793        ::fidl_next::munge! {
5794            let Self::Encoded {
5795                flags,
5796                object,
5797
5798            } = out;
5799        }
5800
5801        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
5802
5803        ::fidl_next::Encode::encode(self.object, encoder, object)?;
5804
5805        Ok(())
5806    }
5807}
5808
5809impl ::fidl_next::EncodableOption for NodeDeprecatedCloneRequest {
5810    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeDeprecatedCloneRequest>;
5811}
5812
5813unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeDeprecatedCloneRequest
5814where
5815    ___E: ::fidl_next::Encoder + ?Sized,
5816    NodeDeprecatedCloneRequest: ::fidl_next::Encode<___E>,
5817{
5818    #[inline]
5819    fn encode_option(
5820        this: Option<Self>,
5821        encoder: &mut ___E,
5822        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5823    ) -> Result<(), ::fidl_next::EncodeError> {
5824        if let Some(inner) = this {
5825            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5826            ::fidl_next::WireBox::encode_present(out);
5827        } else {
5828            ::fidl_next::WireBox::encode_absent(out);
5829        }
5830
5831        Ok(())
5832    }
5833}
5834
5835impl ::fidl_next::FromWire<WireNodeDeprecatedCloneRequest> for NodeDeprecatedCloneRequest {
5836    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireNodeDeprecatedCloneRequest, Self> = unsafe {
5837        ::fidl_next::CopyOptimization::enable_if(
5838            true
5839
5840                && <
5841                    crate::OpenFlags as ::fidl_next::FromWire<crate::WireOpenFlags>
5842                >::COPY_OPTIMIZATION.is_enabled()
5843
5844                && <
5845                    ::fidl_next::ServerEnd<::fidl_next::fuchsia::zx::Channel,crate::Node,
5846        > as ::fidl_next::FromWire<::fidl_next::ServerEnd<::fidl_next::fuchsia::WireChannel,crate::Node,
5847        >>
5848                >::COPY_OPTIMIZATION.is_enabled()
5849
5850        )
5851    };
5852
5853    #[inline]
5854    fn from_wire(wire: WireNodeDeprecatedCloneRequest) -> Self {
5855        Self {
5856            flags: ::fidl_next::FromWire::from_wire(wire.flags),
5857
5858            object: ::fidl_next::FromWire::from_wire(wire.object),
5859        }
5860    }
5861}
5862
5863/// The wire type corresponding to [`NodeDeprecatedCloneRequest`].
5864#[derive(Debug)]
5865#[repr(C)]
5866pub struct WireNodeDeprecatedCloneRequest {
5867    pub flags: crate::WireOpenFlags,
5868
5869    pub object: ::fidl_next::ServerEnd<::fidl_next::fuchsia::WireChannel, crate::Node>,
5870}
5871
5872unsafe impl ::fidl_next::Wire for WireNodeDeprecatedCloneRequest {
5873    type Decoded<'de> = WireNodeDeprecatedCloneRequest;
5874
5875    #[inline]
5876    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
5877}
5878
5879unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeDeprecatedCloneRequest
5880where
5881    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5882
5883    ___D: ::fidl_next::fuchsia::HandleDecoder,
5884{
5885    fn decode(
5886        slot: ::fidl_next::Slot<'_, Self>,
5887        decoder: &mut ___D,
5888    ) -> Result<(), ::fidl_next::DecodeError> {
5889        ::fidl_next::munge! {
5890            let Self {
5891                mut flags,
5892                mut object,
5893
5894            } = slot;
5895        }
5896
5897        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
5898
5899        ::fidl_next::Decode::decode(object.as_mut(), decoder)?;
5900
5901        Ok(())
5902    }
5903}
5904
5905#[derive(Clone, Debug)]
5906pub struct NodeDeprecatedGetAttrResponse {
5907    pub s: i32,
5908
5909    pub attributes: crate::NodeAttributes,
5910}
5911
5912impl ::fidl_next::Encodable for NodeDeprecatedGetAttrResponse {
5913    type Encoded = WireNodeDeprecatedGetAttrResponse;
5914}
5915
5916unsafe impl<___E> ::fidl_next::Encode<___E> for NodeDeprecatedGetAttrResponse
5917where
5918    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5919{
5920    #[inline]
5921    fn encode(
5922        self,
5923        encoder: &mut ___E,
5924        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5925    ) -> Result<(), ::fidl_next::EncodeError> {
5926        ::fidl_next::munge! {
5927            let Self::Encoded {
5928                s,
5929                attributes,
5930
5931            } = out;
5932        }
5933
5934        ::fidl_next::Encode::encode(self.s, encoder, s)?;
5935
5936        ::fidl_next::Encode::encode(self.attributes, encoder, attributes)?;
5937
5938        Ok(())
5939    }
5940}
5941
5942unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeDeprecatedGetAttrResponse
5943where
5944    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5945{
5946    #[inline]
5947    fn encode_ref(
5948        &self,
5949        encoder: &mut ___E,
5950        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5951    ) -> Result<(), ::fidl_next::EncodeError> {
5952        ::fidl_next::munge! {
5953            let Self::Encoded {
5954                s,
5955                attributes,
5956
5957            } = out;
5958        }
5959
5960        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
5961
5962        ::fidl_next::EncodeRef::encode_ref(&self.attributes, encoder, attributes)?;
5963
5964        Ok(())
5965    }
5966}
5967
5968impl ::fidl_next::EncodableOption for NodeDeprecatedGetAttrResponse {
5969    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeDeprecatedGetAttrResponse>;
5970}
5971
5972unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeDeprecatedGetAttrResponse
5973where
5974    ___E: ::fidl_next::Encoder + ?Sized,
5975    NodeDeprecatedGetAttrResponse: ::fidl_next::Encode<___E>,
5976{
5977    #[inline]
5978    fn encode_option(
5979        this: Option<Self>,
5980        encoder: &mut ___E,
5981        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5982    ) -> Result<(), ::fidl_next::EncodeError> {
5983        if let Some(inner) = this {
5984            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5985            ::fidl_next::WireBox::encode_present(out);
5986        } else {
5987            ::fidl_next::WireBox::encode_absent(out);
5988        }
5989
5990        Ok(())
5991    }
5992}
5993
5994unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeDeprecatedGetAttrResponse
5995where
5996    ___E: ::fidl_next::Encoder + ?Sized,
5997    NodeDeprecatedGetAttrResponse: ::fidl_next::EncodeRef<___E>,
5998{
5999    #[inline]
6000    fn encode_option_ref(
6001        this: Option<&Self>,
6002        encoder: &mut ___E,
6003        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6004    ) -> Result<(), ::fidl_next::EncodeError> {
6005        if let Some(inner) = this {
6006            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6007            ::fidl_next::WireBox::encode_present(out);
6008        } else {
6009            ::fidl_next::WireBox::encode_absent(out);
6010        }
6011
6012        Ok(())
6013    }
6014}
6015
6016impl ::fidl_next::FromWire<WireNodeDeprecatedGetAttrResponse> for NodeDeprecatedGetAttrResponse {
6017    #[inline]
6018    fn from_wire(wire: WireNodeDeprecatedGetAttrResponse) -> Self {
6019        Self {
6020            s: ::fidl_next::FromWire::from_wire(wire.s),
6021
6022            attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
6023        }
6024    }
6025}
6026
6027impl ::fidl_next::FromWireRef<WireNodeDeprecatedGetAttrResponse> for NodeDeprecatedGetAttrResponse {
6028    #[inline]
6029    fn from_wire_ref(wire: &WireNodeDeprecatedGetAttrResponse) -> Self {
6030        Self {
6031            s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
6032
6033            attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
6034        }
6035    }
6036}
6037
6038/// The wire type corresponding to [`NodeDeprecatedGetAttrResponse`].
6039#[derive(Clone, Debug)]
6040#[repr(C)]
6041pub struct WireNodeDeprecatedGetAttrResponse {
6042    pub s: ::fidl_next::WireI32,
6043
6044    pub attributes: crate::WireNodeAttributes,
6045}
6046
6047unsafe impl ::fidl_next::Wire for WireNodeDeprecatedGetAttrResponse {
6048    type Decoded<'de> = WireNodeDeprecatedGetAttrResponse;
6049
6050    #[inline]
6051    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6052        unsafe {
6053            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
6054        }
6055    }
6056}
6057
6058unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeDeprecatedGetAttrResponse
6059where
6060    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6061{
6062    fn decode(
6063        slot: ::fidl_next::Slot<'_, Self>,
6064        decoder: &mut ___D,
6065    ) -> Result<(), ::fidl_next::DecodeError> {
6066        ::fidl_next::munge! {
6067            let Self {
6068                mut s,
6069                mut attributes,
6070
6071            } = slot;
6072        }
6073
6074        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
6075
6076        ::fidl_next::Decode::decode(attributes.as_mut(), decoder)?;
6077
6078        Ok(())
6079    }
6080}
6081
6082#[derive(Clone, Debug)]
6083pub struct NodeDeprecatedSetAttrRequest {
6084    pub flags: crate::NodeAttributeFlags,
6085
6086    pub attributes: crate::NodeAttributes,
6087}
6088
6089impl ::fidl_next::Encodable for NodeDeprecatedSetAttrRequest {
6090    type Encoded = WireNodeDeprecatedSetAttrRequest;
6091}
6092
6093unsafe impl<___E> ::fidl_next::Encode<___E> for NodeDeprecatedSetAttrRequest
6094where
6095    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6096{
6097    #[inline]
6098    fn encode(
6099        self,
6100        encoder: &mut ___E,
6101        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6102    ) -> Result<(), ::fidl_next::EncodeError> {
6103        ::fidl_next::munge! {
6104            let Self::Encoded {
6105                flags,
6106                attributes,
6107
6108            } = out;
6109        }
6110
6111        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
6112
6113        ::fidl_next::Encode::encode(self.attributes, encoder, attributes)?;
6114
6115        Ok(())
6116    }
6117}
6118
6119unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeDeprecatedSetAttrRequest
6120where
6121    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6122{
6123    #[inline]
6124    fn encode_ref(
6125        &self,
6126        encoder: &mut ___E,
6127        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6128    ) -> Result<(), ::fidl_next::EncodeError> {
6129        ::fidl_next::munge! {
6130            let Self::Encoded {
6131                flags,
6132                attributes,
6133
6134            } = out;
6135        }
6136
6137        ::fidl_next::EncodeRef::encode_ref(&self.flags, encoder, flags)?;
6138
6139        ::fidl_next::EncodeRef::encode_ref(&self.attributes, encoder, attributes)?;
6140
6141        Ok(())
6142    }
6143}
6144
6145impl ::fidl_next::EncodableOption for NodeDeprecatedSetAttrRequest {
6146    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeDeprecatedSetAttrRequest>;
6147}
6148
6149unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeDeprecatedSetAttrRequest
6150where
6151    ___E: ::fidl_next::Encoder + ?Sized,
6152    NodeDeprecatedSetAttrRequest: ::fidl_next::Encode<___E>,
6153{
6154    #[inline]
6155    fn encode_option(
6156        this: Option<Self>,
6157        encoder: &mut ___E,
6158        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6159    ) -> Result<(), ::fidl_next::EncodeError> {
6160        if let Some(inner) = this {
6161            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6162            ::fidl_next::WireBox::encode_present(out);
6163        } else {
6164            ::fidl_next::WireBox::encode_absent(out);
6165        }
6166
6167        Ok(())
6168    }
6169}
6170
6171unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeDeprecatedSetAttrRequest
6172where
6173    ___E: ::fidl_next::Encoder + ?Sized,
6174    NodeDeprecatedSetAttrRequest: ::fidl_next::EncodeRef<___E>,
6175{
6176    #[inline]
6177    fn encode_option_ref(
6178        this: Option<&Self>,
6179        encoder: &mut ___E,
6180        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6181    ) -> Result<(), ::fidl_next::EncodeError> {
6182        if let Some(inner) = this {
6183            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6184            ::fidl_next::WireBox::encode_present(out);
6185        } else {
6186            ::fidl_next::WireBox::encode_absent(out);
6187        }
6188
6189        Ok(())
6190    }
6191}
6192
6193impl ::fidl_next::FromWire<WireNodeDeprecatedSetAttrRequest> for NodeDeprecatedSetAttrRequest {
6194    #[inline]
6195    fn from_wire(wire: WireNodeDeprecatedSetAttrRequest) -> Self {
6196        Self {
6197            flags: ::fidl_next::FromWire::from_wire(wire.flags),
6198
6199            attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
6200        }
6201    }
6202}
6203
6204impl ::fidl_next::FromWireRef<WireNodeDeprecatedSetAttrRequest> for NodeDeprecatedSetAttrRequest {
6205    #[inline]
6206    fn from_wire_ref(wire: &WireNodeDeprecatedSetAttrRequest) -> Self {
6207        Self {
6208            flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
6209
6210            attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
6211        }
6212    }
6213}
6214
6215/// The wire type corresponding to [`NodeDeprecatedSetAttrRequest`].
6216#[derive(Clone, Debug)]
6217#[repr(C)]
6218pub struct WireNodeDeprecatedSetAttrRequest {
6219    pub flags: crate::WireNodeAttributeFlags,
6220
6221    pub attributes: crate::WireNodeAttributes,
6222}
6223
6224unsafe impl ::fidl_next::Wire for WireNodeDeprecatedSetAttrRequest {
6225    type Decoded<'de> = WireNodeDeprecatedSetAttrRequest;
6226
6227    #[inline]
6228    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6229        unsafe {
6230            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
6231        }
6232    }
6233}
6234
6235unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeDeprecatedSetAttrRequest
6236where
6237    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6238{
6239    fn decode(
6240        slot: ::fidl_next::Slot<'_, Self>,
6241        decoder: &mut ___D,
6242    ) -> Result<(), ::fidl_next::DecodeError> {
6243        ::fidl_next::munge! {
6244            let Self {
6245                mut flags,
6246                mut attributes,
6247
6248            } = slot;
6249        }
6250
6251        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
6252
6253        ::fidl_next::Decode::decode(attributes.as_mut(), decoder)?;
6254
6255        Ok(())
6256    }
6257}
6258
6259#[derive(Clone, Debug)]
6260#[repr(C)]
6261pub struct NodeDeprecatedSetAttrResponse {
6262    pub s: i32,
6263}
6264
6265impl ::fidl_next::Encodable for NodeDeprecatedSetAttrResponse {
6266    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6267        Self,
6268        WireNodeDeprecatedSetAttrResponse,
6269    > = unsafe {
6270        ::fidl_next::CopyOptimization::enable_if(
6271            true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
6272        )
6273    };
6274
6275    type Encoded = WireNodeDeprecatedSetAttrResponse;
6276}
6277
6278unsafe impl<___E> ::fidl_next::Encode<___E> for NodeDeprecatedSetAttrResponse
6279where
6280    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6281{
6282    #[inline]
6283    fn encode(
6284        self,
6285        encoder: &mut ___E,
6286        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6287    ) -> Result<(), ::fidl_next::EncodeError> {
6288        ::fidl_next::munge! {
6289            let Self::Encoded {
6290                s,
6291
6292            } = out;
6293        }
6294
6295        ::fidl_next::Encode::encode(self.s, encoder, s)?;
6296
6297        Ok(())
6298    }
6299}
6300
6301unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeDeprecatedSetAttrResponse
6302where
6303    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6304{
6305    #[inline]
6306    fn encode_ref(
6307        &self,
6308        encoder: &mut ___E,
6309        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6310    ) -> Result<(), ::fidl_next::EncodeError> {
6311        ::fidl_next::munge! {
6312            let Self::Encoded {
6313                s,
6314
6315            } = out;
6316        }
6317
6318        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
6319
6320        Ok(())
6321    }
6322}
6323
6324impl ::fidl_next::EncodableOption for NodeDeprecatedSetAttrResponse {
6325    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeDeprecatedSetAttrResponse>;
6326}
6327
6328unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeDeprecatedSetAttrResponse
6329where
6330    ___E: ::fidl_next::Encoder + ?Sized,
6331    NodeDeprecatedSetAttrResponse: ::fidl_next::Encode<___E>,
6332{
6333    #[inline]
6334    fn encode_option(
6335        this: Option<Self>,
6336        encoder: &mut ___E,
6337        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6338    ) -> Result<(), ::fidl_next::EncodeError> {
6339        if let Some(inner) = this {
6340            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6341            ::fidl_next::WireBox::encode_present(out);
6342        } else {
6343            ::fidl_next::WireBox::encode_absent(out);
6344        }
6345
6346        Ok(())
6347    }
6348}
6349
6350unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeDeprecatedSetAttrResponse
6351where
6352    ___E: ::fidl_next::Encoder + ?Sized,
6353    NodeDeprecatedSetAttrResponse: ::fidl_next::EncodeRef<___E>,
6354{
6355    #[inline]
6356    fn encode_option_ref(
6357        this: Option<&Self>,
6358        encoder: &mut ___E,
6359        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6360    ) -> Result<(), ::fidl_next::EncodeError> {
6361        if let Some(inner) = this {
6362            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6363            ::fidl_next::WireBox::encode_present(out);
6364        } else {
6365            ::fidl_next::WireBox::encode_absent(out);
6366        }
6367
6368        Ok(())
6369    }
6370}
6371
6372impl ::fidl_next::FromWire<WireNodeDeprecatedSetAttrResponse> for NodeDeprecatedSetAttrResponse {
6373    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6374        WireNodeDeprecatedSetAttrResponse,
6375        Self,
6376    > = unsafe {
6377        ::fidl_next::CopyOptimization::enable_if(
6378            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
6379                .is_enabled(),
6380        )
6381    };
6382
6383    #[inline]
6384    fn from_wire(wire: WireNodeDeprecatedSetAttrResponse) -> Self {
6385        Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
6386    }
6387}
6388
6389impl ::fidl_next::FromWireRef<WireNodeDeprecatedSetAttrResponse> for NodeDeprecatedSetAttrResponse {
6390    #[inline]
6391    fn from_wire_ref(wire: &WireNodeDeprecatedSetAttrResponse) -> Self {
6392        Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
6393    }
6394}
6395
6396/// The wire type corresponding to [`NodeDeprecatedSetAttrResponse`].
6397#[derive(Clone, Debug)]
6398#[repr(C)]
6399pub struct WireNodeDeprecatedSetAttrResponse {
6400    pub s: ::fidl_next::WireI32,
6401}
6402
6403unsafe impl ::fidl_next::Wire for WireNodeDeprecatedSetAttrResponse {
6404    type Decoded<'de> = WireNodeDeprecatedSetAttrResponse;
6405
6406    #[inline]
6407    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6408}
6409
6410unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeDeprecatedSetAttrResponse
6411where
6412    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6413{
6414    fn decode(
6415        slot: ::fidl_next::Slot<'_, Self>,
6416        decoder: &mut ___D,
6417    ) -> Result<(), ::fidl_next::DecodeError> {
6418        ::fidl_next::munge! {
6419            let Self {
6420                mut s,
6421
6422            } = slot;
6423        }
6424
6425        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
6426
6427        Ok(())
6428    }
6429}
6430
6431#[derive(Clone, Debug)]
6432#[repr(C)]
6433pub struct NodeDeprecatedGetFlagsResponse {
6434    pub s: i32,
6435
6436    pub flags: crate::OpenFlags,
6437}
6438
6439impl ::fidl_next::Encodable for NodeDeprecatedGetFlagsResponse {
6440    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6441        Self,
6442        WireNodeDeprecatedGetFlagsResponse,
6443    > = unsafe {
6444        ::fidl_next::CopyOptimization::enable_if(
6445            true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
6446                && <crate::OpenFlags as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
6447        )
6448    };
6449
6450    type Encoded = WireNodeDeprecatedGetFlagsResponse;
6451}
6452
6453unsafe impl<___E> ::fidl_next::Encode<___E> for NodeDeprecatedGetFlagsResponse
6454where
6455    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6456{
6457    #[inline]
6458    fn encode(
6459        self,
6460        encoder: &mut ___E,
6461        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6462    ) -> Result<(), ::fidl_next::EncodeError> {
6463        ::fidl_next::munge! {
6464            let Self::Encoded {
6465                s,
6466                flags,
6467
6468            } = out;
6469        }
6470
6471        ::fidl_next::Encode::encode(self.s, encoder, s)?;
6472
6473        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
6474
6475        Ok(())
6476    }
6477}
6478
6479unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeDeprecatedGetFlagsResponse
6480where
6481    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6482{
6483    #[inline]
6484    fn encode_ref(
6485        &self,
6486        encoder: &mut ___E,
6487        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6488    ) -> Result<(), ::fidl_next::EncodeError> {
6489        ::fidl_next::munge! {
6490            let Self::Encoded {
6491                s,
6492                flags,
6493
6494            } = out;
6495        }
6496
6497        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
6498
6499        ::fidl_next::EncodeRef::encode_ref(&self.flags, encoder, flags)?;
6500
6501        Ok(())
6502    }
6503}
6504
6505impl ::fidl_next::EncodableOption for NodeDeprecatedGetFlagsResponse {
6506    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeDeprecatedGetFlagsResponse>;
6507}
6508
6509unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeDeprecatedGetFlagsResponse
6510where
6511    ___E: ::fidl_next::Encoder + ?Sized,
6512    NodeDeprecatedGetFlagsResponse: ::fidl_next::Encode<___E>,
6513{
6514    #[inline]
6515    fn encode_option(
6516        this: Option<Self>,
6517        encoder: &mut ___E,
6518        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6519    ) -> Result<(), ::fidl_next::EncodeError> {
6520        if let Some(inner) = this {
6521            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6522            ::fidl_next::WireBox::encode_present(out);
6523        } else {
6524            ::fidl_next::WireBox::encode_absent(out);
6525        }
6526
6527        Ok(())
6528    }
6529}
6530
6531unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeDeprecatedGetFlagsResponse
6532where
6533    ___E: ::fidl_next::Encoder + ?Sized,
6534    NodeDeprecatedGetFlagsResponse: ::fidl_next::EncodeRef<___E>,
6535{
6536    #[inline]
6537    fn encode_option_ref(
6538        this: Option<&Self>,
6539        encoder: &mut ___E,
6540        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6541    ) -> Result<(), ::fidl_next::EncodeError> {
6542        if let Some(inner) = this {
6543            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6544            ::fidl_next::WireBox::encode_present(out);
6545        } else {
6546            ::fidl_next::WireBox::encode_absent(out);
6547        }
6548
6549        Ok(())
6550    }
6551}
6552
6553impl ::fidl_next::FromWire<WireNodeDeprecatedGetFlagsResponse> for NodeDeprecatedGetFlagsResponse {
6554    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6555        WireNodeDeprecatedGetFlagsResponse,
6556        Self,
6557    > = unsafe {
6558        ::fidl_next::CopyOptimization::enable_if(
6559            true
6560
6561                && <
6562                    i32 as ::fidl_next::FromWire<::fidl_next::WireI32>
6563                >::COPY_OPTIMIZATION.is_enabled()
6564
6565                && <
6566                    crate::OpenFlags as ::fidl_next::FromWire<crate::WireOpenFlags>
6567                >::COPY_OPTIMIZATION.is_enabled()
6568
6569        )
6570    };
6571
6572    #[inline]
6573    fn from_wire(wire: WireNodeDeprecatedGetFlagsResponse) -> Self {
6574        Self {
6575            s: ::fidl_next::FromWire::from_wire(wire.s),
6576
6577            flags: ::fidl_next::FromWire::from_wire(wire.flags),
6578        }
6579    }
6580}
6581
6582impl ::fidl_next::FromWireRef<WireNodeDeprecatedGetFlagsResponse>
6583    for NodeDeprecatedGetFlagsResponse
6584{
6585    #[inline]
6586    fn from_wire_ref(wire: &WireNodeDeprecatedGetFlagsResponse) -> Self {
6587        Self {
6588            s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
6589
6590            flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
6591        }
6592    }
6593}
6594
6595/// The wire type corresponding to [`NodeDeprecatedGetFlagsResponse`].
6596#[derive(Clone, Debug)]
6597#[repr(C)]
6598pub struct WireNodeDeprecatedGetFlagsResponse {
6599    pub s: ::fidl_next::WireI32,
6600
6601    pub flags: crate::WireOpenFlags,
6602}
6603
6604unsafe impl ::fidl_next::Wire for WireNodeDeprecatedGetFlagsResponse {
6605    type Decoded<'de> = WireNodeDeprecatedGetFlagsResponse;
6606
6607    #[inline]
6608    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6609}
6610
6611unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeDeprecatedGetFlagsResponse
6612where
6613    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6614{
6615    fn decode(
6616        slot: ::fidl_next::Slot<'_, Self>,
6617        decoder: &mut ___D,
6618    ) -> Result<(), ::fidl_next::DecodeError> {
6619        ::fidl_next::munge! {
6620            let Self {
6621                mut s,
6622                mut flags,
6623
6624            } = slot;
6625        }
6626
6627        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
6628
6629        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
6630
6631        Ok(())
6632    }
6633}
6634
6635#[derive(Clone, Debug)]
6636#[repr(C)]
6637pub struct NodeDeprecatedSetFlagsRequest {
6638    pub flags: crate::OpenFlags,
6639}
6640
6641impl ::fidl_next::Encodable for NodeDeprecatedSetFlagsRequest {
6642    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6643        Self,
6644        WireNodeDeprecatedSetFlagsRequest,
6645    > = unsafe {
6646        ::fidl_next::CopyOptimization::enable_if(
6647            true && <crate::OpenFlags as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
6648        )
6649    };
6650
6651    type Encoded = WireNodeDeprecatedSetFlagsRequest;
6652}
6653
6654unsafe impl<___E> ::fidl_next::Encode<___E> for NodeDeprecatedSetFlagsRequest
6655where
6656    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6657{
6658    #[inline]
6659    fn encode(
6660        self,
6661        encoder: &mut ___E,
6662        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6663    ) -> Result<(), ::fidl_next::EncodeError> {
6664        ::fidl_next::munge! {
6665            let Self::Encoded {
6666                flags,
6667
6668            } = out;
6669        }
6670
6671        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
6672
6673        Ok(())
6674    }
6675}
6676
6677unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeDeprecatedSetFlagsRequest
6678where
6679    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6680{
6681    #[inline]
6682    fn encode_ref(
6683        &self,
6684        encoder: &mut ___E,
6685        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6686    ) -> Result<(), ::fidl_next::EncodeError> {
6687        ::fidl_next::munge! {
6688            let Self::Encoded {
6689                flags,
6690
6691            } = out;
6692        }
6693
6694        ::fidl_next::EncodeRef::encode_ref(&self.flags, encoder, flags)?;
6695
6696        Ok(())
6697    }
6698}
6699
6700impl ::fidl_next::EncodableOption for NodeDeprecatedSetFlagsRequest {
6701    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeDeprecatedSetFlagsRequest>;
6702}
6703
6704unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeDeprecatedSetFlagsRequest
6705where
6706    ___E: ::fidl_next::Encoder + ?Sized,
6707    NodeDeprecatedSetFlagsRequest: ::fidl_next::Encode<___E>,
6708{
6709    #[inline]
6710    fn encode_option(
6711        this: Option<Self>,
6712        encoder: &mut ___E,
6713        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6714    ) -> Result<(), ::fidl_next::EncodeError> {
6715        if let Some(inner) = this {
6716            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6717            ::fidl_next::WireBox::encode_present(out);
6718        } else {
6719            ::fidl_next::WireBox::encode_absent(out);
6720        }
6721
6722        Ok(())
6723    }
6724}
6725
6726unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeDeprecatedSetFlagsRequest
6727where
6728    ___E: ::fidl_next::Encoder + ?Sized,
6729    NodeDeprecatedSetFlagsRequest: ::fidl_next::EncodeRef<___E>,
6730{
6731    #[inline]
6732    fn encode_option_ref(
6733        this: Option<&Self>,
6734        encoder: &mut ___E,
6735        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6736    ) -> Result<(), ::fidl_next::EncodeError> {
6737        if let Some(inner) = this {
6738            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6739            ::fidl_next::WireBox::encode_present(out);
6740        } else {
6741            ::fidl_next::WireBox::encode_absent(out);
6742        }
6743
6744        Ok(())
6745    }
6746}
6747
6748impl ::fidl_next::FromWire<WireNodeDeprecatedSetFlagsRequest> for NodeDeprecatedSetFlagsRequest {
6749    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6750        WireNodeDeprecatedSetFlagsRequest,
6751        Self,
6752    > = unsafe {
6753        ::fidl_next::CopyOptimization::enable_if(
6754            true
6755
6756                && <
6757                    crate::OpenFlags as ::fidl_next::FromWire<crate::WireOpenFlags>
6758                >::COPY_OPTIMIZATION.is_enabled()
6759
6760        )
6761    };
6762
6763    #[inline]
6764    fn from_wire(wire: WireNodeDeprecatedSetFlagsRequest) -> Self {
6765        Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
6766    }
6767}
6768
6769impl ::fidl_next::FromWireRef<WireNodeDeprecatedSetFlagsRequest> for NodeDeprecatedSetFlagsRequest {
6770    #[inline]
6771    fn from_wire_ref(wire: &WireNodeDeprecatedSetFlagsRequest) -> Self {
6772        Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
6773    }
6774}
6775
6776/// The wire type corresponding to [`NodeDeprecatedSetFlagsRequest`].
6777#[derive(Clone, Debug)]
6778#[repr(C)]
6779pub struct WireNodeDeprecatedSetFlagsRequest {
6780    pub flags: crate::WireOpenFlags,
6781}
6782
6783unsafe impl ::fidl_next::Wire for WireNodeDeprecatedSetFlagsRequest {
6784    type Decoded<'de> = WireNodeDeprecatedSetFlagsRequest;
6785
6786    #[inline]
6787    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6788}
6789
6790unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeDeprecatedSetFlagsRequest
6791where
6792    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6793{
6794    fn decode(
6795        slot: ::fidl_next::Slot<'_, Self>,
6796        decoder: &mut ___D,
6797    ) -> Result<(), ::fidl_next::DecodeError> {
6798        ::fidl_next::munge! {
6799            let Self {
6800                mut flags,
6801
6802            } = slot;
6803        }
6804
6805        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
6806
6807        Ok(())
6808    }
6809}
6810
6811#[derive(Clone, Debug)]
6812#[repr(C)]
6813pub struct NodeDeprecatedSetFlagsResponse {
6814    pub s: i32,
6815}
6816
6817impl ::fidl_next::Encodable for NodeDeprecatedSetFlagsResponse {
6818    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6819        Self,
6820        WireNodeDeprecatedSetFlagsResponse,
6821    > = unsafe {
6822        ::fidl_next::CopyOptimization::enable_if(
6823            true && <i32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
6824        )
6825    };
6826
6827    type Encoded = WireNodeDeprecatedSetFlagsResponse;
6828}
6829
6830unsafe impl<___E> ::fidl_next::Encode<___E> for NodeDeprecatedSetFlagsResponse
6831where
6832    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6833{
6834    #[inline]
6835    fn encode(
6836        self,
6837        encoder: &mut ___E,
6838        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6839    ) -> Result<(), ::fidl_next::EncodeError> {
6840        ::fidl_next::munge! {
6841            let Self::Encoded {
6842                s,
6843
6844            } = out;
6845        }
6846
6847        ::fidl_next::Encode::encode(self.s, encoder, s)?;
6848
6849        Ok(())
6850    }
6851}
6852
6853unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeDeprecatedSetFlagsResponse
6854where
6855    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6856{
6857    #[inline]
6858    fn encode_ref(
6859        &self,
6860        encoder: &mut ___E,
6861        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6862    ) -> Result<(), ::fidl_next::EncodeError> {
6863        ::fidl_next::munge! {
6864            let Self::Encoded {
6865                s,
6866
6867            } = out;
6868        }
6869
6870        ::fidl_next::EncodeRef::encode_ref(&self.s, encoder, s)?;
6871
6872        Ok(())
6873    }
6874}
6875
6876impl ::fidl_next::EncodableOption for NodeDeprecatedSetFlagsResponse {
6877    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeDeprecatedSetFlagsResponse>;
6878}
6879
6880unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeDeprecatedSetFlagsResponse
6881where
6882    ___E: ::fidl_next::Encoder + ?Sized,
6883    NodeDeprecatedSetFlagsResponse: ::fidl_next::Encode<___E>,
6884{
6885    #[inline]
6886    fn encode_option(
6887        this: Option<Self>,
6888        encoder: &mut ___E,
6889        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6890    ) -> Result<(), ::fidl_next::EncodeError> {
6891        if let Some(inner) = this {
6892            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6893            ::fidl_next::WireBox::encode_present(out);
6894        } else {
6895            ::fidl_next::WireBox::encode_absent(out);
6896        }
6897
6898        Ok(())
6899    }
6900}
6901
6902unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeDeprecatedSetFlagsResponse
6903where
6904    ___E: ::fidl_next::Encoder + ?Sized,
6905    NodeDeprecatedSetFlagsResponse: ::fidl_next::EncodeRef<___E>,
6906{
6907    #[inline]
6908    fn encode_option_ref(
6909        this: Option<&Self>,
6910        encoder: &mut ___E,
6911        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6912    ) -> Result<(), ::fidl_next::EncodeError> {
6913        if let Some(inner) = this {
6914            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6915            ::fidl_next::WireBox::encode_present(out);
6916        } else {
6917            ::fidl_next::WireBox::encode_absent(out);
6918        }
6919
6920        Ok(())
6921    }
6922}
6923
6924impl ::fidl_next::FromWire<WireNodeDeprecatedSetFlagsResponse> for NodeDeprecatedSetFlagsResponse {
6925    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6926        WireNodeDeprecatedSetFlagsResponse,
6927        Self,
6928    > = unsafe {
6929        ::fidl_next::CopyOptimization::enable_if(
6930            true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
6931                .is_enabled(),
6932        )
6933    };
6934
6935    #[inline]
6936    fn from_wire(wire: WireNodeDeprecatedSetFlagsResponse) -> Self {
6937        Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
6938    }
6939}
6940
6941impl ::fidl_next::FromWireRef<WireNodeDeprecatedSetFlagsResponse>
6942    for NodeDeprecatedSetFlagsResponse
6943{
6944    #[inline]
6945    fn from_wire_ref(wire: &WireNodeDeprecatedSetFlagsResponse) -> Self {
6946        Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
6947    }
6948}
6949
6950/// The wire type corresponding to [`NodeDeprecatedSetFlagsResponse`].
6951#[derive(Clone, Debug)]
6952#[repr(C)]
6953pub struct WireNodeDeprecatedSetFlagsResponse {
6954    pub s: ::fidl_next::WireI32,
6955}
6956
6957unsafe impl ::fidl_next::Wire for WireNodeDeprecatedSetFlagsResponse {
6958    type Decoded<'de> = WireNodeDeprecatedSetFlagsResponse;
6959
6960    #[inline]
6961    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6962}
6963
6964unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeDeprecatedSetFlagsResponse
6965where
6966    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6967{
6968    fn decode(
6969        slot: ::fidl_next::Slot<'_, Self>,
6970        decoder: &mut ___D,
6971    ) -> Result<(), ::fidl_next::DecodeError> {
6972        ::fidl_next::munge! {
6973            let Self {
6974                mut s,
6975
6976            } = slot;
6977        }
6978
6979        ::fidl_next::Decode::decode(s.as_mut(), decoder)?;
6980
6981        Ok(())
6982    }
6983}
6984
6985::fidl_next::bitflags! {
6986    #[doc = " Flags used to specify how a node should be opened. Note that ranges of bits are reserved\n for specific use cases:\n  * Bits  1-16: Permission flags `PERM_*` (e.g. [`Flags.PERM_READ_BYTES`]).\n  * Bits 17-32: POSIX compatibile `O_*` flags (e.g. [`Flags.FILE_TRUNCATE`] or `O_TRUNC`).\n  * Bits 33-64: Fuchsia-specific flags.\n"]#[derive(
6987        Clone,
6988        Copy,
6989        Debug,
6990        PartialEq,
6991        Eq,
6992        Hash,
6993    )]
6994    pub struct Flags: u64 {
6995        #[doc = " Allows opening child nodes with [`PROTOCOL_SERVICE`].\n"]const PERM_CONNECT = 1;
6996        #[doc = " Read byte contents of a file.\n"]const PERM_READ_BYTES = 2;
6997        #[doc = " Write byte contents to a file.\n"]const PERM_WRITE_BYTES = 4;
6998        #[doc = " Execute byte contents of a file.\n"]const PERM_EXECUTE = 8;
6999        #[doc = " Get/query attributes of a node.\n"]const PERM_GET_ATTRIBUTES = 16;
7000        #[doc = " Set/update attributes of a node.\n"]const PERM_UPDATE_ATTRIBUTES = 32;
7001        #[doc = " Enumerate (list) directory entries.\n"]const PERM_ENUMERATE = 64;
7002        #[doc = " Allow opening a child node with a node protocol. Must be specified with PERM_ENUMERATE\n otherwise requests will fail with `ZX_ERR_INVALID_ARGS`.\n"]const PERM_TRAVERSE = 128;
7003        #[doc = " Modify directory entries (create/rename/link/unlink). Must be specified with\n PERM_ENUMERATE otherwise requests will fail with `ZX_ERR_INVALID_ARGS`.\n"]const PERM_MODIFY_DIRECTORY = 256;
7004        #[doc = " Inherit write permissions when available (PERM_WRITE_BYTES, PERM_UPDATE_ATTRIBUTES,\n PERM_MODIFY_DIRECTORY, /// PERM_ENUMERATE). Servers must ensure this flag is removed\n if the parent connection lacks any of these rights. See [`INHERITED_WRITE_PERMISSIONS`]\n for the exact set of permissions that will be inherited.\n"]const PERM_INHERIT_WRITE = 8192;
7005        #[doc = " Inherit execute permission when available (PERM_EXECUTE).\n Servers must ensure this flag is removed if the parent connection lacks PERM_EXECUTE.\n"]const PERM_INHERIT_EXECUTE = 16384;
7006        #[doc = " Connect to the underlying protocol if this is a service node. The caller must determine the\n correct protocol to use (e.g. based on path). Unless used with [`PROTOCOL_NODE`], specifying\n other flags with the request will fail with `ZX_ERR_INVALID_ARGS`.\n"]const PROTOCOL_SERVICE = 4294967296;
7007        #[doc = " Connect to the underlying node. Takes precedence over other protocols. If other `PROTOCOL_*`\n are specified, they will be used to validate the target node type. Requests will fail with\n `ZX_ERR_INVALID_ARGS` if flags other than `PROTOCOL_*` and [`FLAG_SEND_REPRESENTATION`] are\n specified. Equivalent to POSIX `O_PATH`.\n"]const PROTOCOL_NODE = 4194304;
7008        #[doc = " Caller accepts [`fuchsia.io/Directory`] protocol. Equivalent to POSIX `O_DIRECTORY`.\n"]const PROTOCOL_DIRECTORY = 524288;
7009        #[doc = " Caller accepts [`fuchsia.io/File`] protocol.\n"]const PROTOCOL_FILE = 8589934592;
7010        #[doc = " Caller accepts [`fuchsia.io/Symlink`] protocol.\n"]const PROTOCOL_SYMLINK = 17179869184;
7011        #[doc = " Caller requests a [`fuchsia.io/Node.OnRepresentation`] event on success.\n"]const FLAG_SEND_REPRESENTATION = 1099511627776;
7012        #[doc = " Create a new object if one doesn\'t exist, otherwise open an existing object. If set, a\n single `PROTOCOL_*` flag must be set indicating the type of object to create. Equivalent\n to POSIX `O_CREAT`.\n"]const FLAG_MAYBE_CREATE = 65536;
7013        #[doc = " Create a new object if one doesn\'t exist, otherwise fail the request with\n `ZX_ERR_ALREADY_EXISTS`. If set, a single `PROTOCOL_*` flag must be set indicating the type\n of object to create. Takes precedence over [`FLAG_MAYBE_CREATE`]. Equivalent to POSIX\n `O_EXCL`.\n"]const FLAG_MUST_CREATE = 131072;
7014        #[doc = " Create a new unnamed temporary object. The object is temporary until it is linked to the\n filesystem. If specified with `FLAG_TEMPORARY_AS_NOT_LINKABLE`, then the created object is\n not linkable. If this flag is set:\n  * `path` specified in [`fuchsia.io/Directory.Open`] refers to the path of the directory\n    which the new object will be created in,\n  * A `PROTOCOL_*` flag is set to indicate the type of object to be created. Currently, this\n    is only supported when specified with `PROTOCOL_FILE`, in which case, it is equivalent\n    to Linux `O_TMPFILE`.\n  * `FLAG_MAYBE_CREATE` will be ignored.\n"]const FLAG_CREATE_AS_UNNAMED_TEMPORARY = 34359738368;
7015        #[doc = " Open the file in append mode. The seek pointer will be moved to end-of-file (EOF)\n before all writes. Equivalent to POSIX `O_APPEND`.\n"]const FILE_APPEND = 1048576;
7016        #[doc = " Truncate the file to zero length upon opening it. Equivalent to POSIX `O_TRUNC`.\n"]const FILE_TRUNCATE = 262144;
7017        const _ = !0;
7018    }
7019}
7020
7021impl ::fidl_next::Encodable for Flags {
7022    type Encoded = WireFlags;
7023}
7024
7025unsafe impl<___E> ::fidl_next::Encode<___E> for Flags
7026where
7027    ___E: ?Sized,
7028{
7029    #[inline]
7030    fn encode(
7031        self,
7032        encoder: &mut ___E,
7033        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7034    ) -> Result<(), ::fidl_next::EncodeError> {
7035        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
7036    }
7037}
7038
7039unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Flags
7040where
7041    ___E: ?Sized,
7042{
7043    #[inline]
7044    fn encode_ref(
7045        &self,
7046        _: &mut ___E,
7047        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7048    ) -> Result<(), ::fidl_next::EncodeError> {
7049        ::fidl_next::munge!(let WireFlags { value } = out);
7050        let _ = value.write(::fidl_next::WireU64::from(self.bits()));
7051        Ok(())
7052    }
7053}
7054
7055impl ::core::convert::From<WireFlags> for Flags {
7056    fn from(wire: WireFlags) -> Self {
7057        Self::from_bits_retain(u64::from(wire.value))
7058    }
7059}
7060
7061impl ::fidl_next::FromWire<WireFlags> for Flags {
7062    #[inline]
7063    fn from_wire(wire: WireFlags) -> Self {
7064        Self::from(wire)
7065    }
7066}
7067
7068impl ::fidl_next::FromWireRef<WireFlags> for Flags {
7069    #[inline]
7070    fn from_wire_ref(wire: &WireFlags) -> Self {
7071        Self::from(*wire)
7072    }
7073}
7074
7075/// The wire type corresponding to [`Flags`].
7076#[derive(Clone, Copy, Debug)]
7077#[repr(transparent)]
7078pub struct WireFlags {
7079    value: ::fidl_next::WireU64,
7080}
7081
7082unsafe impl ::fidl_next::Wire for WireFlags {
7083    type Decoded<'de> = Self;
7084
7085    #[inline]
7086    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
7087        // Wire bits have no padding
7088    }
7089}
7090
7091unsafe impl<___D> ::fidl_next::Decode<___D> for WireFlags
7092where
7093    ___D: ?Sized,
7094{
7095    fn decode(
7096        slot: ::fidl_next::Slot<'_, Self>,
7097        _: &mut ___D,
7098    ) -> Result<(), ::fidl_next::DecodeError> {
7099        Ok(())
7100    }
7101}
7102
7103impl ::core::convert::From<Flags> for WireFlags {
7104    fn from(natural: Flags) -> Self {
7105        Self { value: ::fidl_next::WireU64::from(natural.bits()) }
7106    }
7107}
7108
7109#[derive(Clone, Debug)]
7110#[repr(C)]
7111pub struct NodeGetFlagsResponse {
7112    pub flags: crate::Flags,
7113}
7114
7115impl ::fidl_next::Encodable for NodeGetFlagsResponse {
7116    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireNodeGetFlagsResponse> = unsafe {
7117        ::fidl_next::CopyOptimization::enable_if(
7118            true && <crate::Flags as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
7119        )
7120    };
7121
7122    type Encoded = WireNodeGetFlagsResponse;
7123}
7124
7125unsafe impl<___E> ::fidl_next::Encode<___E> for NodeGetFlagsResponse
7126where
7127    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7128{
7129    #[inline]
7130    fn encode(
7131        self,
7132        encoder: &mut ___E,
7133        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7134    ) -> Result<(), ::fidl_next::EncodeError> {
7135        ::fidl_next::munge! {
7136            let Self::Encoded {
7137                flags,
7138
7139            } = out;
7140        }
7141
7142        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
7143
7144        Ok(())
7145    }
7146}
7147
7148unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeGetFlagsResponse
7149where
7150    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7151{
7152    #[inline]
7153    fn encode_ref(
7154        &self,
7155        encoder: &mut ___E,
7156        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7157    ) -> Result<(), ::fidl_next::EncodeError> {
7158        ::fidl_next::munge! {
7159            let Self::Encoded {
7160                flags,
7161
7162            } = out;
7163        }
7164
7165        ::fidl_next::EncodeRef::encode_ref(&self.flags, encoder, flags)?;
7166
7167        Ok(())
7168    }
7169}
7170
7171impl ::fidl_next::EncodableOption for NodeGetFlagsResponse {
7172    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeGetFlagsResponse>;
7173}
7174
7175unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeGetFlagsResponse
7176where
7177    ___E: ::fidl_next::Encoder + ?Sized,
7178    NodeGetFlagsResponse: ::fidl_next::Encode<___E>,
7179{
7180    #[inline]
7181    fn encode_option(
7182        this: Option<Self>,
7183        encoder: &mut ___E,
7184        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7185    ) -> Result<(), ::fidl_next::EncodeError> {
7186        if let Some(inner) = this {
7187            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7188            ::fidl_next::WireBox::encode_present(out);
7189        } else {
7190            ::fidl_next::WireBox::encode_absent(out);
7191        }
7192
7193        Ok(())
7194    }
7195}
7196
7197unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeGetFlagsResponse
7198where
7199    ___E: ::fidl_next::Encoder + ?Sized,
7200    NodeGetFlagsResponse: ::fidl_next::EncodeRef<___E>,
7201{
7202    #[inline]
7203    fn encode_option_ref(
7204        this: Option<&Self>,
7205        encoder: &mut ___E,
7206        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7207    ) -> Result<(), ::fidl_next::EncodeError> {
7208        if let Some(inner) = this {
7209            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7210            ::fidl_next::WireBox::encode_present(out);
7211        } else {
7212            ::fidl_next::WireBox::encode_absent(out);
7213        }
7214
7215        Ok(())
7216    }
7217}
7218
7219impl ::fidl_next::FromWire<WireNodeGetFlagsResponse> for NodeGetFlagsResponse {
7220    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireNodeGetFlagsResponse, Self> = unsafe {
7221        ::fidl_next::CopyOptimization::enable_if(
7222            true && <crate::Flags as ::fidl_next::FromWire<crate::WireFlags>>::COPY_OPTIMIZATION
7223                .is_enabled(),
7224        )
7225    };
7226
7227    #[inline]
7228    fn from_wire(wire: WireNodeGetFlagsResponse) -> Self {
7229        Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
7230    }
7231}
7232
7233impl ::fidl_next::FromWireRef<WireNodeGetFlagsResponse> for NodeGetFlagsResponse {
7234    #[inline]
7235    fn from_wire_ref(wire: &WireNodeGetFlagsResponse) -> Self {
7236        Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
7237    }
7238}
7239
7240/// The wire type corresponding to [`NodeGetFlagsResponse`].
7241#[derive(Clone, Debug)]
7242#[repr(C)]
7243pub struct WireNodeGetFlagsResponse {
7244    pub flags: crate::WireFlags,
7245}
7246
7247unsafe impl ::fidl_next::Wire for WireNodeGetFlagsResponse {
7248    type Decoded<'de> = WireNodeGetFlagsResponse;
7249
7250    #[inline]
7251    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7252}
7253
7254unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeGetFlagsResponse
7255where
7256    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7257{
7258    fn decode(
7259        slot: ::fidl_next::Slot<'_, Self>,
7260        decoder: &mut ___D,
7261    ) -> Result<(), ::fidl_next::DecodeError> {
7262        ::fidl_next::munge! {
7263            let Self {
7264                mut flags,
7265
7266            } = slot;
7267        }
7268
7269        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
7270
7271        Ok(())
7272    }
7273}
7274
7275#[derive(Clone, Debug)]
7276#[repr(C)]
7277pub struct NodeSetFlagsRequest {
7278    pub flags: crate::Flags,
7279}
7280
7281impl ::fidl_next::Encodable for NodeSetFlagsRequest {
7282    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireNodeSetFlagsRequest> = unsafe {
7283        ::fidl_next::CopyOptimization::enable_if(
7284            true && <crate::Flags as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
7285        )
7286    };
7287
7288    type Encoded = WireNodeSetFlagsRequest;
7289}
7290
7291unsafe impl<___E> ::fidl_next::Encode<___E> for NodeSetFlagsRequest
7292where
7293    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7294{
7295    #[inline]
7296    fn encode(
7297        self,
7298        encoder: &mut ___E,
7299        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7300    ) -> Result<(), ::fidl_next::EncodeError> {
7301        ::fidl_next::munge! {
7302            let Self::Encoded {
7303                flags,
7304
7305            } = out;
7306        }
7307
7308        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
7309
7310        Ok(())
7311    }
7312}
7313
7314unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeSetFlagsRequest
7315where
7316    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7317{
7318    #[inline]
7319    fn encode_ref(
7320        &self,
7321        encoder: &mut ___E,
7322        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7323    ) -> Result<(), ::fidl_next::EncodeError> {
7324        ::fidl_next::munge! {
7325            let Self::Encoded {
7326                flags,
7327
7328            } = out;
7329        }
7330
7331        ::fidl_next::EncodeRef::encode_ref(&self.flags, encoder, flags)?;
7332
7333        Ok(())
7334    }
7335}
7336
7337impl ::fidl_next::EncodableOption for NodeSetFlagsRequest {
7338    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeSetFlagsRequest>;
7339}
7340
7341unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeSetFlagsRequest
7342where
7343    ___E: ::fidl_next::Encoder + ?Sized,
7344    NodeSetFlagsRequest: ::fidl_next::Encode<___E>,
7345{
7346    #[inline]
7347    fn encode_option(
7348        this: Option<Self>,
7349        encoder: &mut ___E,
7350        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7351    ) -> Result<(), ::fidl_next::EncodeError> {
7352        if let Some(inner) = this {
7353            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7354            ::fidl_next::WireBox::encode_present(out);
7355        } else {
7356            ::fidl_next::WireBox::encode_absent(out);
7357        }
7358
7359        Ok(())
7360    }
7361}
7362
7363unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeSetFlagsRequest
7364where
7365    ___E: ::fidl_next::Encoder + ?Sized,
7366    NodeSetFlagsRequest: ::fidl_next::EncodeRef<___E>,
7367{
7368    #[inline]
7369    fn encode_option_ref(
7370        this: Option<&Self>,
7371        encoder: &mut ___E,
7372        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7373    ) -> Result<(), ::fidl_next::EncodeError> {
7374        if let Some(inner) = this {
7375            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7376            ::fidl_next::WireBox::encode_present(out);
7377        } else {
7378            ::fidl_next::WireBox::encode_absent(out);
7379        }
7380
7381        Ok(())
7382    }
7383}
7384
7385impl ::fidl_next::FromWire<WireNodeSetFlagsRequest> for NodeSetFlagsRequest {
7386    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireNodeSetFlagsRequest, Self> = unsafe {
7387        ::fidl_next::CopyOptimization::enable_if(
7388            true && <crate::Flags as ::fidl_next::FromWire<crate::WireFlags>>::COPY_OPTIMIZATION
7389                .is_enabled(),
7390        )
7391    };
7392
7393    #[inline]
7394    fn from_wire(wire: WireNodeSetFlagsRequest) -> Self {
7395        Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
7396    }
7397}
7398
7399impl ::fidl_next::FromWireRef<WireNodeSetFlagsRequest> for NodeSetFlagsRequest {
7400    #[inline]
7401    fn from_wire_ref(wire: &WireNodeSetFlagsRequest) -> Self {
7402        Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
7403    }
7404}
7405
7406/// The wire type corresponding to [`NodeSetFlagsRequest`].
7407#[derive(Clone, Debug)]
7408#[repr(C)]
7409pub struct WireNodeSetFlagsRequest {
7410    pub flags: crate::WireFlags,
7411}
7412
7413unsafe impl ::fidl_next::Wire for WireNodeSetFlagsRequest {
7414    type Decoded<'de> = WireNodeSetFlagsRequest;
7415
7416    #[inline]
7417    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7418}
7419
7420unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeSetFlagsRequest
7421where
7422    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7423{
7424    fn decode(
7425        slot: ::fidl_next::Slot<'_, Self>,
7426        decoder: &mut ___D,
7427    ) -> Result<(), ::fidl_next::DecodeError> {
7428        ::fidl_next::munge! {
7429            let Self {
7430                mut flags,
7431
7432            } = slot;
7433        }
7434
7435        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
7436
7437        Ok(())
7438    }
7439}
7440
7441#[doc = " The maximum size for passing the SELinux context as an attribute.\n"]
7442pub const MAX_SELINUX_CONTEXT_ATTRIBUTE_LEN: u64 = 256;
7443
7444#[doc = " Used in places where empty structs are needed, such as empty union members, to avoid creating\n new struct types.\n"]
7445#[derive(Clone, Debug)]
7446#[repr(C)]
7447pub struct EmptyStruct {}
7448
7449impl ::fidl_next::Encodable for EmptyStruct {
7450    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireEmptyStruct> =
7451        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
7452
7453    type Encoded = WireEmptyStruct;
7454}
7455
7456unsafe impl<___E> ::fidl_next::Encode<___E> for EmptyStruct
7457where
7458    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7459{
7460    #[inline]
7461    fn encode(
7462        self,
7463        encoder: &mut ___E,
7464        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7465    ) -> Result<(), ::fidl_next::EncodeError> {
7466        ::fidl_next::munge! {
7467            let Self::Encoded {
7468
7469            } = out;
7470        }
7471
7472        Ok(())
7473    }
7474}
7475
7476unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EmptyStruct
7477where
7478    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7479{
7480    #[inline]
7481    fn encode_ref(
7482        &self,
7483        encoder: &mut ___E,
7484        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7485    ) -> Result<(), ::fidl_next::EncodeError> {
7486        ::fidl_next::munge! {
7487            let Self::Encoded {
7488
7489            } = out;
7490        }
7491
7492        Ok(())
7493    }
7494}
7495
7496impl ::fidl_next::EncodableOption for EmptyStruct {
7497    type EncodedOption = ::fidl_next::WireBox<'static, WireEmptyStruct>;
7498}
7499
7500unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EmptyStruct
7501where
7502    ___E: ::fidl_next::Encoder + ?Sized,
7503    EmptyStruct: ::fidl_next::Encode<___E>,
7504{
7505    #[inline]
7506    fn encode_option(
7507        this: Option<Self>,
7508        encoder: &mut ___E,
7509        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7510    ) -> Result<(), ::fidl_next::EncodeError> {
7511        if let Some(inner) = this {
7512            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7513            ::fidl_next::WireBox::encode_present(out);
7514        } else {
7515            ::fidl_next::WireBox::encode_absent(out);
7516        }
7517
7518        Ok(())
7519    }
7520}
7521
7522unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for EmptyStruct
7523where
7524    ___E: ::fidl_next::Encoder + ?Sized,
7525    EmptyStruct: ::fidl_next::EncodeRef<___E>,
7526{
7527    #[inline]
7528    fn encode_option_ref(
7529        this: Option<&Self>,
7530        encoder: &mut ___E,
7531        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7532    ) -> Result<(), ::fidl_next::EncodeError> {
7533        if let Some(inner) = this {
7534            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7535            ::fidl_next::WireBox::encode_present(out);
7536        } else {
7537            ::fidl_next::WireBox::encode_absent(out);
7538        }
7539
7540        Ok(())
7541    }
7542}
7543
7544impl ::fidl_next::FromWire<WireEmptyStruct> for EmptyStruct {
7545    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireEmptyStruct, Self> =
7546        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
7547
7548    #[inline]
7549    fn from_wire(wire: WireEmptyStruct) -> Self {
7550        Self {}
7551    }
7552}
7553
7554impl ::fidl_next::FromWireRef<WireEmptyStruct> for EmptyStruct {
7555    #[inline]
7556    fn from_wire_ref(wire: &WireEmptyStruct) -> Self {
7557        Self {}
7558    }
7559}
7560
7561/// The wire type corresponding to [`EmptyStruct`].
7562#[derive(Clone, Debug)]
7563#[repr(C)]
7564pub struct WireEmptyStruct {}
7565
7566unsafe impl ::fidl_next::Wire for WireEmptyStruct {
7567    type Decoded<'de> = WireEmptyStruct;
7568
7569    #[inline]
7570    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7571}
7572
7573unsafe impl<___D> ::fidl_next::Decode<___D> for WireEmptyStruct
7574where
7575    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7576{
7577    fn decode(
7578        slot: ::fidl_next::Slot<'_, Self>,
7579        decoder: &mut ___D,
7580    ) -> Result<(), ::fidl_next::DecodeError> {
7581        ::fidl_next::munge! {
7582            let Self {
7583
7584            } = slot;
7585        }
7586
7587        Ok(())
7588    }
7589}
7590
7591#[derive(Clone, Debug)]
7592pub enum SelinuxContext {
7593    Data(Vec<u8>),
7594
7595    UseExtendedAttributes(crate::EmptyStruct),
7596
7597    UnknownOrdinal_(u64),
7598}
7599
7600impl ::fidl_next::Encodable for SelinuxContext {
7601    type Encoded = WireSelinuxContext<'static>;
7602}
7603
7604unsafe impl<___E> ::fidl_next::Encode<___E> for SelinuxContext
7605where
7606    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7607
7608    ___E: ::fidl_next::Encoder,
7609{
7610    #[inline]
7611    fn encode(
7612        self,
7613        encoder: &mut ___E,
7614        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7615    ) -> Result<(), ::fidl_next::EncodeError> {
7616        ::fidl_next::munge!(let WireSelinuxContext { raw, _phantom: _ } = out);
7617
7618        match self {
7619            Self::Data(value) => {
7620                ::fidl_next::RawWireUnion::encode_as::<___E, Vec<u8>>(value, 1, encoder, raw)?
7621            }
7622
7623            Self::UseExtendedAttributes(value) => ::fidl_next::RawWireUnion::encode_as::<
7624                ___E,
7625                crate::EmptyStruct,
7626            >(value, 2, encoder, raw)?,
7627
7628            Self::UnknownOrdinal_(ordinal) => {
7629                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize))
7630            }
7631        }
7632
7633        Ok(())
7634    }
7635}
7636
7637unsafe impl<___E> ::fidl_next::EncodeRef<___E> for SelinuxContext
7638where
7639    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7640
7641    ___E: ::fidl_next::Encoder,
7642{
7643    #[inline]
7644    fn encode_ref(
7645        &self,
7646        encoder: &mut ___E,
7647        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7648    ) -> Result<(), ::fidl_next::EncodeError> {
7649        ::fidl_next::munge!(let WireSelinuxContext { raw, _phantom: _ } = out);
7650
7651        match self {
7652            Self::Data(value) => {
7653                ::fidl_next::RawWireUnion::encode_as::<___E, &Vec<u8>>(value, 1, encoder, raw)?
7654            }
7655
7656            Self::UseExtendedAttributes(value) => ::fidl_next::RawWireUnion::encode_as::<
7657                ___E,
7658                &crate::EmptyStruct,
7659            >(value, 2, encoder, raw)?,
7660
7661            Self::UnknownOrdinal_(ordinal) => {
7662                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize))
7663            }
7664        }
7665
7666        Ok(())
7667    }
7668}
7669
7670impl ::fidl_next::EncodableOption for SelinuxContext {
7671    type EncodedOption = WireOptionalSelinuxContext<'static>;
7672}
7673
7674unsafe impl<___E> ::fidl_next::EncodeOption<___E> for SelinuxContext
7675where
7676    ___E: ?Sized,
7677    SelinuxContext: ::fidl_next::Encode<___E>,
7678{
7679    #[inline]
7680    fn encode_option(
7681        this: Option<Self>,
7682        encoder: &mut ___E,
7683        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7684    ) -> Result<(), ::fidl_next::EncodeError> {
7685        ::fidl_next::munge!(let WireOptionalSelinuxContext { raw, _phantom: _ } = &mut *out);
7686
7687        if let Some(inner) = this {
7688            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7689            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
7690        } else {
7691            ::fidl_next::RawWireUnion::encode_absent(raw);
7692        }
7693
7694        Ok(())
7695    }
7696}
7697
7698unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for SelinuxContext
7699where
7700    ___E: ?Sized,
7701    SelinuxContext: ::fidl_next::EncodeRef<___E>,
7702{
7703    #[inline]
7704    fn encode_option_ref(
7705        this: Option<&Self>,
7706        encoder: &mut ___E,
7707        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7708    ) -> Result<(), ::fidl_next::EncodeError> {
7709        ::fidl_next::munge!(let WireOptionalSelinuxContext { raw, _phantom: _ } = &mut *out);
7710
7711        if let Some(inner) = this {
7712            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
7713            ::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
7714        } else {
7715            ::fidl_next::RawWireUnion::encode_absent(raw);
7716        }
7717
7718        Ok(())
7719    }
7720}
7721
7722impl<'de> ::fidl_next::FromWire<WireSelinuxContext<'de>> for SelinuxContext {
7723    #[inline]
7724    fn from_wire(wire: WireSelinuxContext<'de>) -> Self {
7725        let wire = ::core::mem::ManuallyDrop::new(wire);
7726        match wire.raw.ordinal() {
7727            1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
7728                wire.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>()
7729            })),
7730
7731            2 => Self::UseExtendedAttributes(::fidl_next::FromWire::from_wire(unsafe {
7732                wire.raw.get().read_unchecked::<crate::WireEmptyStruct>()
7733            })),
7734
7735            _ => unsafe { ::core::hint::unreachable_unchecked() },
7736        }
7737    }
7738}
7739
7740impl<'de> ::fidl_next::FromWireRef<WireSelinuxContext<'de>> for SelinuxContext {
7741    #[inline]
7742    fn from_wire_ref(wire: &WireSelinuxContext<'de>) -> Self {
7743        match wire.raw.ordinal() {
7744            1 => Self::Data(::fidl_next::FromWireRef::from_wire_ref(unsafe {
7745                wire.raw.get().deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
7746            })),
7747
7748            2 => Self::UseExtendedAttributes(::fidl_next::FromWireRef::from_wire_ref(unsafe {
7749                wire.raw.get().deref_unchecked::<crate::WireEmptyStruct>()
7750            })),
7751
7752            _ => unsafe { ::core::hint::unreachable_unchecked() },
7753        }
7754    }
7755}
7756
7757impl<'de> ::fidl_next::FromWireOption<WireOptionalSelinuxContext<'de>> for Box<SelinuxContext> {
7758    #[inline]
7759    fn from_wire_option(wire: WireOptionalSelinuxContext<'de>) -> Option<Self> {
7760        if let Some(inner) = wire.into_option() {
7761            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
7762        } else {
7763            None
7764        }
7765    }
7766}
7767
7768impl<'de> ::fidl_next::FromWireOptionRef<WireOptionalSelinuxContext<'de>> for Box<SelinuxContext> {
7769    #[inline]
7770    fn from_wire_option_ref(wire: &WireOptionalSelinuxContext<'de>) -> Option<Self> {
7771        if let Some(inner) = wire.as_ref() {
7772            Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
7773        } else {
7774            None
7775        }
7776    }
7777}
7778
7779/// The wire type corresponding to [`SelinuxContext`].
7780#[repr(transparent)]
7781pub struct WireSelinuxContext<'de> {
7782    raw: ::fidl_next::RawWireUnion,
7783    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7784}
7785
7786impl<'de> Drop for WireSelinuxContext<'de> {
7787    fn drop(&mut self) {
7788        match self.raw.ordinal() {
7789            1 => {
7790                let _ =
7791                    unsafe { self.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>() };
7792            }
7793
7794            2 => {
7795                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireEmptyStruct>() };
7796            }
7797
7798            _ => (),
7799        }
7800    }
7801}
7802
7803unsafe impl ::fidl_next::Wire for WireSelinuxContext<'static> {
7804    type Decoded<'de> = WireSelinuxContext<'de>;
7805
7806    #[inline]
7807    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7808        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7809        ::fidl_next::RawWireUnion::zero_padding(raw);
7810    }
7811}
7812
7813pub mod selinux_context {
7814    pub enum Ref<'de> {
7815        Data(&'de ::fidl_next::WireVector<'de, u8>),
7816
7817        UseExtendedAttributes(&'de crate::WireEmptyStruct),
7818
7819        UnknownOrdinal_(u64),
7820    }
7821}
7822
7823impl<'de> WireSelinuxContext<'de> {
7824    pub fn as_ref(&self) -> crate::selinux_context::Ref<'_> {
7825        match self.raw.ordinal() {
7826            1 => crate::selinux_context::Ref::Data(unsafe {
7827                self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
7828            }),
7829
7830            2 => crate::selinux_context::Ref::UseExtendedAttributes(unsafe {
7831                self.raw.get().deref_unchecked::<crate::WireEmptyStruct>()
7832            }),
7833
7834            unknown => crate::selinux_context::Ref::UnknownOrdinal_(unknown),
7835        }
7836    }
7837}
7838
7839unsafe impl<___D> ::fidl_next::Decode<___D> for WireSelinuxContext<'static>
7840where
7841    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7842
7843    ___D: ::fidl_next::Decoder,
7844{
7845    fn decode(
7846        mut slot: ::fidl_next::Slot<'_, Self>,
7847        decoder: &mut ___D,
7848    ) -> Result<(), ::fidl_next::DecodeError> {
7849        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7850        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
7851            1 => {
7852                ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireVector<'static, u8>>(
7853                    raw, decoder,
7854                )?
7855            }
7856
7857            2 => {
7858                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireEmptyStruct>(raw, decoder)?
7859            }
7860
7861            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
7862        }
7863
7864        Ok(())
7865    }
7866}
7867
7868impl<'de> ::core::fmt::Debug for WireSelinuxContext<'de> {
7869    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7870        match self.raw.ordinal() {
7871            1 => unsafe {
7872                self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>().fmt(f)
7873            },
7874            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireEmptyStruct>().fmt(f) },
7875            _ => unsafe { ::core::hint::unreachable_unchecked() },
7876        }
7877    }
7878}
7879
7880#[repr(transparent)]
7881pub struct WireOptionalSelinuxContext<'de> {
7882    raw: ::fidl_next::RawWireUnion,
7883    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7884}
7885
7886unsafe impl ::fidl_next::Wire for WireOptionalSelinuxContext<'static> {
7887    type Decoded<'de> = WireOptionalSelinuxContext<'de>;
7888
7889    #[inline]
7890    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7891        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7892        ::fidl_next::RawWireUnion::zero_padding(raw);
7893    }
7894}
7895
7896impl<'de> WireOptionalSelinuxContext<'de> {
7897    pub fn is_some(&self) -> bool {
7898        self.raw.is_some()
7899    }
7900
7901    pub fn is_none(&self) -> bool {
7902        self.raw.is_none()
7903    }
7904
7905    pub fn as_ref(&self) -> Option<&WireSelinuxContext<'de>> {
7906        if self.is_some() {
7907            Some(unsafe { &*(self as *const Self).cast() })
7908        } else {
7909            None
7910        }
7911    }
7912
7913    pub fn into_option(self) -> Option<WireSelinuxContext<'de>> {
7914        if self.is_some() {
7915            Some(WireSelinuxContext { raw: self.raw, _phantom: ::core::marker::PhantomData })
7916        } else {
7917            None
7918        }
7919    }
7920}
7921
7922unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalSelinuxContext<'static>
7923where
7924    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7925
7926    ___D: ::fidl_next::Decoder,
7927{
7928    fn decode(
7929        mut slot: ::fidl_next::Slot<'_, Self>,
7930        decoder: &mut ___D,
7931    ) -> Result<(), ::fidl_next::DecodeError> {
7932        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7933        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
7934            1 => {
7935                ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireVector<'static, u8>>(
7936                    raw, decoder,
7937                )?
7938            }
7939
7940            2 => {
7941                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireEmptyStruct>(raw, decoder)?
7942            }
7943
7944            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
7945            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
7946        }
7947
7948        Ok(())
7949    }
7950}
7951
7952impl<'de> ::core::fmt::Debug for WireOptionalSelinuxContext<'de> {
7953    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7954        self.as_ref().fmt(f)
7955    }
7956}
7957
7958#[derive(Clone, Debug, Default)]
7959pub struct MutableNodeAttributes {
7960    pub creation_time: Option<u64>,
7961
7962    pub modification_time: Option<u64>,
7963
7964    pub mode: Option<u32>,
7965
7966    pub uid: Option<u32>,
7967
7968    pub gid: Option<u32>,
7969
7970    pub rdev: Option<u64>,
7971
7972    pub access_time: Option<u64>,
7973
7974    pub casefold: Option<bool>,
7975
7976    pub selinux_context: Option<crate::SelinuxContext>,
7977
7978    pub wrapping_key_id: Option<[u8; 16]>,
7979}
7980
7981impl MutableNodeAttributes {
7982    fn __max_ordinal(&self) -> usize {
7983        if self.wrapping_key_id.is_some() {
7984            return 10;
7985        }
7986
7987        if self.selinux_context.is_some() {
7988            return 9;
7989        }
7990
7991        if self.casefold.is_some() {
7992            return 8;
7993        }
7994
7995        if self.access_time.is_some() {
7996            return 7;
7997        }
7998
7999        if self.rdev.is_some() {
8000            return 6;
8001        }
8002
8003        if self.gid.is_some() {
8004            return 5;
8005        }
8006
8007        if self.uid.is_some() {
8008            return 4;
8009        }
8010
8011        if self.mode.is_some() {
8012            return 3;
8013        }
8014
8015        if self.modification_time.is_some() {
8016            return 2;
8017        }
8018
8019        if self.creation_time.is_some() {
8020            return 1;
8021        }
8022
8023        0
8024    }
8025}
8026
8027impl ::fidl_next::Encodable for MutableNodeAttributes {
8028    type Encoded = WireMutableNodeAttributes<'static>;
8029}
8030
8031unsafe impl<___E> ::fidl_next::Encode<___E> for MutableNodeAttributes
8032where
8033    ___E: ::fidl_next::Encoder + ?Sized,
8034{
8035    #[inline]
8036    fn encode(
8037        mut self,
8038        encoder: &mut ___E,
8039        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8040    ) -> Result<(), ::fidl_next::EncodeError> {
8041        ::fidl_next::munge!(let WireMutableNodeAttributes { table } = out);
8042
8043        let max_ord = self.__max_ordinal();
8044
8045        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8046        ::fidl_next::Wire::zero_padding(&mut out);
8047
8048        let mut preallocated =
8049            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8050
8051        for i in 1..=max_ord {
8052            match i {
8053                10 => {
8054                    if let Some(wrapping_key_id) = self.wrapping_key_id.take() {
8055                        ::fidl_next::WireEnvelope::encode_value(
8056                            wrapping_key_id,
8057                            preallocated.encoder,
8058                            &mut out,
8059                        )?;
8060                    } else {
8061                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8062                    }
8063                }
8064
8065                9 => {
8066                    if let Some(selinux_context) = self.selinux_context.take() {
8067                        ::fidl_next::WireEnvelope::encode_value(
8068                            selinux_context,
8069                            preallocated.encoder,
8070                            &mut out,
8071                        )?;
8072                    } else {
8073                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8074                    }
8075                }
8076
8077                8 => {
8078                    if let Some(casefold) = self.casefold.take() {
8079                        ::fidl_next::WireEnvelope::encode_value(
8080                            casefold,
8081                            preallocated.encoder,
8082                            &mut out,
8083                        )?;
8084                    } else {
8085                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8086                    }
8087                }
8088
8089                7 => {
8090                    if let Some(access_time) = self.access_time.take() {
8091                        ::fidl_next::WireEnvelope::encode_value(
8092                            access_time,
8093                            preallocated.encoder,
8094                            &mut out,
8095                        )?;
8096                    } else {
8097                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8098                    }
8099                }
8100
8101                6 => {
8102                    if let Some(rdev) = self.rdev.take() {
8103                        ::fidl_next::WireEnvelope::encode_value(
8104                            rdev,
8105                            preallocated.encoder,
8106                            &mut out,
8107                        )?;
8108                    } else {
8109                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8110                    }
8111                }
8112
8113                5 => {
8114                    if let Some(gid) = self.gid.take() {
8115                        ::fidl_next::WireEnvelope::encode_value(
8116                            gid,
8117                            preallocated.encoder,
8118                            &mut out,
8119                        )?;
8120                    } else {
8121                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8122                    }
8123                }
8124
8125                4 => {
8126                    if let Some(uid) = self.uid.take() {
8127                        ::fidl_next::WireEnvelope::encode_value(
8128                            uid,
8129                            preallocated.encoder,
8130                            &mut out,
8131                        )?;
8132                    } else {
8133                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8134                    }
8135                }
8136
8137                3 => {
8138                    if let Some(mode) = self.mode.take() {
8139                        ::fidl_next::WireEnvelope::encode_value(
8140                            mode,
8141                            preallocated.encoder,
8142                            &mut out,
8143                        )?;
8144                    } else {
8145                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8146                    }
8147                }
8148
8149                2 => {
8150                    if let Some(modification_time) = self.modification_time.take() {
8151                        ::fidl_next::WireEnvelope::encode_value(
8152                            modification_time,
8153                            preallocated.encoder,
8154                            &mut out,
8155                        )?;
8156                    } else {
8157                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8158                    }
8159                }
8160
8161                1 => {
8162                    if let Some(creation_time) = self.creation_time.take() {
8163                        ::fidl_next::WireEnvelope::encode_value(
8164                            creation_time,
8165                            preallocated.encoder,
8166                            &mut out,
8167                        )?;
8168                    } else {
8169                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8170                    }
8171                }
8172
8173                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8174            }
8175            unsafe {
8176                preallocated.write_next(out.assume_init_ref());
8177            }
8178        }
8179
8180        ::fidl_next::WireTable::encode_len(table, max_ord);
8181
8182        Ok(())
8183    }
8184}
8185
8186unsafe impl<___E> ::fidl_next::EncodeRef<___E> for MutableNodeAttributes
8187where
8188    ___E: ::fidl_next::Encoder + ?Sized,
8189{
8190    #[inline]
8191    fn encode_ref(
8192        &self,
8193        encoder: &mut ___E,
8194        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8195    ) -> Result<(), ::fidl_next::EncodeError> {
8196        ::fidl_next::munge!(let WireMutableNodeAttributes { table } = out);
8197
8198        let max_ord = self.__max_ordinal();
8199
8200        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8201        ::fidl_next::Wire::zero_padding(&mut out);
8202
8203        let mut preallocated =
8204            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8205
8206        for i in 1..=max_ord {
8207            match i {
8208                10 => {
8209                    if let Some(wrapping_key_id) = &self.wrapping_key_id {
8210                        ::fidl_next::WireEnvelope::encode_value(
8211                            wrapping_key_id,
8212                            preallocated.encoder,
8213                            &mut out,
8214                        )?;
8215                    } else {
8216                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8217                    }
8218                }
8219
8220                9 => {
8221                    if let Some(selinux_context) = &self.selinux_context {
8222                        ::fidl_next::WireEnvelope::encode_value(
8223                            selinux_context,
8224                            preallocated.encoder,
8225                            &mut out,
8226                        )?;
8227                    } else {
8228                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8229                    }
8230                }
8231
8232                8 => {
8233                    if let Some(casefold) = &self.casefold {
8234                        ::fidl_next::WireEnvelope::encode_value(
8235                            casefold,
8236                            preallocated.encoder,
8237                            &mut out,
8238                        )?;
8239                    } else {
8240                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8241                    }
8242                }
8243
8244                7 => {
8245                    if let Some(access_time) = &self.access_time {
8246                        ::fidl_next::WireEnvelope::encode_value(
8247                            access_time,
8248                            preallocated.encoder,
8249                            &mut out,
8250                        )?;
8251                    } else {
8252                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8253                    }
8254                }
8255
8256                6 => {
8257                    if let Some(rdev) = &self.rdev {
8258                        ::fidl_next::WireEnvelope::encode_value(
8259                            rdev,
8260                            preallocated.encoder,
8261                            &mut out,
8262                        )?;
8263                    } else {
8264                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8265                    }
8266                }
8267
8268                5 => {
8269                    if let Some(gid) = &self.gid {
8270                        ::fidl_next::WireEnvelope::encode_value(
8271                            gid,
8272                            preallocated.encoder,
8273                            &mut out,
8274                        )?;
8275                    } else {
8276                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8277                    }
8278                }
8279
8280                4 => {
8281                    if let Some(uid) = &self.uid {
8282                        ::fidl_next::WireEnvelope::encode_value(
8283                            uid,
8284                            preallocated.encoder,
8285                            &mut out,
8286                        )?;
8287                    } else {
8288                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8289                    }
8290                }
8291
8292                3 => {
8293                    if let Some(mode) = &self.mode {
8294                        ::fidl_next::WireEnvelope::encode_value(
8295                            mode,
8296                            preallocated.encoder,
8297                            &mut out,
8298                        )?;
8299                    } else {
8300                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8301                    }
8302                }
8303
8304                2 => {
8305                    if let Some(modification_time) = &self.modification_time {
8306                        ::fidl_next::WireEnvelope::encode_value(
8307                            modification_time,
8308                            preallocated.encoder,
8309                            &mut out,
8310                        )?;
8311                    } else {
8312                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8313                    }
8314                }
8315
8316                1 => {
8317                    if let Some(creation_time) = &self.creation_time {
8318                        ::fidl_next::WireEnvelope::encode_value(
8319                            creation_time,
8320                            preallocated.encoder,
8321                            &mut out,
8322                        )?;
8323                    } else {
8324                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8325                    }
8326                }
8327
8328                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8329            }
8330            unsafe {
8331                preallocated.write_next(out.assume_init_ref());
8332            }
8333        }
8334
8335        ::fidl_next::WireTable::encode_len(table, max_ord);
8336
8337        Ok(())
8338    }
8339}
8340
8341impl<'de> ::fidl_next::FromWire<WireMutableNodeAttributes<'de>> for MutableNodeAttributes {
8342    #[inline]
8343    fn from_wire(wire: WireMutableNodeAttributes<'de>) -> Self {
8344        let wire = ::core::mem::ManuallyDrop::new(wire);
8345
8346        let creation_time = wire.table.get(1);
8347
8348        let modification_time = wire.table.get(2);
8349
8350        let mode = wire.table.get(3);
8351
8352        let uid = wire.table.get(4);
8353
8354        let gid = wire.table.get(5);
8355
8356        let rdev = wire.table.get(6);
8357
8358        let access_time = wire.table.get(7);
8359
8360        let casefold = wire.table.get(8);
8361
8362        let selinux_context = wire.table.get(9);
8363
8364        let wrapping_key_id = wire.table.get(10);
8365
8366        Self {
8367            creation_time: creation_time.map(|envelope| {
8368                ::fidl_next::FromWire::from_wire(unsafe {
8369                    envelope.read_unchecked::<::fidl_next::WireU64>()
8370                })
8371            }),
8372
8373            modification_time: modification_time.map(|envelope| {
8374                ::fidl_next::FromWire::from_wire(unsafe {
8375                    envelope.read_unchecked::<::fidl_next::WireU64>()
8376                })
8377            }),
8378
8379            mode: mode.map(|envelope| {
8380                ::fidl_next::FromWire::from_wire(unsafe {
8381                    envelope.read_unchecked::<::fidl_next::WireU32>()
8382                })
8383            }),
8384
8385            uid: uid.map(|envelope| {
8386                ::fidl_next::FromWire::from_wire(unsafe {
8387                    envelope.read_unchecked::<::fidl_next::WireU32>()
8388                })
8389            }),
8390
8391            gid: gid.map(|envelope| {
8392                ::fidl_next::FromWire::from_wire(unsafe {
8393                    envelope.read_unchecked::<::fidl_next::WireU32>()
8394                })
8395            }),
8396
8397            rdev: rdev.map(|envelope| {
8398                ::fidl_next::FromWire::from_wire(unsafe {
8399                    envelope.read_unchecked::<::fidl_next::WireU64>()
8400                })
8401            }),
8402
8403            access_time: access_time.map(|envelope| {
8404                ::fidl_next::FromWire::from_wire(unsafe {
8405                    envelope.read_unchecked::<::fidl_next::WireU64>()
8406                })
8407            }),
8408
8409            casefold: casefold.map(|envelope| {
8410                ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
8411            }),
8412
8413            selinux_context: selinux_context.map(|envelope| {
8414                ::fidl_next::FromWire::from_wire(unsafe {
8415                    envelope.read_unchecked::<crate::WireSelinuxContext<'de>>()
8416                })
8417            }),
8418
8419            wrapping_key_id: wrapping_key_id.map(|envelope| {
8420                ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<[u8; 16]>() })
8421            }),
8422        }
8423    }
8424}
8425
8426impl<'de> ::fidl_next::FromWireRef<WireMutableNodeAttributes<'de>> for MutableNodeAttributes {
8427    #[inline]
8428    fn from_wire_ref(wire: &WireMutableNodeAttributes<'de>) -> Self {
8429        Self {
8430            creation_time: wire.table.get(1).map(|envelope| {
8431                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8432                    envelope.deref_unchecked::<::fidl_next::WireU64>()
8433                })
8434            }),
8435
8436            modification_time: wire.table.get(2).map(|envelope| {
8437                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8438                    envelope.deref_unchecked::<::fidl_next::WireU64>()
8439                })
8440            }),
8441
8442            mode: wire.table.get(3).map(|envelope| {
8443                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8444                    envelope.deref_unchecked::<::fidl_next::WireU32>()
8445                })
8446            }),
8447
8448            uid: wire.table.get(4).map(|envelope| {
8449                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8450                    envelope.deref_unchecked::<::fidl_next::WireU32>()
8451                })
8452            }),
8453
8454            gid: wire.table.get(5).map(|envelope| {
8455                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8456                    envelope.deref_unchecked::<::fidl_next::WireU32>()
8457                })
8458            }),
8459
8460            rdev: wire.table.get(6).map(|envelope| {
8461                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8462                    envelope.deref_unchecked::<::fidl_next::WireU64>()
8463                })
8464            }),
8465
8466            access_time: wire.table.get(7).map(|envelope| {
8467                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8468                    envelope.deref_unchecked::<::fidl_next::WireU64>()
8469                })
8470            }),
8471
8472            casefold: wire.table.get(8).map(|envelope| {
8473                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8474                    envelope.deref_unchecked::<bool>()
8475                })
8476            }),
8477
8478            selinux_context: wire.table.get(9).map(|envelope| {
8479                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8480                    envelope.deref_unchecked::<crate::WireSelinuxContext<'de>>()
8481                })
8482            }),
8483
8484            wrapping_key_id: wire.table.get(10).map(|envelope| {
8485                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8486                    envelope.deref_unchecked::<[u8; 16]>()
8487                })
8488            }),
8489        }
8490    }
8491}
8492
8493/// The wire type corresponding to [`MutableNodeAttributes`].
8494#[repr(C)]
8495pub struct WireMutableNodeAttributes<'de> {
8496    table: ::fidl_next::WireTable<'de>,
8497}
8498
8499impl<'de> Drop for WireMutableNodeAttributes<'de> {
8500    fn drop(&mut self) {
8501        let _ = self
8502            .table
8503            .get(1)
8504            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
8505
8506        let _ = self
8507            .table
8508            .get(2)
8509            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
8510
8511        let _ = self
8512            .table
8513            .get(3)
8514            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
8515
8516        let _ = self
8517            .table
8518            .get(4)
8519            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
8520
8521        let _ = self
8522            .table
8523            .get(5)
8524            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
8525
8526        let _ = self
8527            .table
8528            .get(6)
8529            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
8530
8531        let _ = self
8532            .table
8533            .get(7)
8534            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
8535
8536        let _ = self.table.get(8).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8537
8538        let _ = self
8539            .table
8540            .get(9)
8541            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireSelinuxContext<'de>>() });
8542
8543        let _ = self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 16]>() });
8544    }
8545}
8546
8547unsafe impl ::fidl_next::Wire for WireMutableNodeAttributes<'static> {
8548    type Decoded<'de> = WireMutableNodeAttributes<'de>;
8549
8550    #[inline]
8551    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8552        ::fidl_next::munge!(let Self { table } = out);
8553        ::fidl_next::WireTable::zero_padding(table);
8554    }
8555}
8556
8557unsafe impl<___D> ::fidl_next::Decode<___D> for WireMutableNodeAttributes<'static>
8558where
8559    ___D: ::fidl_next::Decoder + ?Sized,
8560{
8561    fn decode(
8562        slot: ::fidl_next::Slot<'_, Self>,
8563        decoder: &mut ___D,
8564    ) -> Result<(), ::fidl_next::DecodeError> {
8565        ::fidl_next::munge!(let Self { table } = slot);
8566
8567        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8568            match ordinal {
8569                0 => unsafe { ::core::hint::unreachable_unchecked() },
8570
8571                1 => {
8572                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
8573                        slot.as_mut(),
8574                        decoder,
8575                    )?;
8576
8577                    Ok(())
8578                }
8579
8580                2 => {
8581                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
8582                        slot.as_mut(),
8583                        decoder,
8584                    )?;
8585
8586                    Ok(())
8587                }
8588
8589                3 => {
8590                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
8591                        slot.as_mut(),
8592                        decoder,
8593                    )?;
8594
8595                    Ok(())
8596                }
8597
8598                4 => {
8599                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
8600                        slot.as_mut(),
8601                        decoder,
8602                    )?;
8603
8604                    Ok(())
8605                }
8606
8607                5 => {
8608                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
8609                        slot.as_mut(),
8610                        decoder,
8611                    )?;
8612
8613                    Ok(())
8614                }
8615
8616                6 => {
8617                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
8618                        slot.as_mut(),
8619                        decoder,
8620                    )?;
8621
8622                    Ok(())
8623                }
8624
8625                7 => {
8626                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
8627                        slot.as_mut(),
8628                        decoder,
8629                    )?;
8630
8631                    Ok(())
8632                }
8633
8634                8 => {
8635                    ::fidl_next::WireEnvelope::decode_as::<___D, bool>(slot.as_mut(), decoder)?;
8636
8637                    Ok(())
8638                }
8639
8640                9 => {
8641                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireSelinuxContext<'static>>(
8642                        slot.as_mut(),
8643                        decoder,
8644                    )?;
8645
8646                    Ok(())
8647                }
8648
8649                10 => {
8650                    ::fidl_next::WireEnvelope::decode_as::<___D, [u8; 16]>(slot.as_mut(), decoder)?;
8651
8652                    Ok(())
8653                }
8654
8655                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
8656            }
8657        })
8658    }
8659}
8660
8661impl<'de> WireMutableNodeAttributes<'de> {
8662    pub fn creation_time(&self) -> Option<&::fidl_next::WireU64> {
8663        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8664    }
8665
8666    pub fn modification_time(&self) -> Option<&::fidl_next::WireU64> {
8667        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8668    }
8669
8670    pub fn mode(&self) -> Option<&::fidl_next::WireU32> {
8671        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
8672    }
8673
8674    pub fn uid(&self) -> Option<&::fidl_next::WireU32> {
8675        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
8676    }
8677
8678    pub fn gid(&self) -> Option<&::fidl_next::WireU32> {
8679        unsafe { Some(self.table.get(5)?.deref_unchecked()) }
8680    }
8681
8682    pub fn rdev(&self) -> Option<&::fidl_next::WireU64> {
8683        unsafe { Some(self.table.get(6)?.deref_unchecked()) }
8684    }
8685
8686    pub fn access_time(&self) -> Option<&::fidl_next::WireU64> {
8687        unsafe { Some(self.table.get(7)?.deref_unchecked()) }
8688    }
8689
8690    pub fn casefold(&self) -> Option<&bool> {
8691        unsafe { Some(self.table.get(8)?.deref_unchecked()) }
8692    }
8693
8694    pub fn selinux_context(&self) -> Option<&crate::WireSelinuxContext<'de>> {
8695        unsafe { Some(self.table.get(9)?.deref_unchecked()) }
8696    }
8697
8698    pub fn wrapping_key_id(&self) -> Option<&[u8; 16]> {
8699        unsafe { Some(self.table.get(10)?.deref_unchecked()) }
8700    }
8701}
8702
8703impl<'de> ::core::fmt::Debug for WireMutableNodeAttributes<'de> {
8704    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
8705        f.debug_struct("MutableNodeAttributes")
8706            .field("creation_time", &self.creation_time())
8707            .field("modification_time", &self.modification_time())
8708            .field("mode", &self.mode())
8709            .field("uid", &self.uid())
8710            .field("gid", &self.gid())
8711            .field("rdev", &self.rdev())
8712            .field("access_time", &self.access_time())
8713            .field("casefold", &self.casefold())
8714            .field("selinux_context", &self.selinux_context())
8715            .field("wrapping_key_id", &self.wrapping_key_id())
8716            .finish()
8717    }
8718}
8719
8720::fidl_next::bitflags! {
8721    #[doc = " A node may have multiple supported representations when opening, even though\n it may have a fixed underlying identity.\n\n Today, a file is accessed via the [`File`] protocol, and sends a\n [`Representation.FileInfo`] when opened with `GET_REPRESENTATION`. However,\n in the future we might introduce a more sophisticated `FileV2` protocol, or\n a more efficient `SuperFastFile` backed by a specialized kernel object. New\n clients can request the more advanced representations by specifying the\n corresponding bits in [`NodeProtocolKinds`], whereas existing clients would\n continue to talk to the node via the old representation.\n\n [`NodeProtocolKinds`] enables forward-compatibility through a form of protocol\n negotiation.\n\n The elements have one-to-one correspondence with the members of\n [`Representation`].\n"]#[derive(
8722        Clone,
8723        Copy,
8724        Debug,
8725        PartialEq,
8726        Eq,
8727        Hash,
8728    )]
8729    pub struct NodeProtocolKinds: u64 {
8730        #[doc = " The connector representation of a node.\n\n The connection will speak either [`Node`] or the target protocol,\n depending on the flags used during opening.\n"]const CONNECTOR = 1;
8731        #[doc = " The directory representation of a node.\n\n The connection will speak the [`Directory`] protocol.\n"]const DIRECTORY = 2;
8732        #[doc = " The file representation of a node.\n\n The connection will speak the [`File`] protocol.\n"]const FILE = 4;
8733        #[doc = " The symlink representation of a node.\n\n The connection will speak the [`Symlink`] protocol.\n"]const SYMLINK = 8;
8734        const _ = !0;
8735    }
8736}
8737
8738impl ::fidl_next::Encodable for NodeProtocolKinds {
8739    type Encoded = WireNodeProtocolKinds;
8740}
8741
8742unsafe impl<___E> ::fidl_next::Encode<___E> for NodeProtocolKinds
8743where
8744    ___E: ?Sized,
8745{
8746    #[inline]
8747    fn encode(
8748        self,
8749        encoder: &mut ___E,
8750        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8751    ) -> Result<(), ::fidl_next::EncodeError> {
8752        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
8753    }
8754}
8755
8756unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeProtocolKinds
8757where
8758    ___E: ?Sized,
8759{
8760    #[inline]
8761    fn encode_ref(
8762        &self,
8763        _: &mut ___E,
8764        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8765    ) -> Result<(), ::fidl_next::EncodeError> {
8766        ::fidl_next::munge!(let WireNodeProtocolKinds { value } = out);
8767        let _ = value.write(::fidl_next::WireU64::from(self.bits()));
8768        Ok(())
8769    }
8770}
8771
8772impl ::core::convert::From<WireNodeProtocolKinds> for NodeProtocolKinds {
8773    fn from(wire: WireNodeProtocolKinds) -> Self {
8774        Self::from_bits_retain(u64::from(wire.value))
8775    }
8776}
8777
8778impl ::fidl_next::FromWire<WireNodeProtocolKinds> for NodeProtocolKinds {
8779    #[inline]
8780    fn from_wire(wire: WireNodeProtocolKinds) -> Self {
8781        Self::from(wire)
8782    }
8783}
8784
8785impl ::fidl_next::FromWireRef<WireNodeProtocolKinds> for NodeProtocolKinds {
8786    #[inline]
8787    fn from_wire_ref(wire: &WireNodeProtocolKinds) -> Self {
8788        Self::from(*wire)
8789    }
8790}
8791
8792/// The wire type corresponding to [`NodeProtocolKinds`].
8793#[derive(Clone, Copy, Debug)]
8794#[repr(transparent)]
8795pub struct WireNodeProtocolKinds {
8796    value: ::fidl_next::WireU64,
8797}
8798
8799unsafe impl ::fidl_next::Wire for WireNodeProtocolKinds {
8800    type Decoded<'de> = Self;
8801
8802    #[inline]
8803    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8804        // Wire bits have no padding
8805    }
8806}
8807
8808unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeProtocolKinds
8809where
8810    ___D: ?Sized,
8811{
8812    fn decode(
8813        slot: ::fidl_next::Slot<'_, Self>,
8814        _: &mut ___D,
8815    ) -> Result<(), ::fidl_next::DecodeError> {
8816        Ok(())
8817    }
8818}
8819
8820impl ::core::convert::From<NodeProtocolKinds> for WireNodeProtocolKinds {
8821    fn from(natural: NodeProtocolKinds) -> Self {
8822        Self { value: ::fidl_next::WireU64::from(natural.bits()) }
8823    }
8824}
8825
8826#[doc = " Denotes which hash algorithm is used to build the merkle tree for\n fsverity-enabled files.\n"]
8827#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8828#[repr(u8)]
8829pub enum HashAlgorithm {
8830    Sha256 = 1,
8831    Sha512 = 2,
8832    UnknownOrdinal_(u8),
8833}
8834
8835impl ::fidl_next::Encodable for HashAlgorithm {
8836    type Encoded = WireHashAlgorithm;
8837}
8838impl ::std::convert::From<u8> for HashAlgorithm {
8839    fn from(value: u8) -> Self {
8840        match value {
8841            1 => Self::Sha256,
8842            2 => Self::Sha512,
8843
8844            _ => Self::UnknownOrdinal_(value),
8845        }
8846    }
8847}
8848
8849unsafe impl<___E> ::fidl_next::Encode<___E> for HashAlgorithm
8850where
8851    ___E: ?Sized,
8852{
8853    #[inline]
8854    fn encode(
8855        self,
8856        encoder: &mut ___E,
8857        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8858    ) -> Result<(), ::fidl_next::EncodeError> {
8859        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
8860    }
8861}
8862
8863unsafe impl<___E> ::fidl_next::EncodeRef<___E> for HashAlgorithm
8864where
8865    ___E: ?Sized,
8866{
8867    #[inline]
8868    fn encode_ref(
8869        &self,
8870        encoder: &mut ___E,
8871        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8872    ) -> Result<(), ::fidl_next::EncodeError> {
8873        ::fidl_next::munge!(let WireHashAlgorithm { value } = out);
8874        let _ = value.write(u8::from(match *self {
8875            Self::Sha256 => 1,
8876
8877            Self::Sha512 => 2,
8878
8879            Self::UnknownOrdinal_(value) => value,
8880        }));
8881
8882        Ok(())
8883    }
8884}
8885
8886impl ::core::convert::From<WireHashAlgorithm> for HashAlgorithm {
8887    fn from(wire: WireHashAlgorithm) -> Self {
8888        match u8::from(wire.value) {
8889            1 => Self::Sha256,
8890
8891            2 => Self::Sha512,
8892
8893            value => Self::UnknownOrdinal_(value),
8894        }
8895    }
8896}
8897
8898impl ::fidl_next::FromWire<WireHashAlgorithm> for HashAlgorithm {
8899    #[inline]
8900    fn from_wire(wire: WireHashAlgorithm) -> Self {
8901        Self::from(wire)
8902    }
8903}
8904
8905impl ::fidl_next::FromWireRef<WireHashAlgorithm> for HashAlgorithm {
8906    #[inline]
8907    fn from_wire_ref(wire: &WireHashAlgorithm) -> Self {
8908        Self::from(*wire)
8909    }
8910}
8911
8912/// The wire type corresponding to [`HashAlgorithm`].
8913#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8914#[repr(transparent)]
8915pub struct WireHashAlgorithm {
8916    value: u8,
8917}
8918
8919unsafe impl ::fidl_next::Wire for WireHashAlgorithm {
8920    type Decoded<'de> = Self;
8921
8922    #[inline]
8923    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8924        // Wire enums have no padding
8925    }
8926}
8927
8928impl WireHashAlgorithm {
8929    pub const SHA256: WireHashAlgorithm = WireHashAlgorithm { value: 1 };
8930
8931    pub const SHA512: WireHashAlgorithm = WireHashAlgorithm { value: 2 };
8932}
8933
8934unsafe impl<___D> ::fidl_next::Decode<___D> for WireHashAlgorithm
8935where
8936    ___D: ?Sized,
8937{
8938    fn decode(
8939        slot: ::fidl_next::Slot<'_, Self>,
8940        _: &mut ___D,
8941    ) -> Result<(), ::fidl_next::DecodeError> {
8942        Ok(())
8943    }
8944}
8945
8946impl ::core::convert::From<HashAlgorithm> for WireHashAlgorithm {
8947    fn from(natural: HashAlgorithm) -> Self {
8948        match natural {
8949            HashAlgorithm::Sha256 => WireHashAlgorithm::SHA256,
8950
8951            HashAlgorithm::Sha512 => WireHashAlgorithm::SHA512,
8952
8953            HashAlgorithm::UnknownOrdinal_(value) => WireHashAlgorithm { value: u8::from(value) },
8954        }
8955    }
8956}
8957
8958#[doc = " Set of options used to enable verity on a file.\n"]
8959#[derive(Clone, Debug, Default)]
8960pub struct VerificationOptions {
8961    pub hash_algorithm: Option<crate::HashAlgorithm>,
8962
8963    pub salt: Option<Vec<u8>>,
8964}
8965
8966impl VerificationOptions {
8967    fn __max_ordinal(&self) -> usize {
8968        if self.salt.is_some() {
8969            return 2;
8970        }
8971
8972        if self.hash_algorithm.is_some() {
8973            return 1;
8974        }
8975
8976        0
8977    }
8978}
8979
8980impl ::fidl_next::Encodable for VerificationOptions {
8981    type Encoded = WireVerificationOptions<'static>;
8982}
8983
8984unsafe impl<___E> ::fidl_next::Encode<___E> for VerificationOptions
8985where
8986    ___E: ::fidl_next::Encoder + ?Sized,
8987{
8988    #[inline]
8989    fn encode(
8990        mut self,
8991        encoder: &mut ___E,
8992        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8993    ) -> Result<(), ::fidl_next::EncodeError> {
8994        ::fidl_next::munge!(let WireVerificationOptions { table } = out);
8995
8996        let max_ord = self.__max_ordinal();
8997
8998        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8999        ::fidl_next::Wire::zero_padding(&mut out);
9000
9001        let mut preallocated =
9002            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
9003
9004        for i in 1..=max_ord {
9005            match i {
9006                2 => {
9007                    if let Some(salt) = self.salt.take() {
9008                        ::fidl_next::WireEnvelope::encode_value(
9009                            salt,
9010                            preallocated.encoder,
9011                            &mut out,
9012                        )?;
9013                    } else {
9014                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9015                    }
9016                }
9017
9018                1 => {
9019                    if let Some(hash_algorithm) = self.hash_algorithm.take() {
9020                        ::fidl_next::WireEnvelope::encode_value(
9021                            hash_algorithm,
9022                            preallocated.encoder,
9023                            &mut out,
9024                        )?;
9025                    } else {
9026                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9027                    }
9028                }
9029
9030                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
9031            }
9032            unsafe {
9033                preallocated.write_next(out.assume_init_ref());
9034            }
9035        }
9036
9037        ::fidl_next::WireTable::encode_len(table, max_ord);
9038
9039        Ok(())
9040    }
9041}
9042
9043unsafe impl<___E> ::fidl_next::EncodeRef<___E> for VerificationOptions
9044where
9045    ___E: ::fidl_next::Encoder + ?Sized,
9046{
9047    #[inline]
9048    fn encode_ref(
9049        &self,
9050        encoder: &mut ___E,
9051        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9052    ) -> Result<(), ::fidl_next::EncodeError> {
9053        ::fidl_next::munge!(let WireVerificationOptions { table } = out);
9054
9055        let max_ord = self.__max_ordinal();
9056
9057        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
9058        ::fidl_next::Wire::zero_padding(&mut out);
9059
9060        let mut preallocated =
9061            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
9062
9063        for i in 1..=max_ord {
9064            match i {
9065                2 => {
9066                    if let Some(salt) = &self.salt {
9067                        ::fidl_next::WireEnvelope::encode_value(
9068                            salt,
9069                            preallocated.encoder,
9070                            &mut out,
9071                        )?;
9072                    } else {
9073                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9074                    }
9075                }
9076
9077                1 => {
9078                    if let Some(hash_algorithm) = &self.hash_algorithm {
9079                        ::fidl_next::WireEnvelope::encode_value(
9080                            hash_algorithm,
9081                            preallocated.encoder,
9082                            &mut out,
9083                        )?;
9084                    } else {
9085                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9086                    }
9087                }
9088
9089                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
9090            }
9091            unsafe {
9092                preallocated.write_next(out.assume_init_ref());
9093            }
9094        }
9095
9096        ::fidl_next::WireTable::encode_len(table, max_ord);
9097
9098        Ok(())
9099    }
9100}
9101
9102impl<'de> ::fidl_next::FromWire<WireVerificationOptions<'de>> for VerificationOptions {
9103    #[inline]
9104    fn from_wire(wire: WireVerificationOptions<'de>) -> Self {
9105        let wire = ::core::mem::ManuallyDrop::new(wire);
9106
9107        let hash_algorithm = wire.table.get(1);
9108
9109        let salt = wire.table.get(2);
9110
9111        Self {
9112            hash_algorithm: hash_algorithm.map(|envelope| {
9113                ::fidl_next::FromWire::from_wire(unsafe {
9114                    envelope.read_unchecked::<crate::WireHashAlgorithm>()
9115                })
9116            }),
9117
9118            salt: salt.map(|envelope| {
9119                ::fidl_next::FromWire::from_wire(unsafe {
9120                    envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
9121                })
9122            }),
9123        }
9124    }
9125}
9126
9127impl<'de> ::fidl_next::FromWireRef<WireVerificationOptions<'de>> for VerificationOptions {
9128    #[inline]
9129    fn from_wire_ref(wire: &WireVerificationOptions<'de>) -> Self {
9130        Self {
9131            hash_algorithm: wire.table.get(1).map(|envelope| {
9132                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9133                    envelope.deref_unchecked::<crate::WireHashAlgorithm>()
9134                })
9135            }),
9136
9137            salt: wire.table.get(2).map(|envelope| {
9138                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9139                    envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
9140                })
9141            }),
9142        }
9143    }
9144}
9145
9146/// The wire type corresponding to [`VerificationOptions`].
9147#[repr(C)]
9148pub struct WireVerificationOptions<'de> {
9149    table: ::fidl_next::WireTable<'de>,
9150}
9151
9152impl<'de> Drop for WireVerificationOptions<'de> {
9153    fn drop(&mut self) {
9154        let _ = self
9155            .table
9156            .get(1)
9157            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireHashAlgorithm>() });
9158
9159        let _ = self.table.get(2).map(|envelope| unsafe {
9160            envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
9161        });
9162    }
9163}
9164
9165unsafe impl ::fidl_next::Wire for WireVerificationOptions<'static> {
9166    type Decoded<'de> = WireVerificationOptions<'de>;
9167
9168    #[inline]
9169    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9170        ::fidl_next::munge!(let Self { table } = out);
9171        ::fidl_next::WireTable::zero_padding(table);
9172    }
9173}
9174
9175unsafe impl<___D> ::fidl_next::Decode<___D> for WireVerificationOptions<'static>
9176where
9177    ___D: ::fidl_next::Decoder + ?Sized,
9178{
9179    fn decode(
9180        slot: ::fidl_next::Slot<'_, Self>,
9181        decoder: &mut ___D,
9182    ) -> Result<(), ::fidl_next::DecodeError> {
9183        ::fidl_next::munge!(let Self { table } = slot);
9184
9185        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9186            match ordinal {
9187                0 => unsafe { ::core::hint::unreachable_unchecked() },
9188
9189                1 => {
9190                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireHashAlgorithm>(
9191                        slot.as_mut(),
9192                        decoder,
9193                    )?;
9194
9195                    Ok(())
9196                }
9197
9198                2 => {
9199                    ::fidl_next::WireEnvelope::decode_as::<
9200                        ___D,
9201                        ::fidl_next::WireVector<'static, u8>,
9202                    >(slot.as_mut(), decoder)?;
9203
9204                    let salt = unsafe {
9205                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
9206                    };
9207
9208                    if salt.len() > 32 {
9209                        return Err(::fidl_next::DecodeError::VectorTooLong {
9210                            size: salt.len() as u64,
9211                            limit: 32,
9212                        });
9213                    }
9214
9215                    Ok(())
9216                }
9217
9218                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
9219            }
9220        })
9221    }
9222}
9223
9224impl<'de> WireVerificationOptions<'de> {
9225    pub fn hash_algorithm(&self) -> Option<&crate::WireHashAlgorithm> {
9226        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9227    }
9228
9229    pub fn salt(&self) -> Option<&::fidl_next::WireVector<'de, u8>> {
9230        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9231    }
9232}
9233
9234impl<'de> ::core::fmt::Debug for WireVerificationOptions<'de> {
9235    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
9236        f.debug_struct("VerificationOptions")
9237            .field("hash_algorithm", &self.hash_algorithm())
9238            .field("salt", &self.salt())
9239            .finish()
9240    }
9241}
9242
9243#[derive(Clone, Debug, Default)]
9244pub struct ImmutableNodeAttributes {
9245    pub protocols: Option<crate::NodeProtocolKinds>,
9246
9247    pub abilities: Option<crate::Operations>,
9248
9249    pub content_size: Option<u64>,
9250
9251    pub storage_size: Option<u64>,
9252
9253    pub link_count: Option<u64>,
9254
9255    pub id: Option<u64>,
9256
9257    pub change_time: Option<u64>,
9258
9259    pub options: Option<crate::VerificationOptions>,
9260
9261    pub root_hash: Option<Vec<u8>>,
9262
9263    pub verity_enabled: Option<bool>,
9264}
9265
9266impl ImmutableNodeAttributes {
9267    fn __max_ordinal(&self) -> usize {
9268        if self.verity_enabled.is_some() {
9269            return 10;
9270        }
9271
9272        if self.root_hash.is_some() {
9273            return 9;
9274        }
9275
9276        if self.options.is_some() {
9277            return 8;
9278        }
9279
9280        if self.change_time.is_some() {
9281            return 7;
9282        }
9283
9284        if self.id.is_some() {
9285            return 6;
9286        }
9287
9288        if self.link_count.is_some() {
9289            return 5;
9290        }
9291
9292        if self.storage_size.is_some() {
9293            return 4;
9294        }
9295
9296        if self.content_size.is_some() {
9297            return 3;
9298        }
9299
9300        if self.abilities.is_some() {
9301            return 2;
9302        }
9303
9304        if self.protocols.is_some() {
9305            return 1;
9306        }
9307
9308        0
9309    }
9310}
9311
9312impl ::fidl_next::Encodable for ImmutableNodeAttributes {
9313    type Encoded = WireImmutableNodeAttributes<'static>;
9314}
9315
9316unsafe impl<___E> ::fidl_next::Encode<___E> for ImmutableNodeAttributes
9317where
9318    ___E: ::fidl_next::Encoder + ?Sized,
9319{
9320    #[inline]
9321    fn encode(
9322        mut self,
9323        encoder: &mut ___E,
9324        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9325    ) -> Result<(), ::fidl_next::EncodeError> {
9326        ::fidl_next::munge!(let WireImmutableNodeAttributes { table } = out);
9327
9328        let max_ord = self.__max_ordinal();
9329
9330        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
9331        ::fidl_next::Wire::zero_padding(&mut out);
9332
9333        let mut preallocated =
9334            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
9335
9336        for i in 1..=max_ord {
9337            match i {
9338                10 => {
9339                    if let Some(verity_enabled) = self.verity_enabled.take() {
9340                        ::fidl_next::WireEnvelope::encode_value(
9341                            verity_enabled,
9342                            preallocated.encoder,
9343                            &mut out,
9344                        )?;
9345                    } else {
9346                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9347                    }
9348                }
9349
9350                9 => {
9351                    if let Some(root_hash) = self.root_hash.take() {
9352                        ::fidl_next::WireEnvelope::encode_value(
9353                            root_hash,
9354                            preallocated.encoder,
9355                            &mut out,
9356                        )?;
9357                    } else {
9358                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9359                    }
9360                }
9361
9362                8 => {
9363                    if let Some(options) = self.options.take() {
9364                        ::fidl_next::WireEnvelope::encode_value(
9365                            options,
9366                            preallocated.encoder,
9367                            &mut out,
9368                        )?;
9369                    } else {
9370                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9371                    }
9372                }
9373
9374                7 => {
9375                    if let Some(change_time) = self.change_time.take() {
9376                        ::fidl_next::WireEnvelope::encode_value(
9377                            change_time,
9378                            preallocated.encoder,
9379                            &mut out,
9380                        )?;
9381                    } else {
9382                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9383                    }
9384                }
9385
9386                6 => {
9387                    if let Some(id) = self.id.take() {
9388                        ::fidl_next::WireEnvelope::encode_value(
9389                            id,
9390                            preallocated.encoder,
9391                            &mut out,
9392                        )?;
9393                    } else {
9394                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9395                    }
9396                }
9397
9398                5 => {
9399                    if let Some(link_count) = self.link_count.take() {
9400                        ::fidl_next::WireEnvelope::encode_value(
9401                            link_count,
9402                            preallocated.encoder,
9403                            &mut out,
9404                        )?;
9405                    } else {
9406                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9407                    }
9408                }
9409
9410                4 => {
9411                    if let Some(storage_size) = self.storage_size.take() {
9412                        ::fidl_next::WireEnvelope::encode_value(
9413                            storage_size,
9414                            preallocated.encoder,
9415                            &mut out,
9416                        )?;
9417                    } else {
9418                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9419                    }
9420                }
9421
9422                3 => {
9423                    if let Some(content_size) = self.content_size.take() {
9424                        ::fidl_next::WireEnvelope::encode_value(
9425                            content_size,
9426                            preallocated.encoder,
9427                            &mut out,
9428                        )?;
9429                    } else {
9430                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9431                    }
9432                }
9433
9434                2 => {
9435                    if let Some(abilities) = self.abilities.take() {
9436                        ::fidl_next::WireEnvelope::encode_value(
9437                            abilities,
9438                            preallocated.encoder,
9439                            &mut out,
9440                        )?;
9441                    } else {
9442                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9443                    }
9444                }
9445
9446                1 => {
9447                    if let Some(protocols) = self.protocols.take() {
9448                        ::fidl_next::WireEnvelope::encode_value(
9449                            protocols,
9450                            preallocated.encoder,
9451                            &mut out,
9452                        )?;
9453                    } else {
9454                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9455                    }
9456                }
9457
9458                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
9459            }
9460            unsafe {
9461                preallocated.write_next(out.assume_init_ref());
9462            }
9463        }
9464
9465        ::fidl_next::WireTable::encode_len(table, max_ord);
9466
9467        Ok(())
9468    }
9469}
9470
9471unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ImmutableNodeAttributes
9472where
9473    ___E: ::fidl_next::Encoder + ?Sized,
9474{
9475    #[inline]
9476    fn encode_ref(
9477        &self,
9478        encoder: &mut ___E,
9479        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9480    ) -> Result<(), ::fidl_next::EncodeError> {
9481        ::fidl_next::munge!(let WireImmutableNodeAttributes { table } = out);
9482
9483        let max_ord = self.__max_ordinal();
9484
9485        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
9486        ::fidl_next::Wire::zero_padding(&mut out);
9487
9488        let mut preallocated =
9489            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
9490
9491        for i in 1..=max_ord {
9492            match i {
9493                10 => {
9494                    if let Some(verity_enabled) = &self.verity_enabled {
9495                        ::fidl_next::WireEnvelope::encode_value(
9496                            verity_enabled,
9497                            preallocated.encoder,
9498                            &mut out,
9499                        )?;
9500                    } else {
9501                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9502                    }
9503                }
9504
9505                9 => {
9506                    if let Some(root_hash) = &self.root_hash {
9507                        ::fidl_next::WireEnvelope::encode_value(
9508                            root_hash,
9509                            preallocated.encoder,
9510                            &mut out,
9511                        )?;
9512                    } else {
9513                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9514                    }
9515                }
9516
9517                8 => {
9518                    if let Some(options) = &self.options {
9519                        ::fidl_next::WireEnvelope::encode_value(
9520                            options,
9521                            preallocated.encoder,
9522                            &mut out,
9523                        )?;
9524                    } else {
9525                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9526                    }
9527                }
9528
9529                7 => {
9530                    if let Some(change_time) = &self.change_time {
9531                        ::fidl_next::WireEnvelope::encode_value(
9532                            change_time,
9533                            preallocated.encoder,
9534                            &mut out,
9535                        )?;
9536                    } else {
9537                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9538                    }
9539                }
9540
9541                6 => {
9542                    if let Some(id) = &self.id {
9543                        ::fidl_next::WireEnvelope::encode_value(
9544                            id,
9545                            preallocated.encoder,
9546                            &mut out,
9547                        )?;
9548                    } else {
9549                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9550                    }
9551                }
9552
9553                5 => {
9554                    if let Some(link_count) = &self.link_count {
9555                        ::fidl_next::WireEnvelope::encode_value(
9556                            link_count,
9557                            preallocated.encoder,
9558                            &mut out,
9559                        )?;
9560                    } else {
9561                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9562                    }
9563                }
9564
9565                4 => {
9566                    if let Some(storage_size) = &self.storage_size {
9567                        ::fidl_next::WireEnvelope::encode_value(
9568                            storage_size,
9569                            preallocated.encoder,
9570                            &mut out,
9571                        )?;
9572                    } else {
9573                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9574                    }
9575                }
9576
9577                3 => {
9578                    if let Some(content_size) = &self.content_size {
9579                        ::fidl_next::WireEnvelope::encode_value(
9580                            content_size,
9581                            preallocated.encoder,
9582                            &mut out,
9583                        )?;
9584                    } else {
9585                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9586                    }
9587                }
9588
9589                2 => {
9590                    if let Some(abilities) = &self.abilities {
9591                        ::fidl_next::WireEnvelope::encode_value(
9592                            abilities,
9593                            preallocated.encoder,
9594                            &mut out,
9595                        )?;
9596                    } else {
9597                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9598                    }
9599                }
9600
9601                1 => {
9602                    if let Some(protocols) = &self.protocols {
9603                        ::fidl_next::WireEnvelope::encode_value(
9604                            protocols,
9605                            preallocated.encoder,
9606                            &mut out,
9607                        )?;
9608                    } else {
9609                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9610                    }
9611                }
9612
9613                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
9614            }
9615            unsafe {
9616                preallocated.write_next(out.assume_init_ref());
9617            }
9618        }
9619
9620        ::fidl_next::WireTable::encode_len(table, max_ord);
9621
9622        Ok(())
9623    }
9624}
9625
9626impl<'de> ::fidl_next::FromWire<WireImmutableNodeAttributes<'de>> for ImmutableNodeAttributes {
9627    #[inline]
9628    fn from_wire(wire: WireImmutableNodeAttributes<'de>) -> Self {
9629        let wire = ::core::mem::ManuallyDrop::new(wire);
9630
9631        let protocols = wire.table.get(1);
9632
9633        let abilities = wire.table.get(2);
9634
9635        let content_size = wire.table.get(3);
9636
9637        let storage_size = wire.table.get(4);
9638
9639        let link_count = wire.table.get(5);
9640
9641        let id = wire.table.get(6);
9642
9643        let change_time = wire.table.get(7);
9644
9645        let options = wire.table.get(8);
9646
9647        let root_hash = wire.table.get(9);
9648
9649        let verity_enabled = wire.table.get(10);
9650
9651        Self {
9652            protocols: protocols.map(|envelope| {
9653                ::fidl_next::FromWire::from_wire(unsafe {
9654                    envelope.read_unchecked::<crate::WireNodeProtocolKinds>()
9655                })
9656            }),
9657
9658            abilities: abilities.map(|envelope| {
9659                ::fidl_next::FromWire::from_wire(unsafe {
9660                    envelope.read_unchecked::<crate::WireOperations>()
9661                })
9662            }),
9663
9664            content_size: content_size.map(|envelope| {
9665                ::fidl_next::FromWire::from_wire(unsafe {
9666                    envelope.read_unchecked::<::fidl_next::WireU64>()
9667                })
9668            }),
9669
9670            storage_size: storage_size.map(|envelope| {
9671                ::fidl_next::FromWire::from_wire(unsafe {
9672                    envelope.read_unchecked::<::fidl_next::WireU64>()
9673                })
9674            }),
9675
9676            link_count: link_count.map(|envelope| {
9677                ::fidl_next::FromWire::from_wire(unsafe {
9678                    envelope.read_unchecked::<::fidl_next::WireU64>()
9679                })
9680            }),
9681
9682            id: id.map(|envelope| {
9683                ::fidl_next::FromWire::from_wire(unsafe {
9684                    envelope.read_unchecked::<::fidl_next::WireU64>()
9685                })
9686            }),
9687
9688            change_time: change_time.map(|envelope| {
9689                ::fidl_next::FromWire::from_wire(unsafe {
9690                    envelope.read_unchecked::<::fidl_next::WireU64>()
9691                })
9692            }),
9693
9694            options: options.map(|envelope| {
9695                ::fidl_next::FromWire::from_wire(unsafe {
9696                    envelope.read_unchecked::<crate::WireVerificationOptions<'de>>()
9697                })
9698            }),
9699
9700            root_hash: root_hash.map(|envelope| {
9701                ::fidl_next::FromWire::from_wire(unsafe {
9702                    envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
9703                })
9704            }),
9705
9706            verity_enabled: verity_enabled.map(|envelope| {
9707                ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
9708            }),
9709        }
9710    }
9711}
9712
9713impl<'de> ::fidl_next::FromWireRef<WireImmutableNodeAttributes<'de>> for ImmutableNodeAttributes {
9714    #[inline]
9715    fn from_wire_ref(wire: &WireImmutableNodeAttributes<'de>) -> Self {
9716        Self {
9717            protocols: wire.table.get(1).map(|envelope| {
9718                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9719                    envelope.deref_unchecked::<crate::WireNodeProtocolKinds>()
9720                })
9721            }),
9722
9723            abilities: wire.table.get(2).map(|envelope| {
9724                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9725                    envelope.deref_unchecked::<crate::WireOperations>()
9726                })
9727            }),
9728
9729            content_size: wire.table.get(3).map(|envelope| {
9730                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9731                    envelope.deref_unchecked::<::fidl_next::WireU64>()
9732                })
9733            }),
9734
9735            storage_size: wire.table.get(4).map(|envelope| {
9736                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9737                    envelope.deref_unchecked::<::fidl_next::WireU64>()
9738                })
9739            }),
9740
9741            link_count: wire.table.get(5).map(|envelope| {
9742                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9743                    envelope.deref_unchecked::<::fidl_next::WireU64>()
9744                })
9745            }),
9746
9747            id: wire.table.get(6).map(|envelope| {
9748                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9749                    envelope.deref_unchecked::<::fidl_next::WireU64>()
9750                })
9751            }),
9752
9753            change_time: wire.table.get(7).map(|envelope| {
9754                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9755                    envelope.deref_unchecked::<::fidl_next::WireU64>()
9756                })
9757            }),
9758
9759            options: wire.table.get(8).map(|envelope| {
9760                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9761                    envelope.deref_unchecked::<crate::WireVerificationOptions<'de>>()
9762                })
9763            }),
9764
9765            root_hash: wire.table.get(9).map(|envelope| {
9766                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9767                    envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
9768                })
9769            }),
9770
9771            verity_enabled: wire.table.get(10).map(|envelope| {
9772                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
9773                    envelope.deref_unchecked::<bool>()
9774                })
9775            }),
9776        }
9777    }
9778}
9779
9780/// The wire type corresponding to [`ImmutableNodeAttributes`].
9781#[repr(C)]
9782pub struct WireImmutableNodeAttributes<'de> {
9783    table: ::fidl_next::WireTable<'de>,
9784}
9785
9786impl<'de> Drop for WireImmutableNodeAttributes<'de> {
9787    fn drop(&mut self) {
9788        let _ = self
9789            .table
9790            .get(1)
9791            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireNodeProtocolKinds>() });
9792
9793        let _ = self
9794            .table
9795            .get(2)
9796            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireOperations>() });
9797
9798        let _ = self
9799            .table
9800            .get(3)
9801            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
9802
9803        let _ = self
9804            .table
9805            .get(4)
9806            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
9807
9808        let _ = self
9809            .table
9810            .get(5)
9811            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
9812
9813        let _ = self
9814            .table
9815            .get(6)
9816            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
9817
9818        let _ = self
9819            .table
9820            .get(7)
9821            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
9822
9823        let _ = self.table.get(8).map(|envelope| unsafe {
9824            envelope.read_unchecked::<crate::WireVerificationOptions<'de>>()
9825        });
9826
9827        let _ = self.table.get(9).map(|envelope| unsafe {
9828            envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
9829        });
9830
9831        let _ = self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9832    }
9833}
9834
9835unsafe impl ::fidl_next::Wire for WireImmutableNodeAttributes<'static> {
9836    type Decoded<'de> = WireImmutableNodeAttributes<'de>;
9837
9838    #[inline]
9839    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9840        ::fidl_next::munge!(let Self { table } = out);
9841        ::fidl_next::WireTable::zero_padding(table);
9842    }
9843}
9844
9845unsafe impl<___D> ::fidl_next::Decode<___D> for WireImmutableNodeAttributes<'static>
9846where
9847    ___D: ::fidl_next::Decoder + ?Sized,
9848{
9849    fn decode(
9850        slot: ::fidl_next::Slot<'_, Self>,
9851        decoder: &mut ___D,
9852    ) -> Result<(), ::fidl_next::DecodeError> {
9853        ::fidl_next::munge!(let Self { table } = slot);
9854
9855        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9856            match ordinal {
9857                0 => unsafe { ::core::hint::unreachable_unchecked() },
9858
9859                1 => {
9860                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireNodeProtocolKinds>(
9861                        slot.as_mut(),
9862                        decoder,
9863                    )?;
9864
9865                    Ok(())
9866                }
9867
9868                2 => {
9869                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireOperations>(
9870                        slot.as_mut(),
9871                        decoder,
9872                    )?;
9873
9874                    Ok(())
9875                }
9876
9877                3 => {
9878                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
9879                        slot.as_mut(),
9880                        decoder,
9881                    )?;
9882
9883                    Ok(())
9884                }
9885
9886                4 => {
9887                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
9888                        slot.as_mut(),
9889                        decoder,
9890                    )?;
9891
9892                    Ok(())
9893                }
9894
9895                5 => {
9896                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
9897                        slot.as_mut(),
9898                        decoder,
9899                    )?;
9900
9901                    Ok(())
9902                }
9903
9904                6 => {
9905                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
9906                        slot.as_mut(),
9907                        decoder,
9908                    )?;
9909
9910                    Ok(())
9911                }
9912
9913                7 => {
9914                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
9915                        slot.as_mut(),
9916                        decoder,
9917                    )?;
9918
9919                    Ok(())
9920                }
9921
9922                8 => {
9923                    ::fidl_next::WireEnvelope::decode_as::<
9924                        ___D,
9925                        crate::WireVerificationOptions<'static>,
9926                    >(slot.as_mut(), decoder)?;
9927
9928                    Ok(())
9929                }
9930
9931                9 => {
9932                    ::fidl_next::WireEnvelope::decode_as::<
9933                        ___D,
9934                        ::fidl_next::WireVector<'static, u8>,
9935                    >(slot.as_mut(), decoder)?;
9936
9937                    let root_hash = unsafe {
9938                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
9939                    };
9940
9941                    if root_hash.len() > 64 {
9942                        return Err(::fidl_next::DecodeError::VectorTooLong {
9943                            size: root_hash.len() as u64,
9944                            limit: 64,
9945                        });
9946                    }
9947
9948                    Ok(())
9949                }
9950
9951                10 => {
9952                    ::fidl_next::WireEnvelope::decode_as::<___D, bool>(slot.as_mut(), decoder)?;
9953
9954                    Ok(())
9955                }
9956
9957                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
9958            }
9959        })
9960    }
9961}
9962
9963impl<'de> WireImmutableNodeAttributes<'de> {
9964    pub fn protocols(&self) -> Option<&crate::WireNodeProtocolKinds> {
9965        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9966    }
9967
9968    pub fn abilities(&self) -> Option<&crate::WireOperations> {
9969        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9970    }
9971
9972    pub fn content_size(&self) -> Option<&::fidl_next::WireU64> {
9973        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
9974    }
9975
9976    pub fn storage_size(&self) -> Option<&::fidl_next::WireU64> {
9977        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
9978    }
9979
9980    pub fn link_count(&self) -> Option<&::fidl_next::WireU64> {
9981        unsafe { Some(self.table.get(5)?.deref_unchecked()) }
9982    }
9983
9984    pub fn id(&self) -> Option<&::fidl_next::WireU64> {
9985        unsafe { Some(self.table.get(6)?.deref_unchecked()) }
9986    }
9987
9988    pub fn change_time(&self) -> Option<&::fidl_next::WireU64> {
9989        unsafe { Some(self.table.get(7)?.deref_unchecked()) }
9990    }
9991
9992    pub fn options(&self) -> Option<&crate::WireVerificationOptions<'de>> {
9993        unsafe { Some(self.table.get(8)?.deref_unchecked()) }
9994    }
9995
9996    pub fn root_hash(&self) -> Option<&::fidl_next::WireVector<'de, u8>> {
9997        unsafe { Some(self.table.get(9)?.deref_unchecked()) }
9998    }
9999
10000    pub fn verity_enabled(&self) -> Option<&bool> {
10001        unsafe { Some(self.table.get(10)?.deref_unchecked()) }
10002    }
10003}
10004
10005impl<'de> ::core::fmt::Debug for WireImmutableNodeAttributes<'de> {
10006    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
10007        f.debug_struct("ImmutableNodeAttributes")
10008            .field("protocols", &self.protocols())
10009            .field("abilities", &self.abilities())
10010            .field("content_size", &self.content_size())
10011            .field("storage_size", &self.storage_size())
10012            .field("link_count", &self.link_count())
10013            .field("id", &self.id())
10014            .field("change_time", &self.change_time())
10015            .field("options", &self.options())
10016            .field("root_hash", &self.root_hash())
10017            .field("verity_enabled", &self.verity_enabled())
10018            .finish()
10019    }
10020}
10021
10022#[derive(Clone, Debug)]
10023pub struct NodeAttributes2 {
10024    pub mutable_attributes: crate::MutableNodeAttributes,
10025
10026    pub immutable_attributes: crate::ImmutableNodeAttributes,
10027}
10028
10029impl ::fidl_next::Encodable for NodeAttributes2 {
10030    type Encoded = WireNodeAttributes2<'static>;
10031}
10032
10033unsafe impl<___E> ::fidl_next::Encode<___E> for NodeAttributes2
10034where
10035    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10036
10037    ___E: ::fidl_next::Encoder,
10038{
10039    #[inline]
10040    fn encode(
10041        self,
10042        encoder: &mut ___E,
10043        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10044    ) -> Result<(), ::fidl_next::EncodeError> {
10045        ::fidl_next::munge! {
10046            let Self::Encoded {
10047                mutable_attributes,
10048                immutable_attributes,
10049
10050            } = out;
10051        }
10052
10053        ::fidl_next::Encode::encode(self.mutable_attributes, encoder, mutable_attributes)?;
10054
10055        ::fidl_next::Encode::encode(self.immutable_attributes, encoder, immutable_attributes)?;
10056
10057        Ok(())
10058    }
10059}
10060
10061unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeAttributes2
10062where
10063    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10064
10065    ___E: ::fidl_next::Encoder,
10066{
10067    #[inline]
10068    fn encode_ref(
10069        &self,
10070        encoder: &mut ___E,
10071        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10072    ) -> Result<(), ::fidl_next::EncodeError> {
10073        ::fidl_next::munge! {
10074            let Self::Encoded {
10075                mutable_attributes,
10076                immutable_attributes,
10077
10078            } = out;
10079        }
10080
10081        ::fidl_next::EncodeRef::encode_ref(&self.mutable_attributes, encoder, mutable_attributes)?;
10082
10083        ::fidl_next::EncodeRef::encode_ref(
10084            &self.immutable_attributes,
10085            encoder,
10086            immutable_attributes,
10087        )?;
10088
10089        Ok(())
10090    }
10091}
10092
10093impl ::fidl_next::EncodableOption for NodeAttributes2 {
10094    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeAttributes2<'static>>;
10095}
10096
10097unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeAttributes2
10098where
10099    ___E: ::fidl_next::Encoder + ?Sized,
10100    NodeAttributes2: ::fidl_next::Encode<___E>,
10101{
10102    #[inline]
10103    fn encode_option(
10104        this: Option<Self>,
10105        encoder: &mut ___E,
10106        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10107    ) -> Result<(), ::fidl_next::EncodeError> {
10108        if let Some(inner) = this {
10109            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10110            ::fidl_next::WireBox::encode_present(out);
10111        } else {
10112            ::fidl_next::WireBox::encode_absent(out);
10113        }
10114
10115        Ok(())
10116    }
10117}
10118
10119unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeAttributes2
10120where
10121    ___E: ::fidl_next::Encoder + ?Sized,
10122    NodeAttributes2: ::fidl_next::EncodeRef<___E>,
10123{
10124    #[inline]
10125    fn encode_option_ref(
10126        this: Option<&Self>,
10127        encoder: &mut ___E,
10128        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10129    ) -> Result<(), ::fidl_next::EncodeError> {
10130        if let Some(inner) = this {
10131            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10132            ::fidl_next::WireBox::encode_present(out);
10133        } else {
10134            ::fidl_next::WireBox::encode_absent(out);
10135        }
10136
10137        Ok(())
10138    }
10139}
10140
10141impl<'de> ::fidl_next::FromWire<WireNodeAttributes2<'de>> for NodeAttributes2 {
10142    #[inline]
10143    fn from_wire(wire: WireNodeAttributes2<'de>) -> Self {
10144        Self {
10145            mutable_attributes: ::fidl_next::FromWire::from_wire(wire.mutable_attributes),
10146
10147            immutable_attributes: ::fidl_next::FromWire::from_wire(wire.immutable_attributes),
10148        }
10149    }
10150}
10151
10152impl<'de> ::fidl_next::FromWireRef<WireNodeAttributes2<'de>> for NodeAttributes2 {
10153    #[inline]
10154    fn from_wire_ref(wire: &WireNodeAttributes2<'de>) -> Self {
10155        Self {
10156            mutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.mutable_attributes),
10157
10158            immutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
10159                &wire.immutable_attributes,
10160            ),
10161        }
10162    }
10163}
10164
10165/// The wire type corresponding to [`NodeAttributes2`].
10166#[derive(Debug)]
10167#[repr(C)]
10168pub struct WireNodeAttributes2<'de> {
10169    pub mutable_attributes: crate::WireMutableNodeAttributes<'de>,
10170
10171    pub immutable_attributes: crate::WireImmutableNodeAttributes<'de>,
10172}
10173
10174unsafe impl ::fidl_next::Wire for WireNodeAttributes2<'static> {
10175    type Decoded<'de> = WireNodeAttributes2<'de>;
10176
10177    #[inline]
10178    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
10179}
10180
10181unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeAttributes2<'static>
10182where
10183    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10184
10185    ___D: ::fidl_next::Decoder,
10186{
10187    fn decode(
10188        slot: ::fidl_next::Slot<'_, Self>,
10189        decoder: &mut ___D,
10190    ) -> Result<(), ::fidl_next::DecodeError> {
10191        ::fidl_next::munge! {
10192            let Self {
10193                mut mutable_attributes,
10194                mut immutable_attributes,
10195
10196            } = slot;
10197        }
10198
10199        ::fidl_next::Decode::decode(mutable_attributes.as_mut(), decoder)?;
10200
10201        ::fidl_next::Decode::decode(immutable_attributes.as_mut(), decoder)?;
10202
10203        Ok(())
10204    }
10205}
10206
10207#[doc = " Information that describes the target node.\n"]
10208#[derive(Clone, Debug, Default)]
10209pub struct NodeInfo {
10210    pub attributes: Option<crate::NodeAttributes2>,
10211}
10212
10213impl NodeInfo {
10214    fn __max_ordinal(&self) -> usize {
10215        if self.attributes.is_some() {
10216            return 1;
10217        }
10218
10219        0
10220    }
10221}
10222
10223impl ::fidl_next::Encodable for NodeInfo {
10224    type Encoded = WireNodeInfo<'static>;
10225}
10226
10227unsafe impl<___E> ::fidl_next::Encode<___E> for NodeInfo
10228where
10229    ___E: ::fidl_next::Encoder + ?Sized,
10230{
10231    #[inline]
10232    fn encode(
10233        mut self,
10234        encoder: &mut ___E,
10235        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10236    ) -> Result<(), ::fidl_next::EncodeError> {
10237        ::fidl_next::munge!(let WireNodeInfo { table } = out);
10238
10239        let max_ord = self.__max_ordinal();
10240
10241        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10242        ::fidl_next::Wire::zero_padding(&mut out);
10243
10244        let mut preallocated =
10245            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10246
10247        for i in 1..=max_ord {
10248            match i {
10249                1 => {
10250                    if let Some(attributes) = self.attributes.take() {
10251                        ::fidl_next::WireEnvelope::encode_value(
10252                            attributes,
10253                            preallocated.encoder,
10254                            &mut out,
10255                        )?;
10256                    } else {
10257                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10258                    }
10259                }
10260
10261                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10262            }
10263            unsafe {
10264                preallocated.write_next(out.assume_init_ref());
10265            }
10266        }
10267
10268        ::fidl_next::WireTable::encode_len(table, max_ord);
10269
10270        Ok(())
10271    }
10272}
10273
10274unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeInfo
10275where
10276    ___E: ::fidl_next::Encoder + ?Sized,
10277{
10278    #[inline]
10279    fn encode_ref(
10280        &self,
10281        encoder: &mut ___E,
10282        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10283    ) -> Result<(), ::fidl_next::EncodeError> {
10284        ::fidl_next::munge!(let WireNodeInfo { table } = out);
10285
10286        let max_ord = self.__max_ordinal();
10287
10288        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10289        ::fidl_next::Wire::zero_padding(&mut out);
10290
10291        let mut preallocated =
10292            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10293
10294        for i in 1..=max_ord {
10295            match i {
10296                1 => {
10297                    if let Some(attributes) = &self.attributes {
10298                        ::fidl_next::WireEnvelope::encode_value(
10299                            attributes,
10300                            preallocated.encoder,
10301                            &mut out,
10302                        )?;
10303                    } else {
10304                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10305                    }
10306                }
10307
10308                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10309            }
10310            unsafe {
10311                preallocated.write_next(out.assume_init_ref());
10312            }
10313        }
10314
10315        ::fidl_next::WireTable::encode_len(table, max_ord);
10316
10317        Ok(())
10318    }
10319}
10320
10321impl<'de> ::fidl_next::FromWire<WireNodeInfo<'de>> for NodeInfo {
10322    #[inline]
10323    fn from_wire(wire: WireNodeInfo<'de>) -> Self {
10324        let wire = ::core::mem::ManuallyDrop::new(wire);
10325
10326        let attributes = wire.table.get(1);
10327
10328        Self {
10329            attributes: attributes.map(|envelope| {
10330                ::fidl_next::FromWire::from_wire(unsafe {
10331                    envelope.read_unchecked::<crate::WireNodeAttributes2<'de>>()
10332                })
10333            }),
10334        }
10335    }
10336}
10337
10338impl<'de> ::fidl_next::FromWireRef<WireNodeInfo<'de>> for NodeInfo {
10339    #[inline]
10340    fn from_wire_ref(wire: &WireNodeInfo<'de>) -> Self {
10341        Self {
10342            attributes: wire.table.get(1).map(|envelope| {
10343                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
10344                    envelope.deref_unchecked::<crate::WireNodeAttributes2<'de>>()
10345                })
10346            }),
10347        }
10348    }
10349}
10350
10351/// The wire type corresponding to [`NodeInfo`].
10352#[repr(C)]
10353pub struct WireNodeInfo<'de> {
10354    table: ::fidl_next::WireTable<'de>,
10355}
10356
10357impl<'de> Drop for WireNodeInfo<'de> {
10358    fn drop(&mut self) {
10359        let _ = self.table.get(1).map(|envelope| unsafe {
10360            envelope.read_unchecked::<crate::WireNodeAttributes2<'de>>()
10361        });
10362    }
10363}
10364
10365unsafe impl ::fidl_next::Wire for WireNodeInfo<'static> {
10366    type Decoded<'de> = WireNodeInfo<'de>;
10367
10368    #[inline]
10369    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10370        ::fidl_next::munge!(let Self { table } = out);
10371        ::fidl_next::WireTable::zero_padding(table);
10372    }
10373}
10374
10375unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeInfo<'static>
10376where
10377    ___D: ::fidl_next::Decoder + ?Sized,
10378{
10379    fn decode(
10380        slot: ::fidl_next::Slot<'_, Self>,
10381        decoder: &mut ___D,
10382    ) -> Result<(), ::fidl_next::DecodeError> {
10383        ::fidl_next::munge!(let Self { table } = slot);
10384
10385        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10386            match ordinal {
10387                0 => unsafe { ::core::hint::unreachable_unchecked() },
10388
10389                1 => {
10390                    ::fidl_next::WireEnvelope::decode_as::<
10391                        ___D,
10392                        crate::WireNodeAttributes2<'static>,
10393                    >(slot.as_mut(), decoder)?;
10394
10395                    Ok(())
10396                }
10397
10398                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
10399            }
10400        })
10401    }
10402}
10403
10404impl<'de> WireNodeInfo<'de> {
10405    pub fn attributes(&self) -> Option<&crate::WireNodeAttributes2<'de>> {
10406        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10407    }
10408}
10409
10410impl<'de> ::core::fmt::Debug for WireNodeInfo<'de> {
10411    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
10412        f.debug_struct("NodeInfo").field("attributes", &self.attributes()).finish()
10413    }
10414}
10415
10416#[derive(Clone, Debug, Default)]
10417pub struct DirectoryInfo {
10418    pub attributes: Option<crate::NodeAttributes2>,
10419}
10420
10421impl DirectoryInfo {
10422    fn __max_ordinal(&self) -> usize {
10423        if self.attributes.is_some() {
10424            return 1;
10425        }
10426
10427        0
10428    }
10429}
10430
10431impl ::fidl_next::Encodable for DirectoryInfo {
10432    type Encoded = WireDirectoryInfo<'static>;
10433}
10434
10435unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryInfo
10436where
10437    ___E: ::fidl_next::Encoder + ?Sized,
10438{
10439    #[inline]
10440    fn encode(
10441        mut self,
10442        encoder: &mut ___E,
10443        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10444    ) -> Result<(), ::fidl_next::EncodeError> {
10445        ::fidl_next::munge!(let WireDirectoryInfo { table } = out);
10446
10447        let max_ord = self.__max_ordinal();
10448
10449        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10450        ::fidl_next::Wire::zero_padding(&mut out);
10451
10452        let mut preallocated =
10453            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10454
10455        for i in 1..=max_ord {
10456            match i {
10457                1 => {
10458                    if let Some(attributes) = self.attributes.take() {
10459                        ::fidl_next::WireEnvelope::encode_value(
10460                            attributes,
10461                            preallocated.encoder,
10462                            &mut out,
10463                        )?;
10464                    } else {
10465                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10466                    }
10467                }
10468
10469                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10470            }
10471            unsafe {
10472                preallocated.write_next(out.assume_init_ref());
10473            }
10474        }
10475
10476        ::fidl_next::WireTable::encode_len(table, max_ord);
10477
10478        Ok(())
10479    }
10480}
10481
10482unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirectoryInfo
10483where
10484    ___E: ::fidl_next::Encoder + ?Sized,
10485{
10486    #[inline]
10487    fn encode_ref(
10488        &self,
10489        encoder: &mut ___E,
10490        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10491    ) -> Result<(), ::fidl_next::EncodeError> {
10492        ::fidl_next::munge!(let WireDirectoryInfo { table } = out);
10493
10494        let max_ord = self.__max_ordinal();
10495
10496        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10497        ::fidl_next::Wire::zero_padding(&mut out);
10498
10499        let mut preallocated =
10500            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10501
10502        for i in 1..=max_ord {
10503            match i {
10504                1 => {
10505                    if let Some(attributes) = &self.attributes {
10506                        ::fidl_next::WireEnvelope::encode_value(
10507                            attributes,
10508                            preallocated.encoder,
10509                            &mut out,
10510                        )?;
10511                    } else {
10512                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10513                    }
10514                }
10515
10516                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10517            }
10518            unsafe {
10519                preallocated.write_next(out.assume_init_ref());
10520            }
10521        }
10522
10523        ::fidl_next::WireTable::encode_len(table, max_ord);
10524
10525        Ok(())
10526    }
10527}
10528
10529impl<'de> ::fidl_next::FromWire<WireDirectoryInfo<'de>> for DirectoryInfo {
10530    #[inline]
10531    fn from_wire(wire: WireDirectoryInfo<'de>) -> Self {
10532        let wire = ::core::mem::ManuallyDrop::new(wire);
10533
10534        let attributes = wire.table.get(1);
10535
10536        Self {
10537            attributes: attributes.map(|envelope| {
10538                ::fidl_next::FromWire::from_wire(unsafe {
10539                    envelope.read_unchecked::<crate::WireNodeAttributes2<'de>>()
10540                })
10541            }),
10542        }
10543    }
10544}
10545
10546impl<'de> ::fidl_next::FromWireRef<WireDirectoryInfo<'de>> for DirectoryInfo {
10547    #[inline]
10548    fn from_wire_ref(wire: &WireDirectoryInfo<'de>) -> Self {
10549        Self {
10550            attributes: wire.table.get(1).map(|envelope| {
10551                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
10552                    envelope.deref_unchecked::<crate::WireNodeAttributes2<'de>>()
10553                })
10554            }),
10555        }
10556    }
10557}
10558
10559/// The wire type corresponding to [`DirectoryInfo`].
10560#[repr(C)]
10561pub struct WireDirectoryInfo<'de> {
10562    table: ::fidl_next::WireTable<'de>,
10563}
10564
10565impl<'de> Drop for WireDirectoryInfo<'de> {
10566    fn drop(&mut self) {
10567        let _ = self.table.get(1).map(|envelope| unsafe {
10568            envelope.read_unchecked::<crate::WireNodeAttributes2<'de>>()
10569        });
10570    }
10571}
10572
10573unsafe impl ::fidl_next::Wire for WireDirectoryInfo<'static> {
10574    type Decoded<'de> = WireDirectoryInfo<'de>;
10575
10576    #[inline]
10577    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10578        ::fidl_next::munge!(let Self { table } = out);
10579        ::fidl_next::WireTable::zero_padding(table);
10580    }
10581}
10582
10583unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryInfo<'static>
10584where
10585    ___D: ::fidl_next::Decoder + ?Sized,
10586{
10587    fn decode(
10588        slot: ::fidl_next::Slot<'_, Self>,
10589        decoder: &mut ___D,
10590    ) -> Result<(), ::fidl_next::DecodeError> {
10591        ::fidl_next::munge!(let Self { table } = slot);
10592
10593        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10594            match ordinal {
10595                0 => unsafe { ::core::hint::unreachable_unchecked() },
10596
10597                1 => {
10598                    ::fidl_next::WireEnvelope::decode_as::<
10599                        ___D,
10600                        crate::WireNodeAttributes2<'static>,
10601                    >(slot.as_mut(), decoder)?;
10602
10603                    Ok(())
10604                }
10605
10606                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
10607            }
10608        })
10609    }
10610}
10611
10612impl<'de> WireDirectoryInfo<'de> {
10613    pub fn attributes(&self) -> Option<&crate::WireNodeAttributes2<'de>> {
10614        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10615    }
10616}
10617
10618impl<'de> ::core::fmt::Debug for WireDirectoryInfo<'de> {
10619    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
10620        f.debug_struct("DirectoryInfo").field("attributes", &self.attributes()).finish()
10621    }
10622}
10623
10624#[doc = " Auxiliary data for the file representation of a node.\n"]
10625#[derive(Debug, Default)]
10626pub struct FileInfo {
10627    pub is_append: Option<bool>,
10628
10629    pub observer: Option<::fidl_next::fuchsia::zx::Handle>,
10630
10631    pub stream: Option<::fidl_next::fuchsia::zx::Handle>,
10632
10633    pub attributes: Option<crate::NodeAttributes2>,
10634}
10635
10636impl FileInfo {
10637    fn __max_ordinal(&self) -> usize {
10638        if self.attributes.is_some() {
10639            return 4;
10640        }
10641
10642        if self.stream.is_some() {
10643            return 3;
10644        }
10645
10646        if self.observer.is_some() {
10647            return 2;
10648        }
10649
10650        if self.is_append.is_some() {
10651            return 1;
10652        }
10653
10654        0
10655    }
10656}
10657
10658impl ::fidl_next::Encodable for FileInfo {
10659    type Encoded = WireFileInfo<'static>;
10660}
10661
10662unsafe impl<___E> ::fidl_next::Encode<___E> for FileInfo
10663where
10664    ___E: ::fidl_next::Encoder + ?Sized,
10665
10666    ___E: ::fidl_next::fuchsia::HandleEncoder,
10667{
10668    #[inline]
10669    fn encode(
10670        mut self,
10671        encoder: &mut ___E,
10672        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10673    ) -> Result<(), ::fidl_next::EncodeError> {
10674        ::fidl_next::munge!(let WireFileInfo { table } = out);
10675
10676        let max_ord = self.__max_ordinal();
10677
10678        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10679        ::fidl_next::Wire::zero_padding(&mut out);
10680
10681        let mut preallocated =
10682            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10683
10684        for i in 1..=max_ord {
10685            match i {
10686                4 => {
10687                    if let Some(attributes) = self.attributes.take() {
10688                        ::fidl_next::WireEnvelope::encode_value(
10689                            attributes,
10690                            preallocated.encoder,
10691                            &mut out,
10692                        )?;
10693                    } else {
10694                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10695                    }
10696                }
10697
10698                3 => {
10699                    if let Some(stream) = self.stream.take() {
10700                        ::fidl_next::WireEnvelope::encode_value(
10701                            stream,
10702                            preallocated.encoder,
10703                            &mut out,
10704                        )?;
10705                    } else {
10706                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10707                    }
10708                }
10709
10710                2 => {
10711                    if let Some(observer) = self.observer.take() {
10712                        ::fidl_next::WireEnvelope::encode_value(
10713                            observer,
10714                            preallocated.encoder,
10715                            &mut out,
10716                        )?;
10717                    } else {
10718                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10719                    }
10720                }
10721
10722                1 => {
10723                    if let Some(is_append) = self.is_append.take() {
10724                        ::fidl_next::WireEnvelope::encode_value(
10725                            is_append,
10726                            preallocated.encoder,
10727                            &mut out,
10728                        )?;
10729                    } else {
10730                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10731                    }
10732                }
10733
10734                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10735            }
10736            unsafe {
10737                preallocated.write_next(out.assume_init_ref());
10738            }
10739        }
10740
10741        ::fidl_next::WireTable::encode_len(table, max_ord);
10742
10743        Ok(())
10744    }
10745}
10746
10747impl<'de> ::fidl_next::FromWire<WireFileInfo<'de>> for FileInfo {
10748    #[inline]
10749    fn from_wire(wire: WireFileInfo<'de>) -> Self {
10750        let wire = ::core::mem::ManuallyDrop::new(wire);
10751
10752        let is_append = wire.table.get(1);
10753
10754        let observer = wire.table.get(2);
10755
10756        let stream = wire.table.get(3);
10757
10758        let attributes = wire.table.get(4);
10759
10760        Self {
10761            is_append: is_append.map(|envelope| {
10762                ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
10763            }),
10764
10765            observer: observer.map(|envelope| {
10766                ::fidl_next::FromWire::from_wire(unsafe {
10767                    envelope.read_unchecked::<::fidl_next::fuchsia::WireHandle>()
10768                })
10769            }),
10770
10771            stream: stream.map(|envelope| {
10772                ::fidl_next::FromWire::from_wire(unsafe {
10773                    envelope.read_unchecked::<::fidl_next::fuchsia::WireHandle>()
10774                })
10775            }),
10776
10777            attributes: attributes.map(|envelope| {
10778                ::fidl_next::FromWire::from_wire(unsafe {
10779                    envelope.read_unchecked::<crate::WireNodeAttributes2<'de>>()
10780                })
10781            }),
10782        }
10783    }
10784}
10785
10786/// The wire type corresponding to [`FileInfo`].
10787#[repr(C)]
10788pub struct WireFileInfo<'de> {
10789    table: ::fidl_next::WireTable<'de>,
10790}
10791
10792impl<'de> Drop for WireFileInfo<'de> {
10793    fn drop(&mut self) {
10794        let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
10795
10796        let _ = self.table.get(2).map(|envelope| unsafe {
10797            envelope.read_unchecked::<::fidl_next::fuchsia::WireHandle>()
10798        });
10799
10800        let _ = self.table.get(3).map(|envelope| unsafe {
10801            envelope.read_unchecked::<::fidl_next::fuchsia::WireHandle>()
10802        });
10803
10804        let _ = self.table.get(4).map(|envelope| unsafe {
10805            envelope.read_unchecked::<crate::WireNodeAttributes2<'de>>()
10806        });
10807    }
10808}
10809
10810unsafe impl ::fidl_next::Wire for WireFileInfo<'static> {
10811    type Decoded<'de> = WireFileInfo<'de>;
10812
10813    #[inline]
10814    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10815        ::fidl_next::munge!(let Self { table } = out);
10816        ::fidl_next::WireTable::zero_padding(table);
10817    }
10818}
10819
10820unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileInfo<'static>
10821where
10822    ___D: ::fidl_next::Decoder + ?Sized,
10823
10824    ___D: ::fidl_next::fuchsia::HandleDecoder,
10825{
10826    fn decode(
10827        slot: ::fidl_next::Slot<'_, Self>,
10828        decoder: &mut ___D,
10829    ) -> Result<(), ::fidl_next::DecodeError> {
10830        ::fidl_next::munge!(let Self { table } = slot);
10831
10832        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10833            match ordinal {
10834                0 => unsafe { ::core::hint::unreachable_unchecked() },
10835
10836                1 => {
10837                    ::fidl_next::WireEnvelope::decode_as::<___D, bool>(slot.as_mut(), decoder)?;
10838
10839                    Ok(())
10840                }
10841
10842                2 => {
10843                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
10844                        slot.as_mut(),
10845                        decoder,
10846                    )?;
10847
10848                    Ok(())
10849                }
10850
10851                3 => {
10852                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
10853                        slot.as_mut(),
10854                        decoder,
10855                    )?;
10856
10857                    Ok(())
10858                }
10859
10860                4 => {
10861                    ::fidl_next::WireEnvelope::decode_as::<
10862                        ___D,
10863                        crate::WireNodeAttributes2<'static>,
10864                    >(slot.as_mut(), decoder)?;
10865
10866                    Ok(())
10867                }
10868
10869                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
10870            }
10871        })
10872    }
10873}
10874
10875impl<'de> WireFileInfo<'de> {
10876    pub fn is_append(&self) -> Option<&bool> {
10877        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10878    }
10879
10880    pub fn observer(&self) -> Option<&::fidl_next::fuchsia::WireHandle> {
10881        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10882    }
10883
10884    pub fn stream(&self) -> Option<&::fidl_next::fuchsia::WireHandle> {
10885        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10886    }
10887
10888    pub fn attributes(&self) -> Option<&crate::WireNodeAttributes2<'de>> {
10889        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
10890    }
10891}
10892
10893impl<'de> ::core::fmt::Debug for WireFileInfo<'de> {
10894    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
10895        f.debug_struct("FileInfo")
10896            .field("is_append", &self.is_append())
10897            .field("observer", &self.observer())
10898            .field("stream", &self.stream())
10899            .field("attributes", &self.attributes())
10900            .finish()
10901    }
10902}
10903
10904#[derive(Clone, Debug, Default)]
10905pub struct SymlinkInfo {
10906    pub target: Option<Vec<u8>>,
10907
10908    pub attributes: Option<crate::NodeAttributes2>,
10909}
10910
10911impl SymlinkInfo {
10912    fn __max_ordinal(&self) -> usize {
10913        if self.attributes.is_some() {
10914            return 2;
10915        }
10916
10917        if self.target.is_some() {
10918            return 1;
10919        }
10920
10921        0
10922    }
10923}
10924
10925impl ::fidl_next::Encodable for SymlinkInfo {
10926    type Encoded = WireSymlinkInfo<'static>;
10927}
10928
10929unsafe impl<___E> ::fidl_next::Encode<___E> for SymlinkInfo
10930where
10931    ___E: ::fidl_next::Encoder + ?Sized,
10932{
10933    #[inline]
10934    fn encode(
10935        mut self,
10936        encoder: &mut ___E,
10937        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10938    ) -> Result<(), ::fidl_next::EncodeError> {
10939        ::fidl_next::munge!(let WireSymlinkInfo { table } = out);
10940
10941        let max_ord = self.__max_ordinal();
10942
10943        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10944        ::fidl_next::Wire::zero_padding(&mut out);
10945
10946        let mut preallocated =
10947            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10948
10949        for i in 1..=max_ord {
10950            match i {
10951                2 => {
10952                    if let Some(attributes) = self.attributes.take() {
10953                        ::fidl_next::WireEnvelope::encode_value(
10954                            attributes,
10955                            preallocated.encoder,
10956                            &mut out,
10957                        )?;
10958                    } else {
10959                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10960                    }
10961                }
10962
10963                1 => {
10964                    if let Some(target) = self.target.take() {
10965                        ::fidl_next::WireEnvelope::encode_value(
10966                            target,
10967                            preallocated.encoder,
10968                            &mut out,
10969                        )?;
10970                    } else {
10971                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10972                    }
10973                }
10974
10975                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10976            }
10977            unsafe {
10978                preallocated.write_next(out.assume_init_ref());
10979            }
10980        }
10981
10982        ::fidl_next::WireTable::encode_len(table, max_ord);
10983
10984        Ok(())
10985    }
10986}
10987
10988unsafe impl<___E> ::fidl_next::EncodeRef<___E> for SymlinkInfo
10989where
10990    ___E: ::fidl_next::Encoder + ?Sized,
10991{
10992    #[inline]
10993    fn encode_ref(
10994        &self,
10995        encoder: &mut ___E,
10996        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10997    ) -> Result<(), ::fidl_next::EncodeError> {
10998        ::fidl_next::munge!(let WireSymlinkInfo { table } = out);
10999
11000        let max_ord = self.__max_ordinal();
11001
11002        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
11003        ::fidl_next::Wire::zero_padding(&mut out);
11004
11005        let mut preallocated =
11006            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
11007
11008        for i in 1..=max_ord {
11009            match i {
11010                2 => {
11011                    if let Some(attributes) = &self.attributes {
11012                        ::fidl_next::WireEnvelope::encode_value(
11013                            attributes,
11014                            preallocated.encoder,
11015                            &mut out,
11016                        )?;
11017                    } else {
11018                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
11019                    }
11020                }
11021
11022                1 => {
11023                    if let Some(target) = &self.target {
11024                        ::fidl_next::WireEnvelope::encode_value(
11025                            target,
11026                            preallocated.encoder,
11027                            &mut out,
11028                        )?;
11029                    } else {
11030                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
11031                    }
11032                }
11033
11034                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
11035            }
11036            unsafe {
11037                preallocated.write_next(out.assume_init_ref());
11038            }
11039        }
11040
11041        ::fidl_next::WireTable::encode_len(table, max_ord);
11042
11043        Ok(())
11044    }
11045}
11046
11047impl<'de> ::fidl_next::FromWire<WireSymlinkInfo<'de>> for SymlinkInfo {
11048    #[inline]
11049    fn from_wire(wire: WireSymlinkInfo<'de>) -> Self {
11050        let wire = ::core::mem::ManuallyDrop::new(wire);
11051
11052        let target = wire.table.get(1);
11053
11054        let attributes = wire.table.get(2);
11055
11056        Self {
11057            target: target.map(|envelope| {
11058                ::fidl_next::FromWire::from_wire(unsafe {
11059                    envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
11060                })
11061            }),
11062
11063            attributes: attributes.map(|envelope| {
11064                ::fidl_next::FromWire::from_wire(unsafe {
11065                    envelope.read_unchecked::<crate::WireNodeAttributes2<'de>>()
11066                })
11067            }),
11068        }
11069    }
11070}
11071
11072impl<'de> ::fidl_next::FromWireRef<WireSymlinkInfo<'de>> for SymlinkInfo {
11073    #[inline]
11074    fn from_wire_ref(wire: &WireSymlinkInfo<'de>) -> Self {
11075        Self {
11076            target: wire.table.get(1).map(|envelope| {
11077                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
11078                    envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
11079                })
11080            }),
11081
11082            attributes: wire.table.get(2).map(|envelope| {
11083                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
11084                    envelope.deref_unchecked::<crate::WireNodeAttributes2<'de>>()
11085                })
11086            }),
11087        }
11088    }
11089}
11090
11091/// The wire type corresponding to [`SymlinkInfo`].
11092#[repr(C)]
11093pub struct WireSymlinkInfo<'de> {
11094    table: ::fidl_next::WireTable<'de>,
11095}
11096
11097impl<'de> Drop for WireSymlinkInfo<'de> {
11098    fn drop(&mut self) {
11099        let _ = self.table.get(1).map(|envelope| unsafe {
11100            envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
11101        });
11102
11103        let _ = self.table.get(2).map(|envelope| unsafe {
11104            envelope.read_unchecked::<crate::WireNodeAttributes2<'de>>()
11105        });
11106    }
11107}
11108
11109unsafe impl ::fidl_next::Wire for WireSymlinkInfo<'static> {
11110    type Decoded<'de> = WireSymlinkInfo<'de>;
11111
11112    #[inline]
11113    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11114        ::fidl_next::munge!(let Self { table } = out);
11115        ::fidl_next::WireTable::zero_padding(table);
11116    }
11117}
11118
11119unsafe impl<___D> ::fidl_next::Decode<___D> for WireSymlinkInfo<'static>
11120where
11121    ___D: ::fidl_next::Decoder + ?Sized,
11122{
11123    fn decode(
11124        slot: ::fidl_next::Slot<'_, Self>,
11125        decoder: &mut ___D,
11126    ) -> Result<(), ::fidl_next::DecodeError> {
11127        ::fidl_next::munge!(let Self { table } = slot);
11128
11129        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11130            match ordinal {
11131                0 => unsafe { ::core::hint::unreachable_unchecked() },
11132
11133                1 => {
11134                    ::fidl_next::WireEnvelope::decode_as::<
11135                        ___D,
11136                        ::fidl_next::WireVector<'static, u8>,
11137                    >(slot.as_mut(), decoder)?;
11138
11139                    let target = unsafe {
11140                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
11141                    };
11142
11143                    if target.len() > 4095 {
11144                        return Err(::fidl_next::DecodeError::VectorTooLong {
11145                            size: target.len() as u64,
11146                            limit: 4095,
11147                        });
11148                    }
11149
11150                    Ok(())
11151                }
11152
11153                2 => {
11154                    ::fidl_next::WireEnvelope::decode_as::<
11155                        ___D,
11156                        crate::WireNodeAttributes2<'static>,
11157                    >(slot.as_mut(), decoder)?;
11158
11159                    Ok(())
11160                }
11161
11162                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
11163            }
11164        })
11165    }
11166}
11167
11168impl<'de> WireSymlinkInfo<'de> {
11169    pub fn target(&self) -> Option<&::fidl_next::WireVector<'de, u8>> {
11170        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11171    }
11172
11173    pub fn attributes(&self) -> Option<&crate::WireNodeAttributes2<'de>> {
11174        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
11175    }
11176}
11177
11178impl<'de> ::core::fmt::Debug for WireSymlinkInfo<'de> {
11179    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
11180        f.debug_struct("SymlinkInfo")
11181            .field("target", &self.target())
11182            .field("attributes", &self.attributes())
11183            .finish()
11184    }
11185}
11186
11187#[derive(Debug)]
11188pub enum Representation {
11189    Node(crate::NodeInfo),
11190
11191    Directory(crate::DirectoryInfo),
11192
11193    File(crate::FileInfo),
11194
11195    Symlink(crate::SymlinkInfo),
11196
11197    UnknownOrdinal_(u64),
11198}
11199
11200impl ::fidl_next::Encodable for Representation {
11201    type Encoded = WireRepresentation<'static>;
11202}
11203
11204unsafe impl<___E> ::fidl_next::Encode<___E> for Representation
11205where
11206    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11207
11208    ___E: ::fidl_next::Encoder,
11209
11210    ___E: ::fidl_next::fuchsia::HandleEncoder,
11211{
11212    #[inline]
11213    fn encode(
11214        self,
11215        encoder: &mut ___E,
11216        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11217    ) -> Result<(), ::fidl_next::EncodeError> {
11218        ::fidl_next::munge!(let WireRepresentation { raw, _phantom: _ } = out);
11219
11220        match self {
11221            Self::Node(value) => ::fidl_next::RawWireUnion::encode_as::<___E, crate::NodeInfo>(
11222                value, 1, encoder, raw,
11223            )?,
11224
11225            Self::Directory(value) => ::fidl_next::RawWireUnion::encode_as::<
11226                ___E,
11227                crate::DirectoryInfo,
11228            >(value, 2, encoder, raw)?,
11229
11230            Self::File(value) => ::fidl_next::RawWireUnion::encode_as::<___E, crate::FileInfo>(
11231                value, 3, encoder, raw,
11232            )?,
11233
11234            Self::Symlink(value) => {
11235                ::fidl_next::RawWireUnion::encode_as::<___E, crate::SymlinkInfo>(
11236                    value, 4, encoder, raw,
11237                )?
11238            }
11239
11240            Self::UnknownOrdinal_(ordinal) => {
11241                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize))
11242            }
11243        }
11244
11245        Ok(())
11246    }
11247}
11248
11249impl ::fidl_next::EncodableOption for Representation {
11250    type EncodedOption = WireOptionalRepresentation<'static>;
11251}
11252
11253unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Representation
11254where
11255    ___E: ?Sized,
11256    Representation: ::fidl_next::Encode<___E>,
11257{
11258    #[inline]
11259    fn encode_option(
11260        this: Option<Self>,
11261        encoder: &mut ___E,
11262        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11263    ) -> Result<(), ::fidl_next::EncodeError> {
11264        ::fidl_next::munge!(let WireOptionalRepresentation { raw, _phantom: _ } = &mut *out);
11265
11266        if let Some(inner) = this {
11267            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
11268            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
11269        } else {
11270            ::fidl_next::RawWireUnion::encode_absent(raw);
11271        }
11272
11273        Ok(())
11274    }
11275}
11276
11277impl<'de> ::fidl_next::FromWire<WireRepresentation<'de>> for Representation {
11278    #[inline]
11279    fn from_wire(wire: WireRepresentation<'de>) -> Self {
11280        let wire = ::core::mem::ManuallyDrop::new(wire);
11281        match wire.raw.ordinal() {
11282            1 => Self::Node(::fidl_next::FromWire::from_wire(unsafe {
11283                wire.raw.get().read_unchecked::<crate::WireNodeInfo<'de>>()
11284            })),
11285
11286            2 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
11287                wire.raw.get().read_unchecked::<crate::WireDirectoryInfo<'de>>()
11288            })),
11289
11290            3 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
11291                wire.raw.get().read_unchecked::<crate::WireFileInfo<'de>>()
11292            })),
11293
11294            4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
11295                wire.raw.get().read_unchecked::<crate::WireSymlinkInfo<'de>>()
11296            })),
11297
11298            _ => unsafe { ::core::hint::unreachable_unchecked() },
11299        }
11300    }
11301}
11302
11303impl<'de> ::fidl_next::FromWireOption<WireOptionalRepresentation<'de>> for Box<Representation> {
11304    #[inline]
11305    fn from_wire_option(wire: WireOptionalRepresentation<'de>) -> Option<Self> {
11306        if let Some(inner) = wire.into_option() {
11307            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
11308        } else {
11309            None
11310        }
11311    }
11312}
11313
11314/// The wire type corresponding to [`Representation`].
11315#[repr(transparent)]
11316pub struct WireRepresentation<'de> {
11317    raw: ::fidl_next::RawWireUnion,
11318    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
11319}
11320
11321impl<'de> Drop for WireRepresentation<'de> {
11322    fn drop(&mut self) {
11323        match self.raw.ordinal() {
11324            1 => {
11325                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireNodeInfo<'de>>() };
11326            }
11327
11328            2 => {
11329                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireDirectoryInfo<'de>>() };
11330            }
11331
11332            3 => {
11333                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireFileInfo<'de>>() };
11334            }
11335
11336            4 => {
11337                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireSymlinkInfo<'de>>() };
11338            }
11339
11340            _ => (),
11341        }
11342    }
11343}
11344
11345unsafe impl ::fidl_next::Wire for WireRepresentation<'static> {
11346    type Decoded<'de> = WireRepresentation<'de>;
11347
11348    #[inline]
11349    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11350        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
11351        ::fidl_next::RawWireUnion::zero_padding(raw);
11352    }
11353}
11354
11355pub mod representation {
11356    pub enum Ref<'de> {
11357        Node(&'de crate::WireNodeInfo<'de>),
11358
11359        Directory(&'de crate::WireDirectoryInfo<'de>),
11360
11361        File(&'de crate::WireFileInfo<'de>),
11362
11363        Symlink(&'de crate::WireSymlinkInfo<'de>),
11364
11365        UnknownOrdinal_(u64),
11366    }
11367}
11368
11369impl<'de> WireRepresentation<'de> {
11370    pub fn as_ref(&self) -> crate::representation::Ref<'_> {
11371        match self.raw.ordinal() {
11372            1 => crate::representation::Ref::Node(unsafe {
11373                self.raw.get().deref_unchecked::<crate::WireNodeInfo<'_>>()
11374            }),
11375
11376            2 => crate::representation::Ref::Directory(unsafe {
11377                self.raw.get().deref_unchecked::<crate::WireDirectoryInfo<'_>>()
11378            }),
11379
11380            3 => crate::representation::Ref::File(unsafe {
11381                self.raw.get().deref_unchecked::<crate::WireFileInfo<'_>>()
11382            }),
11383
11384            4 => crate::representation::Ref::Symlink(unsafe {
11385                self.raw.get().deref_unchecked::<crate::WireSymlinkInfo<'_>>()
11386            }),
11387
11388            unknown => crate::representation::Ref::UnknownOrdinal_(unknown),
11389        }
11390    }
11391}
11392
11393unsafe impl<___D> ::fidl_next::Decode<___D> for WireRepresentation<'static>
11394where
11395    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11396
11397    ___D: ::fidl_next::Decoder,
11398
11399    ___D: ::fidl_next::fuchsia::HandleDecoder,
11400{
11401    fn decode(
11402        mut slot: ::fidl_next::Slot<'_, Self>,
11403        decoder: &mut ___D,
11404    ) -> Result<(), ::fidl_next::DecodeError> {
11405        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
11406        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
11407            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireNodeInfo<'static>>(
11408                raw, decoder,
11409            )?,
11410
11411            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirectoryInfo<'static>>(
11412                raw, decoder,
11413            )?,
11414
11415            3 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireFileInfo<'static>>(
11416                raw, decoder,
11417            )?,
11418
11419            4 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireSymlinkInfo<'static>>(
11420                raw, decoder,
11421            )?,
11422
11423            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
11424        }
11425
11426        Ok(())
11427    }
11428}
11429
11430impl<'de> ::core::fmt::Debug for WireRepresentation<'de> {
11431    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11432        match self.raw.ordinal() {
11433            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireNodeInfo<'_>>().fmt(f) },
11434            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirectoryInfo<'_>>().fmt(f) },
11435            3 => unsafe { self.raw.get().deref_unchecked::<crate::WireFileInfo<'_>>().fmt(f) },
11436            4 => unsafe { self.raw.get().deref_unchecked::<crate::WireSymlinkInfo<'_>>().fmt(f) },
11437            _ => unsafe { ::core::hint::unreachable_unchecked() },
11438        }
11439    }
11440}
11441
11442#[repr(transparent)]
11443pub struct WireOptionalRepresentation<'de> {
11444    raw: ::fidl_next::RawWireUnion,
11445    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
11446}
11447
11448unsafe impl ::fidl_next::Wire for WireOptionalRepresentation<'static> {
11449    type Decoded<'de> = WireOptionalRepresentation<'de>;
11450
11451    #[inline]
11452    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11453        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
11454        ::fidl_next::RawWireUnion::zero_padding(raw);
11455    }
11456}
11457
11458impl<'de> WireOptionalRepresentation<'de> {
11459    pub fn is_some(&self) -> bool {
11460        self.raw.is_some()
11461    }
11462
11463    pub fn is_none(&self) -> bool {
11464        self.raw.is_none()
11465    }
11466
11467    pub fn as_ref(&self) -> Option<&WireRepresentation<'de>> {
11468        if self.is_some() {
11469            Some(unsafe { &*(self as *const Self).cast() })
11470        } else {
11471            None
11472        }
11473    }
11474
11475    pub fn into_option(self) -> Option<WireRepresentation<'de>> {
11476        if self.is_some() {
11477            Some(WireRepresentation { raw: self.raw, _phantom: ::core::marker::PhantomData })
11478        } else {
11479            None
11480        }
11481    }
11482}
11483
11484unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalRepresentation<'static>
11485where
11486    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11487
11488    ___D: ::fidl_next::Decoder,
11489
11490    ___D: ::fidl_next::fuchsia::HandleDecoder,
11491{
11492    fn decode(
11493        mut slot: ::fidl_next::Slot<'_, Self>,
11494        decoder: &mut ___D,
11495    ) -> Result<(), ::fidl_next::DecodeError> {
11496        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
11497        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
11498            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireNodeInfo<'static>>(
11499                raw, decoder,
11500            )?,
11501
11502            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirectoryInfo<'static>>(
11503                raw, decoder,
11504            )?,
11505
11506            3 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireFileInfo<'static>>(
11507                raw, decoder,
11508            )?,
11509
11510            4 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireSymlinkInfo<'static>>(
11511                raw, decoder,
11512            )?,
11513
11514            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
11515            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
11516        }
11517
11518        Ok(())
11519    }
11520}
11521
11522impl<'de> ::core::fmt::Debug for WireOptionalRepresentation<'de> {
11523    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11524        self.as_ref().fmt(f)
11525    }
11526}
11527
11528::fidl_next::bitflags! {
11529    #[derive(
11530        Clone,
11531        Copy,
11532        Debug,
11533        PartialEq,
11534        Eq,
11535        Hash,
11536    )]
11537    pub struct NodeAttributesQuery: u64 {
11538        #[doc = " Requests [`NodeAttributes.protocols`].\n"]const PROTOCOLS = 1;
11539        #[doc = " Requests [`NodeAttributes.abilities`].\n"]const ABILITIES = 2;
11540        #[doc = " Requests [`NodeAttributes.content_size`].\n"]const CONTENT_SIZE = 4;
11541        #[doc = " Requests [`NodeAttributes.storage_size`].\n"]const STORAGE_SIZE = 8;
11542        #[doc = " Requests [`NodeAttributes.link_count`].\n"]const LINK_COUNT = 16;
11543        #[doc = " Requests [`NodeAttributes.id`].\n"]const ID = 32;
11544        #[doc = " Requests [`NodeAttributes.creation_time`].\n"]const CREATION_TIME = 64;
11545        #[doc = " Requests [`NodeAttributes.modification_time`].\n"]const MODIFICATION_TIME = 128;
11546        #[doc = " Posix attributes.\n"]const MODE = 256;
11547        const UID = 512;
11548        const GID = 1024;
11549        const RDEV = 2048;
11550        const ACCESS_TIME = 4096;
11551        const CHANGE_TIME = 8192;
11552        #[doc = " Verity attributes.\n"]const OPTIONS = 16384;
11553        const ROOT_HASH = 32768;
11554        const VERITY_ENABLED = 65536;
11555        #[doc = " Casefold (case-insensitive filename) support.\n When true, file lookups will be case-insensitive but case-preserving. i.e. \"Foo\" will\n be stored verbatim but can be opened as \"foo\", \"fOO\", etc. Casefolding is done in\n accordance to the Unicode 12 NFD normalization and casefolding standard.\n"]const CASEFOLD = 131072;
11556        #[doc = " Requests [`MutableNodeAttributes.selinux_context`]. See that field for more detail.\n"]const SELINUX_CONTEXT = 262144;
11557        #[doc = " fscrypt attribute.\n"]const WRAPPING_KEY_ID = 524288;
11558        #[doc = " When this is queried in [`fuchsia.io/Node.GetAttributes`], it indicates to the filesystem\n that this node has been accessed and is pending an access time update given that any one of\n the following conditions are met:\n   * current_access_time <= current_modification_time\n   * current_access_time <= current_change_time\n   * current_access_time < current_time - duration(1 day)\n\n If any of the above conditions are met, `access_time` is updated to the current time before\n any queried node attributes are returned.\n\n This is compatible with Linux relatime mount.\n\n The rationale behind adding this `NodeAttributesQuery` is that some filesystems, e.g. Fxfs,\n are unable to identify when a file access has occured and thus update the access time. We\n allow for clients to communicate to the underlying filesystem that a file access has\n occurred and that it awaits for an update to access time.\n\n WARNING: If this is queried without a prior file access, as long as the above conditions\n are met, the node\'s access time will be updated. Not all filesystems will support this. The\n query will be ignored if the filesystem does not support this.\n"]const PENDING_ACCESS_TIME_UPDATE = 1048576;
11559        const _ = !0;
11560    }
11561}
11562
11563impl ::fidl_next::Encodable for NodeAttributesQuery {
11564    type Encoded = WireNodeAttributesQuery;
11565}
11566
11567unsafe impl<___E> ::fidl_next::Encode<___E> for NodeAttributesQuery
11568where
11569    ___E: ?Sized,
11570{
11571    #[inline]
11572    fn encode(
11573        self,
11574        encoder: &mut ___E,
11575        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11576    ) -> Result<(), ::fidl_next::EncodeError> {
11577        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
11578    }
11579}
11580
11581unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeAttributesQuery
11582where
11583    ___E: ?Sized,
11584{
11585    #[inline]
11586    fn encode_ref(
11587        &self,
11588        _: &mut ___E,
11589        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11590    ) -> Result<(), ::fidl_next::EncodeError> {
11591        ::fidl_next::munge!(let WireNodeAttributesQuery { value } = out);
11592        let _ = value.write(::fidl_next::WireU64::from(self.bits()));
11593        Ok(())
11594    }
11595}
11596
11597impl ::core::convert::From<WireNodeAttributesQuery> for NodeAttributesQuery {
11598    fn from(wire: WireNodeAttributesQuery) -> Self {
11599        Self::from_bits_retain(u64::from(wire.value))
11600    }
11601}
11602
11603impl ::fidl_next::FromWire<WireNodeAttributesQuery> for NodeAttributesQuery {
11604    #[inline]
11605    fn from_wire(wire: WireNodeAttributesQuery) -> Self {
11606        Self::from(wire)
11607    }
11608}
11609
11610impl ::fidl_next::FromWireRef<WireNodeAttributesQuery> for NodeAttributesQuery {
11611    #[inline]
11612    fn from_wire_ref(wire: &WireNodeAttributesQuery) -> Self {
11613        Self::from(*wire)
11614    }
11615}
11616
11617/// The wire type corresponding to [`NodeAttributesQuery`].
11618#[derive(Clone, Copy, Debug)]
11619#[repr(transparent)]
11620pub struct WireNodeAttributesQuery {
11621    value: ::fidl_next::WireU64,
11622}
11623
11624unsafe impl ::fidl_next::Wire for WireNodeAttributesQuery {
11625    type Decoded<'de> = Self;
11626
11627    #[inline]
11628    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11629        // Wire bits have no padding
11630    }
11631}
11632
11633unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeAttributesQuery
11634where
11635    ___D: ?Sized,
11636{
11637    fn decode(
11638        slot: ::fidl_next::Slot<'_, Self>,
11639        _: &mut ___D,
11640    ) -> Result<(), ::fidl_next::DecodeError> {
11641        Ok(())
11642    }
11643}
11644
11645impl ::core::convert::From<NodeAttributesQuery> for WireNodeAttributesQuery {
11646    fn from(natural: NodeAttributesQuery) -> Self {
11647        Self { value: ::fidl_next::WireU64::from(natural.bits()) }
11648    }
11649}
11650
11651#[derive(Clone, Debug)]
11652#[repr(C)]
11653pub struct NodeGetAttributesRequest {
11654    pub query: crate::NodeAttributesQuery,
11655}
11656
11657impl ::fidl_next::Encodable for NodeGetAttributesRequest {
11658    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireNodeGetAttributesRequest> = unsafe {
11659        ::fidl_next::CopyOptimization::enable_if(
11660            true && <crate::NodeAttributesQuery as ::fidl_next::Encodable>::COPY_OPTIMIZATION
11661                .is_enabled(),
11662        )
11663    };
11664
11665    type Encoded = WireNodeGetAttributesRequest;
11666}
11667
11668unsafe impl<___E> ::fidl_next::Encode<___E> for NodeGetAttributesRequest
11669where
11670    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11671{
11672    #[inline]
11673    fn encode(
11674        self,
11675        encoder: &mut ___E,
11676        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11677    ) -> Result<(), ::fidl_next::EncodeError> {
11678        ::fidl_next::munge! {
11679            let Self::Encoded {
11680                query,
11681
11682            } = out;
11683        }
11684
11685        ::fidl_next::Encode::encode(self.query, encoder, query)?;
11686
11687        Ok(())
11688    }
11689}
11690
11691unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NodeGetAttributesRequest
11692where
11693    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11694{
11695    #[inline]
11696    fn encode_ref(
11697        &self,
11698        encoder: &mut ___E,
11699        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11700    ) -> Result<(), ::fidl_next::EncodeError> {
11701        ::fidl_next::munge! {
11702            let Self::Encoded {
11703                query,
11704
11705            } = out;
11706        }
11707
11708        ::fidl_next::EncodeRef::encode_ref(&self.query, encoder, query)?;
11709
11710        Ok(())
11711    }
11712}
11713
11714impl ::fidl_next::EncodableOption for NodeGetAttributesRequest {
11715    type EncodedOption = ::fidl_next::WireBox<'static, WireNodeGetAttributesRequest>;
11716}
11717
11718unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeGetAttributesRequest
11719where
11720    ___E: ::fidl_next::Encoder + ?Sized,
11721    NodeGetAttributesRequest: ::fidl_next::Encode<___E>,
11722{
11723    #[inline]
11724    fn encode_option(
11725        this: Option<Self>,
11726        encoder: &mut ___E,
11727        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11728    ) -> Result<(), ::fidl_next::EncodeError> {
11729        if let Some(inner) = this {
11730            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11731            ::fidl_next::WireBox::encode_present(out);
11732        } else {
11733            ::fidl_next::WireBox::encode_absent(out);
11734        }
11735
11736        Ok(())
11737    }
11738}
11739
11740unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for NodeGetAttributesRequest
11741where
11742    ___E: ::fidl_next::Encoder + ?Sized,
11743    NodeGetAttributesRequest: ::fidl_next::EncodeRef<___E>,
11744{
11745    #[inline]
11746    fn encode_option_ref(
11747        this: Option<&Self>,
11748        encoder: &mut ___E,
11749        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11750    ) -> Result<(), ::fidl_next::EncodeError> {
11751        if let Some(inner) = this {
11752            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11753            ::fidl_next::WireBox::encode_present(out);
11754        } else {
11755            ::fidl_next::WireBox::encode_absent(out);
11756        }
11757
11758        Ok(())
11759    }
11760}
11761
11762impl ::fidl_next::FromWire<WireNodeGetAttributesRequest> for NodeGetAttributesRequest {
11763    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireNodeGetAttributesRequest, Self> = unsafe {
11764        ::fidl_next::CopyOptimization::enable_if(
11765            true && <crate::NodeAttributesQuery as ::fidl_next::FromWire<
11766                crate::WireNodeAttributesQuery,
11767            >>::COPY_OPTIMIZATION
11768                .is_enabled(),
11769        )
11770    };
11771
11772    #[inline]
11773    fn from_wire(wire: WireNodeGetAttributesRequest) -> Self {
11774        Self { query: ::fidl_next::FromWire::from_wire(wire.query) }
11775    }
11776}
11777
11778impl ::fidl_next::FromWireRef<WireNodeGetAttributesRequest> for NodeGetAttributesRequest {
11779    #[inline]
11780    fn from_wire_ref(wire: &WireNodeGetAttributesRequest) -> Self {
11781        Self { query: ::fidl_next::FromWireRef::from_wire_ref(&wire.query) }
11782    }
11783}
11784
11785/// The wire type corresponding to [`NodeGetAttributesRequest`].
11786#[derive(Clone, Debug)]
11787#[repr(C)]
11788pub struct WireNodeGetAttributesRequest {
11789    pub query: crate::WireNodeAttributesQuery,
11790}
11791
11792unsafe impl ::fidl_next::Wire for WireNodeGetAttributesRequest {
11793    type Decoded<'de> = WireNodeGetAttributesRequest;
11794
11795    #[inline]
11796    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
11797}
11798
11799unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeGetAttributesRequest
11800where
11801    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11802{
11803    fn decode(
11804        slot: ::fidl_next::Slot<'_, Self>,
11805        decoder: &mut ___D,
11806    ) -> Result<(), ::fidl_next::DecodeError> {
11807        ::fidl_next::munge! {
11808            let Self {
11809                mut query,
11810
11811            } = slot;
11812        }
11813
11814        ::fidl_next::Decode::decode(query.as_mut(), decoder)?;
11815
11816        Ok(())
11817    }
11818}
11819
11820/// The type corresponding to the Node protocol.
11821#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
11822#[derive(Debug)]
11823pub struct Node;
11824
11825impl ::fidl_next::Discoverable for Node {
11826    const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
11827}
11828
11829pub mod node {
11830    pub mod prelude {
11831        pub use crate::{
11832            node, Node, NodeClientHandler, NodeClientSender, NodeServerHandler, NodeServerSender,
11833        };
11834
11835        pub use crate::ExtendedAttributeValue;
11836
11837        pub use crate::MutableNodeAttributes;
11838
11839        pub use crate::NodeAttributes2;
11840
11841        pub use crate::NodeDeprecatedCloneRequest;
11842
11843        pub use crate::NodeDeprecatedGetAttrResponse;
11844
11845        pub use crate::NodeDeprecatedGetFlagsResponse;
11846
11847        pub use crate::NodeDeprecatedSetAttrRequest;
11848
11849        pub use crate::NodeDeprecatedSetAttrResponse;
11850
11851        pub use crate::NodeDeprecatedSetFlagsRequest;
11852
11853        pub use crate::NodeDeprecatedSetFlagsResponse;
11854
11855        pub use crate::NodeGetAttributesRequest;
11856
11857        pub use crate::NodeGetExtendedAttributeRequest;
11858
11859        pub use crate::NodeListExtendedAttributesRequest;
11860
11861        pub use crate::NodeOnOpenRequest;
11862
11863        pub use crate::NodeQueryFilesystemResponse;
11864
11865        pub use crate::NodeRemoveExtendedAttributeRequest;
11866
11867        pub use crate::NodeSetExtendedAttributeRequest;
11868
11869        pub use crate::NodeSetFlagsRequest;
11870
11871        pub use crate::NodeGetFlagsResponse;
11872
11873        pub use crate::NodeRemoveExtendedAttributeResponse;
11874
11875        pub use crate::NodeSetExtendedAttributeResponse;
11876
11877        pub use crate::NodeSetFlagsResponse;
11878
11879        pub use crate::NodeSyncResponse;
11880
11881        pub use crate::NodeUpdateAttributesResponse;
11882
11883        pub use crate::Representation;
11884
11885        pub use ::fidl_next_fuchsia_unknown::CloneableCloneRequest;
11886
11887        pub use ::fidl_next_fuchsia_unknown::CloseableCloseResponse;
11888
11889        pub use ::fidl_next_fuchsia_unknown::QueryableQueryResponse;
11890    }
11891
11892    pub struct Clone;
11893
11894    impl ::fidl_next::Method for Clone {
11895        const ORDINAL: u64 = 2366825959783828089;
11896
11897        type Protocol = crate::Node;
11898
11899        type Request = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest;
11900
11901        type Response = ::fidl_next::Never;
11902    }
11903
11904    pub struct Close;
11905
11906    impl ::fidl_next::Method for Close {
11907        const ORDINAL: u64 = 6540867515453498750;
11908
11909        type Protocol = crate::Node;
11910
11911        type Request = ();
11912
11913        type Response = ::fidl_next::WireResult<
11914            'static,
11915            ::fidl_next_fuchsia_unknown::WireCloseableCloseResponse,
11916            ::fidl_next::WireI32,
11917        >;
11918    }
11919
11920    pub struct Query;
11921
11922    impl ::fidl_next::Method for Query {
11923        const ORDINAL: u64 = 2763219980499352582;
11924
11925        type Protocol = crate::Node;
11926
11927        type Request = ();
11928
11929        type Response = ::fidl_next_fuchsia_unknown::WireQueryableQueryResponse<'static>;
11930    }
11931
11932    pub struct DeprecatedClone;
11933
11934    impl ::fidl_next::Method for DeprecatedClone {
11935        const ORDINAL: u64 = 6512600400724287855;
11936
11937        type Protocol = crate::Node;
11938
11939        type Request = crate::WireNodeDeprecatedCloneRequest;
11940
11941        type Response = ::fidl_next::Never;
11942    }
11943
11944    pub struct OnOpen;
11945
11946    impl ::fidl_next::Method for OnOpen {
11947        const ORDINAL: u64 = 9207534335756671346;
11948
11949        type Protocol = crate::Node;
11950
11951        type Request = ::fidl_next::Never;
11952
11953        type Response = crate::WireNodeOnOpenRequest<'static>;
11954    }
11955
11956    pub struct DeprecatedGetAttr;
11957
11958    impl ::fidl_next::Method for DeprecatedGetAttr {
11959        const ORDINAL: u64 = 8689798978500614909;
11960
11961        type Protocol = crate::Node;
11962
11963        type Request = ();
11964
11965        type Response = crate::WireNodeDeprecatedGetAttrResponse;
11966    }
11967
11968    pub struct DeprecatedSetAttr;
11969
11970    impl ::fidl_next::Method for DeprecatedSetAttr {
11971        const ORDINAL: u64 = 4721673413776871238;
11972
11973        type Protocol = crate::Node;
11974
11975        type Request = crate::WireNodeDeprecatedSetAttrRequest;
11976
11977        type Response = crate::WireNodeDeprecatedSetAttrResponse;
11978    }
11979
11980    pub struct DeprecatedGetFlags;
11981
11982    impl ::fidl_next::Method for DeprecatedGetFlags {
11983        const ORDINAL: u64 = 6595803110182632097;
11984
11985        type Protocol = crate::Node;
11986
11987        type Request = ();
11988
11989        type Response = crate::WireNodeDeprecatedGetFlagsResponse;
11990    }
11991
11992    pub struct DeprecatedSetFlags;
11993
11994    impl ::fidl_next::Method for DeprecatedSetFlags {
11995        const ORDINAL: u64 = 5950864159036794675;
11996
11997        type Protocol = crate::Node;
11998
11999        type Request = crate::WireNodeDeprecatedSetFlagsRequest;
12000
12001        type Response = crate::WireNodeDeprecatedSetFlagsResponse;
12002    }
12003
12004    pub struct GetFlags;
12005
12006    impl ::fidl_next::Method for GetFlags {
12007        const ORDINAL: u64 = 105530239381466147;
12008
12009        type Protocol = crate::Node;
12010
12011        type Request = ();
12012
12013        type Response = ::fidl_next::WireFlexibleResult<
12014            'static,
12015            crate::WireNodeGetFlagsResponse,
12016            ::fidl_next::WireI32,
12017        >;
12018    }
12019
12020    pub struct SetFlags;
12021
12022    impl ::fidl_next::Method for SetFlags {
12023        const ORDINAL: u64 = 6172186066099445416;
12024
12025        type Protocol = crate::Node;
12026
12027        type Request = crate::WireNodeSetFlagsRequest;
12028
12029        type Response = ::fidl_next::WireFlexibleResult<
12030            'static,
12031            crate::WireNodeSetFlagsResponse,
12032            ::fidl_next::WireI32,
12033        >;
12034    }
12035
12036    pub struct QueryFilesystem;
12037
12038    impl ::fidl_next::Method for QueryFilesystem {
12039        const ORDINAL: u64 = 8013111122914313744;
12040
12041        type Protocol = crate::Node;
12042
12043        type Request = ();
12044
12045        type Response = crate::WireNodeQueryFilesystemResponse<'static>;
12046    }
12047
12048    pub struct OnRepresentation;
12049
12050    impl ::fidl_next::Method for OnRepresentation {
12051        const ORDINAL: u64 = 6679970090861613324;
12052
12053        type Protocol = crate::Node;
12054
12055        type Request = ::fidl_next::Never;
12056
12057        type Response = crate::WireRepresentation<'static>;
12058    }
12059
12060    pub struct GetAttributes;
12061
12062    impl ::fidl_next::Method for GetAttributes {
12063        const ORDINAL: u64 = 4414537700416816443;
12064
12065        type Protocol = crate::Node;
12066
12067        type Request = crate::WireNodeGetAttributesRequest;
12068
12069        type Response = ::fidl_next::WireResult<
12070            'static,
12071            crate::WireNodeAttributes2<'static>,
12072            ::fidl_next::WireI32,
12073        >;
12074    }
12075
12076    pub struct UpdateAttributes;
12077
12078    impl ::fidl_next::Method for UpdateAttributes {
12079        const ORDINAL: u64 = 3677402239314018056;
12080
12081        type Protocol = crate::Node;
12082
12083        type Request = crate::WireMutableNodeAttributes<'static>;
12084
12085        type Response = ::fidl_next::WireResult<
12086            'static,
12087            crate::WireNodeUpdateAttributesResponse,
12088            ::fidl_next::WireI32,
12089        >;
12090    }
12091
12092    pub struct Sync;
12093
12094    impl ::fidl_next::Method for Sync {
12095        const ORDINAL: u64 = 3196473584242777161;
12096
12097        type Protocol = crate::Node;
12098
12099        type Request = ();
12100
12101        type Response =
12102            ::fidl_next::WireResult<'static, crate::WireNodeSyncResponse, ::fidl_next::WireI32>;
12103    }
12104
12105    pub struct ListExtendedAttributes;
12106
12107    impl ::fidl_next::Method for ListExtendedAttributes {
12108        const ORDINAL: u64 = 5431626189872037072;
12109
12110        type Protocol = crate::Node;
12111
12112        type Request = crate::WireNodeListExtendedAttributesRequest;
12113
12114        type Response = ::fidl_next::Never;
12115    }
12116
12117    pub struct GetExtendedAttribute;
12118
12119    impl ::fidl_next::Method for GetExtendedAttribute {
12120        const ORDINAL: u64 = 5043930208506967771;
12121
12122        type Protocol = crate::Node;
12123
12124        type Request = crate::WireNodeGetExtendedAttributeRequest<'static>;
12125
12126        type Response = ::fidl_next::WireResult<
12127            'static,
12128            crate::WireExtendedAttributeValue<'static>,
12129            ::fidl_next::WireI32,
12130        >;
12131    }
12132
12133    pub struct SetExtendedAttribute;
12134
12135    impl ::fidl_next::Method for SetExtendedAttribute {
12136        const ORDINAL: u64 = 5374223046099989052;
12137
12138        type Protocol = crate::Node;
12139
12140        type Request = crate::WireNodeSetExtendedAttributeRequest<'static>;
12141
12142        type Response = ::fidl_next::WireResult<
12143            'static,
12144            crate::WireNodeSetExtendedAttributeResponse,
12145            ::fidl_next::WireI32,
12146        >;
12147    }
12148
12149    pub struct RemoveExtendedAttribute;
12150
12151    impl ::fidl_next::Method for RemoveExtendedAttribute {
12152        const ORDINAL: u64 = 8794297771444732717;
12153
12154        type Protocol = crate::Node;
12155
12156        type Request = crate::WireNodeRemoveExtendedAttributeRequest<'static>;
12157
12158        type Response = ::fidl_next::WireResult<
12159            'static,
12160            crate::WireNodeRemoveExtendedAttributeResponse,
12161            ::fidl_next::WireI32,
12162        >;
12163    }
12164}
12165
12166/// A helper trait for the `Node` client sender.
12167pub trait NodeClientSender {
12168    type Transport: ::fidl_next::Transport;
12169
12170    fn clone<___R>(
12171        &self,
12172        request: ___R,
12173    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12174    where
12175        ___R: ::fidl_next::Encode<
12176            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12177            Encoded = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest,
12178        >;
12179
12180    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
12181    fn close(
12182        &self,
12183    ) -> Result<
12184        ::fidl_next::ResponseFuture<'_, Self::Transport, node::Close>,
12185        ::fidl_next::EncodeError,
12186    >;
12187
12188    fn query(
12189        &self,
12190    ) -> Result<
12191        ::fidl_next::ResponseFuture<'_, Self::Transport, node::Query>,
12192        ::fidl_next::EncodeError,
12193    >;
12194
12195    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
12196    fn deprecated_clone<___R>(
12197        &self,
12198        request: ___R,
12199    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12200    where
12201        ___R: ::fidl_next::Encode<
12202            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12203            Encoded = crate::WireNodeDeprecatedCloneRequest,
12204        >;
12205
12206    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
12207    fn deprecated_get_attr(
12208        &self,
12209    ) -> Result<
12210        ::fidl_next::ResponseFuture<'_, Self::Transport, node::DeprecatedGetAttr>,
12211        ::fidl_next::EncodeError,
12212    >;
12213
12214    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
12215    fn deprecated_set_attr<___R>(
12216        &self,
12217        request: ___R,
12218    ) -> Result<
12219        ::fidl_next::ResponseFuture<'_, Self::Transport, node::DeprecatedSetAttr>,
12220        ::fidl_next::EncodeError,
12221    >
12222    where
12223        ___R: ::fidl_next::Encode<
12224            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12225            Encoded = crate::WireNodeDeprecatedSetAttrRequest,
12226        >;
12227
12228    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
12229    fn deprecated_get_flags(
12230        &self,
12231    ) -> Result<
12232        ::fidl_next::ResponseFuture<'_, Self::Transport, node::DeprecatedGetFlags>,
12233        ::fidl_next::EncodeError,
12234    >;
12235
12236    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
12237    fn deprecated_set_flags<___R>(
12238        &self,
12239        request: ___R,
12240    ) -> Result<
12241        ::fidl_next::ResponseFuture<'_, Self::Transport, node::DeprecatedSetFlags>,
12242        ::fidl_next::EncodeError,
12243    >
12244    where
12245        ___R: ::fidl_next::Encode<
12246            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12247            Encoded = crate::WireNodeDeprecatedSetFlagsRequest,
12248        >;
12249
12250    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
12251    fn get_flags(
12252        &self,
12253    ) -> Result<
12254        ::fidl_next::ResponseFuture<'_, Self::Transport, node::GetFlags>,
12255        ::fidl_next::EncodeError,
12256    >;
12257
12258    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
12259    fn set_flags<___R>(
12260        &self,
12261        request: ___R,
12262    ) -> Result<
12263        ::fidl_next::ResponseFuture<'_, Self::Transport, node::SetFlags>,
12264        ::fidl_next::EncodeError,
12265    >
12266    where
12267        ___R: ::fidl_next::Encode<
12268            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12269            Encoded = crate::WireNodeSetFlagsRequest,
12270        >;
12271
12272    #[doc = " Query the filesystem for filesystem-specific information.\n"]
12273    fn query_filesystem(
12274        &self,
12275    ) -> Result<
12276        ::fidl_next::ResponseFuture<'_, Self::Transport, node::QueryFilesystem>,
12277        ::fidl_next::EncodeError,
12278    >;
12279
12280    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12281    fn get_attributes<___R>(
12282        &self,
12283        request: ___R,
12284    ) -> Result<
12285        ::fidl_next::ResponseFuture<'_, Self::Transport, node::GetAttributes>,
12286        ::fidl_next::EncodeError,
12287    >
12288    where
12289        ___R: ::fidl_next::Encode<
12290            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12291            Encoded = crate::WireNodeGetAttributesRequest,
12292        >;
12293
12294    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12295    fn update_attributes<___R>(
12296        &self,
12297        request: ___R,
12298    ) -> Result<
12299        ::fidl_next::ResponseFuture<'_, Self::Transport, node::UpdateAttributes>,
12300        ::fidl_next::EncodeError,
12301    >
12302    where
12303        ___R: ::fidl_next::Encode<
12304            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12305            Encoded = crate::WireMutableNodeAttributes<'static>,
12306        >;
12307
12308    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
12309    fn sync(
12310        &self,
12311    ) -> Result<
12312        ::fidl_next::ResponseFuture<'_, Self::Transport, node::Sync>,
12313        ::fidl_next::EncodeError,
12314    >;
12315
12316    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12317    fn list_extended_attributes<___R>(
12318        &self,
12319        request: ___R,
12320    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12321    where
12322        ___R: ::fidl_next::Encode<
12323            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12324            Encoded = crate::WireNodeListExtendedAttributesRequest,
12325        >;
12326
12327    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12328    fn get_extended_attribute<___R>(
12329        &self,
12330        request: ___R,
12331    ) -> Result<
12332        ::fidl_next::ResponseFuture<'_, Self::Transport, node::GetExtendedAttribute>,
12333        ::fidl_next::EncodeError,
12334    >
12335    where
12336        ___R: ::fidl_next::Encode<
12337            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12338            Encoded = crate::WireNodeGetExtendedAttributeRequest<'static>,
12339        >;
12340
12341    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12342    fn set_extended_attribute<___R>(
12343        &self,
12344        request: ___R,
12345    ) -> Result<
12346        ::fidl_next::ResponseFuture<'_, Self::Transport, node::SetExtendedAttribute>,
12347        ::fidl_next::EncodeError,
12348    >
12349    where
12350        ___R: ::fidl_next::Encode<
12351            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12352            Encoded = crate::WireNodeSetExtendedAttributeRequest<'static>,
12353        >;
12354
12355    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12356    fn remove_extended_attribute<___R>(
12357        &self,
12358        request: ___R,
12359    ) -> Result<
12360        ::fidl_next::ResponseFuture<'_, Self::Transport, node::RemoveExtendedAttribute>,
12361        ::fidl_next::EncodeError,
12362    >
12363    where
12364        ___R: ::fidl_next::Encode<
12365            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12366            Encoded = crate::WireNodeRemoveExtendedAttributeRequest<'static>,
12367        >;
12368}
12369
12370impl<___T> NodeClientSender for ::fidl_next::ClientSender<___T, Node>
12371where
12372    ___T: ::fidl_next::Transport,
12373{
12374    type Transport = ___T;
12375
12376    fn clone<___R>(
12377        &self,
12378        request: ___R,
12379    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12380    where
12381        ___R: ::fidl_next::Encode<
12382            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12383            Encoded = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest,
12384        >,
12385    {
12386        self.as_untyped().send_one_way(2366825959783828089, request)
12387    }
12388
12389    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
12390    fn close(
12391        &self,
12392    ) -> Result<
12393        ::fidl_next::ResponseFuture<'_, Self::Transport, node::Close>,
12394        ::fidl_next::EncodeError,
12395    > {
12396        self.as_untyped()
12397            .send_two_way(6540867515453498750, ())
12398            .map(::fidl_next::ResponseFuture::from_untyped)
12399    }
12400
12401    fn query(
12402        &self,
12403    ) -> Result<
12404        ::fidl_next::ResponseFuture<'_, Self::Transport, node::Query>,
12405        ::fidl_next::EncodeError,
12406    > {
12407        self.as_untyped()
12408            .send_two_way(2763219980499352582, ())
12409            .map(::fidl_next::ResponseFuture::from_untyped)
12410    }
12411
12412    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
12413    fn deprecated_clone<___R>(
12414        &self,
12415        request: ___R,
12416    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12417    where
12418        ___R: ::fidl_next::Encode<
12419            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12420            Encoded = crate::WireNodeDeprecatedCloneRequest,
12421        >,
12422    {
12423        self.as_untyped().send_one_way(6512600400724287855, request)
12424    }
12425
12426    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
12427    fn deprecated_get_attr(
12428        &self,
12429    ) -> Result<
12430        ::fidl_next::ResponseFuture<'_, Self::Transport, node::DeprecatedGetAttr>,
12431        ::fidl_next::EncodeError,
12432    > {
12433        self.as_untyped()
12434            .send_two_way(8689798978500614909, ())
12435            .map(::fidl_next::ResponseFuture::from_untyped)
12436    }
12437
12438    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
12439    fn deprecated_set_attr<___R>(
12440        &self,
12441        request: ___R,
12442    ) -> Result<
12443        ::fidl_next::ResponseFuture<'_, Self::Transport, node::DeprecatedSetAttr>,
12444        ::fidl_next::EncodeError,
12445    >
12446    where
12447        ___R: ::fidl_next::Encode<
12448            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12449            Encoded = crate::WireNodeDeprecatedSetAttrRequest,
12450        >,
12451    {
12452        self.as_untyped()
12453            .send_two_way(4721673413776871238, request)
12454            .map(::fidl_next::ResponseFuture::from_untyped)
12455    }
12456
12457    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
12458    fn deprecated_get_flags(
12459        &self,
12460    ) -> Result<
12461        ::fidl_next::ResponseFuture<'_, Self::Transport, node::DeprecatedGetFlags>,
12462        ::fidl_next::EncodeError,
12463    > {
12464        self.as_untyped()
12465            .send_two_way(6595803110182632097, ())
12466            .map(::fidl_next::ResponseFuture::from_untyped)
12467    }
12468
12469    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
12470    fn deprecated_set_flags<___R>(
12471        &self,
12472        request: ___R,
12473    ) -> Result<
12474        ::fidl_next::ResponseFuture<'_, Self::Transport, node::DeprecatedSetFlags>,
12475        ::fidl_next::EncodeError,
12476    >
12477    where
12478        ___R: ::fidl_next::Encode<
12479            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12480            Encoded = crate::WireNodeDeprecatedSetFlagsRequest,
12481        >,
12482    {
12483        self.as_untyped()
12484            .send_two_way(5950864159036794675, request)
12485            .map(::fidl_next::ResponseFuture::from_untyped)
12486    }
12487
12488    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
12489    fn get_flags(
12490        &self,
12491    ) -> Result<
12492        ::fidl_next::ResponseFuture<'_, Self::Transport, node::GetFlags>,
12493        ::fidl_next::EncodeError,
12494    > {
12495        self.as_untyped()
12496            .send_two_way(105530239381466147, ())
12497            .map(::fidl_next::ResponseFuture::from_untyped)
12498    }
12499
12500    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
12501    fn set_flags<___R>(
12502        &self,
12503        request: ___R,
12504    ) -> Result<
12505        ::fidl_next::ResponseFuture<'_, Self::Transport, node::SetFlags>,
12506        ::fidl_next::EncodeError,
12507    >
12508    where
12509        ___R: ::fidl_next::Encode<
12510            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12511            Encoded = crate::WireNodeSetFlagsRequest,
12512        >,
12513    {
12514        self.as_untyped()
12515            .send_two_way(6172186066099445416, request)
12516            .map(::fidl_next::ResponseFuture::from_untyped)
12517    }
12518
12519    #[doc = " Query the filesystem for filesystem-specific information.\n"]
12520    fn query_filesystem(
12521        &self,
12522    ) -> Result<
12523        ::fidl_next::ResponseFuture<'_, Self::Transport, node::QueryFilesystem>,
12524        ::fidl_next::EncodeError,
12525    > {
12526        self.as_untyped()
12527            .send_two_way(8013111122914313744, ())
12528            .map(::fidl_next::ResponseFuture::from_untyped)
12529    }
12530
12531    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12532    fn get_attributes<___R>(
12533        &self,
12534        request: ___R,
12535    ) -> Result<
12536        ::fidl_next::ResponseFuture<'_, Self::Transport, node::GetAttributes>,
12537        ::fidl_next::EncodeError,
12538    >
12539    where
12540        ___R: ::fidl_next::Encode<
12541            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12542            Encoded = crate::WireNodeGetAttributesRequest,
12543        >,
12544    {
12545        self.as_untyped()
12546            .send_two_way(4414537700416816443, request)
12547            .map(::fidl_next::ResponseFuture::from_untyped)
12548    }
12549
12550    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12551    fn update_attributes<___R>(
12552        &self,
12553        request: ___R,
12554    ) -> Result<
12555        ::fidl_next::ResponseFuture<'_, Self::Transport, node::UpdateAttributes>,
12556        ::fidl_next::EncodeError,
12557    >
12558    where
12559        ___R: ::fidl_next::Encode<
12560            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12561            Encoded = crate::WireMutableNodeAttributes<'static>,
12562        >,
12563    {
12564        self.as_untyped()
12565            .send_two_way(3677402239314018056, request)
12566            .map(::fidl_next::ResponseFuture::from_untyped)
12567    }
12568
12569    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
12570    fn sync(
12571        &self,
12572    ) -> Result<
12573        ::fidl_next::ResponseFuture<'_, Self::Transport, node::Sync>,
12574        ::fidl_next::EncodeError,
12575    > {
12576        self.as_untyped()
12577            .send_two_way(3196473584242777161, ())
12578            .map(::fidl_next::ResponseFuture::from_untyped)
12579    }
12580
12581    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12582    fn list_extended_attributes<___R>(
12583        &self,
12584        request: ___R,
12585    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12586    where
12587        ___R: ::fidl_next::Encode<
12588            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12589            Encoded = crate::WireNodeListExtendedAttributesRequest,
12590        >,
12591    {
12592        self.as_untyped().send_one_way(5431626189872037072, request)
12593    }
12594
12595    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12596    fn get_extended_attribute<___R>(
12597        &self,
12598        request: ___R,
12599    ) -> Result<
12600        ::fidl_next::ResponseFuture<'_, Self::Transport, node::GetExtendedAttribute>,
12601        ::fidl_next::EncodeError,
12602    >
12603    where
12604        ___R: ::fidl_next::Encode<
12605            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12606            Encoded = crate::WireNodeGetExtendedAttributeRequest<'static>,
12607        >,
12608    {
12609        self.as_untyped()
12610            .send_two_way(5043930208506967771, request)
12611            .map(::fidl_next::ResponseFuture::from_untyped)
12612    }
12613
12614    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12615    fn set_extended_attribute<___R>(
12616        &self,
12617        request: ___R,
12618    ) -> Result<
12619        ::fidl_next::ResponseFuture<'_, Self::Transport, node::SetExtendedAttribute>,
12620        ::fidl_next::EncodeError,
12621    >
12622    where
12623        ___R: ::fidl_next::Encode<
12624            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12625            Encoded = crate::WireNodeSetExtendedAttributeRequest<'static>,
12626        >,
12627    {
12628        self.as_untyped()
12629            .send_two_way(5374223046099989052, request)
12630            .map(::fidl_next::ResponseFuture::from_untyped)
12631    }
12632
12633    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12634    fn remove_extended_attribute<___R>(
12635        &self,
12636        request: ___R,
12637    ) -> Result<
12638        ::fidl_next::ResponseFuture<'_, Self::Transport, node::RemoveExtendedAttribute>,
12639        ::fidl_next::EncodeError,
12640    >
12641    where
12642        ___R: ::fidl_next::Encode<
12643            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12644            Encoded = crate::WireNodeRemoveExtendedAttributeRequest<'static>,
12645        >,
12646    {
12647        self.as_untyped()
12648            .send_two_way(8794297771444732717, request)
12649            .map(::fidl_next::ResponseFuture::from_untyped)
12650    }
12651}
12652
12653/// A client handler for the Node protocol.
12654///
12655/// See [`Node`] for more details.
12656pub trait NodeClientHandler<___T: ::fidl_next::Transport> {
12657    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
12658    fn on_open(
12659        &mut self,
12660        sender: &::fidl_next::ClientSender<___T, Node>,
12661
12662        event: ::fidl_next::Response<___T, node::OnOpen>,
12663    );
12664
12665    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
12666    fn on_representation(
12667        &mut self,
12668        sender: &::fidl_next::ClientSender<___T, Node>,
12669
12670        event: ::fidl_next::Response<___T, node::OnRepresentation>,
12671    );
12672
12673    fn on_unknown_interaction(
12674        &mut self,
12675        sender: &::fidl_next::ClientSender<___T, Node>,
12676        ordinal: u64,
12677    ) {
12678        sender.close();
12679    }
12680}
12681
12682impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Node
12683where
12684    ___T: ::fidl_next::Transport,
12685    ___H: NodeClientHandler<___T>,
12686
12687    <node::Close as ::fidl_next::Method>::Response:
12688        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12689
12690    <node::Query as ::fidl_next::Method>::Response:
12691        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12692
12693    <node::OnOpen as ::fidl_next::Method>::Response:
12694        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12695
12696    <node::DeprecatedGetAttr as ::fidl_next::Method>::Response:
12697        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12698
12699    <node::DeprecatedSetAttr as ::fidl_next::Method>::Response:
12700        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12701
12702    <node::DeprecatedGetFlags as ::fidl_next::Method>::Response:
12703        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12704
12705    <node::DeprecatedSetFlags as ::fidl_next::Method>::Response:
12706        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12707
12708    <node::GetFlags as ::fidl_next::Method>::Response:
12709        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12710
12711    <node::SetFlags as ::fidl_next::Method>::Response:
12712        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12713
12714    <node::QueryFilesystem as ::fidl_next::Method>::Response:
12715        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12716
12717    <node::OnRepresentation as ::fidl_next::Method>::Response:
12718        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12719
12720    <node::GetAttributes as ::fidl_next::Method>::Response:
12721        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12722
12723    <node::UpdateAttributes as ::fidl_next::Method>::Response:
12724        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12725
12726    <node::Sync as ::fidl_next::Method>::Response:
12727        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12728
12729    <node::GetExtendedAttribute as ::fidl_next::Method>::Response:
12730        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12731
12732    <node::SetExtendedAttribute as ::fidl_next::Method>::Response:
12733        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12734
12735    <node::RemoveExtendedAttribute as ::fidl_next::Method>::Response:
12736        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12737{
12738    fn on_event(
12739        handler: &mut ___H,
12740        sender: &::fidl_next::ClientSender<___T, Self>,
12741        ordinal: u64,
12742        buffer: ___T::RecvBuffer,
12743    ) {
12744        match ordinal {
12745            9207534335756671346 => match ::fidl_next::DecoderExt::decode(buffer) {
12746                Ok(decoded) => handler.on_open(sender, decoded),
12747                Err(e) => {
12748                    sender.close();
12749                }
12750            },
12751
12752            6679970090861613324 => match ::fidl_next::DecoderExt::decode(buffer) {
12753                Ok(decoded) => handler.on_representation(sender, decoded),
12754                Err(e) => {
12755                    sender.close();
12756                }
12757            },
12758
12759            ordinal => handler.on_unknown_interaction(sender, ordinal),
12760        }
12761    }
12762}
12763
12764/// A helper trait for the `Node` server sender.
12765pub trait NodeServerSender {
12766    type Transport: ::fidl_next::Transport;
12767
12768    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
12769
12770    fn on_open<___R>(
12771        &self,
12772        request: ___R,
12773    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12774    where
12775        ___R: ::fidl_next::Encode<
12776            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12777            Encoded = <node::OnOpen as ::fidl_next::Method>::Response,
12778        >;
12779
12780    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
12781
12782    fn on_representation<___R>(
12783        &self,
12784        request: ___R,
12785    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12786    where
12787        ___R: ::fidl_next::Encode<
12788            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12789            Encoded = <node::OnRepresentation as ::fidl_next::Method>::Response,
12790        >;
12791}
12792
12793impl<___T> NodeServerSender for ::fidl_next::ServerSender<___T, Node>
12794where
12795    ___T: ::fidl_next::Transport,
12796{
12797    type Transport = ___T;
12798
12799    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
12800
12801    fn on_open<___R>(
12802        &self,
12803        request: ___R,
12804    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12805    where
12806        ___R: ::fidl_next::Encode<
12807            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12808            Encoded = <node::OnOpen as ::fidl_next::Method>::Response,
12809        >,
12810    {
12811        self.as_untyped().send_event(9207534335756671346, request)
12812    }
12813
12814    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
12815
12816    fn on_representation<___R>(
12817        &self,
12818        request: ___R,
12819    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
12820    where
12821        ___R: ::fidl_next::Encode<
12822            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
12823            Encoded = <node::OnRepresentation as ::fidl_next::Method>::Response,
12824        >,
12825    {
12826        self.as_untyped().send_event(6679970090861613324, request)
12827    }
12828}
12829
12830/// A server handler for the Node protocol.
12831///
12832/// See [`Node`] for more details.
12833pub trait NodeServerHandler<___T: ::fidl_next::Transport> {
12834    fn clone(
12835        &mut self,
12836        sender: &::fidl_next::ServerSender<___T, Node>,
12837
12838        request: ::fidl_next::Request<___T, node::Clone>,
12839    );
12840
12841    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
12842    fn close(
12843        &mut self,
12844        sender: &::fidl_next::ServerSender<___T, Node>,
12845
12846        responder: ::fidl_next::Responder<node::Close>,
12847    );
12848
12849    fn query(
12850        &mut self,
12851        sender: &::fidl_next::ServerSender<___T, Node>,
12852
12853        responder: ::fidl_next::Responder<node::Query>,
12854    );
12855
12856    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
12857    fn deprecated_clone(
12858        &mut self,
12859        sender: &::fidl_next::ServerSender<___T, Node>,
12860
12861        request: ::fidl_next::Request<___T, node::DeprecatedClone>,
12862    );
12863
12864    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
12865    fn deprecated_get_attr(
12866        &mut self,
12867        sender: &::fidl_next::ServerSender<___T, Node>,
12868
12869        responder: ::fidl_next::Responder<node::DeprecatedGetAttr>,
12870    );
12871
12872    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
12873    fn deprecated_set_attr(
12874        &mut self,
12875        sender: &::fidl_next::ServerSender<___T, Node>,
12876
12877        request: ::fidl_next::Request<___T, node::DeprecatedSetAttr>,
12878
12879        responder: ::fidl_next::Responder<node::DeprecatedSetAttr>,
12880    );
12881
12882    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
12883    fn deprecated_get_flags(
12884        &mut self,
12885        sender: &::fidl_next::ServerSender<___T, Node>,
12886
12887        responder: ::fidl_next::Responder<node::DeprecatedGetFlags>,
12888    );
12889
12890    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
12891    fn deprecated_set_flags(
12892        &mut self,
12893        sender: &::fidl_next::ServerSender<___T, Node>,
12894
12895        request: ::fidl_next::Request<___T, node::DeprecatedSetFlags>,
12896
12897        responder: ::fidl_next::Responder<node::DeprecatedSetFlags>,
12898    );
12899
12900    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
12901    fn get_flags(
12902        &mut self,
12903        sender: &::fidl_next::ServerSender<___T, Node>,
12904
12905        responder: ::fidl_next::Responder<node::GetFlags>,
12906    );
12907
12908    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
12909    fn set_flags(
12910        &mut self,
12911        sender: &::fidl_next::ServerSender<___T, Node>,
12912
12913        request: ::fidl_next::Request<___T, node::SetFlags>,
12914
12915        responder: ::fidl_next::Responder<node::SetFlags>,
12916    );
12917
12918    #[doc = " Query the filesystem for filesystem-specific information.\n"]
12919    fn query_filesystem(
12920        &mut self,
12921        sender: &::fidl_next::ServerSender<___T, Node>,
12922
12923        responder: ::fidl_next::Responder<node::QueryFilesystem>,
12924    );
12925
12926    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12927    fn get_attributes(
12928        &mut self,
12929        sender: &::fidl_next::ServerSender<___T, Node>,
12930
12931        request: ::fidl_next::Request<___T, node::GetAttributes>,
12932
12933        responder: ::fidl_next::Responder<node::GetAttributes>,
12934    );
12935
12936    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12937    fn update_attributes(
12938        &mut self,
12939        sender: &::fidl_next::ServerSender<___T, Node>,
12940
12941        request: ::fidl_next::Request<___T, node::UpdateAttributes>,
12942
12943        responder: ::fidl_next::Responder<node::UpdateAttributes>,
12944    );
12945
12946    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
12947    fn sync(
12948        &mut self,
12949        sender: &::fidl_next::ServerSender<___T, Node>,
12950
12951        responder: ::fidl_next::Responder<node::Sync>,
12952    );
12953
12954    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12955    fn list_extended_attributes(
12956        &mut self,
12957        sender: &::fidl_next::ServerSender<___T, Node>,
12958
12959        request: ::fidl_next::Request<___T, node::ListExtendedAttributes>,
12960    );
12961
12962    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12963    fn get_extended_attribute(
12964        &mut self,
12965        sender: &::fidl_next::ServerSender<___T, Node>,
12966
12967        request: ::fidl_next::Request<___T, node::GetExtendedAttribute>,
12968
12969        responder: ::fidl_next::Responder<node::GetExtendedAttribute>,
12970    );
12971
12972    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12973    fn set_extended_attribute(
12974        &mut self,
12975        sender: &::fidl_next::ServerSender<___T, Node>,
12976
12977        request: ::fidl_next::Request<___T, node::SetExtendedAttribute>,
12978
12979        responder: ::fidl_next::Responder<node::SetExtendedAttribute>,
12980    );
12981
12982    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12983    fn remove_extended_attribute(
12984        &mut self,
12985        sender: &::fidl_next::ServerSender<___T, Node>,
12986
12987        request: ::fidl_next::Request<___T, node::RemoveExtendedAttribute>,
12988
12989        responder: ::fidl_next::Responder<node::RemoveExtendedAttribute>,
12990    );
12991
12992    fn on_unknown_interaction(
12993        &mut self,
12994        sender: &::fidl_next::ServerSender<___T, Node>,
12995        ordinal: u64,
12996    ) {
12997        sender.close();
12998    }
12999}
13000
13001impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Node
13002where
13003    ___T: ::fidl_next::Transport,
13004    ___H: NodeServerHandler<___T>,
13005
13006    <node::Clone as ::fidl_next::Method>::Request:
13007        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13008
13009    <node::DeprecatedClone as ::fidl_next::Method>::Request:
13010        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13011
13012    <node::DeprecatedSetAttr as ::fidl_next::Method>::Request:
13013        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13014
13015    <node::DeprecatedSetFlags as ::fidl_next::Method>::Request:
13016        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13017
13018    <node::SetFlags as ::fidl_next::Method>::Request:
13019        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13020
13021    <node::GetAttributes as ::fidl_next::Method>::Request:
13022        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13023
13024    <node::UpdateAttributes as ::fidl_next::Method>::Request:
13025        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13026
13027    <node::ListExtendedAttributes as ::fidl_next::Method>::Request:
13028        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13029
13030    <node::GetExtendedAttribute as ::fidl_next::Method>::Request:
13031        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13032
13033    <node::SetExtendedAttribute as ::fidl_next::Method>::Request:
13034        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13035
13036    <node::RemoveExtendedAttribute as ::fidl_next::Method>::Request:
13037        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13038{
13039    fn on_one_way(
13040        handler: &mut ___H,
13041        sender: &::fidl_next::ServerSender<___T, Self>,
13042        ordinal: u64,
13043        buffer: ___T::RecvBuffer,
13044    ) {
13045        match ordinal {
13046            2366825959783828089 => match ::fidl_next::DecoderExt::decode(buffer) {
13047                Ok(decoded) => handler.clone(sender, decoded),
13048                Err(e) => {
13049                    sender.close();
13050                }
13051            },
13052
13053            6512600400724287855 => match ::fidl_next::DecoderExt::decode(buffer) {
13054                Ok(decoded) => handler.deprecated_clone(sender, decoded),
13055                Err(e) => {
13056                    sender.close();
13057                }
13058            },
13059
13060            5431626189872037072 => match ::fidl_next::DecoderExt::decode(buffer) {
13061                Ok(decoded) => handler.list_extended_attributes(sender, decoded),
13062                Err(e) => {
13063                    sender.close();
13064                }
13065            },
13066
13067            ordinal => handler.on_unknown_interaction(sender, ordinal),
13068        }
13069    }
13070
13071    fn on_two_way(
13072        handler: &mut ___H,
13073        sender: &::fidl_next::ServerSender<___T, Self>,
13074        ordinal: u64,
13075        buffer: ___T::RecvBuffer,
13076        responder: ::fidl_next::protocol::Responder,
13077    ) {
13078        match ordinal {
13079            6540867515453498750 => {
13080                let responder = ::fidl_next::Responder::from_untyped(responder);
13081
13082                handler.close(sender, responder);
13083            }
13084
13085            2763219980499352582 => {
13086                let responder = ::fidl_next::Responder::from_untyped(responder);
13087
13088                handler.query(sender, responder);
13089            }
13090
13091            8689798978500614909 => {
13092                let responder = ::fidl_next::Responder::from_untyped(responder);
13093
13094                handler.deprecated_get_attr(sender, responder);
13095            }
13096
13097            4721673413776871238 => {
13098                let responder = ::fidl_next::Responder::from_untyped(responder);
13099
13100                match ::fidl_next::DecoderExt::decode(buffer) {
13101                    Ok(decoded) => handler.deprecated_set_attr(sender, decoded, responder),
13102                    Err(e) => {
13103                        sender.close();
13104                    }
13105                }
13106            }
13107
13108            6595803110182632097 => {
13109                let responder = ::fidl_next::Responder::from_untyped(responder);
13110
13111                handler.deprecated_get_flags(sender, responder);
13112            }
13113
13114            5950864159036794675 => {
13115                let responder = ::fidl_next::Responder::from_untyped(responder);
13116
13117                match ::fidl_next::DecoderExt::decode(buffer) {
13118                    Ok(decoded) => handler.deprecated_set_flags(sender, decoded, responder),
13119                    Err(e) => {
13120                        sender.close();
13121                    }
13122                }
13123            }
13124
13125            105530239381466147 => {
13126                let responder = ::fidl_next::Responder::from_untyped(responder);
13127
13128                handler.get_flags(sender, responder);
13129            }
13130
13131            6172186066099445416 => {
13132                let responder = ::fidl_next::Responder::from_untyped(responder);
13133
13134                match ::fidl_next::DecoderExt::decode(buffer) {
13135                    Ok(decoded) => handler.set_flags(sender, decoded, responder),
13136                    Err(e) => {
13137                        sender.close();
13138                    }
13139                }
13140            }
13141
13142            8013111122914313744 => {
13143                let responder = ::fidl_next::Responder::from_untyped(responder);
13144
13145                handler.query_filesystem(sender, responder);
13146            }
13147
13148            4414537700416816443 => {
13149                let responder = ::fidl_next::Responder::from_untyped(responder);
13150
13151                match ::fidl_next::DecoderExt::decode(buffer) {
13152                    Ok(decoded) => handler.get_attributes(sender, decoded, responder),
13153                    Err(e) => {
13154                        sender.close();
13155                    }
13156                }
13157            }
13158
13159            3677402239314018056 => {
13160                let responder = ::fidl_next::Responder::from_untyped(responder);
13161
13162                match ::fidl_next::DecoderExt::decode(buffer) {
13163                    Ok(decoded) => handler.update_attributes(sender, decoded, responder),
13164                    Err(e) => {
13165                        sender.close();
13166                    }
13167                }
13168            }
13169
13170            3196473584242777161 => {
13171                let responder = ::fidl_next::Responder::from_untyped(responder);
13172
13173                handler.sync(sender, responder);
13174            }
13175
13176            5043930208506967771 => {
13177                let responder = ::fidl_next::Responder::from_untyped(responder);
13178
13179                match ::fidl_next::DecoderExt::decode(buffer) {
13180                    Ok(decoded) => handler.get_extended_attribute(sender, decoded, responder),
13181                    Err(e) => {
13182                        sender.close();
13183                    }
13184                }
13185            }
13186
13187            5374223046099989052 => {
13188                let responder = ::fidl_next::Responder::from_untyped(responder);
13189
13190                match ::fidl_next::DecoderExt::decode(buffer) {
13191                    Ok(decoded) => handler.set_extended_attribute(sender, decoded, responder),
13192                    Err(e) => {
13193                        sender.close();
13194                    }
13195                }
13196            }
13197
13198            8794297771444732717 => {
13199                let responder = ::fidl_next::Responder::from_untyped(responder);
13200
13201                match ::fidl_next::DecoderExt::decode(buffer) {
13202                    Ok(decoded) => handler.remove_extended_attribute(sender, decoded, responder),
13203                    Err(e) => {
13204                        sender.close();
13205                    }
13206                }
13207            }
13208
13209            ordinal => handler.on_unknown_interaction(sender, ordinal),
13210        }
13211    }
13212}
13213
13214#[derive(Debug)]
13215pub struct DirectoryDeprecatedOpenRequest {
13216    pub flags: crate::OpenFlags,
13217
13218    pub mode: crate::ModeType,
13219
13220    pub path: String,
13221
13222    pub object: ::fidl_next::ServerEnd<::fidl_next::fuchsia::zx::Channel, crate::Node>,
13223}
13224
13225impl ::fidl_next::Encodable for DirectoryDeprecatedOpenRequest {
13226    type Encoded = WireDirectoryDeprecatedOpenRequest<'static>;
13227}
13228
13229unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryDeprecatedOpenRequest
13230where
13231    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
13232
13233    ___E: ::fidl_next::Encoder,
13234
13235    ___E: ::fidl_next::fuchsia::HandleEncoder,
13236{
13237    #[inline]
13238    fn encode(
13239        self,
13240        encoder: &mut ___E,
13241        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13242    ) -> Result<(), ::fidl_next::EncodeError> {
13243        ::fidl_next::munge! {
13244            let Self::Encoded {
13245                flags,
13246                mode,
13247                path,
13248                object,
13249
13250            } = out;
13251        }
13252
13253        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
13254
13255        ::fidl_next::Encode::encode(self.mode, encoder, mode)?;
13256
13257        ::fidl_next::Encode::encode(self.path, encoder, path)?;
13258
13259        ::fidl_next::Encode::encode(self.object, encoder, object)?;
13260
13261        Ok(())
13262    }
13263}
13264
13265impl ::fidl_next::EncodableOption for DirectoryDeprecatedOpenRequest {
13266    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryDeprecatedOpenRequest<'static>>;
13267}
13268
13269unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryDeprecatedOpenRequest
13270where
13271    ___E: ::fidl_next::Encoder + ?Sized,
13272    DirectoryDeprecatedOpenRequest: ::fidl_next::Encode<___E>,
13273{
13274    #[inline]
13275    fn encode_option(
13276        this: Option<Self>,
13277        encoder: &mut ___E,
13278        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
13279    ) -> Result<(), ::fidl_next::EncodeError> {
13280        if let Some(inner) = this {
13281            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
13282            ::fidl_next::WireBox::encode_present(out);
13283        } else {
13284            ::fidl_next::WireBox::encode_absent(out);
13285        }
13286
13287        Ok(())
13288    }
13289}
13290
13291impl<'de> ::fidl_next::FromWire<WireDirectoryDeprecatedOpenRequest<'de>>
13292    for DirectoryDeprecatedOpenRequest
13293{
13294    #[inline]
13295    fn from_wire(wire: WireDirectoryDeprecatedOpenRequest<'de>) -> Self {
13296        Self {
13297            flags: ::fidl_next::FromWire::from_wire(wire.flags),
13298
13299            mode: ::fidl_next::FromWire::from_wire(wire.mode),
13300
13301            path: ::fidl_next::FromWire::from_wire(wire.path),
13302
13303            object: ::fidl_next::FromWire::from_wire(wire.object),
13304        }
13305    }
13306}
13307
13308/// The wire type corresponding to [`DirectoryDeprecatedOpenRequest`].
13309#[derive(Debug)]
13310#[repr(C)]
13311pub struct WireDirectoryDeprecatedOpenRequest<'de> {
13312    pub flags: crate::WireOpenFlags,
13313
13314    pub mode: crate::WireModeType,
13315
13316    pub path: ::fidl_next::WireString<'de>,
13317
13318    pub object: ::fidl_next::ServerEnd<::fidl_next::fuchsia::WireChannel, crate::Node>,
13319}
13320
13321unsafe impl ::fidl_next::Wire for WireDirectoryDeprecatedOpenRequest<'static> {
13322    type Decoded<'de> = WireDirectoryDeprecatedOpenRequest<'de>;
13323
13324    #[inline]
13325    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13326        unsafe {
13327            out.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
13328        }
13329    }
13330}
13331
13332unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryDeprecatedOpenRequest<'static>
13333where
13334    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13335
13336    ___D: ::fidl_next::Decoder,
13337
13338    ___D: ::fidl_next::fuchsia::HandleDecoder,
13339{
13340    fn decode(
13341        slot: ::fidl_next::Slot<'_, Self>,
13342        decoder: &mut ___D,
13343    ) -> Result<(), ::fidl_next::DecodeError> {
13344        ::fidl_next::munge! {
13345            let Self {
13346                mut flags,
13347                mut mode,
13348                mut path,
13349                mut object,
13350
13351            } = slot;
13352        }
13353
13354        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
13355
13356        ::fidl_next::Decode::decode(mode.as_mut(), decoder)?;
13357
13358        ::fidl_next::Decode::decode(path.as_mut(), decoder)?;
13359
13360        let path = unsafe { path.deref_unchecked() };
13361
13362        if path.len() > 4095 {
13363            return Err(::fidl_next::DecodeError::VectorTooLong {
13364                size: path.len() as u64,
13365                limit: 4095,
13366            });
13367        }
13368
13369        ::fidl_next::Decode::decode(object.as_mut(), decoder)?;
13370
13371        Ok(())
13372    }
13373}
13374
13375#[doc = " Options which can be used when opening nodes. Unlike [`Flags`], these options are designed for\n specific use cases (e.g. to reduce round-trip latency when requesting attributes).\n"]
13376#[derive(Clone, Debug, Default)]
13377pub struct Options {
13378    pub attributes: Option<crate::NodeAttributesQuery>,
13379
13380    pub create_attributes: Option<crate::MutableNodeAttributes>,
13381}
13382
13383impl Options {
13384    fn __max_ordinal(&self) -> usize {
13385        if self.create_attributes.is_some() {
13386            return 2;
13387        }
13388
13389        if self.attributes.is_some() {
13390            return 1;
13391        }
13392
13393        0
13394    }
13395}
13396
13397impl ::fidl_next::Encodable for Options {
13398    type Encoded = WireOptions<'static>;
13399}
13400
13401unsafe impl<___E> ::fidl_next::Encode<___E> for Options
13402where
13403    ___E: ::fidl_next::Encoder + ?Sized,
13404{
13405    #[inline]
13406    fn encode(
13407        mut self,
13408        encoder: &mut ___E,
13409        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13410    ) -> Result<(), ::fidl_next::EncodeError> {
13411        ::fidl_next::munge!(let WireOptions { table } = out);
13412
13413        let max_ord = self.__max_ordinal();
13414
13415        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
13416        ::fidl_next::Wire::zero_padding(&mut out);
13417
13418        let mut preallocated =
13419            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
13420
13421        for i in 1..=max_ord {
13422            match i {
13423                2 => {
13424                    if let Some(create_attributes) = self.create_attributes.take() {
13425                        ::fidl_next::WireEnvelope::encode_value(
13426                            create_attributes,
13427                            preallocated.encoder,
13428                            &mut out,
13429                        )?;
13430                    } else {
13431                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
13432                    }
13433                }
13434
13435                1 => {
13436                    if let Some(attributes) = self.attributes.take() {
13437                        ::fidl_next::WireEnvelope::encode_value(
13438                            attributes,
13439                            preallocated.encoder,
13440                            &mut out,
13441                        )?;
13442                    } else {
13443                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
13444                    }
13445                }
13446
13447                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
13448            }
13449            unsafe {
13450                preallocated.write_next(out.assume_init_ref());
13451            }
13452        }
13453
13454        ::fidl_next::WireTable::encode_len(table, max_ord);
13455
13456        Ok(())
13457    }
13458}
13459
13460unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Options
13461where
13462    ___E: ::fidl_next::Encoder + ?Sized,
13463{
13464    #[inline]
13465    fn encode_ref(
13466        &self,
13467        encoder: &mut ___E,
13468        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13469    ) -> Result<(), ::fidl_next::EncodeError> {
13470        ::fidl_next::munge!(let WireOptions { table } = out);
13471
13472        let max_ord = self.__max_ordinal();
13473
13474        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
13475        ::fidl_next::Wire::zero_padding(&mut out);
13476
13477        let mut preallocated =
13478            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
13479
13480        for i in 1..=max_ord {
13481            match i {
13482                2 => {
13483                    if let Some(create_attributes) = &self.create_attributes {
13484                        ::fidl_next::WireEnvelope::encode_value(
13485                            create_attributes,
13486                            preallocated.encoder,
13487                            &mut out,
13488                        )?;
13489                    } else {
13490                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
13491                    }
13492                }
13493
13494                1 => {
13495                    if let Some(attributes) = &self.attributes {
13496                        ::fidl_next::WireEnvelope::encode_value(
13497                            attributes,
13498                            preallocated.encoder,
13499                            &mut out,
13500                        )?;
13501                    } else {
13502                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
13503                    }
13504                }
13505
13506                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
13507            }
13508            unsafe {
13509                preallocated.write_next(out.assume_init_ref());
13510            }
13511        }
13512
13513        ::fidl_next::WireTable::encode_len(table, max_ord);
13514
13515        Ok(())
13516    }
13517}
13518
13519impl<'de> ::fidl_next::FromWire<WireOptions<'de>> for Options {
13520    #[inline]
13521    fn from_wire(wire: WireOptions<'de>) -> Self {
13522        let wire = ::core::mem::ManuallyDrop::new(wire);
13523
13524        let attributes = wire.table.get(1);
13525
13526        let create_attributes = wire.table.get(2);
13527
13528        Self {
13529            attributes: attributes.map(|envelope| {
13530                ::fidl_next::FromWire::from_wire(unsafe {
13531                    envelope.read_unchecked::<crate::WireNodeAttributesQuery>()
13532                })
13533            }),
13534
13535            create_attributes: create_attributes.map(|envelope| {
13536                ::fidl_next::FromWire::from_wire(unsafe {
13537                    envelope.read_unchecked::<crate::WireMutableNodeAttributes<'de>>()
13538                })
13539            }),
13540        }
13541    }
13542}
13543
13544impl<'de> ::fidl_next::FromWireRef<WireOptions<'de>> for Options {
13545    #[inline]
13546    fn from_wire_ref(wire: &WireOptions<'de>) -> Self {
13547        Self {
13548            attributes: wire.table.get(1).map(|envelope| {
13549                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
13550                    envelope.deref_unchecked::<crate::WireNodeAttributesQuery>()
13551                })
13552            }),
13553
13554            create_attributes: wire.table.get(2).map(|envelope| {
13555                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
13556                    envelope.deref_unchecked::<crate::WireMutableNodeAttributes<'de>>()
13557                })
13558            }),
13559        }
13560    }
13561}
13562
13563/// The wire type corresponding to [`Options`].
13564#[repr(C)]
13565pub struct WireOptions<'de> {
13566    table: ::fidl_next::WireTable<'de>,
13567}
13568
13569impl<'de> Drop for WireOptions<'de> {
13570    fn drop(&mut self) {
13571        let _ = self
13572            .table
13573            .get(1)
13574            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireNodeAttributesQuery>() });
13575
13576        let _ = self.table.get(2).map(|envelope| unsafe {
13577            envelope.read_unchecked::<crate::WireMutableNodeAttributes<'de>>()
13578        });
13579    }
13580}
13581
13582unsafe impl ::fidl_next::Wire for WireOptions<'static> {
13583    type Decoded<'de> = WireOptions<'de>;
13584
13585    #[inline]
13586    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13587        ::fidl_next::munge!(let Self { table } = out);
13588        ::fidl_next::WireTable::zero_padding(table);
13589    }
13590}
13591
13592unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptions<'static>
13593where
13594    ___D: ::fidl_next::Decoder + ?Sized,
13595{
13596    fn decode(
13597        slot: ::fidl_next::Slot<'_, Self>,
13598        decoder: &mut ___D,
13599    ) -> Result<(), ::fidl_next::DecodeError> {
13600        ::fidl_next::munge!(let Self { table } = slot);
13601
13602        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13603            match ordinal {
13604                0 => unsafe { ::core::hint::unreachable_unchecked() },
13605
13606                1 => {
13607                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireNodeAttributesQuery>(
13608                        slot.as_mut(),
13609                        decoder,
13610                    )?;
13611
13612                    Ok(())
13613                }
13614
13615                2 => {
13616                    ::fidl_next::WireEnvelope::decode_as::<
13617                        ___D,
13618                        crate::WireMutableNodeAttributes<'static>,
13619                    >(slot.as_mut(), decoder)?;
13620
13621                    Ok(())
13622                }
13623
13624                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
13625            }
13626        })
13627    }
13628}
13629
13630impl<'de> WireOptions<'de> {
13631    pub fn attributes(&self) -> Option<&crate::WireNodeAttributesQuery> {
13632        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13633    }
13634
13635    pub fn create_attributes(&self) -> Option<&crate::WireMutableNodeAttributes<'de>> {
13636        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13637    }
13638}
13639
13640impl<'de> ::core::fmt::Debug for WireOptions<'de> {
13641    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
13642        f.debug_struct("Options")
13643            .field("attributes", &self.attributes())
13644            .field("create_attributes", &self.create_attributes())
13645            .finish()
13646    }
13647}
13648
13649#[derive(Debug)]
13650pub struct DirectoryOpenRequest {
13651    pub path: String,
13652
13653    pub flags: crate::Flags,
13654
13655    pub options: crate::Options,
13656
13657    pub object: ::fidl_next::fuchsia::zx::Handle,
13658}
13659
13660impl ::fidl_next::Encodable for DirectoryOpenRequest {
13661    type Encoded = WireDirectoryOpenRequest<'static>;
13662}
13663
13664unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryOpenRequest
13665where
13666    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
13667
13668    ___E: ::fidl_next::Encoder,
13669
13670    ___E: ::fidl_next::fuchsia::HandleEncoder,
13671{
13672    #[inline]
13673    fn encode(
13674        self,
13675        encoder: &mut ___E,
13676        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13677    ) -> Result<(), ::fidl_next::EncodeError> {
13678        ::fidl_next::munge! {
13679            let Self::Encoded {
13680                path,
13681                flags,
13682                options,
13683                object,
13684
13685            } = out;
13686        }
13687
13688        ::fidl_next::Encode::encode(self.path, encoder, path)?;
13689
13690        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
13691
13692        ::fidl_next::Encode::encode(self.options, encoder, options)?;
13693
13694        ::fidl_next::Encode::encode(self.object, encoder, object)?;
13695
13696        Ok(())
13697    }
13698}
13699
13700impl ::fidl_next::EncodableOption for DirectoryOpenRequest {
13701    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryOpenRequest<'static>>;
13702}
13703
13704unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryOpenRequest
13705where
13706    ___E: ::fidl_next::Encoder + ?Sized,
13707    DirectoryOpenRequest: ::fidl_next::Encode<___E>,
13708{
13709    #[inline]
13710    fn encode_option(
13711        this: Option<Self>,
13712        encoder: &mut ___E,
13713        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
13714    ) -> Result<(), ::fidl_next::EncodeError> {
13715        if let Some(inner) = this {
13716            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
13717            ::fidl_next::WireBox::encode_present(out);
13718        } else {
13719            ::fidl_next::WireBox::encode_absent(out);
13720        }
13721
13722        Ok(())
13723    }
13724}
13725
13726impl<'de> ::fidl_next::FromWire<WireDirectoryOpenRequest<'de>> for DirectoryOpenRequest {
13727    #[inline]
13728    fn from_wire(wire: WireDirectoryOpenRequest<'de>) -> Self {
13729        Self {
13730            path: ::fidl_next::FromWire::from_wire(wire.path),
13731
13732            flags: ::fidl_next::FromWire::from_wire(wire.flags),
13733
13734            options: ::fidl_next::FromWire::from_wire(wire.options),
13735
13736            object: ::fidl_next::FromWire::from_wire(wire.object),
13737        }
13738    }
13739}
13740
13741/// The wire type corresponding to [`DirectoryOpenRequest`].
13742#[derive(Debug)]
13743#[repr(C)]
13744pub struct WireDirectoryOpenRequest<'de> {
13745    pub path: ::fidl_next::WireString<'de>,
13746
13747    pub flags: crate::WireFlags,
13748
13749    pub options: crate::WireOptions<'de>,
13750
13751    pub object: ::fidl_next::fuchsia::WireHandle,
13752}
13753
13754unsafe impl ::fidl_next::Wire for WireDirectoryOpenRequest<'static> {
13755    type Decoded<'de> = WireDirectoryOpenRequest<'de>;
13756
13757    #[inline]
13758    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13759        unsafe {
13760            out.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
13761        }
13762    }
13763}
13764
13765unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryOpenRequest<'static>
13766where
13767    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13768
13769    ___D: ::fidl_next::Decoder,
13770
13771    ___D: ::fidl_next::fuchsia::HandleDecoder,
13772{
13773    fn decode(
13774        slot: ::fidl_next::Slot<'_, Self>,
13775        decoder: &mut ___D,
13776    ) -> Result<(), ::fidl_next::DecodeError> {
13777        ::fidl_next::munge! {
13778            let Self {
13779                mut path,
13780                mut flags,
13781                mut options,
13782                mut object,
13783
13784            } = slot;
13785        }
13786
13787        ::fidl_next::Decode::decode(path.as_mut(), decoder)?;
13788
13789        let path = unsafe { path.deref_unchecked() };
13790
13791        if path.len() > 4095 {
13792            return Err(::fidl_next::DecodeError::VectorTooLong {
13793                size: path.len() as u64,
13794                limit: 4095,
13795            });
13796        }
13797
13798        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
13799
13800        ::fidl_next::Decode::decode(options.as_mut(), decoder)?;
13801
13802        ::fidl_next::Decode::decode(object.as_mut(), decoder)?;
13803
13804        Ok(())
13805    }
13806}
13807
13808#[derive(Debug)]
13809pub struct DirectoryCreateSymlinkRequest {
13810    pub name: String,
13811
13812    pub target: Vec<u8>,
13813
13814    pub connection:
13815        ::fidl_next::ServerEnd<Option<::fidl_next::fuchsia::zx::Channel>, crate::Symlink>,
13816}
13817
13818impl ::fidl_next::Encodable for DirectoryCreateSymlinkRequest {
13819    type Encoded = WireDirectoryCreateSymlinkRequest<'static>;
13820}
13821
13822unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryCreateSymlinkRequest
13823where
13824    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
13825
13826    ___E: ::fidl_next::Encoder,
13827
13828    ___E: ::fidl_next::fuchsia::HandleEncoder,
13829{
13830    #[inline]
13831    fn encode(
13832        self,
13833        encoder: &mut ___E,
13834        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13835    ) -> Result<(), ::fidl_next::EncodeError> {
13836        ::fidl_next::munge! {
13837            let Self::Encoded {
13838                name,
13839                target,
13840                connection,
13841
13842            } = out;
13843        }
13844
13845        ::fidl_next::Encode::encode(self.name, encoder, name)?;
13846
13847        ::fidl_next::Encode::encode(self.target, encoder, target)?;
13848
13849        ::fidl_next::Encode::encode(self.connection, encoder, connection)?;
13850
13851        Ok(())
13852    }
13853}
13854
13855impl ::fidl_next::EncodableOption for DirectoryCreateSymlinkRequest {
13856    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryCreateSymlinkRequest<'static>>;
13857}
13858
13859unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryCreateSymlinkRequest
13860where
13861    ___E: ::fidl_next::Encoder + ?Sized,
13862    DirectoryCreateSymlinkRequest: ::fidl_next::Encode<___E>,
13863{
13864    #[inline]
13865    fn encode_option(
13866        this: Option<Self>,
13867        encoder: &mut ___E,
13868        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
13869    ) -> Result<(), ::fidl_next::EncodeError> {
13870        if let Some(inner) = this {
13871            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
13872            ::fidl_next::WireBox::encode_present(out);
13873        } else {
13874            ::fidl_next::WireBox::encode_absent(out);
13875        }
13876
13877        Ok(())
13878    }
13879}
13880
13881impl<'de> ::fidl_next::FromWire<WireDirectoryCreateSymlinkRequest<'de>>
13882    for DirectoryCreateSymlinkRequest
13883{
13884    #[inline]
13885    fn from_wire(wire: WireDirectoryCreateSymlinkRequest<'de>) -> Self {
13886        Self {
13887            name: ::fidl_next::FromWire::from_wire(wire.name),
13888
13889            target: ::fidl_next::FromWire::from_wire(wire.target),
13890
13891            connection: ::fidl_next::FromWire::from_wire(wire.connection),
13892        }
13893    }
13894}
13895
13896/// The wire type corresponding to [`DirectoryCreateSymlinkRequest`].
13897#[derive(Debug)]
13898#[repr(C)]
13899pub struct WireDirectoryCreateSymlinkRequest<'de> {
13900    pub name: ::fidl_next::WireString<'de>,
13901
13902    pub target: ::fidl_next::WireVector<'de, u8>,
13903
13904    pub connection:
13905        ::fidl_next::ServerEnd<::fidl_next::fuchsia::WireOptionalChannel, crate::Symlink>,
13906}
13907
13908unsafe impl ::fidl_next::Wire for WireDirectoryCreateSymlinkRequest<'static> {
13909    type Decoded<'de> = WireDirectoryCreateSymlinkRequest<'de>;
13910
13911    #[inline]
13912    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13913        unsafe {
13914            out.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
13915        }
13916    }
13917}
13918
13919unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryCreateSymlinkRequest<'static>
13920where
13921    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13922
13923    ___D: ::fidl_next::Decoder,
13924
13925    ___D: ::fidl_next::fuchsia::HandleDecoder,
13926{
13927    fn decode(
13928        slot: ::fidl_next::Slot<'_, Self>,
13929        decoder: &mut ___D,
13930    ) -> Result<(), ::fidl_next::DecodeError> {
13931        ::fidl_next::munge! {
13932            let Self {
13933                mut name,
13934                mut target,
13935                mut connection,
13936
13937            } = slot;
13938        }
13939
13940        ::fidl_next::Decode::decode(name.as_mut(), decoder)?;
13941
13942        let name = unsafe { name.deref_unchecked() };
13943
13944        if name.len() > 255 {
13945            return Err(::fidl_next::DecodeError::VectorTooLong {
13946                size: name.len() as u64,
13947                limit: 255,
13948            });
13949        }
13950
13951        ::fidl_next::Decode::decode(target.as_mut(), decoder)?;
13952
13953        let target = unsafe { target.deref_unchecked() };
13954
13955        if target.len() > 4095 {
13956            return Err(::fidl_next::DecodeError::VectorTooLong {
13957                size: target.len() as u64,
13958                limit: 4095,
13959            });
13960        }
13961
13962        ::fidl_next::Decode::decode(connection.as_mut(), decoder)?;
13963
13964        Ok(())
13965    }
13966}
13967
13968/// The type corresponding to the Directory protocol.
13969#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
13970#[derive(Debug)]
13971pub struct Directory;
13972
13973impl ::fidl_next::Discoverable for Directory {
13974    const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
13975}
13976
13977pub mod directory {
13978    pub mod prelude {
13979        pub use crate::{
13980            directory, Directory, DirectoryClientHandler, DirectoryClientSender,
13981            DirectoryServerHandler, DirectoryServerSender,
13982        };
13983
13984        pub use crate::AdvisoryLockingAdvisoryLockRequest;
13985
13986        pub use crate::AdvisoryLockingAdvisoryLockResponse;
13987
13988        pub use crate::DirectoryCreateSymlinkRequest;
13989
13990        pub use crate::DirectoryDeprecatedOpenRequest;
13991
13992        pub use crate::DirectoryGetTokenResponse;
13993
13994        pub use crate::DirectoryLinkRequest;
13995
13996        pub use crate::DirectoryLinkResponse;
13997
13998        pub use crate::DirectoryOpenRequest;
13999
14000        pub use crate::DirectoryReadDirentsRequest;
14001
14002        pub use crate::DirectoryReadDirentsResponse;
14003
14004        pub use crate::DirectoryRenameRequest;
14005
14006        pub use crate::DirectoryRewindResponse;
14007
14008        pub use crate::DirectoryUnlinkRequest;
14009
14010        pub use crate::DirectoryWatchRequest;
14011
14012        pub use crate::DirectoryWatchResponse;
14013
14014        pub use crate::DirectoryCreateSymlinkResponse;
14015
14016        pub use crate::DirectoryRenameResponse;
14017
14018        pub use crate::DirectoryUnlinkResponse;
14019
14020        pub use crate::ExtendedAttributeValue;
14021
14022        pub use crate::MutableNodeAttributes;
14023
14024        pub use crate::NodeAttributes2;
14025
14026        pub use crate::NodeDeprecatedCloneRequest;
14027
14028        pub use crate::NodeDeprecatedGetAttrResponse;
14029
14030        pub use crate::NodeDeprecatedGetFlagsResponse;
14031
14032        pub use crate::NodeDeprecatedSetAttrRequest;
14033
14034        pub use crate::NodeDeprecatedSetAttrResponse;
14035
14036        pub use crate::NodeDeprecatedSetFlagsRequest;
14037
14038        pub use crate::NodeDeprecatedSetFlagsResponse;
14039
14040        pub use crate::NodeGetAttributesRequest;
14041
14042        pub use crate::NodeGetExtendedAttributeRequest;
14043
14044        pub use crate::NodeListExtendedAttributesRequest;
14045
14046        pub use crate::NodeOnOpenRequest;
14047
14048        pub use crate::NodeQueryFilesystemResponse;
14049
14050        pub use crate::NodeRemoveExtendedAttributeRequest;
14051
14052        pub use crate::NodeSetExtendedAttributeRequest;
14053
14054        pub use crate::NodeSetFlagsRequest;
14055
14056        pub use crate::NodeGetFlagsResponse;
14057
14058        pub use crate::NodeRemoveExtendedAttributeResponse;
14059
14060        pub use crate::NodeSetExtendedAttributeResponse;
14061
14062        pub use crate::NodeSetFlagsResponse;
14063
14064        pub use crate::NodeSyncResponse;
14065
14066        pub use crate::NodeUpdateAttributesResponse;
14067
14068        pub use crate::Representation;
14069
14070        pub use ::fidl_next_fuchsia_unknown::CloneableCloneRequest;
14071
14072        pub use ::fidl_next_fuchsia_unknown::CloseableCloseResponse;
14073
14074        pub use ::fidl_next_fuchsia_unknown::QueryableQueryResponse;
14075    }
14076
14077    pub struct AdvisoryLock;
14078
14079    impl ::fidl_next::Method for AdvisoryLock {
14080        const ORDINAL: u64 = 7992130864415541162;
14081
14082        type Protocol = crate::Directory;
14083
14084        type Request = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>;
14085
14086        type Response = ::fidl_next::WireResult<
14087            'static,
14088            crate::WireAdvisoryLockingAdvisoryLockResponse,
14089            ::fidl_next::WireI32,
14090        >;
14091    }
14092
14093    pub struct Clone;
14094
14095    impl ::fidl_next::Method for Clone {
14096        const ORDINAL: u64 = 2366825959783828089;
14097
14098        type Protocol = crate::Directory;
14099
14100        type Request = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest;
14101
14102        type Response = ::fidl_next::Never;
14103    }
14104
14105    pub struct Close;
14106
14107    impl ::fidl_next::Method for Close {
14108        const ORDINAL: u64 = 6540867515453498750;
14109
14110        type Protocol = crate::Directory;
14111
14112        type Request = ();
14113
14114        type Response = ::fidl_next::WireResult<
14115            'static,
14116            ::fidl_next_fuchsia_unknown::WireCloseableCloseResponse,
14117            ::fidl_next::WireI32,
14118        >;
14119    }
14120
14121    pub struct Query;
14122
14123    impl ::fidl_next::Method for Query {
14124        const ORDINAL: u64 = 2763219980499352582;
14125
14126        type Protocol = crate::Directory;
14127
14128        type Request = ();
14129
14130        type Response = ::fidl_next_fuchsia_unknown::WireQueryableQueryResponse<'static>;
14131    }
14132
14133    pub struct DeprecatedClone;
14134
14135    impl ::fidl_next::Method for DeprecatedClone {
14136        const ORDINAL: u64 = 6512600400724287855;
14137
14138        type Protocol = crate::Directory;
14139
14140        type Request = crate::WireNodeDeprecatedCloneRequest;
14141
14142        type Response = ::fidl_next::Never;
14143    }
14144
14145    pub struct OnOpen;
14146
14147    impl ::fidl_next::Method for OnOpen {
14148        const ORDINAL: u64 = 9207534335756671346;
14149
14150        type Protocol = crate::Directory;
14151
14152        type Request = ::fidl_next::Never;
14153
14154        type Response = crate::WireNodeOnOpenRequest<'static>;
14155    }
14156
14157    pub struct DeprecatedGetAttr;
14158
14159    impl ::fidl_next::Method for DeprecatedGetAttr {
14160        const ORDINAL: u64 = 8689798978500614909;
14161
14162        type Protocol = crate::Directory;
14163
14164        type Request = ();
14165
14166        type Response = crate::WireNodeDeprecatedGetAttrResponse;
14167    }
14168
14169    pub struct DeprecatedSetAttr;
14170
14171    impl ::fidl_next::Method for DeprecatedSetAttr {
14172        const ORDINAL: u64 = 4721673413776871238;
14173
14174        type Protocol = crate::Directory;
14175
14176        type Request = crate::WireNodeDeprecatedSetAttrRequest;
14177
14178        type Response = crate::WireNodeDeprecatedSetAttrResponse;
14179    }
14180
14181    pub struct DeprecatedGetFlags;
14182
14183    impl ::fidl_next::Method for DeprecatedGetFlags {
14184        const ORDINAL: u64 = 6595803110182632097;
14185
14186        type Protocol = crate::Directory;
14187
14188        type Request = ();
14189
14190        type Response = crate::WireNodeDeprecatedGetFlagsResponse;
14191    }
14192
14193    pub struct DeprecatedSetFlags;
14194
14195    impl ::fidl_next::Method for DeprecatedSetFlags {
14196        const ORDINAL: u64 = 5950864159036794675;
14197
14198        type Protocol = crate::Directory;
14199
14200        type Request = crate::WireNodeDeprecatedSetFlagsRequest;
14201
14202        type Response = crate::WireNodeDeprecatedSetFlagsResponse;
14203    }
14204
14205    pub struct GetFlags;
14206
14207    impl ::fidl_next::Method for GetFlags {
14208        const ORDINAL: u64 = 105530239381466147;
14209
14210        type Protocol = crate::Directory;
14211
14212        type Request = ();
14213
14214        type Response = ::fidl_next::WireFlexibleResult<
14215            'static,
14216            crate::WireNodeGetFlagsResponse,
14217            ::fidl_next::WireI32,
14218        >;
14219    }
14220
14221    pub struct SetFlags;
14222
14223    impl ::fidl_next::Method for SetFlags {
14224        const ORDINAL: u64 = 6172186066099445416;
14225
14226        type Protocol = crate::Directory;
14227
14228        type Request = crate::WireNodeSetFlagsRequest;
14229
14230        type Response = ::fidl_next::WireFlexibleResult<
14231            'static,
14232            crate::WireNodeSetFlagsResponse,
14233            ::fidl_next::WireI32,
14234        >;
14235    }
14236
14237    pub struct QueryFilesystem;
14238
14239    impl ::fidl_next::Method for QueryFilesystem {
14240        const ORDINAL: u64 = 8013111122914313744;
14241
14242        type Protocol = crate::Directory;
14243
14244        type Request = ();
14245
14246        type Response = crate::WireNodeQueryFilesystemResponse<'static>;
14247    }
14248
14249    pub struct OnRepresentation;
14250
14251    impl ::fidl_next::Method for OnRepresentation {
14252        const ORDINAL: u64 = 6679970090861613324;
14253
14254        type Protocol = crate::Directory;
14255
14256        type Request = ::fidl_next::Never;
14257
14258        type Response = crate::WireRepresentation<'static>;
14259    }
14260
14261    pub struct GetAttributes;
14262
14263    impl ::fidl_next::Method for GetAttributes {
14264        const ORDINAL: u64 = 4414537700416816443;
14265
14266        type Protocol = crate::Directory;
14267
14268        type Request = crate::WireNodeGetAttributesRequest;
14269
14270        type Response = ::fidl_next::WireResult<
14271            'static,
14272            crate::WireNodeAttributes2<'static>,
14273            ::fidl_next::WireI32,
14274        >;
14275    }
14276
14277    pub struct UpdateAttributes;
14278
14279    impl ::fidl_next::Method for UpdateAttributes {
14280        const ORDINAL: u64 = 3677402239314018056;
14281
14282        type Protocol = crate::Directory;
14283
14284        type Request = crate::WireMutableNodeAttributes<'static>;
14285
14286        type Response = ::fidl_next::WireResult<
14287            'static,
14288            crate::WireNodeUpdateAttributesResponse,
14289            ::fidl_next::WireI32,
14290        >;
14291    }
14292
14293    pub struct Sync;
14294
14295    impl ::fidl_next::Method for Sync {
14296        const ORDINAL: u64 = 3196473584242777161;
14297
14298        type Protocol = crate::Directory;
14299
14300        type Request = ();
14301
14302        type Response =
14303            ::fidl_next::WireResult<'static, crate::WireNodeSyncResponse, ::fidl_next::WireI32>;
14304    }
14305
14306    pub struct ListExtendedAttributes;
14307
14308    impl ::fidl_next::Method for ListExtendedAttributes {
14309        const ORDINAL: u64 = 5431626189872037072;
14310
14311        type Protocol = crate::Directory;
14312
14313        type Request = crate::WireNodeListExtendedAttributesRequest;
14314
14315        type Response = ::fidl_next::Never;
14316    }
14317
14318    pub struct GetExtendedAttribute;
14319
14320    impl ::fidl_next::Method for GetExtendedAttribute {
14321        const ORDINAL: u64 = 5043930208506967771;
14322
14323        type Protocol = crate::Directory;
14324
14325        type Request = crate::WireNodeGetExtendedAttributeRequest<'static>;
14326
14327        type Response = ::fidl_next::WireResult<
14328            'static,
14329            crate::WireExtendedAttributeValue<'static>,
14330            ::fidl_next::WireI32,
14331        >;
14332    }
14333
14334    pub struct SetExtendedAttribute;
14335
14336    impl ::fidl_next::Method for SetExtendedAttribute {
14337        const ORDINAL: u64 = 5374223046099989052;
14338
14339        type Protocol = crate::Directory;
14340
14341        type Request = crate::WireNodeSetExtendedAttributeRequest<'static>;
14342
14343        type Response = ::fidl_next::WireResult<
14344            'static,
14345            crate::WireNodeSetExtendedAttributeResponse,
14346            ::fidl_next::WireI32,
14347        >;
14348    }
14349
14350    pub struct RemoveExtendedAttribute;
14351
14352    impl ::fidl_next::Method for RemoveExtendedAttribute {
14353        const ORDINAL: u64 = 8794297771444732717;
14354
14355        type Protocol = crate::Directory;
14356
14357        type Request = crate::WireNodeRemoveExtendedAttributeRequest<'static>;
14358
14359        type Response = ::fidl_next::WireResult<
14360            'static,
14361            crate::WireNodeRemoveExtendedAttributeResponse,
14362            ::fidl_next::WireI32,
14363        >;
14364    }
14365
14366    pub struct DeprecatedOpen;
14367
14368    impl ::fidl_next::Method for DeprecatedOpen {
14369        const ORDINAL: u64 = 3193127272456937152;
14370
14371        type Protocol = crate::Directory;
14372
14373        type Request = crate::WireDirectoryDeprecatedOpenRequest<'static>;
14374
14375        type Response = ::fidl_next::Never;
14376    }
14377
14378    pub struct Open;
14379
14380    impl ::fidl_next::Method for Open {
14381        const ORDINAL: u64 = 6236883748953765593;
14382
14383        type Protocol = crate::Directory;
14384
14385        type Request = crate::WireDirectoryOpenRequest<'static>;
14386
14387        type Response = ::fidl_next::Never;
14388    }
14389
14390    pub struct ReadDirents;
14391
14392    impl ::fidl_next::Method for ReadDirents {
14393        const ORDINAL: u64 = 3855785432100874762;
14394
14395        type Protocol = crate::Directory;
14396
14397        type Request = crate::WireDirectoryReadDirentsRequest;
14398
14399        type Response = crate::WireDirectoryReadDirentsResponse<'static>;
14400    }
14401
14402    pub struct Rewind;
14403
14404    impl ::fidl_next::Method for Rewind {
14405        const ORDINAL: u64 = 1635123508515392625;
14406
14407        type Protocol = crate::Directory;
14408
14409        type Request = ();
14410
14411        type Response = crate::WireDirectoryRewindResponse;
14412    }
14413
14414    pub struct GetToken;
14415
14416    impl ::fidl_next::Method for GetToken {
14417        const ORDINAL: u64 = 2787337947777369685;
14418
14419        type Protocol = crate::Directory;
14420
14421        type Request = ();
14422
14423        type Response = crate::WireDirectoryGetTokenResponse;
14424    }
14425
14426    pub struct Link;
14427
14428    impl ::fidl_next::Method for Link {
14429        const ORDINAL: u64 = 8360374984291987687;
14430
14431        type Protocol = crate::Directory;
14432
14433        type Request = crate::WireDirectoryLinkRequest<'static>;
14434
14435        type Response = crate::WireDirectoryLinkResponse;
14436    }
14437
14438    pub struct Unlink;
14439
14440    impl ::fidl_next::Method for Unlink {
14441        const ORDINAL: u64 = 8433556716759383021;
14442
14443        type Protocol = crate::Directory;
14444
14445        type Request = crate::WireDirectoryUnlinkRequest<'static>;
14446
14447        type Response = ::fidl_next::WireResult<
14448            'static,
14449            crate::WireDirectoryUnlinkResponse,
14450            ::fidl_next::WireI32,
14451        >;
14452    }
14453
14454    pub struct Rename;
14455
14456    impl ::fidl_next::Method for Rename {
14457        const ORDINAL: u64 = 8097726607824333022;
14458
14459        type Protocol = crate::Directory;
14460
14461        type Request = crate::WireDirectoryRenameRequest<'static>;
14462
14463        type Response = ::fidl_next::WireResult<
14464            'static,
14465            crate::WireDirectoryRenameResponse,
14466            ::fidl_next::WireI32,
14467        >;
14468    }
14469
14470    pub struct CreateSymlink;
14471
14472    impl ::fidl_next::Method for CreateSymlink {
14473        const ORDINAL: u64 = 2435901052462315657;
14474
14475        type Protocol = crate::Directory;
14476
14477        type Request = crate::WireDirectoryCreateSymlinkRequest<'static>;
14478
14479        type Response = ::fidl_next::WireResult<
14480            'static,
14481            crate::WireDirectoryCreateSymlinkResponse,
14482            ::fidl_next::WireI32,
14483        >;
14484    }
14485
14486    pub struct Watch;
14487
14488    impl ::fidl_next::Method for Watch {
14489        const ORDINAL: u64 = 6275512344170098065;
14490
14491        type Protocol = crate::Directory;
14492
14493        type Request = crate::WireDirectoryWatchRequest;
14494
14495        type Response = crate::WireDirectoryWatchResponse;
14496    }
14497}
14498
14499/// A helper trait for the `Directory` client sender.
14500pub trait DirectoryClientSender {
14501    type Transport: ::fidl_next::Transport;
14502
14503    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
14504    fn advisory_lock<___R>(
14505        &self,
14506        request: ___R,
14507    ) -> Result<
14508        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::AdvisoryLock>,
14509        ::fidl_next::EncodeError,
14510    >
14511    where
14512        ___R: ::fidl_next::Encode<
14513            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14514            Encoded = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>,
14515        >;
14516
14517    fn clone<___R>(
14518        &self,
14519        request: ___R,
14520    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
14521    where
14522        ___R: ::fidl_next::Encode<
14523            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14524            Encoded = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest,
14525        >;
14526
14527    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
14528    fn close(
14529        &self,
14530    ) -> Result<
14531        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Close>,
14532        ::fidl_next::EncodeError,
14533    >;
14534
14535    fn query(
14536        &self,
14537    ) -> Result<
14538        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Query>,
14539        ::fidl_next::EncodeError,
14540    >;
14541
14542    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14543    fn deprecated_clone<___R>(
14544        &self,
14545        request: ___R,
14546    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
14547    where
14548        ___R: ::fidl_next::Encode<
14549            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14550            Encoded = crate::WireNodeDeprecatedCloneRequest,
14551        >;
14552
14553    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14554    fn deprecated_get_attr(
14555        &self,
14556    ) -> Result<
14557        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::DeprecatedGetAttr>,
14558        ::fidl_next::EncodeError,
14559    >;
14560
14561    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14562    fn deprecated_set_attr<___R>(
14563        &self,
14564        request: ___R,
14565    ) -> Result<
14566        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::DeprecatedSetAttr>,
14567        ::fidl_next::EncodeError,
14568    >
14569    where
14570        ___R: ::fidl_next::Encode<
14571            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14572            Encoded = crate::WireNodeDeprecatedSetAttrRequest,
14573        >;
14574
14575    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14576    fn deprecated_get_flags(
14577        &self,
14578    ) -> Result<
14579        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::DeprecatedGetFlags>,
14580        ::fidl_next::EncodeError,
14581    >;
14582
14583    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14584    fn deprecated_set_flags<___R>(
14585        &self,
14586        request: ___R,
14587    ) -> Result<
14588        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::DeprecatedSetFlags>,
14589        ::fidl_next::EncodeError,
14590    >
14591    where
14592        ___R: ::fidl_next::Encode<
14593            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14594            Encoded = crate::WireNodeDeprecatedSetFlagsRequest,
14595        >;
14596
14597    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
14598    fn get_flags(
14599        &self,
14600    ) -> Result<
14601        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::GetFlags>,
14602        ::fidl_next::EncodeError,
14603    >;
14604
14605    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
14606    fn set_flags<___R>(
14607        &self,
14608        request: ___R,
14609    ) -> Result<
14610        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::SetFlags>,
14611        ::fidl_next::EncodeError,
14612    >
14613    where
14614        ___R: ::fidl_next::Encode<
14615            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14616            Encoded = crate::WireNodeSetFlagsRequest,
14617        >;
14618
14619    #[doc = " Query the filesystem for filesystem-specific information.\n"]
14620    fn query_filesystem(
14621        &self,
14622    ) -> Result<
14623        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::QueryFilesystem>,
14624        ::fidl_next::EncodeError,
14625    >;
14626
14627    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14628    fn get_attributes<___R>(
14629        &self,
14630        request: ___R,
14631    ) -> Result<
14632        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::GetAttributes>,
14633        ::fidl_next::EncodeError,
14634    >
14635    where
14636        ___R: ::fidl_next::Encode<
14637            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14638            Encoded = crate::WireNodeGetAttributesRequest,
14639        >;
14640
14641    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14642    fn update_attributes<___R>(
14643        &self,
14644        request: ___R,
14645    ) -> Result<
14646        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::UpdateAttributes>,
14647        ::fidl_next::EncodeError,
14648    >
14649    where
14650        ___R: ::fidl_next::Encode<
14651            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14652            Encoded = crate::WireMutableNodeAttributes<'static>,
14653        >;
14654
14655    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
14656    fn sync(
14657        &self,
14658    ) -> Result<
14659        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Sync>,
14660        ::fidl_next::EncodeError,
14661    >;
14662
14663    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14664    fn list_extended_attributes<___R>(
14665        &self,
14666        request: ___R,
14667    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
14668    where
14669        ___R: ::fidl_next::Encode<
14670            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14671            Encoded = crate::WireNodeListExtendedAttributesRequest,
14672        >;
14673
14674    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14675    fn get_extended_attribute<___R>(
14676        &self,
14677        request: ___R,
14678    ) -> Result<
14679        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::GetExtendedAttribute>,
14680        ::fidl_next::EncodeError,
14681    >
14682    where
14683        ___R: ::fidl_next::Encode<
14684            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14685            Encoded = crate::WireNodeGetExtendedAttributeRequest<'static>,
14686        >;
14687
14688    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14689    fn set_extended_attribute<___R>(
14690        &self,
14691        request: ___R,
14692    ) -> Result<
14693        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::SetExtendedAttribute>,
14694        ::fidl_next::EncodeError,
14695    >
14696    where
14697        ___R: ::fidl_next::Encode<
14698            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14699            Encoded = crate::WireNodeSetExtendedAttributeRequest<'static>,
14700        >;
14701
14702    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14703    fn remove_extended_attribute<___R>(
14704        &self,
14705        request: ___R,
14706    ) -> Result<
14707        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::RemoveExtendedAttribute>,
14708        ::fidl_next::EncodeError,
14709    >
14710    where
14711        ___R: ::fidl_next::Encode<
14712            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14713            Encoded = crate::WireNodeRemoveExtendedAttributeRequest<'static>,
14714        >;
14715
14716    #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
14717    fn deprecated_open<___R>(
14718        &self,
14719        request: ___R,
14720    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
14721    where
14722        ___R: ::fidl_next::Encode<
14723            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14724            Encoded = crate::WireDirectoryDeprecatedOpenRequest<'static>,
14725        >;
14726
14727    #[doc = " Open (or create) a node relative to this directory. Any errors are communicated via an\n epitaph sent on the `object` channel.\n\n Errors:\n * `ZX_ERR_BAD_PATH` if `path` is invalid\n * See [`Flags`] for other errors which may be communicated based on `flags`\n"]
14728    fn open<___R>(
14729        &self,
14730        request: ___R,
14731    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
14732    where
14733        ___R: ::fidl_next::Encode<
14734            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14735            Encoded = crate::WireDirectoryOpenRequest<'static>,
14736        >;
14737
14738    #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n   // Describes the inode of the entry.\n   uint64 ino;\n   // Describes the length of the dirent name in bytes.\n   uint8 size;\n   // Describes the type of the entry. Aligned with the\n   // POSIX d_type values. Use `DirentType` constants.\n   uint8 type;\n   // Unterminated name of entry.\n   char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
14739    fn read_dirents<___R>(
14740        &self,
14741        request: ___R,
14742    ) -> Result<
14743        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::ReadDirents>,
14744        ::fidl_next::EncodeError,
14745    >
14746    where
14747        ___R: ::fidl_next::Encode<
14748            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14749            Encoded = crate::WireDirectoryReadDirentsRequest,
14750        >;
14751
14752    #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
14753    fn rewind(
14754        &self,
14755    ) -> Result<
14756        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Rewind>,
14757        ::fidl_next::EncodeError,
14758    >;
14759
14760    #[doc = " Acquires a token to a Directory which can be used to identify access to it at a later point\n in time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns\n `ZX_ERR_BAD_HANDLE`.\n"]
14761    fn get_token(
14762        &self,
14763    ) -> Result<
14764        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::GetToken>,
14765        ::fidl_next::EncodeError,
14766    >;
14767
14768    #[doc = " Creates a link to an object named src by the name dst, within a directory represented by\n token.\n\n `src` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and\n `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.\n\n This will be atomic with respect to renaming or unlinking the source concurrently e.g. if\n there are two actors operating concurrently, and one actor performs a rename that affects\n the source within this directory, and the other does a link, each will appear to occur\n atomically in an unspecified order.\n"]
14769    fn link<___R>(
14770        &self,
14771        request: ___R,
14772    ) -> Result<
14773        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Link>,
14774        ::fidl_next::EncodeError,
14775    >
14776    where
14777        ___R: ::fidl_next::Encode<
14778            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14779            Encoded = crate::WireDirectoryLinkRequest<'static>,
14780        >;
14781
14782    #[doc = " Removes a child node from the this directory\'s list of entries.\n\n Note: this does not guarantee that the underlying object is destroyed.\n Although the link will be removed from the containing directory,\n objects with multiple references (such as files which are still open)\n will not actually be destroyed until all references are closed.\n\n * error `ZX_ERR_ACCESS_DENIED` if the connection does not have\n   [`Rights.WRITE_BYTES`].\n * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not\n   support writing.\n * error `ZX_ERR_BAD_PATH` if `name` is invalid.\n * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.\n * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,\n   containing a remote channel.\n * error `ZX_ERR_NOT_DIR` if the options requested a directory but\n     something other than a directory was found.\n\n Other errors may be returned for filesystem-specific reasons.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n"]
14783    fn unlink<___R>(
14784        &self,
14785        request: ___R,
14786    ) -> Result<
14787        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Unlink>,
14788        ::fidl_next::EncodeError,
14789    >
14790    where
14791        ___R: ::fidl_next::Encode<
14792            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14793            Encoded = crate::WireDirectoryUnlinkRequest<'static>,
14794        >;
14795
14796    #[doc = " Renames a node named `src` to the name `dst`, in a directory represented\n by `dst_parent_token`.\n\n `src` and `dst` must be valid node names.\n See [`Name`] for what constitutes a valid name.\n\n This method requires the following rights on both the current connection, and the connection\n identified by `dst_parent_token`:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n\n The following requirements are necessary to avoid rights escalations.\n\n If the source and destination directory differ, the source directory must also have the\n maximal set of abilities supported for files, which would typically be\n [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and\n [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]\n right.\n\n If `src` refers to a directory, and differs from the destination directory, then the source\n directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.\n\n * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.\n * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.\n"]
14797    fn rename<___R>(
14798        &self,
14799        request: ___R,
14800    ) -> Result<
14801        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Rename>,
14802        ::fidl_next::EncodeError,
14803    >
14804    where
14805        ___R: ::fidl_next::Encode<
14806            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14807            Encoded = crate::WireDirectoryRenameRequest<'static>,
14808        >;
14809
14810    #[doc = " Creates a symbolic link.\n\n `name` is the name to be given to the created symbolic link.\n `target` is the target of the symbolic link, which has no meaning on the server. The server\n will perform no validation of `target` except for a server chosen maximum length.\n `connection` is an optional server end of a channel that will speak the Symlink protocol\n on the successfully created node.\n\n * [`Rights.MODIFY_DIRECTORY`]\n\n * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.\n * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.\n * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].\n * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.\n"]
14811    fn create_symlink<___R>(
14812        &self,
14813        request: ___R,
14814    ) -> Result<
14815        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::CreateSymlink>,
14816        ::fidl_next::EncodeError,
14817    >
14818    where
14819        ___R: ::fidl_next::Encode<
14820            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14821            Encoded = crate::WireDirectoryCreateSymlinkRequest<'static>,
14822        >;
14823
14824    #[doc = " Watches a directory, receiving events of added messages on the\n watcher request channel.\n\n Options must be zero; it is reserved.\n\n This method does not require any rights, similar to ReadDirents.\n"]
14825    fn watch<___R>(
14826        &self,
14827        request: ___R,
14828    ) -> Result<
14829        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Watch>,
14830        ::fidl_next::EncodeError,
14831    >
14832    where
14833        ___R: ::fidl_next::Encode<
14834            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14835            Encoded = crate::WireDirectoryWatchRequest,
14836        >;
14837}
14838
14839impl<___T> DirectoryClientSender for ::fidl_next::ClientSender<___T, Directory>
14840where
14841    ___T: ::fidl_next::Transport,
14842{
14843    type Transport = ___T;
14844
14845    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
14846    fn advisory_lock<___R>(
14847        &self,
14848        request: ___R,
14849    ) -> Result<
14850        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::AdvisoryLock>,
14851        ::fidl_next::EncodeError,
14852    >
14853    where
14854        ___R: ::fidl_next::Encode<
14855            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14856            Encoded = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>,
14857        >,
14858    {
14859        self.as_untyped()
14860            .send_two_way(7992130864415541162, request)
14861            .map(::fidl_next::ResponseFuture::from_untyped)
14862    }
14863
14864    fn clone<___R>(
14865        &self,
14866        request: ___R,
14867    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
14868    where
14869        ___R: ::fidl_next::Encode<
14870            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14871            Encoded = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest,
14872        >,
14873    {
14874        self.as_untyped().send_one_way(2366825959783828089, request)
14875    }
14876
14877    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
14878    fn close(
14879        &self,
14880    ) -> Result<
14881        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Close>,
14882        ::fidl_next::EncodeError,
14883    > {
14884        self.as_untyped()
14885            .send_two_way(6540867515453498750, ())
14886            .map(::fidl_next::ResponseFuture::from_untyped)
14887    }
14888
14889    fn query(
14890        &self,
14891    ) -> Result<
14892        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Query>,
14893        ::fidl_next::EncodeError,
14894    > {
14895        self.as_untyped()
14896            .send_two_way(2763219980499352582, ())
14897            .map(::fidl_next::ResponseFuture::from_untyped)
14898    }
14899
14900    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14901    fn deprecated_clone<___R>(
14902        &self,
14903        request: ___R,
14904    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
14905    where
14906        ___R: ::fidl_next::Encode<
14907            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14908            Encoded = crate::WireNodeDeprecatedCloneRequest,
14909        >,
14910    {
14911        self.as_untyped().send_one_way(6512600400724287855, request)
14912    }
14913
14914    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14915    fn deprecated_get_attr(
14916        &self,
14917    ) -> Result<
14918        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::DeprecatedGetAttr>,
14919        ::fidl_next::EncodeError,
14920    > {
14921        self.as_untyped()
14922            .send_two_way(8689798978500614909, ())
14923            .map(::fidl_next::ResponseFuture::from_untyped)
14924    }
14925
14926    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14927    fn deprecated_set_attr<___R>(
14928        &self,
14929        request: ___R,
14930    ) -> Result<
14931        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::DeprecatedSetAttr>,
14932        ::fidl_next::EncodeError,
14933    >
14934    where
14935        ___R: ::fidl_next::Encode<
14936            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14937            Encoded = crate::WireNodeDeprecatedSetAttrRequest,
14938        >,
14939    {
14940        self.as_untyped()
14941            .send_two_way(4721673413776871238, request)
14942            .map(::fidl_next::ResponseFuture::from_untyped)
14943    }
14944
14945    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14946    fn deprecated_get_flags(
14947        &self,
14948    ) -> Result<
14949        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::DeprecatedGetFlags>,
14950        ::fidl_next::EncodeError,
14951    > {
14952        self.as_untyped()
14953            .send_two_way(6595803110182632097, ())
14954            .map(::fidl_next::ResponseFuture::from_untyped)
14955    }
14956
14957    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14958    fn deprecated_set_flags<___R>(
14959        &self,
14960        request: ___R,
14961    ) -> Result<
14962        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::DeprecatedSetFlags>,
14963        ::fidl_next::EncodeError,
14964    >
14965    where
14966        ___R: ::fidl_next::Encode<
14967            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14968            Encoded = crate::WireNodeDeprecatedSetFlagsRequest,
14969        >,
14970    {
14971        self.as_untyped()
14972            .send_two_way(5950864159036794675, request)
14973            .map(::fidl_next::ResponseFuture::from_untyped)
14974    }
14975
14976    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
14977    fn get_flags(
14978        &self,
14979    ) -> Result<
14980        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::GetFlags>,
14981        ::fidl_next::EncodeError,
14982    > {
14983        self.as_untyped()
14984            .send_two_way(105530239381466147, ())
14985            .map(::fidl_next::ResponseFuture::from_untyped)
14986    }
14987
14988    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
14989    fn set_flags<___R>(
14990        &self,
14991        request: ___R,
14992    ) -> Result<
14993        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::SetFlags>,
14994        ::fidl_next::EncodeError,
14995    >
14996    where
14997        ___R: ::fidl_next::Encode<
14998            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
14999            Encoded = crate::WireNodeSetFlagsRequest,
15000        >,
15001    {
15002        self.as_untyped()
15003            .send_two_way(6172186066099445416, request)
15004            .map(::fidl_next::ResponseFuture::from_untyped)
15005    }
15006
15007    #[doc = " Query the filesystem for filesystem-specific information.\n"]
15008    fn query_filesystem(
15009        &self,
15010    ) -> Result<
15011        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::QueryFilesystem>,
15012        ::fidl_next::EncodeError,
15013    > {
15014        self.as_untyped()
15015            .send_two_way(8013111122914313744, ())
15016            .map(::fidl_next::ResponseFuture::from_untyped)
15017    }
15018
15019    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15020    fn get_attributes<___R>(
15021        &self,
15022        request: ___R,
15023    ) -> Result<
15024        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::GetAttributes>,
15025        ::fidl_next::EncodeError,
15026    >
15027    where
15028        ___R: ::fidl_next::Encode<
15029            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15030            Encoded = crate::WireNodeGetAttributesRequest,
15031        >,
15032    {
15033        self.as_untyped()
15034            .send_two_way(4414537700416816443, request)
15035            .map(::fidl_next::ResponseFuture::from_untyped)
15036    }
15037
15038    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15039    fn update_attributes<___R>(
15040        &self,
15041        request: ___R,
15042    ) -> Result<
15043        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::UpdateAttributes>,
15044        ::fidl_next::EncodeError,
15045    >
15046    where
15047        ___R: ::fidl_next::Encode<
15048            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15049            Encoded = crate::WireMutableNodeAttributes<'static>,
15050        >,
15051    {
15052        self.as_untyped()
15053            .send_two_way(3677402239314018056, request)
15054            .map(::fidl_next::ResponseFuture::from_untyped)
15055    }
15056
15057    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
15058    fn sync(
15059        &self,
15060    ) -> Result<
15061        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Sync>,
15062        ::fidl_next::EncodeError,
15063    > {
15064        self.as_untyped()
15065            .send_two_way(3196473584242777161, ())
15066            .map(::fidl_next::ResponseFuture::from_untyped)
15067    }
15068
15069    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15070    fn list_extended_attributes<___R>(
15071        &self,
15072        request: ___R,
15073    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
15074    where
15075        ___R: ::fidl_next::Encode<
15076            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15077            Encoded = crate::WireNodeListExtendedAttributesRequest,
15078        >,
15079    {
15080        self.as_untyped().send_one_way(5431626189872037072, request)
15081    }
15082
15083    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15084    fn get_extended_attribute<___R>(
15085        &self,
15086        request: ___R,
15087    ) -> Result<
15088        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::GetExtendedAttribute>,
15089        ::fidl_next::EncodeError,
15090    >
15091    where
15092        ___R: ::fidl_next::Encode<
15093            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15094            Encoded = crate::WireNodeGetExtendedAttributeRequest<'static>,
15095        >,
15096    {
15097        self.as_untyped()
15098            .send_two_way(5043930208506967771, request)
15099            .map(::fidl_next::ResponseFuture::from_untyped)
15100    }
15101
15102    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15103    fn set_extended_attribute<___R>(
15104        &self,
15105        request: ___R,
15106    ) -> Result<
15107        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::SetExtendedAttribute>,
15108        ::fidl_next::EncodeError,
15109    >
15110    where
15111        ___R: ::fidl_next::Encode<
15112            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15113            Encoded = crate::WireNodeSetExtendedAttributeRequest<'static>,
15114        >,
15115    {
15116        self.as_untyped()
15117            .send_two_way(5374223046099989052, request)
15118            .map(::fidl_next::ResponseFuture::from_untyped)
15119    }
15120
15121    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15122    fn remove_extended_attribute<___R>(
15123        &self,
15124        request: ___R,
15125    ) -> Result<
15126        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::RemoveExtendedAttribute>,
15127        ::fidl_next::EncodeError,
15128    >
15129    where
15130        ___R: ::fidl_next::Encode<
15131            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15132            Encoded = crate::WireNodeRemoveExtendedAttributeRequest<'static>,
15133        >,
15134    {
15135        self.as_untyped()
15136            .send_two_way(8794297771444732717, request)
15137            .map(::fidl_next::ResponseFuture::from_untyped)
15138    }
15139
15140    #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
15141    fn deprecated_open<___R>(
15142        &self,
15143        request: ___R,
15144    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
15145    where
15146        ___R: ::fidl_next::Encode<
15147            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15148            Encoded = crate::WireDirectoryDeprecatedOpenRequest<'static>,
15149        >,
15150    {
15151        self.as_untyped().send_one_way(3193127272456937152, request)
15152    }
15153
15154    #[doc = " Open (or create) a node relative to this directory. Any errors are communicated via an\n epitaph sent on the `object` channel.\n\n Errors:\n * `ZX_ERR_BAD_PATH` if `path` is invalid\n * See [`Flags`] for other errors which may be communicated based on `flags`\n"]
15155    fn open<___R>(
15156        &self,
15157        request: ___R,
15158    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
15159    where
15160        ___R: ::fidl_next::Encode<
15161            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15162            Encoded = crate::WireDirectoryOpenRequest<'static>,
15163        >,
15164    {
15165        self.as_untyped().send_one_way(6236883748953765593, request)
15166    }
15167
15168    #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n   // Describes the inode of the entry.\n   uint64 ino;\n   // Describes the length of the dirent name in bytes.\n   uint8 size;\n   // Describes the type of the entry. Aligned with the\n   // POSIX d_type values. Use `DirentType` constants.\n   uint8 type;\n   // Unterminated name of entry.\n   char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
15169    fn read_dirents<___R>(
15170        &self,
15171        request: ___R,
15172    ) -> Result<
15173        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::ReadDirents>,
15174        ::fidl_next::EncodeError,
15175    >
15176    where
15177        ___R: ::fidl_next::Encode<
15178            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15179            Encoded = crate::WireDirectoryReadDirentsRequest,
15180        >,
15181    {
15182        self.as_untyped()
15183            .send_two_way(3855785432100874762, request)
15184            .map(::fidl_next::ResponseFuture::from_untyped)
15185    }
15186
15187    #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
15188    fn rewind(
15189        &self,
15190    ) -> Result<
15191        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Rewind>,
15192        ::fidl_next::EncodeError,
15193    > {
15194        self.as_untyped()
15195            .send_two_way(1635123508515392625, ())
15196            .map(::fidl_next::ResponseFuture::from_untyped)
15197    }
15198
15199    #[doc = " Acquires a token to a Directory which can be used to identify access to it at a later point\n in time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns\n `ZX_ERR_BAD_HANDLE`.\n"]
15200    fn get_token(
15201        &self,
15202    ) -> Result<
15203        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::GetToken>,
15204        ::fidl_next::EncodeError,
15205    > {
15206        self.as_untyped()
15207            .send_two_way(2787337947777369685, ())
15208            .map(::fidl_next::ResponseFuture::from_untyped)
15209    }
15210
15211    #[doc = " Creates a link to an object named src by the name dst, within a directory represented by\n token.\n\n `src` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and\n `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.\n\n This will be atomic with respect to renaming or unlinking the source concurrently e.g. if\n there are two actors operating concurrently, and one actor performs a rename that affects\n the source within this directory, and the other does a link, each will appear to occur\n atomically in an unspecified order.\n"]
15212    fn link<___R>(
15213        &self,
15214        request: ___R,
15215    ) -> Result<
15216        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Link>,
15217        ::fidl_next::EncodeError,
15218    >
15219    where
15220        ___R: ::fidl_next::Encode<
15221            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15222            Encoded = crate::WireDirectoryLinkRequest<'static>,
15223        >,
15224    {
15225        self.as_untyped()
15226            .send_two_way(8360374984291987687, request)
15227            .map(::fidl_next::ResponseFuture::from_untyped)
15228    }
15229
15230    #[doc = " Removes a child node from the this directory\'s list of entries.\n\n Note: this does not guarantee that the underlying object is destroyed.\n Although the link will be removed from the containing directory,\n objects with multiple references (such as files which are still open)\n will not actually be destroyed until all references are closed.\n\n * error `ZX_ERR_ACCESS_DENIED` if the connection does not have\n   [`Rights.WRITE_BYTES`].\n * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not\n   support writing.\n * error `ZX_ERR_BAD_PATH` if `name` is invalid.\n * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.\n * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,\n   containing a remote channel.\n * error `ZX_ERR_NOT_DIR` if the options requested a directory but\n     something other than a directory was found.\n\n Other errors may be returned for filesystem-specific reasons.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n"]
15231    fn unlink<___R>(
15232        &self,
15233        request: ___R,
15234    ) -> Result<
15235        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Unlink>,
15236        ::fidl_next::EncodeError,
15237    >
15238    where
15239        ___R: ::fidl_next::Encode<
15240            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15241            Encoded = crate::WireDirectoryUnlinkRequest<'static>,
15242        >,
15243    {
15244        self.as_untyped()
15245            .send_two_way(8433556716759383021, request)
15246            .map(::fidl_next::ResponseFuture::from_untyped)
15247    }
15248
15249    #[doc = " Renames a node named `src` to the name `dst`, in a directory represented\n by `dst_parent_token`.\n\n `src` and `dst` must be valid node names.\n See [`Name`] for what constitutes a valid name.\n\n This method requires the following rights on both the current connection, and the connection\n identified by `dst_parent_token`:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n\n The following requirements are necessary to avoid rights escalations.\n\n If the source and destination directory differ, the source directory must also have the\n maximal set of abilities supported for files, which would typically be\n [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and\n [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]\n right.\n\n If `src` refers to a directory, and differs from the destination directory, then the source\n directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.\n\n * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.\n * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.\n"]
15250    fn rename<___R>(
15251        &self,
15252        request: ___R,
15253    ) -> Result<
15254        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Rename>,
15255        ::fidl_next::EncodeError,
15256    >
15257    where
15258        ___R: ::fidl_next::Encode<
15259            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15260            Encoded = crate::WireDirectoryRenameRequest<'static>,
15261        >,
15262    {
15263        self.as_untyped()
15264            .send_two_way(8097726607824333022, request)
15265            .map(::fidl_next::ResponseFuture::from_untyped)
15266    }
15267
15268    #[doc = " Creates a symbolic link.\n\n `name` is the name to be given to the created symbolic link.\n `target` is the target of the symbolic link, which has no meaning on the server. The server\n will perform no validation of `target` except for a server chosen maximum length.\n `connection` is an optional server end of a channel that will speak the Symlink protocol\n on the successfully created node.\n\n * [`Rights.MODIFY_DIRECTORY`]\n\n * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.\n * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.\n * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].\n * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.\n"]
15269    fn create_symlink<___R>(
15270        &self,
15271        request: ___R,
15272    ) -> Result<
15273        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::CreateSymlink>,
15274        ::fidl_next::EncodeError,
15275    >
15276    where
15277        ___R: ::fidl_next::Encode<
15278            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15279            Encoded = crate::WireDirectoryCreateSymlinkRequest<'static>,
15280        >,
15281    {
15282        self.as_untyped()
15283            .send_two_way(2435901052462315657, request)
15284            .map(::fidl_next::ResponseFuture::from_untyped)
15285    }
15286
15287    #[doc = " Watches a directory, receiving events of added messages on the\n watcher request channel.\n\n Options must be zero; it is reserved.\n\n This method does not require any rights, similar to ReadDirents.\n"]
15288    fn watch<___R>(
15289        &self,
15290        request: ___R,
15291    ) -> Result<
15292        ::fidl_next::ResponseFuture<'_, Self::Transport, directory::Watch>,
15293        ::fidl_next::EncodeError,
15294    >
15295    where
15296        ___R: ::fidl_next::Encode<
15297            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15298            Encoded = crate::WireDirectoryWatchRequest,
15299        >,
15300    {
15301        self.as_untyped()
15302            .send_two_way(6275512344170098065, request)
15303            .map(::fidl_next::ResponseFuture::from_untyped)
15304    }
15305}
15306
15307/// A client handler for the Directory protocol.
15308///
15309/// See [`Directory`] for more details.
15310pub trait DirectoryClientHandler<___T: ::fidl_next::Transport> {
15311    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
15312    fn on_open(
15313        &mut self,
15314        sender: &::fidl_next::ClientSender<___T, Directory>,
15315
15316        event: ::fidl_next::Response<___T, directory::OnOpen>,
15317    );
15318
15319    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
15320    fn on_representation(
15321        &mut self,
15322        sender: &::fidl_next::ClientSender<___T, Directory>,
15323
15324        event: ::fidl_next::Response<___T, directory::OnRepresentation>,
15325    );
15326
15327    fn on_unknown_interaction(
15328        &mut self,
15329        sender: &::fidl_next::ClientSender<___T, Directory>,
15330        ordinal: u64,
15331    ) {
15332        sender.close();
15333    }
15334}
15335
15336impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Directory
15337where
15338    ___T: ::fidl_next::Transport,
15339    ___H: DirectoryClientHandler<___T>,
15340
15341    <directory::AdvisoryLock as ::fidl_next::Method>::Response:
15342        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15343
15344    <directory::Close as ::fidl_next::Method>::Response:
15345        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15346
15347    <directory::Query as ::fidl_next::Method>::Response:
15348        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15349
15350    <directory::OnOpen as ::fidl_next::Method>::Response:
15351        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15352
15353    <directory::DeprecatedGetAttr as ::fidl_next::Method>::Response:
15354        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15355
15356    <directory::DeprecatedSetAttr as ::fidl_next::Method>::Response:
15357        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15358
15359    <directory::DeprecatedGetFlags as ::fidl_next::Method>::Response:
15360        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15361
15362    <directory::DeprecatedSetFlags as ::fidl_next::Method>::Response:
15363        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15364
15365    <directory::GetFlags as ::fidl_next::Method>::Response:
15366        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15367
15368    <directory::SetFlags as ::fidl_next::Method>::Response:
15369        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15370
15371    <directory::QueryFilesystem as ::fidl_next::Method>::Response:
15372        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15373
15374    <directory::OnRepresentation as ::fidl_next::Method>::Response:
15375        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15376
15377    <directory::GetAttributes as ::fidl_next::Method>::Response:
15378        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15379
15380    <directory::UpdateAttributes as ::fidl_next::Method>::Response:
15381        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15382
15383    <directory::Sync as ::fidl_next::Method>::Response:
15384        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15385
15386    <directory::GetExtendedAttribute as ::fidl_next::Method>::Response:
15387        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15388
15389    <directory::SetExtendedAttribute as ::fidl_next::Method>::Response:
15390        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15391
15392    <directory::RemoveExtendedAttribute as ::fidl_next::Method>::Response:
15393        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15394
15395    <directory::ReadDirents as ::fidl_next::Method>::Response:
15396        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15397
15398    <directory::Rewind as ::fidl_next::Method>::Response:
15399        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15400
15401    <directory::GetToken as ::fidl_next::Method>::Response:
15402        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15403
15404    <directory::Link as ::fidl_next::Method>::Response:
15405        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15406
15407    <directory::Unlink as ::fidl_next::Method>::Response:
15408        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15409
15410    <directory::Rename as ::fidl_next::Method>::Response:
15411        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15412
15413    <directory::CreateSymlink as ::fidl_next::Method>::Response:
15414        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15415
15416    <directory::Watch as ::fidl_next::Method>::Response:
15417        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15418{
15419    fn on_event(
15420        handler: &mut ___H,
15421        sender: &::fidl_next::ClientSender<___T, Self>,
15422        ordinal: u64,
15423        buffer: ___T::RecvBuffer,
15424    ) {
15425        match ordinal {
15426            9207534335756671346 => match ::fidl_next::DecoderExt::decode(buffer) {
15427                Ok(decoded) => handler.on_open(sender, decoded),
15428                Err(e) => {
15429                    sender.close();
15430                }
15431            },
15432
15433            6679970090861613324 => match ::fidl_next::DecoderExt::decode(buffer) {
15434                Ok(decoded) => handler.on_representation(sender, decoded),
15435                Err(e) => {
15436                    sender.close();
15437                }
15438            },
15439
15440            ordinal => handler.on_unknown_interaction(sender, ordinal),
15441        }
15442    }
15443}
15444
15445/// A helper trait for the `Directory` server sender.
15446pub trait DirectoryServerSender {
15447    type Transport: ::fidl_next::Transport;
15448
15449    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
15450
15451    fn on_open<___R>(
15452        &self,
15453        request: ___R,
15454    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
15455    where
15456        ___R: ::fidl_next::Encode<
15457            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15458            Encoded = <directory::OnOpen as ::fidl_next::Method>::Response,
15459        >;
15460
15461    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
15462
15463    fn on_representation<___R>(
15464        &self,
15465        request: ___R,
15466    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
15467    where
15468        ___R: ::fidl_next::Encode<
15469            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15470            Encoded = <directory::OnRepresentation as ::fidl_next::Method>::Response,
15471        >;
15472}
15473
15474impl<___T> DirectoryServerSender for ::fidl_next::ServerSender<___T, Directory>
15475where
15476    ___T: ::fidl_next::Transport,
15477{
15478    type Transport = ___T;
15479
15480    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
15481
15482    fn on_open<___R>(
15483        &self,
15484        request: ___R,
15485    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
15486    where
15487        ___R: ::fidl_next::Encode<
15488            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15489            Encoded = <directory::OnOpen as ::fidl_next::Method>::Response,
15490        >,
15491    {
15492        self.as_untyped().send_event(9207534335756671346, request)
15493    }
15494
15495    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
15496
15497    fn on_representation<___R>(
15498        &self,
15499        request: ___R,
15500    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
15501    where
15502        ___R: ::fidl_next::Encode<
15503            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
15504            Encoded = <directory::OnRepresentation as ::fidl_next::Method>::Response,
15505        >,
15506    {
15507        self.as_untyped().send_event(6679970090861613324, request)
15508    }
15509}
15510
15511/// A server handler for the Directory protocol.
15512///
15513/// See [`Directory`] for more details.
15514pub trait DirectoryServerHandler<___T: ::fidl_next::Transport> {
15515    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
15516    fn advisory_lock(
15517        &mut self,
15518        sender: &::fidl_next::ServerSender<___T, Directory>,
15519
15520        request: ::fidl_next::Request<___T, directory::AdvisoryLock>,
15521
15522        responder: ::fidl_next::Responder<directory::AdvisoryLock>,
15523    );
15524
15525    fn clone(
15526        &mut self,
15527        sender: &::fidl_next::ServerSender<___T, Directory>,
15528
15529        request: ::fidl_next::Request<___T, directory::Clone>,
15530    );
15531
15532    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
15533    fn close(
15534        &mut self,
15535        sender: &::fidl_next::ServerSender<___T, Directory>,
15536
15537        responder: ::fidl_next::Responder<directory::Close>,
15538    );
15539
15540    fn query(
15541        &mut self,
15542        sender: &::fidl_next::ServerSender<___T, Directory>,
15543
15544        responder: ::fidl_next::Responder<directory::Query>,
15545    );
15546
15547    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
15548    fn deprecated_clone(
15549        &mut self,
15550        sender: &::fidl_next::ServerSender<___T, Directory>,
15551
15552        request: ::fidl_next::Request<___T, directory::DeprecatedClone>,
15553    );
15554
15555    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
15556    fn deprecated_get_attr(
15557        &mut self,
15558        sender: &::fidl_next::ServerSender<___T, Directory>,
15559
15560        responder: ::fidl_next::Responder<directory::DeprecatedGetAttr>,
15561    );
15562
15563    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
15564    fn deprecated_set_attr(
15565        &mut self,
15566        sender: &::fidl_next::ServerSender<___T, Directory>,
15567
15568        request: ::fidl_next::Request<___T, directory::DeprecatedSetAttr>,
15569
15570        responder: ::fidl_next::Responder<directory::DeprecatedSetAttr>,
15571    );
15572
15573    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
15574    fn deprecated_get_flags(
15575        &mut self,
15576        sender: &::fidl_next::ServerSender<___T, Directory>,
15577
15578        responder: ::fidl_next::Responder<directory::DeprecatedGetFlags>,
15579    );
15580
15581    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
15582    fn deprecated_set_flags(
15583        &mut self,
15584        sender: &::fidl_next::ServerSender<___T, Directory>,
15585
15586        request: ::fidl_next::Request<___T, directory::DeprecatedSetFlags>,
15587
15588        responder: ::fidl_next::Responder<directory::DeprecatedSetFlags>,
15589    );
15590
15591    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
15592    fn get_flags(
15593        &mut self,
15594        sender: &::fidl_next::ServerSender<___T, Directory>,
15595
15596        responder: ::fidl_next::Responder<directory::GetFlags>,
15597    );
15598
15599    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
15600    fn set_flags(
15601        &mut self,
15602        sender: &::fidl_next::ServerSender<___T, Directory>,
15603
15604        request: ::fidl_next::Request<___T, directory::SetFlags>,
15605
15606        responder: ::fidl_next::Responder<directory::SetFlags>,
15607    );
15608
15609    #[doc = " Query the filesystem for filesystem-specific information.\n"]
15610    fn query_filesystem(
15611        &mut self,
15612        sender: &::fidl_next::ServerSender<___T, Directory>,
15613
15614        responder: ::fidl_next::Responder<directory::QueryFilesystem>,
15615    );
15616
15617    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15618    fn get_attributes(
15619        &mut self,
15620        sender: &::fidl_next::ServerSender<___T, Directory>,
15621
15622        request: ::fidl_next::Request<___T, directory::GetAttributes>,
15623
15624        responder: ::fidl_next::Responder<directory::GetAttributes>,
15625    );
15626
15627    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15628    fn update_attributes(
15629        &mut self,
15630        sender: &::fidl_next::ServerSender<___T, Directory>,
15631
15632        request: ::fidl_next::Request<___T, directory::UpdateAttributes>,
15633
15634        responder: ::fidl_next::Responder<directory::UpdateAttributes>,
15635    );
15636
15637    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
15638    fn sync(
15639        &mut self,
15640        sender: &::fidl_next::ServerSender<___T, Directory>,
15641
15642        responder: ::fidl_next::Responder<directory::Sync>,
15643    );
15644
15645    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15646    fn list_extended_attributes(
15647        &mut self,
15648        sender: &::fidl_next::ServerSender<___T, Directory>,
15649
15650        request: ::fidl_next::Request<___T, directory::ListExtendedAttributes>,
15651    );
15652
15653    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15654    fn get_extended_attribute(
15655        &mut self,
15656        sender: &::fidl_next::ServerSender<___T, Directory>,
15657
15658        request: ::fidl_next::Request<___T, directory::GetExtendedAttribute>,
15659
15660        responder: ::fidl_next::Responder<directory::GetExtendedAttribute>,
15661    );
15662
15663    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15664    fn set_extended_attribute(
15665        &mut self,
15666        sender: &::fidl_next::ServerSender<___T, Directory>,
15667
15668        request: ::fidl_next::Request<___T, directory::SetExtendedAttribute>,
15669
15670        responder: ::fidl_next::Responder<directory::SetExtendedAttribute>,
15671    );
15672
15673    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15674    fn remove_extended_attribute(
15675        &mut self,
15676        sender: &::fidl_next::ServerSender<___T, Directory>,
15677
15678        request: ::fidl_next::Request<___T, directory::RemoveExtendedAttribute>,
15679
15680        responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute>,
15681    );
15682
15683    #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
15684    fn deprecated_open(
15685        &mut self,
15686        sender: &::fidl_next::ServerSender<___T, Directory>,
15687
15688        request: ::fidl_next::Request<___T, directory::DeprecatedOpen>,
15689    );
15690
15691    #[doc = " Open (or create) a node relative to this directory. Any errors are communicated via an\n epitaph sent on the `object` channel.\n\n Errors:\n * `ZX_ERR_BAD_PATH` if `path` is invalid\n * See [`Flags`] for other errors which may be communicated based on `flags`\n"]
15692    fn open(
15693        &mut self,
15694        sender: &::fidl_next::ServerSender<___T, Directory>,
15695
15696        request: ::fidl_next::Request<___T, directory::Open>,
15697    );
15698
15699    #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n   // Describes the inode of the entry.\n   uint64 ino;\n   // Describes the length of the dirent name in bytes.\n   uint8 size;\n   // Describes the type of the entry. Aligned with the\n   // POSIX d_type values. Use `DirentType` constants.\n   uint8 type;\n   // Unterminated name of entry.\n   char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
15700    fn read_dirents(
15701        &mut self,
15702        sender: &::fidl_next::ServerSender<___T, Directory>,
15703
15704        request: ::fidl_next::Request<___T, directory::ReadDirents>,
15705
15706        responder: ::fidl_next::Responder<directory::ReadDirents>,
15707    );
15708
15709    #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
15710    fn rewind(
15711        &mut self,
15712        sender: &::fidl_next::ServerSender<___T, Directory>,
15713
15714        responder: ::fidl_next::Responder<directory::Rewind>,
15715    );
15716
15717    #[doc = " Acquires a token to a Directory which can be used to identify access to it at a later point\n in time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns\n `ZX_ERR_BAD_HANDLE`.\n"]
15718    fn get_token(
15719        &mut self,
15720        sender: &::fidl_next::ServerSender<___T, Directory>,
15721
15722        responder: ::fidl_next::Responder<directory::GetToken>,
15723    );
15724
15725    #[doc = " Creates a link to an object named src by the name dst, within a directory represented by\n token.\n\n `src` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and\n `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.\n\n This will be atomic with respect to renaming or unlinking the source concurrently e.g. if\n there are two actors operating concurrently, and one actor performs a rename that affects\n the source within this directory, and the other does a link, each will appear to occur\n atomically in an unspecified order.\n"]
15726    fn link(
15727        &mut self,
15728        sender: &::fidl_next::ServerSender<___T, Directory>,
15729
15730        request: ::fidl_next::Request<___T, directory::Link>,
15731
15732        responder: ::fidl_next::Responder<directory::Link>,
15733    );
15734
15735    #[doc = " Removes a child node from the this directory\'s list of entries.\n\n Note: this does not guarantee that the underlying object is destroyed.\n Although the link will be removed from the containing directory,\n objects with multiple references (such as files which are still open)\n will not actually be destroyed until all references are closed.\n\n * error `ZX_ERR_ACCESS_DENIED` if the connection does not have\n   [`Rights.WRITE_BYTES`].\n * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not\n   support writing.\n * error `ZX_ERR_BAD_PATH` if `name` is invalid.\n * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.\n * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,\n   containing a remote channel.\n * error `ZX_ERR_NOT_DIR` if the options requested a directory but\n     something other than a directory was found.\n\n Other errors may be returned for filesystem-specific reasons.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n"]
15736    fn unlink(
15737        &mut self,
15738        sender: &::fidl_next::ServerSender<___T, Directory>,
15739
15740        request: ::fidl_next::Request<___T, directory::Unlink>,
15741
15742        responder: ::fidl_next::Responder<directory::Unlink>,
15743    );
15744
15745    #[doc = " Renames a node named `src` to the name `dst`, in a directory represented\n by `dst_parent_token`.\n\n `src` and `dst` must be valid node names.\n See [`Name`] for what constitutes a valid name.\n\n This method requires the following rights on both the current connection, and the connection\n identified by `dst_parent_token`:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n\n The following requirements are necessary to avoid rights escalations.\n\n If the source and destination directory differ, the source directory must also have the\n maximal set of abilities supported for files, which would typically be\n [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and\n [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]\n right.\n\n If `src` refers to a directory, and differs from the destination directory, then the source\n directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.\n\n * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.\n * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.\n"]
15746    fn rename(
15747        &mut self,
15748        sender: &::fidl_next::ServerSender<___T, Directory>,
15749
15750        request: ::fidl_next::Request<___T, directory::Rename>,
15751
15752        responder: ::fidl_next::Responder<directory::Rename>,
15753    );
15754
15755    #[doc = " Creates a symbolic link.\n\n `name` is the name to be given to the created symbolic link.\n `target` is the target of the symbolic link, which has no meaning on the server. The server\n will perform no validation of `target` except for a server chosen maximum length.\n `connection` is an optional server end of a channel that will speak the Symlink protocol\n on the successfully created node.\n\n * [`Rights.MODIFY_DIRECTORY`]\n\n * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.\n * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.\n * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].\n * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.\n"]
15756    fn create_symlink(
15757        &mut self,
15758        sender: &::fidl_next::ServerSender<___T, Directory>,
15759
15760        request: ::fidl_next::Request<___T, directory::CreateSymlink>,
15761
15762        responder: ::fidl_next::Responder<directory::CreateSymlink>,
15763    );
15764
15765    #[doc = " Watches a directory, receiving events of added messages on the\n watcher request channel.\n\n Options must be zero; it is reserved.\n\n This method does not require any rights, similar to ReadDirents.\n"]
15766    fn watch(
15767        &mut self,
15768        sender: &::fidl_next::ServerSender<___T, Directory>,
15769
15770        request: ::fidl_next::Request<___T, directory::Watch>,
15771
15772        responder: ::fidl_next::Responder<directory::Watch>,
15773    );
15774
15775    fn on_unknown_interaction(
15776        &mut self,
15777        sender: &::fidl_next::ServerSender<___T, Directory>,
15778        ordinal: u64,
15779    ) {
15780        sender.close();
15781    }
15782}
15783
15784impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Directory
15785where
15786    ___T: ::fidl_next::Transport,
15787    ___H: DirectoryServerHandler<___T>,
15788
15789    <directory::AdvisoryLock as ::fidl_next::Method>::Request:
15790        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15791
15792    <directory::Clone as ::fidl_next::Method>::Request:
15793        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15794
15795    <directory::DeprecatedClone as ::fidl_next::Method>::Request:
15796        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15797
15798    <directory::DeprecatedSetAttr as ::fidl_next::Method>::Request:
15799        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15800
15801    <directory::DeprecatedSetFlags as ::fidl_next::Method>::Request:
15802        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15803
15804    <directory::SetFlags as ::fidl_next::Method>::Request:
15805        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15806
15807    <directory::GetAttributes as ::fidl_next::Method>::Request:
15808        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15809
15810    <directory::UpdateAttributes as ::fidl_next::Method>::Request:
15811        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15812
15813    <directory::ListExtendedAttributes as ::fidl_next::Method>::Request:
15814        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15815
15816    <directory::GetExtendedAttribute as ::fidl_next::Method>::Request:
15817        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15818
15819    <directory::SetExtendedAttribute as ::fidl_next::Method>::Request:
15820        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15821
15822    <directory::RemoveExtendedAttribute as ::fidl_next::Method>::Request:
15823        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15824
15825    <directory::DeprecatedOpen as ::fidl_next::Method>::Request:
15826        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15827
15828    <directory::Open as ::fidl_next::Method>::Request:
15829        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15830
15831    <directory::ReadDirents as ::fidl_next::Method>::Request:
15832        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15833
15834    <directory::Link as ::fidl_next::Method>::Request:
15835        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15836
15837    <directory::Unlink as ::fidl_next::Method>::Request:
15838        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15839
15840    <directory::Rename as ::fidl_next::Method>::Request:
15841        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15842
15843    <directory::CreateSymlink as ::fidl_next::Method>::Request:
15844        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15845
15846    <directory::Watch as ::fidl_next::Method>::Request:
15847        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
15848{
15849    fn on_one_way(
15850        handler: &mut ___H,
15851        sender: &::fidl_next::ServerSender<___T, Self>,
15852        ordinal: u64,
15853        buffer: ___T::RecvBuffer,
15854    ) {
15855        match ordinal {
15856            2366825959783828089 => match ::fidl_next::DecoderExt::decode(buffer) {
15857                Ok(decoded) => handler.clone(sender, decoded),
15858                Err(e) => {
15859                    sender.close();
15860                }
15861            },
15862
15863            6512600400724287855 => match ::fidl_next::DecoderExt::decode(buffer) {
15864                Ok(decoded) => handler.deprecated_clone(sender, decoded),
15865                Err(e) => {
15866                    sender.close();
15867                }
15868            },
15869
15870            5431626189872037072 => match ::fidl_next::DecoderExt::decode(buffer) {
15871                Ok(decoded) => handler.list_extended_attributes(sender, decoded),
15872                Err(e) => {
15873                    sender.close();
15874                }
15875            },
15876
15877            3193127272456937152 => match ::fidl_next::DecoderExt::decode(buffer) {
15878                Ok(decoded) => handler.deprecated_open(sender, decoded),
15879                Err(e) => {
15880                    sender.close();
15881                }
15882            },
15883
15884            6236883748953765593 => match ::fidl_next::DecoderExt::decode(buffer) {
15885                Ok(decoded) => handler.open(sender, decoded),
15886                Err(e) => {
15887                    sender.close();
15888                }
15889            },
15890
15891            ordinal => handler.on_unknown_interaction(sender, ordinal),
15892        }
15893    }
15894
15895    fn on_two_way(
15896        handler: &mut ___H,
15897        sender: &::fidl_next::ServerSender<___T, Self>,
15898        ordinal: u64,
15899        buffer: ___T::RecvBuffer,
15900        responder: ::fidl_next::protocol::Responder,
15901    ) {
15902        match ordinal {
15903            7992130864415541162 => {
15904                let responder = ::fidl_next::Responder::from_untyped(responder);
15905
15906                match ::fidl_next::DecoderExt::decode(buffer) {
15907                    Ok(decoded) => handler.advisory_lock(sender, decoded, responder),
15908                    Err(e) => {
15909                        sender.close();
15910                    }
15911                }
15912            }
15913
15914            6540867515453498750 => {
15915                let responder = ::fidl_next::Responder::from_untyped(responder);
15916
15917                handler.close(sender, responder);
15918            }
15919
15920            2763219980499352582 => {
15921                let responder = ::fidl_next::Responder::from_untyped(responder);
15922
15923                handler.query(sender, responder);
15924            }
15925
15926            8689798978500614909 => {
15927                let responder = ::fidl_next::Responder::from_untyped(responder);
15928
15929                handler.deprecated_get_attr(sender, responder);
15930            }
15931
15932            4721673413776871238 => {
15933                let responder = ::fidl_next::Responder::from_untyped(responder);
15934
15935                match ::fidl_next::DecoderExt::decode(buffer) {
15936                    Ok(decoded) => handler.deprecated_set_attr(sender, decoded, responder),
15937                    Err(e) => {
15938                        sender.close();
15939                    }
15940                }
15941            }
15942
15943            6595803110182632097 => {
15944                let responder = ::fidl_next::Responder::from_untyped(responder);
15945
15946                handler.deprecated_get_flags(sender, responder);
15947            }
15948
15949            5950864159036794675 => {
15950                let responder = ::fidl_next::Responder::from_untyped(responder);
15951
15952                match ::fidl_next::DecoderExt::decode(buffer) {
15953                    Ok(decoded) => handler.deprecated_set_flags(sender, decoded, responder),
15954                    Err(e) => {
15955                        sender.close();
15956                    }
15957                }
15958            }
15959
15960            105530239381466147 => {
15961                let responder = ::fidl_next::Responder::from_untyped(responder);
15962
15963                handler.get_flags(sender, responder);
15964            }
15965
15966            6172186066099445416 => {
15967                let responder = ::fidl_next::Responder::from_untyped(responder);
15968
15969                match ::fidl_next::DecoderExt::decode(buffer) {
15970                    Ok(decoded) => handler.set_flags(sender, decoded, responder),
15971                    Err(e) => {
15972                        sender.close();
15973                    }
15974                }
15975            }
15976
15977            8013111122914313744 => {
15978                let responder = ::fidl_next::Responder::from_untyped(responder);
15979
15980                handler.query_filesystem(sender, responder);
15981            }
15982
15983            4414537700416816443 => {
15984                let responder = ::fidl_next::Responder::from_untyped(responder);
15985
15986                match ::fidl_next::DecoderExt::decode(buffer) {
15987                    Ok(decoded) => handler.get_attributes(sender, decoded, responder),
15988                    Err(e) => {
15989                        sender.close();
15990                    }
15991                }
15992            }
15993
15994            3677402239314018056 => {
15995                let responder = ::fidl_next::Responder::from_untyped(responder);
15996
15997                match ::fidl_next::DecoderExt::decode(buffer) {
15998                    Ok(decoded) => handler.update_attributes(sender, decoded, responder),
15999                    Err(e) => {
16000                        sender.close();
16001                    }
16002                }
16003            }
16004
16005            3196473584242777161 => {
16006                let responder = ::fidl_next::Responder::from_untyped(responder);
16007
16008                handler.sync(sender, responder);
16009            }
16010
16011            5043930208506967771 => {
16012                let responder = ::fidl_next::Responder::from_untyped(responder);
16013
16014                match ::fidl_next::DecoderExt::decode(buffer) {
16015                    Ok(decoded) => handler.get_extended_attribute(sender, decoded, responder),
16016                    Err(e) => {
16017                        sender.close();
16018                    }
16019                }
16020            }
16021
16022            5374223046099989052 => {
16023                let responder = ::fidl_next::Responder::from_untyped(responder);
16024
16025                match ::fidl_next::DecoderExt::decode(buffer) {
16026                    Ok(decoded) => handler.set_extended_attribute(sender, decoded, responder),
16027                    Err(e) => {
16028                        sender.close();
16029                    }
16030                }
16031            }
16032
16033            8794297771444732717 => {
16034                let responder = ::fidl_next::Responder::from_untyped(responder);
16035
16036                match ::fidl_next::DecoderExt::decode(buffer) {
16037                    Ok(decoded) => handler.remove_extended_attribute(sender, decoded, responder),
16038                    Err(e) => {
16039                        sender.close();
16040                    }
16041                }
16042            }
16043
16044            3855785432100874762 => {
16045                let responder = ::fidl_next::Responder::from_untyped(responder);
16046
16047                match ::fidl_next::DecoderExt::decode(buffer) {
16048                    Ok(decoded) => handler.read_dirents(sender, decoded, responder),
16049                    Err(e) => {
16050                        sender.close();
16051                    }
16052                }
16053            }
16054
16055            1635123508515392625 => {
16056                let responder = ::fidl_next::Responder::from_untyped(responder);
16057
16058                handler.rewind(sender, responder);
16059            }
16060
16061            2787337947777369685 => {
16062                let responder = ::fidl_next::Responder::from_untyped(responder);
16063
16064                handler.get_token(sender, responder);
16065            }
16066
16067            8360374984291987687 => {
16068                let responder = ::fidl_next::Responder::from_untyped(responder);
16069
16070                match ::fidl_next::DecoderExt::decode(buffer) {
16071                    Ok(decoded) => handler.link(sender, decoded, responder),
16072                    Err(e) => {
16073                        sender.close();
16074                    }
16075                }
16076            }
16077
16078            8433556716759383021 => {
16079                let responder = ::fidl_next::Responder::from_untyped(responder);
16080
16081                match ::fidl_next::DecoderExt::decode(buffer) {
16082                    Ok(decoded) => handler.unlink(sender, decoded, responder),
16083                    Err(e) => {
16084                        sender.close();
16085                    }
16086                }
16087            }
16088
16089            8097726607824333022 => {
16090                let responder = ::fidl_next::Responder::from_untyped(responder);
16091
16092                match ::fidl_next::DecoderExt::decode(buffer) {
16093                    Ok(decoded) => handler.rename(sender, decoded, responder),
16094                    Err(e) => {
16095                        sender.close();
16096                    }
16097                }
16098            }
16099
16100            2435901052462315657 => {
16101                let responder = ::fidl_next::Responder::from_untyped(responder);
16102
16103                match ::fidl_next::DecoderExt::decode(buffer) {
16104                    Ok(decoded) => handler.create_symlink(sender, decoded, responder),
16105                    Err(e) => {
16106                        sender.close();
16107                    }
16108                }
16109            }
16110
16111            6275512344170098065 => {
16112                let responder = ::fidl_next::Responder::from_untyped(responder);
16113
16114                match ::fidl_next::DecoderExt::decode(buffer) {
16115                    Ok(decoded) => handler.watch(sender, decoded, responder),
16116                    Err(e) => {
16117                        sender.close();
16118                    }
16119                }
16120            }
16121
16122            ordinal => handler.on_unknown_interaction(sender, ordinal),
16123        }
16124    }
16125}
16126
16127#[derive(Clone, Debug)]
16128#[repr(C)]
16129pub struct DirectoryObject {}
16130
16131impl ::fidl_next::Encodable for DirectoryObject {
16132    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirectoryObject> =
16133        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
16134
16135    type Encoded = WireDirectoryObject;
16136}
16137
16138unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryObject
16139where
16140    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16141{
16142    #[inline]
16143    fn encode(
16144        self,
16145        encoder: &mut ___E,
16146        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
16147    ) -> Result<(), ::fidl_next::EncodeError> {
16148        ::fidl_next::munge! {
16149            let Self::Encoded {
16150
16151            } = out;
16152        }
16153
16154        Ok(())
16155    }
16156}
16157
16158unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirectoryObject
16159where
16160    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16161{
16162    #[inline]
16163    fn encode_ref(
16164        &self,
16165        encoder: &mut ___E,
16166        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
16167    ) -> Result<(), ::fidl_next::EncodeError> {
16168        ::fidl_next::munge! {
16169            let Self::Encoded {
16170
16171            } = out;
16172        }
16173
16174        Ok(())
16175    }
16176}
16177
16178impl ::fidl_next::EncodableOption for DirectoryObject {
16179    type EncodedOption = ::fidl_next::WireBox<'static, WireDirectoryObject>;
16180}
16181
16182unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryObject
16183where
16184    ___E: ::fidl_next::Encoder + ?Sized,
16185    DirectoryObject: ::fidl_next::Encode<___E>,
16186{
16187    #[inline]
16188    fn encode_option(
16189        this: Option<Self>,
16190        encoder: &mut ___E,
16191        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
16192    ) -> Result<(), ::fidl_next::EncodeError> {
16193        if let Some(inner) = this {
16194            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
16195            ::fidl_next::WireBox::encode_present(out);
16196        } else {
16197            ::fidl_next::WireBox::encode_absent(out);
16198        }
16199
16200        Ok(())
16201    }
16202}
16203
16204unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DirectoryObject
16205where
16206    ___E: ::fidl_next::Encoder + ?Sized,
16207    DirectoryObject: ::fidl_next::EncodeRef<___E>,
16208{
16209    #[inline]
16210    fn encode_option_ref(
16211        this: Option<&Self>,
16212        encoder: &mut ___E,
16213        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
16214    ) -> Result<(), ::fidl_next::EncodeError> {
16215        if let Some(inner) = this {
16216            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
16217            ::fidl_next::WireBox::encode_present(out);
16218        } else {
16219            ::fidl_next::WireBox::encode_absent(out);
16220        }
16221
16222        Ok(())
16223    }
16224}
16225
16226impl ::fidl_next::FromWire<WireDirectoryObject> for DirectoryObject {
16227    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirectoryObject, Self> =
16228        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
16229
16230    #[inline]
16231    fn from_wire(wire: WireDirectoryObject) -> Self {
16232        Self {}
16233    }
16234}
16235
16236impl ::fidl_next::FromWireRef<WireDirectoryObject> for DirectoryObject {
16237    #[inline]
16238    fn from_wire_ref(wire: &WireDirectoryObject) -> Self {
16239        Self {}
16240    }
16241}
16242
16243/// The wire type corresponding to [`DirectoryObject`].
16244#[derive(Clone, Debug)]
16245#[repr(C)]
16246pub struct WireDirectoryObject {}
16247
16248unsafe impl ::fidl_next::Wire for WireDirectoryObject {
16249    type Decoded<'de> = WireDirectoryObject;
16250
16251    #[inline]
16252    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
16253}
16254
16255unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryObject
16256where
16257    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16258{
16259    fn decode(
16260        slot: ::fidl_next::Slot<'_, Self>,
16261        decoder: &mut ___D,
16262    ) -> Result<(), ::fidl_next::DecodeError> {
16263        ::fidl_next::munge! {
16264            let Self {
16265
16266            } = slot;
16267        }
16268
16269        Ok(())
16270    }
16271}
16272
16273/// The type corresponding to the DirectoryWatcher protocol.
16274#[doc = " DirectoryWatcher transmits messages from a filesystem server\n about events happening in the filesystem. Clients can register\n new watchers using the `Directory.Watch` method, where they can\n filter which events they want to receive notifications for.\n\n The DirectoryWatcher will send messages of the form:\n ```\n struct {\n   uint8 event;\n   uint8 len;\n   char name[];\n };\n ```\n Where names are NOT null-terminated. The name is the relative\n path to the entry the event is refering to. It will be empty if\n the event isn\'t referencing a particular entry (e.g. for the\n `IDLE` event).\n"]
16275#[derive(Debug)]
16276pub struct DirectoryWatcher;
16277
16278pub mod directory_watcher {
16279    pub mod prelude {
16280        pub use crate::{
16281            directory_watcher, DirectoryWatcher, DirectoryWatcherClientHandler,
16282            DirectoryWatcherClientSender, DirectoryWatcherServerHandler,
16283            DirectoryWatcherServerSender,
16284        };
16285    }
16286}
16287
16288/// A helper trait for the `DirectoryWatcher` client sender.
16289pub trait DirectoryWatcherClientSender {
16290    type Transport: ::fidl_next::Transport;
16291}
16292
16293impl<___T> DirectoryWatcherClientSender for ::fidl_next::ClientSender<___T, DirectoryWatcher>
16294where
16295    ___T: ::fidl_next::Transport,
16296{
16297    type Transport = ___T;
16298}
16299
16300/// A client handler for the DirectoryWatcher protocol.
16301///
16302/// See [`DirectoryWatcher`] for more details.
16303pub trait DirectoryWatcherClientHandler<___T: ::fidl_next::Transport> {}
16304
16305impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirectoryWatcher
16306where
16307    ___T: ::fidl_next::Transport,
16308    ___H: DirectoryWatcherClientHandler<___T>,
16309{
16310    fn on_event(
16311        handler: &mut ___H,
16312        sender: &::fidl_next::ClientSender<___T, Self>,
16313        ordinal: u64,
16314        buffer: ___T::RecvBuffer,
16315    ) {
16316        match ordinal {
16317            ordinal => {
16318                sender.close();
16319            }
16320        }
16321    }
16322}
16323
16324/// A helper trait for the `DirectoryWatcher` server sender.
16325pub trait DirectoryWatcherServerSender {
16326    type Transport: ::fidl_next::Transport;
16327}
16328
16329impl<___T> DirectoryWatcherServerSender for ::fidl_next::ServerSender<___T, DirectoryWatcher>
16330where
16331    ___T: ::fidl_next::Transport,
16332{
16333    type Transport = ___T;
16334}
16335
16336/// A server handler for the DirectoryWatcher protocol.
16337///
16338/// See [`DirectoryWatcher`] for more details.
16339pub trait DirectoryWatcherServerHandler<___T: ::fidl_next::Transport> {}
16340
16341impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirectoryWatcher
16342where
16343    ___T: ::fidl_next::Transport,
16344    ___H: DirectoryWatcherServerHandler<___T>,
16345{
16346    fn on_one_way(
16347        handler: &mut ___H,
16348        sender: &::fidl_next::ServerSender<___T, Self>,
16349        ordinal: u64,
16350        buffer: ___T::RecvBuffer,
16351    ) {
16352        match ordinal {
16353            ordinal => {
16354                sender.close();
16355            }
16356        }
16357    }
16358
16359    fn on_two_way(
16360        handler: &mut ___H,
16361        sender: &::fidl_next::ServerSender<___T, Self>,
16362        ordinal: u64,
16363        buffer: ___T::RecvBuffer,
16364        responder: ::fidl_next::protocol::Responder,
16365    ) {
16366        match ordinal {
16367            ordinal => {
16368                sender.close();
16369            }
16370        }
16371    }
16372}
16373
16374#[derive(Clone, Copy, Debug, PartialEq, Eq)]
16375#[repr(u8)]
16376pub enum DirentType {
16377    Unknown = 0,
16378    Directory = 4,
16379    BlockDevice = 6,
16380    File = 8,
16381    Symlink = 10,
16382    Service = 16,
16383    UnknownOrdinal_(u8),
16384}
16385
16386impl ::fidl_next::Encodable for DirentType {
16387    type Encoded = WireDirentType;
16388}
16389impl ::std::convert::From<u8> for DirentType {
16390    fn from(value: u8) -> Self {
16391        match value {
16392            0 => Self::Unknown,
16393            4 => Self::Directory,
16394            6 => Self::BlockDevice,
16395            8 => Self::File,
16396            10 => Self::Symlink,
16397            16 => Self::Service,
16398
16399            _ => Self::UnknownOrdinal_(value),
16400        }
16401    }
16402}
16403
16404unsafe impl<___E> ::fidl_next::Encode<___E> for DirentType
16405where
16406    ___E: ?Sized,
16407{
16408    #[inline]
16409    fn encode(
16410        self,
16411        encoder: &mut ___E,
16412        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
16413    ) -> Result<(), ::fidl_next::EncodeError> {
16414        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
16415    }
16416}
16417
16418unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DirentType
16419where
16420    ___E: ?Sized,
16421{
16422    #[inline]
16423    fn encode_ref(
16424        &self,
16425        encoder: &mut ___E,
16426        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
16427    ) -> Result<(), ::fidl_next::EncodeError> {
16428        ::fidl_next::munge!(let WireDirentType { value } = out);
16429        let _ = value.write(u8::from(match *self {
16430            Self::Unknown => 0,
16431
16432            Self::Directory => 4,
16433
16434            Self::BlockDevice => 6,
16435
16436            Self::File => 8,
16437
16438            Self::Symlink => 10,
16439
16440            Self::Service => 16,
16441
16442            Self::UnknownOrdinal_(value) => value,
16443        }));
16444
16445        Ok(())
16446    }
16447}
16448
16449impl ::core::convert::From<WireDirentType> for DirentType {
16450    fn from(wire: WireDirentType) -> Self {
16451        match u8::from(wire.value) {
16452            0 => Self::Unknown,
16453
16454            4 => Self::Directory,
16455
16456            6 => Self::BlockDevice,
16457
16458            8 => Self::File,
16459
16460            10 => Self::Symlink,
16461
16462            16 => Self::Service,
16463
16464            value => Self::UnknownOrdinal_(value),
16465        }
16466    }
16467}
16468
16469impl ::fidl_next::FromWire<WireDirentType> for DirentType {
16470    #[inline]
16471    fn from_wire(wire: WireDirentType) -> Self {
16472        Self::from(wire)
16473    }
16474}
16475
16476impl ::fidl_next::FromWireRef<WireDirentType> for DirentType {
16477    #[inline]
16478    fn from_wire_ref(wire: &WireDirentType) -> Self {
16479        Self::from(*wire)
16480    }
16481}
16482
16483/// The wire type corresponding to [`DirentType`].
16484#[derive(Clone, Copy, Debug, PartialEq, Eq)]
16485#[repr(transparent)]
16486pub struct WireDirentType {
16487    value: u8,
16488}
16489
16490unsafe impl ::fidl_next::Wire for WireDirentType {
16491    type Decoded<'de> = Self;
16492
16493    #[inline]
16494    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
16495        // Wire enums have no padding
16496    }
16497}
16498
16499impl WireDirentType {
16500    pub const UNKNOWN: WireDirentType = WireDirentType { value: 0 };
16501
16502    pub const DIRECTORY: WireDirentType = WireDirentType { value: 4 };
16503
16504    pub const BLOCK_DEVICE: WireDirentType = WireDirentType { value: 6 };
16505
16506    pub const FILE: WireDirentType = WireDirentType { value: 8 };
16507
16508    pub const SYMLINK: WireDirentType = WireDirentType { value: 10 };
16509
16510    pub const SERVICE: WireDirentType = WireDirentType { value: 16 };
16511}
16512
16513unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirentType
16514where
16515    ___D: ?Sized,
16516{
16517    fn decode(
16518        slot: ::fidl_next::Slot<'_, Self>,
16519        _: &mut ___D,
16520    ) -> Result<(), ::fidl_next::DecodeError> {
16521        Ok(())
16522    }
16523}
16524
16525impl ::core::convert::From<DirentType> for WireDirentType {
16526    fn from(natural: DirentType) -> Self {
16527        match natural {
16528            DirentType::Unknown => WireDirentType::UNKNOWN,
16529
16530            DirentType::Directory => WireDirentType::DIRECTORY,
16531
16532            DirentType::BlockDevice => WireDirentType::BLOCK_DEVICE,
16533
16534            DirentType::File => WireDirentType::FILE,
16535
16536            DirentType::Symlink => WireDirentType::SYMLINK,
16537
16538            DirentType::Service => WireDirentType::SERVICE,
16539
16540            DirentType::UnknownOrdinal_(value) => WireDirentType { value: u8::from(value) },
16541        }
16542    }
16543}
16544
16545#[doc = " The maximum size of a chunk in the ListExtendedAttributes iterator.\n"]
16546pub const MAX_LIST_ATTRIBUTES_CHUNK: u64 = 128;
16547
16548#[derive(Clone, Debug)]
16549pub struct ExtendedAttributeIteratorGetNextResponse {
16550    pub attributes: Vec<Vec<u8>>,
16551
16552    pub last: bool,
16553}
16554
16555impl ::fidl_next::Encodable for ExtendedAttributeIteratorGetNextResponse {
16556    type Encoded = WireExtendedAttributeIteratorGetNextResponse<'static>;
16557}
16558
16559unsafe impl<___E> ::fidl_next::Encode<___E> for ExtendedAttributeIteratorGetNextResponse
16560where
16561    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16562
16563    ___E: ::fidl_next::Encoder,
16564{
16565    #[inline]
16566    fn encode(
16567        self,
16568        encoder: &mut ___E,
16569        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
16570    ) -> Result<(), ::fidl_next::EncodeError> {
16571        ::fidl_next::munge! {
16572            let Self::Encoded {
16573                attributes,
16574                last,
16575
16576            } = out;
16577        }
16578
16579        ::fidl_next::Encode::encode(self.attributes, encoder, attributes)?;
16580
16581        ::fidl_next::Encode::encode(self.last, encoder, last)?;
16582
16583        Ok(())
16584    }
16585}
16586
16587unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ExtendedAttributeIteratorGetNextResponse
16588where
16589    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16590
16591    ___E: ::fidl_next::Encoder,
16592{
16593    #[inline]
16594    fn encode_ref(
16595        &self,
16596        encoder: &mut ___E,
16597        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
16598    ) -> Result<(), ::fidl_next::EncodeError> {
16599        ::fidl_next::munge! {
16600            let Self::Encoded {
16601                attributes,
16602                last,
16603
16604            } = out;
16605        }
16606
16607        ::fidl_next::EncodeRef::encode_ref(&self.attributes, encoder, attributes)?;
16608
16609        ::fidl_next::EncodeRef::encode_ref(&self.last, encoder, last)?;
16610
16611        Ok(())
16612    }
16613}
16614
16615impl ::fidl_next::EncodableOption for ExtendedAttributeIteratorGetNextResponse {
16616    type EncodedOption =
16617        ::fidl_next::WireBox<'static, WireExtendedAttributeIteratorGetNextResponse<'static>>;
16618}
16619
16620unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ExtendedAttributeIteratorGetNextResponse
16621where
16622    ___E: ::fidl_next::Encoder + ?Sized,
16623    ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<___E>,
16624{
16625    #[inline]
16626    fn encode_option(
16627        this: Option<Self>,
16628        encoder: &mut ___E,
16629        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
16630    ) -> Result<(), ::fidl_next::EncodeError> {
16631        if let Some(inner) = this {
16632            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
16633            ::fidl_next::WireBox::encode_present(out);
16634        } else {
16635            ::fidl_next::WireBox::encode_absent(out);
16636        }
16637
16638        Ok(())
16639    }
16640}
16641
16642unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ExtendedAttributeIteratorGetNextResponse
16643where
16644    ___E: ::fidl_next::Encoder + ?Sized,
16645    ExtendedAttributeIteratorGetNextResponse: ::fidl_next::EncodeRef<___E>,
16646{
16647    #[inline]
16648    fn encode_option_ref(
16649        this: Option<&Self>,
16650        encoder: &mut ___E,
16651        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
16652    ) -> Result<(), ::fidl_next::EncodeError> {
16653        if let Some(inner) = this {
16654            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
16655            ::fidl_next::WireBox::encode_present(out);
16656        } else {
16657            ::fidl_next::WireBox::encode_absent(out);
16658        }
16659
16660        Ok(())
16661    }
16662}
16663
16664impl<'de> ::fidl_next::FromWire<WireExtendedAttributeIteratorGetNextResponse<'de>>
16665    for ExtendedAttributeIteratorGetNextResponse
16666{
16667    #[inline]
16668    fn from_wire(wire: WireExtendedAttributeIteratorGetNextResponse<'de>) -> Self {
16669        Self {
16670            attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
16671
16672            last: ::fidl_next::FromWire::from_wire(wire.last),
16673        }
16674    }
16675}
16676
16677impl<'de> ::fidl_next::FromWireRef<WireExtendedAttributeIteratorGetNextResponse<'de>>
16678    for ExtendedAttributeIteratorGetNextResponse
16679{
16680    #[inline]
16681    fn from_wire_ref(wire: &WireExtendedAttributeIteratorGetNextResponse<'de>) -> Self {
16682        Self {
16683            attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
16684
16685            last: ::fidl_next::FromWireRef::from_wire_ref(&wire.last),
16686        }
16687    }
16688}
16689
16690/// The wire type corresponding to [`ExtendedAttributeIteratorGetNextResponse`].
16691#[derive(Debug)]
16692#[repr(C)]
16693pub struct WireExtendedAttributeIteratorGetNextResponse<'de> {
16694    pub attributes: ::fidl_next::WireVector<'de, ::fidl_next::WireVector<'de, u8>>,
16695
16696    pub last: bool,
16697}
16698
16699unsafe impl ::fidl_next::Wire for WireExtendedAttributeIteratorGetNextResponse<'static> {
16700    type Decoded<'de> = WireExtendedAttributeIteratorGetNextResponse<'de>;
16701
16702    #[inline]
16703    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16704        unsafe {
16705            out.as_mut_ptr().cast::<u8>().add(17).write_bytes(0, 7);
16706        }
16707    }
16708}
16709
16710unsafe impl<___D> ::fidl_next::Decode<___D>
16711    for WireExtendedAttributeIteratorGetNextResponse<'static>
16712where
16713    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16714
16715    ___D: ::fidl_next::Decoder,
16716{
16717    fn decode(
16718        slot: ::fidl_next::Slot<'_, Self>,
16719        decoder: &mut ___D,
16720    ) -> Result<(), ::fidl_next::DecodeError> {
16721        ::fidl_next::munge! {
16722            let Self {
16723                mut attributes,
16724                mut last,
16725
16726            } = slot;
16727        }
16728
16729        ::fidl_next::Decode::decode(attributes.as_mut(), decoder)?;
16730
16731        let attributes = unsafe { attributes.deref_unchecked() };
16732
16733        if attributes.len() > 128 {
16734            return Err(::fidl_next::DecodeError::VectorTooLong {
16735                size: attributes.len() as u64,
16736                limit: 128,
16737            });
16738        }
16739
16740        ::fidl_next::Decode::decode(last.as_mut(), decoder)?;
16741
16742        Ok(())
16743    }
16744}
16745
16746/// The type corresponding to the ExtendedAttributeIterator protocol.
16747#[derive(Debug)]
16748pub struct ExtendedAttributeIterator;
16749
16750pub mod extended_attribute_iterator {
16751    pub mod prelude {
16752        pub use crate::{
16753            extended_attribute_iterator, ExtendedAttributeIterator,
16754            ExtendedAttributeIteratorClientHandler, ExtendedAttributeIteratorClientSender,
16755            ExtendedAttributeIteratorServerHandler, ExtendedAttributeIteratorServerSender,
16756        };
16757
16758        pub use crate::ExtendedAttributeIteratorGetNextResponse;
16759    }
16760
16761    pub struct GetNext;
16762
16763    impl ::fidl_next::Method for GetNext {
16764        const ORDINAL: u64 = 268639596268373415;
16765
16766        type Protocol = crate::ExtendedAttributeIterator;
16767
16768        type Request = ();
16769
16770        type Response = ::fidl_next::WireResult<
16771            'static,
16772            crate::WireExtendedAttributeIteratorGetNextResponse<'static>,
16773            ::fidl_next::WireI32,
16774        >;
16775    }
16776}
16777
16778/// A helper trait for the `ExtendedAttributeIterator` client sender.
16779pub trait ExtendedAttributeIteratorClientSender {
16780    type Transport: ::fidl_next::Transport;
16781
16782    #[doc = " Get the next chunk of extended attribute names. If this is the last\n chunk, last will be true, and the channel will be closed after the\n call.\n"]
16783    fn get_next(
16784        &self,
16785    ) -> Result<
16786        ::fidl_next::ResponseFuture<'_, Self::Transport, extended_attribute_iterator::GetNext>,
16787        ::fidl_next::EncodeError,
16788    >;
16789}
16790
16791impl<___T> ExtendedAttributeIteratorClientSender
16792    for ::fidl_next::ClientSender<___T, ExtendedAttributeIterator>
16793where
16794    ___T: ::fidl_next::Transport,
16795{
16796    type Transport = ___T;
16797
16798    #[doc = " Get the next chunk of extended attribute names. If this is the last\n chunk, last will be true, and the channel will be closed after the\n call.\n"]
16799    fn get_next(
16800        &self,
16801    ) -> Result<
16802        ::fidl_next::ResponseFuture<'_, Self::Transport, extended_attribute_iterator::GetNext>,
16803        ::fidl_next::EncodeError,
16804    > {
16805        self.as_untyped()
16806            .send_two_way(268639596268373415, ())
16807            .map(::fidl_next::ResponseFuture::from_untyped)
16808    }
16809}
16810
16811/// A client handler for the ExtendedAttributeIterator protocol.
16812///
16813/// See [`ExtendedAttributeIterator`] for more details.
16814pub trait ExtendedAttributeIteratorClientHandler<___T: ::fidl_next::Transport> {}
16815
16816impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for ExtendedAttributeIterator
16817where
16818    ___T: ::fidl_next::Transport,
16819    ___H: ExtendedAttributeIteratorClientHandler<___T>,
16820
16821    <extended_attribute_iterator::GetNext as ::fidl_next::Method>::Response:
16822        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
16823{
16824    fn on_event(
16825        handler: &mut ___H,
16826        sender: &::fidl_next::ClientSender<___T, Self>,
16827        ordinal: u64,
16828        buffer: ___T::RecvBuffer,
16829    ) {
16830        match ordinal {
16831            ordinal => {
16832                sender.close();
16833            }
16834        }
16835    }
16836}
16837
16838/// A helper trait for the `ExtendedAttributeIterator` server sender.
16839pub trait ExtendedAttributeIteratorServerSender {
16840    type Transport: ::fidl_next::Transport;
16841}
16842
16843impl<___T> ExtendedAttributeIteratorServerSender
16844    for ::fidl_next::ServerSender<___T, ExtendedAttributeIterator>
16845where
16846    ___T: ::fidl_next::Transport,
16847{
16848    type Transport = ___T;
16849}
16850
16851/// A server handler for the ExtendedAttributeIterator protocol.
16852///
16853/// See [`ExtendedAttributeIterator`] for more details.
16854pub trait ExtendedAttributeIteratorServerHandler<___T: ::fidl_next::Transport> {
16855    #[doc = " Get the next chunk of extended attribute names. If this is the last\n chunk, last will be true, and the channel will be closed after the\n call.\n"]
16856    fn get_next(
16857        &mut self,
16858        sender: &::fidl_next::ServerSender<___T, ExtendedAttributeIterator>,
16859
16860        responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext>,
16861    );
16862}
16863
16864impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for ExtendedAttributeIterator
16865where
16866    ___T: ::fidl_next::Transport,
16867    ___H: ExtendedAttributeIteratorServerHandler<___T>,
16868{
16869    fn on_one_way(
16870        handler: &mut ___H,
16871        sender: &::fidl_next::ServerSender<___T, Self>,
16872        ordinal: u64,
16873        buffer: ___T::RecvBuffer,
16874    ) {
16875        match ordinal {
16876            ordinal => {
16877                sender.close();
16878            }
16879        }
16880    }
16881
16882    fn on_two_way(
16883        handler: &mut ___H,
16884        sender: &::fidl_next::ServerSender<___T, Self>,
16885        ordinal: u64,
16886        buffer: ___T::RecvBuffer,
16887        responder: ::fidl_next::protocol::Responder,
16888    ) {
16889        match ordinal {
16890            268639596268373415 => {
16891                let responder = ::fidl_next::Responder::from_untyped(responder);
16892
16893                handler.get_next(sender, responder);
16894            }
16895
16896            ordinal => {
16897                sender.close();
16898            }
16899        }
16900    }
16901}
16902
16903pub const FILE_PROTOCOL_NAME: &str = "fuchsia.io/File";
16904
16905#[doc = " Specifies that this object is not linkable. This is only intended to be used in the context of\n creating a temporary unnamed objects. When that is not the case, the node protocol defines if it\n is linkable (i.e. if it composes the `Linkable` protocol). When this flag is set along with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`, an unnamed temporary object will be created that\n cannot be linked into the filesystem. This would be similar to Linux `O_TMPFILE | O_EXCL`.\n\n CAUTION: if `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY` is not specified,  then this is treated as\n a \"must create\" flag.\n\n The reason for overloading `Flags.FLAG_MUST_CREATE` to mean \"not linkable\" in this context and\n \"must create\" in other contexts is due to the assumption that some POSIX flags are compatible\n with the members in `Flags`. In particular the POSIX `O_EXCL` has the same value as\n `Flags.FLAG_MUST_CREATE`. We are not able to define different bit members of the same value,\n hence it is defined separately outside of `Flags`.\n"]
16906pub const FLAG_TEMPORARY_AS_NOT_LINKABLE: crate::Flags = crate::Flags::FLAG_MUST_CREATE;
16907
16908#[derive(Clone, Debug)]
16909#[repr(C)]
16910pub struct ReadableReadRequest {
16911    pub count: u64,
16912}
16913
16914impl ::fidl_next::Encodable for ReadableReadRequest {
16915    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireReadableReadRequest> = unsafe {
16916        ::fidl_next::CopyOptimization::enable_if(
16917            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
16918        )
16919    };
16920
16921    type Encoded = WireReadableReadRequest;
16922}
16923
16924unsafe impl<___E> ::fidl_next::Encode<___E> for ReadableReadRequest
16925where
16926    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16927{
16928    #[inline]
16929    fn encode(
16930        self,
16931        encoder: &mut ___E,
16932        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
16933    ) -> Result<(), ::fidl_next::EncodeError> {
16934        ::fidl_next::munge! {
16935            let Self::Encoded {
16936                count,
16937
16938            } = out;
16939        }
16940
16941        ::fidl_next::Encode::encode(self.count, encoder, count)?;
16942
16943        Ok(())
16944    }
16945}
16946
16947unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ReadableReadRequest
16948where
16949    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16950{
16951    #[inline]
16952    fn encode_ref(
16953        &self,
16954        encoder: &mut ___E,
16955        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
16956    ) -> Result<(), ::fidl_next::EncodeError> {
16957        ::fidl_next::munge! {
16958            let Self::Encoded {
16959                count,
16960
16961            } = out;
16962        }
16963
16964        ::fidl_next::EncodeRef::encode_ref(&self.count, encoder, count)?;
16965
16966        Ok(())
16967    }
16968}
16969
16970impl ::fidl_next::EncodableOption for ReadableReadRequest {
16971    type EncodedOption = ::fidl_next::WireBox<'static, WireReadableReadRequest>;
16972}
16973
16974unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ReadableReadRequest
16975where
16976    ___E: ::fidl_next::Encoder + ?Sized,
16977    ReadableReadRequest: ::fidl_next::Encode<___E>,
16978{
16979    #[inline]
16980    fn encode_option(
16981        this: Option<Self>,
16982        encoder: &mut ___E,
16983        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
16984    ) -> Result<(), ::fidl_next::EncodeError> {
16985        if let Some(inner) = this {
16986            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
16987            ::fidl_next::WireBox::encode_present(out);
16988        } else {
16989            ::fidl_next::WireBox::encode_absent(out);
16990        }
16991
16992        Ok(())
16993    }
16994}
16995
16996unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ReadableReadRequest
16997where
16998    ___E: ::fidl_next::Encoder + ?Sized,
16999    ReadableReadRequest: ::fidl_next::EncodeRef<___E>,
17000{
17001    #[inline]
17002    fn encode_option_ref(
17003        this: Option<&Self>,
17004        encoder: &mut ___E,
17005        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
17006    ) -> Result<(), ::fidl_next::EncodeError> {
17007        if let Some(inner) = this {
17008            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
17009            ::fidl_next::WireBox::encode_present(out);
17010        } else {
17011            ::fidl_next::WireBox::encode_absent(out);
17012        }
17013
17014        Ok(())
17015    }
17016}
17017
17018impl ::fidl_next::FromWire<WireReadableReadRequest> for ReadableReadRequest {
17019    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireReadableReadRequest, Self> = unsafe {
17020        ::fidl_next::CopyOptimization::enable_if(
17021            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
17022                .is_enabled(),
17023        )
17024    };
17025
17026    #[inline]
17027    fn from_wire(wire: WireReadableReadRequest) -> Self {
17028        Self { count: ::fidl_next::FromWire::from_wire(wire.count) }
17029    }
17030}
17031
17032impl ::fidl_next::FromWireRef<WireReadableReadRequest> for ReadableReadRequest {
17033    #[inline]
17034    fn from_wire_ref(wire: &WireReadableReadRequest) -> Self {
17035        Self { count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count) }
17036    }
17037}
17038
17039/// The wire type corresponding to [`ReadableReadRequest`].
17040#[derive(Clone, Debug)]
17041#[repr(C)]
17042pub struct WireReadableReadRequest {
17043    pub count: ::fidl_next::WireU64,
17044}
17045
17046unsafe impl ::fidl_next::Wire for WireReadableReadRequest {
17047    type Decoded<'de> = WireReadableReadRequest;
17048
17049    #[inline]
17050    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
17051}
17052
17053unsafe impl<___D> ::fidl_next::Decode<___D> for WireReadableReadRequest
17054where
17055    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17056{
17057    fn decode(
17058        slot: ::fidl_next::Slot<'_, Self>,
17059        decoder: &mut ___D,
17060    ) -> Result<(), ::fidl_next::DecodeError> {
17061        ::fidl_next::munge! {
17062            let Self {
17063                mut count,
17064
17065            } = slot;
17066        }
17067
17068        ::fidl_next::Decode::decode(count.as_mut(), decoder)?;
17069
17070        Ok(())
17071    }
17072}
17073
17074#[doc = " The maximum I/O size that is allowed for read/write operations using\n byte vectors.\n"]
17075pub const MAX_TRANSFER_SIZE: u64 = 8192;
17076
17077#[doc = " The byte vector type used for read/write operations.\n"]
17078pub type Transfer = Vec<u8>;
17079
17080/// The wire type corresponding to [`Transfer`].
17081pub type WireTransfer<'de> = ::fidl_next::WireVector<'de, u8>;
17082
17083#[derive(Clone, Debug)]
17084pub struct ReadableReadResponse {
17085    pub data: Vec<u8>,
17086}
17087
17088impl ::fidl_next::Encodable for ReadableReadResponse {
17089    type Encoded = WireReadableReadResponse<'static>;
17090}
17091
17092unsafe impl<___E> ::fidl_next::Encode<___E> for ReadableReadResponse
17093where
17094    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17095
17096    ___E: ::fidl_next::Encoder,
17097{
17098    #[inline]
17099    fn encode(
17100        self,
17101        encoder: &mut ___E,
17102        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
17103    ) -> Result<(), ::fidl_next::EncodeError> {
17104        ::fidl_next::munge! {
17105            let Self::Encoded {
17106                data,
17107
17108            } = out;
17109        }
17110
17111        ::fidl_next::Encode::encode(self.data, encoder, data)?;
17112
17113        Ok(())
17114    }
17115}
17116
17117unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ReadableReadResponse
17118where
17119    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17120
17121    ___E: ::fidl_next::Encoder,
17122{
17123    #[inline]
17124    fn encode_ref(
17125        &self,
17126        encoder: &mut ___E,
17127        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
17128    ) -> Result<(), ::fidl_next::EncodeError> {
17129        ::fidl_next::munge! {
17130            let Self::Encoded {
17131                data,
17132
17133            } = out;
17134        }
17135
17136        ::fidl_next::EncodeRef::encode_ref(&self.data, encoder, data)?;
17137
17138        Ok(())
17139    }
17140}
17141
17142impl ::fidl_next::EncodableOption for ReadableReadResponse {
17143    type EncodedOption = ::fidl_next::WireBox<'static, WireReadableReadResponse<'static>>;
17144}
17145
17146unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ReadableReadResponse
17147where
17148    ___E: ::fidl_next::Encoder + ?Sized,
17149    ReadableReadResponse: ::fidl_next::Encode<___E>,
17150{
17151    #[inline]
17152    fn encode_option(
17153        this: Option<Self>,
17154        encoder: &mut ___E,
17155        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
17156    ) -> Result<(), ::fidl_next::EncodeError> {
17157        if let Some(inner) = this {
17158            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
17159            ::fidl_next::WireBox::encode_present(out);
17160        } else {
17161            ::fidl_next::WireBox::encode_absent(out);
17162        }
17163
17164        Ok(())
17165    }
17166}
17167
17168unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ReadableReadResponse
17169where
17170    ___E: ::fidl_next::Encoder + ?Sized,
17171    ReadableReadResponse: ::fidl_next::EncodeRef<___E>,
17172{
17173    #[inline]
17174    fn encode_option_ref(
17175        this: Option<&Self>,
17176        encoder: &mut ___E,
17177        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
17178    ) -> Result<(), ::fidl_next::EncodeError> {
17179        if let Some(inner) = this {
17180            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
17181            ::fidl_next::WireBox::encode_present(out);
17182        } else {
17183            ::fidl_next::WireBox::encode_absent(out);
17184        }
17185
17186        Ok(())
17187    }
17188}
17189
17190impl<'de> ::fidl_next::FromWire<WireReadableReadResponse<'de>> for ReadableReadResponse {
17191    #[inline]
17192    fn from_wire(wire: WireReadableReadResponse<'de>) -> Self {
17193        Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
17194    }
17195}
17196
17197impl<'de> ::fidl_next::FromWireRef<WireReadableReadResponse<'de>> for ReadableReadResponse {
17198    #[inline]
17199    fn from_wire_ref(wire: &WireReadableReadResponse<'de>) -> Self {
17200        Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
17201    }
17202}
17203
17204/// The wire type corresponding to [`ReadableReadResponse`].
17205#[derive(Debug)]
17206#[repr(C)]
17207pub struct WireReadableReadResponse<'de> {
17208    pub data: ::fidl_next::WireVector<'de, u8>,
17209}
17210
17211unsafe impl ::fidl_next::Wire for WireReadableReadResponse<'static> {
17212    type Decoded<'de> = WireReadableReadResponse<'de>;
17213
17214    #[inline]
17215    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
17216}
17217
17218unsafe impl<___D> ::fidl_next::Decode<___D> for WireReadableReadResponse<'static>
17219where
17220    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17221
17222    ___D: ::fidl_next::Decoder,
17223{
17224    fn decode(
17225        slot: ::fidl_next::Slot<'_, Self>,
17226        decoder: &mut ___D,
17227    ) -> Result<(), ::fidl_next::DecodeError> {
17228        ::fidl_next::munge! {
17229            let Self {
17230                mut data,
17231
17232            } = slot;
17233        }
17234
17235        ::fidl_next::Decode::decode(data.as_mut(), decoder)?;
17236
17237        let data = unsafe { data.deref_unchecked() };
17238
17239        if data.len() > 8192 {
17240            return Err(::fidl_next::DecodeError::VectorTooLong {
17241                size: data.len() as u64,
17242                limit: 8192,
17243            });
17244        }
17245
17246        Ok(())
17247    }
17248}
17249
17250/// The type corresponding to the Readable protocol.
17251#[derive(Debug)]
17252pub struct Readable;
17253
17254pub mod readable {
17255    pub mod prelude {
17256        pub use crate::{
17257            readable, Readable, ReadableClientHandler, ReadableClientSender, ReadableServerHandler,
17258            ReadableServerSender,
17259        };
17260
17261        pub use crate::ReadableReadRequest;
17262
17263        pub use crate::ReadableReadResponse;
17264    }
17265
17266    pub struct Read;
17267
17268    impl ::fidl_next::Method for Read {
17269        const ORDINAL: u64 = 395825947633028830;
17270
17271        type Protocol = crate::Readable;
17272
17273        type Request = crate::WireReadableReadRequest;
17274
17275        type Response = ::fidl_next::WireResult<
17276            'static,
17277            crate::WireReadableReadResponse<'static>,
17278            ::fidl_next::WireI32,
17279        >;
17280    }
17281}
17282
17283/// A helper trait for the `Readable` client sender.
17284pub trait ReadableClientSender {
17285    type Transport: ::fidl_next::Transport;
17286
17287    #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n   has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n   seek offset is already at or beyond the end of file, and no data could\n   be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually read anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
17288    fn read<___R>(
17289        &self,
17290        request: ___R,
17291    ) -> Result<
17292        ::fidl_next::ResponseFuture<'_, Self::Transport, readable::Read>,
17293        ::fidl_next::EncodeError,
17294    >
17295    where
17296        ___R: ::fidl_next::Encode<
17297            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
17298            Encoded = crate::WireReadableReadRequest,
17299        >;
17300}
17301
17302impl<___T> ReadableClientSender for ::fidl_next::ClientSender<___T, Readable>
17303where
17304    ___T: ::fidl_next::Transport,
17305{
17306    type Transport = ___T;
17307
17308    #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n   has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n   seek offset is already at or beyond the end of file, and no data could\n   be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually read anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
17309    fn read<___R>(
17310        &self,
17311        request: ___R,
17312    ) -> Result<
17313        ::fidl_next::ResponseFuture<'_, Self::Transport, readable::Read>,
17314        ::fidl_next::EncodeError,
17315    >
17316    where
17317        ___R: ::fidl_next::Encode<
17318            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
17319            Encoded = crate::WireReadableReadRequest,
17320        >,
17321    {
17322        self.as_untyped()
17323            .send_two_way(395825947633028830, request)
17324            .map(::fidl_next::ResponseFuture::from_untyped)
17325    }
17326}
17327
17328/// A client handler for the Readable protocol.
17329///
17330/// See [`Readable`] for more details.
17331pub trait ReadableClientHandler<___T: ::fidl_next::Transport> {}
17332
17333impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Readable
17334where
17335    ___T: ::fidl_next::Transport,
17336    ___H: ReadableClientHandler<___T>,
17337
17338    <readable::Read as ::fidl_next::Method>::Response:
17339        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
17340{
17341    fn on_event(
17342        handler: &mut ___H,
17343        sender: &::fidl_next::ClientSender<___T, Self>,
17344        ordinal: u64,
17345        buffer: ___T::RecvBuffer,
17346    ) {
17347        match ordinal {
17348            ordinal => {
17349                sender.close();
17350            }
17351        }
17352    }
17353}
17354
17355/// A helper trait for the `Readable` server sender.
17356pub trait ReadableServerSender {
17357    type Transport: ::fidl_next::Transport;
17358}
17359
17360impl<___T> ReadableServerSender for ::fidl_next::ServerSender<___T, Readable>
17361where
17362    ___T: ::fidl_next::Transport,
17363{
17364    type Transport = ___T;
17365}
17366
17367/// A server handler for the Readable protocol.
17368///
17369/// See [`Readable`] for more details.
17370pub trait ReadableServerHandler<___T: ::fidl_next::Transport> {
17371    #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n   has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n   seek offset is already at or beyond the end of file, and no data could\n   be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually read anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
17372    fn read(
17373        &mut self,
17374        sender: &::fidl_next::ServerSender<___T, Readable>,
17375
17376        request: ::fidl_next::Request<___T, readable::Read>,
17377
17378        responder: ::fidl_next::Responder<readable::Read>,
17379    );
17380}
17381
17382impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Readable
17383where
17384    ___T: ::fidl_next::Transport,
17385    ___H: ReadableServerHandler<___T>,
17386
17387    <readable::Read as ::fidl_next::Method>::Request:
17388        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
17389{
17390    fn on_one_way(
17391        handler: &mut ___H,
17392        sender: &::fidl_next::ServerSender<___T, Self>,
17393        ordinal: u64,
17394        buffer: ___T::RecvBuffer,
17395    ) {
17396        match ordinal {
17397            ordinal => {
17398                sender.close();
17399            }
17400        }
17401    }
17402
17403    fn on_two_way(
17404        handler: &mut ___H,
17405        sender: &::fidl_next::ServerSender<___T, Self>,
17406        ordinal: u64,
17407        buffer: ___T::RecvBuffer,
17408        responder: ::fidl_next::protocol::Responder,
17409    ) {
17410        match ordinal {
17411            395825947633028830 => {
17412                let responder = ::fidl_next::Responder::from_untyped(responder);
17413
17414                match ::fidl_next::DecoderExt::decode(buffer) {
17415                    Ok(decoded) => handler.read(sender, decoded, responder),
17416                    Err(e) => {
17417                        sender.close();
17418                    }
17419                }
17420            }
17421
17422            ordinal => {
17423                sender.close();
17424            }
17425        }
17426    }
17427}
17428
17429#[derive(Clone, Debug)]
17430pub struct WritableWriteRequest {
17431    pub data: Vec<u8>,
17432}
17433
17434impl ::fidl_next::Encodable for WritableWriteRequest {
17435    type Encoded = WireWritableWriteRequest<'static>;
17436}
17437
17438unsafe impl<___E> ::fidl_next::Encode<___E> for WritableWriteRequest
17439where
17440    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17441
17442    ___E: ::fidl_next::Encoder,
17443{
17444    #[inline]
17445    fn encode(
17446        self,
17447        encoder: &mut ___E,
17448        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
17449    ) -> Result<(), ::fidl_next::EncodeError> {
17450        ::fidl_next::munge! {
17451            let Self::Encoded {
17452                data,
17453
17454            } = out;
17455        }
17456
17457        ::fidl_next::Encode::encode(self.data, encoder, data)?;
17458
17459        Ok(())
17460    }
17461}
17462
17463unsafe impl<___E> ::fidl_next::EncodeRef<___E> for WritableWriteRequest
17464where
17465    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17466
17467    ___E: ::fidl_next::Encoder,
17468{
17469    #[inline]
17470    fn encode_ref(
17471        &self,
17472        encoder: &mut ___E,
17473        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
17474    ) -> Result<(), ::fidl_next::EncodeError> {
17475        ::fidl_next::munge! {
17476            let Self::Encoded {
17477                data,
17478
17479            } = out;
17480        }
17481
17482        ::fidl_next::EncodeRef::encode_ref(&self.data, encoder, data)?;
17483
17484        Ok(())
17485    }
17486}
17487
17488impl ::fidl_next::EncodableOption for WritableWriteRequest {
17489    type EncodedOption = ::fidl_next::WireBox<'static, WireWritableWriteRequest<'static>>;
17490}
17491
17492unsafe impl<___E> ::fidl_next::EncodeOption<___E> for WritableWriteRequest
17493where
17494    ___E: ::fidl_next::Encoder + ?Sized,
17495    WritableWriteRequest: ::fidl_next::Encode<___E>,
17496{
17497    #[inline]
17498    fn encode_option(
17499        this: Option<Self>,
17500        encoder: &mut ___E,
17501        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
17502    ) -> Result<(), ::fidl_next::EncodeError> {
17503        if let Some(inner) = this {
17504            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
17505            ::fidl_next::WireBox::encode_present(out);
17506        } else {
17507            ::fidl_next::WireBox::encode_absent(out);
17508        }
17509
17510        Ok(())
17511    }
17512}
17513
17514unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for WritableWriteRequest
17515where
17516    ___E: ::fidl_next::Encoder + ?Sized,
17517    WritableWriteRequest: ::fidl_next::EncodeRef<___E>,
17518{
17519    #[inline]
17520    fn encode_option_ref(
17521        this: Option<&Self>,
17522        encoder: &mut ___E,
17523        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
17524    ) -> Result<(), ::fidl_next::EncodeError> {
17525        if let Some(inner) = this {
17526            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
17527            ::fidl_next::WireBox::encode_present(out);
17528        } else {
17529            ::fidl_next::WireBox::encode_absent(out);
17530        }
17531
17532        Ok(())
17533    }
17534}
17535
17536impl<'de> ::fidl_next::FromWire<WireWritableWriteRequest<'de>> for WritableWriteRequest {
17537    #[inline]
17538    fn from_wire(wire: WireWritableWriteRequest<'de>) -> Self {
17539        Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
17540    }
17541}
17542
17543impl<'de> ::fidl_next::FromWireRef<WireWritableWriteRequest<'de>> for WritableWriteRequest {
17544    #[inline]
17545    fn from_wire_ref(wire: &WireWritableWriteRequest<'de>) -> Self {
17546        Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
17547    }
17548}
17549
17550/// The wire type corresponding to [`WritableWriteRequest`].
17551#[derive(Debug)]
17552#[repr(C)]
17553pub struct WireWritableWriteRequest<'de> {
17554    pub data: ::fidl_next::WireVector<'de, u8>,
17555}
17556
17557unsafe impl ::fidl_next::Wire for WireWritableWriteRequest<'static> {
17558    type Decoded<'de> = WireWritableWriteRequest<'de>;
17559
17560    #[inline]
17561    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
17562}
17563
17564unsafe impl<___D> ::fidl_next::Decode<___D> for WireWritableWriteRequest<'static>
17565where
17566    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17567
17568    ___D: ::fidl_next::Decoder,
17569{
17570    fn decode(
17571        slot: ::fidl_next::Slot<'_, Self>,
17572        decoder: &mut ___D,
17573    ) -> Result<(), ::fidl_next::DecodeError> {
17574        ::fidl_next::munge! {
17575            let Self {
17576                mut data,
17577
17578            } = slot;
17579        }
17580
17581        ::fidl_next::Decode::decode(data.as_mut(), decoder)?;
17582
17583        let data = unsafe { data.deref_unchecked() };
17584
17585        if data.len() > 8192 {
17586            return Err(::fidl_next::DecodeError::VectorTooLong {
17587                size: data.len() as u64,
17588                limit: 8192,
17589            });
17590        }
17591
17592        Ok(())
17593    }
17594}
17595
17596#[derive(Clone, Debug)]
17597#[repr(C)]
17598pub struct WritableWriteResponse {
17599    pub actual_count: u64,
17600}
17601
17602impl ::fidl_next::Encodable for WritableWriteResponse {
17603    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireWritableWriteResponse> = unsafe {
17604        ::fidl_next::CopyOptimization::enable_if(
17605            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
17606        )
17607    };
17608
17609    type Encoded = WireWritableWriteResponse;
17610}
17611
17612unsafe impl<___E> ::fidl_next::Encode<___E> for WritableWriteResponse
17613where
17614    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17615{
17616    #[inline]
17617    fn encode(
17618        self,
17619        encoder: &mut ___E,
17620        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
17621    ) -> Result<(), ::fidl_next::EncodeError> {
17622        ::fidl_next::munge! {
17623            let Self::Encoded {
17624                actual_count,
17625
17626            } = out;
17627        }
17628
17629        ::fidl_next::Encode::encode(self.actual_count, encoder, actual_count)?;
17630
17631        Ok(())
17632    }
17633}
17634
17635unsafe impl<___E> ::fidl_next::EncodeRef<___E> for WritableWriteResponse
17636where
17637    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17638{
17639    #[inline]
17640    fn encode_ref(
17641        &self,
17642        encoder: &mut ___E,
17643        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
17644    ) -> Result<(), ::fidl_next::EncodeError> {
17645        ::fidl_next::munge! {
17646            let Self::Encoded {
17647                actual_count,
17648
17649            } = out;
17650        }
17651
17652        ::fidl_next::EncodeRef::encode_ref(&self.actual_count, encoder, actual_count)?;
17653
17654        Ok(())
17655    }
17656}
17657
17658impl ::fidl_next::EncodableOption for WritableWriteResponse {
17659    type EncodedOption = ::fidl_next::WireBox<'static, WireWritableWriteResponse>;
17660}
17661
17662unsafe impl<___E> ::fidl_next::EncodeOption<___E> for WritableWriteResponse
17663where
17664    ___E: ::fidl_next::Encoder + ?Sized,
17665    WritableWriteResponse: ::fidl_next::Encode<___E>,
17666{
17667    #[inline]
17668    fn encode_option(
17669        this: Option<Self>,
17670        encoder: &mut ___E,
17671        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
17672    ) -> Result<(), ::fidl_next::EncodeError> {
17673        if let Some(inner) = this {
17674            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
17675            ::fidl_next::WireBox::encode_present(out);
17676        } else {
17677            ::fidl_next::WireBox::encode_absent(out);
17678        }
17679
17680        Ok(())
17681    }
17682}
17683
17684unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for WritableWriteResponse
17685where
17686    ___E: ::fidl_next::Encoder + ?Sized,
17687    WritableWriteResponse: ::fidl_next::EncodeRef<___E>,
17688{
17689    #[inline]
17690    fn encode_option_ref(
17691        this: Option<&Self>,
17692        encoder: &mut ___E,
17693        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
17694    ) -> Result<(), ::fidl_next::EncodeError> {
17695        if let Some(inner) = this {
17696            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
17697            ::fidl_next::WireBox::encode_present(out);
17698        } else {
17699            ::fidl_next::WireBox::encode_absent(out);
17700        }
17701
17702        Ok(())
17703    }
17704}
17705
17706impl ::fidl_next::FromWire<WireWritableWriteResponse> for WritableWriteResponse {
17707    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireWritableWriteResponse, Self> = unsafe {
17708        ::fidl_next::CopyOptimization::enable_if(
17709            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
17710                .is_enabled(),
17711        )
17712    };
17713
17714    #[inline]
17715    fn from_wire(wire: WireWritableWriteResponse) -> Self {
17716        Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
17717    }
17718}
17719
17720impl ::fidl_next::FromWireRef<WireWritableWriteResponse> for WritableWriteResponse {
17721    #[inline]
17722    fn from_wire_ref(wire: &WireWritableWriteResponse) -> Self {
17723        Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
17724    }
17725}
17726
17727/// The wire type corresponding to [`WritableWriteResponse`].
17728#[derive(Clone, Debug)]
17729#[repr(C)]
17730pub struct WireWritableWriteResponse {
17731    pub actual_count: ::fidl_next::WireU64,
17732}
17733
17734unsafe impl ::fidl_next::Wire for WireWritableWriteResponse {
17735    type Decoded<'de> = WireWritableWriteResponse;
17736
17737    #[inline]
17738    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
17739}
17740
17741unsafe impl<___D> ::fidl_next::Decode<___D> for WireWritableWriteResponse
17742where
17743    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17744{
17745    fn decode(
17746        slot: ::fidl_next::Slot<'_, Self>,
17747        decoder: &mut ___D,
17748    ) -> Result<(), ::fidl_next::DecodeError> {
17749        ::fidl_next::munge! {
17750            let Self {
17751                mut actual_count,
17752
17753            } = slot;
17754        }
17755
17756        ::fidl_next::Decode::decode(actual_count.as_mut(), decoder)?;
17757
17758        Ok(())
17759    }
17760}
17761
17762/// The type corresponding to the Writable protocol.
17763#[derive(Debug)]
17764pub struct Writable;
17765
17766pub mod writable {
17767    pub mod prelude {
17768        pub use crate::{
17769            writable, Writable, WritableClientHandler, WritableClientSender, WritableServerHandler,
17770            WritableServerSender,
17771        };
17772
17773        pub use crate::WritableWriteRequest;
17774
17775        pub use crate::WritableWriteResponse;
17776    }
17777
17778    pub struct Write;
17779
17780    impl ::fidl_next::Method for Write {
17781        const ORDINAL: u64 = 7651971425397809026;
17782
17783        type Protocol = crate::Writable;
17784
17785        type Request = crate::WireWritableWriteRequest<'static>;
17786
17787        type Response = ::fidl_next::WireResult<
17788            'static,
17789            crate::WireWritableWriteResponse,
17790            ::fidl_next::WireI32,
17791        >;
17792    }
17793}
17794
17795/// A helper trait for the `Writable` client sender.
17796pub trait WritableClientSender {
17797    type Transport: ::fidl_next::Transport;
17798
17799    #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file and return a\n   successful write of zero bytes.  The seek offset is still updated if\n   in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
17800    fn write<___R>(
17801        &self,
17802        request: ___R,
17803    ) -> Result<
17804        ::fidl_next::ResponseFuture<'_, Self::Transport, writable::Write>,
17805        ::fidl_next::EncodeError,
17806    >
17807    where
17808        ___R: ::fidl_next::Encode<
17809            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
17810            Encoded = crate::WireWritableWriteRequest<'static>,
17811        >;
17812}
17813
17814impl<___T> WritableClientSender for ::fidl_next::ClientSender<___T, Writable>
17815where
17816    ___T: ::fidl_next::Transport,
17817{
17818    type Transport = ___T;
17819
17820    #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file and return a\n   successful write of zero bytes.  The seek offset is still updated if\n   in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
17821    fn write<___R>(
17822        &self,
17823        request: ___R,
17824    ) -> Result<
17825        ::fidl_next::ResponseFuture<'_, Self::Transport, writable::Write>,
17826        ::fidl_next::EncodeError,
17827    >
17828    where
17829        ___R: ::fidl_next::Encode<
17830            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
17831            Encoded = crate::WireWritableWriteRequest<'static>,
17832        >,
17833    {
17834        self.as_untyped()
17835            .send_two_way(7651971425397809026, request)
17836            .map(::fidl_next::ResponseFuture::from_untyped)
17837    }
17838}
17839
17840/// A client handler for the Writable protocol.
17841///
17842/// See [`Writable`] for more details.
17843pub trait WritableClientHandler<___T: ::fidl_next::Transport> {}
17844
17845impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Writable
17846where
17847    ___T: ::fidl_next::Transport,
17848    ___H: WritableClientHandler<___T>,
17849
17850    <writable::Write as ::fidl_next::Method>::Response:
17851        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
17852{
17853    fn on_event(
17854        handler: &mut ___H,
17855        sender: &::fidl_next::ClientSender<___T, Self>,
17856        ordinal: u64,
17857        buffer: ___T::RecvBuffer,
17858    ) {
17859        match ordinal {
17860            ordinal => {
17861                sender.close();
17862            }
17863        }
17864    }
17865}
17866
17867/// A helper trait for the `Writable` server sender.
17868pub trait WritableServerSender {
17869    type Transport: ::fidl_next::Transport;
17870}
17871
17872impl<___T> WritableServerSender for ::fidl_next::ServerSender<___T, Writable>
17873where
17874    ___T: ::fidl_next::Transport,
17875{
17876    type Transport = ___T;
17877}
17878
17879/// A server handler for the Writable protocol.
17880///
17881/// See [`Writable`] for more details.
17882pub trait WritableServerHandler<___T: ::fidl_next::Transport> {
17883    #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file and return a\n   successful write of zero bytes.  The seek offset is still updated if\n   in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
17884    fn write(
17885        &mut self,
17886        sender: &::fidl_next::ServerSender<___T, Writable>,
17887
17888        request: ::fidl_next::Request<___T, writable::Write>,
17889
17890        responder: ::fidl_next::Responder<writable::Write>,
17891    );
17892}
17893
17894impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Writable
17895where
17896    ___T: ::fidl_next::Transport,
17897    ___H: WritableServerHandler<___T>,
17898
17899    <writable::Write as ::fidl_next::Method>::Request:
17900        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
17901{
17902    fn on_one_way(
17903        handler: &mut ___H,
17904        sender: &::fidl_next::ServerSender<___T, Self>,
17905        ordinal: u64,
17906        buffer: ___T::RecvBuffer,
17907    ) {
17908        match ordinal {
17909            ordinal => {
17910                sender.close();
17911            }
17912        }
17913    }
17914
17915    fn on_two_way(
17916        handler: &mut ___H,
17917        sender: &::fidl_next::ServerSender<___T, Self>,
17918        ordinal: u64,
17919        buffer: ___T::RecvBuffer,
17920        responder: ::fidl_next::protocol::Responder,
17921    ) {
17922        match ordinal {
17923            7651971425397809026 => {
17924                let responder = ::fidl_next::Responder::from_untyped(responder);
17925
17926                match ::fidl_next::DecoderExt::decode(buffer) {
17927                    Ok(decoded) => handler.write(sender, decoded, responder),
17928                    Err(e) => {
17929                        sender.close();
17930                    }
17931                }
17932            }
17933
17934            ordinal => {
17935                sender.close();
17936            }
17937        }
17938    }
17939}
17940
17941#[derive(Clone, Debug)]
17942pub struct FileSeekRequest {
17943    pub origin: crate::SeekOrigin,
17944
17945    pub offset: i64,
17946}
17947
17948impl ::fidl_next::Encodable for FileSeekRequest {
17949    type Encoded = WireFileSeekRequest;
17950}
17951
17952unsafe impl<___E> ::fidl_next::Encode<___E> for FileSeekRequest
17953where
17954    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17955{
17956    #[inline]
17957    fn encode(
17958        self,
17959        encoder: &mut ___E,
17960        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
17961    ) -> Result<(), ::fidl_next::EncodeError> {
17962        ::fidl_next::munge! {
17963            let Self::Encoded {
17964                origin,
17965                offset,
17966
17967            } = out;
17968        }
17969
17970        ::fidl_next::Encode::encode(self.origin, encoder, origin)?;
17971
17972        ::fidl_next::Encode::encode(self.offset, encoder, offset)?;
17973
17974        Ok(())
17975    }
17976}
17977
17978unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileSeekRequest
17979where
17980    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17981{
17982    #[inline]
17983    fn encode_ref(
17984        &self,
17985        encoder: &mut ___E,
17986        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
17987    ) -> Result<(), ::fidl_next::EncodeError> {
17988        ::fidl_next::munge! {
17989            let Self::Encoded {
17990                origin,
17991                offset,
17992
17993            } = out;
17994        }
17995
17996        ::fidl_next::EncodeRef::encode_ref(&self.origin, encoder, origin)?;
17997
17998        ::fidl_next::EncodeRef::encode_ref(&self.offset, encoder, offset)?;
17999
18000        Ok(())
18001    }
18002}
18003
18004impl ::fidl_next::EncodableOption for FileSeekRequest {
18005    type EncodedOption = ::fidl_next::WireBox<'static, WireFileSeekRequest>;
18006}
18007
18008unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileSeekRequest
18009where
18010    ___E: ::fidl_next::Encoder + ?Sized,
18011    FileSeekRequest: ::fidl_next::Encode<___E>,
18012{
18013    #[inline]
18014    fn encode_option(
18015        this: Option<Self>,
18016        encoder: &mut ___E,
18017        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18018    ) -> Result<(), ::fidl_next::EncodeError> {
18019        if let Some(inner) = this {
18020            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18021            ::fidl_next::WireBox::encode_present(out);
18022        } else {
18023            ::fidl_next::WireBox::encode_absent(out);
18024        }
18025
18026        Ok(())
18027    }
18028}
18029
18030unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FileSeekRequest
18031where
18032    ___E: ::fidl_next::Encoder + ?Sized,
18033    FileSeekRequest: ::fidl_next::EncodeRef<___E>,
18034{
18035    #[inline]
18036    fn encode_option_ref(
18037        this: Option<&Self>,
18038        encoder: &mut ___E,
18039        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18040    ) -> Result<(), ::fidl_next::EncodeError> {
18041        if let Some(inner) = this {
18042            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18043            ::fidl_next::WireBox::encode_present(out);
18044        } else {
18045            ::fidl_next::WireBox::encode_absent(out);
18046        }
18047
18048        Ok(())
18049    }
18050}
18051
18052impl ::fidl_next::FromWire<WireFileSeekRequest> for FileSeekRequest {
18053    #[inline]
18054    fn from_wire(wire: WireFileSeekRequest) -> Self {
18055        Self {
18056            origin: ::fidl_next::FromWire::from_wire(wire.origin),
18057
18058            offset: ::fidl_next::FromWire::from_wire(wire.offset),
18059        }
18060    }
18061}
18062
18063impl ::fidl_next::FromWireRef<WireFileSeekRequest> for FileSeekRequest {
18064    #[inline]
18065    fn from_wire_ref(wire: &WireFileSeekRequest) -> Self {
18066        Self {
18067            origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
18068
18069            offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
18070        }
18071    }
18072}
18073
18074/// The wire type corresponding to [`FileSeekRequest`].
18075#[derive(Clone, Debug)]
18076#[repr(C)]
18077pub struct WireFileSeekRequest {
18078    pub origin: crate::WireSeekOrigin,
18079
18080    pub offset: ::fidl_next::WireI64,
18081}
18082
18083unsafe impl ::fidl_next::Wire for WireFileSeekRequest {
18084    type Decoded<'de> = WireFileSeekRequest;
18085
18086    #[inline]
18087    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
18088        unsafe {
18089            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
18090        }
18091    }
18092}
18093
18094unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileSeekRequest
18095where
18096    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18097{
18098    fn decode(
18099        slot: ::fidl_next::Slot<'_, Self>,
18100        decoder: &mut ___D,
18101    ) -> Result<(), ::fidl_next::DecodeError> {
18102        ::fidl_next::munge! {
18103            let Self {
18104                mut origin,
18105                mut offset,
18106
18107            } = slot;
18108        }
18109
18110        ::fidl_next::Decode::decode(origin.as_mut(), decoder)?;
18111
18112        ::fidl_next::Decode::decode(offset.as_mut(), decoder)?;
18113
18114        Ok(())
18115    }
18116}
18117
18118#[derive(Clone, Debug)]
18119#[repr(C)]
18120pub struct FileSeekResponse {
18121    pub offset_from_start: u64,
18122}
18123
18124impl ::fidl_next::Encodable for FileSeekResponse {
18125    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireFileSeekResponse> = unsafe {
18126        ::fidl_next::CopyOptimization::enable_if(
18127            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
18128        )
18129    };
18130
18131    type Encoded = WireFileSeekResponse;
18132}
18133
18134unsafe impl<___E> ::fidl_next::Encode<___E> for FileSeekResponse
18135where
18136    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18137{
18138    #[inline]
18139    fn encode(
18140        self,
18141        encoder: &mut ___E,
18142        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18143    ) -> Result<(), ::fidl_next::EncodeError> {
18144        ::fidl_next::munge! {
18145            let Self::Encoded {
18146                offset_from_start,
18147
18148            } = out;
18149        }
18150
18151        ::fidl_next::Encode::encode(self.offset_from_start, encoder, offset_from_start)?;
18152
18153        Ok(())
18154    }
18155}
18156
18157unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileSeekResponse
18158where
18159    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18160{
18161    #[inline]
18162    fn encode_ref(
18163        &self,
18164        encoder: &mut ___E,
18165        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18166    ) -> Result<(), ::fidl_next::EncodeError> {
18167        ::fidl_next::munge! {
18168            let Self::Encoded {
18169                offset_from_start,
18170
18171            } = out;
18172        }
18173
18174        ::fidl_next::EncodeRef::encode_ref(&self.offset_from_start, encoder, offset_from_start)?;
18175
18176        Ok(())
18177    }
18178}
18179
18180impl ::fidl_next::EncodableOption for FileSeekResponse {
18181    type EncodedOption = ::fidl_next::WireBox<'static, WireFileSeekResponse>;
18182}
18183
18184unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileSeekResponse
18185where
18186    ___E: ::fidl_next::Encoder + ?Sized,
18187    FileSeekResponse: ::fidl_next::Encode<___E>,
18188{
18189    #[inline]
18190    fn encode_option(
18191        this: Option<Self>,
18192        encoder: &mut ___E,
18193        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18194    ) -> Result<(), ::fidl_next::EncodeError> {
18195        if let Some(inner) = this {
18196            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18197            ::fidl_next::WireBox::encode_present(out);
18198        } else {
18199            ::fidl_next::WireBox::encode_absent(out);
18200        }
18201
18202        Ok(())
18203    }
18204}
18205
18206unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FileSeekResponse
18207where
18208    ___E: ::fidl_next::Encoder + ?Sized,
18209    FileSeekResponse: ::fidl_next::EncodeRef<___E>,
18210{
18211    #[inline]
18212    fn encode_option_ref(
18213        this: Option<&Self>,
18214        encoder: &mut ___E,
18215        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18216    ) -> Result<(), ::fidl_next::EncodeError> {
18217        if let Some(inner) = this {
18218            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18219            ::fidl_next::WireBox::encode_present(out);
18220        } else {
18221            ::fidl_next::WireBox::encode_absent(out);
18222        }
18223
18224        Ok(())
18225    }
18226}
18227
18228impl ::fidl_next::FromWire<WireFileSeekResponse> for FileSeekResponse {
18229    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireFileSeekResponse, Self> = unsafe {
18230        ::fidl_next::CopyOptimization::enable_if(
18231            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
18232                .is_enabled(),
18233        )
18234    };
18235
18236    #[inline]
18237    fn from_wire(wire: WireFileSeekResponse) -> Self {
18238        Self { offset_from_start: ::fidl_next::FromWire::from_wire(wire.offset_from_start) }
18239    }
18240}
18241
18242impl ::fidl_next::FromWireRef<WireFileSeekResponse> for FileSeekResponse {
18243    #[inline]
18244    fn from_wire_ref(wire: &WireFileSeekResponse) -> Self {
18245        Self { offset_from_start: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset_from_start) }
18246    }
18247}
18248
18249/// The wire type corresponding to [`FileSeekResponse`].
18250#[derive(Clone, Debug)]
18251#[repr(C)]
18252pub struct WireFileSeekResponse {
18253    pub offset_from_start: ::fidl_next::WireU64,
18254}
18255
18256unsafe impl ::fidl_next::Wire for WireFileSeekResponse {
18257    type Decoded<'de> = WireFileSeekResponse;
18258
18259    #[inline]
18260    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
18261}
18262
18263unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileSeekResponse
18264where
18265    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18266{
18267    fn decode(
18268        slot: ::fidl_next::Slot<'_, Self>,
18269        decoder: &mut ___D,
18270    ) -> Result<(), ::fidl_next::DecodeError> {
18271        ::fidl_next::munge! {
18272            let Self {
18273                mut offset_from_start,
18274
18275            } = slot;
18276        }
18277
18278        ::fidl_next::Decode::decode(offset_from_start.as_mut(), decoder)?;
18279
18280        Ok(())
18281    }
18282}
18283
18284#[derive(Clone, Debug)]
18285#[repr(C)]
18286pub struct FileReadAtRequest {
18287    pub count: u64,
18288
18289    pub offset: u64,
18290}
18291
18292impl ::fidl_next::Encodable for FileReadAtRequest {
18293    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireFileReadAtRequest> = unsafe {
18294        ::fidl_next::CopyOptimization::enable_if(
18295            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
18296                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
18297        )
18298    };
18299
18300    type Encoded = WireFileReadAtRequest;
18301}
18302
18303unsafe impl<___E> ::fidl_next::Encode<___E> for FileReadAtRequest
18304where
18305    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18306{
18307    #[inline]
18308    fn encode(
18309        self,
18310        encoder: &mut ___E,
18311        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18312    ) -> Result<(), ::fidl_next::EncodeError> {
18313        ::fidl_next::munge! {
18314            let Self::Encoded {
18315                count,
18316                offset,
18317
18318            } = out;
18319        }
18320
18321        ::fidl_next::Encode::encode(self.count, encoder, count)?;
18322
18323        ::fidl_next::Encode::encode(self.offset, encoder, offset)?;
18324
18325        Ok(())
18326    }
18327}
18328
18329unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileReadAtRequest
18330where
18331    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18332{
18333    #[inline]
18334    fn encode_ref(
18335        &self,
18336        encoder: &mut ___E,
18337        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18338    ) -> Result<(), ::fidl_next::EncodeError> {
18339        ::fidl_next::munge! {
18340            let Self::Encoded {
18341                count,
18342                offset,
18343
18344            } = out;
18345        }
18346
18347        ::fidl_next::EncodeRef::encode_ref(&self.count, encoder, count)?;
18348
18349        ::fidl_next::EncodeRef::encode_ref(&self.offset, encoder, offset)?;
18350
18351        Ok(())
18352    }
18353}
18354
18355impl ::fidl_next::EncodableOption for FileReadAtRequest {
18356    type EncodedOption = ::fidl_next::WireBox<'static, WireFileReadAtRequest>;
18357}
18358
18359unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileReadAtRequest
18360where
18361    ___E: ::fidl_next::Encoder + ?Sized,
18362    FileReadAtRequest: ::fidl_next::Encode<___E>,
18363{
18364    #[inline]
18365    fn encode_option(
18366        this: Option<Self>,
18367        encoder: &mut ___E,
18368        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18369    ) -> Result<(), ::fidl_next::EncodeError> {
18370        if let Some(inner) = this {
18371            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18372            ::fidl_next::WireBox::encode_present(out);
18373        } else {
18374            ::fidl_next::WireBox::encode_absent(out);
18375        }
18376
18377        Ok(())
18378    }
18379}
18380
18381unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FileReadAtRequest
18382where
18383    ___E: ::fidl_next::Encoder + ?Sized,
18384    FileReadAtRequest: ::fidl_next::EncodeRef<___E>,
18385{
18386    #[inline]
18387    fn encode_option_ref(
18388        this: Option<&Self>,
18389        encoder: &mut ___E,
18390        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18391    ) -> Result<(), ::fidl_next::EncodeError> {
18392        if let Some(inner) = this {
18393            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18394            ::fidl_next::WireBox::encode_present(out);
18395        } else {
18396            ::fidl_next::WireBox::encode_absent(out);
18397        }
18398
18399        Ok(())
18400    }
18401}
18402
18403impl ::fidl_next::FromWire<WireFileReadAtRequest> for FileReadAtRequest {
18404    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireFileReadAtRequest, Self> = unsafe {
18405        ::fidl_next::CopyOptimization::enable_if(
18406            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
18407                .is_enabled()
18408                && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
18409                    .is_enabled(),
18410        )
18411    };
18412
18413    #[inline]
18414    fn from_wire(wire: WireFileReadAtRequest) -> Self {
18415        Self {
18416            count: ::fidl_next::FromWire::from_wire(wire.count),
18417
18418            offset: ::fidl_next::FromWire::from_wire(wire.offset),
18419        }
18420    }
18421}
18422
18423impl ::fidl_next::FromWireRef<WireFileReadAtRequest> for FileReadAtRequest {
18424    #[inline]
18425    fn from_wire_ref(wire: &WireFileReadAtRequest) -> Self {
18426        Self {
18427            count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count),
18428
18429            offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
18430        }
18431    }
18432}
18433
18434/// The wire type corresponding to [`FileReadAtRequest`].
18435#[derive(Clone, Debug)]
18436#[repr(C)]
18437pub struct WireFileReadAtRequest {
18438    pub count: ::fidl_next::WireU64,
18439
18440    pub offset: ::fidl_next::WireU64,
18441}
18442
18443unsafe impl ::fidl_next::Wire for WireFileReadAtRequest {
18444    type Decoded<'de> = WireFileReadAtRequest;
18445
18446    #[inline]
18447    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
18448}
18449
18450unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileReadAtRequest
18451where
18452    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18453{
18454    fn decode(
18455        slot: ::fidl_next::Slot<'_, Self>,
18456        decoder: &mut ___D,
18457    ) -> Result<(), ::fidl_next::DecodeError> {
18458        ::fidl_next::munge! {
18459            let Self {
18460                mut count,
18461                mut offset,
18462
18463            } = slot;
18464        }
18465
18466        ::fidl_next::Decode::decode(count.as_mut(), decoder)?;
18467
18468        ::fidl_next::Decode::decode(offset.as_mut(), decoder)?;
18469
18470        Ok(())
18471    }
18472}
18473
18474#[derive(Clone, Debug)]
18475pub struct FileReadAtResponse {
18476    pub data: Vec<u8>,
18477}
18478
18479impl ::fidl_next::Encodable for FileReadAtResponse {
18480    type Encoded = WireFileReadAtResponse<'static>;
18481}
18482
18483unsafe impl<___E> ::fidl_next::Encode<___E> for FileReadAtResponse
18484where
18485    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18486
18487    ___E: ::fidl_next::Encoder,
18488{
18489    #[inline]
18490    fn encode(
18491        self,
18492        encoder: &mut ___E,
18493        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18494    ) -> Result<(), ::fidl_next::EncodeError> {
18495        ::fidl_next::munge! {
18496            let Self::Encoded {
18497                data,
18498
18499            } = out;
18500        }
18501
18502        ::fidl_next::Encode::encode(self.data, encoder, data)?;
18503
18504        Ok(())
18505    }
18506}
18507
18508unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileReadAtResponse
18509where
18510    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18511
18512    ___E: ::fidl_next::Encoder,
18513{
18514    #[inline]
18515    fn encode_ref(
18516        &self,
18517        encoder: &mut ___E,
18518        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18519    ) -> Result<(), ::fidl_next::EncodeError> {
18520        ::fidl_next::munge! {
18521            let Self::Encoded {
18522                data,
18523
18524            } = out;
18525        }
18526
18527        ::fidl_next::EncodeRef::encode_ref(&self.data, encoder, data)?;
18528
18529        Ok(())
18530    }
18531}
18532
18533impl ::fidl_next::EncodableOption for FileReadAtResponse {
18534    type EncodedOption = ::fidl_next::WireBox<'static, WireFileReadAtResponse<'static>>;
18535}
18536
18537unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileReadAtResponse
18538where
18539    ___E: ::fidl_next::Encoder + ?Sized,
18540    FileReadAtResponse: ::fidl_next::Encode<___E>,
18541{
18542    #[inline]
18543    fn encode_option(
18544        this: Option<Self>,
18545        encoder: &mut ___E,
18546        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18547    ) -> Result<(), ::fidl_next::EncodeError> {
18548        if let Some(inner) = this {
18549            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18550            ::fidl_next::WireBox::encode_present(out);
18551        } else {
18552            ::fidl_next::WireBox::encode_absent(out);
18553        }
18554
18555        Ok(())
18556    }
18557}
18558
18559unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FileReadAtResponse
18560where
18561    ___E: ::fidl_next::Encoder + ?Sized,
18562    FileReadAtResponse: ::fidl_next::EncodeRef<___E>,
18563{
18564    #[inline]
18565    fn encode_option_ref(
18566        this: Option<&Self>,
18567        encoder: &mut ___E,
18568        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18569    ) -> Result<(), ::fidl_next::EncodeError> {
18570        if let Some(inner) = this {
18571            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18572            ::fidl_next::WireBox::encode_present(out);
18573        } else {
18574            ::fidl_next::WireBox::encode_absent(out);
18575        }
18576
18577        Ok(())
18578    }
18579}
18580
18581impl<'de> ::fidl_next::FromWire<WireFileReadAtResponse<'de>> for FileReadAtResponse {
18582    #[inline]
18583    fn from_wire(wire: WireFileReadAtResponse<'de>) -> Self {
18584        Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
18585    }
18586}
18587
18588impl<'de> ::fidl_next::FromWireRef<WireFileReadAtResponse<'de>> for FileReadAtResponse {
18589    #[inline]
18590    fn from_wire_ref(wire: &WireFileReadAtResponse<'de>) -> Self {
18591        Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
18592    }
18593}
18594
18595/// The wire type corresponding to [`FileReadAtResponse`].
18596#[derive(Debug)]
18597#[repr(C)]
18598pub struct WireFileReadAtResponse<'de> {
18599    pub data: ::fidl_next::WireVector<'de, u8>,
18600}
18601
18602unsafe impl ::fidl_next::Wire for WireFileReadAtResponse<'static> {
18603    type Decoded<'de> = WireFileReadAtResponse<'de>;
18604
18605    #[inline]
18606    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
18607}
18608
18609unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileReadAtResponse<'static>
18610where
18611    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18612
18613    ___D: ::fidl_next::Decoder,
18614{
18615    fn decode(
18616        slot: ::fidl_next::Slot<'_, Self>,
18617        decoder: &mut ___D,
18618    ) -> Result<(), ::fidl_next::DecodeError> {
18619        ::fidl_next::munge! {
18620            let Self {
18621                mut data,
18622
18623            } = slot;
18624        }
18625
18626        ::fidl_next::Decode::decode(data.as_mut(), decoder)?;
18627
18628        let data = unsafe { data.deref_unchecked() };
18629
18630        if data.len() > 8192 {
18631            return Err(::fidl_next::DecodeError::VectorTooLong {
18632                size: data.len() as u64,
18633                limit: 8192,
18634            });
18635        }
18636
18637        Ok(())
18638    }
18639}
18640
18641#[derive(Clone, Debug)]
18642pub struct FileWriteAtRequest {
18643    pub data: Vec<u8>,
18644
18645    pub offset: u64,
18646}
18647
18648impl ::fidl_next::Encodable for FileWriteAtRequest {
18649    type Encoded = WireFileWriteAtRequest<'static>;
18650}
18651
18652unsafe impl<___E> ::fidl_next::Encode<___E> for FileWriteAtRequest
18653where
18654    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18655
18656    ___E: ::fidl_next::Encoder,
18657{
18658    #[inline]
18659    fn encode(
18660        self,
18661        encoder: &mut ___E,
18662        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18663    ) -> Result<(), ::fidl_next::EncodeError> {
18664        ::fidl_next::munge! {
18665            let Self::Encoded {
18666                data,
18667                offset,
18668
18669            } = out;
18670        }
18671
18672        ::fidl_next::Encode::encode(self.data, encoder, data)?;
18673
18674        ::fidl_next::Encode::encode(self.offset, encoder, offset)?;
18675
18676        Ok(())
18677    }
18678}
18679
18680unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileWriteAtRequest
18681where
18682    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18683
18684    ___E: ::fidl_next::Encoder,
18685{
18686    #[inline]
18687    fn encode_ref(
18688        &self,
18689        encoder: &mut ___E,
18690        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18691    ) -> Result<(), ::fidl_next::EncodeError> {
18692        ::fidl_next::munge! {
18693            let Self::Encoded {
18694                data,
18695                offset,
18696
18697            } = out;
18698        }
18699
18700        ::fidl_next::EncodeRef::encode_ref(&self.data, encoder, data)?;
18701
18702        ::fidl_next::EncodeRef::encode_ref(&self.offset, encoder, offset)?;
18703
18704        Ok(())
18705    }
18706}
18707
18708impl ::fidl_next::EncodableOption for FileWriteAtRequest {
18709    type EncodedOption = ::fidl_next::WireBox<'static, WireFileWriteAtRequest<'static>>;
18710}
18711
18712unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileWriteAtRequest
18713where
18714    ___E: ::fidl_next::Encoder + ?Sized,
18715    FileWriteAtRequest: ::fidl_next::Encode<___E>,
18716{
18717    #[inline]
18718    fn encode_option(
18719        this: Option<Self>,
18720        encoder: &mut ___E,
18721        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18722    ) -> Result<(), ::fidl_next::EncodeError> {
18723        if let Some(inner) = this {
18724            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18725            ::fidl_next::WireBox::encode_present(out);
18726        } else {
18727            ::fidl_next::WireBox::encode_absent(out);
18728        }
18729
18730        Ok(())
18731    }
18732}
18733
18734unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FileWriteAtRequest
18735where
18736    ___E: ::fidl_next::Encoder + ?Sized,
18737    FileWriteAtRequest: ::fidl_next::EncodeRef<___E>,
18738{
18739    #[inline]
18740    fn encode_option_ref(
18741        this: Option<&Self>,
18742        encoder: &mut ___E,
18743        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18744    ) -> Result<(), ::fidl_next::EncodeError> {
18745        if let Some(inner) = this {
18746            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18747            ::fidl_next::WireBox::encode_present(out);
18748        } else {
18749            ::fidl_next::WireBox::encode_absent(out);
18750        }
18751
18752        Ok(())
18753    }
18754}
18755
18756impl<'de> ::fidl_next::FromWire<WireFileWriteAtRequest<'de>> for FileWriteAtRequest {
18757    #[inline]
18758    fn from_wire(wire: WireFileWriteAtRequest<'de>) -> Self {
18759        Self {
18760            data: ::fidl_next::FromWire::from_wire(wire.data),
18761
18762            offset: ::fidl_next::FromWire::from_wire(wire.offset),
18763        }
18764    }
18765}
18766
18767impl<'de> ::fidl_next::FromWireRef<WireFileWriteAtRequest<'de>> for FileWriteAtRequest {
18768    #[inline]
18769    fn from_wire_ref(wire: &WireFileWriteAtRequest<'de>) -> Self {
18770        Self {
18771            data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data),
18772
18773            offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
18774        }
18775    }
18776}
18777
18778/// The wire type corresponding to [`FileWriteAtRequest`].
18779#[derive(Debug)]
18780#[repr(C)]
18781pub struct WireFileWriteAtRequest<'de> {
18782    pub data: ::fidl_next::WireVector<'de, u8>,
18783
18784    pub offset: ::fidl_next::WireU64,
18785}
18786
18787unsafe impl ::fidl_next::Wire for WireFileWriteAtRequest<'static> {
18788    type Decoded<'de> = WireFileWriteAtRequest<'de>;
18789
18790    #[inline]
18791    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
18792}
18793
18794unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileWriteAtRequest<'static>
18795where
18796    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18797
18798    ___D: ::fidl_next::Decoder,
18799{
18800    fn decode(
18801        slot: ::fidl_next::Slot<'_, Self>,
18802        decoder: &mut ___D,
18803    ) -> Result<(), ::fidl_next::DecodeError> {
18804        ::fidl_next::munge! {
18805            let Self {
18806                mut data,
18807                mut offset,
18808
18809            } = slot;
18810        }
18811
18812        ::fidl_next::Decode::decode(data.as_mut(), decoder)?;
18813
18814        let data = unsafe { data.deref_unchecked() };
18815
18816        if data.len() > 8192 {
18817            return Err(::fidl_next::DecodeError::VectorTooLong {
18818                size: data.len() as u64,
18819                limit: 8192,
18820            });
18821        }
18822
18823        ::fidl_next::Decode::decode(offset.as_mut(), decoder)?;
18824
18825        Ok(())
18826    }
18827}
18828
18829#[derive(Clone, Debug)]
18830#[repr(C)]
18831pub struct FileWriteAtResponse {
18832    pub actual_count: u64,
18833}
18834
18835impl ::fidl_next::Encodable for FileWriteAtResponse {
18836    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireFileWriteAtResponse> = unsafe {
18837        ::fidl_next::CopyOptimization::enable_if(
18838            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
18839        )
18840    };
18841
18842    type Encoded = WireFileWriteAtResponse;
18843}
18844
18845unsafe impl<___E> ::fidl_next::Encode<___E> for FileWriteAtResponse
18846where
18847    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18848{
18849    #[inline]
18850    fn encode(
18851        self,
18852        encoder: &mut ___E,
18853        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18854    ) -> Result<(), ::fidl_next::EncodeError> {
18855        ::fidl_next::munge! {
18856            let Self::Encoded {
18857                actual_count,
18858
18859            } = out;
18860        }
18861
18862        ::fidl_next::Encode::encode(self.actual_count, encoder, actual_count)?;
18863
18864        Ok(())
18865    }
18866}
18867
18868unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileWriteAtResponse
18869where
18870    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18871{
18872    #[inline]
18873    fn encode_ref(
18874        &self,
18875        encoder: &mut ___E,
18876        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
18877    ) -> Result<(), ::fidl_next::EncodeError> {
18878        ::fidl_next::munge! {
18879            let Self::Encoded {
18880                actual_count,
18881
18882            } = out;
18883        }
18884
18885        ::fidl_next::EncodeRef::encode_ref(&self.actual_count, encoder, actual_count)?;
18886
18887        Ok(())
18888    }
18889}
18890
18891impl ::fidl_next::EncodableOption for FileWriteAtResponse {
18892    type EncodedOption = ::fidl_next::WireBox<'static, WireFileWriteAtResponse>;
18893}
18894
18895unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileWriteAtResponse
18896where
18897    ___E: ::fidl_next::Encoder + ?Sized,
18898    FileWriteAtResponse: ::fidl_next::Encode<___E>,
18899{
18900    #[inline]
18901    fn encode_option(
18902        this: Option<Self>,
18903        encoder: &mut ___E,
18904        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18905    ) -> Result<(), ::fidl_next::EncodeError> {
18906        if let Some(inner) = this {
18907            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18908            ::fidl_next::WireBox::encode_present(out);
18909        } else {
18910            ::fidl_next::WireBox::encode_absent(out);
18911        }
18912
18913        Ok(())
18914    }
18915}
18916
18917unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FileWriteAtResponse
18918where
18919    ___E: ::fidl_next::Encoder + ?Sized,
18920    FileWriteAtResponse: ::fidl_next::EncodeRef<___E>,
18921{
18922    #[inline]
18923    fn encode_option_ref(
18924        this: Option<&Self>,
18925        encoder: &mut ___E,
18926        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
18927    ) -> Result<(), ::fidl_next::EncodeError> {
18928        if let Some(inner) = this {
18929            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
18930            ::fidl_next::WireBox::encode_present(out);
18931        } else {
18932            ::fidl_next::WireBox::encode_absent(out);
18933        }
18934
18935        Ok(())
18936    }
18937}
18938
18939impl ::fidl_next::FromWire<WireFileWriteAtResponse> for FileWriteAtResponse {
18940    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireFileWriteAtResponse, Self> = unsafe {
18941        ::fidl_next::CopyOptimization::enable_if(
18942            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
18943                .is_enabled(),
18944        )
18945    };
18946
18947    #[inline]
18948    fn from_wire(wire: WireFileWriteAtResponse) -> Self {
18949        Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
18950    }
18951}
18952
18953impl ::fidl_next::FromWireRef<WireFileWriteAtResponse> for FileWriteAtResponse {
18954    #[inline]
18955    fn from_wire_ref(wire: &WireFileWriteAtResponse) -> Self {
18956        Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
18957    }
18958}
18959
18960/// The wire type corresponding to [`FileWriteAtResponse`].
18961#[derive(Clone, Debug)]
18962#[repr(C)]
18963pub struct WireFileWriteAtResponse {
18964    pub actual_count: ::fidl_next::WireU64,
18965}
18966
18967unsafe impl ::fidl_next::Wire for WireFileWriteAtResponse {
18968    type Decoded<'de> = WireFileWriteAtResponse;
18969
18970    #[inline]
18971    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
18972}
18973
18974unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileWriteAtResponse
18975where
18976    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18977{
18978    fn decode(
18979        slot: ::fidl_next::Slot<'_, Self>,
18980        decoder: &mut ___D,
18981    ) -> Result<(), ::fidl_next::DecodeError> {
18982        ::fidl_next::munge! {
18983            let Self {
18984                mut actual_count,
18985
18986            } = slot;
18987        }
18988
18989        ::fidl_next::Decode::decode(actual_count.as_mut(), decoder)?;
18990
18991        Ok(())
18992    }
18993}
18994
18995#[derive(Clone, Debug)]
18996#[repr(C)]
18997pub struct FileResizeRequest {
18998    pub length: u64,
18999}
19000
19001impl ::fidl_next::Encodable for FileResizeRequest {
19002    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireFileResizeRequest> = unsafe {
19003        ::fidl_next::CopyOptimization::enable_if(
19004            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
19005        )
19006    };
19007
19008    type Encoded = WireFileResizeRequest;
19009}
19010
19011unsafe impl<___E> ::fidl_next::Encode<___E> for FileResizeRequest
19012where
19013    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19014{
19015    #[inline]
19016    fn encode(
19017        self,
19018        encoder: &mut ___E,
19019        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19020    ) -> Result<(), ::fidl_next::EncodeError> {
19021        ::fidl_next::munge! {
19022            let Self::Encoded {
19023                length,
19024
19025            } = out;
19026        }
19027
19028        ::fidl_next::Encode::encode(self.length, encoder, length)?;
19029
19030        Ok(())
19031    }
19032}
19033
19034unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileResizeRequest
19035where
19036    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19037{
19038    #[inline]
19039    fn encode_ref(
19040        &self,
19041        encoder: &mut ___E,
19042        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19043    ) -> Result<(), ::fidl_next::EncodeError> {
19044        ::fidl_next::munge! {
19045            let Self::Encoded {
19046                length,
19047
19048            } = out;
19049        }
19050
19051        ::fidl_next::EncodeRef::encode_ref(&self.length, encoder, length)?;
19052
19053        Ok(())
19054    }
19055}
19056
19057impl ::fidl_next::EncodableOption for FileResizeRequest {
19058    type EncodedOption = ::fidl_next::WireBox<'static, WireFileResizeRequest>;
19059}
19060
19061unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileResizeRequest
19062where
19063    ___E: ::fidl_next::Encoder + ?Sized,
19064    FileResizeRequest: ::fidl_next::Encode<___E>,
19065{
19066    #[inline]
19067    fn encode_option(
19068        this: Option<Self>,
19069        encoder: &mut ___E,
19070        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
19071    ) -> Result<(), ::fidl_next::EncodeError> {
19072        if let Some(inner) = this {
19073            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
19074            ::fidl_next::WireBox::encode_present(out);
19075        } else {
19076            ::fidl_next::WireBox::encode_absent(out);
19077        }
19078
19079        Ok(())
19080    }
19081}
19082
19083unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FileResizeRequest
19084where
19085    ___E: ::fidl_next::Encoder + ?Sized,
19086    FileResizeRequest: ::fidl_next::EncodeRef<___E>,
19087{
19088    #[inline]
19089    fn encode_option_ref(
19090        this: Option<&Self>,
19091        encoder: &mut ___E,
19092        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
19093    ) -> Result<(), ::fidl_next::EncodeError> {
19094        if let Some(inner) = this {
19095            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
19096            ::fidl_next::WireBox::encode_present(out);
19097        } else {
19098            ::fidl_next::WireBox::encode_absent(out);
19099        }
19100
19101        Ok(())
19102    }
19103}
19104
19105impl ::fidl_next::FromWire<WireFileResizeRequest> for FileResizeRequest {
19106    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireFileResizeRequest, Self> = unsafe {
19107        ::fidl_next::CopyOptimization::enable_if(
19108            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
19109                .is_enabled(),
19110        )
19111    };
19112
19113    #[inline]
19114    fn from_wire(wire: WireFileResizeRequest) -> Self {
19115        Self { length: ::fidl_next::FromWire::from_wire(wire.length) }
19116    }
19117}
19118
19119impl ::fidl_next::FromWireRef<WireFileResizeRequest> for FileResizeRequest {
19120    #[inline]
19121    fn from_wire_ref(wire: &WireFileResizeRequest) -> Self {
19122        Self { length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length) }
19123    }
19124}
19125
19126/// The wire type corresponding to [`FileResizeRequest`].
19127#[derive(Clone, Debug)]
19128#[repr(C)]
19129pub struct WireFileResizeRequest {
19130    pub length: ::fidl_next::WireU64,
19131}
19132
19133unsafe impl ::fidl_next::Wire for WireFileResizeRequest {
19134    type Decoded<'de> = WireFileResizeRequest;
19135
19136    #[inline]
19137    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
19138}
19139
19140unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileResizeRequest
19141where
19142    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19143{
19144    fn decode(
19145        slot: ::fidl_next::Slot<'_, Self>,
19146        decoder: &mut ___D,
19147    ) -> Result<(), ::fidl_next::DecodeError> {
19148        ::fidl_next::munge! {
19149            let Self {
19150                mut length,
19151
19152            } = slot;
19153        }
19154
19155        ::fidl_next::Decode::decode(length.as_mut(), decoder)?;
19156
19157        Ok(())
19158    }
19159}
19160
19161pub type FileResizeResponse = ();
19162
19163/// The wire type corresponding to [`FileResizeResponse`].
19164pub type WireFileResizeResponse = ();
19165
19166::fidl_next::bitflags! {
19167    #[derive(
19168        Clone,
19169        Copy,
19170        Debug,
19171        PartialEq,
19172        Eq,
19173        Hash,
19174    )]
19175    pub struct VmoFlags: u32 {
19176        #[doc = " Requests that the VMO be readable.\n"]const READ = 1;
19177        #[doc = " Requests that the VMO be writable.\n"]const WRITE = 2;
19178        #[doc = " Request that the VMO be executable.\n"]const EXECUTE = 4;
19179        #[doc = " Require a copy-on-write clone of the underlying VMO. The request\n should fail if the VMO cannot be cloned. May not be supplied\n with `SHARED_BUFFER`.\n\n A private clone uses at least the guarantees of the\n `ZX_VMO_CHILD_SNAPSHOT_AT_LEAST_ON_WRITE` flag to\n `zx_vmo_create_child()`. This means that the returned VMO will\n be copy-on-write (if `WRITE` is requested) but that it may or\n may not reflect subsequent content changes to the underlying\n file. The returned VMO will not reflect size changes to the\n file. These semantics match those of the POSIX `mmap()`\n `MAP_PRIVATE` flag.\n\n In some cases, clients requiring a guaranteed snapshot of the\n file can use `SHARED_BUFFER` and then use\n `zx_vmo_create_child()` with `ZX_VMO_CHILD_SNAPSHOT`. However,\n in addition to cases where the implementation can\'t return a\n `SHARED_BUFFER`, creating a full snapshot will fail if the VMO\n is attached to the pager. Since most filesystems will use the\n paging system, the full snapshot approach should only be used in\n specific cases where the client is talking to a known server.\n"]const PRIVATE_CLONE = 65536;
19180        #[doc = " Require a VMO that provides direct access to the contents of the\n file\'s underlying VMO. The request should fail if such a VMO\n cannot be provided. May not be supplied with `PRIVATE_CLONE`.\n\n The returned VMO may not be resizable even when `WRITE` access is\n requested. In this case, [`File.Resize`] should be used to resize\n the file.\n"]const SHARED_BUFFER = 131072;
19181
19182    }
19183}
19184
19185impl ::fidl_next::Encodable for VmoFlags {
19186    type Encoded = WireVmoFlags;
19187}
19188
19189unsafe impl<___E> ::fidl_next::Encode<___E> for VmoFlags
19190where
19191    ___E: ?Sized,
19192{
19193    #[inline]
19194    fn encode(
19195        self,
19196        encoder: &mut ___E,
19197        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19198    ) -> Result<(), ::fidl_next::EncodeError> {
19199        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
19200    }
19201}
19202
19203unsafe impl<___E> ::fidl_next::EncodeRef<___E> for VmoFlags
19204where
19205    ___E: ?Sized,
19206{
19207    #[inline]
19208    fn encode_ref(
19209        &self,
19210        _: &mut ___E,
19211        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19212    ) -> Result<(), ::fidl_next::EncodeError> {
19213        ::fidl_next::munge!(let WireVmoFlags { value } = out);
19214        let _ = value.write(::fidl_next::WireU32::from(self.bits()));
19215        Ok(())
19216    }
19217}
19218
19219impl ::core::convert::From<WireVmoFlags> for VmoFlags {
19220    fn from(wire: WireVmoFlags) -> Self {
19221        Self::from_bits_retain(u32::from(wire.value))
19222    }
19223}
19224
19225impl ::fidl_next::FromWire<WireVmoFlags> for VmoFlags {
19226    #[inline]
19227    fn from_wire(wire: WireVmoFlags) -> Self {
19228        Self::from(wire)
19229    }
19230}
19231
19232impl ::fidl_next::FromWireRef<WireVmoFlags> for VmoFlags {
19233    #[inline]
19234    fn from_wire_ref(wire: &WireVmoFlags) -> Self {
19235        Self::from(*wire)
19236    }
19237}
19238
19239/// The wire type corresponding to [`VmoFlags`].
19240#[derive(Clone, Copy, Debug)]
19241#[repr(transparent)]
19242pub struct WireVmoFlags {
19243    value: ::fidl_next::WireU32,
19244}
19245
19246unsafe impl ::fidl_next::Wire for WireVmoFlags {
19247    type Decoded<'de> = Self;
19248
19249    #[inline]
19250    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
19251        // Wire bits have no padding
19252    }
19253}
19254
19255unsafe impl<___D> ::fidl_next::Decode<___D> for WireVmoFlags
19256where
19257    ___D: ?Sized,
19258{
19259    fn decode(
19260        slot: ::fidl_next::Slot<'_, Self>,
19261        _: &mut ___D,
19262    ) -> Result<(), ::fidl_next::DecodeError> {
19263        ::fidl_next::munge!(let Self { value } = slot);
19264        let set = u32::from(*value);
19265        if set & !VmoFlags::all().bits() != 0 {
19266            return Err(::fidl_next::DecodeError::InvalidBits {
19267                expected: VmoFlags::all().bits() as usize,
19268                actual: set as usize,
19269            });
19270        }
19271
19272        Ok(())
19273    }
19274}
19275
19276impl ::core::convert::From<VmoFlags> for WireVmoFlags {
19277    fn from(natural: VmoFlags) -> Self {
19278        Self { value: ::fidl_next::WireU32::from(natural.bits()) }
19279    }
19280}
19281
19282#[derive(Clone, Debug)]
19283#[repr(C)]
19284pub struct FileGetBackingMemoryRequest {
19285    pub flags: crate::VmoFlags,
19286}
19287
19288impl ::fidl_next::Encodable for FileGetBackingMemoryRequest {
19289    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireFileGetBackingMemoryRequest> = unsafe {
19290        ::fidl_next::CopyOptimization::enable_if(
19291            true && <crate::VmoFlags as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
19292        )
19293    };
19294
19295    type Encoded = WireFileGetBackingMemoryRequest;
19296}
19297
19298unsafe impl<___E> ::fidl_next::Encode<___E> for FileGetBackingMemoryRequest
19299where
19300    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19301{
19302    #[inline]
19303    fn encode(
19304        self,
19305        encoder: &mut ___E,
19306        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19307    ) -> Result<(), ::fidl_next::EncodeError> {
19308        ::fidl_next::munge! {
19309            let Self::Encoded {
19310                flags,
19311
19312            } = out;
19313        }
19314
19315        ::fidl_next::Encode::encode(self.flags, encoder, flags)?;
19316
19317        Ok(())
19318    }
19319}
19320
19321unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileGetBackingMemoryRequest
19322where
19323    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19324{
19325    #[inline]
19326    fn encode_ref(
19327        &self,
19328        encoder: &mut ___E,
19329        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19330    ) -> Result<(), ::fidl_next::EncodeError> {
19331        ::fidl_next::munge! {
19332            let Self::Encoded {
19333                flags,
19334
19335            } = out;
19336        }
19337
19338        ::fidl_next::EncodeRef::encode_ref(&self.flags, encoder, flags)?;
19339
19340        Ok(())
19341    }
19342}
19343
19344impl ::fidl_next::EncodableOption for FileGetBackingMemoryRequest {
19345    type EncodedOption = ::fidl_next::WireBox<'static, WireFileGetBackingMemoryRequest>;
19346}
19347
19348unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileGetBackingMemoryRequest
19349where
19350    ___E: ::fidl_next::Encoder + ?Sized,
19351    FileGetBackingMemoryRequest: ::fidl_next::Encode<___E>,
19352{
19353    #[inline]
19354    fn encode_option(
19355        this: Option<Self>,
19356        encoder: &mut ___E,
19357        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
19358    ) -> Result<(), ::fidl_next::EncodeError> {
19359        if let Some(inner) = this {
19360            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
19361            ::fidl_next::WireBox::encode_present(out);
19362        } else {
19363            ::fidl_next::WireBox::encode_absent(out);
19364        }
19365
19366        Ok(())
19367    }
19368}
19369
19370unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FileGetBackingMemoryRequest
19371where
19372    ___E: ::fidl_next::Encoder + ?Sized,
19373    FileGetBackingMemoryRequest: ::fidl_next::EncodeRef<___E>,
19374{
19375    #[inline]
19376    fn encode_option_ref(
19377        this: Option<&Self>,
19378        encoder: &mut ___E,
19379        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
19380    ) -> Result<(), ::fidl_next::EncodeError> {
19381        if let Some(inner) = this {
19382            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
19383            ::fidl_next::WireBox::encode_present(out);
19384        } else {
19385            ::fidl_next::WireBox::encode_absent(out);
19386        }
19387
19388        Ok(())
19389    }
19390}
19391
19392impl ::fidl_next::FromWire<WireFileGetBackingMemoryRequest> for FileGetBackingMemoryRequest {
19393    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireFileGetBackingMemoryRequest, Self> = unsafe {
19394        ::fidl_next::CopyOptimization::enable_if(
19395            true
19396
19397                && <
19398                    crate::VmoFlags as ::fidl_next::FromWire<crate::WireVmoFlags>
19399                >::COPY_OPTIMIZATION.is_enabled()
19400
19401        )
19402    };
19403
19404    #[inline]
19405    fn from_wire(wire: WireFileGetBackingMemoryRequest) -> Self {
19406        Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
19407    }
19408}
19409
19410impl ::fidl_next::FromWireRef<WireFileGetBackingMemoryRequest> for FileGetBackingMemoryRequest {
19411    #[inline]
19412    fn from_wire_ref(wire: &WireFileGetBackingMemoryRequest) -> Self {
19413        Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
19414    }
19415}
19416
19417/// The wire type corresponding to [`FileGetBackingMemoryRequest`].
19418#[derive(Clone, Debug)]
19419#[repr(C)]
19420pub struct WireFileGetBackingMemoryRequest {
19421    pub flags: crate::WireVmoFlags,
19422}
19423
19424unsafe impl ::fidl_next::Wire for WireFileGetBackingMemoryRequest {
19425    type Decoded<'de> = WireFileGetBackingMemoryRequest;
19426
19427    #[inline]
19428    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
19429}
19430
19431unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileGetBackingMemoryRequest
19432where
19433    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19434{
19435    fn decode(
19436        slot: ::fidl_next::Slot<'_, Self>,
19437        decoder: &mut ___D,
19438    ) -> Result<(), ::fidl_next::DecodeError> {
19439        ::fidl_next::munge! {
19440            let Self {
19441                mut flags,
19442
19443            } = slot;
19444        }
19445
19446        ::fidl_next::Decode::decode(flags.as_mut(), decoder)?;
19447
19448        Ok(())
19449    }
19450}
19451
19452#[derive(Debug)]
19453#[repr(C)]
19454pub struct FileGetBackingMemoryResponse {
19455    pub vmo: ::fidl_next::fuchsia::zx::Handle,
19456}
19457
19458impl ::fidl_next::Encodable for FileGetBackingMemoryResponse {
19459    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireFileGetBackingMemoryResponse> = unsafe {
19460        ::fidl_next::CopyOptimization::enable_if(
19461            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
19462                .is_enabled(),
19463        )
19464    };
19465
19466    type Encoded = WireFileGetBackingMemoryResponse;
19467}
19468
19469unsafe impl<___E> ::fidl_next::Encode<___E> for FileGetBackingMemoryResponse
19470where
19471    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19472
19473    ___E: ::fidl_next::fuchsia::HandleEncoder,
19474{
19475    #[inline]
19476    fn encode(
19477        self,
19478        encoder: &mut ___E,
19479        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19480    ) -> Result<(), ::fidl_next::EncodeError> {
19481        ::fidl_next::munge! {
19482            let Self::Encoded {
19483                vmo,
19484
19485            } = out;
19486        }
19487
19488        ::fidl_next::Encode::encode(self.vmo, encoder, vmo)?;
19489
19490        Ok(())
19491    }
19492}
19493
19494impl ::fidl_next::EncodableOption for FileGetBackingMemoryResponse {
19495    type EncodedOption = ::fidl_next::WireBox<'static, WireFileGetBackingMemoryResponse>;
19496}
19497
19498unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileGetBackingMemoryResponse
19499where
19500    ___E: ::fidl_next::Encoder + ?Sized,
19501    FileGetBackingMemoryResponse: ::fidl_next::Encode<___E>,
19502{
19503    #[inline]
19504    fn encode_option(
19505        this: Option<Self>,
19506        encoder: &mut ___E,
19507        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
19508    ) -> Result<(), ::fidl_next::EncodeError> {
19509        if let Some(inner) = this {
19510            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
19511            ::fidl_next::WireBox::encode_present(out);
19512        } else {
19513            ::fidl_next::WireBox::encode_absent(out);
19514        }
19515
19516        Ok(())
19517    }
19518}
19519
19520impl ::fidl_next::FromWire<WireFileGetBackingMemoryResponse> for FileGetBackingMemoryResponse {
19521    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireFileGetBackingMemoryResponse, Self> = unsafe {
19522        ::fidl_next::CopyOptimization::enable_if(
19523            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::FromWire<
19524                ::fidl_next::fuchsia::WireHandle,
19525            >>::COPY_OPTIMIZATION
19526                .is_enabled(),
19527        )
19528    };
19529
19530    #[inline]
19531    fn from_wire(wire: WireFileGetBackingMemoryResponse) -> Self {
19532        Self { vmo: ::fidl_next::FromWire::from_wire(wire.vmo) }
19533    }
19534}
19535
19536/// The wire type corresponding to [`FileGetBackingMemoryResponse`].
19537#[derive(Debug)]
19538#[repr(C)]
19539pub struct WireFileGetBackingMemoryResponse {
19540    pub vmo: ::fidl_next::fuchsia::WireHandle,
19541}
19542
19543unsafe impl ::fidl_next::Wire for WireFileGetBackingMemoryResponse {
19544    type Decoded<'de> = WireFileGetBackingMemoryResponse;
19545
19546    #[inline]
19547    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
19548}
19549
19550unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileGetBackingMemoryResponse
19551where
19552    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19553
19554    ___D: ::fidl_next::fuchsia::HandleDecoder,
19555{
19556    fn decode(
19557        slot: ::fidl_next::Slot<'_, Self>,
19558        decoder: &mut ___D,
19559    ) -> Result<(), ::fidl_next::DecodeError> {
19560        ::fidl_next::munge! {
19561            let Self {
19562                mut vmo,
19563
19564            } = slot;
19565        }
19566
19567        ::fidl_next::Decode::decode(vmo.as_mut(), decoder)?;
19568
19569        Ok(())
19570    }
19571}
19572
19573#[derive(Debug)]
19574pub struct LinkableLinkIntoRequest {
19575    pub dst_parent_token: ::fidl_next::fuchsia::zx::Handle,
19576
19577    pub dst: String,
19578}
19579
19580impl ::fidl_next::Encodable for LinkableLinkIntoRequest {
19581    type Encoded = WireLinkableLinkIntoRequest<'static>;
19582}
19583
19584unsafe impl<___E> ::fidl_next::Encode<___E> for LinkableLinkIntoRequest
19585where
19586    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19587
19588    ___E: ::fidl_next::Encoder,
19589
19590    ___E: ::fidl_next::fuchsia::HandleEncoder,
19591{
19592    #[inline]
19593    fn encode(
19594        self,
19595        encoder: &mut ___E,
19596        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19597    ) -> Result<(), ::fidl_next::EncodeError> {
19598        ::fidl_next::munge! {
19599            let Self::Encoded {
19600                dst_parent_token,
19601                dst,
19602
19603            } = out;
19604        }
19605
19606        ::fidl_next::Encode::encode(self.dst_parent_token, encoder, dst_parent_token)?;
19607
19608        ::fidl_next::Encode::encode(self.dst, encoder, dst)?;
19609
19610        Ok(())
19611    }
19612}
19613
19614impl ::fidl_next::EncodableOption for LinkableLinkIntoRequest {
19615    type EncodedOption = ::fidl_next::WireBox<'static, WireLinkableLinkIntoRequest<'static>>;
19616}
19617
19618unsafe impl<___E> ::fidl_next::EncodeOption<___E> for LinkableLinkIntoRequest
19619where
19620    ___E: ::fidl_next::Encoder + ?Sized,
19621    LinkableLinkIntoRequest: ::fidl_next::Encode<___E>,
19622{
19623    #[inline]
19624    fn encode_option(
19625        this: Option<Self>,
19626        encoder: &mut ___E,
19627        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
19628    ) -> Result<(), ::fidl_next::EncodeError> {
19629        if let Some(inner) = this {
19630            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
19631            ::fidl_next::WireBox::encode_present(out);
19632        } else {
19633            ::fidl_next::WireBox::encode_absent(out);
19634        }
19635
19636        Ok(())
19637    }
19638}
19639
19640impl<'de> ::fidl_next::FromWire<WireLinkableLinkIntoRequest<'de>> for LinkableLinkIntoRequest {
19641    #[inline]
19642    fn from_wire(wire: WireLinkableLinkIntoRequest<'de>) -> Self {
19643        Self {
19644            dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
19645
19646            dst: ::fidl_next::FromWire::from_wire(wire.dst),
19647        }
19648    }
19649}
19650
19651/// The wire type corresponding to [`LinkableLinkIntoRequest`].
19652#[derive(Debug)]
19653#[repr(C)]
19654pub struct WireLinkableLinkIntoRequest<'de> {
19655    pub dst_parent_token: ::fidl_next::fuchsia::WireHandle,
19656
19657    pub dst: ::fidl_next::WireString<'de>,
19658}
19659
19660unsafe impl ::fidl_next::Wire for WireLinkableLinkIntoRequest<'static> {
19661    type Decoded<'de> = WireLinkableLinkIntoRequest<'de>;
19662
19663    #[inline]
19664    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
19665        unsafe {
19666            out.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
19667        }
19668    }
19669}
19670
19671unsafe impl<___D> ::fidl_next::Decode<___D> for WireLinkableLinkIntoRequest<'static>
19672where
19673    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
19674
19675    ___D: ::fidl_next::Decoder,
19676
19677    ___D: ::fidl_next::fuchsia::HandleDecoder,
19678{
19679    fn decode(
19680        slot: ::fidl_next::Slot<'_, Self>,
19681        decoder: &mut ___D,
19682    ) -> Result<(), ::fidl_next::DecodeError> {
19683        ::fidl_next::munge! {
19684            let Self {
19685                mut dst_parent_token,
19686                mut dst,
19687
19688            } = slot;
19689        }
19690
19691        ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder)?;
19692
19693        ::fidl_next::Decode::decode(dst.as_mut(), decoder)?;
19694
19695        let dst = unsafe { dst.deref_unchecked() };
19696
19697        if dst.len() > 255 {
19698            return Err(::fidl_next::DecodeError::VectorTooLong {
19699                size: dst.len() as u64,
19700                limit: 255,
19701            });
19702        }
19703
19704        Ok(())
19705    }
19706}
19707
19708pub type LinkableLinkIntoResponse = ();
19709
19710/// The wire type corresponding to [`LinkableLinkIntoResponse`].
19711pub type WireLinkableLinkIntoResponse = ();
19712
19713/// The type corresponding to the Linkable protocol.
19714#[derive(Debug)]
19715pub struct Linkable;
19716
19717pub mod linkable {
19718    pub mod prelude {
19719        pub use crate::{
19720            linkable, Linkable, LinkableClientHandler, LinkableClientSender, LinkableServerHandler,
19721            LinkableServerSender,
19722        };
19723
19724        pub use crate::LinkableLinkIntoRequest;
19725
19726        pub use crate::LinkableLinkIntoResponse;
19727    }
19728
19729    pub struct LinkInto;
19730
19731    impl ::fidl_next::Method for LinkInto {
19732        const ORDINAL: u64 = 6121399674497678964;
19733
19734        type Protocol = crate::Linkable;
19735
19736        type Request = crate::WireLinkableLinkIntoRequest<'static>;
19737
19738        type Response = ::fidl_next::WireResult<
19739            'static,
19740            crate::WireLinkableLinkIntoResponse,
19741            ::fidl_next::WireI32,
19742        >;
19743    }
19744}
19745
19746/// A helper trait for the `Linkable` client sender.
19747pub trait LinkableClientSender {
19748    type Transport: ::fidl_next::Transport;
19749
19750    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
19751    fn link_into<___R>(
19752        &self,
19753        request: ___R,
19754    ) -> Result<
19755        ::fidl_next::ResponseFuture<'_, Self::Transport, linkable::LinkInto>,
19756        ::fidl_next::EncodeError,
19757    >
19758    where
19759        ___R: ::fidl_next::Encode<
19760            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
19761            Encoded = crate::WireLinkableLinkIntoRequest<'static>,
19762        >;
19763}
19764
19765impl<___T> LinkableClientSender for ::fidl_next::ClientSender<___T, Linkable>
19766where
19767    ___T: ::fidl_next::Transport,
19768{
19769    type Transport = ___T;
19770
19771    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
19772    fn link_into<___R>(
19773        &self,
19774        request: ___R,
19775    ) -> Result<
19776        ::fidl_next::ResponseFuture<'_, Self::Transport, linkable::LinkInto>,
19777        ::fidl_next::EncodeError,
19778    >
19779    where
19780        ___R: ::fidl_next::Encode<
19781            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
19782            Encoded = crate::WireLinkableLinkIntoRequest<'static>,
19783        >,
19784    {
19785        self.as_untyped()
19786            .send_two_way(6121399674497678964, request)
19787            .map(::fidl_next::ResponseFuture::from_untyped)
19788    }
19789}
19790
19791/// A client handler for the Linkable protocol.
19792///
19793/// See [`Linkable`] for more details.
19794pub trait LinkableClientHandler<___T: ::fidl_next::Transport> {}
19795
19796impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Linkable
19797where
19798    ___T: ::fidl_next::Transport,
19799    ___H: LinkableClientHandler<___T>,
19800
19801    <linkable::LinkInto as ::fidl_next::Method>::Response:
19802        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
19803{
19804    fn on_event(
19805        handler: &mut ___H,
19806        sender: &::fidl_next::ClientSender<___T, Self>,
19807        ordinal: u64,
19808        buffer: ___T::RecvBuffer,
19809    ) {
19810        match ordinal {
19811            ordinal => {
19812                sender.close();
19813            }
19814        }
19815    }
19816}
19817
19818/// A helper trait for the `Linkable` server sender.
19819pub trait LinkableServerSender {
19820    type Transport: ::fidl_next::Transport;
19821}
19822
19823impl<___T> LinkableServerSender for ::fidl_next::ServerSender<___T, Linkable>
19824where
19825    ___T: ::fidl_next::Transport,
19826{
19827    type Transport = ___T;
19828}
19829
19830/// A server handler for the Linkable protocol.
19831///
19832/// See [`Linkable`] for more details.
19833pub trait LinkableServerHandler<___T: ::fidl_next::Transport> {
19834    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
19835    fn link_into(
19836        &mut self,
19837        sender: &::fidl_next::ServerSender<___T, Linkable>,
19838
19839        request: ::fidl_next::Request<___T, linkable::LinkInto>,
19840
19841        responder: ::fidl_next::Responder<linkable::LinkInto>,
19842    );
19843}
19844
19845impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Linkable
19846where
19847    ___T: ::fidl_next::Transport,
19848    ___H: LinkableServerHandler<___T>,
19849
19850    <linkable::LinkInto as ::fidl_next::Method>::Request:
19851        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
19852{
19853    fn on_one_way(
19854        handler: &mut ___H,
19855        sender: &::fidl_next::ServerSender<___T, Self>,
19856        ordinal: u64,
19857        buffer: ___T::RecvBuffer,
19858    ) {
19859        match ordinal {
19860            ordinal => {
19861                sender.close();
19862            }
19863        }
19864    }
19865
19866    fn on_two_way(
19867        handler: &mut ___H,
19868        sender: &::fidl_next::ServerSender<___T, Self>,
19869        ordinal: u64,
19870        buffer: ___T::RecvBuffer,
19871        responder: ::fidl_next::protocol::Responder,
19872    ) {
19873        match ordinal {
19874            6121399674497678964 => {
19875                let responder = ::fidl_next::Responder::from_untyped(responder);
19876
19877                match ::fidl_next::DecoderExt::decode(buffer) {
19878                    Ok(decoded) => handler.link_into(sender, decoded, responder),
19879                    Err(e) => {
19880                        sender.close();
19881                    }
19882                }
19883            }
19884
19885            ordinal => {
19886                sender.close();
19887            }
19888        }
19889    }
19890}
19891
19892#[derive(Debug)]
19893pub struct FileAllocateRequest {
19894    pub offset: u64,
19895
19896    pub length: u64,
19897
19898    pub mode: crate::AllocateMode,
19899}
19900
19901impl ::fidl_next::Encodable for FileAllocateRequest {
19902    type Encoded = WireFileAllocateRequest;
19903}
19904
19905unsafe impl<___E> ::fidl_next::Encode<___E> for FileAllocateRequest
19906where
19907    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19908
19909    ___E: ::fidl_next::fuchsia::HandleEncoder,
19910{
19911    #[inline]
19912    fn encode(
19913        self,
19914        encoder: &mut ___E,
19915        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
19916    ) -> Result<(), ::fidl_next::EncodeError> {
19917        ::fidl_next::munge! {
19918            let Self::Encoded {
19919                offset,
19920                length,
19921                mode,
19922
19923            } = out;
19924        }
19925
19926        ::fidl_next::Encode::encode(self.offset, encoder, offset)?;
19927
19928        ::fidl_next::Encode::encode(self.length, encoder, length)?;
19929
19930        ::fidl_next::Encode::encode(self.mode, encoder, mode)?;
19931
19932        Ok(())
19933    }
19934}
19935
19936impl ::fidl_next::EncodableOption for FileAllocateRequest {
19937    type EncodedOption = ::fidl_next::WireBox<'static, WireFileAllocateRequest>;
19938}
19939
19940unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileAllocateRequest
19941where
19942    ___E: ::fidl_next::Encoder + ?Sized,
19943    FileAllocateRequest: ::fidl_next::Encode<___E>,
19944{
19945    #[inline]
19946    fn encode_option(
19947        this: Option<Self>,
19948        encoder: &mut ___E,
19949        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
19950    ) -> Result<(), ::fidl_next::EncodeError> {
19951        if let Some(inner) = this {
19952            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
19953            ::fidl_next::WireBox::encode_present(out);
19954        } else {
19955            ::fidl_next::WireBox::encode_absent(out);
19956        }
19957
19958        Ok(())
19959    }
19960}
19961
19962impl ::fidl_next::FromWire<WireFileAllocateRequest> for FileAllocateRequest {
19963    #[inline]
19964    fn from_wire(wire: WireFileAllocateRequest) -> Self {
19965        Self {
19966            offset: ::fidl_next::FromWire::from_wire(wire.offset),
19967
19968            length: ::fidl_next::FromWire::from_wire(wire.length),
19969
19970            mode: ::fidl_next::FromWire::from_wire(wire.mode),
19971        }
19972    }
19973}
19974
19975/// The wire type corresponding to [`FileAllocateRequest`].
19976#[derive(Debug)]
19977#[repr(C)]
19978pub struct WireFileAllocateRequest {
19979    pub offset: ::fidl_next::WireU64,
19980
19981    pub length: ::fidl_next::WireU64,
19982
19983    pub mode: crate::WireAllocateMode,
19984}
19985
19986unsafe impl ::fidl_next::Wire for WireFileAllocateRequest {
19987    type Decoded<'de> = WireFileAllocateRequest;
19988
19989    #[inline]
19990    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
19991        unsafe {
19992            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
19993        }
19994    }
19995}
19996
19997unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileAllocateRequest
19998where
19999    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
20000
20001    ___D: ::fidl_next::fuchsia::HandleDecoder,
20002{
20003    fn decode(
20004        slot: ::fidl_next::Slot<'_, Self>,
20005        decoder: &mut ___D,
20006    ) -> Result<(), ::fidl_next::DecodeError> {
20007        ::fidl_next::munge! {
20008            let Self {
20009                mut offset,
20010                mut length,
20011                mut mode,
20012
20013            } = slot;
20014        }
20015
20016        ::fidl_next::Decode::decode(offset.as_mut(), decoder)?;
20017
20018        ::fidl_next::Decode::decode(length.as_mut(), decoder)?;
20019
20020        ::fidl_next::Decode::decode(mode.as_mut(), decoder)?;
20021
20022        Ok(())
20023    }
20024}
20025
20026pub type FileAllocateResponse = ();
20027
20028/// The wire type corresponding to [`FileAllocateResponse`].
20029pub type WireFileAllocateResponse = ();
20030
20031#[derive(Debug)]
20032pub struct FileEnableVerityRequest {
20033    pub options: crate::VerificationOptions,
20034}
20035
20036impl ::fidl_next::Encodable for FileEnableVerityRequest {
20037    type Encoded = WireFileEnableVerityRequest<'static>;
20038}
20039
20040unsafe impl<___E> ::fidl_next::Encode<___E> for FileEnableVerityRequest
20041where
20042    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
20043
20044    ___E: ::fidl_next::Encoder,
20045
20046    ___E: ::fidl_next::fuchsia::HandleEncoder,
20047{
20048    #[inline]
20049    fn encode(
20050        self,
20051        encoder: &mut ___E,
20052        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
20053    ) -> Result<(), ::fidl_next::EncodeError> {
20054        ::fidl_next::munge! {
20055            let Self::Encoded {
20056                options,
20057
20058            } = out;
20059        }
20060
20061        ::fidl_next::Encode::encode(self.options, encoder, options)?;
20062
20063        Ok(())
20064    }
20065}
20066
20067impl ::fidl_next::EncodableOption for FileEnableVerityRequest {
20068    type EncodedOption = ::fidl_next::WireBox<'static, WireFileEnableVerityRequest<'static>>;
20069}
20070
20071unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileEnableVerityRequest
20072where
20073    ___E: ::fidl_next::Encoder + ?Sized,
20074    FileEnableVerityRequest: ::fidl_next::Encode<___E>,
20075{
20076    #[inline]
20077    fn encode_option(
20078        this: Option<Self>,
20079        encoder: &mut ___E,
20080        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
20081    ) -> Result<(), ::fidl_next::EncodeError> {
20082        if let Some(inner) = this {
20083            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
20084            ::fidl_next::WireBox::encode_present(out);
20085        } else {
20086            ::fidl_next::WireBox::encode_absent(out);
20087        }
20088
20089        Ok(())
20090    }
20091}
20092
20093impl<'de> ::fidl_next::FromWire<WireFileEnableVerityRequest<'de>> for FileEnableVerityRequest {
20094    #[inline]
20095    fn from_wire(wire: WireFileEnableVerityRequest<'de>) -> Self {
20096        Self { options: ::fidl_next::FromWire::from_wire(wire.options) }
20097    }
20098}
20099
20100/// The wire type corresponding to [`FileEnableVerityRequest`].
20101#[derive(Debug)]
20102#[repr(C)]
20103pub struct WireFileEnableVerityRequest<'de> {
20104    pub options: crate::WireVerificationOptions<'de>,
20105}
20106
20107unsafe impl ::fidl_next::Wire for WireFileEnableVerityRequest<'static> {
20108    type Decoded<'de> = WireFileEnableVerityRequest<'de>;
20109
20110    #[inline]
20111    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
20112}
20113
20114unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileEnableVerityRequest<'static>
20115where
20116    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
20117
20118    ___D: ::fidl_next::Decoder,
20119
20120    ___D: ::fidl_next::fuchsia::HandleDecoder,
20121{
20122    fn decode(
20123        slot: ::fidl_next::Slot<'_, Self>,
20124        decoder: &mut ___D,
20125    ) -> Result<(), ::fidl_next::DecodeError> {
20126        ::fidl_next::munge! {
20127            let Self {
20128                mut options,
20129
20130            } = slot;
20131        }
20132
20133        ::fidl_next::Decode::decode(options.as_mut(), decoder)?;
20134
20135        Ok(())
20136    }
20137}
20138
20139pub type FileEnableVerityResponse = ();
20140
20141/// The wire type corresponding to [`FileEnableVerityResponse`].
20142pub type WireFileEnableVerityResponse = ();
20143
20144/// The type corresponding to the File protocol.
20145#[doc = " A [`Node`] which contains a sequence of bytes of definite length.\n\n NOTE: cloned connections do not share their seek offset with their source\n connection.\n"]
20146#[derive(Debug)]
20147pub struct File;
20148
20149impl ::fidl_next::Discoverable for File {
20150    const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
20151}
20152
20153pub mod file {
20154    pub mod prelude {
20155        pub use crate::{
20156            file, File, FileClientHandler, FileClientSender, FileServerHandler, FileServerSender,
20157        };
20158
20159        pub use crate::AdvisoryLockingAdvisoryLockRequest;
20160
20161        pub use crate::AdvisoryLockingAdvisoryLockResponse;
20162
20163        pub use crate::ExtendedAttributeValue;
20164
20165        pub use crate::FileAllocateRequest;
20166
20167        pub use crate::FileEnableVerityRequest;
20168
20169        pub use crate::FileGetBackingMemoryRequest;
20170
20171        pub use crate::FileInfo;
20172
20173        pub use crate::FileReadAtRequest;
20174
20175        pub use crate::FileResizeRequest;
20176
20177        pub use crate::FileSeekRequest;
20178
20179        pub use crate::FileWriteAtRequest;
20180
20181        pub use crate::FileAllocateResponse;
20182
20183        pub use crate::FileEnableVerityResponse;
20184
20185        pub use crate::FileGetBackingMemoryResponse;
20186
20187        pub use crate::FileReadAtResponse;
20188
20189        pub use crate::FileResizeResponse;
20190
20191        pub use crate::FileSeekResponse;
20192
20193        pub use crate::FileWriteAtResponse;
20194
20195        pub use crate::LinkableLinkIntoRequest;
20196
20197        pub use crate::LinkableLinkIntoResponse;
20198
20199        pub use crate::MutableNodeAttributes;
20200
20201        pub use crate::NodeAttributes2;
20202
20203        pub use crate::NodeDeprecatedCloneRequest;
20204
20205        pub use crate::NodeDeprecatedGetAttrResponse;
20206
20207        pub use crate::NodeDeprecatedGetFlagsResponse;
20208
20209        pub use crate::NodeDeprecatedSetAttrRequest;
20210
20211        pub use crate::NodeDeprecatedSetAttrResponse;
20212
20213        pub use crate::NodeDeprecatedSetFlagsRequest;
20214
20215        pub use crate::NodeDeprecatedSetFlagsResponse;
20216
20217        pub use crate::NodeGetAttributesRequest;
20218
20219        pub use crate::NodeGetExtendedAttributeRequest;
20220
20221        pub use crate::NodeListExtendedAttributesRequest;
20222
20223        pub use crate::NodeOnOpenRequest;
20224
20225        pub use crate::NodeQueryFilesystemResponse;
20226
20227        pub use crate::NodeRemoveExtendedAttributeRequest;
20228
20229        pub use crate::NodeSetExtendedAttributeRequest;
20230
20231        pub use crate::NodeSetFlagsRequest;
20232
20233        pub use crate::NodeGetFlagsResponse;
20234
20235        pub use crate::NodeRemoveExtendedAttributeResponse;
20236
20237        pub use crate::NodeSetExtendedAttributeResponse;
20238
20239        pub use crate::NodeSetFlagsResponse;
20240
20241        pub use crate::NodeSyncResponse;
20242
20243        pub use crate::NodeUpdateAttributesResponse;
20244
20245        pub use crate::ReadableReadRequest;
20246
20247        pub use crate::ReadableReadResponse;
20248
20249        pub use crate::Representation;
20250
20251        pub use crate::WritableWriteRequest;
20252
20253        pub use crate::WritableWriteResponse;
20254
20255        pub use ::fidl_next_fuchsia_unknown::CloneableCloneRequest;
20256
20257        pub use ::fidl_next_fuchsia_unknown::CloseableCloseResponse;
20258
20259        pub use ::fidl_next_fuchsia_unknown::QueryableQueryResponse;
20260    }
20261
20262    pub struct AdvisoryLock;
20263
20264    impl ::fidl_next::Method for AdvisoryLock {
20265        const ORDINAL: u64 = 7992130864415541162;
20266
20267        type Protocol = crate::File;
20268
20269        type Request = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>;
20270
20271        type Response = ::fidl_next::WireResult<
20272            'static,
20273            crate::WireAdvisoryLockingAdvisoryLockResponse,
20274            ::fidl_next::WireI32,
20275        >;
20276    }
20277
20278    pub struct LinkInto;
20279
20280    impl ::fidl_next::Method for LinkInto {
20281        const ORDINAL: u64 = 6121399674497678964;
20282
20283        type Protocol = crate::File;
20284
20285        type Request = crate::WireLinkableLinkIntoRequest<'static>;
20286
20287        type Response = ::fidl_next::WireResult<
20288            'static,
20289            crate::WireLinkableLinkIntoResponse,
20290            ::fidl_next::WireI32,
20291        >;
20292    }
20293
20294    pub struct Clone;
20295
20296    impl ::fidl_next::Method for Clone {
20297        const ORDINAL: u64 = 2366825959783828089;
20298
20299        type Protocol = crate::File;
20300
20301        type Request = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest;
20302
20303        type Response = ::fidl_next::Never;
20304    }
20305
20306    pub struct Close;
20307
20308    impl ::fidl_next::Method for Close {
20309        const ORDINAL: u64 = 6540867515453498750;
20310
20311        type Protocol = crate::File;
20312
20313        type Request = ();
20314
20315        type Response = ::fidl_next::WireResult<
20316            'static,
20317            ::fidl_next_fuchsia_unknown::WireCloseableCloseResponse,
20318            ::fidl_next::WireI32,
20319        >;
20320    }
20321
20322    pub struct Query;
20323
20324    impl ::fidl_next::Method for Query {
20325        const ORDINAL: u64 = 2763219980499352582;
20326
20327        type Protocol = crate::File;
20328
20329        type Request = ();
20330
20331        type Response = ::fidl_next_fuchsia_unknown::WireQueryableQueryResponse<'static>;
20332    }
20333
20334    pub struct DeprecatedClone;
20335
20336    impl ::fidl_next::Method for DeprecatedClone {
20337        const ORDINAL: u64 = 6512600400724287855;
20338
20339        type Protocol = crate::File;
20340
20341        type Request = crate::WireNodeDeprecatedCloneRequest;
20342
20343        type Response = ::fidl_next::Never;
20344    }
20345
20346    pub struct OnOpen;
20347
20348    impl ::fidl_next::Method for OnOpen {
20349        const ORDINAL: u64 = 9207534335756671346;
20350
20351        type Protocol = crate::File;
20352
20353        type Request = ::fidl_next::Never;
20354
20355        type Response = crate::WireNodeOnOpenRequest<'static>;
20356    }
20357
20358    pub struct DeprecatedGetAttr;
20359
20360    impl ::fidl_next::Method for DeprecatedGetAttr {
20361        const ORDINAL: u64 = 8689798978500614909;
20362
20363        type Protocol = crate::File;
20364
20365        type Request = ();
20366
20367        type Response = crate::WireNodeDeprecatedGetAttrResponse;
20368    }
20369
20370    pub struct DeprecatedSetAttr;
20371
20372    impl ::fidl_next::Method for DeprecatedSetAttr {
20373        const ORDINAL: u64 = 4721673413776871238;
20374
20375        type Protocol = crate::File;
20376
20377        type Request = crate::WireNodeDeprecatedSetAttrRequest;
20378
20379        type Response = crate::WireNodeDeprecatedSetAttrResponse;
20380    }
20381
20382    pub struct DeprecatedGetFlags;
20383
20384    impl ::fidl_next::Method for DeprecatedGetFlags {
20385        const ORDINAL: u64 = 6595803110182632097;
20386
20387        type Protocol = crate::File;
20388
20389        type Request = ();
20390
20391        type Response = crate::WireNodeDeprecatedGetFlagsResponse;
20392    }
20393
20394    pub struct DeprecatedSetFlags;
20395
20396    impl ::fidl_next::Method for DeprecatedSetFlags {
20397        const ORDINAL: u64 = 5950864159036794675;
20398
20399        type Protocol = crate::File;
20400
20401        type Request = crate::WireNodeDeprecatedSetFlagsRequest;
20402
20403        type Response = crate::WireNodeDeprecatedSetFlagsResponse;
20404    }
20405
20406    pub struct GetFlags;
20407
20408    impl ::fidl_next::Method for GetFlags {
20409        const ORDINAL: u64 = 105530239381466147;
20410
20411        type Protocol = crate::File;
20412
20413        type Request = ();
20414
20415        type Response = ::fidl_next::WireFlexibleResult<
20416            'static,
20417            crate::WireNodeGetFlagsResponse,
20418            ::fidl_next::WireI32,
20419        >;
20420    }
20421
20422    pub struct SetFlags;
20423
20424    impl ::fidl_next::Method for SetFlags {
20425        const ORDINAL: u64 = 6172186066099445416;
20426
20427        type Protocol = crate::File;
20428
20429        type Request = crate::WireNodeSetFlagsRequest;
20430
20431        type Response = ::fidl_next::WireFlexibleResult<
20432            'static,
20433            crate::WireNodeSetFlagsResponse,
20434            ::fidl_next::WireI32,
20435        >;
20436    }
20437
20438    pub struct QueryFilesystem;
20439
20440    impl ::fidl_next::Method for QueryFilesystem {
20441        const ORDINAL: u64 = 8013111122914313744;
20442
20443        type Protocol = crate::File;
20444
20445        type Request = ();
20446
20447        type Response = crate::WireNodeQueryFilesystemResponse<'static>;
20448    }
20449
20450    pub struct OnRepresentation;
20451
20452    impl ::fidl_next::Method for OnRepresentation {
20453        const ORDINAL: u64 = 6679970090861613324;
20454
20455        type Protocol = crate::File;
20456
20457        type Request = ::fidl_next::Never;
20458
20459        type Response = crate::WireRepresentation<'static>;
20460    }
20461
20462    pub struct GetAttributes;
20463
20464    impl ::fidl_next::Method for GetAttributes {
20465        const ORDINAL: u64 = 4414537700416816443;
20466
20467        type Protocol = crate::File;
20468
20469        type Request = crate::WireNodeGetAttributesRequest;
20470
20471        type Response = ::fidl_next::WireResult<
20472            'static,
20473            crate::WireNodeAttributes2<'static>,
20474            ::fidl_next::WireI32,
20475        >;
20476    }
20477
20478    pub struct UpdateAttributes;
20479
20480    impl ::fidl_next::Method for UpdateAttributes {
20481        const ORDINAL: u64 = 3677402239314018056;
20482
20483        type Protocol = crate::File;
20484
20485        type Request = crate::WireMutableNodeAttributes<'static>;
20486
20487        type Response = ::fidl_next::WireResult<
20488            'static,
20489            crate::WireNodeUpdateAttributesResponse,
20490            ::fidl_next::WireI32,
20491        >;
20492    }
20493
20494    pub struct Sync;
20495
20496    impl ::fidl_next::Method for Sync {
20497        const ORDINAL: u64 = 3196473584242777161;
20498
20499        type Protocol = crate::File;
20500
20501        type Request = ();
20502
20503        type Response =
20504            ::fidl_next::WireResult<'static, crate::WireNodeSyncResponse, ::fidl_next::WireI32>;
20505    }
20506
20507    pub struct ListExtendedAttributes;
20508
20509    impl ::fidl_next::Method for ListExtendedAttributes {
20510        const ORDINAL: u64 = 5431626189872037072;
20511
20512        type Protocol = crate::File;
20513
20514        type Request = crate::WireNodeListExtendedAttributesRequest;
20515
20516        type Response = ::fidl_next::Never;
20517    }
20518
20519    pub struct GetExtendedAttribute;
20520
20521    impl ::fidl_next::Method for GetExtendedAttribute {
20522        const ORDINAL: u64 = 5043930208506967771;
20523
20524        type Protocol = crate::File;
20525
20526        type Request = crate::WireNodeGetExtendedAttributeRequest<'static>;
20527
20528        type Response = ::fidl_next::WireResult<
20529            'static,
20530            crate::WireExtendedAttributeValue<'static>,
20531            ::fidl_next::WireI32,
20532        >;
20533    }
20534
20535    pub struct SetExtendedAttribute;
20536
20537    impl ::fidl_next::Method for SetExtendedAttribute {
20538        const ORDINAL: u64 = 5374223046099989052;
20539
20540        type Protocol = crate::File;
20541
20542        type Request = crate::WireNodeSetExtendedAttributeRequest<'static>;
20543
20544        type Response = ::fidl_next::WireResult<
20545            'static,
20546            crate::WireNodeSetExtendedAttributeResponse,
20547            ::fidl_next::WireI32,
20548        >;
20549    }
20550
20551    pub struct RemoveExtendedAttribute;
20552
20553    impl ::fidl_next::Method for RemoveExtendedAttribute {
20554        const ORDINAL: u64 = 8794297771444732717;
20555
20556        type Protocol = crate::File;
20557
20558        type Request = crate::WireNodeRemoveExtendedAttributeRequest<'static>;
20559
20560        type Response = ::fidl_next::WireResult<
20561            'static,
20562            crate::WireNodeRemoveExtendedAttributeResponse,
20563            ::fidl_next::WireI32,
20564        >;
20565    }
20566
20567    pub struct Read;
20568
20569    impl ::fidl_next::Method for Read {
20570        const ORDINAL: u64 = 395825947633028830;
20571
20572        type Protocol = crate::File;
20573
20574        type Request = crate::WireReadableReadRequest;
20575
20576        type Response = ::fidl_next::WireResult<
20577            'static,
20578            crate::WireReadableReadResponse<'static>,
20579            ::fidl_next::WireI32,
20580        >;
20581    }
20582
20583    pub struct Write;
20584
20585    impl ::fidl_next::Method for Write {
20586        const ORDINAL: u64 = 7651971425397809026;
20587
20588        type Protocol = crate::File;
20589
20590        type Request = crate::WireWritableWriteRequest<'static>;
20591
20592        type Response = ::fidl_next::WireResult<
20593            'static,
20594            crate::WireWritableWriteResponse,
20595            ::fidl_next::WireI32,
20596        >;
20597    }
20598
20599    pub struct Describe;
20600
20601    impl ::fidl_next::Method for Describe {
20602        const ORDINAL: u64 = 7545125870053689020;
20603
20604        type Protocol = crate::File;
20605
20606        type Request = ();
20607
20608        type Response = crate::WireFileInfo<'static>;
20609    }
20610
20611    pub struct Seek;
20612
20613    impl ::fidl_next::Method for Seek {
20614        const ORDINAL: u64 = 8649041485622956551;
20615
20616        type Protocol = crate::File;
20617
20618        type Request = crate::WireFileSeekRequest;
20619
20620        type Response =
20621            ::fidl_next::WireResult<'static, crate::WireFileSeekResponse, ::fidl_next::WireI32>;
20622    }
20623
20624    pub struct ReadAt;
20625
20626    impl ::fidl_next::Method for ReadAt {
20627        const ORDINAL: u64 = 1587416148701180478;
20628
20629        type Protocol = crate::File;
20630
20631        type Request = crate::WireFileReadAtRequest;
20632
20633        type Response = ::fidl_next::WireResult<
20634            'static,
20635            crate::WireFileReadAtResponse<'static>,
20636            ::fidl_next::WireI32,
20637        >;
20638    }
20639
20640    pub struct WriteAt;
20641
20642    impl ::fidl_next::Method for WriteAt {
20643        const ORDINAL: u64 = 8736683935131400491;
20644
20645        type Protocol = crate::File;
20646
20647        type Request = crate::WireFileWriteAtRequest<'static>;
20648
20649        type Response =
20650            ::fidl_next::WireResult<'static, crate::WireFileWriteAtResponse, ::fidl_next::WireI32>;
20651    }
20652
20653    pub struct Resize;
20654
20655    impl ::fidl_next::Method for Resize {
20656        const ORDINAL: u64 = 3134648685270758458;
20657
20658        type Protocol = crate::File;
20659
20660        type Request = crate::WireFileResizeRequest;
20661
20662        type Response =
20663            ::fidl_next::WireResult<'static, crate::WireFileResizeResponse, ::fidl_next::WireI32>;
20664    }
20665
20666    pub struct GetBackingMemory;
20667
20668    impl ::fidl_next::Method for GetBackingMemory {
20669        const ORDINAL: u64 = 46911652864194091;
20670
20671        type Protocol = crate::File;
20672
20673        type Request = crate::WireFileGetBackingMemoryRequest;
20674
20675        type Response = ::fidl_next::WireResult<
20676            'static,
20677            crate::WireFileGetBackingMemoryResponse,
20678            ::fidl_next::WireI32,
20679        >;
20680    }
20681
20682    pub struct Allocate;
20683
20684    impl ::fidl_next::Method for Allocate {
20685        const ORDINAL: u64 = 8645235848064269614;
20686
20687        type Protocol = crate::File;
20688
20689        type Request = crate::WireFileAllocateRequest;
20690
20691        type Response = ::fidl_next::WireFlexibleResult<
20692            'static,
20693            crate::WireFileAllocateResponse,
20694            ::fidl_next::WireI32,
20695        >;
20696    }
20697
20698    pub struct EnableVerity;
20699
20700    impl ::fidl_next::Method for EnableVerity {
20701        const ORDINAL: u64 = 3189145313204943035;
20702
20703        type Protocol = crate::File;
20704
20705        type Request = crate::WireFileEnableVerityRequest<'static>;
20706
20707        type Response = ::fidl_next::WireFlexibleResult<
20708            'static,
20709            crate::WireFileEnableVerityResponse,
20710            ::fidl_next::WireI32,
20711        >;
20712    }
20713}
20714
20715/// A helper trait for the `File` client sender.
20716pub trait FileClientSender {
20717    type Transport: ::fidl_next::Transport;
20718
20719    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
20720    fn advisory_lock<___R>(
20721        &self,
20722        request: ___R,
20723    ) -> Result<
20724        ::fidl_next::ResponseFuture<'_, Self::Transport, file::AdvisoryLock>,
20725        ::fidl_next::EncodeError,
20726    >
20727    where
20728        ___R: ::fidl_next::Encode<
20729            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20730            Encoded = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>,
20731        >;
20732
20733    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
20734    fn link_into<___R>(
20735        &self,
20736        request: ___R,
20737    ) -> Result<
20738        ::fidl_next::ResponseFuture<'_, Self::Transport, file::LinkInto>,
20739        ::fidl_next::EncodeError,
20740    >
20741    where
20742        ___R: ::fidl_next::Encode<
20743            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20744            Encoded = crate::WireLinkableLinkIntoRequest<'static>,
20745        >;
20746
20747    fn clone<___R>(
20748        &self,
20749        request: ___R,
20750    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
20751    where
20752        ___R: ::fidl_next::Encode<
20753            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20754            Encoded = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest,
20755        >;
20756
20757    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
20758    fn close(
20759        &self,
20760    ) -> Result<
20761        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Close>,
20762        ::fidl_next::EncodeError,
20763    >;
20764
20765    fn query(
20766        &self,
20767    ) -> Result<
20768        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Query>,
20769        ::fidl_next::EncodeError,
20770    >;
20771
20772    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
20773    fn deprecated_clone<___R>(
20774        &self,
20775        request: ___R,
20776    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
20777    where
20778        ___R: ::fidl_next::Encode<
20779            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20780            Encoded = crate::WireNodeDeprecatedCloneRequest,
20781        >;
20782
20783    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
20784    fn deprecated_get_attr(
20785        &self,
20786    ) -> Result<
20787        ::fidl_next::ResponseFuture<'_, Self::Transport, file::DeprecatedGetAttr>,
20788        ::fidl_next::EncodeError,
20789    >;
20790
20791    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
20792    fn deprecated_set_attr<___R>(
20793        &self,
20794        request: ___R,
20795    ) -> Result<
20796        ::fidl_next::ResponseFuture<'_, Self::Transport, file::DeprecatedSetAttr>,
20797        ::fidl_next::EncodeError,
20798    >
20799    where
20800        ___R: ::fidl_next::Encode<
20801            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20802            Encoded = crate::WireNodeDeprecatedSetAttrRequest,
20803        >;
20804
20805    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
20806    fn deprecated_get_flags(
20807        &self,
20808    ) -> Result<
20809        ::fidl_next::ResponseFuture<'_, Self::Transport, file::DeprecatedGetFlags>,
20810        ::fidl_next::EncodeError,
20811    >;
20812
20813    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
20814    fn deprecated_set_flags<___R>(
20815        &self,
20816        request: ___R,
20817    ) -> Result<
20818        ::fidl_next::ResponseFuture<'_, Self::Transport, file::DeprecatedSetFlags>,
20819        ::fidl_next::EncodeError,
20820    >
20821    where
20822        ___R: ::fidl_next::Encode<
20823            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20824            Encoded = crate::WireNodeDeprecatedSetFlagsRequest,
20825        >;
20826
20827    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
20828    fn get_flags(
20829        &self,
20830    ) -> Result<
20831        ::fidl_next::ResponseFuture<'_, Self::Transport, file::GetFlags>,
20832        ::fidl_next::EncodeError,
20833    >;
20834
20835    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
20836    fn set_flags<___R>(
20837        &self,
20838        request: ___R,
20839    ) -> Result<
20840        ::fidl_next::ResponseFuture<'_, Self::Transport, file::SetFlags>,
20841        ::fidl_next::EncodeError,
20842    >
20843    where
20844        ___R: ::fidl_next::Encode<
20845            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20846            Encoded = crate::WireNodeSetFlagsRequest,
20847        >;
20848
20849    #[doc = " Query the filesystem for filesystem-specific information.\n"]
20850    fn query_filesystem(
20851        &self,
20852    ) -> Result<
20853        ::fidl_next::ResponseFuture<'_, Self::Transport, file::QueryFilesystem>,
20854        ::fidl_next::EncodeError,
20855    >;
20856
20857    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
20858    fn get_attributes<___R>(
20859        &self,
20860        request: ___R,
20861    ) -> Result<
20862        ::fidl_next::ResponseFuture<'_, Self::Transport, file::GetAttributes>,
20863        ::fidl_next::EncodeError,
20864    >
20865    where
20866        ___R: ::fidl_next::Encode<
20867            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20868            Encoded = crate::WireNodeGetAttributesRequest,
20869        >;
20870
20871    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
20872    fn update_attributes<___R>(
20873        &self,
20874        request: ___R,
20875    ) -> Result<
20876        ::fidl_next::ResponseFuture<'_, Self::Transport, file::UpdateAttributes>,
20877        ::fidl_next::EncodeError,
20878    >
20879    where
20880        ___R: ::fidl_next::Encode<
20881            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20882            Encoded = crate::WireMutableNodeAttributes<'static>,
20883        >;
20884
20885    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
20886    fn sync(
20887        &self,
20888    ) -> Result<
20889        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Sync>,
20890        ::fidl_next::EncodeError,
20891    >;
20892
20893    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
20894    fn list_extended_attributes<___R>(
20895        &self,
20896        request: ___R,
20897    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
20898    where
20899        ___R: ::fidl_next::Encode<
20900            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20901            Encoded = crate::WireNodeListExtendedAttributesRequest,
20902        >;
20903
20904    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
20905    fn get_extended_attribute<___R>(
20906        &self,
20907        request: ___R,
20908    ) -> Result<
20909        ::fidl_next::ResponseFuture<'_, Self::Transport, file::GetExtendedAttribute>,
20910        ::fidl_next::EncodeError,
20911    >
20912    where
20913        ___R: ::fidl_next::Encode<
20914            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20915            Encoded = crate::WireNodeGetExtendedAttributeRequest<'static>,
20916        >;
20917
20918    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
20919    fn set_extended_attribute<___R>(
20920        &self,
20921        request: ___R,
20922    ) -> Result<
20923        ::fidl_next::ResponseFuture<'_, Self::Transport, file::SetExtendedAttribute>,
20924        ::fidl_next::EncodeError,
20925    >
20926    where
20927        ___R: ::fidl_next::Encode<
20928            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20929            Encoded = crate::WireNodeSetExtendedAttributeRequest<'static>,
20930        >;
20931
20932    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
20933    fn remove_extended_attribute<___R>(
20934        &self,
20935        request: ___R,
20936    ) -> Result<
20937        ::fidl_next::ResponseFuture<'_, Self::Transport, file::RemoveExtendedAttribute>,
20938        ::fidl_next::EncodeError,
20939    >
20940    where
20941        ___R: ::fidl_next::Encode<
20942            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20943            Encoded = crate::WireNodeRemoveExtendedAttributeRequest<'static>,
20944        >;
20945
20946    #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n   has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n   seek offset is already at or beyond the end of file, and no data could\n   be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually read anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
20947    fn read<___R>(
20948        &self,
20949        request: ___R,
20950    ) -> Result<
20951        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Read>,
20952        ::fidl_next::EncodeError,
20953    >
20954    where
20955        ___R: ::fidl_next::Encode<
20956            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20957            Encoded = crate::WireReadableReadRequest,
20958        >;
20959
20960    #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file and return a\n   successful write of zero bytes.  The seek offset is still updated if\n   in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
20961    fn write<___R>(
20962        &self,
20963        request: ___R,
20964    ) -> Result<
20965        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Write>,
20966        ::fidl_next::EncodeError,
20967    >
20968    where
20969        ___R: ::fidl_next::Encode<
20970            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20971            Encoded = crate::WireWritableWriteRequest<'static>,
20972        >;
20973
20974    fn describe(
20975        &self,
20976    ) -> Result<
20977        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Describe>,
20978        ::fidl_next::EncodeError,
20979    >;
20980
20981    #[doc = " Moves the offset at which the next invocation of [`Read`] or [`Write`]\n will occur. The seek offset is specific to each file connection.\n\n + request `origin` the reference point where `offset` will be based on.\n + request `offset` the number of bytes to seek.\n - response `offset_from_start` the adjusted seek offset, from the start\n   of the file.\n\n This method does not require any rights.\n"]
20982    fn seek<___R>(
20983        &self,
20984        request: ___R,
20985    ) -> Result<
20986        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Seek>,
20987        ::fidl_next::EncodeError,
20988    >
20989    where
20990        ___R: ::fidl_next::Encode<
20991            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
20992            Encoded = crate::WireFileSeekRequest,
20993        >;
20994
20995    #[doc = " Reads up to \'count\' bytes at the provided offset.\n Does not affect the seek offset.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that `ReadAt` has hit\n   the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that `offset`\n   is at or past the end of file, and no data can be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually reading anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
20996    fn read_at<___R>(
20997        &self,
20998        request: ___R,
20999    ) -> Result<
21000        ::fidl_next::ResponseFuture<'_, Self::Transport, file::ReadAt>,
21001        ::fidl_next::EncodeError,
21002    >
21003    where
21004        ___R: ::fidl_next::Encode<
21005            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21006            Encoded = crate::WireFileReadAtRequest,
21007        >;
21008
21009    #[doc = " Writes data at the provided offset.\n Does not affect the seek offset.\n\n The file size may grow if `offset` plus `data.length` is past the\n current end of file.\n\n + request `data` the byte buffer to write to the file.\n + request `offset` the offset from start of the file to begin writing.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file, and will return a\n   successful write of zero bytes.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
21010    fn write_at<___R>(
21011        &self,
21012        request: ___R,
21013    ) -> Result<
21014        ::fidl_next::ResponseFuture<'_, Self::Transport, file::WriteAt>,
21015        ::fidl_next::EncodeError,
21016    >
21017    where
21018        ___R: ::fidl_next::Encode<
21019            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21020            Encoded = crate::WireFileWriteAtRequest<'static>,
21021        >;
21022
21023    #[doc = " Shrinks or grows the file size to \'length\' bytes.\n\n If file size is reduced by this operation, the extra trailing data\'\n is discarded.\n If file size is increased by this operation, the extended area appears\n as if it was zeroed.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
21024    fn resize<___R>(
21025        &self,
21026        request: ___R,
21027    ) -> Result<
21028        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Resize>,
21029        ::fidl_next::EncodeError,
21030    >
21031    where
21032        ___R: ::fidl_next::Encode<
21033            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21034            Encoded = crate::WireFileResizeRequest,
21035        >;
21036
21037    #[doc = " Acquires a [`zx.Handle:VMO`] representing this file, if there is one,\n with the requested access rights.\n\n Implementations are not required to implement files backed by VMOs so\n this request may fail. Additionally, implementations may only support\n a certain subset of the flags. Clients should be prepared with fallback\n behavior if this request fails.\n\n If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the\n implementation is free to choose the semantics of the returned VMO.\n\n + request `flags` a [`VmoFlags`] indicating the desired mode of access.\n - response `vmo` the requested [`zx.Handle:VMO`].\n * error a [`zx.Status`] value indicating the failure.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].\n * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].\n * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].\n"]
21038    fn get_backing_memory<___R>(
21039        &self,
21040        request: ___R,
21041    ) -> Result<
21042        ::fidl_next::ResponseFuture<'_, Self::Transport, file::GetBackingMemory>,
21043        ::fidl_next::EncodeError,
21044    >
21045    where
21046        ___R: ::fidl_next::Encode<
21047            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21048            Encoded = crate::WireFileGetBackingMemoryRequest,
21049        >;
21050
21051    #[doc = " Pre-allocate on-disk space for this file.\n"]
21052    fn allocate<___R>(
21053        &self,
21054        request: ___R,
21055    ) -> Result<
21056        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Allocate>,
21057        ::fidl_next::EncodeError,
21058    >
21059    where
21060        ___R: ::fidl_next::Encode<
21061            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21062            Encoded = crate::WireFileAllocateRequest,
21063        >;
21064
21065    #[doc = " Enables verification for the file (permanently) which involves computing a merkle tree for\n the file. Forces a flush prior to building the merkle tree to ensure cached data is\n captured. Future reads will be verified against the computed merkle tree and writes will be\n rejected. This method can take some time to complete as it depends on the size of the file.\n This method can be aborted by closing the connection that this method was issued on.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.\n Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.\n Also returns any error that might arise from reading the file, or from flushing the file,\n such as `ZX_ERR_IO`.\n"]
21066    fn enable_verity<___R>(
21067        &self,
21068        request: ___R,
21069    ) -> Result<
21070        ::fidl_next::ResponseFuture<'_, Self::Transport, file::EnableVerity>,
21071        ::fidl_next::EncodeError,
21072    >
21073    where
21074        ___R: ::fidl_next::Encode<
21075            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21076            Encoded = crate::WireFileEnableVerityRequest<'static>,
21077        >;
21078}
21079
21080impl<___T> FileClientSender for ::fidl_next::ClientSender<___T, File>
21081where
21082    ___T: ::fidl_next::Transport,
21083{
21084    type Transport = ___T;
21085
21086    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
21087    fn advisory_lock<___R>(
21088        &self,
21089        request: ___R,
21090    ) -> Result<
21091        ::fidl_next::ResponseFuture<'_, Self::Transport, file::AdvisoryLock>,
21092        ::fidl_next::EncodeError,
21093    >
21094    where
21095        ___R: ::fidl_next::Encode<
21096            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21097            Encoded = crate::WireAdvisoryLockingAdvisoryLockRequest<'static>,
21098        >,
21099    {
21100        self.as_untyped()
21101            .send_two_way(7992130864415541162, request)
21102            .map(::fidl_next::ResponseFuture::from_untyped)
21103    }
21104
21105    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
21106    fn link_into<___R>(
21107        &self,
21108        request: ___R,
21109    ) -> Result<
21110        ::fidl_next::ResponseFuture<'_, Self::Transport, file::LinkInto>,
21111        ::fidl_next::EncodeError,
21112    >
21113    where
21114        ___R: ::fidl_next::Encode<
21115            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21116            Encoded = crate::WireLinkableLinkIntoRequest<'static>,
21117        >,
21118    {
21119        self.as_untyped()
21120            .send_two_way(6121399674497678964, request)
21121            .map(::fidl_next::ResponseFuture::from_untyped)
21122    }
21123
21124    fn clone<___R>(
21125        &self,
21126        request: ___R,
21127    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
21128    where
21129        ___R: ::fidl_next::Encode<
21130            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21131            Encoded = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest,
21132        >,
21133    {
21134        self.as_untyped().send_one_way(2366825959783828089, request)
21135    }
21136
21137    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
21138    fn close(
21139        &self,
21140    ) -> Result<
21141        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Close>,
21142        ::fidl_next::EncodeError,
21143    > {
21144        self.as_untyped()
21145            .send_two_way(6540867515453498750, ())
21146            .map(::fidl_next::ResponseFuture::from_untyped)
21147    }
21148
21149    fn query(
21150        &self,
21151    ) -> Result<
21152        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Query>,
21153        ::fidl_next::EncodeError,
21154    > {
21155        self.as_untyped()
21156            .send_two_way(2763219980499352582, ())
21157            .map(::fidl_next::ResponseFuture::from_untyped)
21158    }
21159
21160    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
21161    fn deprecated_clone<___R>(
21162        &self,
21163        request: ___R,
21164    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
21165    where
21166        ___R: ::fidl_next::Encode<
21167            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21168            Encoded = crate::WireNodeDeprecatedCloneRequest,
21169        >,
21170    {
21171        self.as_untyped().send_one_way(6512600400724287855, request)
21172    }
21173
21174    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
21175    fn deprecated_get_attr(
21176        &self,
21177    ) -> Result<
21178        ::fidl_next::ResponseFuture<'_, Self::Transport, file::DeprecatedGetAttr>,
21179        ::fidl_next::EncodeError,
21180    > {
21181        self.as_untyped()
21182            .send_two_way(8689798978500614909, ())
21183            .map(::fidl_next::ResponseFuture::from_untyped)
21184    }
21185
21186    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
21187    fn deprecated_set_attr<___R>(
21188        &self,
21189        request: ___R,
21190    ) -> Result<
21191        ::fidl_next::ResponseFuture<'_, Self::Transport, file::DeprecatedSetAttr>,
21192        ::fidl_next::EncodeError,
21193    >
21194    where
21195        ___R: ::fidl_next::Encode<
21196            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21197            Encoded = crate::WireNodeDeprecatedSetAttrRequest,
21198        >,
21199    {
21200        self.as_untyped()
21201            .send_two_way(4721673413776871238, request)
21202            .map(::fidl_next::ResponseFuture::from_untyped)
21203    }
21204
21205    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
21206    fn deprecated_get_flags(
21207        &self,
21208    ) -> Result<
21209        ::fidl_next::ResponseFuture<'_, Self::Transport, file::DeprecatedGetFlags>,
21210        ::fidl_next::EncodeError,
21211    > {
21212        self.as_untyped()
21213            .send_two_way(6595803110182632097, ())
21214            .map(::fidl_next::ResponseFuture::from_untyped)
21215    }
21216
21217    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
21218    fn deprecated_set_flags<___R>(
21219        &self,
21220        request: ___R,
21221    ) -> Result<
21222        ::fidl_next::ResponseFuture<'_, Self::Transport, file::DeprecatedSetFlags>,
21223        ::fidl_next::EncodeError,
21224    >
21225    where
21226        ___R: ::fidl_next::Encode<
21227            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21228            Encoded = crate::WireNodeDeprecatedSetFlagsRequest,
21229        >,
21230    {
21231        self.as_untyped()
21232            .send_two_way(5950864159036794675, request)
21233            .map(::fidl_next::ResponseFuture::from_untyped)
21234    }
21235
21236    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
21237    fn get_flags(
21238        &self,
21239    ) -> Result<
21240        ::fidl_next::ResponseFuture<'_, Self::Transport, file::GetFlags>,
21241        ::fidl_next::EncodeError,
21242    > {
21243        self.as_untyped()
21244            .send_two_way(105530239381466147, ())
21245            .map(::fidl_next::ResponseFuture::from_untyped)
21246    }
21247
21248    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
21249    fn set_flags<___R>(
21250        &self,
21251        request: ___R,
21252    ) -> Result<
21253        ::fidl_next::ResponseFuture<'_, Self::Transport, file::SetFlags>,
21254        ::fidl_next::EncodeError,
21255    >
21256    where
21257        ___R: ::fidl_next::Encode<
21258            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21259            Encoded = crate::WireNodeSetFlagsRequest,
21260        >,
21261    {
21262        self.as_untyped()
21263            .send_two_way(6172186066099445416, request)
21264            .map(::fidl_next::ResponseFuture::from_untyped)
21265    }
21266
21267    #[doc = " Query the filesystem for filesystem-specific information.\n"]
21268    fn query_filesystem(
21269        &self,
21270    ) -> Result<
21271        ::fidl_next::ResponseFuture<'_, Self::Transport, file::QueryFilesystem>,
21272        ::fidl_next::EncodeError,
21273    > {
21274        self.as_untyped()
21275            .send_two_way(8013111122914313744, ())
21276            .map(::fidl_next::ResponseFuture::from_untyped)
21277    }
21278
21279    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
21280    fn get_attributes<___R>(
21281        &self,
21282        request: ___R,
21283    ) -> Result<
21284        ::fidl_next::ResponseFuture<'_, Self::Transport, file::GetAttributes>,
21285        ::fidl_next::EncodeError,
21286    >
21287    where
21288        ___R: ::fidl_next::Encode<
21289            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21290            Encoded = crate::WireNodeGetAttributesRequest,
21291        >,
21292    {
21293        self.as_untyped()
21294            .send_two_way(4414537700416816443, request)
21295            .map(::fidl_next::ResponseFuture::from_untyped)
21296    }
21297
21298    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
21299    fn update_attributes<___R>(
21300        &self,
21301        request: ___R,
21302    ) -> Result<
21303        ::fidl_next::ResponseFuture<'_, Self::Transport, file::UpdateAttributes>,
21304        ::fidl_next::EncodeError,
21305    >
21306    where
21307        ___R: ::fidl_next::Encode<
21308            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21309            Encoded = crate::WireMutableNodeAttributes<'static>,
21310        >,
21311    {
21312        self.as_untyped()
21313            .send_two_way(3677402239314018056, request)
21314            .map(::fidl_next::ResponseFuture::from_untyped)
21315    }
21316
21317    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
21318    fn sync(
21319        &self,
21320    ) -> Result<
21321        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Sync>,
21322        ::fidl_next::EncodeError,
21323    > {
21324        self.as_untyped()
21325            .send_two_way(3196473584242777161, ())
21326            .map(::fidl_next::ResponseFuture::from_untyped)
21327    }
21328
21329    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
21330    fn list_extended_attributes<___R>(
21331        &self,
21332        request: ___R,
21333    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
21334    where
21335        ___R: ::fidl_next::Encode<
21336            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21337            Encoded = crate::WireNodeListExtendedAttributesRequest,
21338        >,
21339    {
21340        self.as_untyped().send_one_way(5431626189872037072, request)
21341    }
21342
21343    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
21344    fn get_extended_attribute<___R>(
21345        &self,
21346        request: ___R,
21347    ) -> Result<
21348        ::fidl_next::ResponseFuture<'_, Self::Transport, file::GetExtendedAttribute>,
21349        ::fidl_next::EncodeError,
21350    >
21351    where
21352        ___R: ::fidl_next::Encode<
21353            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21354            Encoded = crate::WireNodeGetExtendedAttributeRequest<'static>,
21355        >,
21356    {
21357        self.as_untyped()
21358            .send_two_way(5043930208506967771, request)
21359            .map(::fidl_next::ResponseFuture::from_untyped)
21360    }
21361
21362    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
21363    fn set_extended_attribute<___R>(
21364        &self,
21365        request: ___R,
21366    ) -> Result<
21367        ::fidl_next::ResponseFuture<'_, Self::Transport, file::SetExtendedAttribute>,
21368        ::fidl_next::EncodeError,
21369    >
21370    where
21371        ___R: ::fidl_next::Encode<
21372            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21373            Encoded = crate::WireNodeSetExtendedAttributeRequest<'static>,
21374        >,
21375    {
21376        self.as_untyped()
21377            .send_two_way(5374223046099989052, request)
21378            .map(::fidl_next::ResponseFuture::from_untyped)
21379    }
21380
21381    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
21382    fn remove_extended_attribute<___R>(
21383        &self,
21384        request: ___R,
21385    ) -> Result<
21386        ::fidl_next::ResponseFuture<'_, Self::Transport, file::RemoveExtendedAttribute>,
21387        ::fidl_next::EncodeError,
21388    >
21389    where
21390        ___R: ::fidl_next::Encode<
21391            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21392            Encoded = crate::WireNodeRemoveExtendedAttributeRequest<'static>,
21393        >,
21394    {
21395        self.as_untyped()
21396            .send_two_way(8794297771444732717, request)
21397            .map(::fidl_next::ResponseFuture::from_untyped)
21398    }
21399
21400    #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n   has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n   seek offset is already at or beyond the end of file, and no data could\n   be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually read anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
21401    fn read<___R>(
21402        &self,
21403        request: ___R,
21404    ) -> Result<
21405        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Read>,
21406        ::fidl_next::EncodeError,
21407    >
21408    where
21409        ___R: ::fidl_next::Encode<
21410            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21411            Encoded = crate::WireReadableReadRequest,
21412        >,
21413    {
21414        self.as_untyped()
21415            .send_two_way(395825947633028830, request)
21416            .map(::fidl_next::ResponseFuture::from_untyped)
21417    }
21418
21419    #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file and return a\n   successful write of zero bytes.  The seek offset is still updated if\n   in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
21420    fn write<___R>(
21421        &self,
21422        request: ___R,
21423    ) -> Result<
21424        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Write>,
21425        ::fidl_next::EncodeError,
21426    >
21427    where
21428        ___R: ::fidl_next::Encode<
21429            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21430            Encoded = crate::WireWritableWriteRequest<'static>,
21431        >,
21432    {
21433        self.as_untyped()
21434            .send_two_way(7651971425397809026, request)
21435            .map(::fidl_next::ResponseFuture::from_untyped)
21436    }
21437
21438    fn describe(
21439        &self,
21440    ) -> Result<
21441        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Describe>,
21442        ::fidl_next::EncodeError,
21443    > {
21444        self.as_untyped()
21445            .send_two_way(7545125870053689020, ())
21446            .map(::fidl_next::ResponseFuture::from_untyped)
21447    }
21448
21449    #[doc = " Moves the offset at which the next invocation of [`Read`] or [`Write`]\n will occur. The seek offset is specific to each file connection.\n\n + request `origin` the reference point where `offset` will be based on.\n + request `offset` the number of bytes to seek.\n - response `offset_from_start` the adjusted seek offset, from the start\n   of the file.\n\n This method does not require any rights.\n"]
21450    fn seek<___R>(
21451        &self,
21452        request: ___R,
21453    ) -> Result<
21454        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Seek>,
21455        ::fidl_next::EncodeError,
21456    >
21457    where
21458        ___R: ::fidl_next::Encode<
21459            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21460            Encoded = crate::WireFileSeekRequest,
21461        >,
21462    {
21463        self.as_untyped()
21464            .send_two_way(8649041485622956551, request)
21465            .map(::fidl_next::ResponseFuture::from_untyped)
21466    }
21467
21468    #[doc = " Reads up to \'count\' bytes at the provided offset.\n Does not affect the seek offset.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that `ReadAt` has hit\n   the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that `offset`\n   is at or past the end of file, and no data can be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually reading anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
21469    fn read_at<___R>(
21470        &self,
21471        request: ___R,
21472    ) -> Result<
21473        ::fidl_next::ResponseFuture<'_, Self::Transport, file::ReadAt>,
21474        ::fidl_next::EncodeError,
21475    >
21476    where
21477        ___R: ::fidl_next::Encode<
21478            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21479            Encoded = crate::WireFileReadAtRequest,
21480        >,
21481    {
21482        self.as_untyped()
21483            .send_two_way(1587416148701180478, request)
21484            .map(::fidl_next::ResponseFuture::from_untyped)
21485    }
21486
21487    #[doc = " Writes data at the provided offset.\n Does not affect the seek offset.\n\n The file size may grow if `offset` plus `data.length` is past the\n current end of file.\n\n + request `data` the byte buffer to write to the file.\n + request `offset` the offset from start of the file to begin writing.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file, and will return a\n   successful write of zero bytes.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
21488    fn write_at<___R>(
21489        &self,
21490        request: ___R,
21491    ) -> Result<
21492        ::fidl_next::ResponseFuture<'_, Self::Transport, file::WriteAt>,
21493        ::fidl_next::EncodeError,
21494    >
21495    where
21496        ___R: ::fidl_next::Encode<
21497            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21498            Encoded = crate::WireFileWriteAtRequest<'static>,
21499        >,
21500    {
21501        self.as_untyped()
21502            .send_two_way(8736683935131400491, request)
21503            .map(::fidl_next::ResponseFuture::from_untyped)
21504    }
21505
21506    #[doc = " Shrinks or grows the file size to \'length\' bytes.\n\n If file size is reduced by this operation, the extra trailing data\'\n is discarded.\n If file size is increased by this operation, the extended area appears\n as if it was zeroed.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
21507    fn resize<___R>(
21508        &self,
21509        request: ___R,
21510    ) -> Result<
21511        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Resize>,
21512        ::fidl_next::EncodeError,
21513    >
21514    where
21515        ___R: ::fidl_next::Encode<
21516            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21517            Encoded = crate::WireFileResizeRequest,
21518        >,
21519    {
21520        self.as_untyped()
21521            .send_two_way(3134648685270758458, request)
21522            .map(::fidl_next::ResponseFuture::from_untyped)
21523    }
21524
21525    #[doc = " Acquires a [`zx.Handle:VMO`] representing this file, if there is one,\n with the requested access rights.\n\n Implementations are not required to implement files backed by VMOs so\n this request may fail. Additionally, implementations may only support\n a certain subset of the flags. Clients should be prepared with fallback\n behavior if this request fails.\n\n If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the\n implementation is free to choose the semantics of the returned VMO.\n\n + request `flags` a [`VmoFlags`] indicating the desired mode of access.\n - response `vmo` the requested [`zx.Handle:VMO`].\n * error a [`zx.Status`] value indicating the failure.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].\n * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].\n * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].\n"]
21526    fn get_backing_memory<___R>(
21527        &self,
21528        request: ___R,
21529    ) -> Result<
21530        ::fidl_next::ResponseFuture<'_, Self::Transport, file::GetBackingMemory>,
21531        ::fidl_next::EncodeError,
21532    >
21533    where
21534        ___R: ::fidl_next::Encode<
21535            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21536            Encoded = crate::WireFileGetBackingMemoryRequest,
21537        >,
21538    {
21539        self.as_untyped()
21540            .send_two_way(46911652864194091, request)
21541            .map(::fidl_next::ResponseFuture::from_untyped)
21542    }
21543
21544    #[doc = " Pre-allocate on-disk space for this file.\n"]
21545    fn allocate<___R>(
21546        &self,
21547        request: ___R,
21548    ) -> Result<
21549        ::fidl_next::ResponseFuture<'_, Self::Transport, file::Allocate>,
21550        ::fidl_next::EncodeError,
21551    >
21552    where
21553        ___R: ::fidl_next::Encode<
21554            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21555            Encoded = crate::WireFileAllocateRequest,
21556        >,
21557    {
21558        self.as_untyped()
21559            .send_two_way(8645235848064269614, request)
21560            .map(::fidl_next::ResponseFuture::from_untyped)
21561    }
21562
21563    #[doc = " Enables verification for the file (permanently) which involves computing a merkle tree for\n the file. Forces a flush prior to building the merkle tree to ensure cached data is\n captured. Future reads will be verified against the computed merkle tree and writes will be\n rejected. This method can take some time to complete as it depends on the size of the file.\n This method can be aborted by closing the connection that this method was issued on.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.\n Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.\n Also returns any error that might arise from reading the file, or from flushing the file,\n such as `ZX_ERR_IO`.\n"]
21564    fn enable_verity<___R>(
21565        &self,
21566        request: ___R,
21567    ) -> Result<
21568        ::fidl_next::ResponseFuture<'_, Self::Transport, file::EnableVerity>,
21569        ::fidl_next::EncodeError,
21570    >
21571    where
21572        ___R: ::fidl_next::Encode<
21573            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21574            Encoded = crate::WireFileEnableVerityRequest<'static>,
21575        >,
21576    {
21577        self.as_untyped()
21578            .send_two_way(3189145313204943035, request)
21579            .map(::fidl_next::ResponseFuture::from_untyped)
21580    }
21581}
21582
21583/// A client handler for the File protocol.
21584///
21585/// See [`File`] for more details.
21586pub trait FileClientHandler<___T: ::fidl_next::Transport> {
21587    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
21588    fn on_open(
21589        &mut self,
21590        sender: &::fidl_next::ClientSender<___T, File>,
21591
21592        event: ::fidl_next::Response<___T, file::OnOpen>,
21593    );
21594
21595    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
21596    fn on_representation(
21597        &mut self,
21598        sender: &::fidl_next::ClientSender<___T, File>,
21599
21600        event: ::fidl_next::Response<___T, file::OnRepresentation>,
21601    );
21602
21603    fn on_unknown_interaction(
21604        &mut self,
21605        sender: &::fidl_next::ClientSender<___T, File>,
21606        ordinal: u64,
21607    ) {
21608        sender.close();
21609    }
21610}
21611
21612impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for File
21613where
21614    ___T: ::fidl_next::Transport,
21615    ___H: FileClientHandler<___T>,
21616
21617    <file::AdvisoryLock as ::fidl_next::Method>::Response:
21618        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21619
21620    <file::LinkInto as ::fidl_next::Method>::Response:
21621        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21622
21623    <file::Close as ::fidl_next::Method>::Response:
21624        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21625
21626    <file::Query as ::fidl_next::Method>::Response:
21627        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21628
21629    <file::OnOpen as ::fidl_next::Method>::Response:
21630        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21631
21632    <file::DeprecatedGetAttr as ::fidl_next::Method>::Response:
21633        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21634
21635    <file::DeprecatedSetAttr as ::fidl_next::Method>::Response:
21636        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21637
21638    <file::DeprecatedGetFlags as ::fidl_next::Method>::Response:
21639        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21640
21641    <file::DeprecatedSetFlags as ::fidl_next::Method>::Response:
21642        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21643
21644    <file::GetFlags as ::fidl_next::Method>::Response:
21645        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21646
21647    <file::SetFlags as ::fidl_next::Method>::Response:
21648        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21649
21650    <file::QueryFilesystem as ::fidl_next::Method>::Response:
21651        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21652
21653    <file::OnRepresentation as ::fidl_next::Method>::Response:
21654        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21655
21656    <file::GetAttributes as ::fidl_next::Method>::Response:
21657        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21658
21659    <file::UpdateAttributes as ::fidl_next::Method>::Response:
21660        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21661
21662    <file::Sync as ::fidl_next::Method>::Response:
21663        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21664
21665    <file::GetExtendedAttribute as ::fidl_next::Method>::Response:
21666        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21667
21668    <file::SetExtendedAttribute as ::fidl_next::Method>::Response:
21669        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21670
21671    <file::RemoveExtendedAttribute as ::fidl_next::Method>::Response:
21672        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21673
21674    <file::Read as ::fidl_next::Method>::Response:
21675        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21676
21677    <file::Write as ::fidl_next::Method>::Response:
21678        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21679
21680    <file::Describe as ::fidl_next::Method>::Response:
21681        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21682
21683    <file::Seek as ::fidl_next::Method>::Response:
21684        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21685
21686    <file::ReadAt as ::fidl_next::Method>::Response:
21687        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21688
21689    <file::WriteAt as ::fidl_next::Method>::Response:
21690        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21691
21692    <file::Resize as ::fidl_next::Method>::Response:
21693        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21694
21695    <file::GetBackingMemory as ::fidl_next::Method>::Response:
21696        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21697
21698    <file::Allocate as ::fidl_next::Method>::Response:
21699        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21700
21701    <file::EnableVerity as ::fidl_next::Method>::Response:
21702        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
21703{
21704    fn on_event(
21705        handler: &mut ___H,
21706        sender: &::fidl_next::ClientSender<___T, Self>,
21707        ordinal: u64,
21708        buffer: ___T::RecvBuffer,
21709    ) {
21710        match ordinal {
21711            9207534335756671346 => match ::fidl_next::DecoderExt::decode(buffer) {
21712                Ok(decoded) => handler.on_open(sender, decoded),
21713                Err(e) => {
21714                    sender.close();
21715                }
21716            },
21717
21718            6679970090861613324 => match ::fidl_next::DecoderExt::decode(buffer) {
21719                Ok(decoded) => handler.on_representation(sender, decoded),
21720                Err(e) => {
21721                    sender.close();
21722                }
21723            },
21724
21725            ordinal => handler.on_unknown_interaction(sender, ordinal),
21726        }
21727    }
21728}
21729
21730/// A helper trait for the `File` server sender.
21731pub trait FileServerSender {
21732    type Transport: ::fidl_next::Transport;
21733
21734    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
21735
21736    fn on_open<___R>(
21737        &self,
21738        request: ___R,
21739    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
21740    where
21741        ___R: ::fidl_next::Encode<
21742            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21743            Encoded = <file::OnOpen as ::fidl_next::Method>::Response,
21744        >;
21745
21746    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
21747
21748    fn on_representation<___R>(
21749        &self,
21750        request: ___R,
21751    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
21752    where
21753        ___R: ::fidl_next::Encode<
21754            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21755            Encoded = <file::OnRepresentation as ::fidl_next::Method>::Response,
21756        >;
21757}
21758
21759impl<___T> FileServerSender for ::fidl_next::ServerSender<___T, File>
21760where
21761    ___T: ::fidl_next::Transport,
21762{
21763    type Transport = ___T;
21764
21765    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
21766
21767    fn on_open<___R>(
21768        &self,
21769        request: ___R,
21770    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
21771    where
21772        ___R: ::fidl_next::Encode<
21773            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21774            Encoded = <file::OnOpen as ::fidl_next::Method>::Response,
21775        >,
21776    {
21777        self.as_untyped().send_event(9207534335756671346, request)
21778    }
21779
21780    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
21781
21782    fn on_representation<___R>(
21783        &self,
21784        request: ___R,
21785    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
21786    where
21787        ___R: ::fidl_next::Encode<
21788            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
21789            Encoded = <file::OnRepresentation as ::fidl_next::Method>::Response,
21790        >,
21791    {
21792        self.as_untyped().send_event(6679970090861613324, request)
21793    }
21794}
21795
21796/// A server handler for the File protocol.
21797///
21798/// See [`File`] for more details.
21799pub trait FileServerHandler<___T: ::fidl_next::Transport> {
21800    #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n   [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n   example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n   to acquire the given type of lock.\n"]
21801    fn advisory_lock(
21802        &mut self,
21803        sender: &::fidl_next::ServerSender<___T, File>,
21804
21805        request: ::fidl_next::Request<___T, file::AdvisoryLock>,
21806
21807        responder: ::fidl_next::Responder<file::AdvisoryLock>,
21808    );
21809
21810    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
21811    fn link_into(
21812        &mut self,
21813        sender: &::fidl_next::ServerSender<___T, File>,
21814
21815        request: ::fidl_next::Request<___T, file::LinkInto>,
21816
21817        responder: ::fidl_next::Responder<file::LinkInto>,
21818    );
21819
21820    fn clone(
21821        &mut self,
21822        sender: &::fidl_next::ServerSender<___T, File>,
21823
21824        request: ::fidl_next::Request<___T, file::Clone>,
21825    );
21826
21827    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
21828    fn close(
21829        &mut self,
21830        sender: &::fidl_next::ServerSender<___T, File>,
21831
21832        responder: ::fidl_next::Responder<file::Close>,
21833    );
21834
21835    fn query(
21836        &mut self,
21837        sender: &::fidl_next::ServerSender<___T, File>,
21838
21839        responder: ::fidl_next::Responder<file::Query>,
21840    );
21841
21842    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
21843    fn deprecated_clone(
21844        &mut self,
21845        sender: &::fidl_next::ServerSender<___T, File>,
21846
21847        request: ::fidl_next::Request<___T, file::DeprecatedClone>,
21848    );
21849
21850    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
21851    fn deprecated_get_attr(
21852        &mut self,
21853        sender: &::fidl_next::ServerSender<___T, File>,
21854
21855        responder: ::fidl_next::Responder<file::DeprecatedGetAttr>,
21856    );
21857
21858    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
21859    fn deprecated_set_attr(
21860        &mut self,
21861        sender: &::fidl_next::ServerSender<___T, File>,
21862
21863        request: ::fidl_next::Request<___T, file::DeprecatedSetAttr>,
21864
21865        responder: ::fidl_next::Responder<file::DeprecatedSetAttr>,
21866    );
21867
21868    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
21869    fn deprecated_get_flags(
21870        &mut self,
21871        sender: &::fidl_next::ServerSender<___T, File>,
21872
21873        responder: ::fidl_next::Responder<file::DeprecatedGetFlags>,
21874    );
21875
21876    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
21877    fn deprecated_set_flags(
21878        &mut self,
21879        sender: &::fidl_next::ServerSender<___T, File>,
21880
21881        request: ::fidl_next::Request<___T, file::DeprecatedSetFlags>,
21882
21883        responder: ::fidl_next::Responder<file::DeprecatedSetFlags>,
21884    );
21885
21886    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
21887    fn get_flags(
21888        &mut self,
21889        sender: &::fidl_next::ServerSender<___T, File>,
21890
21891        responder: ::fidl_next::Responder<file::GetFlags>,
21892    );
21893
21894    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
21895    fn set_flags(
21896        &mut self,
21897        sender: &::fidl_next::ServerSender<___T, File>,
21898
21899        request: ::fidl_next::Request<___T, file::SetFlags>,
21900
21901        responder: ::fidl_next::Responder<file::SetFlags>,
21902    );
21903
21904    #[doc = " Query the filesystem for filesystem-specific information.\n"]
21905    fn query_filesystem(
21906        &mut self,
21907        sender: &::fidl_next::ServerSender<___T, File>,
21908
21909        responder: ::fidl_next::Responder<file::QueryFilesystem>,
21910    );
21911
21912    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
21913    fn get_attributes(
21914        &mut self,
21915        sender: &::fidl_next::ServerSender<___T, File>,
21916
21917        request: ::fidl_next::Request<___T, file::GetAttributes>,
21918
21919        responder: ::fidl_next::Responder<file::GetAttributes>,
21920    );
21921
21922    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
21923    fn update_attributes(
21924        &mut self,
21925        sender: &::fidl_next::ServerSender<___T, File>,
21926
21927        request: ::fidl_next::Request<___T, file::UpdateAttributes>,
21928
21929        responder: ::fidl_next::Responder<file::UpdateAttributes>,
21930    );
21931
21932    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
21933    fn sync(
21934        &mut self,
21935        sender: &::fidl_next::ServerSender<___T, File>,
21936
21937        responder: ::fidl_next::Responder<file::Sync>,
21938    );
21939
21940    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
21941    fn list_extended_attributes(
21942        &mut self,
21943        sender: &::fidl_next::ServerSender<___T, File>,
21944
21945        request: ::fidl_next::Request<___T, file::ListExtendedAttributes>,
21946    );
21947
21948    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
21949    fn get_extended_attribute(
21950        &mut self,
21951        sender: &::fidl_next::ServerSender<___T, File>,
21952
21953        request: ::fidl_next::Request<___T, file::GetExtendedAttribute>,
21954
21955        responder: ::fidl_next::Responder<file::GetExtendedAttribute>,
21956    );
21957
21958    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
21959    fn set_extended_attribute(
21960        &mut self,
21961        sender: &::fidl_next::ServerSender<___T, File>,
21962
21963        request: ::fidl_next::Request<___T, file::SetExtendedAttribute>,
21964
21965        responder: ::fidl_next::Responder<file::SetExtendedAttribute>,
21966    );
21967
21968    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
21969    fn remove_extended_attribute(
21970        &mut self,
21971        sender: &::fidl_next::ServerSender<___T, File>,
21972
21973        request: ::fidl_next::Request<___T, file::RemoveExtendedAttribute>,
21974
21975        responder: ::fidl_next::Responder<file::RemoveExtendedAttribute>,
21976    );
21977
21978    #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n   has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n   seek offset is already at or beyond the end of file, and no data could\n   be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually read anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
21979    fn read(
21980        &mut self,
21981        sender: &::fidl_next::ServerSender<___T, File>,
21982
21983        request: ::fidl_next::Request<___T, file::Read>,
21984
21985        responder: ::fidl_next::Responder<file::Read>,
21986    );
21987
21988    #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file and return a\n   successful write of zero bytes.  The seek offset is still updated if\n   in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
21989    fn write(
21990        &mut self,
21991        sender: &::fidl_next::ServerSender<___T, File>,
21992
21993        request: ::fidl_next::Request<___T, file::Write>,
21994
21995        responder: ::fidl_next::Responder<file::Write>,
21996    );
21997
21998    fn describe(
21999        &mut self,
22000        sender: &::fidl_next::ServerSender<___T, File>,
22001
22002        responder: ::fidl_next::Responder<file::Describe>,
22003    );
22004
22005    #[doc = " Moves the offset at which the next invocation of [`Read`] or [`Write`]\n will occur. The seek offset is specific to each file connection.\n\n + request `origin` the reference point where `offset` will be based on.\n + request `offset` the number of bytes to seek.\n - response `offset_from_start` the adjusted seek offset, from the start\n   of the file.\n\n This method does not require any rights.\n"]
22006    fn seek(
22007        &mut self,
22008        sender: &::fidl_next::ServerSender<___T, File>,
22009
22010        request: ::fidl_next::Request<___T, file::Seek>,
22011
22012        responder: ::fidl_next::Responder<file::Seek>,
22013    );
22014
22015    #[doc = " Reads up to \'count\' bytes at the provided offset.\n Does not affect the seek offset.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that `ReadAt` has hit\n   the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that `offset`\n   is at or past the end of file, and no data can be read.\n * If `count` is zero, the server should perform all the checks ensuring\n   read access without actually reading anything, and return an empty\n   `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
22016    fn read_at(
22017        &mut self,
22018        sender: &::fidl_next::ServerSender<___T, File>,
22019
22020        request: ::fidl_next::Request<___T, file::ReadAt>,
22021
22022        responder: ::fidl_next::Responder<file::ReadAt>,
22023    );
22024
22025    #[doc = " Writes data at the provided offset.\n Does not affect the seek offset.\n\n The file size may grow if `offset` plus `data.length` is past the\n current end of file.\n\n + request `data` the byte buffer to write to the file.\n + request `offset` the offset from start of the file to begin writing.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n   space, `actual_count` may be less than `data.length`.  If no bytes\n   could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n   ensuring write access without mutating the file, and will return a\n   successful write of zero bytes.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
22026    fn write_at(
22027        &mut self,
22028        sender: &::fidl_next::ServerSender<___T, File>,
22029
22030        request: ::fidl_next::Request<___T, file::WriteAt>,
22031
22032        responder: ::fidl_next::Responder<file::WriteAt>,
22033    );
22034
22035    #[doc = " Shrinks or grows the file size to \'length\' bytes.\n\n If file size is reduced by this operation, the extra trailing data\'\n is discarded.\n If file size is increased by this operation, the extended area appears\n as if it was zeroed.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
22036    fn resize(
22037        &mut self,
22038        sender: &::fidl_next::ServerSender<___T, File>,
22039
22040        request: ::fidl_next::Request<___T, file::Resize>,
22041
22042        responder: ::fidl_next::Responder<file::Resize>,
22043    );
22044
22045    #[doc = " Acquires a [`zx.Handle:VMO`] representing this file, if there is one,\n with the requested access rights.\n\n Implementations are not required to implement files backed by VMOs so\n this request may fail. Additionally, implementations may only support\n a certain subset of the flags. Clients should be prepared with fallback\n behavior if this request fails.\n\n If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the\n implementation is free to choose the semantics of the returned VMO.\n\n + request `flags` a [`VmoFlags`] indicating the desired mode of access.\n - response `vmo` the requested [`zx.Handle:VMO`].\n * error a [`zx.Status`] value indicating the failure.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].\n * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].\n * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].\n"]
22046    fn get_backing_memory(
22047        &mut self,
22048        sender: &::fidl_next::ServerSender<___T, File>,
22049
22050        request: ::fidl_next::Request<___T, file::GetBackingMemory>,
22051
22052        responder: ::fidl_next::Responder<file::GetBackingMemory>,
22053    );
22054
22055    #[doc = " Pre-allocate on-disk space for this file.\n"]
22056    fn allocate(
22057        &mut self,
22058        sender: &::fidl_next::ServerSender<___T, File>,
22059
22060        request: ::fidl_next::Request<___T, file::Allocate>,
22061
22062        responder: ::fidl_next::Responder<file::Allocate>,
22063    );
22064
22065    #[doc = " Enables verification for the file (permanently) which involves computing a merkle tree for\n the file. Forces a flush prior to building the merkle tree to ensure cached data is\n captured. Future reads will be verified against the computed merkle tree and writes will be\n rejected. This method can take some time to complete as it depends on the size of the file.\n This method can be aborted by closing the connection that this method was issued on.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.\n Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.\n Also returns any error that might arise from reading the file, or from flushing the file,\n such as `ZX_ERR_IO`.\n"]
22066    fn enable_verity(
22067        &mut self,
22068        sender: &::fidl_next::ServerSender<___T, File>,
22069
22070        request: ::fidl_next::Request<___T, file::EnableVerity>,
22071
22072        responder: ::fidl_next::Responder<file::EnableVerity>,
22073    );
22074
22075    fn on_unknown_interaction(
22076        &mut self,
22077        sender: &::fidl_next::ServerSender<___T, File>,
22078        ordinal: u64,
22079    ) {
22080        sender.close();
22081    }
22082}
22083
22084impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for File
22085where
22086    ___T: ::fidl_next::Transport,
22087    ___H: FileServerHandler<___T>,
22088
22089    <file::AdvisoryLock as ::fidl_next::Method>::Request:
22090        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22091
22092    <file::LinkInto as ::fidl_next::Method>::Request:
22093        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22094
22095    <file::Clone as ::fidl_next::Method>::Request:
22096        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22097
22098    <file::DeprecatedClone as ::fidl_next::Method>::Request:
22099        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22100
22101    <file::DeprecatedSetAttr as ::fidl_next::Method>::Request:
22102        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22103
22104    <file::DeprecatedSetFlags as ::fidl_next::Method>::Request:
22105        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22106
22107    <file::SetFlags as ::fidl_next::Method>::Request:
22108        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22109
22110    <file::GetAttributes as ::fidl_next::Method>::Request:
22111        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22112
22113    <file::UpdateAttributes as ::fidl_next::Method>::Request:
22114        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22115
22116    <file::ListExtendedAttributes as ::fidl_next::Method>::Request:
22117        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22118
22119    <file::GetExtendedAttribute as ::fidl_next::Method>::Request:
22120        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22121
22122    <file::SetExtendedAttribute as ::fidl_next::Method>::Request:
22123        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22124
22125    <file::RemoveExtendedAttribute as ::fidl_next::Method>::Request:
22126        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22127
22128    <file::Read as ::fidl_next::Method>::Request:
22129        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22130
22131    <file::Write as ::fidl_next::Method>::Request:
22132        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22133
22134    <file::Seek as ::fidl_next::Method>::Request:
22135        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22136
22137    <file::ReadAt as ::fidl_next::Method>::Request:
22138        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22139
22140    <file::WriteAt as ::fidl_next::Method>::Request:
22141        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22142
22143    <file::Resize as ::fidl_next::Method>::Request:
22144        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22145
22146    <file::GetBackingMemory as ::fidl_next::Method>::Request:
22147        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22148
22149    <file::Allocate as ::fidl_next::Method>::Request:
22150        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22151
22152    <file::EnableVerity as ::fidl_next::Method>::Request:
22153        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
22154{
22155    fn on_one_way(
22156        handler: &mut ___H,
22157        sender: &::fidl_next::ServerSender<___T, Self>,
22158        ordinal: u64,
22159        buffer: ___T::RecvBuffer,
22160    ) {
22161        match ordinal {
22162            2366825959783828089 => match ::fidl_next::DecoderExt::decode(buffer) {
22163                Ok(decoded) => handler.clone(sender, decoded),
22164                Err(e) => {
22165                    sender.close();
22166                }
22167            },
22168
22169            6512600400724287855 => match ::fidl_next::DecoderExt::decode(buffer) {
22170                Ok(decoded) => handler.deprecated_clone(sender, decoded),
22171                Err(e) => {
22172                    sender.close();
22173                }
22174            },
22175
22176            5431626189872037072 => match ::fidl_next::DecoderExt::decode(buffer) {
22177                Ok(decoded) => handler.list_extended_attributes(sender, decoded),
22178                Err(e) => {
22179                    sender.close();
22180                }
22181            },
22182
22183            ordinal => handler.on_unknown_interaction(sender, ordinal),
22184        }
22185    }
22186
22187    fn on_two_way(
22188        handler: &mut ___H,
22189        sender: &::fidl_next::ServerSender<___T, Self>,
22190        ordinal: u64,
22191        buffer: ___T::RecvBuffer,
22192        responder: ::fidl_next::protocol::Responder,
22193    ) {
22194        match ordinal {
22195            7992130864415541162 => {
22196                let responder = ::fidl_next::Responder::from_untyped(responder);
22197
22198                match ::fidl_next::DecoderExt::decode(buffer) {
22199                    Ok(decoded) => handler.advisory_lock(sender, decoded, responder),
22200                    Err(e) => {
22201                        sender.close();
22202                    }
22203                }
22204            }
22205
22206            6121399674497678964 => {
22207                let responder = ::fidl_next::Responder::from_untyped(responder);
22208
22209                match ::fidl_next::DecoderExt::decode(buffer) {
22210                    Ok(decoded) => handler.link_into(sender, decoded, responder),
22211                    Err(e) => {
22212                        sender.close();
22213                    }
22214                }
22215            }
22216
22217            6540867515453498750 => {
22218                let responder = ::fidl_next::Responder::from_untyped(responder);
22219
22220                handler.close(sender, responder);
22221            }
22222
22223            2763219980499352582 => {
22224                let responder = ::fidl_next::Responder::from_untyped(responder);
22225
22226                handler.query(sender, responder);
22227            }
22228
22229            8689798978500614909 => {
22230                let responder = ::fidl_next::Responder::from_untyped(responder);
22231
22232                handler.deprecated_get_attr(sender, responder);
22233            }
22234
22235            4721673413776871238 => {
22236                let responder = ::fidl_next::Responder::from_untyped(responder);
22237
22238                match ::fidl_next::DecoderExt::decode(buffer) {
22239                    Ok(decoded) => handler.deprecated_set_attr(sender, decoded, responder),
22240                    Err(e) => {
22241                        sender.close();
22242                    }
22243                }
22244            }
22245
22246            6595803110182632097 => {
22247                let responder = ::fidl_next::Responder::from_untyped(responder);
22248
22249                handler.deprecated_get_flags(sender, responder);
22250            }
22251
22252            5950864159036794675 => {
22253                let responder = ::fidl_next::Responder::from_untyped(responder);
22254
22255                match ::fidl_next::DecoderExt::decode(buffer) {
22256                    Ok(decoded) => handler.deprecated_set_flags(sender, decoded, responder),
22257                    Err(e) => {
22258                        sender.close();
22259                    }
22260                }
22261            }
22262
22263            105530239381466147 => {
22264                let responder = ::fidl_next::Responder::from_untyped(responder);
22265
22266                handler.get_flags(sender, responder);
22267            }
22268
22269            6172186066099445416 => {
22270                let responder = ::fidl_next::Responder::from_untyped(responder);
22271
22272                match ::fidl_next::DecoderExt::decode(buffer) {
22273                    Ok(decoded) => handler.set_flags(sender, decoded, responder),
22274                    Err(e) => {
22275                        sender.close();
22276                    }
22277                }
22278            }
22279
22280            8013111122914313744 => {
22281                let responder = ::fidl_next::Responder::from_untyped(responder);
22282
22283                handler.query_filesystem(sender, responder);
22284            }
22285
22286            4414537700416816443 => {
22287                let responder = ::fidl_next::Responder::from_untyped(responder);
22288
22289                match ::fidl_next::DecoderExt::decode(buffer) {
22290                    Ok(decoded) => handler.get_attributes(sender, decoded, responder),
22291                    Err(e) => {
22292                        sender.close();
22293                    }
22294                }
22295            }
22296
22297            3677402239314018056 => {
22298                let responder = ::fidl_next::Responder::from_untyped(responder);
22299
22300                match ::fidl_next::DecoderExt::decode(buffer) {
22301                    Ok(decoded) => handler.update_attributes(sender, decoded, responder),
22302                    Err(e) => {
22303                        sender.close();
22304                    }
22305                }
22306            }
22307
22308            3196473584242777161 => {
22309                let responder = ::fidl_next::Responder::from_untyped(responder);
22310
22311                handler.sync(sender, responder);
22312            }
22313
22314            5043930208506967771 => {
22315                let responder = ::fidl_next::Responder::from_untyped(responder);
22316
22317                match ::fidl_next::DecoderExt::decode(buffer) {
22318                    Ok(decoded) => handler.get_extended_attribute(sender, decoded, responder),
22319                    Err(e) => {
22320                        sender.close();
22321                    }
22322                }
22323            }
22324
22325            5374223046099989052 => {
22326                let responder = ::fidl_next::Responder::from_untyped(responder);
22327
22328                match ::fidl_next::DecoderExt::decode(buffer) {
22329                    Ok(decoded) => handler.set_extended_attribute(sender, decoded, responder),
22330                    Err(e) => {
22331                        sender.close();
22332                    }
22333                }
22334            }
22335
22336            8794297771444732717 => {
22337                let responder = ::fidl_next::Responder::from_untyped(responder);
22338
22339                match ::fidl_next::DecoderExt::decode(buffer) {
22340                    Ok(decoded) => handler.remove_extended_attribute(sender, decoded, responder),
22341                    Err(e) => {
22342                        sender.close();
22343                    }
22344                }
22345            }
22346
22347            395825947633028830 => {
22348                let responder = ::fidl_next::Responder::from_untyped(responder);
22349
22350                match ::fidl_next::DecoderExt::decode(buffer) {
22351                    Ok(decoded) => handler.read(sender, decoded, responder),
22352                    Err(e) => {
22353                        sender.close();
22354                    }
22355                }
22356            }
22357
22358            7651971425397809026 => {
22359                let responder = ::fidl_next::Responder::from_untyped(responder);
22360
22361                match ::fidl_next::DecoderExt::decode(buffer) {
22362                    Ok(decoded) => handler.write(sender, decoded, responder),
22363                    Err(e) => {
22364                        sender.close();
22365                    }
22366                }
22367            }
22368
22369            7545125870053689020 => {
22370                let responder = ::fidl_next::Responder::from_untyped(responder);
22371
22372                handler.describe(sender, responder);
22373            }
22374
22375            8649041485622956551 => {
22376                let responder = ::fidl_next::Responder::from_untyped(responder);
22377
22378                match ::fidl_next::DecoderExt::decode(buffer) {
22379                    Ok(decoded) => handler.seek(sender, decoded, responder),
22380                    Err(e) => {
22381                        sender.close();
22382                    }
22383                }
22384            }
22385
22386            1587416148701180478 => {
22387                let responder = ::fidl_next::Responder::from_untyped(responder);
22388
22389                match ::fidl_next::DecoderExt::decode(buffer) {
22390                    Ok(decoded) => handler.read_at(sender, decoded, responder),
22391                    Err(e) => {
22392                        sender.close();
22393                    }
22394                }
22395            }
22396
22397            8736683935131400491 => {
22398                let responder = ::fidl_next::Responder::from_untyped(responder);
22399
22400                match ::fidl_next::DecoderExt::decode(buffer) {
22401                    Ok(decoded) => handler.write_at(sender, decoded, responder),
22402                    Err(e) => {
22403                        sender.close();
22404                    }
22405                }
22406            }
22407
22408            3134648685270758458 => {
22409                let responder = ::fidl_next::Responder::from_untyped(responder);
22410
22411                match ::fidl_next::DecoderExt::decode(buffer) {
22412                    Ok(decoded) => handler.resize(sender, decoded, responder),
22413                    Err(e) => {
22414                        sender.close();
22415                    }
22416                }
22417            }
22418
22419            46911652864194091 => {
22420                let responder = ::fidl_next::Responder::from_untyped(responder);
22421
22422                match ::fidl_next::DecoderExt::decode(buffer) {
22423                    Ok(decoded) => handler.get_backing_memory(sender, decoded, responder),
22424                    Err(e) => {
22425                        sender.close();
22426                    }
22427                }
22428            }
22429
22430            8645235848064269614 => {
22431                let responder = ::fidl_next::Responder::from_untyped(responder);
22432
22433                match ::fidl_next::DecoderExt::decode(buffer) {
22434                    Ok(decoded) => handler.allocate(sender, decoded, responder),
22435                    Err(e) => {
22436                        sender.close();
22437                    }
22438                }
22439            }
22440
22441            3189145313204943035 => {
22442                let responder = ::fidl_next::Responder::from_untyped(responder);
22443
22444                match ::fidl_next::DecoderExt::decode(buffer) {
22445                    Ok(decoded) => handler.enable_verity(sender, decoded, responder),
22446                    Err(e) => {
22447                        sender.close();
22448                    }
22449                }
22450            }
22451
22452            ordinal => handler.on_unknown_interaction(sender, ordinal),
22453        }
22454    }
22455}
22456
22457#[derive(Debug)]
22458#[repr(C)]
22459pub struct FileObject {
22460    pub event: Option<::fidl_next::fuchsia::zx::Handle>,
22461
22462    pub stream: Option<::fidl_next::fuchsia::zx::Handle>,
22463}
22464
22465impl ::fidl_next::Encodable for FileObject {
22466    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireFileObject> = unsafe {
22467        ::fidl_next::CopyOptimization::enable_if(
22468            true
22469
22470                && <
22471                    Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::Encodable
22472                >::COPY_OPTIMIZATION.is_enabled()
22473
22474                && <
22475                    Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::Encodable
22476                >::COPY_OPTIMIZATION.is_enabled()
22477
22478        )
22479    };
22480
22481    type Encoded = WireFileObject;
22482}
22483
22484unsafe impl<___E> ::fidl_next::Encode<___E> for FileObject
22485where
22486    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22487
22488    ___E: ::fidl_next::fuchsia::HandleEncoder,
22489{
22490    #[inline]
22491    fn encode(
22492        self,
22493        encoder: &mut ___E,
22494        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
22495    ) -> Result<(), ::fidl_next::EncodeError> {
22496        ::fidl_next::munge! {
22497            let Self::Encoded {
22498                event,
22499                stream,
22500
22501            } = out;
22502        }
22503
22504        ::fidl_next::Encode::encode(self.event, encoder, event)?;
22505
22506        ::fidl_next::Encode::encode(self.stream, encoder, stream)?;
22507
22508        Ok(())
22509    }
22510}
22511
22512impl ::fidl_next::EncodableOption for FileObject {
22513    type EncodedOption = ::fidl_next::WireBox<'static, WireFileObject>;
22514}
22515
22516unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FileObject
22517where
22518    ___E: ::fidl_next::Encoder + ?Sized,
22519    FileObject: ::fidl_next::Encode<___E>,
22520{
22521    #[inline]
22522    fn encode_option(
22523        this: Option<Self>,
22524        encoder: &mut ___E,
22525        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
22526    ) -> Result<(), ::fidl_next::EncodeError> {
22527        if let Some(inner) = this {
22528            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
22529            ::fidl_next::WireBox::encode_present(out);
22530        } else {
22531            ::fidl_next::WireBox::encode_absent(out);
22532        }
22533
22534        Ok(())
22535    }
22536}
22537
22538impl ::fidl_next::FromWire<WireFileObject> for FileObject {
22539    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireFileObject, Self> = unsafe {
22540        ::fidl_next::CopyOptimization::enable_if(
22541            true && <Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::FromWire<
22542                ::fidl_next::fuchsia::WireOptionalHandle,
22543            >>::COPY_OPTIMIZATION
22544                .is_enabled()
22545                && <Option<::fidl_next::fuchsia::zx::Handle> as ::fidl_next::FromWire<
22546                    ::fidl_next::fuchsia::WireOptionalHandle,
22547                >>::COPY_OPTIMIZATION
22548                    .is_enabled(),
22549        )
22550    };
22551
22552    #[inline]
22553    fn from_wire(wire: WireFileObject) -> Self {
22554        Self {
22555            event: ::fidl_next::FromWire::from_wire(wire.event),
22556
22557            stream: ::fidl_next::FromWire::from_wire(wire.stream),
22558        }
22559    }
22560}
22561
22562/// The wire type corresponding to [`FileObject`].
22563#[derive(Debug)]
22564#[repr(C)]
22565pub struct WireFileObject {
22566    pub event: ::fidl_next::fuchsia::WireOptionalHandle,
22567
22568    pub stream: ::fidl_next::fuchsia::WireOptionalHandle,
22569}
22570
22571unsafe impl ::fidl_next::Wire for WireFileObject {
22572    type Decoded<'de> = WireFileObject;
22573
22574    #[inline]
22575    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
22576}
22577
22578unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileObject
22579where
22580    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
22581
22582    ___D: ::fidl_next::fuchsia::HandleDecoder,
22583{
22584    fn decode(
22585        slot: ::fidl_next::Slot<'_, Self>,
22586        decoder: &mut ___D,
22587    ) -> Result<(), ::fidl_next::DecodeError> {
22588        ::fidl_next::munge! {
22589            let Self {
22590                mut event,
22591                mut stream,
22592
22593            } = slot;
22594        }
22595
22596        ::fidl_next::Decode::decode(event.as_mut(), decoder)?;
22597
22598        ::fidl_next::Decode::decode(stream.as_mut(), decoder)?;
22599
22600        Ok(())
22601    }
22602}
22603
22604::fidl_next::bitflags! {
22605    #[derive(
22606        Clone,
22607        Copy,
22608        Debug,
22609        PartialEq,
22610        Eq,
22611        Hash,
22612    )]
22613    pub struct FileSignal: u32 {
22614        #[doc = " Indicates the file is ready for reading.\n"]const READABLE = 16777216;
22615        #[doc = " Indicates the file is ready for writing.\n"]const WRITABLE = 33554432;
22616
22617    }
22618}
22619
22620impl ::fidl_next::Encodable for FileSignal {
22621    type Encoded = WireFileSignal;
22622}
22623
22624unsafe impl<___E> ::fidl_next::Encode<___E> for FileSignal
22625where
22626    ___E: ?Sized,
22627{
22628    #[inline]
22629    fn encode(
22630        self,
22631        encoder: &mut ___E,
22632        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
22633    ) -> Result<(), ::fidl_next::EncodeError> {
22634        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
22635    }
22636}
22637
22638unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FileSignal
22639where
22640    ___E: ?Sized,
22641{
22642    #[inline]
22643    fn encode_ref(
22644        &self,
22645        _: &mut ___E,
22646        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
22647    ) -> Result<(), ::fidl_next::EncodeError> {
22648        ::fidl_next::munge!(let WireFileSignal { value } = out);
22649        let _ = value.write(::fidl_next::WireU32::from(self.bits()));
22650        Ok(())
22651    }
22652}
22653
22654impl ::core::convert::From<WireFileSignal> for FileSignal {
22655    fn from(wire: WireFileSignal) -> Self {
22656        Self::from_bits_retain(u32::from(wire.value))
22657    }
22658}
22659
22660impl ::fidl_next::FromWire<WireFileSignal> for FileSignal {
22661    #[inline]
22662    fn from_wire(wire: WireFileSignal) -> Self {
22663        Self::from(wire)
22664    }
22665}
22666
22667impl ::fidl_next::FromWireRef<WireFileSignal> for FileSignal {
22668    #[inline]
22669    fn from_wire_ref(wire: &WireFileSignal) -> Self {
22670        Self::from(*wire)
22671    }
22672}
22673
22674/// The wire type corresponding to [`FileSignal`].
22675#[derive(Clone, Copy, Debug)]
22676#[repr(transparent)]
22677pub struct WireFileSignal {
22678    value: ::fidl_next::WireU32,
22679}
22680
22681unsafe impl ::fidl_next::Wire for WireFileSignal {
22682    type Decoded<'de> = Self;
22683
22684    #[inline]
22685    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
22686        // Wire bits have no padding
22687    }
22688}
22689
22690unsafe impl<___D> ::fidl_next::Decode<___D> for WireFileSignal
22691where
22692    ___D: ?Sized,
22693{
22694    fn decode(
22695        slot: ::fidl_next::Slot<'_, Self>,
22696        _: &mut ___D,
22697    ) -> Result<(), ::fidl_next::DecodeError> {
22698        ::fidl_next::munge!(let Self { value } = slot);
22699        let set = u32::from(*value);
22700        if set & !FileSignal::all().bits() != 0 {
22701            return Err(::fidl_next::DecodeError::InvalidBits {
22702                expected: FileSignal::all().bits() as usize,
22703                actual: set as usize,
22704            });
22705        }
22706
22707        Ok(())
22708    }
22709}
22710
22711impl ::core::convert::From<FileSignal> for WireFileSignal {
22712    fn from(natural: FileSignal) -> Self {
22713        Self { value: ::fidl_next::WireU32::from(natural.bits()) }
22714    }
22715}
22716
22717pub const MAX_FS_NAME_BUFFER: u64 = 32;
22718
22719#[derive(Clone, Debug)]
22720#[repr(C)]
22721pub struct FilesystemInfo {
22722    pub total_bytes: u64,
22723
22724    pub used_bytes: u64,
22725
22726    pub total_nodes: u64,
22727
22728    pub used_nodes: u64,
22729
22730    pub free_shared_pool_bytes: u64,
22731
22732    pub fs_id: u64,
22733
22734    pub block_size: u32,
22735
22736    pub max_filename_size: u32,
22737
22738    pub fs_type: u32,
22739
22740    pub padding: u32,
22741
22742    pub name: [i8; 32],
22743}
22744
22745impl ::fidl_next::Encodable for FilesystemInfo {
22746    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireFilesystemInfo> = unsafe {
22747        ::fidl_next::CopyOptimization::enable_if(
22748            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22749                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22750                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22751                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22752                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22753                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22754                && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22755                && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22756                && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22757                && <u32 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
22758                && <[i8; 32] as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
22759        )
22760    };
22761
22762    type Encoded = WireFilesystemInfo;
22763}
22764
22765unsafe impl<___E> ::fidl_next::Encode<___E> for FilesystemInfo
22766where
22767    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22768{
22769    #[inline]
22770    fn encode(
22771        self,
22772        encoder: &mut ___E,
22773        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
22774    ) -> Result<(), ::fidl_next::EncodeError> {
22775        ::fidl_next::munge! {
22776            let Self::Encoded {
22777                total_bytes,
22778                used_bytes,
22779                total_nodes,
22780                used_nodes,
22781                free_shared_pool_bytes,
22782                fs_id,
22783                block_size,
22784                max_filename_size,
22785                fs_type,
22786                padding,
22787                name,
22788
22789            } = out;
22790        }
22791
22792        ::fidl_next::Encode::encode(self.total_bytes, encoder, total_bytes)?;
22793
22794        ::fidl_next::Encode::encode(self.used_bytes, encoder, used_bytes)?;
22795
22796        ::fidl_next::Encode::encode(self.total_nodes, encoder, total_nodes)?;
22797
22798        ::fidl_next::Encode::encode(self.used_nodes, encoder, used_nodes)?;
22799
22800        ::fidl_next::Encode::encode(self.free_shared_pool_bytes, encoder, free_shared_pool_bytes)?;
22801
22802        ::fidl_next::Encode::encode(self.fs_id, encoder, fs_id)?;
22803
22804        ::fidl_next::Encode::encode(self.block_size, encoder, block_size)?;
22805
22806        ::fidl_next::Encode::encode(self.max_filename_size, encoder, max_filename_size)?;
22807
22808        ::fidl_next::Encode::encode(self.fs_type, encoder, fs_type)?;
22809
22810        ::fidl_next::Encode::encode(self.padding, encoder, padding)?;
22811
22812        ::fidl_next::Encode::encode(self.name, encoder, name)?;
22813
22814        Ok(())
22815    }
22816}
22817
22818unsafe impl<___E> ::fidl_next::EncodeRef<___E> for FilesystemInfo
22819where
22820    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
22821{
22822    #[inline]
22823    fn encode_ref(
22824        &self,
22825        encoder: &mut ___E,
22826        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
22827    ) -> Result<(), ::fidl_next::EncodeError> {
22828        ::fidl_next::munge! {
22829            let Self::Encoded {
22830                total_bytes,
22831                used_bytes,
22832                total_nodes,
22833                used_nodes,
22834                free_shared_pool_bytes,
22835                fs_id,
22836                block_size,
22837                max_filename_size,
22838                fs_type,
22839                padding,
22840                name,
22841
22842            } = out;
22843        }
22844
22845        ::fidl_next::EncodeRef::encode_ref(&self.total_bytes, encoder, total_bytes)?;
22846
22847        ::fidl_next::EncodeRef::encode_ref(&self.used_bytes, encoder, used_bytes)?;
22848
22849        ::fidl_next::EncodeRef::encode_ref(&self.total_nodes, encoder, total_nodes)?;
22850
22851        ::fidl_next::EncodeRef::encode_ref(&self.used_nodes, encoder, used_nodes)?;
22852
22853        ::fidl_next::EncodeRef::encode_ref(
22854            &self.free_shared_pool_bytes,
22855            encoder,
22856            free_shared_pool_bytes,
22857        )?;
22858
22859        ::fidl_next::EncodeRef::encode_ref(&self.fs_id, encoder, fs_id)?;
22860
22861        ::fidl_next::EncodeRef::encode_ref(&self.block_size, encoder, block_size)?;
22862
22863        ::fidl_next::EncodeRef::encode_ref(&self.max_filename_size, encoder, max_filename_size)?;
22864
22865        ::fidl_next::EncodeRef::encode_ref(&self.fs_type, encoder, fs_type)?;
22866
22867        ::fidl_next::EncodeRef::encode_ref(&self.padding, encoder, padding)?;
22868
22869        ::fidl_next::EncodeRef::encode_ref(&self.name, encoder, name)?;
22870
22871        Ok(())
22872    }
22873}
22874
22875impl ::fidl_next::EncodableOption for FilesystemInfo {
22876    type EncodedOption = ::fidl_next::WireBox<'static, WireFilesystemInfo>;
22877}
22878
22879unsafe impl<___E> ::fidl_next::EncodeOption<___E> for FilesystemInfo
22880where
22881    ___E: ::fidl_next::Encoder + ?Sized,
22882    FilesystemInfo: ::fidl_next::Encode<___E>,
22883{
22884    #[inline]
22885    fn encode_option(
22886        this: Option<Self>,
22887        encoder: &mut ___E,
22888        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
22889    ) -> Result<(), ::fidl_next::EncodeError> {
22890        if let Some(inner) = this {
22891            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
22892            ::fidl_next::WireBox::encode_present(out);
22893        } else {
22894            ::fidl_next::WireBox::encode_absent(out);
22895        }
22896
22897        Ok(())
22898    }
22899}
22900
22901unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for FilesystemInfo
22902where
22903    ___E: ::fidl_next::Encoder + ?Sized,
22904    FilesystemInfo: ::fidl_next::EncodeRef<___E>,
22905{
22906    #[inline]
22907    fn encode_option_ref(
22908        this: Option<&Self>,
22909        encoder: &mut ___E,
22910        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
22911    ) -> Result<(), ::fidl_next::EncodeError> {
22912        if let Some(inner) = this {
22913            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
22914            ::fidl_next::WireBox::encode_present(out);
22915        } else {
22916            ::fidl_next::WireBox::encode_absent(out);
22917        }
22918
22919        Ok(())
22920    }
22921}
22922
22923impl ::fidl_next::FromWire<WireFilesystemInfo> for FilesystemInfo {
22924    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireFilesystemInfo, Self> = unsafe {
22925        ::fidl_next::CopyOptimization::enable_if(
22926            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
22927                .is_enabled()
22928                && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
22929                    .is_enabled()
22930                && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
22931                    .is_enabled()
22932                && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
22933                    .is_enabled()
22934                && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
22935                    .is_enabled()
22936                && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
22937                    .is_enabled()
22938                && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
22939                    .is_enabled()
22940                && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
22941                    .is_enabled()
22942                && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
22943                    .is_enabled()
22944                && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
22945                    .is_enabled()
22946                && <[i8; 32] as ::fidl_next::FromWire<[i8; 32]>>::COPY_OPTIMIZATION.is_enabled(),
22947        )
22948    };
22949
22950    #[inline]
22951    fn from_wire(wire: WireFilesystemInfo) -> Self {
22952        Self {
22953            total_bytes: ::fidl_next::FromWire::from_wire(wire.total_bytes),
22954
22955            used_bytes: ::fidl_next::FromWire::from_wire(wire.used_bytes),
22956
22957            total_nodes: ::fidl_next::FromWire::from_wire(wire.total_nodes),
22958
22959            used_nodes: ::fidl_next::FromWire::from_wire(wire.used_nodes),
22960
22961            free_shared_pool_bytes: ::fidl_next::FromWire::from_wire(wire.free_shared_pool_bytes),
22962
22963            fs_id: ::fidl_next::FromWire::from_wire(wire.fs_id),
22964
22965            block_size: ::fidl_next::FromWire::from_wire(wire.block_size),
22966
22967            max_filename_size: ::fidl_next::FromWire::from_wire(wire.max_filename_size),
22968
22969            fs_type: ::fidl_next::FromWire::from_wire(wire.fs_type),
22970
22971            padding: ::fidl_next::FromWire::from_wire(wire.padding),
22972
22973            name: ::fidl_next::FromWire::from_wire(wire.name),
22974        }
22975    }
22976}
22977
22978impl ::fidl_next::FromWireRef<WireFilesystemInfo> for FilesystemInfo {
22979    #[inline]
22980    fn from_wire_ref(wire: &WireFilesystemInfo) -> Self {
22981        Self {
22982            total_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_bytes),
22983
22984            used_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_bytes),
22985
22986            total_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_nodes),
22987
22988            used_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_nodes),
22989
22990            free_shared_pool_bytes: ::fidl_next::FromWireRef::from_wire_ref(
22991                &wire.free_shared_pool_bytes,
22992            ),
22993
22994            fs_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_id),
22995
22996            block_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.block_size),
22997
22998            max_filename_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_filename_size),
22999
23000            fs_type: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_type),
23001
23002            padding: ::fidl_next::FromWireRef::from_wire_ref(&wire.padding),
23003
23004            name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
23005        }
23006    }
23007}
23008
23009/// The wire type corresponding to [`FilesystemInfo`].
23010#[derive(Clone, Debug)]
23011#[repr(C)]
23012pub struct WireFilesystemInfo {
23013    pub total_bytes: ::fidl_next::WireU64,
23014
23015    pub used_bytes: ::fidl_next::WireU64,
23016
23017    pub total_nodes: ::fidl_next::WireU64,
23018
23019    pub used_nodes: ::fidl_next::WireU64,
23020
23021    pub free_shared_pool_bytes: ::fidl_next::WireU64,
23022
23023    pub fs_id: ::fidl_next::WireU64,
23024
23025    pub block_size: ::fidl_next::WireU32,
23026
23027    pub max_filename_size: ::fidl_next::WireU32,
23028
23029    pub fs_type: ::fidl_next::WireU32,
23030
23031    pub padding: ::fidl_next::WireU32,
23032
23033    pub name: [i8; 32],
23034}
23035
23036unsafe impl ::fidl_next::Wire for WireFilesystemInfo {
23037    type Decoded<'de> = WireFilesystemInfo;
23038
23039    #[inline]
23040    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
23041}
23042
23043unsafe impl<___D> ::fidl_next::Decode<___D> for WireFilesystemInfo
23044where
23045    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
23046{
23047    fn decode(
23048        slot: ::fidl_next::Slot<'_, Self>,
23049        decoder: &mut ___D,
23050    ) -> Result<(), ::fidl_next::DecodeError> {
23051        ::fidl_next::munge! {
23052            let Self {
23053                mut total_bytes,
23054                mut used_bytes,
23055                mut total_nodes,
23056                mut used_nodes,
23057                mut free_shared_pool_bytes,
23058                mut fs_id,
23059                mut block_size,
23060                mut max_filename_size,
23061                mut fs_type,
23062                mut padding,
23063                mut name,
23064
23065            } = slot;
23066        }
23067
23068        ::fidl_next::Decode::decode(total_bytes.as_mut(), decoder)?;
23069
23070        ::fidl_next::Decode::decode(used_bytes.as_mut(), decoder)?;
23071
23072        ::fidl_next::Decode::decode(total_nodes.as_mut(), decoder)?;
23073
23074        ::fidl_next::Decode::decode(used_nodes.as_mut(), decoder)?;
23075
23076        ::fidl_next::Decode::decode(free_shared_pool_bytes.as_mut(), decoder)?;
23077
23078        ::fidl_next::Decode::decode(fs_id.as_mut(), decoder)?;
23079
23080        ::fidl_next::Decode::decode(block_size.as_mut(), decoder)?;
23081
23082        ::fidl_next::Decode::decode(max_filename_size.as_mut(), decoder)?;
23083
23084        ::fidl_next::Decode::decode(fs_type.as_mut(), decoder)?;
23085
23086        ::fidl_next::Decode::decode(padding.as_mut(), decoder)?;
23087
23088        ::fidl_next::Decode::decode(name.as_mut(), decoder)?;
23089
23090        Ok(())
23091    }
23092}
23093
23094#[doc = " Set of rights that [`Flags.PERM_INHERIT_WRITE`] will inherit from the parent connection if\n specified. Note that if any of these permissions are missing from the connection, none of these\n permissions will be inherited.\n"]
23095pub const INHERITED_WRITE_PERMISSIONS: crate::Operations = crate::Operations::from_bits_retain(356);
23096
23097#[doc = " Nodes which do not have ino values should return this value\n from Readdir and GetAttr.\n"]
23098pub const INO_UNKNOWN: u64 = 18446744073709551615;
23099
23100pub const MASK_KNOWN_PERMISSIONS: crate::Flags = crate::Flags::from_bits_retain(25087);
23101
23102pub const MASK_KNOWN_PROTOCOLS: crate::Flags = crate::Flags::from_bits_retain(30069489664);
23103
23104pub const MASK_PERMISSION_FLAGS: u64 = 65535;
23105
23106pub const MASK_POSIX_FLAGS: u64 = 4294967295;
23107
23108#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
23109pub const MAX_FILENAME: u64 = 255;
23110
23111#[doc = " Bits reserved for posix protections. Native fuchsia filesystems\n are not required to set bits contained within `MODE_PROTECTION_MASK`,\n but filesystems that wish to do so may refer to sys/stat.h for their\n definitions.\n"]
23112pub const MODE_PROTECTION_MASK: u32 = 4095;
23113
23114pub const MODE_TYPE_BLOCK_DEVICE: u32 = 24576;
23115
23116pub const MODE_TYPE_DIRECTORY: u32 = 16384;
23117
23118pub const MODE_TYPE_FILE: u32 = 32768;
23119
23120#[doc = " Bits indicating node type. The canonical mechanism to check\n for a node type is to take \'mode\', bitwise AND it with the\n `MODE_TYPE_MASK`, and check exact equality against a mode type.\n"]
23121pub const MODE_TYPE_MASK: u32 = 1044480;
23122
23123pub const MODE_TYPE_SERVICE: u32 = 65536;
23124
23125pub const MODE_TYPE_SYMLINK: u32 = 40960;
23126
23127pub const NODE_PROTOCOL_NAME: &str = "fuchsia.io/Node";
23128
23129#[derive(Clone, Debug)]
23130#[repr(C)]
23131pub struct Service {}
23132
23133impl ::fidl_next::Encodable for Service {
23134    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireService> =
23135        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
23136
23137    type Encoded = WireService;
23138}
23139
23140unsafe impl<___E> ::fidl_next::Encode<___E> for Service
23141where
23142    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
23143{
23144    #[inline]
23145    fn encode(
23146        self,
23147        encoder: &mut ___E,
23148        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
23149    ) -> Result<(), ::fidl_next::EncodeError> {
23150        ::fidl_next::munge! {
23151            let Self::Encoded {
23152
23153            } = out;
23154        }
23155
23156        Ok(())
23157    }
23158}
23159
23160unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Service
23161where
23162    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
23163{
23164    #[inline]
23165    fn encode_ref(
23166        &self,
23167        encoder: &mut ___E,
23168        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
23169    ) -> Result<(), ::fidl_next::EncodeError> {
23170        ::fidl_next::munge! {
23171            let Self::Encoded {
23172
23173            } = out;
23174        }
23175
23176        Ok(())
23177    }
23178}
23179
23180impl ::fidl_next::EncodableOption for Service {
23181    type EncodedOption = ::fidl_next::WireBox<'static, WireService>;
23182}
23183
23184unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Service
23185where
23186    ___E: ::fidl_next::Encoder + ?Sized,
23187    Service: ::fidl_next::Encode<___E>,
23188{
23189    #[inline]
23190    fn encode_option(
23191        this: Option<Self>,
23192        encoder: &mut ___E,
23193        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
23194    ) -> Result<(), ::fidl_next::EncodeError> {
23195        if let Some(inner) = this {
23196            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
23197            ::fidl_next::WireBox::encode_present(out);
23198        } else {
23199            ::fidl_next::WireBox::encode_absent(out);
23200        }
23201
23202        Ok(())
23203    }
23204}
23205
23206unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for Service
23207where
23208    ___E: ::fidl_next::Encoder + ?Sized,
23209    Service: ::fidl_next::EncodeRef<___E>,
23210{
23211    #[inline]
23212    fn encode_option_ref(
23213        this: Option<&Self>,
23214        encoder: &mut ___E,
23215        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
23216    ) -> Result<(), ::fidl_next::EncodeError> {
23217        if let Some(inner) = this {
23218            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
23219            ::fidl_next::WireBox::encode_present(out);
23220        } else {
23221            ::fidl_next::WireBox::encode_absent(out);
23222        }
23223
23224        Ok(())
23225    }
23226}
23227
23228impl ::fidl_next::FromWire<WireService> for Service {
23229    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireService, Self> =
23230        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
23231
23232    #[inline]
23233    fn from_wire(wire: WireService) -> Self {
23234        Self {}
23235    }
23236}
23237
23238impl ::fidl_next::FromWireRef<WireService> for Service {
23239    #[inline]
23240    fn from_wire_ref(wire: &WireService) -> Self {
23241        Self {}
23242    }
23243}
23244
23245/// The wire type corresponding to [`Service`].
23246#[derive(Clone, Debug)]
23247#[repr(C)]
23248pub struct WireService {}
23249
23250unsafe impl ::fidl_next::Wire for WireService {
23251    type Decoded<'de> = WireService;
23252
23253    #[inline]
23254    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
23255}
23256
23257unsafe impl<___D> ::fidl_next::Decode<___D> for WireService
23258where
23259    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
23260{
23261    fn decode(
23262        slot: ::fidl_next::Slot<'_, Self>,
23263        decoder: &mut ___D,
23264    ) -> Result<(), ::fidl_next::DecodeError> {
23265        ::fidl_next::munge! {
23266            let Self {
23267
23268            } = slot;
23269        }
23270
23271        Ok(())
23272    }
23273}
23274
23275#[derive(Clone, Debug)]
23276pub struct SymlinkObject {
23277    pub target: Vec<u8>,
23278}
23279
23280impl ::fidl_next::Encodable for SymlinkObject {
23281    type Encoded = WireSymlinkObject<'static>;
23282}
23283
23284unsafe impl<___E> ::fidl_next::Encode<___E> for SymlinkObject
23285where
23286    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
23287
23288    ___E: ::fidl_next::Encoder,
23289{
23290    #[inline]
23291    fn encode(
23292        self,
23293        encoder: &mut ___E,
23294        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
23295    ) -> Result<(), ::fidl_next::EncodeError> {
23296        ::fidl_next::munge! {
23297            let Self::Encoded {
23298                target,
23299
23300            } = out;
23301        }
23302
23303        ::fidl_next::Encode::encode(self.target, encoder, target)?;
23304
23305        Ok(())
23306    }
23307}
23308
23309unsafe impl<___E> ::fidl_next::EncodeRef<___E> for SymlinkObject
23310where
23311    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
23312
23313    ___E: ::fidl_next::Encoder,
23314{
23315    #[inline]
23316    fn encode_ref(
23317        &self,
23318        encoder: &mut ___E,
23319        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
23320    ) -> Result<(), ::fidl_next::EncodeError> {
23321        ::fidl_next::munge! {
23322            let Self::Encoded {
23323                target,
23324
23325            } = out;
23326        }
23327
23328        ::fidl_next::EncodeRef::encode_ref(&self.target, encoder, target)?;
23329
23330        Ok(())
23331    }
23332}
23333
23334impl ::fidl_next::EncodableOption for SymlinkObject {
23335    type EncodedOption = ::fidl_next::WireBox<'static, WireSymlinkObject<'static>>;
23336}
23337
23338unsafe impl<___E> ::fidl_next::EncodeOption<___E> for SymlinkObject
23339where
23340    ___E: ::fidl_next::Encoder + ?Sized,
23341    SymlinkObject: ::fidl_next::Encode<___E>,
23342{
23343    #[inline]
23344    fn encode_option(
23345        this: Option<Self>,
23346        encoder: &mut ___E,
23347        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
23348    ) -> Result<(), ::fidl_next::EncodeError> {
23349        if let Some(inner) = this {
23350            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
23351            ::fidl_next::WireBox::encode_present(out);
23352        } else {
23353            ::fidl_next::WireBox::encode_absent(out);
23354        }
23355
23356        Ok(())
23357    }
23358}
23359
23360unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for SymlinkObject
23361where
23362    ___E: ::fidl_next::Encoder + ?Sized,
23363    SymlinkObject: ::fidl_next::EncodeRef<___E>,
23364{
23365    #[inline]
23366    fn encode_option_ref(
23367        this: Option<&Self>,
23368        encoder: &mut ___E,
23369        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
23370    ) -> Result<(), ::fidl_next::EncodeError> {
23371        if let Some(inner) = this {
23372            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
23373            ::fidl_next::WireBox::encode_present(out);
23374        } else {
23375            ::fidl_next::WireBox::encode_absent(out);
23376        }
23377
23378        Ok(())
23379    }
23380}
23381
23382impl<'de> ::fidl_next::FromWire<WireSymlinkObject<'de>> for SymlinkObject {
23383    #[inline]
23384    fn from_wire(wire: WireSymlinkObject<'de>) -> Self {
23385        Self { target: ::fidl_next::FromWire::from_wire(wire.target) }
23386    }
23387}
23388
23389impl<'de> ::fidl_next::FromWireRef<WireSymlinkObject<'de>> for SymlinkObject {
23390    #[inline]
23391    fn from_wire_ref(wire: &WireSymlinkObject<'de>) -> Self {
23392        Self { target: ::fidl_next::FromWireRef::from_wire_ref(&wire.target) }
23393    }
23394}
23395
23396/// The wire type corresponding to [`SymlinkObject`].
23397#[derive(Debug)]
23398#[repr(C)]
23399pub struct WireSymlinkObject<'de> {
23400    pub target: ::fidl_next::WireVector<'de, u8>,
23401}
23402
23403unsafe impl ::fidl_next::Wire for WireSymlinkObject<'static> {
23404    type Decoded<'de> = WireSymlinkObject<'de>;
23405
23406    #[inline]
23407    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
23408}
23409
23410unsafe impl<___D> ::fidl_next::Decode<___D> for WireSymlinkObject<'static>
23411where
23412    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
23413
23414    ___D: ::fidl_next::Decoder,
23415{
23416    fn decode(
23417        slot: ::fidl_next::Slot<'_, Self>,
23418        decoder: &mut ___D,
23419    ) -> Result<(), ::fidl_next::DecodeError> {
23420        ::fidl_next::munge! {
23421            let Self {
23422                mut target,
23423
23424            } = slot;
23425        }
23426
23427        ::fidl_next::Decode::decode(target.as_mut(), decoder)?;
23428
23429        let target = unsafe { target.deref_unchecked() };
23430
23431        if target.len() > 4095 {
23432            return Err(::fidl_next::DecodeError::VectorTooLong {
23433                size: target.len() as u64,
23434                limit: 4095,
23435            });
23436        }
23437
23438        Ok(())
23439    }
23440}
23441
23442#[derive(Debug)]
23443pub enum NodeInfoDeprecated {
23444    Service(crate::Service),
23445
23446    File(crate::FileObject),
23447
23448    Directory(crate::DirectoryObject),
23449
23450    Symlink(crate::SymlinkObject),
23451}
23452
23453impl ::fidl_next::Encodable for NodeInfoDeprecated {
23454    type Encoded = WireNodeInfoDeprecated<'static>;
23455}
23456
23457unsafe impl<___E> ::fidl_next::Encode<___E> for NodeInfoDeprecated
23458where
23459    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
23460
23461    ___E: ::fidl_next::Encoder,
23462
23463    ___E: ::fidl_next::fuchsia::HandleEncoder,
23464{
23465    #[inline]
23466    fn encode(
23467        self,
23468        encoder: &mut ___E,
23469        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
23470    ) -> Result<(), ::fidl_next::EncodeError> {
23471        ::fidl_next::munge!(let WireNodeInfoDeprecated { raw, _phantom: _ } = out);
23472
23473        match self {
23474            Self::Service(value) => ::fidl_next::RawWireUnion::encode_as::<___E, crate::Service>(
23475                value, 1, encoder, raw,
23476            )?,
23477
23478            Self::File(value) => ::fidl_next::RawWireUnion::encode_as::<___E, crate::FileObject>(
23479                value, 2, encoder, raw,
23480            )?,
23481
23482            Self::Directory(value) => ::fidl_next::RawWireUnion::encode_as::<
23483                ___E,
23484                crate::DirectoryObject,
23485            >(value, 3, encoder, raw)?,
23486
23487            Self::Symlink(value) => ::fidl_next::RawWireUnion::encode_as::<
23488                ___E,
23489                crate::SymlinkObject,
23490            >(value, 4, encoder, raw)?,
23491        }
23492
23493        Ok(())
23494    }
23495}
23496
23497impl ::fidl_next::EncodableOption for NodeInfoDeprecated {
23498    type EncodedOption = WireOptionalNodeInfoDeprecated<'static>;
23499}
23500
23501unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NodeInfoDeprecated
23502where
23503    ___E: ?Sized,
23504    NodeInfoDeprecated: ::fidl_next::Encode<___E>,
23505{
23506    #[inline]
23507    fn encode_option(
23508        this: Option<Self>,
23509        encoder: &mut ___E,
23510        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
23511    ) -> Result<(), ::fidl_next::EncodeError> {
23512        ::fidl_next::munge!(let WireOptionalNodeInfoDeprecated { raw, _phantom: _ } = &mut *out);
23513
23514        if let Some(inner) = this {
23515            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
23516            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
23517        } else {
23518            ::fidl_next::RawWireUnion::encode_absent(raw);
23519        }
23520
23521        Ok(())
23522    }
23523}
23524
23525impl<'de> ::fidl_next::FromWire<WireNodeInfoDeprecated<'de>> for NodeInfoDeprecated {
23526    #[inline]
23527    fn from_wire(wire: WireNodeInfoDeprecated<'de>) -> Self {
23528        let wire = ::core::mem::ManuallyDrop::new(wire);
23529        match wire.raw.ordinal() {
23530            1 => Self::Service(::fidl_next::FromWire::from_wire(unsafe {
23531                wire.raw.get().read_unchecked::<crate::WireService>()
23532            })),
23533
23534            2 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
23535                wire.raw.get().read_unchecked::<crate::WireFileObject>()
23536            })),
23537
23538            3 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
23539                wire.raw.get().read_unchecked::<crate::WireDirectoryObject>()
23540            })),
23541
23542            4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
23543                wire.raw.get().read_unchecked::<crate::WireSymlinkObject<'de>>()
23544            })),
23545
23546            _ => unsafe { ::core::hint::unreachable_unchecked() },
23547        }
23548    }
23549}
23550
23551impl<'de> ::fidl_next::FromWireOption<WireOptionalNodeInfoDeprecated<'de>>
23552    for Box<NodeInfoDeprecated>
23553{
23554    #[inline]
23555    fn from_wire_option(wire: WireOptionalNodeInfoDeprecated<'de>) -> Option<Self> {
23556        if let Some(inner) = wire.into_option() {
23557            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
23558        } else {
23559            None
23560        }
23561    }
23562}
23563
23564/// The wire type corresponding to [`NodeInfoDeprecated`].
23565#[repr(transparent)]
23566pub struct WireNodeInfoDeprecated<'de> {
23567    raw: ::fidl_next::RawWireUnion,
23568    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
23569}
23570
23571impl<'de> Drop for WireNodeInfoDeprecated<'de> {
23572    fn drop(&mut self) {
23573        match self.raw.ordinal() {
23574            1 => {
23575                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireService>() };
23576            }
23577
23578            2 => {
23579                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireFileObject>() };
23580            }
23581
23582            3 => {
23583                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireDirectoryObject>() };
23584            }
23585
23586            4 => {
23587                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireSymlinkObject<'de>>() };
23588            }
23589
23590            _ => unsafe { ::core::hint::unreachable_unchecked() },
23591        }
23592    }
23593}
23594
23595unsafe impl ::fidl_next::Wire for WireNodeInfoDeprecated<'static> {
23596    type Decoded<'de> = WireNodeInfoDeprecated<'de>;
23597
23598    #[inline]
23599    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
23600        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
23601        ::fidl_next::RawWireUnion::zero_padding(raw);
23602    }
23603}
23604
23605pub mod node_info_deprecated {
23606    pub enum Ref<'de> {
23607        Service(&'de crate::WireService),
23608
23609        File(&'de crate::WireFileObject),
23610
23611        Directory(&'de crate::WireDirectoryObject),
23612
23613        Symlink(&'de crate::WireSymlinkObject<'de>),
23614    }
23615}
23616
23617impl<'de> WireNodeInfoDeprecated<'de> {
23618    pub fn as_ref(&self) -> crate::node_info_deprecated::Ref<'_> {
23619        match self.raw.ordinal() {
23620            1 => crate::node_info_deprecated::Ref::Service(unsafe {
23621                self.raw.get().deref_unchecked::<crate::WireService>()
23622            }),
23623
23624            2 => crate::node_info_deprecated::Ref::File(unsafe {
23625                self.raw.get().deref_unchecked::<crate::WireFileObject>()
23626            }),
23627
23628            3 => crate::node_info_deprecated::Ref::Directory(unsafe {
23629                self.raw.get().deref_unchecked::<crate::WireDirectoryObject>()
23630            }),
23631
23632            4 => crate::node_info_deprecated::Ref::Symlink(unsafe {
23633                self.raw.get().deref_unchecked::<crate::WireSymlinkObject<'_>>()
23634            }),
23635
23636            _ => unsafe { ::core::hint::unreachable_unchecked() },
23637        }
23638    }
23639}
23640
23641unsafe impl<___D> ::fidl_next::Decode<___D> for WireNodeInfoDeprecated<'static>
23642where
23643    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
23644
23645    ___D: ::fidl_next::Decoder,
23646
23647    ___D: ::fidl_next::fuchsia::HandleDecoder,
23648{
23649    fn decode(
23650        mut slot: ::fidl_next::Slot<'_, Self>,
23651        decoder: &mut ___D,
23652    ) -> Result<(), ::fidl_next::DecodeError> {
23653        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
23654        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
23655            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireService>(raw, decoder)?,
23656
23657            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireFileObject>(raw, decoder)?,
23658
23659            3 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirectoryObject>(
23660                raw, decoder,
23661            )?,
23662
23663            4 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireSymlinkObject<'static>>(
23664                raw, decoder,
23665            )?,
23666
23667            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
23668        }
23669
23670        Ok(())
23671    }
23672}
23673
23674impl<'de> ::core::fmt::Debug for WireNodeInfoDeprecated<'de> {
23675    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
23676        match self.raw.ordinal() {
23677            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireService>().fmt(f) },
23678            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireFileObject>().fmt(f) },
23679            3 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirectoryObject>().fmt(f) },
23680            4 => unsafe { self.raw.get().deref_unchecked::<crate::WireSymlinkObject<'_>>().fmt(f) },
23681            _ => unsafe { ::core::hint::unreachable_unchecked() },
23682        }
23683    }
23684}
23685
23686#[repr(transparent)]
23687pub struct WireOptionalNodeInfoDeprecated<'de> {
23688    raw: ::fidl_next::RawWireUnion,
23689    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
23690}
23691
23692unsafe impl ::fidl_next::Wire for WireOptionalNodeInfoDeprecated<'static> {
23693    type Decoded<'de> = WireOptionalNodeInfoDeprecated<'de>;
23694
23695    #[inline]
23696    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
23697        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
23698        ::fidl_next::RawWireUnion::zero_padding(raw);
23699    }
23700}
23701
23702impl<'de> WireOptionalNodeInfoDeprecated<'de> {
23703    pub fn is_some(&self) -> bool {
23704        self.raw.is_some()
23705    }
23706
23707    pub fn is_none(&self) -> bool {
23708        self.raw.is_none()
23709    }
23710
23711    pub fn as_ref(&self) -> Option<&WireNodeInfoDeprecated<'de>> {
23712        if self.is_some() {
23713            Some(unsafe { &*(self as *const Self).cast() })
23714        } else {
23715            None
23716        }
23717    }
23718
23719    pub fn into_option(self) -> Option<WireNodeInfoDeprecated<'de>> {
23720        if self.is_some() {
23721            Some(WireNodeInfoDeprecated { raw: self.raw, _phantom: ::core::marker::PhantomData })
23722        } else {
23723            None
23724        }
23725    }
23726}
23727
23728unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalNodeInfoDeprecated<'static>
23729where
23730    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
23731
23732    ___D: ::fidl_next::Decoder,
23733
23734    ___D: ::fidl_next::fuchsia::HandleDecoder,
23735{
23736    fn decode(
23737        mut slot: ::fidl_next::Slot<'_, Self>,
23738        decoder: &mut ___D,
23739    ) -> Result<(), ::fidl_next::DecodeError> {
23740        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
23741        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
23742            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireService>(raw, decoder)?,
23743
23744            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireFileObject>(raw, decoder)?,
23745
23746            3 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirectoryObject>(
23747                raw, decoder,
23748            )?,
23749
23750            4 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireSymlinkObject<'static>>(
23751                raw, decoder,
23752            )?,
23753
23754            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
23755            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
23756        }
23757
23758        Ok(())
23759    }
23760}
23761
23762impl<'de> ::core::fmt::Debug for WireOptionalNodeInfoDeprecated<'de> {
23763    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
23764        self.as_ref().fmt(f)
23765    }
23766}
23767
23768#[doc = " Flags used when opening a node reference must fall within this mask.\n"]
23769pub const OPEN_FLAGS_ALLOWED_WITH_NODE_REFERENCE: crate::OpenFlags =
23770    crate::OpenFlags::from_bits_retain(46661632);
23771
23772#[doc = " All known rights.\n"]
23773pub const OPEN_RIGHTS: crate::OpenFlags = crate::OpenFlags::from_bits_retain(11);
23774
23775#[doc = " Set of permissions that are expected when opening a node as executable.\n"]
23776pub const PERM_EXECUTABLE: crate::Flags = crate::Flags::from_bits_retain(201);
23777
23778#[doc = " Set of permissions that are expected when opening a node as readable.\n"]
23779pub const PERM_READABLE: crate::Flags = crate::Flags::from_bits_retain(211);
23780
23781#[doc = " Set of permissions that are expected when opening a node as writable.\n"]
23782pub const PERM_WRITABLE: crate::Flags = crate::Flags::from_bits_retain(485);
23783
23784#[doc = " Alias for directory permission alias rw*\n"]
23785pub const RW_STAR_DIR: crate::Operations = crate::Operations::from_bits_retain(503);
23786
23787#[doc = " Alias for directory permission alias rx*\n"]
23788pub const RX_STAR_DIR: crate::Operations = crate::Operations::from_bits_retain(219);
23789
23790#[doc = " Alias for directory permission alias r*\n"]
23791pub const R_STAR_DIR: crate::Operations = crate::Operations::from_bits_retain(211);
23792
23793#[doc = " The name of the extended attribute accessible via the SELinux context attribute.\n"]
23794pub const SELINUX_CONTEXT_NAME: &str = "security.selinux";
23795
23796pub const SYMLINK_PROTOCOL_NAME: &str = "fuchsia.io/Symlink";
23797
23798/// The type corresponding to the Symlink protocol.
23799#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
23800#[derive(Debug)]
23801pub struct Symlink;
23802
23803impl ::fidl_next::Discoverable for Symlink {
23804    const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
23805}
23806
23807pub mod symlink {
23808    pub mod prelude {
23809        pub use crate::{
23810            symlink, Symlink, SymlinkClientHandler, SymlinkClientSender, SymlinkServerHandler,
23811            SymlinkServerSender,
23812        };
23813
23814        pub use crate::ExtendedAttributeValue;
23815
23816        pub use crate::LinkableLinkIntoRequest;
23817
23818        pub use crate::LinkableLinkIntoResponse;
23819
23820        pub use crate::MutableNodeAttributes;
23821
23822        pub use crate::NodeAttributes2;
23823
23824        pub use crate::NodeDeprecatedCloneRequest;
23825
23826        pub use crate::NodeDeprecatedGetAttrResponse;
23827
23828        pub use crate::NodeDeprecatedGetFlagsResponse;
23829
23830        pub use crate::NodeDeprecatedSetAttrRequest;
23831
23832        pub use crate::NodeDeprecatedSetAttrResponse;
23833
23834        pub use crate::NodeDeprecatedSetFlagsRequest;
23835
23836        pub use crate::NodeDeprecatedSetFlagsResponse;
23837
23838        pub use crate::NodeGetAttributesRequest;
23839
23840        pub use crate::NodeGetExtendedAttributeRequest;
23841
23842        pub use crate::NodeListExtendedAttributesRequest;
23843
23844        pub use crate::NodeOnOpenRequest;
23845
23846        pub use crate::NodeQueryFilesystemResponse;
23847
23848        pub use crate::NodeRemoveExtendedAttributeRequest;
23849
23850        pub use crate::NodeSetExtendedAttributeRequest;
23851
23852        pub use crate::NodeSetFlagsRequest;
23853
23854        pub use crate::NodeGetFlagsResponse;
23855
23856        pub use crate::NodeRemoveExtendedAttributeResponse;
23857
23858        pub use crate::NodeSetExtendedAttributeResponse;
23859
23860        pub use crate::NodeSetFlagsResponse;
23861
23862        pub use crate::NodeSyncResponse;
23863
23864        pub use crate::NodeUpdateAttributesResponse;
23865
23866        pub use crate::Representation;
23867
23868        pub use crate::SymlinkInfo;
23869
23870        pub use ::fidl_next_fuchsia_unknown::CloneableCloneRequest;
23871
23872        pub use ::fidl_next_fuchsia_unknown::CloseableCloseResponse;
23873
23874        pub use ::fidl_next_fuchsia_unknown::QueryableQueryResponse;
23875    }
23876
23877    pub struct LinkInto;
23878
23879    impl ::fidl_next::Method for LinkInto {
23880        const ORDINAL: u64 = 6121399674497678964;
23881
23882        type Protocol = crate::Symlink;
23883
23884        type Request = crate::WireLinkableLinkIntoRequest<'static>;
23885
23886        type Response = ::fidl_next::WireResult<
23887            'static,
23888            crate::WireLinkableLinkIntoResponse,
23889            ::fidl_next::WireI32,
23890        >;
23891    }
23892
23893    pub struct Clone;
23894
23895    impl ::fidl_next::Method for Clone {
23896        const ORDINAL: u64 = 2366825959783828089;
23897
23898        type Protocol = crate::Symlink;
23899
23900        type Request = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest;
23901
23902        type Response = ::fidl_next::Never;
23903    }
23904
23905    pub struct Close;
23906
23907    impl ::fidl_next::Method for Close {
23908        const ORDINAL: u64 = 6540867515453498750;
23909
23910        type Protocol = crate::Symlink;
23911
23912        type Request = ();
23913
23914        type Response = ::fidl_next::WireResult<
23915            'static,
23916            ::fidl_next_fuchsia_unknown::WireCloseableCloseResponse,
23917            ::fidl_next::WireI32,
23918        >;
23919    }
23920
23921    pub struct Query;
23922
23923    impl ::fidl_next::Method for Query {
23924        const ORDINAL: u64 = 2763219980499352582;
23925
23926        type Protocol = crate::Symlink;
23927
23928        type Request = ();
23929
23930        type Response = ::fidl_next_fuchsia_unknown::WireQueryableQueryResponse<'static>;
23931    }
23932
23933    pub struct DeprecatedClone;
23934
23935    impl ::fidl_next::Method for DeprecatedClone {
23936        const ORDINAL: u64 = 6512600400724287855;
23937
23938        type Protocol = crate::Symlink;
23939
23940        type Request = crate::WireNodeDeprecatedCloneRequest;
23941
23942        type Response = ::fidl_next::Never;
23943    }
23944
23945    pub struct OnOpen;
23946
23947    impl ::fidl_next::Method for OnOpen {
23948        const ORDINAL: u64 = 9207534335756671346;
23949
23950        type Protocol = crate::Symlink;
23951
23952        type Request = ::fidl_next::Never;
23953
23954        type Response = crate::WireNodeOnOpenRequest<'static>;
23955    }
23956
23957    pub struct DeprecatedGetAttr;
23958
23959    impl ::fidl_next::Method for DeprecatedGetAttr {
23960        const ORDINAL: u64 = 8689798978500614909;
23961
23962        type Protocol = crate::Symlink;
23963
23964        type Request = ();
23965
23966        type Response = crate::WireNodeDeprecatedGetAttrResponse;
23967    }
23968
23969    pub struct DeprecatedSetAttr;
23970
23971    impl ::fidl_next::Method for DeprecatedSetAttr {
23972        const ORDINAL: u64 = 4721673413776871238;
23973
23974        type Protocol = crate::Symlink;
23975
23976        type Request = crate::WireNodeDeprecatedSetAttrRequest;
23977
23978        type Response = crate::WireNodeDeprecatedSetAttrResponse;
23979    }
23980
23981    pub struct DeprecatedGetFlags;
23982
23983    impl ::fidl_next::Method for DeprecatedGetFlags {
23984        const ORDINAL: u64 = 6595803110182632097;
23985
23986        type Protocol = crate::Symlink;
23987
23988        type Request = ();
23989
23990        type Response = crate::WireNodeDeprecatedGetFlagsResponse;
23991    }
23992
23993    pub struct DeprecatedSetFlags;
23994
23995    impl ::fidl_next::Method for DeprecatedSetFlags {
23996        const ORDINAL: u64 = 5950864159036794675;
23997
23998        type Protocol = crate::Symlink;
23999
24000        type Request = crate::WireNodeDeprecatedSetFlagsRequest;
24001
24002        type Response = crate::WireNodeDeprecatedSetFlagsResponse;
24003    }
24004
24005    pub struct GetFlags;
24006
24007    impl ::fidl_next::Method for GetFlags {
24008        const ORDINAL: u64 = 105530239381466147;
24009
24010        type Protocol = crate::Symlink;
24011
24012        type Request = ();
24013
24014        type Response = ::fidl_next::WireFlexibleResult<
24015            'static,
24016            crate::WireNodeGetFlagsResponse,
24017            ::fidl_next::WireI32,
24018        >;
24019    }
24020
24021    pub struct SetFlags;
24022
24023    impl ::fidl_next::Method for SetFlags {
24024        const ORDINAL: u64 = 6172186066099445416;
24025
24026        type Protocol = crate::Symlink;
24027
24028        type Request = crate::WireNodeSetFlagsRequest;
24029
24030        type Response = ::fidl_next::WireFlexibleResult<
24031            'static,
24032            crate::WireNodeSetFlagsResponse,
24033            ::fidl_next::WireI32,
24034        >;
24035    }
24036
24037    pub struct QueryFilesystem;
24038
24039    impl ::fidl_next::Method for QueryFilesystem {
24040        const ORDINAL: u64 = 8013111122914313744;
24041
24042        type Protocol = crate::Symlink;
24043
24044        type Request = ();
24045
24046        type Response = crate::WireNodeQueryFilesystemResponse<'static>;
24047    }
24048
24049    pub struct OnRepresentation;
24050
24051    impl ::fidl_next::Method for OnRepresentation {
24052        const ORDINAL: u64 = 6679970090861613324;
24053
24054        type Protocol = crate::Symlink;
24055
24056        type Request = ::fidl_next::Never;
24057
24058        type Response = crate::WireRepresentation<'static>;
24059    }
24060
24061    pub struct GetAttributes;
24062
24063    impl ::fidl_next::Method for GetAttributes {
24064        const ORDINAL: u64 = 4414537700416816443;
24065
24066        type Protocol = crate::Symlink;
24067
24068        type Request = crate::WireNodeGetAttributesRequest;
24069
24070        type Response = ::fidl_next::WireResult<
24071            'static,
24072            crate::WireNodeAttributes2<'static>,
24073            ::fidl_next::WireI32,
24074        >;
24075    }
24076
24077    pub struct UpdateAttributes;
24078
24079    impl ::fidl_next::Method for UpdateAttributes {
24080        const ORDINAL: u64 = 3677402239314018056;
24081
24082        type Protocol = crate::Symlink;
24083
24084        type Request = crate::WireMutableNodeAttributes<'static>;
24085
24086        type Response = ::fidl_next::WireResult<
24087            'static,
24088            crate::WireNodeUpdateAttributesResponse,
24089            ::fidl_next::WireI32,
24090        >;
24091    }
24092
24093    pub struct Sync;
24094
24095    impl ::fidl_next::Method for Sync {
24096        const ORDINAL: u64 = 3196473584242777161;
24097
24098        type Protocol = crate::Symlink;
24099
24100        type Request = ();
24101
24102        type Response =
24103            ::fidl_next::WireResult<'static, crate::WireNodeSyncResponse, ::fidl_next::WireI32>;
24104    }
24105
24106    pub struct ListExtendedAttributes;
24107
24108    impl ::fidl_next::Method for ListExtendedAttributes {
24109        const ORDINAL: u64 = 5431626189872037072;
24110
24111        type Protocol = crate::Symlink;
24112
24113        type Request = crate::WireNodeListExtendedAttributesRequest;
24114
24115        type Response = ::fidl_next::Never;
24116    }
24117
24118    pub struct GetExtendedAttribute;
24119
24120    impl ::fidl_next::Method for GetExtendedAttribute {
24121        const ORDINAL: u64 = 5043930208506967771;
24122
24123        type Protocol = crate::Symlink;
24124
24125        type Request = crate::WireNodeGetExtendedAttributeRequest<'static>;
24126
24127        type Response = ::fidl_next::WireResult<
24128            'static,
24129            crate::WireExtendedAttributeValue<'static>,
24130            ::fidl_next::WireI32,
24131        >;
24132    }
24133
24134    pub struct SetExtendedAttribute;
24135
24136    impl ::fidl_next::Method for SetExtendedAttribute {
24137        const ORDINAL: u64 = 5374223046099989052;
24138
24139        type Protocol = crate::Symlink;
24140
24141        type Request = crate::WireNodeSetExtendedAttributeRequest<'static>;
24142
24143        type Response = ::fidl_next::WireResult<
24144            'static,
24145            crate::WireNodeSetExtendedAttributeResponse,
24146            ::fidl_next::WireI32,
24147        >;
24148    }
24149
24150    pub struct RemoveExtendedAttribute;
24151
24152    impl ::fidl_next::Method for RemoveExtendedAttribute {
24153        const ORDINAL: u64 = 8794297771444732717;
24154
24155        type Protocol = crate::Symlink;
24156
24157        type Request = crate::WireNodeRemoveExtendedAttributeRequest<'static>;
24158
24159        type Response = ::fidl_next::WireResult<
24160            'static,
24161            crate::WireNodeRemoveExtendedAttributeResponse,
24162            ::fidl_next::WireI32,
24163        >;
24164    }
24165
24166    pub struct Describe;
24167
24168    impl ::fidl_next::Method for Describe {
24169        const ORDINAL: u64 = 8371117097481679347;
24170
24171        type Protocol = crate::Symlink;
24172
24173        type Request = ();
24174
24175        type Response = ::fidl_next::WireFlexible<'static, crate::WireSymlinkInfo<'static>>;
24176    }
24177}
24178
24179/// A helper trait for the `Symlink` client sender.
24180pub trait SymlinkClientSender {
24181    type Transport: ::fidl_next::Transport;
24182
24183    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
24184    fn link_into<___R>(
24185        &self,
24186        request: ___R,
24187    ) -> Result<
24188        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::LinkInto>,
24189        ::fidl_next::EncodeError,
24190    >
24191    where
24192        ___R: ::fidl_next::Encode<
24193            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24194            Encoded = crate::WireLinkableLinkIntoRequest<'static>,
24195        >;
24196
24197    fn clone<___R>(
24198        &self,
24199        request: ___R,
24200    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24201    where
24202        ___R: ::fidl_next::Encode<
24203            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24204            Encoded = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest,
24205        >;
24206
24207    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
24208    fn close(
24209        &self,
24210    ) -> Result<
24211        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::Close>,
24212        ::fidl_next::EncodeError,
24213    >;
24214
24215    fn query(
24216        &self,
24217    ) -> Result<
24218        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::Query>,
24219        ::fidl_next::EncodeError,
24220    >;
24221
24222    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
24223    fn deprecated_clone<___R>(
24224        &self,
24225        request: ___R,
24226    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24227    where
24228        ___R: ::fidl_next::Encode<
24229            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24230            Encoded = crate::WireNodeDeprecatedCloneRequest,
24231        >;
24232
24233    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
24234    fn deprecated_get_attr(
24235        &self,
24236    ) -> Result<
24237        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::DeprecatedGetAttr>,
24238        ::fidl_next::EncodeError,
24239    >;
24240
24241    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
24242    fn deprecated_set_attr<___R>(
24243        &self,
24244        request: ___R,
24245    ) -> Result<
24246        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::DeprecatedSetAttr>,
24247        ::fidl_next::EncodeError,
24248    >
24249    where
24250        ___R: ::fidl_next::Encode<
24251            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24252            Encoded = crate::WireNodeDeprecatedSetAttrRequest,
24253        >;
24254
24255    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
24256    fn deprecated_get_flags(
24257        &self,
24258    ) -> Result<
24259        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::DeprecatedGetFlags>,
24260        ::fidl_next::EncodeError,
24261    >;
24262
24263    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
24264    fn deprecated_set_flags<___R>(
24265        &self,
24266        request: ___R,
24267    ) -> Result<
24268        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::DeprecatedSetFlags>,
24269        ::fidl_next::EncodeError,
24270    >
24271    where
24272        ___R: ::fidl_next::Encode<
24273            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24274            Encoded = crate::WireNodeDeprecatedSetFlagsRequest,
24275        >;
24276
24277    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
24278    fn get_flags(
24279        &self,
24280    ) -> Result<
24281        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::GetFlags>,
24282        ::fidl_next::EncodeError,
24283    >;
24284
24285    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
24286    fn set_flags<___R>(
24287        &self,
24288        request: ___R,
24289    ) -> Result<
24290        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::SetFlags>,
24291        ::fidl_next::EncodeError,
24292    >
24293    where
24294        ___R: ::fidl_next::Encode<
24295            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24296            Encoded = crate::WireNodeSetFlagsRequest,
24297        >;
24298
24299    #[doc = " Query the filesystem for filesystem-specific information.\n"]
24300    fn query_filesystem(
24301        &self,
24302    ) -> Result<
24303        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::QueryFilesystem>,
24304        ::fidl_next::EncodeError,
24305    >;
24306
24307    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
24308    fn get_attributes<___R>(
24309        &self,
24310        request: ___R,
24311    ) -> Result<
24312        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::GetAttributes>,
24313        ::fidl_next::EncodeError,
24314    >
24315    where
24316        ___R: ::fidl_next::Encode<
24317            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24318            Encoded = crate::WireNodeGetAttributesRequest,
24319        >;
24320
24321    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
24322    fn update_attributes<___R>(
24323        &self,
24324        request: ___R,
24325    ) -> Result<
24326        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::UpdateAttributes>,
24327        ::fidl_next::EncodeError,
24328    >
24329    where
24330        ___R: ::fidl_next::Encode<
24331            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24332            Encoded = crate::WireMutableNodeAttributes<'static>,
24333        >;
24334
24335    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
24336    fn sync(
24337        &self,
24338    ) -> Result<
24339        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::Sync>,
24340        ::fidl_next::EncodeError,
24341    >;
24342
24343    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
24344    fn list_extended_attributes<___R>(
24345        &self,
24346        request: ___R,
24347    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24348    where
24349        ___R: ::fidl_next::Encode<
24350            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24351            Encoded = crate::WireNodeListExtendedAttributesRequest,
24352        >;
24353
24354    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
24355    fn get_extended_attribute<___R>(
24356        &self,
24357        request: ___R,
24358    ) -> Result<
24359        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::GetExtendedAttribute>,
24360        ::fidl_next::EncodeError,
24361    >
24362    where
24363        ___R: ::fidl_next::Encode<
24364            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24365            Encoded = crate::WireNodeGetExtendedAttributeRequest<'static>,
24366        >;
24367
24368    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
24369    fn set_extended_attribute<___R>(
24370        &self,
24371        request: ___R,
24372    ) -> Result<
24373        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::SetExtendedAttribute>,
24374        ::fidl_next::EncodeError,
24375    >
24376    where
24377        ___R: ::fidl_next::Encode<
24378            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24379            Encoded = crate::WireNodeSetExtendedAttributeRequest<'static>,
24380        >;
24381
24382    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
24383    fn remove_extended_attribute<___R>(
24384        &self,
24385        request: ___R,
24386    ) -> Result<
24387        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::RemoveExtendedAttribute>,
24388        ::fidl_next::EncodeError,
24389    >
24390    where
24391        ___R: ::fidl_next::Encode<
24392            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24393            Encoded = crate::WireNodeRemoveExtendedAttributeRequest<'static>,
24394        >;
24395
24396    fn describe(
24397        &self,
24398    ) -> Result<
24399        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::Describe>,
24400        ::fidl_next::EncodeError,
24401    >;
24402}
24403
24404impl<___T> SymlinkClientSender for ::fidl_next::ClientSender<___T, Symlink>
24405where
24406    ___T: ::fidl_next::Transport,
24407{
24408    type Transport = ___T;
24409
24410    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
24411    fn link_into<___R>(
24412        &self,
24413        request: ___R,
24414    ) -> Result<
24415        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::LinkInto>,
24416        ::fidl_next::EncodeError,
24417    >
24418    where
24419        ___R: ::fidl_next::Encode<
24420            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24421            Encoded = crate::WireLinkableLinkIntoRequest<'static>,
24422        >,
24423    {
24424        self.as_untyped()
24425            .send_two_way(6121399674497678964, request)
24426            .map(::fidl_next::ResponseFuture::from_untyped)
24427    }
24428
24429    fn clone<___R>(
24430        &self,
24431        request: ___R,
24432    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24433    where
24434        ___R: ::fidl_next::Encode<
24435            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24436            Encoded = ::fidl_next_fuchsia_unknown::WireCloneableCloneRequest,
24437        >,
24438    {
24439        self.as_untyped().send_one_way(2366825959783828089, request)
24440    }
24441
24442    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
24443    fn close(
24444        &self,
24445    ) -> Result<
24446        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::Close>,
24447        ::fidl_next::EncodeError,
24448    > {
24449        self.as_untyped()
24450            .send_two_way(6540867515453498750, ())
24451            .map(::fidl_next::ResponseFuture::from_untyped)
24452    }
24453
24454    fn query(
24455        &self,
24456    ) -> Result<
24457        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::Query>,
24458        ::fidl_next::EncodeError,
24459    > {
24460        self.as_untyped()
24461            .send_two_way(2763219980499352582, ())
24462            .map(::fidl_next::ResponseFuture::from_untyped)
24463    }
24464
24465    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
24466    fn deprecated_clone<___R>(
24467        &self,
24468        request: ___R,
24469    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24470    where
24471        ___R: ::fidl_next::Encode<
24472            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24473            Encoded = crate::WireNodeDeprecatedCloneRequest,
24474        >,
24475    {
24476        self.as_untyped().send_one_way(6512600400724287855, request)
24477    }
24478
24479    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
24480    fn deprecated_get_attr(
24481        &self,
24482    ) -> Result<
24483        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::DeprecatedGetAttr>,
24484        ::fidl_next::EncodeError,
24485    > {
24486        self.as_untyped()
24487            .send_two_way(8689798978500614909, ())
24488            .map(::fidl_next::ResponseFuture::from_untyped)
24489    }
24490
24491    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
24492    fn deprecated_set_attr<___R>(
24493        &self,
24494        request: ___R,
24495    ) -> Result<
24496        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::DeprecatedSetAttr>,
24497        ::fidl_next::EncodeError,
24498    >
24499    where
24500        ___R: ::fidl_next::Encode<
24501            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24502            Encoded = crate::WireNodeDeprecatedSetAttrRequest,
24503        >,
24504    {
24505        self.as_untyped()
24506            .send_two_way(4721673413776871238, request)
24507            .map(::fidl_next::ResponseFuture::from_untyped)
24508    }
24509
24510    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
24511    fn deprecated_get_flags(
24512        &self,
24513    ) -> Result<
24514        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::DeprecatedGetFlags>,
24515        ::fidl_next::EncodeError,
24516    > {
24517        self.as_untyped()
24518            .send_two_way(6595803110182632097, ())
24519            .map(::fidl_next::ResponseFuture::from_untyped)
24520    }
24521
24522    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
24523    fn deprecated_set_flags<___R>(
24524        &self,
24525        request: ___R,
24526    ) -> Result<
24527        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::DeprecatedSetFlags>,
24528        ::fidl_next::EncodeError,
24529    >
24530    where
24531        ___R: ::fidl_next::Encode<
24532            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24533            Encoded = crate::WireNodeDeprecatedSetFlagsRequest,
24534        >,
24535    {
24536        self.as_untyped()
24537            .send_two_way(5950864159036794675, request)
24538            .map(::fidl_next::ResponseFuture::from_untyped)
24539    }
24540
24541    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
24542    fn get_flags(
24543        &self,
24544    ) -> Result<
24545        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::GetFlags>,
24546        ::fidl_next::EncodeError,
24547    > {
24548        self.as_untyped()
24549            .send_two_way(105530239381466147, ())
24550            .map(::fidl_next::ResponseFuture::from_untyped)
24551    }
24552
24553    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
24554    fn set_flags<___R>(
24555        &self,
24556        request: ___R,
24557    ) -> Result<
24558        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::SetFlags>,
24559        ::fidl_next::EncodeError,
24560    >
24561    where
24562        ___R: ::fidl_next::Encode<
24563            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24564            Encoded = crate::WireNodeSetFlagsRequest,
24565        >,
24566    {
24567        self.as_untyped()
24568            .send_two_way(6172186066099445416, request)
24569            .map(::fidl_next::ResponseFuture::from_untyped)
24570    }
24571
24572    #[doc = " Query the filesystem for filesystem-specific information.\n"]
24573    fn query_filesystem(
24574        &self,
24575    ) -> Result<
24576        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::QueryFilesystem>,
24577        ::fidl_next::EncodeError,
24578    > {
24579        self.as_untyped()
24580            .send_two_way(8013111122914313744, ())
24581            .map(::fidl_next::ResponseFuture::from_untyped)
24582    }
24583
24584    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
24585    fn get_attributes<___R>(
24586        &self,
24587        request: ___R,
24588    ) -> Result<
24589        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::GetAttributes>,
24590        ::fidl_next::EncodeError,
24591    >
24592    where
24593        ___R: ::fidl_next::Encode<
24594            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24595            Encoded = crate::WireNodeGetAttributesRequest,
24596        >,
24597    {
24598        self.as_untyped()
24599            .send_two_way(4414537700416816443, request)
24600            .map(::fidl_next::ResponseFuture::from_untyped)
24601    }
24602
24603    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
24604    fn update_attributes<___R>(
24605        &self,
24606        request: ___R,
24607    ) -> Result<
24608        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::UpdateAttributes>,
24609        ::fidl_next::EncodeError,
24610    >
24611    where
24612        ___R: ::fidl_next::Encode<
24613            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24614            Encoded = crate::WireMutableNodeAttributes<'static>,
24615        >,
24616    {
24617        self.as_untyped()
24618            .send_two_way(3677402239314018056, request)
24619            .map(::fidl_next::ResponseFuture::from_untyped)
24620    }
24621
24622    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
24623    fn sync(
24624        &self,
24625    ) -> Result<
24626        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::Sync>,
24627        ::fidl_next::EncodeError,
24628    > {
24629        self.as_untyped()
24630            .send_two_way(3196473584242777161, ())
24631            .map(::fidl_next::ResponseFuture::from_untyped)
24632    }
24633
24634    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
24635    fn list_extended_attributes<___R>(
24636        &self,
24637        request: ___R,
24638    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24639    where
24640        ___R: ::fidl_next::Encode<
24641            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24642            Encoded = crate::WireNodeListExtendedAttributesRequest,
24643        >,
24644    {
24645        self.as_untyped().send_one_way(5431626189872037072, request)
24646    }
24647
24648    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
24649    fn get_extended_attribute<___R>(
24650        &self,
24651        request: ___R,
24652    ) -> Result<
24653        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::GetExtendedAttribute>,
24654        ::fidl_next::EncodeError,
24655    >
24656    where
24657        ___R: ::fidl_next::Encode<
24658            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24659            Encoded = crate::WireNodeGetExtendedAttributeRequest<'static>,
24660        >,
24661    {
24662        self.as_untyped()
24663            .send_two_way(5043930208506967771, request)
24664            .map(::fidl_next::ResponseFuture::from_untyped)
24665    }
24666
24667    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
24668    fn set_extended_attribute<___R>(
24669        &self,
24670        request: ___R,
24671    ) -> Result<
24672        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::SetExtendedAttribute>,
24673        ::fidl_next::EncodeError,
24674    >
24675    where
24676        ___R: ::fidl_next::Encode<
24677            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24678            Encoded = crate::WireNodeSetExtendedAttributeRequest<'static>,
24679        >,
24680    {
24681        self.as_untyped()
24682            .send_two_way(5374223046099989052, request)
24683            .map(::fidl_next::ResponseFuture::from_untyped)
24684    }
24685
24686    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
24687    fn remove_extended_attribute<___R>(
24688        &self,
24689        request: ___R,
24690    ) -> Result<
24691        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::RemoveExtendedAttribute>,
24692        ::fidl_next::EncodeError,
24693    >
24694    where
24695        ___R: ::fidl_next::Encode<
24696            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24697            Encoded = crate::WireNodeRemoveExtendedAttributeRequest<'static>,
24698        >,
24699    {
24700        self.as_untyped()
24701            .send_two_way(8794297771444732717, request)
24702            .map(::fidl_next::ResponseFuture::from_untyped)
24703    }
24704
24705    fn describe(
24706        &self,
24707    ) -> Result<
24708        ::fidl_next::ResponseFuture<'_, Self::Transport, symlink::Describe>,
24709        ::fidl_next::EncodeError,
24710    > {
24711        self.as_untyped()
24712            .send_two_way(8371117097481679347, ())
24713            .map(::fidl_next::ResponseFuture::from_untyped)
24714    }
24715}
24716
24717/// A client handler for the Symlink protocol.
24718///
24719/// See [`Symlink`] for more details.
24720pub trait SymlinkClientHandler<___T: ::fidl_next::Transport> {
24721    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
24722    fn on_open(
24723        &mut self,
24724        sender: &::fidl_next::ClientSender<___T, Symlink>,
24725
24726        event: ::fidl_next::Response<___T, symlink::OnOpen>,
24727    );
24728
24729    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
24730    fn on_representation(
24731        &mut self,
24732        sender: &::fidl_next::ClientSender<___T, Symlink>,
24733
24734        event: ::fidl_next::Response<___T, symlink::OnRepresentation>,
24735    );
24736
24737    fn on_unknown_interaction(
24738        &mut self,
24739        sender: &::fidl_next::ClientSender<___T, Symlink>,
24740        ordinal: u64,
24741    ) {
24742        sender.close();
24743    }
24744}
24745
24746impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Symlink
24747where
24748    ___T: ::fidl_next::Transport,
24749    ___H: SymlinkClientHandler<___T>,
24750
24751    <symlink::LinkInto as ::fidl_next::Method>::Response:
24752        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24753
24754    <symlink::Close as ::fidl_next::Method>::Response:
24755        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24756
24757    <symlink::Query as ::fidl_next::Method>::Response:
24758        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24759
24760    <symlink::OnOpen as ::fidl_next::Method>::Response:
24761        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24762
24763    <symlink::DeprecatedGetAttr as ::fidl_next::Method>::Response:
24764        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24765
24766    <symlink::DeprecatedSetAttr as ::fidl_next::Method>::Response:
24767        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24768
24769    <symlink::DeprecatedGetFlags as ::fidl_next::Method>::Response:
24770        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24771
24772    <symlink::DeprecatedSetFlags as ::fidl_next::Method>::Response:
24773        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24774
24775    <symlink::GetFlags as ::fidl_next::Method>::Response:
24776        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24777
24778    <symlink::SetFlags as ::fidl_next::Method>::Response:
24779        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24780
24781    <symlink::QueryFilesystem as ::fidl_next::Method>::Response:
24782        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24783
24784    <symlink::OnRepresentation as ::fidl_next::Method>::Response:
24785        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24786
24787    <symlink::GetAttributes as ::fidl_next::Method>::Response:
24788        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24789
24790    <symlink::UpdateAttributes as ::fidl_next::Method>::Response:
24791        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24792
24793    <symlink::Sync as ::fidl_next::Method>::Response:
24794        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24795
24796    <symlink::GetExtendedAttribute as ::fidl_next::Method>::Response:
24797        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24798
24799    <symlink::SetExtendedAttribute as ::fidl_next::Method>::Response:
24800        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24801
24802    <symlink::RemoveExtendedAttribute as ::fidl_next::Method>::Response:
24803        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24804
24805    <symlink::Describe as ::fidl_next::Method>::Response:
24806        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
24807{
24808    fn on_event(
24809        handler: &mut ___H,
24810        sender: &::fidl_next::ClientSender<___T, Self>,
24811        ordinal: u64,
24812        buffer: ___T::RecvBuffer,
24813    ) {
24814        match ordinal {
24815            9207534335756671346 => match ::fidl_next::DecoderExt::decode(buffer) {
24816                Ok(decoded) => handler.on_open(sender, decoded),
24817                Err(e) => {
24818                    sender.close();
24819                }
24820            },
24821
24822            6679970090861613324 => match ::fidl_next::DecoderExt::decode(buffer) {
24823                Ok(decoded) => handler.on_representation(sender, decoded),
24824                Err(e) => {
24825                    sender.close();
24826                }
24827            },
24828
24829            ordinal => handler.on_unknown_interaction(sender, ordinal),
24830        }
24831    }
24832}
24833
24834/// A helper trait for the `Symlink` server sender.
24835pub trait SymlinkServerSender {
24836    type Transport: ::fidl_next::Transport;
24837
24838    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
24839
24840    fn on_open<___R>(
24841        &self,
24842        request: ___R,
24843    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24844    where
24845        ___R: ::fidl_next::Encode<
24846            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24847            Encoded = <symlink::OnOpen as ::fidl_next::Method>::Response,
24848        >;
24849
24850    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
24851
24852    fn on_representation<___R>(
24853        &self,
24854        request: ___R,
24855    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24856    where
24857        ___R: ::fidl_next::Encode<
24858            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24859            Encoded = <symlink::OnRepresentation as ::fidl_next::Method>::Response,
24860        >;
24861}
24862
24863impl<___T> SymlinkServerSender for ::fidl_next::ServerSender<___T, Symlink>
24864where
24865    ___T: ::fidl_next::Transport,
24866{
24867    type Transport = ___T;
24868
24869    #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
24870
24871    fn on_open<___R>(
24872        &self,
24873        request: ___R,
24874    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24875    where
24876        ___R: ::fidl_next::Encode<
24877            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24878            Encoded = <symlink::OnOpen as ::fidl_next::Method>::Response,
24879        >,
24880    {
24881        self.as_untyped().send_event(9207534335756671346, request)
24882    }
24883
24884    #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
24885
24886    fn on_representation<___R>(
24887        &self,
24888        request: ___R,
24889    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
24890    where
24891        ___R: ::fidl_next::Encode<
24892            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
24893            Encoded = <symlink::OnRepresentation as ::fidl_next::Method>::Response,
24894        >,
24895    {
24896        self.as_untyped().send_event(6679970090861613324, request)
24897    }
24898}
24899
24900/// A server handler for the Symlink protocol.
24901///
24902/// See [`Symlink`] for more details.
24903pub trait SymlinkServerHandler<___T: ::fidl_next::Transport> {
24904    #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
24905    fn link_into(
24906        &mut self,
24907        sender: &::fidl_next::ServerSender<___T, Symlink>,
24908
24909        request: ::fidl_next::Request<___T, symlink::LinkInto>,
24910
24911        responder: ::fidl_next::Responder<symlink::LinkInto>,
24912    );
24913
24914    fn clone(
24915        &mut self,
24916        sender: &::fidl_next::ServerSender<___T, Symlink>,
24917
24918        request: ::fidl_next::Request<___T, symlink::Clone>,
24919    );
24920
24921    #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
24922    fn close(
24923        &mut self,
24924        sender: &::fidl_next::ServerSender<___T, Symlink>,
24925
24926        responder: ::fidl_next::Responder<symlink::Close>,
24927    );
24928
24929    fn query(
24930        &mut self,
24931        sender: &::fidl_next::ServerSender<___T, Symlink>,
24932
24933        responder: ::fidl_next::Responder<symlink::Query>,
24934    );
24935
24936    #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
24937    fn deprecated_clone(
24938        &mut self,
24939        sender: &::fidl_next::ServerSender<___T, Symlink>,
24940
24941        request: ::fidl_next::Request<___T, symlink::DeprecatedClone>,
24942    );
24943
24944    #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
24945    fn deprecated_get_attr(
24946        &mut self,
24947        sender: &::fidl_next::ServerSender<___T, Symlink>,
24948
24949        responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr>,
24950    );
24951
24952    #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
24953    fn deprecated_set_attr(
24954        &mut self,
24955        sender: &::fidl_next::ServerSender<___T, Symlink>,
24956
24957        request: ::fidl_next::Request<___T, symlink::DeprecatedSetAttr>,
24958
24959        responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr>,
24960    );
24961
24962    #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
24963    fn deprecated_get_flags(
24964        &mut self,
24965        sender: &::fidl_next::ServerSender<___T, Symlink>,
24966
24967        responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags>,
24968    );
24969
24970    #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
24971    fn deprecated_set_flags(
24972        &mut self,
24973        sender: &::fidl_next::ServerSender<___T, Symlink>,
24974
24975        request: ::fidl_next::Request<___T, symlink::DeprecatedSetFlags>,
24976
24977        responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags>,
24978    );
24979
24980    #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n  - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n  - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n  - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
24981    fn get_flags(
24982        &mut self,
24983        sender: &::fidl_next::ServerSender<___T, Symlink>,
24984
24985        responder: ::fidl_next::Responder<symlink::GetFlags>,
24986    );
24987
24988    #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n  - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n  - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
24989    fn set_flags(
24990        &mut self,
24991        sender: &::fidl_next::ServerSender<___T, Symlink>,
24992
24993        request: ::fidl_next::Request<___T, symlink::SetFlags>,
24994
24995        responder: ::fidl_next::Responder<symlink::SetFlags>,
24996    );
24997
24998    #[doc = " Query the filesystem for filesystem-specific information.\n"]
24999    fn query_filesystem(
25000        &mut self,
25001        sender: &::fidl_next::ServerSender<___T, Symlink>,
25002
25003        responder: ::fidl_next::Responder<symlink::QueryFilesystem>,
25004    );
25005
25006    #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n   should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
25007    fn get_attributes(
25008        &mut self,
25009        sender: &::fidl_next::ServerSender<___T, Symlink>,
25010
25011        request: ::fidl_next::Request<___T, symlink::GetAttributes>,
25012
25013        responder: ::fidl_next::Responder<symlink::GetAttributes>,
25014    );
25015
25016    #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
25017    fn update_attributes(
25018        &mut self,
25019        sender: &::fidl_next::ServerSender<___T, Symlink>,
25020
25021        request: ::fidl_next::Request<___T, symlink::UpdateAttributes>,
25022
25023        responder: ::fidl_next::Responder<symlink::UpdateAttributes>,
25024    );
25025
25026    #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
25027    fn sync(
25028        &mut self,
25029        sender: &::fidl_next::ServerSender<___T, Symlink>,
25030
25031        responder: ::fidl_next::Responder<symlink::Sync>,
25032    );
25033
25034    #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
25035    fn list_extended_attributes(
25036        &mut self,
25037        sender: &::fidl_next::ServerSender<___T, Symlink>,
25038
25039        request: ::fidl_next::Request<___T, symlink::ListExtendedAttributes>,
25040    );
25041
25042    #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
25043    fn get_extended_attribute(
25044        &mut self,
25045        sender: &::fidl_next::ServerSender<___T, Symlink>,
25046
25047        request: ::fidl_next::Request<___T, symlink::GetExtendedAttribute>,
25048
25049        responder: ::fidl_next::Responder<symlink::GetExtendedAttribute>,
25050    );
25051
25052    #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
25053    fn set_extended_attribute(
25054        &mut self,
25055        sender: &::fidl_next::ServerSender<___T, Symlink>,
25056
25057        request: ::fidl_next::Request<___T, symlink::SetExtendedAttribute>,
25058
25059        responder: ::fidl_next::Responder<symlink::SetExtendedAttribute>,
25060    );
25061
25062    #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
25063    fn remove_extended_attribute(
25064        &mut self,
25065        sender: &::fidl_next::ServerSender<___T, Symlink>,
25066
25067        request: ::fidl_next::Request<___T, symlink::RemoveExtendedAttribute>,
25068
25069        responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute>,
25070    );
25071
25072    fn describe(
25073        &mut self,
25074        sender: &::fidl_next::ServerSender<___T, Symlink>,
25075
25076        responder: ::fidl_next::Responder<symlink::Describe>,
25077    );
25078
25079    fn on_unknown_interaction(
25080        &mut self,
25081        sender: &::fidl_next::ServerSender<___T, Symlink>,
25082        ordinal: u64,
25083    ) {
25084        sender.close();
25085    }
25086}
25087
25088impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Symlink
25089where
25090    ___T: ::fidl_next::Transport,
25091    ___H: SymlinkServerHandler<___T>,
25092
25093    <symlink::LinkInto as ::fidl_next::Method>::Request:
25094        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25095
25096    <symlink::Clone as ::fidl_next::Method>::Request:
25097        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25098
25099    <symlink::DeprecatedClone as ::fidl_next::Method>::Request:
25100        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25101
25102    <symlink::DeprecatedSetAttr as ::fidl_next::Method>::Request:
25103        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25104
25105    <symlink::DeprecatedSetFlags as ::fidl_next::Method>::Request:
25106        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25107
25108    <symlink::SetFlags as ::fidl_next::Method>::Request:
25109        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25110
25111    <symlink::GetAttributes as ::fidl_next::Method>::Request:
25112        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25113
25114    <symlink::UpdateAttributes as ::fidl_next::Method>::Request:
25115        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25116
25117    <symlink::ListExtendedAttributes as ::fidl_next::Method>::Request:
25118        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25119
25120    <symlink::GetExtendedAttribute as ::fidl_next::Method>::Request:
25121        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25122
25123    <symlink::SetExtendedAttribute as ::fidl_next::Method>::Request:
25124        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25125
25126    <symlink::RemoveExtendedAttribute as ::fidl_next::Method>::Request:
25127        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
25128{
25129    fn on_one_way(
25130        handler: &mut ___H,
25131        sender: &::fidl_next::ServerSender<___T, Self>,
25132        ordinal: u64,
25133        buffer: ___T::RecvBuffer,
25134    ) {
25135        match ordinal {
25136            2366825959783828089 => match ::fidl_next::DecoderExt::decode(buffer) {
25137                Ok(decoded) => handler.clone(sender, decoded),
25138                Err(e) => {
25139                    sender.close();
25140                }
25141            },
25142
25143            6512600400724287855 => match ::fidl_next::DecoderExt::decode(buffer) {
25144                Ok(decoded) => handler.deprecated_clone(sender, decoded),
25145                Err(e) => {
25146                    sender.close();
25147                }
25148            },
25149
25150            5431626189872037072 => match ::fidl_next::DecoderExt::decode(buffer) {
25151                Ok(decoded) => handler.list_extended_attributes(sender, decoded),
25152                Err(e) => {
25153                    sender.close();
25154                }
25155            },
25156
25157            ordinal => handler.on_unknown_interaction(sender, ordinal),
25158        }
25159    }
25160
25161    fn on_two_way(
25162        handler: &mut ___H,
25163        sender: &::fidl_next::ServerSender<___T, Self>,
25164        ordinal: u64,
25165        buffer: ___T::RecvBuffer,
25166        responder: ::fidl_next::protocol::Responder,
25167    ) {
25168        match ordinal {
25169            6121399674497678964 => {
25170                let responder = ::fidl_next::Responder::from_untyped(responder);
25171
25172                match ::fidl_next::DecoderExt::decode(buffer) {
25173                    Ok(decoded) => handler.link_into(sender, decoded, responder),
25174                    Err(e) => {
25175                        sender.close();
25176                    }
25177                }
25178            }
25179
25180            6540867515453498750 => {
25181                let responder = ::fidl_next::Responder::from_untyped(responder);
25182
25183                handler.close(sender, responder);
25184            }
25185
25186            2763219980499352582 => {
25187                let responder = ::fidl_next::Responder::from_untyped(responder);
25188
25189                handler.query(sender, responder);
25190            }
25191
25192            8689798978500614909 => {
25193                let responder = ::fidl_next::Responder::from_untyped(responder);
25194
25195                handler.deprecated_get_attr(sender, responder);
25196            }
25197
25198            4721673413776871238 => {
25199                let responder = ::fidl_next::Responder::from_untyped(responder);
25200
25201                match ::fidl_next::DecoderExt::decode(buffer) {
25202                    Ok(decoded) => handler.deprecated_set_attr(sender, decoded, responder),
25203                    Err(e) => {
25204                        sender.close();
25205                    }
25206                }
25207            }
25208
25209            6595803110182632097 => {
25210                let responder = ::fidl_next::Responder::from_untyped(responder);
25211
25212                handler.deprecated_get_flags(sender, responder);
25213            }
25214
25215            5950864159036794675 => {
25216                let responder = ::fidl_next::Responder::from_untyped(responder);
25217
25218                match ::fidl_next::DecoderExt::decode(buffer) {
25219                    Ok(decoded) => handler.deprecated_set_flags(sender, decoded, responder),
25220                    Err(e) => {
25221                        sender.close();
25222                    }
25223                }
25224            }
25225
25226            105530239381466147 => {
25227                let responder = ::fidl_next::Responder::from_untyped(responder);
25228
25229                handler.get_flags(sender, responder);
25230            }
25231
25232            6172186066099445416 => {
25233                let responder = ::fidl_next::Responder::from_untyped(responder);
25234
25235                match ::fidl_next::DecoderExt::decode(buffer) {
25236                    Ok(decoded) => handler.set_flags(sender, decoded, responder),
25237                    Err(e) => {
25238                        sender.close();
25239                    }
25240                }
25241            }
25242
25243            8013111122914313744 => {
25244                let responder = ::fidl_next::Responder::from_untyped(responder);
25245
25246                handler.query_filesystem(sender, responder);
25247            }
25248
25249            4414537700416816443 => {
25250                let responder = ::fidl_next::Responder::from_untyped(responder);
25251
25252                match ::fidl_next::DecoderExt::decode(buffer) {
25253                    Ok(decoded) => handler.get_attributes(sender, decoded, responder),
25254                    Err(e) => {
25255                        sender.close();
25256                    }
25257                }
25258            }
25259
25260            3677402239314018056 => {
25261                let responder = ::fidl_next::Responder::from_untyped(responder);
25262
25263                match ::fidl_next::DecoderExt::decode(buffer) {
25264                    Ok(decoded) => handler.update_attributes(sender, decoded, responder),
25265                    Err(e) => {
25266                        sender.close();
25267                    }
25268                }
25269            }
25270
25271            3196473584242777161 => {
25272                let responder = ::fidl_next::Responder::from_untyped(responder);
25273
25274                handler.sync(sender, responder);
25275            }
25276
25277            5043930208506967771 => {
25278                let responder = ::fidl_next::Responder::from_untyped(responder);
25279
25280                match ::fidl_next::DecoderExt::decode(buffer) {
25281                    Ok(decoded) => handler.get_extended_attribute(sender, decoded, responder),
25282                    Err(e) => {
25283                        sender.close();
25284                    }
25285                }
25286            }
25287
25288            5374223046099989052 => {
25289                let responder = ::fidl_next::Responder::from_untyped(responder);
25290
25291                match ::fidl_next::DecoderExt::decode(buffer) {
25292                    Ok(decoded) => handler.set_extended_attribute(sender, decoded, responder),
25293                    Err(e) => {
25294                        sender.close();
25295                    }
25296                }
25297            }
25298
25299            8794297771444732717 => {
25300                let responder = ::fidl_next::Responder::from_untyped(responder);
25301
25302                match ::fidl_next::DecoderExt::decode(buffer) {
25303                    Ok(decoded) => handler.remove_extended_attribute(sender, decoded, responder),
25304                    Err(e) => {
25305                        sender.close();
25306                    }
25307                }
25308            }
25309
25310            8371117097481679347 => {
25311                let responder = ::fidl_next::Responder::from_untyped(responder);
25312
25313                handler.describe(sender, responder);
25314            }
25315
25316            ordinal => handler.on_unknown_interaction(sender, ordinal),
25317        }
25318    }
25319}
25320
25321#[doc = " Alias for directory permission alias w*\n"]
25322pub const W_STAR_DIR: crate::Operations = crate::Operations::from_bits_retain(485);
25323
25324#[derive(Clone, Copy, Debug, PartialEq, Eq)]
25325#[repr(u8)]
25326pub enum WatchEvent {
25327    Deleted = 0,
25328    Added = 1,
25329    Removed = 2,
25330    Existing = 3,
25331    Idle = 4,
25332}
25333
25334impl ::fidl_next::Encodable for WatchEvent {
25335    type Encoded = WireWatchEvent;
25336}
25337impl ::std::convert::TryFrom<u8> for WatchEvent {
25338    type Error = ::fidl_next::UnknownStrictEnumMemberError;
25339    fn try_from(value: u8) -> Result<Self, Self::Error> {
25340        match value {
25341            0 => Ok(Self::Deleted),
25342            1 => Ok(Self::Added),
25343            2 => Ok(Self::Removed),
25344            3 => Ok(Self::Existing),
25345            4 => Ok(Self::Idle),
25346
25347            _ => Err(Self::Error::new(value.into())),
25348        }
25349    }
25350}
25351
25352unsafe impl<___E> ::fidl_next::Encode<___E> for WatchEvent
25353where
25354    ___E: ?Sized,
25355{
25356    #[inline]
25357    fn encode(
25358        self,
25359        encoder: &mut ___E,
25360        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
25361    ) -> Result<(), ::fidl_next::EncodeError> {
25362        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
25363    }
25364}
25365
25366unsafe impl<___E> ::fidl_next::EncodeRef<___E> for WatchEvent
25367where
25368    ___E: ?Sized,
25369{
25370    #[inline]
25371    fn encode_ref(
25372        &self,
25373        encoder: &mut ___E,
25374        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
25375    ) -> Result<(), ::fidl_next::EncodeError> {
25376        ::fidl_next::munge!(let WireWatchEvent { value } = out);
25377        let _ = value.write(u8::from(match *self {
25378            Self::Deleted => 0,
25379
25380            Self::Added => 1,
25381
25382            Self::Removed => 2,
25383
25384            Self::Existing => 3,
25385
25386            Self::Idle => 4,
25387        }));
25388
25389        Ok(())
25390    }
25391}
25392
25393impl ::core::convert::From<WireWatchEvent> for WatchEvent {
25394    fn from(wire: WireWatchEvent) -> Self {
25395        match u8::from(wire.value) {
25396            0 => Self::Deleted,
25397
25398            1 => Self::Added,
25399
25400            2 => Self::Removed,
25401
25402            3 => Self::Existing,
25403
25404            4 => Self::Idle,
25405
25406            _ => unsafe { ::core::hint::unreachable_unchecked() },
25407        }
25408    }
25409}
25410
25411impl ::fidl_next::FromWire<WireWatchEvent> for WatchEvent {
25412    #[inline]
25413    fn from_wire(wire: WireWatchEvent) -> Self {
25414        Self::from(wire)
25415    }
25416}
25417
25418impl ::fidl_next::FromWireRef<WireWatchEvent> for WatchEvent {
25419    #[inline]
25420    fn from_wire_ref(wire: &WireWatchEvent) -> Self {
25421        Self::from(*wire)
25422    }
25423}
25424
25425/// The wire type corresponding to [`WatchEvent`].
25426#[derive(Clone, Copy, Debug, PartialEq, Eq)]
25427#[repr(transparent)]
25428pub struct WireWatchEvent {
25429    value: u8,
25430}
25431
25432unsafe impl ::fidl_next::Wire for WireWatchEvent {
25433    type Decoded<'de> = Self;
25434
25435    #[inline]
25436    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
25437        // Wire enums have no padding
25438    }
25439}
25440
25441impl WireWatchEvent {
25442    pub const DELETED: WireWatchEvent = WireWatchEvent { value: 0 };
25443
25444    pub const ADDED: WireWatchEvent = WireWatchEvent { value: 1 };
25445
25446    pub const REMOVED: WireWatchEvent = WireWatchEvent { value: 2 };
25447
25448    pub const EXISTING: WireWatchEvent = WireWatchEvent { value: 3 };
25449
25450    pub const IDLE: WireWatchEvent = WireWatchEvent { value: 4 };
25451}
25452
25453unsafe impl<___D> ::fidl_next::Decode<___D> for WireWatchEvent
25454where
25455    ___D: ?Sized,
25456{
25457    fn decode(
25458        slot: ::fidl_next::Slot<'_, Self>,
25459        _: &mut ___D,
25460    ) -> Result<(), ::fidl_next::DecodeError> {
25461        ::fidl_next::munge!(let Self { value } = slot);
25462
25463        match u8::from(*value) {
25464            0 | 1 | 2 | 3 | 4 => (),
25465            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
25466        }
25467
25468        Ok(())
25469    }
25470}
25471
25472impl ::core::convert::From<WatchEvent> for WireWatchEvent {
25473    fn from(natural: WatchEvent) -> Self {
25474        match natural {
25475            WatchEvent::Deleted => WireWatchEvent::DELETED,
25476
25477            WatchEvent::Added => WireWatchEvent::ADDED,
25478
25479            WatchEvent::Removed => WireWatchEvent::REMOVED,
25480
25481            WatchEvent::Existing => WireWatchEvent::EXISTING,
25482
25483            WatchEvent::Idle => WireWatchEvent::IDLE,
25484        }
25485    }
25486}
25487
25488#[doc = " Alias for directory permission alias x*\n"]
25489pub const X_STAR_DIR: crate::Operations = crate::Operations::from_bits_retain(201);
25490
25491/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
25492pub mod compat {
25493
25494    impl ::core::convert::From<crate::Operations> for ::fidl_fuchsia_io::Operations {
25495        #[inline]
25496        fn from(from: crate::Operations) -> Self {
25497            Self::from_bits_retain(from.bits())
25498        }
25499    }
25500
25501    impl ::core::convert::From<crate::SeekOrigin> for ::fidl_fuchsia_io::SeekOrigin {
25502        #[inline]
25503        fn from(from: crate::SeekOrigin) -> Self {
25504            match crate::SeekOrigin::from(from) {
25505                crate::SeekOrigin::Start => Self::Start,
25506
25507                crate::SeekOrigin::Current => Self::Current,
25508
25509                crate::SeekOrigin::End => Self::End,
25510            }
25511        }
25512    }
25513
25514    impl ::core::convert::From<crate::AdvisoryLockType> for ::fidl_fuchsia_io::AdvisoryLockType {
25515        #[inline]
25516        fn from(from: crate::AdvisoryLockType) -> Self {
25517            match crate::AdvisoryLockType::from(from) {
25518                crate::AdvisoryLockType::Read => Self::Read,
25519
25520                crate::AdvisoryLockType::Write => Self::Write,
25521
25522                crate::AdvisoryLockType::Unlock => Self::Unlock,
25523            }
25524        }
25525    }
25526
25527    #[cfg(target_os = "fuchsia")]
25528    /// An alias for a client sender over `zx::Channel` for the `AdvisoryLocking`
25529    /// protocol.
25530    pub type AdvisoryLockingProxy =
25531        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::AdvisoryLocking>;
25532
25533    impl ::core::convert::From<crate::AdvisoryLocking> for ::fidl_fuchsia_io::AdvisoryLockingMarker {
25534        #[inline]
25535        fn from(_: crate::AdvisoryLocking) -> Self {
25536            Self
25537        }
25538    }
25539
25540    impl ::core::convert::From<crate::AllocateMode> for ::fidl_fuchsia_io::AllocateMode {
25541        #[inline]
25542        fn from(from: crate::AllocateMode) -> Self {
25543            Self::from_bits_retain(from.bits())
25544        }
25545    }
25546
25547    impl ::core::convert::From<crate::OpenFlags> for ::fidl_fuchsia_io::OpenFlags {
25548        #[inline]
25549        fn from(from: crate::OpenFlags) -> Self {
25550            Self::from_bits_retain(from.bits())
25551        }
25552    }
25553
25554    impl ::core::convert::From<crate::NodeAttributeFlags> for ::fidl_fuchsia_io::NodeAttributeFlags {
25555        #[inline]
25556        fn from(from: crate::NodeAttributeFlags) -> Self {
25557            Self::from_bits_retain(from.bits())
25558        }
25559    }
25560
25561    impl ::core::convert::From<crate::ModeType> for ::fidl_fuchsia_io::ModeType {
25562        #[inline]
25563        fn from(from: crate::ModeType) -> Self {
25564            Self::from_bits_retain(from.bits())
25565        }
25566    }
25567
25568    impl ::core::convert::From<crate::UnlinkFlags> for ::fidl_fuchsia_io::UnlinkFlags {
25569        #[inline]
25570        fn from(from: crate::UnlinkFlags) -> Self {
25571            Self::from_bits_retain(from.bits())
25572        }
25573    }
25574
25575    impl ::core::convert::From<crate::WatchMask> for ::fidl_fuchsia_io::WatchMask {
25576        #[inline]
25577        fn from(from: crate::WatchMask) -> Self {
25578            Self::from_bits_retain(from.bits())
25579        }
25580    }
25581
25582    impl ::core::convert::From<crate::SetExtendedAttributeMode>
25583        for ::fidl_fuchsia_io::SetExtendedAttributeMode
25584    {
25585        #[inline]
25586        fn from(from: crate::SetExtendedAttributeMode) -> Self {
25587            match crate::SetExtendedAttributeMode::from(from) {
25588                crate::SetExtendedAttributeMode::Set => Self::Set,
25589
25590                crate::SetExtendedAttributeMode::Create => Self::Create,
25591
25592                crate::SetExtendedAttributeMode::Replace => Self::Replace,
25593            }
25594        }
25595    }
25596
25597    impl ::core::convert::From<crate::Flags> for ::fidl_fuchsia_io::Flags {
25598        #[inline]
25599        fn from(from: crate::Flags) -> Self {
25600            Self::from_bits_retain(from.bits())
25601        }
25602    }
25603
25604    impl ::core::convert::From<crate::NodeProtocolKinds> for ::fidl_fuchsia_io::NodeProtocolKinds {
25605        #[inline]
25606        fn from(from: crate::NodeProtocolKinds) -> Self {
25607            Self::from_bits_retain(from.bits())
25608        }
25609    }
25610
25611    impl ::core::convert::From<crate::HashAlgorithm> for ::fidl_fuchsia_io::HashAlgorithm {
25612        #[inline]
25613        fn from(from: crate::HashAlgorithm) -> Self {
25614            match crate::HashAlgorithm::from(from) {
25615                crate::HashAlgorithm::Sha256 => Self::Sha256,
25616
25617                crate::HashAlgorithm::Sha512 => Self::Sha512,
25618
25619                crate::HashAlgorithm::UnknownOrdinal_(value) => {
25620                    Self::__SourceBreaking { unknown_ordinal: value }
25621                }
25622            }
25623        }
25624    }
25625
25626    impl ::core::convert::From<crate::NodeAttributesQuery> for ::fidl_fuchsia_io::NodeAttributesQuery {
25627        #[inline]
25628        fn from(from: crate::NodeAttributesQuery) -> Self {
25629            Self::from_bits_retain(from.bits())
25630        }
25631    }
25632
25633    #[cfg(target_os = "fuchsia")]
25634    /// An alias for a client sender over `zx::Channel` for the `Node`
25635    /// protocol.
25636    pub type NodeProxy = ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Node>;
25637
25638    impl ::core::convert::From<crate::Node> for ::fidl_fuchsia_io::NodeMarker {
25639        #[inline]
25640        fn from(_: crate::Node) -> Self {
25641            Self
25642        }
25643    }
25644
25645    #[cfg(target_os = "fuchsia")]
25646    /// An alias for a client sender over `zx::Channel` for the `Directory`
25647    /// protocol.
25648    pub type DirectoryProxy =
25649        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Directory>;
25650
25651    impl ::core::convert::From<crate::Directory> for ::fidl_fuchsia_io::DirectoryMarker {
25652        #[inline]
25653        fn from(_: crate::Directory) -> Self {
25654            Self
25655        }
25656    }
25657
25658    #[cfg(target_os = "fuchsia")]
25659    /// An alias for a client sender over `zx::Channel` for the `DirectoryWatcher`
25660    /// protocol.
25661    pub type DirectoryWatcherProxy =
25662        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirectoryWatcher>;
25663
25664    impl ::core::convert::From<crate::DirectoryWatcher> for ::fidl_fuchsia_io::DirectoryWatcherMarker {
25665        #[inline]
25666        fn from(_: crate::DirectoryWatcher) -> Self {
25667            Self
25668        }
25669    }
25670
25671    impl ::core::convert::From<crate::DirentType> for ::fidl_fuchsia_io::DirentType {
25672        #[inline]
25673        fn from(from: crate::DirentType) -> Self {
25674            match crate::DirentType::from(from) {
25675                crate::DirentType::Unknown => Self::Unknown,
25676
25677                crate::DirentType::Directory => Self::Directory,
25678
25679                crate::DirentType::BlockDevice => Self::BlockDevice,
25680
25681                crate::DirentType::File => Self::File,
25682
25683                crate::DirentType::Symlink => Self::Symlink,
25684
25685                crate::DirentType::Service => Self::Service,
25686
25687                crate::DirentType::UnknownOrdinal_(value) => {
25688                    Self::__SourceBreaking { unknown_ordinal: value }
25689                }
25690            }
25691        }
25692    }
25693
25694    #[cfg(target_os = "fuchsia")]
25695    /// An alias for a client sender over `zx::Channel` for the `ExtendedAttributeIterator`
25696    /// protocol.
25697    pub type ExtendedAttributeIteratorProxy = ::fidl_next::ClientSender<
25698        ::fidl_next::fuchsia::zx::Channel,
25699        crate::ExtendedAttributeIterator,
25700    >;
25701
25702    impl ::core::convert::From<crate::ExtendedAttributeIterator>
25703        for ::fidl_fuchsia_io::ExtendedAttributeIteratorMarker
25704    {
25705        #[inline]
25706        fn from(_: crate::ExtendedAttributeIterator) -> Self {
25707            Self
25708        }
25709    }
25710
25711    #[cfg(target_os = "fuchsia")]
25712    /// An alias for a client sender over `zx::Channel` for the `Readable`
25713    /// protocol.
25714    pub type ReadableProxy =
25715        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Readable>;
25716
25717    impl ::core::convert::From<crate::Readable> for ::fidl_fuchsia_io::ReadableMarker {
25718        #[inline]
25719        fn from(_: crate::Readable) -> Self {
25720            Self
25721        }
25722    }
25723
25724    #[cfg(target_os = "fuchsia")]
25725    /// An alias for a client sender over `zx::Channel` for the `Writable`
25726    /// protocol.
25727    pub type WritableProxy =
25728        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Writable>;
25729
25730    impl ::core::convert::From<crate::Writable> for ::fidl_fuchsia_io::WritableMarker {
25731        #[inline]
25732        fn from(_: crate::Writable) -> Self {
25733            Self
25734        }
25735    }
25736
25737    impl ::core::convert::From<crate::VmoFlags> for ::fidl_fuchsia_io::VmoFlags {
25738        #[inline]
25739        fn from(from: crate::VmoFlags) -> Self {
25740            Self::from_bits_retain(from.bits())
25741        }
25742    }
25743
25744    #[cfg(target_os = "fuchsia")]
25745    /// An alias for a client sender over `zx::Channel` for the `Linkable`
25746    /// protocol.
25747    pub type LinkableProxy =
25748        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Linkable>;
25749
25750    impl ::core::convert::From<crate::Linkable> for ::fidl_fuchsia_io::LinkableMarker {
25751        #[inline]
25752        fn from(_: crate::Linkable) -> Self {
25753            Self
25754        }
25755    }
25756
25757    #[cfg(target_os = "fuchsia")]
25758    /// An alias for a client sender over `zx::Channel` for the `File`
25759    /// protocol.
25760    pub type FileProxy = ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::File>;
25761
25762    impl ::core::convert::From<crate::File> for ::fidl_fuchsia_io::FileMarker {
25763        #[inline]
25764        fn from(_: crate::File) -> Self {
25765            Self
25766        }
25767    }
25768
25769    impl ::core::convert::From<crate::FileSignal> for ::fidl_fuchsia_io::FileSignal {
25770        #[inline]
25771        fn from(from: crate::FileSignal) -> Self {
25772            Self::from_bits_retain(from.bits())
25773        }
25774    }
25775
25776    #[cfg(target_os = "fuchsia")]
25777    /// An alias for a client sender over `zx::Channel` for the `Symlink`
25778    /// protocol.
25779    pub type SymlinkProxy =
25780        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Symlink>;
25781
25782    impl ::core::convert::From<crate::Symlink> for ::fidl_fuchsia_io::SymlinkMarker {
25783        #[inline]
25784        fn from(_: crate::Symlink) -> Self {
25785            Self
25786        }
25787    }
25788
25789    impl ::core::convert::From<crate::WatchEvent> for ::fidl_fuchsia_io::WatchEvent {
25790        #[inline]
25791        fn from(from: crate::WatchEvent) -> Self {
25792            match crate::WatchEvent::from(from) {
25793                crate::WatchEvent::Deleted => Self::Deleted,
25794
25795                crate::WatchEvent::Added => Self::Added,
25796
25797                crate::WatchEvent::Removed => Self::Removed,
25798
25799                crate::WatchEvent::Existing => Self::Existing,
25800
25801                crate::WatchEvent::Idle => Self::Idle,
25802            }
25803        }
25804    }
25805}