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 const _ = !0;
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 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
51 Ok(())
52 }
53 }
54
55 impl ::core::convert::From<crate::wire::Operations> for Operations {
56 fn from(wire: crate::wire::Operations) -> Self {
57 Self::from_bits_retain(u64::from(wire.value))
58 }
59 }
60
61 impl ::fidl_next::FromWire<crate::wire::Operations> for Operations {
62 #[inline]
63 fn from_wire(wire: crate::wire::Operations) -> Self {
64 Self::from(wire)
65 }
66 }
67
68 impl ::fidl_next::FromWireRef<crate::wire::Operations> for Operations {
69 #[inline]
70 fn from_wire_ref(wire: &crate::wire::Operations) -> Self {
71 Self::from(*wire)
72 }
73 }
74
75 #[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"]
76 pub type Abilities = crate::natural::Operations;
77
78 #[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"]
79 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
80 #[repr(u32)]
81 pub enum SeekOrigin {
82 Start = 0,
83 Current = 1,
84 End = 2,
85 }
86 impl ::core::convert::TryFrom<u32> for SeekOrigin {
87 type Error = ::fidl_next::UnknownStrictEnumMemberError;
88 fn try_from(
89 value: u32,
90 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
91 match value {
92 0 => Ok(Self::Start),
93 1 => Ok(Self::Current),
94 2 => Ok(Self::End),
95
96 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
97 }
98 }
99 }
100
101 impl ::std::convert::From<SeekOrigin> for u32 {
102 fn from(value: SeekOrigin) -> Self {
103 match value {
104 SeekOrigin::Start => 0,
105 SeekOrigin::Current => 1,
106 SeekOrigin::End => 2,
107 }
108 }
109 }
110
111 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SeekOrigin, ___E> for SeekOrigin
112 where
113 ___E: ?Sized,
114 {
115 #[inline]
116 fn encode(
117 self,
118 encoder: &mut ___E,
119 out: &mut ::core::mem::MaybeUninit<crate::wire::SeekOrigin>,
120 _: (),
121 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
122 ::fidl_next::Encode::encode(&self, encoder, out, ())
123 }
124 }
125
126 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SeekOrigin, ___E> for &'a SeekOrigin
127 where
128 ___E: ?Sized,
129 {
130 #[inline]
131 fn encode(
132 self,
133 encoder: &mut ___E,
134 out: &mut ::core::mem::MaybeUninit<crate::wire::SeekOrigin>,
135 _: (),
136 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
137 ::fidl_next::munge!(let crate::wire::SeekOrigin { value } = out);
138 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
139 SeekOrigin::Start => 0,
140
141 SeekOrigin::Current => 1,
142
143 SeekOrigin::End => 2,
144 }));
145
146 Ok(())
147 }
148 }
149
150 impl ::core::convert::From<crate::wire::SeekOrigin> for SeekOrigin {
151 fn from(wire: crate::wire::SeekOrigin) -> Self {
152 match u32::from(wire.value) {
153 0 => Self::Start,
154
155 1 => Self::Current,
156
157 2 => Self::End,
158
159 _ => unsafe { ::core::hint::unreachable_unchecked() },
160 }
161 }
162 }
163
164 impl ::fidl_next::FromWire<crate::wire::SeekOrigin> for SeekOrigin {
165 #[inline]
166 fn from_wire(wire: crate::wire::SeekOrigin) -> Self {
167 Self::from(wire)
168 }
169 }
170
171 impl ::fidl_next::FromWireRef<crate::wire::SeekOrigin> for SeekOrigin {
172 #[inline]
173 fn from_wire_ref(wire: &crate::wire::SeekOrigin) -> Self {
174 Self::from(*wire)
175 }
176 }
177
178 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
179 pub struct AdvisoryLockRange {
180 pub origin: crate::natural::SeekOrigin,
181
182 pub offset: i64,
183
184 pub length: i64,
185 }
186
187 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E> for AdvisoryLockRange
188 where
189 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
190 {
191 #[inline]
192 fn encode(
193 self,
194 encoder_: &mut ___E,
195 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
196 _: (),
197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
198 ::fidl_next::munge! {
199 let crate::wire::AdvisoryLockRange {
200 origin,
201 offset,
202 length,
203
204 } = out_;
205 }
206
207 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
208
209 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
210
211 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
212
213 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
214
215 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
216
217 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
218
219 Ok(())
220 }
221 }
222
223 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
224 for &'a AdvisoryLockRange
225 where
226 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
227 {
228 #[inline]
229 fn encode(
230 self,
231 encoder_: &mut ___E,
232 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
233 _: (),
234 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
235 ::fidl_next::munge! {
236 let crate::wire::AdvisoryLockRange {
237 origin,
238 offset,
239 length,
240
241 } = out_;
242 }
243
244 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
245
246 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
247
248 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
249
250 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
251
252 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
253
254 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
255
256 Ok(())
257 }
258 }
259
260 unsafe impl<___E>
261 ::fidl_next::EncodeOption<
262 ::fidl_next::wire::Box<'static, crate::wire::AdvisoryLockRange>,
263 ___E,
264 > for AdvisoryLockRange
265 where
266 ___E: ::fidl_next::Encoder + ?Sized,
267 AdvisoryLockRange: ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>,
268 {
269 #[inline]
270 fn encode_option(
271 this: ::core::option::Option<Self>,
272 encoder: &mut ___E,
273 out: &mut ::core::mem::MaybeUninit<
274 ::fidl_next::wire::Box<'static, crate::wire::AdvisoryLockRange>,
275 >,
276 _: (),
277 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
278 if let Some(inner) = this {
279 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
280 ::fidl_next::wire::Box::encode_present(out);
281 } else {
282 ::fidl_next::wire::Box::encode_absent(out);
283 }
284
285 Ok(())
286 }
287 }
288
289 unsafe impl<'a, ___E>
290 ::fidl_next::EncodeOption<
291 ::fidl_next::wire::Box<'static, crate::wire::AdvisoryLockRange>,
292 ___E,
293 > for &'a AdvisoryLockRange
294 where
295 ___E: ::fidl_next::Encoder + ?Sized,
296 &'a AdvisoryLockRange: ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>,
297 {
298 #[inline]
299 fn encode_option(
300 this: ::core::option::Option<Self>,
301 encoder: &mut ___E,
302 out: &mut ::core::mem::MaybeUninit<
303 ::fidl_next::wire::Box<'static, crate::wire::AdvisoryLockRange>,
304 >,
305 _: (),
306 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
307 if let Some(inner) = this {
308 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
309 ::fidl_next::wire::Box::encode_present(out);
310 } else {
311 ::fidl_next::wire::Box::encode_absent(out);
312 }
313
314 Ok(())
315 }
316 }
317
318 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockRange> for AdvisoryLockRange {
319 #[inline]
320 fn from_wire(wire: crate::wire::AdvisoryLockRange) -> Self {
321 Self {
322 origin: ::fidl_next::FromWire::from_wire(wire.origin),
323
324 offset: ::fidl_next::FromWire::from_wire(wire.offset),
325
326 length: ::fidl_next::FromWire::from_wire(wire.length),
327 }
328 }
329 }
330
331 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockRange> for AdvisoryLockRange {
332 #[inline]
333 fn from_wire_ref(wire: &crate::wire::AdvisoryLockRange) -> Self {
334 Self {
335 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
336
337 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
338
339 length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length),
340 }
341 }
342 }
343
344 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
345 #[repr(u32)]
346 pub enum AdvisoryLockType {
347 Read = 1,
348 Write = 2,
349 Unlock = 3,
350 }
351 impl ::core::convert::TryFrom<u32> for AdvisoryLockType {
352 type Error = ::fidl_next::UnknownStrictEnumMemberError;
353 fn try_from(
354 value: u32,
355 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
356 match value {
357 1 => Ok(Self::Read),
358 2 => Ok(Self::Write),
359 3 => Ok(Self::Unlock),
360
361 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
362 }
363 }
364 }
365
366 impl ::std::convert::From<AdvisoryLockType> for u32 {
367 fn from(value: AdvisoryLockType) -> Self {
368 match value {
369 AdvisoryLockType::Read => 1,
370 AdvisoryLockType::Write => 2,
371 AdvisoryLockType::Unlock => 3,
372 }
373 }
374 }
375
376 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockType, ___E> for 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::Encode::encode(&self, encoder, out, ())
388 }
389 }
390
391 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockType, ___E>
392 for &'a AdvisoryLockType
393 where
394 ___E: ?Sized,
395 {
396 #[inline]
397 fn encode(
398 self,
399 encoder: &mut ___E,
400 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockType>,
401 _: (),
402 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
403 ::fidl_next::munge!(let crate::wire::AdvisoryLockType { value } = out);
404 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
405 AdvisoryLockType::Read => 1,
406
407 AdvisoryLockType::Write => 2,
408
409 AdvisoryLockType::Unlock => 3,
410 }));
411
412 Ok(())
413 }
414 }
415
416 impl ::core::convert::From<crate::wire::AdvisoryLockType> for AdvisoryLockType {
417 fn from(wire: crate::wire::AdvisoryLockType) -> Self {
418 match u32::from(wire.value) {
419 1 => Self::Read,
420
421 2 => Self::Write,
422
423 3 => Self::Unlock,
424
425 _ => unsafe { ::core::hint::unreachable_unchecked() },
426 }
427 }
428 }
429
430 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockType> for AdvisoryLockType {
431 #[inline]
432 fn from_wire(wire: crate::wire::AdvisoryLockType) -> Self {
433 Self::from(wire)
434 }
435 }
436
437 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockType> for AdvisoryLockType {
438 #[inline]
439 fn from_wire_ref(wire: &crate::wire::AdvisoryLockType) -> Self {
440 Self::from(*wire)
441 }
442 }
443
444 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
445 pub struct AdvisoryLockRequest {
446 pub type_: ::core::option::Option<crate::natural::AdvisoryLockType>,
447
448 pub range: ::core::option::Option<crate::natural::AdvisoryLockRange>,
449
450 pub wait: ::core::option::Option<bool>,
451 }
452
453 impl AdvisoryLockRequest {
454 fn __max_ordinal(&self) -> usize {
455 if self.wait.is_some() {
456 return 3;
457 }
458
459 if self.range.is_some() {
460 return 2;
461 }
462
463 if self.type_.is_some() {
464 return 1;
465 }
466
467 0
468 }
469 }
470
471 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>
472 for AdvisoryLockRequest
473 where
474 ___E: ::fidl_next::Encoder + ?Sized,
475 {
476 #[inline]
477 fn encode(
478 mut self,
479 encoder: &mut ___E,
480 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRequest<'static>>,
481 _: (),
482 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
483 ::fidl_next::munge!(let crate::wire::AdvisoryLockRequest { table } = out);
484
485 let max_ord = self.__max_ordinal();
486
487 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
488 ::fidl_next::Wire::zero_padding(&mut out);
489
490 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
491 ::fidl_next::wire::Envelope,
492 >(encoder, max_ord);
493
494 for i in 1..=max_ord {
495 match i {
496 3 => {
497 if let Some(value) = self.wait.take() {
498 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
499 value,
500 preallocated.encoder,
501 &mut out,
502 (),
503 )?;
504 } else {
505 ::fidl_next::wire::Envelope::encode_zero(&mut out)
506 }
507 }
508
509 2 => {
510 if let Some(value) = self.range.take() {
511 ::fidl_next::wire::Envelope::encode_value::<
512 crate::wire::AdvisoryLockRange,
513 ___E,
514 >(
515 value, preallocated.encoder, &mut out, ()
516 )?;
517 } else {
518 ::fidl_next::wire::Envelope::encode_zero(&mut out)
519 }
520 }
521
522 1 => {
523 if let Some(value) = self.type_.take() {
524 ::fidl_next::wire::Envelope::encode_value::<
525 crate::wire::AdvisoryLockType,
526 ___E,
527 >(
528 value, preallocated.encoder, &mut out, ()
529 )?;
530 } else {
531 ::fidl_next::wire::Envelope::encode_zero(&mut out)
532 }
533 }
534
535 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
536 }
537 unsafe {
538 preallocated.write_next(out.assume_init_ref());
539 }
540 }
541
542 ::fidl_next::wire::Table::encode_len(table, max_ord);
543
544 Ok(())
545 }
546 }
547
548 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>
549 for &'a AdvisoryLockRequest
550 where
551 ___E: ::fidl_next::Encoder + ?Sized,
552 {
553 #[inline]
554 fn encode(
555 self,
556 encoder: &mut ___E,
557 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRequest<'static>>,
558 _: (),
559 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
560 ::fidl_next::munge!(let crate::wire::AdvisoryLockRequest { table } = out);
561
562 let max_ord = self.__max_ordinal();
563
564 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
565 ::fidl_next::Wire::zero_padding(&mut out);
566
567 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
568 ::fidl_next::wire::Envelope,
569 >(encoder, max_ord);
570
571 for i in 1..=max_ord {
572 match i {
573 3 => {
574 if let Some(value) = &self.wait {
575 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
576 value,
577 preallocated.encoder,
578 &mut out,
579 (),
580 )?;
581 } else {
582 ::fidl_next::wire::Envelope::encode_zero(&mut out)
583 }
584 }
585
586 2 => {
587 if let Some(value) = &self.range {
588 ::fidl_next::wire::Envelope::encode_value::<
589 crate::wire::AdvisoryLockRange,
590 ___E,
591 >(
592 value, preallocated.encoder, &mut out, ()
593 )?;
594 } else {
595 ::fidl_next::wire::Envelope::encode_zero(&mut out)
596 }
597 }
598
599 1 => {
600 if let Some(value) = &self.type_ {
601 ::fidl_next::wire::Envelope::encode_value::<
602 crate::wire::AdvisoryLockType,
603 ___E,
604 >(
605 value, preallocated.encoder, &mut out, ()
606 )?;
607 } else {
608 ::fidl_next::wire::Envelope::encode_zero(&mut out)
609 }
610 }
611
612 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
613 }
614 unsafe {
615 preallocated.write_next(out.assume_init_ref());
616 }
617 }
618
619 ::fidl_next::wire::Table::encode_len(table, max_ord);
620
621 Ok(())
622 }
623 }
624
625 impl<'de> ::fidl_next::FromWire<crate::wire::AdvisoryLockRequest<'de>> for AdvisoryLockRequest {
626 #[inline]
627 fn from_wire(wire_: crate::wire::AdvisoryLockRequest<'de>) -> Self {
628 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
629
630 let type_ = wire_.table.get(1);
631
632 let range = wire_.table.get(2);
633
634 let wait = wire_.table.get(3);
635
636 Self {
637 type_: type_.map(|envelope| {
638 ::fidl_next::FromWire::from_wire(unsafe {
639 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
640 })
641 }),
642
643 range: range.map(|envelope| {
644 ::fidl_next::FromWire::from_wire(unsafe {
645 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
646 })
647 }),
648
649 wait: wait.map(|envelope| {
650 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
651 }),
652 }
653 }
654 }
655
656 impl<'de> ::fidl_next::FromWireRef<crate::wire::AdvisoryLockRequest<'de>> for AdvisoryLockRequest {
657 #[inline]
658 fn from_wire_ref(wire: &crate::wire::AdvisoryLockRequest<'de>) -> Self {
659 Self {
660 type_: wire.table.get(1).map(|envelope| {
661 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
662 envelope.deref_unchecked::<crate::wire::AdvisoryLockType>()
663 })
664 }),
665
666 range: wire.table.get(2).map(|envelope| {
667 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
668 envelope.deref_unchecked::<crate::wire::AdvisoryLockRange>()
669 })
670 }),
671
672 wait: wire.table.get(3).map(|envelope| {
673 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
674 envelope.deref_unchecked::<bool>()
675 })
676 }),
677 }
678 }
679 }
680
681 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
682 pub struct AdvisoryLockingAdvisoryLockRequest {
683 pub request: crate::natural::AdvisoryLockRequest,
684 }
685
686 unsafe impl<___E>
687 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
688 for AdvisoryLockingAdvisoryLockRequest
689 where
690 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
691 ___E: ::fidl_next::Encoder,
692 {
693 #[inline]
694 fn encode(
695 self,
696 encoder_: &mut ___E,
697 out_: &mut ::core::mem::MaybeUninit<
698 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
699 >,
700 _: (),
701 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
702 ::fidl_next::munge! {
703 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
704 request,
705
706 } = out_;
707 }
708
709 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
710
711 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
712
713 Ok(())
714 }
715 }
716
717 unsafe impl<'a, ___E>
718 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
719 for &'a AdvisoryLockingAdvisoryLockRequest
720 where
721 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
722 ___E: ::fidl_next::Encoder,
723 {
724 #[inline]
725 fn encode(
726 self,
727 encoder_: &mut ___E,
728 out_: &mut ::core::mem::MaybeUninit<
729 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
730 >,
731 _: (),
732 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
733 ::fidl_next::munge! {
734 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
735 request,
736
737 } = out_;
738 }
739
740 ::fidl_next::Encode::encode(&self.request, encoder_, request, ())?;
741
742 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
743
744 Ok(())
745 }
746 }
747
748 unsafe impl<___E>
749 ::fidl_next::EncodeOption<
750 ::fidl_next::wire::Box<
751 'static,
752 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
753 >,
754 ___E,
755 > for AdvisoryLockingAdvisoryLockRequest
756 where
757 ___E: ::fidl_next::Encoder + ?Sized,
758 AdvisoryLockingAdvisoryLockRequest:
759 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>,
760 {
761 #[inline]
762 fn encode_option(
763 this: ::core::option::Option<Self>,
764 encoder: &mut ___E,
765 out: &mut ::core::mem::MaybeUninit<
766 ::fidl_next::wire::Box<
767 'static,
768 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
769 >,
770 >,
771 _: (),
772 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
773 if let Some(inner) = this {
774 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
775 ::fidl_next::wire::Box::encode_present(out);
776 } else {
777 ::fidl_next::wire::Box::encode_absent(out);
778 }
779
780 Ok(())
781 }
782 }
783
784 unsafe impl<'a, ___E>
785 ::fidl_next::EncodeOption<
786 ::fidl_next::wire::Box<
787 'static,
788 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
789 >,
790 ___E,
791 > for &'a AdvisoryLockingAdvisoryLockRequest
792 where
793 ___E: ::fidl_next::Encoder + ?Sized,
794 &'a AdvisoryLockingAdvisoryLockRequest:
795 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>,
796 {
797 #[inline]
798 fn encode_option(
799 this: ::core::option::Option<Self>,
800 encoder: &mut ___E,
801 out: &mut ::core::mem::MaybeUninit<
802 ::fidl_next::wire::Box<
803 'static,
804 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
805 >,
806 >,
807 _: (),
808 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
809 if let Some(inner) = this {
810 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
811 ::fidl_next::wire::Box::encode_present(out);
812 } else {
813 ::fidl_next::wire::Box::encode_absent(out);
814 }
815
816 Ok(())
817 }
818 }
819
820 impl<'de> ::fidl_next::FromWire<crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>>
821 for AdvisoryLockingAdvisoryLockRequest
822 {
823 #[inline]
824 fn from_wire(wire: crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
825 Self { request: ::fidl_next::FromWire::from_wire(wire.request) }
826 }
827 }
828
829 impl<'de> ::fidl_next::FromWireRef<crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>>
830 for AdvisoryLockingAdvisoryLockRequest
831 {
832 #[inline]
833 fn from_wire_ref(wire: &crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
834 Self { request: ::fidl_next::FromWireRef::from_wire_ref(&wire.request) }
835 }
836 }
837
838 pub type AdvisoryLockingAdvisoryLockResponse = ();
839
840 ::fidl_next::bitflags::bitflags! {
841 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct AllocateMode: u32 {
842 const KEEP_SIZE = 1;
843 const UNSHARE_RANGE = 2;
844 const PUNCH_HOLE = 4;
845 const COLLAPSE_RANGE = 8;
846 const ZERO_RANGE = 16;
847 const INSERT_RANGE = 32;
848 const _ = !0;
849 }
850 }
851
852 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AllocateMode, ___E> for AllocateMode
853 where
854 ___E: ?Sized,
855 {
856 #[inline]
857 fn encode(
858 self,
859 encoder: &mut ___E,
860 out: &mut ::core::mem::MaybeUninit<crate::wire::AllocateMode>,
861 _: (),
862 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
863 ::fidl_next::Encode::encode(&self, encoder, out, ())
864 }
865 }
866
867 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AllocateMode, ___E> for &'a AllocateMode
868 where
869 ___E: ?Sized,
870 {
871 #[inline]
872 fn encode(
873 self,
874 _: &mut ___E,
875 out: &mut ::core::mem::MaybeUninit<crate::wire::AllocateMode>,
876 _: (),
877 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
878 ::fidl_next::munge!(let crate::wire::AllocateMode { value } = out);
879
880 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
881 Ok(())
882 }
883 }
884
885 impl ::core::convert::From<crate::wire::AllocateMode> for AllocateMode {
886 fn from(wire: crate::wire::AllocateMode) -> Self {
887 Self::from_bits_retain(u32::from(wire.value))
888 }
889 }
890
891 impl ::fidl_next::FromWire<crate::wire::AllocateMode> for AllocateMode {
892 #[inline]
893 fn from_wire(wire: crate::wire::AllocateMode) -> Self {
894 Self::from(wire)
895 }
896 }
897
898 impl ::fidl_next::FromWireRef<crate::wire::AllocateMode> for AllocateMode {
899 #[inline]
900 fn from_wire_ref(wire: &crate::wire::AllocateMode) -> Self {
901 Self::from(*wire)
902 }
903 }
904
905 #[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"]
906 pub type Rights = crate::natural::Operations;
907
908 #[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"]
909 pub type Id = u64;
910
911 ::fidl_next::bitflags::bitflags! {
912 #[doc = " DEPRECATED - Use Flags instead.\n"]#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct OpenFlags: u32 {
913 #[doc = " Can read from target object.\n"]const RIGHT_READABLE = 1;
914 #[doc = " Can write to target object.\n"]const RIGHT_WRITABLE = 2;
915 #[doc = " Connection can map target object executable.\n"]const RIGHT_EXECUTABLE = 8;
916 #[doc = " Create the object if it doesn\'t exist.\n"]const CREATE = 65536;
917 #[doc = " (with Create) Fail if the object already exists.\n"]const CREATE_IF_ABSENT = 131072;
918 #[doc = " Truncate the object before usage.\n"]const TRUNCATE = 262144;
919 #[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;
920 #[doc = " Seek to the end of the object before all writes.\n"]const APPEND = 1048576;
921 #[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;
922 #[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;
923 #[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;
924 #[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;
925 #[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;
926 #[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;
927 #[doc = " Open the target object as a block device.\n"]const BLOCK_DEVICE = 16777216;
928
929 }
930 }
931
932 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OpenFlags, ___E> for OpenFlags
933 where
934 ___E: ?Sized,
935 {
936 #[inline]
937 fn encode(
938 self,
939 encoder: &mut ___E,
940 out: &mut ::core::mem::MaybeUninit<crate::wire::OpenFlags>,
941 _: (),
942 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
943 ::fidl_next::Encode::encode(&self, encoder, out, ())
944 }
945 }
946
947 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::OpenFlags, ___E> for &'a OpenFlags
948 where
949 ___E: ?Sized,
950 {
951 #[inline]
952 fn encode(
953 self,
954 _: &mut ___E,
955 out: &mut ::core::mem::MaybeUninit<crate::wire::OpenFlags>,
956 _: (),
957 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
958 ::fidl_next::munge!(let crate::wire::OpenFlags { value } = out);
959
960 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
961 return Err(::fidl_next::EncodeError::InvalidStrictBits);
962 }
963
964 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
965 Ok(())
966 }
967 }
968
969 impl ::core::convert::From<crate::wire::OpenFlags> for OpenFlags {
970 fn from(wire: crate::wire::OpenFlags) -> Self {
971 Self::from_bits_retain(u32::from(wire.value))
972 }
973 }
974
975 impl ::fidl_next::FromWire<crate::wire::OpenFlags> for OpenFlags {
976 #[inline]
977 fn from_wire(wire: crate::wire::OpenFlags) -> Self {
978 Self::from(wire)
979 }
980 }
981
982 impl ::fidl_next::FromWireRef<crate::wire::OpenFlags> for OpenFlags {
983 #[inline]
984 fn from_wire_ref(wire: &crate::wire::OpenFlags) -> Self {
985 Self::from(*wire)
986 }
987 }
988
989 #[doc = " NodeAttributes defines generic information about a filesystem node.\n"]
990 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
991 pub struct NodeAttributes {
992 pub mode: u32,
993
994 pub id: u64,
995
996 pub content_size: u64,
997
998 pub storage_size: u64,
999
1000 pub link_count: u64,
1001
1002 pub creation_time: u64,
1003
1004 pub modification_time: u64,
1005 }
1006
1007 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes, ___E> for NodeAttributes
1008 where
1009 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1010 {
1011 #[inline]
1012 fn encode(
1013 self,
1014 encoder_: &mut ___E,
1015 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
1016 _: (),
1017 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1018 ::fidl_next::munge! {
1019 let crate::wire::NodeAttributes {
1020 mode,
1021 id,
1022 content_size,
1023 storage_size,
1024 link_count,
1025 creation_time,
1026 modification_time,
1027
1028 } = out_;
1029 }
1030
1031 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1032
1033 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1034
1035 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1036
1037 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1038
1039 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
1040
1041 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(content_size.as_mut_ptr()) };
1042
1043 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
1044
1045 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(storage_size.as_mut_ptr()) };
1046
1047 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
1048
1049 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(link_count.as_mut_ptr()) };
1050
1051 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
1052
1053 let mut _field =
1054 unsafe { ::fidl_next::Slot::new_unchecked(creation_time.as_mut_ptr()) };
1055
1056 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
1057
1058 let mut _field =
1059 unsafe { ::fidl_next::Slot::new_unchecked(modification_time.as_mut_ptr()) };
1060
1061 Ok(())
1062 }
1063 }
1064
1065 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes, ___E> for &'a NodeAttributes
1066 where
1067 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1068 {
1069 #[inline]
1070 fn encode(
1071 self,
1072 encoder_: &mut ___E,
1073 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
1074 _: (),
1075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1076 ::fidl_next::munge! {
1077 let crate::wire::NodeAttributes {
1078 mode,
1079 id,
1080 content_size,
1081 storage_size,
1082 link_count,
1083 creation_time,
1084 modification_time,
1085
1086 } = out_;
1087 }
1088
1089 ::fidl_next::Encode::encode(&self.mode, encoder_, mode, ())?;
1090
1091 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1092
1093 ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1094
1095 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1096
1097 ::fidl_next::Encode::encode(&self.content_size, encoder_, content_size, ())?;
1098
1099 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(content_size.as_mut_ptr()) };
1100
1101 ::fidl_next::Encode::encode(&self.storage_size, encoder_, storage_size, ())?;
1102
1103 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(storage_size.as_mut_ptr()) };
1104
1105 ::fidl_next::Encode::encode(&self.link_count, encoder_, link_count, ())?;
1106
1107 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(link_count.as_mut_ptr()) };
1108
1109 ::fidl_next::Encode::encode(&self.creation_time, encoder_, creation_time, ())?;
1110
1111 let mut _field =
1112 unsafe { ::fidl_next::Slot::new_unchecked(creation_time.as_mut_ptr()) };
1113
1114 ::fidl_next::Encode::encode(&self.modification_time, encoder_, modification_time, ())?;
1115
1116 let mut _field =
1117 unsafe { ::fidl_next::Slot::new_unchecked(modification_time.as_mut_ptr()) };
1118
1119 Ok(())
1120 }
1121 }
1122
1123 unsafe impl<___E>
1124 ::fidl_next::EncodeOption<
1125 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes>,
1126 ___E,
1127 > for NodeAttributes
1128 where
1129 ___E: ::fidl_next::Encoder + ?Sized,
1130 NodeAttributes: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
1131 {
1132 #[inline]
1133 fn encode_option(
1134 this: ::core::option::Option<Self>,
1135 encoder: &mut ___E,
1136 out: &mut ::core::mem::MaybeUninit<
1137 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes>,
1138 >,
1139 _: (),
1140 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1141 if let Some(inner) = this {
1142 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1143 ::fidl_next::wire::Box::encode_present(out);
1144 } else {
1145 ::fidl_next::wire::Box::encode_absent(out);
1146 }
1147
1148 Ok(())
1149 }
1150 }
1151
1152 unsafe impl<'a, ___E>
1153 ::fidl_next::EncodeOption<
1154 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes>,
1155 ___E,
1156 > for &'a NodeAttributes
1157 where
1158 ___E: ::fidl_next::Encoder + ?Sized,
1159 &'a NodeAttributes: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
1160 {
1161 #[inline]
1162 fn encode_option(
1163 this: ::core::option::Option<Self>,
1164 encoder: &mut ___E,
1165 out: &mut ::core::mem::MaybeUninit<
1166 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes>,
1167 >,
1168 _: (),
1169 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1170 if let Some(inner) = this {
1171 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1172 ::fidl_next::wire::Box::encode_present(out);
1173 } else {
1174 ::fidl_next::wire::Box::encode_absent(out);
1175 }
1176
1177 Ok(())
1178 }
1179 }
1180
1181 impl ::fidl_next::FromWire<crate::wire::NodeAttributes> for NodeAttributes {
1182 #[inline]
1183 fn from_wire(wire: crate::wire::NodeAttributes) -> Self {
1184 Self {
1185 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1186
1187 id: ::fidl_next::FromWire::from_wire(wire.id),
1188
1189 content_size: ::fidl_next::FromWire::from_wire(wire.content_size),
1190
1191 storage_size: ::fidl_next::FromWire::from_wire(wire.storage_size),
1192
1193 link_count: ::fidl_next::FromWire::from_wire(wire.link_count),
1194
1195 creation_time: ::fidl_next::FromWire::from_wire(wire.creation_time),
1196
1197 modification_time: ::fidl_next::FromWire::from_wire(wire.modification_time),
1198 }
1199 }
1200 }
1201
1202 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributes> for NodeAttributes {
1203 #[inline]
1204 fn from_wire_ref(wire: &crate::wire::NodeAttributes) -> Self {
1205 Self {
1206 mode: ::fidl_next::FromWireRef::from_wire_ref(&wire.mode),
1207
1208 id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
1209
1210 content_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.content_size),
1211
1212 storage_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.storage_size),
1213
1214 link_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.link_count),
1215
1216 creation_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.creation_time),
1217
1218 modification_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.modification_time),
1219 }
1220 }
1221 }
1222
1223 ::fidl_next::bitflags::bitflags! {
1224 #[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 {
1225 const CREATION_TIME = 1;
1226 const MODIFICATION_TIME = 2;
1227
1228 }
1229 }
1230
1231 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E> for NodeAttributeFlags
1232 where
1233 ___E: ?Sized,
1234 {
1235 #[inline]
1236 fn encode(
1237 self,
1238 encoder: &mut ___E,
1239 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributeFlags>,
1240 _: (),
1241 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1242 ::fidl_next::Encode::encode(&self, encoder, out, ())
1243 }
1244 }
1245
1246 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>
1247 for &'a NodeAttributeFlags
1248 where
1249 ___E: ?Sized,
1250 {
1251 #[inline]
1252 fn encode(
1253 self,
1254 _: &mut ___E,
1255 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributeFlags>,
1256 _: (),
1257 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1258 ::fidl_next::munge!(let crate::wire::NodeAttributeFlags { value } = out);
1259
1260 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1261 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1262 }
1263
1264 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
1265 Ok(())
1266 }
1267 }
1268
1269 impl ::core::convert::From<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1270 fn from(wire: crate::wire::NodeAttributeFlags) -> Self {
1271 Self::from_bits_retain(u32::from(wire.value))
1272 }
1273 }
1274
1275 impl ::fidl_next::FromWire<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1276 #[inline]
1277 fn from_wire(wire: crate::wire::NodeAttributeFlags) -> Self {
1278 Self::from(wire)
1279 }
1280 }
1281
1282 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1283 #[inline]
1284 fn from_wire_ref(wire: &crate::wire::NodeAttributeFlags) -> Self {
1285 Self::from(*wire)
1286 }
1287 }
1288
1289 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1290 pub struct NodeQueryFilesystemResponse {
1291 pub s: ::fidl_next::fuchsia::zx::Status,
1292
1293 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::FilesystemInfo>>,
1294 }
1295
1296 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
1297 for NodeQueryFilesystemResponse
1298 where
1299 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1300 ___E: ::fidl_next::Encoder,
1301 {
1302 #[inline]
1303 fn encode(
1304 self,
1305 encoder_: &mut ___E,
1306 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
1307 _: (),
1308 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1309 ::fidl_next::munge! {
1310 let crate::wire::NodeQueryFilesystemResponse {
1311 s,
1312 info,
1313
1314 } = out_;
1315 }
1316
1317 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1318
1319 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1320
1321 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
1322
1323 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1324
1325 Ok(())
1326 }
1327 }
1328
1329 unsafe impl<'a, ___E>
1330 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
1331 for &'a NodeQueryFilesystemResponse
1332 where
1333 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1334 ___E: ::fidl_next::Encoder,
1335 {
1336 #[inline]
1337 fn encode(
1338 self,
1339 encoder_: &mut ___E,
1340 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
1341 _: (),
1342 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1343 ::fidl_next::munge! {
1344 let crate::wire::NodeQueryFilesystemResponse {
1345 s,
1346 info,
1347
1348 } = out_;
1349 }
1350
1351 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1352
1353 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1354
1355 ::fidl_next::Encode::encode(&self.info, encoder_, info, ())?;
1356
1357 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1358
1359 Ok(())
1360 }
1361 }
1362
1363 unsafe impl<___E>
1364 ::fidl_next::EncodeOption<
1365 ::fidl_next::wire::Box<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1366 ___E,
1367 > for NodeQueryFilesystemResponse
1368 where
1369 ___E: ::fidl_next::Encoder + ?Sized,
1370 NodeQueryFilesystemResponse:
1371 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>,
1372 {
1373 #[inline]
1374 fn encode_option(
1375 this: ::core::option::Option<Self>,
1376 encoder: &mut ___E,
1377 out: &mut ::core::mem::MaybeUninit<
1378 ::fidl_next::wire::Box<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1379 >,
1380 _: (),
1381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1382 if let Some(inner) = this {
1383 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1384 ::fidl_next::wire::Box::encode_present(out);
1385 } else {
1386 ::fidl_next::wire::Box::encode_absent(out);
1387 }
1388
1389 Ok(())
1390 }
1391 }
1392
1393 unsafe impl<'a, ___E>
1394 ::fidl_next::EncodeOption<
1395 ::fidl_next::wire::Box<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1396 ___E,
1397 > for &'a NodeQueryFilesystemResponse
1398 where
1399 ___E: ::fidl_next::Encoder + ?Sized,
1400 &'a NodeQueryFilesystemResponse:
1401 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>,
1402 {
1403 #[inline]
1404 fn encode_option(
1405 this: ::core::option::Option<Self>,
1406 encoder: &mut ___E,
1407 out: &mut ::core::mem::MaybeUninit<
1408 ::fidl_next::wire::Box<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1409 >,
1410 _: (),
1411 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1412 if let Some(inner) = this {
1413 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1414 ::fidl_next::wire::Box::encode_present(out);
1415 } else {
1416 ::fidl_next::wire::Box::encode_absent(out);
1417 }
1418
1419 Ok(())
1420 }
1421 }
1422
1423 impl<'de> ::fidl_next::FromWire<crate::wire::NodeQueryFilesystemResponse<'de>>
1424 for NodeQueryFilesystemResponse
1425 {
1426 #[inline]
1427 fn from_wire(wire: crate::wire::NodeQueryFilesystemResponse<'de>) -> Self {
1428 Self {
1429 s: ::fidl_next::FromWire::from_wire(wire.s),
1430
1431 info: ::fidl_next::FromWire::from_wire(wire.info),
1432 }
1433 }
1434 }
1435
1436 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeQueryFilesystemResponse<'de>>
1437 for NodeQueryFilesystemResponse
1438 {
1439 #[inline]
1440 fn from_wire_ref(wire: &crate::wire::NodeQueryFilesystemResponse<'de>) -> Self {
1441 Self {
1442 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
1443
1444 info: ::fidl_next::FromWireRef::from_wire_ref(&wire.info),
1445 }
1446 }
1447 }
1448
1449 pub type NodeUpdateAttributesResponse = ();
1450
1451 pub type NodeSyncResponse = ();
1452
1453 ::fidl_next::bitflags::bitflags! {
1454 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct ModeType: u32 {
1455 const DO_NOT_USE = 2147483648;
1456
1457 }
1458 }
1459
1460 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ModeType, ___E> for ModeType
1461 where
1462 ___E: ?Sized,
1463 {
1464 #[inline]
1465 fn encode(
1466 self,
1467 encoder: &mut ___E,
1468 out: &mut ::core::mem::MaybeUninit<crate::wire::ModeType>,
1469 _: (),
1470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1471 ::fidl_next::Encode::encode(&self, encoder, out, ())
1472 }
1473 }
1474
1475 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ModeType, ___E> for &'a ModeType
1476 where
1477 ___E: ?Sized,
1478 {
1479 #[inline]
1480 fn encode(
1481 self,
1482 _: &mut ___E,
1483 out: &mut ::core::mem::MaybeUninit<crate::wire::ModeType>,
1484 _: (),
1485 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1486 ::fidl_next::munge!(let crate::wire::ModeType { value } = out);
1487
1488 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1489 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1490 }
1491
1492 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
1493 Ok(())
1494 }
1495 }
1496
1497 impl ::core::convert::From<crate::wire::ModeType> for ModeType {
1498 fn from(wire: crate::wire::ModeType) -> Self {
1499 Self::from_bits_retain(u32::from(wire.value))
1500 }
1501 }
1502
1503 impl ::fidl_next::FromWire<crate::wire::ModeType> for ModeType {
1504 #[inline]
1505 fn from_wire(wire: crate::wire::ModeType) -> Self {
1506 Self::from(wire)
1507 }
1508 }
1509
1510 impl ::fidl_next::FromWireRef<crate::wire::ModeType> for ModeType {
1511 #[inline]
1512 fn from_wire_ref(wire: &crate::wire::ModeType) -> Self {
1513 Self::from(*wire)
1514 }
1515 }
1516
1517 #[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"]
1518 pub type Path = ::std::string::String;
1519
1520 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1521 #[repr(C)]
1522 pub struct DirectoryReadDirentsRequest {
1523 pub max_bytes: u64,
1524 }
1525
1526 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
1527 for DirectoryReadDirentsRequest
1528 where
1529 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1530 {
1531 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1532 Self,
1533 crate::wire::DirectoryReadDirentsRequest,
1534 > = unsafe {
1535 ::fidl_next::CopyOptimization::enable_if(
1536 true
1537
1538 && <
1539 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
1540 >::COPY_OPTIMIZATION.is_enabled()
1541
1542 )
1543 };
1544
1545 #[inline]
1546 fn encode(
1547 self,
1548 encoder_: &mut ___E,
1549 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
1550 _: (),
1551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1552 ::fidl_next::munge! {
1553 let crate::wire::DirectoryReadDirentsRequest {
1554 max_bytes,
1555
1556 } = out_;
1557 }
1558
1559 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
1560
1561 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max_bytes.as_mut_ptr()) };
1562
1563 Ok(())
1564 }
1565 }
1566
1567 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
1568 for &'a DirectoryReadDirentsRequest
1569 where
1570 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1571 {
1572 #[inline]
1573 fn encode(
1574 self,
1575 encoder_: &mut ___E,
1576 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
1577 _: (),
1578 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1579 ::fidl_next::munge! {
1580 let crate::wire::DirectoryReadDirentsRequest {
1581 max_bytes,
1582
1583 } = out_;
1584 }
1585
1586 ::fidl_next::Encode::encode(&self.max_bytes, encoder_, max_bytes, ())?;
1587
1588 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max_bytes.as_mut_ptr()) };
1589
1590 Ok(())
1591 }
1592 }
1593
1594 unsafe impl<___E>
1595 ::fidl_next::EncodeOption<
1596 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsRequest>,
1597 ___E,
1598 > for DirectoryReadDirentsRequest
1599 where
1600 ___E: ::fidl_next::Encoder + ?Sized,
1601 DirectoryReadDirentsRequest:
1602 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>,
1603 {
1604 #[inline]
1605 fn encode_option(
1606 this: ::core::option::Option<Self>,
1607 encoder: &mut ___E,
1608 out: &mut ::core::mem::MaybeUninit<
1609 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsRequest>,
1610 >,
1611 _: (),
1612 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1613 if let Some(inner) = this {
1614 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1615 ::fidl_next::wire::Box::encode_present(out);
1616 } else {
1617 ::fidl_next::wire::Box::encode_absent(out);
1618 }
1619
1620 Ok(())
1621 }
1622 }
1623
1624 unsafe impl<'a, ___E>
1625 ::fidl_next::EncodeOption<
1626 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsRequest>,
1627 ___E,
1628 > for &'a DirectoryReadDirentsRequest
1629 where
1630 ___E: ::fidl_next::Encoder + ?Sized,
1631 &'a DirectoryReadDirentsRequest:
1632 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>,
1633 {
1634 #[inline]
1635 fn encode_option(
1636 this: ::core::option::Option<Self>,
1637 encoder: &mut ___E,
1638 out: &mut ::core::mem::MaybeUninit<
1639 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsRequest>,
1640 >,
1641 _: (),
1642 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1643 if let Some(inner) = this {
1644 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1645 ::fidl_next::wire::Box::encode_present(out);
1646 } else {
1647 ::fidl_next::wire::Box::encode_absent(out);
1648 }
1649
1650 Ok(())
1651 }
1652 }
1653
1654 impl ::fidl_next::FromWire<crate::wire::DirectoryReadDirentsRequest>
1655 for DirectoryReadDirentsRequest
1656 {
1657 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1658 crate::wire::DirectoryReadDirentsRequest,
1659 Self,
1660 > = unsafe {
1661 ::fidl_next::CopyOptimization::enable_if(
1662 true
1663 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
1664 .is_enabled(),
1665 )
1666 };
1667
1668 #[inline]
1669 fn from_wire(wire: crate::wire::DirectoryReadDirentsRequest) -> Self {
1670 Self { max_bytes: ::fidl_next::FromWire::from_wire(wire.max_bytes) }
1671 }
1672 }
1673
1674 impl ::fidl_next::FromWireRef<crate::wire::DirectoryReadDirentsRequest>
1675 for DirectoryReadDirentsRequest
1676 {
1677 #[inline]
1678 fn from_wire_ref(wire: &crate::wire::DirectoryReadDirentsRequest) -> Self {
1679 Self { max_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_bytes) }
1680 }
1681 }
1682
1683 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1684 pub struct DirectoryReadDirentsResponse {
1685 pub s: ::fidl_next::fuchsia::zx::Status,
1686
1687 pub dirents: ::std::vec::Vec<u8>,
1688 }
1689
1690 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
1691 for DirectoryReadDirentsResponse
1692 where
1693 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1694 ___E: ::fidl_next::Encoder,
1695 {
1696 #[inline]
1697 fn encode(
1698 self,
1699 encoder_: &mut ___E,
1700 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
1701 _: (),
1702 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1703 ::fidl_next::munge! {
1704 let crate::wire::DirectoryReadDirentsResponse {
1705 s,
1706 dirents,
1707
1708 } = out_;
1709 }
1710
1711 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1712
1713 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1714
1715 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
1716
1717 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dirents.as_mut_ptr()) };
1718 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
1719
1720 Ok(())
1721 }
1722 }
1723
1724 unsafe impl<'a, ___E>
1725 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
1726 for &'a DirectoryReadDirentsResponse
1727 where
1728 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1729 ___E: ::fidl_next::Encoder,
1730 {
1731 #[inline]
1732 fn encode(
1733 self,
1734 encoder_: &mut ___E,
1735 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
1736 _: (),
1737 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1738 ::fidl_next::munge! {
1739 let crate::wire::DirectoryReadDirentsResponse {
1740 s,
1741 dirents,
1742
1743 } = out_;
1744 }
1745
1746 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1747
1748 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1749
1750 ::fidl_next::Encode::encode(&self.dirents, encoder_, dirents, (8192, ()))?;
1751
1752 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dirents.as_mut_ptr()) };
1753 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
1754
1755 Ok(())
1756 }
1757 }
1758
1759 unsafe impl<___E>
1760 ::fidl_next::EncodeOption<
1761 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
1762 ___E,
1763 > for DirectoryReadDirentsResponse
1764 where
1765 ___E: ::fidl_next::Encoder + ?Sized,
1766 DirectoryReadDirentsResponse:
1767 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>,
1768 {
1769 #[inline]
1770 fn encode_option(
1771 this: ::core::option::Option<Self>,
1772 encoder: &mut ___E,
1773 out: &mut ::core::mem::MaybeUninit<
1774 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
1775 >,
1776 _: (),
1777 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1778 if let Some(inner) = this {
1779 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1780 ::fidl_next::wire::Box::encode_present(out);
1781 } else {
1782 ::fidl_next::wire::Box::encode_absent(out);
1783 }
1784
1785 Ok(())
1786 }
1787 }
1788
1789 unsafe impl<'a, ___E>
1790 ::fidl_next::EncodeOption<
1791 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
1792 ___E,
1793 > for &'a DirectoryReadDirentsResponse
1794 where
1795 ___E: ::fidl_next::Encoder + ?Sized,
1796 &'a DirectoryReadDirentsResponse:
1797 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>,
1798 {
1799 #[inline]
1800 fn encode_option(
1801 this: ::core::option::Option<Self>,
1802 encoder: &mut ___E,
1803 out: &mut ::core::mem::MaybeUninit<
1804 ::fidl_next::wire::Box<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
1805 >,
1806 _: (),
1807 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1808 if let Some(inner) = this {
1809 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1810 ::fidl_next::wire::Box::encode_present(out);
1811 } else {
1812 ::fidl_next::wire::Box::encode_absent(out);
1813 }
1814
1815 Ok(())
1816 }
1817 }
1818
1819 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryReadDirentsResponse<'de>>
1820 for DirectoryReadDirentsResponse
1821 {
1822 #[inline]
1823 fn from_wire(wire: crate::wire::DirectoryReadDirentsResponse<'de>) -> Self {
1824 Self {
1825 s: ::fidl_next::FromWire::from_wire(wire.s),
1826
1827 dirents: ::fidl_next::FromWire::from_wire(wire.dirents),
1828 }
1829 }
1830 }
1831
1832 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryReadDirentsResponse<'de>>
1833 for DirectoryReadDirentsResponse
1834 {
1835 #[inline]
1836 fn from_wire_ref(wire: &crate::wire::DirectoryReadDirentsResponse<'de>) -> Self {
1837 Self {
1838 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
1839
1840 dirents: ::fidl_next::FromWireRef::from_wire_ref(&wire.dirents),
1841 }
1842 }
1843 }
1844
1845 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1846 #[repr(C)]
1847 pub struct DirectoryRewindResponse {
1848 pub s: ::fidl_next::fuchsia::zx::Status,
1849 }
1850
1851 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
1852 for DirectoryRewindResponse
1853 where
1854 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1855 {
1856 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1857 Self,
1858 crate::wire::DirectoryRewindResponse,
1859 > = unsafe {
1860 ::fidl_next::CopyOptimization::enable_if(
1861 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<
1862 ::fidl_next::wire::fuchsia::Status,
1863 ___E,
1864 >>::COPY_OPTIMIZATION
1865 .is_enabled(),
1866 )
1867 };
1868
1869 #[inline]
1870 fn encode(
1871 self,
1872 encoder_: &mut ___E,
1873 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
1874 _: (),
1875 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1876 ::fidl_next::munge! {
1877 let crate::wire::DirectoryRewindResponse {
1878 s,
1879
1880 } = out_;
1881 }
1882
1883 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1884
1885 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1886
1887 Ok(())
1888 }
1889 }
1890
1891 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
1892 for &'a DirectoryRewindResponse
1893 where
1894 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1895 {
1896 #[inline]
1897 fn encode(
1898 self,
1899 encoder_: &mut ___E,
1900 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
1901 _: (),
1902 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1903 ::fidl_next::munge! {
1904 let crate::wire::DirectoryRewindResponse {
1905 s,
1906
1907 } = out_;
1908 }
1909
1910 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1911
1912 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1913
1914 Ok(())
1915 }
1916 }
1917
1918 unsafe impl<___E>
1919 ::fidl_next::EncodeOption<
1920 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1921 ___E,
1922 > for DirectoryRewindResponse
1923 where
1924 ___E: ::fidl_next::Encoder + ?Sized,
1925 DirectoryRewindResponse: ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
1926 {
1927 #[inline]
1928 fn encode_option(
1929 this: ::core::option::Option<Self>,
1930 encoder: &mut ___E,
1931 out: &mut ::core::mem::MaybeUninit<
1932 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1933 >,
1934 _: (),
1935 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1936 if let Some(inner) = this {
1937 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1938 ::fidl_next::wire::Box::encode_present(out);
1939 } else {
1940 ::fidl_next::wire::Box::encode_absent(out);
1941 }
1942
1943 Ok(())
1944 }
1945 }
1946
1947 unsafe impl<'a, ___E>
1948 ::fidl_next::EncodeOption<
1949 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1950 ___E,
1951 > for &'a DirectoryRewindResponse
1952 where
1953 ___E: ::fidl_next::Encoder + ?Sized,
1954 &'a DirectoryRewindResponse:
1955 ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
1956 {
1957 #[inline]
1958 fn encode_option(
1959 this: ::core::option::Option<Self>,
1960 encoder: &mut ___E,
1961 out: &mut ::core::mem::MaybeUninit<
1962 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1963 >,
1964 _: (),
1965 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1966 if let Some(inner) = this {
1967 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1968 ::fidl_next::wire::Box::encode_present(out);
1969 } else {
1970 ::fidl_next::wire::Box::encode_absent(out);
1971 }
1972
1973 Ok(())
1974 }
1975 }
1976
1977 impl ::fidl_next::FromWire<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
1978 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1979 crate::wire::DirectoryRewindResponse,
1980 Self,
1981 > = unsafe {
1982 ::fidl_next::CopyOptimization::enable_if(
1983 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<
1984 ::fidl_next::wire::fuchsia::Status,
1985 >>::COPY_OPTIMIZATION
1986 .is_enabled(),
1987 )
1988 };
1989
1990 #[inline]
1991 fn from_wire(wire: crate::wire::DirectoryRewindResponse) -> Self {
1992 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
1993 }
1994 }
1995
1996 impl ::fidl_next::FromWireRef<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
1997 #[inline]
1998 fn from_wire_ref(wire: &crate::wire::DirectoryRewindResponse) -> Self {
1999 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2000 }
2001 }
2002
2003 #[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"]
2004 pub type Name = ::std::string::String;
2005
2006 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2007 #[repr(C)]
2008 pub struct DirectoryLinkResponse {
2009 pub s: ::fidl_next::fuchsia::zx::Status,
2010 }
2011
2012 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2013 for DirectoryLinkResponse
2014 where
2015 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2016 {
2017 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2018 Self,
2019 crate::wire::DirectoryLinkResponse,
2020 > = unsafe {
2021 ::fidl_next::CopyOptimization::enable_if(
2022 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<
2023 ::fidl_next::wire::fuchsia::Status,
2024 ___E,
2025 >>::COPY_OPTIMIZATION
2026 .is_enabled(),
2027 )
2028 };
2029
2030 #[inline]
2031 fn encode(
2032 self,
2033 encoder_: &mut ___E,
2034 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2035 _: (),
2036 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2037 ::fidl_next::munge! {
2038 let crate::wire::DirectoryLinkResponse {
2039 s,
2040
2041 } = out_;
2042 }
2043
2044 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2045
2046 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2047
2048 Ok(())
2049 }
2050 }
2051
2052 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2053 for &'a DirectoryLinkResponse
2054 where
2055 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2056 {
2057 #[inline]
2058 fn encode(
2059 self,
2060 encoder_: &mut ___E,
2061 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2062 _: (),
2063 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2064 ::fidl_next::munge! {
2065 let crate::wire::DirectoryLinkResponse {
2066 s,
2067
2068 } = out_;
2069 }
2070
2071 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2072
2073 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2074
2075 Ok(())
2076 }
2077 }
2078
2079 unsafe impl<___E>
2080 ::fidl_next::EncodeOption<
2081 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2082 ___E,
2083 > for DirectoryLinkResponse
2084 where
2085 ___E: ::fidl_next::Encoder + ?Sized,
2086 DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2087 {
2088 #[inline]
2089 fn encode_option(
2090 this: ::core::option::Option<Self>,
2091 encoder: &mut ___E,
2092 out: &mut ::core::mem::MaybeUninit<
2093 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2094 >,
2095 _: (),
2096 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2097 if let Some(inner) = this {
2098 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2099 ::fidl_next::wire::Box::encode_present(out);
2100 } else {
2101 ::fidl_next::wire::Box::encode_absent(out);
2102 }
2103
2104 Ok(())
2105 }
2106 }
2107
2108 unsafe impl<'a, ___E>
2109 ::fidl_next::EncodeOption<
2110 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2111 ___E,
2112 > for &'a DirectoryLinkResponse
2113 where
2114 ___E: ::fidl_next::Encoder + ?Sized,
2115 &'a DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2116 {
2117 #[inline]
2118 fn encode_option(
2119 this: ::core::option::Option<Self>,
2120 encoder: &mut ___E,
2121 out: &mut ::core::mem::MaybeUninit<
2122 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2123 >,
2124 _: (),
2125 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2126 if let Some(inner) = this {
2127 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2128 ::fidl_next::wire::Box::encode_present(out);
2129 } else {
2130 ::fidl_next::wire::Box::encode_absent(out);
2131 }
2132
2133 Ok(())
2134 }
2135 }
2136
2137 impl ::fidl_next::FromWire<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2138 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2139 crate::wire::DirectoryLinkResponse,
2140 Self,
2141 > = unsafe {
2142 ::fidl_next::CopyOptimization::enable_if(
2143 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<
2144 ::fidl_next::wire::fuchsia::Status,
2145 >>::COPY_OPTIMIZATION
2146 .is_enabled(),
2147 )
2148 };
2149
2150 #[inline]
2151 fn from_wire(wire: crate::wire::DirectoryLinkResponse) -> Self {
2152 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2153 }
2154 }
2155
2156 impl ::fidl_next::FromWireRef<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2157 #[inline]
2158 fn from_wire_ref(wire: &crate::wire::DirectoryLinkResponse) -> Self {
2159 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2160 }
2161 }
2162
2163 ::fidl_next::bitflags::bitflags! {
2164 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct UnlinkFlags: u64 {
2165 #[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;
2166 const _ = !0;
2167 }
2168 }
2169
2170 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for UnlinkFlags
2171 where
2172 ___E: ?Sized,
2173 {
2174 #[inline]
2175 fn encode(
2176 self,
2177 encoder: &mut ___E,
2178 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2179 _: (),
2180 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2181 ::fidl_next::Encode::encode(&self, encoder, out, ())
2182 }
2183 }
2184
2185 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for &'a UnlinkFlags
2186 where
2187 ___E: ?Sized,
2188 {
2189 #[inline]
2190 fn encode(
2191 self,
2192 _: &mut ___E,
2193 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2194 _: (),
2195 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2196 ::fidl_next::munge!(let crate::wire::UnlinkFlags { value } = out);
2197
2198 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
2199 Ok(())
2200 }
2201 }
2202
2203 impl ::core::convert::From<crate::wire::UnlinkFlags> for UnlinkFlags {
2204 fn from(wire: crate::wire::UnlinkFlags) -> Self {
2205 Self::from_bits_retain(u64::from(wire.value))
2206 }
2207 }
2208
2209 impl ::fidl_next::FromWire<crate::wire::UnlinkFlags> for UnlinkFlags {
2210 #[inline]
2211 fn from_wire(wire: crate::wire::UnlinkFlags) -> Self {
2212 Self::from(wire)
2213 }
2214 }
2215
2216 impl ::fidl_next::FromWireRef<crate::wire::UnlinkFlags> for UnlinkFlags {
2217 #[inline]
2218 fn from_wire_ref(wire: &crate::wire::UnlinkFlags) -> Self {
2219 Self::from(*wire)
2220 }
2221 }
2222
2223 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2224 pub struct UnlinkOptions {
2225 pub flags: ::core::option::Option<crate::natural::UnlinkFlags>,
2226 }
2227
2228 impl UnlinkOptions {
2229 fn __max_ordinal(&self) -> usize {
2230 if self.flags.is_some() {
2231 return 1;
2232 }
2233
2234 0
2235 }
2236 }
2237
2238 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E> for UnlinkOptions
2239 where
2240 ___E: ::fidl_next::Encoder + ?Sized,
2241 {
2242 #[inline]
2243 fn encode(
2244 mut self,
2245 encoder: &mut ___E,
2246 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2247 _: (),
2248 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2249 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2250
2251 let max_ord = self.__max_ordinal();
2252
2253 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2254 ::fidl_next::Wire::zero_padding(&mut out);
2255
2256 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2257 ::fidl_next::wire::Envelope,
2258 >(encoder, max_ord);
2259
2260 for i in 1..=max_ord {
2261 match i {
2262 1 => {
2263 if let Some(value) = self.flags.take() {
2264 ::fidl_next::wire::Envelope::encode_value::<
2265 crate::wire::UnlinkFlags,
2266 ___E,
2267 >(
2268 value, preallocated.encoder, &mut out, ()
2269 )?;
2270 } else {
2271 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2272 }
2273 }
2274
2275 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2276 }
2277 unsafe {
2278 preallocated.write_next(out.assume_init_ref());
2279 }
2280 }
2281
2282 ::fidl_next::wire::Table::encode_len(table, max_ord);
2283
2284 Ok(())
2285 }
2286 }
2287
2288 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>
2289 for &'a UnlinkOptions
2290 where
2291 ___E: ::fidl_next::Encoder + ?Sized,
2292 {
2293 #[inline]
2294 fn encode(
2295 self,
2296 encoder: &mut ___E,
2297 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2298 _: (),
2299 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2300 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2301
2302 let max_ord = self.__max_ordinal();
2303
2304 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2305 ::fidl_next::Wire::zero_padding(&mut out);
2306
2307 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2308 ::fidl_next::wire::Envelope,
2309 >(encoder, max_ord);
2310
2311 for i in 1..=max_ord {
2312 match i {
2313 1 => {
2314 if let Some(value) = &self.flags {
2315 ::fidl_next::wire::Envelope::encode_value::<
2316 crate::wire::UnlinkFlags,
2317 ___E,
2318 >(
2319 value, preallocated.encoder, &mut out, ()
2320 )?;
2321 } else {
2322 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2323 }
2324 }
2325
2326 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2327 }
2328 unsafe {
2329 preallocated.write_next(out.assume_init_ref());
2330 }
2331 }
2332
2333 ::fidl_next::wire::Table::encode_len(table, max_ord);
2334
2335 Ok(())
2336 }
2337 }
2338
2339 impl<'de> ::fidl_next::FromWire<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2340 #[inline]
2341 fn from_wire(wire_: crate::wire::UnlinkOptions<'de>) -> Self {
2342 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2343
2344 let flags = wire_.table.get(1);
2345
2346 Self {
2347 flags: flags.map(|envelope| {
2348 ::fidl_next::FromWire::from_wire(unsafe {
2349 envelope.read_unchecked::<crate::wire::UnlinkFlags>()
2350 })
2351 }),
2352 }
2353 }
2354 }
2355
2356 impl<'de> ::fidl_next::FromWireRef<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2357 #[inline]
2358 fn from_wire_ref(wire: &crate::wire::UnlinkOptions<'de>) -> Self {
2359 Self {
2360 flags: wire.table.get(1).map(|envelope| {
2361 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2362 envelope.deref_unchecked::<crate::wire::UnlinkFlags>()
2363 })
2364 }),
2365 }
2366 }
2367 }
2368
2369 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2370 pub struct DirectoryUnlinkRequest {
2371 pub name: ::std::string::String,
2372
2373 pub options: crate::natural::UnlinkOptions,
2374 }
2375
2376 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2377 for DirectoryUnlinkRequest
2378 where
2379 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2380 ___E: ::fidl_next::Encoder,
2381 {
2382 #[inline]
2383 fn encode(
2384 self,
2385 encoder_: &mut ___E,
2386 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2387 _: (),
2388 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2389 ::fidl_next::munge! {
2390 let crate::wire::DirectoryUnlinkRequest {
2391 name,
2392 options,
2393
2394 } = out_;
2395 }
2396
2397 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
2398
2399 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2400 ::fidl_next::Constrained::validate(_field, 255)?;
2401
2402 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2403
2404 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2405
2406 Ok(())
2407 }
2408 }
2409
2410 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2411 for &'a DirectoryUnlinkRequest
2412 where
2413 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2414 ___E: ::fidl_next::Encoder,
2415 {
2416 #[inline]
2417 fn encode(
2418 self,
2419 encoder_: &mut ___E,
2420 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2421 _: (),
2422 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2423 ::fidl_next::munge! {
2424 let crate::wire::DirectoryUnlinkRequest {
2425 name,
2426 options,
2427
2428 } = out_;
2429 }
2430
2431 ::fidl_next::Encode::encode(&self.name, encoder_, name, 255)?;
2432
2433 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2434 ::fidl_next::Constrained::validate(_field, 255)?;
2435
2436 ::fidl_next::Encode::encode(&self.options, encoder_, options, ())?;
2437
2438 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2439
2440 Ok(())
2441 }
2442 }
2443
2444 unsafe impl<___E>
2445 ::fidl_next::EncodeOption<
2446 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2447 ___E,
2448 > for DirectoryUnlinkRequest
2449 where
2450 ___E: ::fidl_next::Encoder + ?Sized,
2451 DirectoryUnlinkRequest:
2452 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2453 {
2454 #[inline]
2455 fn encode_option(
2456 this: ::core::option::Option<Self>,
2457 encoder: &mut ___E,
2458 out: &mut ::core::mem::MaybeUninit<
2459 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2460 >,
2461 _: (),
2462 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2463 if let Some(inner) = this {
2464 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2465 ::fidl_next::wire::Box::encode_present(out);
2466 } else {
2467 ::fidl_next::wire::Box::encode_absent(out);
2468 }
2469
2470 Ok(())
2471 }
2472 }
2473
2474 unsafe impl<'a, ___E>
2475 ::fidl_next::EncodeOption<
2476 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2477 ___E,
2478 > for &'a DirectoryUnlinkRequest
2479 where
2480 ___E: ::fidl_next::Encoder + ?Sized,
2481 &'a DirectoryUnlinkRequest:
2482 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2483 {
2484 #[inline]
2485 fn encode_option(
2486 this: ::core::option::Option<Self>,
2487 encoder: &mut ___E,
2488 out: &mut ::core::mem::MaybeUninit<
2489 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2490 >,
2491 _: (),
2492 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2493 if let Some(inner) = this {
2494 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2495 ::fidl_next::wire::Box::encode_present(out);
2496 } else {
2497 ::fidl_next::wire::Box::encode_absent(out);
2498 }
2499
2500 Ok(())
2501 }
2502 }
2503
2504 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryUnlinkRequest<'de>>
2505 for DirectoryUnlinkRequest
2506 {
2507 #[inline]
2508 fn from_wire(wire: crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2509 Self {
2510 name: ::fidl_next::FromWire::from_wire(wire.name),
2511
2512 options: ::fidl_next::FromWire::from_wire(wire.options),
2513 }
2514 }
2515 }
2516
2517 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryUnlinkRequest<'de>>
2518 for DirectoryUnlinkRequest
2519 {
2520 #[inline]
2521 fn from_wire_ref(wire: &crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2522 Self {
2523 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
2524
2525 options: ::fidl_next::FromWireRef::from_wire_ref(&wire.options),
2526 }
2527 }
2528 }
2529
2530 pub type DirectoryUnlinkResponse = ();
2531
2532 pub type DirectoryRenameResponse = ();
2533
2534 ::fidl_next::bitflags::bitflags! {
2535 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct WatchMask: u32 {
2536 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.DELETED`.\n"]const DELETED = 1;
2537 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.ADDED`.\n"]const ADDED = 2;
2538 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.REMOVED`.\n"]const REMOVED = 4;
2539 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.EXISTING`.\n"]const EXISTING = 8;
2540 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.IDLE`.\n"]const IDLE = 16;
2541
2542 }
2543 }
2544
2545 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for WatchMask
2546 where
2547 ___E: ?Sized,
2548 {
2549 #[inline]
2550 fn encode(
2551 self,
2552 encoder: &mut ___E,
2553 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
2554 _: (),
2555 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2556 ::fidl_next::Encode::encode(&self, encoder, out, ())
2557 }
2558 }
2559
2560 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for &'a WatchMask
2561 where
2562 ___E: ?Sized,
2563 {
2564 #[inline]
2565 fn encode(
2566 self,
2567 _: &mut ___E,
2568 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
2569 _: (),
2570 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2571 ::fidl_next::munge!(let crate::wire::WatchMask { value } = out);
2572
2573 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
2574 return Err(::fidl_next::EncodeError::InvalidStrictBits);
2575 }
2576
2577 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
2578 Ok(())
2579 }
2580 }
2581
2582 impl ::core::convert::From<crate::wire::WatchMask> for WatchMask {
2583 fn from(wire: crate::wire::WatchMask) -> Self {
2584 Self::from_bits_retain(u32::from(wire.value))
2585 }
2586 }
2587
2588 impl ::fidl_next::FromWire<crate::wire::WatchMask> for WatchMask {
2589 #[inline]
2590 fn from_wire(wire: crate::wire::WatchMask) -> Self {
2591 Self::from(wire)
2592 }
2593 }
2594
2595 impl ::fidl_next::FromWireRef<crate::wire::WatchMask> for WatchMask {
2596 #[inline]
2597 fn from_wire_ref(wire: &crate::wire::WatchMask) -> Self {
2598 Self::from(*wire)
2599 }
2600 }
2601
2602 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2603 #[repr(C)]
2604 pub struct DirectoryWatchResponse {
2605 pub s: ::fidl_next::fuchsia::zx::Status,
2606 }
2607
2608 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
2609 for DirectoryWatchResponse
2610 where
2611 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2612 {
2613 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2614 Self,
2615 crate::wire::DirectoryWatchResponse,
2616 > = unsafe {
2617 ::fidl_next::CopyOptimization::enable_if(
2618 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<
2619 ::fidl_next::wire::fuchsia::Status,
2620 ___E,
2621 >>::COPY_OPTIMIZATION
2622 .is_enabled(),
2623 )
2624 };
2625
2626 #[inline]
2627 fn encode(
2628 self,
2629 encoder_: &mut ___E,
2630 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
2631 _: (),
2632 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2633 ::fidl_next::munge! {
2634 let crate::wire::DirectoryWatchResponse {
2635 s,
2636
2637 } = out_;
2638 }
2639
2640 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2641
2642 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2643
2644 Ok(())
2645 }
2646 }
2647
2648 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
2649 for &'a DirectoryWatchResponse
2650 where
2651 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2652 {
2653 #[inline]
2654 fn encode(
2655 self,
2656 encoder_: &mut ___E,
2657 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
2658 _: (),
2659 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2660 ::fidl_next::munge! {
2661 let crate::wire::DirectoryWatchResponse {
2662 s,
2663
2664 } = out_;
2665 }
2666
2667 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2668
2669 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2670
2671 Ok(())
2672 }
2673 }
2674
2675 unsafe impl<___E>
2676 ::fidl_next::EncodeOption<
2677 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2678 ___E,
2679 > for DirectoryWatchResponse
2680 where
2681 ___E: ::fidl_next::Encoder + ?Sized,
2682 DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
2683 {
2684 #[inline]
2685 fn encode_option(
2686 this: ::core::option::Option<Self>,
2687 encoder: &mut ___E,
2688 out: &mut ::core::mem::MaybeUninit<
2689 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2690 >,
2691 _: (),
2692 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2693 if let Some(inner) = this {
2694 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2695 ::fidl_next::wire::Box::encode_present(out);
2696 } else {
2697 ::fidl_next::wire::Box::encode_absent(out);
2698 }
2699
2700 Ok(())
2701 }
2702 }
2703
2704 unsafe impl<'a, ___E>
2705 ::fidl_next::EncodeOption<
2706 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2707 ___E,
2708 > for &'a DirectoryWatchResponse
2709 where
2710 ___E: ::fidl_next::Encoder + ?Sized,
2711 &'a DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
2712 {
2713 #[inline]
2714 fn encode_option(
2715 this: ::core::option::Option<Self>,
2716 encoder: &mut ___E,
2717 out: &mut ::core::mem::MaybeUninit<
2718 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2719 >,
2720 _: (),
2721 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2722 if let Some(inner) = this {
2723 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2724 ::fidl_next::wire::Box::encode_present(out);
2725 } else {
2726 ::fidl_next::wire::Box::encode_absent(out);
2727 }
2728
2729 Ok(())
2730 }
2731 }
2732
2733 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
2734 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2735 crate::wire::DirectoryWatchResponse,
2736 Self,
2737 > = unsafe {
2738 ::fidl_next::CopyOptimization::enable_if(
2739 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<
2740 ::fidl_next::wire::fuchsia::Status,
2741 >>::COPY_OPTIMIZATION
2742 .is_enabled(),
2743 )
2744 };
2745
2746 #[inline]
2747 fn from_wire(wire: crate::wire::DirectoryWatchResponse) -> Self {
2748 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2749 }
2750 }
2751
2752 impl ::fidl_next::FromWireRef<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
2753 #[inline]
2754 fn from_wire_ref(wire: &crate::wire::DirectoryWatchResponse) -> Self {
2755 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2756 }
2757 }
2758
2759 pub type SymlinkTarget = ::std::vec::Vec<u8>;
2760
2761 #[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"]
2762 pub type ExtendedAttributeName = ::std::vec::Vec<u8>;
2763
2764 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2765 pub struct NodeGetExtendedAttributeRequest {
2766 pub name: ::std::vec::Vec<u8>,
2767 }
2768
2769 unsafe impl<___E>
2770 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
2771 for NodeGetExtendedAttributeRequest
2772 where
2773 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2774 ___E: ::fidl_next::Encoder,
2775 {
2776 #[inline]
2777 fn encode(
2778 self,
2779 encoder_: &mut ___E,
2780 out_: &mut ::core::mem::MaybeUninit<
2781 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2782 >,
2783 _: (),
2784 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2785 ::fidl_next::munge! {
2786 let crate::wire::NodeGetExtendedAttributeRequest {
2787 name,
2788
2789 } = out_;
2790 }
2791
2792 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
2793
2794 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2795 ::fidl_next::Constrained::validate(_field, (255, ()))?;
2796
2797 Ok(())
2798 }
2799 }
2800
2801 unsafe impl<'a, ___E>
2802 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
2803 for &'a NodeGetExtendedAttributeRequest
2804 where
2805 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2806 ___E: ::fidl_next::Encoder,
2807 {
2808 #[inline]
2809 fn encode(
2810 self,
2811 encoder_: &mut ___E,
2812 out_: &mut ::core::mem::MaybeUninit<
2813 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2814 >,
2815 _: (),
2816 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2817 ::fidl_next::munge! {
2818 let crate::wire::NodeGetExtendedAttributeRequest {
2819 name,
2820
2821 } = out_;
2822 }
2823
2824 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
2825
2826 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2827 ::fidl_next::Constrained::validate(_field, (255, ()))?;
2828
2829 Ok(())
2830 }
2831 }
2832
2833 unsafe impl<___E>
2834 ::fidl_next::EncodeOption<
2835 ::fidl_next::wire::Box<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
2836 ___E,
2837 > for NodeGetExtendedAttributeRequest
2838 where
2839 ___E: ::fidl_next::Encoder + ?Sized,
2840 NodeGetExtendedAttributeRequest:
2841 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
2842 {
2843 #[inline]
2844 fn encode_option(
2845 this: ::core::option::Option<Self>,
2846 encoder: &mut ___E,
2847 out: &mut ::core::mem::MaybeUninit<
2848 ::fidl_next::wire::Box<
2849 'static,
2850 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2851 >,
2852 >,
2853 _: (),
2854 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2855 if let Some(inner) = this {
2856 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2857 ::fidl_next::wire::Box::encode_present(out);
2858 } else {
2859 ::fidl_next::wire::Box::encode_absent(out);
2860 }
2861
2862 Ok(())
2863 }
2864 }
2865
2866 unsafe impl<'a, ___E>
2867 ::fidl_next::EncodeOption<
2868 ::fidl_next::wire::Box<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
2869 ___E,
2870 > for &'a NodeGetExtendedAttributeRequest
2871 where
2872 ___E: ::fidl_next::Encoder + ?Sized,
2873 &'a NodeGetExtendedAttributeRequest:
2874 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
2875 {
2876 #[inline]
2877 fn encode_option(
2878 this: ::core::option::Option<Self>,
2879 encoder: &mut ___E,
2880 out: &mut ::core::mem::MaybeUninit<
2881 ::fidl_next::wire::Box<
2882 'static,
2883 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2884 >,
2885 >,
2886 _: (),
2887 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2888 if let Some(inner) = this {
2889 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2890 ::fidl_next::wire::Box::encode_present(out);
2891 } else {
2892 ::fidl_next::wire::Box::encode_absent(out);
2893 }
2894
2895 Ok(())
2896 }
2897 }
2898
2899 impl<'de> ::fidl_next::FromWire<crate::wire::NodeGetExtendedAttributeRequest<'de>>
2900 for NodeGetExtendedAttributeRequest
2901 {
2902 #[inline]
2903 fn from_wire(wire: crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
2904 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
2905 }
2906 }
2907
2908 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeGetExtendedAttributeRequest<'de>>
2909 for NodeGetExtendedAttributeRequest
2910 {
2911 #[inline]
2912 fn from_wire_ref(wire: &crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
2913 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
2914 }
2915 }
2916
2917 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2918 #[repr(u32)]
2919 pub enum SetExtendedAttributeMode {
2920 Set = 1,
2921 Create = 2,
2922 Replace = 3,
2923 }
2924 impl ::core::convert::TryFrom<u32> for SetExtendedAttributeMode {
2925 type Error = ::fidl_next::UnknownStrictEnumMemberError;
2926 fn try_from(
2927 value: u32,
2928 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
2929 match value {
2930 1 => Ok(Self::Set),
2931 2 => Ok(Self::Create),
2932 3 => Ok(Self::Replace),
2933
2934 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
2935 }
2936 }
2937 }
2938
2939 impl ::std::convert::From<SetExtendedAttributeMode> for u32 {
2940 fn from(value: SetExtendedAttributeMode) -> Self {
2941 match value {
2942 SetExtendedAttributeMode::Set => 1,
2943 SetExtendedAttributeMode::Create => 2,
2944 SetExtendedAttributeMode::Replace => 3,
2945 }
2946 }
2947 }
2948
2949 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
2950 for SetExtendedAttributeMode
2951 where
2952 ___E: ?Sized,
2953 {
2954 #[inline]
2955 fn encode(
2956 self,
2957 encoder: &mut ___E,
2958 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
2959 _: (),
2960 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2961 ::fidl_next::Encode::encode(&self, encoder, out, ())
2962 }
2963 }
2964
2965 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
2966 for &'a SetExtendedAttributeMode
2967 where
2968 ___E: ?Sized,
2969 {
2970 #[inline]
2971 fn encode(
2972 self,
2973 encoder: &mut ___E,
2974 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
2975 _: (),
2976 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2977 ::fidl_next::munge!(let crate::wire::SetExtendedAttributeMode { value } = out);
2978 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2979 SetExtendedAttributeMode::Set => 1,
2980
2981 SetExtendedAttributeMode::Create => 2,
2982
2983 SetExtendedAttributeMode::Replace => 3,
2984 }));
2985
2986 Ok(())
2987 }
2988 }
2989
2990 impl ::core::convert::From<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
2991 fn from(wire: crate::wire::SetExtendedAttributeMode) -> Self {
2992 match u32::from(wire.value) {
2993 1 => Self::Set,
2994
2995 2 => Self::Create,
2996
2997 3 => Self::Replace,
2998
2999 _ => unsafe { ::core::hint::unreachable_unchecked() },
3000 }
3001 }
3002 }
3003
3004 impl ::fidl_next::FromWire<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3005 #[inline]
3006 fn from_wire(wire: crate::wire::SetExtendedAttributeMode) -> Self {
3007 Self::from(wire)
3008 }
3009 }
3010
3011 impl ::fidl_next::FromWireRef<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3012 #[inline]
3013 fn from_wire_ref(wire: &crate::wire::SetExtendedAttributeMode) -> Self {
3014 Self::from(*wire)
3015 }
3016 }
3017
3018 pub type NodeSetExtendedAttributeResponse = ();
3019
3020 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3021 pub struct NodeRemoveExtendedAttributeRequest {
3022 pub name: ::std::vec::Vec<u8>,
3023 }
3024
3025 unsafe impl<___E>
3026 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3027 for NodeRemoveExtendedAttributeRequest
3028 where
3029 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3030 ___E: ::fidl_next::Encoder,
3031 {
3032 #[inline]
3033 fn encode(
3034 self,
3035 encoder_: &mut ___E,
3036 out_: &mut ::core::mem::MaybeUninit<
3037 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3038 >,
3039 _: (),
3040 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3041 ::fidl_next::munge! {
3042 let crate::wire::NodeRemoveExtendedAttributeRequest {
3043 name,
3044
3045 } = out_;
3046 }
3047
3048 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
3049
3050 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3051 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3052
3053 Ok(())
3054 }
3055 }
3056
3057 unsafe impl<'a, ___E>
3058 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3059 for &'a NodeRemoveExtendedAttributeRequest
3060 where
3061 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3062 ___E: ::fidl_next::Encoder,
3063 {
3064 #[inline]
3065 fn encode(
3066 self,
3067 encoder_: &mut ___E,
3068 out_: &mut ::core::mem::MaybeUninit<
3069 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3070 >,
3071 _: (),
3072 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3073 ::fidl_next::munge! {
3074 let crate::wire::NodeRemoveExtendedAttributeRequest {
3075 name,
3076
3077 } = out_;
3078 }
3079
3080 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
3081
3082 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3083 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3084
3085 Ok(())
3086 }
3087 }
3088
3089 unsafe impl<___E>
3090 ::fidl_next::EncodeOption<
3091 ::fidl_next::wire::Box<
3092 'static,
3093 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3094 >,
3095 ___E,
3096 > for NodeRemoveExtendedAttributeRequest
3097 where
3098 ___E: ::fidl_next::Encoder + ?Sized,
3099 NodeRemoveExtendedAttributeRequest:
3100 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3101 {
3102 #[inline]
3103 fn encode_option(
3104 this: ::core::option::Option<Self>,
3105 encoder: &mut ___E,
3106 out: &mut ::core::mem::MaybeUninit<
3107 ::fidl_next::wire::Box<
3108 'static,
3109 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3110 >,
3111 >,
3112 _: (),
3113 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3114 if let Some(inner) = this {
3115 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3116 ::fidl_next::wire::Box::encode_present(out);
3117 } else {
3118 ::fidl_next::wire::Box::encode_absent(out);
3119 }
3120
3121 Ok(())
3122 }
3123 }
3124
3125 unsafe impl<'a, ___E>
3126 ::fidl_next::EncodeOption<
3127 ::fidl_next::wire::Box<
3128 'static,
3129 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3130 >,
3131 ___E,
3132 > for &'a NodeRemoveExtendedAttributeRequest
3133 where
3134 ___E: ::fidl_next::Encoder + ?Sized,
3135 &'a NodeRemoveExtendedAttributeRequest:
3136 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3137 {
3138 #[inline]
3139 fn encode_option(
3140 this: ::core::option::Option<Self>,
3141 encoder: &mut ___E,
3142 out: &mut ::core::mem::MaybeUninit<
3143 ::fidl_next::wire::Box<
3144 'static,
3145 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3146 >,
3147 >,
3148 _: (),
3149 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3150 if let Some(inner) = this {
3151 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3152 ::fidl_next::wire::Box::encode_present(out);
3153 } else {
3154 ::fidl_next::wire::Box::encode_absent(out);
3155 }
3156
3157 Ok(())
3158 }
3159 }
3160
3161 impl<'de> ::fidl_next::FromWire<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3162 for NodeRemoveExtendedAttributeRequest
3163 {
3164 #[inline]
3165 fn from_wire(wire: crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3166 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
3167 }
3168 }
3169
3170 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3171 for NodeRemoveExtendedAttributeRequest
3172 {
3173 #[inline]
3174 fn from_wire_ref(wire: &crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3175 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
3176 }
3177 }
3178
3179 pub type NodeRemoveExtendedAttributeResponse = ();
3180
3181 pub type DirectoryCreateSymlinkResponse = ();
3182
3183 pub type NodeSetFlagsResponse = ();
3184
3185 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3186 pub struct NodeDeprecatedGetAttrResponse {
3187 pub s: ::fidl_next::fuchsia::zx::Status,
3188
3189 pub attributes: crate::natural::NodeAttributes,
3190 }
3191
3192 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
3193 for NodeDeprecatedGetAttrResponse
3194 where
3195 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3196 {
3197 #[inline]
3198 fn encode(
3199 self,
3200 encoder_: &mut ___E,
3201 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
3202 _: (),
3203 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3204 ::fidl_next::munge! {
3205 let crate::wire::NodeDeprecatedGetAttrResponse {
3206 s,
3207 attributes,
3208
3209 } = out_;
3210 }
3211
3212 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3213
3214 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3215
3216 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
3217
3218 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3219
3220 Ok(())
3221 }
3222 }
3223
3224 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
3225 for &'a NodeDeprecatedGetAttrResponse
3226 where
3227 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3228 {
3229 #[inline]
3230 fn encode(
3231 self,
3232 encoder_: &mut ___E,
3233 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
3234 _: (),
3235 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3236 ::fidl_next::munge! {
3237 let crate::wire::NodeDeprecatedGetAttrResponse {
3238 s,
3239 attributes,
3240
3241 } = out_;
3242 }
3243
3244 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3245
3246 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3247
3248 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
3249
3250 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3251
3252 Ok(())
3253 }
3254 }
3255
3256 unsafe impl<___E>
3257 ::fidl_next::EncodeOption<
3258 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3259 ___E,
3260 > for NodeDeprecatedGetAttrResponse
3261 where
3262 ___E: ::fidl_next::Encoder + ?Sized,
3263 NodeDeprecatedGetAttrResponse:
3264 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
3265 {
3266 #[inline]
3267 fn encode_option(
3268 this: ::core::option::Option<Self>,
3269 encoder: &mut ___E,
3270 out: &mut ::core::mem::MaybeUninit<
3271 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3272 >,
3273 _: (),
3274 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3275 if let Some(inner) = this {
3276 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3277 ::fidl_next::wire::Box::encode_present(out);
3278 } else {
3279 ::fidl_next::wire::Box::encode_absent(out);
3280 }
3281
3282 Ok(())
3283 }
3284 }
3285
3286 unsafe impl<'a, ___E>
3287 ::fidl_next::EncodeOption<
3288 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3289 ___E,
3290 > for &'a NodeDeprecatedGetAttrResponse
3291 where
3292 ___E: ::fidl_next::Encoder + ?Sized,
3293 &'a NodeDeprecatedGetAttrResponse:
3294 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
3295 {
3296 #[inline]
3297 fn encode_option(
3298 this: ::core::option::Option<Self>,
3299 encoder: &mut ___E,
3300 out: &mut ::core::mem::MaybeUninit<
3301 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3302 >,
3303 _: (),
3304 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3305 if let Some(inner) = this {
3306 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3307 ::fidl_next::wire::Box::encode_present(out);
3308 } else {
3309 ::fidl_next::wire::Box::encode_absent(out);
3310 }
3311
3312 Ok(())
3313 }
3314 }
3315
3316 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetAttrResponse>
3317 for NodeDeprecatedGetAttrResponse
3318 {
3319 #[inline]
3320 fn from_wire(wire: crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
3321 Self {
3322 s: ::fidl_next::FromWire::from_wire(wire.s),
3323
3324 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
3325 }
3326 }
3327 }
3328
3329 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetAttrResponse>
3330 for NodeDeprecatedGetAttrResponse
3331 {
3332 #[inline]
3333 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
3334 Self {
3335 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
3336
3337 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
3338 }
3339 }
3340 }
3341
3342 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3343 pub struct NodeDeprecatedSetAttrRequest {
3344 pub flags: crate::natural::NodeAttributeFlags,
3345
3346 pub attributes: crate::natural::NodeAttributes,
3347 }
3348
3349 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
3350 for NodeDeprecatedSetAttrRequest
3351 where
3352 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3353 {
3354 #[inline]
3355 fn encode(
3356 self,
3357 encoder_: &mut ___E,
3358 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
3359 _: (),
3360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3361 ::fidl_next::munge! {
3362 let crate::wire::NodeDeprecatedSetAttrRequest {
3363 flags,
3364 attributes,
3365
3366 } = out_;
3367 }
3368
3369 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3370
3371 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3372
3373 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
3374
3375 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3376
3377 Ok(())
3378 }
3379 }
3380
3381 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
3382 for &'a NodeDeprecatedSetAttrRequest
3383 where
3384 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3385 {
3386 #[inline]
3387 fn encode(
3388 self,
3389 encoder_: &mut ___E,
3390 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
3391 _: (),
3392 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3393 ::fidl_next::munge! {
3394 let crate::wire::NodeDeprecatedSetAttrRequest {
3395 flags,
3396 attributes,
3397
3398 } = out_;
3399 }
3400
3401 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3402
3403 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3404
3405 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
3406
3407 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3408
3409 Ok(())
3410 }
3411 }
3412
3413 unsafe impl<___E>
3414 ::fidl_next::EncodeOption<
3415 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3416 ___E,
3417 > for NodeDeprecatedSetAttrRequest
3418 where
3419 ___E: ::fidl_next::Encoder + ?Sized,
3420 NodeDeprecatedSetAttrRequest:
3421 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
3422 {
3423 #[inline]
3424 fn encode_option(
3425 this: ::core::option::Option<Self>,
3426 encoder: &mut ___E,
3427 out: &mut ::core::mem::MaybeUninit<
3428 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3429 >,
3430 _: (),
3431 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3432 if let Some(inner) = this {
3433 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3434 ::fidl_next::wire::Box::encode_present(out);
3435 } else {
3436 ::fidl_next::wire::Box::encode_absent(out);
3437 }
3438
3439 Ok(())
3440 }
3441 }
3442
3443 unsafe impl<'a, ___E>
3444 ::fidl_next::EncodeOption<
3445 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3446 ___E,
3447 > for &'a NodeDeprecatedSetAttrRequest
3448 where
3449 ___E: ::fidl_next::Encoder + ?Sized,
3450 &'a NodeDeprecatedSetAttrRequest:
3451 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
3452 {
3453 #[inline]
3454 fn encode_option(
3455 this: ::core::option::Option<Self>,
3456 encoder: &mut ___E,
3457 out: &mut ::core::mem::MaybeUninit<
3458 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3459 >,
3460 _: (),
3461 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3462 if let Some(inner) = this {
3463 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3464 ::fidl_next::wire::Box::encode_present(out);
3465 } else {
3466 ::fidl_next::wire::Box::encode_absent(out);
3467 }
3468
3469 Ok(())
3470 }
3471 }
3472
3473 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrRequest>
3474 for NodeDeprecatedSetAttrRequest
3475 {
3476 #[inline]
3477 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
3478 Self {
3479 flags: ::fidl_next::FromWire::from_wire(wire.flags),
3480
3481 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
3482 }
3483 }
3484 }
3485
3486 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrRequest>
3487 for NodeDeprecatedSetAttrRequest
3488 {
3489 #[inline]
3490 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
3491 Self {
3492 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
3493
3494 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
3495 }
3496 }
3497 }
3498
3499 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3500 #[repr(C)]
3501 pub struct NodeDeprecatedSetAttrResponse {
3502 pub s: ::fidl_next::fuchsia::zx::Status,
3503 }
3504
3505 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
3506 for NodeDeprecatedSetAttrResponse
3507 where
3508 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3509 {
3510 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3511 Self,
3512 crate::wire::NodeDeprecatedSetAttrResponse,
3513 > = unsafe {
3514 ::fidl_next::CopyOptimization::enable_if(
3515 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<
3516 ::fidl_next::wire::fuchsia::Status,
3517 ___E,
3518 >>::COPY_OPTIMIZATION
3519 .is_enabled(),
3520 )
3521 };
3522
3523 #[inline]
3524 fn encode(
3525 self,
3526 encoder_: &mut ___E,
3527 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
3528 _: (),
3529 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3530 ::fidl_next::munge! {
3531 let crate::wire::NodeDeprecatedSetAttrResponse {
3532 s,
3533
3534 } = out_;
3535 }
3536
3537 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3538
3539 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3540
3541 Ok(())
3542 }
3543 }
3544
3545 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
3546 for &'a NodeDeprecatedSetAttrResponse
3547 where
3548 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3549 {
3550 #[inline]
3551 fn encode(
3552 self,
3553 encoder_: &mut ___E,
3554 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
3555 _: (),
3556 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3557 ::fidl_next::munge! {
3558 let crate::wire::NodeDeprecatedSetAttrResponse {
3559 s,
3560
3561 } = out_;
3562 }
3563
3564 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3565
3566 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3567
3568 Ok(())
3569 }
3570 }
3571
3572 unsafe impl<___E>
3573 ::fidl_next::EncodeOption<
3574 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3575 ___E,
3576 > for NodeDeprecatedSetAttrResponse
3577 where
3578 ___E: ::fidl_next::Encoder + ?Sized,
3579 NodeDeprecatedSetAttrResponse:
3580 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
3581 {
3582 #[inline]
3583 fn encode_option(
3584 this: ::core::option::Option<Self>,
3585 encoder: &mut ___E,
3586 out: &mut ::core::mem::MaybeUninit<
3587 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3588 >,
3589 _: (),
3590 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3591 if let Some(inner) = this {
3592 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3593 ::fidl_next::wire::Box::encode_present(out);
3594 } else {
3595 ::fidl_next::wire::Box::encode_absent(out);
3596 }
3597
3598 Ok(())
3599 }
3600 }
3601
3602 unsafe impl<'a, ___E>
3603 ::fidl_next::EncodeOption<
3604 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3605 ___E,
3606 > for &'a NodeDeprecatedSetAttrResponse
3607 where
3608 ___E: ::fidl_next::Encoder + ?Sized,
3609 &'a NodeDeprecatedSetAttrResponse:
3610 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
3611 {
3612 #[inline]
3613 fn encode_option(
3614 this: ::core::option::Option<Self>,
3615 encoder: &mut ___E,
3616 out: &mut ::core::mem::MaybeUninit<
3617 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3618 >,
3619 _: (),
3620 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3621 if let Some(inner) = this {
3622 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3623 ::fidl_next::wire::Box::encode_present(out);
3624 } else {
3625 ::fidl_next::wire::Box::encode_absent(out);
3626 }
3627
3628 Ok(())
3629 }
3630 }
3631
3632 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrResponse>
3633 for NodeDeprecatedSetAttrResponse
3634 {
3635 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3636 crate::wire::NodeDeprecatedSetAttrResponse,
3637 Self,
3638 > = unsafe {
3639 ::fidl_next::CopyOptimization::enable_if(
3640 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<
3641 ::fidl_next::wire::fuchsia::Status,
3642 >>::COPY_OPTIMIZATION
3643 .is_enabled(),
3644 )
3645 };
3646
3647 #[inline]
3648 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
3649 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
3650 }
3651 }
3652
3653 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrResponse>
3654 for NodeDeprecatedSetAttrResponse
3655 {
3656 #[inline]
3657 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
3658 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
3659 }
3660 }
3661
3662 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3663 #[repr(C)]
3664 pub struct NodeDeprecatedGetFlagsResponse {
3665 pub s: ::fidl_next::fuchsia::zx::Status,
3666
3667 pub flags: crate::natural::OpenFlags,
3668 }
3669
3670 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
3671 for NodeDeprecatedGetFlagsResponse
3672 where
3673 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3674 {
3675 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3676 Self,
3677 crate::wire::NodeDeprecatedGetFlagsResponse,
3678 > = unsafe {
3679 ::fidl_next::CopyOptimization::enable_if(
3680 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<
3681 ::fidl_next::wire::fuchsia::Status,
3682 ___E,
3683 >>::COPY_OPTIMIZATION
3684 .is_enabled()
3685 && <crate::natural::OpenFlags as ::fidl_next::Encode<
3686 crate::wire::OpenFlags,
3687 ___E,
3688 >>::COPY_OPTIMIZATION
3689 .is_enabled(),
3690 )
3691 };
3692
3693 #[inline]
3694 fn encode(
3695 self,
3696 encoder_: &mut ___E,
3697 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
3698 _: (),
3699 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3700 ::fidl_next::munge! {
3701 let crate::wire::NodeDeprecatedGetFlagsResponse {
3702 s,
3703 flags,
3704
3705 } = out_;
3706 }
3707
3708 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3709
3710 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3711
3712 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3713
3714 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3715
3716 Ok(())
3717 }
3718 }
3719
3720 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
3721 for &'a NodeDeprecatedGetFlagsResponse
3722 where
3723 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3724 {
3725 #[inline]
3726 fn encode(
3727 self,
3728 encoder_: &mut ___E,
3729 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
3730 _: (),
3731 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3732 ::fidl_next::munge! {
3733 let crate::wire::NodeDeprecatedGetFlagsResponse {
3734 s,
3735 flags,
3736
3737 } = out_;
3738 }
3739
3740 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3741
3742 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3743
3744 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3745
3746 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3747
3748 Ok(())
3749 }
3750 }
3751
3752 unsafe impl<___E>
3753 ::fidl_next::EncodeOption<
3754 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3755 ___E,
3756 > for NodeDeprecatedGetFlagsResponse
3757 where
3758 ___E: ::fidl_next::Encoder + ?Sized,
3759 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 unsafe impl<'a, ___E>
3783 ::fidl_next::EncodeOption<
3784 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3785 ___E,
3786 > for &'a NodeDeprecatedGetFlagsResponse
3787 where
3788 ___E: ::fidl_next::Encoder + ?Sized,
3789 &'a NodeDeprecatedGetFlagsResponse:
3790 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
3791 {
3792 #[inline]
3793 fn encode_option(
3794 this: ::core::option::Option<Self>,
3795 encoder: &mut ___E,
3796 out: &mut ::core::mem::MaybeUninit<
3797 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3798 >,
3799 _: (),
3800 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3801 if let Some(inner) = this {
3802 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3803 ::fidl_next::wire::Box::encode_present(out);
3804 } else {
3805 ::fidl_next::wire::Box::encode_absent(out);
3806 }
3807
3808 Ok(())
3809 }
3810 }
3811
3812 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetFlagsResponse>
3813 for NodeDeprecatedGetFlagsResponse
3814 {
3815 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3816 crate::wire::NodeDeprecatedGetFlagsResponse,
3817 Self,
3818 > = unsafe {
3819 ::fidl_next::CopyOptimization::enable_if(
3820 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<
3821 ::fidl_next::wire::fuchsia::Status,
3822 >>::COPY_OPTIMIZATION
3823 .is_enabled()
3824 && <crate::natural::OpenFlags as ::fidl_next::FromWire<
3825 crate::wire::OpenFlags,
3826 >>::COPY_OPTIMIZATION
3827 .is_enabled(),
3828 )
3829 };
3830
3831 #[inline]
3832 fn from_wire(wire: crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
3833 Self {
3834 s: ::fidl_next::FromWire::from_wire(wire.s),
3835
3836 flags: ::fidl_next::FromWire::from_wire(wire.flags),
3837 }
3838 }
3839 }
3840
3841 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetFlagsResponse>
3842 for NodeDeprecatedGetFlagsResponse
3843 {
3844 #[inline]
3845 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
3846 Self {
3847 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
3848
3849 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
3850 }
3851 }
3852 }
3853
3854 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3855 #[repr(C)]
3856 pub struct NodeDeprecatedSetFlagsRequest {
3857 pub flags: crate::natural::OpenFlags,
3858 }
3859
3860 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
3861 for NodeDeprecatedSetFlagsRequest
3862 where
3863 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3864 {
3865 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3866 Self,
3867 crate::wire::NodeDeprecatedSetFlagsRequest,
3868 > = unsafe {
3869 ::fidl_next::CopyOptimization::enable_if(
3870 true && <crate::natural::OpenFlags as ::fidl_next::Encode<
3871 crate::wire::OpenFlags,
3872 ___E,
3873 >>::COPY_OPTIMIZATION
3874 .is_enabled(),
3875 )
3876 };
3877
3878 #[inline]
3879 fn encode(
3880 self,
3881 encoder_: &mut ___E,
3882 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
3883 _: (),
3884 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3885 ::fidl_next::munge! {
3886 let crate::wire::NodeDeprecatedSetFlagsRequest {
3887 flags,
3888
3889 } = out_;
3890 }
3891
3892 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3893
3894 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3895
3896 Ok(())
3897 }
3898 }
3899
3900 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
3901 for &'a NodeDeprecatedSetFlagsRequest
3902 where
3903 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3904 {
3905 #[inline]
3906 fn encode(
3907 self,
3908 encoder_: &mut ___E,
3909 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
3910 _: (),
3911 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3912 ::fidl_next::munge! {
3913 let crate::wire::NodeDeprecatedSetFlagsRequest {
3914 flags,
3915
3916 } = out_;
3917 }
3918
3919 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3920
3921 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3922
3923 Ok(())
3924 }
3925 }
3926
3927 unsafe impl<___E>
3928 ::fidl_next::EncodeOption<
3929 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3930 ___E,
3931 > for NodeDeprecatedSetFlagsRequest
3932 where
3933 ___E: ::fidl_next::Encoder + ?Sized,
3934 NodeDeprecatedSetFlagsRequest:
3935 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
3936 {
3937 #[inline]
3938 fn encode_option(
3939 this: ::core::option::Option<Self>,
3940 encoder: &mut ___E,
3941 out: &mut ::core::mem::MaybeUninit<
3942 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3943 >,
3944 _: (),
3945 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3946 if let Some(inner) = this {
3947 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3948 ::fidl_next::wire::Box::encode_present(out);
3949 } else {
3950 ::fidl_next::wire::Box::encode_absent(out);
3951 }
3952
3953 Ok(())
3954 }
3955 }
3956
3957 unsafe impl<'a, ___E>
3958 ::fidl_next::EncodeOption<
3959 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3960 ___E,
3961 > for &'a NodeDeprecatedSetFlagsRequest
3962 where
3963 ___E: ::fidl_next::Encoder + ?Sized,
3964 &'a NodeDeprecatedSetFlagsRequest:
3965 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
3966 {
3967 #[inline]
3968 fn encode_option(
3969 this: ::core::option::Option<Self>,
3970 encoder: &mut ___E,
3971 out: &mut ::core::mem::MaybeUninit<
3972 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3973 >,
3974 _: (),
3975 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3976 if let Some(inner) = this {
3977 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3978 ::fidl_next::wire::Box::encode_present(out);
3979 } else {
3980 ::fidl_next::wire::Box::encode_absent(out);
3981 }
3982
3983 Ok(())
3984 }
3985 }
3986
3987 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsRequest>
3988 for NodeDeprecatedSetFlagsRequest
3989 {
3990 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3991 crate::wire::NodeDeprecatedSetFlagsRequest,
3992 Self,
3993 > = unsafe {
3994 ::fidl_next::CopyOptimization::enable_if(
3995 true && <crate::natural::OpenFlags as ::fidl_next::FromWire<
3996 crate::wire::OpenFlags,
3997 >>::COPY_OPTIMIZATION
3998 .is_enabled(),
3999 )
4000 };
4001
4002 #[inline]
4003 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
4004 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
4005 }
4006 }
4007
4008 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsRequest>
4009 for NodeDeprecatedSetFlagsRequest
4010 {
4011 #[inline]
4012 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
4013 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
4014 }
4015 }
4016
4017 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4018 #[repr(C)]
4019 pub struct NodeDeprecatedSetFlagsResponse {
4020 pub s: ::fidl_next::fuchsia::zx::Status,
4021 }
4022
4023 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
4024 for NodeDeprecatedSetFlagsResponse
4025 where
4026 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4027 {
4028 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4029 Self,
4030 crate::wire::NodeDeprecatedSetFlagsResponse,
4031 > = unsafe {
4032 ::fidl_next::CopyOptimization::enable_if(
4033 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<
4034 ::fidl_next::wire::fuchsia::Status,
4035 ___E,
4036 >>::COPY_OPTIMIZATION
4037 .is_enabled(),
4038 )
4039 };
4040
4041 #[inline]
4042 fn encode(
4043 self,
4044 encoder_: &mut ___E,
4045 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
4046 _: (),
4047 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4048 ::fidl_next::munge! {
4049 let crate::wire::NodeDeprecatedSetFlagsResponse {
4050 s,
4051
4052 } = out_;
4053 }
4054
4055 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4056
4057 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4058
4059 Ok(())
4060 }
4061 }
4062
4063 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
4064 for &'a NodeDeprecatedSetFlagsResponse
4065 where
4066 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4067 {
4068 #[inline]
4069 fn encode(
4070 self,
4071 encoder_: &mut ___E,
4072 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
4073 _: (),
4074 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4075 ::fidl_next::munge! {
4076 let crate::wire::NodeDeprecatedSetFlagsResponse {
4077 s,
4078
4079 } = out_;
4080 }
4081
4082 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4083
4084 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4085
4086 Ok(())
4087 }
4088 }
4089
4090 unsafe impl<___E>
4091 ::fidl_next::EncodeOption<
4092 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4093 ___E,
4094 > for NodeDeprecatedSetFlagsResponse
4095 where
4096 ___E: ::fidl_next::Encoder + ?Sized,
4097 NodeDeprecatedSetFlagsResponse:
4098 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
4099 {
4100 #[inline]
4101 fn encode_option(
4102 this: ::core::option::Option<Self>,
4103 encoder: &mut ___E,
4104 out: &mut ::core::mem::MaybeUninit<
4105 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4106 >,
4107 _: (),
4108 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4109 if let Some(inner) = this {
4110 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4111 ::fidl_next::wire::Box::encode_present(out);
4112 } else {
4113 ::fidl_next::wire::Box::encode_absent(out);
4114 }
4115
4116 Ok(())
4117 }
4118 }
4119
4120 unsafe impl<'a, ___E>
4121 ::fidl_next::EncodeOption<
4122 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4123 ___E,
4124 > for &'a NodeDeprecatedSetFlagsResponse
4125 where
4126 ___E: ::fidl_next::Encoder + ?Sized,
4127 &'a NodeDeprecatedSetFlagsResponse:
4128 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
4129 {
4130 #[inline]
4131 fn encode_option(
4132 this: ::core::option::Option<Self>,
4133 encoder: &mut ___E,
4134 out: &mut ::core::mem::MaybeUninit<
4135 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4136 >,
4137 _: (),
4138 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4139 if let Some(inner) = this {
4140 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4141 ::fidl_next::wire::Box::encode_present(out);
4142 } else {
4143 ::fidl_next::wire::Box::encode_absent(out);
4144 }
4145
4146 Ok(())
4147 }
4148 }
4149
4150 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsResponse>
4151 for NodeDeprecatedSetFlagsResponse
4152 {
4153 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4154 crate::wire::NodeDeprecatedSetFlagsResponse,
4155 Self,
4156 > = unsafe {
4157 ::fidl_next::CopyOptimization::enable_if(
4158 true && <::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<
4159 ::fidl_next::wire::fuchsia::Status,
4160 >>::COPY_OPTIMIZATION
4161 .is_enabled(),
4162 )
4163 };
4164
4165 #[inline]
4166 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
4167 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
4168 }
4169 }
4170
4171 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsResponse>
4172 for NodeDeprecatedSetFlagsResponse
4173 {
4174 #[inline]
4175 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
4176 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
4177 }
4178 }
4179
4180 ::fidl_next::bitflags::bitflags! {
4181 #[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 {
4182 #[doc = " Allows opening child nodes with [`PROTOCOL_SERVICE`].\n"]const PERM_CONNECT = 1;
4183 #[doc = " Read byte contents of a file.\n"]const PERM_READ_BYTES = 2;
4184 #[doc = " Write byte contents to a file.\n"]const PERM_WRITE_BYTES = 4;
4185 #[doc = " Execute byte contents of a file.\n"]const PERM_EXECUTE = 8;
4186 #[doc = " Get/query attributes of a node.\n"]const PERM_GET_ATTRIBUTES = 16;
4187 #[doc = " Set/update attributes of a node.\n"]const PERM_UPDATE_ATTRIBUTES = 32;
4188 #[doc = " Enumerate (list) directory entries.\n"]const PERM_ENUMERATE = 64;
4189 #[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;
4190 #[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;
4191 #[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;
4192 #[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;
4193 #[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;
4194 #[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;
4195 #[doc = " Caller accepts [`fuchsia.io/Directory`] protocol. Equivalent to POSIX `O_DIRECTORY`.\n"]const PROTOCOL_DIRECTORY = 524288;
4196 #[doc = " Caller accepts [`fuchsia.io/File`] protocol.\n"]const PROTOCOL_FILE = 8589934592;
4197 #[doc = " Caller accepts [`fuchsia.io/Symlink`] protocol.\n"]const PROTOCOL_SYMLINK = 17179869184;
4198 #[doc = " Caller requests a [`fuchsia.io/Node.OnRepresentation`] event on success.\n"]const FLAG_SEND_REPRESENTATION = 1099511627776;
4199 #[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;
4200 #[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;
4201 #[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;
4202 #[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;
4203 #[doc = " Truncate the file to zero length upon opening it. Equivalent to POSIX `O_TRUNC`.\n"]const FILE_TRUNCATE = 262144;
4204 const _ = !0;
4205 }
4206 }
4207
4208 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for Flags
4209 where
4210 ___E: ?Sized,
4211 {
4212 #[inline]
4213 fn encode(
4214 self,
4215 encoder: &mut ___E,
4216 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
4217 _: (),
4218 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4219 ::fidl_next::Encode::encode(&self, encoder, out, ())
4220 }
4221 }
4222
4223 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for &'a Flags
4224 where
4225 ___E: ?Sized,
4226 {
4227 #[inline]
4228 fn encode(
4229 self,
4230 _: &mut ___E,
4231 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
4232 _: (),
4233 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4234 ::fidl_next::munge!(let crate::wire::Flags { value } = out);
4235
4236 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
4237 Ok(())
4238 }
4239 }
4240
4241 impl ::core::convert::From<crate::wire::Flags> for Flags {
4242 fn from(wire: crate::wire::Flags) -> Self {
4243 Self::from_bits_retain(u64::from(wire.value))
4244 }
4245 }
4246
4247 impl ::fidl_next::FromWire<crate::wire::Flags> for Flags {
4248 #[inline]
4249 fn from_wire(wire: crate::wire::Flags) -> Self {
4250 Self::from(wire)
4251 }
4252 }
4253
4254 impl ::fidl_next::FromWireRef<crate::wire::Flags> for Flags {
4255 #[inline]
4256 fn from_wire_ref(wire: &crate::wire::Flags) -> Self {
4257 Self::from(*wire)
4258 }
4259 }
4260
4261 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4262 #[repr(C)]
4263 pub struct NodeGetFlagsResponse {
4264 pub flags: crate::natural::Flags,
4265 }
4266
4267 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
4268 for NodeGetFlagsResponse
4269 where
4270 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4271 {
4272 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4273 Self,
4274 crate::wire::NodeGetFlagsResponse,
4275 > = unsafe {
4276 ::fidl_next::CopyOptimization::enable_if(
4277 true
4278
4279 && <
4280 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
4281 >::COPY_OPTIMIZATION.is_enabled()
4282
4283 )
4284 };
4285
4286 #[inline]
4287 fn encode(
4288 self,
4289 encoder_: &mut ___E,
4290 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
4291 _: (),
4292 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4293 ::fidl_next::munge! {
4294 let crate::wire::NodeGetFlagsResponse {
4295 flags,
4296
4297 } = out_;
4298 }
4299
4300 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4301
4302 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4303
4304 Ok(())
4305 }
4306 }
4307
4308 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
4309 for &'a NodeGetFlagsResponse
4310 where
4311 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4312 {
4313 #[inline]
4314 fn encode(
4315 self,
4316 encoder_: &mut ___E,
4317 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
4318 _: (),
4319 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4320 ::fidl_next::munge! {
4321 let crate::wire::NodeGetFlagsResponse {
4322 flags,
4323
4324 } = out_;
4325 }
4326
4327 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4328
4329 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4330
4331 Ok(())
4332 }
4333 }
4334
4335 unsafe impl<___E>
4336 ::fidl_next::EncodeOption<
4337 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4338 ___E,
4339 > for NodeGetFlagsResponse
4340 where
4341 ___E: ::fidl_next::Encoder + ?Sized,
4342 NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
4343 {
4344 #[inline]
4345 fn encode_option(
4346 this: ::core::option::Option<Self>,
4347 encoder: &mut ___E,
4348 out: &mut ::core::mem::MaybeUninit<
4349 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4350 >,
4351 _: (),
4352 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4353 if let Some(inner) = this {
4354 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4355 ::fidl_next::wire::Box::encode_present(out);
4356 } else {
4357 ::fidl_next::wire::Box::encode_absent(out);
4358 }
4359
4360 Ok(())
4361 }
4362 }
4363
4364 unsafe impl<'a, ___E>
4365 ::fidl_next::EncodeOption<
4366 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4367 ___E,
4368 > for &'a NodeGetFlagsResponse
4369 where
4370 ___E: ::fidl_next::Encoder + ?Sized,
4371 &'a NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
4372 {
4373 #[inline]
4374 fn encode_option(
4375 this: ::core::option::Option<Self>,
4376 encoder: &mut ___E,
4377 out: &mut ::core::mem::MaybeUninit<
4378 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4379 >,
4380 _: (),
4381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4382 if let Some(inner) = this {
4383 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4384 ::fidl_next::wire::Box::encode_present(out);
4385 } else {
4386 ::fidl_next::wire::Box::encode_absent(out);
4387 }
4388
4389 Ok(())
4390 }
4391 }
4392
4393 impl ::fidl_next::FromWire<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
4394 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4395 crate::wire::NodeGetFlagsResponse,
4396 Self,
4397 > = unsafe {
4398 ::fidl_next::CopyOptimization::enable_if(
4399 true
4400
4401 && <
4402 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
4403 >::COPY_OPTIMIZATION.is_enabled()
4404
4405 )
4406 };
4407
4408 #[inline]
4409 fn from_wire(wire: crate::wire::NodeGetFlagsResponse) -> Self {
4410 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
4411 }
4412 }
4413
4414 impl ::fidl_next::FromWireRef<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
4415 #[inline]
4416 fn from_wire_ref(wire: &crate::wire::NodeGetFlagsResponse) -> Self {
4417 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
4418 }
4419 }
4420
4421 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4422 #[repr(C)]
4423 pub struct NodeSetFlagsRequest {
4424 pub flags: crate::natural::Flags,
4425 }
4426
4427 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
4428 for NodeSetFlagsRequest
4429 where
4430 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4431 {
4432 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4433 Self,
4434 crate::wire::NodeSetFlagsRequest,
4435 > = unsafe {
4436 ::fidl_next::CopyOptimization::enable_if(
4437 true
4438
4439 && <
4440 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
4441 >::COPY_OPTIMIZATION.is_enabled()
4442
4443 )
4444 };
4445
4446 #[inline]
4447 fn encode(
4448 self,
4449 encoder_: &mut ___E,
4450 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
4451 _: (),
4452 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4453 ::fidl_next::munge! {
4454 let crate::wire::NodeSetFlagsRequest {
4455 flags,
4456
4457 } = out_;
4458 }
4459
4460 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4461
4462 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4463
4464 Ok(())
4465 }
4466 }
4467
4468 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
4469 for &'a NodeSetFlagsRequest
4470 where
4471 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4472 {
4473 #[inline]
4474 fn encode(
4475 self,
4476 encoder_: &mut ___E,
4477 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
4478 _: (),
4479 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4480 ::fidl_next::munge! {
4481 let crate::wire::NodeSetFlagsRequest {
4482 flags,
4483
4484 } = out_;
4485 }
4486
4487 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4488
4489 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4490
4491 Ok(())
4492 }
4493 }
4494
4495 unsafe impl<___E>
4496 ::fidl_next::EncodeOption<
4497 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4498 ___E,
4499 > for NodeSetFlagsRequest
4500 where
4501 ___E: ::fidl_next::Encoder + ?Sized,
4502 NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
4503 {
4504 #[inline]
4505 fn encode_option(
4506 this: ::core::option::Option<Self>,
4507 encoder: &mut ___E,
4508 out: &mut ::core::mem::MaybeUninit<
4509 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4510 >,
4511 _: (),
4512 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4513 if let Some(inner) = this {
4514 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4515 ::fidl_next::wire::Box::encode_present(out);
4516 } else {
4517 ::fidl_next::wire::Box::encode_absent(out);
4518 }
4519
4520 Ok(())
4521 }
4522 }
4523
4524 unsafe impl<'a, ___E>
4525 ::fidl_next::EncodeOption<
4526 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4527 ___E,
4528 > for &'a NodeSetFlagsRequest
4529 where
4530 ___E: ::fidl_next::Encoder + ?Sized,
4531 &'a NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
4532 {
4533 #[inline]
4534 fn encode_option(
4535 this: ::core::option::Option<Self>,
4536 encoder: &mut ___E,
4537 out: &mut ::core::mem::MaybeUninit<
4538 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4539 >,
4540 _: (),
4541 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4542 if let Some(inner) = this {
4543 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4544 ::fidl_next::wire::Box::encode_present(out);
4545 } else {
4546 ::fidl_next::wire::Box::encode_absent(out);
4547 }
4548
4549 Ok(())
4550 }
4551 }
4552
4553 impl ::fidl_next::FromWire<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
4554 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4555 crate::wire::NodeSetFlagsRequest,
4556 Self,
4557 > = unsafe {
4558 ::fidl_next::CopyOptimization::enable_if(
4559 true
4560
4561 && <
4562 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
4563 >::COPY_OPTIMIZATION.is_enabled()
4564
4565 )
4566 };
4567
4568 #[inline]
4569 fn from_wire(wire: crate::wire::NodeSetFlagsRequest) -> Self {
4570 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
4571 }
4572 }
4573
4574 impl ::fidl_next::FromWireRef<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
4575 #[inline]
4576 fn from_wire_ref(wire: &crate::wire::NodeSetFlagsRequest) -> Self {
4577 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
4578 }
4579 }
4580
4581 #[doc = " Used in places where empty structs are needed, such as empty union members, to avoid creating\n new struct types.\n"]
4582 pub type EmptyStruct = ();
4583
4584 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4585 pub enum SelinuxContext {
4586 Data(::std::vec::Vec<u8>),
4587
4588 UseExtendedAttributes(crate::natural::EmptyStruct),
4589
4590 UnknownOrdinal_(u64),
4591 }
4592
4593 impl SelinuxContext {
4594 pub fn is_unknown(&self) -> bool {
4595 #[allow(unreachable_patterns)]
4596 match self {
4597 Self::UnknownOrdinal_(_) => true,
4598 _ => false,
4599 }
4600 }
4601 }
4602
4603 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E> for SelinuxContext
4604 where
4605 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4606 ___E: ::fidl_next::Encoder,
4607 {
4608 #[inline]
4609 fn encode(
4610 self,
4611 encoder: &mut ___E,
4612 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
4613 _: (),
4614 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4615 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
4616
4617 match self {
4618 Self::Data(value) => ::fidl_next::wire::Union::encode_as::<
4619 ___E,
4620 ::fidl_next::wire::Vector<'static, u8>,
4621 >(value, 1, encoder, raw, (256, ()))?,
4622
4623 Self::UseExtendedAttributes(value) => ::fidl_next::wire::Union::encode_as::<
4624 ___E,
4625 crate::wire::EmptyStruct,
4626 >(value, 2, encoder, raw, ())?,
4627
4628 Self::UnknownOrdinal_(ordinal) => {
4629 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
4630 }
4631 }
4632
4633 Ok(())
4634 }
4635 }
4636
4637 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>
4638 for &'a SelinuxContext
4639 where
4640 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4641 ___E: ::fidl_next::Encoder,
4642 {
4643 #[inline]
4644 fn encode(
4645 self,
4646 encoder: &mut ___E,
4647 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
4648 _: (),
4649 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4650 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
4651
4652 match self {
4653 SelinuxContext::Data(value) => ::fidl_next::wire::Union::encode_as::<
4654 ___E,
4655 ::fidl_next::wire::Vector<'static, u8>,
4656 >(value, 1, encoder, raw, (256, ()))?,
4657
4658 SelinuxContext::UseExtendedAttributes(value) => {
4659 ::fidl_next::wire::Union::encode_as::<___E, crate::wire::EmptyStruct>(
4660 value,
4661 2,
4662 encoder,
4663 raw,
4664 (),
4665 )?
4666 }
4667
4668 SelinuxContext::UnknownOrdinal_(ordinal) => {
4669 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
4670 }
4671 }
4672
4673 Ok(())
4674 }
4675 }
4676
4677 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
4678 for SelinuxContext
4679 where
4680 ___E: ?Sized,
4681 SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
4682 {
4683 #[inline]
4684 fn encode_option(
4685 this: ::core::option::Option<Self>,
4686 encoder: &mut ___E,
4687 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
4688 _: (),
4689 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4690 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
4691
4692 if let Some(inner) = this {
4693 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4694 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4695 } else {
4696 ::fidl_next::wire::Union::encode_absent(raw);
4697 }
4698
4699 Ok(())
4700 }
4701 }
4702
4703 unsafe impl<'a, ___E>
4704 ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
4705 for &'a SelinuxContext
4706 where
4707 ___E: ?Sized,
4708 &'a SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
4709 {
4710 #[inline]
4711 fn encode_option(
4712 this: ::core::option::Option<Self>,
4713 encoder: &mut ___E,
4714 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
4715 _: (),
4716 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4717 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
4718
4719 if let Some(inner) = this {
4720 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4721 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4722 } else {
4723 ::fidl_next::wire::Union::encode_absent(raw);
4724 }
4725
4726 Ok(())
4727 }
4728 }
4729
4730 impl<'de> ::fidl_next::FromWire<crate::wire::SelinuxContext<'de>> for SelinuxContext {
4731 #[inline]
4732 fn from_wire(wire: crate::wire::SelinuxContext<'de>) -> Self {
4733 let wire = ::core::mem::ManuallyDrop::new(wire);
4734 match wire.raw.ordinal() {
4735 1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
4736 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4737 })),
4738
4739 2 => Self::UseExtendedAttributes(::fidl_next::FromWire::from_wire(unsafe {
4740 wire.raw.get().read_unchecked::<crate::wire::EmptyStruct>()
4741 })),
4742
4743 ord => return Self::UnknownOrdinal_(ord as u64),
4744 }
4745 }
4746 }
4747
4748 impl<'de> ::fidl_next::FromWireRef<crate::wire::SelinuxContext<'de>> for SelinuxContext {
4749 #[inline]
4750 fn from_wire_ref(wire: &crate::wire::SelinuxContext<'de>) -> Self {
4751 match wire.raw.ordinal() {
4752 1 => Self::Data(::fidl_next::FromWireRef::from_wire_ref(unsafe {
4753 wire.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4754 })),
4755
4756 2 => Self::UseExtendedAttributes(::fidl_next::FromWireRef::from_wire_ref(unsafe {
4757 wire.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
4758 })),
4759
4760 ord => return Self::UnknownOrdinal_(ord as u64),
4761 }
4762 }
4763 }
4764
4765 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
4766 for SelinuxContext
4767 {
4768 #[inline]
4769 fn from_wire_option(
4770 wire: crate::wire_optional::SelinuxContext<'de>,
4771 ) -> ::core::option::Option<Self> {
4772 if let Some(inner) = wire.into_option() {
4773 Some(::fidl_next::FromWire::from_wire(inner))
4774 } else {
4775 None
4776 }
4777 }
4778 }
4779
4780 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
4781 for Box<SelinuxContext>
4782 {
4783 #[inline]
4784 fn from_wire_option(
4785 wire: crate::wire_optional::SelinuxContext<'de>,
4786 ) -> ::core::option::Option<Self> {
4787 <SelinuxContext as ::fidl_next::FromWireOption<
4788 crate::wire_optional::SelinuxContext<'de>,
4789 >>::from_wire_option(wire)
4790 .map(Box::new)
4791 }
4792 }
4793
4794 impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::SelinuxContext<'de>>
4795 for Box<SelinuxContext>
4796 {
4797 #[inline]
4798 fn from_wire_option_ref(
4799 wire: &crate::wire_optional::SelinuxContext<'de>,
4800 ) -> ::core::option::Option<Self> {
4801 if let Some(inner) = wire.as_ref() {
4802 Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
4803 } else {
4804 None
4805 }
4806 }
4807 }
4808
4809 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4810 pub struct MutableNodeAttributes {
4811 pub creation_time: ::core::option::Option<u64>,
4812
4813 pub modification_time: ::core::option::Option<u64>,
4814
4815 pub mode: ::core::option::Option<u32>,
4816
4817 pub uid: ::core::option::Option<u32>,
4818
4819 pub gid: ::core::option::Option<u32>,
4820
4821 pub rdev: ::core::option::Option<u64>,
4822
4823 pub access_time: ::core::option::Option<u64>,
4824
4825 pub casefold: ::core::option::Option<bool>,
4826
4827 pub selinux_context: ::core::option::Option<crate::natural::SelinuxContext>,
4828
4829 pub wrapping_key_id: ::core::option::Option<[u8; 16]>,
4830 }
4831
4832 impl MutableNodeAttributes {
4833 fn __max_ordinal(&self) -> usize {
4834 if self.wrapping_key_id.is_some() {
4835 return 10;
4836 }
4837
4838 if self.selinux_context.is_some() {
4839 return 9;
4840 }
4841
4842 if self.casefold.is_some() {
4843 return 8;
4844 }
4845
4846 if self.access_time.is_some() {
4847 return 7;
4848 }
4849
4850 if self.rdev.is_some() {
4851 return 6;
4852 }
4853
4854 if self.gid.is_some() {
4855 return 5;
4856 }
4857
4858 if self.uid.is_some() {
4859 return 4;
4860 }
4861
4862 if self.mode.is_some() {
4863 return 3;
4864 }
4865
4866 if self.modification_time.is_some() {
4867 return 2;
4868 }
4869
4870 if self.creation_time.is_some() {
4871 return 1;
4872 }
4873
4874 0
4875 }
4876 }
4877
4878 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
4879 for MutableNodeAttributes
4880 where
4881 ___E: ::fidl_next::Encoder + ?Sized,
4882 {
4883 #[inline]
4884 fn encode(
4885 mut self,
4886 encoder: &mut ___E,
4887 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
4888 _: (),
4889 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4890 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
4891
4892 let max_ord = self.__max_ordinal();
4893
4894 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4895 ::fidl_next::Wire::zero_padding(&mut out);
4896
4897 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4898 ::fidl_next::wire::Envelope,
4899 >(encoder, max_ord);
4900
4901 for i in 1..=max_ord {
4902 match i {
4903 10 => {
4904 if let Some(value) = self.wrapping_key_id.take() {
4905 ::fidl_next::wire::Envelope::encode_value::<[u8; 16], ___E>(
4906 value,
4907 preallocated.encoder,
4908 &mut out,
4909 (),
4910 )?;
4911 } else {
4912 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4913 }
4914 }
4915
4916 9 => {
4917 if let Some(value) = self.selinux_context.take() {
4918 ::fidl_next::wire::Envelope::encode_value::<
4919 crate::wire::SelinuxContext<'static>,
4920 ___E,
4921 >(
4922 value, preallocated.encoder, &mut out, ()
4923 )?;
4924 } else {
4925 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4926 }
4927 }
4928
4929 8 => {
4930 if let Some(value) = self.casefold.take() {
4931 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
4932 value,
4933 preallocated.encoder,
4934 &mut out,
4935 (),
4936 )?;
4937 } else {
4938 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4939 }
4940 }
4941
4942 7 => {
4943 if let Some(value) = self.access_time.take() {
4944 ::fidl_next::wire::Envelope::encode_value::<
4945 ::fidl_next::wire::Uint64,
4946 ___E,
4947 >(
4948 value, preallocated.encoder, &mut out, ()
4949 )?;
4950 } else {
4951 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4952 }
4953 }
4954
4955 6 => {
4956 if let Some(value) = self.rdev.take() {
4957 ::fidl_next::wire::Envelope::encode_value::<
4958 ::fidl_next::wire::Uint64,
4959 ___E,
4960 >(
4961 value, preallocated.encoder, &mut out, ()
4962 )?;
4963 } else {
4964 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4965 }
4966 }
4967
4968 5 => {
4969 if let Some(value) = self.gid.take() {
4970 ::fidl_next::wire::Envelope::encode_value::<
4971 ::fidl_next::wire::Uint32,
4972 ___E,
4973 >(
4974 value, preallocated.encoder, &mut out, ()
4975 )?;
4976 } else {
4977 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4978 }
4979 }
4980
4981 4 => {
4982 if let Some(value) = self.uid.take() {
4983 ::fidl_next::wire::Envelope::encode_value::<
4984 ::fidl_next::wire::Uint32,
4985 ___E,
4986 >(
4987 value, preallocated.encoder, &mut out, ()
4988 )?;
4989 } else {
4990 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4991 }
4992 }
4993
4994 3 => {
4995 if let Some(value) = self.mode.take() {
4996 ::fidl_next::wire::Envelope::encode_value::<
4997 ::fidl_next::wire::Uint32,
4998 ___E,
4999 >(
5000 value, preallocated.encoder, &mut out, ()
5001 )?;
5002 } else {
5003 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5004 }
5005 }
5006
5007 2 => {
5008 if let Some(value) = self.modification_time.take() {
5009 ::fidl_next::wire::Envelope::encode_value::<
5010 ::fidl_next::wire::Uint64,
5011 ___E,
5012 >(
5013 value, preallocated.encoder, &mut out, ()
5014 )?;
5015 } else {
5016 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5017 }
5018 }
5019
5020 1 => {
5021 if let Some(value) = self.creation_time.take() {
5022 ::fidl_next::wire::Envelope::encode_value::<
5023 ::fidl_next::wire::Uint64,
5024 ___E,
5025 >(
5026 value, preallocated.encoder, &mut out, ()
5027 )?;
5028 } else {
5029 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5030 }
5031 }
5032
5033 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5034 }
5035 unsafe {
5036 preallocated.write_next(out.assume_init_ref());
5037 }
5038 }
5039
5040 ::fidl_next::wire::Table::encode_len(table, max_ord);
5041
5042 Ok(())
5043 }
5044 }
5045
5046 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
5047 for &'a MutableNodeAttributes
5048 where
5049 ___E: ::fidl_next::Encoder + ?Sized,
5050 {
5051 #[inline]
5052 fn encode(
5053 self,
5054 encoder: &mut ___E,
5055 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
5056 _: (),
5057 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5058 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
5059
5060 let max_ord = self.__max_ordinal();
5061
5062 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5063 ::fidl_next::Wire::zero_padding(&mut out);
5064
5065 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5066 ::fidl_next::wire::Envelope,
5067 >(encoder, max_ord);
5068
5069 for i in 1..=max_ord {
5070 match i {
5071 10 => {
5072 if let Some(value) = &self.wrapping_key_id {
5073 ::fidl_next::wire::Envelope::encode_value::<[u8; 16], ___E>(
5074 value,
5075 preallocated.encoder,
5076 &mut out,
5077 (),
5078 )?;
5079 } else {
5080 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5081 }
5082 }
5083
5084 9 => {
5085 if let Some(value) = &self.selinux_context {
5086 ::fidl_next::wire::Envelope::encode_value::<
5087 crate::wire::SelinuxContext<'static>,
5088 ___E,
5089 >(
5090 value, preallocated.encoder, &mut out, ()
5091 )?;
5092 } else {
5093 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5094 }
5095 }
5096
5097 8 => {
5098 if let Some(value) = &self.casefold {
5099 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5100 value,
5101 preallocated.encoder,
5102 &mut out,
5103 (),
5104 )?;
5105 } else {
5106 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5107 }
5108 }
5109
5110 7 => {
5111 if let Some(value) = &self.access_time {
5112 ::fidl_next::wire::Envelope::encode_value::<
5113 ::fidl_next::wire::Uint64,
5114 ___E,
5115 >(
5116 value, preallocated.encoder, &mut out, ()
5117 )?;
5118 } else {
5119 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5120 }
5121 }
5122
5123 6 => {
5124 if let Some(value) = &self.rdev {
5125 ::fidl_next::wire::Envelope::encode_value::<
5126 ::fidl_next::wire::Uint64,
5127 ___E,
5128 >(
5129 value, preallocated.encoder, &mut out, ()
5130 )?;
5131 } else {
5132 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5133 }
5134 }
5135
5136 5 => {
5137 if let Some(value) = &self.gid {
5138 ::fidl_next::wire::Envelope::encode_value::<
5139 ::fidl_next::wire::Uint32,
5140 ___E,
5141 >(
5142 value, preallocated.encoder, &mut out, ()
5143 )?;
5144 } else {
5145 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5146 }
5147 }
5148
5149 4 => {
5150 if let Some(value) = &self.uid {
5151 ::fidl_next::wire::Envelope::encode_value::<
5152 ::fidl_next::wire::Uint32,
5153 ___E,
5154 >(
5155 value, preallocated.encoder, &mut out, ()
5156 )?;
5157 } else {
5158 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5159 }
5160 }
5161
5162 3 => {
5163 if let Some(value) = &self.mode {
5164 ::fidl_next::wire::Envelope::encode_value::<
5165 ::fidl_next::wire::Uint32,
5166 ___E,
5167 >(
5168 value, preallocated.encoder, &mut out, ()
5169 )?;
5170 } else {
5171 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5172 }
5173 }
5174
5175 2 => {
5176 if let Some(value) = &self.modification_time {
5177 ::fidl_next::wire::Envelope::encode_value::<
5178 ::fidl_next::wire::Uint64,
5179 ___E,
5180 >(
5181 value, preallocated.encoder, &mut out, ()
5182 )?;
5183 } else {
5184 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5185 }
5186 }
5187
5188 1 => {
5189 if let Some(value) = &self.creation_time {
5190 ::fidl_next::wire::Envelope::encode_value::<
5191 ::fidl_next::wire::Uint64,
5192 ___E,
5193 >(
5194 value, preallocated.encoder, &mut out, ()
5195 )?;
5196 } else {
5197 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5198 }
5199 }
5200
5201 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5202 }
5203 unsafe {
5204 preallocated.write_next(out.assume_init_ref());
5205 }
5206 }
5207
5208 ::fidl_next::wire::Table::encode_len(table, max_ord);
5209
5210 Ok(())
5211 }
5212 }
5213
5214 impl<'de> ::fidl_next::FromWire<crate::wire::MutableNodeAttributes<'de>> for MutableNodeAttributes {
5215 #[inline]
5216 fn from_wire(wire_: crate::wire::MutableNodeAttributes<'de>) -> Self {
5217 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5218
5219 let creation_time = wire_.table.get(1);
5220
5221 let modification_time = wire_.table.get(2);
5222
5223 let mode = wire_.table.get(3);
5224
5225 let uid = wire_.table.get(4);
5226
5227 let gid = wire_.table.get(5);
5228
5229 let rdev = wire_.table.get(6);
5230
5231 let access_time = wire_.table.get(7);
5232
5233 let casefold = wire_.table.get(8);
5234
5235 let selinux_context = wire_.table.get(9);
5236
5237 let wrapping_key_id = wire_.table.get(10);
5238
5239 Self {
5240 creation_time: creation_time.map(|envelope| {
5241 ::fidl_next::FromWire::from_wire(unsafe {
5242 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5243 })
5244 }),
5245
5246 modification_time: modification_time.map(|envelope| {
5247 ::fidl_next::FromWire::from_wire(unsafe {
5248 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5249 })
5250 }),
5251
5252 mode: mode.map(|envelope| {
5253 ::fidl_next::FromWire::from_wire(unsafe {
5254 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5255 })
5256 }),
5257
5258 uid: uid.map(|envelope| {
5259 ::fidl_next::FromWire::from_wire(unsafe {
5260 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5261 })
5262 }),
5263
5264 gid: gid.map(|envelope| {
5265 ::fidl_next::FromWire::from_wire(unsafe {
5266 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5267 })
5268 }),
5269
5270 rdev: rdev.map(|envelope| {
5271 ::fidl_next::FromWire::from_wire(unsafe {
5272 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5273 })
5274 }),
5275
5276 access_time: access_time.map(|envelope| {
5277 ::fidl_next::FromWire::from_wire(unsafe {
5278 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5279 })
5280 }),
5281
5282 casefold: casefold.map(|envelope| {
5283 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
5284 }),
5285
5286 selinux_context: selinux_context.map(|envelope| {
5287 ::fidl_next::FromWire::from_wire(unsafe {
5288 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
5289 })
5290 }),
5291
5292 wrapping_key_id: wrapping_key_id.map(|envelope| {
5293 ::fidl_next::FromWire::from_wire(unsafe {
5294 envelope.read_unchecked::<[u8; 16]>()
5295 })
5296 }),
5297 }
5298 }
5299 }
5300
5301 impl<'de> ::fidl_next::FromWireRef<crate::wire::MutableNodeAttributes<'de>>
5302 for MutableNodeAttributes
5303 {
5304 #[inline]
5305 fn from_wire_ref(wire: &crate::wire::MutableNodeAttributes<'de>) -> Self {
5306 Self {
5307 creation_time: wire.table.get(1).map(|envelope| {
5308 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5309 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5310 })
5311 }),
5312
5313 modification_time: wire.table.get(2).map(|envelope| {
5314 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5315 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5316 })
5317 }),
5318
5319 mode: wire.table.get(3).map(|envelope| {
5320 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5321 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5322 })
5323 }),
5324
5325 uid: wire.table.get(4).map(|envelope| {
5326 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5327 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5328 })
5329 }),
5330
5331 gid: wire.table.get(5).map(|envelope| {
5332 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5333 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5334 })
5335 }),
5336
5337 rdev: wire.table.get(6).map(|envelope| {
5338 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5339 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5340 })
5341 }),
5342
5343 access_time: wire.table.get(7).map(|envelope| {
5344 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5345 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5346 })
5347 }),
5348
5349 casefold: wire.table.get(8).map(|envelope| {
5350 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5351 envelope.deref_unchecked::<bool>()
5352 })
5353 }),
5354
5355 selinux_context: wire.table.get(9).map(|envelope| {
5356 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5357 envelope.deref_unchecked::<crate::wire::SelinuxContext<'de>>()
5358 })
5359 }),
5360
5361 wrapping_key_id: wire.table.get(10).map(|envelope| {
5362 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5363 envelope.deref_unchecked::<[u8; 16]>()
5364 })
5365 }),
5366 }
5367 }
5368 }
5369
5370 ::fidl_next::bitflags::bitflags! {
5371 #[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 {
5372 #[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;
5373 #[doc = " The directory representation of a node.\n\n The connection will speak the [`Directory`] protocol.\n"]const DIRECTORY = 2;
5374 #[doc = " The file representation of a node.\n\n The connection will speak the [`File`] protocol.\n"]const FILE = 4;
5375 #[doc = " The symlink representation of a node.\n\n The connection will speak the [`Symlink`] protocol.\n"]const SYMLINK = 8;
5376 const _ = !0;
5377 }
5378 }
5379
5380 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E> for NodeProtocolKinds
5381 where
5382 ___E: ?Sized,
5383 {
5384 #[inline]
5385 fn encode(
5386 self,
5387 encoder: &mut ___E,
5388 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
5389 _: (),
5390 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5391 ::fidl_next::Encode::encode(&self, encoder, out, ())
5392 }
5393 }
5394
5395 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E>
5396 for &'a NodeProtocolKinds
5397 where
5398 ___E: ?Sized,
5399 {
5400 #[inline]
5401 fn encode(
5402 self,
5403 _: &mut ___E,
5404 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
5405 _: (),
5406 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5407 ::fidl_next::munge!(let crate::wire::NodeProtocolKinds { value } = out);
5408
5409 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
5410 Ok(())
5411 }
5412 }
5413
5414 impl ::core::convert::From<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5415 fn from(wire: crate::wire::NodeProtocolKinds) -> Self {
5416 Self::from_bits_retain(u64::from(wire.value))
5417 }
5418 }
5419
5420 impl ::fidl_next::FromWire<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5421 #[inline]
5422 fn from_wire(wire: crate::wire::NodeProtocolKinds) -> Self {
5423 Self::from(wire)
5424 }
5425 }
5426
5427 impl ::fidl_next::FromWireRef<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5428 #[inline]
5429 fn from_wire_ref(wire: &crate::wire::NodeProtocolKinds) -> Self {
5430 Self::from(*wire)
5431 }
5432 }
5433
5434 #[doc = " Denotes which hash algorithm is used to build the merkle tree for\n fsverity-enabled files.\n"]
5435 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5436 #[repr(u8)]
5437 pub enum HashAlgorithm {
5438 Sha256 = 1,
5439 Sha512 = 2,
5440 UnknownOrdinal_(u8) = 3,
5441 }
5442 impl ::std::convert::From<u8> for HashAlgorithm {
5443 fn from(value: u8) -> Self {
5444 match value {
5445 1 => Self::Sha256,
5446 2 => Self::Sha512,
5447
5448 _ => Self::UnknownOrdinal_(value),
5449 }
5450 }
5451 }
5452
5453 impl ::std::convert::From<HashAlgorithm> for u8 {
5454 fn from(value: HashAlgorithm) -> Self {
5455 match value {
5456 HashAlgorithm::Sha256 => 1,
5457 HashAlgorithm::Sha512 => 2,
5458
5459 HashAlgorithm::UnknownOrdinal_(value) => value,
5460 }
5461 }
5462 }
5463
5464 unsafe impl<___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for HashAlgorithm
5465 where
5466 ___E: ?Sized,
5467 {
5468 #[inline]
5469 fn encode(
5470 self,
5471 encoder: &mut ___E,
5472 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
5473 _: (),
5474 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5475 ::fidl_next::Encode::encode(&self, encoder, out, ())
5476 }
5477 }
5478
5479 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for &'a HashAlgorithm
5480 where
5481 ___E: ?Sized,
5482 {
5483 #[inline]
5484 fn encode(
5485 self,
5486 encoder: &mut ___E,
5487 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
5488 _: (),
5489 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5490 ::fidl_next::munge!(let crate::wire::HashAlgorithm { value } = out);
5491 let _ = value.write(u8::from(match *self {
5492 HashAlgorithm::Sha256 => 1,
5493
5494 HashAlgorithm::Sha512 => 2,
5495
5496 HashAlgorithm::UnknownOrdinal_(value) => value,
5497 }));
5498
5499 Ok(())
5500 }
5501 }
5502
5503 impl ::core::convert::From<crate::wire::HashAlgorithm> for HashAlgorithm {
5504 fn from(wire: crate::wire::HashAlgorithm) -> Self {
5505 match u8::from(wire.value) {
5506 1 => Self::Sha256,
5507
5508 2 => Self::Sha512,
5509
5510 value => Self::UnknownOrdinal_(value),
5511 }
5512 }
5513 }
5514
5515 impl ::fidl_next::FromWire<crate::wire::HashAlgorithm> for HashAlgorithm {
5516 #[inline]
5517 fn from_wire(wire: crate::wire::HashAlgorithm) -> Self {
5518 Self::from(wire)
5519 }
5520 }
5521
5522 impl ::fidl_next::FromWireRef<crate::wire::HashAlgorithm> for HashAlgorithm {
5523 #[inline]
5524 fn from_wire_ref(wire: &crate::wire::HashAlgorithm) -> Self {
5525 Self::from(*wire)
5526 }
5527 }
5528
5529 #[doc = " Set of options used to enable verity on a file.\n"]
5530 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5531 pub struct VerificationOptions {
5532 pub hash_algorithm: ::core::option::Option<crate::natural::HashAlgorithm>,
5533
5534 pub salt: ::core::option::Option<::std::vec::Vec<u8>>,
5535 }
5536
5537 impl VerificationOptions {
5538 fn __max_ordinal(&self) -> usize {
5539 if self.salt.is_some() {
5540 return 2;
5541 }
5542
5543 if self.hash_algorithm.is_some() {
5544 return 1;
5545 }
5546
5547 0
5548 }
5549 }
5550
5551 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
5552 for VerificationOptions
5553 where
5554 ___E: ::fidl_next::Encoder + ?Sized,
5555 {
5556 #[inline]
5557 fn encode(
5558 mut self,
5559 encoder: &mut ___E,
5560 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
5561 _: (),
5562 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5563 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
5564
5565 let max_ord = self.__max_ordinal();
5566
5567 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5568 ::fidl_next::Wire::zero_padding(&mut out);
5569
5570 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5571 ::fidl_next::wire::Envelope,
5572 >(encoder, max_ord);
5573
5574 for i in 1..=max_ord {
5575 match i {
5576 2 => {
5577 if let Some(value) = self.salt.take() {
5578 ::fidl_next::wire::Envelope::encode_value::<
5579 ::fidl_next::wire::Vector<'static, u8>,
5580 ___E,
5581 >(
5582 value, preallocated.encoder, &mut out, (32, ())
5583 )?;
5584 } else {
5585 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5586 }
5587 }
5588
5589 1 => {
5590 if let Some(value) = self.hash_algorithm.take() {
5591 ::fidl_next::wire::Envelope::encode_value::<
5592 crate::wire::HashAlgorithm,
5593 ___E,
5594 >(
5595 value, preallocated.encoder, &mut out, ()
5596 )?;
5597 } else {
5598 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5599 }
5600 }
5601
5602 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5603 }
5604 unsafe {
5605 preallocated.write_next(out.assume_init_ref());
5606 }
5607 }
5608
5609 ::fidl_next::wire::Table::encode_len(table, max_ord);
5610
5611 Ok(())
5612 }
5613 }
5614
5615 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
5616 for &'a VerificationOptions
5617 where
5618 ___E: ::fidl_next::Encoder + ?Sized,
5619 {
5620 #[inline]
5621 fn encode(
5622 self,
5623 encoder: &mut ___E,
5624 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
5625 _: (),
5626 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5627 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
5628
5629 let max_ord = self.__max_ordinal();
5630
5631 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5632 ::fidl_next::Wire::zero_padding(&mut out);
5633
5634 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5635 ::fidl_next::wire::Envelope,
5636 >(encoder, max_ord);
5637
5638 for i in 1..=max_ord {
5639 match i {
5640 2 => {
5641 if let Some(value) = &self.salt {
5642 ::fidl_next::wire::Envelope::encode_value::<
5643 ::fidl_next::wire::Vector<'static, u8>,
5644 ___E,
5645 >(
5646 value, preallocated.encoder, &mut out, (32, ())
5647 )?;
5648 } else {
5649 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5650 }
5651 }
5652
5653 1 => {
5654 if let Some(value) = &self.hash_algorithm {
5655 ::fidl_next::wire::Envelope::encode_value::<
5656 crate::wire::HashAlgorithm,
5657 ___E,
5658 >(
5659 value, preallocated.encoder, &mut out, ()
5660 )?;
5661 } else {
5662 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5663 }
5664 }
5665
5666 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5667 }
5668 unsafe {
5669 preallocated.write_next(out.assume_init_ref());
5670 }
5671 }
5672
5673 ::fidl_next::wire::Table::encode_len(table, max_ord);
5674
5675 Ok(())
5676 }
5677 }
5678
5679 impl<'de> ::fidl_next::FromWire<crate::wire::VerificationOptions<'de>> for VerificationOptions {
5680 #[inline]
5681 fn from_wire(wire_: crate::wire::VerificationOptions<'de>) -> Self {
5682 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5683
5684 let hash_algorithm = wire_.table.get(1);
5685
5686 let salt = wire_.table.get(2);
5687
5688 Self {
5689 hash_algorithm: hash_algorithm.map(|envelope| {
5690 ::fidl_next::FromWire::from_wire(unsafe {
5691 envelope.read_unchecked::<crate::wire::HashAlgorithm>()
5692 })
5693 }),
5694
5695 salt: salt.map(|envelope| {
5696 ::fidl_next::FromWire::from_wire(unsafe {
5697 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
5698 })
5699 }),
5700 }
5701 }
5702 }
5703
5704 impl<'de> ::fidl_next::FromWireRef<crate::wire::VerificationOptions<'de>> for VerificationOptions {
5705 #[inline]
5706 fn from_wire_ref(wire: &crate::wire::VerificationOptions<'de>) -> Self {
5707 Self {
5708 hash_algorithm: wire.table.get(1).map(|envelope| {
5709 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5710 envelope.deref_unchecked::<crate::wire::HashAlgorithm>()
5711 })
5712 }),
5713
5714 salt: wire.table.get(2).map(|envelope| {
5715 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5716 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
5717 })
5718 }),
5719 }
5720 }
5721 }
5722
5723 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5724 pub struct ImmutableNodeAttributes {
5725 pub protocols: ::core::option::Option<crate::natural::NodeProtocolKinds>,
5726
5727 pub abilities: ::core::option::Option<crate::natural::Operations>,
5728
5729 pub content_size: ::core::option::Option<u64>,
5730
5731 pub storage_size: ::core::option::Option<u64>,
5732
5733 pub link_count: ::core::option::Option<u64>,
5734
5735 pub id: ::core::option::Option<u64>,
5736
5737 pub change_time: ::core::option::Option<u64>,
5738
5739 pub options: ::core::option::Option<crate::natural::VerificationOptions>,
5740
5741 pub root_hash: ::core::option::Option<::std::vec::Vec<u8>>,
5742
5743 pub verity_enabled: ::core::option::Option<bool>,
5744 }
5745
5746 impl ImmutableNodeAttributes {
5747 fn __max_ordinal(&self) -> usize {
5748 if self.verity_enabled.is_some() {
5749 return 10;
5750 }
5751
5752 if self.root_hash.is_some() {
5753 return 9;
5754 }
5755
5756 if self.options.is_some() {
5757 return 8;
5758 }
5759
5760 if self.change_time.is_some() {
5761 return 7;
5762 }
5763
5764 if self.id.is_some() {
5765 return 6;
5766 }
5767
5768 if self.link_count.is_some() {
5769 return 5;
5770 }
5771
5772 if self.storage_size.is_some() {
5773 return 4;
5774 }
5775
5776 if self.content_size.is_some() {
5777 return 3;
5778 }
5779
5780 if self.abilities.is_some() {
5781 return 2;
5782 }
5783
5784 if self.protocols.is_some() {
5785 return 1;
5786 }
5787
5788 0
5789 }
5790 }
5791
5792 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
5793 for ImmutableNodeAttributes
5794 where
5795 ___E: ::fidl_next::Encoder + ?Sized,
5796 {
5797 #[inline]
5798 fn encode(
5799 mut self,
5800 encoder: &mut ___E,
5801 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
5802 _: (),
5803 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5804 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
5805
5806 let max_ord = self.__max_ordinal();
5807
5808 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5809 ::fidl_next::Wire::zero_padding(&mut out);
5810
5811 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5812 ::fidl_next::wire::Envelope,
5813 >(encoder, max_ord);
5814
5815 for i in 1..=max_ord {
5816 match i {
5817 10 => {
5818 if let Some(value) = self.verity_enabled.take() {
5819 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5820 value,
5821 preallocated.encoder,
5822 &mut out,
5823 (),
5824 )?;
5825 } else {
5826 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5827 }
5828 }
5829
5830 9 => {
5831 if let Some(value) = self.root_hash.take() {
5832 ::fidl_next::wire::Envelope::encode_value::<
5833 ::fidl_next::wire::Vector<'static, u8>,
5834 ___E,
5835 >(
5836 value, preallocated.encoder, &mut out, (64, ())
5837 )?;
5838 } else {
5839 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5840 }
5841 }
5842
5843 8 => {
5844 if let Some(value) = self.options.take() {
5845 ::fidl_next::wire::Envelope::encode_value::<
5846 crate::wire::VerificationOptions<'static>,
5847 ___E,
5848 >(
5849 value, preallocated.encoder, &mut out, ()
5850 )?;
5851 } else {
5852 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5853 }
5854 }
5855
5856 7 => {
5857 if let Some(value) = self.change_time.take() {
5858 ::fidl_next::wire::Envelope::encode_value::<
5859 ::fidl_next::wire::Uint64,
5860 ___E,
5861 >(
5862 value, preallocated.encoder, &mut out, ()
5863 )?;
5864 } else {
5865 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5866 }
5867 }
5868
5869 6 => {
5870 if let Some(value) = self.id.take() {
5871 ::fidl_next::wire::Envelope::encode_value::<
5872 ::fidl_next::wire::Uint64,
5873 ___E,
5874 >(
5875 value, preallocated.encoder, &mut out, ()
5876 )?;
5877 } else {
5878 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5879 }
5880 }
5881
5882 5 => {
5883 if let Some(value) = self.link_count.take() {
5884 ::fidl_next::wire::Envelope::encode_value::<
5885 ::fidl_next::wire::Uint64,
5886 ___E,
5887 >(
5888 value, preallocated.encoder, &mut out, ()
5889 )?;
5890 } else {
5891 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5892 }
5893 }
5894
5895 4 => {
5896 if let Some(value) = self.storage_size.take() {
5897 ::fidl_next::wire::Envelope::encode_value::<
5898 ::fidl_next::wire::Uint64,
5899 ___E,
5900 >(
5901 value, preallocated.encoder, &mut out, ()
5902 )?;
5903 } else {
5904 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5905 }
5906 }
5907
5908 3 => {
5909 if let Some(value) = self.content_size.take() {
5910 ::fidl_next::wire::Envelope::encode_value::<
5911 ::fidl_next::wire::Uint64,
5912 ___E,
5913 >(
5914 value, preallocated.encoder, &mut out, ()
5915 )?;
5916 } else {
5917 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5918 }
5919 }
5920
5921 2 => {
5922 if let Some(value) = self.abilities.take() {
5923 ::fidl_next::wire::Envelope::encode_value::<
5924 crate::wire::Operations,
5925 ___E,
5926 >(
5927 value, preallocated.encoder, &mut out, ()
5928 )?;
5929 } else {
5930 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5931 }
5932 }
5933
5934 1 => {
5935 if let Some(value) = self.protocols.take() {
5936 ::fidl_next::wire::Envelope::encode_value::<
5937 crate::wire::NodeProtocolKinds,
5938 ___E,
5939 >(
5940 value, preallocated.encoder, &mut out, ()
5941 )?;
5942 } else {
5943 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5944 }
5945 }
5946
5947 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5948 }
5949 unsafe {
5950 preallocated.write_next(out.assume_init_ref());
5951 }
5952 }
5953
5954 ::fidl_next::wire::Table::encode_len(table, max_ord);
5955
5956 Ok(())
5957 }
5958 }
5959
5960 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
5961 for &'a ImmutableNodeAttributes
5962 where
5963 ___E: ::fidl_next::Encoder + ?Sized,
5964 {
5965 #[inline]
5966 fn encode(
5967 self,
5968 encoder: &mut ___E,
5969 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
5970 _: (),
5971 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5972 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
5973
5974 let max_ord = self.__max_ordinal();
5975
5976 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5977 ::fidl_next::Wire::zero_padding(&mut out);
5978
5979 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5980 ::fidl_next::wire::Envelope,
5981 >(encoder, max_ord);
5982
5983 for i in 1..=max_ord {
5984 match i {
5985 10 => {
5986 if let Some(value) = &self.verity_enabled {
5987 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5988 value,
5989 preallocated.encoder,
5990 &mut out,
5991 (),
5992 )?;
5993 } else {
5994 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5995 }
5996 }
5997
5998 9 => {
5999 if let Some(value) = &self.root_hash {
6000 ::fidl_next::wire::Envelope::encode_value::<
6001 ::fidl_next::wire::Vector<'static, u8>,
6002 ___E,
6003 >(
6004 value, preallocated.encoder, &mut out, (64, ())
6005 )?;
6006 } else {
6007 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6008 }
6009 }
6010
6011 8 => {
6012 if let Some(value) = &self.options {
6013 ::fidl_next::wire::Envelope::encode_value::<
6014 crate::wire::VerificationOptions<'static>,
6015 ___E,
6016 >(
6017 value, preallocated.encoder, &mut out, ()
6018 )?;
6019 } else {
6020 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6021 }
6022 }
6023
6024 7 => {
6025 if let Some(value) = &self.change_time {
6026 ::fidl_next::wire::Envelope::encode_value::<
6027 ::fidl_next::wire::Uint64,
6028 ___E,
6029 >(
6030 value, preallocated.encoder, &mut out, ()
6031 )?;
6032 } else {
6033 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6034 }
6035 }
6036
6037 6 => {
6038 if let Some(value) = &self.id {
6039 ::fidl_next::wire::Envelope::encode_value::<
6040 ::fidl_next::wire::Uint64,
6041 ___E,
6042 >(
6043 value, preallocated.encoder, &mut out, ()
6044 )?;
6045 } else {
6046 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6047 }
6048 }
6049
6050 5 => {
6051 if let Some(value) = &self.link_count {
6052 ::fidl_next::wire::Envelope::encode_value::<
6053 ::fidl_next::wire::Uint64,
6054 ___E,
6055 >(
6056 value, preallocated.encoder, &mut out, ()
6057 )?;
6058 } else {
6059 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6060 }
6061 }
6062
6063 4 => {
6064 if let Some(value) = &self.storage_size {
6065 ::fidl_next::wire::Envelope::encode_value::<
6066 ::fidl_next::wire::Uint64,
6067 ___E,
6068 >(
6069 value, preallocated.encoder, &mut out, ()
6070 )?;
6071 } else {
6072 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6073 }
6074 }
6075
6076 3 => {
6077 if let Some(value) = &self.content_size {
6078 ::fidl_next::wire::Envelope::encode_value::<
6079 ::fidl_next::wire::Uint64,
6080 ___E,
6081 >(
6082 value, preallocated.encoder, &mut out, ()
6083 )?;
6084 } else {
6085 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6086 }
6087 }
6088
6089 2 => {
6090 if let Some(value) = &self.abilities {
6091 ::fidl_next::wire::Envelope::encode_value::<
6092 crate::wire::Operations,
6093 ___E,
6094 >(
6095 value, preallocated.encoder, &mut out, ()
6096 )?;
6097 } else {
6098 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6099 }
6100 }
6101
6102 1 => {
6103 if let Some(value) = &self.protocols {
6104 ::fidl_next::wire::Envelope::encode_value::<
6105 crate::wire::NodeProtocolKinds,
6106 ___E,
6107 >(
6108 value, preallocated.encoder, &mut out, ()
6109 )?;
6110 } else {
6111 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6112 }
6113 }
6114
6115 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6116 }
6117 unsafe {
6118 preallocated.write_next(out.assume_init_ref());
6119 }
6120 }
6121
6122 ::fidl_next::wire::Table::encode_len(table, max_ord);
6123
6124 Ok(())
6125 }
6126 }
6127
6128 impl<'de> ::fidl_next::FromWire<crate::wire::ImmutableNodeAttributes<'de>>
6129 for ImmutableNodeAttributes
6130 {
6131 #[inline]
6132 fn from_wire(wire_: crate::wire::ImmutableNodeAttributes<'de>) -> Self {
6133 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6134
6135 let protocols = wire_.table.get(1);
6136
6137 let abilities = wire_.table.get(2);
6138
6139 let content_size = wire_.table.get(3);
6140
6141 let storage_size = wire_.table.get(4);
6142
6143 let link_count = wire_.table.get(5);
6144
6145 let id = wire_.table.get(6);
6146
6147 let change_time = wire_.table.get(7);
6148
6149 let options = wire_.table.get(8);
6150
6151 let root_hash = wire_.table.get(9);
6152
6153 let verity_enabled = wire_.table.get(10);
6154
6155 Self {
6156 protocols: protocols.map(|envelope| {
6157 ::fidl_next::FromWire::from_wire(unsafe {
6158 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
6159 })
6160 }),
6161
6162 abilities: abilities.map(|envelope| {
6163 ::fidl_next::FromWire::from_wire(unsafe {
6164 envelope.read_unchecked::<crate::wire::Operations>()
6165 })
6166 }),
6167
6168 content_size: content_size.map(|envelope| {
6169 ::fidl_next::FromWire::from_wire(unsafe {
6170 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6171 })
6172 }),
6173
6174 storage_size: storage_size.map(|envelope| {
6175 ::fidl_next::FromWire::from_wire(unsafe {
6176 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6177 })
6178 }),
6179
6180 link_count: link_count.map(|envelope| {
6181 ::fidl_next::FromWire::from_wire(unsafe {
6182 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6183 })
6184 }),
6185
6186 id: id.map(|envelope| {
6187 ::fidl_next::FromWire::from_wire(unsafe {
6188 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6189 })
6190 }),
6191
6192 change_time: change_time.map(|envelope| {
6193 ::fidl_next::FromWire::from_wire(unsafe {
6194 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6195 })
6196 }),
6197
6198 options: options.map(|envelope| {
6199 ::fidl_next::FromWire::from_wire(unsafe {
6200 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
6201 })
6202 }),
6203
6204 root_hash: root_hash.map(|envelope| {
6205 ::fidl_next::FromWire::from_wire(unsafe {
6206 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6207 })
6208 }),
6209
6210 verity_enabled: verity_enabled.map(|envelope| {
6211 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
6212 }),
6213 }
6214 }
6215 }
6216
6217 impl<'de> ::fidl_next::FromWireRef<crate::wire::ImmutableNodeAttributes<'de>>
6218 for ImmutableNodeAttributes
6219 {
6220 #[inline]
6221 fn from_wire_ref(wire: &crate::wire::ImmutableNodeAttributes<'de>) -> Self {
6222 Self {
6223 protocols: wire.table.get(1).map(|envelope| {
6224 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6225 envelope.deref_unchecked::<crate::wire::NodeProtocolKinds>()
6226 })
6227 }),
6228
6229 abilities: wire.table.get(2).map(|envelope| {
6230 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6231 envelope.deref_unchecked::<crate::wire::Operations>()
6232 })
6233 }),
6234
6235 content_size: wire.table.get(3).map(|envelope| {
6236 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6237 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6238 })
6239 }),
6240
6241 storage_size: wire.table.get(4).map(|envelope| {
6242 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6243 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6244 })
6245 }),
6246
6247 link_count: wire.table.get(5).map(|envelope| {
6248 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6249 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6250 })
6251 }),
6252
6253 id: wire.table.get(6).map(|envelope| {
6254 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6255 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6256 })
6257 }),
6258
6259 change_time: wire.table.get(7).map(|envelope| {
6260 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6261 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6262 })
6263 }),
6264
6265 options: wire.table.get(8).map(|envelope| {
6266 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6267 envelope.deref_unchecked::<crate::wire::VerificationOptions<'de>>()
6268 })
6269 }),
6270
6271 root_hash: wire.table.get(9).map(|envelope| {
6272 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6273 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6274 })
6275 }),
6276
6277 verity_enabled: wire.table.get(10).map(|envelope| {
6278 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6279 envelope.deref_unchecked::<bool>()
6280 })
6281 }),
6282 }
6283 }
6284 }
6285
6286 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6287 pub struct NodeAttributes2 {
6288 pub mutable_attributes: crate::natural::MutableNodeAttributes,
6289
6290 pub immutable_attributes: crate::natural::ImmutableNodeAttributes,
6291 }
6292
6293 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
6294 for NodeAttributes2
6295 where
6296 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6297 ___E: ::fidl_next::Encoder,
6298 {
6299 #[inline]
6300 fn encode(
6301 self,
6302 encoder_: &mut ___E,
6303 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
6304 _: (),
6305 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6306 ::fidl_next::munge! {
6307 let crate::wire::NodeAttributes2 {
6308 mutable_attributes,
6309 immutable_attributes,
6310
6311 } = out_;
6312 }
6313
6314 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
6315
6316 let mut _field =
6317 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
6318
6319 ::fidl_next::Encode::encode(
6320 self.immutable_attributes,
6321 encoder_,
6322 immutable_attributes,
6323 (),
6324 )?;
6325
6326 let mut _field =
6327 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
6328
6329 Ok(())
6330 }
6331 }
6332
6333 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
6334 for &'a NodeAttributes2
6335 where
6336 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6337 ___E: ::fidl_next::Encoder,
6338 {
6339 #[inline]
6340 fn encode(
6341 self,
6342 encoder_: &mut ___E,
6343 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
6344 _: (),
6345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6346 ::fidl_next::munge! {
6347 let crate::wire::NodeAttributes2 {
6348 mutable_attributes,
6349 immutable_attributes,
6350
6351 } = out_;
6352 }
6353
6354 ::fidl_next::Encode::encode(
6355 &self.mutable_attributes,
6356 encoder_,
6357 mutable_attributes,
6358 (),
6359 )?;
6360
6361 let mut _field =
6362 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
6363
6364 ::fidl_next::Encode::encode(
6365 &self.immutable_attributes,
6366 encoder_,
6367 immutable_attributes,
6368 (),
6369 )?;
6370
6371 let mut _field =
6372 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
6373
6374 Ok(())
6375 }
6376 }
6377
6378 unsafe impl<___E>
6379 ::fidl_next::EncodeOption<
6380 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6381 ___E,
6382 > for NodeAttributes2
6383 where
6384 ___E: ::fidl_next::Encoder + ?Sized,
6385 NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
6386 {
6387 #[inline]
6388 fn encode_option(
6389 this: ::core::option::Option<Self>,
6390 encoder: &mut ___E,
6391 out: &mut ::core::mem::MaybeUninit<
6392 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6393 >,
6394 _: (),
6395 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6396 if let Some(inner) = this {
6397 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6398 ::fidl_next::wire::Box::encode_present(out);
6399 } else {
6400 ::fidl_next::wire::Box::encode_absent(out);
6401 }
6402
6403 Ok(())
6404 }
6405 }
6406
6407 unsafe impl<'a, ___E>
6408 ::fidl_next::EncodeOption<
6409 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6410 ___E,
6411 > for &'a NodeAttributes2
6412 where
6413 ___E: ::fidl_next::Encoder + ?Sized,
6414 &'a NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
6415 {
6416 #[inline]
6417 fn encode_option(
6418 this: ::core::option::Option<Self>,
6419 encoder: &mut ___E,
6420 out: &mut ::core::mem::MaybeUninit<
6421 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6422 >,
6423 _: (),
6424 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6425 if let Some(inner) = this {
6426 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6427 ::fidl_next::wire::Box::encode_present(out);
6428 } else {
6429 ::fidl_next::wire::Box::encode_absent(out);
6430 }
6431
6432 Ok(())
6433 }
6434 }
6435
6436 impl<'de> ::fidl_next::FromWire<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
6437 #[inline]
6438 fn from_wire(wire: crate::wire::NodeAttributes2<'de>) -> Self {
6439 Self {
6440 mutable_attributes: ::fidl_next::FromWire::from_wire(wire.mutable_attributes),
6441
6442 immutable_attributes: ::fidl_next::FromWire::from_wire(wire.immutable_attributes),
6443 }
6444 }
6445 }
6446
6447 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
6448 #[inline]
6449 fn from_wire_ref(wire: &crate::wire::NodeAttributes2<'de>) -> Self {
6450 Self {
6451 mutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
6452 &wire.mutable_attributes,
6453 ),
6454
6455 immutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
6456 &wire.immutable_attributes,
6457 ),
6458 }
6459 }
6460 }
6461
6462 #[doc = " Information that describes the target node.\n"]
6463 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6464 pub struct NodeInfo {
6465 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6466 }
6467
6468 impl NodeInfo {
6469 fn __max_ordinal(&self) -> usize {
6470 if self.attributes.is_some() {
6471 return 1;
6472 }
6473
6474 0
6475 }
6476 }
6477
6478 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for NodeInfo
6479 where
6480 ___E: ::fidl_next::Encoder + ?Sized,
6481 {
6482 #[inline]
6483 fn encode(
6484 mut self,
6485 encoder: &mut ___E,
6486 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
6487 _: (),
6488 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6489 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
6490
6491 let max_ord = self.__max_ordinal();
6492
6493 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6494 ::fidl_next::Wire::zero_padding(&mut out);
6495
6496 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6497 ::fidl_next::wire::Envelope,
6498 >(encoder, max_ord);
6499
6500 for i in 1..=max_ord {
6501 match i {
6502 1 => {
6503 if let Some(value) = self.attributes.take() {
6504 ::fidl_next::wire::Envelope::encode_value::<
6505 crate::wire::NodeAttributes2<'static>,
6506 ___E,
6507 >(
6508 value, preallocated.encoder, &mut out, ()
6509 )?;
6510 } else {
6511 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6512 }
6513 }
6514
6515 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6516 }
6517 unsafe {
6518 preallocated.write_next(out.assume_init_ref());
6519 }
6520 }
6521
6522 ::fidl_next::wire::Table::encode_len(table, max_ord);
6523
6524 Ok(())
6525 }
6526 }
6527
6528 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for &'a NodeInfo
6529 where
6530 ___E: ::fidl_next::Encoder + ?Sized,
6531 {
6532 #[inline]
6533 fn encode(
6534 self,
6535 encoder: &mut ___E,
6536 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
6537 _: (),
6538 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6539 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
6540
6541 let max_ord = self.__max_ordinal();
6542
6543 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6544 ::fidl_next::Wire::zero_padding(&mut out);
6545
6546 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6547 ::fidl_next::wire::Envelope,
6548 >(encoder, max_ord);
6549
6550 for i in 1..=max_ord {
6551 match i {
6552 1 => {
6553 if let Some(value) = &self.attributes {
6554 ::fidl_next::wire::Envelope::encode_value::<
6555 crate::wire::NodeAttributes2<'static>,
6556 ___E,
6557 >(
6558 value, preallocated.encoder, &mut out, ()
6559 )?;
6560 } else {
6561 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6562 }
6563 }
6564
6565 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6566 }
6567 unsafe {
6568 preallocated.write_next(out.assume_init_ref());
6569 }
6570 }
6571
6572 ::fidl_next::wire::Table::encode_len(table, max_ord);
6573
6574 Ok(())
6575 }
6576 }
6577
6578 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfo<'de>> for NodeInfo {
6579 #[inline]
6580 fn from_wire(wire_: crate::wire::NodeInfo<'de>) -> Self {
6581 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6582
6583 let attributes = wire_.table.get(1);
6584
6585 Self {
6586 attributes: attributes.map(|envelope| {
6587 ::fidl_next::FromWire::from_wire(unsafe {
6588 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6589 })
6590 }),
6591 }
6592 }
6593 }
6594
6595 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeInfo<'de>> for NodeInfo {
6596 #[inline]
6597 fn from_wire_ref(wire: &crate::wire::NodeInfo<'de>) -> Self {
6598 Self {
6599 attributes: wire.table.get(1).map(|envelope| {
6600 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6601 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6602 })
6603 }),
6604 }
6605 }
6606 }
6607
6608 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6609 pub struct DirectoryInfo {
6610 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6611 }
6612
6613 impl DirectoryInfo {
6614 fn __max_ordinal(&self) -> usize {
6615 if self.attributes.is_some() {
6616 return 1;
6617 }
6618
6619 0
6620 }
6621 }
6622
6623 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E> for DirectoryInfo
6624 where
6625 ___E: ::fidl_next::Encoder + ?Sized,
6626 {
6627 #[inline]
6628 fn encode(
6629 mut self,
6630 encoder: &mut ___E,
6631 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
6632 _: (),
6633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6634 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
6635
6636 let max_ord = self.__max_ordinal();
6637
6638 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6639 ::fidl_next::Wire::zero_padding(&mut out);
6640
6641 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6642 ::fidl_next::wire::Envelope,
6643 >(encoder, max_ord);
6644
6645 for i in 1..=max_ord {
6646 match i {
6647 1 => {
6648 if let Some(value) = self.attributes.take() {
6649 ::fidl_next::wire::Envelope::encode_value::<
6650 crate::wire::NodeAttributes2<'static>,
6651 ___E,
6652 >(
6653 value, preallocated.encoder, &mut out, ()
6654 )?;
6655 } else {
6656 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6657 }
6658 }
6659
6660 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6661 }
6662 unsafe {
6663 preallocated.write_next(out.assume_init_ref());
6664 }
6665 }
6666
6667 ::fidl_next::wire::Table::encode_len(table, max_ord);
6668
6669 Ok(())
6670 }
6671 }
6672
6673 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E>
6674 for &'a DirectoryInfo
6675 where
6676 ___E: ::fidl_next::Encoder + ?Sized,
6677 {
6678 #[inline]
6679 fn encode(
6680 self,
6681 encoder: &mut ___E,
6682 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
6683 _: (),
6684 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6685 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
6686
6687 let max_ord = self.__max_ordinal();
6688
6689 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6690 ::fidl_next::Wire::zero_padding(&mut out);
6691
6692 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6693 ::fidl_next::wire::Envelope,
6694 >(encoder, max_ord);
6695
6696 for i in 1..=max_ord {
6697 match i {
6698 1 => {
6699 if let Some(value) = &self.attributes {
6700 ::fidl_next::wire::Envelope::encode_value::<
6701 crate::wire::NodeAttributes2<'static>,
6702 ___E,
6703 >(
6704 value, preallocated.encoder, &mut out, ()
6705 )?;
6706 } else {
6707 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6708 }
6709 }
6710
6711 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6712 }
6713 unsafe {
6714 preallocated.write_next(out.assume_init_ref());
6715 }
6716 }
6717
6718 ::fidl_next::wire::Table::encode_len(table, max_ord);
6719
6720 Ok(())
6721 }
6722 }
6723
6724 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
6725 #[inline]
6726 fn from_wire(wire_: crate::wire::DirectoryInfo<'de>) -> Self {
6727 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6728
6729 let attributes = wire_.table.get(1);
6730
6731 Self {
6732 attributes: attributes.map(|envelope| {
6733 ::fidl_next::FromWire::from_wire(unsafe {
6734 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6735 })
6736 }),
6737 }
6738 }
6739 }
6740
6741 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
6742 #[inline]
6743 fn from_wire_ref(wire: &crate::wire::DirectoryInfo<'de>) -> Self {
6744 Self {
6745 attributes: wire.table.get(1).map(|envelope| {
6746 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6747 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6748 })
6749 }),
6750 }
6751 }
6752 }
6753
6754 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6755 pub struct SymlinkInfo {
6756 pub target: ::core::option::Option<::std::vec::Vec<u8>>,
6757
6758 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6759 }
6760
6761 impl SymlinkInfo {
6762 fn __max_ordinal(&self) -> usize {
6763 if self.attributes.is_some() {
6764 return 2;
6765 }
6766
6767 if self.target.is_some() {
6768 return 1;
6769 }
6770
6771 0
6772 }
6773 }
6774
6775 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E> for SymlinkInfo
6776 where
6777 ___E: ::fidl_next::Encoder + ?Sized,
6778 {
6779 #[inline]
6780 fn encode(
6781 mut self,
6782 encoder: &mut ___E,
6783 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
6784 _: (),
6785 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6786 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
6787
6788 let max_ord = self.__max_ordinal();
6789
6790 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6791 ::fidl_next::Wire::zero_padding(&mut out);
6792
6793 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6794 ::fidl_next::wire::Envelope,
6795 >(encoder, max_ord);
6796
6797 for i in 1..=max_ord {
6798 match i {
6799 2 => {
6800 if let Some(value) = self.attributes.take() {
6801 ::fidl_next::wire::Envelope::encode_value::<
6802 crate::wire::NodeAttributes2<'static>,
6803 ___E,
6804 >(
6805 value, preallocated.encoder, &mut out, ()
6806 )?;
6807 } else {
6808 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6809 }
6810 }
6811
6812 1 => {
6813 if let Some(value) = self.target.take() {
6814 ::fidl_next::wire::Envelope::encode_value::<
6815 ::fidl_next::wire::Vector<'static, u8>,
6816 ___E,
6817 >(
6818 value, preallocated.encoder, &mut out, (4095, ())
6819 )?;
6820 } else {
6821 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6822 }
6823 }
6824
6825 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6826 }
6827 unsafe {
6828 preallocated.write_next(out.assume_init_ref());
6829 }
6830 }
6831
6832 ::fidl_next::wire::Table::encode_len(table, max_ord);
6833
6834 Ok(())
6835 }
6836 }
6837
6838 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E>
6839 for &'a SymlinkInfo
6840 where
6841 ___E: ::fidl_next::Encoder + ?Sized,
6842 {
6843 #[inline]
6844 fn encode(
6845 self,
6846 encoder: &mut ___E,
6847 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
6848 _: (),
6849 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6850 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
6851
6852 let max_ord = self.__max_ordinal();
6853
6854 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6855 ::fidl_next::Wire::zero_padding(&mut out);
6856
6857 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6858 ::fidl_next::wire::Envelope,
6859 >(encoder, max_ord);
6860
6861 for i in 1..=max_ord {
6862 match i {
6863 2 => {
6864 if let Some(value) = &self.attributes {
6865 ::fidl_next::wire::Envelope::encode_value::<
6866 crate::wire::NodeAttributes2<'static>,
6867 ___E,
6868 >(
6869 value, preallocated.encoder, &mut out, ()
6870 )?;
6871 } else {
6872 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6873 }
6874 }
6875
6876 1 => {
6877 if let Some(value) = &self.target {
6878 ::fidl_next::wire::Envelope::encode_value::<
6879 ::fidl_next::wire::Vector<'static, u8>,
6880 ___E,
6881 >(
6882 value, preallocated.encoder, &mut out, (4095, ())
6883 )?;
6884 } else {
6885 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6886 }
6887 }
6888
6889 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6890 }
6891 unsafe {
6892 preallocated.write_next(out.assume_init_ref());
6893 }
6894 }
6895
6896 ::fidl_next::wire::Table::encode_len(table, max_ord);
6897
6898 Ok(())
6899 }
6900 }
6901
6902 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
6903 #[inline]
6904 fn from_wire(wire_: crate::wire::SymlinkInfo<'de>) -> Self {
6905 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6906
6907 let target = wire_.table.get(1);
6908
6909 let attributes = wire_.table.get(2);
6910
6911 Self {
6912 target: target.map(|envelope| {
6913 ::fidl_next::FromWire::from_wire(unsafe {
6914 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6915 })
6916 }),
6917
6918 attributes: attributes.map(|envelope| {
6919 ::fidl_next::FromWire::from_wire(unsafe {
6920 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6921 })
6922 }),
6923 }
6924 }
6925 }
6926
6927 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
6928 #[inline]
6929 fn from_wire_ref(wire: &crate::wire::SymlinkInfo<'de>) -> Self {
6930 Self {
6931 target: wire.table.get(1).map(|envelope| {
6932 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6933 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6934 })
6935 }),
6936
6937 attributes: wire.table.get(2).map(|envelope| {
6938 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6939 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6940 })
6941 }),
6942 }
6943 }
6944 }
6945
6946 ::fidl_next::bitflags::bitflags! {
6947 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct NodeAttributesQuery: u64 {
6948 #[doc = " Requests [`NodeAttributes.protocols`].\n"]const PROTOCOLS = 1;
6949 #[doc = " Requests [`NodeAttributes.abilities`].\n"]const ABILITIES = 2;
6950 #[doc = " Requests [`NodeAttributes.content_size`].\n"]const CONTENT_SIZE = 4;
6951 #[doc = " Requests [`NodeAttributes.storage_size`].\n"]const STORAGE_SIZE = 8;
6952 #[doc = " Requests [`NodeAttributes.link_count`].\n"]const LINK_COUNT = 16;
6953 #[doc = " Requests [`NodeAttributes.id`].\n"]const ID = 32;
6954 #[doc = " Requests [`NodeAttributes.creation_time`].\n"]const CREATION_TIME = 64;
6955 #[doc = " Requests [`NodeAttributes.modification_time`].\n"]const MODIFICATION_TIME = 128;
6956 #[doc = " Posix attributes.\n"]const MODE = 256;
6957 const UID = 512;
6958 const GID = 1024;
6959 const RDEV = 2048;
6960 const ACCESS_TIME = 4096;
6961 const CHANGE_TIME = 8192;
6962 #[doc = " Verity attributes.\n"]const OPTIONS = 16384;
6963 const ROOT_HASH = 32768;
6964 const VERITY_ENABLED = 65536;
6965 #[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;
6966 #[doc = " Requests [`MutableNodeAttributes.selinux_context`]. See that field for more detail.\n"]const SELINUX_CONTEXT = 262144;
6967 #[doc = " fscrypt attribute.\n"]const WRAPPING_KEY_ID = 524288;
6968 #[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;
6969 const _ = !0;
6970 }
6971 }
6972
6973 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
6974 for NodeAttributesQuery
6975 where
6976 ___E: ?Sized,
6977 {
6978 #[inline]
6979 fn encode(
6980 self,
6981 encoder: &mut ___E,
6982 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
6983 _: (),
6984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6985 ::fidl_next::Encode::encode(&self, encoder, out, ())
6986 }
6987 }
6988
6989 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
6990 for &'a NodeAttributesQuery
6991 where
6992 ___E: ?Sized,
6993 {
6994 #[inline]
6995 fn encode(
6996 self,
6997 _: &mut ___E,
6998 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
6999 _: (),
7000 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7001 ::fidl_next::munge!(let crate::wire::NodeAttributesQuery { value } = out);
7002
7003 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
7004 Ok(())
7005 }
7006 }
7007
7008 impl ::core::convert::From<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
7009 fn from(wire: crate::wire::NodeAttributesQuery) -> Self {
7010 Self::from_bits_retain(u64::from(wire.value))
7011 }
7012 }
7013
7014 impl ::fidl_next::FromWire<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
7015 #[inline]
7016 fn from_wire(wire: crate::wire::NodeAttributesQuery) -> Self {
7017 Self::from(wire)
7018 }
7019 }
7020
7021 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
7022 #[inline]
7023 fn from_wire_ref(wire: &crate::wire::NodeAttributesQuery) -> Self {
7024 Self::from(*wire)
7025 }
7026 }
7027
7028 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7029 #[repr(C)]
7030 pub struct NodeGetAttributesRequest {
7031 pub query: crate::natural::NodeAttributesQuery,
7032 }
7033
7034 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
7035 for NodeGetAttributesRequest
7036 where
7037 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7038 {
7039 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7040 Self,
7041 crate::wire::NodeGetAttributesRequest,
7042 > = unsafe {
7043 ::fidl_next::CopyOptimization::enable_if(
7044 true && <crate::natural::NodeAttributesQuery as ::fidl_next::Encode<
7045 crate::wire::NodeAttributesQuery,
7046 ___E,
7047 >>::COPY_OPTIMIZATION
7048 .is_enabled(),
7049 )
7050 };
7051
7052 #[inline]
7053 fn encode(
7054 self,
7055 encoder_: &mut ___E,
7056 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
7057 _: (),
7058 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7059 ::fidl_next::munge! {
7060 let crate::wire::NodeGetAttributesRequest {
7061 query,
7062
7063 } = out_;
7064 }
7065
7066 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
7067
7068 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
7069
7070 Ok(())
7071 }
7072 }
7073
7074 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
7075 for &'a NodeGetAttributesRequest
7076 where
7077 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7078 {
7079 #[inline]
7080 fn encode(
7081 self,
7082 encoder_: &mut ___E,
7083 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
7084 _: (),
7085 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7086 ::fidl_next::munge! {
7087 let crate::wire::NodeGetAttributesRequest {
7088 query,
7089
7090 } = out_;
7091 }
7092
7093 ::fidl_next::Encode::encode(&self.query, encoder_, query, ())?;
7094
7095 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
7096
7097 Ok(())
7098 }
7099 }
7100
7101 unsafe impl<___E>
7102 ::fidl_next::EncodeOption<
7103 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7104 ___E,
7105 > for NodeGetAttributesRequest
7106 where
7107 ___E: ::fidl_next::Encoder + ?Sized,
7108 NodeGetAttributesRequest: ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
7109 {
7110 #[inline]
7111 fn encode_option(
7112 this: ::core::option::Option<Self>,
7113 encoder: &mut ___E,
7114 out: &mut ::core::mem::MaybeUninit<
7115 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7116 >,
7117 _: (),
7118 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7119 if let Some(inner) = this {
7120 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7121 ::fidl_next::wire::Box::encode_present(out);
7122 } else {
7123 ::fidl_next::wire::Box::encode_absent(out);
7124 }
7125
7126 Ok(())
7127 }
7128 }
7129
7130 unsafe impl<'a, ___E>
7131 ::fidl_next::EncodeOption<
7132 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7133 ___E,
7134 > for &'a NodeGetAttributesRequest
7135 where
7136 ___E: ::fidl_next::Encoder + ?Sized,
7137 &'a NodeGetAttributesRequest:
7138 ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
7139 {
7140 #[inline]
7141 fn encode_option(
7142 this: ::core::option::Option<Self>,
7143 encoder: &mut ___E,
7144 out: &mut ::core::mem::MaybeUninit<
7145 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7146 >,
7147 _: (),
7148 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7149 if let Some(inner) = this {
7150 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7151 ::fidl_next::wire::Box::encode_present(out);
7152 } else {
7153 ::fidl_next::wire::Box::encode_absent(out);
7154 }
7155
7156 Ok(())
7157 }
7158 }
7159
7160 impl ::fidl_next::FromWire<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
7161 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7162 crate::wire::NodeGetAttributesRequest,
7163 Self,
7164 > = unsafe {
7165 ::fidl_next::CopyOptimization::enable_if(
7166 true && <crate::natural::NodeAttributesQuery as ::fidl_next::FromWire<
7167 crate::wire::NodeAttributesQuery,
7168 >>::COPY_OPTIMIZATION
7169 .is_enabled(),
7170 )
7171 };
7172
7173 #[inline]
7174 fn from_wire(wire: crate::wire::NodeGetAttributesRequest) -> Self {
7175 Self { query: ::fidl_next::FromWire::from_wire(wire.query) }
7176 }
7177 }
7178
7179 impl ::fidl_next::FromWireRef<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
7180 #[inline]
7181 fn from_wire_ref(wire: &crate::wire::NodeGetAttributesRequest) -> Self {
7182 Self { query: ::fidl_next::FromWireRef::from_wire_ref(&wire.query) }
7183 }
7184 }
7185
7186 #[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"]
7187 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7188 pub struct Options {
7189 pub attributes: ::core::option::Option<crate::natural::NodeAttributesQuery>,
7190
7191 pub create_attributes: ::core::option::Option<crate::natural::MutableNodeAttributes>,
7192 }
7193
7194 impl Options {
7195 fn __max_ordinal(&self) -> usize {
7196 if self.create_attributes.is_some() {
7197 return 2;
7198 }
7199
7200 if self.attributes.is_some() {
7201 return 1;
7202 }
7203
7204 0
7205 }
7206 }
7207
7208 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for Options
7209 where
7210 ___E: ::fidl_next::Encoder + ?Sized,
7211 {
7212 #[inline]
7213 fn encode(
7214 mut self,
7215 encoder: &mut ___E,
7216 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
7217 _: (),
7218 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7219 ::fidl_next::munge!(let crate::wire::Options { table } = out);
7220
7221 let max_ord = self.__max_ordinal();
7222
7223 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7224 ::fidl_next::Wire::zero_padding(&mut out);
7225
7226 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7227 ::fidl_next::wire::Envelope,
7228 >(encoder, max_ord);
7229
7230 for i in 1..=max_ord {
7231 match i {
7232 2 => {
7233 if let Some(value) = self.create_attributes.take() {
7234 ::fidl_next::wire::Envelope::encode_value::<
7235 crate::wire::MutableNodeAttributes<'static>,
7236 ___E,
7237 >(
7238 value, preallocated.encoder, &mut out, ()
7239 )?;
7240 } else {
7241 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7242 }
7243 }
7244
7245 1 => {
7246 if let Some(value) = self.attributes.take() {
7247 ::fidl_next::wire::Envelope::encode_value::<
7248 crate::wire::NodeAttributesQuery,
7249 ___E,
7250 >(
7251 value, preallocated.encoder, &mut out, ()
7252 )?;
7253 } else {
7254 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7255 }
7256 }
7257
7258 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7259 }
7260 unsafe {
7261 preallocated.write_next(out.assume_init_ref());
7262 }
7263 }
7264
7265 ::fidl_next::wire::Table::encode_len(table, max_ord);
7266
7267 Ok(())
7268 }
7269 }
7270
7271 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for &'a Options
7272 where
7273 ___E: ::fidl_next::Encoder + ?Sized,
7274 {
7275 #[inline]
7276 fn encode(
7277 self,
7278 encoder: &mut ___E,
7279 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
7280 _: (),
7281 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7282 ::fidl_next::munge!(let crate::wire::Options { table } = out);
7283
7284 let max_ord = self.__max_ordinal();
7285
7286 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7287 ::fidl_next::Wire::zero_padding(&mut out);
7288
7289 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7290 ::fidl_next::wire::Envelope,
7291 >(encoder, max_ord);
7292
7293 for i in 1..=max_ord {
7294 match i {
7295 2 => {
7296 if let Some(value) = &self.create_attributes {
7297 ::fidl_next::wire::Envelope::encode_value::<
7298 crate::wire::MutableNodeAttributes<'static>,
7299 ___E,
7300 >(
7301 value, preallocated.encoder, &mut out, ()
7302 )?;
7303 } else {
7304 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7305 }
7306 }
7307
7308 1 => {
7309 if let Some(value) = &self.attributes {
7310 ::fidl_next::wire::Envelope::encode_value::<
7311 crate::wire::NodeAttributesQuery,
7312 ___E,
7313 >(
7314 value, preallocated.encoder, &mut out, ()
7315 )?;
7316 } else {
7317 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7318 }
7319 }
7320
7321 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7322 }
7323 unsafe {
7324 preallocated.write_next(out.assume_init_ref());
7325 }
7326 }
7327
7328 ::fidl_next::wire::Table::encode_len(table, max_ord);
7329
7330 Ok(())
7331 }
7332 }
7333
7334 impl<'de> ::fidl_next::FromWire<crate::wire::Options<'de>> for Options {
7335 #[inline]
7336 fn from_wire(wire_: crate::wire::Options<'de>) -> Self {
7337 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7338
7339 let attributes = wire_.table.get(1);
7340
7341 let create_attributes = wire_.table.get(2);
7342
7343 Self {
7344 attributes: attributes.map(|envelope| {
7345 ::fidl_next::FromWire::from_wire(unsafe {
7346 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
7347 })
7348 }),
7349
7350 create_attributes: create_attributes.map(|envelope| {
7351 ::fidl_next::FromWire::from_wire(unsafe {
7352 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
7353 })
7354 }),
7355 }
7356 }
7357 }
7358
7359 impl<'de> ::fidl_next::FromWireRef<crate::wire::Options<'de>> for Options {
7360 #[inline]
7361 fn from_wire_ref(wire: &crate::wire::Options<'de>) -> Self {
7362 Self {
7363 attributes: wire.table.get(1).map(|envelope| {
7364 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7365 envelope.deref_unchecked::<crate::wire::NodeAttributesQuery>()
7366 })
7367 }),
7368
7369 create_attributes: wire.table.get(2).map(|envelope| {
7370 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7371 envelope.deref_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
7372 })
7373 }),
7374 }
7375 }
7376 }
7377
7378 pub type DirectoryObject = ();
7379
7380 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7381 #[repr(u8)]
7382 pub enum DirentType {
7383 Unknown = 0,
7384 Directory = 4,
7385 BlockDevice = 6,
7386 File = 8,
7387 Symlink = 10,
7388 Service = 16,
7389 UnknownOrdinal_(u8) = 17,
7390 }
7391 impl ::std::convert::From<u8> for DirentType {
7392 fn from(value: u8) -> Self {
7393 match value {
7394 0 => Self::Unknown,
7395 4 => Self::Directory,
7396 6 => Self::BlockDevice,
7397 8 => Self::File,
7398 10 => Self::Symlink,
7399 16 => Self::Service,
7400
7401 _ => Self::UnknownOrdinal_(value),
7402 }
7403 }
7404 }
7405
7406 impl ::std::convert::From<DirentType> for u8 {
7407 fn from(value: DirentType) -> Self {
7408 match value {
7409 DirentType::Unknown => 0,
7410 DirentType::Directory => 4,
7411 DirentType::BlockDevice => 6,
7412 DirentType::File => 8,
7413 DirentType::Symlink => 10,
7414 DirentType::Service => 16,
7415
7416 DirentType::UnknownOrdinal_(value) => value,
7417 }
7418 }
7419 }
7420
7421 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for DirentType
7422 where
7423 ___E: ?Sized,
7424 {
7425 #[inline]
7426 fn encode(
7427 self,
7428 encoder: &mut ___E,
7429 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
7430 _: (),
7431 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7432 ::fidl_next::Encode::encode(&self, encoder, out, ())
7433 }
7434 }
7435
7436 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for &'a DirentType
7437 where
7438 ___E: ?Sized,
7439 {
7440 #[inline]
7441 fn encode(
7442 self,
7443 encoder: &mut ___E,
7444 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
7445 _: (),
7446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7447 ::fidl_next::munge!(let crate::wire::DirentType { value } = out);
7448 let _ = value.write(u8::from(match *self {
7449 DirentType::Unknown => 0,
7450
7451 DirentType::Directory => 4,
7452
7453 DirentType::BlockDevice => 6,
7454
7455 DirentType::File => 8,
7456
7457 DirentType::Symlink => 10,
7458
7459 DirentType::Service => 16,
7460
7461 DirentType::UnknownOrdinal_(value) => value,
7462 }));
7463
7464 Ok(())
7465 }
7466 }
7467
7468 impl ::core::convert::From<crate::wire::DirentType> for DirentType {
7469 fn from(wire: crate::wire::DirentType) -> Self {
7470 match u8::from(wire.value) {
7471 0 => Self::Unknown,
7472
7473 4 => Self::Directory,
7474
7475 6 => Self::BlockDevice,
7476
7477 8 => Self::File,
7478
7479 10 => Self::Symlink,
7480
7481 16 => Self::Service,
7482
7483 value => Self::UnknownOrdinal_(value),
7484 }
7485 }
7486 }
7487
7488 impl ::fidl_next::FromWire<crate::wire::DirentType> for DirentType {
7489 #[inline]
7490 fn from_wire(wire: crate::wire::DirentType) -> Self {
7491 Self::from(wire)
7492 }
7493 }
7494
7495 impl ::fidl_next::FromWireRef<crate::wire::DirentType> for DirentType {
7496 #[inline]
7497 fn from_wire_ref(wire: &crate::wire::DirentType) -> Self {
7498 Self::from(*wire)
7499 }
7500 }
7501
7502 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7503 pub struct ExtendedAttributeIteratorGetNextResponse {
7504 pub attributes: ::std::vec::Vec<::std::vec::Vec<u8>>,
7505
7506 pub last: bool,
7507 }
7508
7509 unsafe impl<___E>
7510 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
7511 for ExtendedAttributeIteratorGetNextResponse
7512 where
7513 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7514 ___E: ::fidl_next::Encoder,
7515 {
7516 #[inline]
7517 fn encode(
7518 self,
7519 encoder_: &mut ___E,
7520 out_: &mut ::core::mem::MaybeUninit<
7521 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7522 >,
7523 _: (),
7524 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7525 ::fidl_next::munge! {
7526 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
7527 attributes,
7528 last,
7529
7530 } = out_;
7531 }
7532
7533 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
7534
7535 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
7536 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
7537
7538 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
7539
7540 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
7541
7542 Ok(())
7543 }
7544 }
7545
7546 unsafe impl<'a, ___E>
7547 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
7548 for &'a ExtendedAttributeIteratorGetNextResponse
7549 where
7550 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7551 ___E: ::fidl_next::Encoder,
7552 {
7553 #[inline]
7554 fn encode(
7555 self,
7556 encoder_: &mut ___E,
7557 out_: &mut ::core::mem::MaybeUninit<
7558 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7559 >,
7560 _: (),
7561 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7562 ::fidl_next::munge! {
7563 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
7564 attributes,
7565 last,
7566
7567 } = out_;
7568 }
7569
7570 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, (128, (255, ())))?;
7571
7572 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
7573 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
7574
7575 ::fidl_next::Encode::encode(&self.last, encoder_, last, ())?;
7576
7577 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
7578
7579 Ok(())
7580 }
7581 }
7582
7583 unsafe impl<___E>
7584 ::fidl_next::EncodeOption<
7585 ::fidl_next::wire::Box<
7586 'static,
7587 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7588 >,
7589 ___E,
7590 > for ExtendedAttributeIteratorGetNextResponse
7591 where
7592 ___E: ::fidl_next::Encoder + ?Sized,
7593 ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
7594 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7595 ___E,
7596 >,
7597 {
7598 #[inline]
7599 fn encode_option(
7600 this: ::core::option::Option<Self>,
7601 encoder: &mut ___E,
7602 out: &mut ::core::mem::MaybeUninit<
7603 ::fidl_next::wire::Box<
7604 'static,
7605 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7606 >,
7607 >,
7608 _: (),
7609 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7610 if let Some(inner) = this {
7611 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7612 ::fidl_next::wire::Box::encode_present(out);
7613 } else {
7614 ::fidl_next::wire::Box::encode_absent(out);
7615 }
7616
7617 Ok(())
7618 }
7619 }
7620
7621 unsafe impl<'a, ___E>
7622 ::fidl_next::EncodeOption<
7623 ::fidl_next::wire::Box<
7624 'static,
7625 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7626 >,
7627 ___E,
7628 > for &'a ExtendedAttributeIteratorGetNextResponse
7629 where
7630 ___E: ::fidl_next::Encoder + ?Sized,
7631 &'a ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
7632 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7633 ___E,
7634 >,
7635 {
7636 #[inline]
7637 fn encode_option(
7638 this: ::core::option::Option<Self>,
7639 encoder: &mut ___E,
7640 out: &mut ::core::mem::MaybeUninit<
7641 ::fidl_next::wire::Box<
7642 'static,
7643 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7644 >,
7645 >,
7646 _: (),
7647 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7648 if let Some(inner) = this {
7649 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7650 ::fidl_next::wire::Box::encode_present(out);
7651 } else {
7652 ::fidl_next::wire::Box::encode_absent(out);
7653 }
7654
7655 Ok(())
7656 }
7657 }
7658
7659 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
7660 for ExtendedAttributeIteratorGetNextResponse
7661 {
7662 #[inline]
7663 fn from_wire(wire: crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>) -> Self {
7664 Self {
7665 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
7666
7667 last: ::fidl_next::FromWire::from_wire(wire.last),
7668 }
7669 }
7670 }
7671
7672 impl<'de> ::fidl_next::FromWireRef<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
7673 for ExtendedAttributeIteratorGetNextResponse
7674 {
7675 #[inline]
7676 fn from_wire_ref(
7677 wire: &crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>,
7678 ) -> Self {
7679 Self {
7680 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
7681
7682 last: ::fidl_next::FromWireRef::from_wire_ref(&wire.last),
7683 }
7684 }
7685 }
7686
7687 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7688 #[repr(C)]
7689 pub struct ReadableReadRequest {
7690 pub count: u64,
7691 }
7692
7693 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
7694 for ReadableReadRequest
7695 where
7696 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7697 {
7698 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7699 Self,
7700 crate::wire::ReadableReadRequest,
7701 > = unsafe {
7702 ::fidl_next::CopyOptimization::enable_if(
7703 true
7704
7705 && <
7706 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
7707 >::COPY_OPTIMIZATION.is_enabled()
7708
7709 )
7710 };
7711
7712 #[inline]
7713 fn encode(
7714 self,
7715 encoder_: &mut ___E,
7716 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
7717 _: (),
7718 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7719 ::fidl_next::munge! {
7720 let crate::wire::ReadableReadRequest {
7721 count,
7722
7723 } = out_;
7724 }
7725
7726 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
7727
7728 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
7729
7730 Ok(())
7731 }
7732 }
7733
7734 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
7735 for &'a ReadableReadRequest
7736 where
7737 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7738 {
7739 #[inline]
7740 fn encode(
7741 self,
7742 encoder_: &mut ___E,
7743 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
7744 _: (),
7745 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7746 ::fidl_next::munge! {
7747 let crate::wire::ReadableReadRequest {
7748 count,
7749
7750 } = out_;
7751 }
7752
7753 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
7754
7755 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
7756
7757 Ok(())
7758 }
7759 }
7760
7761 unsafe impl<___E>
7762 ::fidl_next::EncodeOption<
7763 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7764 ___E,
7765 > for ReadableReadRequest
7766 where
7767 ___E: ::fidl_next::Encoder + ?Sized,
7768 ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
7769 {
7770 #[inline]
7771 fn encode_option(
7772 this: ::core::option::Option<Self>,
7773 encoder: &mut ___E,
7774 out: &mut ::core::mem::MaybeUninit<
7775 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7776 >,
7777 _: (),
7778 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7779 if let Some(inner) = this {
7780 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7781 ::fidl_next::wire::Box::encode_present(out);
7782 } else {
7783 ::fidl_next::wire::Box::encode_absent(out);
7784 }
7785
7786 Ok(())
7787 }
7788 }
7789
7790 unsafe impl<'a, ___E>
7791 ::fidl_next::EncodeOption<
7792 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7793 ___E,
7794 > for &'a ReadableReadRequest
7795 where
7796 ___E: ::fidl_next::Encoder + ?Sized,
7797 &'a ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
7798 {
7799 #[inline]
7800 fn encode_option(
7801 this: ::core::option::Option<Self>,
7802 encoder: &mut ___E,
7803 out: &mut ::core::mem::MaybeUninit<
7804 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7805 >,
7806 _: (),
7807 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7808 if let Some(inner) = this {
7809 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7810 ::fidl_next::wire::Box::encode_present(out);
7811 } else {
7812 ::fidl_next::wire::Box::encode_absent(out);
7813 }
7814
7815 Ok(())
7816 }
7817 }
7818
7819 impl ::fidl_next::FromWire<crate::wire::ReadableReadRequest> for ReadableReadRequest {
7820 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7821 crate::wire::ReadableReadRequest,
7822 Self,
7823 > = unsafe {
7824 ::fidl_next::CopyOptimization::enable_if(
7825 true
7826 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
7827 .is_enabled(),
7828 )
7829 };
7830
7831 #[inline]
7832 fn from_wire(wire: crate::wire::ReadableReadRequest) -> Self {
7833 Self { count: ::fidl_next::FromWire::from_wire(wire.count) }
7834 }
7835 }
7836
7837 impl ::fidl_next::FromWireRef<crate::wire::ReadableReadRequest> for ReadableReadRequest {
7838 #[inline]
7839 fn from_wire_ref(wire: &crate::wire::ReadableReadRequest) -> Self {
7840 Self { count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count) }
7841 }
7842 }
7843
7844 #[doc = " The byte vector type used for read/write operations.\n"]
7845 pub type Transfer = ::std::vec::Vec<u8>;
7846
7847 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7848 pub struct ReadableReadResponse {
7849 pub data: ::std::vec::Vec<u8>,
7850 }
7851
7852 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
7853 for ReadableReadResponse
7854 where
7855 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7856 ___E: ::fidl_next::Encoder,
7857 {
7858 #[inline]
7859 fn encode(
7860 self,
7861 encoder_: &mut ___E,
7862 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
7863 _: (),
7864 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7865 ::fidl_next::munge! {
7866 let crate::wire::ReadableReadResponse {
7867 data,
7868
7869 } = out_;
7870 }
7871
7872 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
7873
7874 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
7875 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
7876
7877 Ok(())
7878 }
7879 }
7880
7881 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
7882 for &'a ReadableReadResponse
7883 where
7884 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7885 ___E: ::fidl_next::Encoder,
7886 {
7887 #[inline]
7888 fn encode(
7889 self,
7890 encoder_: &mut ___E,
7891 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
7892 _: (),
7893 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7894 ::fidl_next::munge! {
7895 let crate::wire::ReadableReadResponse {
7896 data,
7897
7898 } = out_;
7899 }
7900
7901 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
7902
7903 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
7904 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
7905
7906 Ok(())
7907 }
7908 }
7909
7910 unsafe impl<___E>
7911 ::fidl_next::EncodeOption<
7912 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7913 ___E,
7914 > for ReadableReadResponse
7915 where
7916 ___E: ::fidl_next::Encoder + ?Sized,
7917 ReadableReadResponse: ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
7918 {
7919 #[inline]
7920 fn encode_option(
7921 this: ::core::option::Option<Self>,
7922 encoder: &mut ___E,
7923 out: &mut ::core::mem::MaybeUninit<
7924 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7925 >,
7926 _: (),
7927 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7928 if let Some(inner) = this {
7929 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7930 ::fidl_next::wire::Box::encode_present(out);
7931 } else {
7932 ::fidl_next::wire::Box::encode_absent(out);
7933 }
7934
7935 Ok(())
7936 }
7937 }
7938
7939 unsafe impl<'a, ___E>
7940 ::fidl_next::EncodeOption<
7941 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7942 ___E,
7943 > for &'a ReadableReadResponse
7944 where
7945 ___E: ::fidl_next::Encoder + ?Sized,
7946 &'a ReadableReadResponse:
7947 ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
7948 {
7949 #[inline]
7950 fn encode_option(
7951 this: ::core::option::Option<Self>,
7952 encoder: &mut ___E,
7953 out: &mut ::core::mem::MaybeUninit<
7954 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7955 >,
7956 _: (),
7957 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7958 if let Some(inner) = this {
7959 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7960 ::fidl_next::wire::Box::encode_present(out);
7961 } else {
7962 ::fidl_next::wire::Box::encode_absent(out);
7963 }
7964
7965 Ok(())
7966 }
7967 }
7968
7969 impl<'de> ::fidl_next::FromWire<crate::wire::ReadableReadResponse<'de>> for ReadableReadResponse {
7970 #[inline]
7971 fn from_wire(wire: crate::wire::ReadableReadResponse<'de>) -> Self {
7972 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
7973 }
7974 }
7975
7976 impl<'de> ::fidl_next::FromWireRef<crate::wire::ReadableReadResponse<'de>>
7977 for ReadableReadResponse
7978 {
7979 #[inline]
7980 fn from_wire_ref(wire: &crate::wire::ReadableReadResponse<'de>) -> Self {
7981 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
7982 }
7983 }
7984
7985 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7986 pub struct WritableWriteRequest {
7987 pub data: ::std::vec::Vec<u8>,
7988 }
7989
7990 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
7991 for WritableWriteRequest
7992 where
7993 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7994 ___E: ::fidl_next::Encoder,
7995 {
7996 #[inline]
7997 fn encode(
7998 self,
7999 encoder_: &mut ___E,
8000 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
8001 _: (),
8002 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8003 ::fidl_next::munge! {
8004 let crate::wire::WritableWriteRequest {
8005 data,
8006
8007 } = out_;
8008 }
8009
8010 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
8011
8012 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8013 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8014
8015 Ok(())
8016 }
8017 }
8018
8019 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
8020 for &'a WritableWriteRequest
8021 where
8022 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8023 ___E: ::fidl_next::Encoder,
8024 {
8025 #[inline]
8026 fn encode(
8027 self,
8028 encoder_: &mut ___E,
8029 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
8030 _: (),
8031 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8032 ::fidl_next::munge! {
8033 let crate::wire::WritableWriteRequest {
8034 data,
8035
8036 } = out_;
8037 }
8038
8039 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
8040
8041 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8042 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8043
8044 Ok(())
8045 }
8046 }
8047
8048 unsafe impl<___E>
8049 ::fidl_next::EncodeOption<
8050 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8051 ___E,
8052 > for WritableWriteRequest
8053 where
8054 ___E: ::fidl_next::Encoder + ?Sized,
8055 WritableWriteRequest: ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
8056 {
8057 #[inline]
8058 fn encode_option(
8059 this: ::core::option::Option<Self>,
8060 encoder: &mut ___E,
8061 out: &mut ::core::mem::MaybeUninit<
8062 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8063 >,
8064 _: (),
8065 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8066 if let Some(inner) = this {
8067 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8068 ::fidl_next::wire::Box::encode_present(out);
8069 } else {
8070 ::fidl_next::wire::Box::encode_absent(out);
8071 }
8072
8073 Ok(())
8074 }
8075 }
8076
8077 unsafe impl<'a, ___E>
8078 ::fidl_next::EncodeOption<
8079 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8080 ___E,
8081 > for &'a WritableWriteRequest
8082 where
8083 ___E: ::fidl_next::Encoder + ?Sized,
8084 &'a WritableWriteRequest:
8085 ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
8086 {
8087 #[inline]
8088 fn encode_option(
8089 this: ::core::option::Option<Self>,
8090 encoder: &mut ___E,
8091 out: &mut ::core::mem::MaybeUninit<
8092 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8093 >,
8094 _: (),
8095 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8096 if let Some(inner) = this {
8097 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8098 ::fidl_next::wire::Box::encode_present(out);
8099 } else {
8100 ::fidl_next::wire::Box::encode_absent(out);
8101 }
8102
8103 Ok(())
8104 }
8105 }
8106
8107 impl<'de> ::fidl_next::FromWire<crate::wire::WritableWriteRequest<'de>> for WritableWriteRequest {
8108 #[inline]
8109 fn from_wire(wire: crate::wire::WritableWriteRequest<'de>) -> Self {
8110 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
8111 }
8112 }
8113
8114 impl<'de> ::fidl_next::FromWireRef<crate::wire::WritableWriteRequest<'de>>
8115 for WritableWriteRequest
8116 {
8117 #[inline]
8118 fn from_wire_ref(wire: &crate::wire::WritableWriteRequest<'de>) -> Self {
8119 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
8120 }
8121 }
8122
8123 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8124 #[repr(C)]
8125 pub struct WritableWriteResponse {
8126 pub actual_count: u64,
8127 }
8128
8129 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
8130 for WritableWriteResponse
8131 where
8132 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8133 {
8134 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8135 Self,
8136 crate::wire::WritableWriteResponse,
8137 > = unsafe {
8138 ::fidl_next::CopyOptimization::enable_if(
8139 true
8140
8141 && <
8142 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8143 >::COPY_OPTIMIZATION.is_enabled()
8144
8145 )
8146 };
8147
8148 #[inline]
8149 fn encode(
8150 self,
8151 encoder_: &mut ___E,
8152 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
8153 _: (),
8154 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8155 ::fidl_next::munge! {
8156 let crate::wire::WritableWriteResponse {
8157 actual_count,
8158
8159 } = out_;
8160 }
8161
8162 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
8163
8164 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
8165
8166 Ok(())
8167 }
8168 }
8169
8170 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
8171 for &'a WritableWriteResponse
8172 where
8173 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8174 {
8175 #[inline]
8176 fn encode(
8177 self,
8178 encoder_: &mut ___E,
8179 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
8180 _: (),
8181 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8182 ::fidl_next::munge! {
8183 let crate::wire::WritableWriteResponse {
8184 actual_count,
8185
8186 } = out_;
8187 }
8188
8189 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
8190
8191 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
8192
8193 Ok(())
8194 }
8195 }
8196
8197 unsafe impl<___E>
8198 ::fidl_next::EncodeOption<
8199 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8200 ___E,
8201 > for WritableWriteResponse
8202 where
8203 ___E: ::fidl_next::Encoder + ?Sized,
8204 WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
8205 {
8206 #[inline]
8207 fn encode_option(
8208 this: ::core::option::Option<Self>,
8209 encoder: &mut ___E,
8210 out: &mut ::core::mem::MaybeUninit<
8211 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8212 >,
8213 _: (),
8214 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8215 if let Some(inner) = this {
8216 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8217 ::fidl_next::wire::Box::encode_present(out);
8218 } else {
8219 ::fidl_next::wire::Box::encode_absent(out);
8220 }
8221
8222 Ok(())
8223 }
8224 }
8225
8226 unsafe impl<'a, ___E>
8227 ::fidl_next::EncodeOption<
8228 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8229 ___E,
8230 > for &'a WritableWriteResponse
8231 where
8232 ___E: ::fidl_next::Encoder + ?Sized,
8233 &'a WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
8234 {
8235 #[inline]
8236 fn encode_option(
8237 this: ::core::option::Option<Self>,
8238 encoder: &mut ___E,
8239 out: &mut ::core::mem::MaybeUninit<
8240 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8241 >,
8242 _: (),
8243 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8244 if let Some(inner) = this {
8245 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8246 ::fidl_next::wire::Box::encode_present(out);
8247 } else {
8248 ::fidl_next::wire::Box::encode_absent(out);
8249 }
8250
8251 Ok(())
8252 }
8253 }
8254
8255 impl ::fidl_next::FromWire<crate::wire::WritableWriteResponse> for WritableWriteResponse {
8256 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8257 crate::wire::WritableWriteResponse,
8258 Self,
8259 > = unsafe {
8260 ::fidl_next::CopyOptimization::enable_if(
8261 true
8262 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8263 .is_enabled(),
8264 )
8265 };
8266
8267 #[inline]
8268 fn from_wire(wire: crate::wire::WritableWriteResponse) -> Self {
8269 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
8270 }
8271 }
8272
8273 impl ::fidl_next::FromWireRef<crate::wire::WritableWriteResponse> for WritableWriteResponse {
8274 #[inline]
8275 fn from_wire_ref(wire: &crate::wire::WritableWriteResponse) -> Self {
8276 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
8277 }
8278 }
8279
8280 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8281 pub struct FileSeekRequest {
8282 pub origin: crate::natural::SeekOrigin,
8283
8284 pub offset: i64,
8285 }
8286
8287 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E> for FileSeekRequest
8288 where
8289 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8290 {
8291 #[inline]
8292 fn encode(
8293 self,
8294 encoder_: &mut ___E,
8295 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
8296 _: (),
8297 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8298 ::fidl_next::munge! {
8299 let crate::wire::FileSeekRequest {
8300 origin,
8301 offset,
8302
8303 } = out_;
8304 }
8305
8306 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
8307
8308 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
8309
8310 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8311
8312 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8313
8314 Ok(())
8315 }
8316 }
8317
8318 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
8319 for &'a FileSeekRequest
8320 where
8321 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8322 {
8323 #[inline]
8324 fn encode(
8325 self,
8326 encoder_: &mut ___E,
8327 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
8328 _: (),
8329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8330 ::fidl_next::munge! {
8331 let crate::wire::FileSeekRequest {
8332 origin,
8333 offset,
8334
8335 } = out_;
8336 }
8337
8338 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
8339
8340 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
8341
8342 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8343
8344 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8345
8346 Ok(())
8347 }
8348 }
8349
8350 unsafe impl<___E>
8351 ::fidl_next::EncodeOption<
8352 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8353 ___E,
8354 > for FileSeekRequest
8355 where
8356 ___E: ::fidl_next::Encoder + ?Sized,
8357 FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
8358 {
8359 #[inline]
8360 fn encode_option(
8361 this: ::core::option::Option<Self>,
8362 encoder: &mut ___E,
8363 out: &mut ::core::mem::MaybeUninit<
8364 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8365 >,
8366 _: (),
8367 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8368 if let Some(inner) = this {
8369 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8370 ::fidl_next::wire::Box::encode_present(out);
8371 } else {
8372 ::fidl_next::wire::Box::encode_absent(out);
8373 }
8374
8375 Ok(())
8376 }
8377 }
8378
8379 unsafe impl<'a, ___E>
8380 ::fidl_next::EncodeOption<
8381 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8382 ___E,
8383 > for &'a FileSeekRequest
8384 where
8385 ___E: ::fidl_next::Encoder + ?Sized,
8386 &'a FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
8387 {
8388 #[inline]
8389 fn encode_option(
8390 this: ::core::option::Option<Self>,
8391 encoder: &mut ___E,
8392 out: &mut ::core::mem::MaybeUninit<
8393 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8394 >,
8395 _: (),
8396 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8397 if let Some(inner) = this {
8398 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8399 ::fidl_next::wire::Box::encode_present(out);
8400 } else {
8401 ::fidl_next::wire::Box::encode_absent(out);
8402 }
8403
8404 Ok(())
8405 }
8406 }
8407
8408 impl ::fidl_next::FromWire<crate::wire::FileSeekRequest> for FileSeekRequest {
8409 #[inline]
8410 fn from_wire(wire: crate::wire::FileSeekRequest) -> Self {
8411 Self {
8412 origin: ::fidl_next::FromWire::from_wire(wire.origin),
8413
8414 offset: ::fidl_next::FromWire::from_wire(wire.offset),
8415 }
8416 }
8417 }
8418
8419 impl ::fidl_next::FromWireRef<crate::wire::FileSeekRequest> for FileSeekRequest {
8420 #[inline]
8421 fn from_wire_ref(wire: &crate::wire::FileSeekRequest) -> Self {
8422 Self {
8423 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
8424
8425 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
8426 }
8427 }
8428 }
8429
8430 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8431 #[repr(C)]
8432 pub struct FileSeekResponse {
8433 pub offset_from_start: u64,
8434 }
8435
8436 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E> for FileSeekResponse
8437 where
8438 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8439 {
8440 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8441 Self,
8442 crate::wire::FileSeekResponse,
8443 > = unsafe {
8444 ::fidl_next::CopyOptimization::enable_if(
8445 true
8446
8447 && <
8448 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8449 >::COPY_OPTIMIZATION.is_enabled()
8450
8451 )
8452 };
8453
8454 #[inline]
8455 fn encode(
8456 self,
8457 encoder_: &mut ___E,
8458 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
8459 _: (),
8460 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8461 ::fidl_next::munge! {
8462 let crate::wire::FileSeekResponse {
8463 offset_from_start,
8464
8465 } = out_;
8466 }
8467
8468 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
8469
8470 let mut _field =
8471 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
8472
8473 Ok(())
8474 }
8475 }
8476
8477 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
8478 for &'a FileSeekResponse
8479 where
8480 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8481 {
8482 #[inline]
8483 fn encode(
8484 self,
8485 encoder_: &mut ___E,
8486 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
8487 _: (),
8488 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8489 ::fidl_next::munge! {
8490 let crate::wire::FileSeekResponse {
8491 offset_from_start,
8492
8493 } = out_;
8494 }
8495
8496 ::fidl_next::Encode::encode(&self.offset_from_start, encoder_, offset_from_start, ())?;
8497
8498 let mut _field =
8499 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
8500
8501 Ok(())
8502 }
8503 }
8504
8505 unsafe impl<___E>
8506 ::fidl_next::EncodeOption<
8507 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8508 ___E,
8509 > for FileSeekResponse
8510 where
8511 ___E: ::fidl_next::Encoder + ?Sized,
8512 FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
8513 {
8514 #[inline]
8515 fn encode_option(
8516 this: ::core::option::Option<Self>,
8517 encoder: &mut ___E,
8518 out: &mut ::core::mem::MaybeUninit<
8519 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8520 >,
8521 _: (),
8522 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8523 if let Some(inner) = this {
8524 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8525 ::fidl_next::wire::Box::encode_present(out);
8526 } else {
8527 ::fidl_next::wire::Box::encode_absent(out);
8528 }
8529
8530 Ok(())
8531 }
8532 }
8533
8534 unsafe impl<'a, ___E>
8535 ::fidl_next::EncodeOption<
8536 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8537 ___E,
8538 > for &'a FileSeekResponse
8539 where
8540 ___E: ::fidl_next::Encoder + ?Sized,
8541 &'a FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
8542 {
8543 #[inline]
8544 fn encode_option(
8545 this: ::core::option::Option<Self>,
8546 encoder: &mut ___E,
8547 out: &mut ::core::mem::MaybeUninit<
8548 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8549 >,
8550 _: (),
8551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8552 if let Some(inner) = this {
8553 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8554 ::fidl_next::wire::Box::encode_present(out);
8555 } else {
8556 ::fidl_next::wire::Box::encode_absent(out);
8557 }
8558
8559 Ok(())
8560 }
8561 }
8562
8563 impl ::fidl_next::FromWire<crate::wire::FileSeekResponse> for FileSeekResponse {
8564 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8565 crate::wire::FileSeekResponse,
8566 Self,
8567 > = unsafe {
8568 ::fidl_next::CopyOptimization::enable_if(
8569 true
8570 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8571 .is_enabled(),
8572 )
8573 };
8574
8575 #[inline]
8576 fn from_wire(wire: crate::wire::FileSeekResponse) -> Self {
8577 Self { offset_from_start: ::fidl_next::FromWire::from_wire(wire.offset_from_start) }
8578 }
8579 }
8580
8581 impl ::fidl_next::FromWireRef<crate::wire::FileSeekResponse> for FileSeekResponse {
8582 #[inline]
8583 fn from_wire_ref(wire: &crate::wire::FileSeekResponse) -> Self {
8584 Self {
8585 offset_from_start: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset_from_start),
8586 }
8587 }
8588 }
8589
8590 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8591 #[repr(C)]
8592 pub struct FileReadAtRequest {
8593 pub count: u64,
8594
8595 pub offset: u64,
8596 }
8597
8598 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E> for FileReadAtRequest
8599 where
8600 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8601 {
8602 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8603 Self,
8604 crate::wire::FileReadAtRequest,
8605 > = unsafe {
8606 ::fidl_next::CopyOptimization::enable_if(
8607 true
8608
8609 && <
8610 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8611 >::COPY_OPTIMIZATION.is_enabled()
8612
8613 && <
8614 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8615 >::COPY_OPTIMIZATION.is_enabled()
8616
8617 )
8618 };
8619
8620 #[inline]
8621 fn encode(
8622 self,
8623 encoder_: &mut ___E,
8624 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
8625 _: (),
8626 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8627 ::fidl_next::munge! {
8628 let crate::wire::FileReadAtRequest {
8629 count,
8630 offset,
8631
8632 } = out_;
8633 }
8634
8635 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
8636
8637 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
8638
8639 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8640
8641 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8642
8643 Ok(())
8644 }
8645 }
8646
8647 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
8648 for &'a FileReadAtRequest
8649 where
8650 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8651 {
8652 #[inline]
8653 fn encode(
8654 self,
8655 encoder_: &mut ___E,
8656 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
8657 _: (),
8658 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8659 ::fidl_next::munge! {
8660 let crate::wire::FileReadAtRequest {
8661 count,
8662 offset,
8663
8664 } = out_;
8665 }
8666
8667 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
8668
8669 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
8670
8671 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8672
8673 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8674
8675 Ok(())
8676 }
8677 }
8678
8679 unsafe impl<___E>
8680 ::fidl_next::EncodeOption<
8681 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8682 ___E,
8683 > for FileReadAtRequest
8684 where
8685 ___E: ::fidl_next::Encoder + ?Sized,
8686 FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
8687 {
8688 #[inline]
8689 fn encode_option(
8690 this: ::core::option::Option<Self>,
8691 encoder: &mut ___E,
8692 out: &mut ::core::mem::MaybeUninit<
8693 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8694 >,
8695 _: (),
8696 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8697 if let Some(inner) = this {
8698 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8699 ::fidl_next::wire::Box::encode_present(out);
8700 } else {
8701 ::fidl_next::wire::Box::encode_absent(out);
8702 }
8703
8704 Ok(())
8705 }
8706 }
8707
8708 unsafe impl<'a, ___E>
8709 ::fidl_next::EncodeOption<
8710 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8711 ___E,
8712 > for &'a FileReadAtRequest
8713 where
8714 ___E: ::fidl_next::Encoder + ?Sized,
8715 &'a FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
8716 {
8717 #[inline]
8718 fn encode_option(
8719 this: ::core::option::Option<Self>,
8720 encoder: &mut ___E,
8721 out: &mut ::core::mem::MaybeUninit<
8722 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8723 >,
8724 _: (),
8725 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8726 if let Some(inner) = this {
8727 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8728 ::fidl_next::wire::Box::encode_present(out);
8729 } else {
8730 ::fidl_next::wire::Box::encode_absent(out);
8731 }
8732
8733 Ok(())
8734 }
8735 }
8736
8737 impl ::fidl_next::FromWire<crate::wire::FileReadAtRequest> for FileReadAtRequest {
8738 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8739 crate::wire::FileReadAtRequest,
8740 Self,
8741 > = unsafe {
8742 ::fidl_next::CopyOptimization::enable_if(
8743 true
8744 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8745 .is_enabled()
8746 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8747 .is_enabled(),
8748 )
8749 };
8750
8751 #[inline]
8752 fn from_wire(wire: crate::wire::FileReadAtRequest) -> Self {
8753 Self {
8754 count: ::fidl_next::FromWire::from_wire(wire.count),
8755
8756 offset: ::fidl_next::FromWire::from_wire(wire.offset),
8757 }
8758 }
8759 }
8760
8761 impl ::fidl_next::FromWireRef<crate::wire::FileReadAtRequest> for FileReadAtRequest {
8762 #[inline]
8763 fn from_wire_ref(wire: &crate::wire::FileReadAtRequest) -> Self {
8764 Self {
8765 count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count),
8766
8767 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
8768 }
8769 }
8770 }
8771
8772 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8773 pub struct FileReadAtResponse {
8774 pub data: ::std::vec::Vec<u8>,
8775 }
8776
8777 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
8778 for FileReadAtResponse
8779 where
8780 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8781 ___E: ::fidl_next::Encoder,
8782 {
8783 #[inline]
8784 fn encode(
8785 self,
8786 encoder_: &mut ___E,
8787 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
8788 _: (),
8789 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8790 ::fidl_next::munge! {
8791 let crate::wire::FileReadAtResponse {
8792 data,
8793
8794 } = out_;
8795 }
8796
8797 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
8798
8799 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8800 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8801
8802 Ok(())
8803 }
8804 }
8805
8806 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
8807 for &'a FileReadAtResponse
8808 where
8809 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8810 ___E: ::fidl_next::Encoder,
8811 {
8812 #[inline]
8813 fn encode(
8814 self,
8815 encoder_: &mut ___E,
8816 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
8817 _: (),
8818 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8819 ::fidl_next::munge! {
8820 let crate::wire::FileReadAtResponse {
8821 data,
8822
8823 } = out_;
8824 }
8825
8826 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
8827
8828 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8829 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8830
8831 Ok(())
8832 }
8833 }
8834
8835 unsafe impl<___E>
8836 ::fidl_next::EncodeOption<
8837 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8838 ___E,
8839 > for FileReadAtResponse
8840 where
8841 ___E: ::fidl_next::Encoder + ?Sized,
8842 FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
8843 {
8844 #[inline]
8845 fn encode_option(
8846 this: ::core::option::Option<Self>,
8847 encoder: &mut ___E,
8848 out: &mut ::core::mem::MaybeUninit<
8849 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8850 >,
8851 _: (),
8852 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8853 if let Some(inner) = this {
8854 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8855 ::fidl_next::wire::Box::encode_present(out);
8856 } else {
8857 ::fidl_next::wire::Box::encode_absent(out);
8858 }
8859
8860 Ok(())
8861 }
8862 }
8863
8864 unsafe impl<'a, ___E>
8865 ::fidl_next::EncodeOption<
8866 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8867 ___E,
8868 > for &'a FileReadAtResponse
8869 where
8870 ___E: ::fidl_next::Encoder + ?Sized,
8871 &'a FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
8872 {
8873 #[inline]
8874 fn encode_option(
8875 this: ::core::option::Option<Self>,
8876 encoder: &mut ___E,
8877 out: &mut ::core::mem::MaybeUninit<
8878 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8879 >,
8880 _: (),
8881 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8882 if let Some(inner) = this {
8883 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8884 ::fidl_next::wire::Box::encode_present(out);
8885 } else {
8886 ::fidl_next::wire::Box::encode_absent(out);
8887 }
8888
8889 Ok(())
8890 }
8891 }
8892
8893 impl<'de> ::fidl_next::FromWire<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
8894 #[inline]
8895 fn from_wire(wire: crate::wire::FileReadAtResponse<'de>) -> Self {
8896 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
8897 }
8898 }
8899
8900 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
8901 #[inline]
8902 fn from_wire_ref(wire: &crate::wire::FileReadAtResponse<'de>) -> Self {
8903 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
8904 }
8905 }
8906
8907 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8908 pub struct FileWriteAtRequest {
8909 pub data: ::std::vec::Vec<u8>,
8910
8911 pub offset: u64,
8912 }
8913
8914 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
8915 for FileWriteAtRequest
8916 where
8917 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8918 ___E: ::fidl_next::Encoder,
8919 {
8920 #[inline]
8921 fn encode(
8922 self,
8923 encoder_: &mut ___E,
8924 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
8925 _: (),
8926 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8927 ::fidl_next::munge! {
8928 let crate::wire::FileWriteAtRequest {
8929 data,
8930 offset,
8931
8932 } = out_;
8933 }
8934
8935 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
8936
8937 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8938 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8939
8940 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8941
8942 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8943
8944 Ok(())
8945 }
8946 }
8947
8948 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
8949 for &'a FileWriteAtRequest
8950 where
8951 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8952 ___E: ::fidl_next::Encoder,
8953 {
8954 #[inline]
8955 fn encode(
8956 self,
8957 encoder_: &mut ___E,
8958 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
8959 _: (),
8960 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8961 ::fidl_next::munge! {
8962 let crate::wire::FileWriteAtRequest {
8963 data,
8964 offset,
8965
8966 } = out_;
8967 }
8968
8969 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
8970
8971 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8972 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8973
8974 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8975
8976 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8977
8978 Ok(())
8979 }
8980 }
8981
8982 unsafe impl<___E>
8983 ::fidl_next::EncodeOption<
8984 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
8985 ___E,
8986 > for FileWriteAtRequest
8987 where
8988 ___E: ::fidl_next::Encoder + ?Sized,
8989 FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
8990 {
8991 #[inline]
8992 fn encode_option(
8993 this: ::core::option::Option<Self>,
8994 encoder: &mut ___E,
8995 out: &mut ::core::mem::MaybeUninit<
8996 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
8997 >,
8998 _: (),
8999 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9000 if let Some(inner) = this {
9001 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9002 ::fidl_next::wire::Box::encode_present(out);
9003 } else {
9004 ::fidl_next::wire::Box::encode_absent(out);
9005 }
9006
9007 Ok(())
9008 }
9009 }
9010
9011 unsafe impl<'a, ___E>
9012 ::fidl_next::EncodeOption<
9013 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
9014 ___E,
9015 > for &'a FileWriteAtRequest
9016 where
9017 ___E: ::fidl_next::Encoder + ?Sized,
9018 &'a FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
9019 {
9020 #[inline]
9021 fn encode_option(
9022 this: ::core::option::Option<Self>,
9023 encoder: &mut ___E,
9024 out: &mut ::core::mem::MaybeUninit<
9025 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
9026 >,
9027 _: (),
9028 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9029 if let Some(inner) = this {
9030 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9031 ::fidl_next::wire::Box::encode_present(out);
9032 } else {
9033 ::fidl_next::wire::Box::encode_absent(out);
9034 }
9035
9036 Ok(())
9037 }
9038 }
9039
9040 impl<'de> ::fidl_next::FromWire<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
9041 #[inline]
9042 fn from_wire(wire: crate::wire::FileWriteAtRequest<'de>) -> Self {
9043 Self {
9044 data: ::fidl_next::FromWire::from_wire(wire.data),
9045
9046 offset: ::fidl_next::FromWire::from_wire(wire.offset),
9047 }
9048 }
9049 }
9050
9051 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
9052 #[inline]
9053 fn from_wire_ref(wire: &crate::wire::FileWriteAtRequest<'de>) -> Self {
9054 Self {
9055 data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data),
9056
9057 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
9058 }
9059 }
9060 }
9061
9062 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9063 #[repr(C)]
9064 pub struct FileWriteAtResponse {
9065 pub actual_count: u64,
9066 }
9067
9068 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
9069 for FileWriteAtResponse
9070 where
9071 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9072 {
9073 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9074 Self,
9075 crate::wire::FileWriteAtResponse,
9076 > = unsafe {
9077 ::fidl_next::CopyOptimization::enable_if(
9078 true
9079
9080 && <
9081 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9082 >::COPY_OPTIMIZATION.is_enabled()
9083
9084 )
9085 };
9086
9087 #[inline]
9088 fn encode(
9089 self,
9090 encoder_: &mut ___E,
9091 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
9092 _: (),
9093 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9094 ::fidl_next::munge! {
9095 let crate::wire::FileWriteAtResponse {
9096 actual_count,
9097
9098 } = out_;
9099 }
9100
9101 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
9102
9103 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9104
9105 Ok(())
9106 }
9107 }
9108
9109 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
9110 for &'a FileWriteAtResponse
9111 where
9112 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9113 {
9114 #[inline]
9115 fn encode(
9116 self,
9117 encoder_: &mut ___E,
9118 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
9119 _: (),
9120 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9121 ::fidl_next::munge! {
9122 let crate::wire::FileWriteAtResponse {
9123 actual_count,
9124
9125 } = out_;
9126 }
9127
9128 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
9129
9130 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9131
9132 Ok(())
9133 }
9134 }
9135
9136 unsafe impl<___E>
9137 ::fidl_next::EncodeOption<
9138 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9139 ___E,
9140 > for FileWriteAtResponse
9141 where
9142 ___E: ::fidl_next::Encoder + ?Sized,
9143 FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
9144 {
9145 #[inline]
9146 fn encode_option(
9147 this: ::core::option::Option<Self>,
9148 encoder: &mut ___E,
9149 out: &mut ::core::mem::MaybeUninit<
9150 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9151 >,
9152 _: (),
9153 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9154 if let Some(inner) = this {
9155 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9156 ::fidl_next::wire::Box::encode_present(out);
9157 } else {
9158 ::fidl_next::wire::Box::encode_absent(out);
9159 }
9160
9161 Ok(())
9162 }
9163 }
9164
9165 unsafe impl<'a, ___E>
9166 ::fidl_next::EncodeOption<
9167 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9168 ___E,
9169 > for &'a FileWriteAtResponse
9170 where
9171 ___E: ::fidl_next::Encoder + ?Sized,
9172 &'a FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
9173 {
9174 #[inline]
9175 fn encode_option(
9176 this: ::core::option::Option<Self>,
9177 encoder: &mut ___E,
9178 out: &mut ::core::mem::MaybeUninit<
9179 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9180 >,
9181 _: (),
9182 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9183 if let Some(inner) = this {
9184 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9185 ::fidl_next::wire::Box::encode_present(out);
9186 } else {
9187 ::fidl_next::wire::Box::encode_absent(out);
9188 }
9189
9190 Ok(())
9191 }
9192 }
9193
9194 impl ::fidl_next::FromWire<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
9195 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9196 crate::wire::FileWriteAtResponse,
9197 Self,
9198 > = unsafe {
9199 ::fidl_next::CopyOptimization::enable_if(
9200 true
9201 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9202 .is_enabled(),
9203 )
9204 };
9205
9206 #[inline]
9207 fn from_wire(wire: crate::wire::FileWriteAtResponse) -> Self {
9208 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
9209 }
9210 }
9211
9212 impl ::fidl_next::FromWireRef<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
9213 #[inline]
9214 fn from_wire_ref(wire: &crate::wire::FileWriteAtResponse) -> Self {
9215 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
9216 }
9217 }
9218
9219 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9220 #[repr(C)]
9221 pub struct FileResizeRequest {
9222 pub length: u64,
9223 }
9224
9225 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E> for FileResizeRequest
9226 where
9227 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9228 {
9229 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9230 Self,
9231 crate::wire::FileResizeRequest,
9232 > = unsafe {
9233 ::fidl_next::CopyOptimization::enable_if(
9234 true
9235
9236 && <
9237 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9238 >::COPY_OPTIMIZATION.is_enabled()
9239
9240 )
9241 };
9242
9243 #[inline]
9244 fn encode(
9245 self,
9246 encoder_: &mut ___E,
9247 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
9248 _: (),
9249 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9250 ::fidl_next::munge! {
9251 let crate::wire::FileResizeRequest {
9252 length,
9253
9254 } = out_;
9255 }
9256
9257 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
9258
9259 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
9260
9261 Ok(())
9262 }
9263 }
9264
9265 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
9266 for &'a FileResizeRequest
9267 where
9268 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9269 {
9270 #[inline]
9271 fn encode(
9272 self,
9273 encoder_: &mut ___E,
9274 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
9275 _: (),
9276 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9277 ::fidl_next::munge! {
9278 let crate::wire::FileResizeRequest {
9279 length,
9280
9281 } = out_;
9282 }
9283
9284 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
9285
9286 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
9287
9288 Ok(())
9289 }
9290 }
9291
9292 unsafe impl<___E>
9293 ::fidl_next::EncodeOption<
9294 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9295 ___E,
9296 > for FileResizeRequest
9297 where
9298 ___E: ::fidl_next::Encoder + ?Sized,
9299 FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
9300 {
9301 #[inline]
9302 fn encode_option(
9303 this: ::core::option::Option<Self>,
9304 encoder: &mut ___E,
9305 out: &mut ::core::mem::MaybeUninit<
9306 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9307 >,
9308 _: (),
9309 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9310 if let Some(inner) = this {
9311 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9312 ::fidl_next::wire::Box::encode_present(out);
9313 } else {
9314 ::fidl_next::wire::Box::encode_absent(out);
9315 }
9316
9317 Ok(())
9318 }
9319 }
9320
9321 unsafe impl<'a, ___E>
9322 ::fidl_next::EncodeOption<
9323 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9324 ___E,
9325 > for &'a FileResizeRequest
9326 where
9327 ___E: ::fidl_next::Encoder + ?Sized,
9328 &'a FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
9329 {
9330 #[inline]
9331 fn encode_option(
9332 this: ::core::option::Option<Self>,
9333 encoder: &mut ___E,
9334 out: &mut ::core::mem::MaybeUninit<
9335 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9336 >,
9337 _: (),
9338 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9339 if let Some(inner) = this {
9340 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9341 ::fidl_next::wire::Box::encode_present(out);
9342 } else {
9343 ::fidl_next::wire::Box::encode_absent(out);
9344 }
9345
9346 Ok(())
9347 }
9348 }
9349
9350 impl ::fidl_next::FromWire<crate::wire::FileResizeRequest> for FileResizeRequest {
9351 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9352 crate::wire::FileResizeRequest,
9353 Self,
9354 > = unsafe {
9355 ::fidl_next::CopyOptimization::enable_if(
9356 true
9357 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9358 .is_enabled(),
9359 )
9360 };
9361
9362 #[inline]
9363 fn from_wire(wire: crate::wire::FileResizeRequest) -> Self {
9364 Self { length: ::fidl_next::FromWire::from_wire(wire.length) }
9365 }
9366 }
9367
9368 impl ::fidl_next::FromWireRef<crate::wire::FileResizeRequest> for FileResizeRequest {
9369 #[inline]
9370 fn from_wire_ref(wire: &crate::wire::FileResizeRequest) -> Self {
9371 Self { length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length) }
9372 }
9373 }
9374
9375 pub type FileResizeResponse = ();
9376
9377 ::fidl_next::bitflags::bitflags! {
9378 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct VmoFlags: u32 {
9379 #[doc = " Requests that the VMO be readable.\n"]const READ = 1;
9380 #[doc = " Requests that the VMO be writable.\n"]const WRITE = 2;
9381 #[doc = " Request that the VMO be executable.\n"]const EXECUTE = 4;
9382 #[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;
9383 #[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;
9384
9385 }
9386 }
9387
9388 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for VmoFlags
9389 where
9390 ___E: ?Sized,
9391 {
9392 #[inline]
9393 fn encode(
9394 self,
9395 encoder: &mut ___E,
9396 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
9397 _: (),
9398 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9399 ::fidl_next::Encode::encode(&self, encoder, out, ())
9400 }
9401 }
9402
9403 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for &'a VmoFlags
9404 where
9405 ___E: ?Sized,
9406 {
9407 #[inline]
9408 fn encode(
9409 self,
9410 _: &mut ___E,
9411 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
9412 _: (),
9413 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9414 ::fidl_next::munge!(let crate::wire::VmoFlags { value } = out);
9415
9416 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
9417 return Err(::fidl_next::EncodeError::InvalidStrictBits);
9418 }
9419
9420 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
9421 Ok(())
9422 }
9423 }
9424
9425 impl ::core::convert::From<crate::wire::VmoFlags> for VmoFlags {
9426 fn from(wire: crate::wire::VmoFlags) -> Self {
9427 Self::from_bits_retain(u32::from(wire.value))
9428 }
9429 }
9430
9431 impl ::fidl_next::FromWire<crate::wire::VmoFlags> for VmoFlags {
9432 #[inline]
9433 fn from_wire(wire: crate::wire::VmoFlags) -> Self {
9434 Self::from(wire)
9435 }
9436 }
9437
9438 impl ::fidl_next::FromWireRef<crate::wire::VmoFlags> for VmoFlags {
9439 #[inline]
9440 fn from_wire_ref(wire: &crate::wire::VmoFlags) -> Self {
9441 Self::from(*wire)
9442 }
9443 }
9444
9445 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9446 #[repr(C)]
9447 pub struct FileGetBackingMemoryRequest {
9448 pub flags: crate::natural::VmoFlags,
9449 }
9450
9451 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
9452 for FileGetBackingMemoryRequest
9453 where
9454 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9455 {
9456 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9457 Self,
9458 crate::wire::FileGetBackingMemoryRequest,
9459 > = unsafe {
9460 ::fidl_next::CopyOptimization::enable_if(
9461 true && <crate::natural::VmoFlags as ::fidl_next::Encode<
9462 crate::wire::VmoFlags,
9463 ___E,
9464 >>::COPY_OPTIMIZATION
9465 .is_enabled(),
9466 )
9467 };
9468
9469 #[inline]
9470 fn encode(
9471 self,
9472 encoder_: &mut ___E,
9473 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
9474 _: (),
9475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9476 ::fidl_next::munge! {
9477 let crate::wire::FileGetBackingMemoryRequest {
9478 flags,
9479
9480 } = out_;
9481 }
9482
9483 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
9484
9485 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
9486
9487 Ok(())
9488 }
9489 }
9490
9491 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
9492 for &'a FileGetBackingMemoryRequest
9493 where
9494 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9495 {
9496 #[inline]
9497 fn encode(
9498 self,
9499 encoder_: &mut ___E,
9500 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
9501 _: (),
9502 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9503 ::fidl_next::munge! {
9504 let crate::wire::FileGetBackingMemoryRequest {
9505 flags,
9506
9507 } = out_;
9508 }
9509
9510 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
9511
9512 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
9513
9514 Ok(())
9515 }
9516 }
9517
9518 unsafe impl<___E>
9519 ::fidl_next::EncodeOption<
9520 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9521 ___E,
9522 > for FileGetBackingMemoryRequest
9523 where
9524 ___E: ::fidl_next::Encoder + ?Sized,
9525 FileGetBackingMemoryRequest:
9526 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
9527 {
9528 #[inline]
9529 fn encode_option(
9530 this: ::core::option::Option<Self>,
9531 encoder: &mut ___E,
9532 out: &mut ::core::mem::MaybeUninit<
9533 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9534 >,
9535 _: (),
9536 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9537 if let Some(inner) = this {
9538 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9539 ::fidl_next::wire::Box::encode_present(out);
9540 } else {
9541 ::fidl_next::wire::Box::encode_absent(out);
9542 }
9543
9544 Ok(())
9545 }
9546 }
9547
9548 unsafe impl<'a, ___E>
9549 ::fidl_next::EncodeOption<
9550 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9551 ___E,
9552 > for &'a FileGetBackingMemoryRequest
9553 where
9554 ___E: ::fidl_next::Encoder + ?Sized,
9555 &'a FileGetBackingMemoryRequest:
9556 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
9557 {
9558 #[inline]
9559 fn encode_option(
9560 this: ::core::option::Option<Self>,
9561 encoder: &mut ___E,
9562 out: &mut ::core::mem::MaybeUninit<
9563 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9564 >,
9565 _: (),
9566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9567 if let Some(inner) = this {
9568 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9569 ::fidl_next::wire::Box::encode_present(out);
9570 } else {
9571 ::fidl_next::wire::Box::encode_absent(out);
9572 }
9573
9574 Ok(())
9575 }
9576 }
9577
9578 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryRequest>
9579 for FileGetBackingMemoryRequest
9580 {
9581 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9582 crate::wire::FileGetBackingMemoryRequest,
9583 Self,
9584 > = unsafe {
9585 ::fidl_next::CopyOptimization::enable_if(
9586 true && <crate::natural::VmoFlags as ::fidl_next::FromWire<
9587 crate::wire::VmoFlags,
9588 >>::COPY_OPTIMIZATION
9589 .is_enabled(),
9590 )
9591 };
9592
9593 #[inline]
9594 fn from_wire(wire: crate::wire::FileGetBackingMemoryRequest) -> Self {
9595 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
9596 }
9597 }
9598
9599 impl ::fidl_next::FromWireRef<crate::wire::FileGetBackingMemoryRequest>
9600 for FileGetBackingMemoryRequest
9601 {
9602 #[inline]
9603 fn from_wire_ref(wire: &crate::wire::FileGetBackingMemoryRequest) -> Self {
9604 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
9605 }
9606 }
9607
9608 pub type LinkableLinkIntoResponse = ();
9609
9610 pub type FileAllocateResponse = ();
9611
9612 pub type FileEnableVerityResponse = ();
9613
9614 ::fidl_next::bitflags::bitflags! {
9615 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct FileSignal: u32 {
9616 #[doc = " Indicates the file is ready for reading.\n"]const READABLE = 16777216;
9617 #[doc = " Indicates the file is ready for writing.\n"]const WRITABLE = 33554432;
9618
9619 }
9620 }
9621
9622 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for FileSignal
9623 where
9624 ___E: ?Sized,
9625 {
9626 #[inline]
9627 fn encode(
9628 self,
9629 encoder: &mut ___E,
9630 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
9631 _: (),
9632 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9633 ::fidl_next::Encode::encode(&self, encoder, out, ())
9634 }
9635 }
9636
9637 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for &'a FileSignal
9638 where
9639 ___E: ?Sized,
9640 {
9641 #[inline]
9642 fn encode(
9643 self,
9644 _: &mut ___E,
9645 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
9646 _: (),
9647 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9648 ::fidl_next::munge!(let crate::wire::FileSignal { value } = out);
9649
9650 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
9651 return Err(::fidl_next::EncodeError::InvalidStrictBits);
9652 }
9653
9654 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
9655 Ok(())
9656 }
9657 }
9658
9659 impl ::core::convert::From<crate::wire::FileSignal> for FileSignal {
9660 fn from(wire: crate::wire::FileSignal) -> Self {
9661 Self::from_bits_retain(u32::from(wire.value))
9662 }
9663 }
9664
9665 impl ::fidl_next::FromWire<crate::wire::FileSignal> for FileSignal {
9666 #[inline]
9667 fn from_wire(wire: crate::wire::FileSignal) -> Self {
9668 Self::from(wire)
9669 }
9670 }
9671
9672 impl ::fidl_next::FromWireRef<crate::wire::FileSignal> for FileSignal {
9673 #[inline]
9674 fn from_wire_ref(wire: &crate::wire::FileSignal) -> Self {
9675 Self::from(*wire)
9676 }
9677 }
9678
9679 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9680 #[repr(C)]
9681 pub struct FilesystemInfo {
9682 pub total_bytes: u64,
9683
9684 pub used_bytes: u64,
9685
9686 pub total_nodes: u64,
9687
9688 pub used_nodes: u64,
9689
9690 pub free_shared_pool_bytes: u64,
9691
9692 pub fs_id: u64,
9693
9694 pub block_size: u32,
9695
9696 pub max_filename_size: u32,
9697
9698 pub fs_type: u32,
9699
9700 pub padding: u32,
9701
9702 pub name: [i8; 32],
9703 }
9704
9705 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for FilesystemInfo
9706 where
9707 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9708 {
9709 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FilesystemInfo> = unsafe {
9710 ::fidl_next::CopyOptimization::enable_if(
9711 true
9712
9713 && <
9714 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9715 >::COPY_OPTIMIZATION.is_enabled()
9716
9717 && <
9718 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9719 >::COPY_OPTIMIZATION.is_enabled()
9720
9721 && <
9722 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9723 >::COPY_OPTIMIZATION.is_enabled()
9724
9725 && <
9726 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9727 >::COPY_OPTIMIZATION.is_enabled()
9728
9729 && <
9730 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9731 >::COPY_OPTIMIZATION.is_enabled()
9732
9733 && <
9734 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9735 >::COPY_OPTIMIZATION.is_enabled()
9736
9737 && <
9738 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9739 >::COPY_OPTIMIZATION.is_enabled()
9740
9741 && <
9742 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9743 >::COPY_OPTIMIZATION.is_enabled()
9744
9745 && <
9746 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9747 >::COPY_OPTIMIZATION.is_enabled()
9748
9749 && <
9750 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9751 >::COPY_OPTIMIZATION.is_enabled()
9752
9753 && <
9754 [i8; 32] as ::fidl_next::Encode<[i8; 32], ___E>
9755 >::COPY_OPTIMIZATION.is_enabled()
9756
9757 )
9758 };
9759
9760 #[inline]
9761 fn encode(
9762 self,
9763 encoder_: &mut ___E,
9764 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
9765 _: (),
9766 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9767 ::fidl_next::munge! {
9768 let crate::wire::FilesystemInfo {
9769 total_bytes,
9770 used_bytes,
9771 total_nodes,
9772 used_nodes,
9773 free_shared_pool_bytes,
9774 fs_id,
9775 block_size,
9776 max_filename_size,
9777 fs_type,
9778 padding,
9779 name,
9780
9781 } = out_;
9782 }
9783
9784 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
9785
9786 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
9787
9788 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
9789
9790 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
9791
9792 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
9793
9794 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
9795
9796 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
9797
9798 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
9799
9800 ::fidl_next::Encode::encode(
9801 self.free_shared_pool_bytes,
9802 encoder_,
9803 free_shared_pool_bytes,
9804 (),
9805 )?;
9806
9807 let mut _field =
9808 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
9809
9810 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
9811
9812 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
9813
9814 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
9815
9816 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
9817
9818 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
9819
9820 let mut _field =
9821 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
9822
9823 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
9824
9825 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
9826
9827 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
9828
9829 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
9830
9831 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
9832
9833 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
9834
9835 Ok(())
9836 }
9837 }
9838
9839 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for &'a FilesystemInfo
9840 where
9841 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9842 {
9843 #[inline]
9844 fn encode(
9845 self,
9846 encoder_: &mut ___E,
9847 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
9848 _: (),
9849 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9850 ::fidl_next::munge! {
9851 let crate::wire::FilesystemInfo {
9852 total_bytes,
9853 used_bytes,
9854 total_nodes,
9855 used_nodes,
9856 free_shared_pool_bytes,
9857 fs_id,
9858 block_size,
9859 max_filename_size,
9860 fs_type,
9861 padding,
9862 name,
9863
9864 } = out_;
9865 }
9866
9867 ::fidl_next::Encode::encode(&self.total_bytes, encoder_, total_bytes, ())?;
9868
9869 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
9870
9871 ::fidl_next::Encode::encode(&self.used_bytes, encoder_, used_bytes, ())?;
9872
9873 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
9874
9875 ::fidl_next::Encode::encode(&self.total_nodes, encoder_, total_nodes, ())?;
9876
9877 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
9878
9879 ::fidl_next::Encode::encode(&self.used_nodes, encoder_, used_nodes, ())?;
9880
9881 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
9882
9883 ::fidl_next::Encode::encode(
9884 &self.free_shared_pool_bytes,
9885 encoder_,
9886 free_shared_pool_bytes,
9887 (),
9888 )?;
9889
9890 let mut _field =
9891 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
9892
9893 ::fidl_next::Encode::encode(&self.fs_id, encoder_, fs_id, ())?;
9894
9895 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
9896
9897 ::fidl_next::Encode::encode(&self.block_size, encoder_, block_size, ())?;
9898
9899 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
9900
9901 ::fidl_next::Encode::encode(&self.max_filename_size, encoder_, max_filename_size, ())?;
9902
9903 let mut _field =
9904 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
9905
9906 ::fidl_next::Encode::encode(&self.fs_type, encoder_, fs_type, ())?;
9907
9908 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
9909
9910 ::fidl_next::Encode::encode(&self.padding, encoder_, padding, ())?;
9911
9912 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
9913
9914 ::fidl_next::Encode::encode(&self.name, encoder_, name, ())?;
9915
9916 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
9917
9918 Ok(())
9919 }
9920 }
9921
9922 unsafe impl<___E>
9923 ::fidl_next::EncodeOption<
9924 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9925 ___E,
9926 > for FilesystemInfo
9927 where
9928 ___E: ::fidl_next::Encoder + ?Sized,
9929 FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
9930 {
9931 #[inline]
9932 fn encode_option(
9933 this: ::core::option::Option<Self>,
9934 encoder: &mut ___E,
9935 out: &mut ::core::mem::MaybeUninit<
9936 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9937 >,
9938 _: (),
9939 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9940 if let Some(inner) = this {
9941 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9942 ::fidl_next::wire::Box::encode_present(out);
9943 } else {
9944 ::fidl_next::wire::Box::encode_absent(out);
9945 }
9946
9947 Ok(())
9948 }
9949 }
9950
9951 unsafe impl<'a, ___E>
9952 ::fidl_next::EncodeOption<
9953 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9954 ___E,
9955 > for &'a FilesystemInfo
9956 where
9957 ___E: ::fidl_next::Encoder + ?Sized,
9958 &'a FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
9959 {
9960 #[inline]
9961 fn encode_option(
9962 this: ::core::option::Option<Self>,
9963 encoder: &mut ___E,
9964 out: &mut ::core::mem::MaybeUninit<
9965 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9966 >,
9967 _: (),
9968 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9969 if let Some(inner) = this {
9970 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9971 ::fidl_next::wire::Box::encode_present(out);
9972 } else {
9973 ::fidl_next::wire::Box::encode_absent(out);
9974 }
9975
9976 Ok(())
9977 }
9978 }
9979
9980 impl ::fidl_next::FromWire<crate::wire::FilesystemInfo> for FilesystemInfo {
9981 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FilesystemInfo, Self> = unsafe {
9982 ::fidl_next::CopyOptimization::enable_if(
9983 true
9984 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9985 .is_enabled()
9986 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9987 .is_enabled()
9988 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9989 .is_enabled()
9990 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9991 .is_enabled()
9992 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9993 .is_enabled()
9994 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9995 .is_enabled()
9996 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
9997 .is_enabled()
9998 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
9999 .is_enabled()
10000 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
10001 .is_enabled()
10002 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
10003 .is_enabled()
10004 && <[i8; 32] as ::fidl_next::FromWire<[i8; 32]>>::COPY_OPTIMIZATION
10005 .is_enabled(),
10006 )
10007 };
10008
10009 #[inline]
10010 fn from_wire(wire: crate::wire::FilesystemInfo) -> Self {
10011 Self {
10012 total_bytes: ::fidl_next::FromWire::from_wire(wire.total_bytes),
10013
10014 used_bytes: ::fidl_next::FromWire::from_wire(wire.used_bytes),
10015
10016 total_nodes: ::fidl_next::FromWire::from_wire(wire.total_nodes),
10017
10018 used_nodes: ::fidl_next::FromWire::from_wire(wire.used_nodes),
10019
10020 free_shared_pool_bytes: ::fidl_next::FromWire::from_wire(
10021 wire.free_shared_pool_bytes,
10022 ),
10023
10024 fs_id: ::fidl_next::FromWire::from_wire(wire.fs_id),
10025
10026 block_size: ::fidl_next::FromWire::from_wire(wire.block_size),
10027
10028 max_filename_size: ::fidl_next::FromWire::from_wire(wire.max_filename_size),
10029
10030 fs_type: ::fidl_next::FromWire::from_wire(wire.fs_type),
10031
10032 padding: ::fidl_next::FromWire::from_wire(wire.padding),
10033
10034 name: ::fidl_next::FromWire::from_wire(wire.name),
10035 }
10036 }
10037 }
10038
10039 impl ::fidl_next::FromWireRef<crate::wire::FilesystemInfo> for FilesystemInfo {
10040 #[inline]
10041 fn from_wire_ref(wire: &crate::wire::FilesystemInfo) -> Self {
10042 Self {
10043 total_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_bytes),
10044
10045 used_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_bytes),
10046
10047 total_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_nodes),
10048
10049 used_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_nodes),
10050
10051 free_shared_pool_bytes: ::fidl_next::FromWireRef::from_wire_ref(
10052 &wire.free_shared_pool_bytes,
10053 ),
10054
10055 fs_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_id),
10056
10057 block_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.block_size),
10058
10059 max_filename_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_filename_size),
10060
10061 fs_type: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_type),
10062
10063 padding: ::fidl_next::FromWireRef::from_wire_ref(&wire.padding),
10064
10065 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
10066 }
10067 }
10068 }
10069
10070 pub type Service = ();
10071
10072 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10073 pub struct SymlinkObject {
10074 pub target: ::std::vec::Vec<u8>,
10075 }
10076
10077 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E> for SymlinkObject
10078 where
10079 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10080 ___E: ::fidl_next::Encoder,
10081 {
10082 #[inline]
10083 fn encode(
10084 self,
10085 encoder_: &mut ___E,
10086 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
10087 _: (),
10088 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10089 ::fidl_next::munge! {
10090 let crate::wire::SymlinkObject {
10091 target,
10092
10093 } = out_;
10094 }
10095
10096 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
10097
10098 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
10099 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
10100
10101 Ok(())
10102 }
10103 }
10104
10105 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
10106 for &'a SymlinkObject
10107 where
10108 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10109 ___E: ::fidl_next::Encoder,
10110 {
10111 #[inline]
10112 fn encode(
10113 self,
10114 encoder_: &mut ___E,
10115 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
10116 _: (),
10117 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10118 ::fidl_next::munge! {
10119 let crate::wire::SymlinkObject {
10120 target,
10121
10122 } = out_;
10123 }
10124
10125 ::fidl_next::Encode::encode(&self.target, encoder_, target, (4095, ()))?;
10126
10127 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
10128 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
10129
10130 Ok(())
10131 }
10132 }
10133
10134 unsafe impl<___E>
10135 ::fidl_next::EncodeOption<
10136 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10137 ___E,
10138 > for SymlinkObject
10139 where
10140 ___E: ::fidl_next::Encoder + ?Sized,
10141 SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
10142 {
10143 #[inline]
10144 fn encode_option(
10145 this: ::core::option::Option<Self>,
10146 encoder: &mut ___E,
10147 out: &mut ::core::mem::MaybeUninit<
10148 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10149 >,
10150 _: (),
10151 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10152 if let Some(inner) = this {
10153 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10154 ::fidl_next::wire::Box::encode_present(out);
10155 } else {
10156 ::fidl_next::wire::Box::encode_absent(out);
10157 }
10158
10159 Ok(())
10160 }
10161 }
10162
10163 unsafe impl<'a, ___E>
10164 ::fidl_next::EncodeOption<
10165 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10166 ___E,
10167 > for &'a SymlinkObject
10168 where
10169 ___E: ::fidl_next::Encoder + ?Sized,
10170 &'a SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
10171 {
10172 #[inline]
10173 fn encode_option(
10174 this: ::core::option::Option<Self>,
10175 encoder: &mut ___E,
10176 out: &mut ::core::mem::MaybeUninit<
10177 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10178 >,
10179 _: (),
10180 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10181 if let Some(inner) = this {
10182 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10183 ::fidl_next::wire::Box::encode_present(out);
10184 } else {
10185 ::fidl_next::wire::Box::encode_absent(out);
10186 }
10187
10188 Ok(())
10189 }
10190 }
10191
10192 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkObject<'de>> for SymlinkObject {
10193 #[inline]
10194 fn from_wire(wire: crate::wire::SymlinkObject<'de>) -> Self {
10195 Self { target: ::fidl_next::FromWire::from_wire(wire.target) }
10196 }
10197 }
10198
10199 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkObject<'de>> for SymlinkObject {
10200 #[inline]
10201 fn from_wire_ref(wire: &crate::wire::SymlinkObject<'de>) -> Self {
10202 Self { target: ::fidl_next::FromWireRef::from_wire_ref(&wire.target) }
10203 }
10204 }
10205
10206 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10207 #[repr(u8)]
10208 pub enum WatchEvent {
10209 Deleted = 0,
10210 Added = 1,
10211 Removed = 2,
10212 Existing = 3,
10213 Idle = 4,
10214 }
10215 impl ::core::convert::TryFrom<u8> for WatchEvent {
10216 type Error = ::fidl_next::UnknownStrictEnumMemberError;
10217 fn try_from(
10218 value: u8,
10219 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
10220 match value {
10221 0 => Ok(Self::Deleted),
10222 1 => Ok(Self::Added),
10223 2 => Ok(Self::Removed),
10224 3 => Ok(Self::Existing),
10225 4 => Ok(Self::Idle),
10226
10227 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
10228 }
10229 }
10230 }
10231
10232 impl ::std::convert::From<WatchEvent> for u8 {
10233 fn from(value: WatchEvent) -> Self {
10234 match value {
10235 WatchEvent::Deleted => 0,
10236 WatchEvent::Added => 1,
10237 WatchEvent::Removed => 2,
10238 WatchEvent::Existing => 3,
10239 WatchEvent::Idle => 4,
10240 }
10241 }
10242 }
10243
10244 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for WatchEvent
10245 where
10246 ___E: ?Sized,
10247 {
10248 #[inline]
10249 fn encode(
10250 self,
10251 encoder: &mut ___E,
10252 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
10253 _: (),
10254 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10255 ::fidl_next::Encode::encode(&self, encoder, out, ())
10256 }
10257 }
10258
10259 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for &'a WatchEvent
10260 where
10261 ___E: ?Sized,
10262 {
10263 #[inline]
10264 fn encode(
10265 self,
10266 encoder: &mut ___E,
10267 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
10268 _: (),
10269 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10270 ::fidl_next::munge!(let crate::wire::WatchEvent { value } = out);
10271 let _ = value.write(u8::from(match *self {
10272 WatchEvent::Deleted => 0,
10273
10274 WatchEvent::Added => 1,
10275
10276 WatchEvent::Removed => 2,
10277
10278 WatchEvent::Existing => 3,
10279
10280 WatchEvent::Idle => 4,
10281 }));
10282
10283 Ok(())
10284 }
10285 }
10286
10287 impl ::core::convert::From<crate::wire::WatchEvent> for WatchEvent {
10288 fn from(wire: crate::wire::WatchEvent) -> Self {
10289 match u8::from(wire.value) {
10290 0 => Self::Deleted,
10291
10292 1 => Self::Added,
10293
10294 2 => Self::Removed,
10295
10296 3 => Self::Existing,
10297
10298 4 => Self::Idle,
10299
10300 _ => unsafe { ::core::hint::unreachable_unchecked() },
10301 }
10302 }
10303 }
10304
10305 impl ::fidl_next::FromWire<crate::wire::WatchEvent> for WatchEvent {
10306 #[inline]
10307 fn from_wire(wire: crate::wire::WatchEvent) -> Self {
10308 Self::from(wire)
10309 }
10310 }
10311
10312 impl ::fidl_next::FromWireRef<crate::wire::WatchEvent> for WatchEvent {
10313 #[inline]
10314 fn from_wire_ref(wire: &crate::wire::WatchEvent) -> Self {
10315 Self::from(*wire)
10316 }
10317 }
10318}
10319
10320pub mod wire {
10321
10322 #[derive(Clone, Copy, Debug)]
10324 #[repr(transparent)]
10325 pub struct Operations {
10326 pub(crate) value: ::fidl_next::wire::Uint64,
10327 }
10328
10329 impl ::fidl_next::Constrained for Operations {
10330 type Constraint = ();
10331
10332 fn validate(
10333 _: ::fidl_next::Slot<'_, Self>,
10334 _: Self::Constraint,
10335 ) -> Result<(), ::fidl_next::ValidationError> {
10336 Ok(())
10337 }
10338 }
10339
10340 unsafe impl ::fidl_next::Wire for Operations {
10341 type Narrowed<'de> = Self;
10342
10343 #[inline]
10344 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10345 }
10347 }
10348
10349 unsafe impl<___D> ::fidl_next::Decode<___D> for Operations
10350 where
10351 ___D: ?Sized,
10352 {
10353 fn decode(
10354 slot: ::fidl_next::Slot<'_, Self>,
10355 _: &mut ___D,
10356 _: (),
10357 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10358 Ok(())
10359 }
10360 }
10361
10362 impl ::core::convert::From<crate::natural::Operations> for Operations {
10363 fn from(natural: crate::natural::Operations) -> Self {
10364 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
10365 }
10366 }
10367
10368 impl ::fidl_next::IntoNatural for Operations {
10369 type Natural = crate::natural::Operations;
10370 }
10371
10372 pub type Abilities = crate::wire::Operations;
10374
10375 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
10377 #[repr(transparent)]
10378 pub struct SeekOrigin {
10379 pub(crate) value: ::fidl_next::wire::Uint32,
10380 }
10381
10382 impl ::fidl_next::Constrained for SeekOrigin {
10383 type Constraint = ();
10384
10385 fn validate(
10386 _: ::fidl_next::Slot<'_, Self>,
10387 _: Self::Constraint,
10388 ) -> Result<(), ::fidl_next::ValidationError> {
10389 Ok(())
10390 }
10391 }
10392
10393 unsafe impl ::fidl_next::Wire for SeekOrigin {
10394 type Narrowed<'de> = Self;
10395
10396 #[inline]
10397 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10398 }
10400 }
10401
10402 impl SeekOrigin {
10403 pub const START: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(0) };
10404
10405 pub const CURRENT: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(1) };
10406
10407 pub const END: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(2) };
10408 }
10409
10410 unsafe impl<___D> ::fidl_next::Decode<___D> for SeekOrigin
10411 where
10412 ___D: ?Sized,
10413 {
10414 fn decode(
10415 slot: ::fidl_next::Slot<'_, Self>,
10416 _: &mut ___D,
10417 _: (),
10418 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10419 ::fidl_next::munge!(let Self { value } = slot);
10420
10421 match u32::from(*value) {
10422 0 | 1 | 2 => (),
10423 unknown => {
10424 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
10425 }
10426 }
10427
10428 Ok(())
10429 }
10430 }
10431
10432 impl ::core::convert::From<crate::natural::SeekOrigin> for SeekOrigin {
10433 fn from(natural: crate::natural::SeekOrigin) -> Self {
10434 match natural {
10435 crate::natural::SeekOrigin::Start => SeekOrigin::START,
10436
10437 crate::natural::SeekOrigin::Current => SeekOrigin::CURRENT,
10438
10439 crate::natural::SeekOrigin::End => SeekOrigin::END,
10440 }
10441 }
10442 }
10443
10444 impl ::fidl_next::IntoNatural for SeekOrigin {
10445 type Natural = crate::natural::SeekOrigin;
10446 }
10447
10448 #[derive(Clone, Debug)]
10450 #[repr(C)]
10451 pub struct AdvisoryLockRange {
10452 pub origin: crate::wire::SeekOrigin,
10453
10454 pub offset: ::fidl_next::wire::Int64,
10455
10456 pub length: ::fidl_next::wire::Int64,
10457 }
10458
10459 static_assertions::const_assert_eq!(std::mem::size_of::<AdvisoryLockRange>(), 24);
10460 static_assertions::const_assert_eq!(std::mem::align_of::<AdvisoryLockRange>(), 8);
10461
10462 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, origin), 0);
10463
10464 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, offset), 8);
10465
10466 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, length), 16);
10467
10468 impl ::fidl_next::Constrained for AdvisoryLockRange {
10469 type Constraint = ();
10470
10471 fn validate(
10472 _: ::fidl_next::Slot<'_, Self>,
10473 _: Self::Constraint,
10474 ) -> Result<(), ::fidl_next::ValidationError> {
10475 Ok(())
10476 }
10477 }
10478
10479 unsafe impl ::fidl_next::Wire for AdvisoryLockRange {
10480 type Narrowed<'de> = AdvisoryLockRange;
10481
10482 #[inline]
10483 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10484 ::fidl_next::munge! {
10485 let Self {
10486 origin,
10487 offset,
10488 length,
10489
10490 } = &mut *out_;
10491 }
10492
10493 ::fidl_next::Wire::zero_padding(origin);
10494
10495 ::fidl_next::Wire::zero_padding(offset);
10496
10497 ::fidl_next::Wire::zero_padding(length);
10498
10499 unsafe {
10500 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
10501 }
10502 }
10503 }
10504
10505 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockRange
10506 where
10507 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10508 {
10509 fn decode(
10510 slot_: ::fidl_next::Slot<'_, Self>,
10511 decoder_: &mut ___D,
10512 _: (),
10513 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10514 if slot_.as_bytes()[4..8] != [0u8; 4] {
10515 return Err(::fidl_next::DecodeError::InvalidPadding);
10516 }
10517
10518 ::fidl_next::munge! {
10519 let Self {
10520 mut origin,
10521 mut offset,
10522 mut length,
10523
10524 } = slot_;
10525 }
10526
10527 let _field = origin.as_mut();
10528
10529 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
10530
10531 let _field = offset.as_mut();
10532
10533 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
10534
10535 let _field = length.as_mut();
10536
10537 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
10538
10539 Ok(())
10540 }
10541 }
10542
10543 impl ::fidl_next::IntoNatural for AdvisoryLockRange {
10544 type Natural = crate::natural::AdvisoryLockRange;
10545 }
10546
10547 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
10549 #[repr(transparent)]
10550 pub struct AdvisoryLockType {
10551 pub(crate) value: ::fidl_next::wire::Uint32,
10552 }
10553
10554 impl ::fidl_next::Constrained for AdvisoryLockType {
10555 type Constraint = ();
10556
10557 fn validate(
10558 _: ::fidl_next::Slot<'_, Self>,
10559 _: Self::Constraint,
10560 ) -> Result<(), ::fidl_next::ValidationError> {
10561 Ok(())
10562 }
10563 }
10564
10565 unsafe impl ::fidl_next::Wire for AdvisoryLockType {
10566 type Narrowed<'de> = Self;
10567
10568 #[inline]
10569 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10570 }
10572 }
10573
10574 impl AdvisoryLockType {
10575 pub const READ: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::wire::Uint32(1) };
10576
10577 pub const WRITE: AdvisoryLockType =
10578 AdvisoryLockType { value: ::fidl_next::wire::Uint32(2) };
10579
10580 pub const UNLOCK: AdvisoryLockType =
10581 AdvisoryLockType { value: ::fidl_next::wire::Uint32(3) };
10582 }
10583
10584 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockType
10585 where
10586 ___D: ?Sized,
10587 {
10588 fn decode(
10589 slot: ::fidl_next::Slot<'_, Self>,
10590 _: &mut ___D,
10591 _: (),
10592 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10593 ::fidl_next::munge!(let Self { value } = slot);
10594
10595 match u32::from(*value) {
10596 1 | 2 | 3 => (),
10597 unknown => {
10598 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
10599 }
10600 }
10601
10602 Ok(())
10603 }
10604 }
10605
10606 impl ::core::convert::From<crate::natural::AdvisoryLockType> for AdvisoryLockType {
10607 fn from(natural: crate::natural::AdvisoryLockType) -> Self {
10608 match natural {
10609 crate::natural::AdvisoryLockType::Read => AdvisoryLockType::READ,
10610
10611 crate::natural::AdvisoryLockType::Write => AdvisoryLockType::WRITE,
10612
10613 crate::natural::AdvisoryLockType::Unlock => AdvisoryLockType::UNLOCK,
10614 }
10615 }
10616 }
10617
10618 impl ::fidl_next::IntoNatural for AdvisoryLockType {
10619 type Natural = crate::natural::AdvisoryLockType;
10620 }
10621
10622 #[repr(C)]
10624 pub struct AdvisoryLockRequest<'de> {
10625 pub(crate) table: ::fidl_next::wire::Table<'de>,
10626 }
10627
10628 impl<'de> Drop for AdvisoryLockRequest<'de> {
10629 fn drop(&mut self) {
10630 let _ = self.table.get(1).map(|envelope| unsafe {
10631 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
10632 });
10633
10634 let _ = self.table.get(2).map(|envelope| unsafe {
10635 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
10636 });
10637
10638 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
10639 }
10640 }
10641
10642 impl ::fidl_next::Constrained for AdvisoryLockRequest<'_> {
10643 type Constraint = ();
10644
10645 fn validate(
10646 _: ::fidl_next::Slot<'_, Self>,
10647 _: Self::Constraint,
10648 ) -> Result<(), ::fidl_next::ValidationError> {
10649 Ok(())
10650 }
10651 }
10652
10653 unsafe impl ::fidl_next::Wire for AdvisoryLockRequest<'static> {
10654 type Narrowed<'de> = AdvisoryLockRequest<'de>;
10655
10656 #[inline]
10657 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10658 ::fidl_next::munge!(let Self { table } = out);
10659 ::fidl_next::wire::Table::zero_padding(table);
10660 }
10661 }
10662
10663 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AdvisoryLockRequest<'de>
10664 where
10665 ___D: ::fidl_next::Decoder<'de> + ?Sized,
10666 {
10667 fn decode(
10668 slot: ::fidl_next::Slot<'_, Self>,
10669 decoder: &mut ___D,
10670 _: (),
10671 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10672 ::fidl_next::munge!(let Self { table } = slot);
10673
10674 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10675 match ordinal {
10676 0 => unsafe { ::core::hint::unreachable_unchecked() },
10677
10678 1 => {
10679 ::fidl_next::wire::Envelope::decode_as::<
10680 ___D,
10681 crate::wire::AdvisoryLockType,
10682 >(slot.as_mut(), decoder, ())?;
10683
10684 Ok(())
10685 }
10686
10687 2 => {
10688 ::fidl_next::wire::Envelope::decode_as::<
10689 ___D,
10690 crate::wire::AdvisoryLockRange,
10691 >(slot.as_mut(), decoder, ())?;
10692
10693 Ok(())
10694 }
10695
10696 3 => {
10697 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10698 slot.as_mut(),
10699 decoder,
10700 (),
10701 )?;
10702
10703 Ok(())
10704 }
10705
10706 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10707 }
10708 })
10709 }
10710 }
10711
10712 impl<'de> AdvisoryLockRequest<'de> {
10713 pub fn type_(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockType> {
10714 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10715 }
10716
10717 pub fn take_type_(&mut self) -> ::core::option::Option<crate::wire::AdvisoryLockType> {
10718 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
10719 }
10720
10721 pub fn range(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockRange> {
10722 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10723 }
10724
10725 pub fn take_range(&mut self) -> ::core::option::Option<crate::wire::AdvisoryLockRange> {
10726 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
10727 }
10728
10729 pub fn wait(&self) -> ::core::option::Option<&bool> {
10730 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10731 }
10732
10733 pub fn take_wait(&mut self) -> ::core::option::Option<bool> {
10734 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
10735 }
10736 }
10737
10738 impl<'de> ::core::fmt::Debug for AdvisoryLockRequest<'de> {
10739 fn fmt(
10740 &self,
10741 f: &mut ::core::fmt::Formatter<'_>,
10742 ) -> ::core::result::Result<(), ::core::fmt::Error> {
10743 f.debug_struct("AdvisoryLockRequest")
10744 .field("type_", &self.type_())
10745 .field("range", &self.range())
10746 .field("wait", &self.wait())
10747 .finish()
10748 }
10749 }
10750
10751 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockRequest<'de> {
10752 type Natural = crate::natural::AdvisoryLockRequest;
10753 }
10754
10755 #[derive(Debug)]
10757 #[repr(C)]
10758 pub struct AdvisoryLockingAdvisoryLockRequest<'de> {
10759 pub request: crate::wire::AdvisoryLockRequest<'de>,
10760 }
10761
10762 static_assertions::const_assert_eq!(
10763 std::mem::size_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
10764 16
10765 );
10766 static_assertions::const_assert_eq!(
10767 std::mem::align_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
10768 8
10769 );
10770
10771 static_assertions::const_assert_eq!(
10772 std::mem::offset_of!(AdvisoryLockingAdvisoryLockRequest<'_>, request),
10773 0
10774 );
10775
10776 impl ::fidl_next::Constrained for AdvisoryLockingAdvisoryLockRequest<'_> {
10777 type Constraint = ();
10778
10779 fn validate(
10780 _: ::fidl_next::Slot<'_, Self>,
10781 _: Self::Constraint,
10782 ) -> Result<(), ::fidl_next::ValidationError> {
10783 Ok(())
10784 }
10785 }
10786
10787 unsafe impl ::fidl_next::Wire for AdvisoryLockingAdvisoryLockRequest<'static> {
10788 type Narrowed<'de> = AdvisoryLockingAdvisoryLockRequest<'de>;
10789
10790 #[inline]
10791 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10792 ::fidl_next::munge! {
10793 let Self {
10794 request,
10795
10796 } = &mut *out_;
10797 }
10798
10799 ::fidl_next::Wire::zero_padding(request);
10800 }
10801 }
10802
10803 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AdvisoryLockingAdvisoryLockRequest<'de>
10804 where
10805 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10806 ___D: ::fidl_next::Decoder<'de>,
10807 {
10808 fn decode(
10809 slot_: ::fidl_next::Slot<'_, Self>,
10810 decoder_: &mut ___D,
10811 _: (),
10812 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10813 ::fidl_next::munge! {
10814 let Self {
10815 mut request,
10816
10817 } = slot_;
10818 }
10819
10820 let _field = request.as_mut();
10821
10822 ::fidl_next::Decode::decode(request.as_mut(), decoder_, ())?;
10823
10824 Ok(())
10825 }
10826 }
10827
10828 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockingAdvisoryLockRequest<'de> {
10829 type Natural = crate::natural::AdvisoryLockingAdvisoryLockRequest;
10830 }
10831
10832 pub type AdvisoryLockingAdvisoryLockResponse = ::fidl_next::wire::Unit;
10834
10835 #[derive(Clone, Copy, Debug)]
10837 #[repr(transparent)]
10838 pub struct AllocateMode {
10839 pub(crate) value: ::fidl_next::wire::Uint32,
10840 }
10841
10842 impl ::fidl_next::Constrained for AllocateMode {
10843 type Constraint = ();
10844
10845 fn validate(
10846 _: ::fidl_next::Slot<'_, Self>,
10847 _: Self::Constraint,
10848 ) -> Result<(), ::fidl_next::ValidationError> {
10849 Ok(())
10850 }
10851 }
10852
10853 unsafe impl ::fidl_next::Wire for AllocateMode {
10854 type Narrowed<'de> = Self;
10855
10856 #[inline]
10857 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10858 }
10860 }
10861
10862 unsafe impl<___D> ::fidl_next::Decode<___D> for AllocateMode
10863 where
10864 ___D: ?Sized,
10865 {
10866 fn decode(
10867 slot: ::fidl_next::Slot<'_, Self>,
10868 _: &mut ___D,
10869 _: (),
10870 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10871 Ok(())
10872 }
10873 }
10874
10875 impl ::core::convert::From<crate::natural::AllocateMode> for AllocateMode {
10876 fn from(natural: crate::natural::AllocateMode) -> Self {
10877 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
10878 }
10879 }
10880
10881 impl ::fidl_next::IntoNatural for AllocateMode {
10882 type Natural = crate::natural::AllocateMode;
10883 }
10884
10885 pub type Rights = crate::wire::Operations;
10887
10888 pub type Id = ::fidl_next::wire::Uint64;
10890
10891 #[derive(Clone, Copy, Debug)]
10893 #[repr(transparent)]
10894 pub struct OpenFlags {
10895 pub(crate) value: ::fidl_next::wire::Uint32,
10896 }
10897
10898 impl ::fidl_next::Constrained for OpenFlags {
10899 type Constraint = ();
10900
10901 fn validate(
10902 _: ::fidl_next::Slot<'_, Self>,
10903 _: Self::Constraint,
10904 ) -> Result<(), ::fidl_next::ValidationError> {
10905 Ok(())
10906 }
10907 }
10908
10909 unsafe impl ::fidl_next::Wire for OpenFlags {
10910 type Narrowed<'de> = Self;
10911
10912 #[inline]
10913 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10914 }
10916 }
10917
10918 unsafe impl<___D> ::fidl_next::Decode<___D> for OpenFlags
10919 where
10920 ___D: ?Sized,
10921 {
10922 fn decode(
10923 slot: ::fidl_next::Slot<'_, Self>,
10924 _: &mut ___D,
10925 _: (),
10926 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10927 ::fidl_next::munge!(let Self { value } = slot);
10928 let set = u32::from(*value);
10929 if set & !crate::natural::OpenFlags::all().bits() != 0 {
10930 return Err(::fidl_next::DecodeError::InvalidBits {
10931 expected: crate::natural::OpenFlags::all().bits() as usize,
10932 actual: set as usize,
10933 });
10934 }
10935
10936 Ok(())
10937 }
10938 }
10939
10940 impl ::core::convert::From<crate::natural::OpenFlags> for OpenFlags {
10941 fn from(natural: crate::natural::OpenFlags) -> Self {
10942 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
10943 }
10944 }
10945
10946 impl ::fidl_next::IntoNatural for OpenFlags {
10947 type Natural = crate::natural::OpenFlags;
10948 }
10949
10950 #[derive(Clone, Debug)]
10952 #[repr(C)]
10953 pub struct NodeAttributes {
10954 pub mode: ::fidl_next::wire::Uint32,
10955
10956 pub id: ::fidl_next::wire::Uint64,
10957
10958 pub content_size: ::fidl_next::wire::Uint64,
10959
10960 pub storage_size: ::fidl_next::wire::Uint64,
10961
10962 pub link_count: ::fidl_next::wire::Uint64,
10963
10964 pub creation_time: ::fidl_next::wire::Uint64,
10965
10966 pub modification_time: ::fidl_next::wire::Uint64,
10967 }
10968
10969 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes>(), 56);
10970 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes>(), 8);
10971
10972 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, mode), 0);
10973
10974 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, id), 8);
10975
10976 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, content_size), 16);
10977
10978 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, storage_size), 24);
10979
10980 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, link_count), 32);
10981
10982 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, creation_time), 40);
10983
10984 static_assertions::const_assert_eq!(
10985 std::mem::offset_of!(NodeAttributes, modification_time),
10986 48
10987 );
10988
10989 impl ::fidl_next::Constrained for NodeAttributes {
10990 type Constraint = ();
10991
10992 fn validate(
10993 _: ::fidl_next::Slot<'_, Self>,
10994 _: Self::Constraint,
10995 ) -> Result<(), ::fidl_next::ValidationError> {
10996 Ok(())
10997 }
10998 }
10999
11000 unsafe impl ::fidl_next::Wire for NodeAttributes {
11001 type Narrowed<'de> = NodeAttributes;
11002
11003 #[inline]
11004 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11005 ::fidl_next::munge! {
11006 let Self {
11007 mode,
11008 id,
11009 content_size,
11010 storage_size,
11011 link_count,
11012 creation_time,
11013 modification_time,
11014
11015 } = &mut *out_;
11016 }
11017
11018 ::fidl_next::Wire::zero_padding(mode);
11019
11020 ::fidl_next::Wire::zero_padding(id);
11021
11022 ::fidl_next::Wire::zero_padding(content_size);
11023
11024 ::fidl_next::Wire::zero_padding(storage_size);
11025
11026 ::fidl_next::Wire::zero_padding(link_count);
11027
11028 ::fidl_next::Wire::zero_padding(creation_time);
11029
11030 ::fidl_next::Wire::zero_padding(modification_time);
11031
11032 unsafe {
11033 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
11034 }
11035 }
11036 }
11037
11038 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributes
11039 where
11040 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11041 {
11042 fn decode(
11043 slot_: ::fidl_next::Slot<'_, Self>,
11044 decoder_: &mut ___D,
11045 _: (),
11046 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11047 if slot_.as_bytes()[4..8] != [0u8; 4] {
11048 return Err(::fidl_next::DecodeError::InvalidPadding);
11049 }
11050
11051 ::fidl_next::munge! {
11052 let Self {
11053 mut mode,
11054 mut id,
11055 mut content_size,
11056 mut storage_size,
11057 mut link_count,
11058 mut creation_time,
11059 mut modification_time,
11060
11061 } = slot_;
11062 }
11063
11064 let _field = mode.as_mut();
11065
11066 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
11067
11068 let _field = id.as_mut();
11069
11070 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
11071
11072 let _field = content_size.as_mut();
11073
11074 ::fidl_next::Decode::decode(content_size.as_mut(), decoder_, ())?;
11075
11076 let _field = storage_size.as_mut();
11077
11078 ::fidl_next::Decode::decode(storage_size.as_mut(), decoder_, ())?;
11079
11080 let _field = link_count.as_mut();
11081
11082 ::fidl_next::Decode::decode(link_count.as_mut(), decoder_, ())?;
11083
11084 let _field = creation_time.as_mut();
11085
11086 ::fidl_next::Decode::decode(creation_time.as_mut(), decoder_, ())?;
11087
11088 let _field = modification_time.as_mut();
11089
11090 ::fidl_next::Decode::decode(modification_time.as_mut(), decoder_, ())?;
11091
11092 Ok(())
11093 }
11094 }
11095
11096 impl ::fidl_next::IntoNatural for NodeAttributes {
11097 type Natural = crate::natural::NodeAttributes;
11098 }
11099
11100 #[derive(Clone, Copy, Debug)]
11102 #[repr(transparent)]
11103 pub struct NodeAttributeFlags {
11104 pub(crate) value: ::fidl_next::wire::Uint32,
11105 }
11106
11107 impl ::fidl_next::Constrained for NodeAttributeFlags {
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 NodeAttributeFlags {
11119 type Narrowed<'de> = Self;
11120
11121 #[inline]
11122 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11123 }
11125 }
11126
11127 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributeFlags
11128 where
11129 ___D: ?Sized,
11130 {
11131 fn decode(
11132 slot: ::fidl_next::Slot<'_, Self>,
11133 _: &mut ___D,
11134 _: (),
11135 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11136 ::fidl_next::munge!(let Self { value } = slot);
11137 let set = u32::from(*value);
11138 if set & !crate::natural::NodeAttributeFlags::all().bits() != 0 {
11139 return Err(::fidl_next::DecodeError::InvalidBits {
11140 expected: crate::natural::NodeAttributeFlags::all().bits() as usize,
11141 actual: set as usize,
11142 });
11143 }
11144
11145 Ok(())
11146 }
11147 }
11148
11149 impl ::core::convert::From<crate::natural::NodeAttributeFlags> for NodeAttributeFlags {
11150 fn from(natural: crate::natural::NodeAttributeFlags) -> Self {
11151 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11152 }
11153 }
11154
11155 impl ::fidl_next::IntoNatural for NodeAttributeFlags {
11156 type Natural = crate::natural::NodeAttributeFlags;
11157 }
11158
11159 #[derive(Debug)]
11161 #[repr(C)]
11162 pub struct NodeQueryFilesystemResponse<'de> {
11163 pub s: ::fidl_next::wire::fuchsia::Status,
11164
11165 pub info: ::fidl_next::wire::Box<'de, crate::wire::FilesystemInfo>,
11166 }
11167
11168 static_assertions::const_assert_eq!(std::mem::size_of::<NodeQueryFilesystemResponse<'_>>(), 16);
11169 static_assertions::const_assert_eq!(std::mem::align_of::<NodeQueryFilesystemResponse<'_>>(), 8);
11170
11171 static_assertions::const_assert_eq!(
11172 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, s),
11173 0
11174 );
11175
11176 static_assertions::const_assert_eq!(
11177 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, info),
11178 8
11179 );
11180
11181 impl ::fidl_next::Constrained for NodeQueryFilesystemResponse<'_> {
11182 type Constraint = ();
11183
11184 fn validate(
11185 _: ::fidl_next::Slot<'_, Self>,
11186 _: Self::Constraint,
11187 ) -> Result<(), ::fidl_next::ValidationError> {
11188 Ok(())
11189 }
11190 }
11191
11192 unsafe impl ::fidl_next::Wire for NodeQueryFilesystemResponse<'static> {
11193 type Narrowed<'de> = NodeQueryFilesystemResponse<'de>;
11194
11195 #[inline]
11196 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11197 ::fidl_next::munge! {
11198 let Self {
11199 s,
11200 info,
11201
11202 } = &mut *out_;
11203 }
11204
11205 ::fidl_next::Wire::zero_padding(s);
11206
11207 ::fidl_next::Wire::zero_padding(info);
11208
11209 unsafe {
11210 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
11211 }
11212 }
11213 }
11214
11215 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeQueryFilesystemResponse<'de>
11216 where
11217 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11218 ___D: ::fidl_next::Decoder<'de>,
11219 {
11220 fn decode(
11221 slot_: ::fidl_next::Slot<'_, Self>,
11222 decoder_: &mut ___D,
11223 _: (),
11224 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11225 if slot_.as_bytes()[4..8] != [0u8; 4] {
11226 return Err(::fidl_next::DecodeError::InvalidPadding);
11227 }
11228
11229 ::fidl_next::munge! {
11230 let Self {
11231 mut s,
11232 mut info,
11233
11234 } = slot_;
11235 }
11236
11237 let _field = s.as_mut();
11238
11239 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11240
11241 let _field = info.as_mut();
11242
11243 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
11244
11245 Ok(())
11246 }
11247 }
11248
11249 impl<'de> ::fidl_next::IntoNatural for NodeQueryFilesystemResponse<'de> {
11250 type Natural = crate::natural::NodeQueryFilesystemResponse;
11251 }
11252
11253 pub type NodeUpdateAttributesResponse = ::fidl_next::wire::Unit;
11255
11256 pub type NodeSyncResponse = ::fidl_next::wire::Unit;
11258
11259 #[derive(Clone, Copy, Debug)]
11261 #[repr(transparent)]
11262 pub struct ModeType {
11263 pub(crate) value: ::fidl_next::wire::Uint32,
11264 }
11265
11266 impl ::fidl_next::Constrained for ModeType {
11267 type Constraint = ();
11268
11269 fn validate(
11270 _: ::fidl_next::Slot<'_, Self>,
11271 _: Self::Constraint,
11272 ) -> Result<(), ::fidl_next::ValidationError> {
11273 Ok(())
11274 }
11275 }
11276
11277 unsafe impl ::fidl_next::Wire for ModeType {
11278 type Narrowed<'de> = Self;
11279
11280 #[inline]
11281 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11282 }
11284 }
11285
11286 unsafe impl<___D> ::fidl_next::Decode<___D> for ModeType
11287 where
11288 ___D: ?Sized,
11289 {
11290 fn decode(
11291 slot: ::fidl_next::Slot<'_, Self>,
11292 _: &mut ___D,
11293 _: (),
11294 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11295 ::fidl_next::munge!(let Self { value } = slot);
11296 let set = u32::from(*value);
11297 if set & !crate::natural::ModeType::all().bits() != 0 {
11298 return Err(::fidl_next::DecodeError::InvalidBits {
11299 expected: crate::natural::ModeType::all().bits() as usize,
11300 actual: set as usize,
11301 });
11302 }
11303
11304 Ok(())
11305 }
11306 }
11307
11308 impl ::core::convert::From<crate::natural::ModeType> for ModeType {
11309 fn from(natural: crate::natural::ModeType) -> Self {
11310 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11311 }
11312 }
11313
11314 impl ::fidl_next::IntoNatural for ModeType {
11315 type Natural = crate::natural::ModeType;
11316 }
11317
11318 pub type Path<'de> = ::fidl_next::wire::String<'de>;
11320
11321 #[derive(Clone, Debug)]
11323 #[repr(C)]
11324 pub struct DirectoryReadDirentsRequest {
11325 pub max_bytes: ::fidl_next::wire::Uint64,
11326 }
11327
11328 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryReadDirentsRequest>(), 8);
11329 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryReadDirentsRequest>(), 8);
11330
11331 static_assertions::const_assert_eq!(
11332 std::mem::offset_of!(DirectoryReadDirentsRequest, max_bytes),
11333 0
11334 );
11335
11336 impl ::fidl_next::Constrained for DirectoryReadDirentsRequest {
11337 type Constraint = ();
11338
11339 fn validate(
11340 _: ::fidl_next::Slot<'_, Self>,
11341 _: Self::Constraint,
11342 ) -> Result<(), ::fidl_next::ValidationError> {
11343 Ok(())
11344 }
11345 }
11346
11347 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsRequest {
11348 type Narrowed<'de> = DirectoryReadDirentsRequest;
11349
11350 #[inline]
11351 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11352 ::fidl_next::munge! {
11353 let Self {
11354 max_bytes,
11355
11356 } = &mut *out_;
11357 }
11358
11359 ::fidl_next::Wire::zero_padding(max_bytes);
11360 }
11361 }
11362
11363 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsRequest
11364 where
11365 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11366 {
11367 fn decode(
11368 slot_: ::fidl_next::Slot<'_, Self>,
11369 decoder_: &mut ___D,
11370 _: (),
11371 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11372 ::fidl_next::munge! {
11373 let Self {
11374 mut max_bytes,
11375
11376 } = slot_;
11377 }
11378
11379 let _field = max_bytes.as_mut();
11380
11381 ::fidl_next::Decode::decode(max_bytes.as_mut(), decoder_, ())?;
11382
11383 Ok(())
11384 }
11385 }
11386
11387 impl ::fidl_next::IntoNatural for DirectoryReadDirentsRequest {
11388 type Natural = crate::natural::DirectoryReadDirentsRequest;
11389 }
11390
11391 #[derive(Debug)]
11393 #[repr(C)]
11394 pub struct DirectoryReadDirentsResponse<'de> {
11395 pub s: ::fidl_next::wire::fuchsia::Status,
11396
11397 pub dirents: ::fidl_next::wire::Vector<'de, u8>,
11398 }
11399
11400 static_assertions::const_assert_eq!(
11401 std::mem::size_of::<DirectoryReadDirentsResponse<'_>>(),
11402 24
11403 );
11404 static_assertions::const_assert_eq!(
11405 std::mem::align_of::<DirectoryReadDirentsResponse<'_>>(),
11406 8
11407 );
11408
11409 static_assertions::const_assert_eq!(
11410 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, s),
11411 0
11412 );
11413
11414 static_assertions::const_assert_eq!(
11415 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, dirents),
11416 8
11417 );
11418
11419 impl ::fidl_next::Constrained for DirectoryReadDirentsResponse<'_> {
11420 type Constraint = ();
11421
11422 fn validate(
11423 _: ::fidl_next::Slot<'_, Self>,
11424 _: Self::Constraint,
11425 ) -> Result<(), ::fidl_next::ValidationError> {
11426 Ok(())
11427 }
11428 }
11429
11430 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsResponse<'static> {
11431 type Narrowed<'de> = DirectoryReadDirentsResponse<'de>;
11432
11433 #[inline]
11434 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11435 ::fidl_next::munge! {
11436 let Self {
11437 s,
11438 dirents,
11439
11440 } = &mut *out_;
11441 }
11442
11443 ::fidl_next::Wire::zero_padding(s);
11444
11445 ::fidl_next::Wire::zero_padding(dirents);
11446
11447 unsafe {
11448 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
11449 }
11450 }
11451 }
11452
11453 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsResponse<'de>
11454 where
11455 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11456 ___D: ::fidl_next::Decoder<'de>,
11457 {
11458 fn decode(
11459 slot_: ::fidl_next::Slot<'_, Self>,
11460 decoder_: &mut ___D,
11461 _: (),
11462 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11463 if slot_.as_bytes()[4..8] != [0u8; 4] {
11464 return Err(::fidl_next::DecodeError::InvalidPadding);
11465 }
11466
11467 ::fidl_next::munge! {
11468 let Self {
11469 mut s,
11470 mut dirents,
11471
11472 } = slot_;
11473 }
11474
11475 let _field = s.as_mut();
11476
11477 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11478
11479 let _field = dirents.as_mut();
11480 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
11481 ::fidl_next::Decode::decode(dirents.as_mut(), decoder_, (8192, ()))?;
11482
11483 let dirents = unsafe { dirents.deref_unchecked() };
11484
11485 if dirents.len() > 8192 {
11486 return Err(::fidl_next::DecodeError::VectorTooLong {
11487 size: dirents.len() as u64,
11488 limit: 8192,
11489 });
11490 }
11491
11492 Ok(())
11493 }
11494 }
11495
11496 impl<'de> ::fidl_next::IntoNatural for DirectoryReadDirentsResponse<'de> {
11497 type Natural = crate::natural::DirectoryReadDirentsResponse;
11498 }
11499
11500 #[derive(Clone, Debug)]
11502 #[repr(C)]
11503 pub struct DirectoryRewindResponse {
11504 pub s: ::fidl_next::wire::fuchsia::Status,
11505 }
11506
11507 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRewindResponse>(), 4);
11508 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRewindResponse>(), 4);
11509
11510 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRewindResponse, s), 0);
11511
11512 impl ::fidl_next::Constrained for DirectoryRewindResponse {
11513 type Constraint = ();
11514
11515 fn validate(
11516 _: ::fidl_next::Slot<'_, Self>,
11517 _: Self::Constraint,
11518 ) -> Result<(), ::fidl_next::ValidationError> {
11519 Ok(())
11520 }
11521 }
11522
11523 unsafe impl ::fidl_next::Wire for DirectoryRewindResponse {
11524 type Narrowed<'de> = DirectoryRewindResponse;
11525
11526 #[inline]
11527 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11528 ::fidl_next::munge! {
11529 let Self {
11530 s,
11531
11532 } = &mut *out_;
11533 }
11534
11535 ::fidl_next::Wire::zero_padding(s);
11536 }
11537 }
11538
11539 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRewindResponse
11540 where
11541 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11542 {
11543 fn decode(
11544 slot_: ::fidl_next::Slot<'_, Self>,
11545 decoder_: &mut ___D,
11546 _: (),
11547 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11548 ::fidl_next::munge! {
11549 let Self {
11550 mut s,
11551
11552 } = slot_;
11553 }
11554
11555 let _field = s.as_mut();
11556
11557 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11558
11559 Ok(())
11560 }
11561 }
11562
11563 impl ::fidl_next::IntoNatural for DirectoryRewindResponse {
11564 type Natural = crate::natural::DirectoryRewindResponse;
11565 }
11566
11567 pub type Name<'de> = ::fidl_next::wire::String<'de>;
11569
11570 #[derive(Clone, Debug)]
11572 #[repr(C)]
11573 pub struct DirectoryLinkResponse {
11574 pub s: ::fidl_next::wire::fuchsia::Status,
11575 }
11576
11577 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkResponse>(), 4);
11578 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkResponse>(), 4);
11579
11580 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkResponse, s), 0);
11581
11582 impl ::fidl_next::Constrained for DirectoryLinkResponse {
11583 type Constraint = ();
11584
11585 fn validate(
11586 _: ::fidl_next::Slot<'_, Self>,
11587 _: Self::Constraint,
11588 ) -> Result<(), ::fidl_next::ValidationError> {
11589 Ok(())
11590 }
11591 }
11592
11593 unsafe impl ::fidl_next::Wire for DirectoryLinkResponse {
11594 type Narrowed<'de> = DirectoryLinkResponse;
11595
11596 #[inline]
11597 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11598 ::fidl_next::munge! {
11599 let Self {
11600 s,
11601
11602 } = &mut *out_;
11603 }
11604
11605 ::fidl_next::Wire::zero_padding(s);
11606 }
11607 }
11608
11609 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryLinkResponse
11610 where
11611 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11612 {
11613 fn decode(
11614 slot_: ::fidl_next::Slot<'_, Self>,
11615 decoder_: &mut ___D,
11616 _: (),
11617 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11618 ::fidl_next::munge! {
11619 let Self {
11620 mut s,
11621
11622 } = slot_;
11623 }
11624
11625 let _field = s.as_mut();
11626
11627 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11628
11629 Ok(())
11630 }
11631 }
11632
11633 impl ::fidl_next::IntoNatural for DirectoryLinkResponse {
11634 type Natural = crate::natural::DirectoryLinkResponse;
11635 }
11636
11637 #[derive(Clone, Copy, Debug)]
11639 #[repr(transparent)]
11640 pub struct UnlinkFlags {
11641 pub(crate) value: ::fidl_next::wire::Uint64,
11642 }
11643
11644 impl ::fidl_next::Constrained for UnlinkFlags {
11645 type Constraint = ();
11646
11647 fn validate(
11648 _: ::fidl_next::Slot<'_, Self>,
11649 _: Self::Constraint,
11650 ) -> Result<(), ::fidl_next::ValidationError> {
11651 Ok(())
11652 }
11653 }
11654
11655 unsafe impl ::fidl_next::Wire for UnlinkFlags {
11656 type Narrowed<'de> = Self;
11657
11658 #[inline]
11659 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11660 }
11662 }
11663
11664 unsafe impl<___D> ::fidl_next::Decode<___D> for UnlinkFlags
11665 where
11666 ___D: ?Sized,
11667 {
11668 fn decode(
11669 slot: ::fidl_next::Slot<'_, Self>,
11670 _: &mut ___D,
11671 _: (),
11672 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11673 Ok(())
11674 }
11675 }
11676
11677 impl ::core::convert::From<crate::natural::UnlinkFlags> for UnlinkFlags {
11678 fn from(natural: crate::natural::UnlinkFlags) -> Self {
11679 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
11680 }
11681 }
11682
11683 impl ::fidl_next::IntoNatural for UnlinkFlags {
11684 type Natural = crate::natural::UnlinkFlags;
11685 }
11686
11687 #[repr(C)]
11689 pub struct UnlinkOptions<'de> {
11690 pub(crate) table: ::fidl_next::wire::Table<'de>,
11691 }
11692
11693 impl<'de> Drop for UnlinkOptions<'de> {
11694 fn drop(&mut self) {
11695 let _ = self
11696 .table
11697 .get(1)
11698 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::UnlinkFlags>() });
11699 }
11700 }
11701
11702 impl ::fidl_next::Constrained for UnlinkOptions<'_> {
11703 type Constraint = ();
11704
11705 fn validate(
11706 _: ::fidl_next::Slot<'_, Self>,
11707 _: Self::Constraint,
11708 ) -> Result<(), ::fidl_next::ValidationError> {
11709 Ok(())
11710 }
11711 }
11712
11713 unsafe impl ::fidl_next::Wire for UnlinkOptions<'static> {
11714 type Narrowed<'de> = UnlinkOptions<'de>;
11715
11716 #[inline]
11717 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11718 ::fidl_next::munge!(let Self { table } = out);
11719 ::fidl_next::wire::Table::zero_padding(table);
11720 }
11721 }
11722
11723 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnlinkOptions<'de>
11724 where
11725 ___D: ::fidl_next::Decoder<'de> + ?Sized,
11726 {
11727 fn decode(
11728 slot: ::fidl_next::Slot<'_, Self>,
11729 decoder: &mut ___D,
11730 _: (),
11731 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11732 ::fidl_next::munge!(let Self { table } = slot);
11733
11734 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11735 match ordinal {
11736 0 => unsafe { ::core::hint::unreachable_unchecked() },
11737
11738 1 => {
11739 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::UnlinkFlags>(
11740 slot.as_mut(),
11741 decoder,
11742 (),
11743 )?;
11744
11745 Ok(())
11746 }
11747
11748 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11749 }
11750 })
11751 }
11752 }
11753
11754 impl<'de> UnlinkOptions<'de> {
11755 pub fn flags(&self) -> ::core::option::Option<&crate::wire::UnlinkFlags> {
11756 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11757 }
11758
11759 pub fn take_flags(&mut self) -> ::core::option::Option<crate::wire::UnlinkFlags> {
11760 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11761 }
11762 }
11763
11764 impl<'de> ::core::fmt::Debug for UnlinkOptions<'de> {
11765 fn fmt(
11766 &self,
11767 f: &mut ::core::fmt::Formatter<'_>,
11768 ) -> ::core::result::Result<(), ::core::fmt::Error> {
11769 f.debug_struct("UnlinkOptions").field("flags", &self.flags()).finish()
11770 }
11771 }
11772
11773 impl<'de> ::fidl_next::IntoNatural for UnlinkOptions<'de> {
11774 type Natural = crate::natural::UnlinkOptions;
11775 }
11776
11777 #[derive(Debug)]
11779 #[repr(C)]
11780 pub struct DirectoryUnlinkRequest<'de> {
11781 pub name: ::fidl_next::wire::String<'de>,
11782
11783 pub options: crate::wire::UnlinkOptions<'de>,
11784 }
11785
11786 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryUnlinkRequest<'_>>(), 32);
11787 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryUnlinkRequest<'_>>(), 8);
11788
11789 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryUnlinkRequest<'_>, name), 0);
11790
11791 static_assertions::const_assert_eq!(
11792 std::mem::offset_of!(DirectoryUnlinkRequest<'_>, options),
11793 16
11794 );
11795
11796 impl ::fidl_next::Constrained for DirectoryUnlinkRequest<'_> {
11797 type Constraint = ();
11798
11799 fn validate(
11800 _: ::fidl_next::Slot<'_, Self>,
11801 _: Self::Constraint,
11802 ) -> Result<(), ::fidl_next::ValidationError> {
11803 Ok(())
11804 }
11805 }
11806
11807 unsafe impl ::fidl_next::Wire for DirectoryUnlinkRequest<'static> {
11808 type Narrowed<'de> = DirectoryUnlinkRequest<'de>;
11809
11810 #[inline]
11811 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11812 ::fidl_next::munge! {
11813 let Self {
11814 name,
11815 options,
11816
11817 } = &mut *out_;
11818 }
11819
11820 ::fidl_next::Wire::zero_padding(name);
11821
11822 ::fidl_next::Wire::zero_padding(options);
11823 }
11824 }
11825
11826 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryUnlinkRequest<'de>
11827 where
11828 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11829 ___D: ::fidl_next::Decoder<'de>,
11830 {
11831 fn decode(
11832 slot_: ::fidl_next::Slot<'_, Self>,
11833 decoder_: &mut ___D,
11834 _: (),
11835 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11836 ::fidl_next::munge! {
11837 let Self {
11838 mut name,
11839 mut options,
11840
11841 } = slot_;
11842 }
11843
11844 let _field = name.as_mut();
11845 ::fidl_next::Constrained::validate(_field, 255)?;
11846 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
11847
11848 let name = unsafe { name.deref_unchecked() };
11849
11850 if name.len() > 255 {
11851 return Err(::fidl_next::DecodeError::VectorTooLong {
11852 size: name.len() as u64,
11853 limit: 255,
11854 });
11855 }
11856
11857 let _field = options.as_mut();
11858
11859 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
11860
11861 Ok(())
11862 }
11863 }
11864
11865 impl<'de> ::fidl_next::IntoNatural for DirectoryUnlinkRequest<'de> {
11866 type Natural = crate::natural::DirectoryUnlinkRequest;
11867 }
11868
11869 pub type DirectoryUnlinkResponse = ::fidl_next::wire::Unit;
11871
11872 pub type DirectoryRenameResponse = ::fidl_next::wire::Unit;
11874
11875 #[derive(Clone, Copy, Debug)]
11877 #[repr(transparent)]
11878 pub struct WatchMask {
11879 pub(crate) value: ::fidl_next::wire::Uint32,
11880 }
11881
11882 impl ::fidl_next::Constrained for WatchMask {
11883 type Constraint = ();
11884
11885 fn validate(
11886 _: ::fidl_next::Slot<'_, Self>,
11887 _: Self::Constraint,
11888 ) -> Result<(), ::fidl_next::ValidationError> {
11889 Ok(())
11890 }
11891 }
11892
11893 unsafe impl ::fidl_next::Wire for WatchMask {
11894 type Narrowed<'de> = Self;
11895
11896 #[inline]
11897 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11898 }
11900 }
11901
11902 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchMask
11903 where
11904 ___D: ?Sized,
11905 {
11906 fn decode(
11907 slot: ::fidl_next::Slot<'_, Self>,
11908 _: &mut ___D,
11909 _: (),
11910 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11911 ::fidl_next::munge!(let Self { value } = slot);
11912 let set = u32::from(*value);
11913 if set & !crate::natural::WatchMask::all().bits() != 0 {
11914 return Err(::fidl_next::DecodeError::InvalidBits {
11915 expected: crate::natural::WatchMask::all().bits() as usize,
11916 actual: set as usize,
11917 });
11918 }
11919
11920 Ok(())
11921 }
11922 }
11923
11924 impl ::core::convert::From<crate::natural::WatchMask> for WatchMask {
11925 fn from(natural: crate::natural::WatchMask) -> Self {
11926 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11927 }
11928 }
11929
11930 impl ::fidl_next::IntoNatural for WatchMask {
11931 type Natural = crate::natural::WatchMask;
11932 }
11933
11934 #[derive(Clone, Debug)]
11936 #[repr(C)]
11937 pub struct DirectoryWatchResponse {
11938 pub s: ::fidl_next::wire::fuchsia::Status,
11939 }
11940
11941 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchResponse>(), 4);
11942 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchResponse>(), 4);
11943
11944 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchResponse, s), 0);
11945
11946 impl ::fidl_next::Constrained for DirectoryWatchResponse {
11947 type Constraint = ();
11948
11949 fn validate(
11950 _: ::fidl_next::Slot<'_, Self>,
11951 _: Self::Constraint,
11952 ) -> Result<(), ::fidl_next::ValidationError> {
11953 Ok(())
11954 }
11955 }
11956
11957 unsafe impl ::fidl_next::Wire for DirectoryWatchResponse {
11958 type Narrowed<'de> = DirectoryWatchResponse;
11959
11960 #[inline]
11961 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11962 ::fidl_next::munge! {
11963 let Self {
11964 s,
11965
11966 } = &mut *out_;
11967 }
11968
11969 ::fidl_next::Wire::zero_padding(s);
11970 }
11971 }
11972
11973 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchResponse
11974 where
11975 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11976 {
11977 fn decode(
11978 slot_: ::fidl_next::Slot<'_, Self>,
11979 decoder_: &mut ___D,
11980 _: (),
11981 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11982 ::fidl_next::munge! {
11983 let Self {
11984 mut s,
11985
11986 } = slot_;
11987 }
11988
11989 let _field = s.as_mut();
11990
11991 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11992
11993 Ok(())
11994 }
11995 }
11996
11997 impl ::fidl_next::IntoNatural for DirectoryWatchResponse {
11998 type Natural = crate::natural::DirectoryWatchResponse;
11999 }
12000
12001 pub type SymlinkTarget<'de> = ::fidl_next::wire::Vector<'de, u8>;
12003
12004 pub type ExtendedAttributeName<'de> = ::fidl_next::wire::Vector<'de, u8>;
12006
12007 #[derive(Debug)]
12009 #[repr(C)]
12010 pub struct NodeGetExtendedAttributeRequest<'de> {
12011 pub name: ::fidl_next::wire::Vector<'de, u8>,
12012 }
12013
12014 static_assertions::const_assert_eq!(
12015 std::mem::size_of::<NodeGetExtendedAttributeRequest<'_>>(),
12016 16
12017 );
12018 static_assertions::const_assert_eq!(
12019 std::mem::align_of::<NodeGetExtendedAttributeRequest<'_>>(),
12020 8
12021 );
12022
12023 static_assertions::const_assert_eq!(
12024 std::mem::offset_of!(NodeGetExtendedAttributeRequest<'_>, name),
12025 0
12026 );
12027
12028 impl ::fidl_next::Constrained for NodeGetExtendedAttributeRequest<'_> {
12029 type Constraint = ();
12030
12031 fn validate(
12032 _: ::fidl_next::Slot<'_, Self>,
12033 _: Self::Constraint,
12034 ) -> Result<(), ::fidl_next::ValidationError> {
12035 Ok(())
12036 }
12037 }
12038
12039 unsafe impl ::fidl_next::Wire for NodeGetExtendedAttributeRequest<'static> {
12040 type Narrowed<'de> = NodeGetExtendedAttributeRequest<'de>;
12041
12042 #[inline]
12043 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12044 ::fidl_next::munge! {
12045 let Self {
12046 name,
12047
12048 } = &mut *out_;
12049 }
12050
12051 ::fidl_next::Wire::zero_padding(name);
12052 }
12053 }
12054
12055 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeGetExtendedAttributeRequest<'de>
12056 where
12057 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12058 ___D: ::fidl_next::Decoder<'de>,
12059 {
12060 fn decode(
12061 slot_: ::fidl_next::Slot<'_, Self>,
12062 decoder_: &mut ___D,
12063 _: (),
12064 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12065 ::fidl_next::munge! {
12066 let Self {
12067 mut name,
12068
12069 } = slot_;
12070 }
12071
12072 let _field = name.as_mut();
12073 ::fidl_next::Constrained::validate(_field, (255, ()))?;
12074 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
12075
12076 let name = unsafe { name.deref_unchecked() };
12077
12078 if name.len() > 255 {
12079 return Err(::fidl_next::DecodeError::VectorTooLong {
12080 size: name.len() as u64,
12081 limit: 255,
12082 });
12083 }
12084
12085 Ok(())
12086 }
12087 }
12088
12089 impl<'de> ::fidl_next::IntoNatural for NodeGetExtendedAttributeRequest<'de> {
12090 type Natural = crate::natural::NodeGetExtendedAttributeRequest;
12091 }
12092
12093 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12095 #[repr(transparent)]
12096 pub struct SetExtendedAttributeMode {
12097 pub(crate) value: ::fidl_next::wire::Uint32,
12098 }
12099
12100 impl ::fidl_next::Constrained for SetExtendedAttributeMode {
12101 type Constraint = ();
12102
12103 fn validate(
12104 _: ::fidl_next::Slot<'_, Self>,
12105 _: Self::Constraint,
12106 ) -> Result<(), ::fidl_next::ValidationError> {
12107 Ok(())
12108 }
12109 }
12110
12111 unsafe impl ::fidl_next::Wire for SetExtendedAttributeMode {
12112 type Narrowed<'de> = Self;
12113
12114 #[inline]
12115 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12116 }
12118 }
12119
12120 impl SetExtendedAttributeMode {
12121 pub const SET: SetExtendedAttributeMode =
12122 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(1) };
12123
12124 pub const CREATE: SetExtendedAttributeMode =
12125 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(2) };
12126
12127 pub const REPLACE: SetExtendedAttributeMode =
12128 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(3) };
12129 }
12130
12131 unsafe impl<___D> ::fidl_next::Decode<___D> for SetExtendedAttributeMode
12132 where
12133 ___D: ?Sized,
12134 {
12135 fn decode(
12136 slot: ::fidl_next::Slot<'_, Self>,
12137 _: &mut ___D,
12138 _: (),
12139 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12140 ::fidl_next::munge!(let Self { value } = slot);
12141
12142 match u32::from(*value) {
12143 1 | 2 | 3 => (),
12144 unknown => {
12145 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
12146 }
12147 }
12148
12149 Ok(())
12150 }
12151 }
12152
12153 impl ::core::convert::From<crate::natural::SetExtendedAttributeMode> for SetExtendedAttributeMode {
12154 fn from(natural: crate::natural::SetExtendedAttributeMode) -> Self {
12155 match natural {
12156 crate::natural::SetExtendedAttributeMode::Set => SetExtendedAttributeMode::SET,
12157
12158 crate::natural::SetExtendedAttributeMode::Create => {
12159 SetExtendedAttributeMode::CREATE
12160 }
12161
12162 crate::natural::SetExtendedAttributeMode::Replace => {
12163 SetExtendedAttributeMode::REPLACE
12164 }
12165 }
12166 }
12167 }
12168
12169 impl ::fidl_next::IntoNatural for SetExtendedAttributeMode {
12170 type Natural = crate::natural::SetExtendedAttributeMode;
12171 }
12172
12173 pub type NodeSetExtendedAttributeResponse = ::fidl_next::wire::Unit;
12175
12176 #[derive(Debug)]
12178 #[repr(C)]
12179 pub struct NodeRemoveExtendedAttributeRequest<'de> {
12180 pub name: ::fidl_next::wire::Vector<'de, u8>,
12181 }
12182
12183 static_assertions::const_assert_eq!(
12184 std::mem::size_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
12185 16
12186 );
12187 static_assertions::const_assert_eq!(
12188 std::mem::align_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
12189 8
12190 );
12191
12192 static_assertions::const_assert_eq!(
12193 std::mem::offset_of!(NodeRemoveExtendedAttributeRequest<'_>, name),
12194 0
12195 );
12196
12197 impl ::fidl_next::Constrained for NodeRemoveExtendedAttributeRequest<'_> {
12198 type Constraint = ();
12199
12200 fn validate(
12201 _: ::fidl_next::Slot<'_, Self>,
12202 _: Self::Constraint,
12203 ) -> Result<(), ::fidl_next::ValidationError> {
12204 Ok(())
12205 }
12206 }
12207
12208 unsafe impl ::fidl_next::Wire for NodeRemoveExtendedAttributeRequest<'static> {
12209 type Narrowed<'de> = NodeRemoveExtendedAttributeRequest<'de>;
12210
12211 #[inline]
12212 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12213 ::fidl_next::munge! {
12214 let Self {
12215 name,
12216
12217 } = &mut *out_;
12218 }
12219
12220 ::fidl_next::Wire::zero_padding(name);
12221 }
12222 }
12223
12224 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeRemoveExtendedAttributeRequest<'de>
12225 where
12226 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12227 ___D: ::fidl_next::Decoder<'de>,
12228 {
12229 fn decode(
12230 slot_: ::fidl_next::Slot<'_, Self>,
12231 decoder_: &mut ___D,
12232 _: (),
12233 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12234 ::fidl_next::munge! {
12235 let Self {
12236 mut name,
12237
12238 } = slot_;
12239 }
12240
12241 let _field = name.as_mut();
12242 ::fidl_next::Constrained::validate(_field, (255, ()))?;
12243 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
12244
12245 let name = unsafe { name.deref_unchecked() };
12246
12247 if name.len() > 255 {
12248 return Err(::fidl_next::DecodeError::VectorTooLong {
12249 size: name.len() as u64,
12250 limit: 255,
12251 });
12252 }
12253
12254 Ok(())
12255 }
12256 }
12257
12258 impl<'de> ::fidl_next::IntoNatural for NodeRemoveExtendedAttributeRequest<'de> {
12259 type Natural = crate::natural::NodeRemoveExtendedAttributeRequest;
12260 }
12261
12262 pub type NodeRemoveExtendedAttributeResponse = ::fidl_next::wire::Unit;
12264
12265 pub type DirectoryCreateSymlinkResponse = ::fidl_next::wire::Unit;
12267
12268 pub type NodeSetFlagsResponse = ::fidl_next::wire::Unit;
12270
12271 #[derive(Clone, Debug)]
12273 #[repr(C)]
12274 pub struct NodeDeprecatedGetAttrResponse {
12275 pub s: ::fidl_next::wire::fuchsia::Status,
12276
12277 pub attributes: crate::wire::NodeAttributes,
12278 }
12279
12280 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetAttrResponse>(), 64);
12281 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetAttrResponse>(), 8);
12282
12283 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetAttrResponse, s), 0);
12284
12285 static_assertions::const_assert_eq!(
12286 std::mem::offset_of!(NodeDeprecatedGetAttrResponse, attributes),
12287 8
12288 );
12289
12290 impl ::fidl_next::Constrained for NodeDeprecatedGetAttrResponse {
12291 type Constraint = ();
12292
12293 fn validate(
12294 _: ::fidl_next::Slot<'_, Self>,
12295 _: Self::Constraint,
12296 ) -> Result<(), ::fidl_next::ValidationError> {
12297 Ok(())
12298 }
12299 }
12300
12301 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetAttrResponse {
12302 type Narrowed<'de> = NodeDeprecatedGetAttrResponse;
12303
12304 #[inline]
12305 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12306 ::fidl_next::munge! {
12307 let Self {
12308 s,
12309 attributes,
12310
12311 } = &mut *out_;
12312 }
12313
12314 ::fidl_next::Wire::zero_padding(s);
12315
12316 ::fidl_next::Wire::zero_padding(attributes);
12317
12318 unsafe {
12319 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12320 }
12321 }
12322 }
12323
12324 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetAttrResponse
12325 where
12326 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12327 {
12328 fn decode(
12329 slot_: ::fidl_next::Slot<'_, Self>,
12330 decoder_: &mut ___D,
12331 _: (),
12332 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12333 if slot_.as_bytes()[4..8] != [0u8; 4] {
12334 return Err(::fidl_next::DecodeError::InvalidPadding);
12335 }
12336
12337 ::fidl_next::munge! {
12338 let Self {
12339 mut s,
12340 mut attributes,
12341
12342 } = slot_;
12343 }
12344
12345 let _field = s.as_mut();
12346
12347 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12348
12349 let _field = attributes.as_mut();
12350
12351 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
12352
12353 Ok(())
12354 }
12355 }
12356
12357 impl ::fidl_next::IntoNatural for NodeDeprecatedGetAttrResponse {
12358 type Natural = crate::natural::NodeDeprecatedGetAttrResponse;
12359 }
12360
12361 #[derive(Clone, Debug)]
12363 #[repr(C)]
12364 pub struct NodeDeprecatedSetAttrRequest {
12365 pub flags: crate::wire::NodeAttributeFlags,
12366
12367 pub attributes: crate::wire::NodeAttributes,
12368 }
12369
12370 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrRequest>(), 64);
12371 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrRequest>(), 8);
12372
12373 static_assertions::const_assert_eq!(
12374 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, flags),
12375 0
12376 );
12377
12378 static_assertions::const_assert_eq!(
12379 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, attributes),
12380 8
12381 );
12382
12383 impl ::fidl_next::Constrained for NodeDeprecatedSetAttrRequest {
12384 type Constraint = ();
12385
12386 fn validate(
12387 _: ::fidl_next::Slot<'_, Self>,
12388 _: Self::Constraint,
12389 ) -> Result<(), ::fidl_next::ValidationError> {
12390 Ok(())
12391 }
12392 }
12393
12394 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrRequest {
12395 type Narrowed<'de> = NodeDeprecatedSetAttrRequest;
12396
12397 #[inline]
12398 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12399 ::fidl_next::munge! {
12400 let Self {
12401 flags,
12402 attributes,
12403
12404 } = &mut *out_;
12405 }
12406
12407 ::fidl_next::Wire::zero_padding(flags);
12408
12409 ::fidl_next::Wire::zero_padding(attributes);
12410
12411 unsafe {
12412 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12413 }
12414 }
12415 }
12416
12417 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrRequest
12418 where
12419 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12420 {
12421 fn decode(
12422 slot_: ::fidl_next::Slot<'_, Self>,
12423 decoder_: &mut ___D,
12424 _: (),
12425 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12426 if slot_.as_bytes()[4..8] != [0u8; 4] {
12427 return Err(::fidl_next::DecodeError::InvalidPadding);
12428 }
12429
12430 ::fidl_next::munge! {
12431 let Self {
12432 mut flags,
12433 mut attributes,
12434
12435 } = slot_;
12436 }
12437
12438 let _field = flags.as_mut();
12439
12440 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12441
12442 let _field = attributes.as_mut();
12443
12444 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
12445
12446 Ok(())
12447 }
12448 }
12449
12450 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrRequest {
12451 type Natural = crate::natural::NodeDeprecatedSetAttrRequest;
12452 }
12453
12454 #[derive(Clone, Debug)]
12456 #[repr(C)]
12457 pub struct NodeDeprecatedSetAttrResponse {
12458 pub s: ::fidl_next::wire::fuchsia::Status,
12459 }
12460
12461 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrResponse>(), 4);
12462 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrResponse>(), 4);
12463
12464 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetAttrResponse, s), 0);
12465
12466 impl ::fidl_next::Constrained for NodeDeprecatedSetAttrResponse {
12467 type Constraint = ();
12468
12469 fn validate(
12470 _: ::fidl_next::Slot<'_, Self>,
12471 _: Self::Constraint,
12472 ) -> Result<(), ::fidl_next::ValidationError> {
12473 Ok(())
12474 }
12475 }
12476
12477 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrResponse {
12478 type Narrowed<'de> = NodeDeprecatedSetAttrResponse;
12479
12480 #[inline]
12481 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12482 ::fidl_next::munge! {
12483 let Self {
12484 s,
12485
12486 } = &mut *out_;
12487 }
12488
12489 ::fidl_next::Wire::zero_padding(s);
12490 }
12491 }
12492
12493 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrResponse
12494 where
12495 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12496 {
12497 fn decode(
12498 slot_: ::fidl_next::Slot<'_, Self>,
12499 decoder_: &mut ___D,
12500 _: (),
12501 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12502 ::fidl_next::munge! {
12503 let Self {
12504 mut s,
12505
12506 } = slot_;
12507 }
12508
12509 let _field = s.as_mut();
12510
12511 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12512
12513 Ok(())
12514 }
12515 }
12516
12517 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrResponse {
12518 type Natural = crate::natural::NodeDeprecatedSetAttrResponse;
12519 }
12520
12521 #[derive(Clone, Debug)]
12523 #[repr(C)]
12524 pub struct NodeDeprecatedGetFlagsResponse {
12525 pub s: ::fidl_next::wire::fuchsia::Status,
12526
12527 pub flags: crate::wire::OpenFlags,
12528 }
12529
12530 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetFlagsResponse>(), 8);
12531 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetFlagsResponse>(), 4);
12532
12533 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, s), 0);
12534
12535 static_assertions::const_assert_eq!(
12536 std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, flags),
12537 4
12538 );
12539
12540 impl ::fidl_next::Constrained for NodeDeprecatedGetFlagsResponse {
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 NodeDeprecatedGetFlagsResponse {
12552 type Narrowed<'de> = NodeDeprecatedGetFlagsResponse;
12553
12554 #[inline]
12555 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12556 ::fidl_next::munge! {
12557 let Self {
12558 s,
12559 flags,
12560
12561 } = &mut *out_;
12562 }
12563
12564 ::fidl_next::Wire::zero_padding(s);
12565
12566 ::fidl_next::Wire::zero_padding(flags);
12567 }
12568 }
12569
12570 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetFlagsResponse
12571 where
12572 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12573 {
12574 fn decode(
12575 slot_: ::fidl_next::Slot<'_, Self>,
12576 decoder_: &mut ___D,
12577 _: (),
12578 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12579 ::fidl_next::munge! {
12580 let Self {
12581 mut s,
12582 mut flags,
12583
12584 } = slot_;
12585 }
12586
12587 let _field = s.as_mut();
12588
12589 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12590
12591 let _field = flags.as_mut();
12592
12593 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12594
12595 Ok(())
12596 }
12597 }
12598
12599 impl ::fidl_next::IntoNatural for NodeDeprecatedGetFlagsResponse {
12600 type Natural = crate::natural::NodeDeprecatedGetFlagsResponse;
12601 }
12602
12603 #[derive(Clone, Debug)]
12605 #[repr(C)]
12606 pub struct NodeDeprecatedSetFlagsRequest {
12607 pub flags: crate::wire::OpenFlags,
12608 }
12609
12610 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsRequest>(), 4);
12611 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsRequest>(), 4);
12612
12613 static_assertions::const_assert_eq!(
12614 std::mem::offset_of!(NodeDeprecatedSetFlagsRequest, flags),
12615 0
12616 );
12617
12618 impl ::fidl_next::Constrained for NodeDeprecatedSetFlagsRequest {
12619 type Constraint = ();
12620
12621 fn validate(
12622 _: ::fidl_next::Slot<'_, Self>,
12623 _: Self::Constraint,
12624 ) -> Result<(), ::fidl_next::ValidationError> {
12625 Ok(())
12626 }
12627 }
12628
12629 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsRequest {
12630 type Narrowed<'de> = NodeDeprecatedSetFlagsRequest;
12631
12632 #[inline]
12633 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12634 ::fidl_next::munge! {
12635 let Self {
12636 flags,
12637
12638 } = &mut *out_;
12639 }
12640
12641 ::fidl_next::Wire::zero_padding(flags);
12642 }
12643 }
12644
12645 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsRequest
12646 where
12647 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12648 {
12649 fn decode(
12650 slot_: ::fidl_next::Slot<'_, Self>,
12651 decoder_: &mut ___D,
12652 _: (),
12653 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12654 ::fidl_next::munge! {
12655 let Self {
12656 mut flags,
12657
12658 } = slot_;
12659 }
12660
12661 let _field = flags.as_mut();
12662
12663 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12664
12665 Ok(())
12666 }
12667 }
12668
12669 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsRequest {
12670 type Natural = crate::natural::NodeDeprecatedSetFlagsRequest;
12671 }
12672
12673 #[derive(Clone, Debug)]
12675 #[repr(C)]
12676 pub struct NodeDeprecatedSetFlagsResponse {
12677 pub s: ::fidl_next::wire::fuchsia::Status,
12678 }
12679
12680 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsResponse>(), 4);
12681 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsResponse>(), 4);
12682
12683 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetFlagsResponse, s), 0);
12684
12685 impl ::fidl_next::Constrained for NodeDeprecatedSetFlagsResponse {
12686 type Constraint = ();
12687
12688 fn validate(
12689 _: ::fidl_next::Slot<'_, Self>,
12690 _: Self::Constraint,
12691 ) -> Result<(), ::fidl_next::ValidationError> {
12692 Ok(())
12693 }
12694 }
12695
12696 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsResponse {
12697 type Narrowed<'de> = NodeDeprecatedSetFlagsResponse;
12698
12699 #[inline]
12700 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12701 ::fidl_next::munge! {
12702 let Self {
12703 s,
12704
12705 } = &mut *out_;
12706 }
12707
12708 ::fidl_next::Wire::zero_padding(s);
12709 }
12710 }
12711
12712 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsResponse
12713 where
12714 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12715 {
12716 fn decode(
12717 slot_: ::fidl_next::Slot<'_, Self>,
12718 decoder_: &mut ___D,
12719 _: (),
12720 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12721 ::fidl_next::munge! {
12722 let Self {
12723 mut s,
12724
12725 } = slot_;
12726 }
12727
12728 let _field = s.as_mut();
12729
12730 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12731
12732 Ok(())
12733 }
12734 }
12735
12736 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsResponse {
12737 type Natural = crate::natural::NodeDeprecatedSetFlagsResponse;
12738 }
12739
12740 #[derive(Clone, Copy, Debug)]
12742 #[repr(transparent)]
12743 pub struct Flags {
12744 pub(crate) value: ::fidl_next::wire::Uint64,
12745 }
12746
12747 impl ::fidl_next::Constrained for Flags {
12748 type Constraint = ();
12749
12750 fn validate(
12751 _: ::fidl_next::Slot<'_, Self>,
12752 _: Self::Constraint,
12753 ) -> Result<(), ::fidl_next::ValidationError> {
12754 Ok(())
12755 }
12756 }
12757
12758 unsafe impl ::fidl_next::Wire for Flags {
12759 type Narrowed<'de> = Self;
12760
12761 #[inline]
12762 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12763 }
12765 }
12766
12767 unsafe impl<___D> ::fidl_next::Decode<___D> for Flags
12768 where
12769 ___D: ?Sized,
12770 {
12771 fn decode(
12772 slot: ::fidl_next::Slot<'_, Self>,
12773 _: &mut ___D,
12774 _: (),
12775 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12776 Ok(())
12777 }
12778 }
12779
12780 impl ::core::convert::From<crate::natural::Flags> for Flags {
12781 fn from(natural: crate::natural::Flags) -> Self {
12782 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
12783 }
12784 }
12785
12786 impl ::fidl_next::IntoNatural for Flags {
12787 type Natural = crate::natural::Flags;
12788 }
12789
12790 #[derive(Clone, Debug)]
12792 #[repr(C)]
12793 pub struct NodeGetFlagsResponse {
12794 pub flags: crate::wire::Flags,
12795 }
12796
12797 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetFlagsResponse>(), 8);
12798 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetFlagsResponse>(), 8);
12799
12800 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetFlagsResponse, flags), 0);
12801
12802 impl ::fidl_next::Constrained for NodeGetFlagsResponse {
12803 type Constraint = ();
12804
12805 fn validate(
12806 _: ::fidl_next::Slot<'_, Self>,
12807 _: Self::Constraint,
12808 ) -> Result<(), ::fidl_next::ValidationError> {
12809 Ok(())
12810 }
12811 }
12812
12813 unsafe impl ::fidl_next::Wire for NodeGetFlagsResponse {
12814 type Narrowed<'de> = NodeGetFlagsResponse;
12815
12816 #[inline]
12817 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12818 ::fidl_next::munge! {
12819 let Self {
12820 flags,
12821
12822 } = &mut *out_;
12823 }
12824
12825 ::fidl_next::Wire::zero_padding(flags);
12826 }
12827 }
12828
12829 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetFlagsResponse
12830 where
12831 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12832 {
12833 fn decode(
12834 slot_: ::fidl_next::Slot<'_, Self>,
12835 decoder_: &mut ___D,
12836 _: (),
12837 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12838 ::fidl_next::munge! {
12839 let Self {
12840 mut flags,
12841
12842 } = slot_;
12843 }
12844
12845 let _field = flags.as_mut();
12846
12847 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12848
12849 Ok(())
12850 }
12851 }
12852
12853 impl ::fidl_next::IntoNatural for NodeGetFlagsResponse {
12854 type Natural = crate::natural::NodeGetFlagsResponse;
12855 }
12856
12857 #[derive(Clone, Debug)]
12859 #[repr(C)]
12860 pub struct NodeSetFlagsRequest {
12861 pub flags: crate::wire::Flags,
12862 }
12863
12864 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetFlagsRequest>(), 8);
12865 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSetFlagsRequest>(), 8);
12866
12867 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeSetFlagsRequest, flags), 0);
12868
12869 impl ::fidl_next::Constrained for NodeSetFlagsRequest {
12870 type Constraint = ();
12871
12872 fn validate(
12873 _: ::fidl_next::Slot<'_, Self>,
12874 _: Self::Constraint,
12875 ) -> Result<(), ::fidl_next::ValidationError> {
12876 Ok(())
12877 }
12878 }
12879
12880 unsafe impl ::fidl_next::Wire for NodeSetFlagsRequest {
12881 type Narrowed<'de> = NodeSetFlagsRequest;
12882
12883 #[inline]
12884 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12885 ::fidl_next::munge! {
12886 let Self {
12887 flags,
12888
12889 } = &mut *out_;
12890 }
12891
12892 ::fidl_next::Wire::zero_padding(flags);
12893 }
12894 }
12895
12896 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetFlagsRequest
12897 where
12898 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12899 {
12900 fn decode(
12901 slot_: ::fidl_next::Slot<'_, Self>,
12902 decoder_: &mut ___D,
12903 _: (),
12904 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12905 ::fidl_next::munge! {
12906 let Self {
12907 mut flags,
12908
12909 } = slot_;
12910 }
12911
12912 let _field = flags.as_mut();
12913
12914 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12915
12916 Ok(())
12917 }
12918 }
12919
12920 impl ::fidl_next::IntoNatural for NodeSetFlagsRequest {
12921 type Natural = crate::natural::NodeSetFlagsRequest;
12922 }
12923
12924 pub type EmptyStruct = ::fidl_next::wire::Unit;
12926
12927 #[repr(transparent)]
12929 pub struct SelinuxContext<'de> {
12930 pub(crate) raw: ::fidl_next::wire::Union,
12931 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12932 }
12933
12934 impl<'de> Drop for SelinuxContext<'de> {
12935 fn drop(&mut self) {
12936 match self.raw.ordinal() {
12937 1 => {
12938 let _ = unsafe {
12939 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12940 };
12941 }
12942
12943 2 => {
12944 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::EmptyStruct>() };
12945 }
12946
12947 _ => (),
12948 }
12949 }
12950 }
12951
12952 impl ::fidl_next::Constrained for SelinuxContext<'_> {
12953 type Constraint = ();
12954
12955 fn validate(
12956 _: ::fidl_next::Slot<'_, Self>,
12957 _: Self::Constraint,
12958 ) -> Result<(), ::fidl_next::ValidationError> {
12959 Ok(())
12960 }
12961 }
12962
12963 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
12964 type Narrowed<'de> = SelinuxContext<'de>;
12965
12966 #[inline]
12967 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12968 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12969 ::fidl_next::wire::Union::zero_padding(raw);
12970 }
12971 }
12972
12973 pub mod selinux_context {
12974 pub enum Ref<'de> {
12975 Data(&'de ::fidl_next::wire::Vector<'de, u8>),
12976
12977 UseExtendedAttributes(&'de crate::wire::EmptyStruct),
12978
12979 UnknownOrdinal_(u64),
12980 }
12981
12982 pub enum Value<'de> {
12983 Data(::fidl_next::wire::Vector<'de, u8>),
12984
12985 UseExtendedAttributes(crate::wire::EmptyStruct),
12986
12987 UnknownOrdinal_(u64),
12988 }
12989 }
12990
12991 impl<'de> SelinuxContext<'de> {
12992 pub fn as_ref(&self) -> crate::wire::selinux_context::Ref<'_> {
12993 match self.raw.ordinal() {
12994 1 => crate::wire::selinux_context::Ref::Data(unsafe {
12995 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
12996 }),
12997
12998 2 => crate::wire::selinux_context::Ref::UseExtendedAttributes(unsafe {
12999 self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
13000 }),
13001
13002 unknown => crate::wire::selinux_context::Ref::UnknownOrdinal_(unknown),
13003 }
13004 }
13005
13006 pub fn into_inner(self) -> crate::wire::selinux_context::Value<'de> {
13007 let this = ::core::mem::ManuallyDrop::new(self);
13008
13009 match this.raw.ordinal() {
13010 1 => crate::wire::selinux_context::Value::Data(unsafe {
13011 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13012 }),
13013
13014 2 => crate::wire::selinux_context::Value::UseExtendedAttributes(unsafe {
13015 this.raw.get().read_unchecked::<crate::wire::EmptyStruct>()
13016 }),
13017
13018 unknown => crate::wire::selinux_context::Value::UnknownOrdinal_(unknown),
13019 }
13020 }
13021 }
13022
13023 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SelinuxContext<'de>
13024 where
13025 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13026 ___D: ::fidl_next::Decoder<'de>,
13027 {
13028 fn decode(
13029 mut slot: ::fidl_next::Slot<'_, Self>,
13030 decoder: &mut ___D,
13031 _: (),
13032 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13033 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
13034 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
13035 1 => {
13036 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
13037 raw,
13038 decoder,
13039 (256, ()),
13040 )?
13041 }
13042
13043 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::EmptyStruct>(
13044 raw,
13045 decoder,
13046 (),
13047 )?,
13048
13049 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
13050 }
13051
13052 Ok(())
13053 }
13054 }
13055
13056 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
13057 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
13058 match self.raw.ordinal() {
13059 1 => unsafe {
13060 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
13061 },
13062 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>().fmt(f) },
13063 _ => unsafe { ::core::hint::unreachable_unchecked() },
13064 }
13065 }
13066 }
13067
13068 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
13069 type Natural = crate::natural::SelinuxContext;
13070 }
13071
13072 #[repr(C)]
13074 pub struct MutableNodeAttributes<'de> {
13075 pub(crate) table: ::fidl_next::wire::Table<'de>,
13076 }
13077
13078 impl<'de> Drop for MutableNodeAttributes<'de> {
13079 fn drop(&mut self) {
13080 let _ = self
13081 .table
13082 .get(1)
13083 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13084
13085 let _ = self
13086 .table
13087 .get(2)
13088 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13089
13090 let _ = self
13091 .table
13092 .get(3)
13093 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13094
13095 let _ = self
13096 .table
13097 .get(4)
13098 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13099
13100 let _ = self
13101 .table
13102 .get(5)
13103 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13104
13105 let _ = self
13106 .table
13107 .get(6)
13108 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13109
13110 let _ = self
13111 .table
13112 .get(7)
13113 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13114
13115 let _ = self.table.get(8).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13116
13117 let _ = self.table.get(9).map(|envelope| unsafe {
13118 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
13119 });
13120
13121 let _ =
13122 self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 16]>() });
13123 }
13124 }
13125
13126 impl ::fidl_next::Constrained for MutableNodeAttributes<'_> {
13127 type Constraint = ();
13128
13129 fn validate(
13130 _: ::fidl_next::Slot<'_, Self>,
13131 _: Self::Constraint,
13132 ) -> Result<(), ::fidl_next::ValidationError> {
13133 Ok(())
13134 }
13135 }
13136
13137 unsafe impl ::fidl_next::Wire for MutableNodeAttributes<'static> {
13138 type Narrowed<'de> = MutableNodeAttributes<'de>;
13139
13140 #[inline]
13141 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13142 ::fidl_next::munge!(let Self { table } = out);
13143 ::fidl_next::wire::Table::zero_padding(table);
13144 }
13145 }
13146
13147 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MutableNodeAttributes<'de>
13148 where
13149 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13150 {
13151 fn decode(
13152 slot: ::fidl_next::Slot<'_, Self>,
13153 decoder: &mut ___D,
13154 _: (),
13155 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13156 ::fidl_next::munge!(let Self { table } = slot);
13157
13158 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13159 match ordinal {
13160 0 => unsafe { ::core::hint::unreachable_unchecked() },
13161
13162 1 => {
13163 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13164 slot.as_mut(),
13165 decoder,
13166 (),
13167 )?;
13168
13169 Ok(())
13170 }
13171
13172 2 => {
13173 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13174 slot.as_mut(),
13175 decoder,
13176 (),
13177 )?;
13178
13179 Ok(())
13180 }
13181
13182 3 => {
13183 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13184 slot.as_mut(),
13185 decoder,
13186 (),
13187 )?;
13188
13189 Ok(())
13190 }
13191
13192 4 => {
13193 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13194 slot.as_mut(),
13195 decoder,
13196 (),
13197 )?;
13198
13199 Ok(())
13200 }
13201
13202 5 => {
13203 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13204 slot.as_mut(),
13205 decoder,
13206 (),
13207 )?;
13208
13209 Ok(())
13210 }
13211
13212 6 => {
13213 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13214 slot.as_mut(),
13215 decoder,
13216 (),
13217 )?;
13218
13219 Ok(())
13220 }
13221
13222 7 => {
13223 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13224 slot.as_mut(),
13225 decoder,
13226 (),
13227 )?;
13228
13229 Ok(())
13230 }
13231
13232 8 => {
13233 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13234 slot.as_mut(),
13235 decoder,
13236 (),
13237 )?;
13238
13239 Ok(())
13240 }
13241
13242 9 => {
13243 ::fidl_next::wire::Envelope::decode_as::<
13244 ___D,
13245 crate::wire::SelinuxContext<'de>,
13246 >(slot.as_mut(), decoder, ())?;
13247
13248 Ok(())
13249 }
13250
13251 10 => {
13252 ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 16]>(
13253 slot.as_mut(),
13254 decoder,
13255 (),
13256 )?;
13257
13258 Ok(())
13259 }
13260
13261 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13262 }
13263 })
13264 }
13265 }
13266
13267 impl<'de> MutableNodeAttributes<'de> {
13268 pub fn creation_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13269 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13270 }
13271
13272 pub fn take_creation_time(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13273 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13274 }
13275
13276 pub fn modification_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13277 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13278 }
13279
13280 pub fn take_modification_time(
13281 &mut self,
13282 ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13283 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13284 }
13285
13286 pub fn mode(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13287 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
13288 }
13289
13290 pub fn take_mode(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
13291 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
13292 }
13293
13294 pub fn uid(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13295 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
13296 }
13297
13298 pub fn take_uid(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
13299 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
13300 }
13301
13302 pub fn gid(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13303 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13304 }
13305
13306 pub fn take_gid(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
13307 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13308 }
13309
13310 pub fn rdev(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13311 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
13312 }
13313
13314 pub fn take_rdev(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13315 unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
13316 }
13317
13318 pub fn access_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13319 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
13320 }
13321
13322 pub fn take_access_time(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13323 unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
13324 }
13325
13326 pub fn casefold(&self) -> ::core::option::Option<&bool> {
13327 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
13328 }
13329
13330 pub fn take_casefold(&mut self) -> ::core::option::Option<bool> {
13331 unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
13332 }
13333
13334 pub fn selinux_context(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
13335 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
13336 }
13337
13338 pub fn take_selinux_context(
13339 &mut self,
13340 ) -> ::core::option::Option<crate::wire::SelinuxContext<'de>> {
13341 unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
13342 }
13343
13344 pub fn wrapping_key_id(&self) -> ::core::option::Option<&[u8; 16]> {
13345 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
13346 }
13347
13348 pub fn take_wrapping_key_id(&mut self) -> ::core::option::Option<[u8; 16]> {
13349 unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
13350 }
13351 }
13352
13353 impl<'de> ::core::fmt::Debug for MutableNodeAttributes<'de> {
13354 fn fmt(
13355 &self,
13356 f: &mut ::core::fmt::Formatter<'_>,
13357 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13358 f.debug_struct("MutableNodeAttributes")
13359 .field("creation_time", &self.creation_time())
13360 .field("modification_time", &self.modification_time())
13361 .field("mode", &self.mode())
13362 .field("uid", &self.uid())
13363 .field("gid", &self.gid())
13364 .field("rdev", &self.rdev())
13365 .field("access_time", &self.access_time())
13366 .field("casefold", &self.casefold())
13367 .field("selinux_context", &self.selinux_context())
13368 .field("wrapping_key_id", &self.wrapping_key_id())
13369 .finish()
13370 }
13371 }
13372
13373 impl<'de> ::fidl_next::IntoNatural for MutableNodeAttributes<'de> {
13374 type Natural = crate::natural::MutableNodeAttributes;
13375 }
13376
13377 #[derive(Clone, Copy, Debug)]
13379 #[repr(transparent)]
13380 pub struct NodeProtocolKinds {
13381 pub(crate) value: ::fidl_next::wire::Uint64,
13382 }
13383
13384 impl ::fidl_next::Constrained for NodeProtocolKinds {
13385 type Constraint = ();
13386
13387 fn validate(
13388 _: ::fidl_next::Slot<'_, Self>,
13389 _: Self::Constraint,
13390 ) -> Result<(), ::fidl_next::ValidationError> {
13391 Ok(())
13392 }
13393 }
13394
13395 unsafe impl ::fidl_next::Wire for NodeProtocolKinds {
13396 type Narrowed<'de> = Self;
13397
13398 #[inline]
13399 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13400 }
13402 }
13403
13404 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeProtocolKinds
13405 where
13406 ___D: ?Sized,
13407 {
13408 fn decode(
13409 slot: ::fidl_next::Slot<'_, Self>,
13410 _: &mut ___D,
13411 _: (),
13412 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13413 Ok(())
13414 }
13415 }
13416
13417 impl ::core::convert::From<crate::natural::NodeProtocolKinds> for NodeProtocolKinds {
13418 fn from(natural: crate::natural::NodeProtocolKinds) -> Self {
13419 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
13420 }
13421 }
13422
13423 impl ::fidl_next::IntoNatural for NodeProtocolKinds {
13424 type Natural = crate::natural::NodeProtocolKinds;
13425 }
13426
13427 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
13429 #[repr(transparent)]
13430 pub struct HashAlgorithm {
13431 pub(crate) value: u8,
13432 }
13433
13434 impl ::fidl_next::Constrained for HashAlgorithm {
13435 type Constraint = ();
13436
13437 fn validate(
13438 _: ::fidl_next::Slot<'_, Self>,
13439 _: Self::Constraint,
13440 ) -> Result<(), ::fidl_next::ValidationError> {
13441 Ok(())
13442 }
13443 }
13444
13445 unsafe impl ::fidl_next::Wire for HashAlgorithm {
13446 type Narrowed<'de> = Self;
13447
13448 #[inline]
13449 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13450 }
13452 }
13453
13454 impl HashAlgorithm {
13455 pub const SHA256: HashAlgorithm = HashAlgorithm { value: 1 };
13456
13457 pub const SHA512: HashAlgorithm = HashAlgorithm { value: 2 };
13458 }
13459
13460 unsafe impl<___D> ::fidl_next::Decode<___D> for HashAlgorithm
13461 where
13462 ___D: ?Sized,
13463 {
13464 fn decode(
13465 slot: ::fidl_next::Slot<'_, Self>,
13466 _: &mut ___D,
13467 _: (),
13468 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13469 Ok(())
13470 }
13471 }
13472
13473 impl ::core::convert::From<crate::natural::HashAlgorithm> for HashAlgorithm {
13474 fn from(natural: crate::natural::HashAlgorithm) -> Self {
13475 match natural {
13476 crate::natural::HashAlgorithm::Sha256 => HashAlgorithm::SHA256,
13477
13478 crate::natural::HashAlgorithm::Sha512 => HashAlgorithm::SHA512,
13479
13480 crate::natural::HashAlgorithm::UnknownOrdinal_(value) => {
13481 HashAlgorithm { value: u8::from(value) }
13482 }
13483 }
13484 }
13485 }
13486
13487 impl ::fidl_next::IntoNatural for HashAlgorithm {
13488 type Natural = crate::natural::HashAlgorithm;
13489 }
13490
13491 #[repr(C)]
13493 pub struct VerificationOptions<'de> {
13494 pub(crate) table: ::fidl_next::wire::Table<'de>,
13495 }
13496
13497 impl<'de> Drop for VerificationOptions<'de> {
13498 fn drop(&mut self) {
13499 let _ = self
13500 .table
13501 .get(1)
13502 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::HashAlgorithm>() });
13503
13504 let _ = self.table.get(2).map(|envelope| unsafe {
13505 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13506 });
13507 }
13508 }
13509
13510 impl ::fidl_next::Constrained for VerificationOptions<'_> {
13511 type Constraint = ();
13512
13513 fn validate(
13514 _: ::fidl_next::Slot<'_, Self>,
13515 _: Self::Constraint,
13516 ) -> Result<(), ::fidl_next::ValidationError> {
13517 Ok(())
13518 }
13519 }
13520
13521 unsafe impl ::fidl_next::Wire for VerificationOptions<'static> {
13522 type Narrowed<'de> = VerificationOptions<'de>;
13523
13524 #[inline]
13525 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13526 ::fidl_next::munge!(let Self { table } = out);
13527 ::fidl_next::wire::Table::zero_padding(table);
13528 }
13529 }
13530
13531 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VerificationOptions<'de>
13532 where
13533 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13534 {
13535 fn decode(
13536 slot: ::fidl_next::Slot<'_, Self>,
13537 decoder: &mut ___D,
13538 _: (),
13539 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13540 ::fidl_next::munge!(let Self { table } = slot);
13541
13542 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13543 match ordinal {
13544 0 => unsafe { ::core::hint::unreachable_unchecked() },
13545
13546 1 => {
13547 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::HashAlgorithm>(
13548 slot.as_mut(),
13549 decoder,
13550 (),
13551 )?;
13552
13553 Ok(())
13554 }
13555
13556 2 => {
13557 ::fidl_next::wire::Envelope::decode_as::<
13558 ___D,
13559 ::fidl_next::wire::Vector<'de, u8>,
13560 >(slot.as_mut(), decoder, (32, ()))?;
13561
13562 let value = unsafe {
13563 slot.deref_unchecked()
13564 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13565 };
13566
13567 if value.len() > 32 {
13568 return Err(::fidl_next::DecodeError::VectorTooLong {
13569 size: value.len() as u64,
13570 limit: 32,
13571 });
13572 }
13573
13574 Ok(())
13575 }
13576
13577 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13578 }
13579 })
13580 }
13581 }
13582
13583 impl<'de> VerificationOptions<'de> {
13584 pub fn hash_algorithm(&self) -> ::core::option::Option<&crate::wire::HashAlgorithm> {
13585 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13586 }
13587
13588 pub fn take_hash_algorithm(
13589 &mut self,
13590 ) -> ::core::option::Option<crate::wire::HashAlgorithm> {
13591 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13592 }
13593
13594 pub fn salt(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
13595 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13596 }
13597
13598 pub fn take_salt(&mut self) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
13599 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13600 }
13601 }
13602
13603 impl<'de> ::core::fmt::Debug for VerificationOptions<'de> {
13604 fn fmt(
13605 &self,
13606 f: &mut ::core::fmt::Formatter<'_>,
13607 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13608 f.debug_struct("VerificationOptions")
13609 .field("hash_algorithm", &self.hash_algorithm())
13610 .field("salt", &self.salt())
13611 .finish()
13612 }
13613 }
13614
13615 impl<'de> ::fidl_next::IntoNatural for VerificationOptions<'de> {
13616 type Natural = crate::natural::VerificationOptions;
13617 }
13618
13619 #[repr(C)]
13621 pub struct ImmutableNodeAttributes<'de> {
13622 pub(crate) table: ::fidl_next::wire::Table<'de>,
13623 }
13624
13625 impl<'de> Drop for ImmutableNodeAttributes<'de> {
13626 fn drop(&mut self) {
13627 let _ = self.table.get(1).map(|envelope| unsafe {
13628 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
13629 });
13630
13631 let _ = self
13632 .table
13633 .get(2)
13634 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
13635
13636 let _ = self
13637 .table
13638 .get(3)
13639 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13640
13641 let _ = self
13642 .table
13643 .get(4)
13644 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13645
13646 let _ = self
13647 .table
13648 .get(5)
13649 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13650
13651 let _ = self
13652 .table
13653 .get(6)
13654 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13655
13656 let _ = self
13657 .table
13658 .get(7)
13659 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13660
13661 let _ = self.table.get(8).map(|envelope| unsafe {
13662 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
13663 });
13664
13665 let _ = self.table.get(9).map(|envelope| unsafe {
13666 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13667 });
13668
13669 let _ = self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13670 }
13671 }
13672
13673 impl ::fidl_next::Constrained for ImmutableNodeAttributes<'_> {
13674 type Constraint = ();
13675
13676 fn validate(
13677 _: ::fidl_next::Slot<'_, Self>,
13678 _: Self::Constraint,
13679 ) -> Result<(), ::fidl_next::ValidationError> {
13680 Ok(())
13681 }
13682 }
13683
13684 unsafe impl ::fidl_next::Wire for ImmutableNodeAttributes<'static> {
13685 type Narrowed<'de> = ImmutableNodeAttributes<'de>;
13686
13687 #[inline]
13688 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13689 ::fidl_next::munge!(let Self { table } = out);
13690 ::fidl_next::wire::Table::zero_padding(table);
13691 }
13692 }
13693
13694 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ImmutableNodeAttributes<'de>
13695 where
13696 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13697 {
13698 fn decode(
13699 slot: ::fidl_next::Slot<'_, Self>,
13700 decoder: &mut ___D,
13701 _: (),
13702 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13703 ::fidl_next::munge!(let Self { table } = slot);
13704
13705 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13706 match ordinal {
13707 0 => unsafe { ::core::hint::unreachable_unchecked() },
13708
13709 1 => {
13710 ::fidl_next::wire::Envelope::decode_as::<
13711 ___D,
13712 crate::wire::NodeProtocolKinds,
13713 >(slot.as_mut(), decoder, ())?;
13714
13715 Ok(())
13716 }
13717
13718 2 => {
13719 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Operations>(
13720 slot.as_mut(),
13721 decoder,
13722 (),
13723 )?;
13724
13725 Ok(())
13726 }
13727
13728 3 => {
13729 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13730 slot.as_mut(),
13731 decoder,
13732 (),
13733 )?;
13734
13735 Ok(())
13736 }
13737
13738 4 => {
13739 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13740 slot.as_mut(),
13741 decoder,
13742 (),
13743 )?;
13744
13745 Ok(())
13746 }
13747
13748 5 => {
13749 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13750 slot.as_mut(),
13751 decoder,
13752 (),
13753 )?;
13754
13755 Ok(())
13756 }
13757
13758 6 => {
13759 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13760 slot.as_mut(),
13761 decoder,
13762 (),
13763 )?;
13764
13765 Ok(())
13766 }
13767
13768 7 => {
13769 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13770 slot.as_mut(),
13771 decoder,
13772 (),
13773 )?;
13774
13775 Ok(())
13776 }
13777
13778 8 => {
13779 ::fidl_next::wire::Envelope::decode_as::<
13780 ___D,
13781 crate::wire::VerificationOptions<'de>,
13782 >(slot.as_mut(), decoder, ())?;
13783
13784 Ok(())
13785 }
13786
13787 9 => {
13788 ::fidl_next::wire::Envelope::decode_as::<
13789 ___D,
13790 ::fidl_next::wire::Vector<'de, u8>,
13791 >(slot.as_mut(), decoder, (64, ()))?;
13792
13793 let value = unsafe {
13794 slot.deref_unchecked()
13795 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13796 };
13797
13798 if value.len() > 64 {
13799 return Err(::fidl_next::DecodeError::VectorTooLong {
13800 size: value.len() as u64,
13801 limit: 64,
13802 });
13803 }
13804
13805 Ok(())
13806 }
13807
13808 10 => {
13809 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13810 slot.as_mut(),
13811 decoder,
13812 (),
13813 )?;
13814
13815 Ok(())
13816 }
13817
13818 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13819 }
13820 })
13821 }
13822 }
13823
13824 impl<'de> ImmutableNodeAttributes<'de> {
13825 pub fn protocols(&self) -> ::core::option::Option<&crate::wire::NodeProtocolKinds> {
13826 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13827 }
13828
13829 pub fn take_protocols(&mut self) -> ::core::option::Option<crate::wire::NodeProtocolKinds> {
13830 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13831 }
13832
13833 pub fn abilities(&self) -> ::core::option::Option<&crate::wire::Operations> {
13834 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13835 }
13836
13837 pub fn take_abilities(&mut self) -> ::core::option::Option<crate::wire::Operations> {
13838 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13839 }
13840
13841 pub fn content_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13842 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
13843 }
13844
13845 pub fn take_content_size(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13846 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
13847 }
13848
13849 pub fn storage_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13850 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
13851 }
13852
13853 pub fn take_storage_size(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13854 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
13855 }
13856
13857 pub fn link_count(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13858 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13859 }
13860
13861 pub fn take_link_count(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13862 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13863 }
13864
13865 pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13866 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
13867 }
13868
13869 pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13870 unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
13871 }
13872
13873 pub fn change_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13874 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
13875 }
13876
13877 pub fn take_change_time(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13878 unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
13879 }
13880
13881 pub fn options(&self) -> ::core::option::Option<&crate::wire::VerificationOptions<'de>> {
13882 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
13883 }
13884
13885 pub fn take_options(
13886 &mut self,
13887 ) -> ::core::option::Option<crate::wire::VerificationOptions<'de>> {
13888 unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
13889 }
13890
13891 pub fn root_hash(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
13892 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
13893 }
13894
13895 pub fn take_root_hash(
13896 &mut self,
13897 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
13898 unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
13899 }
13900
13901 pub fn verity_enabled(&self) -> ::core::option::Option<&bool> {
13902 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
13903 }
13904
13905 pub fn take_verity_enabled(&mut self) -> ::core::option::Option<bool> {
13906 unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
13907 }
13908 }
13909
13910 impl<'de> ::core::fmt::Debug for ImmutableNodeAttributes<'de> {
13911 fn fmt(
13912 &self,
13913 f: &mut ::core::fmt::Formatter<'_>,
13914 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13915 f.debug_struct("ImmutableNodeAttributes")
13916 .field("protocols", &self.protocols())
13917 .field("abilities", &self.abilities())
13918 .field("content_size", &self.content_size())
13919 .field("storage_size", &self.storage_size())
13920 .field("link_count", &self.link_count())
13921 .field("id", &self.id())
13922 .field("change_time", &self.change_time())
13923 .field("options", &self.options())
13924 .field("root_hash", &self.root_hash())
13925 .field("verity_enabled", &self.verity_enabled())
13926 .finish()
13927 }
13928 }
13929
13930 impl<'de> ::fidl_next::IntoNatural for ImmutableNodeAttributes<'de> {
13931 type Natural = crate::natural::ImmutableNodeAttributes;
13932 }
13933
13934 #[derive(Debug)]
13936 #[repr(C)]
13937 pub struct NodeAttributes2<'de> {
13938 pub mutable_attributes: crate::wire::MutableNodeAttributes<'de>,
13939
13940 pub immutable_attributes: crate::wire::ImmutableNodeAttributes<'de>,
13941 }
13942
13943 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes2<'_>>(), 32);
13944 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes2<'_>>(), 8);
13945
13946 static_assertions::const_assert_eq!(
13947 std::mem::offset_of!(NodeAttributes2<'_>, mutable_attributes),
13948 0
13949 );
13950
13951 static_assertions::const_assert_eq!(
13952 std::mem::offset_of!(NodeAttributes2<'_>, immutable_attributes),
13953 16
13954 );
13955
13956 impl ::fidl_next::Constrained for NodeAttributes2<'_> {
13957 type Constraint = ();
13958
13959 fn validate(
13960 _: ::fidl_next::Slot<'_, Self>,
13961 _: Self::Constraint,
13962 ) -> Result<(), ::fidl_next::ValidationError> {
13963 Ok(())
13964 }
13965 }
13966
13967 unsafe impl ::fidl_next::Wire for NodeAttributes2<'static> {
13968 type Narrowed<'de> = NodeAttributes2<'de>;
13969
13970 #[inline]
13971 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13972 ::fidl_next::munge! {
13973 let Self {
13974 mutable_attributes,
13975 immutable_attributes,
13976
13977 } = &mut *out_;
13978 }
13979
13980 ::fidl_next::Wire::zero_padding(mutable_attributes);
13981
13982 ::fidl_next::Wire::zero_padding(immutable_attributes);
13983 }
13984 }
13985
13986 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAttributes2<'de>
13987 where
13988 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13989 ___D: ::fidl_next::Decoder<'de>,
13990 {
13991 fn decode(
13992 slot_: ::fidl_next::Slot<'_, Self>,
13993 decoder_: &mut ___D,
13994 _: (),
13995 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13996 ::fidl_next::munge! {
13997 let Self {
13998 mut mutable_attributes,
13999 mut immutable_attributes,
14000
14001 } = slot_;
14002 }
14003
14004 let _field = mutable_attributes.as_mut();
14005
14006 ::fidl_next::Decode::decode(mutable_attributes.as_mut(), decoder_, ())?;
14007
14008 let _field = immutable_attributes.as_mut();
14009
14010 ::fidl_next::Decode::decode(immutable_attributes.as_mut(), decoder_, ())?;
14011
14012 Ok(())
14013 }
14014 }
14015
14016 impl<'de> ::fidl_next::IntoNatural for NodeAttributes2<'de> {
14017 type Natural = crate::natural::NodeAttributes2;
14018 }
14019
14020 #[repr(C)]
14022 pub struct NodeInfo<'de> {
14023 pub(crate) table: ::fidl_next::wire::Table<'de>,
14024 }
14025
14026 impl<'de> Drop for NodeInfo<'de> {
14027 fn drop(&mut self) {
14028 let _ = self.table.get(1).map(|envelope| unsafe {
14029 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
14030 });
14031 }
14032 }
14033
14034 impl ::fidl_next::Constrained for NodeInfo<'_> {
14035 type Constraint = ();
14036
14037 fn validate(
14038 _: ::fidl_next::Slot<'_, Self>,
14039 _: Self::Constraint,
14040 ) -> Result<(), ::fidl_next::ValidationError> {
14041 Ok(())
14042 }
14043 }
14044
14045 unsafe impl ::fidl_next::Wire for NodeInfo<'static> {
14046 type Narrowed<'de> = NodeInfo<'de>;
14047
14048 #[inline]
14049 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14050 ::fidl_next::munge!(let Self { table } = out);
14051 ::fidl_next::wire::Table::zero_padding(table);
14052 }
14053 }
14054
14055 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfo<'de>
14056 where
14057 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14058 {
14059 fn decode(
14060 slot: ::fidl_next::Slot<'_, Self>,
14061 decoder: &mut ___D,
14062 _: (),
14063 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14064 ::fidl_next::munge!(let Self { table } = slot);
14065
14066 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14067 match ordinal {
14068 0 => unsafe { ::core::hint::unreachable_unchecked() },
14069
14070 1 => {
14071 ::fidl_next::wire::Envelope::decode_as::<
14072 ___D,
14073 crate::wire::NodeAttributes2<'de>,
14074 >(slot.as_mut(), decoder, ())?;
14075
14076 Ok(())
14077 }
14078
14079 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14080 }
14081 })
14082 }
14083 }
14084
14085 impl<'de> NodeInfo<'de> {
14086 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
14087 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14088 }
14089
14090 pub fn take_attributes(
14091 &mut self,
14092 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
14093 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14094 }
14095 }
14096
14097 impl<'de> ::core::fmt::Debug for NodeInfo<'de> {
14098 fn fmt(
14099 &self,
14100 f: &mut ::core::fmt::Formatter<'_>,
14101 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14102 f.debug_struct("NodeInfo").field("attributes", &self.attributes()).finish()
14103 }
14104 }
14105
14106 impl<'de> ::fidl_next::IntoNatural for NodeInfo<'de> {
14107 type Natural = crate::natural::NodeInfo;
14108 }
14109
14110 #[repr(C)]
14112 pub struct DirectoryInfo<'de> {
14113 pub(crate) table: ::fidl_next::wire::Table<'de>,
14114 }
14115
14116 impl<'de> Drop for DirectoryInfo<'de> {
14117 fn drop(&mut self) {
14118 let _ = self.table.get(1).map(|envelope| unsafe {
14119 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
14120 });
14121 }
14122 }
14123
14124 impl ::fidl_next::Constrained for DirectoryInfo<'_> {
14125 type Constraint = ();
14126
14127 fn validate(
14128 _: ::fidl_next::Slot<'_, Self>,
14129 _: Self::Constraint,
14130 ) -> Result<(), ::fidl_next::ValidationError> {
14131 Ok(())
14132 }
14133 }
14134
14135 unsafe impl ::fidl_next::Wire for DirectoryInfo<'static> {
14136 type Narrowed<'de> = DirectoryInfo<'de>;
14137
14138 #[inline]
14139 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14140 ::fidl_next::munge!(let Self { table } = out);
14141 ::fidl_next::wire::Table::zero_padding(table);
14142 }
14143 }
14144
14145 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryInfo<'de>
14146 where
14147 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14148 {
14149 fn decode(
14150 slot: ::fidl_next::Slot<'_, Self>,
14151 decoder: &mut ___D,
14152 _: (),
14153 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14154 ::fidl_next::munge!(let Self { table } = slot);
14155
14156 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14157 match ordinal {
14158 0 => unsafe { ::core::hint::unreachable_unchecked() },
14159
14160 1 => {
14161 ::fidl_next::wire::Envelope::decode_as::<
14162 ___D,
14163 crate::wire::NodeAttributes2<'de>,
14164 >(slot.as_mut(), decoder, ())?;
14165
14166 Ok(())
14167 }
14168
14169 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14170 }
14171 })
14172 }
14173 }
14174
14175 impl<'de> DirectoryInfo<'de> {
14176 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
14177 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14178 }
14179
14180 pub fn take_attributes(
14181 &mut self,
14182 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
14183 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14184 }
14185 }
14186
14187 impl<'de> ::core::fmt::Debug for DirectoryInfo<'de> {
14188 fn fmt(
14189 &self,
14190 f: &mut ::core::fmt::Formatter<'_>,
14191 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14192 f.debug_struct("DirectoryInfo").field("attributes", &self.attributes()).finish()
14193 }
14194 }
14195
14196 impl<'de> ::fidl_next::IntoNatural for DirectoryInfo<'de> {
14197 type Natural = crate::natural::DirectoryInfo;
14198 }
14199
14200 #[repr(C)]
14202 pub struct SymlinkInfo<'de> {
14203 pub(crate) table: ::fidl_next::wire::Table<'de>,
14204 }
14205
14206 impl<'de> Drop for SymlinkInfo<'de> {
14207 fn drop(&mut self) {
14208 let _ = self.table.get(1).map(|envelope| unsafe {
14209 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
14210 });
14211
14212 let _ = self.table.get(2).map(|envelope| unsafe {
14213 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
14214 });
14215 }
14216 }
14217
14218 impl ::fidl_next::Constrained for SymlinkInfo<'_> {
14219 type Constraint = ();
14220
14221 fn validate(
14222 _: ::fidl_next::Slot<'_, Self>,
14223 _: Self::Constraint,
14224 ) -> Result<(), ::fidl_next::ValidationError> {
14225 Ok(())
14226 }
14227 }
14228
14229 unsafe impl ::fidl_next::Wire for SymlinkInfo<'static> {
14230 type Narrowed<'de> = SymlinkInfo<'de>;
14231
14232 #[inline]
14233 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14234 ::fidl_next::munge!(let Self { table } = out);
14235 ::fidl_next::wire::Table::zero_padding(table);
14236 }
14237 }
14238
14239 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SymlinkInfo<'de>
14240 where
14241 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14242 {
14243 fn decode(
14244 slot: ::fidl_next::Slot<'_, Self>,
14245 decoder: &mut ___D,
14246 _: (),
14247 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14248 ::fidl_next::munge!(let Self { table } = slot);
14249
14250 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14251 match ordinal {
14252 0 => unsafe { ::core::hint::unreachable_unchecked() },
14253
14254 1 => {
14255 ::fidl_next::wire::Envelope::decode_as::<
14256 ___D,
14257 ::fidl_next::wire::Vector<'de, u8>,
14258 >(slot.as_mut(), decoder, (4095, ()))?;
14259
14260 let value = unsafe {
14261 slot.deref_unchecked()
14262 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
14263 };
14264
14265 if value.len() > 4095 {
14266 return Err(::fidl_next::DecodeError::VectorTooLong {
14267 size: value.len() as u64,
14268 limit: 4095,
14269 });
14270 }
14271
14272 Ok(())
14273 }
14274
14275 2 => {
14276 ::fidl_next::wire::Envelope::decode_as::<
14277 ___D,
14278 crate::wire::NodeAttributes2<'de>,
14279 >(slot.as_mut(), decoder, ())?;
14280
14281 Ok(())
14282 }
14283
14284 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14285 }
14286 })
14287 }
14288 }
14289
14290 impl<'de> SymlinkInfo<'de> {
14291 pub fn target(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
14292 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14293 }
14294
14295 pub fn take_target(
14296 &mut self,
14297 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
14298 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14299 }
14300
14301 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
14302 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14303 }
14304
14305 pub fn take_attributes(
14306 &mut self,
14307 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
14308 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14309 }
14310 }
14311
14312 impl<'de> ::core::fmt::Debug for SymlinkInfo<'de> {
14313 fn fmt(
14314 &self,
14315 f: &mut ::core::fmt::Formatter<'_>,
14316 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14317 f.debug_struct("SymlinkInfo")
14318 .field("target", &self.target())
14319 .field("attributes", &self.attributes())
14320 .finish()
14321 }
14322 }
14323
14324 impl<'de> ::fidl_next::IntoNatural for SymlinkInfo<'de> {
14325 type Natural = crate::natural::SymlinkInfo;
14326 }
14327
14328 #[derive(Clone, Copy, Debug)]
14330 #[repr(transparent)]
14331 pub struct NodeAttributesQuery {
14332 pub(crate) value: ::fidl_next::wire::Uint64,
14333 }
14334
14335 impl ::fidl_next::Constrained for NodeAttributesQuery {
14336 type Constraint = ();
14337
14338 fn validate(
14339 _: ::fidl_next::Slot<'_, Self>,
14340 _: Self::Constraint,
14341 ) -> Result<(), ::fidl_next::ValidationError> {
14342 Ok(())
14343 }
14344 }
14345
14346 unsafe impl ::fidl_next::Wire for NodeAttributesQuery {
14347 type Narrowed<'de> = Self;
14348
14349 #[inline]
14350 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14351 }
14353 }
14354
14355 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributesQuery
14356 where
14357 ___D: ?Sized,
14358 {
14359 fn decode(
14360 slot: ::fidl_next::Slot<'_, Self>,
14361 _: &mut ___D,
14362 _: (),
14363 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14364 Ok(())
14365 }
14366 }
14367
14368 impl ::core::convert::From<crate::natural::NodeAttributesQuery> for NodeAttributesQuery {
14369 fn from(natural: crate::natural::NodeAttributesQuery) -> Self {
14370 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
14371 }
14372 }
14373
14374 impl ::fidl_next::IntoNatural for NodeAttributesQuery {
14375 type Natural = crate::natural::NodeAttributesQuery;
14376 }
14377
14378 #[derive(Clone, Debug)]
14380 #[repr(C)]
14381 pub struct NodeGetAttributesRequest {
14382 pub query: crate::wire::NodeAttributesQuery,
14383 }
14384
14385 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetAttributesRequest>(), 8);
14386 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetAttributesRequest>(), 8);
14387
14388 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetAttributesRequest, query), 0);
14389
14390 impl ::fidl_next::Constrained for NodeGetAttributesRequest {
14391 type Constraint = ();
14392
14393 fn validate(
14394 _: ::fidl_next::Slot<'_, Self>,
14395 _: Self::Constraint,
14396 ) -> Result<(), ::fidl_next::ValidationError> {
14397 Ok(())
14398 }
14399 }
14400
14401 unsafe impl ::fidl_next::Wire for NodeGetAttributesRequest {
14402 type Narrowed<'de> = NodeGetAttributesRequest;
14403
14404 #[inline]
14405 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14406 ::fidl_next::munge! {
14407 let Self {
14408 query,
14409
14410 } = &mut *out_;
14411 }
14412
14413 ::fidl_next::Wire::zero_padding(query);
14414 }
14415 }
14416
14417 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetAttributesRequest
14418 where
14419 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14420 {
14421 fn decode(
14422 slot_: ::fidl_next::Slot<'_, Self>,
14423 decoder_: &mut ___D,
14424 _: (),
14425 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14426 ::fidl_next::munge! {
14427 let Self {
14428 mut query,
14429
14430 } = slot_;
14431 }
14432
14433 let _field = query.as_mut();
14434
14435 ::fidl_next::Decode::decode(query.as_mut(), decoder_, ())?;
14436
14437 Ok(())
14438 }
14439 }
14440
14441 impl ::fidl_next::IntoNatural for NodeGetAttributesRequest {
14442 type Natural = crate::natural::NodeGetAttributesRequest;
14443 }
14444
14445 #[repr(C)]
14447 pub struct Options<'de> {
14448 pub(crate) table: ::fidl_next::wire::Table<'de>,
14449 }
14450
14451 impl<'de> Drop for Options<'de> {
14452 fn drop(&mut self) {
14453 let _ = self.table.get(1).map(|envelope| unsafe {
14454 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
14455 });
14456
14457 let _ = self.table.get(2).map(|envelope| unsafe {
14458 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
14459 });
14460 }
14461 }
14462
14463 impl ::fidl_next::Constrained for Options<'_> {
14464 type Constraint = ();
14465
14466 fn validate(
14467 _: ::fidl_next::Slot<'_, Self>,
14468 _: Self::Constraint,
14469 ) -> Result<(), ::fidl_next::ValidationError> {
14470 Ok(())
14471 }
14472 }
14473
14474 unsafe impl ::fidl_next::Wire for Options<'static> {
14475 type Narrowed<'de> = Options<'de>;
14476
14477 #[inline]
14478 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14479 ::fidl_next::munge!(let Self { table } = out);
14480 ::fidl_next::wire::Table::zero_padding(table);
14481 }
14482 }
14483
14484 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Options<'de>
14485 where
14486 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14487 {
14488 fn decode(
14489 slot: ::fidl_next::Slot<'_, Self>,
14490 decoder: &mut ___D,
14491 _: (),
14492 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14493 ::fidl_next::munge!(let Self { table } = slot);
14494
14495 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14496 match ordinal {
14497 0 => unsafe { ::core::hint::unreachable_unchecked() },
14498
14499 1 => {
14500 ::fidl_next::wire::Envelope::decode_as::<
14501 ___D,
14502 crate::wire::NodeAttributesQuery,
14503 >(slot.as_mut(), decoder, ())?;
14504
14505 Ok(())
14506 }
14507
14508 2 => {
14509 ::fidl_next::wire::Envelope::decode_as::<
14510 ___D,
14511 crate::wire::MutableNodeAttributes<'de>,
14512 >(slot.as_mut(), decoder, ())?;
14513
14514 Ok(())
14515 }
14516
14517 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14518 }
14519 })
14520 }
14521 }
14522
14523 impl<'de> Options<'de> {
14524 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributesQuery> {
14525 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14526 }
14527
14528 pub fn take_attributes(
14529 &mut self,
14530 ) -> ::core::option::Option<crate::wire::NodeAttributesQuery> {
14531 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14532 }
14533
14534 pub fn create_attributes(
14535 &self,
14536 ) -> ::core::option::Option<&crate::wire::MutableNodeAttributes<'de>> {
14537 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14538 }
14539
14540 pub fn take_create_attributes(
14541 &mut self,
14542 ) -> ::core::option::Option<crate::wire::MutableNodeAttributes<'de>> {
14543 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14544 }
14545 }
14546
14547 impl<'de> ::core::fmt::Debug for Options<'de> {
14548 fn fmt(
14549 &self,
14550 f: &mut ::core::fmt::Formatter<'_>,
14551 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14552 f.debug_struct("Options")
14553 .field("attributes", &self.attributes())
14554 .field("create_attributes", &self.create_attributes())
14555 .finish()
14556 }
14557 }
14558
14559 impl<'de> ::fidl_next::IntoNatural for Options<'de> {
14560 type Natural = crate::natural::Options;
14561 }
14562
14563 pub type DirectoryObject = ::fidl_next::wire::Unit;
14565
14566 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
14568 #[repr(transparent)]
14569 pub struct DirentType {
14570 pub(crate) value: u8,
14571 }
14572
14573 impl ::fidl_next::Constrained for DirentType {
14574 type Constraint = ();
14575
14576 fn validate(
14577 _: ::fidl_next::Slot<'_, Self>,
14578 _: Self::Constraint,
14579 ) -> Result<(), ::fidl_next::ValidationError> {
14580 Ok(())
14581 }
14582 }
14583
14584 unsafe impl ::fidl_next::Wire for DirentType {
14585 type Narrowed<'de> = Self;
14586
14587 #[inline]
14588 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14589 }
14591 }
14592
14593 impl DirentType {
14594 pub const UNKNOWN: DirentType = DirentType { value: 0 };
14595
14596 pub const DIRECTORY: DirentType = DirentType { value: 4 };
14597
14598 pub const BLOCK_DEVICE: DirentType = DirentType { value: 6 };
14599
14600 pub const FILE: DirentType = DirentType { value: 8 };
14601
14602 pub const SYMLINK: DirentType = DirentType { value: 10 };
14603
14604 pub const SERVICE: DirentType = DirentType { value: 16 };
14605 }
14606
14607 unsafe impl<___D> ::fidl_next::Decode<___D> for DirentType
14608 where
14609 ___D: ?Sized,
14610 {
14611 fn decode(
14612 slot: ::fidl_next::Slot<'_, Self>,
14613 _: &mut ___D,
14614 _: (),
14615 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14616 Ok(())
14617 }
14618 }
14619
14620 impl ::core::convert::From<crate::natural::DirentType> for DirentType {
14621 fn from(natural: crate::natural::DirentType) -> Self {
14622 match natural {
14623 crate::natural::DirentType::Unknown => DirentType::UNKNOWN,
14624
14625 crate::natural::DirentType::Directory => DirentType::DIRECTORY,
14626
14627 crate::natural::DirentType::BlockDevice => DirentType::BLOCK_DEVICE,
14628
14629 crate::natural::DirentType::File => DirentType::FILE,
14630
14631 crate::natural::DirentType::Symlink => DirentType::SYMLINK,
14632
14633 crate::natural::DirentType::Service => DirentType::SERVICE,
14634
14635 crate::natural::DirentType::UnknownOrdinal_(value) => {
14636 DirentType { value: u8::from(value) }
14637 }
14638 }
14639 }
14640 }
14641
14642 impl ::fidl_next::IntoNatural for DirentType {
14643 type Natural = crate::natural::DirentType;
14644 }
14645
14646 #[derive(Debug)]
14648 #[repr(C)]
14649 pub struct ExtendedAttributeIteratorGetNextResponse<'de> {
14650 pub attributes: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
14651
14652 pub last: bool,
14653 }
14654
14655 static_assertions::const_assert_eq!(
14656 std::mem::size_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
14657 24
14658 );
14659 static_assertions::const_assert_eq!(
14660 std::mem::align_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
14661 8
14662 );
14663
14664 static_assertions::const_assert_eq!(
14665 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, attributes),
14666 0
14667 );
14668
14669 static_assertions::const_assert_eq!(
14670 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, last),
14671 16
14672 );
14673
14674 impl ::fidl_next::Constrained for ExtendedAttributeIteratorGetNextResponse<'_> {
14675 type Constraint = ();
14676
14677 fn validate(
14678 _: ::fidl_next::Slot<'_, Self>,
14679 _: Self::Constraint,
14680 ) -> Result<(), ::fidl_next::ValidationError> {
14681 Ok(())
14682 }
14683 }
14684
14685 unsafe impl ::fidl_next::Wire for ExtendedAttributeIteratorGetNextResponse<'static> {
14686 type Narrowed<'de> = ExtendedAttributeIteratorGetNextResponse<'de>;
14687
14688 #[inline]
14689 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14690 ::fidl_next::munge! {
14691 let Self {
14692 attributes,
14693 last,
14694
14695 } = &mut *out_;
14696 }
14697
14698 ::fidl_next::Wire::zero_padding(attributes);
14699
14700 ::fidl_next::Wire::zero_padding(last);
14701
14702 unsafe {
14703 out_.as_mut_ptr().cast::<u8>().add(17).write_bytes(0, 7);
14704 }
14705 }
14706 }
14707
14708 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeIteratorGetNextResponse<'de>
14709 where
14710 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14711 ___D: ::fidl_next::Decoder<'de>,
14712 {
14713 fn decode(
14714 slot_: ::fidl_next::Slot<'_, Self>,
14715 decoder_: &mut ___D,
14716 _: (),
14717 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14718 if slot_.as_bytes()[17..24] != [0u8; 7] {
14719 return Err(::fidl_next::DecodeError::InvalidPadding);
14720 }
14721
14722 ::fidl_next::munge! {
14723 let Self {
14724 mut attributes,
14725 mut last,
14726
14727 } = slot_;
14728 }
14729
14730 let _field = attributes.as_mut();
14731 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
14732 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, (128, (255, ())))?;
14733
14734 let attributes = unsafe { attributes.deref_unchecked() };
14735
14736 if attributes.len() > 128 {
14737 return Err(::fidl_next::DecodeError::VectorTooLong {
14738 size: attributes.len() as u64,
14739 limit: 128,
14740 });
14741 }
14742
14743 let _field = last.as_mut();
14744
14745 ::fidl_next::Decode::decode(last.as_mut(), decoder_, ())?;
14746
14747 Ok(())
14748 }
14749 }
14750
14751 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeIteratorGetNextResponse<'de> {
14752 type Natural = crate::natural::ExtendedAttributeIteratorGetNextResponse;
14753 }
14754
14755 #[derive(Clone, Debug)]
14757 #[repr(C)]
14758 pub struct ReadableReadRequest {
14759 pub count: ::fidl_next::wire::Uint64,
14760 }
14761
14762 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadRequest>(), 8);
14763 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadRequest>(), 8);
14764
14765 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadRequest, count), 0);
14766
14767 impl ::fidl_next::Constrained for ReadableReadRequest {
14768 type Constraint = ();
14769
14770 fn validate(
14771 _: ::fidl_next::Slot<'_, Self>,
14772 _: Self::Constraint,
14773 ) -> Result<(), ::fidl_next::ValidationError> {
14774 Ok(())
14775 }
14776 }
14777
14778 unsafe impl ::fidl_next::Wire for ReadableReadRequest {
14779 type Narrowed<'de> = ReadableReadRequest;
14780
14781 #[inline]
14782 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14783 ::fidl_next::munge! {
14784 let Self {
14785 count,
14786
14787 } = &mut *out_;
14788 }
14789
14790 ::fidl_next::Wire::zero_padding(count);
14791 }
14792 }
14793
14794 unsafe impl<___D> ::fidl_next::Decode<___D> for ReadableReadRequest
14795 where
14796 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14797 {
14798 fn decode(
14799 slot_: ::fidl_next::Slot<'_, Self>,
14800 decoder_: &mut ___D,
14801 _: (),
14802 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14803 ::fidl_next::munge! {
14804 let Self {
14805 mut count,
14806
14807 } = slot_;
14808 }
14809
14810 let _field = count.as_mut();
14811
14812 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
14813
14814 Ok(())
14815 }
14816 }
14817
14818 impl ::fidl_next::IntoNatural for ReadableReadRequest {
14819 type Natural = crate::natural::ReadableReadRequest;
14820 }
14821
14822 pub type Transfer<'de> = ::fidl_next::wire::Vector<'de, u8>;
14824
14825 #[derive(Debug)]
14827 #[repr(C)]
14828 pub struct ReadableReadResponse<'de> {
14829 pub data: ::fidl_next::wire::Vector<'de, u8>,
14830 }
14831
14832 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadResponse<'_>>(), 16);
14833 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadResponse<'_>>(), 8);
14834
14835 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadResponse<'_>, data), 0);
14836
14837 impl ::fidl_next::Constrained for ReadableReadResponse<'_> {
14838 type Constraint = ();
14839
14840 fn validate(
14841 _: ::fidl_next::Slot<'_, Self>,
14842 _: Self::Constraint,
14843 ) -> Result<(), ::fidl_next::ValidationError> {
14844 Ok(())
14845 }
14846 }
14847
14848 unsafe impl ::fidl_next::Wire for ReadableReadResponse<'static> {
14849 type Narrowed<'de> = ReadableReadResponse<'de>;
14850
14851 #[inline]
14852 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14853 ::fidl_next::munge! {
14854 let Self {
14855 data,
14856
14857 } = &mut *out_;
14858 }
14859
14860 ::fidl_next::Wire::zero_padding(data);
14861 }
14862 }
14863
14864 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ReadableReadResponse<'de>
14865 where
14866 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14867 ___D: ::fidl_next::Decoder<'de>,
14868 {
14869 fn decode(
14870 slot_: ::fidl_next::Slot<'_, Self>,
14871 decoder_: &mut ___D,
14872 _: (),
14873 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14874 ::fidl_next::munge! {
14875 let Self {
14876 mut data,
14877
14878 } = slot_;
14879 }
14880
14881 let _field = data.as_mut();
14882 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
14883 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
14884
14885 let data = unsafe { data.deref_unchecked() };
14886
14887 if data.len() > 8192 {
14888 return Err(::fidl_next::DecodeError::VectorTooLong {
14889 size: data.len() as u64,
14890 limit: 8192,
14891 });
14892 }
14893
14894 Ok(())
14895 }
14896 }
14897
14898 impl<'de> ::fidl_next::IntoNatural for ReadableReadResponse<'de> {
14899 type Natural = crate::natural::ReadableReadResponse;
14900 }
14901
14902 #[derive(Debug)]
14904 #[repr(C)]
14905 pub struct WritableWriteRequest<'de> {
14906 pub data: ::fidl_next::wire::Vector<'de, u8>,
14907 }
14908
14909 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteRequest<'_>>(), 16);
14910 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteRequest<'_>>(), 8);
14911
14912 static_assertions::const_assert_eq!(std::mem::offset_of!(WritableWriteRequest<'_>, data), 0);
14913
14914 impl ::fidl_next::Constrained for WritableWriteRequest<'_> {
14915 type Constraint = ();
14916
14917 fn validate(
14918 _: ::fidl_next::Slot<'_, Self>,
14919 _: Self::Constraint,
14920 ) -> Result<(), ::fidl_next::ValidationError> {
14921 Ok(())
14922 }
14923 }
14924
14925 unsafe impl ::fidl_next::Wire for WritableWriteRequest<'static> {
14926 type Narrowed<'de> = WritableWriteRequest<'de>;
14927
14928 #[inline]
14929 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14930 ::fidl_next::munge! {
14931 let Self {
14932 data,
14933
14934 } = &mut *out_;
14935 }
14936
14937 ::fidl_next::Wire::zero_padding(data);
14938 }
14939 }
14940
14941 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WritableWriteRequest<'de>
14942 where
14943 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14944 ___D: ::fidl_next::Decoder<'de>,
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 data,
14954
14955 } = slot_;
14956 }
14957
14958 let _field = data.as_mut();
14959 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
14960 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
14961
14962 let data = unsafe { data.deref_unchecked() };
14963
14964 if data.len() > 8192 {
14965 return Err(::fidl_next::DecodeError::VectorTooLong {
14966 size: data.len() as u64,
14967 limit: 8192,
14968 });
14969 }
14970
14971 Ok(())
14972 }
14973 }
14974
14975 impl<'de> ::fidl_next::IntoNatural for WritableWriteRequest<'de> {
14976 type Natural = crate::natural::WritableWriteRequest;
14977 }
14978
14979 #[derive(Clone, Debug)]
14981 #[repr(C)]
14982 pub struct WritableWriteResponse {
14983 pub actual_count: ::fidl_next::wire::Uint64,
14984 }
14985
14986 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteResponse>(), 8);
14987 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteResponse>(), 8);
14988
14989 static_assertions::const_assert_eq!(
14990 std::mem::offset_of!(WritableWriteResponse, actual_count),
14991 0
14992 );
14993
14994 impl ::fidl_next::Constrained for WritableWriteResponse {
14995 type Constraint = ();
14996
14997 fn validate(
14998 _: ::fidl_next::Slot<'_, Self>,
14999 _: Self::Constraint,
15000 ) -> Result<(), ::fidl_next::ValidationError> {
15001 Ok(())
15002 }
15003 }
15004
15005 unsafe impl ::fidl_next::Wire for WritableWriteResponse {
15006 type Narrowed<'de> = WritableWriteResponse;
15007
15008 #[inline]
15009 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15010 ::fidl_next::munge! {
15011 let Self {
15012 actual_count,
15013
15014 } = &mut *out_;
15015 }
15016
15017 ::fidl_next::Wire::zero_padding(actual_count);
15018 }
15019 }
15020
15021 unsafe impl<___D> ::fidl_next::Decode<___D> for WritableWriteResponse
15022 where
15023 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15024 {
15025 fn decode(
15026 slot_: ::fidl_next::Slot<'_, Self>,
15027 decoder_: &mut ___D,
15028 _: (),
15029 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15030 ::fidl_next::munge! {
15031 let Self {
15032 mut actual_count,
15033
15034 } = slot_;
15035 }
15036
15037 let _field = actual_count.as_mut();
15038
15039 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
15040
15041 Ok(())
15042 }
15043 }
15044
15045 impl ::fidl_next::IntoNatural for WritableWriteResponse {
15046 type Natural = crate::natural::WritableWriteResponse;
15047 }
15048
15049 #[derive(Clone, Debug)]
15051 #[repr(C)]
15052 pub struct FileSeekRequest {
15053 pub origin: crate::wire::SeekOrigin,
15054
15055 pub offset: ::fidl_next::wire::Int64,
15056 }
15057
15058 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekRequest>(), 16);
15059 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekRequest>(), 8);
15060
15061 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, origin), 0);
15062
15063 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, offset), 8);
15064
15065 impl ::fidl_next::Constrained for FileSeekRequest {
15066 type Constraint = ();
15067
15068 fn validate(
15069 _: ::fidl_next::Slot<'_, Self>,
15070 _: Self::Constraint,
15071 ) -> Result<(), ::fidl_next::ValidationError> {
15072 Ok(())
15073 }
15074 }
15075
15076 unsafe impl ::fidl_next::Wire for FileSeekRequest {
15077 type Narrowed<'de> = FileSeekRequest;
15078
15079 #[inline]
15080 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15081 ::fidl_next::munge! {
15082 let Self {
15083 origin,
15084 offset,
15085
15086 } = &mut *out_;
15087 }
15088
15089 ::fidl_next::Wire::zero_padding(origin);
15090
15091 ::fidl_next::Wire::zero_padding(offset);
15092
15093 unsafe {
15094 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
15095 }
15096 }
15097 }
15098
15099 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekRequest
15100 where
15101 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15102 {
15103 fn decode(
15104 slot_: ::fidl_next::Slot<'_, Self>,
15105 decoder_: &mut ___D,
15106 _: (),
15107 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15108 if slot_.as_bytes()[4..8] != [0u8; 4] {
15109 return Err(::fidl_next::DecodeError::InvalidPadding);
15110 }
15111
15112 ::fidl_next::munge! {
15113 let Self {
15114 mut origin,
15115 mut offset,
15116
15117 } = slot_;
15118 }
15119
15120 let _field = origin.as_mut();
15121
15122 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
15123
15124 let _field = offset.as_mut();
15125
15126 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
15127
15128 Ok(())
15129 }
15130 }
15131
15132 impl ::fidl_next::IntoNatural for FileSeekRequest {
15133 type Natural = crate::natural::FileSeekRequest;
15134 }
15135
15136 #[derive(Clone, Debug)]
15138 #[repr(C)]
15139 pub struct FileSeekResponse {
15140 pub offset_from_start: ::fidl_next::wire::Uint64,
15141 }
15142
15143 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekResponse>(), 8);
15144 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekResponse>(), 8);
15145
15146 static_assertions::const_assert_eq!(
15147 std::mem::offset_of!(FileSeekResponse, offset_from_start),
15148 0
15149 );
15150
15151 impl ::fidl_next::Constrained for FileSeekResponse {
15152 type Constraint = ();
15153
15154 fn validate(
15155 _: ::fidl_next::Slot<'_, Self>,
15156 _: Self::Constraint,
15157 ) -> Result<(), ::fidl_next::ValidationError> {
15158 Ok(())
15159 }
15160 }
15161
15162 unsafe impl ::fidl_next::Wire for FileSeekResponse {
15163 type Narrowed<'de> = FileSeekResponse;
15164
15165 #[inline]
15166 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15167 ::fidl_next::munge! {
15168 let Self {
15169 offset_from_start,
15170
15171 } = &mut *out_;
15172 }
15173
15174 ::fidl_next::Wire::zero_padding(offset_from_start);
15175 }
15176 }
15177
15178 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekResponse
15179 where
15180 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15181 {
15182 fn decode(
15183 slot_: ::fidl_next::Slot<'_, Self>,
15184 decoder_: &mut ___D,
15185 _: (),
15186 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15187 ::fidl_next::munge! {
15188 let Self {
15189 mut offset_from_start,
15190
15191 } = slot_;
15192 }
15193
15194 let _field = offset_from_start.as_mut();
15195
15196 ::fidl_next::Decode::decode(offset_from_start.as_mut(), decoder_, ())?;
15197
15198 Ok(())
15199 }
15200 }
15201
15202 impl ::fidl_next::IntoNatural for FileSeekResponse {
15203 type Natural = crate::natural::FileSeekResponse;
15204 }
15205
15206 #[derive(Clone, Debug)]
15208 #[repr(C)]
15209 pub struct FileReadAtRequest {
15210 pub count: ::fidl_next::wire::Uint64,
15211
15212 pub offset: ::fidl_next::wire::Uint64,
15213 }
15214
15215 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtRequest>(), 16);
15216 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtRequest>(), 8);
15217
15218 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, count), 0);
15219
15220 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, offset), 8);
15221
15222 impl ::fidl_next::Constrained for FileReadAtRequest {
15223 type Constraint = ();
15224
15225 fn validate(
15226 _: ::fidl_next::Slot<'_, Self>,
15227 _: Self::Constraint,
15228 ) -> Result<(), ::fidl_next::ValidationError> {
15229 Ok(())
15230 }
15231 }
15232
15233 unsafe impl ::fidl_next::Wire for FileReadAtRequest {
15234 type Narrowed<'de> = FileReadAtRequest;
15235
15236 #[inline]
15237 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15238 ::fidl_next::munge! {
15239 let Self {
15240 count,
15241 offset,
15242
15243 } = &mut *out_;
15244 }
15245
15246 ::fidl_next::Wire::zero_padding(count);
15247
15248 ::fidl_next::Wire::zero_padding(offset);
15249 }
15250 }
15251
15252 unsafe impl<___D> ::fidl_next::Decode<___D> for FileReadAtRequest
15253 where
15254 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15255 {
15256 fn decode(
15257 slot_: ::fidl_next::Slot<'_, Self>,
15258 decoder_: &mut ___D,
15259 _: (),
15260 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15261 ::fidl_next::munge! {
15262 let Self {
15263 mut count,
15264 mut offset,
15265
15266 } = slot_;
15267 }
15268
15269 let _field = count.as_mut();
15270
15271 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
15272
15273 let _field = offset.as_mut();
15274
15275 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
15276
15277 Ok(())
15278 }
15279 }
15280
15281 impl ::fidl_next::IntoNatural for FileReadAtRequest {
15282 type Natural = crate::natural::FileReadAtRequest;
15283 }
15284
15285 #[derive(Debug)]
15287 #[repr(C)]
15288 pub struct FileReadAtResponse<'de> {
15289 pub data: ::fidl_next::wire::Vector<'de, u8>,
15290 }
15291
15292 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtResponse<'_>>(), 16);
15293 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtResponse<'_>>(), 8);
15294
15295 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtResponse<'_>, data), 0);
15296
15297 impl ::fidl_next::Constrained for FileReadAtResponse<'_> {
15298 type Constraint = ();
15299
15300 fn validate(
15301 _: ::fidl_next::Slot<'_, Self>,
15302 _: Self::Constraint,
15303 ) -> Result<(), ::fidl_next::ValidationError> {
15304 Ok(())
15305 }
15306 }
15307
15308 unsafe impl ::fidl_next::Wire for FileReadAtResponse<'static> {
15309 type Narrowed<'de> = FileReadAtResponse<'de>;
15310
15311 #[inline]
15312 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15313 ::fidl_next::munge! {
15314 let Self {
15315 data,
15316
15317 } = &mut *out_;
15318 }
15319
15320 ::fidl_next::Wire::zero_padding(data);
15321 }
15322 }
15323
15324 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileReadAtResponse<'de>
15325 where
15326 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15327 ___D: ::fidl_next::Decoder<'de>,
15328 {
15329 fn decode(
15330 slot_: ::fidl_next::Slot<'_, Self>,
15331 decoder_: &mut ___D,
15332 _: (),
15333 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15334 ::fidl_next::munge! {
15335 let Self {
15336 mut data,
15337
15338 } = slot_;
15339 }
15340
15341 let _field = data.as_mut();
15342 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
15343 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
15344
15345 let data = unsafe { data.deref_unchecked() };
15346
15347 if data.len() > 8192 {
15348 return Err(::fidl_next::DecodeError::VectorTooLong {
15349 size: data.len() as u64,
15350 limit: 8192,
15351 });
15352 }
15353
15354 Ok(())
15355 }
15356 }
15357
15358 impl<'de> ::fidl_next::IntoNatural for FileReadAtResponse<'de> {
15359 type Natural = crate::natural::FileReadAtResponse;
15360 }
15361
15362 #[derive(Debug)]
15364 #[repr(C)]
15365 pub struct FileWriteAtRequest<'de> {
15366 pub data: ::fidl_next::wire::Vector<'de, u8>,
15367
15368 pub offset: ::fidl_next::wire::Uint64,
15369 }
15370
15371 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtRequest<'_>>(), 24);
15372 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtRequest<'_>>(), 8);
15373
15374 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, data), 0);
15375
15376 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, offset), 16);
15377
15378 impl ::fidl_next::Constrained for FileWriteAtRequest<'_> {
15379 type Constraint = ();
15380
15381 fn validate(
15382 _: ::fidl_next::Slot<'_, Self>,
15383 _: Self::Constraint,
15384 ) -> Result<(), ::fidl_next::ValidationError> {
15385 Ok(())
15386 }
15387 }
15388
15389 unsafe impl ::fidl_next::Wire for FileWriteAtRequest<'static> {
15390 type Narrowed<'de> = FileWriteAtRequest<'de>;
15391
15392 #[inline]
15393 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15394 ::fidl_next::munge! {
15395 let Self {
15396 data,
15397 offset,
15398
15399 } = &mut *out_;
15400 }
15401
15402 ::fidl_next::Wire::zero_padding(data);
15403
15404 ::fidl_next::Wire::zero_padding(offset);
15405 }
15406 }
15407
15408 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileWriteAtRequest<'de>
15409 where
15410 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15411 ___D: ::fidl_next::Decoder<'de>,
15412 {
15413 fn decode(
15414 slot_: ::fidl_next::Slot<'_, Self>,
15415 decoder_: &mut ___D,
15416 _: (),
15417 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15418 ::fidl_next::munge! {
15419 let Self {
15420 mut data,
15421 mut offset,
15422
15423 } = slot_;
15424 }
15425
15426 let _field = data.as_mut();
15427 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
15428 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
15429
15430 let data = unsafe { data.deref_unchecked() };
15431
15432 if data.len() > 8192 {
15433 return Err(::fidl_next::DecodeError::VectorTooLong {
15434 size: data.len() as u64,
15435 limit: 8192,
15436 });
15437 }
15438
15439 let _field = offset.as_mut();
15440
15441 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
15442
15443 Ok(())
15444 }
15445 }
15446
15447 impl<'de> ::fidl_next::IntoNatural for FileWriteAtRequest<'de> {
15448 type Natural = crate::natural::FileWriteAtRequest;
15449 }
15450
15451 #[derive(Clone, Debug)]
15453 #[repr(C)]
15454 pub struct FileWriteAtResponse {
15455 pub actual_count: ::fidl_next::wire::Uint64,
15456 }
15457
15458 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtResponse>(), 8);
15459 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtResponse>(), 8);
15460
15461 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtResponse, actual_count), 0);
15462
15463 impl ::fidl_next::Constrained for FileWriteAtResponse {
15464 type Constraint = ();
15465
15466 fn validate(
15467 _: ::fidl_next::Slot<'_, Self>,
15468 _: Self::Constraint,
15469 ) -> Result<(), ::fidl_next::ValidationError> {
15470 Ok(())
15471 }
15472 }
15473
15474 unsafe impl ::fidl_next::Wire for FileWriteAtResponse {
15475 type Narrowed<'de> = FileWriteAtResponse;
15476
15477 #[inline]
15478 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15479 ::fidl_next::munge! {
15480 let Self {
15481 actual_count,
15482
15483 } = &mut *out_;
15484 }
15485
15486 ::fidl_next::Wire::zero_padding(actual_count);
15487 }
15488 }
15489
15490 unsafe impl<___D> ::fidl_next::Decode<___D> for FileWriteAtResponse
15491 where
15492 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15493 {
15494 fn decode(
15495 slot_: ::fidl_next::Slot<'_, Self>,
15496 decoder_: &mut ___D,
15497 _: (),
15498 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15499 ::fidl_next::munge! {
15500 let Self {
15501 mut actual_count,
15502
15503 } = slot_;
15504 }
15505
15506 let _field = actual_count.as_mut();
15507
15508 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
15509
15510 Ok(())
15511 }
15512 }
15513
15514 impl ::fidl_next::IntoNatural for FileWriteAtResponse {
15515 type Natural = crate::natural::FileWriteAtResponse;
15516 }
15517
15518 #[derive(Clone, Debug)]
15520 #[repr(C)]
15521 pub struct FileResizeRequest {
15522 pub length: ::fidl_next::wire::Uint64,
15523 }
15524
15525 static_assertions::const_assert_eq!(std::mem::size_of::<FileResizeRequest>(), 8);
15526 static_assertions::const_assert_eq!(std::mem::align_of::<FileResizeRequest>(), 8);
15527
15528 static_assertions::const_assert_eq!(std::mem::offset_of!(FileResizeRequest, length), 0);
15529
15530 impl ::fidl_next::Constrained for FileResizeRequest {
15531 type Constraint = ();
15532
15533 fn validate(
15534 _: ::fidl_next::Slot<'_, Self>,
15535 _: Self::Constraint,
15536 ) -> Result<(), ::fidl_next::ValidationError> {
15537 Ok(())
15538 }
15539 }
15540
15541 unsafe impl ::fidl_next::Wire for FileResizeRequest {
15542 type Narrowed<'de> = FileResizeRequest;
15543
15544 #[inline]
15545 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15546 ::fidl_next::munge! {
15547 let Self {
15548 length,
15549
15550 } = &mut *out_;
15551 }
15552
15553 ::fidl_next::Wire::zero_padding(length);
15554 }
15555 }
15556
15557 unsafe impl<___D> ::fidl_next::Decode<___D> for FileResizeRequest
15558 where
15559 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15560 {
15561 fn decode(
15562 slot_: ::fidl_next::Slot<'_, Self>,
15563 decoder_: &mut ___D,
15564 _: (),
15565 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15566 ::fidl_next::munge! {
15567 let Self {
15568 mut length,
15569
15570 } = slot_;
15571 }
15572
15573 let _field = length.as_mut();
15574
15575 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
15576
15577 Ok(())
15578 }
15579 }
15580
15581 impl ::fidl_next::IntoNatural for FileResizeRequest {
15582 type Natural = crate::natural::FileResizeRequest;
15583 }
15584
15585 pub type FileResizeResponse = ::fidl_next::wire::Unit;
15587
15588 #[derive(Clone, Copy, Debug)]
15590 #[repr(transparent)]
15591 pub struct VmoFlags {
15592 pub(crate) value: ::fidl_next::wire::Uint32,
15593 }
15594
15595 impl ::fidl_next::Constrained for VmoFlags {
15596 type Constraint = ();
15597
15598 fn validate(
15599 _: ::fidl_next::Slot<'_, Self>,
15600 _: Self::Constraint,
15601 ) -> Result<(), ::fidl_next::ValidationError> {
15602 Ok(())
15603 }
15604 }
15605
15606 unsafe impl ::fidl_next::Wire for VmoFlags {
15607 type Narrowed<'de> = Self;
15608
15609 #[inline]
15610 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15611 }
15613 }
15614
15615 unsafe impl<___D> ::fidl_next::Decode<___D> for VmoFlags
15616 where
15617 ___D: ?Sized,
15618 {
15619 fn decode(
15620 slot: ::fidl_next::Slot<'_, Self>,
15621 _: &mut ___D,
15622 _: (),
15623 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15624 ::fidl_next::munge!(let Self { value } = slot);
15625 let set = u32::from(*value);
15626 if set & !crate::natural::VmoFlags::all().bits() != 0 {
15627 return Err(::fidl_next::DecodeError::InvalidBits {
15628 expected: crate::natural::VmoFlags::all().bits() as usize,
15629 actual: set as usize,
15630 });
15631 }
15632
15633 Ok(())
15634 }
15635 }
15636
15637 impl ::core::convert::From<crate::natural::VmoFlags> for VmoFlags {
15638 fn from(natural: crate::natural::VmoFlags) -> Self {
15639 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
15640 }
15641 }
15642
15643 impl ::fidl_next::IntoNatural for VmoFlags {
15644 type Natural = crate::natural::VmoFlags;
15645 }
15646
15647 #[derive(Clone, Debug)]
15649 #[repr(C)]
15650 pub struct FileGetBackingMemoryRequest {
15651 pub flags: crate::wire::VmoFlags,
15652 }
15653
15654 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryRequest>(), 4);
15655 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryRequest>(), 4);
15656
15657 static_assertions::const_assert_eq!(
15658 std::mem::offset_of!(FileGetBackingMemoryRequest, flags),
15659 0
15660 );
15661
15662 impl ::fidl_next::Constrained for FileGetBackingMemoryRequest {
15663 type Constraint = ();
15664
15665 fn validate(
15666 _: ::fidl_next::Slot<'_, Self>,
15667 _: Self::Constraint,
15668 ) -> Result<(), ::fidl_next::ValidationError> {
15669 Ok(())
15670 }
15671 }
15672
15673 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryRequest {
15674 type Narrowed<'de> = FileGetBackingMemoryRequest;
15675
15676 #[inline]
15677 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15678 ::fidl_next::munge! {
15679 let Self {
15680 flags,
15681
15682 } = &mut *out_;
15683 }
15684
15685 ::fidl_next::Wire::zero_padding(flags);
15686 }
15687 }
15688
15689 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryRequest
15690 where
15691 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15692 {
15693 fn decode(
15694 slot_: ::fidl_next::Slot<'_, Self>,
15695 decoder_: &mut ___D,
15696 _: (),
15697 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15698 ::fidl_next::munge! {
15699 let Self {
15700 mut flags,
15701
15702 } = slot_;
15703 }
15704
15705 let _field = flags.as_mut();
15706
15707 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
15708
15709 Ok(())
15710 }
15711 }
15712
15713 impl ::fidl_next::IntoNatural for FileGetBackingMemoryRequest {
15714 type Natural = crate::natural::FileGetBackingMemoryRequest;
15715 }
15716
15717 pub type LinkableLinkIntoResponse = ::fidl_next::wire::Unit;
15719
15720 pub type FileAllocateResponse = ::fidl_next::wire::Unit;
15722
15723 pub type FileEnableVerityResponse = ::fidl_next::wire::Unit;
15725
15726 #[derive(Clone, Copy, Debug)]
15728 #[repr(transparent)]
15729 pub struct FileSignal {
15730 pub(crate) value: ::fidl_next::wire::Uint32,
15731 }
15732
15733 impl ::fidl_next::Constrained for FileSignal {
15734 type Constraint = ();
15735
15736 fn validate(
15737 _: ::fidl_next::Slot<'_, Self>,
15738 _: Self::Constraint,
15739 ) -> Result<(), ::fidl_next::ValidationError> {
15740 Ok(())
15741 }
15742 }
15743
15744 unsafe impl ::fidl_next::Wire for FileSignal {
15745 type Narrowed<'de> = Self;
15746
15747 #[inline]
15748 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15749 }
15751 }
15752
15753 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSignal
15754 where
15755 ___D: ?Sized,
15756 {
15757 fn decode(
15758 slot: ::fidl_next::Slot<'_, Self>,
15759 _: &mut ___D,
15760 _: (),
15761 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15762 ::fidl_next::munge!(let Self { value } = slot);
15763 let set = u32::from(*value);
15764 if set & !crate::natural::FileSignal::all().bits() != 0 {
15765 return Err(::fidl_next::DecodeError::InvalidBits {
15766 expected: crate::natural::FileSignal::all().bits() as usize,
15767 actual: set as usize,
15768 });
15769 }
15770
15771 Ok(())
15772 }
15773 }
15774
15775 impl ::core::convert::From<crate::natural::FileSignal> for FileSignal {
15776 fn from(natural: crate::natural::FileSignal) -> Self {
15777 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
15778 }
15779 }
15780
15781 impl ::fidl_next::IntoNatural for FileSignal {
15782 type Natural = crate::natural::FileSignal;
15783 }
15784
15785 #[derive(Clone, Debug)]
15787 #[repr(C)]
15788 pub struct FilesystemInfo {
15789 pub total_bytes: ::fidl_next::wire::Uint64,
15790
15791 pub used_bytes: ::fidl_next::wire::Uint64,
15792
15793 pub total_nodes: ::fidl_next::wire::Uint64,
15794
15795 pub used_nodes: ::fidl_next::wire::Uint64,
15796
15797 pub free_shared_pool_bytes: ::fidl_next::wire::Uint64,
15798
15799 pub fs_id: ::fidl_next::wire::Uint64,
15800
15801 pub block_size: ::fidl_next::wire::Uint32,
15802
15803 pub max_filename_size: ::fidl_next::wire::Uint32,
15804
15805 pub fs_type: ::fidl_next::wire::Uint32,
15806
15807 pub padding: ::fidl_next::wire::Uint32,
15808
15809 pub name: [i8; 32],
15810 }
15811
15812 static_assertions::const_assert_eq!(std::mem::size_of::<FilesystemInfo>(), 96);
15813 static_assertions::const_assert_eq!(std::mem::align_of::<FilesystemInfo>(), 8);
15814
15815 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_bytes), 0);
15816
15817 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_bytes), 8);
15818
15819 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_nodes), 16);
15820
15821 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_nodes), 24);
15822
15823 static_assertions::const_assert_eq!(
15824 std::mem::offset_of!(FilesystemInfo, free_shared_pool_bytes),
15825 32
15826 );
15827
15828 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_id), 40);
15829
15830 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, block_size), 48);
15831
15832 static_assertions::const_assert_eq!(
15833 std::mem::offset_of!(FilesystemInfo, max_filename_size),
15834 52
15835 );
15836
15837 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_type), 56);
15838
15839 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, padding), 60);
15840
15841 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, name), 64);
15842
15843 impl ::fidl_next::Constrained for FilesystemInfo {
15844 type Constraint = ();
15845
15846 fn validate(
15847 _: ::fidl_next::Slot<'_, Self>,
15848 _: Self::Constraint,
15849 ) -> Result<(), ::fidl_next::ValidationError> {
15850 Ok(())
15851 }
15852 }
15853
15854 unsafe impl ::fidl_next::Wire for FilesystemInfo {
15855 type Narrowed<'de> = FilesystemInfo;
15856
15857 #[inline]
15858 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15859 ::fidl_next::munge! {
15860 let Self {
15861 total_bytes,
15862 used_bytes,
15863 total_nodes,
15864 used_nodes,
15865 free_shared_pool_bytes,
15866 fs_id,
15867 block_size,
15868 max_filename_size,
15869 fs_type,
15870 padding,
15871 name,
15872
15873 } = &mut *out_;
15874 }
15875
15876 ::fidl_next::Wire::zero_padding(total_bytes);
15877
15878 ::fidl_next::Wire::zero_padding(used_bytes);
15879
15880 ::fidl_next::Wire::zero_padding(total_nodes);
15881
15882 ::fidl_next::Wire::zero_padding(used_nodes);
15883
15884 ::fidl_next::Wire::zero_padding(free_shared_pool_bytes);
15885
15886 ::fidl_next::Wire::zero_padding(fs_id);
15887
15888 ::fidl_next::Wire::zero_padding(block_size);
15889
15890 ::fidl_next::Wire::zero_padding(max_filename_size);
15891
15892 ::fidl_next::Wire::zero_padding(fs_type);
15893
15894 ::fidl_next::Wire::zero_padding(padding);
15895
15896 ::fidl_next::Wire::zero_padding(name);
15897 }
15898 }
15899
15900 unsafe impl<___D> ::fidl_next::Decode<___D> for FilesystemInfo
15901 where
15902 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15903 {
15904 fn decode(
15905 slot_: ::fidl_next::Slot<'_, Self>,
15906 decoder_: &mut ___D,
15907 _: (),
15908 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15909 ::fidl_next::munge! {
15910 let Self {
15911 mut total_bytes,
15912 mut used_bytes,
15913 mut total_nodes,
15914 mut used_nodes,
15915 mut free_shared_pool_bytes,
15916 mut fs_id,
15917 mut block_size,
15918 mut max_filename_size,
15919 mut fs_type,
15920 mut padding,
15921 mut name,
15922
15923 } = slot_;
15924 }
15925
15926 let _field = total_bytes.as_mut();
15927
15928 ::fidl_next::Decode::decode(total_bytes.as_mut(), decoder_, ())?;
15929
15930 let _field = used_bytes.as_mut();
15931
15932 ::fidl_next::Decode::decode(used_bytes.as_mut(), decoder_, ())?;
15933
15934 let _field = total_nodes.as_mut();
15935
15936 ::fidl_next::Decode::decode(total_nodes.as_mut(), decoder_, ())?;
15937
15938 let _field = used_nodes.as_mut();
15939
15940 ::fidl_next::Decode::decode(used_nodes.as_mut(), decoder_, ())?;
15941
15942 let _field = free_shared_pool_bytes.as_mut();
15943
15944 ::fidl_next::Decode::decode(free_shared_pool_bytes.as_mut(), decoder_, ())?;
15945
15946 let _field = fs_id.as_mut();
15947
15948 ::fidl_next::Decode::decode(fs_id.as_mut(), decoder_, ())?;
15949
15950 let _field = block_size.as_mut();
15951
15952 ::fidl_next::Decode::decode(block_size.as_mut(), decoder_, ())?;
15953
15954 let _field = max_filename_size.as_mut();
15955
15956 ::fidl_next::Decode::decode(max_filename_size.as_mut(), decoder_, ())?;
15957
15958 let _field = fs_type.as_mut();
15959
15960 ::fidl_next::Decode::decode(fs_type.as_mut(), decoder_, ())?;
15961
15962 let _field = padding.as_mut();
15963
15964 ::fidl_next::Decode::decode(padding.as_mut(), decoder_, ())?;
15965
15966 let _field = name.as_mut();
15967
15968 ::fidl_next::Decode::decode(name.as_mut(), decoder_, ())?;
15969
15970 Ok(())
15971 }
15972 }
15973
15974 impl ::fidl_next::IntoNatural for FilesystemInfo {
15975 type Natural = crate::natural::FilesystemInfo;
15976 }
15977
15978 pub type Service = ::fidl_next::wire::Unit;
15980
15981 #[derive(Debug)]
15983 #[repr(C)]
15984 pub struct SymlinkObject<'de> {
15985 pub target: ::fidl_next::wire::Vector<'de, u8>,
15986 }
15987
15988 static_assertions::const_assert_eq!(std::mem::size_of::<SymlinkObject<'_>>(), 16);
15989 static_assertions::const_assert_eq!(std::mem::align_of::<SymlinkObject<'_>>(), 8);
15990
15991 static_assertions::const_assert_eq!(std::mem::offset_of!(SymlinkObject<'_>, target), 0);
15992
15993 impl ::fidl_next::Constrained for SymlinkObject<'_> {
15994 type Constraint = ();
15995
15996 fn validate(
15997 _: ::fidl_next::Slot<'_, Self>,
15998 _: Self::Constraint,
15999 ) -> Result<(), ::fidl_next::ValidationError> {
16000 Ok(())
16001 }
16002 }
16003
16004 unsafe impl ::fidl_next::Wire for SymlinkObject<'static> {
16005 type Narrowed<'de> = SymlinkObject<'de>;
16006
16007 #[inline]
16008 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16009 ::fidl_next::munge! {
16010 let Self {
16011 target,
16012
16013 } = &mut *out_;
16014 }
16015
16016 ::fidl_next::Wire::zero_padding(target);
16017 }
16018 }
16019
16020 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SymlinkObject<'de>
16021 where
16022 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16023 ___D: ::fidl_next::Decoder<'de>,
16024 {
16025 fn decode(
16026 slot_: ::fidl_next::Slot<'_, Self>,
16027 decoder_: &mut ___D,
16028 _: (),
16029 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16030 ::fidl_next::munge! {
16031 let Self {
16032 mut target,
16033
16034 } = slot_;
16035 }
16036
16037 let _field = target.as_mut();
16038 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
16039 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
16040
16041 let target = unsafe { target.deref_unchecked() };
16042
16043 if target.len() > 4095 {
16044 return Err(::fidl_next::DecodeError::VectorTooLong {
16045 size: target.len() as u64,
16046 limit: 4095,
16047 });
16048 }
16049
16050 Ok(())
16051 }
16052 }
16053
16054 impl<'de> ::fidl_next::IntoNatural for SymlinkObject<'de> {
16055 type Natural = crate::natural::SymlinkObject;
16056 }
16057
16058 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
16060 #[repr(transparent)]
16061 pub struct WatchEvent {
16062 pub(crate) value: u8,
16063 }
16064
16065 impl ::fidl_next::Constrained for WatchEvent {
16066 type Constraint = ();
16067
16068 fn validate(
16069 _: ::fidl_next::Slot<'_, Self>,
16070 _: Self::Constraint,
16071 ) -> Result<(), ::fidl_next::ValidationError> {
16072 Ok(())
16073 }
16074 }
16075
16076 unsafe impl ::fidl_next::Wire for WatchEvent {
16077 type Narrowed<'de> = Self;
16078
16079 #[inline]
16080 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
16081 }
16083 }
16084
16085 impl WatchEvent {
16086 pub const DELETED: WatchEvent = WatchEvent { value: 0 };
16087
16088 pub const ADDED: WatchEvent = WatchEvent { value: 1 };
16089
16090 pub const REMOVED: WatchEvent = WatchEvent { value: 2 };
16091
16092 pub const EXISTING: WatchEvent = WatchEvent { value: 3 };
16093
16094 pub const IDLE: WatchEvent = WatchEvent { value: 4 };
16095 }
16096
16097 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchEvent
16098 where
16099 ___D: ?Sized,
16100 {
16101 fn decode(
16102 slot: ::fidl_next::Slot<'_, Self>,
16103 _: &mut ___D,
16104 _: (),
16105 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16106 ::fidl_next::munge!(let Self { value } = slot);
16107
16108 match u8::from(*value) {
16109 0 | 1 | 2 | 3 | 4 => (),
16110 unknown => {
16111 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
16112 }
16113 }
16114
16115 Ok(())
16116 }
16117 }
16118
16119 impl ::core::convert::From<crate::natural::WatchEvent> for WatchEvent {
16120 fn from(natural: crate::natural::WatchEvent) -> Self {
16121 match natural {
16122 crate::natural::WatchEvent::Deleted => WatchEvent::DELETED,
16123
16124 crate::natural::WatchEvent::Added => WatchEvent::ADDED,
16125
16126 crate::natural::WatchEvent::Removed => WatchEvent::REMOVED,
16127
16128 crate::natural::WatchEvent::Existing => WatchEvent::EXISTING,
16129
16130 crate::natural::WatchEvent::Idle => WatchEvent::IDLE,
16131 }
16132 }
16133 }
16134
16135 impl ::fidl_next::IntoNatural for WatchEvent {
16136 type Natural = crate::natural::WatchEvent;
16137 }
16138}
16139
16140pub mod wire_optional {
16141
16142 #[repr(transparent)]
16143 pub struct SelinuxContext<'de> {
16144 pub(crate) raw: ::fidl_next::wire::Union,
16145 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16146 }
16147
16148 impl ::fidl_next::Constrained for SelinuxContext<'_> {
16149 type Constraint = ();
16150
16151 fn validate(
16152 _: ::fidl_next::Slot<'_, Self>,
16153 _: Self::Constraint,
16154 ) -> Result<(), ::fidl_next::ValidationError> {
16155 Ok(())
16156 }
16157 }
16158
16159 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
16160 type Narrowed<'de> = SelinuxContext<'de>;
16161
16162 #[inline]
16163 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16164 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16165 ::fidl_next::wire::Union::zero_padding(raw);
16166 }
16167 }
16168
16169 impl<'de> SelinuxContext<'de> {
16170 pub fn is_some(&self) -> bool {
16171 self.raw.is_some()
16172 }
16173
16174 pub fn is_none(&self) -> bool {
16175 self.raw.is_none()
16176 }
16177
16178 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
16179 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16180 }
16181
16182 pub fn into_option(self) -> ::core::option::Option<crate::wire::SelinuxContext<'de>> {
16183 if self.is_some() {
16184 Some(crate::wire::SelinuxContext {
16185 raw: self.raw,
16186 _phantom: ::core::marker::PhantomData,
16187 })
16188 } else {
16189 None
16190 }
16191 }
16192 }
16193
16194 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SelinuxContext<'de>
16195 where
16196 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16197 ___D: ::fidl_next::Decoder<'de>,
16198 {
16199 fn decode(
16200 mut slot: ::fidl_next::Slot<'_, Self>,
16201 decoder: &mut ___D,
16202 _: (),
16203 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16204 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16205 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16206 1 => {
16207 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
16208 raw,
16209 decoder,
16210 (256, ()),
16211 )?
16212 }
16213
16214 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::EmptyStruct>(
16215 raw,
16216 decoder,
16217 (),
16218 )?,
16219
16220 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16221 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16222 }
16223
16224 Ok(())
16225 }
16226 }
16227
16228 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
16229 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16230 self.as_ref().fmt(f)
16231 }
16232 }
16233
16234 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
16235 type Natural = ::core::option::Option<crate::natural::SelinuxContext>;
16236 }
16237}
16238
16239pub mod generic {
16240
16241 pub struct AdvisoryLockRange<T0, T1, T2> {
16243 pub origin: T0,
16244
16245 pub offset: T1,
16246
16247 pub length: T2,
16248 }
16249
16250 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
16251 for AdvisoryLockRange<T0, T1, T2>
16252 where
16253 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16254 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
16255 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
16256 T2: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
16257 {
16258 #[inline]
16259 fn encode(
16260 self,
16261 encoder_: &mut ___E,
16262 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
16263 _: (),
16264 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16265 ::fidl_next::munge! {
16266 let crate::wire::AdvisoryLockRange {
16267 origin,
16268 offset,
16269 length,
16270
16271 } = out_;
16272 }
16273
16274 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
16275
16276 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
16277
16278 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
16279
16280 Ok(())
16281 }
16282 }
16283
16284 pub struct AdvisoryLockingAdvisoryLockRequest<T0> {
16286 pub request: T0,
16287 }
16288
16289 unsafe impl<___E, T0>
16290 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
16291 for AdvisoryLockingAdvisoryLockRequest<T0>
16292 where
16293 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16294 ___E: ::fidl_next::Encoder,
16295 T0: ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>,
16296 {
16297 #[inline]
16298 fn encode(
16299 self,
16300 encoder_: &mut ___E,
16301 out_: &mut ::core::mem::MaybeUninit<
16302 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
16303 >,
16304 _: (),
16305 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16306 ::fidl_next::munge! {
16307 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
16308 request,
16309
16310 } = out_;
16311 }
16312
16313 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
16314
16315 Ok(())
16316 }
16317 }
16318
16319 pub type AdvisoryLockingAdvisoryLockResponse = ();
16321
16322 pub struct NodeAttributes<T0, T1, T2, T3, T4, T5, T6> {
16324 pub mode: T0,
16325
16326 pub id: T1,
16327
16328 pub content_size: T2,
16329
16330 pub storage_size: T3,
16331
16332 pub link_count: T4,
16333
16334 pub creation_time: T5,
16335
16336 pub modification_time: T6,
16337 }
16338
16339 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
16340 ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>
16341 for NodeAttributes<T0, T1, T2, T3, T4, T5, T6>
16342 where
16343 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16344 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
16345 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16346 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16347 T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16348 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16349 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16350 T6: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16351 {
16352 #[inline]
16353 fn encode(
16354 self,
16355 encoder_: &mut ___E,
16356 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
16357 _: (),
16358 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16359 ::fidl_next::munge! {
16360 let crate::wire::NodeAttributes {
16361 mode,
16362 id,
16363 content_size,
16364 storage_size,
16365 link_count,
16366 creation_time,
16367 modification_time,
16368
16369 } = out_;
16370 }
16371
16372 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
16373
16374 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
16375
16376 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
16377
16378 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
16379
16380 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
16381
16382 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
16383
16384 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
16385
16386 Ok(())
16387 }
16388 }
16389
16390 pub struct NodeQueryFilesystemResponse<T0, T1> {
16392 pub s: T0,
16393
16394 pub info: T1,
16395 }
16396
16397 unsafe impl<___E, T0, T1>
16398 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
16399 for NodeQueryFilesystemResponse<T0, T1>
16400 where
16401 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16402 ___E: ::fidl_next::Encoder,
16403 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16404 T1: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>, ___E>,
16405 {
16406 #[inline]
16407 fn encode(
16408 self,
16409 encoder_: &mut ___E,
16410 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
16411 _: (),
16412 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16413 ::fidl_next::munge! {
16414 let crate::wire::NodeQueryFilesystemResponse {
16415 s,
16416 info,
16417
16418 } = out_;
16419 }
16420
16421 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16422
16423 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
16424
16425 Ok(())
16426 }
16427 }
16428
16429 pub type NodeUpdateAttributesResponse = ();
16431
16432 pub type NodeSyncResponse = ();
16434
16435 pub struct DirectoryReadDirentsRequest<T0> {
16437 pub max_bytes: T0,
16438 }
16439
16440 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
16441 for DirectoryReadDirentsRequest<T0>
16442 where
16443 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16444 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16445 {
16446 #[inline]
16447 fn encode(
16448 self,
16449 encoder_: &mut ___E,
16450 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
16451 _: (),
16452 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16453 ::fidl_next::munge! {
16454 let crate::wire::DirectoryReadDirentsRequest {
16455 max_bytes,
16456
16457 } = out_;
16458 }
16459
16460 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
16461
16462 Ok(())
16463 }
16464 }
16465
16466 pub struct DirectoryReadDirentsResponse<T0, T1> {
16468 pub s: T0,
16469
16470 pub dirents: T1,
16471 }
16472
16473 unsafe impl<___E, T0, T1>
16474 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
16475 for DirectoryReadDirentsResponse<T0, T1>
16476 where
16477 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16478 ___E: ::fidl_next::Encoder,
16479 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16480 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16481 {
16482 #[inline]
16483 fn encode(
16484 self,
16485 encoder_: &mut ___E,
16486 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
16487 _: (),
16488 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16489 ::fidl_next::munge! {
16490 let crate::wire::DirectoryReadDirentsResponse {
16491 s,
16492 dirents,
16493
16494 } = out_;
16495 }
16496
16497 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16498
16499 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
16500
16501 Ok(())
16502 }
16503 }
16504
16505 pub struct DirectoryRewindResponse<T0> {
16507 pub s: T0,
16508 }
16509
16510 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
16511 for DirectoryRewindResponse<T0>
16512 where
16513 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16514 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16515 {
16516 #[inline]
16517 fn encode(
16518 self,
16519 encoder_: &mut ___E,
16520 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
16521 _: (),
16522 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16523 ::fidl_next::munge! {
16524 let crate::wire::DirectoryRewindResponse {
16525 s,
16526
16527 } = out_;
16528 }
16529
16530 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16531
16532 Ok(())
16533 }
16534 }
16535
16536 pub struct DirectoryLinkResponse<T0> {
16538 pub s: T0,
16539 }
16540
16541 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
16542 for DirectoryLinkResponse<T0>
16543 where
16544 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16545 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16546 {
16547 #[inline]
16548 fn encode(
16549 self,
16550 encoder_: &mut ___E,
16551 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
16552 _: (),
16553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16554 ::fidl_next::munge! {
16555 let crate::wire::DirectoryLinkResponse {
16556 s,
16557
16558 } = out_;
16559 }
16560
16561 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16562
16563 Ok(())
16564 }
16565 }
16566
16567 pub struct DirectoryUnlinkRequest<T0, T1> {
16569 pub name: T0,
16570
16571 pub options: T1,
16572 }
16573
16574 unsafe impl<___E, T0, T1>
16575 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
16576 for DirectoryUnlinkRequest<T0, T1>
16577 where
16578 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16579 ___E: ::fidl_next::Encoder,
16580 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
16581 T1: ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>,
16582 {
16583 #[inline]
16584 fn encode(
16585 self,
16586 encoder_: &mut ___E,
16587 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
16588 _: (),
16589 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16590 ::fidl_next::munge! {
16591 let crate::wire::DirectoryUnlinkRequest {
16592 name,
16593 options,
16594
16595 } = out_;
16596 }
16597
16598 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
16599
16600 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
16601
16602 Ok(())
16603 }
16604 }
16605
16606 pub type DirectoryUnlinkResponse = ();
16608
16609 pub type DirectoryRenameResponse = ();
16611
16612 pub struct DirectoryWatchResponse<T0> {
16614 pub s: T0,
16615 }
16616
16617 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
16618 for DirectoryWatchResponse<T0>
16619 where
16620 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16621 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16622 {
16623 #[inline]
16624 fn encode(
16625 self,
16626 encoder_: &mut ___E,
16627 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
16628 _: (),
16629 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16630 ::fidl_next::munge! {
16631 let crate::wire::DirectoryWatchResponse {
16632 s,
16633
16634 } = out_;
16635 }
16636
16637 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16638
16639 Ok(())
16640 }
16641 }
16642
16643 pub struct NodeGetExtendedAttributeRequest<T0> {
16645 pub name: T0,
16646 }
16647
16648 unsafe impl<___E, T0>
16649 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
16650 for NodeGetExtendedAttributeRequest<T0>
16651 where
16652 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16653 ___E: ::fidl_next::Encoder,
16654 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16655 {
16656 #[inline]
16657 fn encode(
16658 self,
16659 encoder_: &mut ___E,
16660 out_: &mut ::core::mem::MaybeUninit<
16661 crate::wire::NodeGetExtendedAttributeRequest<'static>,
16662 >,
16663 _: (),
16664 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16665 ::fidl_next::munge! {
16666 let crate::wire::NodeGetExtendedAttributeRequest {
16667 name,
16668
16669 } = out_;
16670 }
16671
16672 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
16673
16674 Ok(())
16675 }
16676 }
16677
16678 pub type NodeSetExtendedAttributeResponse = ();
16680
16681 pub struct NodeRemoveExtendedAttributeRequest<T0> {
16683 pub name: T0,
16684 }
16685
16686 unsafe impl<___E, T0>
16687 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
16688 for NodeRemoveExtendedAttributeRequest<T0>
16689 where
16690 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16691 ___E: ::fidl_next::Encoder,
16692 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16693 {
16694 #[inline]
16695 fn encode(
16696 self,
16697 encoder_: &mut ___E,
16698 out_: &mut ::core::mem::MaybeUninit<
16699 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
16700 >,
16701 _: (),
16702 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16703 ::fidl_next::munge! {
16704 let crate::wire::NodeRemoveExtendedAttributeRequest {
16705 name,
16706
16707 } = out_;
16708 }
16709
16710 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
16711
16712 Ok(())
16713 }
16714 }
16715
16716 pub type NodeRemoveExtendedAttributeResponse = ();
16718
16719 pub type DirectoryCreateSymlinkResponse = ();
16721
16722 pub type NodeSetFlagsResponse = ();
16724
16725 pub struct NodeDeprecatedGetAttrResponse<T0, T1> {
16727 pub s: T0,
16728
16729 pub attributes: T1,
16730 }
16731
16732 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
16733 for NodeDeprecatedGetAttrResponse<T0, T1>
16734 where
16735 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16736 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16737 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
16738 {
16739 #[inline]
16740 fn encode(
16741 self,
16742 encoder_: &mut ___E,
16743 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
16744 _: (),
16745 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16746 ::fidl_next::munge! {
16747 let crate::wire::NodeDeprecatedGetAttrResponse {
16748 s,
16749 attributes,
16750
16751 } = out_;
16752 }
16753
16754 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16755
16756 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
16757
16758 Ok(())
16759 }
16760 }
16761
16762 pub struct NodeDeprecatedSetAttrRequest<T0, T1> {
16764 pub flags: T0,
16765
16766 pub attributes: T1,
16767 }
16768
16769 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
16770 for NodeDeprecatedSetAttrRequest<T0, T1>
16771 where
16772 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16773 T0: ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>,
16774 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
16775 {
16776 #[inline]
16777 fn encode(
16778 self,
16779 encoder_: &mut ___E,
16780 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
16781 _: (),
16782 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16783 ::fidl_next::munge! {
16784 let crate::wire::NodeDeprecatedSetAttrRequest {
16785 flags,
16786 attributes,
16787
16788 } = out_;
16789 }
16790
16791 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16792
16793 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
16794
16795 Ok(())
16796 }
16797 }
16798
16799 pub struct NodeDeprecatedSetAttrResponse<T0> {
16801 pub s: T0,
16802 }
16803
16804 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
16805 for NodeDeprecatedSetAttrResponse<T0>
16806 where
16807 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16808 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16809 {
16810 #[inline]
16811 fn encode(
16812 self,
16813 encoder_: &mut ___E,
16814 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
16815 _: (),
16816 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16817 ::fidl_next::munge! {
16818 let crate::wire::NodeDeprecatedSetAttrResponse {
16819 s,
16820
16821 } = out_;
16822 }
16823
16824 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16825
16826 Ok(())
16827 }
16828 }
16829
16830 pub struct NodeDeprecatedGetFlagsResponse<T0, T1> {
16832 pub s: T0,
16833
16834 pub flags: T1,
16835 }
16836
16837 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
16838 for NodeDeprecatedGetFlagsResponse<T0, T1>
16839 where
16840 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16841 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16842 T1: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
16843 {
16844 #[inline]
16845 fn encode(
16846 self,
16847 encoder_: &mut ___E,
16848 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
16849 _: (),
16850 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16851 ::fidl_next::munge! {
16852 let crate::wire::NodeDeprecatedGetFlagsResponse {
16853 s,
16854 flags,
16855
16856 } = out_;
16857 }
16858
16859 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16860
16861 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16862
16863 Ok(())
16864 }
16865 }
16866
16867 pub struct NodeDeprecatedSetFlagsRequest<T0> {
16869 pub flags: T0,
16870 }
16871
16872 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
16873 for NodeDeprecatedSetFlagsRequest<T0>
16874 where
16875 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16876 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
16877 {
16878 #[inline]
16879 fn encode(
16880 self,
16881 encoder_: &mut ___E,
16882 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
16883 _: (),
16884 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16885 ::fidl_next::munge! {
16886 let crate::wire::NodeDeprecatedSetFlagsRequest {
16887 flags,
16888
16889 } = out_;
16890 }
16891
16892 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16893
16894 Ok(())
16895 }
16896 }
16897
16898 pub struct NodeDeprecatedSetFlagsResponse<T0> {
16900 pub s: T0,
16901 }
16902
16903 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
16904 for NodeDeprecatedSetFlagsResponse<T0>
16905 where
16906 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16907 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
16908 {
16909 #[inline]
16910 fn encode(
16911 self,
16912 encoder_: &mut ___E,
16913 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
16914 _: (),
16915 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16916 ::fidl_next::munge! {
16917 let crate::wire::NodeDeprecatedSetFlagsResponse {
16918 s,
16919
16920 } = out_;
16921 }
16922
16923 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16924
16925 Ok(())
16926 }
16927 }
16928
16929 pub struct NodeGetFlagsResponse<T0> {
16931 pub flags: T0,
16932 }
16933
16934 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
16935 for NodeGetFlagsResponse<T0>
16936 where
16937 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16938 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
16939 {
16940 #[inline]
16941 fn encode(
16942 self,
16943 encoder_: &mut ___E,
16944 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
16945 _: (),
16946 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16947 ::fidl_next::munge! {
16948 let crate::wire::NodeGetFlagsResponse {
16949 flags,
16950
16951 } = out_;
16952 }
16953
16954 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16955
16956 Ok(())
16957 }
16958 }
16959
16960 pub struct NodeSetFlagsRequest<T0> {
16962 pub flags: T0,
16963 }
16964
16965 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
16966 for NodeSetFlagsRequest<T0>
16967 where
16968 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16969 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
16970 {
16971 #[inline]
16972 fn encode(
16973 self,
16974 encoder_: &mut ___E,
16975 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
16976 _: (),
16977 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16978 ::fidl_next::munge! {
16979 let crate::wire::NodeSetFlagsRequest {
16980 flags,
16981
16982 } = out_;
16983 }
16984
16985 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16986
16987 Ok(())
16988 }
16989 }
16990
16991 pub type EmptyStruct = ();
16993
16994 pub struct NodeAttributes2<T0, T1> {
16996 pub mutable_attributes: T0,
16997
16998 pub immutable_attributes: T1,
16999 }
17000
17001 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
17002 for NodeAttributes2<T0, T1>
17003 where
17004 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17005 ___E: ::fidl_next::Encoder,
17006 T0: ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>,
17007 T1: ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>,
17008 {
17009 #[inline]
17010 fn encode(
17011 self,
17012 encoder_: &mut ___E,
17013 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
17014 _: (),
17015 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17016 ::fidl_next::munge! {
17017 let crate::wire::NodeAttributes2 {
17018 mutable_attributes,
17019 immutable_attributes,
17020
17021 } = out_;
17022 }
17023
17024 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
17025
17026 ::fidl_next::Encode::encode(
17027 self.immutable_attributes,
17028 encoder_,
17029 immutable_attributes,
17030 (),
17031 )?;
17032
17033 Ok(())
17034 }
17035 }
17036
17037 pub struct NodeGetAttributesRequest<T0> {
17039 pub query: T0,
17040 }
17041
17042 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
17043 for NodeGetAttributesRequest<T0>
17044 where
17045 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17046 T0: ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>,
17047 {
17048 #[inline]
17049 fn encode(
17050 self,
17051 encoder_: &mut ___E,
17052 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
17053 _: (),
17054 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17055 ::fidl_next::munge! {
17056 let crate::wire::NodeGetAttributesRequest {
17057 query,
17058
17059 } = out_;
17060 }
17061
17062 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
17063
17064 Ok(())
17065 }
17066 }
17067
17068 pub type DirectoryObject = ();
17070
17071 pub struct ExtendedAttributeIteratorGetNextResponse<T0, T1> {
17073 pub attributes: T0,
17074
17075 pub last: T1,
17076 }
17077
17078 unsafe impl<___E, T0, T1>
17079 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
17080 for ExtendedAttributeIteratorGetNextResponse<T0, T1>
17081 where
17082 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17083 ___E: ::fidl_next::Encoder,
17084 T0: ::fidl_next::Encode<
17085 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Vector<'static, u8>>,
17086 ___E,
17087 >,
17088 T1: ::fidl_next::Encode<bool, ___E>,
17089 {
17090 #[inline]
17091 fn encode(
17092 self,
17093 encoder_: &mut ___E,
17094 out_: &mut ::core::mem::MaybeUninit<
17095 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
17096 >,
17097 _: (),
17098 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17099 ::fidl_next::munge! {
17100 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
17101 attributes,
17102 last,
17103
17104 } = out_;
17105 }
17106
17107 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
17108
17109 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
17110
17111 Ok(())
17112 }
17113 }
17114
17115 pub struct ReadableReadRequest<T0> {
17117 pub count: T0,
17118 }
17119
17120 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
17121 for ReadableReadRequest<T0>
17122 where
17123 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17124 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17125 {
17126 #[inline]
17127 fn encode(
17128 self,
17129 encoder_: &mut ___E,
17130 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
17131 _: (),
17132 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17133 ::fidl_next::munge! {
17134 let crate::wire::ReadableReadRequest {
17135 count,
17136
17137 } = out_;
17138 }
17139
17140 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
17141
17142 Ok(())
17143 }
17144 }
17145
17146 pub struct ReadableReadResponse<T0> {
17148 pub data: T0,
17149 }
17150
17151 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
17152 for ReadableReadResponse<T0>
17153 where
17154 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17155 ___E: ::fidl_next::Encoder,
17156 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17157 {
17158 #[inline]
17159 fn encode(
17160 self,
17161 encoder_: &mut ___E,
17162 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
17163 _: (),
17164 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17165 ::fidl_next::munge! {
17166 let crate::wire::ReadableReadResponse {
17167 data,
17168
17169 } = out_;
17170 }
17171
17172 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17173
17174 Ok(())
17175 }
17176 }
17177
17178 pub struct WritableWriteRequest<T0> {
17180 pub data: T0,
17181 }
17182
17183 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
17184 for WritableWriteRequest<T0>
17185 where
17186 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17187 ___E: ::fidl_next::Encoder,
17188 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17189 {
17190 #[inline]
17191 fn encode(
17192 self,
17193 encoder_: &mut ___E,
17194 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
17195 _: (),
17196 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17197 ::fidl_next::munge! {
17198 let crate::wire::WritableWriteRequest {
17199 data,
17200
17201 } = out_;
17202 }
17203
17204 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17205
17206 Ok(())
17207 }
17208 }
17209
17210 pub struct WritableWriteResponse<T0> {
17212 pub actual_count: T0,
17213 }
17214
17215 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
17216 for WritableWriteResponse<T0>
17217 where
17218 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17219 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17220 {
17221 #[inline]
17222 fn encode(
17223 self,
17224 encoder_: &mut ___E,
17225 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
17226 _: (),
17227 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17228 ::fidl_next::munge! {
17229 let crate::wire::WritableWriteResponse {
17230 actual_count,
17231
17232 } = out_;
17233 }
17234
17235 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
17236
17237 Ok(())
17238 }
17239 }
17240
17241 pub struct FileSeekRequest<T0, T1> {
17243 pub origin: T0,
17244
17245 pub offset: T1,
17246 }
17247
17248 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
17249 for FileSeekRequest<T0, T1>
17250 where
17251 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17252 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
17253 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
17254 {
17255 #[inline]
17256 fn encode(
17257 self,
17258 encoder_: &mut ___E,
17259 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
17260 _: (),
17261 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17262 ::fidl_next::munge! {
17263 let crate::wire::FileSeekRequest {
17264 origin,
17265 offset,
17266
17267 } = out_;
17268 }
17269
17270 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
17271
17272 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17273
17274 Ok(())
17275 }
17276 }
17277
17278 pub struct FileSeekResponse<T0> {
17280 pub offset_from_start: T0,
17281 }
17282
17283 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
17284 for FileSeekResponse<T0>
17285 where
17286 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17287 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17288 {
17289 #[inline]
17290 fn encode(
17291 self,
17292 encoder_: &mut ___E,
17293 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
17294 _: (),
17295 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17296 ::fidl_next::munge! {
17297 let crate::wire::FileSeekResponse {
17298 offset_from_start,
17299
17300 } = out_;
17301 }
17302
17303 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
17304
17305 Ok(())
17306 }
17307 }
17308
17309 pub struct FileReadAtRequest<T0, T1> {
17311 pub count: T0,
17312
17313 pub offset: T1,
17314 }
17315
17316 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
17317 for FileReadAtRequest<T0, T1>
17318 where
17319 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17320 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17321 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17322 {
17323 #[inline]
17324 fn encode(
17325 self,
17326 encoder_: &mut ___E,
17327 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
17328 _: (),
17329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17330 ::fidl_next::munge! {
17331 let crate::wire::FileReadAtRequest {
17332 count,
17333 offset,
17334
17335 } = out_;
17336 }
17337
17338 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
17339
17340 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17341
17342 Ok(())
17343 }
17344 }
17345
17346 pub struct FileReadAtResponse<T0> {
17348 pub data: T0,
17349 }
17350
17351 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
17352 for FileReadAtResponse<T0>
17353 where
17354 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17355 ___E: ::fidl_next::Encoder,
17356 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17357 {
17358 #[inline]
17359 fn encode(
17360 self,
17361 encoder_: &mut ___E,
17362 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
17363 _: (),
17364 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17365 ::fidl_next::munge! {
17366 let crate::wire::FileReadAtResponse {
17367 data,
17368
17369 } = out_;
17370 }
17371
17372 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17373
17374 Ok(())
17375 }
17376 }
17377
17378 pub struct FileWriteAtRequest<T0, T1> {
17380 pub data: T0,
17381
17382 pub offset: T1,
17383 }
17384
17385 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
17386 for FileWriteAtRequest<T0, T1>
17387 where
17388 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17389 ___E: ::fidl_next::Encoder,
17390 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17391 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17392 {
17393 #[inline]
17394 fn encode(
17395 self,
17396 encoder_: &mut ___E,
17397 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
17398 _: (),
17399 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17400 ::fidl_next::munge! {
17401 let crate::wire::FileWriteAtRequest {
17402 data,
17403 offset,
17404
17405 } = out_;
17406 }
17407
17408 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17409
17410 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17411
17412 Ok(())
17413 }
17414 }
17415
17416 pub struct FileWriteAtResponse<T0> {
17418 pub actual_count: T0,
17419 }
17420
17421 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
17422 for FileWriteAtResponse<T0>
17423 where
17424 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17425 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17426 {
17427 #[inline]
17428 fn encode(
17429 self,
17430 encoder_: &mut ___E,
17431 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
17432 _: (),
17433 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17434 ::fidl_next::munge! {
17435 let crate::wire::FileWriteAtResponse {
17436 actual_count,
17437
17438 } = out_;
17439 }
17440
17441 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
17442
17443 Ok(())
17444 }
17445 }
17446
17447 pub struct FileResizeRequest<T0> {
17449 pub length: T0,
17450 }
17451
17452 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
17453 for FileResizeRequest<T0>
17454 where
17455 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17456 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17457 {
17458 #[inline]
17459 fn encode(
17460 self,
17461 encoder_: &mut ___E,
17462 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
17463 _: (),
17464 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17465 ::fidl_next::munge! {
17466 let crate::wire::FileResizeRequest {
17467 length,
17468
17469 } = out_;
17470 }
17471
17472 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
17473
17474 Ok(())
17475 }
17476 }
17477
17478 pub type FileResizeResponse = ();
17480
17481 pub struct FileGetBackingMemoryRequest<T0> {
17483 pub flags: T0,
17484 }
17485
17486 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
17487 for FileGetBackingMemoryRequest<T0>
17488 where
17489 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17490 T0: ::fidl_next::Encode<crate::wire::VmoFlags, ___E>,
17491 {
17492 #[inline]
17493 fn encode(
17494 self,
17495 encoder_: &mut ___E,
17496 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
17497 _: (),
17498 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17499 ::fidl_next::munge! {
17500 let crate::wire::FileGetBackingMemoryRequest {
17501 flags,
17502
17503 } = out_;
17504 }
17505
17506 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
17507
17508 Ok(())
17509 }
17510 }
17511
17512 pub type LinkableLinkIntoResponse = ();
17514
17515 pub type FileAllocateResponse = ();
17517
17518 pub type FileEnableVerityResponse = ();
17520
17521 pub struct FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> {
17523 pub total_bytes: T0,
17524
17525 pub used_bytes: T1,
17526
17527 pub total_nodes: T2,
17528
17529 pub used_nodes: T3,
17530
17531 pub free_shared_pool_bytes: T4,
17532
17533 pub fs_id: T5,
17534
17535 pub block_size: T6,
17536
17537 pub max_filename_size: T7,
17538
17539 pub fs_type: T8,
17540
17541 pub padding: T9,
17542
17543 pub name: T10,
17544 }
17545
17546 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
17547 ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>
17548 for FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
17549 where
17550 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17551 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17552 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17553 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17554 T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17555 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17556 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17557 T6: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17558 T7: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17559 T8: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17560 T9: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17561 T10: ::fidl_next::Encode<[i8; 32], ___E>,
17562 {
17563 #[inline]
17564 fn encode(
17565 self,
17566 encoder_: &mut ___E,
17567 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
17568 _: (),
17569 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17570 ::fidl_next::munge! {
17571 let crate::wire::FilesystemInfo {
17572 total_bytes,
17573 used_bytes,
17574 total_nodes,
17575 used_nodes,
17576 free_shared_pool_bytes,
17577 fs_id,
17578 block_size,
17579 max_filename_size,
17580 fs_type,
17581 padding,
17582 name,
17583
17584 } = out_;
17585 }
17586
17587 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
17588
17589 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
17590
17591 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
17592
17593 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
17594
17595 ::fidl_next::Encode::encode(
17596 self.free_shared_pool_bytes,
17597 encoder_,
17598 free_shared_pool_bytes,
17599 (),
17600 )?;
17601
17602 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
17603
17604 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
17605
17606 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
17607
17608 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
17609
17610 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
17611
17612 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
17613
17614 Ok(())
17615 }
17616 }
17617
17618 pub type Service = ();
17620
17621 pub struct SymlinkObject<T0> {
17623 pub target: T0,
17624 }
17625
17626 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
17627 for SymlinkObject<T0>
17628 where
17629 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17630 ___E: ::fidl_next::Encoder,
17631 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17632 {
17633 #[inline]
17634 fn encode(
17635 self,
17636 encoder_: &mut ___E,
17637 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
17638 _: (),
17639 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17640 ::fidl_next::munge! {
17641 let crate::wire::SymlinkObject {
17642 target,
17643
17644 } = out_;
17645 }
17646
17647 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
17648
17649 Ok(())
17650 }
17651 }
17652}
17653
17654pub use self::natural::*;
17655
17656#[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"]
17658#[derive(PartialEq, Debug)]
17659pub struct AdvisoryLocking;
17660
17661#[cfg(target_os = "fuchsia")]
17662impl ::fidl_next::HasTransport for AdvisoryLocking {
17663 type Transport = ::fidl_next::fuchsia::zx::Channel;
17664}
17665
17666pub mod advisory_locking {
17667 pub mod prelude {
17668 pub use crate::{
17669 AdvisoryLocking, AdvisoryLockingClientHandler, AdvisoryLockingLocalClientHandler,
17670 AdvisoryLockingLocalServerHandler, AdvisoryLockingServerHandler, advisory_locking,
17671 };
17672
17673 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
17674
17675 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
17676 }
17677
17678 pub struct AdvisoryLock;
17679
17680 impl ::fidl_next::Method for AdvisoryLock {
17681 const ORDINAL: u64 = 7992130864415541162;
17682 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17683 ::fidl_next::protocol::Flexibility::Strict;
17684
17685 type Protocol = crate::AdvisoryLocking;
17686
17687 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
17688 }
17689
17690 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
17691 type Response = ::fidl_next::wire::Result<
17692 'static,
17693 crate::wire::AdvisoryLockingAdvisoryLockResponse,
17694 ::fidl_next::wire::fuchsia::Status,
17695 >;
17696 }
17697
17698 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
17699 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17700
17701 fn respond(response: ___R) -> Self::Output {
17702 ::core::result::Result::Ok(response)
17703 }
17704 }
17705
17706 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
17707 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17708
17709 fn respond_err(response: ___R) -> Self::Output {
17710 ::core::result::Result::Err(response)
17711 }
17712 }
17713
17714 mod ___detail {
17715 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::AdvisoryLocking
17716 where
17717 ___T: ::fidl_next::Transport,
17718 {
17719 type Client = AdvisoryLockingClient<___T>;
17720 type Server = AdvisoryLockingServer<___T>;
17721 }
17722
17723 #[repr(transparent)]
17725 pub struct AdvisoryLockingClient<___T: ::fidl_next::Transport> {
17726 #[allow(dead_code)]
17727 client: ::fidl_next::protocol::Client<___T>,
17728 }
17729
17730 impl<___T> AdvisoryLockingClient<___T>
17731 where
17732 ___T: ::fidl_next::Transport,
17733 {
17734 #[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"]
17735 pub fn advisory_lock(
17736 &self,
17737
17738 request: impl ::fidl_next::Encode<
17739 crate::wire::AdvisoryLockRequest<'static>,
17740 <___T as ::fidl_next::Transport>::SendBuffer,
17741 >,
17742 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
17743 where
17744 <___T as ::fidl_next::Transport>::SendBuffer:
17745 ::fidl_next::encoder::InternalHandleEncoder,
17746 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17747 {
17748 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
17749 request,
17750 })
17751 }
17752
17753 #[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"]
17754 pub fn advisory_lock_with<___R>(
17755 &self,
17756 request: ___R,
17757 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
17758 where
17759 ___R: ::fidl_next::Encode<
17760 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
17761 <___T as ::fidl_next::Transport>::SendBuffer,
17762 >,
17763 {
17764 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17765 7992130864415541162,
17766 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
17767 request,
17768 ))
17769 }
17770 }
17771
17772 #[repr(transparent)]
17774 pub struct AdvisoryLockingServer<___T: ::fidl_next::Transport> {
17775 server: ::fidl_next::protocol::Server<___T>,
17776 }
17777
17778 impl<___T> AdvisoryLockingServer<___T> where ___T: ::fidl_next::Transport {}
17779 }
17780}
17781
17782#[diagnostic::on_unimplemented(
17783 note = "If {Self} implements the non-local AdvisoryLockingClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
17784)]
17785
17786pub trait AdvisoryLockingLocalClientHandler<
17790 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17791 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17792>
17793{
17794}
17795
17796impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for AdvisoryLocking
17797where
17798 ___H: AdvisoryLockingLocalClientHandler<___T>,
17799 ___T: ::fidl_next::Transport,
17800{
17801 async fn on_event(
17802 handler: &mut ___H,
17803 mut message: ::fidl_next::Message<___T>,
17804 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17805 match *message.header().ordinal {
17806 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17807 }
17808 }
17809}
17810
17811#[diagnostic::on_unimplemented(
17812 note = "If {Self} implements the non-local AdvisoryLockingServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
17813)]
17814
17815pub trait AdvisoryLockingLocalServerHandler<
17819 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17820 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17821>
17822{
17823 #[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"]
17824 fn advisory_lock(
17825 &mut self,
17826
17827 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
17828
17829 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
17830 ) -> impl ::core::future::Future<Output = ()>;
17831}
17832
17833impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for AdvisoryLocking
17834where
17835 ___H: AdvisoryLockingLocalServerHandler<___T>,
17836 ___T: ::fidl_next::Transport,
17837 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
17838 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17839 Constraint = (),
17840 >,
17841{
17842 async fn on_one_way(
17843 handler: &mut ___H,
17844 mut message: ::fidl_next::Message<___T>,
17845 ) -> ::core::result::Result<
17846 (),
17847 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17848 > {
17849 match *message.header().ordinal {
17850 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17851 }
17852 }
17853
17854 async fn on_two_way(
17855 handler: &mut ___H,
17856 mut message: ::fidl_next::Message<___T>,
17857 responder: ::fidl_next::protocol::Responder<___T>,
17858 ) -> ::core::result::Result<
17859 (),
17860 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17861 > {
17862 match *message.header().ordinal {
17863 7992130864415541162 => {
17864 let responder = ::fidl_next::Responder::from_untyped(responder);
17865
17866 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17867 Ok(decoded) => {
17868 handler
17869 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
17870 .await;
17871 Ok(())
17872 }
17873 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17874 ordinal: 7992130864415541162,
17875 error,
17876 }),
17877 }
17878 }
17879
17880 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17881 }
17882 }
17883}
17884
17885pub trait AdvisoryLockingClientHandler<
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::DispatchClientMessage<___H, ___T> for AdvisoryLocking
17896where
17897 ___H: AdvisoryLockingClientHandler<___T> + ::core::marker::Send,
17898 ___T: ::fidl_next::Transport,
17899{
17900 async fn on_event(
17901 handler: &mut ___H,
17902 mut message: ::fidl_next::Message<___T>,
17903 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17904 match *message.header().ordinal {
17905 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17906 }
17907 }
17908}
17909
17910pub trait AdvisoryLockingServerHandler<
17914 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17915 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17916>
17917{
17918 #[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"]
17919 fn advisory_lock(
17920 &mut self,
17921
17922 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
17923
17924 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
17925 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17926}
17927
17928impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for AdvisoryLocking
17929where
17930 ___H: AdvisoryLockingServerHandler<___T> + ::core::marker::Send,
17931 ___T: ::fidl_next::Transport,
17932 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
17933 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17934 Constraint = (),
17935 >,
17936{
17937 async fn on_one_way(
17938 handler: &mut ___H,
17939 mut message: ::fidl_next::Message<___T>,
17940 ) -> ::core::result::Result<
17941 (),
17942 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17943 > {
17944 match *message.header().ordinal {
17945 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17946 }
17947 }
17948
17949 async fn on_two_way(
17950 handler: &mut ___H,
17951 mut message: ::fidl_next::Message<___T>,
17952 responder: ::fidl_next::protocol::Responder<___T>,
17953 ) -> ::core::result::Result<
17954 (),
17955 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17956 > {
17957 match *message.header().ordinal {
17958 7992130864415541162 => {
17959 let responder = ::fidl_next::Responder::from_untyped(responder);
17960
17961 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17962 Ok(decoded) => {
17963 handler
17964 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
17965 .await;
17966 Ok(())
17967 }
17968 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17969 ordinal: 7992130864415541162,
17970 error,
17971 }),
17972 }
17973 }
17974
17975 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17976 }
17977 }
17978}
17979
17980impl<___T> AdvisoryLockingClientHandler<___T> for ::fidl_next::IgnoreEvents where
17981 ___T: ::fidl_next::Transport
17982{
17983}
17984
17985impl<___H, ___T> AdvisoryLockingLocalClientHandler<___T> for ::fidl_next::Local<___H>
17986where
17987 ___H: AdvisoryLockingClientHandler<___T>,
17988 ___T: ::fidl_next::Transport,
17989{
17990}
17991
17992impl<___H, ___T> AdvisoryLockingLocalServerHandler<___T> for ::fidl_next::Local<___H>
17993where
17994 ___H: AdvisoryLockingServerHandler<___T>,
17995 ___T: ::fidl_next::Transport,
17996{
17997 async fn advisory_lock(
17998 &mut self,
17999
18000 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
18001
18002 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
18003 ) {
18004 ___H::advisory_lock(&mut self.0, request, responder).await
18005 }
18006}
18007
18008pub const DIRECTORY_PROTOCOL_NAME: &str = "fuchsia.io/Directory";
18009
18010#[doc = " The maximum length, in bytes, of a filesystem path.\n"]
18011pub const MAX_PATH_LENGTH: u64 = 4095 as u64;
18012
18013#[doc = " The maximal buffer size which can be transmitted for buffered operations.\n This capacity is currently set somewhat arbitrarily.\n"]
18014pub const MAX_BUF: u64 = 8192 as u64;
18015
18016#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
18017pub const MAX_NAME_LENGTH: u64 = 255 as u64;
18018
18019#[doc = " The maximum size for an extended attribute name.\n"]
18020pub const MAX_ATTRIBUTE_NAME: u64 = 255 as u64;
18021
18022#[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"]
18023pub const MAX_INLINE_ATTRIBUTE_VALUE: u64 = 32768 as u64;
18024
18025#[doc = " The maximum size for passing the SELinux context as an attribute.\n"]
18026pub const MAX_SELINUX_CONTEXT_ATTRIBUTE_LEN: u64 = 256 as u64;
18027
18028#[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"]
18030#[derive(PartialEq, Debug)]
18031pub struct DirectoryWatcher;
18032
18033#[cfg(target_os = "fuchsia")]
18034impl ::fidl_next::HasTransport for DirectoryWatcher {
18035 type Transport = ::fidl_next::fuchsia::zx::Channel;
18036}
18037
18038pub mod directory_watcher {
18039 pub mod prelude {
18040 pub use crate::{
18041 DirectoryWatcher, DirectoryWatcherClientHandler, DirectoryWatcherLocalClientHandler,
18042 DirectoryWatcherLocalServerHandler, DirectoryWatcherServerHandler, directory_watcher,
18043 };
18044 }
18045
18046 mod ___detail {
18047 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirectoryWatcher
18048 where
18049 ___T: ::fidl_next::Transport,
18050 {
18051 type Client = DirectoryWatcherClient<___T>;
18052 type Server = DirectoryWatcherServer<___T>;
18053 }
18054
18055 #[repr(transparent)]
18057 pub struct DirectoryWatcherClient<___T: ::fidl_next::Transport> {
18058 #[allow(dead_code)]
18059 client: ::fidl_next::protocol::Client<___T>,
18060 }
18061
18062 impl<___T> DirectoryWatcherClient<___T> where ___T: ::fidl_next::Transport {}
18063
18064 #[repr(transparent)]
18066 pub struct DirectoryWatcherServer<___T: ::fidl_next::Transport> {
18067 server: ::fidl_next::protocol::Server<___T>,
18068 }
18069
18070 impl<___T> DirectoryWatcherServer<___T> where ___T: ::fidl_next::Transport {}
18071 }
18072}
18073
18074#[diagnostic::on_unimplemented(
18075 note = "If {Self} implements the non-local DirectoryWatcherClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18076)]
18077
18078pub trait DirectoryWatcherLocalClientHandler<
18082 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18083 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18084>
18085{
18086}
18087
18088impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirectoryWatcher
18089where
18090 ___H: DirectoryWatcherLocalClientHandler<___T>,
18091 ___T: ::fidl_next::Transport,
18092{
18093 async fn on_event(
18094 handler: &mut ___H,
18095 mut message: ::fidl_next::Message<___T>,
18096 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18097 match *message.header().ordinal {
18098 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18099 }
18100 }
18101}
18102
18103#[diagnostic::on_unimplemented(
18104 note = "If {Self} implements the non-local DirectoryWatcherServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18105)]
18106
18107pub trait DirectoryWatcherLocalServerHandler<
18111 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18112 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18113>
18114{
18115}
18116
18117impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirectoryWatcher
18118where
18119 ___H: DirectoryWatcherLocalServerHandler<___T>,
18120 ___T: ::fidl_next::Transport,
18121{
18122 async fn on_one_way(
18123 handler: &mut ___H,
18124 mut message: ::fidl_next::Message<___T>,
18125 ) -> ::core::result::Result<
18126 (),
18127 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18128 > {
18129 match *message.header().ordinal {
18130 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18131 }
18132 }
18133
18134 async fn on_two_way(
18135 handler: &mut ___H,
18136 mut message: ::fidl_next::Message<___T>,
18137 responder: ::fidl_next::protocol::Responder<___T>,
18138 ) -> ::core::result::Result<
18139 (),
18140 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18141 > {
18142 match *message.header().ordinal {
18143 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18144 }
18145 }
18146}
18147
18148pub trait DirectoryWatcherClientHandler<
18152 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18153 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18154>
18155{
18156}
18157
18158impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryWatcher
18159where
18160 ___H: DirectoryWatcherClientHandler<___T> + ::core::marker::Send,
18161 ___T: ::fidl_next::Transport,
18162{
18163 async fn on_event(
18164 handler: &mut ___H,
18165 mut message: ::fidl_next::Message<___T>,
18166 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18167 match *message.header().ordinal {
18168 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18169 }
18170 }
18171}
18172
18173pub trait DirectoryWatcherServerHandler<
18177 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18178 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18179>
18180{
18181}
18182
18183impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryWatcher
18184where
18185 ___H: DirectoryWatcherServerHandler<___T> + ::core::marker::Send,
18186 ___T: ::fidl_next::Transport,
18187{
18188 async fn on_one_way(
18189 handler: &mut ___H,
18190 mut message: ::fidl_next::Message<___T>,
18191 ) -> ::core::result::Result<
18192 (),
18193 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18194 > {
18195 match *message.header().ordinal {
18196 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18197 }
18198 }
18199
18200 async fn on_two_way(
18201 handler: &mut ___H,
18202 mut message: ::fidl_next::Message<___T>,
18203 responder: ::fidl_next::protocol::Responder<___T>,
18204 ) -> ::core::result::Result<
18205 (),
18206 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18207 > {
18208 match *message.header().ordinal {
18209 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18210 }
18211 }
18212}
18213
18214impl<___T> DirectoryWatcherClientHandler<___T> for ::fidl_next::IgnoreEvents where
18215 ___T: ::fidl_next::Transport
18216{
18217}
18218
18219impl<___H, ___T> DirectoryWatcherLocalClientHandler<___T> for ::fidl_next::Local<___H>
18220where
18221 ___H: DirectoryWatcherClientHandler<___T>,
18222 ___T: ::fidl_next::Transport,
18223{
18224}
18225
18226impl<___H, ___T> DirectoryWatcherLocalServerHandler<___T> for ::fidl_next::Local<___H>
18227where
18228 ___H: DirectoryWatcherServerHandler<___T>,
18229 ___T: ::fidl_next::Transport,
18230{
18231}
18232
18233#[doc = " The maximum size of a chunk in the ListExtendedAttributes iterator.\n"]
18234pub const MAX_LIST_ATTRIBUTES_CHUNK: u64 = 128 as u64;
18235
18236#[derive(PartialEq, Debug)]
18238pub struct ExtendedAttributeIterator;
18239
18240#[cfg(target_os = "fuchsia")]
18241impl ::fidl_next::HasTransport for ExtendedAttributeIterator {
18242 type Transport = ::fidl_next::fuchsia::zx::Channel;
18243}
18244
18245pub mod extended_attribute_iterator {
18246 pub mod prelude {
18247 pub use crate::{
18248 ExtendedAttributeIterator, ExtendedAttributeIteratorClientHandler,
18249 ExtendedAttributeIteratorLocalClientHandler,
18250 ExtendedAttributeIteratorLocalServerHandler, ExtendedAttributeIteratorServerHandler,
18251 extended_attribute_iterator,
18252 };
18253
18254 pub use crate::natural::ExtendedAttributeIteratorGetNextResponse;
18255 }
18256
18257 pub struct GetNext;
18258
18259 impl ::fidl_next::Method for GetNext {
18260 const ORDINAL: u64 = 268639596268373415;
18261 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18262 ::fidl_next::protocol::Flexibility::Strict;
18263
18264 type Protocol = crate::ExtendedAttributeIterator;
18265
18266 type Request = ::fidl_next::wire::EmptyMessageBody;
18267 }
18268
18269 impl ::fidl_next::TwoWayMethod for GetNext {
18270 type Response = ::fidl_next::wire::Result<
18271 'static,
18272 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
18273 ::fidl_next::wire::fuchsia::Status,
18274 >;
18275 }
18276
18277 impl<___R> ::fidl_next::Respond<___R> for GetNext {
18278 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18279
18280 fn respond(response: ___R) -> Self::Output {
18281 ::core::result::Result::Ok(response)
18282 }
18283 }
18284
18285 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
18286 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18287
18288 fn respond_err(response: ___R) -> Self::Output {
18289 ::core::result::Result::Err(response)
18290 }
18291 }
18292
18293 mod ___detail {
18294 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ExtendedAttributeIterator
18295 where
18296 ___T: ::fidl_next::Transport,
18297 {
18298 type Client = ExtendedAttributeIteratorClient<___T>;
18299 type Server = ExtendedAttributeIteratorServer<___T>;
18300 }
18301
18302 #[repr(transparent)]
18304 pub struct ExtendedAttributeIteratorClient<___T: ::fidl_next::Transport> {
18305 #[allow(dead_code)]
18306 client: ::fidl_next::protocol::Client<___T>,
18307 }
18308
18309 impl<___T> ExtendedAttributeIteratorClient<___T>
18310 where
18311 ___T: ::fidl_next::Transport,
18312 {
18313 #[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"]
18314 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
18315 ::fidl_next::TwoWayFuture::from_untyped(
18316 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18317 268639596268373415,
18318 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
18319 (),
18320 ),
18321 )
18322 }
18323 }
18324
18325 #[repr(transparent)]
18327 pub struct ExtendedAttributeIteratorServer<___T: ::fidl_next::Transport> {
18328 server: ::fidl_next::protocol::Server<___T>,
18329 }
18330
18331 impl<___T> ExtendedAttributeIteratorServer<___T> where ___T: ::fidl_next::Transport {}
18332 }
18333}
18334
18335#[diagnostic::on_unimplemented(
18336 note = "If {Self} implements the non-local ExtendedAttributeIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18337)]
18338
18339pub trait ExtendedAttributeIteratorLocalClientHandler<
18343 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18344 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18345>
18346{
18347}
18348
18349impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ExtendedAttributeIterator
18350where
18351 ___H: ExtendedAttributeIteratorLocalClientHandler<___T>,
18352 ___T: ::fidl_next::Transport,
18353{
18354 async fn on_event(
18355 handler: &mut ___H,
18356 mut message: ::fidl_next::Message<___T>,
18357 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18358 match *message.header().ordinal {
18359 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18360 }
18361 }
18362}
18363
18364#[diagnostic::on_unimplemented(
18365 note = "If {Self} implements the non-local ExtendedAttributeIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18366)]
18367
18368pub trait ExtendedAttributeIteratorLocalServerHandler<
18372 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18373 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18374>
18375{
18376 #[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"]
18377 fn get_next(
18378 &mut self,
18379
18380 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18381 ) -> impl ::core::future::Future<Output = ()>;
18382}
18383
18384impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ExtendedAttributeIterator
18385where
18386 ___H: ExtendedAttributeIteratorLocalServerHandler<___T>,
18387 ___T: ::fidl_next::Transport,
18388{
18389 async fn on_one_way(
18390 handler: &mut ___H,
18391 mut message: ::fidl_next::Message<___T>,
18392 ) -> ::core::result::Result<
18393 (),
18394 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18395 > {
18396 match *message.header().ordinal {
18397 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18398 }
18399 }
18400
18401 async fn on_two_way(
18402 handler: &mut ___H,
18403 mut message: ::fidl_next::Message<___T>,
18404 responder: ::fidl_next::protocol::Responder<___T>,
18405 ) -> ::core::result::Result<
18406 (),
18407 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18408 > {
18409 match *message.header().ordinal {
18410 268639596268373415 => {
18411 let responder = ::fidl_next::Responder::from_untyped(responder);
18412
18413 handler.get_next(responder).await;
18414 Ok(())
18415 }
18416
18417 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18418 }
18419 }
18420}
18421
18422pub trait ExtendedAttributeIteratorClientHandler<
18426 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18427 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18428>
18429{
18430}
18431
18432impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExtendedAttributeIterator
18433where
18434 ___H: ExtendedAttributeIteratorClientHandler<___T> + ::core::marker::Send,
18435 ___T: ::fidl_next::Transport,
18436{
18437 async fn on_event(
18438 handler: &mut ___H,
18439 mut message: ::fidl_next::Message<___T>,
18440 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18441 match *message.header().ordinal {
18442 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18443 }
18444 }
18445}
18446
18447pub trait ExtendedAttributeIteratorServerHandler<
18451 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18452 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18453>
18454{
18455 #[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"]
18456 fn get_next(
18457 &mut self,
18458
18459 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18460 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18461}
18462
18463impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExtendedAttributeIterator
18464where
18465 ___H: ExtendedAttributeIteratorServerHandler<___T> + ::core::marker::Send,
18466 ___T: ::fidl_next::Transport,
18467{
18468 async fn on_one_way(
18469 handler: &mut ___H,
18470 mut message: ::fidl_next::Message<___T>,
18471 ) -> ::core::result::Result<
18472 (),
18473 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18474 > {
18475 match *message.header().ordinal {
18476 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18477 }
18478 }
18479
18480 async fn on_two_way(
18481 handler: &mut ___H,
18482 mut message: ::fidl_next::Message<___T>,
18483 responder: ::fidl_next::protocol::Responder<___T>,
18484 ) -> ::core::result::Result<
18485 (),
18486 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18487 > {
18488 match *message.header().ordinal {
18489 268639596268373415 => {
18490 let responder = ::fidl_next::Responder::from_untyped(responder);
18491
18492 handler.get_next(responder).await;
18493 Ok(())
18494 }
18495
18496 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18497 }
18498 }
18499}
18500
18501impl<___T> ExtendedAttributeIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents where
18502 ___T: ::fidl_next::Transport
18503{
18504}
18505
18506impl<___H, ___T> ExtendedAttributeIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
18507where
18508 ___H: ExtendedAttributeIteratorClientHandler<___T>,
18509 ___T: ::fidl_next::Transport,
18510{
18511}
18512
18513impl<___H, ___T> ExtendedAttributeIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
18514where
18515 ___H: ExtendedAttributeIteratorServerHandler<___T>,
18516 ___T: ::fidl_next::Transport,
18517{
18518 async fn get_next(
18519 &mut self,
18520
18521 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18522 ) {
18523 ___H::get_next(&mut self.0, responder).await
18524 }
18525}
18526
18527pub const FILE_PROTOCOL_NAME: &str = "fuchsia.io/File";
18528
18529#[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"]
18530pub const FLAG_TEMPORARY_AS_NOT_LINKABLE: crate::natural::Flags =
18531 crate::natural::Flags::FLAG_MUST_CREATE;
18532
18533#[doc = " The maximum I/O size that is allowed for read/write operations using\n byte vectors.\n"]
18534pub const MAX_TRANSFER_SIZE: u64 = 8192 as u64;
18535
18536#[derive(PartialEq, Debug)]
18538pub struct Readable;
18539
18540#[cfg(target_os = "fuchsia")]
18541impl ::fidl_next::HasTransport for Readable {
18542 type Transport = ::fidl_next::fuchsia::zx::Channel;
18543}
18544
18545pub mod readable {
18546 pub mod prelude {
18547 pub use crate::{
18548 Readable, ReadableClientHandler, ReadableLocalClientHandler,
18549 ReadableLocalServerHandler, ReadableServerHandler, readable,
18550 };
18551
18552 pub use crate::natural::ReadableReadRequest;
18553
18554 pub use crate::natural::ReadableReadResponse;
18555 }
18556
18557 pub struct Read;
18558
18559 impl ::fidl_next::Method for Read {
18560 const ORDINAL: u64 = 395825947633028830;
18561 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18562 ::fidl_next::protocol::Flexibility::Strict;
18563
18564 type Protocol = crate::Readable;
18565
18566 type Request = crate::wire::ReadableReadRequest;
18567 }
18568
18569 impl ::fidl_next::TwoWayMethod for Read {
18570 type Response = ::fidl_next::wire::Result<
18571 'static,
18572 crate::wire::ReadableReadResponse<'static>,
18573 ::fidl_next::wire::fuchsia::Status,
18574 >;
18575 }
18576
18577 impl<___R> ::fidl_next::Respond<___R> for Read {
18578 type Output = ::core::result::Result<
18579 crate::generic::ReadableReadResponse<___R>,
18580 ::fidl_next::never::Never,
18581 >;
18582
18583 fn respond(response: ___R) -> Self::Output {
18584 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
18585 }
18586 }
18587
18588 impl<___R> ::fidl_next::RespondErr<___R> for Read {
18589 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18590
18591 fn respond_err(response: ___R) -> Self::Output {
18592 ::core::result::Result::Err(response)
18593 }
18594 }
18595
18596 mod ___detail {
18597 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Readable
18598 where
18599 ___T: ::fidl_next::Transport,
18600 {
18601 type Client = ReadableClient<___T>;
18602 type Server = ReadableServer<___T>;
18603 }
18604
18605 #[repr(transparent)]
18607 pub struct ReadableClient<___T: ::fidl_next::Transport> {
18608 #[allow(dead_code)]
18609 client: ::fidl_next::protocol::Client<___T>,
18610 }
18611
18612 impl<___T> ReadableClient<___T>
18613 where
18614 ___T: ::fidl_next::Transport,
18615 {
18616 #[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"]
18617 pub fn read(
18618 &self,
18619
18620 count: impl ::fidl_next::Encode<
18621 ::fidl_next::wire::Uint64,
18622 <___T as ::fidl_next::Transport>::SendBuffer,
18623 >,
18624 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
18625 where
18626 <___T as ::fidl_next::Transport>::SendBuffer:
18627 ::fidl_next::encoder::InternalHandleEncoder,
18628 {
18629 self.read_with(crate::generic::ReadableReadRequest { count })
18630 }
18631
18632 #[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"]
18633 pub fn read_with<___R>(
18634 &self,
18635 request: ___R,
18636 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
18637 where
18638 ___R: ::fidl_next::Encode<
18639 crate::wire::ReadableReadRequest,
18640 <___T as ::fidl_next::Transport>::SendBuffer,
18641 >,
18642 {
18643 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18644 395825947633028830,
18645 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
18646 request,
18647 ))
18648 }
18649 }
18650
18651 #[repr(transparent)]
18653 pub struct ReadableServer<___T: ::fidl_next::Transport> {
18654 server: ::fidl_next::protocol::Server<___T>,
18655 }
18656
18657 impl<___T> ReadableServer<___T> where ___T: ::fidl_next::Transport {}
18658 }
18659}
18660
18661#[diagnostic::on_unimplemented(
18662 note = "If {Self} implements the non-local ReadableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18663)]
18664
18665pub trait ReadableLocalClientHandler<
18669 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18670 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18671>
18672{
18673}
18674
18675impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Readable
18676where
18677 ___H: ReadableLocalClientHandler<___T>,
18678 ___T: ::fidl_next::Transport,
18679{
18680 async fn on_event(
18681 handler: &mut ___H,
18682 mut message: ::fidl_next::Message<___T>,
18683 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18684 match *message.header().ordinal {
18685 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18686 }
18687 }
18688}
18689
18690#[diagnostic::on_unimplemented(
18691 note = "If {Self} implements the non-local ReadableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18692)]
18693
18694pub trait ReadableLocalServerHandler<
18698 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18699 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18700>
18701{
18702 #[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"]
18703 fn read(
18704 &mut self,
18705
18706 request: ::fidl_next::Request<readable::Read, ___T>,
18707
18708 responder: ::fidl_next::Responder<readable::Read, ___T>,
18709 ) -> impl ::core::future::Future<Output = ()>;
18710}
18711
18712impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Readable
18713where
18714 ___H: ReadableLocalServerHandler<___T>,
18715 ___T: ::fidl_next::Transport,
18716 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
18717 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18718 Constraint = (),
18719 >,
18720{
18721 async fn on_one_way(
18722 handler: &mut ___H,
18723 mut message: ::fidl_next::Message<___T>,
18724 ) -> ::core::result::Result<
18725 (),
18726 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18727 > {
18728 match *message.header().ordinal {
18729 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18730 }
18731 }
18732
18733 async fn on_two_way(
18734 handler: &mut ___H,
18735 mut message: ::fidl_next::Message<___T>,
18736 responder: ::fidl_next::protocol::Responder<___T>,
18737 ) -> ::core::result::Result<
18738 (),
18739 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18740 > {
18741 match *message.header().ordinal {
18742 395825947633028830 => {
18743 let responder = ::fidl_next::Responder::from_untyped(responder);
18744
18745 match ::fidl_next::AsDecoderExt::into_decoded(message) {
18746 Ok(decoded) => {
18747 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
18748 Ok(())
18749 }
18750 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18751 ordinal: 395825947633028830,
18752 error,
18753 }),
18754 }
18755 }
18756
18757 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18758 }
18759 }
18760}
18761
18762pub trait ReadableClientHandler<
18766 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18767 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18768>
18769{
18770}
18771
18772impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Readable
18773where
18774 ___H: ReadableClientHandler<___T> + ::core::marker::Send,
18775 ___T: ::fidl_next::Transport,
18776{
18777 async fn on_event(
18778 handler: &mut ___H,
18779 mut message: ::fidl_next::Message<___T>,
18780 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18781 match *message.header().ordinal {
18782 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18783 }
18784 }
18785}
18786
18787pub trait ReadableServerHandler<
18791 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18792 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18793>
18794{
18795 #[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"]
18796 fn read(
18797 &mut self,
18798
18799 request: ::fidl_next::Request<readable::Read, ___T>,
18800
18801 responder: ::fidl_next::Responder<readable::Read, ___T>,
18802 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18803}
18804
18805impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Readable
18806where
18807 ___H: ReadableServerHandler<___T> + ::core::marker::Send,
18808 ___T: ::fidl_next::Transport,
18809 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
18810 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18811 Constraint = (),
18812 >,
18813{
18814 async fn on_one_way(
18815 handler: &mut ___H,
18816 mut message: ::fidl_next::Message<___T>,
18817 ) -> ::core::result::Result<
18818 (),
18819 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18820 > {
18821 match *message.header().ordinal {
18822 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18823 }
18824 }
18825
18826 async fn on_two_way(
18827 handler: &mut ___H,
18828 mut message: ::fidl_next::Message<___T>,
18829 responder: ::fidl_next::protocol::Responder<___T>,
18830 ) -> ::core::result::Result<
18831 (),
18832 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18833 > {
18834 match *message.header().ordinal {
18835 395825947633028830 => {
18836 let responder = ::fidl_next::Responder::from_untyped(responder);
18837
18838 match ::fidl_next::AsDecoderExt::into_decoded(message) {
18839 Ok(decoded) => {
18840 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
18841 Ok(())
18842 }
18843 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18844 ordinal: 395825947633028830,
18845 error,
18846 }),
18847 }
18848 }
18849
18850 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18851 }
18852 }
18853}
18854
18855impl<___T> ReadableClientHandler<___T> for ::fidl_next::IgnoreEvents where
18856 ___T: ::fidl_next::Transport
18857{
18858}
18859
18860impl<___H, ___T> ReadableLocalClientHandler<___T> for ::fidl_next::Local<___H>
18861where
18862 ___H: ReadableClientHandler<___T>,
18863 ___T: ::fidl_next::Transport,
18864{
18865}
18866
18867impl<___H, ___T> ReadableLocalServerHandler<___T> for ::fidl_next::Local<___H>
18868where
18869 ___H: ReadableServerHandler<___T>,
18870 ___T: ::fidl_next::Transport,
18871{
18872 async fn read(
18873 &mut self,
18874
18875 request: ::fidl_next::Request<readable::Read, ___T>,
18876
18877 responder: ::fidl_next::Responder<readable::Read, ___T>,
18878 ) {
18879 ___H::read(&mut self.0, request, responder).await
18880 }
18881}
18882
18883#[derive(PartialEq, Debug)]
18885pub struct Writable;
18886
18887#[cfg(target_os = "fuchsia")]
18888impl ::fidl_next::HasTransport for Writable {
18889 type Transport = ::fidl_next::fuchsia::zx::Channel;
18890}
18891
18892pub mod writable {
18893 pub mod prelude {
18894 pub use crate::{
18895 Writable, WritableClientHandler, WritableLocalClientHandler,
18896 WritableLocalServerHandler, WritableServerHandler, writable,
18897 };
18898
18899 pub use crate::natural::WritableWriteRequest;
18900
18901 pub use crate::natural::WritableWriteResponse;
18902 }
18903
18904 pub struct Write;
18905
18906 impl ::fidl_next::Method for Write {
18907 const ORDINAL: u64 = 7651971425397809026;
18908 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18909 ::fidl_next::protocol::Flexibility::Strict;
18910
18911 type Protocol = crate::Writable;
18912
18913 type Request = crate::wire::WritableWriteRequest<'static>;
18914 }
18915
18916 impl ::fidl_next::TwoWayMethod for Write {
18917 type Response = ::fidl_next::wire::Result<
18918 'static,
18919 crate::wire::WritableWriteResponse,
18920 ::fidl_next::wire::fuchsia::Status,
18921 >;
18922 }
18923
18924 impl<___R> ::fidl_next::Respond<___R> for Write {
18925 type Output = ::core::result::Result<
18926 crate::generic::WritableWriteResponse<___R>,
18927 ::fidl_next::never::Never,
18928 >;
18929
18930 fn respond(response: ___R) -> Self::Output {
18931 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
18932 actual_count: response,
18933 })
18934 }
18935 }
18936
18937 impl<___R> ::fidl_next::RespondErr<___R> for Write {
18938 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18939
18940 fn respond_err(response: ___R) -> Self::Output {
18941 ::core::result::Result::Err(response)
18942 }
18943 }
18944
18945 mod ___detail {
18946 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Writable
18947 where
18948 ___T: ::fidl_next::Transport,
18949 {
18950 type Client = WritableClient<___T>;
18951 type Server = WritableServer<___T>;
18952 }
18953
18954 #[repr(transparent)]
18956 pub struct WritableClient<___T: ::fidl_next::Transport> {
18957 #[allow(dead_code)]
18958 client: ::fidl_next::protocol::Client<___T>,
18959 }
18960
18961 impl<___T> WritableClient<___T>
18962 where
18963 ___T: ::fidl_next::Transport,
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 pub fn write(
18967 &self,
18968
18969 data: impl ::fidl_next::Encode<
18970 ::fidl_next::wire::Vector<'static, u8>,
18971 <___T as ::fidl_next::Transport>::SendBuffer,
18972 >,
18973 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
18974 where
18975 <___T as ::fidl_next::Transport>::SendBuffer:
18976 ::fidl_next::encoder::InternalHandleEncoder,
18977 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18978 {
18979 self.write_with(crate::generic::WritableWriteRequest { data })
18980 }
18981
18982 #[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"]
18983 pub fn write_with<___R>(
18984 &self,
18985 request: ___R,
18986 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
18987 where
18988 ___R: ::fidl_next::Encode<
18989 crate::wire::WritableWriteRequest<'static>,
18990 <___T as ::fidl_next::Transport>::SendBuffer,
18991 >,
18992 {
18993 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18994 7651971425397809026,
18995 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
18996 request,
18997 ))
18998 }
18999 }
19000
19001 #[repr(transparent)]
19003 pub struct WritableServer<___T: ::fidl_next::Transport> {
19004 server: ::fidl_next::protocol::Server<___T>,
19005 }
19006
19007 impl<___T> WritableServer<___T> where ___T: ::fidl_next::Transport {}
19008 }
19009}
19010
19011#[diagnostic::on_unimplemented(
19012 note = "If {Self} implements the non-local WritableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
19013)]
19014
19015pub trait WritableLocalClientHandler<
19019 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19020 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19021>
19022{
19023}
19024
19025impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Writable
19026where
19027 ___H: WritableLocalClientHandler<___T>,
19028 ___T: ::fidl_next::Transport,
19029{
19030 async fn on_event(
19031 handler: &mut ___H,
19032 mut message: ::fidl_next::Message<___T>,
19033 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19034 match *message.header().ordinal {
19035 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19036 }
19037 }
19038}
19039
19040#[diagnostic::on_unimplemented(
19041 note = "If {Self} implements the non-local WritableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
19042)]
19043
19044pub trait WritableLocalServerHandler<
19048 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19049 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19050>
19051{
19052 #[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"]
19053 fn write(
19054 &mut self,
19055
19056 request: ::fidl_next::Request<writable::Write, ___T>,
19057
19058 responder: ::fidl_next::Responder<writable::Write, ___T>,
19059 ) -> impl ::core::future::Future<Output = ()>;
19060}
19061
19062impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Writable
19063where
19064 ___H: WritableLocalServerHandler<___T>,
19065 ___T: ::fidl_next::Transport,
19066 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
19067 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19068 Constraint = (),
19069 >,
19070{
19071 async fn on_one_way(
19072 handler: &mut ___H,
19073 mut message: ::fidl_next::Message<___T>,
19074 ) -> ::core::result::Result<
19075 (),
19076 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19077 > {
19078 match *message.header().ordinal {
19079 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19080 }
19081 }
19082
19083 async fn on_two_way(
19084 handler: &mut ___H,
19085 mut message: ::fidl_next::Message<___T>,
19086 responder: ::fidl_next::protocol::Responder<___T>,
19087 ) -> ::core::result::Result<
19088 (),
19089 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19090 > {
19091 match *message.header().ordinal {
19092 7651971425397809026 => {
19093 let responder = ::fidl_next::Responder::from_untyped(responder);
19094
19095 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19096 Ok(decoded) => {
19097 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
19098 Ok(())
19099 }
19100 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19101 ordinal: 7651971425397809026,
19102 error,
19103 }),
19104 }
19105 }
19106
19107 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19108 }
19109 }
19110}
19111
19112pub trait WritableClientHandler<
19116 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19117 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19118>
19119{
19120}
19121
19122impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Writable
19123where
19124 ___H: WritableClientHandler<___T> + ::core::marker::Send,
19125 ___T: ::fidl_next::Transport,
19126{
19127 async fn on_event(
19128 handler: &mut ___H,
19129 mut message: ::fidl_next::Message<___T>,
19130 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19131 match *message.header().ordinal {
19132 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19133 }
19134 }
19135}
19136
19137pub trait WritableServerHandler<
19141 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19142 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19143>
19144{
19145 #[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"]
19146 fn write(
19147 &mut self,
19148
19149 request: ::fidl_next::Request<writable::Write, ___T>,
19150
19151 responder: ::fidl_next::Responder<writable::Write, ___T>,
19152 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19153}
19154
19155impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Writable
19156where
19157 ___H: WritableServerHandler<___T> + ::core::marker::Send,
19158 ___T: ::fidl_next::Transport,
19159 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
19160 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19161 Constraint = (),
19162 >,
19163{
19164 async fn on_one_way(
19165 handler: &mut ___H,
19166 mut message: ::fidl_next::Message<___T>,
19167 ) -> ::core::result::Result<
19168 (),
19169 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19170 > {
19171 match *message.header().ordinal {
19172 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19173 }
19174 }
19175
19176 async fn on_two_way(
19177 handler: &mut ___H,
19178 mut message: ::fidl_next::Message<___T>,
19179 responder: ::fidl_next::protocol::Responder<___T>,
19180 ) -> ::core::result::Result<
19181 (),
19182 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19183 > {
19184 match *message.header().ordinal {
19185 7651971425397809026 => {
19186 let responder = ::fidl_next::Responder::from_untyped(responder);
19187
19188 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19189 Ok(decoded) => {
19190 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
19191 Ok(())
19192 }
19193 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19194 ordinal: 7651971425397809026,
19195 error,
19196 }),
19197 }
19198 }
19199
19200 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19201 }
19202 }
19203}
19204
19205impl<___T> WritableClientHandler<___T> for ::fidl_next::IgnoreEvents where
19206 ___T: ::fidl_next::Transport
19207{
19208}
19209
19210impl<___H, ___T> WritableLocalClientHandler<___T> for ::fidl_next::Local<___H>
19211where
19212 ___H: WritableClientHandler<___T>,
19213 ___T: ::fidl_next::Transport,
19214{
19215}
19216
19217impl<___H, ___T> WritableLocalServerHandler<___T> for ::fidl_next::Local<___H>
19218where
19219 ___H: WritableServerHandler<___T>,
19220 ___T: ::fidl_next::Transport,
19221{
19222 async fn write(
19223 &mut self,
19224
19225 request: ::fidl_next::Request<writable::Write, ___T>,
19226
19227 responder: ::fidl_next::Responder<writable::Write, ___T>,
19228 ) {
19229 ___H::write(&mut self.0, request, responder).await
19230 }
19231}
19232
19233pub const MAX_FS_NAME_BUFFER: u64 = 32 as u64;
19234
19235#[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"]
19236pub const INHERITED_WRITE_PERMISSIONS: crate::natural::Operations =
19237 crate::natural::Operations::from_bits_retain(356);
19238
19239#[doc = " Nodes which do not have ino values should return this value\n from Readdir and GetAttr.\n"]
19240pub const INO_UNKNOWN: u64 = 18446744073709551615 as u64;
19241
19242pub const MASK_KNOWN_PERMISSIONS: crate::natural::Flags =
19243 crate::natural::Flags::from_bits_retain(25087);
19244
19245pub const MASK_KNOWN_PROTOCOLS: crate::natural::Flags =
19246 crate::natural::Flags::from_bits_retain(30069489664);
19247
19248pub const MASK_PERMISSION_FLAGS: u64 = 65535 as u64;
19249
19250pub const MASK_POSIX_FLAGS: u64 = 4294967295 as u64;
19251
19252#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
19253pub const MAX_FILENAME: u64 = 255 as u64;
19254
19255pub const NODE_PROTOCOL_NAME: &str = "fuchsia.io/Node";
19256
19257#[doc = " Flags used when opening a node reference must fall within this mask.\n"]
19258pub const OPEN_FLAGS_ALLOWED_WITH_NODE_REFERENCE: crate::natural::OpenFlags =
19259 crate::natural::OpenFlags::from_bits_retain(46661632);
19260
19261#[doc = " All known rights.\n"]
19262pub const OPEN_RIGHTS: crate::natural::OpenFlags = crate::natural::OpenFlags::from_bits_retain(11);
19263
19264#[doc = " Set of permissions that are expected when opening a node as executable.\n"]
19265pub const PERM_EXECUTABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(201);
19266
19267#[doc = " Set of permissions that are expected when opening a node as readable.\n"]
19268pub const PERM_READABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(211);
19269
19270#[doc = " Set of permissions that are expected when opening a node as writable.\n"]
19271pub const PERM_WRITABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(485);
19272
19273#[doc = " Alias for directory permission alias rw*\n"]
19274pub const RW_STAR_DIR: crate::natural::Operations =
19275 crate::natural::Operations::from_bits_retain(503);
19276
19277#[doc = " Alias for directory permission alias rx*\n"]
19278pub const RX_STAR_DIR: crate::natural::Operations =
19279 crate::natural::Operations::from_bits_retain(219);
19280
19281#[doc = " Alias for directory permission alias r*\n"]
19282pub const R_STAR_DIR: crate::natural::Operations =
19283 crate::natural::Operations::from_bits_retain(211);
19284
19285#[doc = " The name of the extended attribute accessible via the SELinux context attribute.\n"]
19286pub const SELINUX_CONTEXT_NAME: &str = "security.selinux";
19287
19288pub const SYMLINK_PROTOCOL_NAME: &str = "fuchsia.io/Symlink";
19289
19290#[doc = " Alias for directory permission alias w*\n"]
19291pub const W_STAR_DIR: crate::natural::Operations =
19292 crate::natural::Operations::from_bits_retain(485);
19293
19294#[doc = " Alias for directory permission alias x*\n"]
19295pub const X_STAR_DIR: crate::natural::Operations =
19296 crate::natural::Operations::from_bits_retain(201);