1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 ::fidl_next::bitflags::bitflags! {
8 #[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(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct Operations: u64 {
9 #[doc = " Connecting to a service in a directory.\n"]const CONNECT = 1;
10 #[doc = " Read byte contents of a node or its children.\n"]const READ_BYTES = 2;
11 #[doc = " Writing to the byte contents of a node or its children.\n"]const WRITE_BYTES = 4;
12 #[doc = " Execute the byte contents of a node or its children.\n"]const EXECUTE = 8;
13 #[doc = " Reading the attributes of a node and/or its children.\n"]const GET_ATTRIBUTES = 16;
14 #[doc = " Updating the attributes of a node and/or its children.\n"]const UPDATE_ATTRIBUTES = 32;
15 #[doc = " Reading the list of nodes in a directory.\n"]const ENUMERATE = 64;
16 #[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;
17 #[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;
18
19 }
20 }
21
22 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Operations, ___E> for Operations
23 where
24 ___E: ?Sized,
25 {
26 #[inline]
27 fn encode(
28 self,
29 encoder: &mut ___E,
30 out: &mut ::core::mem::MaybeUninit<crate::wire::Operations>,
31 _: (),
32 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
33 ::fidl_next::Encode::encode(&self, encoder, out, ())
34 }
35 }
36
37 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Operations, ___E> for &'a Operations
38 where
39 ___E: ?Sized,
40 {
41 #[inline]
42 fn encode(
43 self,
44 _: &mut ___E,
45 out: &mut ::core::mem::MaybeUninit<crate::wire::Operations>,
46 _: (),
47 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
48 ::fidl_next::munge!(let crate::wire::Operations { value } = out);
49
50 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
51 return Err(::fidl_next::EncodeError::InvalidStrictBits);
52 }
53
54 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
55 Ok(())
56 }
57 }
58
59 impl ::core::convert::From<crate::wire::Operations> for Operations {
60 fn from(wire: crate::wire::Operations) -> Self {
61 Self::from_bits_retain(u64::from(wire.value))
62 }
63 }
64
65 impl ::fidl_next::FromWire<crate::wire::Operations> for Operations {
66 #[inline]
67 fn from_wire(wire: crate::wire::Operations) -> Self {
68 Self::from(wire)
69 }
70 }
71
72 impl ::fidl_next::FromWireRef<crate::wire::Operations> for Operations {
73 #[inline]
74 fn from_wire_ref(wire: &crate::wire::Operations) -> Self {
75 Self::from(*wire)
76 }
77 }
78
79 #[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"]
80 pub type Abilities = crate::natural::Operations;
81
82 #[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"]
83 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
84 #[repr(u32)]
85 pub enum SeekOrigin {
86 Start = 0,
87 Current = 1,
88 End = 2,
89 }
90 impl ::core::convert::TryFrom<u32> for SeekOrigin {
91 type Error = ::fidl_next::UnknownStrictEnumMemberError;
92 fn try_from(
93 value: u32,
94 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
95 match value {
96 0 => Ok(Self::Start),
97 1 => Ok(Self::Current),
98 2 => Ok(Self::End),
99
100 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
101 }
102 }
103 }
104
105 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SeekOrigin, ___E> for SeekOrigin
106 where
107 ___E: ?Sized,
108 {
109 #[inline]
110 fn encode(
111 self,
112 encoder: &mut ___E,
113 out: &mut ::core::mem::MaybeUninit<crate::wire::SeekOrigin>,
114 _: (),
115 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
116 ::fidl_next::Encode::encode(&self, encoder, out, ())
117 }
118 }
119
120 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SeekOrigin, ___E> for &'a SeekOrigin
121 where
122 ___E: ?Sized,
123 {
124 #[inline]
125 fn encode(
126 self,
127 encoder: &mut ___E,
128 out: &mut ::core::mem::MaybeUninit<crate::wire::SeekOrigin>,
129 _: (),
130 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
131 ::fidl_next::munge!(let crate::wire::SeekOrigin { value } = out);
132 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
133 SeekOrigin::Start => 0,
134
135 SeekOrigin::Current => 1,
136
137 SeekOrigin::End => 2,
138 }));
139
140 Ok(())
141 }
142 }
143
144 impl ::core::convert::From<crate::wire::SeekOrigin> for SeekOrigin {
145 fn from(wire: crate::wire::SeekOrigin) -> Self {
146 match u32::from(wire.value) {
147 0 => Self::Start,
148
149 1 => Self::Current,
150
151 2 => Self::End,
152
153 _ => unsafe { ::core::hint::unreachable_unchecked() },
154 }
155 }
156 }
157
158 impl ::fidl_next::FromWire<crate::wire::SeekOrigin> for SeekOrigin {
159 #[inline]
160 fn from_wire(wire: crate::wire::SeekOrigin) -> Self {
161 Self::from(wire)
162 }
163 }
164
165 impl ::fidl_next::FromWireRef<crate::wire::SeekOrigin> for SeekOrigin {
166 #[inline]
167 fn from_wire_ref(wire: &crate::wire::SeekOrigin) -> Self {
168 Self::from(*wire)
169 }
170 }
171
172 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
173 pub struct AdvisoryLockRange {
174 pub origin: crate::natural::SeekOrigin,
175
176 pub offset: i64,
177
178 pub length: i64,
179 }
180
181 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E> for AdvisoryLockRange
182 where
183 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
184 {
185 #[inline]
186 fn encode(
187 self,
188 encoder_: &mut ___E,
189 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
190 _: (),
191 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
192 ::fidl_next::munge! {
193 let crate::wire::AdvisoryLockRange {
194 origin,
195 offset,
196 length,
197
198 } = out_;
199 }
200
201 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
202
203 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
204
205 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
206
207 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
208
209 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
210
211 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
212
213 Ok(())
214 }
215 }
216
217 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
218 for &'a AdvisoryLockRange
219 where
220 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
221 {
222 #[inline]
223 fn encode(
224 self,
225 encoder_: &mut ___E,
226 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
227 _: (),
228 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
229 ::fidl_next::munge! {
230 let crate::wire::AdvisoryLockRange {
231 origin,
232 offset,
233 length,
234
235 } = out_;
236 }
237
238 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
239
240 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
241
242 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
243
244 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
245
246 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
247
248 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
249
250 Ok(())
251 }
252 }
253
254 unsafe impl<___E>
255 ::fidl_next::EncodeOption<
256 ::fidl_next::wire::Box<'static, crate::wire::AdvisoryLockRange>,
257 ___E,
258 > for AdvisoryLockRange
259 where
260 ___E: ::fidl_next::Encoder + ?Sized,
261 AdvisoryLockRange: ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>,
262 {
263 #[inline]
264 fn encode_option(
265 this: ::core::option::Option<Self>,
266 encoder: &mut ___E,
267 out: &mut ::core::mem::MaybeUninit<
268 ::fidl_next::wire::Box<'static, crate::wire::AdvisoryLockRange>,
269 >,
270 _: (),
271 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
272 if let Some(inner) = this {
273 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
274 ::fidl_next::wire::Box::encode_present(out);
275 } else {
276 ::fidl_next::wire::Box::encode_absent(out);
277 }
278
279 Ok(())
280 }
281 }
282
283 unsafe impl<'a, ___E>
284 ::fidl_next::EncodeOption<
285 ::fidl_next::wire::Box<'static, crate::wire::AdvisoryLockRange>,
286 ___E,
287 > for &'a AdvisoryLockRange
288 where
289 ___E: ::fidl_next::Encoder + ?Sized,
290 &'a AdvisoryLockRange: ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>,
291 {
292 #[inline]
293 fn encode_option(
294 this: ::core::option::Option<Self>,
295 encoder: &mut ___E,
296 out: &mut ::core::mem::MaybeUninit<
297 ::fidl_next::wire::Box<'static, crate::wire::AdvisoryLockRange>,
298 >,
299 _: (),
300 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
301 if let Some(inner) = this {
302 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
303 ::fidl_next::wire::Box::encode_present(out);
304 } else {
305 ::fidl_next::wire::Box::encode_absent(out);
306 }
307
308 Ok(())
309 }
310 }
311
312 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockRange> for AdvisoryLockRange {
313 #[inline]
314 fn from_wire(wire: crate::wire::AdvisoryLockRange) -> Self {
315 Self {
316 origin: ::fidl_next::FromWire::from_wire(wire.origin),
317
318 offset: ::fidl_next::FromWire::from_wire(wire.offset),
319
320 length: ::fidl_next::FromWire::from_wire(wire.length),
321 }
322 }
323 }
324
325 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockRange> for AdvisoryLockRange {
326 #[inline]
327 fn from_wire_ref(wire: &crate::wire::AdvisoryLockRange) -> Self {
328 Self {
329 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
330
331 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
332
333 length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length),
334 }
335 }
336 }
337
338 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
339 #[repr(u32)]
340 pub enum AdvisoryLockType {
341 Read = 1,
342 Write = 2,
343 Unlock = 3,
344 }
345 impl ::core::convert::TryFrom<u32> for AdvisoryLockType {
346 type Error = ::fidl_next::UnknownStrictEnumMemberError;
347 fn try_from(
348 value: u32,
349 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
350 match value {
351 1 => Ok(Self::Read),
352 2 => Ok(Self::Write),
353 3 => Ok(Self::Unlock),
354
355 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
356 }
357 }
358 }
359
360 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockType, ___E> for AdvisoryLockType
361 where
362 ___E: ?Sized,
363 {
364 #[inline]
365 fn encode(
366 self,
367 encoder: &mut ___E,
368 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockType>,
369 _: (),
370 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
371 ::fidl_next::Encode::encode(&self, encoder, out, ())
372 }
373 }
374
375 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockType, ___E>
376 for &'a AdvisoryLockType
377 where
378 ___E: ?Sized,
379 {
380 #[inline]
381 fn encode(
382 self,
383 encoder: &mut ___E,
384 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockType>,
385 _: (),
386 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
387 ::fidl_next::munge!(let crate::wire::AdvisoryLockType { value } = out);
388 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
389 AdvisoryLockType::Read => 1,
390
391 AdvisoryLockType::Write => 2,
392
393 AdvisoryLockType::Unlock => 3,
394 }));
395
396 Ok(())
397 }
398 }
399
400 impl ::core::convert::From<crate::wire::AdvisoryLockType> for AdvisoryLockType {
401 fn from(wire: crate::wire::AdvisoryLockType) -> Self {
402 match u32::from(wire.value) {
403 1 => Self::Read,
404
405 2 => Self::Write,
406
407 3 => Self::Unlock,
408
409 _ => unsafe { ::core::hint::unreachable_unchecked() },
410 }
411 }
412 }
413
414 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockType> for AdvisoryLockType {
415 #[inline]
416 fn from_wire(wire: crate::wire::AdvisoryLockType) -> Self {
417 Self::from(wire)
418 }
419 }
420
421 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockType> for AdvisoryLockType {
422 #[inline]
423 fn from_wire_ref(wire: &crate::wire::AdvisoryLockType) -> Self {
424 Self::from(*wire)
425 }
426 }
427
428 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
429 pub struct AdvisoryLockRequest {
430 pub type_: ::core::option::Option<crate::natural::AdvisoryLockType>,
431
432 pub range: ::core::option::Option<crate::natural::AdvisoryLockRange>,
433
434 pub wait: ::core::option::Option<bool>,
435 }
436
437 impl AdvisoryLockRequest {
438 fn __max_ordinal(&self) -> usize {
439 if self.wait.is_some() {
440 return 3;
441 }
442
443 if self.range.is_some() {
444 return 2;
445 }
446
447 if self.type_.is_some() {
448 return 1;
449 }
450
451 0
452 }
453 }
454
455 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>
456 for AdvisoryLockRequest
457 where
458 ___E: ::fidl_next::Encoder + ?Sized,
459 {
460 #[inline]
461 fn encode(
462 mut self,
463 encoder: &mut ___E,
464 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRequest<'static>>,
465 _: (),
466 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
467 ::fidl_next::munge!(let crate::wire::AdvisoryLockRequest { table } = out);
468
469 let max_ord = self.__max_ordinal();
470
471 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
472 ::fidl_next::Wire::zero_padding(&mut out);
473
474 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
475 ::fidl_next::wire::Envelope,
476 >(encoder, max_ord);
477
478 for i in 1..=max_ord {
479 match i {
480 3 => {
481 if let Some(value) = self.wait.take() {
482 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
483 value,
484 preallocated.encoder,
485 &mut out,
486 (),
487 )?;
488 } else {
489 ::fidl_next::wire::Envelope::encode_zero(&mut out)
490 }
491 }
492
493 2 => {
494 if let Some(value) = self.range.take() {
495 ::fidl_next::wire::Envelope::encode_value::<
496 crate::wire::AdvisoryLockRange,
497 ___E,
498 >(
499 value, preallocated.encoder, &mut out, ()
500 )?;
501 } else {
502 ::fidl_next::wire::Envelope::encode_zero(&mut out)
503 }
504 }
505
506 1 => {
507 if let Some(value) = self.type_.take() {
508 ::fidl_next::wire::Envelope::encode_value::<
509 crate::wire::AdvisoryLockType,
510 ___E,
511 >(
512 value, preallocated.encoder, &mut out, ()
513 )?;
514 } else {
515 ::fidl_next::wire::Envelope::encode_zero(&mut out)
516 }
517 }
518
519 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
520 }
521 unsafe {
522 preallocated.write_next(out.assume_init_ref());
523 }
524 }
525
526 ::fidl_next::wire::Table::encode_len(table, max_ord);
527
528 Ok(())
529 }
530 }
531
532 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>
533 for &'a AdvisoryLockRequest
534 where
535 ___E: ::fidl_next::Encoder + ?Sized,
536 {
537 #[inline]
538 fn encode(
539 self,
540 encoder: &mut ___E,
541 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRequest<'static>>,
542 _: (),
543 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
544 ::fidl_next::munge!(let crate::wire::AdvisoryLockRequest { table } = out);
545
546 let max_ord = self.__max_ordinal();
547
548 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
549 ::fidl_next::Wire::zero_padding(&mut out);
550
551 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
552 ::fidl_next::wire::Envelope,
553 >(encoder, max_ord);
554
555 for i in 1..=max_ord {
556 match i {
557 3 => {
558 if let Some(value) = &self.wait {
559 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
560 value,
561 preallocated.encoder,
562 &mut out,
563 (),
564 )?;
565 } else {
566 ::fidl_next::wire::Envelope::encode_zero(&mut out)
567 }
568 }
569
570 2 => {
571 if let Some(value) = &self.range {
572 ::fidl_next::wire::Envelope::encode_value::<
573 crate::wire::AdvisoryLockRange,
574 ___E,
575 >(
576 value, preallocated.encoder, &mut out, ()
577 )?;
578 } else {
579 ::fidl_next::wire::Envelope::encode_zero(&mut out)
580 }
581 }
582
583 1 => {
584 if let Some(value) = &self.type_ {
585 ::fidl_next::wire::Envelope::encode_value::<
586 crate::wire::AdvisoryLockType,
587 ___E,
588 >(
589 value, preallocated.encoder, &mut out, ()
590 )?;
591 } else {
592 ::fidl_next::wire::Envelope::encode_zero(&mut out)
593 }
594 }
595
596 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
597 }
598 unsafe {
599 preallocated.write_next(out.assume_init_ref());
600 }
601 }
602
603 ::fidl_next::wire::Table::encode_len(table, max_ord);
604
605 Ok(())
606 }
607 }
608
609 impl<'de> ::fidl_next::FromWire<crate::wire::AdvisoryLockRequest<'de>> for AdvisoryLockRequest {
610 #[inline]
611 fn from_wire(wire_: crate::wire::AdvisoryLockRequest<'de>) -> Self {
612 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
613
614 let type_ = wire_.table.get(1);
615
616 let range = wire_.table.get(2);
617
618 let wait = wire_.table.get(3);
619
620 Self {
621 type_: type_.map(|envelope| {
622 ::fidl_next::FromWire::from_wire(unsafe {
623 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
624 })
625 }),
626
627 range: range.map(|envelope| {
628 ::fidl_next::FromWire::from_wire(unsafe {
629 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
630 })
631 }),
632
633 wait: wait.map(|envelope| {
634 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
635 }),
636 }
637 }
638 }
639
640 impl<'de> ::fidl_next::FromWireRef<crate::wire::AdvisoryLockRequest<'de>> for AdvisoryLockRequest {
641 #[inline]
642 fn from_wire_ref(wire: &crate::wire::AdvisoryLockRequest<'de>) -> Self {
643 Self {
644 type_: wire.table.get(1).map(|envelope| {
645 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
646 envelope.deref_unchecked::<crate::wire::AdvisoryLockType>()
647 })
648 }),
649
650 range: wire.table.get(2).map(|envelope| {
651 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
652 envelope.deref_unchecked::<crate::wire::AdvisoryLockRange>()
653 })
654 }),
655
656 wait: wire.table.get(3).map(|envelope| {
657 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
658 envelope.deref_unchecked::<bool>()
659 })
660 }),
661 }
662 }
663 }
664
665 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
666 pub struct AdvisoryLockingAdvisoryLockRequest {
667 pub request: crate::natural::AdvisoryLockRequest,
668 }
669
670 unsafe impl<___E>
671 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
672 for AdvisoryLockingAdvisoryLockRequest
673 where
674 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
675 ___E: ::fidl_next::Encoder,
676 {
677 #[inline]
678 fn encode(
679 self,
680 encoder_: &mut ___E,
681 out_: &mut ::core::mem::MaybeUninit<
682 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
683 >,
684 _: (),
685 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
686 ::fidl_next::munge! {
687 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
688 request,
689
690 } = out_;
691 }
692
693 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
694
695 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
696
697 Ok(())
698 }
699 }
700
701 unsafe impl<'a, ___E>
702 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
703 for &'a AdvisoryLockingAdvisoryLockRequest
704 where
705 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
706 ___E: ::fidl_next::Encoder,
707 {
708 #[inline]
709 fn encode(
710 self,
711 encoder_: &mut ___E,
712 out_: &mut ::core::mem::MaybeUninit<
713 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
714 >,
715 _: (),
716 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
717 ::fidl_next::munge! {
718 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
719 request,
720
721 } = out_;
722 }
723
724 ::fidl_next::Encode::encode(&self.request, encoder_, request, ())?;
725
726 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
727
728 Ok(())
729 }
730 }
731
732 unsafe impl<___E>
733 ::fidl_next::EncodeOption<
734 ::fidl_next::wire::Box<
735 'static,
736 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
737 >,
738 ___E,
739 > for AdvisoryLockingAdvisoryLockRequest
740 where
741 ___E: ::fidl_next::Encoder + ?Sized,
742 AdvisoryLockingAdvisoryLockRequest:
743 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>,
744 {
745 #[inline]
746 fn encode_option(
747 this: ::core::option::Option<Self>,
748 encoder: &mut ___E,
749 out: &mut ::core::mem::MaybeUninit<
750 ::fidl_next::wire::Box<
751 'static,
752 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
753 >,
754 >,
755 _: (),
756 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
757 if let Some(inner) = this {
758 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
759 ::fidl_next::wire::Box::encode_present(out);
760 } else {
761 ::fidl_next::wire::Box::encode_absent(out);
762 }
763
764 Ok(())
765 }
766 }
767
768 unsafe impl<'a, ___E>
769 ::fidl_next::EncodeOption<
770 ::fidl_next::wire::Box<
771 'static,
772 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
773 >,
774 ___E,
775 > for &'a AdvisoryLockingAdvisoryLockRequest
776 where
777 ___E: ::fidl_next::Encoder + ?Sized,
778 &'a AdvisoryLockingAdvisoryLockRequest:
779 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>,
780 {
781 #[inline]
782 fn encode_option(
783 this: ::core::option::Option<Self>,
784 encoder: &mut ___E,
785 out: &mut ::core::mem::MaybeUninit<
786 ::fidl_next::wire::Box<
787 'static,
788 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
789 >,
790 >,
791 _: (),
792 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
793 if let Some(inner) = this {
794 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
795 ::fidl_next::wire::Box::encode_present(out);
796 } else {
797 ::fidl_next::wire::Box::encode_absent(out);
798 }
799
800 Ok(())
801 }
802 }
803
804 impl<'de> ::fidl_next::FromWire<crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>>
805 for AdvisoryLockingAdvisoryLockRequest
806 {
807 #[inline]
808 fn from_wire(wire: crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
809 Self { request: ::fidl_next::FromWire::from_wire(wire.request) }
810 }
811 }
812
813 impl<'de> ::fidl_next::FromWireRef<crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>>
814 for AdvisoryLockingAdvisoryLockRequest
815 {
816 #[inline]
817 fn from_wire_ref(wire: &crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
818 Self { request: ::fidl_next::FromWireRef::from_wire_ref(&wire.request) }
819 }
820 }
821
822 pub type AdvisoryLockingAdvisoryLockResponse = ();
823
824 ::fidl_next::bitflags::bitflags! {
825 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct AllocateMode: u32 {
826 const KEEP_SIZE = 1;
827 const UNSHARE_RANGE = 2;
828 const PUNCH_HOLE = 4;
829 const COLLAPSE_RANGE = 8;
830 const ZERO_RANGE = 16;
831 const INSERT_RANGE = 32;
832 const _ = !0;
833 }
834 }
835
836 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AllocateMode, ___E> for AllocateMode
837 where
838 ___E: ?Sized,
839 {
840 #[inline]
841 fn encode(
842 self,
843 encoder: &mut ___E,
844 out: &mut ::core::mem::MaybeUninit<crate::wire::AllocateMode>,
845 _: (),
846 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
847 ::fidl_next::Encode::encode(&self, encoder, out, ())
848 }
849 }
850
851 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AllocateMode, ___E> for &'a AllocateMode
852 where
853 ___E: ?Sized,
854 {
855 #[inline]
856 fn encode(
857 self,
858 _: &mut ___E,
859 out: &mut ::core::mem::MaybeUninit<crate::wire::AllocateMode>,
860 _: (),
861 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
862 ::fidl_next::munge!(let crate::wire::AllocateMode { value } = out);
863
864 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
865 Ok(())
866 }
867 }
868
869 impl ::core::convert::From<crate::wire::AllocateMode> for AllocateMode {
870 fn from(wire: crate::wire::AllocateMode) -> Self {
871 Self::from_bits_retain(u32::from(wire.value))
872 }
873 }
874
875 impl ::fidl_next::FromWire<crate::wire::AllocateMode> for AllocateMode {
876 #[inline]
877 fn from_wire(wire: crate::wire::AllocateMode) -> Self {
878 Self::from(wire)
879 }
880 }
881
882 impl ::fidl_next::FromWireRef<crate::wire::AllocateMode> for AllocateMode {
883 #[inline]
884 fn from_wire_ref(wire: &crate::wire::AllocateMode) -> Self {
885 Self::from(*wire)
886 }
887 }
888
889 #[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"]
890 pub type Rights = crate::natural::Operations;
891
892 #[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"]
893 pub type Id = u64;
894
895 ::fidl_next::bitflags::bitflags! {
896 #[doc = " DEPRECATED - Use Flags instead.\n"]#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct OpenFlags: u32 {
897 #[doc = " Can read from target object.\n"]const RIGHT_READABLE = 1;
898 #[doc = " Can write to target object.\n"]const RIGHT_WRITABLE = 2;
899 #[doc = " Connection can map target object executable.\n"]const RIGHT_EXECUTABLE = 8;
900 #[doc = " Create the object if it doesn\'t exist.\n"]const CREATE = 65536;
901 #[doc = " (with Create) Fail if the object already exists.\n"]const CREATE_IF_ABSENT = 131072;
902 #[doc = " Truncate the object before usage.\n"]const TRUNCATE = 262144;
903 #[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;
904 #[doc = " Seek to the end of the object before all writes.\n"]const APPEND = 1048576;
905 #[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;
906 #[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;
907 #[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;
908 #[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;
909 #[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;
910 #[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;
911 #[doc = " Open the target object as a block device.\n"]const BLOCK_DEVICE = 16777216;
912
913 }
914 }
915
916 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OpenFlags, ___E> for OpenFlags
917 where
918 ___E: ?Sized,
919 {
920 #[inline]
921 fn encode(
922 self,
923 encoder: &mut ___E,
924 out: &mut ::core::mem::MaybeUninit<crate::wire::OpenFlags>,
925 _: (),
926 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
927 ::fidl_next::Encode::encode(&self, encoder, out, ())
928 }
929 }
930
931 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::OpenFlags, ___E> for &'a OpenFlags
932 where
933 ___E: ?Sized,
934 {
935 #[inline]
936 fn encode(
937 self,
938 _: &mut ___E,
939 out: &mut ::core::mem::MaybeUninit<crate::wire::OpenFlags>,
940 _: (),
941 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
942 ::fidl_next::munge!(let crate::wire::OpenFlags { value } = out);
943
944 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
945 return Err(::fidl_next::EncodeError::InvalidStrictBits);
946 }
947
948 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
949 Ok(())
950 }
951 }
952
953 impl ::core::convert::From<crate::wire::OpenFlags> for OpenFlags {
954 fn from(wire: crate::wire::OpenFlags) -> Self {
955 Self::from_bits_retain(u32::from(wire.value))
956 }
957 }
958
959 impl ::fidl_next::FromWire<crate::wire::OpenFlags> for OpenFlags {
960 #[inline]
961 fn from_wire(wire: crate::wire::OpenFlags) -> Self {
962 Self::from(wire)
963 }
964 }
965
966 impl ::fidl_next::FromWireRef<crate::wire::OpenFlags> for OpenFlags {
967 #[inline]
968 fn from_wire_ref(wire: &crate::wire::OpenFlags) -> Self {
969 Self::from(*wire)
970 }
971 }
972
973 #[doc = " NodeAttributes defines generic information about a filesystem node.\n"]
974 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
975 pub struct NodeAttributes {
976 pub mode: u32,
977
978 pub id: u64,
979
980 pub content_size: u64,
981
982 pub storage_size: u64,
983
984 pub link_count: u64,
985
986 pub creation_time: u64,
987
988 pub modification_time: u64,
989 }
990
991 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes, ___E> for NodeAttributes
992 where
993 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
994 {
995 #[inline]
996 fn encode(
997 self,
998 encoder_: &mut ___E,
999 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
1000 _: (),
1001 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1002 ::fidl_next::munge! {
1003 let crate::wire::NodeAttributes {
1004 mode,
1005 id,
1006 content_size,
1007 storage_size,
1008 link_count,
1009 creation_time,
1010 modification_time,
1011
1012 } = out_;
1013 }
1014
1015 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1016
1017 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1018
1019 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1020
1021 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1022
1023 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
1024
1025 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(content_size.as_mut_ptr()) };
1026
1027 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
1028
1029 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(storage_size.as_mut_ptr()) };
1030
1031 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
1032
1033 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(link_count.as_mut_ptr()) };
1034
1035 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
1036
1037 let mut _field =
1038 unsafe { ::fidl_next::Slot::new_unchecked(creation_time.as_mut_ptr()) };
1039
1040 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
1041
1042 let mut _field =
1043 unsafe { ::fidl_next::Slot::new_unchecked(modification_time.as_mut_ptr()) };
1044
1045 Ok(())
1046 }
1047 }
1048
1049 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes, ___E> for &'a NodeAttributes
1050 where
1051 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1052 {
1053 #[inline]
1054 fn encode(
1055 self,
1056 encoder_: &mut ___E,
1057 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
1058 _: (),
1059 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1060 ::fidl_next::munge! {
1061 let crate::wire::NodeAttributes {
1062 mode,
1063 id,
1064 content_size,
1065 storage_size,
1066 link_count,
1067 creation_time,
1068 modification_time,
1069
1070 } = out_;
1071 }
1072
1073 ::fidl_next::Encode::encode(&self.mode, encoder_, mode, ())?;
1074
1075 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1076
1077 ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1078
1079 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1080
1081 ::fidl_next::Encode::encode(&self.content_size, encoder_, content_size, ())?;
1082
1083 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(content_size.as_mut_ptr()) };
1084
1085 ::fidl_next::Encode::encode(&self.storage_size, encoder_, storage_size, ())?;
1086
1087 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(storage_size.as_mut_ptr()) };
1088
1089 ::fidl_next::Encode::encode(&self.link_count, encoder_, link_count, ())?;
1090
1091 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(link_count.as_mut_ptr()) };
1092
1093 ::fidl_next::Encode::encode(&self.creation_time, encoder_, creation_time, ())?;
1094
1095 let mut _field =
1096 unsafe { ::fidl_next::Slot::new_unchecked(creation_time.as_mut_ptr()) };
1097
1098 ::fidl_next::Encode::encode(&self.modification_time, encoder_, modification_time, ())?;
1099
1100 let mut _field =
1101 unsafe { ::fidl_next::Slot::new_unchecked(modification_time.as_mut_ptr()) };
1102
1103 Ok(())
1104 }
1105 }
1106
1107 unsafe impl<___E>
1108 ::fidl_next::EncodeOption<
1109 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes>,
1110 ___E,
1111 > for NodeAttributes
1112 where
1113 ___E: ::fidl_next::Encoder + ?Sized,
1114 NodeAttributes: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
1115 {
1116 #[inline]
1117 fn encode_option(
1118 this: ::core::option::Option<Self>,
1119 encoder: &mut ___E,
1120 out: &mut ::core::mem::MaybeUninit<
1121 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes>,
1122 >,
1123 _: (),
1124 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1125 if let Some(inner) = this {
1126 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1127 ::fidl_next::wire::Box::encode_present(out);
1128 } else {
1129 ::fidl_next::wire::Box::encode_absent(out);
1130 }
1131
1132 Ok(())
1133 }
1134 }
1135
1136 unsafe impl<'a, ___E>
1137 ::fidl_next::EncodeOption<
1138 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes>,
1139 ___E,
1140 > for &'a NodeAttributes
1141 where
1142 ___E: ::fidl_next::Encoder + ?Sized,
1143 &'a NodeAttributes: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
1144 {
1145 #[inline]
1146 fn encode_option(
1147 this: ::core::option::Option<Self>,
1148 encoder: &mut ___E,
1149 out: &mut ::core::mem::MaybeUninit<
1150 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes>,
1151 >,
1152 _: (),
1153 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1154 if let Some(inner) = this {
1155 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1156 ::fidl_next::wire::Box::encode_present(out);
1157 } else {
1158 ::fidl_next::wire::Box::encode_absent(out);
1159 }
1160
1161 Ok(())
1162 }
1163 }
1164
1165 impl ::fidl_next::FromWire<crate::wire::NodeAttributes> for NodeAttributes {
1166 #[inline]
1167 fn from_wire(wire: crate::wire::NodeAttributes) -> Self {
1168 Self {
1169 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1170
1171 id: ::fidl_next::FromWire::from_wire(wire.id),
1172
1173 content_size: ::fidl_next::FromWire::from_wire(wire.content_size),
1174
1175 storage_size: ::fidl_next::FromWire::from_wire(wire.storage_size),
1176
1177 link_count: ::fidl_next::FromWire::from_wire(wire.link_count),
1178
1179 creation_time: ::fidl_next::FromWire::from_wire(wire.creation_time),
1180
1181 modification_time: ::fidl_next::FromWire::from_wire(wire.modification_time),
1182 }
1183 }
1184 }
1185
1186 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributes> for NodeAttributes {
1187 #[inline]
1188 fn from_wire_ref(wire: &crate::wire::NodeAttributes) -> Self {
1189 Self {
1190 mode: ::fidl_next::FromWireRef::from_wire_ref(&wire.mode),
1191
1192 id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
1193
1194 content_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.content_size),
1195
1196 storage_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.storage_size),
1197
1198 link_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.link_count),
1199
1200 creation_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.creation_time),
1201
1202 modification_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.modification_time),
1203 }
1204 }
1205 }
1206
1207 ::fidl_next::bitflags::bitflags! {
1208 #[doc = " The fields of \'attributes\' which are used to update the Node are indicated\n by the \'flags\' argument.\n"]#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct NodeAttributeFlags: u32 {
1209 const CREATION_TIME = 1;
1210 const MODIFICATION_TIME = 2;
1211
1212 }
1213 }
1214
1215 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E> for NodeAttributeFlags
1216 where
1217 ___E: ?Sized,
1218 {
1219 #[inline]
1220 fn encode(
1221 self,
1222 encoder: &mut ___E,
1223 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributeFlags>,
1224 _: (),
1225 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1226 ::fidl_next::Encode::encode(&self, encoder, out, ())
1227 }
1228 }
1229
1230 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>
1231 for &'a NodeAttributeFlags
1232 where
1233 ___E: ?Sized,
1234 {
1235 #[inline]
1236 fn encode(
1237 self,
1238 _: &mut ___E,
1239 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributeFlags>,
1240 _: (),
1241 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1242 ::fidl_next::munge!(let crate::wire::NodeAttributeFlags { value } = out);
1243
1244 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1245 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1246 }
1247
1248 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
1249 Ok(())
1250 }
1251 }
1252
1253 impl ::core::convert::From<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1254 fn from(wire: crate::wire::NodeAttributeFlags) -> Self {
1255 Self::from_bits_retain(u32::from(wire.value))
1256 }
1257 }
1258
1259 impl ::fidl_next::FromWire<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1260 #[inline]
1261 fn from_wire(wire: crate::wire::NodeAttributeFlags) -> Self {
1262 Self::from(wire)
1263 }
1264 }
1265
1266 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1267 #[inline]
1268 fn from_wire_ref(wire: &crate::wire::NodeAttributeFlags) -> Self {
1269 Self::from(*wire)
1270 }
1271 }
1272
1273 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1274 pub struct NodeQueryFilesystemResponse {
1275 pub s: i32,
1276
1277 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::FilesystemInfo>>,
1278 }
1279
1280 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
1281 for NodeQueryFilesystemResponse
1282 where
1283 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1284 ___E: ::fidl_next::Encoder,
1285 {
1286 #[inline]
1287 fn encode(
1288 self,
1289 encoder_: &mut ___E,
1290 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
1291 _: (),
1292 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1293 ::fidl_next::munge! {
1294 let crate::wire::NodeQueryFilesystemResponse {
1295 s,
1296 info,
1297
1298 } = out_;
1299 }
1300
1301 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1302
1303 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1304
1305 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
1306
1307 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1308
1309 Ok(())
1310 }
1311 }
1312
1313 unsafe impl<'a, ___E>
1314 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
1315 for &'a NodeQueryFilesystemResponse
1316 where
1317 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1318 ___E: ::fidl_next::Encoder,
1319 {
1320 #[inline]
1321 fn encode(
1322 self,
1323 encoder_: &mut ___E,
1324 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
1325 _: (),
1326 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1327 ::fidl_next::munge! {
1328 let crate::wire::NodeQueryFilesystemResponse {
1329 s,
1330 info,
1331
1332 } = out_;
1333 }
1334
1335 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1336
1337 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1338
1339 ::fidl_next::Encode::encode(&self.info, encoder_, info, ())?;
1340
1341 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1342
1343 Ok(())
1344 }
1345 }
1346
1347 unsafe impl<___E>
1348 ::fidl_next::EncodeOption<
1349 ::fidl_next::wire::Box<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1350 ___E,
1351 > for NodeQueryFilesystemResponse
1352 where
1353 ___E: ::fidl_next::Encoder + ?Sized,
1354 NodeQueryFilesystemResponse:
1355 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>,
1356 {
1357 #[inline]
1358 fn encode_option(
1359 this: ::core::option::Option<Self>,
1360 encoder: &mut ___E,
1361 out: &mut ::core::mem::MaybeUninit<
1362 ::fidl_next::wire::Box<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1363 >,
1364 _: (),
1365 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1366 if let Some(inner) = this {
1367 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1368 ::fidl_next::wire::Box::encode_present(out);
1369 } else {
1370 ::fidl_next::wire::Box::encode_absent(out);
1371 }
1372
1373 Ok(())
1374 }
1375 }
1376
1377 unsafe impl<'a, ___E>
1378 ::fidl_next::EncodeOption<
1379 ::fidl_next::wire::Box<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1380 ___E,
1381 > for &'a NodeQueryFilesystemResponse
1382 where
1383 ___E: ::fidl_next::Encoder + ?Sized,
1384 &'a NodeQueryFilesystemResponse:
1385 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>,
1386 {
1387 #[inline]
1388 fn encode_option(
1389 this: ::core::option::Option<Self>,
1390 encoder: &mut ___E,
1391 out: &mut ::core::mem::MaybeUninit<
1392 ::fidl_next::wire::Box<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1393 >,
1394 _: (),
1395 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1396 if let Some(inner) = this {
1397 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1398 ::fidl_next::wire::Box::encode_present(out);
1399 } else {
1400 ::fidl_next::wire::Box::encode_absent(out);
1401 }
1402
1403 Ok(())
1404 }
1405 }
1406
1407 impl<'de> ::fidl_next::FromWire<crate::wire::NodeQueryFilesystemResponse<'de>>
1408 for NodeQueryFilesystemResponse
1409 {
1410 #[inline]
1411 fn from_wire(wire: crate::wire::NodeQueryFilesystemResponse<'de>) -> Self {
1412 Self {
1413 s: ::fidl_next::FromWire::from_wire(wire.s),
1414
1415 info: ::fidl_next::FromWire::from_wire(wire.info),
1416 }
1417 }
1418 }
1419
1420 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeQueryFilesystemResponse<'de>>
1421 for NodeQueryFilesystemResponse
1422 {
1423 #[inline]
1424 fn from_wire_ref(wire: &crate::wire::NodeQueryFilesystemResponse<'de>) -> Self {
1425 Self {
1426 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
1427
1428 info: ::fidl_next::FromWireRef::from_wire_ref(&wire.info),
1429 }
1430 }
1431 }
1432
1433 pub type NodeUpdateAttributesResponse = ();
1434
1435 pub type NodeSyncResponse = ();
1436
1437 ::fidl_next::bitflags::bitflags! {
1438 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct ModeType: u32 {
1439 const DO_NOT_USE = 2147483648;
1440
1441 }
1442 }
1443
1444 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ModeType, ___E> for ModeType
1445 where
1446 ___E: ?Sized,
1447 {
1448 #[inline]
1449 fn encode(
1450 self,
1451 encoder: &mut ___E,
1452 out: &mut ::core::mem::MaybeUninit<crate::wire::ModeType>,
1453 _: (),
1454 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1455 ::fidl_next::Encode::encode(&self, encoder, out, ())
1456 }
1457 }
1458
1459 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ModeType, ___E> for &'a ModeType
1460 where
1461 ___E: ?Sized,
1462 {
1463 #[inline]
1464 fn encode(
1465 self,
1466 _: &mut ___E,
1467 out: &mut ::core::mem::MaybeUninit<crate::wire::ModeType>,
1468 _: (),
1469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1470 ::fidl_next::munge!(let crate::wire::ModeType { value } = out);
1471
1472 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1473 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1474 }
1475
1476 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
1477 Ok(())
1478 }
1479 }
1480
1481 impl ::core::convert::From<crate::wire::ModeType> for ModeType {
1482 fn from(wire: crate::wire::ModeType) -> Self {
1483 Self::from_bits_retain(u32::from(wire.value))
1484 }
1485 }
1486
1487 impl ::fidl_next::FromWire<crate::wire::ModeType> for ModeType {
1488 #[inline]
1489 fn from_wire(wire: crate::wire::ModeType) -> Self {
1490 Self::from(wire)
1491 }
1492 }
1493
1494 impl ::fidl_next::FromWireRef<crate::wire::ModeType> for ModeType {
1495 #[inline]
1496 fn from_wire_ref(wire: &crate::wire::ModeType) -> Self {
1497 Self::from(*wire)
1498 }
1499 }
1500
1501 #[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"]
1502 pub type Path = ::std::string::String;
1503
1504 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1505 #[repr(C)]
1506 pub struct DirectoryReadDirentsRequest {
1507 pub max_bytes: u64,
1508 }
1509
1510 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
1511 for DirectoryReadDirentsRequest
1512 where
1513 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1514 {
1515 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1516 Self,
1517 crate::wire::DirectoryReadDirentsRequest,
1518 > = unsafe {
1519 ::fidl_next::CopyOptimization::enable_if(
1520 true
1521
1522 && <
1523 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
1524 >::COPY_OPTIMIZATION.is_enabled()
1525
1526 )
1527 };
1528
1529 #[inline]
1530 fn encode(
1531 self,
1532 encoder_: &mut ___E,
1533 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
1534 _: (),
1535 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1536 ::fidl_next::munge! {
1537 let crate::wire::DirectoryReadDirentsRequest {
1538 max_bytes,
1539
1540 } = out_;
1541 }
1542
1543 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
1544
1545 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max_bytes.as_mut_ptr()) };
1546
1547 Ok(())
1548 }
1549 }
1550
1551 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
1552 for &'a DirectoryReadDirentsRequest
1553 where
1554 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1555 {
1556 #[inline]
1557 fn encode(
1558 self,
1559 encoder_: &mut ___E,
1560 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
1561 _: (),
1562 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1563 ::fidl_next::munge! {
1564 let crate::wire::DirectoryReadDirentsRequest {
1565 max_bytes,
1566
1567 } = out_;
1568 }
1569
1570 ::fidl_next::Encode::encode(&self.max_bytes, encoder_, max_bytes, ())?;
1571
1572 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max_bytes.as_mut_ptr()) };
1573
1574 Ok(())
1575 }
1576 }
1577
1578 unsafe impl<___E>
1579 ::fidl_next::EncodeOption<
1580 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsRequest>,
1581 ___E,
1582 > for DirectoryReadDirentsRequest
1583 where
1584 ___E: ::fidl_next::Encoder + ?Sized,
1585 DirectoryReadDirentsRequest:
1586 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>,
1587 {
1588 #[inline]
1589 fn encode_option(
1590 this: ::core::option::Option<Self>,
1591 encoder: &mut ___E,
1592 out: &mut ::core::mem::MaybeUninit<
1593 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsRequest>,
1594 >,
1595 _: (),
1596 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1597 if let Some(inner) = this {
1598 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1599 ::fidl_next::wire::Box::encode_present(out);
1600 } else {
1601 ::fidl_next::wire::Box::encode_absent(out);
1602 }
1603
1604 Ok(())
1605 }
1606 }
1607
1608 unsafe impl<'a, ___E>
1609 ::fidl_next::EncodeOption<
1610 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsRequest>,
1611 ___E,
1612 > for &'a DirectoryReadDirentsRequest
1613 where
1614 ___E: ::fidl_next::Encoder + ?Sized,
1615 &'a DirectoryReadDirentsRequest:
1616 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>,
1617 {
1618 #[inline]
1619 fn encode_option(
1620 this: ::core::option::Option<Self>,
1621 encoder: &mut ___E,
1622 out: &mut ::core::mem::MaybeUninit<
1623 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsRequest>,
1624 >,
1625 _: (),
1626 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1627 if let Some(inner) = this {
1628 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1629 ::fidl_next::wire::Box::encode_present(out);
1630 } else {
1631 ::fidl_next::wire::Box::encode_absent(out);
1632 }
1633
1634 Ok(())
1635 }
1636 }
1637
1638 impl ::fidl_next::FromWire<crate::wire::DirectoryReadDirentsRequest>
1639 for DirectoryReadDirentsRequest
1640 {
1641 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1642 crate::wire::DirectoryReadDirentsRequest,
1643 Self,
1644 > = unsafe {
1645 ::fidl_next::CopyOptimization::enable_if(
1646 true
1647 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
1648 .is_enabled(),
1649 )
1650 };
1651
1652 #[inline]
1653 fn from_wire(wire: crate::wire::DirectoryReadDirentsRequest) -> Self {
1654 Self { max_bytes: ::fidl_next::FromWire::from_wire(wire.max_bytes) }
1655 }
1656 }
1657
1658 impl ::fidl_next::FromWireRef<crate::wire::DirectoryReadDirentsRequest>
1659 for DirectoryReadDirentsRequest
1660 {
1661 #[inline]
1662 fn from_wire_ref(wire: &crate::wire::DirectoryReadDirentsRequest) -> Self {
1663 Self { max_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_bytes) }
1664 }
1665 }
1666
1667 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1668 pub struct DirectoryReadDirentsResponse {
1669 pub s: i32,
1670
1671 pub dirents: ::std::vec::Vec<u8>,
1672 }
1673
1674 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
1675 for DirectoryReadDirentsResponse
1676 where
1677 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1678 ___E: ::fidl_next::Encoder,
1679 {
1680 #[inline]
1681 fn encode(
1682 self,
1683 encoder_: &mut ___E,
1684 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
1685 _: (),
1686 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1687 ::fidl_next::munge! {
1688 let crate::wire::DirectoryReadDirentsResponse {
1689 s,
1690 dirents,
1691
1692 } = out_;
1693 }
1694
1695 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1696
1697 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1698
1699 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
1700
1701 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dirents.as_mut_ptr()) };
1702 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
1703
1704 Ok(())
1705 }
1706 }
1707
1708 unsafe impl<'a, ___E>
1709 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
1710 for &'a DirectoryReadDirentsResponse
1711 where
1712 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1713 ___E: ::fidl_next::Encoder,
1714 {
1715 #[inline]
1716 fn encode(
1717 self,
1718 encoder_: &mut ___E,
1719 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
1720 _: (),
1721 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1722 ::fidl_next::munge! {
1723 let crate::wire::DirectoryReadDirentsResponse {
1724 s,
1725 dirents,
1726
1727 } = out_;
1728 }
1729
1730 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1731
1732 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1733
1734 ::fidl_next::Encode::encode(&self.dirents, encoder_, dirents, (8192, ()))?;
1735
1736 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dirents.as_mut_ptr()) };
1737 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
1738
1739 Ok(())
1740 }
1741 }
1742
1743 unsafe impl<___E>
1744 ::fidl_next::EncodeOption<
1745 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
1746 ___E,
1747 > for DirectoryReadDirentsResponse
1748 where
1749 ___E: ::fidl_next::Encoder + ?Sized,
1750 DirectoryReadDirentsResponse:
1751 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>,
1752 {
1753 #[inline]
1754 fn encode_option(
1755 this: ::core::option::Option<Self>,
1756 encoder: &mut ___E,
1757 out: &mut ::core::mem::MaybeUninit<
1758 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
1759 >,
1760 _: (),
1761 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1762 if let Some(inner) = this {
1763 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1764 ::fidl_next::wire::Box::encode_present(out);
1765 } else {
1766 ::fidl_next::wire::Box::encode_absent(out);
1767 }
1768
1769 Ok(())
1770 }
1771 }
1772
1773 unsafe impl<'a, ___E>
1774 ::fidl_next::EncodeOption<
1775 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
1776 ___E,
1777 > for &'a DirectoryReadDirentsResponse
1778 where
1779 ___E: ::fidl_next::Encoder + ?Sized,
1780 &'a DirectoryReadDirentsResponse:
1781 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>,
1782 {
1783 #[inline]
1784 fn encode_option(
1785 this: ::core::option::Option<Self>,
1786 encoder: &mut ___E,
1787 out: &mut ::core::mem::MaybeUninit<
1788 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
1789 >,
1790 _: (),
1791 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1792 if let Some(inner) = this {
1793 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1794 ::fidl_next::wire::Box::encode_present(out);
1795 } else {
1796 ::fidl_next::wire::Box::encode_absent(out);
1797 }
1798
1799 Ok(())
1800 }
1801 }
1802
1803 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryReadDirentsResponse<'de>>
1804 for DirectoryReadDirentsResponse
1805 {
1806 #[inline]
1807 fn from_wire(wire: crate::wire::DirectoryReadDirentsResponse<'de>) -> Self {
1808 Self {
1809 s: ::fidl_next::FromWire::from_wire(wire.s),
1810
1811 dirents: ::fidl_next::FromWire::from_wire(wire.dirents),
1812 }
1813 }
1814 }
1815
1816 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryReadDirentsResponse<'de>>
1817 for DirectoryReadDirentsResponse
1818 {
1819 #[inline]
1820 fn from_wire_ref(wire: &crate::wire::DirectoryReadDirentsResponse<'de>) -> Self {
1821 Self {
1822 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
1823
1824 dirents: ::fidl_next::FromWireRef::from_wire_ref(&wire.dirents),
1825 }
1826 }
1827 }
1828
1829 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1830 #[repr(C)]
1831 pub struct DirectoryRewindResponse {
1832 pub s: i32,
1833 }
1834
1835 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
1836 for DirectoryRewindResponse
1837 where
1838 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1839 {
1840 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1841 Self,
1842 crate::wire::DirectoryRewindResponse,
1843 > = unsafe {
1844 ::fidl_next::CopyOptimization::enable_if(
1845 true
1846
1847 && <
1848 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
1849 >::COPY_OPTIMIZATION.is_enabled()
1850
1851 )
1852 };
1853
1854 #[inline]
1855 fn encode(
1856 self,
1857 encoder_: &mut ___E,
1858 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
1859 _: (),
1860 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1861 ::fidl_next::munge! {
1862 let crate::wire::DirectoryRewindResponse {
1863 s,
1864
1865 } = out_;
1866 }
1867
1868 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1869
1870 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1871
1872 Ok(())
1873 }
1874 }
1875
1876 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
1877 for &'a DirectoryRewindResponse
1878 where
1879 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1880 {
1881 #[inline]
1882 fn encode(
1883 self,
1884 encoder_: &mut ___E,
1885 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
1886 _: (),
1887 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1888 ::fidl_next::munge! {
1889 let crate::wire::DirectoryRewindResponse {
1890 s,
1891
1892 } = out_;
1893 }
1894
1895 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1896
1897 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1898
1899 Ok(())
1900 }
1901 }
1902
1903 unsafe impl<___E>
1904 ::fidl_next::EncodeOption<
1905 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1906 ___E,
1907 > for DirectoryRewindResponse
1908 where
1909 ___E: ::fidl_next::Encoder + ?Sized,
1910 DirectoryRewindResponse: ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
1911 {
1912 #[inline]
1913 fn encode_option(
1914 this: ::core::option::Option<Self>,
1915 encoder: &mut ___E,
1916 out: &mut ::core::mem::MaybeUninit<
1917 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1918 >,
1919 _: (),
1920 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1921 if let Some(inner) = this {
1922 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1923 ::fidl_next::wire::Box::encode_present(out);
1924 } else {
1925 ::fidl_next::wire::Box::encode_absent(out);
1926 }
1927
1928 Ok(())
1929 }
1930 }
1931
1932 unsafe impl<'a, ___E>
1933 ::fidl_next::EncodeOption<
1934 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1935 ___E,
1936 > for &'a DirectoryRewindResponse
1937 where
1938 ___E: ::fidl_next::Encoder + ?Sized,
1939 &'a DirectoryRewindResponse:
1940 ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
1941 {
1942 #[inline]
1943 fn encode_option(
1944 this: ::core::option::Option<Self>,
1945 encoder: &mut ___E,
1946 out: &mut ::core::mem::MaybeUninit<
1947 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1948 >,
1949 _: (),
1950 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1951 if let Some(inner) = this {
1952 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1953 ::fidl_next::wire::Box::encode_present(out);
1954 } else {
1955 ::fidl_next::wire::Box::encode_absent(out);
1956 }
1957
1958 Ok(())
1959 }
1960 }
1961
1962 impl ::fidl_next::FromWire<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
1963 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1964 crate::wire::DirectoryRewindResponse,
1965 Self,
1966 > = unsafe {
1967 ::fidl_next::CopyOptimization::enable_if(
1968 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
1969 .is_enabled(),
1970 )
1971 };
1972
1973 #[inline]
1974 fn from_wire(wire: crate::wire::DirectoryRewindResponse) -> Self {
1975 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
1976 }
1977 }
1978
1979 impl ::fidl_next::FromWireRef<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
1980 #[inline]
1981 fn from_wire_ref(wire: &crate::wire::DirectoryRewindResponse) -> Self {
1982 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
1983 }
1984 }
1985
1986 #[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"]
1987 pub type Name = ::std::string::String;
1988
1989 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1990 #[repr(C)]
1991 pub struct DirectoryLinkResponse {
1992 pub s: i32,
1993 }
1994
1995 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
1996 for DirectoryLinkResponse
1997 where
1998 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1999 {
2000 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2001 Self,
2002 crate::wire::DirectoryLinkResponse,
2003 > = unsafe {
2004 ::fidl_next::CopyOptimization::enable_if(
2005 true
2006
2007 && <
2008 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
2009 >::COPY_OPTIMIZATION.is_enabled()
2010
2011 )
2012 };
2013
2014 #[inline]
2015 fn encode(
2016 self,
2017 encoder_: &mut ___E,
2018 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2019 _: (),
2020 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2021 ::fidl_next::munge! {
2022 let crate::wire::DirectoryLinkResponse {
2023 s,
2024
2025 } = out_;
2026 }
2027
2028 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2029
2030 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2031
2032 Ok(())
2033 }
2034 }
2035
2036 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2037 for &'a DirectoryLinkResponse
2038 where
2039 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2040 {
2041 #[inline]
2042 fn encode(
2043 self,
2044 encoder_: &mut ___E,
2045 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2046 _: (),
2047 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2048 ::fidl_next::munge! {
2049 let crate::wire::DirectoryLinkResponse {
2050 s,
2051
2052 } = out_;
2053 }
2054
2055 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2056
2057 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2058
2059 Ok(())
2060 }
2061 }
2062
2063 unsafe impl<___E>
2064 ::fidl_next::EncodeOption<
2065 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2066 ___E,
2067 > for DirectoryLinkResponse
2068 where
2069 ___E: ::fidl_next::Encoder + ?Sized,
2070 DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2071 {
2072 #[inline]
2073 fn encode_option(
2074 this: ::core::option::Option<Self>,
2075 encoder: &mut ___E,
2076 out: &mut ::core::mem::MaybeUninit<
2077 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2078 >,
2079 _: (),
2080 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2081 if let Some(inner) = this {
2082 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2083 ::fidl_next::wire::Box::encode_present(out);
2084 } else {
2085 ::fidl_next::wire::Box::encode_absent(out);
2086 }
2087
2088 Ok(())
2089 }
2090 }
2091
2092 unsafe impl<'a, ___E>
2093 ::fidl_next::EncodeOption<
2094 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2095 ___E,
2096 > for &'a DirectoryLinkResponse
2097 where
2098 ___E: ::fidl_next::Encoder + ?Sized,
2099 &'a DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2100 {
2101 #[inline]
2102 fn encode_option(
2103 this: ::core::option::Option<Self>,
2104 encoder: &mut ___E,
2105 out: &mut ::core::mem::MaybeUninit<
2106 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2107 >,
2108 _: (),
2109 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2110 if let Some(inner) = this {
2111 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2112 ::fidl_next::wire::Box::encode_present(out);
2113 } else {
2114 ::fidl_next::wire::Box::encode_absent(out);
2115 }
2116
2117 Ok(())
2118 }
2119 }
2120
2121 impl ::fidl_next::FromWire<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2122 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2123 crate::wire::DirectoryLinkResponse,
2124 Self,
2125 > = unsafe {
2126 ::fidl_next::CopyOptimization::enable_if(
2127 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
2128 .is_enabled(),
2129 )
2130 };
2131
2132 #[inline]
2133 fn from_wire(wire: crate::wire::DirectoryLinkResponse) -> Self {
2134 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2135 }
2136 }
2137
2138 impl ::fidl_next::FromWireRef<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2139 #[inline]
2140 fn from_wire_ref(wire: &crate::wire::DirectoryLinkResponse) -> Self {
2141 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2142 }
2143 }
2144
2145 ::fidl_next::bitflags::bitflags! {
2146 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct UnlinkFlags: u64 {
2147 #[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;
2148 const _ = !0;
2149 }
2150 }
2151
2152 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for UnlinkFlags
2153 where
2154 ___E: ?Sized,
2155 {
2156 #[inline]
2157 fn encode(
2158 self,
2159 encoder: &mut ___E,
2160 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2161 _: (),
2162 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2163 ::fidl_next::Encode::encode(&self, encoder, out, ())
2164 }
2165 }
2166
2167 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for &'a UnlinkFlags
2168 where
2169 ___E: ?Sized,
2170 {
2171 #[inline]
2172 fn encode(
2173 self,
2174 _: &mut ___E,
2175 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2176 _: (),
2177 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2178 ::fidl_next::munge!(let crate::wire::UnlinkFlags { value } = out);
2179
2180 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
2181 Ok(())
2182 }
2183 }
2184
2185 impl ::core::convert::From<crate::wire::UnlinkFlags> for UnlinkFlags {
2186 fn from(wire: crate::wire::UnlinkFlags) -> Self {
2187 Self::from_bits_retain(u64::from(wire.value))
2188 }
2189 }
2190
2191 impl ::fidl_next::FromWire<crate::wire::UnlinkFlags> for UnlinkFlags {
2192 #[inline]
2193 fn from_wire(wire: crate::wire::UnlinkFlags) -> Self {
2194 Self::from(wire)
2195 }
2196 }
2197
2198 impl ::fidl_next::FromWireRef<crate::wire::UnlinkFlags> for UnlinkFlags {
2199 #[inline]
2200 fn from_wire_ref(wire: &crate::wire::UnlinkFlags) -> Self {
2201 Self::from(*wire)
2202 }
2203 }
2204
2205 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2206 pub struct UnlinkOptions {
2207 pub flags: ::core::option::Option<crate::natural::UnlinkFlags>,
2208 }
2209
2210 impl UnlinkOptions {
2211 fn __max_ordinal(&self) -> usize {
2212 if self.flags.is_some() {
2213 return 1;
2214 }
2215
2216 0
2217 }
2218 }
2219
2220 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E> for UnlinkOptions
2221 where
2222 ___E: ::fidl_next::Encoder + ?Sized,
2223 {
2224 #[inline]
2225 fn encode(
2226 mut self,
2227 encoder: &mut ___E,
2228 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2229 _: (),
2230 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2231 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2232
2233 let max_ord = self.__max_ordinal();
2234
2235 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2236 ::fidl_next::Wire::zero_padding(&mut out);
2237
2238 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2239 ::fidl_next::wire::Envelope,
2240 >(encoder, max_ord);
2241
2242 for i in 1..=max_ord {
2243 match i {
2244 1 => {
2245 if let Some(value) = self.flags.take() {
2246 ::fidl_next::wire::Envelope::encode_value::<
2247 crate::wire::UnlinkFlags,
2248 ___E,
2249 >(
2250 value, preallocated.encoder, &mut out, ()
2251 )?;
2252 } else {
2253 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2254 }
2255 }
2256
2257 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2258 }
2259 unsafe {
2260 preallocated.write_next(out.assume_init_ref());
2261 }
2262 }
2263
2264 ::fidl_next::wire::Table::encode_len(table, max_ord);
2265
2266 Ok(())
2267 }
2268 }
2269
2270 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>
2271 for &'a UnlinkOptions
2272 where
2273 ___E: ::fidl_next::Encoder + ?Sized,
2274 {
2275 #[inline]
2276 fn encode(
2277 self,
2278 encoder: &mut ___E,
2279 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2280 _: (),
2281 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2282 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2283
2284 let max_ord = self.__max_ordinal();
2285
2286 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2287 ::fidl_next::Wire::zero_padding(&mut out);
2288
2289 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2290 ::fidl_next::wire::Envelope,
2291 >(encoder, max_ord);
2292
2293 for i in 1..=max_ord {
2294 match i {
2295 1 => {
2296 if let Some(value) = &self.flags {
2297 ::fidl_next::wire::Envelope::encode_value::<
2298 crate::wire::UnlinkFlags,
2299 ___E,
2300 >(
2301 value, preallocated.encoder, &mut out, ()
2302 )?;
2303 } else {
2304 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2305 }
2306 }
2307
2308 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2309 }
2310 unsafe {
2311 preallocated.write_next(out.assume_init_ref());
2312 }
2313 }
2314
2315 ::fidl_next::wire::Table::encode_len(table, max_ord);
2316
2317 Ok(())
2318 }
2319 }
2320
2321 impl<'de> ::fidl_next::FromWire<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2322 #[inline]
2323 fn from_wire(wire_: crate::wire::UnlinkOptions<'de>) -> Self {
2324 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2325
2326 let flags = wire_.table.get(1);
2327
2328 Self {
2329 flags: flags.map(|envelope| {
2330 ::fidl_next::FromWire::from_wire(unsafe {
2331 envelope.read_unchecked::<crate::wire::UnlinkFlags>()
2332 })
2333 }),
2334 }
2335 }
2336 }
2337
2338 impl<'de> ::fidl_next::FromWireRef<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2339 #[inline]
2340 fn from_wire_ref(wire: &crate::wire::UnlinkOptions<'de>) -> Self {
2341 Self {
2342 flags: wire.table.get(1).map(|envelope| {
2343 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2344 envelope.deref_unchecked::<crate::wire::UnlinkFlags>()
2345 })
2346 }),
2347 }
2348 }
2349 }
2350
2351 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2352 pub struct DirectoryUnlinkRequest {
2353 pub name: ::std::string::String,
2354
2355 pub options: crate::natural::UnlinkOptions,
2356 }
2357
2358 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2359 for DirectoryUnlinkRequest
2360 where
2361 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2362 ___E: ::fidl_next::Encoder,
2363 {
2364 #[inline]
2365 fn encode(
2366 self,
2367 encoder_: &mut ___E,
2368 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2369 _: (),
2370 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2371 ::fidl_next::munge! {
2372 let crate::wire::DirectoryUnlinkRequest {
2373 name,
2374 options,
2375
2376 } = out_;
2377 }
2378
2379 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
2380
2381 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2382 ::fidl_next::Constrained::validate(_field, 255)?;
2383
2384 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2385
2386 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2387
2388 Ok(())
2389 }
2390 }
2391
2392 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2393 for &'a DirectoryUnlinkRequest
2394 where
2395 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2396 ___E: ::fidl_next::Encoder,
2397 {
2398 #[inline]
2399 fn encode(
2400 self,
2401 encoder_: &mut ___E,
2402 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2403 _: (),
2404 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2405 ::fidl_next::munge! {
2406 let crate::wire::DirectoryUnlinkRequest {
2407 name,
2408 options,
2409
2410 } = out_;
2411 }
2412
2413 ::fidl_next::Encode::encode(&self.name, encoder_, name, 255)?;
2414
2415 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2416 ::fidl_next::Constrained::validate(_field, 255)?;
2417
2418 ::fidl_next::Encode::encode(&self.options, encoder_, options, ())?;
2419
2420 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2421
2422 Ok(())
2423 }
2424 }
2425
2426 unsafe impl<___E>
2427 ::fidl_next::EncodeOption<
2428 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2429 ___E,
2430 > for DirectoryUnlinkRequest
2431 where
2432 ___E: ::fidl_next::Encoder + ?Sized,
2433 DirectoryUnlinkRequest:
2434 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2435 {
2436 #[inline]
2437 fn encode_option(
2438 this: ::core::option::Option<Self>,
2439 encoder: &mut ___E,
2440 out: &mut ::core::mem::MaybeUninit<
2441 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2442 >,
2443 _: (),
2444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2445 if let Some(inner) = this {
2446 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2447 ::fidl_next::wire::Box::encode_present(out);
2448 } else {
2449 ::fidl_next::wire::Box::encode_absent(out);
2450 }
2451
2452 Ok(())
2453 }
2454 }
2455
2456 unsafe impl<'a, ___E>
2457 ::fidl_next::EncodeOption<
2458 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2459 ___E,
2460 > for &'a DirectoryUnlinkRequest
2461 where
2462 ___E: ::fidl_next::Encoder + ?Sized,
2463 &'a DirectoryUnlinkRequest:
2464 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2465 {
2466 #[inline]
2467 fn encode_option(
2468 this: ::core::option::Option<Self>,
2469 encoder: &mut ___E,
2470 out: &mut ::core::mem::MaybeUninit<
2471 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2472 >,
2473 _: (),
2474 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2475 if let Some(inner) = this {
2476 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2477 ::fidl_next::wire::Box::encode_present(out);
2478 } else {
2479 ::fidl_next::wire::Box::encode_absent(out);
2480 }
2481
2482 Ok(())
2483 }
2484 }
2485
2486 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryUnlinkRequest<'de>>
2487 for DirectoryUnlinkRequest
2488 {
2489 #[inline]
2490 fn from_wire(wire: crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2491 Self {
2492 name: ::fidl_next::FromWire::from_wire(wire.name),
2493
2494 options: ::fidl_next::FromWire::from_wire(wire.options),
2495 }
2496 }
2497 }
2498
2499 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryUnlinkRequest<'de>>
2500 for DirectoryUnlinkRequest
2501 {
2502 #[inline]
2503 fn from_wire_ref(wire: &crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2504 Self {
2505 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
2506
2507 options: ::fidl_next::FromWireRef::from_wire_ref(&wire.options),
2508 }
2509 }
2510 }
2511
2512 pub type DirectoryUnlinkResponse = ();
2513
2514 pub type DirectoryRenameResponse = ();
2515
2516 ::fidl_next::bitflags::bitflags! {
2517 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct WatchMask: u32 {
2518 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.DELETED`.\n"]const DELETED = 1;
2519 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.ADDED`.\n"]const ADDED = 2;
2520 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.REMOVED`.\n"]const REMOVED = 4;
2521 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.EXISTING`.\n"]const EXISTING = 8;
2522 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.IDLE`.\n"]const IDLE = 16;
2523
2524 }
2525 }
2526
2527 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for WatchMask
2528 where
2529 ___E: ?Sized,
2530 {
2531 #[inline]
2532 fn encode(
2533 self,
2534 encoder: &mut ___E,
2535 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
2536 _: (),
2537 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2538 ::fidl_next::Encode::encode(&self, encoder, out, ())
2539 }
2540 }
2541
2542 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for &'a WatchMask
2543 where
2544 ___E: ?Sized,
2545 {
2546 #[inline]
2547 fn encode(
2548 self,
2549 _: &mut ___E,
2550 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
2551 _: (),
2552 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2553 ::fidl_next::munge!(let crate::wire::WatchMask { value } = out);
2554
2555 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
2556 return Err(::fidl_next::EncodeError::InvalidStrictBits);
2557 }
2558
2559 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
2560 Ok(())
2561 }
2562 }
2563
2564 impl ::core::convert::From<crate::wire::WatchMask> for WatchMask {
2565 fn from(wire: crate::wire::WatchMask) -> Self {
2566 Self::from_bits_retain(u32::from(wire.value))
2567 }
2568 }
2569
2570 impl ::fidl_next::FromWire<crate::wire::WatchMask> for WatchMask {
2571 #[inline]
2572 fn from_wire(wire: crate::wire::WatchMask) -> Self {
2573 Self::from(wire)
2574 }
2575 }
2576
2577 impl ::fidl_next::FromWireRef<crate::wire::WatchMask> for WatchMask {
2578 #[inline]
2579 fn from_wire_ref(wire: &crate::wire::WatchMask) -> Self {
2580 Self::from(*wire)
2581 }
2582 }
2583
2584 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2585 #[repr(C)]
2586 pub struct DirectoryWatchResponse {
2587 pub s: i32,
2588 }
2589
2590 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
2591 for DirectoryWatchResponse
2592 where
2593 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2594 {
2595 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2596 Self,
2597 crate::wire::DirectoryWatchResponse,
2598 > = unsafe {
2599 ::fidl_next::CopyOptimization::enable_if(
2600 true
2601
2602 && <
2603 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
2604 >::COPY_OPTIMIZATION.is_enabled()
2605
2606 )
2607 };
2608
2609 #[inline]
2610 fn encode(
2611 self,
2612 encoder_: &mut ___E,
2613 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
2614 _: (),
2615 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2616 ::fidl_next::munge! {
2617 let crate::wire::DirectoryWatchResponse {
2618 s,
2619
2620 } = out_;
2621 }
2622
2623 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2624
2625 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2626
2627 Ok(())
2628 }
2629 }
2630
2631 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
2632 for &'a DirectoryWatchResponse
2633 where
2634 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2635 {
2636 #[inline]
2637 fn encode(
2638 self,
2639 encoder_: &mut ___E,
2640 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
2641 _: (),
2642 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2643 ::fidl_next::munge! {
2644 let crate::wire::DirectoryWatchResponse {
2645 s,
2646
2647 } = out_;
2648 }
2649
2650 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2651
2652 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2653
2654 Ok(())
2655 }
2656 }
2657
2658 unsafe impl<___E>
2659 ::fidl_next::EncodeOption<
2660 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2661 ___E,
2662 > for DirectoryWatchResponse
2663 where
2664 ___E: ::fidl_next::Encoder + ?Sized,
2665 DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
2666 {
2667 #[inline]
2668 fn encode_option(
2669 this: ::core::option::Option<Self>,
2670 encoder: &mut ___E,
2671 out: &mut ::core::mem::MaybeUninit<
2672 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2673 >,
2674 _: (),
2675 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2676 if let Some(inner) = this {
2677 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2678 ::fidl_next::wire::Box::encode_present(out);
2679 } else {
2680 ::fidl_next::wire::Box::encode_absent(out);
2681 }
2682
2683 Ok(())
2684 }
2685 }
2686
2687 unsafe impl<'a, ___E>
2688 ::fidl_next::EncodeOption<
2689 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2690 ___E,
2691 > for &'a DirectoryWatchResponse
2692 where
2693 ___E: ::fidl_next::Encoder + ?Sized,
2694 &'a DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
2695 {
2696 #[inline]
2697 fn encode_option(
2698 this: ::core::option::Option<Self>,
2699 encoder: &mut ___E,
2700 out: &mut ::core::mem::MaybeUninit<
2701 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2702 >,
2703 _: (),
2704 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2705 if let Some(inner) = this {
2706 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2707 ::fidl_next::wire::Box::encode_present(out);
2708 } else {
2709 ::fidl_next::wire::Box::encode_absent(out);
2710 }
2711
2712 Ok(())
2713 }
2714 }
2715
2716 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
2717 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2718 crate::wire::DirectoryWatchResponse,
2719 Self,
2720 > = unsafe {
2721 ::fidl_next::CopyOptimization::enable_if(
2722 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
2723 .is_enabled(),
2724 )
2725 };
2726
2727 #[inline]
2728 fn from_wire(wire: crate::wire::DirectoryWatchResponse) -> Self {
2729 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2730 }
2731 }
2732
2733 impl ::fidl_next::FromWireRef<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
2734 #[inline]
2735 fn from_wire_ref(wire: &crate::wire::DirectoryWatchResponse) -> Self {
2736 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2737 }
2738 }
2739
2740 pub type SymlinkTarget = ::std::vec::Vec<u8>;
2741
2742 #[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"]
2743 pub type ExtendedAttributeName = ::std::vec::Vec<u8>;
2744
2745 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2746 pub struct NodeGetExtendedAttributeRequest {
2747 pub name: ::std::vec::Vec<u8>,
2748 }
2749
2750 unsafe impl<___E>
2751 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
2752 for NodeGetExtendedAttributeRequest
2753 where
2754 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2755 ___E: ::fidl_next::Encoder,
2756 {
2757 #[inline]
2758 fn encode(
2759 self,
2760 encoder_: &mut ___E,
2761 out_: &mut ::core::mem::MaybeUninit<
2762 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2763 >,
2764 _: (),
2765 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2766 ::fidl_next::munge! {
2767 let crate::wire::NodeGetExtendedAttributeRequest {
2768 name,
2769
2770 } = out_;
2771 }
2772
2773 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
2774
2775 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2776 ::fidl_next::Constrained::validate(_field, (255, ()))?;
2777
2778 Ok(())
2779 }
2780 }
2781
2782 unsafe impl<'a, ___E>
2783 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
2784 for &'a NodeGetExtendedAttributeRequest
2785 where
2786 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2787 ___E: ::fidl_next::Encoder,
2788 {
2789 #[inline]
2790 fn encode(
2791 self,
2792 encoder_: &mut ___E,
2793 out_: &mut ::core::mem::MaybeUninit<
2794 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2795 >,
2796 _: (),
2797 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2798 ::fidl_next::munge! {
2799 let crate::wire::NodeGetExtendedAttributeRequest {
2800 name,
2801
2802 } = out_;
2803 }
2804
2805 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
2806
2807 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2808 ::fidl_next::Constrained::validate(_field, (255, ()))?;
2809
2810 Ok(())
2811 }
2812 }
2813
2814 unsafe impl<___E>
2815 ::fidl_next::EncodeOption<
2816 ::fidl_next::wire::Box<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
2817 ___E,
2818 > for NodeGetExtendedAttributeRequest
2819 where
2820 ___E: ::fidl_next::Encoder + ?Sized,
2821 NodeGetExtendedAttributeRequest:
2822 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
2823 {
2824 #[inline]
2825 fn encode_option(
2826 this: ::core::option::Option<Self>,
2827 encoder: &mut ___E,
2828 out: &mut ::core::mem::MaybeUninit<
2829 ::fidl_next::wire::Box<
2830 'static,
2831 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2832 >,
2833 >,
2834 _: (),
2835 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2836 if let Some(inner) = this {
2837 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2838 ::fidl_next::wire::Box::encode_present(out);
2839 } else {
2840 ::fidl_next::wire::Box::encode_absent(out);
2841 }
2842
2843 Ok(())
2844 }
2845 }
2846
2847 unsafe impl<'a, ___E>
2848 ::fidl_next::EncodeOption<
2849 ::fidl_next::wire::Box<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
2850 ___E,
2851 > for &'a NodeGetExtendedAttributeRequest
2852 where
2853 ___E: ::fidl_next::Encoder + ?Sized,
2854 &'a NodeGetExtendedAttributeRequest:
2855 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
2856 {
2857 #[inline]
2858 fn encode_option(
2859 this: ::core::option::Option<Self>,
2860 encoder: &mut ___E,
2861 out: &mut ::core::mem::MaybeUninit<
2862 ::fidl_next::wire::Box<
2863 'static,
2864 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2865 >,
2866 >,
2867 _: (),
2868 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2869 if let Some(inner) = this {
2870 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2871 ::fidl_next::wire::Box::encode_present(out);
2872 } else {
2873 ::fidl_next::wire::Box::encode_absent(out);
2874 }
2875
2876 Ok(())
2877 }
2878 }
2879
2880 impl<'de> ::fidl_next::FromWire<crate::wire::NodeGetExtendedAttributeRequest<'de>>
2881 for NodeGetExtendedAttributeRequest
2882 {
2883 #[inline]
2884 fn from_wire(wire: crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
2885 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
2886 }
2887 }
2888
2889 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeGetExtendedAttributeRequest<'de>>
2890 for NodeGetExtendedAttributeRequest
2891 {
2892 #[inline]
2893 fn from_wire_ref(wire: &crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
2894 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
2895 }
2896 }
2897
2898 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2899 #[repr(u32)]
2900 pub enum SetExtendedAttributeMode {
2901 Set = 1,
2902 Create = 2,
2903 Replace = 3,
2904 }
2905 impl ::core::convert::TryFrom<u32> for SetExtendedAttributeMode {
2906 type Error = ::fidl_next::UnknownStrictEnumMemberError;
2907 fn try_from(
2908 value: u32,
2909 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
2910 match value {
2911 1 => Ok(Self::Set),
2912 2 => Ok(Self::Create),
2913 3 => Ok(Self::Replace),
2914
2915 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
2916 }
2917 }
2918 }
2919
2920 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
2921 for SetExtendedAttributeMode
2922 where
2923 ___E: ?Sized,
2924 {
2925 #[inline]
2926 fn encode(
2927 self,
2928 encoder: &mut ___E,
2929 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
2930 _: (),
2931 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2932 ::fidl_next::Encode::encode(&self, encoder, out, ())
2933 }
2934 }
2935
2936 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
2937 for &'a SetExtendedAttributeMode
2938 where
2939 ___E: ?Sized,
2940 {
2941 #[inline]
2942 fn encode(
2943 self,
2944 encoder: &mut ___E,
2945 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
2946 _: (),
2947 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2948 ::fidl_next::munge!(let crate::wire::SetExtendedAttributeMode { value } = out);
2949 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2950 SetExtendedAttributeMode::Set => 1,
2951
2952 SetExtendedAttributeMode::Create => 2,
2953
2954 SetExtendedAttributeMode::Replace => 3,
2955 }));
2956
2957 Ok(())
2958 }
2959 }
2960
2961 impl ::core::convert::From<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
2962 fn from(wire: crate::wire::SetExtendedAttributeMode) -> Self {
2963 match u32::from(wire.value) {
2964 1 => Self::Set,
2965
2966 2 => Self::Create,
2967
2968 3 => Self::Replace,
2969
2970 _ => unsafe { ::core::hint::unreachable_unchecked() },
2971 }
2972 }
2973 }
2974
2975 impl ::fidl_next::FromWire<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
2976 #[inline]
2977 fn from_wire(wire: crate::wire::SetExtendedAttributeMode) -> Self {
2978 Self::from(wire)
2979 }
2980 }
2981
2982 impl ::fidl_next::FromWireRef<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
2983 #[inline]
2984 fn from_wire_ref(wire: &crate::wire::SetExtendedAttributeMode) -> Self {
2985 Self::from(*wire)
2986 }
2987 }
2988
2989 pub type NodeSetExtendedAttributeResponse = ();
2990
2991 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2992 pub struct NodeRemoveExtendedAttributeRequest {
2993 pub name: ::std::vec::Vec<u8>,
2994 }
2995
2996 unsafe impl<___E>
2997 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
2998 for NodeRemoveExtendedAttributeRequest
2999 where
3000 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3001 ___E: ::fidl_next::Encoder,
3002 {
3003 #[inline]
3004 fn encode(
3005 self,
3006 encoder_: &mut ___E,
3007 out_: &mut ::core::mem::MaybeUninit<
3008 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3009 >,
3010 _: (),
3011 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3012 ::fidl_next::munge! {
3013 let crate::wire::NodeRemoveExtendedAttributeRequest {
3014 name,
3015
3016 } = out_;
3017 }
3018
3019 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
3020
3021 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3022 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3023
3024 Ok(())
3025 }
3026 }
3027
3028 unsafe impl<'a, ___E>
3029 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3030 for &'a NodeRemoveExtendedAttributeRequest
3031 where
3032 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3033 ___E: ::fidl_next::Encoder,
3034 {
3035 #[inline]
3036 fn encode(
3037 self,
3038 encoder_: &mut ___E,
3039 out_: &mut ::core::mem::MaybeUninit<
3040 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3041 >,
3042 _: (),
3043 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3044 ::fidl_next::munge! {
3045 let crate::wire::NodeRemoveExtendedAttributeRequest {
3046 name,
3047
3048 } = out_;
3049 }
3050
3051 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
3052
3053 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3054 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3055
3056 Ok(())
3057 }
3058 }
3059
3060 unsafe impl<___E>
3061 ::fidl_next::EncodeOption<
3062 ::fidl_next::wire::Box<
3063 'static,
3064 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3065 >,
3066 ___E,
3067 > for NodeRemoveExtendedAttributeRequest
3068 where
3069 ___E: ::fidl_next::Encoder + ?Sized,
3070 NodeRemoveExtendedAttributeRequest:
3071 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3072 {
3073 #[inline]
3074 fn encode_option(
3075 this: ::core::option::Option<Self>,
3076 encoder: &mut ___E,
3077 out: &mut ::core::mem::MaybeUninit<
3078 ::fidl_next::wire::Box<
3079 'static,
3080 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3081 >,
3082 >,
3083 _: (),
3084 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3085 if let Some(inner) = this {
3086 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3087 ::fidl_next::wire::Box::encode_present(out);
3088 } else {
3089 ::fidl_next::wire::Box::encode_absent(out);
3090 }
3091
3092 Ok(())
3093 }
3094 }
3095
3096 unsafe impl<'a, ___E>
3097 ::fidl_next::EncodeOption<
3098 ::fidl_next::wire::Box<
3099 'static,
3100 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3101 >,
3102 ___E,
3103 > for &'a NodeRemoveExtendedAttributeRequest
3104 where
3105 ___E: ::fidl_next::Encoder + ?Sized,
3106 &'a NodeRemoveExtendedAttributeRequest:
3107 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3108 {
3109 #[inline]
3110 fn encode_option(
3111 this: ::core::option::Option<Self>,
3112 encoder: &mut ___E,
3113 out: &mut ::core::mem::MaybeUninit<
3114 ::fidl_next::wire::Box<
3115 'static,
3116 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3117 >,
3118 >,
3119 _: (),
3120 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3121 if let Some(inner) = this {
3122 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3123 ::fidl_next::wire::Box::encode_present(out);
3124 } else {
3125 ::fidl_next::wire::Box::encode_absent(out);
3126 }
3127
3128 Ok(())
3129 }
3130 }
3131
3132 impl<'de> ::fidl_next::FromWire<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3133 for NodeRemoveExtendedAttributeRequest
3134 {
3135 #[inline]
3136 fn from_wire(wire: crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3137 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
3138 }
3139 }
3140
3141 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3142 for NodeRemoveExtendedAttributeRequest
3143 {
3144 #[inline]
3145 fn from_wire_ref(wire: &crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3146 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
3147 }
3148 }
3149
3150 pub type NodeRemoveExtendedAttributeResponse = ();
3151
3152 pub type DirectoryCreateSymlinkResponse = ();
3153
3154 pub type NodeSetFlagsResponse = ();
3155
3156 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3157 pub struct NodeDeprecatedGetAttrResponse {
3158 pub s: i32,
3159
3160 pub attributes: crate::natural::NodeAttributes,
3161 }
3162
3163 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
3164 for NodeDeprecatedGetAttrResponse
3165 where
3166 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3167 {
3168 #[inline]
3169 fn encode(
3170 self,
3171 encoder_: &mut ___E,
3172 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
3173 _: (),
3174 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3175 ::fidl_next::munge! {
3176 let crate::wire::NodeDeprecatedGetAttrResponse {
3177 s,
3178 attributes,
3179
3180 } = out_;
3181 }
3182
3183 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3184
3185 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3186
3187 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
3188
3189 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3190
3191 Ok(())
3192 }
3193 }
3194
3195 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
3196 for &'a NodeDeprecatedGetAttrResponse
3197 where
3198 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3199 {
3200 #[inline]
3201 fn encode(
3202 self,
3203 encoder_: &mut ___E,
3204 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
3205 _: (),
3206 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3207 ::fidl_next::munge! {
3208 let crate::wire::NodeDeprecatedGetAttrResponse {
3209 s,
3210 attributes,
3211
3212 } = out_;
3213 }
3214
3215 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3216
3217 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3218
3219 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
3220
3221 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3222
3223 Ok(())
3224 }
3225 }
3226
3227 unsafe impl<___E>
3228 ::fidl_next::EncodeOption<
3229 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3230 ___E,
3231 > for NodeDeprecatedGetAttrResponse
3232 where
3233 ___E: ::fidl_next::Encoder + ?Sized,
3234 NodeDeprecatedGetAttrResponse:
3235 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
3236 {
3237 #[inline]
3238 fn encode_option(
3239 this: ::core::option::Option<Self>,
3240 encoder: &mut ___E,
3241 out: &mut ::core::mem::MaybeUninit<
3242 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3243 >,
3244 _: (),
3245 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3246 if let Some(inner) = this {
3247 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3248 ::fidl_next::wire::Box::encode_present(out);
3249 } else {
3250 ::fidl_next::wire::Box::encode_absent(out);
3251 }
3252
3253 Ok(())
3254 }
3255 }
3256
3257 unsafe impl<'a, ___E>
3258 ::fidl_next::EncodeOption<
3259 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3260 ___E,
3261 > for &'a NodeDeprecatedGetAttrResponse
3262 where
3263 ___E: ::fidl_next::Encoder + ?Sized,
3264 &'a NodeDeprecatedGetAttrResponse:
3265 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
3266 {
3267 #[inline]
3268 fn encode_option(
3269 this: ::core::option::Option<Self>,
3270 encoder: &mut ___E,
3271 out: &mut ::core::mem::MaybeUninit<
3272 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3273 >,
3274 _: (),
3275 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3276 if let Some(inner) = this {
3277 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3278 ::fidl_next::wire::Box::encode_present(out);
3279 } else {
3280 ::fidl_next::wire::Box::encode_absent(out);
3281 }
3282
3283 Ok(())
3284 }
3285 }
3286
3287 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetAttrResponse>
3288 for NodeDeprecatedGetAttrResponse
3289 {
3290 #[inline]
3291 fn from_wire(wire: crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
3292 Self {
3293 s: ::fidl_next::FromWire::from_wire(wire.s),
3294
3295 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
3296 }
3297 }
3298 }
3299
3300 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetAttrResponse>
3301 for NodeDeprecatedGetAttrResponse
3302 {
3303 #[inline]
3304 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
3305 Self {
3306 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
3307
3308 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
3309 }
3310 }
3311 }
3312
3313 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3314 pub struct NodeDeprecatedSetAttrRequest {
3315 pub flags: crate::natural::NodeAttributeFlags,
3316
3317 pub attributes: crate::natural::NodeAttributes,
3318 }
3319
3320 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
3321 for NodeDeprecatedSetAttrRequest
3322 where
3323 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3324 {
3325 #[inline]
3326 fn encode(
3327 self,
3328 encoder_: &mut ___E,
3329 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
3330 _: (),
3331 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3332 ::fidl_next::munge! {
3333 let crate::wire::NodeDeprecatedSetAttrRequest {
3334 flags,
3335 attributes,
3336
3337 } = out_;
3338 }
3339
3340 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3341
3342 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3343
3344 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
3345
3346 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3347
3348 Ok(())
3349 }
3350 }
3351
3352 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
3353 for &'a NodeDeprecatedSetAttrRequest
3354 where
3355 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3356 {
3357 #[inline]
3358 fn encode(
3359 self,
3360 encoder_: &mut ___E,
3361 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
3362 _: (),
3363 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3364 ::fidl_next::munge! {
3365 let crate::wire::NodeDeprecatedSetAttrRequest {
3366 flags,
3367 attributes,
3368
3369 } = out_;
3370 }
3371
3372 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3373
3374 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3375
3376 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
3377
3378 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3379
3380 Ok(())
3381 }
3382 }
3383
3384 unsafe impl<___E>
3385 ::fidl_next::EncodeOption<
3386 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3387 ___E,
3388 > for NodeDeprecatedSetAttrRequest
3389 where
3390 ___E: ::fidl_next::Encoder + ?Sized,
3391 NodeDeprecatedSetAttrRequest:
3392 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
3393 {
3394 #[inline]
3395 fn encode_option(
3396 this: ::core::option::Option<Self>,
3397 encoder: &mut ___E,
3398 out: &mut ::core::mem::MaybeUninit<
3399 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3400 >,
3401 _: (),
3402 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3403 if let Some(inner) = this {
3404 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3405 ::fidl_next::wire::Box::encode_present(out);
3406 } else {
3407 ::fidl_next::wire::Box::encode_absent(out);
3408 }
3409
3410 Ok(())
3411 }
3412 }
3413
3414 unsafe impl<'a, ___E>
3415 ::fidl_next::EncodeOption<
3416 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3417 ___E,
3418 > for &'a NodeDeprecatedSetAttrRequest
3419 where
3420 ___E: ::fidl_next::Encoder + ?Sized,
3421 &'a NodeDeprecatedSetAttrRequest:
3422 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
3423 {
3424 #[inline]
3425 fn encode_option(
3426 this: ::core::option::Option<Self>,
3427 encoder: &mut ___E,
3428 out: &mut ::core::mem::MaybeUninit<
3429 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3430 >,
3431 _: (),
3432 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3433 if let Some(inner) = this {
3434 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3435 ::fidl_next::wire::Box::encode_present(out);
3436 } else {
3437 ::fidl_next::wire::Box::encode_absent(out);
3438 }
3439
3440 Ok(())
3441 }
3442 }
3443
3444 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrRequest>
3445 for NodeDeprecatedSetAttrRequest
3446 {
3447 #[inline]
3448 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
3449 Self {
3450 flags: ::fidl_next::FromWire::from_wire(wire.flags),
3451
3452 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
3453 }
3454 }
3455 }
3456
3457 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrRequest>
3458 for NodeDeprecatedSetAttrRequest
3459 {
3460 #[inline]
3461 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
3462 Self {
3463 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
3464
3465 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
3466 }
3467 }
3468 }
3469
3470 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3471 #[repr(C)]
3472 pub struct NodeDeprecatedSetAttrResponse {
3473 pub s: i32,
3474 }
3475
3476 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
3477 for NodeDeprecatedSetAttrResponse
3478 where
3479 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3480 {
3481 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3482 Self,
3483 crate::wire::NodeDeprecatedSetAttrResponse,
3484 > = unsafe {
3485 ::fidl_next::CopyOptimization::enable_if(
3486 true
3487
3488 && <
3489 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
3490 >::COPY_OPTIMIZATION.is_enabled()
3491
3492 )
3493 };
3494
3495 #[inline]
3496 fn encode(
3497 self,
3498 encoder_: &mut ___E,
3499 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
3500 _: (),
3501 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3502 ::fidl_next::munge! {
3503 let crate::wire::NodeDeprecatedSetAttrResponse {
3504 s,
3505
3506 } = out_;
3507 }
3508
3509 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3510
3511 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3512
3513 Ok(())
3514 }
3515 }
3516
3517 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
3518 for &'a NodeDeprecatedSetAttrResponse
3519 where
3520 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3521 {
3522 #[inline]
3523 fn encode(
3524 self,
3525 encoder_: &mut ___E,
3526 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
3527 _: (),
3528 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3529 ::fidl_next::munge! {
3530 let crate::wire::NodeDeprecatedSetAttrResponse {
3531 s,
3532
3533 } = out_;
3534 }
3535
3536 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3537
3538 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3539
3540 Ok(())
3541 }
3542 }
3543
3544 unsafe impl<___E>
3545 ::fidl_next::EncodeOption<
3546 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3547 ___E,
3548 > for NodeDeprecatedSetAttrResponse
3549 where
3550 ___E: ::fidl_next::Encoder + ?Sized,
3551 NodeDeprecatedSetAttrResponse:
3552 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
3553 {
3554 #[inline]
3555 fn encode_option(
3556 this: ::core::option::Option<Self>,
3557 encoder: &mut ___E,
3558 out: &mut ::core::mem::MaybeUninit<
3559 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3560 >,
3561 _: (),
3562 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3563 if let Some(inner) = this {
3564 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3565 ::fidl_next::wire::Box::encode_present(out);
3566 } else {
3567 ::fidl_next::wire::Box::encode_absent(out);
3568 }
3569
3570 Ok(())
3571 }
3572 }
3573
3574 unsafe impl<'a, ___E>
3575 ::fidl_next::EncodeOption<
3576 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3577 ___E,
3578 > for &'a NodeDeprecatedSetAttrResponse
3579 where
3580 ___E: ::fidl_next::Encoder + ?Sized,
3581 &'a NodeDeprecatedSetAttrResponse:
3582 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
3583 {
3584 #[inline]
3585 fn encode_option(
3586 this: ::core::option::Option<Self>,
3587 encoder: &mut ___E,
3588 out: &mut ::core::mem::MaybeUninit<
3589 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3590 >,
3591 _: (),
3592 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3593 if let Some(inner) = this {
3594 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3595 ::fidl_next::wire::Box::encode_present(out);
3596 } else {
3597 ::fidl_next::wire::Box::encode_absent(out);
3598 }
3599
3600 Ok(())
3601 }
3602 }
3603
3604 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrResponse>
3605 for NodeDeprecatedSetAttrResponse
3606 {
3607 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3608 crate::wire::NodeDeprecatedSetAttrResponse,
3609 Self,
3610 > = unsafe {
3611 ::fidl_next::CopyOptimization::enable_if(
3612 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
3613 .is_enabled(),
3614 )
3615 };
3616
3617 #[inline]
3618 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
3619 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
3620 }
3621 }
3622
3623 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrResponse>
3624 for NodeDeprecatedSetAttrResponse
3625 {
3626 #[inline]
3627 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
3628 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
3629 }
3630 }
3631
3632 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3633 #[repr(C)]
3634 pub struct NodeDeprecatedGetFlagsResponse {
3635 pub s: i32,
3636
3637 pub flags: crate::natural::OpenFlags,
3638 }
3639
3640 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
3641 for NodeDeprecatedGetFlagsResponse
3642 where
3643 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3644 {
3645 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3646 Self,
3647 crate::wire::NodeDeprecatedGetFlagsResponse,
3648 > = unsafe {
3649 ::fidl_next::CopyOptimization::enable_if(
3650 true
3651
3652 && <
3653 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
3654 >::COPY_OPTIMIZATION.is_enabled()
3655
3656 && <
3657 crate::natural::OpenFlags as ::fidl_next::Encode<crate::wire::OpenFlags, ___E>
3658 >::COPY_OPTIMIZATION.is_enabled()
3659
3660 )
3661 };
3662
3663 #[inline]
3664 fn encode(
3665 self,
3666 encoder_: &mut ___E,
3667 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
3668 _: (),
3669 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3670 ::fidl_next::munge! {
3671 let crate::wire::NodeDeprecatedGetFlagsResponse {
3672 s,
3673 flags,
3674
3675 } = out_;
3676 }
3677
3678 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3679
3680 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3681
3682 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3683
3684 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3685
3686 Ok(())
3687 }
3688 }
3689
3690 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
3691 for &'a NodeDeprecatedGetFlagsResponse
3692 where
3693 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3694 {
3695 #[inline]
3696 fn encode(
3697 self,
3698 encoder_: &mut ___E,
3699 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
3700 _: (),
3701 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3702 ::fidl_next::munge! {
3703 let crate::wire::NodeDeprecatedGetFlagsResponse {
3704 s,
3705 flags,
3706
3707 } = out_;
3708 }
3709
3710 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3711
3712 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3713
3714 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3715
3716 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3717
3718 Ok(())
3719 }
3720 }
3721
3722 unsafe impl<___E>
3723 ::fidl_next::EncodeOption<
3724 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3725 ___E,
3726 > for NodeDeprecatedGetFlagsResponse
3727 where
3728 ___E: ::fidl_next::Encoder + ?Sized,
3729 NodeDeprecatedGetFlagsResponse:
3730 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
3731 {
3732 #[inline]
3733 fn encode_option(
3734 this: ::core::option::Option<Self>,
3735 encoder: &mut ___E,
3736 out: &mut ::core::mem::MaybeUninit<
3737 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3738 >,
3739 _: (),
3740 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3741 if let Some(inner) = this {
3742 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3743 ::fidl_next::wire::Box::encode_present(out);
3744 } else {
3745 ::fidl_next::wire::Box::encode_absent(out);
3746 }
3747
3748 Ok(())
3749 }
3750 }
3751
3752 unsafe impl<'a, ___E>
3753 ::fidl_next::EncodeOption<
3754 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3755 ___E,
3756 > for &'a NodeDeprecatedGetFlagsResponse
3757 where
3758 ___E: ::fidl_next::Encoder + ?Sized,
3759 &'a NodeDeprecatedGetFlagsResponse:
3760 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
3761 {
3762 #[inline]
3763 fn encode_option(
3764 this: ::core::option::Option<Self>,
3765 encoder: &mut ___E,
3766 out: &mut ::core::mem::MaybeUninit<
3767 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3768 >,
3769 _: (),
3770 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3771 if let Some(inner) = this {
3772 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3773 ::fidl_next::wire::Box::encode_present(out);
3774 } else {
3775 ::fidl_next::wire::Box::encode_absent(out);
3776 }
3777
3778 Ok(())
3779 }
3780 }
3781
3782 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetFlagsResponse>
3783 for NodeDeprecatedGetFlagsResponse
3784 {
3785 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3786 crate::wire::NodeDeprecatedGetFlagsResponse,
3787 Self,
3788 > = unsafe {
3789 ::fidl_next::CopyOptimization::enable_if(
3790 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
3791 .is_enabled()
3792 && <crate::natural::OpenFlags as ::fidl_next::FromWire<
3793 crate::wire::OpenFlags,
3794 >>::COPY_OPTIMIZATION
3795 .is_enabled(),
3796 )
3797 };
3798
3799 #[inline]
3800 fn from_wire(wire: crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
3801 Self {
3802 s: ::fidl_next::FromWire::from_wire(wire.s),
3803
3804 flags: ::fidl_next::FromWire::from_wire(wire.flags),
3805 }
3806 }
3807 }
3808
3809 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetFlagsResponse>
3810 for NodeDeprecatedGetFlagsResponse
3811 {
3812 #[inline]
3813 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
3814 Self {
3815 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
3816
3817 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
3818 }
3819 }
3820 }
3821
3822 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3823 #[repr(C)]
3824 pub struct NodeDeprecatedSetFlagsRequest {
3825 pub flags: crate::natural::OpenFlags,
3826 }
3827
3828 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
3829 for NodeDeprecatedSetFlagsRequest
3830 where
3831 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3832 {
3833 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3834 Self,
3835 crate::wire::NodeDeprecatedSetFlagsRequest,
3836 > = unsafe {
3837 ::fidl_next::CopyOptimization::enable_if(
3838 true && <crate::natural::OpenFlags as ::fidl_next::Encode<
3839 crate::wire::OpenFlags,
3840 ___E,
3841 >>::COPY_OPTIMIZATION
3842 .is_enabled(),
3843 )
3844 };
3845
3846 #[inline]
3847 fn encode(
3848 self,
3849 encoder_: &mut ___E,
3850 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
3851 _: (),
3852 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3853 ::fidl_next::munge! {
3854 let crate::wire::NodeDeprecatedSetFlagsRequest {
3855 flags,
3856
3857 } = out_;
3858 }
3859
3860 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3861
3862 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3863
3864 Ok(())
3865 }
3866 }
3867
3868 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
3869 for &'a NodeDeprecatedSetFlagsRequest
3870 where
3871 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3872 {
3873 #[inline]
3874 fn encode(
3875 self,
3876 encoder_: &mut ___E,
3877 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
3878 _: (),
3879 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3880 ::fidl_next::munge! {
3881 let crate::wire::NodeDeprecatedSetFlagsRequest {
3882 flags,
3883
3884 } = out_;
3885 }
3886
3887 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3888
3889 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3890
3891 Ok(())
3892 }
3893 }
3894
3895 unsafe impl<___E>
3896 ::fidl_next::EncodeOption<
3897 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3898 ___E,
3899 > for NodeDeprecatedSetFlagsRequest
3900 where
3901 ___E: ::fidl_next::Encoder + ?Sized,
3902 NodeDeprecatedSetFlagsRequest:
3903 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
3904 {
3905 #[inline]
3906 fn encode_option(
3907 this: ::core::option::Option<Self>,
3908 encoder: &mut ___E,
3909 out: &mut ::core::mem::MaybeUninit<
3910 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3911 >,
3912 _: (),
3913 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3914 if let Some(inner) = this {
3915 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3916 ::fidl_next::wire::Box::encode_present(out);
3917 } else {
3918 ::fidl_next::wire::Box::encode_absent(out);
3919 }
3920
3921 Ok(())
3922 }
3923 }
3924
3925 unsafe impl<'a, ___E>
3926 ::fidl_next::EncodeOption<
3927 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3928 ___E,
3929 > for &'a NodeDeprecatedSetFlagsRequest
3930 where
3931 ___E: ::fidl_next::Encoder + ?Sized,
3932 &'a NodeDeprecatedSetFlagsRequest:
3933 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
3934 {
3935 #[inline]
3936 fn encode_option(
3937 this: ::core::option::Option<Self>,
3938 encoder: &mut ___E,
3939 out: &mut ::core::mem::MaybeUninit<
3940 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3941 >,
3942 _: (),
3943 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3944 if let Some(inner) = this {
3945 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3946 ::fidl_next::wire::Box::encode_present(out);
3947 } else {
3948 ::fidl_next::wire::Box::encode_absent(out);
3949 }
3950
3951 Ok(())
3952 }
3953 }
3954
3955 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsRequest>
3956 for NodeDeprecatedSetFlagsRequest
3957 {
3958 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3959 crate::wire::NodeDeprecatedSetFlagsRequest,
3960 Self,
3961 > = unsafe {
3962 ::fidl_next::CopyOptimization::enable_if(
3963 true && <crate::natural::OpenFlags as ::fidl_next::FromWire<
3964 crate::wire::OpenFlags,
3965 >>::COPY_OPTIMIZATION
3966 .is_enabled(),
3967 )
3968 };
3969
3970 #[inline]
3971 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
3972 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
3973 }
3974 }
3975
3976 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsRequest>
3977 for NodeDeprecatedSetFlagsRequest
3978 {
3979 #[inline]
3980 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
3981 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
3982 }
3983 }
3984
3985 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3986 #[repr(C)]
3987 pub struct NodeDeprecatedSetFlagsResponse {
3988 pub s: i32,
3989 }
3990
3991 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
3992 for NodeDeprecatedSetFlagsResponse
3993 where
3994 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3995 {
3996 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3997 Self,
3998 crate::wire::NodeDeprecatedSetFlagsResponse,
3999 > = unsafe {
4000 ::fidl_next::CopyOptimization::enable_if(
4001 true
4002
4003 && <
4004 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
4005 >::COPY_OPTIMIZATION.is_enabled()
4006
4007 )
4008 };
4009
4010 #[inline]
4011 fn encode(
4012 self,
4013 encoder_: &mut ___E,
4014 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
4015 _: (),
4016 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4017 ::fidl_next::munge! {
4018 let crate::wire::NodeDeprecatedSetFlagsResponse {
4019 s,
4020
4021 } = out_;
4022 }
4023
4024 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4025
4026 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4027
4028 Ok(())
4029 }
4030 }
4031
4032 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
4033 for &'a NodeDeprecatedSetFlagsResponse
4034 where
4035 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4036 {
4037 #[inline]
4038 fn encode(
4039 self,
4040 encoder_: &mut ___E,
4041 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
4042 _: (),
4043 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4044 ::fidl_next::munge! {
4045 let crate::wire::NodeDeprecatedSetFlagsResponse {
4046 s,
4047
4048 } = out_;
4049 }
4050
4051 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4052
4053 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4054
4055 Ok(())
4056 }
4057 }
4058
4059 unsafe impl<___E>
4060 ::fidl_next::EncodeOption<
4061 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4062 ___E,
4063 > for NodeDeprecatedSetFlagsResponse
4064 where
4065 ___E: ::fidl_next::Encoder + ?Sized,
4066 NodeDeprecatedSetFlagsResponse:
4067 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
4068 {
4069 #[inline]
4070 fn encode_option(
4071 this: ::core::option::Option<Self>,
4072 encoder: &mut ___E,
4073 out: &mut ::core::mem::MaybeUninit<
4074 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4075 >,
4076 _: (),
4077 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4078 if let Some(inner) = this {
4079 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4080 ::fidl_next::wire::Box::encode_present(out);
4081 } else {
4082 ::fidl_next::wire::Box::encode_absent(out);
4083 }
4084
4085 Ok(())
4086 }
4087 }
4088
4089 unsafe impl<'a, ___E>
4090 ::fidl_next::EncodeOption<
4091 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4092 ___E,
4093 > for &'a NodeDeprecatedSetFlagsResponse
4094 where
4095 ___E: ::fidl_next::Encoder + ?Sized,
4096 &'a NodeDeprecatedSetFlagsResponse:
4097 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
4098 {
4099 #[inline]
4100 fn encode_option(
4101 this: ::core::option::Option<Self>,
4102 encoder: &mut ___E,
4103 out: &mut ::core::mem::MaybeUninit<
4104 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4105 >,
4106 _: (),
4107 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4108 if let Some(inner) = this {
4109 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4110 ::fidl_next::wire::Box::encode_present(out);
4111 } else {
4112 ::fidl_next::wire::Box::encode_absent(out);
4113 }
4114
4115 Ok(())
4116 }
4117 }
4118
4119 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsResponse>
4120 for NodeDeprecatedSetFlagsResponse
4121 {
4122 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4123 crate::wire::NodeDeprecatedSetFlagsResponse,
4124 Self,
4125 > = unsafe {
4126 ::fidl_next::CopyOptimization::enable_if(
4127 true && <i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>>::COPY_OPTIMIZATION
4128 .is_enabled(),
4129 )
4130 };
4131
4132 #[inline]
4133 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
4134 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
4135 }
4136 }
4137
4138 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsResponse>
4139 for NodeDeprecatedSetFlagsResponse
4140 {
4141 #[inline]
4142 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
4143 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
4144 }
4145 }
4146
4147 ::fidl_next::bitflags::bitflags! {
4148 #[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(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct Flags: u64 {
4149 #[doc = " Allows opening child nodes with [`PROTOCOL_SERVICE`].\n"]const PERM_CONNECT = 1;
4150 #[doc = " Read byte contents of a file.\n"]const PERM_READ_BYTES = 2;
4151 #[doc = " Write byte contents to a file.\n"]const PERM_WRITE_BYTES = 4;
4152 #[doc = " Execute byte contents of a file.\n"]const PERM_EXECUTE = 8;
4153 #[doc = " Get/query attributes of a node.\n"]const PERM_GET_ATTRIBUTES = 16;
4154 #[doc = " Set/update attributes of a node.\n"]const PERM_UPDATE_ATTRIBUTES = 32;
4155 #[doc = " Enumerate (list) directory entries.\n"]const PERM_ENUMERATE = 64;
4156 #[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;
4157 #[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;
4158 #[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;
4159 #[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;
4160 #[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;
4161 #[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;
4162 #[doc = " Caller accepts [`fuchsia.io/Directory`] protocol. Equivalent to POSIX `O_DIRECTORY`.\n"]const PROTOCOL_DIRECTORY = 524288;
4163 #[doc = " Caller accepts [`fuchsia.io/File`] protocol.\n"]const PROTOCOL_FILE = 8589934592;
4164 #[doc = " Caller accepts [`fuchsia.io/Symlink`] protocol.\n"]const PROTOCOL_SYMLINK = 17179869184;
4165 #[doc = " Caller requests a [`fuchsia.io/Node.OnRepresentation`] event on success.\n"]const FLAG_SEND_REPRESENTATION = 1099511627776;
4166 #[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;
4167 #[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;
4168 #[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;
4169 #[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;
4170 #[doc = " Truncate the file to zero length upon opening it. Equivalent to POSIX `O_TRUNC`.\n"]const FILE_TRUNCATE = 262144;
4171 const _ = !0;
4172 }
4173 }
4174
4175 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for Flags
4176 where
4177 ___E: ?Sized,
4178 {
4179 #[inline]
4180 fn encode(
4181 self,
4182 encoder: &mut ___E,
4183 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
4184 _: (),
4185 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4186 ::fidl_next::Encode::encode(&self, encoder, out, ())
4187 }
4188 }
4189
4190 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for &'a Flags
4191 where
4192 ___E: ?Sized,
4193 {
4194 #[inline]
4195 fn encode(
4196 self,
4197 _: &mut ___E,
4198 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
4199 _: (),
4200 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4201 ::fidl_next::munge!(let crate::wire::Flags { value } = out);
4202
4203 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
4204 Ok(())
4205 }
4206 }
4207
4208 impl ::core::convert::From<crate::wire::Flags> for Flags {
4209 fn from(wire: crate::wire::Flags) -> Self {
4210 Self::from_bits_retain(u64::from(wire.value))
4211 }
4212 }
4213
4214 impl ::fidl_next::FromWire<crate::wire::Flags> for Flags {
4215 #[inline]
4216 fn from_wire(wire: crate::wire::Flags) -> Self {
4217 Self::from(wire)
4218 }
4219 }
4220
4221 impl ::fidl_next::FromWireRef<crate::wire::Flags> for Flags {
4222 #[inline]
4223 fn from_wire_ref(wire: &crate::wire::Flags) -> Self {
4224 Self::from(*wire)
4225 }
4226 }
4227
4228 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4229 #[repr(C)]
4230 pub struct NodeGetFlagsResponse {
4231 pub flags: crate::natural::Flags,
4232 }
4233
4234 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
4235 for NodeGetFlagsResponse
4236 where
4237 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4238 {
4239 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4240 Self,
4241 crate::wire::NodeGetFlagsResponse,
4242 > = unsafe {
4243 ::fidl_next::CopyOptimization::enable_if(
4244 true
4245
4246 && <
4247 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
4248 >::COPY_OPTIMIZATION.is_enabled()
4249
4250 )
4251 };
4252
4253 #[inline]
4254 fn encode(
4255 self,
4256 encoder_: &mut ___E,
4257 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
4258 _: (),
4259 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4260 ::fidl_next::munge! {
4261 let crate::wire::NodeGetFlagsResponse {
4262 flags,
4263
4264 } = out_;
4265 }
4266
4267 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4268
4269 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4270
4271 Ok(())
4272 }
4273 }
4274
4275 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
4276 for &'a NodeGetFlagsResponse
4277 where
4278 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4279 {
4280 #[inline]
4281 fn encode(
4282 self,
4283 encoder_: &mut ___E,
4284 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
4285 _: (),
4286 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4287 ::fidl_next::munge! {
4288 let crate::wire::NodeGetFlagsResponse {
4289 flags,
4290
4291 } = out_;
4292 }
4293
4294 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4295
4296 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4297
4298 Ok(())
4299 }
4300 }
4301
4302 unsafe impl<___E>
4303 ::fidl_next::EncodeOption<
4304 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4305 ___E,
4306 > for NodeGetFlagsResponse
4307 where
4308 ___E: ::fidl_next::Encoder + ?Sized,
4309 NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
4310 {
4311 #[inline]
4312 fn encode_option(
4313 this: ::core::option::Option<Self>,
4314 encoder: &mut ___E,
4315 out: &mut ::core::mem::MaybeUninit<
4316 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4317 >,
4318 _: (),
4319 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4320 if let Some(inner) = this {
4321 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4322 ::fidl_next::wire::Box::encode_present(out);
4323 } else {
4324 ::fidl_next::wire::Box::encode_absent(out);
4325 }
4326
4327 Ok(())
4328 }
4329 }
4330
4331 unsafe impl<'a, ___E>
4332 ::fidl_next::EncodeOption<
4333 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4334 ___E,
4335 > for &'a NodeGetFlagsResponse
4336 where
4337 ___E: ::fidl_next::Encoder + ?Sized,
4338 &'a NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
4339 {
4340 #[inline]
4341 fn encode_option(
4342 this: ::core::option::Option<Self>,
4343 encoder: &mut ___E,
4344 out: &mut ::core::mem::MaybeUninit<
4345 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4346 >,
4347 _: (),
4348 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4349 if let Some(inner) = this {
4350 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4351 ::fidl_next::wire::Box::encode_present(out);
4352 } else {
4353 ::fidl_next::wire::Box::encode_absent(out);
4354 }
4355
4356 Ok(())
4357 }
4358 }
4359
4360 impl ::fidl_next::FromWire<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
4361 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4362 crate::wire::NodeGetFlagsResponse,
4363 Self,
4364 > = unsafe {
4365 ::fidl_next::CopyOptimization::enable_if(
4366 true
4367
4368 && <
4369 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
4370 >::COPY_OPTIMIZATION.is_enabled()
4371
4372 )
4373 };
4374
4375 #[inline]
4376 fn from_wire(wire: crate::wire::NodeGetFlagsResponse) -> Self {
4377 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
4378 }
4379 }
4380
4381 impl ::fidl_next::FromWireRef<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
4382 #[inline]
4383 fn from_wire_ref(wire: &crate::wire::NodeGetFlagsResponse) -> Self {
4384 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
4385 }
4386 }
4387
4388 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4389 #[repr(C)]
4390 pub struct NodeSetFlagsRequest {
4391 pub flags: crate::natural::Flags,
4392 }
4393
4394 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
4395 for NodeSetFlagsRequest
4396 where
4397 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4398 {
4399 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4400 Self,
4401 crate::wire::NodeSetFlagsRequest,
4402 > = unsafe {
4403 ::fidl_next::CopyOptimization::enable_if(
4404 true
4405
4406 && <
4407 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
4408 >::COPY_OPTIMIZATION.is_enabled()
4409
4410 )
4411 };
4412
4413 #[inline]
4414 fn encode(
4415 self,
4416 encoder_: &mut ___E,
4417 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
4418 _: (),
4419 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4420 ::fidl_next::munge! {
4421 let crate::wire::NodeSetFlagsRequest {
4422 flags,
4423
4424 } = out_;
4425 }
4426
4427 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4428
4429 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4430
4431 Ok(())
4432 }
4433 }
4434
4435 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
4436 for &'a NodeSetFlagsRequest
4437 where
4438 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4439 {
4440 #[inline]
4441 fn encode(
4442 self,
4443 encoder_: &mut ___E,
4444 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
4445 _: (),
4446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4447 ::fidl_next::munge! {
4448 let crate::wire::NodeSetFlagsRequest {
4449 flags,
4450
4451 } = out_;
4452 }
4453
4454 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4455
4456 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4457
4458 Ok(())
4459 }
4460 }
4461
4462 unsafe impl<___E>
4463 ::fidl_next::EncodeOption<
4464 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4465 ___E,
4466 > for NodeSetFlagsRequest
4467 where
4468 ___E: ::fidl_next::Encoder + ?Sized,
4469 NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
4470 {
4471 #[inline]
4472 fn encode_option(
4473 this: ::core::option::Option<Self>,
4474 encoder: &mut ___E,
4475 out: &mut ::core::mem::MaybeUninit<
4476 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4477 >,
4478 _: (),
4479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4480 if let Some(inner) = this {
4481 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4482 ::fidl_next::wire::Box::encode_present(out);
4483 } else {
4484 ::fidl_next::wire::Box::encode_absent(out);
4485 }
4486
4487 Ok(())
4488 }
4489 }
4490
4491 unsafe impl<'a, ___E>
4492 ::fidl_next::EncodeOption<
4493 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4494 ___E,
4495 > for &'a NodeSetFlagsRequest
4496 where
4497 ___E: ::fidl_next::Encoder + ?Sized,
4498 &'a NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
4499 {
4500 #[inline]
4501 fn encode_option(
4502 this: ::core::option::Option<Self>,
4503 encoder: &mut ___E,
4504 out: &mut ::core::mem::MaybeUninit<
4505 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4506 >,
4507 _: (),
4508 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4509 if let Some(inner) = this {
4510 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4511 ::fidl_next::wire::Box::encode_present(out);
4512 } else {
4513 ::fidl_next::wire::Box::encode_absent(out);
4514 }
4515
4516 Ok(())
4517 }
4518 }
4519
4520 impl ::fidl_next::FromWire<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
4521 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4522 crate::wire::NodeSetFlagsRequest,
4523 Self,
4524 > = unsafe {
4525 ::fidl_next::CopyOptimization::enable_if(
4526 true
4527
4528 && <
4529 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
4530 >::COPY_OPTIMIZATION.is_enabled()
4531
4532 )
4533 };
4534
4535 #[inline]
4536 fn from_wire(wire: crate::wire::NodeSetFlagsRequest) -> Self {
4537 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
4538 }
4539 }
4540
4541 impl ::fidl_next::FromWireRef<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
4542 #[inline]
4543 fn from_wire_ref(wire: &crate::wire::NodeSetFlagsRequest) -> Self {
4544 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
4545 }
4546 }
4547
4548 #[doc = " Used in places where empty structs are needed, such as empty union members, to avoid creating\n new struct types.\n"]
4549 pub type EmptyStruct = ();
4550
4551 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4552 pub enum SelinuxContext {
4553 Data(::std::vec::Vec<u8>),
4554
4555 UseExtendedAttributes(crate::natural::EmptyStruct),
4556
4557 UnknownOrdinal_(u64),
4558 }
4559
4560 impl SelinuxContext {
4561 pub fn is_unknown(&self) -> bool {
4562 #[allow(unreachable_patterns)]
4563 match self {
4564 Self::UnknownOrdinal_(_) => true,
4565 _ => false,
4566 }
4567 }
4568 }
4569
4570 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E> for SelinuxContext
4571 where
4572 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4573 ___E: ::fidl_next::Encoder,
4574 {
4575 #[inline]
4576 fn encode(
4577 self,
4578 encoder: &mut ___E,
4579 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
4580 _: (),
4581 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4582 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
4583
4584 match self {
4585 Self::Data(value) => ::fidl_next::wire::Union::encode_as::<
4586 ___E,
4587 ::fidl_next::wire::Vector<'static, u8>,
4588 >(value, 1, encoder, raw, (256, ()))?,
4589
4590 Self::UseExtendedAttributes(value) => ::fidl_next::wire::Union::encode_as::<
4591 ___E,
4592 crate::wire::EmptyStruct,
4593 >(value, 2, encoder, raw, ())?,
4594
4595 Self::UnknownOrdinal_(ordinal) => {
4596 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
4597 }
4598 }
4599
4600 Ok(())
4601 }
4602 }
4603
4604 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>
4605 for &'a SelinuxContext
4606 where
4607 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4608 ___E: ::fidl_next::Encoder,
4609 {
4610 #[inline]
4611 fn encode(
4612 self,
4613 encoder: &mut ___E,
4614 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
4615 _: (),
4616 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4617 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
4618
4619 match self {
4620 SelinuxContext::Data(value) => ::fidl_next::wire::Union::encode_as::<
4621 ___E,
4622 ::fidl_next::wire::Vector<'static, u8>,
4623 >(value, 1, encoder, raw, (256, ()))?,
4624
4625 SelinuxContext::UseExtendedAttributes(value) => {
4626 ::fidl_next::wire::Union::encode_as::<___E, crate::wire::EmptyStruct>(
4627 value,
4628 2,
4629 encoder,
4630 raw,
4631 (),
4632 )?
4633 }
4634
4635 SelinuxContext::UnknownOrdinal_(ordinal) => {
4636 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
4637 }
4638 }
4639
4640 Ok(())
4641 }
4642 }
4643
4644 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
4645 for SelinuxContext
4646 where
4647 ___E: ?Sized,
4648 SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
4649 {
4650 #[inline]
4651 fn encode_option(
4652 this: ::core::option::Option<Self>,
4653 encoder: &mut ___E,
4654 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
4655 _: (),
4656 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4657 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
4658
4659 if let Some(inner) = this {
4660 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4661 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4662 } else {
4663 ::fidl_next::wire::Union::encode_absent(raw);
4664 }
4665
4666 Ok(())
4667 }
4668 }
4669
4670 unsafe impl<'a, ___E>
4671 ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
4672 for &'a SelinuxContext
4673 where
4674 ___E: ?Sized,
4675 &'a SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
4676 {
4677 #[inline]
4678 fn encode_option(
4679 this: ::core::option::Option<Self>,
4680 encoder: &mut ___E,
4681 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
4682 _: (),
4683 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4684 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
4685
4686 if let Some(inner) = this {
4687 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4688 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4689 } else {
4690 ::fidl_next::wire::Union::encode_absent(raw);
4691 }
4692
4693 Ok(())
4694 }
4695 }
4696
4697 impl<'de> ::fidl_next::FromWire<crate::wire::SelinuxContext<'de>> for SelinuxContext {
4698 #[inline]
4699 fn from_wire(wire: crate::wire::SelinuxContext<'de>) -> Self {
4700 let wire = ::core::mem::ManuallyDrop::new(wire);
4701 match wire.raw.ordinal() {
4702 1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
4703 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4704 })),
4705
4706 2 => Self::UseExtendedAttributes(::fidl_next::FromWire::from_wire(unsafe {
4707 wire.raw.get().read_unchecked::<crate::wire::EmptyStruct>()
4708 })),
4709
4710 ord => return Self::UnknownOrdinal_(ord as u64),
4711 }
4712 }
4713 }
4714
4715 impl<'de> ::fidl_next::FromWireRef<crate::wire::SelinuxContext<'de>> for SelinuxContext {
4716 #[inline]
4717 fn from_wire_ref(wire: &crate::wire::SelinuxContext<'de>) -> Self {
4718 match wire.raw.ordinal() {
4719 1 => Self::Data(::fidl_next::FromWireRef::from_wire_ref(unsafe {
4720 wire.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4721 })),
4722
4723 2 => Self::UseExtendedAttributes(::fidl_next::FromWireRef::from_wire_ref(unsafe {
4724 wire.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
4725 })),
4726
4727 ord => return Self::UnknownOrdinal_(ord as u64),
4728 }
4729 }
4730 }
4731
4732 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
4733 for SelinuxContext
4734 {
4735 #[inline]
4736 fn from_wire_option(
4737 wire: crate::wire_optional::SelinuxContext<'de>,
4738 ) -> ::core::option::Option<Self> {
4739 if let Some(inner) = wire.into_option() {
4740 Some(::fidl_next::FromWire::from_wire(inner))
4741 } else {
4742 None
4743 }
4744 }
4745 }
4746
4747 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
4748 for Box<SelinuxContext>
4749 {
4750 #[inline]
4751 fn from_wire_option(
4752 wire: crate::wire_optional::SelinuxContext<'de>,
4753 ) -> ::core::option::Option<Self> {
4754 <SelinuxContext as ::fidl_next::FromWireOption<
4755 crate::wire_optional::SelinuxContext<'de>,
4756 >>::from_wire_option(wire)
4757 .map(Box::new)
4758 }
4759 }
4760
4761 impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::SelinuxContext<'de>>
4762 for Box<SelinuxContext>
4763 {
4764 #[inline]
4765 fn from_wire_option_ref(
4766 wire: &crate::wire_optional::SelinuxContext<'de>,
4767 ) -> ::core::option::Option<Self> {
4768 if let Some(inner) = wire.as_ref() {
4769 Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
4770 } else {
4771 None
4772 }
4773 }
4774 }
4775
4776 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4777 pub struct MutableNodeAttributes {
4778 pub creation_time: ::core::option::Option<u64>,
4779
4780 pub modification_time: ::core::option::Option<u64>,
4781
4782 pub mode: ::core::option::Option<u32>,
4783
4784 pub uid: ::core::option::Option<u32>,
4785
4786 pub gid: ::core::option::Option<u32>,
4787
4788 pub rdev: ::core::option::Option<u64>,
4789
4790 pub access_time: ::core::option::Option<u64>,
4791
4792 pub casefold: ::core::option::Option<bool>,
4793
4794 pub selinux_context: ::core::option::Option<crate::natural::SelinuxContext>,
4795
4796 pub wrapping_key_id: ::core::option::Option<[u8; 16]>,
4797 }
4798
4799 impl MutableNodeAttributes {
4800 fn __max_ordinal(&self) -> usize {
4801 if self.wrapping_key_id.is_some() {
4802 return 10;
4803 }
4804
4805 if self.selinux_context.is_some() {
4806 return 9;
4807 }
4808
4809 if self.casefold.is_some() {
4810 return 8;
4811 }
4812
4813 if self.access_time.is_some() {
4814 return 7;
4815 }
4816
4817 if self.rdev.is_some() {
4818 return 6;
4819 }
4820
4821 if self.gid.is_some() {
4822 return 5;
4823 }
4824
4825 if self.uid.is_some() {
4826 return 4;
4827 }
4828
4829 if self.mode.is_some() {
4830 return 3;
4831 }
4832
4833 if self.modification_time.is_some() {
4834 return 2;
4835 }
4836
4837 if self.creation_time.is_some() {
4838 return 1;
4839 }
4840
4841 0
4842 }
4843 }
4844
4845 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
4846 for MutableNodeAttributes
4847 where
4848 ___E: ::fidl_next::Encoder + ?Sized,
4849 {
4850 #[inline]
4851 fn encode(
4852 mut self,
4853 encoder: &mut ___E,
4854 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
4855 _: (),
4856 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4857 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
4858
4859 let max_ord = self.__max_ordinal();
4860
4861 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4862 ::fidl_next::Wire::zero_padding(&mut out);
4863
4864 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4865 ::fidl_next::wire::Envelope,
4866 >(encoder, max_ord);
4867
4868 for i in 1..=max_ord {
4869 match i {
4870 10 => {
4871 if let Some(value) = self.wrapping_key_id.take() {
4872 ::fidl_next::wire::Envelope::encode_value::<[u8; 16], ___E>(
4873 value,
4874 preallocated.encoder,
4875 &mut out,
4876 (),
4877 )?;
4878 } else {
4879 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4880 }
4881 }
4882
4883 9 => {
4884 if let Some(value) = self.selinux_context.take() {
4885 ::fidl_next::wire::Envelope::encode_value::<
4886 crate::wire::SelinuxContext<'static>,
4887 ___E,
4888 >(
4889 value, preallocated.encoder, &mut out, ()
4890 )?;
4891 } else {
4892 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4893 }
4894 }
4895
4896 8 => {
4897 if let Some(value) = self.casefold.take() {
4898 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
4899 value,
4900 preallocated.encoder,
4901 &mut out,
4902 (),
4903 )?;
4904 } else {
4905 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4906 }
4907 }
4908
4909 7 => {
4910 if let Some(value) = self.access_time.take() {
4911 ::fidl_next::wire::Envelope::encode_value::<
4912 ::fidl_next::wire::Uint64,
4913 ___E,
4914 >(
4915 value, preallocated.encoder, &mut out, ()
4916 )?;
4917 } else {
4918 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4919 }
4920 }
4921
4922 6 => {
4923 if let Some(value) = self.rdev.take() {
4924 ::fidl_next::wire::Envelope::encode_value::<
4925 ::fidl_next::wire::Uint64,
4926 ___E,
4927 >(
4928 value, preallocated.encoder, &mut out, ()
4929 )?;
4930 } else {
4931 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4932 }
4933 }
4934
4935 5 => {
4936 if let Some(value) = self.gid.take() {
4937 ::fidl_next::wire::Envelope::encode_value::<
4938 ::fidl_next::wire::Uint32,
4939 ___E,
4940 >(
4941 value, preallocated.encoder, &mut out, ()
4942 )?;
4943 } else {
4944 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4945 }
4946 }
4947
4948 4 => {
4949 if let Some(value) = self.uid.take() {
4950 ::fidl_next::wire::Envelope::encode_value::<
4951 ::fidl_next::wire::Uint32,
4952 ___E,
4953 >(
4954 value, preallocated.encoder, &mut out, ()
4955 )?;
4956 } else {
4957 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4958 }
4959 }
4960
4961 3 => {
4962 if let Some(value) = self.mode.take() {
4963 ::fidl_next::wire::Envelope::encode_value::<
4964 ::fidl_next::wire::Uint32,
4965 ___E,
4966 >(
4967 value, preallocated.encoder, &mut out, ()
4968 )?;
4969 } else {
4970 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4971 }
4972 }
4973
4974 2 => {
4975 if let Some(value) = self.modification_time.take() {
4976 ::fidl_next::wire::Envelope::encode_value::<
4977 ::fidl_next::wire::Uint64,
4978 ___E,
4979 >(
4980 value, preallocated.encoder, &mut out, ()
4981 )?;
4982 } else {
4983 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4984 }
4985 }
4986
4987 1 => {
4988 if let Some(value) = self.creation_time.take() {
4989 ::fidl_next::wire::Envelope::encode_value::<
4990 ::fidl_next::wire::Uint64,
4991 ___E,
4992 >(
4993 value, preallocated.encoder, &mut out, ()
4994 )?;
4995 } else {
4996 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4997 }
4998 }
4999
5000 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5001 }
5002 unsafe {
5003 preallocated.write_next(out.assume_init_ref());
5004 }
5005 }
5006
5007 ::fidl_next::wire::Table::encode_len(table, max_ord);
5008
5009 Ok(())
5010 }
5011 }
5012
5013 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
5014 for &'a MutableNodeAttributes
5015 where
5016 ___E: ::fidl_next::Encoder + ?Sized,
5017 {
5018 #[inline]
5019 fn encode(
5020 self,
5021 encoder: &mut ___E,
5022 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
5023 _: (),
5024 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5025 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
5026
5027 let max_ord = self.__max_ordinal();
5028
5029 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5030 ::fidl_next::Wire::zero_padding(&mut out);
5031
5032 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5033 ::fidl_next::wire::Envelope,
5034 >(encoder, max_ord);
5035
5036 for i in 1..=max_ord {
5037 match i {
5038 10 => {
5039 if let Some(value) = &self.wrapping_key_id {
5040 ::fidl_next::wire::Envelope::encode_value::<[u8; 16], ___E>(
5041 value,
5042 preallocated.encoder,
5043 &mut out,
5044 (),
5045 )?;
5046 } else {
5047 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5048 }
5049 }
5050
5051 9 => {
5052 if let Some(value) = &self.selinux_context {
5053 ::fidl_next::wire::Envelope::encode_value::<
5054 crate::wire::SelinuxContext<'static>,
5055 ___E,
5056 >(
5057 value, preallocated.encoder, &mut out, ()
5058 )?;
5059 } else {
5060 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5061 }
5062 }
5063
5064 8 => {
5065 if let Some(value) = &self.casefold {
5066 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5067 value,
5068 preallocated.encoder,
5069 &mut out,
5070 (),
5071 )?;
5072 } else {
5073 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5074 }
5075 }
5076
5077 7 => {
5078 if let Some(value) = &self.access_time {
5079 ::fidl_next::wire::Envelope::encode_value::<
5080 ::fidl_next::wire::Uint64,
5081 ___E,
5082 >(
5083 value, preallocated.encoder, &mut out, ()
5084 )?;
5085 } else {
5086 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5087 }
5088 }
5089
5090 6 => {
5091 if let Some(value) = &self.rdev {
5092 ::fidl_next::wire::Envelope::encode_value::<
5093 ::fidl_next::wire::Uint64,
5094 ___E,
5095 >(
5096 value, preallocated.encoder, &mut out, ()
5097 )?;
5098 } else {
5099 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5100 }
5101 }
5102
5103 5 => {
5104 if let Some(value) = &self.gid {
5105 ::fidl_next::wire::Envelope::encode_value::<
5106 ::fidl_next::wire::Uint32,
5107 ___E,
5108 >(
5109 value, preallocated.encoder, &mut out, ()
5110 )?;
5111 } else {
5112 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5113 }
5114 }
5115
5116 4 => {
5117 if let Some(value) = &self.uid {
5118 ::fidl_next::wire::Envelope::encode_value::<
5119 ::fidl_next::wire::Uint32,
5120 ___E,
5121 >(
5122 value, preallocated.encoder, &mut out, ()
5123 )?;
5124 } else {
5125 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5126 }
5127 }
5128
5129 3 => {
5130 if let Some(value) = &self.mode {
5131 ::fidl_next::wire::Envelope::encode_value::<
5132 ::fidl_next::wire::Uint32,
5133 ___E,
5134 >(
5135 value, preallocated.encoder, &mut out, ()
5136 )?;
5137 } else {
5138 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5139 }
5140 }
5141
5142 2 => {
5143 if let Some(value) = &self.modification_time {
5144 ::fidl_next::wire::Envelope::encode_value::<
5145 ::fidl_next::wire::Uint64,
5146 ___E,
5147 >(
5148 value, preallocated.encoder, &mut out, ()
5149 )?;
5150 } else {
5151 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5152 }
5153 }
5154
5155 1 => {
5156 if let Some(value) = &self.creation_time {
5157 ::fidl_next::wire::Envelope::encode_value::<
5158 ::fidl_next::wire::Uint64,
5159 ___E,
5160 >(
5161 value, preallocated.encoder, &mut out, ()
5162 )?;
5163 } else {
5164 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5165 }
5166 }
5167
5168 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5169 }
5170 unsafe {
5171 preallocated.write_next(out.assume_init_ref());
5172 }
5173 }
5174
5175 ::fidl_next::wire::Table::encode_len(table, max_ord);
5176
5177 Ok(())
5178 }
5179 }
5180
5181 impl<'de> ::fidl_next::FromWire<crate::wire::MutableNodeAttributes<'de>> for MutableNodeAttributes {
5182 #[inline]
5183 fn from_wire(wire_: crate::wire::MutableNodeAttributes<'de>) -> Self {
5184 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5185
5186 let creation_time = wire_.table.get(1);
5187
5188 let modification_time = wire_.table.get(2);
5189
5190 let mode = wire_.table.get(3);
5191
5192 let uid = wire_.table.get(4);
5193
5194 let gid = wire_.table.get(5);
5195
5196 let rdev = wire_.table.get(6);
5197
5198 let access_time = wire_.table.get(7);
5199
5200 let casefold = wire_.table.get(8);
5201
5202 let selinux_context = wire_.table.get(9);
5203
5204 let wrapping_key_id = wire_.table.get(10);
5205
5206 Self {
5207 creation_time: creation_time.map(|envelope| {
5208 ::fidl_next::FromWire::from_wire(unsafe {
5209 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5210 })
5211 }),
5212
5213 modification_time: modification_time.map(|envelope| {
5214 ::fidl_next::FromWire::from_wire(unsafe {
5215 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5216 })
5217 }),
5218
5219 mode: mode.map(|envelope| {
5220 ::fidl_next::FromWire::from_wire(unsafe {
5221 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5222 })
5223 }),
5224
5225 uid: uid.map(|envelope| {
5226 ::fidl_next::FromWire::from_wire(unsafe {
5227 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5228 })
5229 }),
5230
5231 gid: gid.map(|envelope| {
5232 ::fidl_next::FromWire::from_wire(unsafe {
5233 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5234 })
5235 }),
5236
5237 rdev: rdev.map(|envelope| {
5238 ::fidl_next::FromWire::from_wire(unsafe {
5239 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5240 })
5241 }),
5242
5243 access_time: access_time.map(|envelope| {
5244 ::fidl_next::FromWire::from_wire(unsafe {
5245 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5246 })
5247 }),
5248
5249 casefold: casefold.map(|envelope| {
5250 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
5251 }),
5252
5253 selinux_context: selinux_context.map(|envelope| {
5254 ::fidl_next::FromWire::from_wire(unsafe {
5255 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
5256 })
5257 }),
5258
5259 wrapping_key_id: wrapping_key_id.map(|envelope| {
5260 ::fidl_next::FromWire::from_wire(unsafe {
5261 envelope.read_unchecked::<[u8; 16]>()
5262 })
5263 }),
5264 }
5265 }
5266 }
5267
5268 impl<'de> ::fidl_next::FromWireRef<crate::wire::MutableNodeAttributes<'de>>
5269 for MutableNodeAttributes
5270 {
5271 #[inline]
5272 fn from_wire_ref(wire: &crate::wire::MutableNodeAttributes<'de>) -> Self {
5273 Self {
5274 creation_time: wire.table.get(1).map(|envelope| {
5275 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5276 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5277 })
5278 }),
5279
5280 modification_time: wire.table.get(2).map(|envelope| {
5281 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5282 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5283 })
5284 }),
5285
5286 mode: wire.table.get(3).map(|envelope| {
5287 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5288 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5289 })
5290 }),
5291
5292 uid: wire.table.get(4).map(|envelope| {
5293 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5294 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5295 })
5296 }),
5297
5298 gid: wire.table.get(5).map(|envelope| {
5299 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5300 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5301 })
5302 }),
5303
5304 rdev: wire.table.get(6).map(|envelope| {
5305 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5306 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5307 })
5308 }),
5309
5310 access_time: wire.table.get(7).map(|envelope| {
5311 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5312 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5313 })
5314 }),
5315
5316 casefold: wire.table.get(8).map(|envelope| {
5317 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5318 envelope.deref_unchecked::<bool>()
5319 })
5320 }),
5321
5322 selinux_context: wire.table.get(9).map(|envelope| {
5323 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5324 envelope.deref_unchecked::<crate::wire::SelinuxContext<'de>>()
5325 })
5326 }),
5327
5328 wrapping_key_id: wire.table.get(10).map(|envelope| {
5329 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5330 envelope.deref_unchecked::<[u8; 16]>()
5331 })
5332 }),
5333 }
5334 }
5335 }
5336
5337 ::fidl_next::bitflags::bitflags! {
5338 #[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(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct NodeProtocolKinds: u64 {
5339 #[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;
5340 #[doc = " The directory representation of a node.\n\n The connection will speak the [`Directory`] protocol.\n"]const DIRECTORY = 2;
5341 #[doc = " The file representation of a node.\n\n The connection will speak the [`File`] protocol.\n"]const FILE = 4;
5342 #[doc = " The symlink representation of a node.\n\n The connection will speak the [`Symlink`] protocol.\n"]const SYMLINK = 8;
5343 const _ = !0;
5344 }
5345 }
5346
5347 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E> for NodeProtocolKinds
5348 where
5349 ___E: ?Sized,
5350 {
5351 #[inline]
5352 fn encode(
5353 self,
5354 encoder: &mut ___E,
5355 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
5356 _: (),
5357 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5358 ::fidl_next::Encode::encode(&self, encoder, out, ())
5359 }
5360 }
5361
5362 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E>
5363 for &'a NodeProtocolKinds
5364 where
5365 ___E: ?Sized,
5366 {
5367 #[inline]
5368 fn encode(
5369 self,
5370 _: &mut ___E,
5371 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
5372 _: (),
5373 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5374 ::fidl_next::munge!(let crate::wire::NodeProtocolKinds { value } = out);
5375
5376 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
5377 Ok(())
5378 }
5379 }
5380
5381 impl ::core::convert::From<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5382 fn from(wire: crate::wire::NodeProtocolKinds) -> Self {
5383 Self::from_bits_retain(u64::from(wire.value))
5384 }
5385 }
5386
5387 impl ::fidl_next::FromWire<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5388 #[inline]
5389 fn from_wire(wire: crate::wire::NodeProtocolKinds) -> Self {
5390 Self::from(wire)
5391 }
5392 }
5393
5394 impl ::fidl_next::FromWireRef<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5395 #[inline]
5396 fn from_wire_ref(wire: &crate::wire::NodeProtocolKinds) -> Self {
5397 Self::from(*wire)
5398 }
5399 }
5400
5401 #[doc = " Denotes which hash algorithm is used to build the merkle tree for\n fsverity-enabled files.\n"]
5402 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5403 #[repr(u8)]
5404 pub enum HashAlgorithm {
5405 Sha256 = 1,
5406 Sha512 = 2,
5407 UnknownOrdinal_(u8) = 3,
5408 }
5409 impl ::std::convert::From<u8> for HashAlgorithm {
5410 fn from(value: u8) -> Self {
5411 match value {
5412 1 => Self::Sha256,
5413 2 => Self::Sha512,
5414
5415 _ => Self::UnknownOrdinal_(value),
5416 }
5417 }
5418 }
5419
5420 unsafe impl<___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for HashAlgorithm
5421 where
5422 ___E: ?Sized,
5423 {
5424 #[inline]
5425 fn encode(
5426 self,
5427 encoder: &mut ___E,
5428 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
5429 _: (),
5430 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5431 ::fidl_next::Encode::encode(&self, encoder, out, ())
5432 }
5433 }
5434
5435 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for &'a HashAlgorithm
5436 where
5437 ___E: ?Sized,
5438 {
5439 #[inline]
5440 fn encode(
5441 self,
5442 encoder: &mut ___E,
5443 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
5444 _: (),
5445 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5446 ::fidl_next::munge!(let crate::wire::HashAlgorithm { value } = out);
5447 let _ = value.write(u8::from(match *self {
5448 HashAlgorithm::Sha256 => 1,
5449
5450 HashAlgorithm::Sha512 => 2,
5451
5452 HashAlgorithm::UnknownOrdinal_(value) => value,
5453 }));
5454
5455 Ok(())
5456 }
5457 }
5458
5459 impl ::core::convert::From<crate::wire::HashAlgorithm> for HashAlgorithm {
5460 fn from(wire: crate::wire::HashAlgorithm) -> Self {
5461 match u8::from(wire.value) {
5462 1 => Self::Sha256,
5463
5464 2 => Self::Sha512,
5465
5466 value => Self::UnknownOrdinal_(value),
5467 }
5468 }
5469 }
5470
5471 impl ::fidl_next::FromWire<crate::wire::HashAlgorithm> for HashAlgorithm {
5472 #[inline]
5473 fn from_wire(wire: crate::wire::HashAlgorithm) -> Self {
5474 Self::from(wire)
5475 }
5476 }
5477
5478 impl ::fidl_next::FromWireRef<crate::wire::HashAlgorithm> for HashAlgorithm {
5479 #[inline]
5480 fn from_wire_ref(wire: &crate::wire::HashAlgorithm) -> Self {
5481 Self::from(*wire)
5482 }
5483 }
5484
5485 #[doc = " Set of options used to enable verity on a file.\n"]
5486 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5487 pub struct VerificationOptions {
5488 pub hash_algorithm: ::core::option::Option<crate::natural::HashAlgorithm>,
5489
5490 pub salt: ::core::option::Option<::std::vec::Vec<u8>>,
5491 }
5492
5493 impl VerificationOptions {
5494 fn __max_ordinal(&self) -> usize {
5495 if self.salt.is_some() {
5496 return 2;
5497 }
5498
5499 if self.hash_algorithm.is_some() {
5500 return 1;
5501 }
5502
5503 0
5504 }
5505 }
5506
5507 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
5508 for VerificationOptions
5509 where
5510 ___E: ::fidl_next::Encoder + ?Sized,
5511 {
5512 #[inline]
5513 fn encode(
5514 mut self,
5515 encoder: &mut ___E,
5516 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
5517 _: (),
5518 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5519 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
5520
5521 let max_ord = self.__max_ordinal();
5522
5523 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5524 ::fidl_next::Wire::zero_padding(&mut out);
5525
5526 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5527 ::fidl_next::wire::Envelope,
5528 >(encoder, max_ord);
5529
5530 for i in 1..=max_ord {
5531 match i {
5532 2 => {
5533 if let Some(value) = self.salt.take() {
5534 ::fidl_next::wire::Envelope::encode_value::<
5535 ::fidl_next::wire::Vector<'static, u8>,
5536 ___E,
5537 >(
5538 value, preallocated.encoder, &mut out, (32, ())
5539 )?;
5540 } else {
5541 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5542 }
5543 }
5544
5545 1 => {
5546 if let Some(value) = self.hash_algorithm.take() {
5547 ::fidl_next::wire::Envelope::encode_value::<
5548 crate::wire::HashAlgorithm,
5549 ___E,
5550 >(
5551 value, preallocated.encoder, &mut out, ()
5552 )?;
5553 } else {
5554 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5555 }
5556 }
5557
5558 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5559 }
5560 unsafe {
5561 preallocated.write_next(out.assume_init_ref());
5562 }
5563 }
5564
5565 ::fidl_next::wire::Table::encode_len(table, max_ord);
5566
5567 Ok(())
5568 }
5569 }
5570
5571 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
5572 for &'a VerificationOptions
5573 where
5574 ___E: ::fidl_next::Encoder + ?Sized,
5575 {
5576 #[inline]
5577 fn encode(
5578 self,
5579 encoder: &mut ___E,
5580 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
5581 _: (),
5582 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5583 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
5584
5585 let max_ord = self.__max_ordinal();
5586
5587 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5588 ::fidl_next::Wire::zero_padding(&mut out);
5589
5590 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5591 ::fidl_next::wire::Envelope,
5592 >(encoder, max_ord);
5593
5594 for i in 1..=max_ord {
5595 match i {
5596 2 => {
5597 if let Some(value) = &self.salt {
5598 ::fidl_next::wire::Envelope::encode_value::<
5599 ::fidl_next::wire::Vector<'static, u8>,
5600 ___E,
5601 >(
5602 value, preallocated.encoder, &mut out, (32, ())
5603 )?;
5604 } else {
5605 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5606 }
5607 }
5608
5609 1 => {
5610 if let Some(value) = &self.hash_algorithm {
5611 ::fidl_next::wire::Envelope::encode_value::<
5612 crate::wire::HashAlgorithm,
5613 ___E,
5614 >(
5615 value, preallocated.encoder, &mut out, ()
5616 )?;
5617 } else {
5618 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5619 }
5620 }
5621
5622 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5623 }
5624 unsafe {
5625 preallocated.write_next(out.assume_init_ref());
5626 }
5627 }
5628
5629 ::fidl_next::wire::Table::encode_len(table, max_ord);
5630
5631 Ok(())
5632 }
5633 }
5634
5635 impl<'de> ::fidl_next::FromWire<crate::wire::VerificationOptions<'de>> for VerificationOptions {
5636 #[inline]
5637 fn from_wire(wire_: crate::wire::VerificationOptions<'de>) -> Self {
5638 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5639
5640 let hash_algorithm = wire_.table.get(1);
5641
5642 let salt = wire_.table.get(2);
5643
5644 Self {
5645 hash_algorithm: hash_algorithm.map(|envelope| {
5646 ::fidl_next::FromWire::from_wire(unsafe {
5647 envelope.read_unchecked::<crate::wire::HashAlgorithm>()
5648 })
5649 }),
5650
5651 salt: salt.map(|envelope| {
5652 ::fidl_next::FromWire::from_wire(unsafe {
5653 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
5654 })
5655 }),
5656 }
5657 }
5658 }
5659
5660 impl<'de> ::fidl_next::FromWireRef<crate::wire::VerificationOptions<'de>> for VerificationOptions {
5661 #[inline]
5662 fn from_wire_ref(wire: &crate::wire::VerificationOptions<'de>) -> Self {
5663 Self {
5664 hash_algorithm: wire.table.get(1).map(|envelope| {
5665 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5666 envelope.deref_unchecked::<crate::wire::HashAlgorithm>()
5667 })
5668 }),
5669
5670 salt: wire.table.get(2).map(|envelope| {
5671 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5672 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
5673 })
5674 }),
5675 }
5676 }
5677 }
5678
5679 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5680 pub struct ImmutableNodeAttributes {
5681 pub protocols: ::core::option::Option<crate::natural::NodeProtocolKinds>,
5682
5683 pub abilities: ::core::option::Option<crate::natural::Operations>,
5684
5685 pub content_size: ::core::option::Option<u64>,
5686
5687 pub storage_size: ::core::option::Option<u64>,
5688
5689 pub link_count: ::core::option::Option<u64>,
5690
5691 pub id: ::core::option::Option<u64>,
5692
5693 pub change_time: ::core::option::Option<u64>,
5694
5695 pub options: ::core::option::Option<crate::natural::VerificationOptions>,
5696
5697 pub root_hash: ::core::option::Option<::std::vec::Vec<u8>>,
5698
5699 pub verity_enabled: ::core::option::Option<bool>,
5700 }
5701
5702 impl ImmutableNodeAttributes {
5703 fn __max_ordinal(&self) -> usize {
5704 if self.verity_enabled.is_some() {
5705 return 10;
5706 }
5707
5708 if self.root_hash.is_some() {
5709 return 9;
5710 }
5711
5712 if self.options.is_some() {
5713 return 8;
5714 }
5715
5716 if self.change_time.is_some() {
5717 return 7;
5718 }
5719
5720 if self.id.is_some() {
5721 return 6;
5722 }
5723
5724 if self.link_count.is_some() {
5725 return 5;
5726 }
5727
5728 if self.storage_size.is_some() {
5729 return 4;
5730 }
5731
5732 if self.content_size.is_some() {
5733 return 3;
5734 }
5735
5736 if self.abilities.is_some() {
5737 return 2;
5738 }
5739
5740 if self.protocols.is_some() {
5741 return 1;
5742 }
5743
5744 0
5745 }
5746 }
5747
5748 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
5749 for ImmutableNodeAttributes
5750 where
5751 ___E: ::fidl_next::Encoder + ?Sized,
5752 {
5753 #[inline]
5754 fn encode(
5755 mut self,
5756 encoder: &mut ___E,
5757 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
5758 _: (),
5759 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5760 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
5761
5762 let max_ord = self.__max_ordinal();
5763
5764 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5765 ::fidl_next::Wire::zero_padding(&mut out);
5766
5767 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5768 ::fidl_next::wire::Envelope,
5769 >(encoder, max_ord);
5770
5771 for i in 1..=max_ord {
5772 match i {
5773 10 => {
5774 if let Some(value) = self.verity_enabled.take() {
5775 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5776 value,
5777 preallocated.encoder,
5778 &mut out,
5779 (),
5780 )?;
5781 } else {
5782 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5783 }
5784 }
5785
5786 9 => {
5787 if let Some(value) = self.root_hash.take() {
5788 ::fidl_next::wire::Envelope::encode_value::<
5789 ::fidl_next::wire::Vector<'static, u8>,
5790 ___E,
5791 >(
5792 value, preallocated.encoder, &mut out, (64, ())
5793 )?;
5794 } else {
5795 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5796 }
5797 }
5798
5799 8 => {
5800 if let Some(value) = self.options.take() {
5801 ::fidl_next::wire::Envelope::encode_value::<
5802 crate::wire::VerificationOptions<'static>,
5803 ___E,
5804 >(
5805 value, preallocated.encoder, &mut out, ()
5806 )?;
5807 } else {
5808 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5809 }
5810 }
5811
5812 7 => {
5813 if let Some(value) = self.change_time.take() {
5814 ::fidl_next::wire::Envelope::encode_value::<
5815 ::fidl_next::wire::Uint64,
5816 ___E,
5817 >(
5818 value, preallocated.encoder, &mut out, ()
5819 )?;
5820 } else {
5821 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5822 }
5823 }
5824
5825 6 => {
5826 if let Some(value) = self.id.take() {
5827 ::fidl_next::wire::Envelope::encode_value::<
5828 ::fidl_next::wire::Uint64,
5829 ___E,
5830 >(
5831 value, preallocated.encoder, &mut out, ()
5832 )?;
5833 } else {
5834 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5835 }
5836 }
5837
5838 5 => {
5839 if let Some(value) = self.link_count.take() {
5840 ::fidl_next::wire::Envelope::encode_value::<
5841 ::fidl_next::wire::Uint64,
5842 ___E,
5843 >(
5844 value, preallocated.encoder, &mut out, ()
5845 )?;
5846 } else {
5847 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5848 }
5849 }
5850
5851 4 => {
5852 if let Some(value) = self.storage_size.take() {
5853 ::fidl_next::wire::Envelope::encode_value::<
5854 ::fidl_next::wire::Uint64,
5855 ___E,
5856 >(
5857 value, preallocated.encoder, &mut out, ()
5858 )?;
5859 } else {
5860 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5861 }
5862 }
5863
5864 3 => {
5865 if let Some(value) = self.content_size.take() {
5866 ::fidl_next::wire::Envelope::encode_value::<
5867 ::fidl_next::wire::Uint64,
5868 ___E,
5869 >(
5870 value, preallocated.encoder, &mut out, ()
5871 )?;
5872 } else {
5873 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5874 }
5875 }
5876
5877 2 => {
5878 if let Some(value) = self.abilities.take() {
5879 ::fidl_next::wire::Envelope::encode_value::<
5880 crate::wire::Operations,
5881 ___E,
5882 >(
5883 value, preallocated.encoder, &mut out, ()
5884 )?;
5885 } else {
5886 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5887 }
5888 }
5889
5890 1 => {
5891 if let Some(value) = self.protocols.take() {
5892 ::fidl_next::wire::Envelope::encode_value::<
5893 crate::wire::NodeProtocolKinds,
5894 ___E,
5895 >(
5896 value, preallocated.encoder, &mut out, ()
5897 )?;
5898 } else {
5899 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5900 }
5901 }
5902
5903 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5904 }
5905 unsafe {
5906 preallocated.write_next(out.assume_init_ref());
5907 }
5908 }
5909
5910 ::fidl_next::wire::Table::encode_len(table, max_ord);
5911
5912 Ok(())
5913 }
5914 }
5915
5916 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
5917 for &'a ImmutableNodeAttributes
5918 where
5919 ___E: ::fidl_next::Encoder + ?Sized,
5920 {
5921 #[inline]
5922 fn encode(
5923 self,
5924 encoder: &mut ___E,
5925 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
5926 _: (),
5927 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5928 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
5929
5930 let max_ord = self.__max_ordinal();
5931
5932 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5933 ::fidl_next::Wire::zero_padding(&mut out);
5934
5935 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5936 ::fidl_next::wire::Envelope,
5937 >(encoder, max_ord);
5938
5939 for i in 1..=max_ord {
5940 match i {
5941 10 => {
5942 if let Some(value) = &self.verity_enabled {
5943 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5944 value,
5945 preallocated.encoder,
5946 &mut out,
5947 (),
5948 )?;
5949 } else {
5950 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5951 }
5952 }
5953
5954 9 => {
5955 if let Some(value) = &self.root_hash {
5956 ::fidl_next::wire::Envelope::encode_value::<
5957 ::fidl_next::wire::Vector<'static, u8>,
5958 ___E,
5959 >(
5960 value, preallocated.encoder, &mut out, (64, ())
5961 )?;
5962 } else {
5963 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5964 }
5965 }
5966
5967 8 => {
5968 if let Some(value) = &self.options {
5969 ::fidl_next::wire::Envelope::encode_value::<
5970 crate::wire::VerificationOptions<'static>,
5971 ___E,
5972 >(
5973 value, preallocated.encoder, &mut out, ()
5974 )?;
5975 } else {
5976 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5977 }
5978 }
5979
5980 7 => {
5981 if let Some(value) = &self.change_time {
5982 ::fidl_next::wire::Envelope::encode_value::<
5983 ::fidl_next::wire::Uint64,
5984 ___E,
5985 >(
5986 value, preallocated.encoder, &mut out, ()
5987 )?;
5988 } else {
5989 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5990 }
5991 }
5992
5993 6 => {
5994 if let Some(value) = &self.id {
5995 ::fidl_next::wire::Envelope::encode_value::<
5996 ::fidl_next::wire::Uint64,
5997 ___E,
5998 >(
5999 value, preallocated.encoder, &mut out, ()
6000 )?;
6001 } else {
6002 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6003 }
6004 }
6005
6006 5 => {
6007 if let Some(value) = &self.link_count {
6008 ::fidl_next::wire::Envelope::encode_value::<
6009 ::fidl_next::wire::Uint64,
6010 ___E,
6011 >(
6012 value, preallocated.encoder, &mut out, ()
6013 )?;
6014 } else {
6015 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6016 }
6017 }
6018
6019 4 => {
6020 if let Some(value) = &self.storage_size {
6021 ::fidl_next::wire::Envelope::encode_value::<
6022 ::fidl_next::wire::Uint64,
6023 ___E,
6024 >(
6025 value, preallocated.encoder, &mut out, ()
6026 )?;
6027 } else {
6028 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6029 }
6030 }
6031
6032 3 => {
6033 if let Some(value) = &self.content_size {
6034 ::fidl_next::wire::Envelope::encode_value::<
6035 ::fidl_next::wire::Uint64,
6036 ___E,
6037 >(
6038 value, preallocated.encoder, &mut out, ()
6039 )?;
6040 } else {
6041 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6042 }
6043 }
6044
6045 2 => {
6046 if let Some(value) = &self.abilities {
6047 ::fidl_next::wire::Envelope::encode_value::<
6048 crate::wire::Operations,
6049 ___E,
6050 >(
6051 value, preallocated.encoder, &mut out, ()
6052 )?;
6053 } else {
6054 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6055 }
6056 }
6057
6058 1 => {
6059 if let Some(value) = &self.protocols {
6060 ::fidl_next::wire::Envelope::encode_value::<
6061 crate::wire::NodeProtocolKinds,
6062 ___E,
6063 >(
6064 value, preallocated.encoder, &mut out, ()
6065 )?;
6066 } else {
6067 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6068 }
6069 }
6070
6071 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6072 }
6073 unsafe {
6074 preallocated.write_next(out.assume_init_ref());
6075 }
6076 }
6077
6078 ::fidl_next::wire::Table::encode_len(table, max_ord);
6079
6080 Ok(())
6081 }
6082 }
6083
6084 impl<'de> ::fidl_next::FromWire<crate::wire::ImmutableNodeAttributes<'de>>
6085 for ImmutableNodeAttributes
6086 {
6087 #[inline]
6088 fn from_wire(wire_: crate::wire::ImmutableNodeAttributes<'de>) -> Self {
6089 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6090
6091 let protocols = wire_.table.get(1);
6092
6093 let abilities = wire_.table.get(2);
6094
6095 let content_size = wire_.table.get(3);
6096
6097 let storage_size = wire_.table.get(4);
6098
6099 let link_count = wire_.table.get(5);
6100
6101 let id = wire_.table.get(6);
6102
6103 let change_time = wire_.table.get(7);
6104
6105 let options = wire_.table.get(8);
6106
6107 let root_hash = wire_.table.get(9);
6108
6109 let verity_enabled = wire_.table.get(10);
6110
6111 Self {
6112 protocols: protocols.map(|envelope| {
6113 ::fidl_next::FromWire::from_wire(unsafe {
6114 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
6115 })
6116 }),
6117
6118 abilities: abilities.map(|envelope| {
6119 ::fidl_next::FromWire::from_wire(unsafe {
6120 envelope.read_unchecked::<crate::wire::Operations>()
6121 })
6122 }),
6123
6124 content_size: content_size.map(|envelope| {
6125 ::fidl_next::FromWire::from_wire(unsafe {
6126 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6127 })
6128 }),
6129
6130 storage_size: storage_size.map(|envelope| {
6131 ::fidl_next::FromWire::from_wire(unsafe {
6132 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6133 })
6134 }),
6135
6136 link_count: link_count.map(|envelope| {
6137 ::fidl_next::FromWire::from_wire(unsafe {
6138 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6139 })
6140 }),
6141
6142 id: id.map(|envelope| {
6143 ::fidl_next::FromWire::from_wire(unsafe {
6144 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6145 })
6146 }),
6147
6148 change_time: change_time.map(|envelope| {
6149 ::fidl_next::FromWire::from_wire(unsafe {
6150 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6151 })
6152 }),
6153
6154 options: options.map(|envelope| {
6155 ::fidl_next::FromWire::from_wire(unsafe {
6156 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
6157 })
6158 }),
6159
6160 root_hash: root_hash.map(|envelope| {
6161 ::fidl_next::FromWire::from_wire(unsafe {
6162 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6163 })
6164 }),
6165
6166 verity_enabled: verity_enabled.map(|envelope| {
6167 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
6168 }),
6169 }
6170 }
6171 }
6172
6173 impl<'de> ::fidl_next::FromWireRef<crate::wire::ImmutableNodeAttributes<'de>>
6174 for ImmutableNodeAttributes
6175 {
6176 #[inline]
6177 fn from_wire_ref(wire: &crate::wire::ImmutableNodeAttributes<'de>) -> Self {
6178 Self {
6179 protocols: wire.table.get(1).map(|envelope| {
6180 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6181 envelope.deref_unchecked::<crate::wire::NodeProtocolKinds>()
6182 })
6183 }),
6184
6185 abilities: wire.table.get(2).map(|envelope| {
6186 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6187 envelope.deref_unchecked::<crate::wire::Operations>()
6188 })
6189 }),
6190
6191 content_size: wire.table.get(3).map(|envelope| {
6192 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6193 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6194 })
6195 }),
6196
6197 storage_size: wire.table.get(4).map(|envelope| {
6198 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6199 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6200 })
6201 }),
6202
6203 link_count: wire.table.get(5).map(|envelope| {
6204 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6205 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6206 })
6207 }),
6208
6209 id: wire.table.get(6).map(|envelope| {
6210 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6211 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6212 })
6213 }),
6214
6215 change_time: wire.table.get(7).map(|envelope| {
6216 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6217 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6218 })
6219 }),
6220
6221 options: wire.table.get(8).map(|envelope| {
6222 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6223 envelope.deref_unchecked::<crate::wire::VerificationOptions<'de>>()
6224 })
6225 }),
6226
6227 root_hash: wire.table.get(9).map(|envelope| {
6228 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6229 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6230 })
6231 }),
6232
6233 verity_enabled: wire.table.get(10).map(|envelope| {
6234 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6235 envelope.deref_unchecked::<bool>()
6236 })
6237 }),
6238 }
6239 }
6240 }
6241
6242 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6243 pub struct NodeAttributes2 {
6244 pub mutable_attributes: crate::natural::MutableNodeAttributes,
6245
6246 pub immutable_attributes: crate::natural::ImmutableNodeAttributes,
6247 }
6248
6249 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
6250 for NodeAttributes2
6251 where
6252 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6253 ___E: ::fidl_next::Encoder,
6254 {
6255 #[inline]
6256 fn encode(
6257 self,
6258 encoder_: &mut ___E,
6259 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
6260 _: (),
6261 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6262 ::fidl_next::munge! {
6263 let crate::wire::NodeAttributes2 {
6264 mutable_attributes,
6265 immutable_attributes,
6266
6267 } = out_;
6268 }
6269
6270 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
6271
6272 let mut _field =
6273 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
6274
6275 ::fidl_next::Encode::encode(
6276 self.immutable_attributes,
6277 encoder_,
6278 immutable_attributes,
6279 (),
6280 )?;
6281
6282 let mut _field =
6283 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
6284
6285 Ok(())
6286 }
6287 }
6288
6289 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
6290 for &'a NodeAttributes2
6291 where
6292 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6293 ___E: ::fidl_next::Encoder,
6294 {
6295 #[inline]
6296 fn encode(
6297 self,
6298 encoder_: &mut ___E,
6299 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
6300 _: (),
6301 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6302 ::fidl_next::munge! {
6303 let crate::wire::NodeAttributes2 {
6304 mutable_attributes,
6305 immutable_attributes,
6306
6307 } = out_;
6308 }
6309
6310 ::fidl_next::Encode::encode(
6311 &self.mutable_attributes,
6312 encoder_,
6313 mutable_attributes,
6314 (),
6315 )?;
6316
6317 let mut _field =
6318 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
6319
6320 ::fidl_next::Encode::encode(
6321 &self.immutable_attributes,
6322 encoder_,
6323 immutable_attributes,
6324 (),
6325 )?;
6326
6327 let mut _field =
6328 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
6329
6330 Ok(())
6331 }
6332 }
6333
6334 unsafe impl<___E>
6335 ::fidl_next::EncodeOption<
6336 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6337 ___E,
6338 > for NodeAttributes2
6339 where
6340 ___E: ::fidl_next::Encoder + ?Sized,
6341 NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
6342 {
6343 #[inline]
6344 fn encode_option(
6345 this: ::core::option::Option<Self>,
6346 encoder: &mut ___E,
6347 out: &mut ::core::mem::MaybeUninit<
6348 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6349 >,
6350 _: (),
6351 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6352 if let Some(inner) = this {
6353 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6354 ::fidl_next::wire::Box::encode_present(out);
6355 } else {
6356 ::fidl_next::wire::Box::encode_absent(out);
6357 }
6358
6359 Ok(())
6360 }
6361 }
6362
6363 unsafe impl<'a, ___E>
6364 ::fidl_next::EncodeOption<
6365 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6366 ___E,
6367 > for &'a NodeAttributes2
6368 where
6369 ___E: ::fidl_next::Encoder + ?Sized,
6370 &'a NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
6371 {
6372 #[inline]
6373 fn encode_option(
6374 this: ::core::option::Option<Self>,
6375 encoder: &mut ___E,
6376 out: &mut ::core::mem::MaybeUninit<
6377 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6378 >,
6379 _: (),
6380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6381 if let Some(inner) = this {
6382 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6383 ::fidl_next::wire::Box::encode_present(out);
6384 } else {
6385 ::fidl_next::wire::Box::encode_absent(out);
6386 }
6387
6388 Ok(())
6389 }
6390 }
6391
6392 impl<'de> ::fidl_next::FromWire<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
6393 #[inline]
6394 fn from_wire(wire: crate::wire::NodeAttributes2<'de>) -> Self {
6395 Self {
6396 mutable_attributes: ::fidl_next::FromWire::from_wire(wire.mutable_attributes),
6397
6398 immutable_attributes: ::fidl_next::FromWire::from_wire(wire.immutable_attributes),
6399 }
6400 }
6401 }
6402
6403 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
6404 #[inline]
6405 fn from_wire_ref(wire: &crate::wire::NodeAttributes2<'de>) -> Self {
6406 Self {
6407 mutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
6408 &wire.mutable_attributes,
6409 ),
6410
6411 immutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
6412 &wire.immutable_attributes,
6413 ),
6414 }
6415 }
6416 }
6417
6418 #[doc = " Information that describes the target node.\n"]
6419 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6420 pub struct NodeInfo {
6421 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6422 }
6423
6424 impl NodeInfo {
6425 fn __max_ordinal(&self) -> usize {
6426 if self.attributes.is_some() {
6427 return 1;
6428 }
6429
6430 0
6431 }
6432 }
6433
6434 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for NodeInfo
6435 where
6436 ___E: ::fidl_next::Encoder + ?Sized,
6437 {
6438 #[inline]
6439 fn encode(
6440 mut self,
6441 encoder: &mut ___E,
6442 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
6443 _: (),
6444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6445 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
6446
6447 let max_ord = self.__max_ordinal();
6448
6449 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6450 ::fidl_next::Wire::zero_padding(&mut out);
6451
6452 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6453 ::fidl_next::wire::Envelope,
6454 >(encoder, max_ord);
6455
6456 for i in 1..=max_ord {
6457 match i {
6458 1 => {
6459 if let Some(value) = self.attributes.take() {
6460 ::fidl_next::wire::Envelope::encode_value::<
6461 crate::wire::NodeAttributes2<'static>,
6462 ___E,
6463 >(
6464 value, preallocated.encoder, &mut out, ()
6465 )?;
6466 } else {
6467 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6468 }
6469 }
6470
6471 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6472 }
6473 unsafe {
6474 preallocated.write_next(out.assume_init_ref());
6475 }
6476 }
6477
6478 ::fidl_next::wire::Table::encode_len(table, max_ord);
6479
6480 Ok(())
6481 }
6482 }
6483
6484 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for &'a NodeInfo
6485 where
6486 ___E: ::fidl_next::Encoder + ?Sized,
6487 {
6488 #[inline]
6489 fn encode(
6490 self,
6491 encoder: &mut ___E,
6492 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
6493 _: (),
6494 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6495 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
6496
6497 let max_ord = self.__max_ordinal();
6498
6499 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6500 ::fidl_next::Wire::zero_padding(&mut out);
6501
6502 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6503 ::fidl_next::wire::Envelope,
6504 >(encoder, max_ord);
6505
6506 for i in 1..=max_ord {
6507 match i {
6508 1 => {
6509 if let Some(value) = &self.attributes {
6510 ::fidl_next::wire::Envelope::encode_value::<
6511 crate::wire::NodeAttributes2<'static>,
6512 ___E,
6513 >(
6514 value, preallocated.encoder, &mut out, ()
6515 )?;
6516 } else {
6517 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6518 }
6519 }
6520
6521 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6522 }
6523 unsafe {
6524 preallocated.write_next(out.assume_init_ref());
6525 }
6526 }
6527
6528 ::fidl_next::wire::Table::encode_len(table, max_ord);
6529
6530 Ok(())
6531 }
6532 }
6533
6534 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfo<'de>> for NodeInfo {
6535 #[inline]
6536 fn from_wire(wire_: crate::wire::NodeInfo<'de>) -> Self {
6537 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6538
6539 let attributes = wire_.table.get(1);
6540
6541 Self {
6542 attributes: attributes.map(|envelope| {
6543 ::fidl_next::FromWire::from_wire(unsafe {
6544 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6545 })
6546 }),
6547 }
6548 }
6549 }
6550
6551 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeInfo<'de>> for NodeInfo {
6552 #[inline]
6553 fn from_wire_ref(wire: &crate::wire::NodeInfo<'de>) -> Self {
6554 Self {
6555 attributes: wire.table.get(1).map(|envelope| {
6556 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6557 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6558 })
6559 }),
6560 }
6561 }
6562 }
6563
6564 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6565 pub struct DirectoryInfo {
6566 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6567 }
6568
6569 impl DirectoryInfo {
6570 fn __max_ordinal(&self) -> usize {
6571 if self.attributes.is_some() {
6572 return 1;
6573 }
6574
6575 0
6576 }
6577 }
6578
6579 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E> for DirectoryInfo
6580 where
6581 ___E: ::fidl_next::Encoder + ?Sized,
6582 {
6583 #[inline]
6584 fn encode(
6585 mut self,
6586 encoder: &mut ___E,
6587 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
6588 _: (),
6589 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6590 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
6591
6592 let max_ord = self.__max_ordinal();
6593
6594 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6595 ::fidl_next::Wire::zero_padding(&mut out);
6596
6597 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6598 ::fidl_next::wire::Envelope,
6599 >(encoder, max_ord);
6600
6601 for i in 1..=max_ord {
6602 match i {
6603 1 => {
6604 if let Some(value) = self.attributes.take() {
6605 ::fidl_next::wire::Envelope::encode_value::<
6606 crate::wire::NodeAttributes2<'static>,
6607 ___E,
6608 >(
6609 value, preallocated.encoder, &mut out, ()
6610 )?;
6611 } else {
6612 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6613 }
6614 }
6615
6616 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6617 }
6618 unsafe {
6619 preallocated.write_next(out.assume_init_ref());
6620 }
6621 }
6622
6623 ::fidl_next::wire::Table::encode_len(table, max_ord);
6624
6625 Ok(())
6626 }
6627 }
6628
6629 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E>
6630 for &'a DirectoryInfo
6631 where
6632 ___E: ::fidl_next::Encoder + ?Sized,
6633 {
6634 #[inline]
6635 fn encode(
6636 self,
6637 encoder: &mut ___E,
6638 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
6639 _: (),
6640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6641 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
6642
6643 let max_ord = self.__max_ordinal();
6644
6645 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6646 ::fidl_next::Wire::zero_padding(&mut out);
6647
6648 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6649 ::fidl_next::wire::Envelope,
6650 >(encoder, max_ord);
6651
6652 for i in 1..=max_ord {
6653 match i {
6654 1 => {
6655 if let Some(value) = &self.attributes {
6656 ::fidl_next::wire::Envelope::encode_value::<
6657 crate::wire::NodeAttributes2<'static>,
6658 ___E,
6659 >(
6660 value, preallocated.encoder, &mut out, ()
6661 )?;
6662 } else {
6663 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6664 }
6665 }
6666
6667 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6668 }
6669 unsafe {
6670 preallocated.write_next(out.assume_init_ref());
6671 }
6672 }
6673
6674 ::fidl_next::wire::Table::encode_len(table, max_ord);
6675
6676 Ok(())
6677 }
6678 }
6679
6680 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
6681 #[inline]
6682 fn from_wire(wire_: crate::wire::DirectoryInfo<'de>) -> Self {
6683 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6684
6685 let attributes = wire_.table.get(1);
6686
6687 Self {
6688 attributes: attributes.map(|envelope| {
6689 ::fidl_next::FromWire::from_wire(unsafe {
6690 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6691 })
6692 }),
6693 }
6694 }
6695 }
6696
6697 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
6698 #[inline]
6699 fn from_wire_ref(wire: &crate::wire::DirectoryInfo<'de>) -> Self {
6700 Self {
6701 attributes: wire.table.get(1).map(|envelope| {
6702 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6703 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6704 })
6705 }),
6706 }
6707 }
6708 }
6709
6710 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6711 pub struct SymlinkInfo {
6712 pub target: ::core::option::Option<::std::vec::Vec<u8>>,
6713
6714 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6715 }
6716
6717 impl SymlinkInfo {
6718 fn __max_ordinal(&self) -> usize {
6719 if self.attributes.is_some() {
6720 return 2;
6721 }
6722
6723 if self.target.is_some() {
6724 return 1;
6725 }
6726
6727 0
6728 }
6729 }
6730
6731 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E> for SymlinkInfo
6732 where
6733 ___E: ::fidl_next::Encoder + ?Sized,
6734 {
6735 #[inline]
6736 fn encode(
6737 mut self,
6738 encoder: &mut ___E,
6739 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
6740 _: (),
6741 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6742 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
6743
6744 let max_ord = self.__max_ordinal();
6745
6746 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6747 ::fidl_next::Wire::zero_padding(&mut out);
6748
6749 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6750 ::fidl_next::wire::Envelope,
6751 >(encoder, max_ord);
6752
6753 for i in 1..=max_ord {
6754 match i {
6755 2 => {
6756 if let Some(value) = self.attributes.take() {
6757 ::fidl_next::wire::Envelope::encode_value::<
6758 crate::wire::NodeAttributes2<'static>,
6759 ___E,
6760 >(
6761 value, preallocated.encoder, &mut out, ()
6762 )?;
6763 } else {
6764 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6765 }
6766 }
6767
6768 1 => {
6769 if let Some(value) = self.target.take() {
6770 ::fidl_next::wire::Envelope::encode_value::<
6771 ::fidl_next::wire::Vector<'static, u8>,
6772 ___E,
6773 >(
6774 value, preallocated.encoder, &mut out, (4095, ())
6775 )?;
6776 } else {
6777 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6778 }
6779 }
6780
6781 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6782 }
6783 unsafe {
6784 preallocated.write_next(out.assume_init_ref());
6785 }
6786 }
6787
6788 ::fidl_next::wire::Table::encode_len(table, max_ord);
6789
6790 Ok(())
6791 }
6792 }
6793
6794 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E>
6795 for &'a SymlinkInfo
6796 where
6797 ___E: ::fidl_next::Encoder + ?Sized,
6798 {
6799 #[inline]
6800 fn encode(
6801 self,
6802 encoder: &mut ___E,
6803 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
6804 _: (),
6805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6806 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
6807
6808 let max_ord = self.__max_ordinal();
6809
6810 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6811 ::fidl_next::Wire::zero_padding(&mut out);
6812
6813 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6814 ::fidl_next::wire::Envelope,
6815 >(encoder, max_ord);
6816
6817 for i in 1..=max_ord {
6818 match i {
6819 2 => {
6820 if let Some(value) = &self.attributes {
6821 ::fidl_next::wire::Envelope::encode_value::<
6822 crate::wire::NodeAttributes2<'static>,
6823 ___E,
6824 >(
6825 value, preallocated.encoder, &mut out, ()
6826 )?;
6827 } else {
6828 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6829 }
6830 }
6831
6832 1 => {
6833 if let Some(value) = &self.target {
6834 ::fidl_next::wire::Envelope::encode_value::<
6835 ::fidl_next::wire::Vector<'static, u8>,
6836 ___E,
6837 >(
6838 value, preallocated.encoder, &mut out, (4095, ())
6839 )?;
6840 } else {
6841 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6842 }
6843 }
6844
6845 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6846 }
6847 unsafe {
6848 preallocated.write_next(out.assume_init_ref());
6849 }
6850 }
6851
6852 ::fidl_next::wire::Table::encode_len(table, max_ord);
6853
6854 Ok(())
6855 }
6856 }
6857
6858 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
6859 #[inline]
6860 fn from_wire(wire_: crate::wire::SymlinkInfo<'de>) -> Self {
6861 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6862
6863 let target = wire_.table.get(1);
6864
6865 let attributes = wire_.table.get(2);
6866
6867 Self {
6868 target: target.map(|envelope| {
6869 ::fidl_next::FromWire::from_wire(unsafe {
6870 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6871 })
6872 }),
6873
6874 attributes: attributes.map(|envelope| {
6875 ::fidl_next::FromWire::from_wire(unsafe {
6876 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6877 })
6878 }),
6879 }
6880 }
6881 }
6882
6883 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
6884 #[inline]
6885 fn from_wire_ref(wire: &crate::wire::SymlinkInfo<'de>) -> Self {
6886 Self {
6887 target: wire.table.get(1).map(|envelope| {
6888 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6889 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6890 })
6891 }),
6892
6893 attributes: wire.table.get(2).map(|envelope| {
6894 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6895 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6896 })
6897 }),
6898 }
6899 }
6900 }
6901
6902 ::fidl_next::bitflags::bitflags! {
6903 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct NodeAttributesQuery: u64 {
6904 #[doc = " Requests [`NodeAttributes.protocols`].\n"]const PROTOCOLS = 1;
6905 #[doc = " Requests [`NodeAttributes.abilities`].\n"]const ABILITIES = 2;
6906 #[doc = " Requests [`NodeAttributes.content_size`].\n"]const CONTENT_SIZE = 4;
6907 #[doc = " Requests [`NodeAttributes.storage_size`].\n"]const STORAGE_SIZE = 8;
6908 #[doc = " Requests [`NodeAttributes.link_count`].\n"]const LINK_COUNT = 16;
6909 #[doc = " Requests [`NodeAttributes.id`].\n"]const ID = 32;
6910 #[doc = " Requests [`NodeAttributes.creation_time`].\n"]const CREATION_TIME = 64;
6911 #[doc = " Requests [`NodeAttributes.modification_time`].\n"]const MODIFICATION_TIME = 128;
6912 #[doc = " Posix attributes.\n"]const MODE = 256;
6913 const UID = 512;
6914 const GID = 1024;
6915 const RDEV = 2048;
6916 const ACCESS_TIME = 4096;
6917 const CHANGE_TIME = 8192;
6918 #[doc = " Verity attributes.\n"]const OPTIONS = 16384;
6919 const ROOT_HASH = 32768;
6920 const VERITY_ENABLED = 65536;
6921 #[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;
6922 #[doc = " Requests [`MutableNodeAttributes.selinux_context`]. See that field for more detail.\n"]const SELINUX_CONTEXT = 262144;
6923 #[doc = " fscrypt attribute.\n"]const WRAPPING_KEY_ID = 524288;
6924 #[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;
6925 const _ = !0;
6926 }
6927 }
6928
6929 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
6930 for NodeAttributesQuery
6931 where
6932 ___E: ?Sized,
6933 {
6934 #[inline]
6935 fn encode(
6936 self,
6937 encoder: &mut ___E,
6938 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
6939 _: (),
6940 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6941 ::fidl_next::Encode::encode(&self, encoder, out, ())
6942 }
6943 }
6944
6945 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
6946 for &'a NodeAttributesQuery
6947 where
6948 ___E: ?Sized,
6949 {
6950 #[inline]
6951 fn encode(
6952 self,
6953 _: &mut ___E,
6954 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
6955 _: (),
6956 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6957 ::fidl_next::munge!(let crate::wire::NodeAttributesQuery { value } = out);
6958
6959 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
6960 Ok(())
6961 }
6962 }
6963
6964 impl ::core::convert::From<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
6965 fn from(wire: crate::wire::NodeAttributesQuery) -> Self {
6966 Self::from_bits_retain(u64::from(wire.value))
6967 }
6968 }
6969
6970 impl ::fidl_next::FromWire<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
6971 #[inline]
6972 fn from_wire(wire: crate::wire::NodeAttributesQuery) -> Self {
6973 Self::from(wire)
6974 }
6975 }
6976
6977 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
6978 #[inline]
6979 fn from_wire_ref(wire: &crate::wire::NodeAttributesQuery) -> Self {
6980 Self::from(*wire)
6981 }
6982 }
6983
6984 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6985 #[repr(C)]
6986 pub struct NodeGetAttributesRequest {
6987 pub query: crate::natural::NodeAttributesQuery,
6988 }
6989
6990 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
6991 for NodeGetAttributesRequest
6992 where
6993 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6994 {
6995 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6996 Self,
6997 crate::wire::NodeGetAttributesRequest,
6998 > = unsafe {
6999 ::fidl_next::CopyOptimization::enable_if(
7000 true && <crate::natural::NodeAttributesQuery as ::fidl_next::Encode<
7001 crate::wire::NodeAttributesQuery,
7002 ___E,
7003 >>::COPY_OPTIMIZATION
7004 .is_enabled(),
7005 )
7006 };
7007
7008 #[inline]
7009 fn encode(
7010 self,
7011 encoder_: &mut ___E,
7012 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
7013 _: (),
7014 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7015 ::fidl_next::munge! {
7016 let crate::wire::NodeGetAttributesRequest {
7017 query,
7018
7019 } = out_;
7020 }
7021
7022 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
7023
7024 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
7025
7026 Ok(())
7027 }
7028 }
7029
7030 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
7031 for &'a NodeGetAttributesRequest
7032 where
7033 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7034 {
7035 #[inline]
7036 fn encode(
7037 self,
7038 encoder_: &mut ___E,
7039 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
7040 _: (),
7041 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7042 ::fidl_next::munge! {
7043 let crate::wire::NodeGetAttributesRequest {
7044 query,
7045
7046 } = out_;
7047 }
7048
7049 ::fidl_next::Encode::encode(&self.query, encoder_, query, ())?;
7050
7051 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
7052
7053 Ok(())
7054 }
7055 }
7056
7057 unsafe impl<___E>
7058 ::fidl_next::EncodeOption<
7059 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7060 ___E,
7061 > for NodeGetAttributesRequest
7062 where
7063 ___E: ::fidl_next::Encoder + ?Sized,
7064 NodeGetAttributesRequest: ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
7065 {
7066 #[inline]
7067 fn encode_option(
7068 this: ::core::option::Option<Self>,
7069 encoder: &mut ___E,
7070 out: &mut ::core::mem::MaybeUninit<
7071 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7072 >,
7073 _: (),
7074 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7075 if let Some(inner) = this {
7076 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7077 ::fidl_next::wire::Box::encode_present(out);
7078 } else {
7079 ::fidl_next::wire::Box::encode_absent(out);
7080 }
7081
7082 Ok(())
7083 }
7084 }
7085
7086 unsafe impl<'a, ___E>
7087 ::fidl_next::EncodeOption<
7088 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7089 ___E,
7090 > for &'a NodeGetAttributesRequest
7091 where
7092 ___E: ::fidl_next::Encoder + ?Sized,
7093 &'a NodeGetAttributesRequest:
7094 ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
7095 {
7096 #[inline]
7097 fn encode_option(
7098 this: ::core::option::Option<Self>,
7099 encoder: &mut ___E,
7100 out: &mut ::core::mem::MaybeUninit<
7101 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7102 >,
7103 _: (),
7104 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7105 if let Some(inner) = this {
7106 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7107 ::fidl_next::wire::Box::encode_present(out);
7108 } else {
7109 ::fidl_next::wire::Box::encode_absent(out);
7110 }
7111
7112 Ok(())
7113 }
7114 }
7115
7116 impl ::fidl_next::FromWire<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
7117 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7118 crate::wire::NodeGetAttributesRequest,
7119 Self,
7120 > = unsafe {
7121 ::fidl_next::CopyOptimization::enable_if(
7122 true && <crate::natural::NodeAttributesQuery as ::fidl_next::FromWire<
7123 crate::wire::NodeAttributesQuery,
7124 >>::COPY_OPTIMIZATION
7125 .is_enabled(),
7126 )
7127 };
7128
7129 #[inline]
7130 fn from_wire(wire: crate::wire::NodeGetAttributesRequest) -> Self {
7131 Self { query: ::fidl_next::FromWire::from_wire(wire.query) }
7132 }
7133 }
7134
7135 impl ::fidl_next::FromWireRef<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
7136 #[inline]
7137 fn from_wire_ref(wire: &crate::wire::NodeGetAttributesRequest) -> Self {
7138 Self { query: ::fidl_next::FromWireRef::from_wire_ref(&wire.query) }
7139 }
7140 }
7141
7142 #[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"]
7143 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7144 pub struct Options {
7145 pub attributes: ::core::option::Option<crate::natural::NodeAttributesQuery>,
7146
7147 pub create_attributes: ::core::option::Option<crate::natural::MutableNodeAttributes>,
7148 }
7149
7150 impl Options {
7151 fn __max_ordinal(&self) -> usize {
7152 if self.create_attributes.is_some() {
7153 return 2;
7154 }
7155
7156 if self.attributes.is_some() {
7157 return 1;
7158 }
7159
7160 0
7161 }
7162 }
7163
7164 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for Options
7165 where
7166 ___E: ::fidl_next::Encoder + ?Sized,
7167 {
7168 #[inline]
7169 fn encode(
7170 mut self,
7171 encoder: &mut ___E,
7172 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
7173 _: (),
7174 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7175 ::fidl_next::munge!(let crate::wire::Options { table } = out);
7176
7177 let max_ord = self.__max_ordinal();
7178
7179 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7180 ::fidl_next::Wire::zero_padding(&mut out);
7181
7182 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7183 ::fidl_next::wire::Envelope,
7184 >(encoder, max_ord);
7185
7186 for i in 1..=max_ord {
7187 match i {
7188 2 => {
7189 if let Some(value) = self.create_attributes.take() {
7190 ::fidl_next::wire::Envelope::encode_value::<
7191 crate::wire::MutableNodeAttributes<'static>,
7192 ___E,
7193 >(
7194 value, preallocated.encoder, &mut out, ()
7195 )?;
7196 } else {
7197 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7198 }
7199 }
7200
7201 1 => {
7202 if let Some(value) = self.attributes.take() {
7203 ::fidl_next::wire::Envelope::encode_value::<
7204 crate::wire::NodeAttributesQuery,
7205 ___E,
7206 >(
7207 value, preallocated.encoder, &mut out, ()
7208 )?;
7209 } else {
7210 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7211 }
7212 }
7213
7214 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7215 }
7216 unsafe {
7217 preallocated.write_next(out.assume_init_ref());
7218 }
7219 }
7220
7221 ::fidl_next::wire::Table::encode_len(table, max_ord);
7222
7223 Ok(())
7224 }
7225 }
7226
7227 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for &'a Options
7228 where
7229 ___E: ::fidl_next::Encoder + ?Sized,
7230 {
7231 #[inline]
7232 fn encode(
7233 self,
7234 encoder: &mut ___E,
7235 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
7236 _: (),
7237 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7238 ::fidl_next::munge!(let crate::wire::Options { table } = out);
7239
7240 let max_ord = self.__max_ordinal();
7241
7242 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7243 ::fidl_next::Wire::zero_padding(&mut out);
7244
7245 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7246 ::fidl_next::wire::Envelope,
7247 >(encoder, max_ord);
7248
7249 for i in 1..=max_ord {
7250 match i {
7251 2 => {
7252 if let Some(value) = &self.create_attributes {
7253 ::fidl_next::wire::Envelope::encode_value::<
7254 crate::wire::MutableNodeAttributes<'static>,
7255 ___E,
7256 >(
7257 value, preallocated.encoder, &mut out, ()
7258 )?;
7259 } else {
7260 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7261 }
7262 }
7263
7264 1 => {
7265 if let Some(value) = &self.attributes {
7266 ::fidl_next::wire::Envelope::encode_value::<
7267 crate::wire::NodeAttributesQuery,
7268 ___E,
7269 >(
7270 value, preallocated.encoder, &mut out, ()
7271 )?;
7272 } else {
7273 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7274 }
7275 }
7276
7277 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7278 }
7279 unsafe {
7280 preallocated.write_next(out.assume_init_ref());
7281 }
7282 }
7283
7284 ::fidl_next::wire::Table::encode_len(table, max_ord);
7285
7286 Ok(())
7287 }
7288 }
7289
7290 impl<'de> ::fidl_next::FromWire<crate::wire::Options<'de>> for Options {
7291 #[inline]
7292 fn from_wire(wire_: crate::wire::Options<'de>) -> Self {
7293 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7294
7295 let attributes = wire_.table.get(1);
7296
7297 let create_attributes = wire_.table.get(2);
7298
7299 Self {
7300 attributes: attributes.map(|envelope| {
7301 ::fidl_next::FromWire::from_wire(unsafe {
7302 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
7303 })
7304 }),
7305
7306 create_attributes: create_attributes.map(|envelope| {
7307 ::fidl_next::FromWire::from_wire(unsafe {
7308 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
7309 })
7310 }),
7311 }
7312 }
7313 }
7314
7315 impl<'de> ::fidl_next::FromWireRef<crate::wire::Options<'de>> for Options {
7316 #[inline]
7317 fn from_wire_ref(wire: &crate::wire::Options<'de>) -> Self {
7318 Self {
7319 attributes: wire.table.get(1).map(|envelope| {
7320 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7321 envelope.deref_unchecked::<crate::wire::NodeAttributesQuery>()
7322 })
7323 }),
7324
7325 create_attributes: wire.table.get(2).map(|envelope| {
7326 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7327 envelope.deref_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
7328 })
7329 }),
7330 }
7331 }
7332 }
7333
7334 pub type DirectoryObject = ();
7335
7336 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7337 #[repr(u8)]
7338 pub enum DirentType {
7339 Unknown = 0,
7340 Directory = 4,
7341 BlockDevice = 6,
7342 File = 8,
7343 Symlink = 10,
7344 Service = 16,
7345 UnknownOrdinal_(u8) = 17,
7346 }
7347 impl ::std::convert::From<u8> for DirentType {
7348 fn from(value: u8) -> Self {
7349 match value {
7350 0 => Self::Unknown,
7351 4 => Self::Directory,
7352 6 => Self::BlockDevice,
7353 8 => Self::File,
7354 10 => Self::Symlink,
7355 16 => Self::Service,
7356
7357 _ => Self::UnknownOrdinal_(value),
7358 }
7359 }
7360 }
7361
7362 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for DirentType
7363 where
7364 ___E: ?Sized,
7365 {
7366 #[inline]
7367 fn encode(
7368 self,
7369 encoder: &mut ___E,
7370 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
7371 _: (),
7372 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7373 ::fidl_next::Encode::encode(&self, encoder, out, ())
7374 }
7375 }
7376
7377 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for &'a DirentType
7378 where
7379 ___E: ?Sized,
7380 {
7381 #[inline]
7382 fn encode(
7383 self,
7384 encoder: &mut ___E,
7385 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
7386 _: (),
7387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7388 ::fidl_next::munge!(let crate::wire::DirentType { value } = out);
7389 let _ = value.write(u8::from(match *self {
7390 DirentType::Unknown => 0,
7391
7392 DirentType::Directory => 4,
7393
7394 DirentType::BlockDevice => 6,
7395
7396 DirentType::File => 8,
7397
7398 DirentType::Symlink => 10,
7399
7400 DirentType::Service => 16,
7401
7402 DirentType::UnknownOrdinal_(value) => value,
7403 }));
7404
7405 Ok(())
7406 }
7407 }
7408
7409 impl ::core::convert::From<crate::wire::DirentType> for DirentType {
7410 fn from(wire: crate::wire::DirentType) -> Self {
7411 match u8::from(wire.value) {
7412 0 => Self::Unknown,
7413
7414 4 => Self::Directory,
7415
7416 6 => Self::BlockDevice,
7417
7418 8 => Self::File,
7419
7420 10 => Self::Symlink,
7421
7422 16 => Self::Service,
7423
7424 value => Self::UnknownOrdinal_(value),
7425 }
7426 }
7427 }
7428
7429 impl ::fidl_next::FromWire<crate::wire::DirentType> for DirentType {
7430 #[inline]
7431 fn from_wire(wire: crate::wire::DirentType) -> Self {
7432 Self::from(wire)
7433 }
7434 }
7435
7436 impl ::fidl_next::FromWireRef<crate::wire::DirentType> for DirentType {
7437 #[inline]
7438 fn from_wire_ref(wire: &crate::wire::DirentType) -> Self {
7439 Self::from(*wire)
7440 }
7441 }
7442
7443 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7444 pub struct ExtendedAttributeIteratorGetNextResponse {
7445 pub attributes: ::std::vec::Vec<::std::vec::Vec<u8>>,
7446
7447 pub last: bool,
7448 }
7449
7450 unsafe impl<___E>
7451 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
7452 for ExtendedAttributeIteratorGetNextResponse
7453 where
7454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7455 ___E: ::fidl_next::Encoder,
7456 {
7457 #[inline]
7458 fn encode(
7459 self,
7460 encoder_: &mut ___E,
7461 out_: &mut ::core::mem::MaybeUninit<
7462 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7463 >,
7464 _: (),
7465 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7466 ::fidl_next::munge! {
7467 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
7468 attributes,
7469 last,
7470
7471 } = out_;
7472 }
7473
7474 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
7475
7476 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
7477 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
7478
7479 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
7480
7481 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
7482
7483 Ok(())
7484 }
7485 }
7486
7487 unsafe impl<'a, ___E>
7488 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
7489 for &'a ExtendedAttributeIteratorGetNextResponse
7490 where
7491 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7492 ___E: ::fidl_next::Encoder,
7493 {
7494 #[inline]
7495 fn encode(
7496 self,
7497 encoder_: &mut ___E,
7498 out_: &mut ::core::mem::MaybeUninit<
7499 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7500 >,
7501 _: (),
7502 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7503 ::fidl_next::munge! {
7504 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
7505 attributes,
7506 last,
7507
7508 } = out_;
7509 }
7510
7511 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, (128, (255, ())))?;
7512
7513 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
7514 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
7515
7516 ::fidl_next::Encode::encode(&self.last, encoder_, last, ())?;
7517
7518 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
7519
7520 Ok(())
7521 }
7522 }
7523
7524 unsafe impl<___E>
7525 ::fidl_next::EncodeOption<
7526 ::fidl_next::wire::Box<
7527 'static,
7528 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7529 >,
7530 ___E,
7531 > for ExtendedAttributeIteratorGetNextResponse
7532 where
7533 ___E: ::fidl_next::Encoder + ?Sized,
7534 ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
7535 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7536 ___E,
7537 >,
7538 {
7539 #[inline]
7540 fn encode_option(
7541 this: ::core::option::Option<Self>,
7542 encoder: &mut ___E,
7543 out: &mut ::core::mem::MaybeUninit<
7544 ::fidl_next::wire::Box<
7545 'static,
7546 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7547 >,
7548 >,
7549 _: (),
7550 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7551 if let Some(inner) = this {
7552 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7553 ::fidl_next::wire::Box::encode_present(out);
7554 } else {
7555 ::fidl_next::wire::Box::encode_absent(out);
7556 }
7557
7558 Ok(())
7559 }
7560 }
7561
7562 unsafe impl<'a, ___E>
7563 ::fidl_next::EncodeOption<
7564 ::fidl_next::wire::Box<
7565 'static,
7566 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7567 >,
7568 ___E,
7569 > for &'a ExtendedAttributeIteratorGetNextResponse
7570 where
7571 ___E: ::fidl_next::Encoder + ?Sized,
7572 &'a ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
7573 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7574 ___E,
7575 >,
7576 {
7577 #[inline]
7578 fn encode_option(
7579 this: ::core::option::Option<Self>,
7580 encoder: &mut ___E,
7581 out: &mut ::core::mem::MaybeUninit<
7582 ::fidl_next::wire::Box<
7583 'static,
7584 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7585 >,
7586 >,
7587 _: (),
7588 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7589 if let Some(inner) = this {
7590 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7591 ::fidl_next::wire::Box::encode_present(out);
7592 } else {
7593 ::fidl_next::wire::Box::encode_absent(out);
7594 }
7595
7596 Ok(())
7597 }
7598 }
7599
7600 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
7601 for ExtendedAttributeIteratorGetNextResponse
7602 {
7603 #[inline]
7604 fn from_wire(wire: crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>) -> Self {
7605 Self {
7606 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
7607
7608 last: ::fidl_next::FromWire::from_wire(wire.last),
7609 }
7610 }
7611 }
7612
7613 impl<'de> ::fidl_next::FromWireRef<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
7614 for ExtendedAttributeIteratorGetNextResponse
7615 {
7616 #[inline]
7617 fn from_wire_ref(
7618 wire: &crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>,
7619 ) -> Self {
7620 Self {
7621 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
7622
7623 last: ::fidl_next::FromWireRef::from_wire_ref(&wire.last),
7624 }
7625 }
7626 }
7627
7628 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7629 #[repr(C)]
7630 pub struct ReadableReadRequest {
7631 pub count: u64,
7632 }
7633
7634 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
7635 for ReadableReadRequest
7636 where
7637 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7638 {
7639 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7640 Self,
7641 crate::wire::ReadableReadRequest,
7642 > = unsafe {
7643 ::fidl_next::CopyOptimization::enable_if(
7644 true
7645
7646 && <
7647 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
7648 >::COPY_OPTIMIZATION.is_enabled()
7649
7650 )
7651 };
7652
7653 #[inline]
7654 fn encode(
7655 self,
7656 encoder_: &mut ___E,
7657 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
7658 _: (),
7659 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7660 ::fidl_next::munge! {
7661 let crate::wire::ReadableReadRequest {
7662 count,
7663
7664 } = out_;
7665 }
7666
7667 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
7668
7669 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
7670
7671 Ok(())
7672 }
7673 }
7674
7675 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
7676 for &'a ReadableReadRequest
7677 where
7678 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7679 {
7680 #[inline]
7681 fn encode(
7682 self,
7683 encoder_: &mut ___E,
7684 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
7685 _: (),
7686 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7687 ::fidl_next::munge! {
7688 let crate::wire::ReadableReadRequest {
7689 count,
7690
7691 } = out_;
7692 }
7693
7694 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
7695
7696 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
7697
7698 Ok(())
7699 }
7700 }
7701
7702 unsafe impl<___E>
7703 ::fidl_next::EncodeOption<
7704 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7705 ___E,
7706 > for ReadableReadRequest
7707 where
7708 ___E: ::fidl_next::Encoder + ?Sized,
7709 ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
7710 {
7711 #[inline]
7712 fn encode_option(
7713 this: ::core::option::Option<Self>,
7714 encoder: &mut ___E,
7715 out: &mut ::core::mem::MaybeUninit<
7716 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7717 >,
7718 _: (),
7719 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7720 if let Some(inner) = this {
7721 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7722 ::fidl_next::wire::Box::encode_present(out);
7723 } else {
7724 ::fidl_next::wire::Box::encode_absent(out);
7725 }
7726
7727 Ok(())
7728 }
7729 }
7730
7731 unsafe impl<'a, ___E>
7732 ::fidl_next::EncodeOption<
7733 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7734 ___E,
7735 > for &'a ReadableReadRequest
7736 where
7737 ___E: ::fidl_next::Encoder + ?Sized,
7738 &'a ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
7739 {
7740 #[inline]
7741 fn encode_option(
7742 this: ::core::option::Option<Self>,
7743 encoder: &mut ___E,
7744 out: &mut ::core::mem::MaybeUninit<
7745 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7746 >,
7747 _: (),
7748 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7749 if let Some(inner) = this {
7750 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7751 ::fidl_next::wire::Box::encode_present(out);
7752 } else {
7753 ::fidl_next::wire::Box::encode_absent(out);
7754 }
7755
7756 Ok(())
7757 }
7758 }
7759
7760 impl ::fidl_next::FromWire<crate::wire::ReadableReadRequest> for ReadableReadRequest {
7761 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7762 crate::wire::ReadableReadRequest,
7763 Self,
7764 > = unsafe {
7765 ::fidl_next::CopyOptimization::enable_if(
7766 true
7767 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
7768 .is_enabled(),
7769 )
7770 };
7771
7772 #[inline]
7773 fn from_wire(wire: crate::wire::ReadableReadRequest) -> Self {
7774 Self { count: ::fidl_next::FromWire::from_wire(wire.count) }
7775 }
7776 }
7777
7778 impl ::fidl_next::FromWireRef<crate::wire::ReadableReadRequest> for ReadableReadRequest {
7779 #[inline]
7780 fn from_wire_ref(wire: &crate::wire::ReadableReadRequest) -> Self {
7781 Self { count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count) }
7782 }
7783 }
7784
7785 #[doc = " The byte vector type used for read/write operations.\n"]
7786 pub type Transfer = ::std::vec::Vec<u8>;
7787
7788 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7789 pub struct ReadableReadResponse {
7790 pub data: ::std::vec::Vec<u8>,
7791 }
7792
7793 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
7794 for ReadableReadResponse
7795 where
7796 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7797 ___E: ::fidl_next::Encoder,
7798 {
7799 #[inline]
7800 fn encode(
7801 self,
7802 encoder_: &mut ___E,
7803 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
7804 _: (),
7805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7806 ::fidl_next::munge! {
7807 let crate::wire::ReadableReadResponse {
7808 data,
7809
7810 } = out_;
7811 }
7812
7813 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
7814
7815 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
7816 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
7817
7818 Ok(())
7819 }
7820 }
7821
7822 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
7823 for &'a ReadableReadResponse
7824 where
7825 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7826 ___E: ::fidl_next::Encoder,
7827 {
7828 #[inline]
7829 fn encode(
7830 self,
7831 encoder_: &mut ___E,
7832 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
7833 _: (),
7834 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7835 ::fidl_next::munge! {
7836 let crate::wire::ReadableReadResponse {
7837 data,
7838
7839 } = out_;
7840 }
7841
7842 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
7843
7844 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
7845 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
7846
7847 Ok(())
7848 }
7849 }
7850
7851 unsafe impl<___E>
7852 ::fidl_next::EncodeOption<
7853 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7854 ___E,
7855 > for ReadableReadResponse
7856 where
7857 ___E: ::fidl_next::Encoder + ?Sized,
7858 ReadableReadResponse: ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
7859 {
7860 #[inline]
7861 fn encode_option(
7862 this: ::core::option::Option<Self>,
7863 encoder: &mut ___E,
7864 out: &mut ::core::mem::MaybeUninit<
7865 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7866 >,
7867 _: (),
7868 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7869 if let Some(inner) = this {
7870 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7871 ::fidl_next::wire::Box::encode_present(out);
7872 } else {
7873 ::fidl_next::wire::Box::encode_absent(out);
7874 }
7875
7876 Ok(())
7877 }
7878 }
7879
7880 unsafe impl<'a, ___E>
7881 ::fidl_next::EncodeOption<
7882 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7883 ___E,
7884 > for &'a ReadableReadResponse
7885 where
7886 ___E: ::fidl_next::Encoder + ?Sized,
7887 &'a ReadableReadResponse:
7888 ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
7889 {
7890 #[inline]
7891 fn encode_option(
7892 this: ::core::option::Option<Self>,
7893 encoder: &mut ___E,
7894 out: &mut ::core::mem::MaybeUninit<
7895 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7896 >,
7897 _: (),
7898 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7899 if let Some(inner) = this {
7900 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7901 ::fidl_next::wire::Box::encode_present(out);
7902 } else {
7903 ::fidl_next::wire::Box::encode_absent(out);
7904 }
7905
7906 Ok(())
7907 }
7908 }
7909
7910 impl<'de> ::fidl_next::FromWire<crate::wire::ReadableReadResponse<'de>> for ReadableReadResponse {
7911 #[inline]
7912 fn from_wire(wire: crate::wire::ReadableReadResponse<'de>) -> Self {
7913 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
7914 }
7915 }
7916
7917 impl<'de> ::fidl_next::FromWireRef<crate::wire::ReadableReadResponse<'de>>
7918 for ReadableReadResponse
7919 {
7920 #[inline]
7921 fn from_wire_ref(wire: &crate::wire::ReadableReadResponse<'de>) -> Self {
7922 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
7923 }
7924 }
7925
7926 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7927 pub struct WritableWriteRequest {
7928 pub data: ::std::vec::Vec<u8>,
7929 }
7930
7931 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
7932 for WritableWriteRequest
7933 where
7934 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7935 ___E: ::fidl_next::Encoder,
7936 {
7937 #[inline]
7938 fn encode(
7939 self,
7940 encoder_: &mut ___E,
7941 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
7942 _: (),
7943 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7944 ::fidl_next::munge! {
7945 let crate::wire::WritableWriteRequest {
7946 data,
7947
7948 } = out_;
7949 }
7950
7951 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
7952
7953 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
7954 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
7955
7956 Ok(())
7957 }
7958 }
7959
7960 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
7961 for &'a WritableWriteRequest
7962 where
7963 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7964 ___E: ::fidl_next::Encoder,
7965 {
7966 #[inline]
7967 fn encode(
7968 self,
7969 encoder_: &mut ___E,
7970 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
7971 _: (),
7972 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7973 ::fidl_next::munge! {
7974 let crate::wire::WritableWriteRequest {
7975 data,
7976
7977 } = out_;
7978 }
7979
7980 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
7981
7982 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
7983 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
7984
7985 Ok(())
7986 }
7987 }
7988
7989 unsafe impl<___E>
7990 ::fidl_next::EncodeOption<
7991 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
7992 ___E,
7993 > for WritableWriteRequest
7994 where
7995 ___E: ::fidl_next::Encoder + ?Sized,
7996 WritableWriteRequest: ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
7997 {
7998 #[inline]
7999 fn encode_option(
8000 this: ::core::option::Option<Self>,
8001 encoder: &mut ___E,
8002 out: &mut ::core::mem::MaybeUninit<
8003 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8004 >,
8005 _: (),
8006 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8007 if let Some(inner) = this {
8008 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8009 ::fidl_next::wire::Box::encode_present(out);
8010 } else {
8011 ::fidl_next::wire::Box::encode_absent(out);
8012 }
8013
8014 Ok(())
8015 }
8016 }
8017
8018 unsafe impl<'a, ___E>
8019 ::fidl_next::EncodeOption<
8020 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8021 ___E,
8022 > for &'a WritableWriteRequest
8023 where
8024 ___E: ::fidl_next::Encoder + ?Sized,
8025 &'a WritableWriteRequest:
8026 ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
8027 {
8028 #[inline]
8029 fn encode_option(
8030 this: ::core::option::Option<Self>,
8031 encoder: &mut ___E,
8032 out: &mut ::core::mem::MaybeUninit<
8033 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8034 >,
8035 _: (),
8036 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8037 if let Some(inner) = this {
8038 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8039 ::fidl_next::wire::Box::encode_present(out);
8040 } else {
8041 ::fidl_next::wire::Box::encode_absent(out);
8042 }
8043
8044 Ok(())
8045 }
8046 }
8047
8048 impl<'de> ::fidl_next::FromWire<crate::wire::WritableWriteRequest<'de>> for WritableWriteRequest {
8049 #[inline]
8050 fn from_wire(wire: crate::wire::WritableWriteRequest<'de>) -> Self {
8051 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
8052 }
8053 }
8054
8055 impl<'de> ::fidl_next::FromWireRef<crate::wire::WritableWriteRequest<'de>>
8056 for WritableWriteRequest
8057 {
8058 #[inline]
8059 fn from_wire_ref(wire: &crate::wire::WritableWriteRequest<'de>) -> Self {
8060 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
8061 }
8062 }
8063
8064 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8065 #[repr(C)]
8066 pub struct WritableWriteResponse {
8067 pub actual_count: u64,
8068 }
8069
8070 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
8071 for WritableWriteResponse
8072 where
8073 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8074 {
8075 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8076 Self,
8077 crate::wire::WritableWriteResponse,
8078 > = unsafe {
8079 ::fidl_next::CopyOptimization::enable_if(
8080 true
8081
8082 && <
8083 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8084 >::COPY_OPTIMIZATION.is_enabled()
8085
8086 )
8087 };
8088
8089 #[inline]
8090 fn encode(
8091 self,
8092 encoder_: &mut ___E,
8093 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
8094 _: (),
8095 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8096 ::fidl_next::munge! {
8097 let crate::wire::WritableWriteResponse {
8098 actual_count,
8099
8100 } = out_;
8101 }
8102
8103 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
8104
8105 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
8106
8107 Ok(())
8108 }
8109 }
8110
8111 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
8112 for &'a WritableWriteResponse
8113 where
8114 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8115 {
8116 #[inline]
8117 fn encode(
8118 self,
8119 encoder_: &mut ___E,
8120 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
8121 _: (),
8122 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8123 ::fidl_next::munge! {
8124 let crate::wire::WritableWriteResponse {
8125 actual_count,
8126
8127 } = out_;
8128 }
8129
8130 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
8131
8132 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
8133
8134 Ok(())
8135 }
8136 }
8137
8138 unsafe impl<___E>
8139 ::fidl_next::EncodeOption<
8140 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8141 ___E,
8142 > for WritableWriteResponse
8143 where
8144 ___E: ::fidl_next::Encoder + ?Sized,
8145 WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
8146 {
8147 #[inline]
8148 fn encode_option(
8149 this: ::core::option::Option<Self>,
8150 encoder: &mut ___E,
8151 out: &mut ::core::mem::MaybeUninit<
8152 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8153 >,
8154 _: (),
8155 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8156 if let Some(inner) = this {
8157 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8158 ::fidl_next::wire::Box::encode_present(out);
8159 } else {
8160 ::fidl_next::wire::Box::encode_absent(out);
8161 }
8162
8163 Ok(())
8164 }
8165 }
8166
8167 unsafe impl<'a, ___E>
8168 ::fidl_next::EncodeOption<
8169 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8170 ___E,
8171 > for &'a WritableWriteResponse
8172 where
8173 ___E: ::fidl_next::Encoder + ?Sized,
8174 &'a WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
8175 {
8176 #[inline]
8177 fn encode_option(
8178 this: ::core::option::Option<Self>,
8179 encoder: &mut ___E,
8180 out: &mut ::core::mem::MaybeUninit<
8181 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8182 >,
8183 _: (),
8184 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8185 if let Some(inner) = this {
8186 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8187 ::fidl_next::wire::Box::encode_present(out);
8188 } else {
8189 ::fidl_next::wire::Box::encode_absent(out);
8190 }
8191
8192 Ok(())
8193 }
8194 }
8195
8196 impl ::fidl_next::FromWire<crate::wire::WritableWriteResponse> for WritableWriteResponse {
8197 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8198 crate::wire::WritableWriteResponse,
8199 Self,
8200 > = unsafe {
8201 ::fidl_next::CopyOptimization::enable_if(
8202 true
8203 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8204 .is_enabled(),
8205 )
8206 };
8207
8208 #[inline]
8209 fn from_wire(wire: crate::wire::WritableWriteResponse) -> Self {
8210 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
8211 }
8212 }
8213
8214 impl ::fidl_next::FromWireRef<crate::wire::WritableWriteResponse> for WritableWriteResponse {
8215 #[inline]
8216 fn from_wire_ref(wire: &crate::wire::WritableWriteResponse) -> Self {
8217 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
8218 }
8219 }
8220
8221 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8222 pub struct FileSeekRequest {
8223 pub origin: crate::natural::SeekOrigin,
8224
8225 pub offset: i64,
8226 }
8227
8228 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E> for FileSeekRequest
8229 where
8230 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8231 {
8232 #[inline]
8233 fn encode(
8234 self,
8235 encoder_: &mut ___E,
8236 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
8237 _: (),
8238 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8239 ::fidl_next::munge! {
8240 let crate::wire::FileSeekRequest {
8241 origin,
8242 offset,
8243
8244 } = out_;
8245 }
8246
8247 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
8248
8249 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
8250
8251 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8252
8253 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8254
8255 Ok(())
8256 }
8257 }
8258
8259 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
8260 for &'a FileSeekRequest
8261 where
8262 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8263 {
8264 #[inline]
8265 fn encode(
8266 self,
8267 encoder_: &mut ___E,
8268 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
8269 _: (),
8270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8271 ::fidl_next::munge! {
8272 let crate::wire::FileSeekRequest {
8273 origin,
8274 offset,
8275
8276 } = out_;
8277 }
8278
8279 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
8280
8281 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
8282
8283 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8284
8285 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8286
8287 Ok(())
8288 }
8289 }
8290
8291 unsafe impl<___E>
8292 ::fidl_next::EncodeOption<
8293 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8294 ___E,
8295 > for FileSeekRequest
8296 where
8297 ___E: ::fidl_next::Encoder + ?Sized,
8298 FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
8299 {
8300 #[inline]
8301 fn encode_option(
8302 this: ::core::option::Option<Self>,
8303 encoder: &mut ___E,
8304 out: &mut ::core::mem::MaybeUninit<
8305 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8306 >,
8307 _: (),
8308 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8309 if let Some(inner) = this {
8310 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8311 ::fidl_next::wire::Box::encode_present(out);
8312 } else {
8313 ::fidl_next::wire::Box::encode_absent(out);
8314 }
8315
8316 Ok(())
8317 }
8318 }
8319
8320 unsafe impl<'a, ___E>
8321 ::fidl_next::EncodeOption<
8322 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8323 ___E,
8324 > for &'a FileSeekRequest
8325 where
8326 ___E: ::fidl_next::Encoder + ?Sized,
8327 &'a FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
8328 {
8329 #[inline]
8330 fn encode_option(
8331 this: ::core::option::Option<Self>,
8332 encoder: &mut ___E,
8333 out: &mut ::core::mem::MaybeUninit<
8334 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8335 >,
8336 _: (),
8337 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8338 if let Some(inner) = this {
8339 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8340 ::fidl_next::wire::Box::encode_present(out);
8341 } else {
8342 ::fidl_next::wire::Box::encode_absent(out);
8343 }
8344
8345 Ok(())
8346 }
8347 }
8348
8349 impl ::fidl_next::FromWire<crate::wire::FileSeekRequest> for FileSeekRequest {
8350 #[inline]
8351 fn from_wire(wire: crate::wire::FileSeekRequest) -> Self {
8352 Self {
8353 origin: ::fidl_next::FromWire::from_wire(wire.origin),
8354
8355 offset: ::fidl_next::FromWire::from_wire(wire.offset),
8356 }
8357 }
8358 }
8359
8360 impl ::fidl_next::FromWireRef<crate::wire::FileSeekRequest> for FileSeekRequest {
8361 #[inline]
8362 fn from_wire_ref(wire: &crate::wire::FileSeekRequest) -> Self {
8363 Self {
8364 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
8365
8366 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
8367 }
8368 }
8369 }
8370
8371 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8372 #[repr(C)]
8373 pub struct FileSeekResponse {
8374 pub offset_from_start: u64,
8375 }
8376
8377 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E> for FileSeekResponse
8378 where
8379 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8380 {
8381 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8382 Self,
8383 crate::wire::FileSeekResponse,
8384 > = unsafe {
8385 ::fidl_next::CopyOptimization::enable_if(
8386 true
8387
8388 && <
8389 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8390 >::COPY_OPTIMIZATION.is_enabled()
8391
8392 )
8393 };
8394
8395 #[inline]
8396 fn encode(
8397 self,
8398 encoder_: &mut ___E,
8399 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
8400 _: (),
8401 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8402 ::fidl_next::munge! {
8403 let crate::wire::FileSeekResponse {
8404 offset_from_start,
8405
8406 } = out_;
8407 }
8408
8409 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
8410
8411 let mut _field =
8412 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
8413
8414 Ok(())
8415 }
8416 }
8417
8418 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
8419 for &'a FileSeekResponse
8420 where
8421 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8422 {
8423 #[inline]
8424 fn encode(
8425 self,
8426 encoder_: &mut ___E,
8427 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
8428 _: (),
8429 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8430 ::fidl_next::munge! {
8431 let crate::wire::FileSeekResponse {
8432 offset_from_start,
8433
8434 } = out_;
8435 }
8436
8437 ::fidl_next::Encode::encode(&self.offset_from_start, encoder_, offset_from_start, ())?;
8438
8439 let mut _field =
8440 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
8441
8442 Ok(())
8443 }
8444 }
8445
8446 unsafe impl<___E>
8447 ::fidl_next::EncodeOption<
8448 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8449 ___E,
8450 > for FileSeekResponse
8451 where
8452 ___E: ::fidl_next::Encoder + ?Sized,
8453 FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
8454 {
8455 #[inline]
8456 fn encode_option(
8457 this: ::core::option::Option<Self>,
8458 encoder: &mut ___E,
8459 out: &mut ::core::mem::MaybeUninit<
8460 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8461 >,
8462 _: (),
8463 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8464 if let Some(inner) = this {
8465 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8466 ::fidl_next::wire::Box::encode_present(out);
8467 } else {
8468 ::fidl_next::wire::Box::encode_absent(out);
8469 }
8470
8471 Ok(())
8472 }
8473 }
8474
8475 unsafe impl<'a, ___E>
8476 ::fidl_next::EncodeOption<
8477 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8478 ___E,
8479 > for &'a FileSeekResponse
8480 where
8481 ___E: ::fidl_next::Encoder + ?Sized,
8482 &'a FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
8483 {
8484 #[inline]
8485 fn encode_option(
8486 this: ::core::option::Option<Self>,
8487 encoder: &mut ___E,
8488 out: &mut ::core::mem::MaybeUninit<
8489 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8490 >,
8491 _: (),
8492 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8493 if let Some(inner) = this {
8494 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8495 ::fidl_next::wire::Box::encode_present(out);
8496 } else {
8497 ::fidl_next::wire::Box::encode_absent(out);
8498 }
8499
8500 Ok(())
8501 }
8502 }
8503
8504 impl ::fidl_next::FromWire<crate::wire::FileSeekResponse> for FileSeekResponse {
8505 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8506 crate::wire::FileSeekResponse,
8507 Self,
8508 > = unsafe {
8509 ::fidl_next::CopyOptimization::enable_if(
8510 true
8511 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8512 .is_enabled(),
8513 )
8514 };
8515
8516 #[inline]
8517 fn from_wire(wire: crate::wire::FileSeekResponse) -> Self {
8518 Self { offset_from_start: ::fidl_next::FromWire::from_wire(wire.offset_from_start) }
8519 }
8520 }
8521
8522 impl ::fidl_next::FromWireRef<crate::wire::FileSeekResponse> for FileSeekResponse {
8523 #[inline]
8524 fn from_wire_ref(wire: &crate::wire::FileSeekResponse) -> Self {
8525 Self {
8526 offset_from_start: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset_from_start),
8527 }
8528 }
8529 }
8530
8531 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8532 #[repr(C)]
8533 pub struct FileReadAtRequest {
8534 pub count: u64,
8535
8536 pub offset: u64,
8537 }
8538
8539 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E> for FileReadAtRequest
8540 where
8541 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8542 {
8543 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8544 Self,
8545 crate::wire::FileReadAtRequest,
8546 > = unsafe {
8547 ::fidl_next::CopyOptimization::enable_if(
8548 true
8549
8550 && <
8551 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8552 >::COPY_OPTIMIZATION.is_enabled()
8553
8554 && <
8555 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8556 >::COPY_OPTIMIZATION.is_enabled()
8557
8558 )
8559 };
8560
8561 #[inline]
8562 fn encode(
8563 self,
8564 encoder_: &mut ___E,
8565 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
8566 _: (),
8567 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8568 ::fidl_next::munge! {
8569 let crate::wire::FileReadAtRequest {
8570 count,
8571 offset,
8572
8573 } = out_;
8574 }
8575
8576 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
8577
8578 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
8579
8580 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8581
8582 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8583
8584 Ok(())
8585 }
8586 }
8587
8588 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
8589 for &'a FileReadAtRequest
8590 where
8591 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8592 {
8593 #[inline]
8594 fn encode(
8595 self,
8596 encoder_: &mut ___E,
8597 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
8598 _: (),
8599 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8600 ::fidl_next::munge! {
8601 let crate::wire::FileReadAtRequest {
8602 count,
8603 offset,
8604
8605 } = out_;
8606 }
8607
8608 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
8609
8610 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
8611
8612 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8613
8614 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8615
8616 Ok(())
8617 }
8618 }
8619
8620 unsafe impl<___E>
8621 ::fidl_next::EncodeOption<
8622 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8623 ___E,
8624 > for FileReadAtRequest
8625 where
8626 ___E: ::fidl_next::Encoder + ?Sized,
8627 FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
8628 {
8629 #[inline]
8630 fn encode_option(
8631 this: ::core::option::Option<Self>,
8632 encoder: &mut ___E,
8633 out: &mut ::core::mem::MaybeUninit<
8634 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8635 >,
8636 _: (),
8637 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8638 if let Some(inner) = this {
8639 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8640 ::fidl_next::wire::Box::encode_present(out);
8641 } else {
8642 ::fidl_next::wire::Box::encode_absent(out);
8643 }
8644
8645 Ok(())
8646 }
8647 }
8648
8649 unsafe impl<'a, ___E>
8650 ::fidl_next::EncodeOption<
8651 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8652 ___E,
8653 > for &'a FileReadAtRequest
8654 where
8655 ___E: ::fidl_next::Encoder + ?Sized,
8656 &'a FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
8657 {
8658 #[inline]
8659 fn encode_option(
8660 this: ::core::option::Option<Self>,
8661 encoder: &mut ___E,
8662 out: &mut ::core::mem::MaybeUninit<
8663 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8664 >,
8665 _: (),
8666 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8667 if let Some(inner) = this {
8668 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8669 ::fidl_next::wire::Box::encode_present(out);
8670 } else {
8671 ::fidl_next::wire::Box::encode_absent(out);
8672 }
8673
8674 Ok(())
8675 }
8676 }
8677
8678 impl ::fidl_next::FromWire<crate::wire::FileReadAtRequest> for FileReadAtRequest {
8679 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8680 crate::wire::FileReadAtRequest,
8681 Self,
8682 > = unsafe {
8683 ::fidl_next::CopyOptimization::enable_if(
8684 true
8685 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8686 .is_enabled()
8687 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8688 .is_enabled(),
8689 )
8690 };
8691
8692 #[inline]
8693 fn from_wire(wire: crate::wire::FileReadAtRequest) -> Self {
8694 Self {
8695 count: ::fidl_next::FromWire::from_wire(wire.count),
8696
8697 offset: ::fidl_next::FromWire::from_wire(wire.offset),
8698 }
8699 }
8700 }
8701
8702 impl ::fidl_next::FromWireRef<crate::wire::FileReadAtRequest> for FileReadAtRequest {
8703 #[inline]
8704 fn from_wire_ref(wire: &crate::wire::FileReadAtRequest) -> Self {
8705 Self {
8706 count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count),
8707
8708 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
8709 }
8710 }
8711 }
8712
8713 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8714 pub struct FileReadAtResponse {
8715 pub data: ::std::vec::Vec<u8>,
8716 }
8717
8718 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
8719 for FileReadAtResponse
8720 where
8721 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8722 ___E: ::fidl_next::Encoder,
8723 {
8724 #[inline]
8725 fn encode(
8726 self,
8727 encoder_: &mut ___E,
8728 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
8729 _: (),
8730 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8731 ::fidl_next::munge! {
8732 let crate::wire::FileReadAtResponse {
8733 data,
8734
8735 } = out_;
8736 }
8737
8738 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
8739
8740 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8741 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8742
8743 Ok(())
8744 }
8745 }
8746
8747 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
8748 for &'a FileReadAtResponse
8749 where
8750 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8751 ___E: ::fidl_next::Encoder,
8752 {
8753 #[inline]
8754 fn encode(
8755 self,
8756 encoder_: &mut ___E,
8757 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
8758 _: (),
8759 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8760 ::fidl_next::munge! {
8761 let crate::wire::FileReadAtResponse {
8762 data,
8763
8764 } = out_;
8765 }
8766
8767 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
8768
8769 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8770 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8771
8772 Ok(())
8773 }
8774 }
8775
8776 unsafe impl<___E>
8777 ::fidl_next::EncodeOption<
8778 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8779 ___E,
8780 > for FileReadAtResponse
8781 where
8782 ___E: ::fidl_next::Encoder + ?Sized,
8783 FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
8784 {
8785 #[inline]
8786 fn encode_option(
8787 this: ::core::option::Option<Self>,
8788 encoder: &mut ___E,
8789 out: &mut ::core::mem::MaybeUninit<
8790 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8791 >,
8792 _: (),
8793 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8794 if let Some(inner) = this {
8795 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8796 ::fidl_next::wire::Box::encode_present(out);
8797 } else {
8798 ::fidl_next::wire::Box::encode_absent(out);
8799 }
8800
8801 Ok(())
8802 }
8803 }
8804
8805 unsafe impl<'a, ___E>
8806 ::fidl_next::EncodeOption<
8807 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8808 ___E,
8809 > for &'a FileReadAtResponse
8810 where
8811 ___E: ::fidl_next::Encoder + ?Sized,
8812 &'a FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
8813 {
8814 #[inline]
8815 fn encode_option(
8816 this: ::core::option::Option<Self>,
8817 encoder: &mut ___E,
8818 out: &mut ::core::mem::MaybeUninit<
8819 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8820 >,
8821 _: (),
8822 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8823 if let Some(inner) = this {
8824 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8825 ::fidl_next::wire::Box::encode_present(out);
8826 } else {
8827 ::fidl_next::wire::Box::encode_absent(out);
8828 }
8829
8830 Ok(())
8831 }
8832 }
8833
8834 impl<'de> ::fidl_next::FromWire<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
8835 #[inline]
8836 fn from_wire(wire: crate::wire::FileReadAtResponse<'de>) -> Self {
8837 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
8838 }
8839 }
8840
8841 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
8842 #[inline]
8843 fn from_wire_ref(wire: &crate::wire::FileReadAtResponse<'de>) -> Self {
8844 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
8845 }
8846 }
8847
8848 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8849 pub struct FileWriteAtRequest {
8850 pub data: ::std::vec::Vec<u8>,
8851
8852 pub offset: u64,
8853 }
8854
8855 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
8856 for FileWriteAtRequest
8857 where
8858 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8859 ___E: ::fidl_next::Encoder,
8860 {
8861 #[inline]
8862 fn encode(
8863 self,
8864 encoder_: &mut ___E,
8865 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
8866 _: (),
8867 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8868 ::fidl_next::munge! {
8869 let crate::wire::FileWriteAtRequest {
8870 data,
8871 offset,
8872
8873 } = out_;
8874 }
8875
8876 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
8877
8878 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8879 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8880
8881 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8882
8883 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8884
8885 Ok(())
8886 }
8887 }
8888
8889 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
8890 for &'a FileWriteAtRequest
8891 where
8892 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8893 ___E: ::fidl_next::Encoder,
8894 {
8895 #[inline]
8896 fn encode(
8897 self,
8898 encoder_: &mut ___E,
8899 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
8900 _: (),
8901 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8902 ::fidl_next::munge! {
8903 let crate::wire::FileWriteAtRequest {
8904 data,
8905 offset,
8906
8907 } = out_;
8908 }
8909
8910 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
8911
8912 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8913 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8914
8915 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8916
8917 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8918
8919 Ok(())
8920 }
8921 }
8922
8923 unsafe impl<___E>
8924 ::fidl_next::EncodeOption<
8925 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
8926 ___E,
8927 > for FileWriteAtRequest
8928 where
8929 ___E: ::fidl_next::Encoder + ?Sized,
8930 FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
8931 {
8932 #[inline]
8933 fn encode_option(
8934 this: ::core::option::Option<Self>,
8935 encoder: &mut ___E,
8936 out: &mut ::core::mem::MaybeUninit<
8937 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
8938 >,
8939 _: (),
8940 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8941 if let Some(inner) = this {
8942 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8943 ::fidl_next::wire::Box::encode_present(out);
8944 } else {
8945 ::fidl_next::wire::Box::encode_absent(out);
8946 }
8947
8948 Ok(())
8949 }
8950 }
8951
8952 unsafe impl<'a, ___E>
8953 ::fidl_next::EncodeOption<
8954 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
8955 ___E,
8956 > for &'a FileWriteAtRequest
8957 where
8958 ___E: ::fidl_next::Encoder + ?Sized,
8959 &'a FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
8960 {
8961 #[inline]
8962 fn encode_option(
8963 this: ::core::option::Option<Self>,
8964 encoder: &mut ___E,
8965 out: &mut ::core::mem::MaybeUninit<
8966 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
8967 >,
8968 _: (),
8969 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8970 if let Some(inner) = this {
8971 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8972 ::fidl_next::wire::Box::encode_present(out);
8973 } else {
8974 ::fidl_next::wire::Box::encode_absent(out);
8975 }
8976
8977 Ok(())
8978 }
8979 }
8980
8981 impl<'de> ::fidl_next::FromWire<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
8982 #[inline]
8983 fn from_wire(wire: crate::wire::FileWriteAtRequest<'de>) -> Self {
8984 Self {
8985 data: ::fidl_next::FromWire::from_wire(wire.data),
8986
8987 offset: ::fidl_next::FromWire::from_wire(wire.offset),
8988 }
8989 }
8990 }
8991
8992 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
8993 #[inline]
8994 fn from_wire_ref(wire: &crate::wire::FileWriteAtRequest<'de>) -> Self {
8995 Self {
8996 data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data),
8997
8998 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
8999 }
9000 }
9001 }
9002
9003 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9004 #[repr(C)]
9005 pub struct FileWriteAtResponse {
9006 pub actual_count: u64,
9007 }
9008
9009 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
9010 for FileWriteAtResponse
9011 where
9012 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9013 {
9014 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9015 Self,
9016 crate::wire::FileWriteAtResponse,
9017 > = unsafe {
9018 ::fidl_next::CopyOptimization::enable_if(
9019 true
9020
9021 && <
9022 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9023 >::COPY_OPTIMIZATION.is_enabled()
9024
9025 )
9026 };
9027
9028 #[inline]
9029 fn encode(
9030 self,
9031 encoder_: &mut ___E,
9032 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
9033 _: (),
9034 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9035 ::fidl_next::munge! {
9036 let crate::wire::FileWriteAtResponse {
9037 actual_count,
9038
9039 } = out_;
9040 }
9041
9042 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
9043
9044 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9045
9046 Ok(())
9047 }
9048 }
9049
9050 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
9051 for &'a FileWriteAtResponse
9052 where
9053 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9054 {
9055 #[inline]
9056 fn encode(
9057 self,
9058 encoder_: &mut ___E,
9059 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
9060 _: (),
9061 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9062 ::fidl_next::munge! {
9063 let crate::wire::FileWriteAtResponse {
9064 actual_count,
9065
9066 } = out_;
9067 }
9068
9069 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
9070
9071 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9072
9073 Ok(())
9074 }
9075 }
9076
9077 unsafe impl<___E>
9078 ::fidl_next::EncodeOption<
9079 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9080 ___E,
9081 > for FileWriteAtResponse
9082 where
9083 ___E: ::fidl_next::Encoder + ?Sized,
9084 FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
9085 {
9086 #[inline]
9087 fn encode_option(
9088 this: ::core::option::Option<Self>,
9089 encoder: &mut ___E,
9090 out: &mut ::core::mem::MaybeUninit<
9091 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9092 >,
9093 _: (),
9094 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9095 if let Some(inner) = this {
9096 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9097 ::fidl_next::wire::Box::encode_present(out);
9098 } else {
9099 ::fidl_next::wire::Box::encode_absent(out);
9100 }
9101
9102 Ok(())
9103 }
9104 }
9105
9106 unsafe impl<'a, ___E>
9107 ::fidl_next::EncodeOption<
9108 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9109 ___E,
9110 > for &'a FileWriteAtResponse
9111 where
9112 ___E: ::fidl_next::Encoder + ?Sized,
9113 &'a FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
9114 {
9115 #[inline]
9116 fn encode_option(
9117 this: ::core::option::Option<Self>,
9118 encoder: &mut ___E,
9119 out: &mut ::core::mem::MaybeUninit<
9120 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9121 >,
9122 _: (),
9123 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9124 if let Some(inner) = this {
9125 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9126 ::fidl_next::wire::Box::encode_present(out);
9127 } else {
9128 ::fidl_next::wire::Box::encode_absent(out);
9129 }
9130
9131 Ok(())
9132 }
9133 }
9134
9135 impl ::fidl_next::FromWire<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
9136 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9137 crate::wire::FileWriteAtResponse,
9138 Self,
9139 > = unsafe {
9140 ::fidl_next::CopyOptimization::enable_if(
9141 true
9142 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9143 .is_enabled(),
9144 )
9145 };
9146
9147 #[inline]
9148 fn from_wire(wire: crate::wire::FileWriteAtResponse) -> Self {
9149 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
9150 }
9151 }
9152
9153 impl ::fidl_next::FromWireRef<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
9154 #[inline]
9155 fn from_wire_ref(wire: &crate::wire::FileWriteAtResponse) -> Self {
9156 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
9157 }
9158 }
9159
9160 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9161 #[repr(C)]
9162 pub struct FileResizeRequest {
9163 pub length: u64,
9164 }
9165
9166 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E> for FileResizeRequest
9167 where
9168 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9169 {
9170 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9171 Self,
9172 crate::wire::FileResizeRequest,
9173 > = unsafe {
9174 ::fidl_next::CopyOptimization::enable_if(
9175 true
9176
9177 && <
9178 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9179 >::COPY_OPTIMIZATION.is_enabled()
9180
9181 )
9182 };
9183
9184 #[inline]
9185 fn encode(
9186 self,
9187 encoder_: &mut ___E,
9188 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
9189 _: (),
9190 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9191 ::fidl_next::munge! {
9192 let crate::wire::FileResizeRequest {
9193 length,
9194
9195 } = out_;
9196 }
9197
9198 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
9199
9200 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
9201
9202 Ok(())
9203 }
9204 }
9205
9206 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
9207 for &'a FileResizeRequest
9208 where
9209 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9210 {
9211 #[inline]
9212 fn encode(
9213 self,
9214 encoder_: &mut ___E,
9215 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
9216 _: (),
9217 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9218 ::fidl_next::munge! {
9219 let crate::wire::FileResizeRequest {
9220 length,
9221
9222 } = out_;
9223 }
9224
9225 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
9226
9227 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
9228
9229 Ok(())
9230 }
9231 }
9232
9233 unsafe impl<___E>
9234 ::fidl_next::EncodeOption<
9235 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9236 ___E,
9237 > for FileResizeRequest
9238 where
9239 ___E: ::fidl_next::Encoder + ?Sized,
9240 FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
9241 {
9242 #[inline]
9243 fn encode_option(
9244 this: ::core::option::Option<Self>,
9245 encoder: &mut ___E,
9246 out: &mut ::core::mem::MaybeUninit<
9247 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9248 >,
9249 _: (),
9250 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9251 if let Some(inner) = this {
9252 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9253 ::fidl_next::wire::Box::encode_present(out);
9254 } else {
9255 ::fidl_next::wire::Box::encode_absent(out);
9256 }
9257
9258 Ok(())
9259 }
9260 }
9261
9262 unsafe impl<'a, ___E>
9263 ::fidl_next::EncodeOption<
9264 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9265 ___E,
9266 > for &'a FileResizeRequest
9267 where
9268 ___E: ::fidl_next::Encoder + ?Sized,
9269 &'a FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
9270 {
9271 #[inline]
9272 fn encode_option(
9273 this: ::core::option::Option<Self>,
9274 encoder: &mut ___E,
9275 out: &mut ::core::mem::MaybeUninit<
9276 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9277 >,
9278 _: (),
9279 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9280 if let Some(inner) = this {
9281 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9282 ::fidl_next::wire::Box::encode_present(out);
9283 } else {
9284 ::fidl_next::wire::Box::encode_absent(out);
9285 }
9286
9287 Ok(())
9288 }
9289 }
9290
9291 impl ::fidl_next::FromWire<crate::wire::FileResizeRequest> for FileResizeRequest {
9292 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9293 crate::wire::FileResizeRequest,
9294 Self,
9295 > = unsafe {
9296 ::fidl_next::CopyOptimization::enable_if(
9297 true
9298 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9299 .is_enabled(),
9300 )
9301 };
9302
9303 #[inline]
9304 fn from_wire(wire: crate::wire::FileResizeRequest) -> Self {
9305 Self { length: ::fidl_next::FromWire::from_wire(wire.length) }
9306 }
9307 }
9308
9309 impl ::fidl_next::FromWireRef<crate::wire::FileResizeRequest> for FileResizeRequest {
9310 #[inline]
9311 fn from_wire_ref(wire: &crate::wire::FileResizeRequest) -> Self {
9312 Self { length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length) }
9313 }
9314 }
9315
9316 pub type FileResizeResponse = ();
9317
9318 ::fidl_next::bitflags::bitflags! {
9319 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct VmoFlags: u32 {
9320 #[doc = " Requests that the VMO be readable.\n"]const READ = 1;
9321 #[doc = " Requests that the VMO be writable.\n"]const WRITE = 2;
9322 #[doc = " Request that the VMO be executable.\n"]const EXECUTE = 4;
9323 #[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;
9324 #[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;
9325
9326 }
9327 }
9328
9329 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for VmoFlags
9330 where
9331 ___E: ?Sized,
9332 {
9333 #[inline]
9334 fn encode(
9335 self,
9336 encoder: &mut ___E,
9337 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
9338 _: (),
9339 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9340 ::fidl_next::Encode::encode(&self, encoder, out, ())
9341 }
9342 }
9343
9344 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for &'a VmoFlags
9345 where
9346 ___E: ?Sized,
9347 {
9348 #[inline]
9349 fn encode(
9350 self,
9351 _: &mut ___E,
9352 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
9353 _: (),
9354 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9355 ::fidl_next::munge!(let crate::wire::VmoFlags { value } = out);
9356
9357 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
9358 return Err(::fidl_next::EncodeError::InvalidStrictBits);
9359 }
9360
9361 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
9362 Ok(())
9363 }
9364 }
9365
9366 impl ::core::convert::From<crate::wire::VmoFlags> for VmoFlags {
9367 fn from(wire: crate::wire::VmoFlags) -> Self {
9368 Self::from_bits_retain(u32::from(wire.value))
9369 }
9370 }
9371
9372 impl ::fidl_next::FromWire<crate::wire::VmoFlags> for VmoFlags {
9373 #[inline]
9374 fn from_wire(wire: crate::wire::VmoFlags) -> Self {
9375 Self::from(wire)
9376 }
9377 }
9378
9379 impl ::fidl_next::FromWireRef<crate::wire::VmoFlags> for VmoFlags {
9380 #[inline]
9381 fn from_wire_ref(wire: &crate::wire::VmoFlags) -> Self {
9382 Self::from(*wire)
9383 }
9384 }
9385
9386 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9387 #[repr(C)]
9388 pub struct FileGetBackingMemoryRequest {
9389 pub flags: crate::natural::VmoFlags,
9390 }
9391
9392 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
9393 for FileGetBackingMemoryRequest
9394 where
9395 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9396 {
9397 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9398 Self,
9399 crate::wire::FileGetBackingMemoryRequest,
9400 > = unsafe {
9401 ::fidl_next::CopyOptimization::enable_if(
9402 true && <crate::natural::VmoFlags as ::fidl_next::Encode<
9403 crate::wire::VmoFlags,
9404 ___E,
9405 >>::COPY_OPTIMIZATION
9406 .is_enabled(),
9407 )
9408 };
9409
9410 #[inline]
9411 fn encode(
9412 self,
9413 encoder_: &mut ___E,
9414 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
9415 _: (),
9416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9417 ::fidl_next::munge! {
9418 let crate::wire::FileGetBackingMemoryRequest {
9419 flags,
9420
9421 } = out_;
9422 }
9423
9424 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
9425
9426 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
9427
9428 Ok(())
9429 }
9430 }
9431
9432 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
9433 for &'a FileGetBackingMemoryRequest
9434 where
9435 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9436 {
9437 #[inline]
9438 fn encode(
9439 self,
9440 encoder_: &mut ___E,
9441 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
9442 _: (),
9443 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9444 ::fidl_next::munge! {
9445 let crate::wire::FileGetBackingMemoryRequest {
9446 flags,
9447
9448 } = out_;
9449 }
9450
9451 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
9452
9453 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
9454
9455 Ok(())
9456 }
9457 }
9458
9459 unsafe impl<___E>
9460 ::fidl_next::EncodeOption<
9461 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9462 ___E,
9463 > for FileGetBackingMemoryRequest
9464 where
9465 ___E: ::fidl_next::Encoder + ?Sized,
9466 FileGetBackingMemoryRequest:
9467 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
9468 {
9469 #[inline]
9470 fn encode_option(
9471 this: ::core::option::Option<Self>,
9472 encoder: &mut ___E,
9473 out: &mut ::core::mem::MaybeUninit<
9474 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9475 >,
9476 _: (),
9477 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9478 if let Some(inner) = this {
9479 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9480 ::fidl_next::wire::Box::encode_present(out);
9481 } else {
9482 ::fidl_next::wire::Box::encode_absent(out);
9483 }
9484
9485 Ok(())
9486 }
9487 }
9488
9489 unsafe impl<'a, ___E>
9490 ::fidl_next::EncodeOption<
9491 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9492 ___E,
9493 > for &'a FileGetBackingMemoryRequest
9494 where
9495 ___E: ::fidl_next::Encoder + ?Sized,
9496 &'a FileGetBackingMemoryRequest:
9497 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
9498 {
9499 #[inline]
9500 fn encode_option(
9501 this: ::core::option::Option<Self>,
9502 encoder: &mut ___E,
9503 out: &mut ::core::mem::MaybeUninit<
9504 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9505 >,
9506 _: (),
9507 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9508 if let Some(inner) = this {
9509 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9510 ::fidl_next::wire::Box::encode_present(out);
9511 } else {
9512 ::fidl_next::wire::Box::encode_absent(out);
9513 }
9514
9515 Ok(())
9516 }
9517 }
9518
9519 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryRequest>
9520 for FileGetBackingMemoryRequest
9521 {
9522 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9523 crate::wire::FileGetBackingMemoryRequest,
9524 Self,
9525 > = unsafe {
9526 ::fidl_next::CopyOptimization::enable_if(
9527 true && <crate::natural::VmoFlags as ::fidl_next::FromWire<
9528 crate::wire::VmoFlags,
9529 >>::COPY_OPTIMIZATION
9530 .is_enabled(),
9531 )
9532 };
9533
9534 #[inline]
9535 fn from_wire(wire: crate::wire::FileGetBackingMemoryRequest) -> Self {
9536 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
9537 }
9538 }
9539
9540 impl ::fidl_next::FromWireRef<crate::wire::FileGetBackingMemoryRequest>
9541 for FileGetBackingMemoryRequest
9542 {
9543 #[inline]
9544 fn from_wire_ref(wire: &crate::wire::FileGetBackingMemoryRequest) -> Self {
9545 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
9546 }
9547 }
9548
9549 pub type LinkableLinkIntoResponse = ();
9550
9551 pub type FileAllocateResponse = ();
9552
9553 pub type FileEnableVerityResponse = ();
9554
9555 ::fidl_next::bitflags::bitflags! {
9556 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct FileSignal: u32 {
9557 #[doc = " Indicates the file is ready for reading.\n"]const READABLE = 16777216;
9558 #[doc = " Indicates the file is ready for writing.\n"]const WRITABLE = 33554432;
9559
9560 }
9561 }
9562
9563 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for FileSignal
9564 where
9565 ___E: ?Sized,
9566 {
9567 #[inline]
9568 fn encode(
9569 self,
9570 encoder: &mut ___E,
9571 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
9572 _: (),
9573 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9574 ::fidl_next::Encode::encode(&self, encoder, out, ())
9575 }
9576 }
9577
9578 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for &'a FileSignal
9579 where
9580 ___E: ?Sized,
9581 {
9582 #[inline]
9583 fn encode(
9584 self,
9585 _: &mut ___E,
9586 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
9587 _: (),
9588 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9589 ::fidl_next::munge!(let crate::wire::FileSignal { value } = out);
9590
9591 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
9592 return Err(::fidl_next::EncodeError::InvalidStrictBits);
9593 }
9594
9595 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
9596 Ok(())
9597 }
9598 }
9599
9600 impl ::core::convert::From<crate::wire::FileSignal> for FileSignal {
9601 fn from(wire: crate::wire::FileSignal) -> Self {
9602 Self::from_bits_retain(u32::from(wire.value))
9603 }
9604 }
9605
9606 impl ::fidl_next::FromWire<crate::wire::FileSignal> for FileSignal {
9607 #[inline]
9608 fn from_wire(wire: crate::wire::FileSignal) -> Self {
9609 Self::from(wire)
9610 }
9611 }
9612
9613 impl ::fidl_next::FromWireRef<crate::wire::FileSignal> for FileSignal {
9614 #[inline]
9615 fn from_wire_ref(wire: &crate::wire::FileSignal) -> Self {
9616 Self::from(*wire)
9617 }
9618 }
9619
9620 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9621 #[repr(C)]
9622 pub struct FilesystemInfo {
9623 pub total_bytes: u64,
9624
9625 pub used_bytes: u64,
9626
9627 pub total_nodes: u64,
9628
9629 pub used_nodes: u64,
9630
9631 pub free_shared_pool_bytes: u64,
9632
9633 pub fs_id: u64,
9634
9635 pub block_size: u32,
9636
9637 pub max_filename_size: u32,
9638
9639 pub fs_type: u32,
9640
9641 pub padding: u32,
9642
9643 pub name: [i8; 32],
9644 }
9645
9646 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for FilesystemInfo
9647 where
9648 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9649 {
9650 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FilesystemInfo> = unsafe {
9651 ::fidl_next::CopyOptimization::enable_if(
9652 true
9653
9654 && <
9655 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9656 >::COPY_OPTIMIZATION.is_enabled()
9657
9658 && <
9659 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9660 >::COPY_OPTIMIZATION.is_enabled()
9661
9662 && <
9663 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9664 >::COPY_OPTIMIZATION.is_enabled()
9665
9666 && <
9667 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9668 >::COPY_OPTIMIZATION.is_enabled()
9669
9670 && <
9671 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9672 >::COPY_OPTIMIZATION.is_enabled()
9673
9674 && <
9675 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9676 >::COPY_OPTIMIZATION.is_enabled()
9677
9678 && <
9679 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9680 >::COPY_OPTIMIZATION.is_enabled()
9681
9682 && <
9683 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9684 >::COPY_OPTIMIZATION.is_enabled()
9685
9686 && <
9687 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9688 >::COPY_OPTIMIZATION.is_enabled()
9689
9690 && <
9691 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9692 >::COPY_OPTIMIZATION.is_enabled()
9693
9694 && <
9695 [i8; 32] as ::fidl_next::Encode<[i8; 32], ___E>
9696 >::COPY_OPTIMIZATION.is_enabled()
9697
9698 )
9699 };
9700
9701 #[inline]
9702 fn encode(
9703 self,
9704 encoder_: &mut ___E,
9705 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
9706 _: (),
9707 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9708 ::fidl_next::munge! {
9709 let crate::wire::FilesystemInfo {
9710 total_bytes,
9711 used_bytes,
9712 total_nodes,
9713 used_nodes,
9714 free_shared_pool_bytes,
9715 fs_id,
9716 block_size,
9717 max_filename_size,
9718 fs_type,
9719 padding,
9720 name,
9721
9722 } = out_;
9723 }
9724
9725 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
9726
9727 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
9728
9729 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
9730
9731 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
9732
9733 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
9734
9735 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
9736
9737 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
9738
9739 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
9740
9741 ::fidl_next::Encode::encode(
9742 self.free_shared_pool_bytes,
9743 encoder_,
9744 free_shared_pool_bytes,
9745 (),
9746 )?;
9747
9748 let mut _field =
9749 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
9750
9751 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
9752
9753 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
9754
9755 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
9756
9757 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
9758
9759 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
9760
9761 let mut _field =
9762 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
9763
9764 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
9765
9766 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
9767
9768 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
9769
9770 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
9771
9772 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
9773
9774 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
9775
9776 Ok(())
9777 }
9778 }
9779
9780 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for &'a FilesystemInfo
9781 where
9782 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9783 {
9784 #[inline]
9785 fn encode(
9786 self,
9787 encoder_: &mut ___E,
9788 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
9789 _: (),
9790 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9791 ::fidl_next::munge! {
9792 let crate::wire::FilesystemInfo {
9793 total_bytes,
9794 used_bytes,
9795 total_nodes,
9796 used_nodes,
9797 free_shared_pool_bytes,
9798 fs_id,
9799 block_size,
9800 max_filename_size,
9801 fs_type,
9802 padding,
9803 name,
9804
9805 } = out_;
9806 }
9807
9808 ::fidl_next::Encode::encode(&self.total_bytes, encoder_, total_bytes, ())?;
9809
9810 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
9811
9812 ::fidl_next::Encode::encode(&self.used_bytes, encoder_, used_bytes, ())?;
9813
9814 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
9815
9816 ::fidl_next::Encode::encode(&self.total_nodes, encoder_, total_nodes, ())?;
9817
9818 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
9819
9820 ::fidl_next::Encode::encode(&self.used_nodes, encoder_, used_nodes, ())?;
9821
9822 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
9823
9824 ::fidl_next::Encode::encode(
9825 &self.free_shared_pool_bytes,
9826 encoder_,
9827 free_shared_pool_bytes,
9828 (),
9829 )?;
9830
9831 let mut _field =
9832 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
9833
9834 ::fidl_next::Encode::encode(&self.fs_id, encoder_, fs_id, ())?;
9835
9836 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
9837
9838 ::fidl_next::Encode::encode(&self.block_size, encoder_, block_size, ())?;
9839
9840 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
9841
9842 ::fidl_next::Encode::encode(&self.max_filename_size, encoder_, max_filename_size, ())?;
9843
9844 let mut _field =
9845 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
9846
9847 ::fidl_next::Encode::encode(&self.fs_type, encoder_, fs_type, ())?;
9848
9849 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
9850
9851 ::fidl_next::Encode::encode(&self.padding, encoder_, padding, ())?;
9852
9853 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
9854
9855 ::fidl_next::Encode::encode(&self.name, encoder_, name, ())?;
9856
9857 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
9858
9859 Ok(())
9860 }
9861 }
9862
9863 unsafe impl<___E>
9864 ::fidl_next::EncodeOption<
9865 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9866 ___E,
9867 > for FilesystemInfo
9868 where
9869 ___E: ::fidl_next::Encoder + ?Sized,
9870 FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
9871 {
9872 #[inline]
9873 fn encode_option(
9874 this: ::core::option::Option<Self>,
9875 encoder: &mut ___E,
9876 out: &mut ::core::mem::MaybeUninit<
9877 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9878 >,
9879 _: (),
9880 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9881 if let Some(inner) = this {
9882 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9883 ::fidl_next::wire::Box::encode_present(out);
9884 } else {
9885 ::fidl_next::wire::Box::encode_absent(out);
9886 }
9887
9888 Ok(())
9889 }
9890 }
9891
9892 unsafe impl<'a, ___E>
9893 ::fidl_next::EncodeOption<
9894 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9895 ___E,
9896 > for &'a FilesystemInfo
9897 where
9898 ___E: ::fidl_next::Encoder + ?Sized,
9899 &'a FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
9900 {
9901 #[inline]
9902 fn encode_option(
9903 this: ::core::option::Option<Self>,
9904 encoder: &mut ___E,
9905 out: &mut ::core::mem::MaybeUninit<
9906 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9907 >,
9908 _: (),
9909 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9910 if let Some(inner) = this {
9911 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9912 ::fidl_next::wire::Box::encode_present(out);
9913 } else {
9914 ::fidl_next::wire::Box::encode_absent(out);
9915 }
9916
9917 Ok(())
9918 }
9919 }
9920
9921 impl ::fidl_next::FromWire<crate::wire::FilesystemInfo> for FilesystemInfo {
9922 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FilesystemInfo, Self> = unsafe {
9923 ::fidl_next::CopyOptimization::enable_if(
9924 true
9925 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9926 .is_enabled()
9927 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9928 .is_enabled()
9929 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9930 .is_enabled()
9931 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9932 .is_enabled()
9933 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9934 .is_enabled()
9935 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9936 .is_enabled()
9937 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
9938 .is_enabled()
9939 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
9940 .is_enabled()
9941 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
9942 .is_enabled()
9943 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
9944 .is_enabled()
9945 && <[i8; 32] as ::fidl_next::FromWire<[i8; 32]>>::COPY_OPTIMIZATION
9946 .is_enabled(),
9947 )
9948 };
9949
9950 #[inline]
9951 fn from_wire(wire: crate::wire::FilesystemInfo) -> Self {
9952 Self {
9953 total_bytes: ::fidl_next::FromWire::from_wire(wire.total_bytes),
9954
9955 used_bytes: ::fidl_next::FromWire::from_wire(wire.used_bytes),
9956
9957 total_nodes: ::fidl_next::FromWire::from_wire(wire.total_nodes),
9958
9959 used_nodes: ::fidl_next::FromWire::from_wire(wire.used_nodes),
9960
9961 free_shared_pool_bytes: ::fidl_next::FromWire::from_wire(
9962 wire.free_shared_pool_bytes,
9963 ),
9964
9965 fs_id: ::fidl_next::FromWire::from_wire(wire.fs_id),
9966
9967 block_size: ::fidl_next::FromWire::from_wire(wire.block_size),
9968
9969 max_filename_size: ::fidl_next::FromWire::from_wire(wire.max_filename_size),
9970
9971 fs_type: ::fidl_next::FromWire::from_wire(wire.fs_type),
9972
9973 padding: ::fidl_next::FromWire::from_wire(wire.padding),
9974
9975 name: ::fidl_next::FromWire::from_wire(wire.name),
9976 }
9977 }
9978 }
9979
9980 impl ::fidl_next::FromWireRef<crate::wire::FilesystemInfo> for FilesystemInfo {
9981 #[inline]
9982 fn from_wire_ref(wire: &crate::wire::FilesystemInfo) -> Self {
9983 Self {
9984 total_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_bytes),
9985
9986 used_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_bytes),
9987
9988 total_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_nodes),
9989
9990 used_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_nodes),
9991
9992 free_shared_pool_bytes: ::fidl_next::FromWireRef::from_wire_ref(
9993 &wire.free_shared_pool_bytes,
9994 ),
9995
9996 fs_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_id),
9997
9998 block_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.block_size),
9999
10000 max_filename_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_filename_size),
10001
10002 fs_type: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_type),
10003
10004 padding: ::fidl_next::FromWireRef::from_wire_ref(&wire.padding),
10005
10006 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
10007 }
10008 }
10009 }
10010
10011 pub type Service = ();
10012
10013 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10014 pub struct SymlinkObject {
10015 pub target: ::std::vec::Vec<u8>,
10016 }
10017
10018 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E> for SymlinkObject
10019 where
10020 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10021 ___E: ::fidl_next::Encoder,
10022 {
10023 #[inline]
10024 fn encode(
10025 self,
10026 encoder_: &mut ___E,
10027 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
10028 _: (),
10029 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10030 ::fidl_next::munge! {
10031 let crate::wire::SymlinkObject {
10032 target,
10033
10034 } = out_;
10035 }
10036
10037 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
10038
10039 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
10040 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
10041
10042 Ok(())
10043 }
10044 }
10045
10046 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
10047 for &'a SymlinkObject
10048 where
10049 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10050 ___E: ::fidl_next::Encoder,
10051 {
10052 #[inline]
10053 fn encode(
10054 self,
10055 encoder_: &mut ___E,
10056 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
10057 _: (),
10058 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10059 ::fidl_next::munge! {
10060 let crate::wire::SymlinkObject {
10061 target,
10062
10063 } = out_;
10064 }
10065
10066 ::fidl_next::Encode::encode(&self.target, encoder_, target, (4095, ()))?;
10067
10068 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
10069 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
10070
10071 Ok(())
10072 }
10073 }
10074
10075 unsafe impl<___E>
10076 ::fidl_next::EncodeOption<
10077 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10078 ___E,
10079 > for SymlinkObject
10080 where
10081 ___E: ::fidl_next::Encoder + ?Sized,
10082 SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
10083 {
10084 #[inline]
10085 fn encode_option(
10086 this: ::core::option::Option<Self>,
10087 encoder: &mut ___E,
10088 out: &mut ::core::mem::MaybeUninit<
10089 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10090 >,
10091 _: (),
10092 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10093 if let Some(inner) = this {
10094 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10095 ::fidl_next::wire::Box::encode_present(out);
10096 } else {
10097 ::fidl_next::wire::Box::encode_absent(out);
10098 }
10099
10100 Ok(())
10101 }
10102 }
10103
10104 unsafe impl<'a, ___E>
10105 ::fidl_next::EncodeOption<
10106 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10107 ___E,
10108 > for &'a SymlinkObject
10109 where
10110 ___E: ::fidl_next::Encoder + ?Sized,
10111 &'a SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
10112 {
10113 #[inline]
10114 fn encode_option(
10115 this: ::core::option::Option<Self>,
10116 encoder: &mut ___E,
10117 out: &mut ::core::mem::MaybeUninit<
10118 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10119 >,
10120 _: (),
10121 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10122 if let Some(inner) = this {
10123 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10124 ::fidl_next::wire::Box::encode_present(out);
10125 } else {
10126 ::fidl_next::wire::Box::encode_absent(out);
10127 }
10128
10129 Ok(())
10130 }
10131 }
10132
10133 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkObject<'de>> for SymlinkObject {
10134 #[inline]
10135 fn from_wire(wire: crate::wire::SymlinkObject<'de>) -> Self {
10136 Self { target: ::fidl_next::FromWire::from_wire(wire.target) }
10137 }
10138 }
10139
10140 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkObject<'de>> for SymlinkObject {
10141 #[inline]
10142 fn from_wire_ref(wire: &crate::wire::SymlinkObject<'de>) -> Self {
10143 Self { target: ::fidl_next::FromWireRef::from_wire_ref(&wire.target) }
10144 }
10145 }
10146
10147 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10148 #[repr(u8)]
10149 pub enum WatchEvent {
10150 Deleted = 0,
10151 Added = 1,
10152 Removed = 2,
10153 Existing = 3,
10154 Idle = 4,
10155 }
10156 impl ::core::convert::TryFrom<u8> for WatchEvent {
10157 type Error = ::fidl_next::UnknownStrictEnumMemberError;
10158 fn try_from(
10159 value: u8,
10160 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
10161 match value {
10162 0 => Ok(Self::Deleted),
10163 1 => Ok(Self::Added),
10164 2 => Ok(Self::Removed),
10165 3 => Ok(Self::Existing),
10166 4 => Ok(Self::Idle),
10167
10168 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
10169 }
10170 }
10171 }
10172
10173 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for WatchEvent
10174 where
10175 ___E: ?Sized,
10176 {
10177 #[inline]
10178 fn encode(
10179 self,
10180 encoder: &mut ___E,
10181 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
10182 _: (),
10183 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10184 ::fidl_next::Encode::encode(&self, encoder, out, ())
10185 }
10186 }
10187
10188 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for &'a WatchEvent
10189 where
10190 ___E: ?Sized,
10191 {
10192 #[inline]
10193 fn encode(
10194 self,
10195 encoder: &mut ___E,
10196 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
10197 _: (),
10198 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10199 ::fidl_next::munge!(let crate::wire::WatchEvent { value } = out);
10200 let _ = value.write(u8::from(match *self {
10201 WatchEvent::Deleted => 0,
10202
10203 WatchEvent::Added => 1,
10204
10205 WatchEvent::Removed => 2,
10206
10207 WatchEvent::Existing => 3,
10208
10209 WatchEvent::Idle => 4,
10210 }));
10211
10212 Ok(())
10213 }
10214 }
10215
10216 impl ::core::convert::From<crate::wire::WatchEvent> for WatchEvent {
10217 fn from(wire: crate::wire::WatchEvent) -> Self {
10218 match u8::from(wire.value) {
10219 0 => Self::Deleted,
10220
10221 1 => Self::Added,
10222
10223 2 => Self::Removed,
10224
10225 3 => Self::Existing,
10226
10227 4 => Self::Idle,
10228
10229 _ => unsafe { ::core::hint::unreachable_unchecked() },
10230 }
10231 }
10232 }
10233
10234 impl ::fidl_next::FromWire<crate::wire::WatchEvent> for WatchEvent {
10235 #[inline]
10236 fn from_wire(wire: crate::wire::WatchEvent) -> Self {
10237 Self::from(wire)
10238 }
10239 }
10240
10241 impl ::fidl_next::FromWireRef<crate::wire::WatchEvent> for WatchEvent {
10242 #[inline]
10243 fn from_wire_ref(wire: &crate::wire::WatchEvent) -> Self {
10244 Self::from(*wire)
10245 }
10246 }
10247}
10248
10249pub mod wire {
10250
10251 #[derive(Clone, Copy, Debug)]
10253 #[repr(transparent)]
10254 pub struct Operations {
10255 pub(crate) value: ::fidl_next::wire::Uint64,
10256 }
10257
10258 impl ::fidl_next::Constrained for Operations {
10259 type Constraint = ();
10260
10261 fn validate(
10262 _: ::fidl_next::Slot<'_, Self>,
10263 _: Self::Constraint,
10264 ) -> Result<(), ::fidl_next::ValidationError> {
10265 Ok(())
10266 }
10267 }
10268
10269 unsafe impl ::fidl_next::Wire for Operations {
10270 type Narrowed<'de> = Self;
10271
10272 #[inline]
10273 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10274 }
10276 }
10277
10278 unsafe impl<___D> ::fidl_next::Decode<___D> for Operations
10279 where
10280 ___D: ?Sized,
10281 {
10282 fn decode(
10283 slot: ::fidl_next::Slot<'_, Self>,
10284 _: &mut ___D,
10285 _: (),
10286 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10287 ::fidl_next::munge!(let Self { value } = slot);
10288 let set = u64::from(*value);
10289 if set & !crate::natural::Operations::all().bits() != 0 {
10290 return Err(::fidl_next::DecodeError::InvalidBits {
10291 expected: crate::natural::Operations::all().bits() as usize,
10292 actual: set as usize,
10293 });
10294 }
10295
10296 Ok(())
10297 }
10298 }
10299
10300 impl ::core::convert::From<crate::natural::Operations> for Operations {
10301 fn from(natural: crate::natural::Operations) -> Self {
10302 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
10303 }
10304 }
10305
10306 impl ::fidl_next::IntoNatural for Operations {
10307 type Natural = crate::natural::Operations;
10308 }
10309
10310 pub type Abilities = crate::wire::Operations;
10312
10313 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
10315 #[repr(transparent)]
10316 pub struct SeekOrigin {
10317 pub(crate) value: ::fidl_next::wire::Uint32,
10318 }
10319
10320 impl ::fidl_next::Constrained for SeekOrigin {
10321 type Constraint = ();
10322
10323 fn validate(
10324 _: ::fidl_next::Slot<'_, Self>,
10325 _: Self::Constraint,
10326 ) -> Result<(), ::fidl_next::ValidationError> {
10327 Ok(())
10328 }
10329 }
10330
10331 unsafe impl ::fidl_next::Wire for SeekOrigin {
10332 type Narrowed<'de> = Self;
10333
10334 #[inline]
10335 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10336 }
10338 }
10339
10340 impl SeekOrigin {
10341 pub const START: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(0) };
10342
10343 pub const CURRENT: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(1) };
10344
10345 pub const END: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(2) };
10346 }
10347
10348 unsafe impl<___D> ::fidl_next::Decode<___D> for SeekOrigin
10349 where
10350 ___D: ?Sized,
10351 {
10352 fn decode(
10353 slot: ::fidl_next::Slot<'_, Self>,
10354 _: &mut ___D,
10355 _: (),
10356 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10357 ::fidl_next::munge!(let Self { value } = slot);
10358
10359 match u32::from(*value) {
10360 0 | 1 | 2 => (),
10361 unknown => {
10362 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
10363 }
10364 }
10365
10366 Ok(())
10367 }
10368 }
10369
10370 impl ::core::convert::From<crate::natural::SeekOrigin> for SeekOrigin {
10371 fn from(natural: crate::natural::SeekOrigin) -> Self {
10372 match natural {
10373 crate::natural::SeekOrigin::Start => SeekOrigin::START,
10374
10375 crate::natural::SeekOrigin::Current => SeekOrigin::CURRENT,
10376
10377 crate::natural::SeekOrigin::End => SeekOrigin::END,
10378 }
10379 }
10380 }
10381
10382 impl ::fidl_next::IntoNatural for SeekOrigin {
10383 type Natural = crate::natural::SeekOrigin;
10384 }
10385
10386 #[derive(Clone, Debug)]
10388 #[repr(C)]
10389 pub struct AdvisoryLockRange {
10390 pub origin: crate::wire::SeekOrigin,
10391
10392 pub offset: ::fidl_next::wire::Int64,
10393
10394 pub length: ::fidl_next::wire::Int64,
10395 }
10396
10397 static_assertions::const_assert_eq!(std::mem::size_of::<AdvisoryLockRange>(), 24);
10398 static_assertions::const_assert_eq!(std::mem::align_of::<AdvisoryLockRange>(), 8);
10399
10400 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, origin), 0);
10401
10402 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, offset), 8);
10403
10404 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, length), 16);
10405
10406 impl ::fidl_next::Constrained for AdvisoryLockRange {
10407 type Constraint = ();
10408
10409 fn validate(
10410 _: ::fidl_next::Slot<'_, Self>,
10411 _: Self::Constraint,
10412 ) -> Result<(), ::fidl_next::ValidationError> {
10413 Ok(())
10414 }
10415 }
10416
10417 unsafe impl ::fidl_next::Wire for AdvisoryLockRange {
10418 type Narrowed<'de> = AdvisoryLockRange;
10419
10420 #[inline]
10421 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10422 ::fidl_next::munge! {
10423 let Self {
10424 origin,
10425 offset,
10426 length,
10427
10428 } = &mut *out_;
10429 }
10430
10431 ::fidl_next::Wire::zero_padding(origin);
10432
10433 ::fidl_next::Wire::zero_padding(offset);
10434
10435 ::fidl_next::Wire::zero_padding(length);
10436
10437 unsafe {
10438 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
10439 }
10440 }
10441 }
10442
10443 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockRange
10444 where
10445 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10446 {
10447 fn decode(
10448 slot_: ::fidl_next::Slot<'_, Self>,
10449 decoder_: &mut ___D,
10450 _: (),
10451 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10452 if slot_.as_bytes()[4..8] != [0u8; 4] {
10453 return Err(::fidl_next::DecodeError::InvalidPadding);
10454 }
10455
10456 ::fidl_next::munge! {
10457 let Self {
10458 mut origin,
10459 mut offset,
10460 mut length,
10461
10462 } = slot_;
10463 }
10464
10465 let _field = origin.as_mut();
10466
10467 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
10468
10469 let _field = offset.as_mut();
10470
10471 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
10472
10473 let _field = length.as_mut();
10474
10475 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
10476
10477 Ok(())
10478 }
10479 }
10480
10481 impl ::fidl_next::IntoNatural for AdvisoryLockRange {
10482 type Natural = crate::natural::AdvisoryLockRange;
10483 }
10484
10485 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
10487 #[repr(transparent)]
10488 pub struct AdvisoryLockType {
10489 pub(crate) value: ::fidl_next::wire::Uint32,
10490 }
10491
10492 impl ::fidl_next::Constrained for AdvisoryLockType {
10493 type Constraint = ();
10494
10495 fn validate(
10496 _: ::fidl_next::Slot<'_, Self>,
10497 _: Self::Constraint,
10498 ) -> Result<(), ::fidl_next::ValidationError> {
10499 Ok(())
10500 }
10501 }
10502
10503 unsafe impl ::fidl_next::Wire for AdvisoryLockType {
10504 type Narrowed<'de> = Self;
10505
10506 #[inline]
10507 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10508 }
10510 }
10511
10512 impl AdvisoryLockType {
10513 pub const READ: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::wire::Uint32(1) };
10514
10515 pub const WRITE: AdvisoryLockType =
10516 AdvisoryLockType { value: ::fidl_next::wire::Uint32(2) };
10517
10518 pub const UNLOCK: AdvisoryLockType =
10519 AdvisoryLockType { value: ::fidl_next::wire::Uint32(3) };
10520 }
10521
10522 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockType
10523 where
10524 ___D: ?Sized,
10525 {
10526 fn decode(
10527 slot: ::fidl_next::Slot<'_, Self>,
10528 _: &mut ___D,
10529 _: (),
10530 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10531 ::fidl_next::munge!(let Self { value } = slot);
10532
10533 match u32::from(*value) {
10534 1 | 2 | 3 => (),
10535 unknown => {
10536 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
10537 }
10538 }
10539
10540 Ok(())
10541 }
10542 }
10543
10544 impl ::core::convert::From<crate::natural::AdvisoryLockType> for AdvisoryLockType {
10545 fn from(natural: crate::natural::AdvisoryLockType) -> Self {
10546 match natural {
10547 crate::natural::AdvisoryLockType::Read => AdvisoryLockType::READ,
10548
10549 crate::natural::AdvisoryLockType::Write => AdvisoryLockType::WRITE,
10550
10551 crate::natural::AdvisoryLockType::Unlock => AdvisoryLockType::UNLOCK,
10552 }
10553 }
10554 }
10555
10556 impl ::fidl_next::IntoNatural for AdvisoryLockType {
10557 type Natural = crate::natural::AdvisoryLockType;
10558 }
10559
10560 #[repr(C)]
10562 pub struct AdvisoryLockRequest<'de> {
10563 pub(crate) table: ::fidl_next::wire::Table<'de>,
10564 }
10565
10566 impl<'de> Drop for AdvisoryLockRequest<'de> {
10567 fn drop(&mut self) {
10568 let _ = self.table.get(1).map(|envelope| unsafe {
10569 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
10570 });
10571
10572 let _ = self.table.get(2).map(|envelope| unsafe {
10573 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
10574 });
10575
10576 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
10577 }
10578 }
10579
10580 impl ::fidl_next::Constrained for AdvisoryLockRequest<'_> {
10581 type Constraint = ();
10582
10583 fn validate(
10584 _: ::fidl_next::Slot<'_, Self>,
10585 _: Self::Constraint,
10586 ) -> Result<(), ::fidl_next::ValidationError> {
10587 Ok(())
10588 }
10589 }
10590
10591 unsafe impl ::fidl_next::Wire for AdvisoryLockRequest<'static> {
10592 type Narrowed<'de> = AdvisoryLockRequest<'de>;
10593
10594 #[inline]
10595 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10596 ::fidl_next::munge!(let Self { table } = out);
10597 ::fidl_next::wire::Table::zero_padding(table);
10598 }
10599 }
10600
10601 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AdvisoryLockRequest<'de>
10602 where
10603 ___D: ::fidl_next::Decoder<'de> + ?Sized,
10604 {
10605 fn decode(
10606 slot: ::fidl_next::Slot<'_, Self>,
10607 decoder: &mut ___D,
10608 _: (),
10609 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10610 ::fidl_next::munge!(let Self { table } = slot);
10611
10612 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10613 match ordinal {
10614 0 => unsafe { ::core::hint::unreachable_unchecked() },
10615
10616 1 => {
10617 ::fidl_next::wire::Envelope::decode_as::<
10618 ___D,
10619 crate::wire::AdvisoryLockType,
10620 >(slot.as_mut(), decoder, ())?;
10621
10622 Ok(())
10623 }
10624
10625 2 => {
10626 ::fidl_next::wire::Envelope::decode_as::<
10627 ___D,
10628 crate::wire::AdvisoryLockRange,
10629 >(slot.as_mut(), decoder, ())?;
10630
10631 Ok(())
10632 }
10633
10634 3 => {
10635 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10636 slot.as_mut(),
10637 decoder,
10638 (),
10639 )?;
10640
10641 Ok(())
10642 }
10643
10644 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10645 }
10646 })
10647 }
10648 }
10649
10650 impl<'de> AdvisoryLockRequest<'de> {
10651 pub fn type_(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockType> {
10652 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10653 }
10654
10655 pub fn range(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockRange> {
10656 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10657 }
10658
10659 pub fn wait(&self) -> ::core::option::Option<&bool> {
10660 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10661 }
10662 }
10663
10664 impl<'de> ::core::fmt::Debug for AdvisoryLockRequest<'de> {
10665 fn fmt(
10666 &self,
10667 f: &mut ::core::fmt::Formatter<'_>,
10668 ) -> ::core::result::Result<(), ::core::fmt::Error> {
10669 f.debug_struct("AdvisoryLockRequest")
10670 .field("type_", &self.type_())
10671 .field("range", &self.range())
10672 .field("wait", &self.wait())
10673 .finish()
10674 }
10675 }
10676
10677 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockRequest<'de> {
10678 type Natural = crate::natural::AdvisoryLockRequest;
10679 }
10680
10681 #[derive(Debug)]
10683 #[repr(C)]
10684 pub struct AdvisoryLockingAdvisoryLockRequest<'de> {
10685 pub request: crate::wire::AdvisoryLockRequest<'de>,
10686 }
10687
10688 static_assertions::const_assert_eq!(
10689 std::mem::size_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
10690 16
10691 );
10692 static_assertions::const_assert_eq!(
10693 std::mem::align_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
10694 8
10695 );
10696
10697 static_assertions::const_assert_eq!(
10698 std::mem::offset_of!(AdvisoryLockingAdvisoryLockRequest<'_>, request),
10699 0
10700 );
10701
10702 impl ::fidl_next::Constrained for AdvisoryLockingAdvisoryLockRequest<'_> {
10703 type Constraint = ();
10704
10705 fn validate(
10706 _: ::fidl_next::Slot<'_, Self>,
10707 _: Self::Constraint,
10708 ) -> Result<(), ::fidl_next::ValidationError> {
10709 Ok(())
10710 }
10711 }
10712
10713 unsafe impl ::fidl_next::Wire for AdvisoryLockingAdvisoryLockRequest<'static> {
10714 type Narrowed<'de> = AdvisoryLockingAdvisoryLockRequest<'de>;
10715
10716 #[inline]
10717 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10718 ::fidl_next::munge! {
10719 let Self {
10720 request,
10721
10722 } = &mut *out_;
10723 }
10724
10725 ::fidl_next::Wire::zero_padding(request);
10726 }
10727 }
10728
10729 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AdvisoryLockingAdvisoryLockRequest<'de>
10730 where
10731 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10732 ___D: ::fidl_next::Decoder<'de>,
10733 {
10734 fn decode(
10735 slot_: ::fidl_next::Slot<'_, Self>,
10736 decoder_: &mut ___D,
10737 _: (),
10738 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10739 ::fidl_next::munge! {
10740 let Self {
10741 mut request,
10742
10743 } = slot_;
10744 }
10745
10746 let _field = request.as_mut();
10747
10748 ::fidl_next::Decode::decode(request.as_mut(), decoder_, ())?;
10749
10750 Ok(())
10751 }
10752 }
10753
10754 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockingAdvisoryLockRequest<'de> {
10755 type Natural = crate::natural::AdvisoryLockingAdvisoryLockRequest;
10756 }
10757
10758 pub type AdvisoryLockingAdvisoryLockResponse = ::fidl_next::wire::Unit;
10760
10761 #[derive(Clone, Copy, Debug)]
10763 #[repr(transparent)]
10764 pub struct AllocateMode {
10765 pub(crate) value: ::fidl_next::wire::Uint32,
10766 }
10767
10768 impl ::fidl_next::Constrained for AllocateMode {
10769 type Constraint = ();
10770
10771 fn validate(
10772 _: ::fidl_next::Slot<'_, Self>,
10773 _: Self::Constraint,
10774 ) -> Result<(), ::fidl_next::ValidationError> {
10775 Ok(())
10776 }
10777 }
10778
10779 unsafe impl ::fidl_next::Wire for AllocateMode {
10780 type Narrowed<'de> = Self;
10781
10782 #[inline]
10783 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10784 }
10786 }
10787
10788 unsafe impl<___D> ::fidl_next::Decode<___D> for AllocateMode
10789 where
10790 ___D: ?Sized,
10791 {
10792 fn decode(
10793 slot: ::fidl_next::Slot<'_, Self>,
10794 _: &mut ___D,
10795 _: (),
10796 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10797 Ok(())
10798 }
10799 }
10800
10801 impl ::core::convert::From<crate::natural::AllocateMode> for AllocateMode {
10802 fn from(natural: crate::natural::AllocateMode) -> Self {
10803 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
10804 }
10805 }
10806
10807 impl ::fidl_next::IntoNatural for AllocateMode {
10808 type Natural = crate::natural::AllocateMode;
10809 }
10810
10811 pub type Rights = crate::wire::Operations;
10813
10814 pub type Id = ::fidl_next::wire::Uint64;
10816
10817 #[derive(Clone, Copy, Debug)]
10819 #[repr(transparent)]
10820 pub struct OpenFlags {
10821 pub(crate) value: ::fidl_next::wire::Uint32,
10822 }
10823
10824 impl ::fidl_next::Constrained for OpenFlags {
10825 type Constraint = ();
10826
10827 fn validate(
10828 _: ::fidl_next::Slot<'_, Self>,
10829 _: Self::Constraint,
10830 ) -> Result<(), ::fidl_next::ValidationError> {
10831 Ok(())
10832 }
10833 }
10834
10835 unsafe impl ::fidl_next::Wire for OpenFlags {
10836 type Narrowed<'de> = Self;
10837
10838 #[inline]
10839 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10840 }
10842 }
10843
10844 unsafe impl<___D> ::fidl_next::Decode<___D> for OpenFlags
10845 where
10846 ___D: ?Sized,
10847 {
10848 fn decode(
10849 slot: ::fidl_next::Slot<'_, Self>,
10850 _: &mut ___D,
10851 _: (),
10852 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10853 ::fidl_next::munge!(let Self { value } = slot);
10854 let set = u32::from(*value);
10855 if set & !crate::natural::OpenFlags::all().bits() != 0 {
10856 return Err(::fidl_next::DecodeError::InvalidBits {
10857 expected: crate::natural::OpenFlags::all().bits() as usize,
10858 actual: set as usize,
10859 });
10860 }
10861
10862 Ok(())
10863 }
10864 }
10865
10866 impl ::core::convert::From<crate::natural::OpenFlags> for OpenFlags {
10867 fn from(natural: crate::natural::OpenFlags) -> Self {
10868 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
10869 }
10870 }
10871
10872 impl ::fidl_next::IntoNatural for OpenFlags {
10873 type Natural = crate::natural::OpenFlags;
10874 }
10875
10876 #[derive(Clone, Debug)]
10878 #[repr(C)]
10879 pub struct NodeAttributes {
10880 pub mode: ::fidl_next::wire::Uint32,
10881
10882 pub id: ::fidl_next::wire::Uint64,
10883
10884 pub content_size: ::fidl_next::wire::Uint64,
10885
10886 pub storage_size: ::fidl_next::wire::Uint64,
10887
10888 pub link_count: ::fidl_next::wire::Uint64,
10889
10890 pub creation_time: ::fidl_next::wire::Uint64,
10891
10892 pub modification_time: ::fidl_next::wire::Uint64,
10893 }
10894
10895 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes>(), 56);
10896 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes>(), 8);
10897
10898 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, mode), 0);
10899
10900 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, id), 8);
10901
10902 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, content_size), 16);
10903
10904 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, storage_size), 24);
10905
10906 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, link_count), 32);
10907
10908 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, creation_time), 40);
10909
10910 static_assertions::const_assert_eq!(
10911 std::mem::offset_of!(NodeAttributes, modification_time),
10912 48
10913 );
10914
10915 impl ::fidl_next::Constrained for NodeAttributes {
10916 type Constraint = ();
10917
10918 fn validate(
10919 _: ::fidl_next::Slot<'_, Self>,
10920 _: Self::Constraint,
10921 ) -> Result<(), ::fidl_next::ValidationError> {
10922 Ok(())
10923 }
10924 }
10925
10926 unsafe impl ::fidl_next::Wire for NodeAttributes {
10927 type Narrowed<'de> = NodeAttributes;
10928
10929 #[inline]
10930 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10931 ::fidl_next::munge! {
10932 let Self {
10933 mode,
10934 id,
10935 content_size,
10936 storage_size,
10937 link_count,
10938 creation_time,
10939 modification_time,
10940
10941 } = &mut *out_;
10942 }
10943
10944 ::fidl_next::Wire::zero_padding(mode);
10945
10946 ::fidl_next::Wire::zero_padding(id);
10947
10948 ::fidl_next::Wire::zero_padding(content_size);
10949
10950 ::fidl_next::Wire::zero_padding(storage_size);
10951
10952 ::fidl_next::Wire::zero_padding(link_count);
10953
10954 ::fidl_next::Wire::zero_padding(creation_time);
10955
10956 ::fidl_next::Wire::zero_padding(modification_time);
10957
10958 unsafe {
10959 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
10960 }
10961 }
10962 }
10963
10964 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributes
10965 where
10966 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10967 {
10968 fn decode(
10969 slot_: ::fidl_next::Slot<'_, Self>,
10970 decoder_: &mut ___D,
10971 _: (),
10972 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10973 if slot_.as_bytes()[4..8] != [0u8; 4] {
10974 return Err(::fidl_next::DecodeError::InvalidPadding);
10975 }
10976
10977 ::fidl_next::munge! {
10978 let Self {
10979 mut mode,
10980 mut id,
10981 mut content_size,
10982 mut storage_size,
10983 mut link_count,
10984 mut creation_time,
10985 mut modification_time,
10986
10987 } = slot_;
10988 }
10989
10990 let _field = mode.as_mut();
10991
10992 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
10993
10994 let _field = id.as_mut();
10995
10996 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
10997
10998 let _field = content_size.as_mut();
10999
11000 ::fidl_next::Decode::decode(content_size.as_mut(), decoder_, ())?;
11001
11002 let _field = storage_size.as_mut();
11003
11004 ::fidl_next::Decode::decode(storage_size.as_mut(), decoder_, ())?;
11005
11006 let _field = link_count.as_mut();
11007
11008 ::fidl_next::Decode::decode(link_count.as_mut(), decoder_, ())?;
11009
11010 let _field = creation_time.as_mut();
11011
11012 ::fidl_next::Decode::decode(creation_time.as_mut(), decoder_, ())?;
11013
11014 let _field = modification_time.as_mut();
11015
11016 ::fidl_next::Decode::decode(modification_time.as_mut(), decoder_, ())?;
11017
11018 Ok(())
11019 }
11020 }
11021
11022 impl ::fidl_next::IntoNatural for NodeAttributes {
11023 type Natural = crate::natural::NodeAttributes;
11024 }
11025
11026 #[derive(Clone, Copy, Debug)]
11028 #[repr(transparent)]
11029 pub struct NodeAttributeFlags {
11030 pub(crate) value: ::fidl_next::wire::Uint32,
11031 }
11032
11033 impl ::fidl_next::Constrained for NodeAttributeFlags {
11034 type Constraint = ();
11035
11036 fn validate(
11037 _: ::fidl_next::Slot<'_, Self>,
11038 _: Self::Constraint,
11039 ) -> Result<(), ::fidl_next::ValidationError> {
11040 Ok(())
11041 }
11042 }
11043
11044 unsafe impl ::fidl_next::Wire for NodeAttributeFlags {
11045 type Narrowed<'de> = Self;
11046
11047 #[inline]
11048 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11049 }
11051 }
11052
11053 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributeFlags
11054 where
11055 ___D: ?Sized,
11056 {
11057 fn decode(
11058 slot: ::fidl_next::Slot<'_, Self>,
11059 _: &mut ___D,
11060 _: (),
11061 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11062 ::fidl_next::munge!(let Self { value } = slot);
11063 let set = u32::from(*value);
11064 if set & !crate::natural::NodeAttributeFlags::all().bits() != 0 {
11065 return Err(::fidl_next::DecodeError::InvalidBits {
11066 expected: crate::natural::NodeAttributeFlags::all().bits() as usize,
11067 actual: set as usize,
11068 });
11069 }
11070
11071 Ok(())
11072 }
11073 }
11074
11075 impl ::core::convert::From<crate::natural::NodeAttributeFlags> for NodeAttributeFlags {
11076 fn from(natural: crate::natural::NodeAttributeFlags) -> Self {
11077 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11078 }
11079 }
11080
11081 impl ::fidl_next::IntoNatural for NodeAttributeFlags {
11082 type Natural = crate::natural::NodeAttributeFlags;
11083 }
11084
11085 #[derive(Debug)]
11087 #[repr(C)]
11088 pub struct NodeQueryFilesystemResponse<'de> {
11089 pub s: ::fidl_next::wire::Int32,
11090
11091 pub info: ::fidl_next::wire::Box<'de, crate::wire::FilesystemInfo>,
11092 }
11093
11094 static_assertions::const_assert_eq!(std::mem::size_of::<NodeQueryFilesystemResponse<'_>>(), 16);
11095 static_assertions::const_assert_eq!(std::mem::align_of::<NodeQueryFilesystemResponse<'_>>(), 8);
11096
11097 static_assertions::const_assert_eq!(
11098 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, s),
11099 0
11100 );
11101
11102 static_assertions::const_assert_eq!(
11103 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, info),
11104 8
11105 );
11106
11107 impl ::fidl_next::Constrained for NodeQueryFilesystemResponse<'_> {
11108 type Constraint = ();
11109
11110 fn validate(
11111 _: ::fidl_next::Slot<'_, Self>,
11112 _: Self::Constraint,
11113 ) -> Result<(), ::fidl_next::ValidationError> {
11114 Ok(())
11115 }
11116 }
11117
11118 unsafe impl ::fidl_next::Wire for NodeQueryFilesystemResponse<'static> {
11119 type Narrowed<'de> = NodeQueryFilesystemResponse<'de>;
11120
11121 #[inline]
11122 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11123 ::fidl_next::munge! {
11124 let Self {
11125 s,
11126 info,
11127
11128 } = &mut *out_;
11129 }
11130
11131 ::fidl_next::Wire::zero_padding(s);
11132
11133 ::fidl_next::Wire::zero_padding(info);
11134
11135 unsafe {
11136 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
11137 }
11138 }
11139 }
11140
11141 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeQueryFilesystemResponse<'de>
11142 where
11143 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11144 ___D: ::fidl_next::Decoder<'de>,
11145 {
11146 fn decode(
11147 slot_: ::fidl_next::Slot<'_, Self>,
11148 decoder_: &mut ___D,
11149 _: (),
11150 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11151 if slot_.as_bytes()[4..8] != [0u8; 4] {
11152 return Err(::fidl_next::DecodeError::InvalidPadding);
11153 }
11154
11155 ::fidl_next::munge! {
11156 let Self {
11157 mut s,
11158 mut info,
11159
11160 } = slot_;
11161 }
11162
11163 let _field = s.as_mut();
11164
11165 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11166
11167 let _field = info.as_mut();
11168
11169 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
11170
11171 Ok(())
11172 }
11173 }
11174
11175 impl<'de> ::fidl_next::IntoNatural for NodeQueryFilesystemResponse<'de> {
11176 type Natural = crate::natural::NodeQueryFilesystemResponse;
11177 }
11178
11179 pub type NodeUpdateAttributesResponse = ::fidl_next::wire::Unit;
11181
11182 pub type NodeSyncResponse = ::fidl_next::wire::Unit;
11184
11185 #[derive(Clone, Copy, Debug)]
11187 #[repr(transparent)]
11188 pub struct ModeType {
11189 pub(crate) value: ::fidl_next::wire::Uint32,
11190 }
11191
11192 impl ::fidl_next::Constrained for ModeType {
11193 type Constraint = ();
11194
11195 fn validate(
11196 _: ::fidl_next::Slot<'_, Self>,
11197 _: Self::Constraint,
11198 ) -> Result<(), ::fidl_next::ValidationError> {
11199 Ok(())
11200 }
11201 }
11202
11203 unsafe impl ::fidl_next::Wire for ModeType {
11204 type Narrowed<'de> = Self;
11205
11206 #[inline]
11207 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11208 }
11210 }
11211
11212 unsafe impl<___D> ::fidl_next::Decode<___D> for ModeType
11213 where
11214 ___D: ?Sized,
11215 {
11216 fn decode(
11217 slot: ::fidl_next::Slot<'_, Self>,
11218 _: &mut ___D,
11219 _: (),
11220 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11221 ::fidl_next::munge!(let Self { value } = slot);
11222 let set = u32::from(*value);
11223 if set & !crate::natural::ModeType::all().bits() != 0 {
11224 return Err(::fidl_next::DecodeError::InvalidBits {
11225 expected: crate::natural::ModeType::all().bits() as usize,
11226 actual: set as usize,
11227 });
11228 }
11229
11230 Ok(())
11231 }
11232 }
11233
11234 impl ::core::convert::From<crate::natural::ModeType> for ModeType {
11235 fn from(natural: crate::natural::ModeType) -> Self {
11236 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11237 }
11238 }
11239
11240 impl ::fidl_next::IntoNatural for ModeType {
11241 type Natural = crate::natural::ModeType;
11242 }
11243
11244 pub type Path<'de> = ::fidl_next::wire::String<'de>;
11246
11247 #[derive(Clone, Debug)]
11249 #[repr(C)]
11250 pub struct DirectoryReadDirentsRequest {
11251 pub max_bytes: ::fidl_next::wire::Uint64,
11252 }
11253
11254 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryReadDirentsRequest>(), 8);
11255 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryReadDirentsRequest>(), 8);
11256
11257 static_assertions::const_assert_eq!(
11258 std::mem::offset_of!(DirectoryReadDirentsRequest, max_bytes),
11259 0
11260 );
11261
11262 impl ::fidl_next::Constrained for DirectoryReadDirentsRequest {
11263 type Constraint = ();
11264
11265 fn validate(
11266 _: ::fidl_next::Slot<'_, Self>,
11267 _: Self::Constraint,
11268 ) -> Result<(), ::fidl_next::ValidationError> {
11269 Ok(())
11270 }
11271 }
11272
11273 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsRequest {
11274 type Narrowed<'de> = DirectoryReadDirentsRequest;
11275
11276 #[inline]
11277 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11278 ::fidl_next::munge! {
11279 let Self {
11280 max_bytes,
11281
11282 } = &mut *out_;
11283 }
11284
11285 ::fidl_next::Wire::zero_padding(max_bytes);
11286 }
11287 }
11288
11289 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsRequest
11290 where
11291 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11292 {
11293 fn decode(
11294 slot_: ::fidl_next::Slot<'_, Self>,
11295 decoder_: &mut ___D,
11296 _: (),
11297 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11298 ::fidl_next::munge! {
11299 let Self {
11300 mut max_bytes,
11301
11302 } = slot_;
11303 }
11304
11305 let _field = max_bytes.as_mut();
11306
11307 ::fidl_next::Decode::decode(max_bytes.as_mut(), decoder_, ())?;
11308
11309 Ok(())
11310 }
11311 }
11312
11313 impl ::fidl_next::IntoNatural for DirectoryReadDirentsRequest {
11314 type Natural = crate::natural::DirectoryReadDirentsRequest;
11315 }
11316
11317 #[derive(Debug)]
11319 #[repr(C)]
11320 pub struct DirectoryReadDirentsResponse<'de> {
11321 pub s: ::fidl_next::wire::Int32,
11322
11323 pub dirents: ::fidl_next::wire::Vector<'de, u8>,
11324 }
11325
11326 static_assertions::const_assert_eq!(
11327 std::mem::size_of::<DirectoryReadDirentsResponse<'_>>(),
11328 24
11329 );
11330 static_assertions::const_assert_eq!(
11331 std::mem::align_of::<DirectoryReadDirentsResponse<'_>>(),
11332 8
11333 );
11334
11335 static_assertions::const_assert_eq!(
11336 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, s),
11337 0
11338 );
11339
11340 static_assertions::const_assert_eq!(
11341 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, dirents),
11342 8
11343 );
11344
11345 impl ::fidl_next::Constrained for DirectoryReadDirentsResponse<'_> {
11346 type Constraint = ();
11347
11348 fn validate(
11349 _: ::fidl_next::Slot<'_, Self>,
11350 _: Self::Constraint,
11351 ) -> Result<(), ::fidl_next::ValidationError> {
11352 Ok(())
11353 }
11354 }
11355
11356 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsResponse<'static> {
11357 type Narrowed<'de> = DirectoryReadDirentsResponse<'de>;
11358
11359 #[inline]
11360 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11361 ::fidl_next::munge! {
11362 let Self {
11363 s,
11364 dirents,
11365
11366 } = &mut *out_;
11367 }
11368
11369 ::fidl_next::Wire::zero_padding(s);
11370
11371 ::fidl_next::Wire::zero_padding(dirents);
11372
11373 unsafe {
11374 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
11375 }
11376 }
11377 }
11378
11379 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsResponse<'de>
11380 where
11381 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11382 ___D: ::fidl_next::Decoder<'de>,
11383 {
11384 fn decode(
11385 slot_: ::fidl_next::Slot<'_, Self>,
11386 decoder_: &mut ___D,
11387 _: (),
11388 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11389 if slot_.as_bytes()[4..8] != [0u8; 4] {
11390 return Err(::fidl_next::DecodeError::InvalidPadding);
11391 }
11392
11393 ::fidl_next::munge! {
11394 let Self {
11395 mut s,
11396 mut dirents,
11397
11398 } = slot_;
11399 }
11400
11401 let _field = s.as_mut();
11402
11403 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11404
11405 let _field = dirents.as_mut();
11406 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
11407 ::fidl_next::Decode::decode(dirents.as_mut(), decoder_, (8192, ()))?;
11408
11409 let dirents = unsafe { dirents.deref_unchecked() };
11410
11411 if dirents.len() > 8192 {
11412 return Err(::fidl_next::DecodeError::VectorTooLong {
11413 size: dirents.len() as u64,
11414 limit: 8192,
11415 });
11416 }
11417
11418 Ok(())
11419 }
11420 }
11421
11422 impl<'de> ::fidl_next::IntoNatural for DirectoryReadDirentsResponse<'de> {
11423 type Natural = crate::natural::DirectoryReadDirentsResponse;
11424 }
11425
11426 #[derive(Clone, Debug)]
11428 #[repr(C)]
11429 pub struct DirectoryRewindResponse {
11430 pub s: ::fidl_next::wire::Int32,
11431 }
11432
11433 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRewindResponse>(), 4);
11434 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRewindResponse>(), 4);
11435
11436 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRewindResponse, s), 0);
11437
11438 impl ::fidl_next::Constrained for DirectoryRewindResponse {
11439 type Constraint = ();
11440
11441 fn validate(
11442 _: ::fidl_next::Slot<'_, Self>,
11443 _: Self::Constraint,
11444 ) -> Result<(), ::fidl_next::ValidationError> {
11445 Ok(())
11446 }
11447 }
11448
11449 unsafe impl ::fidl_next::Wire for DirectoryRewindResponse {
11450 type Narrowed<'de> = DirectoryRewindResponse;
11451
11452 #[inline]
11453 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11454 ::fidl_next::munge! {
11455 let Self {
11456 s,
11457
11458 } = &mut *out_;
11459 }
11460
11461 ::fidl_next::Wire::zero_padding(s);
11462 }
11463 }
11464
11465 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRewindResponse
11466 where
11467 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11468 {
11469 fn decode(
11470 slot_: ::fidl_next::Slot<'_, Self>,
11471 decoder_: &mut ___D,
11472 _: (),
11473 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11474 ::fidl_next::munge! {
11475 let Self {
11476 mut s,
11477
11478 } = slot_;
11479 }
11480
11481 let _field = s.as_mut();
11482
11483 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11484
11485 Ok(())
11486 }
11487 }
11488
11489 impl ::fidl_next::IntoNatural for DirectoryRewindResponse {
11490 type Natural = crate::natural::DirectoryRewindResponse;
11491 }
11492
11493 pub type Name<'de> = ::fidl_next::wire::String<'de>;
11495
11496 #[derive(Clone, Debug)]
11498 #[repr(C)]
11499 pub struct DirectoryLinkResponse {
11500 pub s: ::fidl_next::wire::Int32,
11501 }
11502
11503 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkResponse>(), 4);
11504 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkResponse>(), 4);
11505
11506 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkResponse, s), 0);
11507
11508 impl ::fidl_next::Constrained for DirectoryLinkResponse {
11509 type Constraint = ();
11510
11511 fn validate(
11512 _: ::fidl_next::Slot<'_, Self>,
11513 _: Self::Constraint,
11514 ) -> Result<(), ::fidl_next::ValidationError> {
11515 Ok(())
11516 }
11517 }
11518
11519 unsafe impl ::fidl_next::Wire for DirectoryLinkResponse {
11520 type Narrowed<'de> = DirectoryLinkResponse;
11521
11522 #[inline]
11523 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11524 ::fidl_next::munge! {
11525 let Self {
11526 s,
11527
11528 } = &mut *out_;
11529 }
11530
11531 ::fidl_next::Wire::zero_padding(s);
11532 }
11533 }
11534
11535 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryLinkResponse
11536 where
11537 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11538 {
11539 fn decode(
11540 slot_: ::fidl_next::Slot<'_, Self>,
11541 decoder_: &mut ___D,
11542 _: (),
11543 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11544 ::fidl_next::munge! {
11545 let Self {
11546 mut s,
11547
11548 } = slot_;
11549 }
11550
11551 let _field = s.as_mut();
11552
11553 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11554
11555 Ok(())
11556 }
11557 }
11558
11559 impl ::fidl_next::IntoNatural for DirectoryLinkResponse {
11560 type Natural = crate::natural::DirectoryLinkResponse;
11561 }
11562
11563 #[derive(Clone, Copy, Debug)]
11565 #[repr(transparent)]
11566 pub struct UnlinkFlags {
11567 pub(crate) value: ::fidl_next::wire::Uint64,
11568 }
11569
11570 impl ::fidl_next::Constrained for UnlinkFlags {
11571 type Constraint = ();
11572
11573 fn validate(
11574 _: ::fidl_next::Slot<'_, Self>,
11575 _: Self::Constraint,
11576 ) -> Result<(), ::fidl_next::ValidationError> {
11577 Ok(())
11578 }
11579 }
11580
11581 unsafe impl ::fidl_next::Wire for UnlinkFlags {
11582 type Narrowed<'de> = Self;
11583
11584 #[inline]
11585 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11586 }
11588 }
11589
11590 unsafe impl<___D> ::fidl_next::Decode<___D> for UnlinkFlags
11591 where
11592 ___D: ?Sized,
11593 {
11594 fn decode(
11595 slot: ::fidl_next::Slot<'_, Self>,
11596 _: &mut ___D,
11597 _: (),
11598 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11599 Ok(())
11600 }
11601 }
11602
11603 impl ::core::convert::From<crate::natural::UnlinkFlags> for UnlinkFlags {
11604 fn from(natural: crate::natural::UnlinkFlags) -> Self {
11605 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
11606 }
11607 }
11608
11609 impl ::fidl_next::IntoNatural for UnlinkFlags {
11610 type Natural = crate::natural::UnlinkFlags;
11611 }
11612
11613 #[repr(C)]
11615 pub struct UnlinkOptions<'de> {
11616 pub(crate) table: ::fidl_next::wire::Table<'de>,
11617 }
11618
11619 impl<'de> Drop for UnlinkOptions<'de> {
11620 fn drop(&mut self) {
11621 let _ = self
11622 .table
11623 .get(1)
11624 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::UnlinkFlags>() });
11625 }
11626 }
11627
11628 impl ::fidl_next::Constrained for UnlinkOptions<'_> {
11629 type Constraint = ();
11630
11631 fn validate(
11632 _: ::fidl_next::Slot<'_, Self>,
11633 _: Self::Constraint,
11634 ) -> Result<(), ::fidl_next::ValidationError> {
11635 Ok(())
11636 }
11637 }
11638
11639 unsafe impl ::fidl_next::Wire for UnlinkOptions<'static> {
11640 type Narrowed<'de> = UnlinkOptions<'de>;
11641
11642 #[inline]
11643 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11644 ::fidl_next::munge!(let Self { table } = out);
11645 ::fidl_next::wire::Table::zero_padding(table);
11646 }
11647 }
11648
11649 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnlinkOptions<'de>
11650 where
11651 ___D: ::fidl_next::Decoder<'de> + ?Sized,
11652 {
11653 fn decode(
11654 slot: ::fidl_next::Slot<'_, Self>,
11655 decoder: &mut ___D,
11656 _: (),
11657 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11658 ::fidl_next::munge!(let Self { table } = slot);
11659
11660 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11661 match ordinal {
11662 0 => unsafe { ::core::hint::unreachable_unchecked() },
11663
11664 1 => {
11665 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::UnlinkFlags>(
11666 slot.as_mut(),
11667 decoder,
11668 (),
11669 )?;
11670
11671 Ok(())
11672 }
11673
11674 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11675 }
11676 })
11677 }
11678 }
11679
11680 impl<'de> UnlinkOptions<'de> {
11681 pub fn flags(&self) -> ::core::option::Option<&crate::wire::UnlinkFlags> {
11682 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11683 }
11684 }
11685
11686 impl<'de> ::core::fmt::Debug for UnlinkOptions<'de> {
11687 fn fmt(
11688 &self,
11689 f: &mut ::core::fmt::Formatter<'_>,
11690 ) -> ::core::result::Result<(), ::core::fmt::Error> {
11691 f.debug_struct("UnlinkOptions").field("flags", &self.flags()).finish()
11692 }
11693 }
11694
11695 impl<'de> ::fidl_next::IntoNatural for UnlinkOptions<'de> {
11696 type Natural = crate::natural::UnlinkOptions;
11697 }
11698
11699 #[derive(Debug)]
11701 #[repr(C)]
11702 pub struct DirectoryUnlinkRequest<'de> {
11703 pub name: ::fidl_next::wire::String<'de>,
11704
11705 pub options: crate::wire::UnlinkOptions<'de>,
11706 }
11707
11708 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryUnlinkRequest<'_>>(), 32);
11709 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryUnlinkRequest<'_>>(), 8);
11710
11711 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryUnlinkRequest<'_>, name), 0);
11712
11713 static_assertions::const_assert_eq!(
11714 std::mem::offset_of!(DirectoryUnlinkRequest<'_>, options),
11715 16
11716 );
11717
11718 impl ::fidl_next::Constrained for DirectoryUnlinkRequest<'_> {
11719 type Constraint = ();
11720
11721 fn validate(
11722 _: ::fidl_next::Slot<'_, Self>,
11723 _: Self::Constraint,
11724 ) -> Result<(), ::fidl_next::ValidationError> {
11725 Ok(())
11726 }
11727 }
11728
11729 unsafe impl ::fidl_next::Wire for DirectoryUnlinkRequest<'static> {
11730 type Narrowed<'de> = DirectoryUnlinkRequest<'de>;
11731
11732 #[inline]
11733 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11734 ::fidl_next::munge! {
11735 let Self {
11736 name,
11737 options,
11738
11739 } = &mut *out_;
11740 }
11741
11742 ::fidl_next::Wire::zero_padding(name);
11743
11744 ::fidl_next::Wire::zero_padding(options);
11745 }
11746 }
11747
11748 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryUnlinkRequest<'de>
11749 where
11750 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11751 ___D: ::fidl_next::Decoder<'de>,
11752 {
11753 fn decode(
11754 slot_: ::fidl_next::Slot<'_, Self>,
11755 decoder_: &mut ___D,
11756 _: (),
11757 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11758 ::fidl_next::munge! {
11759 let Self {
11760 mut name,
11761 mut options,
11762
11763 } = slot_;
11764 }
11765
11766 let _field = name.as_mut();
11767 ::fidl_next::Constrained::validate(_field, 255)?;
11768 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
11769
11770 let name = unsafe { name.deref_unchecked() };
11771
11772 if name.len() > 255 {
11773 return Err(::fidl_next::DecodeError::VectorTooLong {
11774 size: name.len() as u64,
11775 limit: 255,
11776 });
11777 }
11778
11779 let _field = options.as_mut();
11780
11781 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
11782
11783 Ok(())
11784 }
11785 }
11786
11787 impl<'de> ::fidl_next::IntoNatural for DirectoryUnlinkRequest<'de> {
11788 type Natural = crate::natural::DirectoryUnlinkRequest;
11789 }
11790
11791 pub type DirectoryUnlinkResponse = ::fidl_next::wire::Unit;
11793
11794 pub type DirectoryRenameResponse = ::fidl_next::wire::Unit;
11796
11797 #[derive(Clone, Copy, Debug)]
11799 #[repr(transparent)]
11800 pub struct WatchMask {
11801 pub(crate) value: ::fidl_next::wire::Uint32,
11802 }
11803
11804 impl ::fidl_next::Constrained for WatchMask {
11805 type Constraint = ();
11806
11807 fn validate(
11808 _: ::fidl_next::Slot<'_, Self>,
11809 _: Self::Constraint,
11810 ) -> Result<(), ::fidl_next::ValidationError> {
11811 Ok(())
11812 }
11813 }
11814
11815 unsafe impl ::fidl_next::Wire for WatchMask {
11816 type Narrowed<'de> = Self;
11817
11818 #[inline]
11819 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11820 }
11822 }
11823
11824 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchMask
11825 where
11826 ___D: ?Sized,
11827 {
11828 fn decode(
11829 slot: ::fidl_next::Slot<'_, Self>,
11830 _: &mut ___D,
11831 _: (),
11832 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11833 ::fidl_next::munge!(let Self { value } = slot);
11834 let set = u32::from(*value);
11835 if set & !crate::natural::WatchMask::all().bits() != 0 {
11836 return Err(::fidl_next::DecodeError::InvalidBits {
11837 expected: crate::natural::WatchMask::all().bits() as usize,
11838 actual: set as usize,
11839 });
11840 }
11841
11842 Ok(())
11843 }
11844 }
11845
11846 impl ::core::convert::From<crate::natural::WatchMask> for WatchMask {
11847 fn from(natural: crate::natural::WatchMask) -> Self {
11848 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11849 }
11850 }
11851
11852 impl ::fidl_next::IntoNatural for WatchMask {
11853 type Natural = crate::natural::WatchMask;
11854 }
11855
11856 #[derive(Clone, Debug)]
11858 #[repr(C)]
11859 pub struct DirectoryWatchResponse {
11860 pub s: ::fidl_next::wire::Int32,
11861 }
11862
11863 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchResponse>(), 4);
11864 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchResponse>(), 4);
11865
11866 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchResponse, s), 0);
11867
11868 impl ::fidl_next::Constrained for DirectoryWatchResponse {
11869 type Constraint = ();
11870
11871 fn validate(
11872 _: ::fidl_next::Slot<'_, Self>,
11873 _: Self::Constraint,
11874 ) -> Result<(), ::fidl_next::ValidationError> {
11875 Ok(())
11876 }
11877 }
11878
11879 unsafe impl ::fidl_next::Wire for DirectoryWatchResponse {
11880 type Narrowed<'de> = DirectoryWatchResponse;
11881
11882 #[inline]
11883 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11884 ::fidl_next::munge! {
11885 let Self {
11886 s,
11887
11888 } = &mut *out_;
11889 }
11890
11891 ::fidl_next::Wire::zero_padding(s);
11892 }
11893 }
11894
11895 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchResponse
11896 where
11897 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11898 {
11899 fn decode(
11900 slot_: ::fidl_next::Slot<'_, Self>,
11901 decoder_: &mut ___D,
11902 _: (),
11903 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11904 ::fidl_next::munge! {
11905 let Self {
11906 mut s,
11907
11908 } = slot_;
11909 }
11910
11911 let _field = s.as_mut();
11912
11913 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11914
11915 Ok(())
11916 }
11917 }
11918
11919 impl ::fidl_next::IntoNatural for DirectoryWatchResponse {
11920 type Natural = crate::natural::DirectoryWatchResponse;
11921 }
11922
11923 pub type SymlinkTarget<'de> = ::fidl_next::wire::Vector<'de, u8>;
11925
11926 pub type ExtendedAttributeName<'de> = ::fidl_next::wire::Vector<'de, u8>;
11928
11929 #[derive(Debug)]
11931 #[repr(C)]
11932 pub struct NodeGetExtendedAttributeRequest<'de> {
11933 pub name: ::fidl_next::wire::Vector<'de, u8>,
11934 }
11935
11936 static_assertions::const_assert_eq!(
11937 std::mem::size_of::<NodeGetExtendedAttributeRequest<'_>>(),
11938 16
11939 );
11940 static_assertions::const_assert_eq!(
11941 std::mem::align_of::<NodeGetExtendedAttributeRequest<'_>>(),
11942 8
11943 );
11944
11945 static_assertions::const_assert_eq!(
11946 std::mem::offset_of!(NodeGetExtendedAttributeRequest<'_>, name),
11947 0
11948 );
11949
11950 impl ::fidl_next::Constrained for NodeGetExtendedAttributeRequest<'_> {
11951 type Constraint = ();
11952
11953 fn validate(
11954 _: ::fidl_next::Slot<'_, Self>,
11955 _: Self::Constraint,
11956 ) -> Result<(), ::fidl_next::ValidationError> {
11957 Ok(())
11958 }
11959 }
11960
11961 unsafe impl ::fidl_next::Wire for NodeGetExtendedAttributeRequest<'static> {
11962 type Narrowed<'de> = NodeGetExtendedAttributeRequest<'de>;
11963
11964 #[inline]
11965 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11966 ::fidl_next::munge! {
11967 let Self {
11968 name,
11969
11970 } = &mut *out_;
11971 }
11972
11973 ::fidl_next::Wire::zero_padding(name);
11974 }
11975 }
11976
11977 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeGetExtendedAttributeRequest<'de>
11978 where
11979 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11980 ___D: ::fidl_next::Decoder<'de>,
11981 {
11982 fn decode(
11983 slot_: ::fidl_next::Slot<'_, Self>,
11984 decoder_: &mut ___D,
11985 _: (),
11986 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11987 ::fidl_next::munge! {
11988 let Self {
11989 mut name,
11990
11991 } = slot_;
11992 }
11993
11994 let _field = name.as_mut();
11995 ::fidl_next::Constrained::validate(_field, (255, ()))?;
11996 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
11997
11998 let name = unsafe { name.deref_unchecked() };
11999
12000 if name.len() > 255 {
12001 return Err(::fidl_next::DecodeError::VectorTooLong {
12002 size: name.len() as u64,
12003 limit: 255,
12004 });
12005 }
12006
12007 Ok(())
12008 }
12009 }
12010
12011 impl<'de> ::fidl_next::IntoNatural for NodeGetExtendedAttributeRequest<'de> {
12012 type Natural = crate::natural::NodeGetExtendedAttributeRequest;
12013 }
12014
12015 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12017 #[repr(transparent)]
12018 pub struct SetExtendedAttributeMode {
12019 pub(crate) value: ::fidl_next::wire::Uint32,
12020 }
12021
12022 impl ::fidl_next::Constrained for SetExtendedAttributeMode {
12023 type Constraint = ();
12024
12025 fn validate(
12026 _: ::fidl_next::Slot<'_, Self>,
12027 _: Self::Constraint,
12028 ) -> Result<(), ::fidl_next::ValidationError> {
12029 Ok(())
12030 }
12031 }
12032
12033 unsafe impl ::fidl_next::Wire for SetExtendedAttributeMode {
12034 type Narrowed<'de> = Self;
12035
12036 #[inline]
12037 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12038 }
12040 }
12041
12042 impl SetExtendedAttributeMode {
12043 pub const SET: SetExtendedAttributeMode =
12044 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(1) };
12045
12046 pub const CREATE: SetExtendedAttributeMode =
12047 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(2) };
12048
12049 pub const REPLACE: SetExtendedAttributeMode =
12050 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(3) };
12051 }
12052
12053 unsafe impl<___D> ::fidl_next::Decode<___D> for SetExtendedAttributeMode
12054 where
12055 ___D: ?Sized,
12056 {
12057 fn decode(
12058 slot: ::fidl_next::Slot<'_, Self>,
12059 _: &mut ___D,
12060 _: (),
12061 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12062 ::fidl_next::munge!(let Self { value } = slot);
12063
12064 match u32::from(*value) {
12065 1 | 2 | 3 => (),
12066 unknown => {
12067 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
12068 }
12069 }
12070
12071 Ok(())
12072 }
12073 }
12074
12075 impl ::core::convert::From<crate::natural::SetExtendedAttributeMode> for SetExtendedAttributeMode {
12076 fn from(natural: crate::natural::SetExtendedAttributeMode) -> Self {
12077 match natural {
12078 crate::natural::SetExtendedAttributeMode::Set => SetExtendedAttributeMode::SET,
12079
12080 crate::natural::SetExtendedAttributeMode::Create => {
12081 SetExtendedAttributeMode::CREATE
12082 }
12083
12084 crate::natural::SetExtendedAttributeMode::Replace => {
12085 SetExtendedAttributeMode::REPLACE
12086 }
12087 }
12088 }
12089 }
12090
12091 impl ::fidl_next::IntoNatural for SetExtendedAttributeMode {
12092 type Natural = crate::natural::SetExtendedAttributeMode;
12093 }
12094
12095 pub type NodeSetExtendedAttributeResponse = ::fidl_next::wire::Unit;
12097
12098 #[derive(Debug)]
12100 #[repr(C)]
12101 pub struct NodeRemoveExtendedAttributeRequest<'de> {
12102 pub name: ::fidl_next::wire::Vector<'de, u8>,
12103 }
12104
12105 static_assertions::const_assert_eq!(
12106 std::mem::size_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
12107 16
12108 );
12109 static_assertions::const_assert_eq!(
12110 std::mem::align_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
12111 8
12112 );
12113
12114 static_assertions::const_assert_eq!(
12115 std::mem::offset_of!(NodeRemoveExtendedAttributeRequest<'_>, name),
12116 0
12117 );
12118
12119 impl ::fidl_next::Constrained for NodeRemoveExtendedAttributeRequest<'_> {
12120 type Constraint = ();
12121
12122 fn validate(
12123 _: ::fidl_next::Slot<'_, Self>,
12124 _: Self::Constraint,
12125 ) -> Result<(), ::fidl_next::ValidationError> {
12126 Ok(())
12127 }
12128 }
12129
12130 unsafe impl ::fidl_next::Wire for NodeRemoveExtendedAttributeRequest<'static> {
12131 type Narrowed<'de> = NodeRemoveExtendedAttributeRequest<'de>;
12132
12133 #[inline]
12134 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12135 ::fidl_next::munge! {
12136 let Self {
12137 name,
12138
12139 } = &mut *out_;
12140 }
12141
12142 ::fidl_next::Wire::zero_padding(name);
12143 }
12144 }
12145
12146 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeRemoveExtendedAttributeRequest<'de>
12147 where
12148 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12149 ___D: ::fidl_next::Decoder<'de>,
12150 {
12151 fn decode(
12152 slot_: ::fidl_next::Slot<'_, Self>,
12153 decoder_: &mut ___D,
12154 _: (),
12155 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12156 ::fidl_next::munge! {
12157 let Self {
12158 mut name,
12159
12160 } = slot_;
12161 }
12162
12163 let _field = name.as_mut();
12164 ::fidl_next::Constrained::validate(_field, (255, ()))?;
12165 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
12166
12167 let name = unsafe { name.deref_unchecked() };
12168
12169 if name.len() > 255 {
12170 return Err(::fidl_next::DecodeError::VectorTooLong {
12171 size: name.len() as u64,
12172 limit: 255,
12173 });
12174 }
12175
12176 Ok(())
12177 }
12178 }
12179
12180 impl<'de> ::fidl_next::IntoNatural for NodeRemoveExtendedAttributeRequest<'de> {
12181 type Natural = crate::natural::NodeRemoveExtendedAttributeRequest;
12182 }
12183
12184 pub type NodeRemoveExtendedAttributeResponse = ::fidl_next::wire::Unit;
12186
12187 pub type DirectoryCreateSymlinkResponse = ::fidl_next::wire::Unit;
12189
12190 pub type NodeSetFlagsResponse = ::fidl_next::wire::Unit;
12192
12193 #[derive(Clone, Debug)]
12195 #[repr(C)]
12196 pub struct NodeDeprecatedGetAttrResponse {
12197 pub s: ::fidl_next::wire::Int32,
12198
12199 pub attributes: crate::wire::NodeAttributes,
12200 }
12201
12202 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetAttrResponse>(), 64);
12203 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetAttrResponse>(), 8);
12204
12205 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetAttrResponse, s), 0);
12206
12207 static_assertions::const_assert_eq!(
12208 std::mem::offset_of!(NodeDeprecatedGetAttrResponse, attributes),
12209 8
12210 );
12211
12212 impl ::fidl_next::Constrained for NodeDeprecatedGetAttrResponse {
12213 type Constraint = ();
12214
12215 fn validate(
12216 _: ::fidl_next::Slot<'_, Self>,
12217 _: Self::Constraint,
12218 ) -> Result<(), ::fidl_next::ValidationError> {
12219 Ok(())
12220 }
12221 }
12222
12223 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetAttrResponse {
12224 type Narrowed<'de> = NodeDeprecatedGetAttrResponse;
12225
12226 #[inline]
12227 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12228 ::fidl_next::munge! {
12229 let Self {
12230 s,
12231 attributes,
12232
12233 } = &mut *out_;
12234 }
12235
12236 ::fidl_next::Wire::zero_padding(s);
12237
12238 ::fidl_next::Wire::zero_padding(attributes);
12239
12240 unsafe {
12241 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12242 }
12243 }
12244 }
12245
12246 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetAttrResponse
12247 where
12248 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12249 {
12250 fn decode(
12251 slot_: ::fidl_next::Slot<'_, Self>,
12252 decoder_: &mut ___D,
12253 _: (),
12254 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12255 if slot_.as_bytes()[4..8] != [0u8; 4] {
12256 return Err(::fidl_next::DecodeError::InvalidPadding);
12257 }
12258
12259 ::fidl_next::munge! {
12260 let Self {
12261 mut s,
12262 mut attributes,
12263
12264 } = slot_;
12265 }
12266
12267 let _field = s.as_mut();
12268
12269 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12270
12271 let _field = attributes.as_mut();
12272
12273 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
12274
12275 Ok(())
12276 }
12277 }
12278
12279 impl ::fidl_next::IntoNatural for NodeDeprecatedGetAttrResponse {
12280 type Natural = crate::natural::NodeDeprecatedGetAttrResponse;
12281 }
12282
12283 #[derive(Clone, Debug)]
12285 #[repr(C)]
12286 pub struct NodeDeprecatedSetAttrRequest {
12287 pub flags: crate::wire::NodeAttributeFlags,
12288
12289 pub attributes: crate::wire::NodeAttributes,
12290 }
12291
12292 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrRequest>(), 64);
12293 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrRequest>(), 8);
12294
12295 static_assertions::const_assert_eq!(
12296 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, flags),
12297 0
12298 );
12299
12300 static_assertions::const_assert_eq!(
12301 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, attributes),
12302 8
12303 );
12304
12305 impl ::fidl_next::Constrained for NodeDeprecatedSetAttrRequest {
12306 type Constraint = ();
12307
12308 fn validate(
12309 _: ::fidl_next::Slot<'_, Self>,
12310 _: Self::Constraint,
12311 ) -> Result<(), ::fidl_next::ValidationError> {
12312 Ok(())
12313 }
12314 }
12315
12316 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrRequest {
12317 type Narrowed<'de> = NodeDeprecatedSetAttrRequest;
12318
12319 #[inline]
12320 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12321 ::fidl_next::munge! {
12322 let Self {
12323 flags,
12324 attributes,
12325
12326 } = &mut *out_;
12327 }
12328
12329 ::fidl_next::Wire::zero_padding(flags);
12330
12331 ::fidl_next::Wire::zero_padding(attributes);
12332
12333 unsafe {
12334 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12335 }
12336 }
12337 }
12338
12339 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrRequest
12340 where
12341 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12342 {
12343 fn decode(
12344 slot_: ::fidl_next::Slot<'_, Self>,
12345 decoder_: &mut ___D,
12346 _: (),
12347 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12348 if slot_.as_bytes()[4..8] != [0u8; 4] {
12349 return Err(::fidl_next::DecodeError::InvalidPadding);
12350 }
12351
12352 ::fidl_next::munge! {
12353 let Self {
12354 mut flags,
12355 mut attributes,
12356
12357 } = slot_;
12358 }
12359
12360 let _field = flags.as_mut();
12361
12362 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12363
12364 let _field = attributes.as_mut();
12365
12366 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
12367
12368 Ok(())
12369 }
12370 }
12371
12372 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrRequest {
12373 type Natural = crate::natural::NodeDeprecatedSetAttrRequest;
12374 }
12375
12376 #[derive(Clone, Debug)]
12378 #[repr(C)]
12379 pub struct NodeDeprecatedSetAttrResponse {
12380 pub s: ::fidl_next::wire::Int32,
12381 }
12382
12383 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrResponse>(), 4);
12384 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrResponse>(), 4);
12385
12386 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetAttrResponse, s), 0);
12387
12388 impl ::fidl_next::Constrained for NodeDeprecatedSetAttrResponse {
12389 type Constraint = ();
12390
12391 fn validate(
12392 _: ::fidl_next::Slot<'_, Self>,
12393 _: Self::Constraint,
12394 ) -> Result<(), ::fidl_next::ValidationError> {
12395 Ok(())
12396 }
12397 }
12398
12399 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrResponse {
12400 type Narrowed<'de> = NodeDeprecatedSetAttrResponse;
12401
12402 #[inline]
12403 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12404 ::fidl_next::munge! {
12405 let Self {
12406 s,
12407
12408 } = &mut *out_;
12409 }
12410
12411 ::fidl_next::Wire::zero_padding(s);
12412 }
12413 }
12414
12415 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrResponse
12416 where
12417 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12418 {
12419 fn decode(
12420 slot_: ::fidl_next::Slot<'_, Self>,
12421 decoder_: &mut ___D,
12422 _: (),
12423 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12424 ::fidl_next::munge! {
12425 let Self {
12426 mut s,
12427
12428 } = slot_;
12429 }
12430
12431 let _field = s.as_mut();
12432
12433 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12434
12435 Ok(())
12436 }
12437 }
12438
12439 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrResponse {
12440 type Natural = crate::natural::NodeDeprecatedSetAttrResponse;
12441 }
12442
12443 #[derive(Clone, Debug)]
12445 #[repr(C)]
12446 pub struct NodeDeprecatedGetFlagsResponse {
12447 pub s: ::fidl_next::wire::Int32,
12448
12449 pub flags: crate::wire::OpenFlags,
12450 }
12451
12452 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetFlagsResponse>(), 8);
12453 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetFlagsResponse>(), 4);
12454
12455 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, s), 0);
12456
12457 static_assertions::const_assert_eq!(
12458 std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, flags),
12459 4
12460 );
12461
12462 impl ::fidl_next::Constrained for NodeDeprecatedGetFlagsResponse {
12463 type Constraint = ();
12464
12465 fn validate(
12466 _: ::fidl_next::Slot<'_, Self>,
12467 _: Self::Constraint,
12468 ) -> Result<(), ::fidl_next::ValidationError> {
12469 Ok(())
12470 }
12471 }
12472
12473 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetFlagsResponse {
12474 type Narrowed<'de> = NodeDeprecatedGetFlagsResponse;
12475
12476 #[inline]
12477 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12478 ::fidl_next::munge! {
12479 let Self {
12480 s,
12481 flags,
12482
12483 } = &mut *out_;
12484 }
12485
12486 ::fidl_next::Wire::zero_padding(s);
12487
12488 ::fidl_next::Wire::zero_padding(flags);
12489 }
12490 }
12491
12492 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetFlagsResponse
12493 where
12494 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12495 {
12496 fn decode(
12497 slot_: ::fidl_next::Slot<'_, Self>,
12498 decoder_: &mut ___D,
12499 _: (),
12500 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12501 ::fidl_next::munge! {
12502 let Self {
12503 mut s,
12504 mut flags,
12505
12506 } = slot_;
12507 }
12508
12509 let _field = s.as_mut();
12510
12511 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12512
12513 let _field = flags.as_mut();
12514
12515 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12516
12517 Ok(())
12518 }
12519 }
12520
12521 impl ::fidl_next::IntoNatural for NodeDeprecatedGetFlagsResponse {
12522 type Natural = crate::natural::NodeDeprecatedGetFlagsResponse;
12523 }
12524
12525 #[derive(Clone, Debug)]
12527 #[repr(C)]
12528 pub struct NodeDeprecatedSetFlagsRequest {
12529 pub flags: crate::wire::OpenFlags,
12530 }
12531
12532 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsRequest>(), 4);
12533 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsRequest>(), 4);
12534
12535 static_assertions::const_assert_eq!(
12536 std::mem::offset_of!(NodeDeprecatedSetFlagsRequest, flags),
12537 0
12538 );
12539
12540 impl ::fidl_next::Constrained for NodeDeprecatedSetFlagsRequest {
12541 type Constraint = ();
12542
12543 fn validate(
12544 _: ::fidl_next::Slot<'_, Self>,
12545 _: Self::Constraint,
12546 ) -> Result<(), ::fidl_next::ValidationError> {
12547 Ok(())
12548 }
12549 }
12550
12551 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsRequest {
12552 type Narrowed<'de> = NodeDeprecatedSetFlagsRequest;
12553
12554 #[inline]
12555 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12556 ::fidl_next::munge! {
12557 let Self {
12558 flags,
12559
12560 } = &mut *out_;
12561 }
12562
12563 ::fidl_next::Wire::zero_padding(flags);
12564 }
12565 }
12566
12567 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsRequest
12568 where
12569 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12570 {
12571 fn decode(
12572 slot_: ::fidl_next::Slot<'_, Self>,
12573 decoder_: &mut ___D,
12574 _: (),
12575 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12576 ::fidl_next::munge! {
12577 let Self {
12578 mut flags,
12579
12580 } = slot_;
12581 }
12582
12583 let _field = flags.as_mut();
12584
12585 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12586
12587 Ok(())
12588 }
12589 }
12590
12591 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsRequest {
12592 type Natural = crate::natural::NodeDeprecatedSetFlagsRequest;
12593 }
12594
12595 #[derive(Clone, Debug)]
12597 #[repr(C)]
12598 pub struct NodeDeprecatedSetFlagsResponse {
12599 pub s: ::fidl_next::wire::Int32,
12600 }
12601
12602 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsResponse>(), 4);
12603 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsResponse>(), 4);
12604
12605 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetFlagsResponse, s), 0);
12606
12607 impl ::fidl_next::Constrained for NodeDeprecatedSetFlagsResponse {
12608 type Constraint = ();
12609
12610 fn validate(
12611 _: ::fidl_next::Slot<'_, Self>,
12612 _: Self::Constraint,
12613 ) -> Result<(), ::fidl_next::ValidationError> {
12614 Ok(())
12615 }
12616 }
12617
12618 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsResponse {
12619 type Narrowed<'de> = NodeDeprecatedSetFlagsResponse;
12620
12621 #[inline]
12622 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12623 ::fidl_next::munge! {
12624 let Self {
12625 s,
12626
12627 } = &mut *out_;
12628 }
12629
12630 ::fidl_next::Wire::zero_padding(s);
12631 }
12632 }
12633
12634 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsResponse
12635 where
12636 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12637 {
12638 fn decode(
12639 slot_: ::fidl_next::Slot<'_, Self>,
12640 decoder_: &mut ___D,
12641 _: (),
12642 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12643 ::fidl_next::munge! {
12644 let Self {
12645 mut s,
12646
12647 } = slot_;
12648 }
12649
12650 let _field = s.as_mut();
12651
12652 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12653
12654 Ok(())
12655 }
12656 }
12657
12658 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsResponse {
12659 type Natural = crate::natural::NodeDeprecatedSetFlagsResponse;
12660 }
12661
12662 #[derive(Clone, Copy, Debug)]
12664 #[repr(transparent)]
12665 pub struct Flags {
12666 pub(crate) value: ::fidl_next::wire::Uint64,
12667 }
12668
12669 impl ::fidl_next::Constrained for Flags {
12670 type Constraint = ();
12671
12672 fn validate(
12673 _: ::fidl_next::Slot<'_, Self>,
12674 _: Self::Constraint,
12675 ) -> Result<(), ::fidl_next::ValidationError> {
12676 Ok(())
12677 }
12678 }
12679
12680 unsafe impl ::fidl_next::Wire for Flags {
12681 type Narrowed<'de> = Self;
12682
12683 #[inline]
12684 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12685 }
12687 }
12688
12689 unsafe impl<___D> ::fidl_next::Decode<___D> for Flags
12690 where
12691 ___D: ?Sized,
12692 {
12693 fn decode(
12694 slot: ::fidl_next::Slot<'_, Self>,
12695 _: &mut ___D,
12696 _: (),
12697 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12698 Ok(())
12699 }
12700 }
12701
12702 impl ::core::convert::From<crate::natural::Flags> for Flags {
12703 fn from(natural: crate::natural::Flags) -> Self {
12704 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
12705 }
12706 }
12707
12708 impl ::fidl_next::IntoNatural for Flags {
12709 type Natural = crate::natural::Flags;
12710 }
12711
12712 #[derive(Clone, Debug)]
12714 #[repr(C)]
12715 pub struct NodeGetFlagsResponse {
12716 pub flags: crate::wire::Flags,
12717 }
12718
12719 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetFlagsResponse>(), 8);
12720 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetFlagsResponse>(), 8);
12721
12722 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetFlagsResponse, flags), 0);
12723
12724 impl ::fidl_next::Constrained for NodeGetFlagsResponse {
12725 type Constraint = ();
12726
12727 fn validate(
12728 _: ::fidl_next::Slot<'_, Self>,
12729 _: Self::Constraint,
12730 ) -> Result<(), ::fidl_next::ValidationError> {
12731 Ok(())
12732 }
12733 }
12734
12735 unsafe impl ::fidl_next::Wire for NodeGetFlagsResponse {
12736 type Narrowed<'de> = NodeGetFlagsResponse;
12737
12738 #[inline]
12739 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12740 ::fidl_next::munge! {
12741 let Self {
12742 flags,
12743
12744 } = &mut *out_;
12745 }
12746
12747 ::fidl_next::Wire::zero_padding(flags);
12748 }
12749 }
12750
12751 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetFlagsResponse
12752 where
12753 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12754 {
12755 fn decode(
12756 slot_: ::fidl_next::Slot<'_, Self>,
12757 decoder_: &mut ___D,
12758 _: (),
12759 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12760 ::fidl_next::munge! {
12761 let Self {
12762 mut flags,
12763
12764 } = slot_;
12765 }
12766
12767 let _field = flags.as_mut();
12768
12769 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12770
12771 Ok(())
12772 }
12773 }
12774
12775 impl ::fidl_next::IntoNatural for NodeGetFlagsResponse {
12776 type Natural = crate::natural::NodeGetFlagsResponse;
12777 }
12778
12779 #[derive(Clone, Debug)]
12781 #[repr(C)]
12782 pub struct NodeSetFlagsRequest {
12783 pub flags: crate::wire::Flags,
12784 }
12785
12786 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetFlagsRequest>(), 8);
12787 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSetFlagsRequest>(), 8);
12788
12789 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeSetFlagsRequest, flags), 0);
12790
12791 impl ::fidl_next::Constrained for NodeSetFlagsRequest {
12792 type Constraint = ();
12793
12794 fn validate(
12795 _: ::fidl_next::Slot<'_, Self>,
12796 _: Self::Constraint,
12797 ) -> Result<(), ::fidl_next::ValidationError> {
12798 Ok(())
12799 }
12800 }
12801
12802 unsafe impl ::fidl_next::Wire for NodeSetFlagsRequest {
12803 type Narrowed<'de> = NodeSetFlagsRequest;
12804
12805 #[inline]
12806 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12807 ::fidl_next::munge! {
12808 let Self {
12809 flags,
12810
12811 } = &mut *out_;
12812 }
12813
12814 ::fidl_next::Wire::zero_padding(flags);
12815 }
12816 }
12817
12818 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetFlagsRequest
12819 where
12820 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12821 {
12822 fn decode(
12823 slot_: ::fidl_next::Slot<'_, Self>,
12824 decoder_: &mut ___D,
12825 _: (),
12826 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12827 ::fidl_next::munge! {
12828 let Self {
12829 mut flags,
12830
12831 } = slot_;
12832 }
12833
12834 let _field = flags.as_mut();
12835
12836 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12837
12838 Ok(())
12839 }
12840 }
12841
12842 impl ::fidl_next::IntoNatural for NodeSetFlagsRequest {
12843 type Natural = crate::natural::NodeSetFlagsRequest;
12844 }
12845
12846 pub type EmptyStruct = ::fidl_next::wire::Unit;
12848
12849 #[repr(transparent)]
12851 pub struct SelinuxContext<'de> {
12852 pub(crate) raw: ::fidl_next::wire::Union,
12853 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12854 }
12855
12856 impl<'de> Drop for SelinuxContext<'de> {
12857 fn drop(&mut self) {
12858 match self.raw.ordinal() {
12859 1 => {
12860 let _ = unsafe {
12861 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12862 };
12863 }
12864
12865 2 => {
12866 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::EmptyStruct>() };
12867 }
12868
12869 _ => (),
12870 }
12871 }
12872 }
12873
12874 impl ::fidl_next::Constrained for SelinuxContext<'_> {
12875 type Constraint = ();
12876
12877 fn validate(
12878 _: ::fidl_next::Slot<'_, Self>,
12879 _: Self::Constraint,
12880 ) -> Result<(), ::fidl_next::ValidationError> {
12881 Ok(())
12882 }
12883 }
12884
12885 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
12886 type Narrowed<'de> = SelinuxContext<'de>;
12887
12888 #[inline]
12889 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12890 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12891 ::fidl_next::wire::Union::zero_padding(raw);
12892 }
12893 }
12894
12895 pub mod selinux_context {
12896 pub enum Ref<'de> {
12897 Data(&'de ::fidl_next::wire::Vector<'de, u8>),
12898
12899 UseExtendedAttributes(&'de crate::wire::EmptyStruct),
12900
12901 UnknownOrdinal_(u64),
12902 }
12903 }
12904
12905 impl<'de> SelinuxContext<'de> {
12906 pub fn as_ref(&self) -> crate::wire::selinux_context::Ref<'_> {
12907 match self.raw.ordinal() {
12908 1 => crate::wire::selinux_context::Ref::Data(unsafe {
12909 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
12910 }),
12911
12912 2 => crate::wire::selinux_context::Ref::UseExtendedAttributes(unsafe {
12913 self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
12914 }),
12915
12916 unknown => crate::wire::selinux_context::Ref::UnknownOrdinal_(unknown),
12917 }
12918 }
12919 }
12920
12921 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SelinuxContext<'de>
12922 where
12923 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12924 ___D: ::fidl_next::Decoder<'de>,
12925 {
12926 fn decode(
12927 mut slot: ::fidl_next::Slot<'_, Self>,
12928 decoder: &mut ___D,
12929 _: (),
12930 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12931 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12932 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
12933 1 => {
12934 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
12935 raw,
12936 decoder,
12937 (256, ()),
12938 )?
12939 }
12940
12941 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::EmptyStruct>(
12942 raw,
12943 decoder,
12944 (),
12945 )?,
12946
12947 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
12948 }
12949
12950 Ok(())
12951 }
12952 }
12953
12954 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
12955 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12956 match self.raw.ordinal() {
12957 1 => unsafe {
12958 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
12959 },
12960 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>().fmt(f) },
12961 _ => unsafe { ::core::hint::unreachable_unchecked() },
12962 }
12963 }
12964 }
12965
12966 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
12967 type Natural = crate::natural::SelinuxContext;
12968 }
12969
12970 #[repr(C)]
12972 pub struct MutableNodeAttributes<'de> {
12973 pub(crate) table: ::fidl_next::wire::Table<'de>,
12974 }
12975
12976 impl<'de> Drop for MutableNodeAttributes<'de> {
12977 fn drop(&mut self) {
12978 let _ = self
12979 .table
12980 .get(1)
12981 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
12982
12983 let _ = self
12984 .table
12985 .get(2)
12986 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
12987
12988 let _ = self
12989 .table
12990 .get(3)
12991 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
12992
12993 let _ = self
12994 .table
12995 .get(4)
12996 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
12997
12998 let _ = self
12999 .table
13000 .get(5)
13001 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13002
13003 let _ = self
13004 .table
13005 .get(6)
13006 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13007
13008 let _ = self
13009 .table
13010 .get(7)
13011 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13012
13013 let _ = self.table.get(8).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13014
13015 let _ = self.table.get(9).map(|envelope| unsafe {
13016 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
13017 });
13018
13019 let _ =
13020 self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 16]>() });
13021 }
13022 }
13023
13024 impl ::fidl_next::Constrained for MutableNodeAttributes<'_> {
13025 type Constraint = ();
13026
13027 fn validate(
13028 _: ::fidl_next::Slot<'_, Self>,
13029 _: Self::Constraint,
13030 ) -> Result<(), ::fidl_next::ValidationError> {
13031 Ok(())
13032 }
13033 }
13034
13035 unsafe impl ::fidl_next::Wire for MutableNodeAttributes<'static> {
13036 type Narrowed<'de> = MutableNodeAttributes<'de>;
13037
13038 #[inline]
13039 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13040 ::fidl_next::munge!(let Self { table } = out);
13041 ::fidl_next::wire::Table::zero_padding(table);
13042 }
13043 }
13044
13045 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MutableNodeAttributes<'de>
13046 where
13047 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13048 {
13049 fn decode(
13050 slot: ::fidl_next::Slot<'_, Self>,
13051 decoder: &mut ___D,
13052 _: (),
13053 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13054 ::fidl_next::munge!(let Self { table } = slot);
13055
13056 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13057 match ordinal {
13058 0 => unsafe { ::core::hint::unreachable_unchecked() },
13059
13060 1 => {
13061 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13062 slot.as_mut(),
13063 decoder,
13064 (),
13065 )?;
13066
13067 Ok(())
13068 }
13069
13070 2 => {
13071 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13072 slot.as_mut(),
13073 decoder,
13074 (),
13075 )?;
13076
13077 Ok(())
13078 }
13079
13080 3 => {
13081 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13082 slot.as_mut(),
13083 decoder,
13084 (),
13085 )?;
13086
13087 Ok(())
13088 }
13089
13090 4 => {
13091 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13092 slot.as_mut(),
13093 decoder,
13094 (),
13095 )?;
13096
13097 Ok(())
13098 }
13099
13100 5 => {
13101 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13102 slot.as_mut(),
13103 decoder,
13104 (),
13105 )?;
13106
13107 Ok(())
13108 }
13109
13110 6 => {
13111 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13112 slot.as_mut(),
13113 decoder,
13114 (),
13115 )?;
13116
13117 Ok(())
13118 }
13119
13120 7 => {
13121 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13122 slot.as_mut(),
13123 decoder,
13124 (),
13125 )?;
13126
13127 Ok(())
13128 }
13129
13130 8 => {
13131 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13132 slot.as_mut(),
13133 decoder,
13134 (),
13135 )?;
13136
13137 Ok(())
13138 }
13139
13140 9 => {
13141 ::fidl_next::wire::Envelope::decode_as::<
13142 ___D,
13143 crate::wire::SelinuxContext<'de>,
13144 >(slot.as_mut(), decoder, ())?;
13145
13146 Ok(())
13147 }
13148
13149 10 => {
13150 ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 16]>(
13151 slot.as_mut(),
13152 decoder,
13153 (),
13154 )?;
13155
13156 Ok(())
13157 }
13158
13159 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13160 }
13161 })
13162 }
13163 }
13164
13165 impl<'de> MutableNodeAttributes<'de> {
13166 pub fn creation_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13167 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13168 }
13169
13170 pub fn modification_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13171 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13172 }
13173
13174 pub fn mode(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13175 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
13176 }
13177
13178 pub fn uid(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13179 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
13180 }
13181
13182 pub fn gid(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13183 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13184 }
13185
13186 pub fn rdev(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13187 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
13188 }
13189
13190 pub fn access_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13191 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
13192 }
13193
13194 pub fn casefold(&self) -> ::core::option::Option<&bool> {
13195 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
13196 }
13197
13198 pub fn selinux_context(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
13199 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
13200 }
13201
13202 pub fn wrapping_key_id(&self) -> ::core::option::Option<&[u8; 16]> {
13203 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
13204 }
13205 }
13206
13207 impl<'de> ::core::fmt::Debug for MutableNodeAttributes<'de> {
13208 fn fmt(
13209 &self,
13210 f: &mut ::core::fmt::Formatter<'_>,
13211 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13212 f.debug_struct("MutableNodeAttributes")
13213 .field("creation_time", &self.creation_time())
13214 .field("modification_time", &self.modification_time())
13215 .field("mode", &self.mode())
13216 .field("uid", &self.uid())
13217 .field("gid", &self.gid())
13218 .field("rdev", &self.rdev())
13219 .field("access_time", &self.access_time())
13220 .field("casefold", &self.casefold())
13221 .field("selinux_context", &self.selinux_context())
13222 .field("wrapping_key_id", &self.wrapping_key_id())
13223 .finish()
13224 }
13225 }
13226
13227 impl<'de> ::fidl_next::IntoNatural for MutableNodeAttributes<'de> {
13228 type Natural = crate::natural::MutableNodeAttributes;
13229 }
13230
13231 #[derive(Clone, Copy, Debug)]
13233 #[repr(transparent)]
13234 pub struct NodeProtocolKinds {
13235 pub(crate) value: ::fidl_next::wire::Uint64,
13236 }
13237
13238 impl ::fidl_next::Constrained for NodeProtocolKinds {
13239 type Constraint = ();
13240
13241 fn validate(
13242 _: ::fidl_next::Slot<'_, Self>,
13243 _: Self::Constraint,
13244 ) -> Result<(), ::fidl_next::ValidationError> {
13245 Ok(())
13246 }
13247 }
13248
13249 unsafe impl ::fidl_next::Wire for NodeProtocolKinds {
13250 type Narrowed<'de> = Self;
13251
13252 #[inline]
13253 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13254 }
13256 }
13257
13258 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeProtocolKinds
13259 where
13260 ___D: ?Sized,
13261 {
13262 fn decode(
13263 slot: ::fidl_next::Slot<'_, Self>,
13264 _: &mut ___D,
13265 _: (),
13266 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13267 Ok(())
13268 }
13269 }
13270
13271 impl ::core::convert::From<crate::natural::NodeProtocolKinds> for NodeProtocolKinds {
13272 fn from(natural: crate::natural::NodeProtocolKinds) -> Self {
13273 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
13274 }
13275 }
13276
13277 impl ::fidl_next::IntoNatural for NodeProtocolKinds {
13278 type Natural = crate::natural::NodeProtocolKinds;
13279 }
13280
13281 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
13283 #[repr(transparent)]
13284 pub struct HashAlgorithm {
13285 pub(crate) value: u8,
13286 }
13287
13288 impl ::fidl_next::Constrained for HashAlgorithm {
13289 type Constraint = ();
13290
13291 fn validate(
13292 _: ::fidl_next::Slot<'_, Self>,
13293 _: Self::Constraint,
13294 ) -> Result<(), ::fidl_next::ValidationError> {
13295 Ok(())
13296 }
13297 }
13298
13299 unsafe impl ::fidl_next::Wire for HashAlgorithm {
13300 type Narrowed<'de> = Self;
13301
13302 #[inline]
13303 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13304 }
13306 }
13307
13308 impl HashAlgorithm {
13309 pub const SHA256: HashAlgorithm = HashAlgorithm { value: 1 };
13310
13311 pub const SHA512: HashAlgorithm = HashAlgorithm { value: 2 };
13312 }
13313
13314 unsafe impl<___D> ::fidl_next::Decode<___D> for HashAlgorithm
13315 where
13316 ___D: ?Sized,
13317 {
13318 fn decode(
13319 slot: ::fidl_next::Slot<'_, Self>,
13320 _: &mut ___D,
13321 _: (),
13322 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13323 Ok(())
13324 }
13325 }
13326
13327 impl ::core::convert::From<crate::natural::HashAlgorithm> for HashAlgorithm {
13328 fn from(natural: crate::natural::HashAlgorithm) -> Self {
13329 match natural {
13330 crate::natural::HashAlgorithm::Sha256 => HashAlgorithm::SHA256,
13331
13332 crate::natural::HashAlgorithm::Sha512 => HashAlgorithm::SHA512,
13333
13334 crate::natural::HashAlgorithm::UnknownOrdinal_(value) => {
13335 HashAlgorithm { value: u8::from(value) }
13336 }
13337 }
13338 }
13339 }
13340
13341 impl ::fidl_next::IntoNatural for HashAlgorithm {
13342 type Natural = crate::natural::HashAlgorithm;
13343 }
13344
13345 #[repr(C)]
13347 pub struct VerificationOptions<'de> {
13348 pub(crate) table: ::fidl_next::wire::Table<'de>,
13349 }
13350
13351 impl<'de> Drop for VerificationOptions<'de> {
13352 fn drop(&mut self) {
13353 let _ = self
13354 .table
13355 .get(1)
13356 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::HashAlgorithm>() });
13357
13358 let _ = self.table.get(2).map(|envelope| unsafe {
13359 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13360 });
13361 }
13362 }
13363
13364 impl ::fidl_next::Constrained for VerificationOptions<'_> {
13365 type Constraint = ();
13366
13367 fn validate(
13368 _: ::fidl_next::Slot<'_, Self>,
13369 _: Self::Constraint,
13370 ) -> Result<(), ::fidl_next::ValidationError> {
13371 Ok(())
13372 }
13373 }
13374
13375 unsafe impl ::fidl_next::Wire for VerificationOptions<'static> {
13376 type Narrowed<'de> = VerificationOptions<'de>;
13377
13378 #[inline]
13379 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13380 ::fidl_next::munge!(let Self { table } = out);
13381 ::fidl_next::wire::Table::zero_padding(table);
13382 }
13383 }
13384
13385 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VerificationOptions<'de>
13386 where
13387 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13388 {
13389 fn decode(
13390 slot: ::fidl_next::Slot<'_, Self>,
13391 decoder: &mut ___D,
13392 _: (),
13393 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13394 ::fidl_next::munge!(let Self { table } = slot);
13395
13396 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13397 match ordinal {
13398 0 => unsafe { ::core::hint::unreachable_unchecked() },
13399
13400 1 => {
13401 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::HashAlgorithm>(
13402 slot.as_mut(),
13403 decoder,
13404 (),
13405 )?;
13406
13407 Ok(())
13408 }
13409
13410 2 => {
13411 ::fidl_next::wire::Envelope::decode_as::<
13412 ___D,
13413 ::fidl_next::wire::Vector<'de, u8>,
13414 >(slot.as_mut(), decoder, (32, ()))?;
13415
13416 let value = unsafe {
13417 slot.deref_unchecked()
13418 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13419 };
13420
13421 if value.len() > 32 {
13422 return Err(::fidl_next::DecodeError::VectorTooLong {
13423 size: value.len() as u64,
13424 limit: 32,
13425 });
13426 }
13427
13428 Ok(())
13429 }
13430
13431 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13432 }
13433 })
13434 }
13435 }
13436
13437 impl<'de> VerificationOptions<'de> {
13438 pub fn hash_algorithm(&self) -> ::core::option::Option<&crate::wire::HashAlgorithm> {
13439 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13440 }
13441
13442 pub fn salt(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
13443 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13444 }
13445 }
13446
13447 impl<'de> ::core::fmt::Debug for VerificationOptions<'de> {
13448 fn fmt(
13449 &self,
13450 f: &mut ::core::fmt::Formatter<'_>,
13451 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13452 f.debug_struct("VerificationOptions")
13453 .field("hash_algorithm", &self.hash_algorithm())
13454 .field("salt", &self.salt())
13455 .finish()
13456 }
13457 }
13458
13459 impl<'de> ::fidl_next::IntoNatural for VerificationOptions<'de> {
13460 type Natural = crate::natural::VerificationOptions;
13461 }
13462
13463 #[repr(C)]
13465 pub struct ImmutableNodeAttributes<'de> {
13466 pub(crate) table: ::fidl_next::wire::Table<'de>,
13467 }
13468
13469 impl<'de> Drop for ImmutableNodeAttributes<'de> {
13470 fn drop(&mut self) {
13471 let _ = self.table.get(1).map(|envelope| unsafe {
13472 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
13473 });
13474
13475 let _ = self
13476 .table
13477 .get(2)
13478 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
13479
13480 let _ = self
13481 .table
13482 .get(3)
13483 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13484
13485 let _ = self
13486 .table
13487 .get(4)
13488 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13489
13490 let _ = self
13491 .table
13492 .get(5)
13493 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13494
13495 let _ = self
13496 .table
13497 .get(6)
13498 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13499
13500 let _ = self
13501 .table
13502 .get(7)
13503 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13504
13505 let _ = self.table.get(8).map(|envelope| unsafe {
13506 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
13507 });
13508
13509 let _ = self.table.get(9).map(|envelope| unsafe {
13510 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13511 });
13512
13513 let _ = self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13514 }
13515 }
13516
13517 impl ::fidl_next::Constrained for ImmutableNodeAttributes<'_> {
13518 type Constraint = ();
13519
13520 fn validate(
13521 _: ::fidl_next::Slot<'_, Self>,
13522 _: Self::Constraint,
13523 ) -> Result<(), ::fidl_next::ValidationError> {
13524 Ok(())
13525 }
13526 }
13527
13528 unsafe impl ::fidl_next::Wire for ImmutableNodeAttributes<'static> {
13529 type Narrowed<'de> = ImmutableNodeAttributes<'de>;
13530
13531 #[inline]
13532 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13533 ::fidl_next::munge!(let Self { table } = out);
13534 ::fidl_next::wire::Table::zero_padding(table);
13535 }
13536 }
13537
13538 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ImmutableNodeAttributes<'de>
13539 where
13540 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13541 {
13542 fn decode(
13543 slot: ::fidl_next::Slot<'_, Self>,
13544 decoder: &mut ___D,
13545 _: (),
13546 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13547 ::fidl_next::munge!(let Self { table } = slot);
13548
13549 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13550 match ordinal {
13551 0 => unsafe { ::core::hint::unreachable_unchecked() },
13552
13553 1 => {
13554 ::fidl_next::wire::Envelope::decode_as::<
13555 ___D,
13556 crate::wire::NodeProtocolKinds,
13557 >(slot.as_mut(), decoder, ())?;
13558
13559 Ok(())
13560 }
13561
13562 2 => {
13563 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Operations>(
13564 slot.as_mut(),
13565 decoder,
13566 (),
13567 )?;
13568
13569 Ok(())
13570 }
13571
13572 3 => {
13573 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13574 slot.as_mut(),
13575 decoder,
13576 (),
13577 )?;
13578
13579 Ok(())
13580 }
13581
13582 4 => {
13583 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13584 slot.as_mut(),
13585 decoder,
13586 (),
13587 )?;
13588
13589 Ok(())
13590 }
13591
13592 5 => {
13593 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13594 slot.as_mut(),
13595 decoder,
13596 (),
13597 )?;
13598
13599 Ok(())
13600 }
13601
13602 6 => {
13603 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13604 slot.as_mut(),
13605 decoder,
13606 (),
13607 )?;
13608
13609 Ok(())
13610 }
13611
13612 7 => {
13613 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13614 slot.as_mut(),
13615 decoder,
13616 (),
13617 )?;
13618
13619 Ok(())
13620 }
13621
13622 8 => {
13623 ::fidl_next::wire::Envelope::decode_as::<
13624 ___D,
13625 crate::wire::VerificationOptions<'de>,
13626 >(slot.as_mut(), decoder, ())?;
13627
13628 Ok(())
13629 }
13630
13631 9 => {
13632 ::fidl_next::wire::Envelope::decode_as::<
13633 ___D,
13634 ::fidl_next::wire::Vector<'de, u8>,
13635 >(slot.as_mut(), decoder, (64, ()))?;
13636
13637 let value = unsafe {
13638 slot.deref_unchecked()
13639 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13640 };
13641
13642 if value.len() > 64 {
13643 return Err(::fidl_next::DecodeError::VectorTooLong {
13644 size: value.len() as u64,
13645 limit: 64,
13646 });
13647 }
13648
13649 Ok(())
13650 }
13651
13652 10 => {
13653 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13654 slot.as_mut(),
13655 decoder,
13656 (),
13657 )?;
13658
13659 Ok(())
13660 }
13661
13662 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13663 }
13664 })
13665 }
13666 }
13667
13668 impl<'de> ImmutableNodeAttributes<'de> {
13669 pub fn protocols(&self) -> ::core::option::Option<&crate::wire::NodeProtocolKinds> {
13670 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13671 }
13672
13673 pub fn abilities(&self) -> ::core::option::Option<&crate::wire::Operations> {
13674 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13675 }
13676
13677 pub fn content_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13678 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
13679 }
13680
13681 pub fn storage_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13682 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
13683 }
13684
13685 pub fn link_count(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13686 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13687 }
13688
13689 pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13690 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
13691 }
13692
13693 pub fn change_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13694 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
13695 }
13696
13697 pub fn options(&self) -> ::core::option::Option<&crate::wire::VerificationOptions<'de>> {
13698 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
13699 }
13700
13701 pub fn root_hash(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
13702 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
13703 }
13704
13705 pub fn verity_enabled(&self) -> ::core::option::Option<&bool> {
13706 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
13707 }
13708 }
13709
13710 impl<'de> ::core::fmt::Debug for ImmutableNodeAttributes<'de> {
13711 fn fmt(
13712 &self,
13713 f: &mut ::core::fmt::Formatter<'_>,
13714 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13715 f.debug_struct("ImmutableNodeAttributes")
13716 .field("protocols", &self.protocols())
13717 .field("abilities", &self.abilities())
13718 .field("content_size", &self.content_size())
13719 .field("storage_size", &self.storage_size())
13720 .field("link_count", &self.link_count())
13721 .field("id", &self.id())
13722 .field("change_time", &self.change_time())
13723 .field("options", &self.options())
13724 .field("root_hash", &self.root_hash())
13725 .field("verity_enabled", &self.verity_enabled())
13726 .finish()
13727 }
13728 }
13729
13730 impl<'de> ::fidl_next::IntoNatural for ImmutableNodeAttributes<'de> {
13731 type Natural = crate::natural::ImmutableNodeAttributes;
13732 }
13733
13734 #[derive(Debug)]
13736 #[repr(C)]
13737 pub struct NodeAttributes2<'de> {
13738 pub mutable_attributes: crate::wire::MutableNodeAttributes<'de>,
13739
13740 pub immutable_attributes: crate::wire::ImmutableNodeAttributes<'de>,
13741 }
13742
13743 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes2<'_>>(), 32);
13744 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes2<'_>>(), 8);
13745
13746 static_assertions::const_assert_eq!(
13747 std::mem::offset_of!(NodeAttributes2<'_>, mutable_attributes),
13748 0
13749 );
13750
13751 static_assertions::const_assert_eq!(
13752 std::mem::offset_of!(NodeAttributes2<'_>, immutable_attributes),
13753 16
13754 );
13755
13756 impl ::fidl_next::Constrained for NodeAttributes2<'_> {
13757 type Constraint = ();
13758
13759 fn validate(
13760 _: ::fidl_next::Slot<'_, Self>,
13761 _: Self::Constraint,
13762 ) -> Result<(), ::fidl_next::ValidationError> {
13763 Ok(())
13764 }
13765 }
13766
13767 unsafe impl ::fidl_next::Wire for NodeAttributes2<'static> {
13768 type Narrowed<'de> = NodeAttributes2<'de>;
13769
13770 #[inline]
13771 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13772 ::fidl_next::munge! {
13773 let Self {
13774 mutable_attributes,
13775 immutable_attributes,
13776
13777 } = &mut *out_;
13778 }
13779
13780 ::fidl_next::Wire::zero_padding(mutable_attributes);
13781
13782 ::fidl_next::Wire::zero_padding(immutable_attributes);
13783 }
13784 }
13785
13786 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAttributes2<'de>
13787 where
13788 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13789 ___D: ::fidl_next::Decoder<'de>,
13790 {
13791 fn decode(
13792 slot_: ::fidl_next::Slot<'_, Self>,
13793 decoder_: &mut ___D,
13794 _: (),
13795 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13796 ::fidl_next::munge! {
13797 let Self {
13798 mut mutable_attributes,
13799 mut immutable_attributes,
13800
13801 } = slot_;
13802 }
13803
13804 let _field = mutable_attributes.as_mut();
13805
13806 ::fidl_next::Decode::decode(mutable_attributes.as_mut(), decoder_, ())?;
13807
13808 let _field = immutable_attributes.as_mut();
13809
13810 ::fidl_next::Decode::decode(immutable_attributes.as_mut(), decoder_, ())?;
13811
13812 Ok(())
13813 }
13814 }
13815
13816 impl<'de> ::fidl_next::IntoNatural for NodeAttributes2<'de> {
13817 type Natural = crate::natural::NodeAttributes2;
13818 }
13819
13820 #[repr(C)]
13822 pub struct NodeInfo<'de> {
13823 pub(crate) table: ::fidl_next::wire::Table<'de>,
13824 }
13825
13826 impl<'de> Drop for NodeInfo<'de> {
13827 fn drop(&mut self) {
13828 let _ = self.table.get(1).map(|envelope| unsafe {
13829 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
13830 });
13831 }
13832 }
13833
13834 impl ::fidl_next::Constrained for NodeInfo<'_> {
13835 type Constraint = ();
13836
13837 fn validate(
13838 _: ::fidl_next::Slot<'_, Self>,
13839 _: Self::Constraint,
13840 ) -> Result<(), ::fidl_next::ValidationError> {
13841 Ok(())
13842 }
13843 }
13844
13845 unsafe impl ::fidl_next::Wire for NodeInfo<'static> {
13846 type Narrowed<'de> = NodeInfo<'de>;
13847
13848 #[inline]
13849 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13850 ::fidl_next::munge!(let Self { table } = out);
13851 ::fidl_next::wire::Table::zero_padding(table);
13852 }
13853 }
13854
13855 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfo<'de>
13856 where
13857 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13858 {
13859 fn decode(
13860 slot: ::fidl_next::Slot<'_, Self>,
13861 decoder: &mut ___D,
13862 _: (),
13863 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13864 ::fidl_next::munge!(let Self { table } = slot);
13865
13866 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13867 match ordinal {
13868 0 => unsafe { ::core::hint::unreachable_unchecked() },
13869
13870 1 => {
13871 ::fidl_next::wire::Envelope::decode_as::<
13872 ___D,
13873 crate::wire::NodeAttributes2<'de>,
13874 >(slot.as_mut(), decoder, ())?;
13875
13876 Ok(())
13877 }
13878
13879 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13880 }
13881 })
13882 }
13883 }
13884
13885 impl<'de> NodeInfo<'de> {
13886 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
13887 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13888 }
13889 }
13890
13891 impl<'de> ::core::fmt::Debug for NodeInfo<'de> {
13892 fn fmt(
13893 &self,
13894 f: &mut ::core::fmt::Formatter<'_>,
13895 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13896 f.debug_struct("NodeInfo").field("attributes", &self.attributes()).finish()
13897 }
13898 }
13899
13900 impl<'de> ::fidl_next::IntoNatural for NodeInfo<'de> {
13901 type Natural = crate::natural::NodeInfo;
13902 }
13903
13904 #[repr(C)]
13906 pub struct DirectoryInfo<'de> {
13907 pub(crate) table: ::fidl_next::wire::Table<'de>,
13908 }
13909
13910 impl<'de> Drop for DirectoryInfo<'de> {
13911 fn drop(&mut self) {
13912 let _ = self.table.get(1).map(|envelope| unsafe {
13913 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
13914 });
13915 }
13916 }
13917
13918 impl ::fidl_next::Constrained for DirectoryInfo<'_> {
13919 type Constraint = ();
13920
13921 fn validate(
13922 _: ::fidl_next::Slot<'_, Self>,
13923 _: Self::Constraint,
13924 ) -> Result<(), ::fidl_next::ValidationError> {
13925 Ok(())
13926 }
13927 }
13928
13929 unsafe impl ::fidl_next::Wire for DirectoryInfo<'static> {
13930 type Narrowed<'de> = DirectoryInfo<'de>;
13931
13932 #[inline]
13933 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13934 ::fidl_next::munge!(let Self { table } = out);
13935 ::fidl_next::wire::Table::zero_padding(table);
13936 }
13937 }
13938
13939 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryInfo<'de>
13940 where
13941 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13942 {
13943 fn decode(
13944 slot: ::fidl_next::Slot<'_, Self>,
13945 decoder: &mut ___D,
13946 _: (),
13947 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13948 ::fidl_next::munge!(let Self { table } = slot);
13949
13950 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13951 match ordinal {
13952 0 => unsafe { ::core::hint::unreachable_unchecked() },
13953
13954 1 => {
13955 ::fidl_next::wire::Envelope::decode_as::<
13956 ___D,
13957 crate::wire::NodeAttributes2<'de>,
13958 >(slot.as_mut(), decoder, ())?;
13959
13960 Ok(())
13961 }
13962
13963 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13964 }
13965 })
13966 }
13967 }
13968
13969 impl<'de> DirectoryInfo<'de> {
13970 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
13971 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13972 }
13973 }
13974
13975 impl<'de> ::core::fmt::Debug for DirectoryInfo<'de> {
13976 fn fmt(
13977 &self,
13978 f: &mut ::core::fmt::Formatter<'_>,
13979 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13980 f.debug_struct("DirectoryInfo").field("attributes", &self.attributes()).finish()
13981 }
13982 }
13983
13984 impl<'de> ::fidl_next::IntoNatural for DirectoryInfo<'de> {
13985 type Natural = crate::natural::DirectoryInfo;
13986 }
13987
13988 #[repr(C)]
13990 pub struct SymlinkInfo<'de> {
13991 pub(crate) table: ::fidl_next::wire::Table<'de>,
13992 }
13993
13994 impl<'de> Drop for SymlinkInfo<'de> {
13995 fn drop(&mut self) {
13996 let _ = self.table.get(1).map(|envelope| unsafe {
13997 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13998 });
13999
14000 let _ = self.table.get(2).map(|envelope| unsafe {
14001 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
14002 });
14003 }
14004 }
14005
14006 impl ::fidl_next::Constrained for SymlinkInfo<'_> {
14007 type Constraint = ();
14008
14009 fn validate(
14010 _: ::fidl_next::Slot<'_, Self>,
14011 _: Self::Constraint,
14012 ) -> Result<(), ::fidl_next::ValidationError> {
14013 Ok(())
14014 }
14015 }
14016
14017 unsafe impl ::fidl_next::Wire for SymlinkInfo<'static> {
14018 type Narrowed<'de> = SymlinkInfo<'de>;
14019
14020 #[inline]
14021 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14022 ::fidl_next::munge!(let Self { table } = out);
14023 ::fidl_next::wire::Table::zero_padding(table);
14024 }
14025 }
14026
14027 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SymlinkInfo<'de>
14028 where
14029 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14030 {
14031 fn decode(
14032 slot: ::fidl_next::Slot<'_, Self>,
14033 decoder: &mut ___D,
14034 _: (),
14035 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14036 ::fidl_next::munge!(let Self { table } = slot);
14037
14038 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14039 match ordinal {
14040 0 => unsafe { ::core::hint::unreachable_unchecked() },
14041
14042 1 => {
14043 ::fidl_next::wire::Envelope::decode_as::<
14044 ___D,
14045 ::fidl_next::wire::Vector<'de, u8>,
14046 >(slot.as_mut(), decoder, (4095, ()))?;
14047
14048 let value = unsafe {
14049 slot.deref_unchecked()
14050 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
14051 };
14052
14053 if value.len() > 4095 {
14054 return Err(::fidl_next::DecodeError::VectorTooLong {
14055 size: value.len() as u64,
14056 limit: 4095,
14057 });
14058 }
14059
14060 Ok(())
14061 }
14062
14063 2 => {
14064 ::fidl_next::wire::Envelope::decode_as::<
14065 ___D,
14066 crate::wire::NodeAttributes2<'de>,
14067 >(slot.as_mut(), decoder, ())?;
14068
14069 Ok(())
14070 }
14071
14072 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14073 }
14074 })
14075 }
14076 }
14077
14078 impl<'de> SymlinkInfo<'de> {
14079 pub fn target(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
14080 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14081 }
14082
14083 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
14084 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14085 }
14086 }
14087
14088 impl<'de> ::core::fmt::Debug for SymlinkInfo<'de> {
14089 fn fmt(
14090 &self,
14091 f: &mut ::core::fmt::Formatter<'_>,
14092 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14093 f.debug_struct("SymlinkInfo")
14094 .field("target", &self.target())
14095 .field("attributes", &self.attributes())
14096 .finish()
14097 }
14098 }
14099
14100 impl<'de> ::fidl_next::IntoNatural for SymlinkInfo<'de> {
14101 type Natural = crate::natural::SymlinkInfo;
14102 }
14103
14104 #[derive(Clone, Copy, Debug)]
14106 #[repr(transparent)]
14107 pub struct NodeAttributesQuery {
14108 pub(crate) value: ::fidl_next::wire::Uint64,
14109 }
14110
14111 impl ::fidl_next::Constrained for NodeAttributesQuery {
14112 type Constraint = ();
14113
14114 fn validate(
14115 _: ::fidl_next::Slot<'_, Self>,
14116 _: Self::Constraint,
14117 ) -> Result<(), ::fidl_next::ValidationError> {
14118 Ok(())
14119 }
14120 }
14121
14122 unsafe impl ::fidl_next::Wire for NodeAttributesQuery {
14123 type Narrowed<'de> = Self;
14124
14125 #[inline]
14126 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14127 }
14129 }
14130
14131 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributesQuery
14132 where
14133 ___D: ?Sized,
14134 {
14135 fn decode(
14136 slot: ::fidl_next::Slot<'_, Self>,
14137 _: &mut ___D,
14138 _: (),
14139 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14140 Ok(())
14141 }
14142 }
14143
14144 impl ::core::convert::From<crate::natural::NodeAttributesQuery> for NodeAttributesQuery {
14145 fn from(natural: crate::natural::NodeAttributesQuery) -> Self {
14146 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
14147 }
14148 }
14149
14150 impl ::fidl_next::IntoNatural for NodeAttributesQuery {
14151 type Natural = crate::natural::NodeAttributesQuery;
14152 }
14153
14154 #[derive(Clone, Debug)]
14156 #[repr(C)]
14157 pub struct NodeGetAttributesRequest {
14158 pub query: crate::wire::NodeAttributesQuery,
14159 }
14160
14161 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetAttributesRequest>(), 8);
14162 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetAttributesRequest>(), 8);
14163
14164 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetAttributesRequest, query), 0);
14165
14166 impl ::fidl_next::Constrained for NodeGetAttributesRequest {
14167 type Constraint = ();
14168
14169 fn validate(
14170 _: ::fidl_next::Slot<'_, Self>,
14171 _: Self::Constraint,
14172 ) -> Result<(), ::fidl_next::ValidationError> {
14173 Ok(())
14174 }
14175 }
14176
14177 unsafe impl ::fidl_next::Wire for NodeGetAttributesRequest {
14178 type Narrowed<'de> = NodeGetAttributesRequest;
14179
14180 #[inline]
14181 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14182 ::fidl_next::munge! {
14183 let Self {
14184 query,
14185
14186 } = &mut *out_;
14187 }
14188
14189 ::fidl_next::Wire::zero_padding(query);
14190 }
14191 }
14192
14193 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetAttributesRequest
14194 where
14195 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14196 {
14197 fn decode(
14198 slot_: ::fidl_next::Slot<'_, Self>,
14199 decoder_: &mut ___D,
14200 _: (),
14201 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14202 ::fidl_next::munge! {
14203 let Self {
14204 mut query,
14205
14206 } = slot_;
14207 }
14208
14209 let _field = query.as_mut();
14210
14211 ::fidl_next::Decode::decode(query.as_mut(), decoder_, ())?;
14212
14213 Ok(())
14214 }
14215 }
14216
14217 impl ::fidl_next::IntoNatural for NodeGetAttributesRequest {
14218 type Natural = crate::natural::NodeGetAttributesRequest;
14219 }
14220
14221 #[repr(C)]
14223 pub struct Options<'de> {
14224 pub(crate) table: ::fidl_next::wire::Table<'de>,
14225 }
14226
14227 impl<'de> Drop for Options<'de> {
14228 fn drop(&mut self) {
14229 let _ = self.table.get(1).map(|envelope| unsafe {
14230 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
14231 });
14232
14233 let _ = self.table.get(2).map(|envelope| unsafe {
14234 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
14235 });
14236 }
14237 }
14238
14239 impl ::fidl_next::Constrained for Options<'_> {
14240 type Constraint = ();
14241
14242 fn validate(
14243 _: ::fidl_next::Slot<'_, Self>,
14244 _: Self::Constraint,
14245 ) -> Result<(), ::fidl_next::ValidationError> {
14246 Ok(())
14247 }
14248 }
14249
14250 unsafe impl ::fidl_next::Wire for Options<'static> {
14251 type Narrowed<'de> = Options<'de>;
14252
14253 #[inline]
14254 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14255 ::fidl_next::munge!(let Self { table } = out);
14256 ::fidl_next::wire::Table::zero_padding(table);
14257 }
14258 }
14259
14260 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Options<'de>
14261 where
14262 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14263 {
14264 fn decode(
14265 slot: ::fidl_next::Slot<'_, Self>,
14266 decoder: &mut ___D,
14267 _: (),
14268 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14269 ::fidl_next::munge!(let Self { table } = slot);
14270
14271 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14272 match ordinal {
14273 0 => unsafe { ::core::hint::unreachable_unchecked() },
14274
14275 1 => {
14276 ::fidl_next::wire::Envelope::decode_as::<
14277 ___D,
14278 crate::wire::NodeAttributesQuery,
14279 >(slot.as_mut(), decoder, ())?;
14280
14281 Ok(())
14282 }
14283
14284 2 => {
14285 ::fidl_next::wire::Envelope::decode_as::<
14286 ___D,
14287 crate::wire::MutableNodeAttributes<'de>,
14288 >(slot.as_mut(), decoder, ())?;
14289
14290 Ok(())
14291 }
14292
14293 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14294 }
14295 })
14296 }
14297 }
14298
14299 impl<'de> Options<'de> {
14300 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributesQuery> {
14301 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14302 }
14303
14304 pub fn create_attributes(
14305 &self,
14306 ) -> ::core::option::Option<&crate::wire::MutableNodeAttributes<'de>> {
14307 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14308 }
14309 }
14310
14311 impl<'de> ::core::fmt::Debug for Options<'de> {
14312 fn fmt(
14313 &self,
14314 f: &mut ::core::fmt::Formatter<'_>,
14315 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14316 f.debug_struct("Options")
14317 .field("attributes", &self.attributes())
14318 .field("create_attributes", &self.create_attributes())
14319 .finish()
14320 }
14321 }
14322
14323 impl<'de> ::fidl_next::IntoNatural for Options<'de> {
14324 type Natural = crate::natural::Options;
14325 }
14326
14327 pub type DirectoryObject = ::fidl_next::wire::Unit;
14329
14330 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
14332 #[repr(transparent)]
14333 pub struct DirentType {
14334 pub(crate) value: u8,
14335 }
14336
14337 impl ::fidl_next::Constrained for DirentType {
14338 type Constraint = ();
14339
14340 fn validate(
14341 _: ::fidl_next::Slot<'_, Self>,
14342 _: Self::Constraint,
14343 ) -> Result<(), ::fidl_next::ValidationError> {
14344 Ok(())
14345 }
14346 }
14347
14348 unsafe impl ::fidl_next::Wire for DirentType {
14349 type Narrowed<'de> = Self;
14350
14351 #[inline]
14352 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14353 }
14355 }
14356
14357 impl DirentType {
14358 pub const UNKNOWN: DirentType = DirentType { value: 0 };
14359
14360 pub const DIRECTORY: DirentType = DirentType { value: 4 };
14361
14362 pub const BLOCK_DEVICE: DirentType = DirentType { value: 6 };
14363
14364 pub const FILE: DirentType = DirentType { value: 8 };
14365
14366 pub const SYMLINK: DirentType = DirentType { value: 10 };
14367
14368 pub const SERVICE: DirentType = DirentType { value: 16 };
14369 }
14370
14371 unsafe impl<___D> ::fidl_next::Decode<___D> for DirentType
14372 where
14373 ___D: ?Sized,
14374 {
14375 fn decode(
14376 slot: ::fidl_next::Slot<'_, Self>,
14377 _: &mut ___D,
14378 _: (),
14379 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14380 Ok(())
14381 }
14382 }
14383
14384 impl ::core::convert::From<crate::natural::DirentType> for DirentType {
14385 fn from(natural: crate::natural::DirentType) -> Self {
14386 match natural {
14387 crate::natural::DirentType::Unknown => DirentType::UNKNOWN,
14388
14389 crate::natural::DirentType::Directory => DirentType::DIRECTORY,
14390
14391 crate::natural::DirentType::BlockDevice => DirentType::BLOCK_DEVICE,
14392
14393 crate::natural::DirentType::File => DirentType::FILE,
14394
14395 crate::natural::DirentType::Symlink => DirentType::SYMLINK,
14396
14397 crate::natural::DirentType::Service => DirentType::SERVICE,
14398
14399 crate::natural::DirentType::UnknownOrdinal_(value) => {
14400 DirentType { value: u8::from(value) }
14401 }
14402 }
14403 }
14404 }
14405
14406 impl ::fidl_next::IntoNatural for DirentType {
14407 type Natural = crate::natural::DirentType;
14408 }
14409
14410 #[derive(Debug)]
14412 #[repr(C)]
14413 pub struct ExtendedAttributeIteratorGetNextResponse<'de> {
14414 pub attributes: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
14415
14416 pub last: bool,
14417 }
14418
14419 static_assertions::const_assert_eq!(
14420 std::mem::size_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
14421 24
14422 );
14423 static_assertions::const_assert_eq!(
14424 std::mem::align_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
14425 8
14426 );
14427
14428 static_assertions::const_assert_eq!(
14429 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, attributes),
14430 0
14431 );
14432
14433 static_assertions::const_assert_eq!(
14434 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, last),
14435 16
14436 );
14437
14438 impl ::fidl_next::Constrained for ExtendedAttributeIteratorGetNextResponse<'_> {
14439 type Constraint = ();
14440
14441 fn validate(
14442 _: ::fidl_next::Slot<'_, Self>,
14443 _: Self::Constraint,
14444 ) -> Result<(), ::fidl_next::ValidationError> {
14445 Ok(())
14446 }
14447 }
14448
14449 unsafe impl ::fidl_next::Wire for ExtendedAttributeIteratorGetNextResponse<'static> {
14450 type Narrowed<'de> = ExtendedAttributeIteratorGetNextResponse<'de>;
14451
14452 #[inline]
14453 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14454 ::fidl_next::munge! {
14455 let Self {
14456 attributes,
14457 last,
14458
14459 } = &mut *out_;
14460 }
14461
14462 ::fidl_next::Wire::zero_padding(attributes);
14463
14464 ::fidl_next::Wire::zero_padding(last);
14465
14466 unsafe {
14467 out_.as_mut_ptr().cast::<u8>().add(17).write_bytes(0, 7);
14468 }
14469 }
14470 }
14471
14472 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeIteratorGetNextResponse<'de>
14473 where
14474 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14475 ___D: ::fidl_next::Decoder<'de>,
14476 {
14477 fn decode(
14478 slot_: ::fidl_next::Slot<'_, Self>,
14479 decoder_: &mut ___D,
14480 _: (),
14481 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14482 if slot_.as_bytes()[17..24] != [0u8; 7] {
14483 return Err(::fidl_next::DecodeError::InvalidPadding);
14484 }
14485
14486 ::fidl_next::munge! {
14487 let Self {
14488 mut attributes,
14489 mut last,
14490
14491 } = slot_;
14492 }
14493
14494 let _field = attributes.as_mut();
14495 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
14496 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, (128, (255, ())))?;
14497
14498 let attributes = unsafe { attributes.deref_unchecked() };
14499
14500 if attributes.len() > 128 {
14501 return Err(::fidl_next::DecodeError::VectorTooLong {
14502 size: attributes.len() as u64,
14503 limit: 128,
14504 });
14505 }
14506
14507 let _field = last.as_mut();
14508
14509 ::fidl_next::Decode::decode(last.as_mut(), decoder_, ())?;
14510
14511 Ok(())
14512 }
14513 }
14514
14515 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeIteratorGetNextResponse<'de> {
14516 type Natural = crate::natural::ExtendedAttributeIteratorGetNextResponse;
14517 }
14518
14519 #[derive(Clone, Debug)]
14521 #[repr(C)]
14522 pub struct ReadableReadRequest {
14523 pub count: ::fidl_next::wire::Uint64,
14524 }
14525
14526 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadRequest>(), 8);
14527 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadRequest>(), 8);
14528
14529 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadRequest, count), 0);
14530
14531 impl ::fidl_next::Constrained for ReadableReadRequest {
14532 type Constraint = ();
14533
14534 fn validate(
14535 _: ::fidl_next::Slot<'_, Self>,
14536 _: Self::Constraint,
14537 ) -> Result<(), ::fidl_next::ValidationError> {
14538 Ok(())
14539 }
14540 }
14541
14542 unsafe impl ::fidl_next::Wire for ReadableReadRequest {
14543 type Narrowed<'de> = ReadableReadRequest;
14544
14545 #[inline]
14546 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14547 ::fidl_next::munge! {
14548 let Self {
14549 count,
14550
14551 } = &mut *out_;
14552 }
14553
14554 ::fidl_next::Wire::zero_padding(count);
14555 }
14556 }
14557
14558 unsafe impl<___D> ::fidl_next::Decode<___D> for ReadableReadRequest
14559 where
14560 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14561 {
14562 fn decode(
14563 slot_: ::fidl_next::Slot<'_, Self>,
14564 decoder_: &mut ___D,
14565 _: (),
14566 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14567 ::fidl_next::munge! {
14568 let Self {
14569 mut count,
14570
14571 } = slot_;
14572 }
14573
14574 let _field = count.as_mut();
14575
14576 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
14577
14578 Ok(())
14579 }
14580 }
14581
14582 impl ::fidl_next::IntoNatural for ReadableReadRequest {
14583 type Natural = crate::natural::ReadableReadRequest;
14584 }
14585
14586 pub type Transfer<'de> = ::fidl_next::wire::Vector<'de, u8>;
14588
14589 #[derive(Debug)]
14591 #[repr(C)]
14592 pub struct ReadableReadResponse<'de> {
14593 pub data: ::fidl_next::wire::Vector<'de, u8>,
14594 }
14595
14596 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadResponse<'_>>(), 16);
14597 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadResponse<'_>>(), 8);
14598
14599 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadResponse<'_>, data), 0);
14600
14601 impl ::fidl_next::Constrained for ReadableReadResponse<'_> {
14602 type Constraint = ();
14603
14604 fn validate(
14605 _: ::fidl_next::Slot<'_, Self>,
14606 _: Self::Constraint,
14607 ) -> Result<(), ::fidl_next::ValidationError> {
14608 Ok(())
14609 }
14610 }
14611
14612 unsafe impl ::fidl_next::Wire for ReadableReadResponse<'static> {
14613 type Narrowed<'de> = ReadableReadResponse<'de>;
14614
14615 #[inline]
14616 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14617 ::fidl_next::munge! {
14618 let Self {
14619 data,
14620
14621 } = &mut *out_;
14622 }
14623
14624 ::fidl_next::Wire::zero_padding(data);
14625 }
14626 }
14627
14628 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ReadableReadResponse<'de>
14629 where
14630 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14631 ___D: ::fidl_next::Decoder<'de>,
14632 {
14633 fn decode(
14634 slot_: ::fidl_next::Slot<'_, Self>,
14635 decoder_: &mut ___D,
14636 _: (),
14637 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14638 ::fidl_next::munge! {
14639 let Self {
14640 mut data,
14641
14642 } = slot_;
14643 }
14644
14645 let _field = data.as_mut();
14646 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
14647 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
14648
14649 let data = unsafe { data.deref_unchecked() };
14650
14651 if data.len() > 8192 {
14652 return Err(::fidl_next::DecodeError::VectorTooLong {
14653 size: data.len() as u64,
14654 limit: 8192,
14655 });
14656 }
14657
14658 Ok(())
14659 }
14660 }
14661
14662 impl<'de> ::fidl_next::IntoNatural for ReadableReadResponse<'de> {
14663 type Natural = crate::natural::ReadableReadResponse;
14664 }
14665
14666 #[derive(Debug)]
14668 #[repr(C)]
14669 pub struct WritableWriteRequest<'de> {
14670 pub data: ::fidl_next::wire::Vector<'de, u8>,
14671 }
14672
14673 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteRequest<'_>>(), 16);
14674 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteRequest<'_>>(), 8);
14675
14676 static_assertions::const_assert_eq!(std::mem::offset_of!(WritableWriteRequest<'_>, data), 0);
14677
14678 impl ::fidl_next::Constrained for WritableWriteRequest<'_> {
14679 type Constraint = ();
14680
14681 fn validate(
14682 _: ::fidl_next::Slot<'_, Self>,
14683 _: Self::Constraint,
14684 ) -> Result<(), ::fidl_next::ValidationError> {
14685 Ok(())
14686 }
14687 }
14688
14689 unsafe impl ::fidl_next::Wire for WritableWriteRequest<'static> {
14690 type Narrowed<'de> = WritableWriteRequest<'de>;
14691
14692 #[inline]
14693 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14694 ::fidl_next::munge! {
14695 let Self {
14696 data,
14697
14698 } = &mut *out_;
14699 }
14700
14701 ::fidl_next::Wire::zero_padding(data);
14702 }
14703 }
14704
14705 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WritableWriteRequest<'de>
14706 where
14707 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14708 ___D: ::fidl_next::Decoder<'de>,
14709 {
14710 fn decode(
14711 slot_: ::fidl_next::Slot<'_, Self>,
14712 decoder_: &mut ___D,
14713 _: (),
14714 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14715 ::fidl_next::munge! {
14716 let Self {
14717 mut data,
14718
14719 } = slot_;
14720 }
14721
14722 let _field = data.as_mut();
14723 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
14724 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
14725
14726 let data = unsafe { data.deref_unchecked() };
14727
14728 if data.len() > 8192 {
14729 return Err(::fidl_next::DecodeError::VectorTooLong {
14730 size: data.len() as u64,
14731 limit: 8192,
14732 });
14733 }
14734
14735 Ok(())
14736 }
14737 }
14738
14739 impl<'de> ::fidl_next::IntoNatural for WritableWriteRequest<'de> {
14740 type Natural = crate::natural::WritableWriteRequest;
14741 }
14742
14743 #[derive(Clone, Debug)]
14745 #[repr(C)]
14746 pub struct WritableWriteResponse {
14747 pub actual_count: ::fidl_next::wire::Uint64,
14748 }
14749
14750 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteResponse>(), 8);
14751 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteResponse>(), 8);
14752
14753 static_assertions::const_assert_eq!(
14754 std::mem::offset_of!(WritableWriteResponse, actual_count),
14755 0
14756 );
14757
14758 impl ::fidl_next::Constrained for WritableWriteResponse {
14759 type Constraint = ();
14760
14761 fn validate(
14762 _: ::fidl_next::Slot<'_, Self>,
14763 _: Self::Constraint,
14764 ) -> Result<(), ::fidl_next::ValidationError> {
14765 Ok(())
14766 }
14767 }
14768
14769 unsafe impl ::fidl_next::Wire for WritableWriteResponse {
14770 type Narrowed<'de> = WritableWriteResponse;
14771
14772 #[inline]
14773 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14774 ::fidl_next::munge! {
14775 let Self {
14776 actual_count,
14777
14778 } = &mut *out_;
14779 }
14780
14781 ::fidl_next::Wire::zero_padding(actual_count);
14782 }
14783 }
14784
14785 unsafe impl<___D> ::fidl_next::Decode<___D> for WritableWriteResponse
14786 where
14787 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14788 {
14789 fn decode(
14790 slot_: ::fidl_next::Slot<'_, Self>,
14791 decoder_: &mut ___D,
14792 _: (),
14793 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14794 ::fidl_next::munge! {
14795 let Self {
14796 mut actual_count,
14797
14798 } = slot_;
14799 }
14800
14801 let _field = actual_count.as_mut();
14802
14803 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
14804
14805 Ok(())
14806 }
14807 }
14808
14809 impl ::fidl_next::IntoNatural for WritableWriteResponse {
14810 type Natural = crate::natural::WritableWriteResponse;
14811 }
14812
14813 #[derive(Clone, Debug)]
14815 #[repr(C)]
14816 pub struct FileSeekRequest {
14817 pub origin: crate::wire::SeekOrigin,
14818
14819 pub offset: ::fidl_next::wire::Int64,
14820 }
14821
14822 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekRequest>(), 16);
14823 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekRequest>(), 8);
14824
14825 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, origin), 0);
14826
14827 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, offset), 8);
14828
14829 impl ::fidl_next::Constrained for FileSeekRequest {
14830 type Constraint = ();
14831
14832 fn validate(
14833 _: ::fidl_next::Slot<'_, Self>,
14834 _: Self::Constraint,
14835 ) -> Result<(), ::fidl_next::ValidationError> {
14836 Ok(())
14837 }
14838 }
14839
14840 unsafe impl ::fidl_next::Wire for FileSeekRequest {
14841 type Narrowed<'de> = FileSeekRequest;
14842
14843 #[inline]
14844 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14845 ::fidl_next::munge! {
14846 let Self {
14847 origin,
14848 offset,
14849
14850 } = &mut *out_;
14851 }
14852
14853 ::fidl_next::Wire::zero_padding(origin);
14854
14855 ::fidl_next::Wire::zero_padding(offset);
14856
14857 unsafe {
14858 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
14859 }
14860 }
14861 }
14862
14863 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekRequest
14864 where
14865 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14866 {
14867 fn decode(
14868 slot_: ::fidl_next::Slot<'_, Self>,
14869 decoder_: &mut ___D,
14870 _: (),
14871 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14872 if slot_.as_bytes()[4..8] != [0u8; 4] {
14873 return Err(::fidl_next::DecodeError::InvalidPadding);
14874 }
14875
14876 ::fidl_next::munge! {
14877 let Self {
14878 mut origin,
14879 mut offset,
14880
14881 } = slot_;
14882 }
14883
14884 let _field = origin.as_mut();
14885
14886 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
14887
14888 let _field = offset.as_mut();
14889
14890 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
14891
14892 Ok(())
14893 }
14894 }
14895
14896 impl ::fidl_next::IntoNatural for FileSeekRequest {
14897 type Natural = crate::natural::FileSeekRequest;
14898 }
14899
14900 #[derive(Clone, Debug)]
14902 #[repr(C)]
14903 pub struct FileSeekResponse {
14904 pub offset_from_start: ::fidl_next::wire::Uint64,
14905 }
14906
14907 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekResponse>(), 8);
14908 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekResponse>(), 8);
14909
14910 static_assertions::const_assert_eq!(
14911 std::mem::offset_of!(FileSeekResponse, offset_from_start),
14912 0
14913 );
14914
14915 impl ::fidl_next::Constrained for FileSeekResponse {
14916 type Constraint = ();
14917
14918 fn validate(
14919 _: ::fidl_next::Slot<'_, Self>,
14920 _: Self::Constraint,
14921 ) -> Result<(), ::fidl_next::ValidationError> {
14922 Ok(())
14923 }
14924 }
14925
14926 unsafe impl ::fidl_next::Wire for FileSeekResponse {
14927 type Narrowed<'de> = FileSeekResponse;
14928
14929 #[inline]
14930 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14931 ::fidl_next::munge! {
14932 let Self {
14933 offset_from_start,
14934
14935 } = &mut *out_;
14936 }
14937
14938 ::fidl_next::Wire::zero_padding(offset_from_start);
14939 }
14940 }
14941
14942 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekResponse
14943 where
14944 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14945 {
14946 fn decode(
14947 slot_: ::fidl_next::Slot<'_, Self>,
14948 decoder_: &mut ___D,
14949 _: (),
14950 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14951 ::fidl_next::munge! {
14952 let Self {
14953 mut offset_from_start,
14954
14955 } = slot_;
14956 }
14957
14958 let _field = offset_from_start.as_mut();
14959
14960 ::fidl_next::Decode::decode(offset_from_start.as_mut(), decoder_, ())?;
14961
14962 Ok(())
14963 }
14964 }
14965
14966 impl ::fidl_next::IntoNatural for FileSeekResponse {
14967 type Natural = crate::natural::FileSeekResponse;
14968 }
14969
14970 #[derive(Clone, Debug)]
14972 #[repr(C)]
14973 pub struct FileReadAtRequest {
14974 pub count: ::fidl_next::wire::Uint64,
14975
14976 pub offset: ::fidl_next::wire::Uint64,
14977 }
14978
14979 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtRequest>(), 16);
14980 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtRequest>(), 8);
14981
14982 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, count), 0);
14983
14984 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, offset), 8);
14985
14986 impl ::fidl_next::Constrained for FileReadAtRequest {
14987 type Constraint = ();
14988
14989 fn validate(
14990 _: ::fidl_next::Slot<'_, Self>,
14991 _: Self::Constraint,
14992 ) -> Result<(), ::fidl_next::ValidationError> {
14993 Ok(())
14994 }
14995 }
14996
14997 unsafe impl ::fidl_next::Wire for FileReadAtRequest {
14998 type Narrowed<'de> = FileReadAtRequest;
14999
15000 #[inline]
15001 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15002 ::fidl_next::munge! {
15003 let Self {
15004 count,
15005 offset,
15006
15007 } = &mut *out_;
15008 }
15009
15010 ::fidl_next::Wire::zero_padding(count);
15011
15012 ::fidl_next::Wire::zero_padding(offset);
15013 }
15014 }
15015
15016 unsafe impl<___D> ::fidl_next::Decode<___D> for FileReadAtRequest
15017 where
15018 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15019 {
15020 fn decode(
15021 slot_: ::fidl_next::Slot<'_, Self>,
15022 decoder_: &mut ___D,
15023 _: (),
15024 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15025 ::fidl_next::munge! {
15026 let Self {
15027 mut count,
15028 mut offset,
15029
15030 } = slot_;
15031 }
15032
15033 let _field = count.as_mut();
15034
15035 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
15036
15037 let _field = offset.as_mut();
15038
15039 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
15040
15041 Ok(())
15042 }
15043 }
15044
15045 impl ::fidl_next::IntoNatural for FileReadAtRequest {
15046 type Natural = crate::natural::FileReadAtRequest;
15047 }
15048
15049 #[derive(Debug)]
15051 #[repr(C)]
15052 pub struct FileReadAtResponse<'de> {
15053 pub data: ::fidl_next::wire::Vector<'de, u8>,
15054 }
15055
15056 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtResponse<'_>>(), 16);
15057 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtResponse<'_>>(), 8);
15058
15059 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtResponse<'_>, data), 0);
15060
15061 impl ::fidl_next::Constrained for FileReadAtResponse<'_> {
15062 type Constraint = ();
15063
15064 fn validate(
15065 _: ::fidl_next::Slot<'_, Self>,
15066 _: Self::Constraint,
15067 ) -> Result<(), ::fidl_next::ValidationError> {
15068 Ok(())
15069 }
15070 }
15071
15072 unsafe impl ::fidl_next::Wire for FileReadAtResponse<'static> {
15073 type Narrowed<'de> = FileReadAtResponse<'de>;
15074
15075 #[inline]
15076 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15077 ::fidl_next::munge! {
15078 let Self {
15079 data,
15080
15081 } = &mut *out_;
15082 }
15083
15084 ::fidl_next::Wire::zero_padding(data);
15085 }
15086 }
15087
15088 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileReadAtResponse<'de>
15089 where
15090 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15091 ___D: ::fidl_next::Decoder<'de>,
15092 {
15093 fn decode(
15094 slot_: ::fidl_next::Slot<'_, Self>,
15095 decoder_: &mut ___D,
15096 _: (),
15097 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15098 ::fidl_next::munge! {
15099 let Self {
15100 mut data,
15101
15102 } = slot_;
15103 }
15104
15105 let _field = data.as_mut();
15106 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
15107 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
15108
15109 let data = unsafe { data.deref_unchecked() };
15110
15111 if data.len() > 8192 {
15112 return Err(::fidl_next::DecodeError::VectorTooLong {
15113 size: data.len() as u64,
15114 limit: 8192,
15115 });
15116 }
15117
15118 Ok(())
15119 }
15120 }
15121
15122 impl<'de> ::fidl_next::IntoNatural for FileReadAtResponse<'de> {
15123 type Natural = crate::natural::FileReadAtResponse;
15124 }
15125
15126 #[derive(Debug)]
15128 #[repr(C)]
15129 pub struct FileWriteAtRequest<'de> {
15130 pub data: ::fidl_next::wire::Vector<'de, u8>,
15131
15132 pub offset: ::fidl_next::wire::Uint64,
15133 }
15134
15135 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtRequest<'_>>(), 24);
15136 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtRequest<'_>>(), 8);
15137
15138 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, data), 0);
15139
15140 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, offset), 16);
15141
15142 impl ::fidl_next::Constrained for FileWriteAtRequest<'_> {
15143 type Constraint = ();
15144
15145 fn validate(
15146 _: ::fidl_next::Slot<'_, Self>,
15147 _: Self::Constraint,
15148 ) -> Result<(), ::fidl_next::ValidationError> {
15149 Ok(())
15150 }
15151 }
15152
15153 unsafe impl ::fidl_next::Wire for FileWriteAtRequest<'static> {
15154 type Narrowed<'de> = FileWriteAtRequest<'de>;
15155
15156 #[inline]
15157 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15158 ::fidl_next::munge! {
15159 let Self {
15160 data,
15161 offset,
15162
15163 } = &mut *out_;
15164 }
15165
15166 ::fidl_next::Wire::zero_padding(data);
15167
15168 ::fidl_next::Wire::zero_padding(offset);
15169 }
15170 }
15171
15172 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileWriteAtRequest<'de>
15173 where
15174 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15175 ___D: ::fidl_next::Decoder<'de>,
15176 {
15177 fn decode(
15178 slot_: ::fidl_next::Slot<'_, Self>,
15179 decoder_: &mut ___D,
15180 _: (),
15181 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15182 ::fidl_next::munge! {
15183 let Self {
15184 mut data,
15185 mut offset,
15186
15187 } = slot_;
15188 }
15189
15190 let _field = data.as_mut();
15191 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
15192 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
15193
15194 let data = unsafe { data.deref_unchecked() };
15195
15196 if data.len() > 8192 {
15197 return Err(::fidl_next::DecodeError::VectorTooLong {
15198 size: data.len() as u64,
15199 limit: 8192,
15200 });
15201 }
15202
15203 let _field = offset.as_mut();
15204
15205 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
15206
15207 Ok(())
15208 }
15209 }
15210
15211 impl<'de> ::fidl_next::IntoNatural for FileWriteAtRequest<'de> {
15212 type Natural = crate::natural::FileWriteAtRequest;
15213 }
15214
15215 #[derive(Clone, Debug)]
15217 #[repr(C)]
15218 pub struct FileWriteAtResponse {
15219 pub actual_count: ::fidl_next::wire::Uint64,
15220 }
15221
15222 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtResponse>(), 8);
15223 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtResponse>(), 8);
15224
15225 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtResponse, actual_count), 0);
15226
15227 impl ::fidl_next::Constrained for FileWriteAtResponse {
15228 type Constraint = ();
15229
15230 fn validate(
15231 _: ::fidl_next::Slot<'_, Self>,
15232 _: Self::Constraint,
15233 ) -> Result<(), ::fidl_next::ValidationError> {
15234 Ok(())
15235 }
15236 }
15237
15238 unsafe impl ::fidl_next::Wire for FileWriteAtResponse {
15239 type Narrowed<'de> = FileWriteAtResponse;
15240
15241 #[inline]
15242 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15243 ::fidl_next::munge! {
15244 let Self {
15245 actual_count,
15246
15247 } = &mut *out_;
15248 }
15249
15250 ::fidl_next::Wire::zero_padding(actual_count);
15251 }
15252 }
15253
15254 unsafe impl<___D> ::fidl_next::Decode<___D> for FileWriteAtResponse
15255 where
15256 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15257 {
15258 fn decode(
15259 slot_: ::fidl_next::Slot<'_, Self>,
15260 decoder_: &mut ___D,
15261 _: (),
15262 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15263 ::fidl_next::munge! {
15264 let Self {
15265 mut actual_count,
15266
15267 } = slot_;
15268 }
15269
15270 let _field = actual_count.as_mut();
15271
15272 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
15273
15274 Ok(())
15275 }
15276 }
15277
15278 impl ::fidl_next::IntoNatural for FileWriteAtResponse {
15279 type Natural = crate::natural::FileWriteAtResponse;
15280 }
15281
15282 #[derive(Clone, Debug)]
15284 #[repr(C)]
15285 pub struct FileResizeRequest {
15286 pub length: ::fidl_next::wire::Uint64,
15287 }
15288
15289 static_assertions::const_assert_eq!(std::mem::size_of::<FileResizeRequest>(), 8);
15290 static_assertions::const_assert_eq!(std::mem::align_of::<FileResizeRequest>(), 8);
15291
15292 static_assertions::const_assert_eq!(std::mem::offset_of!(FileResizeRequest, length), 0);
15293
15294 impl ::fidl_next::Constrained for FileResizeRequest {
15295 type Constraint = ();
15296
15297 fn validate(
15298 _: ::fidl_next::Slot<'_, Self>,
15299 _: Self::Constraint,
15300 ) -> Result<(), ::fidl_next::ValidationError> {
15301 Ok(())
15302 }
15303 }
15304
15305 unsafe impl ::fidl_next::Wire for FileResizeRequest {
15306 type Narrowed<'de> = FileResizeRequest;
15307
15308 #[inline]
15309 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15310 ::fidl_next::munge! {
15311 let Self {
15312 length,
15313
15314 } = &mut *out_;
15315 }
15316
15317 ::fidl_next::Wire::zero_padding(length);
15318 }
15319 }
15320
15321 unsafe impl<___D> ::fidl_next::Decode<___D> for FileResizeRequest
15322 where
15323 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15324 {
15325 fn decode(
15326 slot_: ::fidl_next::Slot<'_, Self>,
15327 decoder_: &mut ___D,
15328 _: (),
15329 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15330 ::fidl_next::munge! {
15331 let Self {
15332 mut length,
15333
15334 } = slot_;
15335 }
15336
15337 let _field = length.as_mut();
15338
15339 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
15340
15341 Ok(())
15342 }
15343 }
15344
15345 impl ::fidl_next::IntoNatural for FileResizeRequest {
15346 type Natural = crate::natural::FileResizeRequest;
15347 }
15348
15349 pub type FileResizeResponse = ::fidl_next::wire::Unit;
15351
15352 #[derive(Clone, Copy, Debug)]
15354 #[repr(transparent)]
15355 pub struct VmoFlags {
15356 pub(crate) value: ::fidl_next::wire::Uint32,
15357 }
15358
15359 impl ::fidl_next::Constrained for VmoFlags {
15360 type Constraint = ();
15361
15362 fn validate(
15363 _: ::fidl_next::Slot<'_, Self>,
15364 _: Self::Constraint,
15365 ) -> Result<(), ::fidl_next::ValidationError> {
15366 Ok(())
15367 }
15368 }
15369
15370 unsafe impl ::fidl_next::Wire for VmoFlags {
15371 type Narrowed<'de> = Self;
15372
15373 #[inline]
15374 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15375 }
15377 }
15378
15379 unsafe impl<___D> ::fidl_next::Decode<___D> for VmoFlags
15380 where
15381 ___D: ?Sized,
15382 {
15383 fn decode(
15384 slot: ::fidl_next::Slot<'_, Self>,
15385 _: &mut ___D,
15386 _: (),
15387 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15388 ::fidl_next::munge!(let Self { value } = slot);
15389 let set = u32::from(*value);
15390 if set & !crate::natural::VmoFlags::all().bits() != 0 {
15391 return Err(::fidl_next::DecodeError::InvalidBits {
15392 expected: crate::natural::VmoFlags::all().bits() as usize,
15393 actual: set as usize,
15394 });
15395 }
15396
15397 Ok(())
15398 }
15399 }
15400
15401 impl ::core::convert::From<crate::natural::VmoFlags> for VmoFlags {
15402 fn from(natural: crate::natural::VmoFlags) -> Self {
15403 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
15404 }
15405 }
15406
15407 impl ::fidl_next::IntoNatural for VmoFlags {
15408 type Natural = crate::natural::VmoFlags;
15409 }
15410
15411 #[derive(Clone, Debug)]
15413 #[repr(C)]
15414 pub struct FileGetBackingMemoryRequest {
15415 pub flags: crate::wire::VmoFlags,
15416 }
15417
15418 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryRequest>(), 4);
15419 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryRequest>(), 4);
15420
15421 static_assertions::const_assert_eq!(
15422 std::mem::offset_of!(FileGetBackingMemoryRequest, flags),
15423 0
15424 );
15425
15426 impl ::fidl_next::Constrained for FileGetBackingMemoryRequest {
15427 type Constraint = ();
15428
15429 fn validate(
15430 _: ::fidl_next::Slot<'_, Self>,
15431 _: Self::Constraint,
15432 ) -> Result<(), ::fidl_next::ValidationError> {
15433 Ok(())
15434 }
15435 }
15436
15437 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryRequest {
15438 type Narrowed<'de> = FileGetBackingMemoryRequest;
15439
15440 #[inline]
15441 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15442 ::fidl_next::munge! {
15443 let Self {
15444 flags,
15445
15446 } = &mut *out_;
15447 }
15448
15449 ::fidl_next::Wire::zero_padding(flags);
15450 }
15451 }
15452
15453 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryRequest
15454 where
15455 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15456 {
15457 fn decode(
15458 slot_: ::fidl_next::Slot<'_, Self>,
15459 decoder_: &mut ___D,
15460 _: (),
15461 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15462 ::fidl_next::munge! {
15463 let Self {
15464 mut flags,
15465
15466 } = slot_;
15467 }
15468
15469 let _field = flags.as_mut();
15470
15471 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
15472
15473 Ok(())
15474 }
15475 }
15476
15477 impl ::fidl_next::IntoNatural for FileGetBackingMemoryRequest {
15478 type Natural = crate::natural::FileGetBackingMemoryRequest;
15479 }
15480
15481 pub type LinkableLinkIntoResponse = ::fidl_next::wire::Unit;
15483
15484 pub type FileAllocateResponse = ::fidl_next::wire::Unit;
15486
15487 pub type FileEnableVerityResponse = ::fidl_next::wire::Unit;
15489
15490 #[derive(Clone, Copy, Debug)]
15492 #[repr(transparent)]
15493 pub struct FileSignal {
15494 pub(crate) value: ::fidl_next::wire::Uint32,
15495 }
15496
15497 impl ::fidl_next::Constrained for FileSignal {
15498 type Constraint = ();
15499
15500 fn validate(
15501 _: ::fidl_next::Slot<'_, Self>,
15502 _: Self::Constraint,
15503 ) -> Result<(), ::fidl_next::ValidationError> {
15504 Ok(())
15505 }
15506 }
15507
15508 unsafe impl ::fidl_next::Wire for FileSignal {
15509 type Narrowed<'de> = Self;
15510
15511 #[inline]
15512 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15513 }
15515 }
15516
15517 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSignal
15518 where
15519 ___D: ?Sized,
15520 {
15521 fn decode(
15522 slot: ::fidl_next::Slot<'_, Self>,
15523 _: &mut ___D,
15524 _: (),
15525 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15526 ::fidl_next::munge!(let Self { value } = slot);
15527 let set = u32::from(*value);
15528 if set & !crate::natural::FileSignal::all().bits() != 0 {
15529 return Err(::fidl_next::DecodeError::InvalidBits {
15530 expected: crate::natural::FileSignal::all().bits() as usize,
15531 actual: set as usize,
15532 });
15533 }
15534
15535 Ok(())
15536 }
15537 }
15538
15539 impl ::core::convert::From<crate::natural::FileSignal> for FileSignal {
15540 fn from(natural: crate::natural::FileSignal) -> Self {
15541 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
15542 }
15543 }
15544
15545 impl ::fidl_next::IntoNatural for FileSignal {
15546 type Natural = crate::natural::FileSignal;
15547 }
15548
15549 #[derive(Clone, Debug)]
15551 #[repr(C)]
15552 pub struct FilesystemInfo {
15553 pub total_bytes: ::fidl_next::wire::Uint64,
15554
15555 pub used_bytes: ::fidl_next::wire::Uint64,
15556
15557 pub total_nodes: ::fidl_next::wire::Uint64,
15558
15559 pub used_nodes: ::fidl_next::wire::Uint64,
15560
15561 pub free_shared_pool_bytes: ::fidl_next::wire::Uint64,
15562
15563 pub fs_id: ::fidl_next::wire::Uint64,
15564
15565 pub block_size: ::fidl_next::wire::Uint32,
15566
15567 pub max_filename_size: ::fidl_next::wire::Uint32,
15568
15569 pub fs_type: ::fidl_next::wire::Uint32,
15570
15571 pub padding: ::fidl_next::wire::Uint32,
15572
15573 pub name: [i8; 32],
15574 }
15575
15576 static_assertions::const_assert_eq!(std::mem::size_of::<FilesystemInfo>(), 96);
15577 static_assertions::const_assert_eq!(std::mem::align_of::<FilesystemInfo>(), 8);
15578
15579 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_bytes), 0);
15580
15581 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_bytes), 8);
15582
15583 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_nodes), 16);
15584
15585 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_nodes), 24);
15586
15587 static_assertions::const_assert_eq!(
15588 std::mem::offset_of!(FilesystemInfo, free_shared_pool_bytes),
15589 32
15590 );
15591
15592 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_id), 40);
15593
15594 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, block_size), 48);
15595
15596 static_assertions::const_assert_eq!(
15597 std::mem::offset_of!(FilesystemInfo, max_filename_size),
15598 52
15599 );
15600
15601 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_type), 56);
15602
15603 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, padding), 60);
15604
15605 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, name), 64);
15606
15607 impl ::fidl_next::Constrained for FilesystemInfo {
15608 type Constraint = ();
15609
15610 fn validate(
15611 _: ::fidl_next::Slot<'_, Self>,
15612 _: Self::Constraint,
15613 ) -> Result<(), ::fidl_next::ValidationError> {
15614 Ok(())
15615 }
15616 }
15617
15618 unsafe impl ::fidl_next::Wire for FilesystemInfo {
15619 type Narrowed<'de> = FilesystemInfo;
15620
15621 #[inline]
15622 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15623 ::fidl_next::munge! {
15624 let Self {
15625 total_bytes,
15626 used_bytes,
15627 total_nodes,
15628 used_nodes,
15629 free_shared_pool_bytes,
15630 fs_id,
15631 block_size,
15632 max_filename_size,
15633 fs_type,
15634 padding,
15635 name,
15636
15637 } = &mut *out_;
15638 }
15639
15640 ::fidl_next::Wire::zero_padding(total_bytes);
15641
15642 ::fidl_next::Wire::zero_padding(used_bytes);
15643
15644 ::fidl_next::Wire::zero_padding(total_nodes);
15645
15646 ::fidl_next::Wire::zero_padding(used_nodes);
15647
15648 ::fidl_next::Wire::zero_padding(free_shared_pool_bytes);
15649
15650 ::fidl_next::Wire::zero_padding(fs_id);
15651
15652 ::fidl_next::Wire::zero_padding(block_size);
15653
15654 ::fidl_next::Wire::zero_padding(max_filename_size);
15655
15656 ::fidl_next::Wire::zero_padding(fs_type);
15657
15658 ::fidl_next::Wire::zero_padding(padding);
15659
15660 ::fidl_next::Wire::zero_padding(name);
15661 }
15662 }
15663
15664 unsafe impl<___D> ::fidl_next::Decode<___D> for FilesystemInfo
15665 where
15666 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15667 {
15668 fn decode(
15669 slot_: ::fidl_next::Slot<'_, Self>,
15670 decoder_: &mut ___D,
15671 _: (),
15672 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15673 ::fidl_next::munge! {
15674 let Self {
15675 mut total_bytes,
15676 mut used_bytes,
15677 mut total_nodes,
15678 mut used_nodes,
15679 mut free_shared_pool_bytes,
15680 mut fs_id,
15681 mut block_size,
15682 mut max_filename_size,
15683 mut fs_type,
15684 mut padding,
15685 mut name,
15686
15687 } = slot_;
15688 }
15689
15690 let _field = total_bytes.as_mut();
15691
15692 ::fidl_next::Decode::decode(total_bytes.as_mut(), decoder_, ())?;
15693
15694 let _field = used_bytes.as_mut();
15695
15696 ::fidl_next::Decode::decode(used_bytes.as_mut(), decoder_, ())?;
15697
15698 let _field = total_nodes.as_mut();
15699
15700 ::fidl_next::Decode::decode(total_nodes.as_mut(), decoder_, ())?;
15701
15702 let _field = used_nodes.as_mut();
15703
15704 ::fidl_next::Decode::decode(used_nodes.as_mut(), decoder_, ())?;
15705
15706 let _field = free_shared_pool_bytes.as_mut();
15707
15708 ::fidl_next::Decode::decode(free_shared_pool_bytes.as_mut(), decoder_, ())?;
15709
15710 let _field = fs_id.as_mut();
15711
15712 ::fidl_next::Decode::decode(fs_id.as_mut(), decoder_, ())?;
15713
15714 let _field = block_size.as_mut();
15715
15716 ::fidl_next::Decode::decode(block_size.as_mut(), decoder_, ())?;
15717
15718 let _field = max_filename_size.as_mut();
15719
15720 ::fidl_next::Decode::decode(max_filename_size.as_mut(), decoder_, ())?;
15721
15722 let _field = fs_type.as_mut();
15723
15724 ::fidl_next::Decode::decode(fs_type.as_mut(), decoder_, ())?;
15725
15726 let _field = padding.as_mut();
15727
15728 ::fidl_next::Decode::decode(padding.as_mut(), decoder_, ())?;
15729
15730 let _field = name.as_mut();
15731
15732 ::fidl_next::Decode::decode(name.as_mut(), decoder_, ())?;
15733
15734 Ok(())
15735 }
15736 }
15737
15738 impl ::fidl_next::IntoNatural for FilesystemInfo {
15739 type Natural = crate::natural::FilesystemInfo;
15740 }
15741
15742 pub type Service = ::fidl_next::wire::Unit;
15744
15745 #[derive(Debug)]
15747 #[repr(C)]
15748 pub struct SymlinkObject<'de> {
15749 pub target: ::fidl_next::wire::Vector<'de, u8>,
15750 }
15751
15752 static_assertions::const_assert_eq!(std::mem::size_of::<SymlinkObject<'_>>(), 16);
15753 static_assertions::const_assert_eq!(std::mem::align_of::<SymlinkObject<'_>>(), 8);
15754
15755 static_assertions::const_assert_eq!(std::mem::offset_of!(SymlinkObject<'_>, target), 0);
15756
15757 impl ::fidl_next::Constrained for SymlinkObject<'_> {
15758 type Constraint = ();
15759
15760 fn validate(
15761 _: ::fidl_next::Slot<'_, Self>,
15762 _: Self::Constraint,
15763 ) -> Result<(), ::fidl_next::ValidationError> {
15764 Ok(())
15765 }
15766 }
15767
15768 unsafe impl ::fidl_next::Wire for SymlinkObject<'static> {
15769 type Narrowed<'de> = SymlinkObject<'de>;
15770
15771 #[inline]
15772 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15773 ::fidl_next::munge! {
15774 let Self {
15775 target,
15776
15777 } = &mut *out_;
15778 }
15779
15780 ::fidl_next::Wire::zero_padding(target);
15781 }
15782 }
15783
15784 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SymlinkObject<'de>
15785 where
15786 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15787 ___D: ::fidl_next::Decoder<'de>,
15788 {
15789 fn decode(
15790 slot_: ::fidl_next::Slot<'_, Self>,
15791 decoder_: &mut ___D,
15792 _: (),
15793 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15794 ::fidl_next::munge! {
15795 let Self {
15796 mut target,
15797
15798 } = slot_;
15799 }
15800
15801 let _field = target.as_mut();
15802 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
15803 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
15804
15805 let target = unsafe { target.deref_unchecked() };
15806
15807 if target.len() > 4095 {
15808 return Err(::fidl_next::DecodeError::VectorTooLong {
15809 size: target.len() as u64,
15810 limit: 4095,
15811 });
15812 }
15813
15814 Ok(())
15815 }
15816 }
15817
15818 impl<'de> ::fidl_next::IntoNatural for SymlinkObject<'de> {
15819 type Natural = crate::natural::SymlinkObject;
15820 }
15821
15822 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
15824 #[repr(transparent)]
15825 pub struct WatchEvent {
15826 pub(crate) value: u8,
15827 }
15828
15829 impl ::fidl_next::Constrained for WatchEvent {
15830 type Constraint = ();
15831
15832 fn validate(
15833 _: ::fidl_next::Slot<'_, Self>,
15834 _: Self::Constraint,
15835 ) -> Result<(), ::fidl_next::ValidationError> {
15836 Ok(())
15837 }
15838 }
15839
15840 unsafe impl ::fidl_next::Wire for WatchEvent {
15841 type Narrowed<'de> = Self;
15842
15843 #[inline]
15844 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15845 }
15847 }
15848
15849 impl WatchEvent {
15850 pub const DELETED: WatchEvent = WatchEvent { value: 0 };
15851
15852 pub const ADDED: WatchEvent = WatchEvent { value: 1 };
15853
15854 pub const REMOVED: WatchEvent = WatchEvent { value: 2 };
15855
15856 pub const EXISTING: WatchEvent = WatchEvent { value: 3 };
15857
15858 pub const IDLE: WatchEvent = WatchEvent { value: 4 };
15859 }
15860
15861 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchEvent
15862 where
15863 ___D: ?Sized,
15864 {
15865 fn decode(
15866 slot: ::fidl_next::Slot<'_, Self>,
15867 _: &mut ___D,
15868 _: (),
15869 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15870 ::fidl_next::munge!(let Self { value } = slot);
15871
15872 match u8::from(*value) {
15873 0 | 1 | 2 | 3 | 4 => (),
15874 unknown => {
15875 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
15876 }
15877 }
15878
15879 Ok(())
15880 }
15881 }
15882
15883 impl ::core::convert::From<crate::natural::WatchEvent> for WatchEvent {
15884 fn from(natural: crate::natural::WatchEvent) -> Self {
15885 match natural {
15886 crate::natural::WatchEvent::Deleted => WatchEvent::DELETED,
15887
15888 crate::natural::WatchEvent::Added => WatchEvent::ADDED,
15889
15890 crate::natural::WatchEvent::Removed => WatchEvent::REMOVED,
15891
15892 crate::natural::WatchEvent::Existing => WatchEvent::EXISTING,
15893
15894 crate::natural::WatchEvent::Idle => WatchEvent::IDLE,
15895 }
15896 }
15897 }
15898
15899 impl ::fidl_next::IntoNatural for WatchEvent {
15900 type Natural = crate::natural::WatchEvent;
15901 }
15902}
15903
15904pub mod wire_optional {
15905
15906 #[repr(transparent)]
15907 pub struct SelinuxContext<'de> {
15908 pub(crate) raw: ::fidl_next::wire::Union,
15909 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15910 }
15911
15912 impl ::fidl_next::Constrained for SelinuxContext<'_> {
15913 type Constraint = ();
15914
15915 fn validate(
15916 _: ::fidl_next::Slot<'_, Self>,
15917 _: Self::Constraint,
15918 ) -> Result<(), ::fidl_next::ValidationError> {
15919 Ok(())
15920 }
15921 }
15922
15923 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
15924 type Narrowed<'de> = SelinuxContext<'de>;
15925
15926 #[inline]
15927 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15928 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15929 ::fidl_next::wire::Union::zero_padding(raw);
15930 }
15931 }
15932
15933 impl<'de> SelinuxContext<'de> {
15934 pub fn is_some(&self) -> bool {
15935 self.raw.is_some()
15936 }
15937
15938 pub fn is_none(&self) -> bool {
15939 self.raw.is_none()
15940 }
15941
15942 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
15943 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
15944 }
15945
15946 pub fn into_option(self) -> ::core::option::Option<crate::wire::SelinuxContext<'de>> {
15947 if self.is_some() {
15948 Some(crate::wire::SelinuxContext {
15949 raw: self.raw,
15950 _phantom: ::core::marker::PhantomData,
15951 })
15952 } else {
15953 None
15954 }
15955 }
15956 }
15957
15958 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SelinuxContext<'de>
15959 where
15960 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15961 ___D: ::fidl_next::Decoder<'de>,
15962 {
15963 fn decode(
15964 mut slot: ::fidl_next::Slot<'_, Self>,
15965 decoder: &mut ___D,
15966 _: (),
15967 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15968 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15969 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
15970 1 => {
15971 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
15972 raw,
15973 decoder,
15974 (256, ()),
15975 )?
15976 }
15977
15978 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::EmptyStruct>(
15979 raw,
15980 decoder,
15981 (),
15982 )?,
15983
15984 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
15985 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
15986 }
15987
15988 Ok(())
15989 }
15990 }
15991
15992 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
15993 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15994 self.as_ref().fmt(f)
15995 }
15996 }
15997
15998 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
15999 type Natural = ::core::option::Option<crate::natural::SelinuxContext>;
16000 }
16001}
16002
16003pub mod generic {
16004
16005 pub struct AdvisoryLockRange<T0, T1, T2> {
16007 pub origin: T0,
16008
16009 pub offset: T1,
16010
16011 pub length: T2,
16012 }
16013
16014 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
16015 for AdvisoryLockRange<T0, T1, T2>
16016 where
16017 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16018 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
16019 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
16020 T2: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
16021 {
16022 #[inline]
16023 fn encode(
16024 self,
16025 encoder_: &mut ___E,
16026 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
16027 _: (),
16028 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16029 ::fidl_next::munge! {
16030 let crate::wire::AdvisoryLockRange {
16031 origin,
16032 offset,
16033 length,
16034
16035 } = out_;
16036 }
16037
16038 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
16039
16040 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
16041
16042 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
16043
16044 Ok(())
16045 }
16046 }
16047
16048 pub struct AdvisoryLockingAdvisoryLockRequest<T0> {
16050 pub request: T0,
16051 }
16052
16053 unsafe impl<___E, T0>
16054 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
16055 for AdvisoryLockingAdvisoryLockRequest<T0>
16056 where
16057 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16058 ___E: ::fidl_next::Encoder,
16059 T0: ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>,
16060 {
16061 #[inline]
16062 fn encode(
16063 self,
16064 encoder_: &mut ___E,
16065 out_: &mut ::core::mem::MaybeUninit<
16066 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
16067 >,
16068 _: (),
16069 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16070 ::fidl_next::munge! {
16071 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
16072 request,
16073
16074 } = out_;
16075 }
16076
16077 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
16078
16079 Ok(())
16080 }
16081 }
16082
16083 pub type AdvisoryLockingAdvisoryLockResponse = ();
16085
16086 pub struct NodeAttributes<T0, T1, T2, T3, T4, T5, T6> {
16088 pub mode: T0,
16089
16090 pub id: T1,
16091
16092 pub content_size: T2,
16093
16094 pub storage_size: T3,
16095
16096 pub link_count: T4,
16097
16098 pub creation_time: T5,
16099
16100 pub modification_time: T6,
16101 }
16102
16103 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
16104 ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>
16105 for NodeAttributes<T0, T1, T2, T3, T4, T5, T6>
16106 where
16107 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16108 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
16109 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16110 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16111 T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16112 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16113 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16114 T6: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16115 {
16116 #[inline]
16117 fn encode(
16118 self,
16119 encoder_: &mut ___E,
16120 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
16121 _: (),
16122 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16123 ::fidl_next::munge! {
16124 let crate::wire::NodeAttributes {
16125 mode,
16126 id,
16127 content_size,
16128 storage_size,
16129 link_count,
16130 creation_time,
16131 modification_time,
16132
16133 } = out_;
16134 }
16135
16136 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
16137
16138 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
16139
16140 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
16141
16142 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
16143
16144 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
16145
16146 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
16147
16148 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
16149
16150 Ok(())
16151 }
16152 }
16153
16154 pub struct NodeQueryFilesystemResponse<T0, T1> {
16156 pub s: T0,
16157
16158 pub info: T1,
16159 }
16160
16161 unsafe impl<___E, T0, T1>
16162 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
16163 for NodeQueryFilesystemResponse<T0, T1>
16164 where
16165 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16166 ___E: ::fidl_next::Encoder,
16167 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16168 T1: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>, ___E>,
16169 {
16170 #[inline]
16171 fn encode(
16172 self,
16173 encoder_: &mut ___E,
16174 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
16175 _: (),
16176 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16177 ::fidl_next::munge! {
16178 let crate::wire::NodeQueryFilesystemResponse {
16179 s,
16180 info,
16181
16182 } = out_;
16183 }
16184
16185 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16186
16187 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
16188
16189 Ok(())
16190 }
16191 }
16192
16193 pub type NodeUpdateAttributesResponse = ();
16195
16196 pub type NodeSyncResponse = ();
16198
16199 pub struct DirectoryReadDirentsRequest<T0> {
16201 pub max_bytes: T0,
16202 }
16203
16204 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
16205 for DirectoryReadDirentsRequest<T0>
16206 where
16207 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16208 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16209 {
16210 #[inline]
16211 fn encode(
16212 self,
16213 encoder_: &mut ___E,
16214 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
16215 _: (),
16216 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16217 ::fidl_next::munge! {
16218 let crate::wire::DirectoryReadDirentsRequest {
16219 max_bytes,
16220
16221 } = out_;
16222 }
16223
16224 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
16225
16226 Ok(())
16227 }
16228 }
16229
16230 pub struct DirectoryReadDirentsResponse<T0, T1> {
16232 pub s: T0,
16233
16234 pub dirents: T1,
16235 }
16236
16237 unsafe impl<___E, T0, T1>
16238 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
16239 for DirectoryReadDirentsResponse<T0, T1>
16240 where
16241 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16242 ___E: ::fidl_next::Encoder,
16243 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16244 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16245 {
16246 #[inline]
16247 fn encode(
16248 self,
16249 encoder_: &mut ___E,
16250 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
16251 _: (),
16252 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16253 ::fidl_next::munge! {
16254 let crate::wire::DirectoryReadDirentsResponse {
16255 s,
16256 dirents,
16257
16258 } = out_;
16259 }
16260
16261 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16262
16263 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
16264
16265 Ok(())
16266 }
16267 }
16268
16269 pub struct DirectoryRewindResponse<T0> {
16271 pub s: T0,
16272 }
16273
16274 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
16275 for DirectoryRewindResponse<T0>
16276 where
16277 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16278 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16279 {
16280 #[inline]
16281 fn encode(
16282 self,
16283 encoder_: &mut ___E,
16284 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
16285 _: (),
16286 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16287 ::fidl_next::munge! {
16288 let crate::wire::DirectoryRewindResponse {
16289 s,
16290
16291 } = out_;
16292 }
16293
16294 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16295
16296 Ok(())
16297 }
16298 }
16299
16300 pub struct DirectoryLinkResponse<T0> {
16302 pub s: T0,
16303 }
16304
16305 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
16306 for DirectoryLinkResponse<T0>
16307 where
16308 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16309 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16310 {
16311 #[inline]
16312 fn encode(
16313 self,
16314 encoder_: &mut ___E,
16315 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
16316 _: (),
16317 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16318 ::fidl_next::munge! {
16319 let crate::wire::DirectoryLinkResponse {
16320 s,
16321
16322 } = out_;
16323 }
16324
16325 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16326
16327 Ok(())
16328 }
16329 }
16330
16331 pub struct DirectoryUnlinkRequest<T0, T1> {
16333 pub name: T0,
16334
16335 pub options: T1,
16336 }
16337
16338 unsafe impl<___E, T0, T1>
16339 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
16340 for DirectoryUnlinkRequest<T0, T1>
16341 where
16342 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16343 ___E: ::fidl_next::Encoder,
16344 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
16345 T1: ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>,
16346 {
16347 #[inline]
16348 fn encode(
16349 self,
16350 encoder_: &mut ___E,
16351 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
16352 _: (),
16353 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16354 ::fidl_next::munge! {
16355 let crate::wire::DirectoryUnlinkRequest {
16356 name,
16357 options,
16358
16359 } = out_;
16360 }
16361
16362 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
16363
16364 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
16365
16366 Ok(())
16367 }
16368 }
16369
16370 pub type DirectoryUnlinkResponse = ();
16372
16373 pub type DirectoryRenameResponse = ();
16375
16376 pub struct DirectoryWatchResponse<T0> {
16378 pub s: T0,
16379 }
16380
16381 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
16382 for DirectoryWatchResponse<T0>
16383 where
16384 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16385 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16386 {
16387 #[inline]
16388 fn encode(
16389 self,
16390 encoder_: &mut ___E,
16391 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
16392 _: (),
16393 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16394 ::fidl_next::munge! {
16395 let crate::wire::DirectoryWatchResponse {
16396 s,
16397
16398 } = out_;
16399 }
16400
16401 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16402
16403 Ok(())
16404 }
16405 }
16406
16407 pub struct NodeGetExtendedAttributeRequest<T0> {
16409 pub name: T0,
16410 }
16411
16412 unsafe impl<___E, T0>
16413 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
16414 for NodeGetExtendedAttributeRequest<T0>
16415 where
16416 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16417 ___E: ::fidl_next::Encoder,
16418 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16419 {
16420 #[inline]
16421 fn encode(
16422 self,
16423 encoder_: &mut ___E,
16424 out_: &mut ::core::mem::MaybeUninit<
16425 crate::wire::NodeGetExtendedAttributeRequest<'static>,
16426 >,
16427 _: (),
16428 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16429 ::fidl_next::munge! {
16430 let crate::wire::NodeGetExtendedAttributeRequest {
16431 name,
16432
16433 } = out_;
16434 }
16435
16436 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
16437
16438 Ok(())
16439 }
16440 }
16441
16442 pub type NodeSetExtendedAttributeResponse = ();
16444
16445 pub struct NodeRemoveExtendedAttributeRequest<T0> {
16447 pub name: T0,
16448 }
16449
16450 unsafe impl<___E, T0>
16451 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
16452 for NodeRemoveExtendedAttributeRequest<T0>
16453 where
16454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16455 ___E: ::fidl_next::Encoder,
16456 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16457 {
16458 #[inline]
16459 fn encode(
16460 self,
16461 encoder_: &mut ___E,
16462 out_: &mut ::core::mem::MaybeUninit<
16463 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
16464 >,
16465 _: (),
16466 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16467 ::fidl_next::munge! {
16468 let crate::wire::NodeRemoveExtendedAttributeRequest {
16469 name,
16470
16471 } = out_;
16472 }
16473
16474 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
16475
16476 Ok(())
16477 }
16478 }
16479
16480 pub type NodeRemoveExtendedAttributeResponse = ();
16482
16483 pub type DirectoryCreateSymlinkResponse = ();
16485
16486 pub type NodeSetFlagsResponse = ();
16488
16489 pub struct NodeDeprecatedGetAttrResponse<T0, T1> {
16491 pub s: T0,
16492
16493 pub attributes: T1,
16494 }
16495
16496 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
16497 for NodeDeprecatedGetAttrResponse<T0, T1>
16498 where
16499 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16500 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16501 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
16502 {
16503 #[inline]
16504 fn encode(
16505 self,
16506 encoder_: &mut ___E,
16507 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
16508 _: (),
16509 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16510 ::fidl_next::munge! {
16511 let crate::wire::NodeDeprecatedGetAttrResponse {
16512 s,
16513 attributes,
16514
16515 } = out_;
16516 }
16517
16518 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16519
16520 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
16521
16522 Ok(())
16523 }
16524 }
16525
16526 pub struct NodeDeprecatedSetAttrRequest<T0, T1> {
16528 pub flags: T0,
16529
16530 pub attributes: T1,
16531 }
16532
16533 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
16534 for NodeDeprecatedSetAttrRequest<T0, T1>
16535 where
16536 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16537 T0: ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>,
16538 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
16539 {
16540 #[inline]
16541 fn encode(
16542 self,
16543 encoder_: &mut ___E,
16544 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
16545 _: (),
16546 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16547 ::fidl_next::munge! {
16548 let crate::wire::NodeDeprecatedSetAttrRequest {
16549 flags,
16550 attributes,
16551
16552 } = out_;
16553 }
16554
16555 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16556
16557 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
16558
16559 Ok(())
16560 }
16561 }
16562
16563 pub struct NodeDeprecatedSetAttrResponse<T0> {
16565 pub s: T0,
16566 }
16567
16568 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
16569 for NodeDeprecatedSetAttrResponse<T0>
16570 where
16571 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16572 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16573 {
16574 #[inline]
16575 fn encode(
16576 self,
16577 encoder_: &mut ___E,
16578 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
16579 _: (),
16580 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16581 ::fidl_next::munge! {
16582 let crate::wire::NodeDeprecatedSetAttrResponse {
16583 s,
16584
16585 } = out_;
16586 }
16587
16588 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16589
16590 Ok(())
16591 }
16592 }
16593
16594 pub struct NodeDeprecatedGetFlagsResponse<T0, T1> {
16596 pub s: T0,
16597
16598 pub flags: T1,
16599 }
16600
16601 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
16602 for NodeDeprecatedGetFlagsResponse<T0, T1>
16603 where
16604 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16605 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16606 T1: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
16607 {
16608 #[inline]
16609 fn encode(
16610 self,
16611 encoder_: &mut ___E,
16612 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
16613 _: (),
16614 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16615 ::fidl_next::munge! {
16616 let crate::wire::NodeDeprecatedGetFlagsResponse {
16617 s,
16618 flags,
16619
16620 } = out_;
16621 }
16622
16623 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16624
16625 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16626
16627 Ok(())
16628 }
16629 }
16630
16631 pub struct NodeDeprecatedSetFlagsRequest<T0> {
16633 pub flags: T0,
16634 }
16635
16636 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
16637 for NodeDeprecatedSetFlagsRequest<T0>
16638 where
16639 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16640 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
16641 {
16642 #[inline]
16643 fn encode(
16644 self,
16645 encoder_: &mut ___E,
16646 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
16647 _: (),
16648 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16649 ::fidl_next::munge! {
16650 let crate::wire::NodeDeprecatedSetFlagsRequest {
16651 flags,
16652
16653 } = out_;
16654 }
16655
16656 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16657
16658 Ok(())
16659 }
16660 }
16661
16662 pub struct NodeDeprecatedSetFlagsResponse<T0> {
16664 pub s: T0,
16665 }
16666
16667 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
16668 for NodeDeprecatedSetFlagsResponse<T0>
16669 where
16670 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16671 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
16672 {
16673 #[inline]
16674 fn encode(
16675 self,
16676 encoder_: &mut ___E,
16677 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
16678 _: (),
16679 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16680 ::fidl_next::munge! {
16681 let crate::wire::NodeDeprecatedSetFlagsResponse {
16682 s,
16683
16684 } = out_;
16685 }
16686
16687 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16688
16689 Ok(())
16690 }
16691 }
16692
16693 pub struct NodeGetFlagsResponse<T0> {
16695 pub flags: T0,
16696 }
16697
16698 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
16699 for NodeGetFlagsResponse<T0>
16700 where
16701 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16702 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
16703 {
16704 #[inline]
16705 fn encode(
16706 self,
16707 encoder_: &mut ___E,
16708 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
16709 _: (),
16710 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16711 ::fidl_next::munge! {
16712 let crate::wire::NodeGetFlagsResponse {
16713 flags,
16714
16715 } = out_;
16716 }
16717
16718 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16719
16720 Ok(())
16721 }
16722 }
16723
16724 pub struct NodeSetFlagsRequest<T0> {
16726 pub flags: T0,
16727 }
16728
16729 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
16730 for NodeSetFlagsRequest<T0>
16731 where
16732 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16733 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
16734 {
16735 #[inline]
16736 fn encode(
16737 self,
16738 encoder_: &mut ___E,
16739 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
16740 _: (),
16741 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16742 ::fidl_next::munge! {
16743 let crate::wire::NodeSetFlagsRequest {
16744 flags,
16745
16746 } = out_;
16747 }
16748
16749 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16750
16751 Ok(())
16752 }
16753 }
16754
16755 pub type EmptyStruct = ();
16757
16758 pub struct NodeAttributes2<T0, T1> {
16760 pub mutable_attributes: T0,
16761
16762 pub immutable_attributes: T1,
16763 }
16764
16765 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
16766 for NodeAttributes2<T0, T1>
16767 where
16768 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16769 ___E: ::fidl_next::Encoder,
16770 T0: ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>,
16771 T1: ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>,
16772 {
16773 #[inline]
16774 fn encode(
16775 self,
16776 encoder_: &mut ___E,
16777 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
16778 _: (),
16779 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16780 ::fidl_next::munge! {
16781 let crate::wire::NodeAttributes2 {
16782 mutable_attributes,
16783 immutable_attributes,
16784
16785 } = out_;
16786 }
16787
16788 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
16789
16790 ::fidl_next::Encode::encode(
16791 self.immutable_attributes,
16792 encoder_,
16793 immutable_attributes,
16794 (),
16795 )?;
16796
16797 Ok(())
16798 }
16799 }
16800
16801 pub struct NodeGetAttributesRequest<T0> {
16803 pub query: T0,
16804 }
16805
16806 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
16807 for NodeGetAttributesRequest<T0>
16808 where
16809 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16810 T0: ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>,
16811 {
16812 #[inline]
16813 fn encode(
16814 self,
16815 encoder_: &mut ___E,
16816 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
16817 _: (),
16818 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16819 ::fidl_next::munge! {
16820 let crate::wire::NodeGetAttributesRequest {
16821 query,
16822
16823 } = out_;
16824 }
16825
16826 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
16827
16828 Ok(())
16829 }
16830 }
16831
16832 pub type DirectoryObject = ();
16834
16835 pub struct ExtendedAttributeIteratorGetNextResponse<T0, T1> {
16837 pub attributes: T0,
16838
16839 pub last: T1,
16840 }
16841
16842 unsafe impl<___E, T0, T1>
16843 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
16844 for ExtendedAttributeIteratorGetNextResponse<T0, T1>
16845 where
16846 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16847 ___E: ::fidl_next::Encoder,
16848 T0: ::fidl_next::Encode<
16849 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Vector<'static, u8>>,
16850 ___E,
16851 >,
16852 T1: ::fidl_next::Encode<bool, ___E>,
16853 {
16854 #[inline]
16855 fn encode(
16856 self,
16857 encoder_: &mut ___E,
16858 out_: &mut ::core::mem::MaybeUninit<
16859 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
16860 >,
16861 _: (),
16862 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16863 ::fidl_next::munge! {
16864 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
16865 attributes,
16866 last,
16867
16868 } = out_;
16869 }
16870
16871 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
16872
16873 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
16874
16875 Ok(())
16876 }
16877 }
16878
16879 pub struct ReadableReadRequest<T0> {
16881 pub count: T0,
16882 }
16883
16884 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
16885 for ReadableReadRequest<T0>
16886 where
16887 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16888 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16889 {
16890 #[inline]
16891 fn encode(
16892 self,
16893 encoder_: &mut ___E,
16894 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
16895 _: (),
16896 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16897 ::fidl_next::munge! {
16898 let crate::wire::ReadableReadRequest {
16899 count,
16900
16901 } = out_;
16902 }
16903
16904 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
16905
16906 Ok(())
16907 }
16908 }
16909
16910 pub struct ReadableReadResponse<T0> {
16912 pub data: T0,
16913 }
16914
16915 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
16916 for ReadableReadResponse<T0>
16917 where
16918 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16919 ___E: ::fidl_next::Encoder,
16920 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16921 {
16922 #[inline]
16923 fn encode(
16924 self,
16925 encoder_: &mut ___E,
16926 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
16927 _: (),
16928 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16929 ::fidl_next::munge! {
16930 let crate::wire::ReadableReadResponse {
16931 data,
16932
16933 } = out_;
16934 }
16935
16936 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
16937
16938 Ok(())
16939 }
16940 }
16941
16942 pub struct WritableWriteRequest<T0> {
16944 pub data: T0,
16945 }
16946
16947 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
16948 for WritableWriteRequest<T0>
16949 where
16950 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16951 ___E: ::fidl_next::Encoder,
16952 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16953 {
16954 #[inline]
16955 fn encode(
16956 self,
16957 encoder_: &mut ___E,
16958 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
16959 _: (),
16960 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16961 ::fidl_next::munge! {
16962 let crate::wire::WritableWriteRequest {
16963 data,
16964
16965 } = out_;
16966 }
16967
16968 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
16969
16970 Ok(())
16971 }
16972 }
16973
16974 pub struct WritableWriteResponse<T0> {
16976 pub actual_count: T0,
16977 }
16978
16979 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
16980 for WritableWriteResponse<T0>
16981 where
16982 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16983 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16984 {
16985 #[inline]
16986 fn encode(
16987 self,
16988 encoder_: &mut ___E,
16989 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
16990 _: (),
16991 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16992 ::fidl_next::munge! {
16993 let crate::wire::WritableWriteResponse {
16994 actual_count,
16995
16996 } = out_;
16997 }
16998
16999 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
17000
17001 Ok(())
17002 }
17003 }
17004
17005 pub struct FileSeekRequest<T0, T1> {
17007 pub origin: T0,
17008
17009 pub offset: T1,
17010 }
17011
17012 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
17013 for FileSeekRequest<T0, T1>
17014 where
17015 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17016 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
17017 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
17018 {
17019 #[inline]
17020 fn encode(
17021 self,
17022 encoder_: &mut ___E,
17023 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
17024 _: (),
17025 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17026 ::fidl_next::munge! {
17027 let crate::wire::FileSeekRequest {
17028 origin,
17029 offset,
17030
17031 } = out_;
17032 }
17033
17034 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
17035
17036 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17037
17038 Ok(())
17039 }
17040 }
17041
17042 pub struct FileSeekResponse<T0> {
17044 pub offset_from_start: T0,
17045 }
17046
17047 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
17048 for FileSeekResponse<T0>
17049 where
17050 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17051 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17052 {
17053 #[inline]
17054 fn encode(
17055 self,
17056 encoder_: &mut ___E,
17057 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
17058 _: (),
17059 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17060 ::fidl_next::munge! {
17061 let crate::wire::FileSeekResponse {
17062 offset_from_start,
17063
17064 } = out_;
17065 }
17066
17067 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
17068
17069 Ok(())
17070 }
17071 }
17072
17073 pub struct FileReadAtRequest<T0, T1> {
17075 pub count: T0,
17076
17077 pub offset: T1,
17078 }
17079
17080 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
17081 for FileReadAtRequest<T0, T1>
17082 where
17083 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17084 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17085 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17086 {
17087 #[inline]
17088 fn encode(
17089 self,
17090 encoder_: &mut ___E,
17091 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
17092 _: (),
17093 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17094 ::fidl_next::munge! {
17095 let crate::wire::FileReadAtRequest {
17096 count,
17097 offset,
17098
17099 } = out_;
17100 }
17101
17102 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
17103
17104 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17105
17106 Ok(())
17107 }
17108 }
17109
17110 pub struct FileReadAtResponse<T0> {
17112 pub data: T0,
17113 }
17114
17115 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
17116 for FileReadAtResponse<T0>
17117 where
17118 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17119 ___E: ::fidl_next::Encoder,
17120 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17121 {
17122 #[inline]
17123 fn encode(
17124 self,
17125 encoder_: &mut ___E,
17126 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
17127 _: (),
17128 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17129 ::fidl_next::munge! {
17130 let crate::wire::FileReadAtResponse {
17131 data,
17132
17133 } = out_;
17134 }
17135
17136 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17137
17138 Ok(())
17139 }
17140 }
17141
17142 pub struct FileWriteAtRequest<T0, T1> {
17144 pub data: T0,
17145
17146 pub offset: T1,
17147 }
17148
17149 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
17150 for FileWriteAtRequest<T0, T1>
17151 where
17152 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17153 ___E: ::fidl_next::Encoder,
17154 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17155 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17156 {
17157 #[inline]
17158 fn encode(
17159 self,
17160 encoder_: &mut ___E,
17161 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
17162 _: (),
17163 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17164 ::fidl_next::munge! {
17165 let crate::wire::FileWriteAtRequest {
17166 data,
17167 offset,
17168
17169 } = out_;
17170 }
17171
17172 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17173
17174 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17175
17176 Ok(())
17177 }
17178 }
17179
17180 pub struct FileWriteAtResponse<T0> {
17182 pub actual_count: T0,
17183 }
17184
17185 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
17186 for FileWriteAtResponse<T0>
17187 where
17188 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17189 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17190 {
17191 #[inline]
17192 fn encode(
17193 self,
17194 encoder_: &mut ___E,
17195 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
17196 _: (),
17197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17198 ::fidl_next::munge! {
17199 let crate::wire::FileWriteAtResponse {
17200 actual_count,
17201
17202 } = out_;
17203 }
17204
17205 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
17206
17207 Ok(())
17208 }
17209 }
17210
17211 pub struct FileResizeRequest<T0> {
17213 pub length: T0,
17214 }
17215
17216 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
17217 for FileResizeRequest<T0>
17218 where
17219 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17220 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17221 {
17222 #[inline]
17223 fn encode(
17224 self,
17225 encoder_: &mut ___E,
17226 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
17227 _: (),
17228 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17229 ::fidl_next::munge! {
17230 let crate::wire::FileResizeRequest {
17231 length,
17232
17233 } = out_;
17234 }
17235
17236 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
17237
17238 Ok(())
17239 }
17240 }
17241
17242 pub type FileResizeResponse = ();
17244
17245 pub struct FileGetBackingMemoryRequest<T0> {
17247 pub flags: T0,
17248 }
17249
17250 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
17251 for FileGetBackingMemoryRequest<T0>
17252 where
17253 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17254 T0: ::fidl_next::Encode<crate::wire::VmoFlags, ___E>,
17255 {
17256 #[inline]
17257 fn encode(
17258 self,
17259 encoder_: &mut ___E,
17260 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
17261 _: (),
17262 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17263 ::fidl_next::munge! {
17264 let crate::wire::FileGetBackingMemoryRequest {
17265 flags,
17266
17267 } = out_;
17268 }
17269
17270 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
17271
17272 Ok(())
17273 }
17274 }
17275
17276 pub type LinkableLinkIntoResponse = ();
17278
17279 pub type FileAllocateResponse = ();
17281
17282 pub type FileEnableVerityResponse = ();
17284
17285 pub struct FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> {
17287 pub total_bytes: T0,
17288
17289 pub used_bytes: T1,
17290
17291 pub total_nodes: T2,
17292
17293 pub used_nodes: T3,
17294
17295 pub free_shared_pool_bytes: T4,
17296
17297 pub fs_id: T5,
17298
17299 pub block_size: T6,
17300
17301 pub max_filename_size: T7,
17302
17303 pub fs_type: T8,
17304
17305 pub padding: T9,
17306
17307 pub name: T10,
17308 }
17309
17310 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
17311 ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>
17312 for FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
17313 where
17314 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17315 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17316 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17317 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17318 T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17319 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17320 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17321 T6: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17322 T7: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17323 T8: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17324 T9: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17325 T10: ::fidl_next::Encode<[i8; 32], ___E>,
17326 {
17327 #[inline]
17328 fn encode(
17329 self,
17330 encoder_: &mut ___E,
17331 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
17332 _: (),
17333 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17334 ::fidl_next::munge! {
17335 let crate::wire::FilesystemInfo {
17336 total_bytes,
17337 used_bytes,
17338 total_nodes,
17339 used_nodes,
17340 free_shared_pool_bytes,
17341 fs_id,
17342 block_size,
17343 max_filename_size,
17344 fs_type,
17345 padding,
17346 name,
17347
17348 } = out_;
17349 }
17350
17351 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
17352
17353 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
17354
17355 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
17356
17357 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
17358
17359 ::fidl_next::Encode::encode(
17360 self.free_shared_pool_bytes,
17361 encoder_,
17362 free_shared_pool_bytes,
17363 (),
17364 )?;
17365
17366 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
17367
17368 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
17369
17370 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
17371
17372 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
17373
17374 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
17375
17376 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
17377
17378 Ok(())
17379 }
17380 }
17381
17382 pub type Service = ();
17384
17385 pub struct SymlinkObject<T0> {
17387 pub target: T0,
17388 }
17389
17390 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
17391 for SymlinkObject<T0>
17392 where
17393 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17394 ___E: ::fidl_next::Encoder,
17395 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17396 {
17397 #[inline]
17398 fn encode(
17399 self,
17400 encoder_: &mut ___E,
17401 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
17402 _: (),
17403 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17404 ::fidl_next::munge! {
17405 let crate::wire::SymlinkObject {
17406 target,
17407
17408 } = out_;
17409 }
17410
17411 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
17412
17413 Ok(())
17414 }
17415 }
17416}
17417
17418pub use self::natural::*;
17419
17420#[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"]
17422#[derive(PartialEq, Debug)]
17423pub struct AdvisoryLocking;
17424
17425#[cfg(target_os = "fuchsia")]
17426impl ::fidl_next::HasTransport for AdvisoryLocking {
17427 type Transport = ::fidl_next::fuchsia::zx::Channel;
17428}
17429
17430pub mod advisory_locking {
17431 pub mod prelude {
17432 pub use crate::{
17433 AdvisoryLocking, AdvisoryLockingClientHandler, AdvisoryLockingLocalClientHandler,
17434 AdvisoryLockingLocalServerHandler, AdvisoryLockingServerHandler, advisory_locking,
17435 };
17436
17437 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
17438
17439 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
17440 }
17441
17442 pub struct AdvisoryLock;
17443
17444 impl ::fidl_next::Method for AdvisoryLock {
17445 const ORDINAL: u64 = 7992130864415541162;
17446 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17447 ::fidl_next::protocol::Flexibility::Strict;
17448
17449 type Protocol = crate::AdvisoryLocking;
17450
17451 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
17452 }
17453
17454 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
17455 type Response = ::fidl_next::wire::Result<
17456 'static,
17457 crate::wire::AdvisoryLockingAdvisoryLockResponse,
17458 ::fidl_next::wire::Int32,
17459 >;
17460 }
17461
17462 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
17463 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17464
17465 fn respond(response: ___R) -> Self::Output {
17466 ::core::result::Result::Ok(response)
17467 }
17468 }
17469
17470 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
17471 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17472
17473 fn respond_err(response: ___R) -> Self::Output {
17474 ::core::result::Result::Err(response)
17475 }
17476 }
17477
17478 mod ___detail {
17479 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::AdvisoryLocking
17480 where
17481 ___T: ::fidl_next::Transport,
17482 {
17483 type Client = AdvisoryLockingClient<___T>;
17484 type Server = AdvisoryLockingServer<___T>;
17485 }
17486
17487 #[repr(transparent)]
17489 pub struct AdvisoryLockingClient<___T: ::fidl_next::Transport> {
17490 #[allow(dead_code)]
17491 client: ::fidl_next::protocol::Client<___T>,
17492 }
17493
17494 impl<___T> AdvisoryLockingClient<___T>
17495 where
17496 ___T: ::fidl_next::Transport,
17497 {
17498 #[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"]
17499 pub fn advisory_lock(
17500 &self,
17501
17502 request: impl ::fidl_next::Encode<
17503 crate::wire::AdvisoryLockRequest<'static>,
17504 <___T as ::fidl_next::Transport>::SendBuffer,
17505 >,
17506 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
17507 where
17508 <___T as ::fidl_next::Transport>::SendBuffer:
17509 ::fidl_next::encoder::InternalHandleEncoder,
17510 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17511 {
17512 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
17513 request,
17514 })
17515 }
17516
17517 #[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"]
17518 pub fn advisory_lock_with<___R>(
17519 &self,
17520 request: ___R,
17521 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
17522 where
17523 ___R: ::fidl_next::Encode<
17524 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
17525 <___T as ::fidl_next::Transport>::SendBuffer,
17526 >,
17527 {
17528 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17529 7992130864415541162,
17530 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
17531 request,
17532 ))
17533 }
17534 }
17535
17536 #[repr(transparent)]
17538 pub struct AdvisoryLockingServer<___T: ::fidl_next::Transport> {
17539 server: ::fidl_next::protocol::Server<___T>,
17540 }
17541
17542 impl<___T> AdvisoryLockingServer<___T> where ___T: ::fidl_next::Transport {}
17543 }
17544}
17545
17546#[diagnostic::on_unimplemented(
17547 note = "If {Self} implements the non-local AdvisoryLockingClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
17548)]
17549
17550pub trait AdvisoryLockingLocalClientHandler<
17554 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17555 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17556>
17557{
17558}
17559
17560impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for AdvisoryLocking
17561where
17562 ___H: AdvisoryLockingLocalClientHandler<___T>,
17563 ___T: ::fidl_next::Transport,
17564{
17565 async fn on_event(
17566 handler: &mut ___H,
17567 ordinal: u64,
17568 flexibility: ::fidl_next::protocol::Flexibility,
17569 body: ::fidl_next::Body<___T>,
17570 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17571 match ordinal {
17572 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17573 }
17574 }
17575}
17576
17577#[diagnostic::on_unimplemented(
17578 note = "If {Self} implements the non-local AdvisoryLockingServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
17579)]
17580
17581pub trait AdvisoryLockingLocalServerHandler<
17585 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17586 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17587>
17588{
17589 #[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"]
17590 fn advisory_lock(
17591 &mut self,
17592
17593 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
17594
17595 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
17596 ) -> impl ::core::future::Future<Output = ()>;
17597}
17598
17599impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for AdvisoryLocking
17600where
17601 ___H: AdvisoryLockingLocalServerHandler<___T>,
17602 ___T: ::fidl_next::Transport,
17603 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
17604 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17605 Constraint = (),
17606 >,
17607{
17608 async fn on_one_way(
17609 handler: &mut ___H,
17610 ordinal: u64,
17611 flexibility: ::fidl_next::protocol::Flexibility,
17612 body: ::fidl_next::Body<___T>,
17613 ) -> ::core::result::Result<
17614 (),
17615 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17616 > {
17617 match ordinal {
17618 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17619 }
17620 }
17621
17622 async fn on_two_way(
17623 handler: &mut ___H,
17624 ordinal: u64,
17625 flexibility: ::fidl_next::protocol::Flexibility,
17626 body: ::fidl_next::Body<___T>,
17627 responder: ::fidl_next::protocol::Responder<___T>,
17628 ) -> ::core::result::Result<
17629 (),
17630 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17631 > {
17632 match ordinal {
17633 7992130864415541162 => {
17634 let responder = ::fidl_next::Responder::from_untyped(responder);
17635
17636 match ::fidl_next::AsDecoderExt::into_decoded(body) {
17637 Ok(decoded) => {
17638 handler
17639 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
17640 .await;
17641 Ok(())
17642 }
17643 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17644 ordinal: 7992130864415541162,
17645 error,
17646 }),
17647 }
17648 }
17649
17650 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17651 }
17652 }
17653}
17654
17655pub trait AdvisoryLockingClientHandler<
17659 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17660 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17661>
17662{
17663}
17664
17665impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for AdvisoryLocking
17666where
17667 ___H: AdvisoryLockingClientHandler<___T> + ::core::marker::Send,
17668 ___T: ::fidl_next::Transport,
17669{
17670 async fn on_event(
17671 handler: &mut ___H,
17672 ordinal: u64,
17673 flexibility: ::fidl_next::protocol::Flexibility,
17674 body: ::fidl_next::Body<___T>,
17675 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17676 match ordinal {
17677 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17678 }
17679 }
17680}
17681
17682pub trait AdvisoryLockingServerHandler<
17686 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17687 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17688>
17689{
17690 #[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"]
17691 fn advisory_lock(
17692 &mut self,
17693
17694 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
17695
17696 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
17697 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17698}
17699
17700impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for AdvisoryLocking
17701where
17702 ___H: AdvisoryLockingServerHandler<___T> + ::core::marker::Send,
17703 ___T: ::fidl_next::Transport,
17704 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
17705 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17706 Constraint = (),
17707 >,
17708{
17709 async fn on_one_way(
17710 handler: &mut ___H,
17711 ordinal: u64,
17712 flexibility: ::fidl_next::protocol::Flexibility,
17713 body: ::fidl_next::Body<___T>,
17714 ) -> ::core::result::Result<
17715 (),
17716 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17717 > {
17718 match ordinal {
17719 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17720 }
17721 }
17722
17723 async fn on_two_way(
17724 handler: &mut ___H,
17725 ordinal: u64,
17726 flexibility: ::fidl_next::protocol::Flexibility,
17727 body: ::fidl_next::Body<___T>,
17728 responder: ::fidl_next::protocol::Responder<___T>,
17729 ) -> ::core::result::Result<
17730 (),
17731 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17732 > {
17733 match ordinal {
17734 7992130864415541162 => {
17735 let responder = ::fidl_next::Responder::from_untyped(responder);
17736
17737 match ::fidl_next::AsDecoderExt::into_decoded(body) {
17738 Ok(decoded) => {
17739 handler
17740 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
17741 .await;
17742 Ok(())
17743 }
17744 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17745 ordinal: 7992130864415541162,
17746 error,
17747 }),
17748 }
17749 }
17750
17751 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17752 }
17753 }
17754}
17755
17756impl<___T> AdvisoryLockingClientHandler<___T> for ::fidl_next::IgnoreEvents where
17757 ___T: ::fidl_next::Transport
17758{
17759}
17760
17761impl<___H, ___T> AdvisoryLockingLocalClientHandler<___T> for ::fidl_next::Local<___H>
17762where
17763 ___H: AdvisoryLockingClientHandler<___T>,
17764 ___T: ::fidl_next::Transport,
17765{
17766}
17767
17768impl<___H, ___T> AdvisoryLockingLocalServerHandler<___T> for ::fidl_next::Local<___H>
17769where
17770 ___H: AdvisoryLockingServerHandler<___T>,
17771 ___T: ::fidl_next::Transport,
17772{
17773 async fn advisory_lock(
17774 &mut self,
17775
17776 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
17777
17778 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
17779 ) {
17780 ___H::advisory_lock(&mut self.0, request, responder).await
17781 }
17782}
17783
17784pub const DIRECTORY_PROTOCOL_NAME: &str = "fuchsia.io/Directory";
17785
17786#[doc = " The maximum length, in bytes, of a filesystem path.\n"]
17787pub const MAX_PATH_LENGTH: u64 = 4095 as u64;
17788
17789#[doc = " The maximal buffer size which can be transmitted for buffered operations.\n This capacity is currently set somewhat arbitrarily.\n"]
17790pub const MAX_BUF: u64 = 8192 as u64;
17791
17792#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
17793pub const MAX_NAME_LENGTH: u64 = 255 as u64;
17794
17795#[doc = " The maximum size for an extended attribute name.\n"]
17796pub const MAX_ATTRIBUTE_NAME: u64 = 255 as u64;
17797
17798#[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"]
17799pub const MAX_INLINE_ATTRIBUTE_VALUE: u64 = 32768 as u64;
17800
17801#[doc = " The maximum size for passing the SELinux context as an attribute.\n"]
17802pub const MAX_SELINUX_CONTEXT_ATTRIBUTE_LEN: u64 = 256 as u64;
17803
17804#[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"]
17806#[derive(PartialEq, Debug)]
17807pub struct DirectoryWatcher;
17808
17809#[cfg(target_os = "fuchsia")]
17810impl ::fidl_next::HasTransport for DirectoryWatcher {
17811 type Transport = ::fidl_next::fuchsia::zx::Channel;
17812}
17813
17814pub mod directory_watcher {
17815 pub mod prelude {
17816 pub use crate::{
17817 DirectoryWatcher, DirectoryWatcherClientHandler, DirectoryWatcherLocalClientHandler,
17818 DirectoryWatcherLocalServerHandler, DirectoryWatcherServerHandler, directory_watcher,
17819 };
17820 }
17821
17822 mod ___detail {
17823 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirectoryWatcher
17824 where
17825 ___T: ::fidl_next::Transport,
17826 {
17827 type Client = DirectoryWatcherClient<___T>;
17828 type Server = DirectoryWatcherServer<___T>;
17829 }
17830
17831 #[repr(transparent)]
17833 pub struct DirectoryWatcherClient<___T: ::fidl_next::Transport> {
17834 #[allow(dead_code)]
17835 client: ::fidl_next::protocol::Client<___T>,
17836 }
17837
17838 impl<___T> DirectoryWatcherClient<___T> where ___T: ::fidl_next::Transport {}
17839
17840 #[repr(transparent)]
17842 pub struct DirectoryWatcherServer<___T: ::fidl_next::Transport> {
17843 server: ::fidl_next::protocol::Server<___T>,
17844 }
17845
17846 impl<___T> DirectoryWatcherServer<___T> where ___T: ::fidl_next::Transport {}
17847 }
17848}
17849
17850#[diagnostic::on_unimplemented(
17851 note = "If {Self} implements the non-local DirectoryWatcherClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
17852)]
17853
17854pub trait DirectoryWatcherLocalClientHandler<
17858 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17859 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17860>
17861{
17862}
17863
17864impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirectoryWatcher
17865where
17866 ___H: DirectoryWatcherLocalClientHandler<___T>,
17867 ___T: ::fidl_next::Transport,
17868{
17869 async fn on_event(
17870 handler: &mut ___H,
17871 ordinal: u64,
17872 flexibility: ::fidl_next::protocol::Flexibility,
17873 body: ::fidl_next::Body<___T>,
17874 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17875 match ordinal {
17876 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17877 }
17878 }
17879}
17880
17881#[diagnostic::on_unimplemented(
17882 note = "If {Self} implements the non-local DirectoryWatcherServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
17883)]
17884
17885pub trait DirectoryWatcherLocalServerHandler<
17889 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17890 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17891>
17892{
17893}
17894
17895impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirectoryWatcher
17896where
17897 ___H: DirectoryWatcherLocalServerHandler<___T>,
17898 ___T: ::fidl_next::Transport,
17899{
17900 async fn on_one_way(
17901 handler: &mut ___H,
17902 ordinal: u64,
17903 flexibility: ::fidl_next::protocol::Flexibility,
17904 body: ::fidl_next::Body<___T>,
17905 ) -> ::core::result::Result<
17906 (),
17907 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17908 > {
17909 match ordinal {
17910 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17911 }
17912 }
17913
17914 async fn on_two_way(
17915 handler: &mut ___H,
17916 ordinal: u64,
17917 flexibility: ::fidl_next::protocol::Flexibility,
17918 body: ::fidl_next::Body<___T>,
17919 responder: ::fidl_next::protocol::Responder<___T>,
17920 ) -> ::core::result::Result<
17921 (),
17922 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17923 > {
17924 match ordinal {
17925 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17926 }
17927 }
17928}
17929
17930pub trait DirectoryWatcherClientHandler<
17934 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17935 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17936>
17937{
17938}
17939
17940impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryWatcher
17941where
17942 ___H: DirectoryWatcherClientHandler<___T> + ::core::marker::Send,
17943 ___T: ::fidl_next::Transport,
17944{
17945 async fn on_event(
17946 handler: &mut ___H,
17947 ordinal: u64,
17948 flexibility: ::fidl_next::protocol::Flexibility,
17949 body: ::fidl_next::Body<___T>,
17950 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17951 match ordinal {
17952 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17953 }
17954 }
17955}
17956
17957pub trait DirectoryWatcherServerHandler<
17961 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17962 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17963>
17964{
17965}
17966
17967impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryWatcher
17968where
17969 ___H: DirectoryWatcherServerHandler<___T> + ::core::marker::Send,
17970 ___T: ::fidl_next::Transport,
17971{
17972 async fn on_one_way(
17973 handler: &mut ___H,
17974 ordinal: u64,
17975 flexibility: ::fidl_next::protocol::Flexibility,
17976 body: ::fidl_next::Body<___T>,
17977 ) -> ::core::result::Result<
17978 (),
17979 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17980 > {
17981 match ordinal {
17982 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17983 }
17984 }
17985
17986 async fn on_two_way(
17987 handler: &mut ___H,
17988 ordinal: u64,
17989 flexibility: ::fidl_next::protocol::Flexibility,
17990 body: ::fidl_next::Body<___T>,
17991 responder: ::fidl_next::protocol::Responder<___T>,
17992 ) -> ::core::result::Result<
17993 (),
17994 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17995 > {
17996 match ordinal {
17997 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17998 }
17999 }
18000}
18001
18002impl<___T> DirectoryWatcherClientHandler<___T> for ::fidl_next::IgnoreEvents where
18003 ___T: ::fidl_next::Transport
18004{
18005}
18006
18007impl<___H, ___T> DirectoryWatcherLocalClientHandler<___T> for ::fidl_next::Local<___H>
18008where
18009 ___H: DirectoryWatcherClientHandler<___T>,
18010 ___T: ::fidl_next::Transport,
18011{
18012}
18013
18014impl<___H, ___T> DirectoryWatcherLocalServerHandler<___T> for ::fidl_next::Local<___H>
18015where
18016 ___H: DirectoryWatcherServerHandler<___T>,
18017 ___T: ::fidl_next::Transport,
18018{
18019}
18020
18021#[doc = " The maximum size of a chunk in the ListExtendedAttributes iterator.\n"]
18022pub const MAX_LIST_ATTRIBUTES_CHUNK: u64 = 128 as u64;
18023
18024#[derive(PartialEq, Debug)]
18026pub struct ExtendedAttributeIterator;
18027
18028#[cfg(target_os = "fuchsia")]
18029impl ::fidl_next::HasTransport for ExtendedAttributeIterator {
18030 type Transport = ::fidl_next::fuchsia::zx::Channel;
18031}
18032
18033pub mod extended_attribute_iterator {
18034 pub mod prelude {
18035 pub use crate::{
18036 ExtendedAttributeIterator, ExtendedAttributeIteratorClientHandler,
18037 ExtendedAttributeIteratorLocalClientHandler,
18038 ExtendedAttributeIteratorLocalServerHandler, ExtendedAttributeIteratorServerHandler,
18039 extended_attribute_iterator,
18040 };
18041
18042 pub use crate::natural::ExtendedAttributeIteratorGetNextResponse;
18043 }
18044
18045 pub struct GetNext;
18046
18047 impl ::fidl_next::Method for GetNext {
18048 const ORDINAL: u64 = 268639596268373415;
18049 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18050 ::fidl_next::protocol::Flexibility::Strict;
18051
18052 type Protocol = crate::ExtendedAttributeIterator;
18053
18054 type Request = ::fidl_next::wire::EmptyMessageBody;
18055 }
18056
18057 impl ::fidl_next::TwoWayMethod for GetNext {
18058 type Response = ::fidl_next::wire::Result<
18059 'static,
18060 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
18061 ::fidl_next::wire::Int32,
18062 >;
18063 }
18064
18065 impl<___R> ::fidl_next::Respond<___R> for GetNext {
18066 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
18067
18068 fn respond(response: ___R) -> Self::Output {
18069 ::core::result::Result::Ok(response)
18070 }
18071 }
18072
18073 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
18074 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
18075
18076 fn respond_err(response: ___R) -> Self::Output {
18077 ::core::result::Result::Err(response)
18078 }
18079 }
18080
18081 mod ___detail {
18082 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ExtendedAttributeIterator
18083 where
18084 ___T: ::fidl_next::Transport,
18085 {
18086 type Client = ExtendedAttributeIteratorClient<___T>;
18087 type Server = ExtendedAttributeIteratorServer<___T>;
18088 }
18089
18090 #[repr(transparent)]
18092 pub struct ExtendedAttributeIteratorClient<___T: ::fidl_next::Transport> {
18093 #[allow(dead_code)]
18094 client: ::fidl_next::protocol::Client<___T>,
18095 }
18096
18097 impl<___T> ExtendedAttributeIteratorClient<___T>
18098 where
18099 ___T: ::fidl_next::Transport,
18100 {
18101 #[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"]
18102 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
18103 ::fidl_next::TwoWayFuture::from_untyped(
18104 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18105 268639596268373415,
18106 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
18107 (),
18108 ),
18109 )
18110 }
18111 }
18112
18113 #[repr(transparent)]
18115 pub struct ExtendedAttributeIteratorServer<___T: ::fidl_next::Transport> {
18116 server: ::fidl_next::protocol::Server<___T>,
18117 }
18118
18119 impl<___T> ExtendedAttributeIteratorServer<___T> where ___T: ::fidl_next::Transport {}
18120 }
18121}
18122
18123#[diagnostic::on_unimplemented(
18124 note = "If {Self} implements the non-local ExtendedAttributeIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18125)]
18126
18127pub trait ExtendedAttributeIteratorLocalClientHandler<
18131 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18132 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18133>
18134{
18135}
18136
18137impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ExtendedAttributeIterator
18138where
18139 ___H: ExtendedAttributeIteratorLocalClientHandler<___T>,
18140 ___T: ::fidl_next::Transport,
18141{
18142 async fn on_event(
18143 handler: &mut ___H,
18144 ordinal: u64,
18145 flexibility: ::fidl_next::protocol::Flexibility,
18146 body: ::fidl_next::Body<___T>,
18147 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18148 match ordinal {
18149 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18150 }
18151 }
18152}
18153
18154#[diagnostic::on_unimplemented(
18155 note = "If {Self} implements the non-local ExtendedAttributeIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18156)]
18157
18158pub trait ExtendedAttributeIteratorLocalServerHandler<
18162 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18163 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18164>
18165{
18166 #[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"]
18167 fn get_next(
18168 &mut self,
18169
18170 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18171 ) -> impl ::core::future::Future<Output = ()>;
18172}
18173
18174impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ExtendedAttributeIterator
18175where
18176 ___H: ExtendedAttributeIteratorLocalServerHandler<___T>,
18177 ___T: ::fidl_next::Transport,
18178{
18179 async fn on_one_way(
18180 handler: &mut ___H,
18181 ordinal: u64,
18182 flexibility: ::fidl_next::protocol::Flexibility,
18183 body: ::fidl_next::Body<___T>,
18184 ) -> ::core::result::Result<
18185 (),
18186 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18187 > {
18188 match ordinal {
18189 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18190 }
18191 }
18192
18193 async fn on_two_way(
18194 handler: &mut ___H,
18195 ordinal: u64,
18196 flexibility: ::fidl_next::protocol::Flexibility,
18197 body: ::fidl_next::Body<___T>,
18198 responder: ::fidl_next::protocol::Responder<___T>,
18199 ) -> ::core::result::Result<
18200 (),
18201 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18202 > {
18203 match ordinal {
18204 268639596268373415 => {
18205 let responder = ::fidl_next::Responder::from_untyped(responder);
18206
18207 handler.get_next(responder).await;
18208 Ok(())
18209 }
18210
18211 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18212 }
18213 }
18214}
18215
18216pub trait ExtendedAttributeIteratorClientHandler<
18220 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18221 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18222>
18223{
18224}
18225
18226impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExtendedAttributeIterator
18227where
18228 ___H: ExtendedAttributeIteratorClientHandler<___T> + ::core::marker::Send,
18229 ___T: ::fidl_next::Transport,
18230{
18231 async fn on_event(
18232 handler: &mut ___H,
18233 ordinal: u64,
18234 flexibility: ::fidl_next::protocol::Flexibility,
18235 body: ::fidl_next::Body<___T>,
18236 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18237 match ordinal {
18238 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18239 }
18240 }
18241}
18242
18243pub trait ExtendedAttributeIteratorServerHandler<
18247 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18248 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18249>
18250{
18251 #[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"]
18252 fn get_next(
18253 &mut self,
18254
18255 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18256 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18257}
18258
18259impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExtendedAttributeIterator
18260where
18261 ___H: ExtendedAttributeIteratorServerHandler<___T> + ::core::marker::Send,
18262 ___T: ::fidl_next::Transport,
18263{
18264 async fn on_one_way(
18265 handler: &mut ___H,
18266 ordinal: u64,
18267 flexibility: ::fidl_next::protocol::Flexibility,
18268 body: ::fidl_next::Body<___T>,
18269 ) -> ::core::result::Result<
18270 (),
18271 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18272 > {
18273 match ordinal {
18274 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18275 }
18276 }
18277
18278 async fn on_two_way(
18279 handler: &mut ___H,
18280 ordinal: u64,
18281 flexibility: ::fidl_next::protocol::Flexibility,
18282 body: ::fidl_next::Body<___T>,
18283 responder: ::fidl_next::protocol::Responder<___T>,
18284 ) -> ::core::result::Result<
18285 (),
18286 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18287 > {
18288 match ordinal {
18289 268639596268373415 => {
18290 let responder = ::fidl_next::Responder::from_untyped(responder);
18291
18292 handler.get_next(responder).await;
18293 Ok(())
18294 }
18295
18296 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18297 }
18298 }
18299}
18300
18301impl<___T> ExtendedAttributeIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents where
18302 ___T: ::fidl_next::Transport
18303{
18304}
18305
18306impl<___H, ___T> ExtendedAttributeIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
18307where
18308 ___H: ExtendedAttributeIteratorClientHandler<___T>,
18309 ___T: ::fidl_next::Transport,
18310{
18311}
18312
18313impl<___H, ___T> ExtendedAttributeIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
18314where
18315 ___H: ExtendedAttributeIteratorServerHandler<___T>,
18316 ___T: ::fidl_next::Transport,
18317{
18318 async fn get_next(
18319 &mut self,
18320
18321 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18322 ) {
18323 ___H::get_next(&mut self.0, responder).await
18324 }
18325}
18326
18327pub const FILE_PROTOCOL_NAME: &str = "fuchsia.io/File";
18328
18329#[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"]
18330pub const FLAG_TEMPORARY_AS_NOT_LINKABLE: crate::natural::Flags =
18331 crate::natural::Flags::FLAG_MUST_CREATE;
18332
18333#[doc = " The maximum I/O size that is allowed for read/write operations using\n byte vectors.\n"]
18334pub const MAX_TRANSFER_SIZE: u64 = 8192 as u64;
18335
18336#[derive(PartialEq, Debug)]
18338pub struct Readable;
18339
18340#[cfg(target_os = "fuchsia")]
18341impl ::fidl_next::HasTransport for Readable {
18342 type Transport = ::fidl_next::fuchsia::zx::Channel;
18343}
18344
18345pub mod readable {
18346 pub mod prelude {
18347 pub use crate::{
18348 Readable, ReadableClientHandler, ReadableLocalClientHandler,
18349 ReadableLocalServerHandler, ReadableServerHandler, readable,
18350 };
18351
18352 pub use crate::natural::ReadableReadRequest;
18353
18354 pub use crate::natural::ReadableReadResponse;
18355 }
18356
18357 pub struct Read;
18358
18359 impl ::fidl_next::Method for Read {
18360 const ORDINAL: u64 = 395825947633028830;
18361 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18362 ::fidl_next::protocol::Flexibility::Strict;
18363
18364 type Protocol = crate::Readable;
18365
18366 type Request = crate::wire::ReadableReadRequest;
18367 }
18368
18369 impl ::fidl_next::TwoWayMethod for Read {
18370 type Response = ::fidl_next::wire::Result<
18371 'static,
18372 crate::wire::ReadableReadResponse<'static>,
18373 ::fidl_next::wire::Int32,
18374 >;
18375 }
18376
18377 impl<___R> ::fidl_next::Respond<___R> for Read {
18378 type Output = ::core::result::Result<
18379 crate::generic::ReadableReadResponse<___R>,
18380 ::fidl_next::util::Never,
18381 >;
18382
18383 fn respond(response: ___R) -> Self::Output {
18384 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
18385 }
18386 }
18387
18388 impl<___R> ::fidl_next::RespondErr<___R> for Read {
18389 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
18390
18391 fn respond_err(response: ___R) -> Self::Output {
18392 ::core::result::Result::Err(response)
18393 }
18394 }
18395
18396 mod ___detail {
18397 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Readable
18398 where
18399 ___T: ::fidl_next::Transport,
18400 {
18401 type Client = ReadableClient<___T>;
18402 type Server = ReadableServer<___T>;
18403 }
18404
18405 #[repr(transparent)]
18407 pub struct ReadableClient<___T: ::fidl_next::Transport> {
18408 #[allow(dead_code)]
18409 client: ::fidl_next::protocol::Client<___T>,
18410 }
18411
18412 impl<___T> ReadableClient<___T>
18413 where
18414 ___T: ::fidl_next::Transport,
18415 {
18416 #[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"]
18417 pub fn read(
18418 &self,
18419
18420 count: impl ::fidl_next::Encode<
18421 ::fidl_next::wire::Uint64,
18422 <___T as ::fidl_next::Transport>::SendBuffer,
18423 >,
18424 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
18425 where
18426 <___T as ::fidl_next::Transport>::SendBuffer:
18427 ::fidl_next::encoder::InternalHandleEncoder,
18428 {
18429 self.read_with(crate::generic::ReadableReadRequest { count })
18430 }
18431
18432 #[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"]
18433 pub fn read_with<___R>(
18434 &self,
18435 request: ___R,
18436 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
18437 where
18438 ___R: ::fidl_next::Encode<
18439 crate::wire::ReadableReadRequest,
18440 <___T as ::fidl_next::Transport>::SendBuffer,
18441 >,
18442 {
18443 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18444 395825947633028830,
18445 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
18446 request,
18447 ))
18448 }
18449 }
18450
18451 #[repr(transparent)]
18453 pub struct ReadableServer<___T: ::fidl_next::Transport> {
18454 server: ::fidl_next::protocol::Server<___T>,
18455 }
18456
18457 impl<___T> ReadableServer<___T> where ___T: ::fidl_next::Transport {}
18458 }
18459}
18460
18461#[diagnostic::on_unimplemented(
18462 note = "If {Self} implements the non-local ReadableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18463)]
18464
18465pub trait ReadableLocalClientHandler<
18469 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18470 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18471>
18472{
18473}
18474
18475impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Readable
18476where
18477 ___H: ReadableLocalClientHandler<___T>,
18478 ___T: ::fidl_next::Transport,
18479{
18480 async fn on_event(
18481 handler: &mut ___H,
18482 ordinal: u64,
18483 flexibility: ::fidl_next::protocol::Flexibility,
18484 body: ::fidl_next::Body<___T>,
18485 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18486 match ordinal {
18487 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18488 }
18489 }
18490}
18491
18492#[diagnostic::on_unimplemented(
18493 note = "If {Self} implements the non-local ReadableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18494)]
18495
18496pub trait ReadableLocalServerHandler<
18500 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18501 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18502>
18503{
18504 #[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"]
18505 fn read(
18506 &mut self,
18507
18508 request: ::fidl_next::Request<readable::Read, ___T>,
18509
18510 responder: ::fidl_next::Responder<readable::Read, ___T>,
18511 ) -> impl ::core::future::Future<Output = ()>;
18512}
18513
18514impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Readable
18515where
18516 ___H: ReadableLocalServerHandler<___T>,
18517 ___T: ::fidl_next::Transport,
18518 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
18519 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18520 Constraint = (),
18521 >,
18522{
18523 async fn on_one_way(
18524 handler: &mut ___H,
18525 ordinal: u64,
18526 flexibility: ::fidl_next::protocol::Flexibility,
18527 body: ::fidl_next::Body<___T>,
18528 ) -> ::core::result::Result<
18529 (),
18530 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18531 > {
18532 match ordinal {
18533 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18534 }
18535 }
18536
18537 async fn on_two_way(
18538 handler: &mut ___H,
18539 ordinal: u64,
18540 flexibility: ::fidl_next::protocol::Flexibility,
18541 body: ::fidl_next::Body<___T>,
18542 responder: ::fidl_next::protocol::Responder<___T>,
18543 ) -> ::core::result::Result<
18544 (),
18545 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18546 > {
18547 match ordinal {
18548 395825947633028830 => {
18549 let responder = ::fidl_next::Responder::from_untyped(responder);
18550
18551 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18552 Ok(decoded) => {
18553 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
18554 Ok(())
18555 }
18556 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18557 ordinal: 395825947633028830,
18558 error,
18559 }),
18560 }
18561 }
18562
18563 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18564 }
18565 }
18566}
18567
18568pub trait ReadableClientHandler<
18572 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18573 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18574>
18575{
18576}
18577
18578impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Readable
18579where
18580 ___H: ReadableClientHandler<___T> + ::core::marker::Send,
18581 ___T: ::fidl_next::Transport,
18582{
18583 async fn on_event(
18584 handler: &mut ___H,
18585 ordinal: u64,
18586 flexibility: ::fidl_next::protocol::Flexibility,
18587 body: ::fidl_next::Body<___T>,
18588 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18589 match ordinal {
18590 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18591 }
18592 }
18593}
18594
18595pub trait ReadableServerHandler<
18599 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18600 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18601>
18602{
18603 #[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"]
18604 fn read(
18605 &mut self,
18606
18607 request: ::fidl_next::Request<readable::Read, ___T>,
18608
18609 responder: ::fidl_next::Responder<readable::Read, ___T>,
18610 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18611}
18612
18613impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Readable
18614where
18615 ___H: ReadableServerHandler<___T> + ::core::marker::Send,
18616 ___T: ::fidl_next::Transport,
18617 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
18618 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18619 Constraint = (),
18620 >,
18621{
18622 async fn on_one_way(
18623 handler: &mut ___H,
18624 ordinal: u64,
18625 flexibility: ::fidl_next::protocol::Flexibility,
18626 body: ::fidl_next::Body<___T>,
18627 ) -> ::core::result::Result<
18628 (),
18629 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18630 > {
18631 match ordinal {
18632 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18633 }
18634 }
18635
18636 async fn on_two_way(
18637 handler: &mut ___H,
18638 ordinal: u64,
18639 flexibility: ::fidl_next::protocol::Flexibility,
18640 body: ::fidl_next::Body<___T>,
18641 responder: ::fidl_next::protocol::Responder<___T>,
18642 ) -> ::core::result::Result<
18643 (),
18644 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18645 > {
18646 match ordinal {
18647 395825947633028830 => {
18648 let responder = ::fidl_next::Responder::from_untyped(responder);
18649
18650 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18651 Ok(decoded) => {
18652 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
18653 Ok(())
18654 }
18655 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18656 ordinal: 395825947633028830,
18657 error,
18658 }),
18659 }
18660 }
18661
18662 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18663 }
18664 }
18665}
18666
18667impl<___T> ReadableClientHandler<___T> for ::fidl_next::IgnoreEvents where
18668 ___T: ::fidl_next::Transport
18669{
18670}
18671
18672impl<___H, ___T> ReadableLocalClientHandler<___T> for ::fidl_next::Local<___H>
18673where
18674 ___H: ReadableClientHandler<___T>,
18675 ___T: ::fidl_next::Transport,
18676{
18677}
18678
18679impl<___H, ___T> ReadableLocalServerHandler<___T> for ::fidl_next::Local<___H>
18680where
18681 ___H: ReadableServerHandler<___T>,
18682 ___T: ::fidl_next::Transport,
18683{
18684 async fn read(
18685 &mut self,
18686
18687 request: ::fidl_next::Request<readable::Read, ___T>,
18688
18689 responder: ::fidl_next::Responder<readable::Read, ___T>,
18690 ) {
18691 ___H::read(&mut self.0, request, responder).await
18692 }
18693}
18694
18695#[derive(PartialEq, Debug)]
18697pub struct Writable;
18698
18699#[cfg(target_os = "fuchsia")]
18700impl ::fidl_next::HasTransport for Writable {
18701 type Transport = ::fidl_next::fuchsia::zx::Channel;
18702}
18703
18704pub mod writable {
18705 pub mod prelude {
18706 pub use crate::{
18707 Writable, WritableClientHandler, WritableLocalClientHandler,
18708 WritableLocalServerHandler, WritableServerHandler, writable,
18709 };
18710
18711 pub use crate::natural::WritableWriteRequest;
18712
18713 pub use crate::natural::WritableWriteResponse;
18714 }
18715
18716 pub struct Write;
18717
18718 impl ::fidl_next::Method for Write {
18719 const ORDINAL: u64 = 7651971425397809026;
18720 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18721 ::fidl_next::protocol::Flexibility::Strict;
18722
18723 type Protocol = crate::Writable;
18724
18725 type Request = crate::wire::WritableWriteRequest<'static>;
18726 }
18727
18728 impl ::fidl_next::TwoWayMethod for Write {
18729 type Response = ::fidl_next::wire::Result<
18730 'static,
18731 crate::wire::WritableWriteResponse,
18732 ::fidl_next::wire::Int32,
18733 >;
18734 }
18735
18736 impl<___R> ::fidl_next::Respond<___R> for Write {
18737 type Output = ::core::result::Result<
18738 crate::generic::WritableWriteResponse<___R>,
18739 ::fidl_next::util::Never,
18740 >;
18741
18742 fn respond(response: ___R) -> Self::Output {
18743 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
18744 actual_count: response,
18745 })
18746 }
18747 }
18748
18749 impl<___R> ::fidl_next::RespondErr<___R> for Write {
18750 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
18751
18752 fn respond_err(response: ___R) -> Self::Output {
18753 ::core::result::Result::Err(response)
18754 }
18755 }
18756
18757 mod ___detail {
18758 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Writable
18759 where
18760 ___T: ::fidl_next::Transport,
18761 {
18762 type Client = WritableClient<___T>;
18763 type Server = WritableServer<___T>;
18764 }
18765
18766 #[repr(transparent)]
18768 pub struct WritableClient<___T: ::fidl_next::Transport> {
18769 #[allow(dead_code)]
18770 client: ::fidl_next::protocol::Client<___T>,
18771 }
18772
18773 impl<___T> WritableClient<___T>
18774 where
18775 ___T: ::fidl_next::Transport,
18776 {
18777 #[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"]
18778 pub fn write(
18779 &self,
18780
18781 data: impl ::fidl_next::Encode<
18782 ::fidl_next::wire::Vector<'static, u8>,
18783 <___T as ::fidl_next::Transport>::SendBuffer,
18784 >,
18785 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
18786 where
18787 <___T as ::fidl_next::Transport>::SendBuffer:
18788 ::fidl_next::encoder::InternalHandleEncoder,
18789 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18790 {
18791 self.write_with(crate::generic::WritableWriteRequest { data })
18792 }
18793
18794 #[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"]
18795 pub fn write_with<___R>(
18796 &self,
18797 request: ___R,
18798 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
18799 where
18800 ___R: ::fidl_next::Encode<
18801 crate::wire::WritableWriteRequest<'static>,
18802 <___T as ::fidl_next::Transport>::SendBuffer,
18803 >,
18804 {
18805 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18806 7651971425397809026,
18807 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
18808 request,
18809 ))
18810 }
18811 }
18812
18813 #[repr(transparent)]
18815 pub struct WritableServer<___T: ::fidl_next::Transport> {
18816 server: ::fidl_next::protocol::Server<___T>,
18817 }
18818
18819 impl<___T> WritableServer<___T> where ___T: ::fidl_next::Transport {}
18820 }
18821}
18822
18823#[diagnostic::on_unimplemented(
18824 note = "If {Self} implements the non-local WritableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18825)]
18826
18827pub trait WritableLocalClientHandler<
18831 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18832 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18833>
18834{
18835}
18836
18837impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Writable
18838where
18839 ___H: WritableLocalClientHandler<___T>,
18840 ___T: ::fidl_next::Transport,
18841{
18842 async fn on_event(
18843 handler: &mut ___H,
18844 ordinal: u64,
18845 flexibility: ::fidl_next::protocol::Flexibility,
18846 body: ::fidl_next::Body<___T>,
18847 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18848 match ordinal {
18849 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18850 }
18851 }
18852}
18853
18854#[diagnostic::on_unimplemented(
18855 note = "If {Self} implements the non-local WritableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18856)]
18857
18858pub trait WritableLocalServerHandler<
18862 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18863 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18864>
18865{
18866 #[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"]
18867 fn write(
18868 &mut self,
18869
18870 request: ::fidl_next::Request<writable::Write, ___T>,
18871
18872 responder: ::fidl_next::Responder<writable::Write, ___T>,
18873 ) -> impl ::core::future::Future<Output = ()>;
18874}
18875
18876impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Writable
18877where
18878 ___H: WritableLocalServerHandler<___T>,
18879 ___T: ::fidl_next::Transport,
18880 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
18881 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18882 Constraint = (),
18883 >,
18884{
18885 async fn on_one_way(
18886 handler: &mut ___H,
18887 ordinal: u64,
18888 flexibility: ::fidl_next::protocol::Flexibility,
18889 body: ::fidl_next::Body<___T>,
18890 ) -> ::core::result::Result<
18891 (),
18892 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18893 > {
18894 match ordinal {
18895 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18896 }
18897 }
18898
18899 async fn on_two_way(
18900 handler: &mut ___H,
18901 ordinal: u64,
18902 flexibility: ::fidl_next::protocol::Flexibility,
18903 body: ::fidl_next::Body<___T>,
18904 responder: ::fidl_next::protocol::Responder<___T>,
18905 ) -> ::core::result::Result<
18906 (),
18907 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18908 > {
18909 match ordinal {
18910 7651971425397809026 => {
18911 let responder = ::fidl_next::Responder::from_untyped(responder);
18912
18913 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18914 Ok(decoded) => {
18915 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
18916 Ok(())
18917 }
18918 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18919 ordinal: 7651971425397809026,
18920 error,
18921 }),
18922 }
18923 }
18924
18925 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18926 }
18927 }
18928}
18929
18930pub trait WritableClientHandler<
18934 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18935 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18936>
18937{
18938}
18939
18940impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Writable
18941where
18942 ___H: WritableClientHandler<___T> + ::core::marker::Send,
18943 ___T: ::fidl_next::Transport,
18944{
18945 async fn on_event(
18946 handler: &mut ___H,
18947 ordinal: u64,
18948 flexibility: ::fidl_next::protocol::Flexibility,
18949 body: ::fidl_next::Body<___T>,
18950 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18951 match ordinal {
18952 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18953 }
18954 }
18955}
18956
18957pub trait WritableServerHandler<
18961 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18962 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18963>
18964{
18965 #[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"]
18966 fn write(
18967 &mut self,
18968
18969 request: ::fidl_next::Request<writable::Write, ___T>,
18970
18971 responder: ::fidl_next::Responder<writable::Write, ___T>,
18972 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18973}
18974
18975impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Writable
18976where
18977 ___H: WritableServerHandler<___T> + ::core::marker::Send,
18978 ___T: ::fidl_next::Transport,
18979 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
18980 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18981 Constraint = (),
18982 >,
18983{
18984 async fn on_one_way(
18985 handler: &mut ___H,
18986 ordinal: u64,
18987 flexibility: ::fidl_next::protocol::Flexibility,
18988 body: ::fidl_next::Body<___T>,
18989 ) -> ::core::result::Result<
18990 (),
18991 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18992 > {
18993 match ordinal {
18994 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18995 }
18996 }
18997
18998 async fn on_two_way(
18999 handler: &mut ___H,
19000 ordinal: u64,
19001 flexibility: ::fidl_next::protocol::Flexibility,
19002 body: ::fidl_next::Body<___T>,
19003 responder: ::fidl_next::protocol::Responder<___T>,
19004 ) -> ::core::result::Result<
19005 (),
19006 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19007 > {
19008 match ordinal {
19009 7651971425397809026 => {
19010 let responder = ::fidl_next::Responder::from_untyped(responder);
19011
19012 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19013 Ok(decoded) => {
19014 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
19015 Ok(())
19016 }
19017 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19018 ordinal: 7651971425397809026,
19019 error,
19020 }),
19021 }
19022 }
19023
19024 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19025 }
19026 }
19027}
19028
19029impl<___T> WritableClientHandler<___T> for ::fidl_next::IgnoreEvents where
19030 ___T: ::fidl_next::Transport
19031{
19032}
19033
19034impl<___H, ___T> WritableLocalClientHandler<___T> for ::fidl_next::Local<___H>
19035where
19036 ___H: WritableClientHandler<___T>,
19037 ___T: ::fidl_next::Transport,
19038{
19039}
19040
19041impl<___H, ___T> WritableLocalServerHandler<___T> for ::fidl_next::Local<___H>
19042where
19043 ___H: WritableServerHandler<___T>,
19044 ___T: ::fidl_next::Transport,
19045{
19046 async fn write(
19047 &mut self,
19048
19049 request: ::fidl_next::Request<writable::Write, ___T>,
19050
19051 responder: ::fidl_next::Responder<writable::Write, ___T>,
19052 ) {
19053 ___H::write(&mut self.0, request, responder).await
19054 }
19055}
19056
19057pub const MAX_FS_NAME_BUFFER: u64 = 32 as u64;
19058
19059#[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"]
19060pub const INHERITED_WRITE_PERMISSIONS: crate::natural::Operations =
19061 crate::natural::Operations::from_bits_retain(356);
19062
19063#[doc = " Nodes which do not have ino values should return this value\n from Readdir and GetAttr.\n"]
19064pub const INO_UNKNOWN: u64 = 18446744073709551615 as u64;
19065
19066pub const MASK_KNOWN_PERMISSIONS: crate::natural::Flags =
19067 crate::natural::Flags::from_bits_retain(25087);
19068
19069pub const MASK_KNOWN_PROTOCOLS: crate::natural::Flags =
19070 crate::natural::Flags::from_bits_retain(30069489664);
19071
19072pub const MASK_PERMISSION_FLAGS: u64 = 65535 as u64;
19073
19074pub const MASK_POSIX_FLAGS: u64 = 4294967295 as u64;
19075
19076#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
19077pub const MAX_FILENAME: u64 = 255 as u64;
19078
19079pub const NODE_PROTOCOL_NAME: &str = "fuchsia.io/Node";
19080
19081#[doc = " Flags used when opening a node reference must fall within this mask.\n"]
19082pub const OPEN_FLAGS_ALLOWED_WITH_NODE_REFERENCE: crate::natural::OpenFlags =
19083 crate::natural::OpenFlags::from_bits_retain(46661632);
19084
19085#[doc = " All known rights.\n"]
19086pub const OPEN_RIGHTS: crate::natural::OpenFlags = crate::natural::OpenFlags::from_bits_retain(11);
19087
19088#[doc = " Set of permissions that are expected when opening a node as executable.\n"]
19089pub const PERM_EXECUTABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(201);
19090
19091#[doc = " Set of permissions that are expected when opening a node as readable.\n"]
19092pub const PERM_READABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(211);
19093
19094#[doc = " Set of permissions that are expected when opening a node as writable.\n"]
19095pub const PERM_WRITABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(485);
19096
19097#[doc = " Alias for directory permission alias rw*\n"]
19098pub const RW_STAR_DIR: crate::natural::Operations =
19099 crate::natural::Operations::from_bits_retain(503);
19100
19101#[doc = " Alias for directory permission alias rx*\n"]
19102pub const RX_STAR_DIR: crate::natural::Operations =
19103 crate::natural::Operations::from_bits_retain(219);
19104
19105#[doc = " Alias for directory permission alias r*\n"]
19106pub const R_STAR_DIR: crate::natural::Operations =
19107 crate::natural::Operations::from_bits_retain(211);
19108
19109#[doc = " The name of the extended attribute accessible via the SELinux context attribute.\n"]
19110pub const SELINUX_CONTEXT_NAME: &str = "security.selinux";
19111
19112pub const SYMLINK_PROTOCOL_NAME: &str = "fuchsia.io/Symlink";
19113
19114#[doc = " Alias for directory permission alias w*\n"]
19115pub const W_STAR_DIR: crate::natural::Operations =
19116 crate::natural::Operations::from_bits_retain(485);
19117
19118#[doc = " Alias for directory permission alias x*\n"]
19119pub const X_STAR_DIR: crate::natural::Operations =
19120 crate::natural::Operations::from_bits_retain(201);