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.\n\n Note: It is recommended to pair this with [`Rights.ENUMERATE`] (directory contents can be\n probed by opening children), e.g. by using [`PERM_READABLE`]. If strict isolation\n is required, consider routing discrete capabilities instead.\n"]const TRAVERSE = 128;
17 #[doc = " Modifying the list of nodes in a directory, e.g. creating, renaming, link/unlink, etc...\n\n Note: It is recommended to pair this with [`Rights.ENUMERATE`] (directory contents can be\n probed via name conflicts during node creation), e.g. by using [`PERM_WRITABLE`]. If\n strict isolation is required, consider routing discrete capabilities instead.\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: ::core::result::Result<(), ::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: ::core::result::Result<(), ::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: ::core::result::Result<(), ::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
1862
1863 && <
1864 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
1865 >::COPY_OPTIMIZATION.is_enabled()
1866
1867 )
1868 };
1869
1870 #[inline]
1871 fn encode(
1872 self,
1873 encoder_: &mut ___E,
1874 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
1875 _: (),
1876 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1877 ::fidl_next::munge! {
1878 let crate::wire::DirectoryRewindResponse {
1879 s,
1880
1881 } = out_;
1882 }
1883
1884 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1885
1886 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1887
1888 Ok(())
1889 }
1890 }
1891
1892 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
1893 for &'a DirectoryRewindResponse
1894 where
1895 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1896 {
1897 #[inline]
1898 fn encode(
1899 self,
1900 encoder_: &mut ___E,
1901 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
1902 _: (),
1903 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1904 ::fidl_next::munge! {
1905 let crate::wire::DirectoryRewindResponse {
1906 s,
1907
1908 } = out_;
1909 }
1910
1911 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1912
1913 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1914
1915 Ok(())
1916 }
1917 }
1918
1919 unsafe impl<___E>
1920 ::fidl_next::EncodeOption<
1921 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1922 ___E,
1923 > for DirectoryRewindResponse
1924 where
1925 ___E: ::fidl_next::Encoder + ?Sized,
1926 DirectoryRewindResponse: ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
1927 {
1928 #[inline]
1929 fn encode_option(
1930 this: ::core::option::Option<Self>,
1931 encoder: &mut ___E,
1932 out: &mut ::core::mem::MaybeUninit<
1933 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1934 >,
1935 _: (),
1936 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1937 if let Some(inner) = this {
1938 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1939 ::fidl_next::wire::Box::encode_present(out);
1940 } else {
1941 ::fidl_next::wire::Box::encode_absent(out);
1942 }
1943
1944 Ok(())
1945 }
1946 }
1947
1948 unsafe impl<'a, ___E>
1949 ::fidl_next::EncodeOption<
1950 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1951 ___E,
1952 > for &'a DirectoryRewindResponse
1953 where
1954 ___E: ::fidl_next::Encoder + ?Sized,
1955 &'a DirectoryRewindResponse:
1956 ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
1957 {
1958 #[inline]
1959 fn encode_option(
1960 this: ::core::option::Option<Self>,
1961 encoder: &mut ___E,
1962 out: &mut ::core::mem::MaybeUninit<
1963 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRewindResponse>,
1964 >,
1965 _: (),
1966 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1967 if let Some(inner) = this {
1968 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1969 ::fidl_next::wire::Box::encode_present(out);
1970 } else {
1971 ::fidl_next::wire::Box::encode_absent(out);
1972 }
1973
1974 Ok(())
1975 }
1976 }
1977
1978 impl ::fidl_next::FromWire<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
1979 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1980 crate::wire::DirectoryRewindResponse,
1981 Self,
1982 > = unsafe {
1983 ::fidl_next::CopyOptimization::enable_if(
1984 true
1985
1986 && <
1987 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
1988 >::COPY_OPTIMIZATION.is_enabled()
1989
1990 )
1991 };
1992
1993 #[inline]
1994 fn from_wire(wire: crate::wire::DirectoryRewindResponse) -> Self {
1995 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
1996 }
1997 }
1998
1999 impl ::fidl_next::FromWireRef<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
2000 #[inline]
2001 fn from_wire_ref(wire: &crate::wire::DirectoryRewindResponse) -> Self {
2002 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2003 }
2004 }
2005
2006 #[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"]
2007 pub type Name = ::std::string::String;
2008
2009 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2010 #[repr(C)]
2011 pub struct DirectoryLinkResponse {
2012 pub s: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
2013 }
2014
2015 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2016 for DirectoryLinkResponse
2017 where
2018 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2019 {
2020 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2021 Self,
2022 crate::wire::DirectoryLinkResponse,
2023 > = unsafe {
2024 ::fidl_next::CopyOptimization::enable_if(
2025 true
2026
2027 && <
2028 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
2029 >::COPY_OPTIMIZATION.is_enabled()
2030
2031 )
2032 };
2033
2034 #[inline]
2035 fn encode(
2036 self,
2037 encoder_: &mut ___E,
2038 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2039 _: (),
2040 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2041 ::fidl_next::munge! {
2042 let crate::wire::DirectoryLinkResponse {
2043 s,
2044
2045 } = out_;
2046 }
2047
2048 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2049
2050 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2051
2052 Ok(())
2053 }
2054 }
2055
2056 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2057 for &'a DirectoryLinkResponse
2058 where
2059 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2060 {
2061 #[inline]
2062 fn encode(
2063 self,
2064 encoder_: &mut ___E,
2065 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2066 _: (),
2067 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2068 ::fidl_next::munge! {
2069 let crate::wire::DirectoryLinkResponse {
2070 s,
2071
2072 } = out_;
2073 }
2074
2075 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2076
2077 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2078
2079 Ok(())
2080 }
2081 }
2082
2083 unsafe impl<___E>
2084 ::fidl_next::EncodeOption<
2085 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2086 ___E,
2087 > for DirectoryLinkResponse
2088 where
2089 ___E: ::fidl_next::Encoder + ?Sized,
2090 DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2091 {
2092 #[inline]
2093 fn encode_option(
2094 this: ::core::option::Option<Self>,
2095 encoder: &mut ___E,
2096 out: &mut ::core::mem::MaybeUninit<
2097 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2098 >,
2099 _: (),
2100 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2101 if let Some(inner) = this {
2102 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2103 ::fidl_next::wire::Box::encode_present(out);
2104 } else {
2105 ::fidl_next::wire::Box::encode_absent(out);
2106 }
2107
2108 Ok(())
2109 }
2110 }
2111
2112 unsafe impl<'a, ___E>
2113 ::fidl_next::EncodeOption<
2114 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2115 ___E,
2116 > for &'a DirectoryLinkResponse
2117 where
2118 ___E: ::fidl_next::Encoder + ?Sized,
2119 &'a DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2120 {
2121 #[inline]
2122 fn encode_option(
2123 this: ::core::option::Option<Self>,
2124 encoder: &mut ___E,
2125 out: &mut ::core::mem::MaybeUninit<
2126 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkResponse>,
2127 >,
2128 _: (),
2129 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2130 if let Some(inner) = this {
2131 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2132 ::fidl_next::wire::Box::encode_present(out);
2133 } else {
2134 ::fidl_next::wire::Box::encode_absent(out);
2135 }
2136
2137 Ok(())
2138 }
2139 }
2140
2141 impl ::fidl_next::FromWire<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2142 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2143 crate::wire::DirectoryLinkResponse,
2144 Self,
2145 > = unsafe {
2146 ::fidl_next::CopyOptimization::enable_if(
2147 true
2148
2149 && <
2150 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
2151 >::COPY_OPTIMIZATION.is_enabled()
2152
2153 )
2154 };
2155
2156 #[inline]
2157 fn from_wire(wire: crate::wire::DirectoryLinkResponse) -> Self {
2158 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2159 }
2160 }
2161
2162 impl ::fidl_next::FromWireRef<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2163 #[inline]
2164 fn from_wire_ref(wire: &crate::wire::DirectoryLinkResponse) -> Self {
2165 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2166 }
2167 }
2168
2169 ::fidl_next::bitflags::bitflags! {
2170 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct UnlinkFlags: u64 {
2171 #[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;
2172 const _ = !0;
2173 }
2174 }
2175
2176 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for UnlinkFlags
2177 where
2178 ___E: ?Sized,
2179 {
2180 #[inline]
2181 fn encode(
2182 self,
2183 encoder: &mut ___E,
2184 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2185 _: (),
2186 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2187 ::fidl_next::Encode::encode(&self, encoder, out, ())
2188 }
2189 }
2190
2191 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for &'a UnlinkFlags
2192 where
2193 ___E: ?Sized,
2194 {
2195 #[inline]
2196 fn encode(
2197 self,
2198 _: &mut ___E,
2199 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2200 _: (),
2201 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2202 ::fidl_next::munge!(let crate::wire::UnlinkFlags { value } = out);
2203
2204 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
2205 Ok(())
2206 }
2207 }
2208
2209 impl ::core::convert::From<crate::wire::UnlinkFlags> for UnlinkFlags {
2210 fn from(wire: crate::wire::UnlinkFlags) -> Self {
2211 Self::from_bits_retain(u64::from(wire.value))
2212 }
2213 }
2214
2215 impl ::fidl_next::FromWire<crate::wire::UnlinkFlags> for UnlinkFlags {
2216 #[inline]
2217 fn from_wire(wire: crate::wire::UnlinkFlags) -> Self {
2218 Self::from(wire)
2219 }
2220 }
2221
2222 impl ::fidl_next::FromWireRef<crate::wire::UnlinkFlags> for UnlinkFlags {
2223 #[inline]
2224 fn from_wire_ref(wire: &crate::wire::UnlinkFlags) -> Self {
2225 Self::from(*wire)
2226 }
2227 }
2228
2229 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2230 pub struct UnlinkOptions {
2231 pub flags: ::core::option::Option<crate::natural::UnlinkFlags>,
2232 }
2233
2234 impl UnlinkOptions {
2235 fn __max_ordinal(&self) -> usize {
2236 if self.flags.is_some() {
2237 return 1;
2238 }
2239
2240 0
2241 }
2242 }
2243
2244 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E> for UnlinkOptions
2245 where
2246 ___E: ::fidl_next::Encoder + ?Sized,
2247 {
2248 #[inline]
2249 fn encode(
2250 mut self,
2251 encoder: &mut ___E,
2252 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2253 _: (),
2254 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2255 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2256
2257 let max_ord = self.__max_ordinal();
2258
2259 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2260 ::fidl_next::Wire::zero_padding(&mut out);
2261
2262 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2263 ::fidl_next::wire::Envelope,
2264 >(encoder, max_ord);
2265
2266 for i in 1..=max_ord {
2267 match i {
2268 1 => {
2269 if let Some(value) = self.flags.take() {
2270 ::fidl_next::wire::Envelope::encode_value::<
2271 crate::wire::UnlinkFlags,
2272 ___E,
2273 >(
2274 value, preallocated.encoder, &mut out, ()
2275 )?;
2276 } else {
2277 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2278 }
2279 }
2280
2281 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2282 }
2283 unsafe {
2284 preallocated.write_next(out.assume_init_ref());
2285 }
2286 }
2287
2288 ::fidl_next::wire::Table::encode_len(table, max_ord);
2289
2290 Ok(())
2291 }
2292 }
2293
2294 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>
2295 for &'a UnlinkOptions
2296 where
2297 ___E: ::fidl_next::Encoder + ?Sized,
2298 {
2299 #[inline]
2300 fn encode(
2301 self,
2302 encoder: &mut ___E,
2303 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2304 _: (),
2305 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2306 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2307
2308 let max_ord = self.__max_ordinal();
2309
2310 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2311 ::fidl_next::Wire::zero_padding(&mut out);
2312
2313 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2314 ::fidl_next::wire::Envelope,
2315 >(encoder, max_ord);
2316
2317 for i in 1..=max_ord {
2318 match i {
2319 1 => {
2320 if let Some(value) = &self.flags {
2321 ::fidl_next::wire::Envelope::encode_value::<
2322 crate::wire::UnlinkFlags,
2323 ___E,
2324 >(
2325 value, preallocated.encoder, &mut out, ()
2326 )?;
2327 } else {
2328 ::fidl_next::wire::Envelope::encode_zero(&mut out)
2329 }
2330 }
2331
2332 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2333 }
2334 unsafe {
2335 preallocated.write_next(out.assume_init_ref());
2336 }
2337 }
2338
2339 ::fidl_next::wire::Table::encode_len(table, max_ord);
2340
2341 Ok(())
2342 }
2343 }
2344
2345 impl<'de> ::fidl_next::FromWire<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2346 #[inline]
2347 fn from_wire(wire_: crate::wire::UnlinkOptions<'de>) -> Self {
2348 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2349
2350 let flags = wire_.table.get(1);
2351
2352 Self {
2353 flags: flags.map(|envelope| {
2354 ::fidl_next::FromWire::from_wire(unsafe {
2355 envelope.read_unchecked::<crate::wire::UnlinkFlags>()
2356 })
2357 }),
2358 }
2359 }
2360 }
2361
2362 impl<'de> ::fidl_next::FromWireRef<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2363 #[inline]
2364 fn from_wire_ref(wire: &crate::wire::UnlinkOptions<'de>) -> Self {
2365 Self {
2366 flags: wire.table.get(1).map(|envelope| {
2367 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2368 envelope.deref_unchecked::<crate::wire::UnlinkFlags>()
2369 })
2370 }),
2371 }
2372 }
2373 }
2374
2375 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2376 pub struct DirectoryUnlinkRequest {
2377 pub name: ::std::string::String,
2378
2379 pub options: crate::natural::UnlinkOptions,
2380 }
2381
2382 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2383 for DirectoryUnlinkRequest
2384 where
2385 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2386 ___E: ::fidl_next::Encoder,
2387 {
2388 #[inline]
2389 fn encode(
2390 self,
2391 encoder_: &mut ___E,
2392 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2393 _: (),
2394 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2395 ::fidl_next::munge! {
2396 let crate::wire::DirectoryUnlinkRequest {
2397 name,
2398 options,
2399
2400 } = out_;
2401 }
2402
2403 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
2404
2405 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2406 ::fidl_next::Constrained::validate(_field, 255)?;
2407
2408 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2409
2410 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2411
2412 Ok(())
2413 }
2414 }
2415
2416 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2417 for &'a DirectoryUnlinkRequest
2418 where
2419 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2420 ___E: ::fidl_next::Encoder,
2421 {
2422 #[inline]
2423 fn encode(
2424 self,
2425 encoder_: &mut ___E,
2426 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2427 _: (),
2428 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2429 ::fidl_next::munge! {
2430 let crate::wire::DirectoryUnlinkRequest {
2431 name,
2432 options,
2433
2434 } = out_;
2435 }
2436
2437 ::fidl_next::Encode::encode(&self.name, encoder_, name, 255)?;
2438
2439 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2440 ::fidl_next::Constrained::validate(_field, 255)?;
2441
2442 ::fidl_next::Encode::encode(&self.options, encoder_, options, ())?;
2443
2444 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2445
2446 Ok(())
2447 }
2448 }
2449
2450 unsafe impl<___E>
2451 ::fidl_next::EncodeOption<
2452 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2453 ___E,
2454 > for DirectoryUnlinkRequest
2455 where
2456 ___E: ::fidl_next::Encoder + ?Sized,
2457 DirectoryUnlinkRequest:
2458 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2459 {
2460 #[inline]
2461 fn encode_option(
2462 this: ::core::option::Option<Self>,
2463 encoder: &mut ___E,
2464 out: &mut ::core::mem::MaybeUninit<
2465 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2466 >,
2467 _: (),
2468 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2469 if let Some(inner) = this {
2470 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2471 ::fidl_next::wire::Box::encode_present(out);
2472 } else {
2473 ::fidl_next::wire::Box::encode_absent(out);
2474 }
2475
2476 Ok(())
2477 }
2478 }
2479
2480 unsafe impl<'a, ___E>
2481 ::fidl_next::EncodeOption<
2482 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2483 ___E,
2484 > for &'a DirectoryUnlinkRequest
2485 where
2486 ___E: ::fidl_next::Encoder + ?Sized,
2487 &'a DirectoryUnlinkRequest:
2488 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2489 {
2490 #[inline]
2491 fn encode_option(
2492 this: ::core::option::Option<Self>,
2493 encoder: &mut ___E,
2494 out: &mut ::core::mem::MaybeUninit<
2495 ::fidl_next::wire::Box<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2496 >,
2497 _: (),
2498 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2499 if let Some(inner) = this {
2500 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2501 ::fidl_next::wire::Box::encode_present(out);
2502 } else {
2503 ::fidl_next::wire::Box::encode_absent(out);
2504 }
2505
2506 Ok(())
2507 }
2508 }
2509
2510 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryUnlinkRequest<'de>>
2511 for DirectoryUnlinkRequest
2512 {
2513 #[inline]
2514 fn from_wire(wire: crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2515 Self {
2516 name: ::fidl_next::FromWire::from_wire(wire.name),
2517
2518 options: ::fidl_next::FromWire::from_wire(wire.options),
2519 }
2520 }
2521 }
2522
2523 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryUnlinkRequest<'de>>
2524 for DirectoryUnlinkRequest
2525 {
2526 #[inline]
2527 fn from_wire_ref(wire: &crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2528 Self {
2529 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
2530
2531 options: ::fidl_next::FromWireRef::from_wire_ref(&wire.options),
2532 }
2533 }
2534 }
2535
2536 pub type DirectoryUnlinkResponse = ();
2537
2538 pub type DirectoryRenameResponse = ();
2539
2540 ::fidl_next::bitflags::bitflags! {
2541 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct WatchMask: u32 {
2542 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.DELETED`.\n"]const DELETED = 1;
2543 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.ADDED`.\n"]const ADDED = 2;
2544 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.REMOVED`.\n"]const REMOVED = 4;
2545 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.EXISTING`.\n"]const EXISTING = 8;
2546 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.IDLE`.\n"]const IDLE = 16;
2547
2548 }
2549 }
2550
2551 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for WatchMask
2552 where
2553 ___E: ?Sized,
2554 {
2555 #[inline]
2556 fn encode(
2557 self,
2558 encoder: &mut ___E,
2559 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
2560 _: (),
2561 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2562 ::fidl_next::Encode::encode(&self, encoder, out, ())
2563 }
2564 }
2565
2566 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for &'a WatchMask
2567 where
2568 ___E: ?Sized,
2569 {
2570 #[inline]
2571 fn encode(
2572 self,
2573 _: &mut ___E,
2574 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
2575 _: (),
2576 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2577 ::fidl_next::munge!(let crate::wire::WatchMask { value } = out);
2578
2579 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
2580 return Err(::fidl_next::EncodeError::InvalidStrictBits);
2581 }
2582
2583 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
2584 Ok(())
2585 }
2586 }
2587
2588 impl ::core::convert::From<crate::wire::WatchMask> for WatchMask {
2589 fn from(wire: crate::wire::WatchMask) -> Self {
2590 Self::from_bits_retain(u32::from(wire.value))
2591 }
2592 }
2593
2594 impl ::fidl_next::FromWire<crate::wire::WatchMask> for WatchMask {
2595 #[inline]
2596 fn from_wire(wire: crate::wire::WatchMask) -> Self {
2597 Self::from(wire)
2598 }
2599 }
2600
2601 impl ::fidl_next::FromWireRef<crate::wire::WatchMask> for WatchMask {
2602 #[inline]
2603 fn from_wire_ref(wire: &crate::wire::WatchMask) -> Self {
2604 Self::from(*wire)
2605 }
2606 }
2607
2608 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2609 #[repr(C)]
2610 pub struct DirectoryWatchResponse {
2611 pub s: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
2612 }
2613
2614 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
2615 for DirectoryWatchResponse
2616 where
2617 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2618 {
2619 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2620 Self,
2621 crate::wire::DirectoryWatchResponse,
2622 > = unsafe {
2623 ::fidl_next::CopyOptimization::enable_if(
2624 true
2625
2626 && <
2627 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
2628 >::COPY_OPTIMIZATION.is_enabled()
2629
2630 )
2631 };
2632
2633 #[inline]
2634 fn encode(
2635 self,
2636 encoder_: &mut ___E,
2637 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
2638 _: (),
2639 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2640 ::fidl_next::munge! {
2641 let crate::wire::DirectoryWatchResponse {
2642 s,
2643
2644 } = out_;
2645 }
2646
2647 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2648
2649 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2650
2651 Ok(())
2652 }
2653 }
2654
2655 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
2656 for &'a DirectoryWatchResponse
2657 where
2658 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2659 {
2660 #[inline]
2661 fn encode(
2662 self,
2663 encoder_: &mut ___E,
2664 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
2665 _: (),
2666 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2667 ::fidl_next::munge! {
2668 let crate::wire::DirectoryWatchResponse {
2669 s,
2670
2671 } = out_;
2672 }
2673
2674 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2675
2676 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2677
2678 Ok(())
2679 }
2680 }
2681
2682 unsafe impl<___E>
2683 ::fidl_next::EncodeOption<
2684 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2685 ___E,
2686 > for DirectoryWatchResponse
2687 where
2688 ___E: ::fidl_next::Encoder + ?Sized,
2689 DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
2690 {
2691 #[inline]
2692 fn encode_option(
2693 this: ::core::option::Option<Self>,
2694 encoder: &mut ___E,
2695 out: &mut ::core::mem::MaybeUninit<
2696 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2697 >,
2698 _: (),
2699 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2700 if let Some(inner) = this {
2701 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2702 ::fidl_next::wire::Box::encode_present(out);
2703 } else {
2704 ::fidl_next::wire::Box::encode_absent(out);
2705 }
2706
2707 Ok(())
2708 }
2709 }
2710
2711 unsafe impl<'a, ___E>
2712 ::fidl_next::EncodeOption<
2713 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2714 ___E,
2715 > for &'a DirectoryWatchResponse
2716 where
2717 ___E: ::fidl_next::Encoder + ?Sized,
2718 &'a DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
2719 {
2720 #[inline]
2721 fn encode_option(
2722 this: ::core::option::Option<Self>,
2723 encoder: &mut ___E,
2724 out: &mut ::core::mem::MaybeUninit<
2725 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchResponse>,
2726 >,
2727 _: (),
2728 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2729 if let Some(inner) = this {
2730 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2731 ::fidl_next::wire::Box::encode_present(out);
2732 } else {
2733 ::fidl_next::wire::Box::encode_absent(out);
2734 }
2735
2736 Ok(())
2737 }
2738 }
2739
2740 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
2741 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2742 crate::wire::DirectoryWatchResponse,
2743 Self,
2744 > = unsafe {
2745 ::fidl_next::CopyOptimization::enable_if(
2746 true
2747
2748 && <
2749 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
2750 >::COPY_OPTIMIZATION.is_enabled()
2751
2752 )
2753 };
2754
2755 #[inline]
2756 fn from_wire(wire: crate::wire::DirectoryWatchResponse) -> Self {
2757 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2758 }
2759 }
2760
2761 impl ::fidl_next::FromWireRef<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
2762 #[inline]
2763 fn from_wire_ref(wire: &crate::wire::DirectoryWatchResponse) -> Self {
2764 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2765 }
2766 }
2767
2768 pub type SymlinkTarget = ::std::vec::Vec<u8>;
2769
2770 #[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"]
2771 pub type ExtendedAttributeName = ::std::vec::Vec<u8>;
2772
2773 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2774 pub struct NodeGetExtendedAttributeRequest {
2775 pub name: ::std::vec::Vec<u8>,
2776 }
2777
2778 unsafe impl<___E>
2779 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
2780 for NodeGetExtendedAttributeRequest
2781 where
2782 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2783 ___E: ::fidl_next::Encoder,
2784 {
2785 #[inline]
2786 fn encode(
2787 self,
2788 encoder_: &mut ___E,
2789 out_: &mut ::core::mem::MaybeUninit<
2790 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2791 >,
2792 _: (),
2793 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2794 ::fidl_next::munge! {
2795 let crate::wire::NodeGetExtendedAttributeRequest {
2796 name,
2797
2798 } = out_;
2799 }
2800
2801 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
2802
2803 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2804 ::fidl_next::Constrained::validate(_field, (255, ()))?;
2805
2806 Ok(())
2807 }
2808 }
2809
2810 unsafe impl<'a, ___E>
2811 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
2812 for &'a NodeGetExtendedAttributeRequest
2813 where
2814 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2815 ___E: ::fidl_next::Encoder,
2816 {
2817 #[inline]
2818 fn encode(
2819 self,
2820 encoder_: &mut ___E,
2821 out_: &mut ::core::mem::MaybeUninit<
2822 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2823 >,
2824 _: (),
2825 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2826 ::fidl_next::munge! {
2827 let crate::wire::NodeGetExtendedAttributeRequest {
2828 name,
2829
2830 } = out_;
2831 }
2832
2833 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
2834
2835 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2836 ::fidl_next::Constrained::validate(_field, (255, ()))?;
2837
2838 Ok(())
2839 }
2840 }
2841
2842 unsafe impl<___E>
2843 ::fidl_next::EncodeOption<
2844 ::fidl_next::wire::Box<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
2845 ___E,
2846 > for NodeGetExtendedAttributeRequest
2847 where
2848 ___E: ::fidl_next::Encoder + ?Sized,
2849 NodeGetExtendedAttributeRequest:
2850 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
2851 {
2852 #[inline]
2853 fn encode_option(
2854 this: ::core::option::Option<Self>,
2855 encoder: &mut ___E,
2856 out: &mut ::core::mem::MaybeUninit<
2857 ::fidl_next::wire::Box<
2858 'static,
2859 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2860 >,
2861 >,
2862 _: (),
2863 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2864 if let Some(inner) = this {
2865 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2866 ::fidl_next::wire::Box::encode_present(out);
2867 } else {
2868 ::fidl_next::wire::Box::encode_absent(out);
2869 }
2870
2871 Ok(())
2872 }
2873 }
2874
2875 unsafe impl<'a, ___E>
2876 ::fidl_next::EncodeOption<
2877 ::fidl_next::wire::Box<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
2878 ___E,
2879 > for &'a NodeGetExtendedAttributeRequest
2880 where
2881 ___E: ::fidl_next::Encoder + ?Sized,
2882 &'a NodeGetExtendedAttributeRequest:
2883 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
2884 {
2885 #[inline]
2886 fn encode_option(
2887 this: ::core::option::Option<Self>,
2888 encoder: &mut ___E,
2889 out: &mut ::core::mem::MaybeUninit<
2890 ::fidl_next::wire::Box<
2891 'static,
2892 crate::wire::NodeGetExtendedAttributeRequest<'static>,
2893 >,
2894 >,
2895 _: (),
2896 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2897 if let Some(inner) = this {
2898 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2899 ::fidl_next::wire::Box::encode_present(out);
2900 } else {
2901 ::fidl_next::wire::Box::encode_absent(out);
2902 }
2903
2904 Ok(())
2905 }
2906 }
2907
2908 impl<'de> ::fidl_next::FromWire<crate::wire::NodeGetExtendedAttributeRequest<'de>>
2909 for NodeGetExtendedAttributeRequest
2910 {
2911 #[inline]
2912 fn from_wire(wire: crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
2913 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
2914 }
2915 }
2916
2917 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeGetExtendedAttributeRequest<'de>>
2918 for NodeGetExtendedAttributeRequest
2919 {
2920 #[inline]
2921 fn from_wire_ref(wire: &crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
2922 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
2923 }
2924 }
2925
2926 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2927 #[repr(u32)]
2928 pub enum SetExtendedAttributeMode {
2929 Set = 1,
2930 Create = 2,
2931 Replace = 3,
2932 }
2933 impl ::core::convert::TryFrom<u32> for SetExtendedAttributeMode {
2934 type Error = ::fidl_next::UnknownStrictEnumMemberError;
2935 fn try_from(
2936 value: u32,
2937 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
2938 match value {
2939 1 => Ok(Self::Set),
2940 2 => Ok(Self::Create),
2941 3 => Ok(Self::Replace),
2942
2943 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
2944 }
2945 }
2946 }
2947
2948 impl ::std::convert::From<SetExtendedAttributeMode> for u32 {
2949 fn from(value: SetExtendedAttributeMode) -> Self {
2950 match value {
2951 SetExtendedAttributeMode::Set => 1,
2952 SetExtendedAttributeMode::Create => 2,
2953 SetExtendedAttributeMode::Replace => 3,
2954 }
2955 }
2956 }
2957
2958 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
2959 for SetExtendedAttributeMode
2960 where
2961 ___E: ?Sized,
2962 {
2963 #[inline]
2964 fn encode(
2965 self,
2966 encoder: &mut ___E,
2967 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
2968 _: (),
2969 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2970 ::fidl_next::Encode::encode(&self, encoder, out, ())
2971 }
2972 }
2973
2974 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
2975 for &'a SetExtendedAttributeMode
2976 where
2977 ___E: ?Sized,
2978 {
2979 #[inline]
2980 fn encode(
2981 self,
2982 encoder: &mut ___E,
2983 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
2984 _: (),
2985 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2986 ::fidl_next::munge!(let crate::wire::SetExtendedAttributeMode { value } = out);
2987 let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2988 SetExtendedAttributeMode::Set => 1,
2989
2990 SetExtendedAttributeMode::Create => 2,
2991
2992 SetExtendedAttributeMode::Replace => 3,
2993 }));
2994
2995 Ok(())
2996 }
2997 }
2998
2999 impl ::core::convert::From<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3000 fn from(wire: crate::wire::SetExtendedAttributeMode) -> Self {
3001 match u32::from(wire.value) {
3002 1 => Self::Set,
3003
3004 2 => Self::Create,
3005
3006 3 => Self::Replace,
3007
3008 _ => unsafe { ::core::hint::unreachable_unchecked() },
3009 }
3010 }
3011 }
3012
3013 impl ::fidl_next::FromWire<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3014 #[inline]
3015 fn from_wire(wire: crate::wire::SetExtendedAttributeMode) -> Self {
3016 Self::from(wire)
3017 }
3018 }
3019
3020 impl ::fidl_next::FromWireRef<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3021 #[inline]
3022 fn from_wire_ref(wire: &crate::wire::SetExtendedAttributeMode) -> Self {
3023 Self::from(*wire)
3024 }
3025 }
3026
3027 pub type NodeSetExtendedAttributeResponse = ();
3028
3029 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3030 pub struct NodeRemoveExtendedAttributeRequest {
3031 pub name: ::std::vec::Vec<u8>,
3032 }
3033
3034 unsafe impl<___E>
3035 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3036 for NodeRemoveExtendedAttributeRequest
3037 where
3038 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3039 ___E: ::fidl_next::Encoder,
3040 {
3041 #[inline]
3042 fn encode(
3043 self,
3044 encoder_: &mut ___E,
3045 out_: &mut ::core::mem::MaybeUninit<
3046 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3047 >,
3048 _: (),
3049 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3050 ::fidl_next::munge! {
3051 let crate::wire::NodeRemoveExtendedAttributeRequest {
3052 name,
3053
3054 } = out_;
3055 }
3056
3057 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
3058
3059 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3060 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3061
3062 Ok(())
3063 }
3064 }
3065
3066 unsafe impl<'a, ___E>
3067 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3068 for &'a NodeRemoveExtendedAttributeRequest
3069 where
3070 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3071 ___E: ::fidl_next::Encoder,
3072 {
3073 #[inline]
3074 fn encode(
3075 self,
3076 encoder_: &mut ___E,
3077 out_: &mut ::core::mem::MaybeUninit<
3078 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3079 >,
3080 _: (),
3081 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3082 ::fidl_next::munge! {
3083 let crate::wire::NodeRemoveExtendedAttributeRequest {
3084 name,
3085
3086 } = out_;
3087 }
3088
3089 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
3090
3091 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3092 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3093
3094 Ok(())
3095 }
3096 }
3097
3098 unsafe impl<___E>
3099 ::fidl_next::EncodeOption<
3100 ::fidl_next::wire::Box<
3101 'static,
3102 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3103 >,
3104 ___E,
3105 > for NodeRemoveExtendedAttributeRequest
3106 where
3107 ___E: ::fidl_next::Encoder + ?Sized,
3108 NodeRemoveExtendedAttributeRequest:
3109 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3110 {
3111 #[inline]
3112 fn encode_option(
3113 this: ::core::option::Option<Self>,
3114 encoder: &mut ___E,
3115 out: &mut ::core::mem::MaybeUninit<
3116 ::fidl_next::wire::Box<
3117 'static,
3118 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3119 >,
3120 >,
3121 _: (),
3122 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3123 if let Some(inner) = this {
3124 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3125 ::fidl_next::wire::Box::encode_present(out);
3126 } else {
3127 ::fidl_next::wire::Box::encode_absent(out);
3128 }
3129
3130 Ok(())
3131 }
3132 }
3133
3134 unsafe impl<'a, ___E>
3135 ::fidl_next::EncodeOption<
3136 ::fidl_next::wire::Box<
3137 'static,
3138 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3139 >,
3140 ___E,
3141 > for &'a NodeRemoveExtendedAttributeRequest
3142 where
3143 ___E: ::fidl_next::Encoder + ?Sized,
3144 &'a NodeRemoveExtendedAttributeRequest:
3145 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3146 {
3147 #[inline]
3148 fn encode_option(
3149 this: ::core::option::Option<Self>,
3150 encoder: &mut ___E,
3151 out: &mut ::core::mem::MaybeUninit<
3152 ::fidl_next::wire::Box<
3153 'static,
3154 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3155 >,
3156 >,
3157 _: (),
3158 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3159 if let Some(inner) = this {
3160 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3161 ::fidl_next::wire::Box::encode_present(out);
3162 } else {
3163 ::fidl_next::wire::Box::encode_absent(out);
3164 }
3165
3166 Ok(())
3167 }
3168 }
3169
3170 impl<'de> ::fidl_next::FromWire<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3171 for NodeRemoveExtendedAttributeRequest
3172 {
3173 #[inline]
3174 fn from_wire(wire: crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3175 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
3176 }
3177 }
3178
3179 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3180 for NodeRemoveExtendedAttributeRequest
3181 {
3182 #[inline]
3183 fn from_wire_ref(wire: &crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3184 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
3185 }
3186 }
3187
3188 pub type NodeRemoveExtendedAttributeResponse = ();
3189
3190 pub type DirectoryCreateSymlinkResponse = ();
3191
3192 pub type NodeSetFlagsResponse = ();
3193
3194 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3195 pub struct NodeDeprecatedGetAttrResponse {
3196 pub s: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
3197
3198 pub attributes: crate::natural::NodeAttributes,
3199 }
3200
3201 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
3202 for NodeDeprecatedGetAttrResponse
3203 where
3204 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3205 {
3206 #[inline]
3207 fn encode(
3208 self,
3209 encoder_: &mut ___E,
3210 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
3211 _: (),
3212 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3213 ::fidl_next::munge! {
3214 let crate::wire::NodeDeprecatedGetAttrResponse {
3215 s,
3216 attributes,
3217
3218 } = out_;
3219 }
3220
3221 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3222
3223 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3224
3225 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
3226
3227 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3228
3229 Ok(())
3230 }
3231 }
3232
3233 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
3234 for &'a NodeDeprecatedGetAttrResponse
3235 where
3236 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3237 {
3238 #[inline]
3239 fn encode(
3240 self,
3241 encoder_: &mut ___E,
3242 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
3243 _: (),
3244 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3245 ::fidl_next::munge! {
3246 let crate::wire::NodeDeprecatedGetAttrResponse {
3247 s,
3248 attributes,
3249
3250 } = out_;
3251 }
3252
3253 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3254
3255 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3256
3257 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
3258
3259 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3260
3261 Ok(())
3262 }
3263 }
3264
3265 unsafe impl<___E>
3266 ::fidl_next::EncodeOption<
3267 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3268 ___E,
3269 > for NodeDeprecatedGetAttrResponse
3270 where
3271 ___E: ::fidl_next::Encoder + ?Sized,
3272 NodeDeprecatedGetAttrResponse:
3273 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
3274 {
3275 #[inline]
3276 fn encode_option(
3277 this: ::core::option::Option<Self>,
3278 encoder: &mut ___E,
3279 out: &mut ::core::mem::MaybeUninit<
3280 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3281 >,
3282 _: (),
3283 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3284 if let Some(inner) = this {
3285 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3286 ::fidl_next::wire::Box::encode_present(out);
3287 } else {
3288 ::fidl_next::wire::Box::encode_absent(out);
3289 }
3290
3291 Ok(())
3292 }
3293 }
3294
3295 unsafe impl<'a, ___E>
3296 ::fidl_next::EncodeOption<
3297 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3298 ___E,
3299 > for &'a NodeDeprecatedGetAttrResponse
3300 where
3301 ___E: ::fidl_next::Encoder + ?Sized,
3302 &'a NodeDeprecatedGetAttrResponse:
3303 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
3304 {
3305 #[inline]
3306 fn encode_option(
3307 this: ::core::option::Option<Self>,
3308 encoder: &mut ___E,
3309 out: &mut ::core::mem::MaybeUninit<
3310 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
3311 >,
3312 _: (),
3313 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3314 if let Some(inner) = this {
3315 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3316 ::fidl_next::wire::Box::encode_present(out);
3317 } else {
3318 ::fidl_next::wire::Box::encode_absent(out);
3319 }
3320
3321 Ok(())
3322 }
3323 }
3324
3325 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetAttrResponse>
3326 for NodeDeprecatedGetAttrResponse
3327 {
3328 #[inline]
3329 fn from_wire(wire: crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
3330 Self {
3331 s: ::fidl_next::FromWire::from_wire(wire.s),
3332
3333 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
3334 }
3335 }
3336 }
3337
3338 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetAttrResponse>
3339 for NodeDeprecatedGetAttrResponse
3340 {
3341 #[inline]
3342 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
3343 Self {
3344 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
3345
3346 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
3347 }
3348 }
3349 }
3350
3351 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3352 pub struct NodeDeprecatedSetAttrRequest {
3353 pub flags: crate::natural::NodeAttributeFlags,
3354
3355 pub attributes: crate::natural::NodeAttributes,
3356 }
3357
3358 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
3359 for NodeDeprecatedSetAttrRequest
3360 where
3361 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3362 {
3363 #[inline]
3364 fn encode(
3365 self,
3366 encoder_: &mut ___E,
3367 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
3368 _: (),
3369 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3370 ::fidl_next::munge! {
3371 let crate::wire::NodeDeprecatedSetAttrRequest {
3372 flags,
3373 attributes,
3374
3375 } = out_;
3376 }
3377
3378 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3379
3380 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3381
3382 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
3383
3384 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3385
3386 Ok(())
3387 }
3388 }
3389
3390 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
3391 for &'a NodeDeprecatedSetAttrRequest
3392 where
3393 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3394 {
3395 #[inline]
3396 fn encode(
3397 self,
3398 encoder_: &mut ___E,
3399 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
3400 _: (),
3401 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3402 ::fidl_next::munge! {
3403 let crate::wire::NodeDeprecatedSetAttrRequest {
3404 flags,
3405 attributes,
3406
3407 } = out_;
3408 }
3409
3410 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3411
3412 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3413
3414 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
3415
3416 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
3417
3418 Ok(())
3419 }
3420 }
3421
3422 unsafe impl<___E>
3423 ::fidl_next::EncodeOption<
3424 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3425 ___E,
3426 > for NodeDeprecatedSetAttrRequest
3427 where
3428 ___E: ::fidl_next::Encoder + ?Sized,
3429 NodeDeprecatedSetAttrRequest:
3430 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
3431 {
3432 #[inline]
3433 fn encode_option(
3434 this: ::core::option::Option<Self>,
3435 encoder: &mut ___E,
3436 out: &mut ::core::mem::MaybeUninit<
3437 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3438 >,
3439 _: (),
3440 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3441 if let Some(inner) = this {
3442 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3443 ::fidl_next::wire::Box::encode_present(out);
3444 } else {
3445 ::fidl_next::wire::Box::encode_absent(out);
3446 }
3447
3448 Ok(())
3449 }
3450 }
3451
3452 unsafe impl<'a, ___E>
3453 ::fidl_next::EncodeOption<
3454 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3455 ___E,
3456 > for &'a NodeDeprecatedSetAttrRequest
3457 where
3458 ___E: ::fidl_next::Encoder + ?Sized,
3459 &'a NodeDeprecatedSetAttrRequest:
3460 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
3461 {
3462 #[inline]
3463 fn encode_option(
3464 this: ::core::option::Option<Self>,
3465 encoder: &mut ___E,
3466 out: &mut ::core::mem::MaybeUninit<
3467 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
3468 >,
3469 _: (),
3470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3471 if let Some(inner) = this {
3472 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3473 ::fidl_next::wire::Box::encode_present(out);
3474 } else {
3475 ::fidl_next::wire::Box::encode_absent(out);
3476 }
3477
3478 Ok(())
3479 }
3480 }
3481
3482 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrRequest>
3483 for NodeDeprecatedSetAttrRequest
3484 {
3485 #[inline]
3486 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
3487 Self {
3488 flags: ::fidl_next::FromWire::from_wire(wire.flags),
3489
3490 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
3491 }
3492 }
3493 }
3494
3495 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrRequest>
3496 for NodeDeprecatedSetAttrRequest
3497 {
3498 #[inline]
3499 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
3500 Self {
3501 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
3502
3503 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
3504 }
3505 }
3506 }
3507
3508 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3509 #[repr(C)]
3510 pub struct NodeDeprecatedSetAttrResponse {
3511 pub s: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
3512 }
3513
3514 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
3515 for NodeDeprecatedSetAttrResponse
3516 where
3517 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3518 {
3519 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3520 Self,
3521 crate::wire::NodeDeprecatedSetAttrResponse,
3522 > = unsafe {
3523 ::fidl_next::CopyOptimization::enable_if(
3524 true
3525
3526 && <
3527 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
3528 >::COPY_OPTIMIZATION.is_enabled()
3529
3530 )
3531 };
3532
3533 #[inline]
3534 fn encode(
3535 self,
3536 encoder_: &mut ___E,
3537 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
3538 _: (),
3539 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3540 ::fidl_next::munge! {
3541 let crate::wire::NodeDeprecatedSetAttrResponse {
3542 s,
3543
3544 } = out_;
3545 }
3546
3547 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3548
3549 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3550
3551 Ok(())
3552 }
3553 }
3554
3555 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
3556 for &'a NodeDeprecatedSetAttrResponse
3557 where
3558 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3559 {
3560 #[inline]
3561 fn encode(
3562 self,
3563 encoder_: &mut ___E,
3564 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
3565 _: (),
3566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3567 ::fidl_next::munge! {
3568 let crate::wire::NodeDeprecatedSetAttrResponse {
3569 s,
3570
3571 } = out_;
3572 }
3573
3574 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3575
3576 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3577
3578 Ok(())
3579 }
3580 }
3581
3582 unsafe impl<___E>
3583 ::fidl_next::EncodeOption<
3584 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3585 ___E,
3586 > for NodeDeprecatedSetAttrResponse
3587 where
3588 ___E: ::fidl_next::Encoder + ?Sized,
3589 NodeDeprecatedSetAttrResponse:
3590 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
3591 {
3592 #[inline]
3593 fn encode_option(
3594 this: ::core::option::Option<Self>,
3595 encoder: &mut ___E,
3596 out: &mut ::core::mem::MaybeUninit<
3597 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3598 >,
3599 _: (),
3600 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3601 if let Some(inner) = this {
3602 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3603 ::fidl_next::wire::Box::encode_present(out);
3604 } else {
3605 ::fidl_next::wire::Box::encode_absent(out);
3606 }
3607
3608 Ok(())
3609 }
3610 }
3611
3612 unsafe impl<'a, ___E>
3613 ::fidl_next::EncodeOption<
3614 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3615 ___E,
3616 > for &'a NodeDeprecatedSetAttrResponse
3617 where
3618 ___E: ::fidl_next::Encoder + ?Sized,
3619 &'a NodeDeprecatedSetAttrResponse:
3620 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
3621 {
3622 #[inline]
3623 fn encode_option(
3624 this: ::core::option::Option<Self>,
3625 encoder: &mut ___E,
3626 out: &mut ::core::mem::MaybeUninit<
3627 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
3628 >,
3629 _: (),
3630 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3631 if let Some(inner) = this {
3632 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3633 ::fidl_next::wire::Box::encode_present(out);
3634 } else {
3635 ::fidl_next::wire::Box::encode_absent(out);
3636 }
3637
3638 Ok(())
3639 }
3640 }
3641
3642 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrResponse>
3643 for NodeDeprecatedSetAttrResponse
3644 {
3645 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3646 crate::wire::NodeDeprecatedSetAttrResponse,
3647 Self,
3648 > = unsafe {
3649 ::fidl_next::CopyOptimization::enable_if(
3650 true
3651
3652 && <
3653 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
3654 >::COPY_OPTIMIZATION.is_enabled()
3655
3656 )
3657 };
3658
3659 #[inline]
3660 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
3661 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
3662 }
3663 }
3664
3665 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrResponse>
3666 for NodeDeprecatedSetAttrResponse
3667 {
3668 #[inline]
3669 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
3670 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
3671 }
3672 }
3673
3674 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3675 #[repr(C)]
3676 pub struct NodeDeprecatedGetFlagsResponse {
3677 pub s: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
3678
3679 pub flags: crate::natural::OpenFlags,
3680 }
3681
3682 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
3683 for NodeDeprecatedGetFlagsResponse
3684 where
3685 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3686 {
3687 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3688 Self,
3689 crate::wire::NodeDeprecatedGetFlagsResponse,
3690 > = unsafe {
3691 ::fidl_next::CopyOptimization::enable_if(
3692 true
3693
3694 && <
3695 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
3696 >::COPY_OPTIMIZATION.is_enabled()
3697
3698 && <
3699 crate::natural::OpenFlags as ::fidl_next::Encode<crate::wire::OpenFlags, ___E>
3700 >::COPY_OPTIMIZATION.is_enabled()
3701
3702 )
3703 };
3704
3705 #[inline]
3706 fn encode(
3707 self,
3708 encoder_: &mut ___E,
3709 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
3710 _: (),
3711 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3712 ::fidl_next::munge! {
3713 let crate::wire::NodeDeprecatedGetFlagsResponse {
3714 s,
3715 flags,
3716
3717 } = out_;
3718 }
3719
3720 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3721
3722 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3723
3724 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3725
3726 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3727
3728 Ok(())
3729 }
3730 }
3731
3732 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
3733 for &'a NodeDeprecatedGetFlagsResponse
3734 where
3735 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3736 {
3737 #[inline]
3738 fn encode(
3739 self,
3740 encoder_: &mut ___E,
3741 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
3742 _: (),
3743 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3744 ::fidl_next::munge! {
3745 let crate::wire::NodeDeprecatedGetFlagsResponse {
3746 s,
3747 flags,
3748
3749 } = out_;
3750 }
3751
3752 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3753
3754 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3755
3756 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3757
3758 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3759
3760 Ok(())
3761 }
3762 }
3763
3764 unsafe impl<___E>
3765 ::fidl_next::EncodeOption<
3766 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3767 ___E,
3768 > for NodeDeprecatedGetFlagsResponse
3769 where
3770 ___E: ::fidl_next::Encoder + ?Sized,
3771 NodeDeprecatedGetFlagsResponse:
3772 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
3773 {
3774 #[inline]
3775 fn encode_option(
3776 this: ::core::option::Option<Self>,
3777 encoder: &mut ___E,
3778 out: &mut ::core::mem::MaybeUninit<
3779 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3780 >,
3781 _: (),
3782 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3783 if let Some(inner) = this {
3784 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3785 ::fidl_next::wire::Box::encode_present(out);
3786 } else {
3787 ::fidl_next::wire::Box::encode_absent(out);
3788 }
3789
3790 Ok(())
3791 }
3792 }
3793
3794 unsafe impl<'a, ___E>
3795 ::fidl_next::EncodeOption<
3796 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3797 ___E,
3798 > for &'a NodeDeprecatedGetFlagsResponse
3799 where
3800 ___E: ::fidl_next::Encoder + ?Sized,
3801 &'a NodeDeprecatedGetFlagsResponse:
3802 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
3803 {
3804 #[inline]
3805 fn encode_option(
3806 this: ::core::option::Option<Self>,
3807 encoder: &mut ___E,
3808 out: &mut ::core::mem::MaybeUninit<
3809 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
3810 >,
3811 _: (),
3812 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3813 if let Some(inner) = this {
3814 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3815 ::fidl_next::wire::Box::encode_present(out);
3816 } else {
3817 ::fidl_next::wire::Box::encode_absent(out);
3818 }
3819
3820 Ok(())
3821 }
3822 }
3823
3824 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetFlagsResponse>
3825 for NodeDeprecatedGetFlagsResponse
3826 {
3827 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3828 crate::wire::NodeDeprecatedGetFlagsResponse,
3829 Self,
3830 > = unsafe {
3831 ::fidl_next::CopyOptimization::enable_if(
3832 true
3833
3834 && <
3835 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
3836 >::COPY_OPTIMIZATION.is_enabled()
3837
3838 && <
3839 crate::natural::OpenFlags as ::fidl_next::FromWire<crate::wire::OpenFlags>
3840 >::COPY_OPTIMIZATION.is_enabled()
3841
3842 )
3843 };
3844
3845 #[inline]
3846 fn from_wire(wire: crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
3847 Self {
3848 s: ::fidl_next::FromWire::from_wire(wire.s),
3849
3850 flags: ::fidl_next::FromWire::from_wire(wire.flags),
3851 }
3852 }
3853 }
3854
3855 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetFlagsResponse>
3856 for NodeDeprecatedGetFlagsResponse
3857 {
3858 #[inline]
3859 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
3860 Self {
3861 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
3862
3863 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
3864 }
3865 }
3866 }
3867
3868 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3869 #[repr(C)]
3870 pub struct NodeDeprecatedSetFlagsRequest {
3871 pub flags: crate::natural::OpenFlags,
3872 }
3873
3874 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
3875 for NodeDeprecatedSetFlagsRequest
3876 where
3877 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3878 {
3879 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3880 Self,
3881 crate::wire::NodeDeprecatedSetFlagsRequest,
3882 > = unsafe {
3883 ::fidl_next::CopyOptimization::enable_if(
3884 true && <crate::natural::OpenFlags as ::fidl_next::Encode<
3885 crate::wire::OpenFlags,
3886 ___E,
3887 >>::COPY_OPTIMIZATION
3888 .is_enabled(),
3889 )
3890 };
3891
3892 #[inline]
3893 fn encode(
3894 self,
3895 encoder_: &mut ___E,
3896 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
3897 _: (),
3898 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3899 ::fidl_next::munge! {
3900 let crate::wire::NodeDeprecatedSetFlagsRequest {
3901 flags,
3902
3903 } = out_;
3904 }
3905
3906 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
3907
3908 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3909
3910 Ok(())
3911 }
3912 }
3913
3914 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
3915 for &'a NodeDeprecatedSetFlagsRequest
3916 where
3917 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3918 {
3919 #[inline]
3920 fn encode(
3921 self,
3922 encoder_: &mut ___E,
3923 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
3924 _: (),
3925 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3926 ::fidl_next::munge! {
3927 let crate::wire::NodeDeprecatedSetFlagsRequest {
3928 flags,
3929
3930 } = out_;
3931 }
3932
3933 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
3934
3935 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
3936
3937 Ok(())
3938 }
3939 }
3940
3941 unsafe impl<___E>
3942 ::fidl_next::EncodeOption<
3943 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3944 ___E,
3945 > for NodeDeprecatedSetFlagsRequest
3946 where
3947 ___E: ::fidl_next::Encoder + ?Sized,
3948 NodeDeprecatedSetFlagsRequest:
3949 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
3950 {
3951 #[inline]
3952 fn encode_option(
3953 this: ::core::option::Option<Self>,
3954 encoder: &mut ___E,
3955 out: &mut ::core::mem::MaybeUninit<
3956 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3957 >,
3958 _: (),
3959 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3960 if let Some(inner) = this {
3961 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3962 ::fidl_next::wire::Box::encode_present(out);
3963 } else {
3964 ::fidl_next::wire::Box::encode_absent(out);
3965 }
3966
3967 Ok(())
3968 }
3969 }
3970
3971 unsafe impl<'a, ___E>
3972 ::fidl_next::EncodeOption<
3973 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3974 ___E,
3975 > for &'a NodeDeprecatedSetFlagsRequest
3976 where
3977 ___E: ::fidl_next::Encoder + ?Sized,
3978 &'a NodeDeprecatedSetFlagsRequest:
3979 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
3980 {
3981 #[inline]
3982 fn encode_option(
3983 this: ::core::option::Option<Self>,
3984 encoder: &mut ___E,
3985 out: &mut ::core::mem::MaybeUninit<
3986 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
3987 >,
3988 _: (),
3989 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3990 if let Some(inner) = this {
3991 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3992 ::fidl_next::wire::Box::encode_present(out);
3993 } else {
3994 ::fidl_next::wire::Box::encode_absent(out);
3995 }
3996
3997 Ok(())
3998 }
3999 }
4000
4001 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsRequest>
4002 for NodeDeprecatedSetFlagsRequest
4003 {
4004 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4005 crate::wire::NodeDeprecatedSetFlagsRequest,
4006 Self,
4007 > = unsafe {
4008 ::fidl_next::CopyOptimization::enable_if(
4009 true && <crate::natural::OpenFlags as ::fidl_next::FromWire<
4010 crate::wire::OpenFlags,
4011 >>::COPY_OPTIMIZATION
4012 .is_enabled(),
4013 )
4014 };
4015
4016 #[inline]
4017 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
4018 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
4019 }
4020 }
4021
4022 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsRequest>
4023 for NodeDeprecatedSetFlagsRequest
4024 {
4025 #[inline]
4026 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
4027 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
4028 }
4029 }
4030
4031 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4032 #[repr(C)]
4033 pub struct NodeDeprecatedSetFlagsResponse {
4034 pub s: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
4035 }
4036
4037 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
4038 for NodeDeprecatedSetFlagsResponse
4039 where
4040 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4041 {
4042 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4043 Self,
4044 crate::wire::NodeDeprecatedSetFlagsResponse,
4045 > = unsafe {
4046 ::fidl_next::CopyOptimization::enable_if(
4047 true
4048
4049 && <
4050 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
4051 >::COPY_OPTIMIZATION.is_enabled()
4052
4053 )
4054 };
4055
4056 #[inline]
4057 fn encode(
4058 self,
4059 encoder_: &mut ___E,
4060 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
4061 _: (),
4062 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4063 ::fidl_next::munge! {
4064 let crate::wire::NodeDeprecatedSetFlagsResponse {
4065 s,
4066
4067 } = out_;
4068 }
4069
4070 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4071
4072 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4073
4074 Ok(())
4075 }
4076 }
4077
4078 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
4079 for &'a NodeDeprecatedSetFlagsResponse
4080 where
4081 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4082 {
4083 #[inline]
4084 fn encode(
4085 self,
4086 encoder_: &mut ___E,
4087 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
4088 _: (),
4089 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4090 ::fidl_next::munge! {
4091 let crate::wire::NodeDeprecatedSetFlagsResponse {
4092 s,
4093
4094 } = out_;
4095 }
4096
4097 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4098
4099 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4100
4101 Ok(())
4102 }
4103 }
4104
4105 unsafe impl<___E>
4106 ::fidl_next::EncodeOption<
4107 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4108 ___E,
4109 > for NodeDeprecatedSetFlagsResponse
4110 where
4111 ___E: ::fidl_next::Encoder + ?Sized,
4112 NodeDeprecatedSetFlagsResponse:
4113 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
4114 {
4115 #[inline]
4116 fn encode_option(
4117 this: ::core::option::Option<Self>,
4118 encoder: &mut ___E,
4119 out: &mut ::core::mem::MaybeUninit<
4120 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4121 >,
4122 _: (),
4123 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4124 if let Some(inner) = this {
4125 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4126 ::fidl_next::wire::Box::encode_present(out);
4127 } else {
4128 ::fidl_next::wire::Box::encode_absent(out);
4129 }
4130
4131 Ok(())
4132 }
4133 }
4134
4135 unsafe impl<'a, ___E>
4136 ::fidl_next::EncodeOption<
4137 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4138 ___E,
4139 > for &'a NodeDeprecatedSetFlagsResponse
4140 where
4141 ___E: ::fidl_next::Encoder + ?Sized,
4142 &'a NodeDeprecatedSetFlagsResponse:
4143 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
4144 {
4145 #[inline]
4146 fn encode_option(
4147 this: ::core::option::Option<Self>,
4148 encoder: &mut ___E,
4149 out: &mut ::core::mem::MaybeUninit<
4150 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
4151 >,
4152 _: (),
4153 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4154 if let Some(inner) = this {
4155 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4156 ::fidl_next::wire::Box::encode_present(out);
4157 } else {
4158 ::fidl_next::wire::Box::encode_absent(out);
4159 }
4160
4161 Ok(())
4162 }
4163 }
4164
4165 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsResponse>
4166 for NodeDeprecatedSetFlagsResponse
4167 {
4168 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4169 crate::wire::NodeDeprecatedSetFlagsResponse,
4170 Self,
4171 > = unsafe {
4172 ::fidl_next::CopyOptimization::enable_if(
4173 true
4174
4175 && <
4176 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
4177 >::COPY_OPTIMIZATION.is_enabled()
4178
4179 )
4180 };
4181
4182 #[inline]
4183 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
4184 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
4185 }
4186 }
4187
4188 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsResponse>
4189 for NodeDeprecatedSetFlagsResponse
4190 {
4191 #[inline]
4192 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
4193 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
4194 }
4195 }
4196
4197 ::fidl_next::bitflags::bitflags! {
4198 #[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 {
4199 #[doc = " Allows opening child nodes with [`PROTOCOL_SERVICE`].\n"]const PERM_CONNECT = 1;
4200 #[doc = " Read byte contents of a file.\n"]const PERM_READ_BYTES = 2;
4201 #[doc = " Write byte contents to a file.\n"]const PERM_WRITE_BYTES = 4;
4202 #[doc = " Execute byte contents of a file.\n"]const PERM_EXECUTE = 8;
4203 #[doc = " Get/query attributes of a node.\n"]const PERM_GET_ATTRIBUTES = 16;
4204 #[doc = " Set/update attributes of a node.\n"]const PERM_UPDATE_ATTRIBUTES = 32;
4205 #[doc = " Enumerate (list) directory entries.\n"]const PERM_ENUMERATE = 64;
4206 #[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;
4207 #[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;
4208 #[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;
4209 #[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;
4210 #[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;
4211 #[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;
4212 #[doc = " Caller accepts [`fuchsia.io/Directory`] protocol. Equivalent to POSIX `O_DIRECTORY`.\n"]const PROTOCOL_DIRECTORY = 524288;
4213 #[doc = " Caller accepts [`fuchsia.io/File`] protocol.\n"]const PROTOCOL_FILE = 8589934592;
4214 #[doc = " Caller accepts [`fuchsia.io/Symlink`] protocol.\n"]const PROTOCOL_SYMLINK = 17179869184;
4215 #[doc = " Caller requests a [`fuchsia.io/Node.OnRepresentation`] event on success.\n"]const FLAG_SEND_REPRESENTATION = 1099511627776;
4216 #[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;
4217 #[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;
4218 #[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;
4219 #[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;
4220 #[doc = " Truncate the file to zero length upon opening it. Equivalent to POSIX `O_TRUNC`.\n"]const FILE_TRUNCATE = 262144;
4221 const _ = !0;
4222 }
4223 }
4224
4225 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for Flags
4226 where
4227 ___E: ?Sized,
4228 {
4229 #[inline]
4230 fn encode(
4231 self,
4232 encoder: &mut ___E,
4233 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
4234 _: (),
4235 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4236 ::fidl_next::Encode::encode(&self, encoder, out, ())
4237 }
4238 }
4239
4240 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for &'a Flags
4241 where
4242 ___E: ?Sized,
4243 {
4244 #[inline]
4245 fn encode(
4246 self,
4247 _: &mut ___E,
4248 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
4249 _: (),
4250 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4251 ::fidl_next::munge!(let crate::wire::Flags { value } = out);
4252
4253 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
4254 Ok(())
4255 }
4256 }
4257
4258 impl ::core::convert::From<crate::wire::Flags> for Flags {
4259 fn from(wire: crate::wire::Flags) -> Self {
4260 Self::from_bits_retain(u64::from(wire.value))
4261 }
4262 }
4263
4264 impl ::fidl_next::FromWire<crate::wire::Flags> for Flags {
4265 #[inline]
4266 fn from_wire(wire: crate::wire::Flags) -> Self {
4267 Self::from(wire)
4268 }
4269 }
4270
4271 impl ::fidl_next::FromWireRef<crate::wire::Flags> for Flags {
4272 #[inline]
4273 fn from_wire_ref(wire: &crate::wire::Flags) -> Self {
4274 Self::from(*wire)
4275 }
4276 }
4277
4278 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4279 #[repr(C)]
4280 pub struct NodeGetFlagsResponse {
4281 pub flags: crate::natural::Flags,
4282 }
4283
4284 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
4285 for NodeGetFlagsResponse
4286 where
4287 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4288 {
4289 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4290 Self,
4291 crate::wire::NodeGetFlagsResponse,
4292 > = unsafe {
4293 ::fidl_next::CopyOptimization::enable_if(
4294 true
4295
4296 && <
4297 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
4298 >::COPY_OPTIMIZATION.is_enabled()
4299
4300 )
4301 };
4302
4303 #[inline]
4304 fn encode(
4305 self,
4306 encoder_: &mut ___E,
4307 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
4308 _: (),
4309 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4310 ::fidl_next::munge! {
4311 let crate::wire::NodeGetFlagsResponse {
4312 flags,
4313
4314 } = out_;
4315 }
4316
4317 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4318
4319 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4320
4321 Ok(())
4322 }
4323 }
4324
4325 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
4326 for &'a NodeGetFlagsResponse
4327 where
4328 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4329 {
4330 #[inline]
4331 fn encode(
4332 self,
4333 encoder_: &mut ___E,
4334 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
4335 _: (),
4336 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4337 ::fidl_next::munge! {
4338 let crate::wire::NodeGetFlagsResponse {
4339 flags,
4340
4341 } = out_;
4342 }
4343
4344 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4345
4346 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4347
4348 Ok(())
4349 }
4350 }
4351
4352 unsafe impl<___E>
4353 ::fidl_next::EncodeOption<
4354 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4355 ___E,
4356 > for NodeGetFlagsResponse
4357 where
4358 ___E: ::fidl_next::Encoder + ?Sized,
4359 NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
4360 {
4361 #[inline]
4362 fn encode_option(
4363 this: ::core::option::Option<Self>,
4364 encoder: &mut ___E,
4365 out: &mut ::core::mem::MaybeUninit<
4366 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4367 >,
4368 _: (),
4369 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4370 if let Some(inner) = this {
4371 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4372 ::fidl_next::wire::Box::encode_present(out);
4373 } else {
4374 ::fidl_next::wire::Box::encode_absent(out);
4375 }
4376
4377 Ok(())
4378 }
4379 }
4380
4381 unsafe impl<'a, ___E>
4382 ::fidl_next::EncodeOption<
4383 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4384 ___E,
4385 > for &'a NodeGetFlagsResponse
4386 where
4387 ___E: ::fidl_next::Encoder + ?Sized,
4388 &'a NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
4389 {
4390 #[inline]
4391 fn encode_option(
4392 this: ::core::option::Option<Self>,
4393 encoder: &mut ___E,
4394 out: &mut ::core::mem::MaybeUninit<
4395 ::fidl_next::wire::Box<'static, crate::wire::NodeGetFlagsResponse>,
4396 >,
4397 _: (),
4398 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4399 if let Some(inner) = this {
4400 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4401 ::fidl_next::wire::Box::encode_present(out);
4402 } else {
4403 ::fidl_next::wire::Box::encode_absent(out);
4404 }
4405
4406 Ok(())
4407 }
4408 }
4409
4410 impl ::fidl_next::FromWire<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
4411 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4412 crate::wire::NodeGetFlagsResponse,
4413 Self,
4414 > = unsafe {
4415 ::fidl_next::CopyOptimization::enable_if(
4416 true
4417
4418 && <
4419 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
4420 >::COPY_OPTIMIZATION.is_enabled()
4421
4422 )
4423 };
4424
4425 #[inline]
4426 fn from_wire(wire: crate::wire::NodeGetFlagsResponse) -> Self {
4427 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
4428 }
4429 }
4430
4431 impl ::fidl_next::FromWireRef<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
4432 #[inline]
4433 fn from_wire_ref(wire: &crate::wire::NodeGetFlagsResponse) -> Self {
4434 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
4435 }
4436 }
4437
4438 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4439 #[repr(C)]
4440 pub struct NodeSetFlagsRequest {
4441 pub flags: crate::natural::Flags,
4442 }
4443
4444 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
4445 for NodeSetFlagsRequest
4446 where
4447 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4448 {
4449 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4450 Self,
4451 crate::wire::NodeSetFlagsRequest,
4452 > = unsafe {
4453 ::fidl_next::CopyOptimization::enable_if(
4454 true
4455
4456 && <
4457 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
4458 >::COPY_OPTIMIZATION.is_enabled()
4459
4460 )
4461 };
4462
4463 #[inline]
4464 fn encode(
4465 self,
4466 encoder_: &mut ___E,
4467 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
4468 _: (),
4469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4470 ::fidl_next::munge! {
4471 let crate::wire::NodeSetFlagsRequest {
4472 flags,
4473
4474 } = out_;
4475 }
4476
4477 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4478
4479 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4480
4481 Ok(())
4482 }
4483 }
4484
4485 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
4486 for &'a NodeSetFlagsRequest
4487 where
4488 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4489 {
4490 #[inline]
4491 fn encode(
4492 self,
4493 encoder_: &mut ___E,
4494 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
4495 _: (),
4496 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4497 ::fidl_next::munge! {
4498 let crate::wire::NodeSetFlagsRequest {
4499 flags,
4500
4501 } = out_;
4502 }
4503
4504 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4505
4506 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4507
4508 Ok(())
4509 }
4510 }
4511
4512 unsafe impl<___E>
4513 ::fidl_next::EncodeOption<
4514 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4515 ___E,
4516 > for NodeSetFlagsRequest
4517 where
4518 ___E: ::fidl_next::Encoder + ?Sized,
4519 NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
4520 {
4521 #[inline]
4522 fn encode_option(
4523 this: ::core::option::Option<Self>,
4524 encoder: &mut ___E,
4525 out: &mut ::core::mem::MaybeUninit<
4526 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4527 >,
4528 _: (),
4529 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4530 if let Some(inner) = this {
4531 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4532 ::fidl_next::wire::Box::encode_present(out);
4533 } else {
4534 ::fidl_next::wire::Box::encode_absent(out);
4535 }
4536
4537 Ok(())
4538 }
4539 }
4540
4541 unsafe impl<'a, ___E>
4542 ::fidl_next::EncodeOption<
4543 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4544 ___E,
4545 > for &'a NodeSetFlagsRequest
4546 where
4547 ___E: ::fidl_next::Encoder + ?Sized,
4548 &'a NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
4549 {
4550 #[inline]
4551 fn encode_option(
4552 this: ::core::option::Option<Self>,
4553 encoder: &mut ___E,
4554 out: &mut ::core::mem::MaybeUninit<
4555 ::fidl_next::wire::Box<'static, crate::wire::NodeSetFlagsRequest>,
4556 >,
4557 _: (),
4558 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4559 if let Some(inner) = this {
4560 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4561 ::fidl_next::wire::Box::encode_present(out);
4562 } else {
4563 ::fidl_next::wire::Box::encode_absent(out);
4564 }
4565
4566 Ok(())
4567 }
4568 }
4569
4570 impl ::fidl_next::FromWire<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
4571 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4572 crate::wire::NodeSetFlagsRequest,
4573 Self,
4574 > = unsafe {
4575 ::fidl_next::CopyOptimization::enable_if(
4576 true
4577
4578 && <
4579 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
4580 >::COPY_OPTIMIZATION.is_enabled()
4581
4582 )
4583 };
4584
4585 #[inline]
4586 fn from_wire(wire: crate::wire::NodeSetFlagsRequest) -> Self {
4587 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
4588 }
4589 }
4590
4591 impl ::fidl_next::FromWireRef<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
4592 #[inline]
4593 fn from_wire_ref(wire: &crate::wire::NodeSetFlagsRequest) -> Self {
4594 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
4595 }
4596 }
4597
4598 #[doc = " Used in places where empty structs are needed, such as empty union members, to avoid creating\n new struct types.\n"]
4599 pub type EmptyStruct = ();
4600
4601 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4602 pub enum SelinuxContext {
4603 Data(::std::vec::Vec<u8>),
4604
4605 UseExtendedAttributes(crate::natural::EmptyStruct),
4606
4607 UnknownOrdinal_(u64),
4608 }
4609
4610 impl SelinuxContext {
4611 pub fn is_unknown(&self) -> bool {
4612 #[allow(unreachable_patterns)]
4613 match self {
4614 Self::UnknownOrdinal_(_) => true,
4615 _ => false,
4616 }
4617 }
4618 }
4619
4620 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E> for SelinuxContext
4621 where
4622 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4623 ___E: ::fidl_next::Encoder,
4624 {
4625 #[inline]
4626 fn encode(
4627 self,
4628 encoder: &mut ___E,
4629 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
4630 _: (),
4631 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4632 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
4633
4634 match self {
4635 Self::Data(value) => ::fidl_next::wire::Union::encode_as::<
4636 ___E,
4637 ::fidl_next::wire::Vector<'static, u8>,
4638 >(value, 1, encoder, raw, (256, ()))?,
4639
4640 Self::UseExtendedAttributes(value) => ::fidl_next::wire::Union::encode_as::<
4641 ___E,
4642 crate::wire::EmptyStruct,
4643 >(value, 2, encoder, raw, ())?,
4644
4645 Self::UnknownOrdinal_(ordinal) => {
4646 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
4647 }
4648 }
4649
4650 Ok(())
4651 }
4652 }
4653
4654 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>
4655 for &'a SelinuxContext
4656 where
4657 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4658 ___E: ::fidl_next::Encoder,
4659 {
4660 #[inline]
4661 fn encode(
4662 self,
4663 encoder: &mut ___E,
4664 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
4665 _: (),
4666 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4667 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
4668
4669 match self {
4670 SelinuxContext::Data(value) => ::fidl_next::wire::Union::encode_as::<
4671 ___E,
4672 ::fidl_next::wire::Vector<'static, u8>,
4673 >(value, 1, encoder, raw, (256, ()))?,
4674
4675 SelinuxContext::UseExtendedAttributes(value) => {
4676 ::fidl_next::wire::Union::encode_as::<___E, crate::wire::EmptyStruct>(
4677 value,
4678 2,
4679 encoder,
4680 raw,
4681 (),
4682 )?
4683 }
4684
4685 SelinuxContext::UnknownOrdinal_(ordinal) => {
4686 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
4687 }
4688 }
4689
4690 Ok(())
4691 }
4692 }
4693
4694 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
4695 for SelinuxContext
4696 where
4697 ___E: ?Sized,
4698 SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
4699 {
4700 #[inline]
4701 fn encode_option(
4702 this: ::core::option::Option<Self>,
4703 encoder: &mut ___E,
4704 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
4705 _: (),
4706 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4707 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
4708
4709 if let Some(inner) = this {
4710 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4711 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4712 } else {
4713 ::fidl_next::wire::Union::encode_absent(raw);
4714 }
4715
4716 Ok(())
4717 }
4718 }
4719
4720 unsafe impl<'a, ___E>
4721 ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
4722 for &'a SelinuxContext
4723 where
4724 ___E: ?Sized,
4725 &'a SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
4726 {
4727 #[inline]
4728 fn encode_option(
4729 this: ::core::option::Option<Self>,
4730 encoder: &mut ___E,
4731 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
4732 _: (),
4733 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4734 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
4735
4736 if let Some(inner) = this {
4737 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4738 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
4739 } else {
4740 ::fidl_next::wire::Union::encode_absent(raw);
4741 }
4742
4743 Ok(())
4744 }
4745 }
4746
4747 impl<'de> ::fidl_next::FromWire<crate::wire::SelinuxContext<'de>> for SelinuxContext {
4748 #[inline]
4749 fn from_wire(wire: crate::wire::SelinuxContext<'de>) -> Self {
4750 let wire = ::core::mem::ManuallyDrop::new(wire);
4751 match wire.raw.ordinal() {
4752 1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
4753 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4754 })),
4755
4756 2 => Self::UseExtendedAttributes(::fidl_next::FromWire::from_wire(unsafe {
4757 wire.raw.get().read_unchecked::<crate::wire::EmptyStruct>()
4758 })),
4759
4760 ord => return Self::UnknownOrdinal_(ord as u64),
4761 }
4762 }
4763 }
4764
4765 impl<'de> ::fidl_next::FromWireRef<crate::wire::SelinuxContext<'de>> for SelinuxContext {
4766 #[inline]
4767 fn from_wire_ref(wire: &crate::wire::SelinuxContext<'de>) -> Self {
4768 match wire.raw.ordinal() {
4769 1 => Self::Data(::fidl_next::FromWireRef::from_wire_ref(unsafe {
4770 wire.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
4771 })),
4772
4773 2 => Self::UseExtendedAttributes(::fidl_next::FromWireRef::from_wire_ref(unsafe {
4774 wire.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
4775 })),
4776
4777 ord => return Self::UnknownOrdinal_(ord as u64),
4778 }
4779 }
4780 }
4781
4782 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
4783 for SelinuxContext
4784 {
4785 #[inline]
4786 fn from_wire_option(
4787 wire: crate::wire_optional::SelinuxContext<'de>,
4788 ) -> ::core::option::Option<Self> {
4789 if let Some(inner) = wire.into_option() {
4790 Some(::fidl_next::FromWire::from_wire(inner))
4791 } else {
4792 None
4793 }
4794 }
4795 }
4796
4797 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
4798 for Box<SelinuxContext>
4799 {
4800 #[inline]
4801 fn from_wire_option(
4802 wire: crate::wire_optional::SelinuxContext<'de>,
4803 ) -> ::core::option::Option<Self> {
4804 <SelinuxContext as ::fidl_next::FromWireOption<
4805 crate::wire_optional::SelinuxContext<'de>,
4806 >>::from_wire_option(wire)
4807 .map(Box::new)
4808 }
4809 }
4810
4811 impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::SelinuxContext<'de>>
4812 for Box<SelinuxContext>
4813 {
4814 #[inline]
4815 fn from_wire_option_ref(
4816 wire: &crate::wire_optional::SelinuxContext<'de>,
4817 ) -> ::core::option::Option<Self> {
4818 if let Some(inner) = wire.as_ref() {
4819 Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
4820 } else {
4821 None
4822 }
4823 }
4824 }
4825
4826 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4827 pub struct MutableNodeAttributes {
4828 pub creation_time: ::core::option::Option<u64>,
4829
4830 pub modification_time: ::core::option::Option<u64>,
4831
4832 pub mode: ::core::option::Option<u32>,
4833
4834 pub uid: ::core::option::Option<u32>,
4835
4836 pub gid: ::core::option::Option<u32>,
4837
4838 pub rdev: ::core::option::Option<u64>,
4839
4840 pub access_time: ::core::option::Option<u64>,
4841
4842 pub casefold: ::core::option::Option<bool>,
4843
4844 pub selinux_context: ::core::option::Option<crate::natural::SelinuxContext>,
4845
4846 pub wrapping_key_id: ::core::option::Option<[u8; 16]>,
4847 }
4848
4849 impl MutableNodeAttributes {
4850 fn __max_ordinal(&self) -> usize {
4851 if self.wrapping_key_id.is_some() {
4852 return 10;
4853 }
4854
4855 if self.selinux_context.is_some() {
4856 return 9;
4857 }
4858
4859 if self.casefold.is_some() {
4860 return 8;
4861 }
4862
4863 if self.access_time.is_some() {
4864 return 7;
4865 }
4866
4867 if self.rdev.is_some() {
4868 return 6;
4869 }
4870
4871 if self.gid.is_some() {
4872 return 5;
4873 }
4874
4875 if self.uid.is_some() {
4876 return 4;
4877 }
4878
4879 if self.mode.is_some() {
4880 return 3;
4881 }
4882
4883 if self.modification_time.is_some() {
4884 return 2;
4885 }
4886
4887 if self.creation_time.is_some() {
4888 return 1;
4889 }
4890
4891 0
4892 }
4893 }
4894
4895 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
4896 for MutableNodeAttributes
4897 where
4898 ___E: ::fidl_next::Encoder + ?Sized,
4899 {
4900 #[inline]
4901 fn encode(
4902 mut self,
4903 encoder: &mut ___E,
4904 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
4905 _: (),
4906 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4907 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
4908
4909 let max_ord = self.__max_ordinal();
4910
4911 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4912 ::fidl_next::Wire::zero_padding(&mut out);
4913
4914 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4915 ::fidl_next::wire::Envelope,
4916 >(encoder, max_ord);
4917
4918 for i in 1..=max_ord {
4919 match i {
4920 10 => {
4921 if let Some(value) = self.wrapping_key_id.take() {
4922 ::fidl_next::wire::Envelope::encode_value::<[u8; 16], ___E>(
4923 value,
4924 preallocated.encoder,
4925 &mut out,
4926 (),
4927 )?;
4928 } else {
4929 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4930 }
4931 }
4932
4933 9 => {
4934 if let Some(value) = self.selinux_context.take() {
4935 ::fidl_next::wire::Envelope::encode_value::<
4936 crate::wire::SelinuxContext<'static>,
4937 ___E,
4938 >(
4939 value, preallocated.encoder, &mut out, ()
4940 )?;
4941 } else {
4942 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4943 }
4944 }
4945
4946 8 => {
4947 if let Some(value) = self.casefold.take() {
4948 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
4949 value,
4950 preallocated.encoder,
4951 &mut out,
4952 (),
4953 )?;
4954 } else {
4955 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4956 }
4957 }
4958
4959 7 => {
4960 if let Some(value) = self.access_time.take() {
4961 ::fidl_next::wire::Envelope::encode_value::<
4962 ::fidl_next::wire::Uint64,
4963 ___E,
4964 >(
4965 value, preallocated.encoder, &mut out, ()
4966 )?;
4967 } else {
4968 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4969 }
4970 }
4971
4972 6 => {
4973 if let Some(value) = self.rdev.take() {
4974 ::fidl_next::wire::Envelope::encode_value::<
4975 ::fidl_next::wire::Uint64,
4976 ___E,
4977 >(
4978 value, preallocated.encoder, &mut out, ()
4979 )?;
4980 } else {
4981 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4982 }
4983 }
4984
4985 5 => {
4986 if let Some(value) = self.gid.take() {
4987 ::fidl_next::wire::Envelope::encode_value::<
4988 ::fidl_next::wire::Uint32,
4989 ___E,
4990 >(
4991 value, preallocated.encoder, &mut out, ()
4992 )?;
4993 } else {
4994 ::fidl_next::wire::Envelope::encode_zero(&mut out)
4995 }
4996 }
4997
4998 4 => {
4999 if let Some(value) = self.uid.take() {
5000 ::fidl_next::wire::Envelope::encode_value::<
5001 ::fidl_next::wire::Uint32,
5002 ___E,
5003 >(
5004 value, preallocated.encoder, &mut out, ()
5005 )?;
5006 } else {
5007 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5008 }
5009 }
5010
5011 3 => {
5012 if let Some(value) = self.mode.take() {
5013 ::fidl_next::wire::Envelope::encode_value::<
5014 ::fidl_next::wire::Uint32,
5015 ___E,
5016 >(
5017 value, preallocated.encoder, &mut out, ()
5018 )?;
5019 } else {
5020 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5021 }
5022 }
5023
5024 2 => {
5025 if let Some(value) = self.modification_time.take() {
5026 ::fidl_next::wire::Envelope::encode_value::<
5027 ::fidl_next::wire::Uint64,
5028 ___E,
5029 >(
5030 value, preallocated.encoder, &mut out, ()
5031 )?;
5032 } else {
5033 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5034 }
5035 }
5036
5037 1 => {
5038 if let Some(value) = self.creation_time.take() {
5039 ::fidl_next::wire::Envelope::encode_value::<
5040 ::fidl_next::wire::Uint64,
5041 ___E,
5042 >(
5043 value, preallocated.encoder, &mut out, ()
5044 )?;
5045 } else {
5046 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5047 }
5048 }
5049
5050 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5051 }
5052 unsafe {
5053 preallocated.write_next(out.assume_init_ref());
5054 }
5055 }
5056
5057 ::fidl_next::wire::Table::encode_len(table, max_ord);
5058
5059 Ok(())
5060 }
5061 }
5062
5063 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
5064 for &'a MutableNodeAttributes
5065 where
5066 ___E: ::fidl_next::Encoder + ?Sized,
5067 {
5068 #[inline]
5069 fn encode(
5070 self,
5071 encoder: &mut ___E,
5072 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
5073 _: (),
5074 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5075 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
5076
5077 let max_ord = self.__max_ordinal();
5078
5079 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5080 ::fidl_next::Wire::zero_padding(&mut out);
5081
5082 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5083 ::fidl_next::wire::Envelope,
5084 >(encoder, max_ord);
5085
5086 for i in 1..=max_ord {
5087 match i {
5088 10 => {
5089 if let Some(value) = &self.wrapping_key_id {
5090 ::fidl_next::wire::Envelope::encode_value::<[u8; 16], ___E>(
5091 value,
5092 preallocated.encoder,
5093 &mut out,
5094 (),
5095 )?;
5096 } else {
5097 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5098 }
5099 }
5100
5101 9 => {
5102 if let Some(value) = &self.selinux_context {
5103 ::fidl_next::wire::Envelope::encode_value::<
5104 crate::wire::SelinuxContext<'static>,
5105 ___E,
5106 >(
5107 value, preallocated.encoder, &mut out, ()
5108 )?;
5109 } else {
5110 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5111 }
5112 }
5113
5114 8 => {
5115 if let Some(value) = &self.casefold {
5116 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5117 value,
5118 preallocated.encoder,
5119 &mut out,
5120 (),
5121 )?;
5122 } else {
5123 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5124 }
5125 }
5126
5127 7 => {
5128 if let Some(value) = &self.access_time {
5129 ::fidl_next::wire::Envelope::encode_value::<
5130 ::fidl_next::wire::Uint64,
5131 ___E,
5132 >(
5133 value, preallocated.encoder, &mut out, ()
5134 )?;
5135 } else {
5136 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5137 }
5138 }
5139
5140 6 => {
5141 if let Some(value) = &self.rdev {
5142 ::fidl_next::wire::Envelope::encode_value::<
5143 ::fidl_next::wire::Uint64,
5144 ___E,
5145 >(
5146 value, preallocated.encoder, &mut out, ()
5147 )?;
5148 } else {
5149 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5150 }
5151 }
5152
5153 5 => {
5154 if let Some(value) = &self.gid {
5155 ::fidl_next::wire::Envelope::encode_value::<
5156 ::fidl_next::wire::Uint32,
5157 ___E,
5158 >(
5159 value, preallocated.encoder, &mut out, ()
5160 )?;
5161 } else {
5162 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5163 }
5164 }
5165
5166 4 => {
5167 if let Some(value) = &self.uid {
5168 ::fidl_next::wire::Envelope::encode_value::<
5169 ::fidl_next::wire::Uint32,
5170 ___E,
5171 >(
5172 value, preallocated.encoder, &mut out, ()
5173 )?;
5174 } else {
5175 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5176 }
5177 }
5178
5179 3 => {
5180 if let Some(value) = &self.mode {
5181 ::fidl_next::wire::Envelope::encode_value::<
5182 ::fidl_next::wire::Uint32,
5183 ___E,
5184 >(
5185 value, preallocated.encoder, &mut out, ()
5186 )?;
5187 } else {
5188 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5189 }
5190 }
5191
5192 2 => {
5193 if let Some(value) = &self.modification_time {
5194 ::fidl_next::wire::Envelope::encode_value::<
5195 ::fidl_next::wire::Uint64,
5196 ___E,
5197 >(
5198 value, preallocated.encoder, &mut out, ()
5199 )?;
5200 } else {
5201 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5202 }
5203 }
5204
5205 1 => {
5206 if let Some(value) = &self.creation_time {
5207 ::fidl_next::wire::Envelope::encode_value::<
5208 ::fidl_next::wire::Uint64,
5209 ___E,
5210 >(
5211 value, preallocated.encoder, &mut out, ()
5212 )?;
5213 } else {
5214 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5215 }
5216 }
5217
5218 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5219 }
5220 unsafe {
5221 preallocated.write_next(out.assume_init_ref());
5222 }
5223 }
5224
5225 ::fidl_next::wire::Table::encode_len(table, max_ord);
5226
5227 Ok(())
5228 }
5229 }
5230
5231 impl<'de> ::fidl_next::FromWire<crate::wire::MutableNodeAttributes<'de>> for MutableNodeAttributes {
5232 #[inline]
5233 fn from_wire(wire_: crate::wire::MutableNodeAttributes<'de>) -> Self {
5234 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5235
5236 let creation_time = wire_.table.get(1);
5237
5238 let modification_time = wire_.table.get(2);
5239
5240 let mode = wire_.table.get(3);
5241
5242 let uid = wire_.table.get(4);
5243
5244 let gid = wire_.table.get(5);
5245
5246 let rdev = wire_.table.get(6);
5247
5248 let access_time = wire_.table.get(7);
5249
5250 let casefold = wire_.table.get(8);
5251
5252 let selinux_context = wire_.table.get(9);
5253
5254 let wrapping_key_id = wire_.table.get(10);
5255
5256 Self {
5257 creation_time: creation_time.map(|envelope| {
5258 ::fidl_next::FromWire::from_wire(unsafe {
5259 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5260 })
5261 }),
5262
5263 modification_time: modification_time.map(|envelope| {
5264 ::fidl_next::FromWire::from_wire(unsafe {
5265 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5266 })
5267 }),
5268
5269 mode: mode.map(|envelope| {
5270 ::fidl_next::FromWire::from_wire(unsafe {
5271 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5272 })
5273 }),
5274
5275 uid: uid.map(|envelope| {
5276 ::fidl_next::FromWire::from_wire(unsafe {
5277 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5278 })
5279 }),
5280
5281 gid: gid.map(|envelope| {
5282 ::fidl_next::FromWire::from_wire(unsafe {
5283 envelope.read_unchecked::<::fidl_next::wire::Uint32>()
5284 })
5285 }),
5286
5287 rdev: rdev.map(|envelope| {
5288 ::fidl_next::FromWire::from_wire(unsafe {
5289 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5290 })
5291 }),
5292
5293 access_time: access_time.map(|envelope| {
5294 ::fidl_next::FromWire::from_wire(unsafe {
5295 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
5296 })
5297 }),
5298
5299 casefold: casefold.map(|envelope| {
5300 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
5301 }),
5302
5303 selinux_context: selinux_context.map(|envelope| {
5304 ::fidl_next::FromWire::from_wire(unsafe {
5305 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
5306 })
5307 }),
5308
5309 wrapping_key_id: wrapping_key_id.map(|envelope| {
5310 ::fidl_next::FromWire::from_wire(unsafe {
5311 envelope.read_unchecked::<[u8; 16]>()
5312 })
5313 }),
5314 }
5315 }
5316 }
5317
5318 impl<'de> ::fidl_next::FromWireRef<crate::wire::MutableNodeAttributes<'de>>
5319 for MutableNodeAttributes
5320 {
5321 #[inline]
5322 fn from_wire_ref(wire: &crate::wire::MutableNodeAttributes<'de>) -> Self {
5323 Self {
5324 creation_time: wire.table.get(1).map(|envelope| {
5325 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5326 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5327 })
5328 }),
5329
5330 modification_time: wire.table.get(2).map(|envelope| {
5331 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5332 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5333 })
5334 }),
5335
5336 mode: wire.table.get(3).map(|envelope| {
5337 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5338 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5339 })
5340 }),
5341
5342 uid: wire.table.get(4).map(|envelope| {
5343 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5344 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5345 })
5346 }),
5347
5348 gid: wire.table.get(5).map(|envelope| {
5349 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5350 envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
5351 })
5352 }),
5353
5354 rdev: wire.table.get(6).map(|envelope| {
5355 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5356 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5357 })
5358 }),
5359
5360 access_time: wire.table.get(7).map(|envelope| {
5361 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5362 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
5363 })
5364 }),
5365
5366 casefold: wire.table.get(8).map(|envelope| {
5367 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5368 envelope.deref_unchecked::<bool>()
5369 })
5370 }),
5371
5372 selinux_context: wire.table.get(9).map(|envelope| {
5373 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5374 envelope.deref_unchecked::<crate::wire::SelinuxContext<'de>>()
5375 })
5376 }),
5377
5378 wrapping_key_id: wire.table.get(10).map(|envelope| {
5379 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5380 envelope.deref_unchecked::<[u8; 16]>()
5381 })
5382 }),
5383 }
5384 }
5385 }
5386
5387 ::fidl_next::bitflags::bitflags! {
5388 #[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 {
5389 #[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;
5390 #[doc = " The directory representation of a node.\n\n The connection will speak the [`Directory`] protocol.\n"]const DIRECTORY = 2;
5391 #[doc = " The file representation of a node.\n\n The connection will speak the [`File`] protocol.\n"]const FILE = 4;
5392 #[doc = " The symlink representation of a node.\n\n The connection will speak the [`Symlink`] protocol.\n"]const SYMLINK = 8;
5393 const _ = !0;
5394 }
5395 }
5396
5397 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E> for NodeProtocolKinds
5398 where
5399 ___E: ?Sized,
5400 {
5401 #[inline]
5402 fn encode(
5403 self,
5404 encoder: &mut ___E,
5405 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
5406 _: (),
5407 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5408 ::fidl_next::Encode::encode(&self, encoder, out, ())
5409 }
5410 }
5411
5412 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E>
5413 for &'a NodeProtocolKinds
5414 where
5415 ___E: ?Sized,
5416 {
5417 #[inline]
5418 fn encode(
5419 self,
5420 _: &mut ___E,
5421 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
5422 _: (),
5423 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5424 ::fidl_next::munge!(let crate::wire::NodeProtocolKinds { value } = out);
5425
5426 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
5427 Ok(())
5428 }
5429 }
5430
5431 impl ::core::convert::From<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5432 fn from(wire: crate::wire::NodeProtocolKinds) -> Self {
5433 Self::from_bits_retain(u64::from(wire.value))
5434 }
5435 }
5436
5437 impl ::fidl_next::FromWire<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5438 #[inline]
5439 fn from_wire(wire: crate::wire::NodeProtocolKinds) -> Self {
5440 Self::from(wire)
5441 }
5442 }
5443
5444 impl ::fidl_next::FromWireRef<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
5445 #[inline]
5446 fn from_wire_ref(wire: &crate::wire::NodeProtocolKinds) -> Self {
5447 Self::from(*wire)
5448 }
5449 }
5450
5451 #[doc = " Denotes which hash algorithm is used to build the merkle tree for\n fsverity-enabled files.\n"]
5452 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5453 #[repr(u8)]
5454 pub enum HashAlgorithm {
5455 Sha256 = 1,
5456 Sha512 = 2,
5457 UnknownOrdinal_(u8) = 3,
5458 }
5459 impl ::std::convert::From<u8> for HashAlgorithm {
5460 fn from(value: u8) -> Self {
5461 match value {
5462 1 => Self::Sha256,
5463 2 => Self::Sha512,
5464
5465 _ => Self::UnknownOrdinal_(value),
5466 }
5467 }
5468 }
5469
5470 impl ::std::convert::From<HashAlgorithm> for u8 {
5471 fn from(value: HashAlgorithm) -> Self {
5472 match value {
5473 HashAlgorithm::Sha256 => 1,
5474 HashAlgorithm::Sha512 => 2,
5475
5476 HashAlgorithm::UnknownOrdinal_(value) => value,
5477 }
5478 }
5479 }
5480
5481 unsafe impl<___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for HashAlgorithm
5482 where
5483 ___E: ?Sized,
5484 {
5485 #[inline]
5486 fn encode(
5487 self,
5488 encoder: &mut ___E,
5489 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
5490 _: (),
5491 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5492 ::fidl_next::Encode::encode(&self, encoder, out, ())
5493 }
5494 }
5495
5496 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for &'a HashAlgorithm
5497 where
5498 ___E: ?Sized,
5499 {
5500 #[inline]
5501 fn encode(
5502 self,
5503 encoder: &mut ___E,
5504 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
5505 _: (),
5506 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5507 ::fidl_next::munge!(let crate::wire::HashAlgorithm { value } = out);
5508 let _ = value.write(u8::from(match *self {
5509 HashAlgorithm::Sha256 => 1,
5510
5511 HashAlgorithm::Sha512 => 2,
5512
5513 HashAlgorithm::UnknownOrdinal_(value) => value,
5514 }));
5515
5516 Ok(())
5517 }
5518 }
5519
5520 impl ::core::convert::From<crate::wire::HashAlgorithm> for HashAlgorithm {
5521 fn from(wire: crate::wire::HashAlgorithm) -> Self {
5522 match u8::from(wire.value) {
5523 1 => Self::Sha256,
5524
5525 2 => Self::Sha512,
5526
5527 value => Self::UnknownOrdinal_(value),
5528 }
5529 }
5530 }
5531
5532 impl ::fidl_next::FromWire<crate::wire::HashAlgorithm> for HashAlgorithm {
5533 #[inline]
5534 fn from_wire(wire: crate::wire::HashAlgorithm) -> Self {
5535 Self::from(wire)
5536 }
5537 }
5538
5539 impl ::fidl_next::FromWireRef<crate::wire::HashAlgorithm> for HashAlgorithm {
5540 #[inline]
5541 fn from_wire_ref(wire: &crate::wire::HashAlgorithm) -> Self {
5542 Self::from(*wire)
5543 }
5544 }
5545
5546 #[doc = " Set of options used to enable verity on a file.\n"]
5547 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5548 pub struct VerificationOptions {
5549 pub hash_algorithm: ::core::option::Option<crate::natural::HashAlgorithm>,
5550
5551 pub salt: ::core::option::Option<::std::vec::Vec<u8>>,
5552 }
5553
5554 impl VerificationOptions {
5555 fn __max_ordinal(&self) -> usize {
5556 if self.salt.is_some() {
5557 return 2;
5558 }
5559
5560 if self.hash_algorithm.is_some() {
5561 return 1;
5562 }
5563
5564 0
5565 }
5566 }
5567
5568 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
5569 for VerificationOptions
5570 where
5571 ___E: ::fidl_next::Encoder + ?Sized,
5572 {
5573 #[inline]
5574 fn encode(
5575 mut self,
5576 encoder: &mut ___E,
5577 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
5578 _: (),
5579 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5580 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
5581
5582 let max_ord = self.__max_ordinal();
5583
5584 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5585 ::fidl_next::Wire::zero_padding(&mut out);
5586
5587 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5588 ::fidl_next::wire::Envelope,
5589 >(encoder, max_ord);
5590
5591 for i in 1..=max_ord {
5592 match i {
5593 2 => {
5594 if let Some(value) = self.salt.take() {
5595 ::fidl_next::wire::Envelope::encode_value::<
5596 ::fidl_next::wire::Vector<'static, u8>,
5597 ___E,
5598 >(
5599 value, preallocated.encoder, &mut out, (32, ())
5600 )?;
5601 } else {
5602 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5603 }
5604 }
5605
5606 1 => {
5607 if let Some(value) = self.hash_algorithm.take() {
5608 ::fidl_next::wire::Envelope::encode_value::<
5609 crate::wire::HashAlgorithm,
5610 ___E,
5611 >(
5612 value, preallocated.encoder, &mut out, ()
5613 )?;
5614 } else {
5615 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5616 }
5617 }
5618
5619 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5620 }
5621 unsafe {
5622 preallocated.write_next(out.assume_init_ref());
5623 }
5624 }
5625
5626 ::fidl_next::wire::Table::encode_len(table, max_ord);
5627
5628 Ok(())
5629 }
5630 }
5631
5632 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
5633 for &'a VerificationOptions
5634 where
5635 ___E: ::fidl_next::Encoder + ?Sized,
5636 {
5637 #[inline]
5638 fn encode(
5639 self,
5640 encoder: &mut ___E,
5641 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
5642 _: (),
5643 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5644 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
5645
5646 let max_ord = self.__max_ordinal();
5647
5648 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5649 ::fidl_next::Wire::zero_padding(&mut out);
5650
5651 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5652 ::fidl_next::wire::Envelope,
5653 >(encoder, max_ord);
5654
5655 for i in 1..=max_ord {
5656 match i {
5657 2 => {
5658 if let Some(value) = &self.salt {
5659 ::fidl_next::wire::Envelope::encode_value::<
5660 ::fidl_next::wire::Vector<'static, u8>,
5661 ___E,
5662 >(
5663 value, preallocated.encoder, &mut out, (32, ())
5664 )?;
5665 } else {
5666 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5667 }
5668 }
5669
5670 1 => {
5671 if let Some(value) = &self.hash_algorithm {
5672 ::fidl_next::wire::Envelope::encode_value::<
5673 crate::wire::HashAlgorithm,
5674 ___E,
5675 >(
5676 value, preallocated.encoder, &mut out, ()
5677 )?;
5678 } else {
5679 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5680 }
5681 }
5682
5683 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5684 }
5685 unsafe {
5686 preallocated.write_next(out.assume_init_ref());
5687 }
5688 }
5689
5690 ::fidl_next::wire::Table::encode_len(table, max_ord);
5691
5692 Ok(())
5693 }
5694 }
5695
5696 impl<'de> ::fidl_next::FromWire<crate::wire::VerificationOptions<'de>> for VerificationOptions {
5697 #[inline]
5698 fn from_wire(wire_: crate::wire::VerificationOptions<'de>) -> Self {
5699 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5700
5701 let hash_algorithm = wire_.table.get(1);
5702
5703 let salt = wire_.table.get(2);
5704
5705 Self {
5706 hash_algorithm: hash_algorithm.map(|envelope| {
5707 ::fidl_next::FromWire::from_wire(unsafe {
5708 envelope.read_unchecked::<crate::wire::HashAlgorithm>()
5709 })
5710 }),
5711
5712 salt: salt.map(|envelope| {
5713 ::fidl_next::FromWire::from_wire(unsafe {
5714 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
5715 })
5716 }),
5717 }
5718 }
5719 }
5720
5721 impl<'de> ::fidl_next::FromWireRef<crate::wire::VerificationOptions<'de>> for VerificationOptions {
5722 #[inline]
5723 fn from_wire_ref(wire: &crate::wire::VerificationOptions<'de>) -> Self {
5724 Self {
5725 hash_algorithm: wire.table.get(1).map(|envelope| {
5726 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5727 envelope.deref_unchecked::<crate::wire::HashAlgorithm>()
5728 })
5729 }),
5730
5731 salt: wire.table.get(2).map(|envelope| {
5732 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5733 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
5734 })
5735 }),
5736 }
5737 }
5738 }
5739
5740 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5741 pub struct ImmutableNodeAttributes {
5742 pub protocols: ::core::option::Option<crate::natural::NodeProtocolKinds>,
5743
5744 pub abilities: ::core::option::Option<crate::natural::Operations>,
5745
5746 pub content_size: ::core::option::Option<u64>,
5747
5748 pub storage_size: ::core::option::Option<u64>,
5749
5750 pub link_count: ::core::option::Option<u64>,
5751
5752 pub id: ::core::option::Option<u64>,
5753
5754 pub change_time: ::core::option::Option<u64>,
5755
5756 pub options: ::core::option::Option<crate::natural::VerificationOptions>,
5757
5758 pub root_hash: ::core::option::Option<::std::vec::Vec<u8>>,
5759
5760 pub verity_enabled: ::core::option::Option<bool>,
5761 }
5762
5763 impl ImmutableNodeAttributes {
5764 fn __max_ordinal(&self) -> usize {
5765 if self.verity_enabled.is_some() {
5766 return 10;
5767 }
5768
5769 if self.root_hash.is_some() {
5770 return 9;
5771 }
5772
5773 if self.options.is_some() {
5774 return 8;
5775 }
5776
5777 if self.change_time.is_some() {
5778 return 7;
5779 }
5780
5781 if self.id.is_some() {
5782 return 6;
5783 }
5784
5785 if self.link_count.is_some() {
5786 return 5;
5787 }
5788
5789 if self.storage_size.is_some() {
5790 return 4;
5791 }
5792
5793 if self.content_size.is_some() {
5794 return 3;
5795 }
5796
5797 if self.abilities.is_some() {
5798 return 2;
5799 }
5800
5801 if self.protocols.is_some() {
5802 return 1;
5803 }
5804
5805 0
5806 }
5807 }
5808
5809 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
5810 for ImmutableNodeAttributes
5811 where
5812 ___E: ::fidl_next::Encoder + ?Sized,
5813 {
5814 #[inline]
5815 fn encode(
5816 mut self,
5817 encoder: &mut ___E,
5818 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
5819 _: (),
5820 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5821 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
5822
5823 let max_ord = self.__max_ordinal();
5824
5825 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5826 ::fidl_next::Wire::zero_padding(&mut out);
5827
5828 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5829 ::fidl_next::wire::Envelope,
5830 >(encoder, max_ord);
5831
5832 for i in 1..=max_ord {
5833 match i {
5834 10 => {
5835 if let Some(value) = self.verity_enabled.take() {
5836 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
5837 value,
5838 preallocated.encoder,
5839 &mut out,
5840 (),
5841 )?;
5842 } else {
5843 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5844 }
5845 }
5846
5847 9 => {
5848 if let Some(value) = self.root_hash.take() {
5849 ::fidl_next::wire::Envelope::encode_value::<
5850 ::fidl_next::wire::Vector<'static, u8>,
5851 ___E,
5852 >(
5853 value, preallocated.encoder, &mut out, (64, ())
5854 )?;
5855 } else {
5856 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5857 }
5858 }
5859
5860 8 => {
5861 if let Some(value) = self.options.take() {
5862 ::fidl_next::wire::Envelope::encode_value::<
5863 crate::wire::VerificationOptions<'static>,
5864 ___E,
5865 >(
5866 value, preallocated.encoder, &mut out, ()
5867 )?;
5868 } else {
5869 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5870 }
5871 }
5872
5873 7 => {
5874 if let Some(value) = self.change_time.take() {
5875 ::fidl_next::wire::Envelope::encode_value::<
5876 ::fidl_next::wire::Uint64,
5877 ___E,
5878 >(
5879 value, preallocated.encoder, &mut out, ()
5880 )?;
5881 } else {
5882 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5883 }
5884 }
5885
5886 6 => {
5887 if let Some(value) = self.id.take() {
5888 ::fidl_next::wire::Envelope::encode_value::<
5889 ::fidl_next::wire::Uint64,
5890 ___E,
5891 >(
5892 value, preallocated.encoder, &mut out, ()
5893 )?;
5894 } else {
5895 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5896 }
5897 }
5898
5899 5 => {
5900 if let Some(value) = self.link_count.take() {
5901 ::fidl_next::wire::Envelope::encode_value::<
5902 ::fidl_next::wire::Uint64,
5903 ___E,
5904 >(
5905 value, preallocated.encoder, &mut out, ()
5906 )?;
5907 } else {
5908 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5909 }
5910 }
5911
5912 4 => {
5913 if let Some(value) = self.storage_size.take() {
5914 ::fidl_next::wire::Envelope::encode_value::<
5915 ::fidl_next::wire::Uint64,
5916 ___E,
5917 >(
5918 value, preallocated.encoder, &mut out, ()
5919 )?;
5920 } else {
5921 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5922 }
5923 }
5924
5925 3 => {
5926 if let Some(value) = self.content_size.take() {
5927 ::fidl_next::wire::Envelope::encode_value::<
5928 ::fidl_next::wire::Uint64,
5929 ___E,
5930 >(
5931 value, preallocated.encoder, &mut out, ()
5932 )?;
5933 } else {
5934 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5935 }
5936 }
5937
5938 2 => {
5939 if let Some(value) = self.abilities.take() {
5940 ::fidl_next::wire::Envelope::encode_value::<
5941 crate::wire::Operations,
5942 ___E,
5943 >(
5944 value, preallocated.encoder, &mut out, ()
5945 )?;
5946 } else {
5947 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5948 }
5949 }
5950
5951 1 => {
5952 if let Some(value) = self.protocols.take() {
5953 ::fidl_next::wire::Envelope::encode_value::<
5954 crate::wire::NodeProtocolKinds,
5955 ___E,
5956 >(
5957 value, preallocated.encoder, &mut out, ()
5958 )?;
5959 } else {
5960 ::fidl_next::wire::Envelope::encode_zero(&mut out)
5961 }
5962 }
5963
5964 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5965 }
5966 unsafe {
5967 preallocated.write_next(out.assume_init_ref());
5968 }
5969 }
5970
5971 ::fidl_next::wire::Table::encode_len(table, max_ord);
5972
5973 Ok(())
5974 }
5975 }
5976
5977 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
5978 for &'a ImmutableNodeAttributes
5979 where
5980 ___E: ::fidl_next::Encoder + ?Sized,
5981 {
5982 #[inline]
5983 fn encode(
5984 self,
5985 encoder: &mut ___E,
5986 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
5987 _: (),
5988 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5989 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
5990
5991 let max_ord = self.__max_ordinal();
5992
5993 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5994 ::fidl_next::Wire::zero_padding(&mut out);
5995
5996 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5997 ::fidl_next::wire::Envelope,
5998 >(encoder, max_ord);
5999
6000 for i in 1..=max_ord {
6001 match i {
6002 10 => {
6003 if let Some(value) = &self.verity_enabled {
6004 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
6005 value,
6006 preallocated.encoder,
6007 &mut out,
6008 (),
6009 )?;
6010 } else {
6011 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6012 }
6013 }
6014
6015 9 => {
6016 if let Some(value) = &self.root_hash {
6017 ::fidl_next::wire::Envelope::encode_value::<
6018 ::fidl_next::wire::Vector<'static, u8>,
6019 ___E,
6020 >(
6021 value, preallocated.encoder, &mut out, (64, ())
6022 )?;
6023 } else {
6024 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6025 }
6026 }
6027
6028 8 => {
6029 if let Some(value) = &self.options {
6030 ::fidl_next::wire::Envelope::encode_value::<
6031 crate::wire::VerificationOptions<'static>,
6032 ___E,
6033 >(
6034 value, preallocated.encoder, &mut out, ()
6035 )?;
6036 } else {
6037 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6038 }
6039 }
6040
6041 7 => {
6042 if let Some(value) = &self.change_time {
6043 ::fidl_next::wire::Envelope::encode_value::<
6044 ::fidl_next::wire::Uint64,
6045 ___E,
6046 >(
6047 value, preallocated.encoder, &mut out, ()
6048 )?;
6049 } else {
6050 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6051 }
6052 }
6053
6054 6 => {
6055 if let Some(value) = &self.id {
6056 ::fidl_next::wire::Envelope::encode_value::<
6057 ::fidl_next::wire::Uint64,
6058 ___E,
6059 >(
6060 value, preallocated.encoder, &mut out, ()
6061 )?;
6062 } else {
6063 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6064 }
6065 }
6066
6067 5 => {
6068 if let Some(value) = &self.link_count {
6069 ::fidl_next::wire::Envelope::encode_value::<
6070 ::fidl_next::wire::Uint64,
6071 ___E,
6072 >(
6073 value, preallocated.encoder, &mut out, ()
6074 )?;
6075 } else {
6076 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6077 }
6078 }
6079
6080 4 => {
6081 if let Some(value) = &self.storage_size {
6082 ::fidl_next::wire::Envelope::encode_value::<
6083 ::fidl_next::wire::Uint64,
6084 ___E,
6085 >(
6086 value, preallocated.encoder, &mut out, ()
6087 )?;
6088 } else {
6089 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6090 }
6091 }
6092
6093 3 => {
6094 if let Some(value) = &self.content_size {
6095 ::fidl_next::wire::Envelope::encode_value::<
6096 ::fidl_next::wire::Uint64,
6097 ___E,
6098 >(
6099 value, preallocated.encoder, &mut out, ()
6100 )?;
6101 } else {
6102 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6103 }
6104 }
6105
6106 2 => {
6107 if let Some(value) = &self.abilities {
6108 ::fidl_next::wire::Envelope::encode_value::<
6109 crate::wire::Operations,
6110 ___E,
6111 >(
6112 value, preallocated.encoder, &mut out, ()
6113 )?;
6114 } else {
6115 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6116 }
6117 }
6118
6119 1 => {
6120 if let Some(value) = &self.protocols {
6121 ::fidl_next::wire::Envelope::encode_value::<
6122 crate::wire::NodeProtocolKinds,
6123 ___E,
6124 >(
6125 value, preallocated.encoder, &mut out, ()
6126 )?;
6127 } else {
6128 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6129 }
6130 }
6131
6132 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6133 }
6134 unsafe {
6135 preallocated.write_next(out.assume_init_ref());
6136 }
6137 }
6138
6139 ::fidl_next::wire::Table::encode_len(table, max_ord);
6140
6141 Ok(())
6142 }
6143 }
6144
6145 impl<'de> ::fidl_next::FromWire<crate::wire::ImmutableNodeAttributes<'de>>
6146 for ImmutableNodeAttributes
6147 {
6148 #[inline]
6149 fn from_wire(wire_: crate::wire::ImmutableNodeAttributes<'de>) -> Self {
6150 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6151
6152 let protocols = wire_.table.get(1);
6153
6154 let abilities = wire_.table.get(2);
6155
6156 let content_size = wire_.table.get(3);
6157
6158 let storage_size = wire_.table.get(4);
6159
6160 let link_count = wire_.table.get(5);
6161
6162 let id = wire_.table.get(6);
6163
6164 let change_time = wire_.table.get(7);
6165
6166 let options = wire_.table.get(8);
6167
6168 let root_hash = wire_.table.get(9);
6169
6170 let verity_enabled = wire_.table.get(10);
6171
6172 Self {
6173 protocols: protocols.map(|envelope| {
6174 ::fidl_next::FromWire::from_wire(unsafe {
6175 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
6176 })
6177 }),
6178
6179 abilities: abilities.map(|envelope| {
6180 ::fidl_next::FromWire::from_wire(unsafe {
6181 envelope.read_unchecked::<crate::wire::Operations>()
6182 })
6183 }),
6184
6185 content_size: content_size.map(|envelope| {
6186 ::fidl_next::FromWire::from_wire(unsafe {
6187 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6188 })
6189 }),
6190
6191 storage_size: storage_size.map(|envelope| {
6192 ::fidl_next::FromWire::from_wire(unsafe {
6193 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6194 })
6195 }),
6196
6197 link_count: link_count.map(|envelope| {
6198 ::fidl_next::FromWire::from_wire(unsafe {
6199 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6200 })
6201 }),
6202
6203 id: id.map(|envelope| {
6204 ::fidl_next::FromWire::from_wire(unsafe {
6205 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6206 })
6207 }),
6208
6209 change_time: change_time.map(|envelope| {
6210 ::fidl_next::FromWire::from_wire(unsafe {
6211 envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6212 })
6213 }),
6214
6215 options: options.map(|envelope| {
6216 ::fidl_next::FromWire::from_wire(unsafe {
6217 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
6218 })
6219 }),
6220
6221 root_hash: root_hash.map(|envelope| {
6222 ::fidl_next::FromWire::from_wire(unsafe {
6223 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6224 })
6225 }),
6226
6227 verity_enabled: verity_enabled.map(|envelope| {
6228 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
6229 }),
6230 }
6231 }
6232 }
6233
6234 impl<'de> ::fidl_next::FromWireRef<crate::wire::ImmutableNodeAttributes<'de>>
6235 for ImmutableNodeAttributes
6236 {
6237 #[inline]
6238 fn from_wire_ref(wire: &crate::wire::ImmutableNodeAttributes<'de>) -> Self {
6239 Self {
6240 protocols: wire.table.get(1).map(|envelope| {
6241 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6242 envelope.deref_unchecked::<crate::wire::NodeProtocolKinds>()
6243 })
6244 }),
6245
6246 abilities: wire.table.get(2).map(|envelope| {
6247 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6248 envelope.deref_unchecked::<crate::wire::Operations>()
6249 })
6250 }),
6251
6252 content_size: wire.table.get(3).map(|envelope| {
6253 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6254 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6255 })
6256 }),
6257
6258 storage_size: wire.table.get(4).map(|envelope| {
6259 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6260 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6261 })
6262 }),
6263
6264 link_count: wire.table.get(5).map(|envelope| {
6265 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6266 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6267 })
6268 }),
6269
6270 id: wire.table.get(6).map(|envelope| {
6271 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6272 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6273 })
6274 }),
6275
6276 change_time: wire.table.get(7).map(|envelope| {
6277 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6278 envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6279 })
6280 }),
6281
6282 options: wire.table.get(8).map(|envelope| {
6283 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6284 envelope.deref_unchecked::<crate::wire::VerificationOptions<'de>>()
6285 })
6286 }),
6287
6288 root_hash: wire.table.get(9).map(|envelope| {
6289 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6290 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6291 })
6292 }),
6293
6294 verity_enabled: wire.table.get(10).map(|envelope| {
6295 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6296 envelope.deref_unchecked::<bool>()
6297 })
6298 }),
6299 }
6300 }
6301 }
6302
6303 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6304 pub struct NodeAttributes2 {
6305 pub mutable_attributes: crate::natural::MutableNodeAttributes,
6306
6307 pub immutable_attributes: crate::natural::ImmutableNodeAttributes,
6308 }
6309
6310 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
6311 for NodeAttributes2
6312 where
6313 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6314 ___E: ::fidl_next::Encoder,
6315 {
6316 #[inline]
6317 fn encode(
6318 self,
6319 encoder_: &mut ___E,
6320 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
6321 _: (),
6322 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6323 ::fidl_next::munge! {
6324 let crate::wire::NodeAttributes2 {
6325 mutable_attributes,
6326 immutable_attributes,
6327
6328 } = out_;
6329 }
6330
6331 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
6332
6333 let mut _field =
6334 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
6335
6336 ::fidl_next::Encode::encode(
6337 self.immutable_attributes,
6338 encoder_,
6339 immutable_attributes,
6340 (),
6341 )?;
6342
6343 let mut _field =
6344 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
6345
6346 Ok(())
6347 }
6348 }
6349
6350 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
6351 for &'a NodeAttributes2
6352 where
6353 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6354 ___E: ::fidl_next::Encoder,
6355 {
6356 #[inline]
6357 fn encode(
6358 self,
6359 encoder_: &mut ___E,
6360 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
6361 _: (),
6362 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6363 ::fidl_next::munge! {
6364 let crate::wire::NodeAttributes2 {
6365 mutable_attributes,
6366 immutable_attributes,
6367
6368 } = out_;
6369 }
6370
6371 ::fidl_next::Encode::encode(
6372 &self.mutable_attributes,
6373 encoder_,
6374 mutable_attributes,
6375 (),
6376 )?;
6377
6378 let mut _field =
6379 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
6380
6381 ::fidl_next::Encode::encode(
6382 &self.immutable_attributes,
6383 encoder_,
6384 immutable_attributes,
6385 (),
6386 )?;
6387
6388 let mut _field =
6389 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
6390
6391 Ok(())
6392 }
6393 }
6394
6395 unsafe impl<___E>
6396 ::fidl_next::EncodeOption<
6397 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6398 ___E,
6399 > for NodeAttributes2
6400 where
6401 ___E: ::fidl_next::Encoder + ?Sized,
6402 NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
6403 {
6404 #[inline]
6405 fn encode_option(
6406 this: ::core::option::Option<Self>,
6407 encoder: &mut ___E,
6408 out: &mut ::core::mem::MaybeUninit<
6409 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6410 >,
6411 _: (),
6412 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6413 if let Some(inner) = this {
6414 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6415 ::fidl_next::wire::Box::encode_present(out);
6416 } else {
6417 ::fidl_next::wire::Box::encode_absent(out);
6418 }
6419
6420 Ok(())
6421 }
6422 }
6423
6424 unsafe impl<'a, ___E>
6425 ::fidl_next::EncodeOption<
6426 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6427 ___E,
6428 > for &'a NodeAttributes2
6429 where
6430 ___E: ::fidl_next::Encoder + ?Sized,
6431 &'a NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
6432 {
6433 #[inline]
6434 fn encode_option(
6435 this: ::core::option::Option<Self>,
6436 encoder: &mut ___E,
6437 out: &mut ::core::mem::MaybeUninit<
6438 ::fidl_next::wire::Box<'static, crate::wire::NodeAttributes2<'static>>,
6439 >,
6440 _: (),
6441 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6442 if let Some(inner) = this {
6443 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6444 ::fidl_next::wire::Box::encode_present(out);
6445 } else {
6446 ::fidl_next::wire::Box::encode_absent(out);
6447 }
6448
6449 Ok(())
6450 }
6451 }
6452
6453 impl<'de> ::fidl_next::FromWire<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
6454 #[inline]
6455 fn from_wire(wire: crate::wire::NodeAttributes2<'de>) -> Self {
6456 Self {
6457 mutable_attributes: ::fidl_next::FromWire::from_wire(wire.mutable_attributes),
6458
6459 immutable_attributes: ::fidl_next::FromWire::from_wire(wire.immutable_attributes),
6460 }
6461 }
6462 }
6463
6464 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
6465 #[inline]
6466 fn from_wire_ref(wire: &crate::wire::NodeAttributes2<'de>) -> Self {
6467 Self {
6468 mutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
6469 &wire.mutable_attributes,
6470 ),
6471
6472 immutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
6473 &wire.immutable_attributes,
6474 ),
6475 }
6476 }
6477 }
6478
6479 #[doc = " Information that describes the target node.\n"]
6480 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6481 pub struct NodeInfo {
6482 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6483 }
6484
6485 impl NodeInfo {
6486 fn __max_ordinal(&self) -> usize {
6487 if self.attributes.is_some() {
6488 return 1;
6489 }
6490
6491 0
6492 }
6493 }
6494
6495 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for NodeInfo
6496 where
6497 ___E: ::fidl_next::Encoder + ?Sized,
6498 {
6499 #[inline]
6500 fn encode(
6501 mut self,
6502 encoder: &mut ___E,
6503 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
6504 _: (),
6505 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6506 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
6507
6508 let max_ord = self.__max_ordinal();
6509
6510 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6511 ::fidl_next::Wire::zero_padding(&mut out);
6512
6513 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6514 ::fidl_next::wire::Envelope,
6515 >(encoder, max_ord);
6516
6517 for i in 1..=max_ord {
6518 match i {
6519 1 => {
6520 if let Some(value) = self.attributes.take() {
6521 ::fidl_next::wire::Envelope::encode_value::<
6522 crate::wire::NodeAttributes2<'static>,
6523 ___E,
6524 >(
6525 value, preallocated.encoder, &mut out, ()
6526 )?;
6527 } else {
6528 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6529 }
6530 }
6531
6532 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6533 }
6534 unsafe {
6535 preallocated.write_next(out.assume_init_ref());
6536 }
6537 }
6538
6539 ::fidl_next::wire::Table::encode_len(table, max_ord);
6540
6541 Ok(())
6542 }
6543 }
6544
6545 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for &'a NodeInfo
6546 where
6547 ___E: ::fidl_next::Encoder + ?Sized,
6548 {
6549 #[inline]
6550 fn encode(
6551 self,
6552 encoder: &mut ___E,
6553 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
6554 _: (),
6555 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6556 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
6557
6558 let max_ord = self.__max_ordinal();
6559
6560 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6561 ::fidl_next::Wire::zero_padding(&mut out);
6562
6563 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6564 ::fidl_next::wire::Envelope,
6565 >(encoder, max_ord);
6566
6567 for i in 1..=max_ord {
6568 match i {
6569 1 => {
6570 if let Some(value) = &self.attributes {
6571 ::fidl_next::wire::Envelope::encode_value::<
6572 crate::wire::NodeAttributes2<'static>,
6573 ___E,
6574 >(
6575 value, preallocated.encoder, &mut out, ()
6576 )?;
6577 } else {
6578 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6579 }
6580 }
6581
6582 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6583 }
6584 unsafe {
6585 preallocated.write_next(out.assume_init_ref());
6586 }
6587 }
6588
6589 ::fidl_next::wire::Table::encode_len(table, max_ord);
6590
6591 Ok(())
6592 }
6593 }
6594
6595 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfo<'de>> for NodeInfo {
6596 #[inline]
6597 fn from_wire(wire_: crate::wire::NodeInfo<'de>) -> Self {
6598 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6599
6600 let attributes = wire_.table.get(1);
6601
6602 Self {
6603 attributes: attributes.map(|envelope| {
6604 ::fidl_next::FromWire::from_wire(unsafe {
6605 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6606 })
6607 }),
6608 }
6609 }
6610 }
6611
6612 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeInfo<'de>> for NodeInfo {
6613 #[inline]
6614 fn from_wire_ref(wire: &crate::wire::NodeInfo<'de>) -> Self {
6615 Self {
6616 attributes: wire.table.get(1).map(|envelope| {
6617 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6618 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6619 })
6620 }),
6621 }
6622 }
6623 }
6624
6625 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6626 pub struct DirectoryInfo {
6627 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6628 }
6629
6630 impl DirectoryInfo {
6631 fn __max_ordinal(&self) -> usize {
6632 if self.attributes.is_some() {
6633 return 1;
6634 }
6635
6636 0
6637 }
6638 }
6639
6640 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E> for DirectoryInfo
6641 where
6642 ___E: ::fidl_next::Encoder + ?Sized,
6643 {
6644 #[inline]
6645 fn encode(
6646 mut self,
6647 encoder: &mut ___E,
6648 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
6649 _: (),
6650 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6651 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
6652
6653 let max_ord = self.__max_ordinal();
6654
6655 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6656 ::fidl_next::Wire::zero_padding(&mut out);
6657
6658 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6659 ::fidl_next::wire::Envelope,
6660 >(encoder, max_ord);
6661
6662 for i in 1..=max_ord {
6663 match i {
6664 1 => {
6665 if let Some(value) = self.attributes.take() {
6666 ::fidl_next::wire::Envelope::encode_value::<
6667 crate::wire::NodeAttributes2<'static>,
6668 ___E,
6669 >(
6670 value, preallocated.encoder, &mut out, ()
6671 )?;
6672 } else {
6673 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6674 }
6675 }
6676
6677 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6678 }
6679 unsafe {
6680 preallocated.write_next(out.assume_init_ref());
6681 }
6682 }
6683
6684 ::fidl_next::wire::Table::encode_len(table, max_ord);
6685
6686 Ok(())
6687 }
6688 }
6689
6690 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E>
6691 for &'a DirectoryInfo
6692 where
6693 ___E: ::fidl_next::Encoder + ?Sized,
6694 {
6695 #[inline]
6696 fn encode(
6697 self,
6698 encoder: &mut ___E,
6699 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
6700 _: (),
6701 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6702 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
6703
6704 let max_ord = self.__max_ordinal();
6705
6706 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6707 ::fidl_next::Wire::zero_padding(&mut out);
6708
6709 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6710 ::fidl_next::wire::Envelope,
6711 >(encoder, max_ord);
6712
6713 for i in 1..=max_ord {
6714 match i {
6715 1 => {
6716 if let Some(value) = &self.attributes {
6717 ::fidl_next::wire::Envelope::encode_value::<
6718 crate::wire::NodeAttributes2<'static>,
6719 ___E,
6720 >(
6721 value, preallocated.encoder, &mut out, ()
6722 )?;
6723 } else {
6724 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6725 }
6726 }
6727
6728 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6729 }
6730 unsafe {
6731 preallocated.write_next(out.assume_init_ref());
6732 }
6733 }
6734
6735 ::fidl_next::wire::Table::encode_len(table, max_ord);
6736
6737 Ok(())
6738 }
6739 }
6740
6741 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
6742 #[inline]
6743 fn from_wire(wire_: crate::wire::DirectoryInfo<'de>) -> Self {
6744 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6745
6746 let attributes = wire_.table.get(1);
6747
6748 Self {
6749 attributes: attributes.map(|envelope| {
6750 ::fidl_next::FromWire::from_wire(unsafe {
6751 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6752 })
6753 }),
6754 }
6755 }
6756 }
6757
6758 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
6759 #[inline]
6760 fn from_wire_ref(wire: &crate::wire::DirectoryInfo<'de>) -> Self {
6761 Self {
6762 attributes: wire.table.get(1).map(|envelope| {
6763 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6764 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6765 })
6766 }),
6767 }
6768 }
6769 }
6770
6771 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6772 pub struct SymlinkInfo {
6773 pub target: ::core::option::Option<::std::vec::Vec<u8>>,
6774
6775 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
6776 }
6777
6778 impl SymlinkInfo {
6779 fn __max_ordinal(&self) -> usize {
6780 if self.attributes.is_some() {
6781 return 2;
6782 }
6783
6784 if self.target.is_some() {
6785 return 1;
6786 }
6787
6788 0
6789 }
6790 }
6791
6792 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E> for SymlinkInfo
6793 where
6794 ___E: ::fidl_next::Encoder + ?Sized,
6795 {
6796 #[inline]
6797 fn encode(
6798 mut self,
6799 encoder: &mut ___E,
6800 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
6801 _: (),
6802 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6803 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
6804
6805 let max_ord = self.__max_ordinal();
6806
6807 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6808 ::fidl_next::Wire::zero_padding(&mut out);
6809
6810 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6811 ::fidl_next::wire::Envelope,
6812 >(encoder, max_ord);
6813
6814 for i in 1..=max_ord {
6815 match i {
6816 2 => {
6817 if let Some(value) = self.attributes.take() {
6818 ::fidl_next::wire::Envelope::encode_value::<
6819 crate::wire::NodeAttributes2<'static>,
6820 ___E,
6821 >(
6822 value, preallocated.encoder, &mut out, ()
6823 )?;
6824 } else {
6825 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6826 }
6827 }
6828
6829 1 => {
6830 if let Some(value) = self.target.take() {
6831 ::fidl_next::wire::Envelope::encode_value::<
6832 ::fidl_next::wire::Vector<'static, u8>,
6833 ___E,
6834 >(
6835 value, preallocated.encoder, &mut out, (4095, ())
6836 )?;
6837 } else {
6838 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6839 }
6840 }
6841
6842 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6843 }
6844 unsafe {
6845 preallocated.write_next(out.assume_init_ref());
6846 }
6847 }
6848
6849 ::fidl_next::wire::Table::encode_len(table, max_ord);
6850
6851 Ok(())
6852 }
6853 }
6854
6855 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E>
6856 for &'a SymlinkInfo
6857 where
6858 ___E: ::fidl_next::Encoder + ?Sized,
6859 {
6860 #[inline]
6861 fn encode(
6862 self,
6863 encoder: &mut ___E,
6864 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
6865 _: (),
6866 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6867 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
6868
6869 let max_ord = self.__max_ordinal();
6870
6871 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6872 ::fidl_next::Wire::zero_padding(&mut out);
6873
6874 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6875 ::fidl_next::wire::Envelope,
6876 >(encoder, max_ord);
6877
6878 for i in 1..=max_ord {
6879 match i {
6880 2 => {
6881 if let Some(value) = &self.attributes {
6882 ::fidl_next::wire::Envelope::encode_value::<
6883 crate::wire::NodeAttributes2<'static>,
6884 ___E,
6885 >(
6886 value, preallocated.encoder, &mut out, ()
6887 )?;
6888 } else {
6889 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6890 }
6891 }
6892
6893 1 => {
6894 if let Some(value) = &self.target {
6895 ::fidl_next::wire::Envelope::encode_value::<
6896 ::fidl_next::wire::Vector<'static, u8>,
6897 ___E,
6898 >(
6899 value, preallocated.encoder, &mut out, (4095, ())
6900 )?;
6901 } else {
6902 ::fidl_next::wire::Envelope::encode_zero(&mut out)
6903 }
6904 }
6905
6906 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6907 }
6908 unsafe {
6909 preallocated.write_next(out.assume_init_ref());
6910 }
6911 }
6912
6913 ::fidl_next::wire::Table::encode_len(table, max_ord);
6914
6915 Ok(())
6916 }
6917 }
6918
6919 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
6920 #[inline]
6921 fn from_wire(wire_: crate::wire::SymlinkInfo<'de>) -> Self {
6922 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6923
6924 let target = wire_.table.get(1);
6925
6926 let attributes = wire_.table.get(2);
6927
6928 Self {
6929 target: target.map(|envelope| {
6930 ::fidl_next::FromWire::from_wire(unsafe {
6931 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6932 })
6933 }),
6934
6935 attributes: attributes.map(|envelope| {
6936 ::fidl_next::FromWire::from_wire(unsafe {
6937 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
6938 })
6939 }),
6940 }
6941 }
6942 }
6943
6944 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
6945 #[inline]
6946 fn from_wire_ref(wire: &crate::wire::SymlinkInfo<'de>) -> Self {
6947 Self {
6948 target: wire.table.get(1).map(|envelope| {
6949 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6950 envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
6951 })
6952 }),
6953
6954 attributes: wire.table.get(2).map(|envelope| {
6955 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6956 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
6957 })
6958 }),
6959 }
6960 }
6961 }
6962
6963 ::fidl_next::bitflags::bitflags! {
6964 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct NodeAttributesQuery: u64 {
6965 #[doc = " Requests [`NodeAttributes.protocols`].\n"]const PROTOCOLS = 1;
6966 #[doc = " Requests [`NodeAttributes.abilities`].\n"]const ABILITIES = 2;
6967 #[doc = " Requests [`NodeAttributes.content_size`].\n"]const CONTENT_SIZE = 4;
6968 #[doc = " Requests [`NodeAttributes.storage_size`].\n"]const STORAGE_SIZE = 8;
6969 #[doc = " Requests [`NodeAttributes.link_count`].\n"]const LINK_COUNT = 16;
6970 #[doc = " Requests [`NodeAttributes.id`].\n"]const ID = 32;
6971 #[doc = " Requests [`NodeAttributes.creation_time`].\n"]const CREATION_TIME = 64;
6972 #[doc = " Requests [`NodeAttributes.modification_time`].\n"]const MODIFICATION_TIME = 128;
6973 #[doc = " Posix attributes.\n"]const MODE = 256;
6974 const UID = 512;
6975 const GID = 1024;
6976 const RDEV = 2048;
6977 const ACCESS_TIME = 4096;
6978 const CHANGE_TIME = 8192;
6979 #[doc = " Verity attributes.\n"]const OPTIONS = 16384;
6980 const ROOT_HASH = 32768;
6981 const VERITY_ENABLED = 65536;
6982 #[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;
6983 #[doc = " Requests [`MutableNodeAttributes.selinux_context`]. See that field for more detail.\n"]const SELINUX_CONTEXT = 262144;
6984 #[doc = " fscrypt attribute.\n"]const WRAPPING_KEY_ID = 524288;
6985 #[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;
6986 const _ = !0;
6987 }
6988 }
6989
6990 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
6991 for NodeAttributesQuery
6992 where
6993 ___E: ?Sized,
6994 {
6995 #[inline]
6996 fn encode(
6997 self,
6998 encoder: &mut ___E,
6999 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
7000 _: (),
7001 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7002 ::fidl_next::Encode::encode(&self, encoder, out, ())
7003 }
7004 }
7005
7006 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
7007 for &'a NodeAttributesQuery
7008 where
7009 ___E: ?Sized,
7010 {
7011 #[inline]
7012 fn encode(
7013 self,
7014 _: &mut ___E,
7015 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
7016 _: (),
7017 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7018 ::fidl_next::munge!(let crate::wire::NodeAttributesQuery { value } = out);
7019
7020 let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
7021 Ok(())
7022 }
7023 }
7024
7025 impl ::core::convert::From<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
7026 fn from(wire: crate::wire::NodeAttributesQuery) -> Self {
7027 Self::from_bits_retain(u64::from(wire.value))
7028 }
7029 }
7030
7031 impl ::fidl_next::FromWire<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
7032 #[inline]
7033 fn from_wire(wire: crate::wire::NodeAttributesQuery) -> Self {
7034 Self::from(wire)
7035 }
7036 }
7037
7038 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
7039 #[inline]
7040 fn from_wire_ref(wire: &crate::wire::NodeAttributesQuery) -> Self {
7041 Self::from(*wire)
7042 }
7043 }
7044
7045 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7046 #[repr(C)]
7047 pub struct NodeGetAttributesRequest {
7048 pub query: crate::natural::NodeAttributesQuery,
7049 }
7050
7051 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
7052 for NodeGetAttributesRequest
7053 where
7054 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7055 {
7056 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7057 Self,
7058 crate::wire::NodeGetAttributesRequest,
7059 > = unsafe {
7060 ::fidl_next::CopyOptimization::enable_if(
7061 true && <crate::natural::NodeAttributesQuery as ::fidl_next::Encode<
7062 crate::wire::NodeAttributesQuery,
7063 ___E,
7064 >>::COPY_OPTIMIZATION
7065 .is_enabled(),
7066 )
7067 };
7068
7069 #[inline]
7070 fn encode(
7071 self,
7072 encoder_: &mut ___E,
7073 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
7074 _: (),
7075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7076 ::fidl_next::munge! {
7077 let crate::wire::NodeGetAttributesRequest {
7078 query,
7079
7080 } = out_;
7081 }
7082
7083 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
7084
7085 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
7086
7087 Ok(())
7088 }
7089 }
7090
7091 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
7092 for &'a NodeGetAttributesRequest
7093 where
7094 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7095 {
7096 #[inline]
7097 fn encode(
7098 self,
7099 encoder_: &mut ___E,
7100 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
7101 _: (),
7102 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7103 ::fidl_next::munge! {
7104 let crate::wire::NodeGetAttributesRequest {
7105 query,
7106
7107 } = out_;
7108 }
7109
7110 ::fidl_next::Encode::encode(&self.query, encoder_, query, ())?;
7111
7112 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
7113
7114 Ok(())
7115 }
7116 }
7117
7118 unsafe impl<___E>
7119 ::fidl_next::EncodeOption<
7120 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7121 ___E,
7122 > for NodeGetAttributesRequest
7123 where
7124 ___E: ::fidl_next::Encoder + ?Sized,
7125 NodeGetAttributesRequest: ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
7126 {
7127 #[inline]
7128 fn encode_option(
7129 this: ::core::option::Option<Self>,
7130 encoder: &mut ___E,
7131 out: &mut ::core::mem::MaybeUninit<
7132 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7133 >,
7134 _: (),
7135 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7136 if let Some(inner) = this {
7137 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7138 ::fidl_next::wire::Box::encode_present(out);
7139 } else {
7140 ::fidl_next::wire::Box::encode_absent(out);
7141 }
7142
7143 Ok(())
7144 }
7145 }
7146
7147 unsafe impl<'a, ___E>
7148 ::fidl_next::EncodeOption<
7149 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7150 ___E,
7151 > for &'a NodeGetAttributesRequest
7152 where
7153 ___E: ::fidl_next::Encoder + ?Sized,
7154 &'a NodeGetAttributesRequest:
7155 ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
7156 {
7157 #[inline]
7158 fn encode_option(
7159 this: ::core::option::Option<Self>,
7160 encoder: &mut ___E,
7161 out: &mut ::core::mem::MaybeUninit<
7162 ::fidl_next::wire::Box<'static, crate::wire::NodeGetAttributesRequest>,
7163 >,
7164 _: (),
7165 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7166 if let Some(inner) = this {
7167 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7168 ::fidl_next::wire::Box::encode_present(out);
7169 } else {
7170 ::fidl_next::wire::Box::encode_absent(out);
7171 }
7172
7173 Ok(())
7174 }
7175 }
7176
7177 impl ::fidl_next::FromWire<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
7178 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7179 crate::wire::NodeGetAttributesRequest,
7180 Self,
7181 > = unsafe {
7182 ::fidl_next::CopyOptimization::enable_if(
7183 true && <crate::natural::NodeAttributesQuery as ::fidl_next::FromWire<
7184 crate::wire::NodeAttributesQuery,
7185 >>::COPY_OPTIMIZATION
7186 .is_enabled(),
7187 )
7188 };
7189
7190 #[inline]
7191 fn from_wire(wire: crate::wire::NodeGetAttributesRequest) -> Self {
7192 Self { query: ::fidl_next::FromWire::from_wire(wire.query) }
7193 }
7194 }
7195
7196 impl ::fidl_next::FromWireRef<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
7197 #[inline]
7198 fn from_wire_ref(wire: &crate::wire::NodeGetAttributesRequest) -> Self {
7199 Self { query: ::fidl_next::FromWireRef::from_wire_ref(&wire.query) }
7200 }
7201 }
7202
7203 #[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"]
7204 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7205 pub struct Options {
7206 pub attributes: ::core::option::Option<crate::natural::NodeAttributesQuery>,
7207
7208 pub create_attributes: ::core::option::Option<crate::natural::MutableNodeAttributes>,
7209 }
7210
7211 impl Options {
7212 fn __max_ordinal(&self) -> usize {
7213 if self.create_attributes.is_some() {
7214 return 2;
7215 }
7216
7217 if self.attributes.is_some() {
7218 return 1;
7219 }
7220
7221 0
7222 }
7223 }
7224
7225 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for Options
7226 where
7227 ___E: ::fidl_next::Encoder + ?Sized,
7228 {
7229 #[inline]
7230 fn encode(
7231 mut self,
7232 encoder: &mut ___E,
7233 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
7234 _: (),
7235 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7236 ::fidl_next::munge!(let crate::wire::Options { table } = out);
7237
7238 let max_ord = self.__max_ordinal();
7239
7240 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7241 ::fidl_next::Wire::zero_padding(&mut out);
7242
7243 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7244 ::fidl_next::wire::Envelope,
7245 >(encoder, max_ord);
7246
7247 for i in 1..=max_ord {
7248 match i {
7249 2 => {
7250 if let Some(value) = self.create_attributes.take() {
7251 ::fidl_next::wire::Envelope::encode_value::<
7252 crate::wire::MutableNodeAttributes<'static>,
7253 ___E,
7254 >(
7255 value, preallocated.encoder, &mut out, ()
7256 )?;
7257 } else {
7258 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7259 }
7260 }
7261
7262 1 => {
7263 if let Some(value) = self.attributes.take() {
7264 ::fidl_next::wire::Envelope::encode_value::<
7265 crate::wire::NodeAttributesQuery,
7266 ___E,
7267 >(
7268 value, preallocated.encoder, &mut out, ()
7269 )?;
7270 } else {
7271 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7272 }
7273 }
7274
7275 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7276 }
7277 unsafe {
7278 preallocated.write_next(out.assume_init_ref());
7279 }
7280 }
7281
7282 ::fidl_next::wire::Table::encode_len(table, max_ord);
7283
7284 Ok(())
7285 }
7286 }
7287
7288 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for &'a Options
7289 where
7290 ___E: ::fidl_next::Encoder + ?Sized,
7291 {
7292 #[inline]
7293 fn encode(
7294 self,
7295 encoder: &mut ___E,
7296 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
7297 _: (),
7298 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7299 ::fidl_next::munge!(let crate::wire::Options { table } = out);
7300
7301 let max_ord = self.__max_ordinal();
7302
7303 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7304 ::fidl_next::Wire::zero_padding(&mut out);
7305
7306 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7307 ::fidl_next::wire::Envelope,
7308 >(encoder, max_ord);
7309
7310 for i in 1..=max_ord {
7311 match i {
7312 2 => {
7313 if let Some(value) = &self.create_attributes {
7314 ::fidl_next::wire::Envelope::encode_value::<
7315 crate::wire::MutableNodeAttributes<'static>,
7316 ___E,
7317 >(
7318 value, preallocated.encoder, &mut out, ()
7319 )?;
7320 } else {
7321 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7322 }
7323 }
7324
7325 1 => {
7326 if let Some(value) = &self.attributes {
7327 ::fidl_next::wire::Envelope::encode_value::<
7328 crate::wire::NodeAttributesQuery,
7329 ___E,
7330 >(
7331 value, preallocated.encoder, &mut out, ()
7332 )?;
7333 } else {
7334 ::fidl_next::wire::Envelope::encode_zero(&mut out)
7335 }
7336 }
7337
7338 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7339 }
7340 unsafe {
7341 preallocated.write_next(out.assume_init_ref());
7342 }
7343 }
7344
7345 ::fidl_next::wire::Table::encode_len(table, max_ord);
7346
7347 Ok(())
7348 }
7349 }
7350
7351 impl<'de> ::fidl_next::FromWire<crate::wire::Options<'de>> for Options {
7352 #[inline]
7353 fn from_wire(wire_: crate::wire::Options<'de>) -> Self {
7354 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7355
7356 let attributes = wire_.table.get(1);
7357
7358 let create_attributes = wire_.table.get(2);
7359
7360 Self {
7361 attributes: attributes.map(|envelope| {
7362 ::fidl_next::FromWire::from_wire(unsafe {
7363 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
7364 })
7365 }),
7366
7367 create_attributes: create_attributes.map(|envelope| {
7368 ::fidl_next::FromWire::from_wire(unsafe {
7369 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
7370 })
7371 }),
7372 }
7373 }
7374 }
7375
7376 impl<'de> ::fidl_next::FromWireRef<crate::wire::Options<'de>> for Options {
7377 #[inline]
7378 fn from_wire_ref(wire: &crate::wire::Options<'de>) -> Self {
7379 Self {
7380 attributes: wire.table.get(1).map(|envelope| {
7381 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7382 envelope.deref_unchecked::<crate::wire::NodeAttributesQuery>()
7383 })
7384 }),
7385
7386 create_attributes: wire.table.get(2).map(|envelope| {
7387 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7388 envelope.deref_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
7389 })
7390 }),
7391 }
7392 }
7393 }
7394
7395 pub type DirectoryObject = ();
7396
7397 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7398 #[repr(u8)]
7399 pub enum DirentType {
7400 Unknown = 0,
7401 Directory = 4,
7402 BlockDevice = 6,
7403 File = 8,
7404 Symlink = 10,
7405 Service = 16,
7406 UnknownOrdinal_(u8) = 17,
7407 }
7408 impl ::std::convert::From<u8> for DirentType {
7409 fn from(value: u8) -> Self {
7410 match value {
7411 0 => Self::Unknown,
7412 4 => Self::Directory,
7413 6 => Self::BlockDevice,
7414 8 => Self::File,
7415 10 => Self::Symlink,
7416 16 => Self::Service,
7417
7418 _ => Self::UnknownOrdinal_(value),
7419 }
7420 }
7421 }
7422
7423 impl ::std::convert::From<DirentType> for u8 {
7424 fn from(value: DirentType) -> Self {
7425 match value {
7426 DirentType::Unknown => 0,
7427 DirentType::Directory => 4,
7428 DirentType::BlockDevice => 6,
7429 DirentType::File => 8,
7430 DirentType::Symlink => 10,
7431 DirentType::Service => 16,
7432
7433 DirentType::UnknownOrdinal_(value) => value,
7434 }
7435 }
7436 }
7437
7438 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for DirentType
7439 where
7440 ___E: ?Sized,
7441 {
7442 #[inline]
7443 fn encode(
7444 self,
7445 encoder: &mut ___E,
7446 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
7447 _: (),
7448 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7449 ::fidl_next::Encode::encode(&self, encoder, out, ())
7450 }
7451 }
7452
7453 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for &'a DirentType
7454 where
7455 ___E: ?Sized,
7456 {
7457 #[inline]
7458 fn encode(
7459 self,
7460 encoder: &mut ___E,
7461 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
7462 _: (),
7463 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7464 ::fidl_next::munge!(let crate::wire::DirentType { value } = out);
7465 let _ = value.write(u8::from(match *self {
7466 DirentType::Unknown => 0,
7467
7468 DirentType::Directory => 4,
7469
7470 DirentType::BlockDevice => 6,
7471
7472 DirentType::File => 8,
7473
7474 DirentType::Symlink => 10,
7475
7476 DirentType::Service => 16,
7477
7478 DirentType::UnknownOrdinal_(value) => value,
7479 }));
7480
7481 Ok(())
7482 }
7483 }
7484
7485 impl ::core::convert::From<crate::wire::DirentType> for DirentType {
7486 fn from(wire: crate::wire::DirentType) -> Self {
7487 match u8::from(wire.value) {
7488 0 => Self::Unknown,
7489
7490 4 => Self::Directory,
7491
7492 6 => Self::BlockDevice,
7493
7494 8 => Self::File,
7495
7496 10 => Self::Symlink,
7497
7498 16 => Self::Service,
7499
7500 value => Self::UnknownOrdinal_(value),
7501 }
7502 }
7503 }
7504
7505 impl ::fidl_next::FromWire<crate::wire::DirentType> for DirentType {
7506 #[inline]
7507 fn from_wire(wire: crate::wire::DirentType) -> Self {
7508 Self::from(wire)
7509 }
7510 }
7511
7512 impl ::fidl_next::FromWireRef<crate::wire::DirentType> for DirentType {
7513 #[inline]
7514 fn from_wire_ref(wire: &crate::wire::DirentType) -> Self {
7515 Self::from(*wire)
7516 }
7517 }
7518
7519 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7520 pub struct ExtendedAttributeIteratorGetNextResponse {
7521 pub attributes: ::std::vec::Vec<::std::vec::Vec<u8>>,
7522
7523 pub last: bool,
7524 }
7525
7526 unsafe impl<___E>
7527 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
7528 for ExtendedAttributeIteratorGetNextResponse
7529 where
7530 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7531 ___E: ::fidl_next::Encoder,
7532 {
7533 #[inline]
7534 fn encode(
7535 self,
7536 encoder_: &mut ___E,
7537 out_: &mut ::core::mem::MaybeUninit<
7538 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7539 >,
7540 _: (),
7541 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7542 ::fidl_next::munge! {
7543 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
7544 attributes,
7545 last,
7546
7547 } = out_;
7548 }
7549
7550 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
7551
7552 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
7553 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
7554
7555 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
7556
7557 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
7558
7559 Ok(())
7560 }
7561 }
7562
7563 unsafe impl<'a, ___E>
7564 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
7565 for &'a ExtendedAttributeIteratorGetNextResponse
7566 where
7567 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7568 ___E: ::fidl_next::Encoder,
7569 {
7570 #[inline]
7571 fn encode(
7572 self,
7573 encoder_: &mut ___E,
7574 out_: &mut ::core::mem::MaybeUninit<
7575 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7576 >,
7577 _: (),
7578 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7579 ::fidl_next::munge! {
7580 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
7581 attributes,
7582 last,
7583
7584 } = out_;
7585 }
7586
7587 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, (128, (255, ())))?;
7588
7589 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
7590 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
7591
7592 ::fidl_next::Encode::encode(&self.last, encoder_, last, ())?;
7593
7594 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
7595
7596 Ok(())
7597 }
7598 }
7599
7600 unsafe impl<___E>
7601 ::fidl_next::EncodeOption<
7602 ::fidl_next::wire::Box<
7603 'static,
7604 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7605 >,
7606 ___E,
7607 > for ExtendedAttributeIteratorGetNextResponse
7608 where
7609 ___E: ::fidl_next::Encoder + ?Sized,
7610 ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
7611 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7612 ___E,
7613 >,
7614 {
7615 #[inline]
7616 fn encode_option(
7617 this: ::core::option::Option<Self>,
7618 encoder: &mut ___E,
7619 out: &mut ::core::mem::MaybeUninit<
7620 ::fidl_next::wire::Box<
7621 'static,
7622 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7623 >,
7624 >,
7625 _: (),
7626 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7627 if let Some(inner) = this {
7628 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7629 ::fidl_next::wire::Box::encode_present(out);
7630 } else {
7631 ::fidl_next::wire::Box::encode_absent(out);
7632 }
7633
7634 Ok(())
7635 }
7636 }
7637
7638 unsafe impl<'a, ___E>
7639 ::fidl_next::EncodeOption<
7640 ::fidl_next::wire::Box<
7641 'static,
7642 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7643 >,
7644 ___E,
7645 > for &'a ExtendedAttributeIteratorGetNextResponse
7646 where
7647 ___E: ::fidl_next::Encoder + ?Sized,
7648 &'a ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
7649 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7650 ___E,
7651 >,
7652 {
7653 #[inline]
7654 fn encode_option(
7655 this: ::core::option::Option<Self>,
7656 encoder: &mut ___E,
7657 out: &mut ::core::mem::MaybeUninit<
7658 ::fidl_next::wire::Box<
7659 'static,
7660 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
7661 >,
7662 >,
7663 _: (),
7664 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7665 if let Some(inner) = this {
7666 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7667 ::fidl_next::wire::Box::encode_present(out);
7668 } else {
7669 ::fidl_next::wire::Box::encode_absent(out);
7670 }
7671
7672 Ok(())
7673 }
7674 }
7675
7676 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
7677 for ExtendedAttributeIteratorGetNextResponse
7678 {
7679 #[inline]
7680 fn from_wire(wire: crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>) -> Self {
7681 Self {
7682 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
7683
7684 last: ::fidl_next::FromWire::from_wire(wire.last),
7685 }
7686 }
7687 }
7688
7689 impl<'de> ::fidl_next::FromWireRef<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
7690 for ExtendedAttributeIteratorGetNextResponse
7691 {
7692 #[inline]
7693 fn from_wire_ref(
7694 wire: &crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>,
7695 ) -> Self {
7696 Self {
7697 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
7698
7699 last: ::fidl_next::FromWireRef::from_wire_ref(&wire.last),
7700 }
7701 }
7702 }
7703
7704 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7705 #[repr(C)]
7706 pub struct ReadableReadRequest {
7707 pub count: u64,
7708 }
7709
7710 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
7711 for ReadableReadRequest
7712 where
7713 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7714 {
7715 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7716 Self,
7717 crate::wire::ReadableReadRequest,
7718 > = unsafe {
7719 ::fidl_next::CopyOptimization::enable_if(
7720 true
7721
7722 && <
7723 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
7724 >::COPY_OPTIMIZATION.is_enabled()
7725
7726 )
7727 };
7728
7729 #[inline]
7730 fn encode(
7731 self,
7732 encoder_: &mut ___E,
7733 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
7734 _: (),
7735 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7736 ::fidl_next::munge! {
7737 let crate::wire::ReadableReadRequest {
7738 count,
7739
7740 } = out_;
7741 }
7742
7743 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
7744
7745 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
7746
7747 Ok(())
7748 }
7749 }
7750
7751 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
7752 for &'a ReadableReadRequest
7753 where
7754 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7755 {
7756 #[inline]
7757 fn encode(
7758 self,
7759 encoder_: &mut ___E,
7760 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
7761 _: (),
7762 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7763 ::fidl_next::munge! {
7764 let crate::wire::ReadableReadRequest {
7765 count,
7766
7767 } = out_;
7768 }
7769
7770 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
7771
7772 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
7773
7774 Ok(())
7775 }
7776 }
7777
7778 unsafe impl<___E>
7779 ::fidl_next::EncodeOption<
7780 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7781 ___E,
7782 > for ReadableReadRequest
7783 where
7784 ___E: ::fidl_next::Encoder + ?Sized,
7785 ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
7786 {
7787 #[inline]
7788 fn encode_option(
7789 this: ::core::option::Option<Self>,
7790 encoder: &mut ___E,
7791 out: &mut ::core::mem::MaybeUninit<
7792 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7793 >,
7794 _: (),
7795 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7796 if let Some(inner) = this {
7797 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7798 ::fidl_next::wire::Box::encode_present(out);
7799 } else {
7800 ::fidl_next::wire::Box::encode_absent(out);
7801 }
7802
7803 Ok(())
7804 }
7805 }
7806
7807 unsafe impl<'a, ___E>
7808 ::fidl_next::EncodeOption<
7809 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7810 ___E,
7811 > for &'a ReadableReadRequest
7812 where
7813 ___E: ::fidl_next::Encoder + ?Sized,
7814 &'a ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
7815 {
7816 #[inline]
7817 fn encode_option(
7818 this: ::core::option::Option<Self>,
7819 encoder: &mut ___E,
7820 out: &mut ::core::mem::MaybeUninit<
7821 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadRequest>,
7822 >,
7823 _: (),
7824 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7825 if let Some(inner) = this {
7826 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7827 ::fidl_next::wire::Box::encode_present(out);
7828 } else {
7829 ::fidl_next::wire::Box::encode_absent(out);
7830 }
7831
7832 Ok(())
7833 }
7834 }
7835
7836 impl ::fidl_next::FromWire<crate::wire::ReadableReadRequest> for ReadableReadRequest {
7837 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7838 crate::wire::ReadableReadRequest,
7839 Self,
7840 > = unsafe {
7841 ::fidl_next::CopyOptimization::enable_if(
7842 true
7843 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
7844 .is_enabled(),
7845 )
7846 };
7847
7848 #[inline]
7849 fn from_wire(wire: crate::wire::ReadableReadRequest) -> Self {
7850 Self { count: ::fidl_next::FromWire::from_wire(wire.count) }
7851 }
7852 }
7853
7854 impl ::fidl_next::FromWireRef<crate::wire::ReadableReadRequest> for ReadableReadRequest {
7855 #[inline]
7856 fn from_wire_ref(wire: &crate::wire::ReadableReadRequest) -> Self {
7857 Self { count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count) }
7858 }
7859 }
7860
7861 #[doc = " The byte vector type used for read/write operations.\n"]
7862 pub type Transfer = ::std::vec::Vec<u8>;
7863
7864 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7865 pub struct ReadableReadResponse {
7866 pub data: ::std::vec::Vec<u8>,
7867 }
7868
7869 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
7870 for ReadableReadResponse
7871 where
7872 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7873 ___E: ::fidl_next::Encoder,
7874 {
7875 #[inline]
7876 fn encode(
7877 self,
7878 encoder_: &mut ___E,
7879 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
7880 _: (),
7881 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7882 ::fidl_next::munge! {
7883 let crate::wire::ReadableReadResponse {
7884 data,
7885
7886 } = out_;
7887 }
7888
7889 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
7890
7891 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
7892 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
7893
7894 Ok(())
7895 }
7896 }
7897
7898 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
7899 for &'a ReadableReadResponse
7900 where
7901 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7902 ___E: ::fidl_next::Encoder,
7903 {
7904 #[inline]
7905 fn encode(
7906 self,
7907 encoder_: &mut ___E,
7908 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
7909 _: (),
7910 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7911 ::fidl_next::munge! {
7912 let crate::wire::ReadableReadResponse {
7913 data,
7914
7915 } = out_;
7916 }
7917
7918 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
7919
7920 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
7921 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
7922
7923 Ok(())
7924 }
7925 }
7926
7927 unsafe impl<___E>
7928 ::fidl_next::EncodeOption<
7929 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7930 ___E,
7931 > for ReadableReadResponse
7932 where
7933 ___E: ::fidl_next::Encoder + ?Sized,
7934 ReadableReadResponse: ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
7935 {
7936 #[inline]
7937 fn encode_option(
7938 this: ::core::option::Option<Self>,
7939 encoder: &mut ___E,
7940 out: &mut ::core::mem::MaybeUninit<
7941 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7942 >,
7943 _: (),
7944 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7945 if let Some(inner) = this {
7946 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7947 ::fidl_next::wire::Box::encode_present(out);
7948 } else {
7949 ::fidl_next::wire::Box::encode_absent(out);
7950 }
7951
7952 Ok(())
7953 }
7954 }
7955
7956 unsafe impl<'a, ___E>
7957 ::fidl_next::EncodeOption<
7958 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7959 ___E,
7960 > for &'a ReadableReadResponse
7961 where
7962 ___E: ::fidl_next::Encoder + ?Sized,
7963 &'a ReadableReadResponse:
7964 ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
7965 {
7966 #[inline]
7967 fn encode_option(
7968 this: ::core::option::Option<Self>,
7969 encoder: &mut ___E,
7970 out: &mut ::core::mem::MaybeUninit<
7971 ::fidl_next::wire::Box<'static, crate::wire::ReadableReadResponse<'static>>,
7972 >,
7973 _: (),
7974 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7975 if let Some(inner) = this {
7976 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7977 ::fidl_next::wire::Box::encode_present(out);
7978 } else {
7979 ::fidl_next::wire::Box::encode_absent(out);
7980 }
7981
7982 Ok(())
7983 }
7984 }
7985
7986 impl<'de> ::fidl_next::FromWire<crate::wire::ReadableReadResponse<'de>> for ReadableReadResponse {
7987 #[inline]
7988 fn from_wire(wire: crate::wire::ReadableReadResponse<'de>) -> Self {
7989 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
7990 }
7991 }
7992
7993 impl<'de> ::fidl_next::FromWireRef<crate::wire::ReadableReadResponse<'de>>
7994 for ReadableReadResponse
7995 {
7996 #[inline]
7997 fn from_wire_ref(wire: &crate::wire::ReadableReadResponse<'de>) -> Self {
7998 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
7999 }
8000 }
8001
8002 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8003 pub struct WritableWriteRequest {
8004 pub data: ::std::vec::Vec<u8>,
8005 }
8006
8007 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
8008 for WritableWriteRequest
8009 where
8010 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8011 ___E: ::fidl_next::Encoder,
8012 {
8013 #[inline]
8014 fn encode(
8015 self,
8016 encoder_: &mut ___E,
8017 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
8018 _: (),
8019 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8020 ::fidl_next::munge! {
8021 let crate::wire::WritableWriteRequest {
8022 data,
8023
8024 } = out_;
8025 }
8026
8027 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
8028
8029 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8030 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8031
8032 Ok(())
8033 }
8034 }
8035
8036 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
8037 for &'a WritableWriteRequest
8038 where
8039 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8040 ___E: ::fidl_next::Encoder,
8041 {
8042 #[inline]
8043 fn encode(
8044 self,
8045 encoder_: &mut ___E,
8046 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
8047 _: (),
8048 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8049 ::fidl_next::munge! {
8050 let crate::wire::WritableWriteRequest {
8051 data,
8052
8053 } = out_;
8054 }
8055
8056 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
8057
8058 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8059 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8060
8061 Ok(())
8062 }
8063 }
8064
8065 unsafe impl<___E>
8066 ::fidl_next::EncodeOption<
8067 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8068 ___E,
8069 > for WritableWriteRequest
8070 where
8071 ___E: ::fidl_next::Encoder + ?Sized,
8072 WritableWriteRequest: ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
8073 {
8074 #[inline]
8075 fn encode_option(
8076 this: ::core::option::Option<Self>,
8077 encoder: &mut ___E,
8078 out: &mut ::core::mem::MaybeUninit<
8079 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8080 >,
8081 _: (),
8082 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8083 if let Some(inner) = this {
8084 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8085 ::fidl_next::wire::Box::encode_present(out);
8086 } else {
8087 ::fidl_next::wire::Box::encode_absent(out);
8088 }
8089
8090 Ok(())
8091 }
8092 }
8093
8094 unsafe impl<'a, ___E>
8095 ::fidl_next::EncodeOption<
8096 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8097 ___E,
8098 > for &'a WritableWriteRequest
8099 where
8100 ___E: ::fidl_next::Encoder + ?Sized,
8101 &'a WritableWriteRequest:
8102 ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
8103 {
8104 #[inline]
8105 fn encode_option(
8106 this: ::core::option::Option<Self>,
8107 encoder: &mut ___E,
8108 out: &mut ::core::mem::MaybeUninit<
8109 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteRequest<'static>>,
8110 >,
8111 _: (),
8112 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8113 if let Some(inner) = this {
8114 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8115 ::fidl_next::wire::Box::encode_present(out);
8116 } else {
8117 ::fidl_next::wire::Box::encode_absent(out);
8118 }
8119
8120 Ok(())
8121 }
8122 }
8123
8124 impl<'de> ::fidl_next::FromWire<crate::wire::WritableWriteRequest<'de>> for WritableWriteRequest {
8125 #[inline]
8126 fn from_wire(wire: crate::wire::WritableWriteRequest<'de>) -> Self {
8127 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
8128 }
8129 }
8130
8131 impl<'de> ::fidl_next::FromWireRef<crate::wire::WritableWriteRequest<'de>>
8132 for WritableWriteRequest
8133 {
8134 #[inline]
8135 fn from_wire_ref(wire: &crate::wire::WritableWriteRequest<'de>) -> Self {
8136 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
8137 }
8138 }
8139
8140 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8141 #[repr(C)]
8142 pub struct WritableWriteResponse {
8143 pub actual_count: u64,
8144 }
8145
8146 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
8147 for WritableWriteResponse
8148 where
8149 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8150 {
8151 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8152 Self,
8153 crate::wire::WritableWriteResponse,
8154 > = unsafe {
8155 ::fidl_next::CopyOptimization::enable_if(
8156 true
8157
8158 && <
8159 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8160 >::COPY_OPTIMIZATION.is_enabled()
8161
8162 )
8163 };
8164
8165 #[inline]
8166 fn encode(
8167 self,
8168 encoder_: &mut ___E,
8169 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
8170 _: (),
8171 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8172 ::fidl_next::munge! {
8173 let crate::wire::WritableWriteResponse {
8174 actual_count,
8175
8176 } = out_;
8177 }
8178
8179 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
8180
8181 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
8182
8183 Ok(())
8184 }
8185 }
8186
8187 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
8188 for &'a WritableWriteResponse
8189 where
8190 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8191 {
8192 #[inline]
8193 fn encode(
8194 self,
8195 encoder_: &mut ___E,
8196 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
8197 _: (),
8198 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8199 ::fidl_next::munge! {
8200 let crate::wire::WritableWriteResponse {
8201 actual_count,
8202
8203 } = out_;
8204 }
8205
8206 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
8207
8208 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
8209
8210 Ok(())
8211 }
8212 }
8213
8214 unsafe impl<___E>
8215 ::fidl_next::EncodeOption<
8216 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8217 ___E,
8218 > for WritableWriteResponse
8219 where
8220 ___E: ::fidl_next::Encoder + ?Sized,
8221 WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
8222 {
8223 #[inline]
8224 fn encode_option(
8225 this: ::core::option::Option<Self>,
8226 encoder: &mut ___E,
8227 out: &mut ::core::mem::MaybeUninit<
8228 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8229 >,
8230 _: (),
8231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8232 if let Some(inner) = this {
8233 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8234 ::fidl_next::wire::Box::encode_present(out);
8235 } else {
8236 ::fidl_next::wire::Box::encode_absent(out);
8237 }
8238
8239 Ok(())
8240 }
8241 }
8242
8243 unsafe impl<'a, ___E>
8244 ::fidl_next::EncodeOption<
8245 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8246 ___E,
8247 > for &'a WritableWriteResponse
8248 where
8249 ___E: ::fidl_next::Encoder + ?Sized,
8250 &'a WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
8251 {
8252 #[inline]
8253 fn encode_option(
8254 this: ::core::option::Option<Self>,
8255 encoder: &mut ___E,
8256 out: &mut ::core::mem::MaybeUninit<
8257 ::fidl_next::wire::Box<'static, crate::wire::WritableWriteResponse>,
8258 >,
8259 _: (),
8260 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8261 if let Some(inner) = this {
8262 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8263 ::fidl_next::wire::Box::encode_present(out);
8264 } else {
8265 ::fidl_next::wire::Box::encode_absent(out);
8266 }
8267
8268 Ok(())
8269 }
8270 }
8271
8272 impl ::fidl_next::FromWire<crate::wire::WritableWriteResponse> for WritableWriteResponse {
8273 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8274 crate::wire::WritableWriteResponse,
8275 Self,
8276 > = unsafe {
8277 ::fidl_next::CopyOptimization::enable_if(
8278 true
8279 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8280 .is_enabled(),
8281 )
8282 };
8283
8284 #[inline]
8285 fn from_wire(wire: crate::wire::WritableWriteResponse) -> Self {
8286 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
8287 }
8288 }
8289
8290 impl ::fidl_next::FromWireRef<crate::wire::WritableWriteResponse> for WritableWriteResponse {
8291 #[inline]
8292 fn from_wire_ref(wire: &crate::wire::WritableWriteResponse) -> Self {
8293 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
8294 }
8295 }
8296
8297 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8298 pub struct FileSeekRequest {
8299 pub origin: crate::natural::SeekOrigin,
8300
8301 pub offset: i64,
8302 }
8303
8304 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E> for FileSeekRequest
8305 where
8306 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8307 {
8308 #[inline]
8309 fn encode(
8310 self,
8311 encoder_: &mut ___E,
8312 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
8313 _: (),
8314 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8315 ::fidl_next::munge! {
8316 let crate::wire::FileSeekRequest {
8317 origin,
8318 offset,
8319
8320 } = out_;
8321 }
8322
8323 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
8324
8325 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
8326
8327 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8328
8329 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8330
8331 Ok(())
8332 }
8333 }
8334
8335 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
8336 for &'a FileSeekRequest
8337 where
8338 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8339 {
8340 #[inline]
8341 fn encode(
8342 self,
8343 encoder_: &mut ___E,
8344 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
8345 _: (),
8346 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8347 ::fidl_next::munge! {
8348 let crate::wire::FileSeekRequest {
8349 origin,
8350 offset,
8351
8352 } = out_;
8353 }
8354
8355 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
8356
8357 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
8358
8359 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8360
8361 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8362
8363 Ok(())
8364 }
8365 }
8366
8367 unsafe impl<___E>
8368 ::fidl_next::EncodeOption<
8369 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8370 ___E,
8371 > for FileSeekRequest
8372 where
8373 ___E: ::fidl_next::Encoder + ?Sized,
8374 FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
8375 {
8376 #[inline]
8377 fn encode_option(
8378 this: ::core::option::Option<Self>,
8379 encoder: &mut ___E,
8380 out: &mut ::core::mem::MaybeUninit<
8381 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8382 >,
8383 _: (),
8384 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8385 if let Some(inner) = this {
8386 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8387 ::fidl_next::wire::Box::encode_present(out);
8388 } else {
8389 ::fidl_next::wire::Box::encode_absent(out);
8390 }
8391
8392 Ok(())
8393 }
8394 }
8395
8396 unsafe impl<'a, ___E>
8397 ::fidl_next::EncodeOption<
8398 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8399 ___E,
8400 > for &'a FileSeekRequest
8401 where
8402 ___E: ::fidl_next::Encoder + ?Sized,
8403 &'a FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
8404 {
8405 #[inline]
8406 fn encode_option(
8407 this: ::core::option::Option<Self>,
8408 encoder: &mut ___E,
8409 out: &mut ::core::mem::MaybeUninit<
8410 ::fidl_next::wire::Box<'static, crate::wire::FileSeekRequest>,
8411 >,
8412 _: (),
8413 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8414 if let Some(inner) = this {
8415 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8416 ::fidl_next::wire::Box::encode_present(out);
8417 } else {
8418 ::fidl_next::wire::Box::encode_absent(out);
8419 }
8420
8421 Ok(())
8422 }
8423 }
8424
8425 impl ::fidl_next::FromWire<crate::wire::FileSeekRequest> for FileSeekRequest {
8426 #[inline]
8427 fn from_wire(wire: crate::wire::FileSeekRequest) -> Self {
8428 Self {
8429 origin: ::fidl_next::FromWire::from_wire(wire.origin),
8430
8431 offset: ::fidl_next::FromWire::from_wire(wire.offset),
8432 }
8433 }
8434 }
8435
8436 impl ::fidl_next::FromWireRef<crate::wire::FileSeekRequest> for FileSeekRequest {
8437 #[inline]
8438 fn from_wire_ref(wire: &crate::wire::FileSeekRequest) -> Self {
8439 Self {
8440 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
8441
8442 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
8443 }
8444 }
8445 }
8446
8447 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8448 #[repr(C)]
8449 pub struct FileSeekResponse {
8450 pub offset_from_start: u64,
8451 }
8452
8453 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E> for FileSeekResponse
8454 where
8455 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8456 {
8457 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8458 Self,
8459 crate::wire::FileSeekResponse,
8460 > = unsafe {
8461 ::fidl_next::CopyOptimization::enable_if(
8462 true
8463
8464 && <
8465 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8466 >::COPY_OPTIMIZATION.is_enabled()
8467
8468 )
8469 };
8470
8471 #[inline]
8472 fn encode(
8473 self,
8474 encoder_: &mut ___E,
8475 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
8476 _: (),
8477 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8478 ::fidl_next::munge! {
8479 let crate::wire::FileSeekResponse {
8480 offset_from_start,
8481
8482 } = out_;
8483 }
8484
8485 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
8486
8487 let mut _field =
8488 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
8489
8490 Ok(())
8491 }
8492 }
8493
8494 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
8495 for &'a FileSeekResponse
8496 where
8497 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8498 {
8499 #[inline]
8500 fn encode(
8501 self,
8502 encoder_: &mut ___E,
8503 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
8504 _: (),
8505 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8506 ::fidl_next::munge! {
8507 let crate::wire::FileSeekResponse {
8508 offset_from_start,
8509
8510 } = out_;
8511 }
8512
8513 ::fidl_next::Encode::encode(&self.offset_from_start, encoder_, offset_from_start, ())?;
8514
8515 let mut _field =
8516 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
8517
8518 Ok(())
8519 }
8520 }
8521
8522 unsafe impl<___E>
8523 ::fidl_next::EncodeOption<
8524 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8525 ___E,
8526 > for FileSeekResponse
8527 where
8528 ___E: ::fidl_next::Encoder + ?Sized,
8529 FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
8530 {
8531 #[inline]
8532 fn encode_option(
8533 this: ::core::option::Option<Self>,
8534 encoder: &mut ___E,
8535 out: &mut ::core::mem::MaybeUninit<
8536 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8537 >,
8538 _: (),
8539 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8540 if let Some(inner) = this {
8541 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8542 ::fidl_next::wire::Box::encode_present(out);
8543 } else {
8544 ::fidl_next::wire::Box::encode_absent(out);
8545 }
8546
8547 Ok(())
8548 }
8549 }
8550
8551 unsafe impl<'a, ___E>
8552 ::fidl_next::EncodeOption<
8553 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8554 ___E,
8555 > for &'a FileSeekResponse
8556 where
8557 ___E: ::fidl_next::Encoder + ?Sized,
8558 &'a FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
8559 {
8560 #[inline]
8561 fn encode_option(
8562 this: ::core::option::Option<Self>,
8563 encoder: &mut ___E,
8564 out: &mut ::core::mem::MaybeUninit<
8565 ::fidl_next::wire::Box<'static, crate::wire::FileSeekResponse>,
8566 >,
8567 _: (),
8568 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8569 if let Some(inner) = this {
8570 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8571 ::fidl_next::wire::Box::encode_present(out);
8572 } else {
8573 ::fidl_next::wire::Box::encode_absent(out);
8574 }
8575
8576 Ok(())
8577 }
8578 }
8579
8580 impl ::fidl_next::FromWire<crate::wire::FileSeekResponse> for FileSeekResponse {
8581 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8582 crate::wire::FileSeekResponse,
8583 Self,
8584 > = unsafe {
8585 ::fidl_next::CopyOptimization::enable_if(
8586 true
8587 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8588 .is_enabled(),
8589 )
8590 };
8591
8592 #[inline]
8593 fn from_wire(wire: crate::wire::FileSeekResponse) -> Self {
8594 Self { offset_from_start: ::fidl_next::FromWire::from_wire(wire.offset_from_start) }
8595 }
8596 }
8597
8598 impl ::fidl_next::FromWireRef<crate::wire::FileSeekResponse> for FileSeekResponse {
8599 #[inline]
8600 fn from_wire_ref(wire: &crate::wire::FileSeekResponse) -> Self {
8601 Self {
8602 offset_from_start: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset_from_start),
8603 }
8604 }
8605 }
8606
8607 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8608 #[repr(C)]
8609 pub struct FileReadAtRequest {
8610 pub count: u64,
8611
8612 pub offset: u64,
8613 }
8614
8615 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E> for FileReadAtRequest
8616 where
8617 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8618 {
8619 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8620 Self,
8621 crate::wire::FileReadAtRequest,
8622 > = unsafe {
8623 ::fidl_next::CopyOptimization::enable_if(
8624 true
8625
8626 && <
8627 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8628 >::COPY_OPTIMIZATION.is_enabled()
8629
8630 && <
8631 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
8632 >::COPY_OPTIMIZATION.is_enabled()
8633
8634 )
8635 };
8636
8637 #[inline]
8638 fn encode(
8639 self,
8640 encoder_: &mut ___E,
8641 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
8642 _: (),
8643 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8644 ::fidl_next::munge! {
8645 let crate::wire::FileReadAtRequest {
8646 count,
8647 offset,
8648
8649 } = out_;
8650 }
8651
8652 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
8653
8654 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
8655
8656 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8657
8658 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8659
8660 Ok(())
8661 }
8662 }
8663
8664 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
8665 for &'a FileReadAtRequest
8666 where
8667 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8668 {
8669 #[inline]
8670 fn encode(
8671 self,
8672 encoder_: &mut ___E,
8673 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
8674 _: (),
8675 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8676 ::fidl_next::munge! {
8677 let crate::wire::FileReadAtRequest {
8678 count,
8679 offset,
8680
8681 } = out_;
8682 }
8683
8684 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
8685
8686 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
8687
8688 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8689
8690 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8691
8692 Ok(())
8693 }
8694 }
8695
8696 unsafe impl<___E>
8697 ::fidl_next::EncodeOption<
8698 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8699 ___E,
8700 > for FileReadAtRequest
8701 where
8702 ___E: ::fidl_next::Encoder + ?Sized,
8703 FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
8704 {
8705 #[inline]
8706 fn encode_option(
8707 this: ::core::option::Option<Self>,
8708 encoder: &mut ___E,
8709 out: &mut ::core::mem::MaybeUninit<
8710 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8711 >,
8712 _: (),
8713 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8714 if let Some(inner) = this {
8715 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8716 ::fidl_next::wire::Box::encode_present(out);
8717 } else {
8718 ::fidl_next::wire::Box::encode_absent(out);
8719 }
8720
8721 Ok(())
8722 }
8723 }
8724
8725 unsafe impl<'a, ___E>
8726 ::fidl_next::EncodeOption<
8727 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8728 ___E,
8729 > for &'a FileReadAtRequest
8730 where
8731 ___E: ::fidl_next::Encoder + ?Sized,
8732 &'a FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
8733 {
8734 #[inline]
8735 fn encode_option(
8736 this: ::core::option::Option<Self>,
8737 encoder: &mut ___E,
8738 out: &mut ::core::mem::MaybeUninit<
8739 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtRequest>,
8740 >,
8741 _: (),
8742 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8743 if let Some(inner) = this {
8744 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8745 ::fidl_next::wire::Box::encode_present(out);
8746 } else {
8747 ::fidl_next::wire::Box::encode_absent(out);
8748 }
8749
8750 Ok(())
8751 }
8752 }
8753
8754 impl ::fidl_next::FromWire<crate::wire::FileReadAtRequest> for FileReadAtRequest {
8755 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8756 crate::wire::FileReadAtRequest,
8757 Self,
8758 > = unsafe {
8759 ::fidl_next::CopyOptimization::enable_if(
8760 true
8761 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8762 .is_enabled()
8763 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
8764 .is_enabled(),
8765 )
8766 };
8767
8768 #[inline]
8769 fn from_wire(wire: crate::wire::FileReadAtRequest) -> Self {
8770 Self {
8771 count: ::fidl_next::FromWire::from_wire(wire.count),
8772
8773 offset: ::fidl_next::FromWire::from_wire(wire.offset),
8774 }
8775 }
8776 }
8777
8778 impl ::fidl_next::FromWireRef<crate::wire::FileReadAtRequest> for FileReadAtRequest {
8779 #[inline]
8780 fn from_wire_ref(wire: &crate::wire::FileReadAtRequest) -> Self {
8781 Self {
8782 count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count),
8783
8784 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
8785 }
8786 }
8787 }
8788
8789 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8790 pub struct FileReadAtResponse {
8791 pub data: ::std::vec::Vec<u8>,
8792 }
8793
8794 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
8795 for FileReadAtResponse
8796 where
8797 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8798 ___E: ::fidl_next::Encoder,
8799 {
8800 #[inline]
8801 fn encode(
8802 self,
8803 encoder_: &mut ___E,
8804 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
8805 _: (),
8806 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8807 ::fidl_next::munge! {
8808 let crate::wire::FileReadAtResponse {
8809 data,
8810
8811 } = out_;
8812 }
8813
8814 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
8815
8816 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8817 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8818
8819 Ok(())
8820 }
8821 }
8822
8823 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
8824 for &'a FileReadAtResponse
8825 where
8826 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8827 ___E: ::fidl_next::Encoder,
8828 {
8829 #[inline]
8830 fn encode(
8831 self,
8832 encoder_: &mut ___E,
8833 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
8834 _: (),
8835 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8836 ::fidl_next::munge! {
8837 let crate::wire::FileReadAtResponse {
8838 data,
8839
8840 } = out_;
8841 }
8842
8843 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
8844
8845 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8846 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8847
8848 Ok(())
8849 }
8850 }
8851
8852 unsafe impl<___E>
8853 ::fidl_next::EncodeOption<
8854 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8855 ___E,
8856 > for FileReadAtResponse
8857 where
8858 ___E: ::fidl_next::Encoder + ?Sized,
8859 FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
8860 {
8861 #[inline]
8862 fn encode_option(
8863 this: ::core::option::Option<Self>,
8864 encoder: &mut ___E,
8865 out: &mut ::core::mem::MaybeUninit<
8866 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8867 >,
8868 _: (),
8869 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8870 if let Some(inner) = this {
8871 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8872 ::fidl_next::wire::Box::encode_present(out);
8873 } else {
8874 ::fidl_next::wire::Box::encode_absent(out);
8875 }
8876
8877 Ok(())
8878 }
8879 }
8880
8881 unsafe impl<'a, ___E>
8882 ::fidl_next::EncodeOption<
8883 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8884 ___E,
8885 > for &'a FileReadAtResponse
8886 where
8887 ___E: ::fidl_next::Encoder + ?Sized,
8888 &'a FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
8889 {
8890 #[inline]
8891 fn encode_option(
8892 this: ::core::option::Option<Self>,
8893 encoder: &mut ___E,
8894 out: &mut ::core::mem::MaybeUninit<
8895 ::fidl_next::wire::Box<'static, crate::wire::FileReadAtResponse<'static>>,
8896 >,
8897 _: (),
8898 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8899 if let Some(inner) = this {
8900 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8901 ::fidl_next::wire::Box::encode_present(out);
8902 } else {
8903 ::fidl_next::wire::Box::encode_absent(out);
8904 }
8905
8906 Ok(())
8907 }
8908 }
8909
8910 impl<'de> ::fidl_next::FromWire<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
8911 #[inline]
8912 fn from_wire(wire: crate::wire::FileReadAtResponse<'de>) -> Self {
8913 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
8914 }
8915 }
8916
8917 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
8918 #[inline]
8919 fn from_wire_ref(wire: &crate::wire::FileReadAtResponse<'de>) -> Self {
8920 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
8921 }
8922 }
8923
8924 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8925 pub struct FileWriteAtRequest {
8926 pub data: ::std::vec::Vec<u8>,
8927
8928 pub offset: u64,
8929 }
8930
8931 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
8932 for FileWriteAtRequest
8933 where
8934 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8935 ___E: ::fidl_next::Encoder,
8936 {
8937 #[inline]
8938 fn encode(
8939 self,
8940 encoder_: &mut ___E,
8941 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
8942 _: (),
8943 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8944 ::fidl_next::munge! {
8945 let crate::wire::FileWriteAtRequest {
8946 data,
8947 offset,
8948
8949 } = out_;
8950 }
8951
8952 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
8953
8954 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8955 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8956
8957 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
8958
8959 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8960
8961 Ok(())
8962 }
8963 }
8964
8965 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
8966 for &'a FileWriteAtRequest
8967 where
8968 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8969 ___E: ::fidl_next::Encoder,
8970 {
8971 #[inline]
8972 fn encode(
8973 self,
8974 encoder_: &mut ___E,
8975 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
8976 _: (),
8977 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8978 ::fidl_next::munge! {
8979 let crate::wire::FileWriteAtRequest {
8980 data,
8981 offset,
8982
8983 } = out_;
8984 }
8985
8986 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
8987
8988 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
8989 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
8990
8991 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
8992
8993 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
8994
8995 Ok(())
8996 }
8997 }
8998
8999 unsafe impl<___E>
9000 ::fidl_next::EncodeOption<
9001 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
9002 ___E,
9003 > for FileWriteAtRequest
9004 where
9005 ___E: ::fidl_next::Encoder + ?Sized,
9006 FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
9007 {
9008 #[inline]
9009 fn encode_option(
9010 this: ::core::option::Option<Self>,
9011 encoder: &mut ___E,
9012 out: &mut ::core::mem::MaybeUninit<
9013 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
9014 >,
9015 _: (),
9016 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9017 if let Some(inner) = this {
9018 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9019 ::fidl_next::wire::Box::encode_present(out);
9020 } else {
9021 ::fidl_next::wire::Box::encode_absent(out);
9022 }
9023
9024 Ok(())
9025 }
9026 }
9027
9028 unsafe impl<'a, ___E>
9029 ::fidl_next::EncodeOption<
9030 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
9031 ___E,
9032 > for &'a FileWriteAtRequest
9033 where
9034 ___E: ::fidl_next::Encoder + ?Sized,
9035 &'a FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
9036 {
9037 #[inline]
9038 fn encode_option(
9039 this: ::core::option::Option<Self>,
9040 encoder: &mut ___E,
9041 out: &mut ::core::mem::MaybeUninit<
9042 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtRequest<'static>>,
9043 >,
9044 _: (),
9045 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9046 if let Some(inner) = this {
9047 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9048 ::fidl_next::wire::Box::encode_present(out);
9049 } else {
9050 ::fidl_next::wire::Box::encode_absent(out);
9051 }
9052
9053 Ok(())
9054 }
9055 }
9056
9057 impl<'de> ::fidl_next::FromWire<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
9058 #[inline]
9059 fn from_wire(wire: crate::wire::FileWriteAtRequest<'de>) -> Self {
9060 Self {
9061 data: ::fidl_next::FromWire::from_wire(wire.data),
9062
9063 offset: ::fidl_next::FromWire::from_wire(wire.offset),
9064 }
9065 }
9066 }
9067
9068 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
9069 #[inline]
9070 fn from_wire_ref(wire: &crate::wire::FileWriteAtRequest<'de>) -> Self {
9071 Self {
9072 data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data),
9073
9074 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
9075 }
9076 }
9077 }
9078
9079 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9080 #[repr(C)]
9081 pub struct FileWriteAtResponse {
9082 pub actual_count: u64,
9083 }
9084
9085 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
9086 for FileWriteAtResponse
9087 where
9088 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9089 {
9090 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9091 Self,
9092 crate::wire::FileWriteAtResponse,
9093 > = unsafe {
9094 ::fidl_next::CopyOptimization::enable_if(
9095 true
9096
9097 && <
9098 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9099 >::COPY_OPTIMIZATION.is_enabled()
9100
9101 )
9102 };
9103
9104 #[inline]
9105 fn encode(
9106 self,
9107 encoder_: &mut ___E,
9108 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
9109 _: (),
9110 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9111 ::fidl_next::munge! {
9112 let crate::wire::FileWriteAtResponse {
9113 actual_count,
9114
9115 } = out_;
9116 }
9117
9118 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
9119
9120 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9121
9122 Ok(())
9123 }
9124 }
9125
9126 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
9127 for &'a FileWriteAtResponse
9128 where
9129 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9130 {
9131 #[inline]
9132 fn encode(
9133 self,
9134 encoder_: &mut ___E,
9135 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
9136 _: (),
9137 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9138 ::fidl_next::munge! {
9139 let crate::wire::FileWriteAtResponse {
9140 actual_count,
9141
9142 } = out_;
9143 }
9144
9145 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
9146
9147 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9148
9149 Ok(())
9150 }
9151 }
9152
9153 unsafe impl<___E>
9154 ::fidl_next::EncodeOption<
9155 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9156 ___E,
9157 > for FileWriteAtResponse
9158 where
9159 ___E: ::fidl_next::Encoder + ?Sized,
9160 FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
9161 {
9162 #[inline]
9163 fn encode_option(
9164 this: ::core::option::Option<Self>,
9165 encoder: &mut ___E,
9166 out: &mut ::core::mem::MaybeUninit<
9167 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9168 >,
9169 _: (),
9170 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9171 if let Some(inner) = this {
9172 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9173 ::fidl_next::wire::Box::encode_present(out);
9174 } else {
9175 ::fidl_next::wire::Box::encode_absent(out);
9176 }
9177
9178 Ok(())
9179 }
9180 }
9181
9182 unsafe impl<'a, ___E>
9183 ::fidl_next::EncodeOption<
9184 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9185 ___E,
9186 > for &'a FileWriteAtResponse
9187 where
9188 ___E: ::fidl_next::Encoder + ?Sized,
9189 &'a FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
9190 {
9191 #[inline]
9192 fn encode_option(
9193 this: ::core::option::Option<Self>,
9194 encoder: &mut ___E,
9195 out: &mut ::core::mem::MaybeUninit<
9196 ::fidl_next::wire::Box<'static, crate::wire::FileWriteAtResponse>,
9197 >,
9198 _: (),
9199 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9200 if let Some(inner) = this {
9201 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9202 ::fidl_next::wire::Box::encode_present(out);
9203 } else {
9204 ::fidl_next::wire::Box::encode_absent(out);
9205 }
9206
9207 Ok(())
9208 }
9209 }
9210
9211 impl ::fidl_next::FromWire<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
9212 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9213 crate::wire::FileWriteAtResponse,
9214 Self,
9215 > = unsafe {
9216 ::fidl_next::CopyOptimization::enable_if(
9217 true
9218 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9219 .is_enabled(),
9220 )
9221 };
9222
9223 #[inline]
9224 fn from_wire(wire: crate::wire::FileWriteAtResponse) -> Self {
9225 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
9226 }
9227 }
9228
9229 impl ::fidl_next::FromWireRef<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
9230 #[inline]
9231 fn from_wire_ref(wire: &crate::wire::FileWriteAtResponse) -> Self {
9232 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
9233 }
9234 }
9235
9236 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9237 #[repr(C)]
9238 pub struct FileResizeRequest {
9239 pub length: u64,
9240 }
9241
9242 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E> for FileResizeRequest
9243 where
9244 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9245 {
9246 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9247 Self,
9248 crate::wire::FileResizeRequest,
9249 > = unsafe {
9250 ::fidl_next::CopyOptimization::enable_if(
9251 true
9252
9253 && <
9254 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9255 >::COPY_OPTIMIZATION.is_enabled()
9256
9257 )
9258 };
9259
9260 #[inline]
9261 fn encode(
9262 self,
9263 encoder_: &mut ___E,
9264 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
9265 _: (),
9266 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9267 ::fidl_next::munge! {
9268 let crate::wire::FileResizeRequest {
9269 length,
9270
9271 } = out_;
9272 }
9273
9274 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
9275
9276 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
9277
9278 Ok(())
9279 }
9280 }
9281
9282 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
9283 for &'a FileResizeRequest
9284 where
9285 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9286 {
9287 #[inline]
9288 fn encode(
9289 self,
9290 encoder_: &mut ___E,
9291 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
9292 _: (),
9293 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9294 ::fidl_next::munge! {
9295 let crate::wire::FileResizeRequest {
9296 length,
9297
9298 } = out_;
9299 }
9300
9301 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
9302
9303 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
9304
9305 Ok(())
9306 }
9307 }
9308
9309 unsafe impl<___E>
9310 ::fidl_next::EncodeOption<
9311 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9312 ___E,
9313 > for FileResizeRequest
9314 where
9315 ___E: ::fidl_next::Encoder + ?Sized,
9316 FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
9317 {
9318 #[inline]
9319 fn encode_option(
9320 this: ::core::option::Option<Self>,
9321 encoder: &mut ___E,
9322 out: &mut ::core::mem::MaybeUninit<
9323 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9324 >,
9325 _: (),
9326 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9327 if let Some(inner) = this {
9328 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9329 ::fidl_next::wire::Box::encode_present(out);
9330 } else {
9331 ::fidl_next::wire::Box::encode_absent(out);
9332 }
9333
9334 Ok(())
9335 }
9336 }
9337
9338 unsafe impl<'a, ___E>
9339 ::fidl_next::EncodeOption<
9340 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9341 ___E,
9342 > for &'a FileResizeRequest
9343 where
9344 ___E: ::fidl_next::Encoder + ?Sized,
9345 &'a FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
9346 {
9347 #[inline]
9348 fn encode_option(
9349 this: ::core::option::Option<Self>,
9350 encoder: &mut ___E,
9351 out: &mut ::core::mem::MaybeUninit<
9352 ::fidl_next::wire::Box<'static, crate::wire::FileResizeRequest>,
9353 >,
9354 _: (),
9355 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9356 if let Some(inner) = this {
9357 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9358 ::fidl_next::wire::Box::encode_present(out);
9359 } else {
9360 ::fidl_next::wire::Box::encode_absent(out);
9361 }
9362
9363 Ok(())
9364 }
9365 }
9366
9367 impl ::fidl_next::FromWire<crate::wire::FileResizeRequest> for FileResizeRequest {
9368 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9369 crate::wire::FileResizeRequest,
9370 Self,
9371 > = unsafe {
9372 ::fidl_next::CopyOptimization::enable_if(
9373 true
9374 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
9375 .is_enabled(),
9376 )
9377 };
9378
9379 #[inline]
9380 fn from_wire(wire: crate::wire::FileResizeRequest) -> Self {
9381 Self { length: ::fidl_next::FromWire::from_wire(wire.length) }
9382 }
9383 }
9384
9385 impl ::fidl_next::FromWireRef<crate::wire::FileResizeRequest> for FileResizeRequest {
9386 #[inline]
9387 fn from_wire_ref(wire: &crate::wire::FileResizeRequest) -> Self {
9388 Self { length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length) }
9389 }
9390 }
9391
9392 pub type FileResizeResponse = ();
9393
9394 ::fidl_next::bitflags::bitflags! {
9395 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct VmoFlags: u32 {
9396 #[doc = " Requests that the VMO be readable.\n"]const READ = 1;
9397 #[doc = " Requests that the VMO be writable.\n"]const WRITE = 2;
9398 #[doc = " Request that the VMO be executable.\n"]const EXECUTE = 4;
9399 #[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;
9400 #[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;
9401
9402 }
9403 }
9404
9405 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for VmoFlags
9406 where
9407 ___E: ?Sized,
9408 {
9409 #[inline]
9410 fn encode(
9411 self,
9412 encoder: &mut ___E,
9413 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
9414 _: (),
9415 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9416 ::fidl_next::Encode::encode(&self, encoder, out, ())
9417 }
9418 }
9419
9420 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for &'a VmoFlags
9421 where
9422 ___E: ?Sized,
9423 {
9424 #[inline]
9425 fn encode(
9426 self,
9427 _: &mut ___E,
9428 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
9429 _: (),
9430 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9431 ::fidl_next::munge!(let crate::wire::VmoFlags { value } = out);
9432
9433 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
9434 return Err(::fidl_next::EncodeError::InvalidStrictBits);
9435 }
9436
9437 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
9438 Ok(())
9439 }
9440 }
9441
9442 impl ::core::convert::From<crate::wire::VmoFlags> for VmoFlags {
9443 fn from(wire: crate::wire::VmoFlags) -> Self {
9444 Self::from_bits_retain(u32::from(wire.value))
9445 }
9446 }
9447
9448 impl ::fidl_next::FromWire<crate::wire::VmoFlags> for VmoFlags {
9449 #[inline]
9450 fn from_wire(wire: crate::wire::VmoFlags) -> Self {
9451 Self::from(wire)
9452 }
9453 }
9454
9455 impl ::fidl_next::FromWireRef<crate::wire::VmoFlags> for VmoFlags {
9456 #[inline]
9457 fn from_wire_ref(wire: &crate::wire::VmoFlags) -> Self {
9458 Self::from(*wire)
9459 }
9460 }
9461
9462 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9463 #[repr(C)]
9464 pub struct FileGetBackingMemoryRequest {
9465 pub flags: crate::natural::VmoFlags,
9466 }
9467
9468 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
9469 for FileGetBackingMemoryRequest
9470 where
9471 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9472 {
9473 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9474 Self,
9475 crate::wire::FileGetBackingMemoryRequest,
9476 > = unsafe {
9477 ::fidl_next::CopyOptimization::enable_if(
9478 true && <crate::natural::VmoFlags as ::fidl_next::Encode<
9479 crate::wire::VmoFlags,
9480 ___E,
9481 >>::COPY_OPTIMIZATION
9482 .is_enabled(),
9483 )
9484 };
9485
9486 #[inline]
9487 fn encode(
9488 self,
9489 encoder_: &mut ___E,
9490 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
9491 _: (),
9492 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9493 ::fidl_next::munge! {
9494 let crate::wire::FileGetBackingMemoryRequest {
9495 flags,
9496
9497 } = out_;
9498 }
9499
9500 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
9501
9502 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
9503
9504 Ok(())
9505 }
9506 }
9507
9508 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
9509 for &'a FileGetBackingMemoryRequest
9510 where
9511 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9512 {
9513 #[inline]
9514 fn encode(
9515 self,
9516 encoder_: &mut ___E,
9517 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
9518 _: (),
9519 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9520 ::fidl_next::munge! {
9521 let crate::wire::FileGetBackingMemoryRequest {
9522 flags,
9523
9524 } = out_;
9525 }
9526
9527 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
9528
9529 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
9530
9531 Ok(())
9532 }
9533 }
9534
9535 unsafe impl<___E>
9536 ::fidl_next::EncodeOption<
9537 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9538 ___E,
9539 > for FileGetBackingMemoryRequest
9540 where
9541 ___E: ::fidl_next::Encoder + ?Sized,
9542 FileGetBackingMemoryRequest:
9543 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
9544 {
9545 #[inline]
9546 fn encode_option(
9547 this: ::core::option::Option<Self>,
9548 encoder: &mut ___E,
9549 out: &mut ::core::mem::MaybeUninit<
9550 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9551 >,
9552 _: (),
9553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9554 if let Some(inner) = this {
9555 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9556 ::fidl_next::wire::Box::encode_present(out);
9557 } else {
9558 ::fidl_next::wire::Box::encode_absent(out);
9559 }
9560
9561 Ok(())
9562 }
9563 }
9564
9565 unsafe impl<'a, ___E>
9566 ::fidl_next::EncodeOption<
9567 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9568 ___E,
9569 > for &'a FileGetBackingMemoryRequest
9570 where
9571 ___E: ::fidl_next::Encoder + ?Sized,
9572 &'a FileGetBackingMemoryRequest:
9573 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
9574 {
9575 #[inline]
9576 fn encode_option(
9577 this: ::core::option::Option<Self>,
9578 encoder: &mut ___E,
9579 out: &mut ::core::mem::MaybeUninit<
9580 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryRequest>,
9581 >,
9582 _: (),
9583 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9584 if let Some(inner) = this {
9585 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9586 ::fidl_next::wire::Box::encode_present(out);
9587 } else {
9588 ::fidl_next::wire::Box::encode_absent(out);
9589 }
9590
9591 Ok(())
9592 }
9593 }
9594
9595 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryRequest>
9596 for FileGetBackingMemoryRequest
9597 {
9598 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9599 crate::wire::FileGetBackingMemoryRequest,
9600 Self,
9601 > = unsafe {
9602 ::fidl_next::CopyOptimization::enable_if(
9603 true && <crate::natural::VmoFlags as ::fidl_next::FromWire<
9604 crate::wire::VmoFlags,
9605 >>::COPY_OPTIMIZATION
9606 .is_enabled(),
9607 )
9608 };
9609
9610 #[inline]
9611 fn from_wire(wire: crate::wire::FileGetBackingMemoryRequest) -> Self {
9612 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
9613 }
9614 }
9615
9616 impl ::fidl_next::FromWireRef<crate::wire::FileGetBackingMemoryRequest>
9617 for FileGetBackingMemoryRequest
9618 {
9619 #[inline]
9620 fn from_wire_ref(wire: &crate::wire::FileGetBackingMemoryRequest) -> Self {
9621 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
9622 }
9623 }
9624
9625 pub type LinkableLinkIntoResponse = ();
9626
9627 pub type FileAllocateResponse = ();
9628
9629 pub type FileEnableVerityResponse = ();
9630
9631 ::fidl_next::bitflags::bitflags! {
9632 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct FileSignal: u32 {
9633 #[doc = " Indicates the file is ready for reading.\n"]const READABLE = 16777216;
9634 #[doc = " Indicates the file is ready for writing.\n"]const WRITABLE = 33554432;
9635
9636 }
9637 }
9638
9639 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for FileSignal
9640 where
9641 ___E: ?Sized,
9642 {
9643 #[inline]
9644 fn encode(
9645 self,
9646 encoder: &mut ___E,
9647 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
9648 _: (),
9649 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9650 ::fidl_next::Encode::encode(&self, encoder, out, ())
9651 }
9652 }
9653
9654 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for &'a FileSignal
9655 where
9656 ___E: ?Sized,
9657 {
9658 #[inline]
9659 fn encode(
9660 self,
9661 _: &mut ___E,
9662 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
9663 _: (),
9664 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9665 ::fidl_next::munge!(let crate::wire::FileSignal { value } = out);
9666
9667 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
9668 return Err(::fidl_next::EncodeError::InvalidStrictBits);
9669 }
9670
9671 let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
9672 Ok(())
9673 }
9674 }
9675
9676 impl ::core::convert::From<crate::wire::FileSignal> for FileSignal {
9677 fn from(wire: crate::wire::FileSignal) -> Self {
9678 Self::from_bits_retain(u32::from(wire.value))
9679 }
9680 }
9681
9682 impl ::fidl_next::FromWire<crate::wire::FileSignal> for FileSignal {
9683 #[inline]
9684 fn from_wire(wire: crate::wire::FileSignal) -> Self {
9685 Self::from(wire)
9686 }
9687 }
9688
9689 impl ::fidl_next::FromWireRef<crate::wire::FileSignal> for FileSignal {
9690 #[inline]
9691 fn from_wire_ref(wire: &crate::wire::FileSignal) -> Self {
9692 Self::from(*wire)
9693 }
9694 }
9695
9696 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9697 #[repr(C)]
9698 pub struct FilesystemInfo {
9699 pub total_bytes: u64,
9700
9701 pub used_bytes: u64,
9702
9703 pub total_nodes: u64,
9704
9705 pub used_nodes: u64,
9706
9707 pub free_shared_pool_bytes: u64,
9708
9709 pub fs_id: u64,
9710
9711 pub block_size: u32,
9712
9713 pub max_filename_size: u32,
9714
9715 pub fs_type: u32,
9716
9717 pub padding: u32,
9718
9719 pub name: [i8; 32],
9720 }
9721
9722 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for FilesystemInfo
9723 where
9724 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9725 {
9726 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FilesystemInfo> = unsafe {
9727 ::fidl_next::CopyOptimization::enable_if(
9728 true
9729
9730 && <
9731 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9732 >::COPY_OPTIMIZATION.is_enabled()
9733
9734 && <
9735 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9736 >::COPY_OPTIMIZATION.is_enabled()
9737
9738 && <
9739 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9740 >::COPY_OPTIMIZATION.is_enabled()
9741
9742 && <
9743 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9744 >::COPY_OPTIMIZATION.is_enabled()
9745
9746 && <
9747 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9748 >::COPY_OPTIMIZATION.is_enabled()
9749
9750 && <
9751 u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
9752 >::COPY_OPTIMIZATION.is_enabled()
9753
9754 && <
9755 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9756 >::COPY_OPTIMIZATION.is_enabled()
9757
9758 && <
9759 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9760 >::COPY_OPTIMIZATION.is_enabled()
9761
9762 && <
9763 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9764 >::COPY_OPTIMIZATION.is_enabled()
9765
9766 && <
9767 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
9768 >::COPY_OPTIMIZATION.is_enabled()
9769
9770 && <
9771 [i8; 32] as ::fidl_next::Encode<[i8; 32], ___E>
9772 >::COPY_OPTIMIZATION.is_enabled()
9773
9774 )
9775 };
9776
9777 #[inline]
9778 fn encode(
9779 self,
9780 encoder_: &mut ___E,
9781 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
9782 _: (),
9783 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9784 ::fidl_next::munge! {
9785 let crate::wire::FilesystemInfo {
9786 total_bytes,
9787 used_bytes,
9788 total_nodes,
9789 used_nodes,
9790 free_shared_pool_bytes,
9791 fs_id,
9792 block_size,
9793 max_filename_size,
9794 fs_type,
9795 padding,
9796 name,
9797
9798 } = out_;
9799 }
9800
9801 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
9802
9803 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
9804
9805 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
9806
9807 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
9808
9809 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
9810
9811 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
9812
9813 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
9814
9815 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
9816
9817 ::fidl_next::Encode::encode(
9818 self.free_shared_pool_bytes,
9819 encoder_,
9820 free_shared_pool_bytes,
9821 (),
9822 )?;
9823
9824 let mut _field =
9825 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
9826
9827 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
9828
9829 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
9830
9831 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
9832
9833 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
9834
9835 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
9836
9837 let mut _field =
9838 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
9839
9840 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
9841
9842 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
9843
9844 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
9845
9846 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
9847
9848 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
9849
9850 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
9851
9852 Ok(())
9853 }
9854 }
9855
9856 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for &'a FilesystemInfo
9857 where
9858 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9859 {
9860 #[inline]
9861 fn encode(
9862 self,
9863 encoder_: &mut ___E,
9864 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
9865 _: (),
9866 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9867 ::fidl_next::munge! {
9868 let crate::wire::FilesystemInfo {
9869 total_bytes,
9870 used_bytes,
9871 total_nodes,
9872 used_nodes,
9873 free_shared_pool_bytes,
9874 fs_id,
9875 block_size,
9876 max_filename_size,
9877 fs_type,
9878 padding,
9879 name,
9880
9881 } = out_;
9882 }
9883
9884 ::fidl_next::Encode::encode(&self.total_bytes, encoder_, total_bytes, ())?;
9885
9886 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
9887
9888 ::fidl_next::Encode::encode(&self.used_bytes, encoder_, used_bytes, ())?;
9889
9890 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
9891
9892 ::fidl_next::Encode::encode(&self.total_nodes, encoder_, total_nodes, ())?;
9893
9894 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
9895
9896 ::fidl_next::Encode::encode(&self.used_nodes, encoder_, used_nodes, ())?;
9897
9898 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
9899
9900 ::fidl_next::Encode::encode(
9901 &self.free_shared_pool_bytes,
9902 encoder_,
9903 free_shared_pool_bytes,
9904 (),
9905 )?;
9906
9907 let mut _field =
9908 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
9909
9910 ::fidl_next::Encode::encode(&self.fs_id, encoder_, fs_id, ())?;
9911
9912 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
9913
9914 ::fidl_next::Encode::encode(&self.block_size, encoder_, block_size, ())?;
9915
9916 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
9917
9918 ::fidl_next::Encode::encode(&self.max_filename_size, encoder_, max_filename_size, ())?;
9919
9920 let mut _field =
9921 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
9922
9923 ::fidl_next::Encode::encode(&self.fs_type, encoder_, fs_type, ())?;
9924
9925 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
9926
9927 ::fidl_next::Encode::encode(&self.padding, encoder_, padding, ())?;
9928
9929 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
9930
9931 ::fidl_next::Encode::encode(&self.name, encoder_, name, ())?;
9932
9933 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
9934
9935 Ok(())
9936 }
9937 }
9938
9939 unsafe impl<___E>
9940 ::fidl_next::EncodeOption<
9941 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9942 ___E,
9943 > for FilesystemInfo
9944 where
9945 ___E: ::fidl_next::Encoder + ?Sized,
9946 FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
9947 {
9948 #[inline]
9949 fn encode_option(
9950 this: ::core::option::Option<Self>,
9951 encoder: &mut ___E,
9952 out: &mut ::core::mem::MaybeUninit<
9953 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9954 >,
9955 _: (),
9956 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9957 if let Some(inner) = this {
9958 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9959 ::fidl_next::wire::Box::encode_present(out);
9960 } else {
9961 ::fidl_next::wire::Box::encode_absent(out);
9962 }
9963
9964 Ok(())
9965 }
9966 }
9967
9968 unsafe impl<'a, ___E>
9969 ::fidl_next::EncodeOption<
9970 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9971 ___E,
9972 > for &'a FilesystemInfo
9973 where
9974 ___E: ::fidl_next::Encoder + ?Sized,
9975 &'a FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
9976 {
9977 #[inline]
9978 fn encode_option(
9979 this: ::core::option::Option<Self>,
9980 encoder: &mut ___E,
9981 out: &mut ::core::mem::MaybeUninit<
9982 ::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>,
9983 >,
9984 _: (),
9985 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9986 if let Some(inner) = this {
9987 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9988 ::fidl_next::wire::Box::encode_present(out);
9989 } else {
9990 ::fidl_next::wire::Box::encode_absent(out);
9991 }
9992
9993 Ok(())
9994 }
9995 }
9996
9997 impl ::fidl_next::FromWire<crate::wire::FilesystemInfo> for FilesystemInfo {
9998 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FilesystemInfo, Self> = unsafe {
9999 ::fidl_next::CopyOptimization::enable_if(
10000 true
10001 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
10002 .is_enabled()
10003 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
10004 .is_enabled()
10005 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
10006 .is_enabled()
10007 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
10008 .is_enabled()
10009 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
10010 .is_enabled()
10011 && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
10012 .is_enabled()
10013 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
10014 .is_enabled()
10015 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
10016 .is_enabled()
10017 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
10018 .is_enabled()
10019 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
10020 .is_enabled()
10021 && <[i8; 32] as ::fidl_next::FromWire<[i8; 32]>>::COPY_OPTIMIZATION
10022 .is_enabled(),
10023 )
10024 };
10025
10026 #[inline]
10027 fn from_wire(wire: crate::wire::FilesystemInfo) -> Self {
10028 Self {
10029 total_bytes: ::fidl_next::FromWire::from_wire(wire.total_bytes),
10030
10031 used_bytes: ::fidl_next::FromWire::from_wire(wire.used_bytes),
10032
10033 total_nodes: ::fidl_next::FromWire::from_wire(wire.total_nodes),
10034
10035 used_nodes: ::fidl_next::FromWire::from_wire(wire.used_nodes),
10036
10037 free_shared_pool_bytes: ::fidl_next::FromWire::from_wire(
10038 wire.free_shared_pool_bytes,
10039 ),
10040
10041 fs_id: ::fidl_next::FromWire::from_wire(wire.fs_id),
10042
10043 block_size: ::fidl_next::FromWire::from_wire(wire.block_size),
10044
10045 max_filename_size: ::fidl_next::FromWire::from_wire(wire.max_filename_size),
10046
10047 fs_type: ::fidl_next::FromWire::from_wire(wire.fs_type),
10048
10049 padding: ::fidl_next::FromWire::from_wire(wire.padding),
10050
10051 name: ::fidl_next::FromWire::from_wire(wire.name),
10052 }
10053 }
10054 }
10055
10056 impl ::fidl_next::FromWireRef<crate::wire::FilesystemInfo> for FilesystemInfo {
10057 #[inline]
10058 fn from_wire_ref(wire: &crate::wire::FilesystemInfo) -> Self {
10059 Self {
10060 total_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_bytes),
10061
10062 used_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_bytes),
10063
10064 total_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_nodes),
10065
10066 used_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_nodes),
10067
10068 free_shared_pool_bytes: ::fidl_next::FromWireRef::from_wire_ref(
10069 &wire.free_shared_pool_bytes,
10070 ),
10071
10072 fs_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_id),
10073
10074 block_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.block_size),
10075
10076 max_filename_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_filename_size),
10077
10078 fs_type: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_type),
10079
10080 padding: ::fidl_next::FromWireRef::from_wire_ref(&wire.padding),
10081
10082 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
10083 }
10084 }
10085 }
10086
10087 pub type Service = ();
10088
10089 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10090 pub struct SymlinkObject {
10091 pub target: ::std::vec::Vec<u8>,
10092 }
10093
10094 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E> for SymlinkObject
10095 where
10096 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10097 ___E: ::fidl_next::Encoder,
10098 {
10099 #[inline]
10100 fn encode(
10101 self,
10102 encoder_: &mut ___E,
10103 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
10104 _: (),
10105 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10106 ::fidl_next::munge! {
10107 let crate::wire::SymlinkObject {
10108 target,
10109
10110 } = out_;
10111 }
10112
10113 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
10114
10115 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
10116 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
10117
10118 Ok(())
10119 }
10120 }
10121
10122 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
10123 for &'a SymlinkObject
10124 where
10125 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10126 ___E: ::fidl_next::Encoder,
10127 {
10128 #[inline]
10129 fn encode(
10130 self,
10131 encoder_: &mut ___E,
10132 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
10133 _: (),
10134 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10135 ::fidl_next::munge! {
10136 let crate::wire::SymlinkObject {
10137 target,
10138
10139 } = out_;
10140 }
10141
10142 ::fidl_next::Encode::encode(&self.target, encoder_, target, (4095, ()))?;
10143
10144 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
10145 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
10146
10147 Ok(())
10148 }
10149 }
10150
10151 unsafe impl<___E>
10152 ::fidl_next::EncodeOption<
10153 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10154 ___E,
10155 > for SymlinkObject
10156 where
10157 ___E: ::fidl_next::Encoder + ?Sized,
10158 SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
10159 {
10160 #[inline]
10161 fn encode_option(
10162 this: ::core::option::Option<Self>,
10163 encoder: &mut ___E,
10164 out: &mut ::core::mem::MaybeUninit<
10165 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10166 >,
10167 _: (),
10168 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10169 if let Some(inner) = this {
10170 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10171 ::fidl_next::wire::Box::encode_present(out);
10172 } else {
10173 ::fidl_next::wire::Box::encode_absent(out);
10174 }
10175
10176 Ok(())
10177 }
10178 }
10179
10180 unsafe impl<'a, ___E>
10181 ::fidl_next::EncodeOption<
10182 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10183 ___E,
10184 > for &'a SymlinkObject
10185 where
10186 ___E: ::fidl_next::Encoder + ?Sized,
10187 &'a SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
10188 {
10189 #[inline]
10190 fn encode_option(
10191 this: ::core::option::Option<Self>,
10192 encoder: &mut ___E,
10193 out: &mut ::core::mem::MaybeUninit<
10194 ::fidl_next::wire::Box<'static, crate::wire::SymlinkObject<'static>>,
10195 >,
10196 _: (),
10197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10198 if let Some(inner) = this {
10199 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10200 ::fidl_next::wire::Box::encode_present(out);
10201 } else {
10202 ::fidl_next::wire::Box::encode_absent(out);
10203 }
10204
10205 Ok(())
10206 }
10207 }
10208
10209 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkObject<'de>> for SymlinkObject {
10210 #[inline]
10211 fn from_wire(wire: crate::wire::SymlinkObject<'de>) -> Self {
10212 Self { target: ::fidl_next::FromWire::from_wire(wire.target) }
10213 }
10214 }
10215
10216 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkObject<'de>> for SymlinkObject {
10217 #[inline]
10218 fn from_wire_ref(wire: &crate::wire::SymlinkObject<'de>) -> Self {
10219 Self { target: ::fidl_next::FromWireRef::from_wire_ref(&wire.target) }
10220 }
10221 }
10222
10223 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10224 #[repr(u8)]
10225 pub enum WatchEvent {
10226 Deleted = 0,
10227 Added = 1,
10228 Removed = 2,
10229 Existing = 3,
10230 Idle = 4,
10231 }
10232 impl ::core::convert::TryFrom<u8> for WatchEvent {
10233 type Error = ::fidl_next::UnknownStrictEnumMemberError;
10234 fn try_from(
10235 value: u8,
10236 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
10237 match value {
10238 0 => Ok(Self::Deleted),
10239 1 => Ok(Self::Added),
10240 2 => Ok(Self::Removed),
10241 3 => Ok(Self::Existing),
10242 4 => Ok(Self::Idle),
10243
10244 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
10245 }
10246 }
10247 }
10248
10249 impl ::std::convert::From<WatchEvent> for u8 {
10250 fn from(value: WatchEvent) -> Self {
10251 match value {
10252 WatchEvent::Deleted => 0,
10253 WatchEvent::Added => 1,
10254 WatchEvent::Removed => 2,
10255 WatchEvent::Existing => 3,
10256 WatchEvent::Idle => 4,
10257 }
10258 }
10259 }
10260
10261 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for WatchEvent
10262 where
10263 ___E: ?Sized,
10264 {
10265 #[inline]
10266 fn encode(
10267 self,
10268 encoder: &mut ___E,
10269 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
10270 _: (),
10271 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10272 ::fidl_next::Encode::encode(&self, encoder, out, ())
10273 }
10274 }
10275
10276 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for &'a WatchEvent
10277 where
10278 ___E: ?Sized,
10279 {
10280 #[inline]
10281 fn encode(
10282 self,
10283 encoder: &mut ___E,
10284 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
10285 _: (),
10286 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10287 ::fidl_next::munge!(let crate::wire::WatchEvent { value } = out);
10288 let _ = value.write(u8::from(match *self {
10289 WatchEvent::Deleted => 0,
10290
10291 WatchEvent::Added => 1,
10292
10293 WatchEvent::Removed => 2,
10294
10295 WatchEvent::Existing => 3,
10296
10297 WatchEvent::Idle => 4,
10298 }));
10299
10300 Ok(())
10301 }
10302 }
10303
10304 impl ::core::convert::From<crate::wire::WatchEvent> for WatchEvent {
10305 fn from(wire: crate::wire::WatchEvent) -> Self {
10306 match u8::from(wire.value) {
10307 0 => Self::Deleted,
10308
10309 1 => Self::Added,
10310
10311 2 => Self::Removed,
10312
10313 3 => Self::Existing,
10314
10315 4 => Self::Idle,
10316
10317 _ => unsafe { ::core::hint::unreachable_unchecked() },
10318 }
10319 }
10320 }
10321
10322 impl ::fidl_next::FromWire<crate::wire::WatchEvent> for WatchEvent {
10323 #[inline]
10324 fn from_wire(wire: crate::wire::WatchEvent) -> Self {
10325 Self::from(wire)
10326 }
10327 }
10328
10329 impl ::fidl_next::FromWireRef<crate::wire::WatchEvent> for WatchEvent {
10330 #[inline]
10331 fn from_wire_ref(wire: &crate::wire::WatchEvent) -> Self {
10332 Self::from(*wire)
10333 }
10334 }
10335}
10336
10337pub mod wire {
10338
10339 #[derive(Clone, Copy, Debug)]
10341 #[repr(transparent)]
10342 pub struct Operations {
10343 pub(crate) value: ::fidl_next::wire::Uint64,
10344 }
10345
10346 impl ::fidl_next::Constrained for Operations {
10347 type Constraint = ();
10348
10349 fn validate(
10350 _: ::fidl_next::Slot<'_, Self>,
10351 _: Self::Constraint,
10352 ) -> Result<(), ::fidl_next::ValidationError> {
10353 Ok(())
10354 }
10355 }
10356
10357 unsafe impl ::fidl_next::Wire for Operations {
10358 type Narrowed<'de> = Self;
10359
10360 #[inline]
10361 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10362 }
10364 }
10365
10366 unsafe impl<___D> ::fidl_next::Decode<___D> for Operations
10367 where
10368 ___D: ?Sized,
10369 {
10370 fn decode(
10371 slot: ::fidl_next::Slot<'_, Self>,
10372 _: &mut ___D,
10373 _: (),
10374 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10375 Ok(())
10376 }
10377 }
10378
10379 impl ::core::convert::From<crate::natural::Operations> for Operations {
10380 fn from(natural: crate::natural::Operations) -> Self {
10381 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
10382 }
10383 }
10384
10385 impl ::fidl_next::IntoNatural for Operations {
10386 type Natural = crate::natural::Operations;
10387 }
10388
10389 pub type Abilities = crate::wire::Operations;
10391
10392 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
10394 #[repr(transparent)]
10395 pub struct SeekOrigin {
10396 pub(crate) value: ::fidl_next::wire::Uint32,
10397 }
10398
10399 impl ::fidl_next::Constrained for SeekOrigin {
10400 type Constraint = ();
10401
10402 fn validate(
10403 _: ::fidl_next::Slot<'_, Self>,
10404 _: Self::Constraint,
10405 ) -> Result<(), ::fidl_next::ValidationError> {
10406 Ok(())
10407 }
10408 }
10409
10410 unsafe impl ::fidl_next::Wire for SeekOrigin {
10411 type Narrowed<'de> = Self;
10412
10413 #[inline]
10414 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10415 }
10417 }
10418
10419 impl SeekOrigin {
10420 pub const START: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(0) };
10421
10422 pub const CURRENT: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(1) };
10423
10424 pub const END: SeekOrigin = SeekOrigin { value: ::fidl_next::wire::Uint32(2) };
10425 }
10426
10427 unsafe impl<___D> ::fidl_next::Decode<___D> for SeekOrigin
10428 where
10429 ___D: ?Sized,
10430 {
10431 fn decode(
10432 slot: ::fidl_next::Slot<'_, Self>,
10433 _: &mut ___D,
10434 _: (),
10435 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10436 ::fidl_next::munge!(let Self { value } = slot);
10437
10438 match u32::from(*value) {
10439 0 | 1 | 2 => (),
10440 unknown => {
10441 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
10442 }
10443 }
10444
10445 Ok(())
10446 }
10447 }
10448
10449 impl ::core::convert::From<crate::natural::SeekOrigin> for SeekOrigin {
10450 fn from(natural: crate::natural::SeekOrigin) -> Self {
10451 match natural {
10452 crate::natural::SeekOrigin::Start => SeekOrigin::START,
10453
10454 crate::natural::SeekOrigin::Current => SeekOrigin::CURRENT,
10455
10456 crate::natural::SeekOrigin::End => SeekOrigin::END,
10457 }
10458 }
10459 }
10460
10461 impl ::fidl_next::IntoNatural for SeekOrigin {
10462 type Natural = crate::natural::SeekOrigin;
10463 }
10464
10465 #[derive(Clone, Debug)]
10467 #[repr(C)]
10468 pub struct AdvisoryLockRange {
10469 pub origin: crate::wire::SeekOrigin,
10470
10471 pub offset: ::fidl_next::wire::Int64,
10472
10473 pub length: ::fidl_next::wire::Int64,
10474 }
10475
10476 static_assertions::const_assert_eq!(std::mem::size_of::<AdvisoryLockRange>(), 24);
10477 static_assertions::const_assert_eq!(std::mem::align_of::<AdvisoryLockRange>(), 8);
10478
10479 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, origin), 0);
10480
10481 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, offset), 8);
10482
10483 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, length), 16);
10484
10485 impl ::fidl_next::Constrained for AdvisoryLockRange {
10486 type Constraint = ();
10487
10488 fn validate(
10489 _: ::fidl_next::Slot<'_, Self>,
10490 _: Self::Constraint,
10491 ) -> Result<(), ::fidl_next::ValidationError> {
10492 Ok(())
10493 }
10494 }
10495
10496 unsafe impl ::fidl_next::Wire for AdvisoryLockRange {
10497 type Narrowed<'de> = AdvisoryLockRange;
10498
10499 #[inline]
10500 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10501 ::fidl_next::munge! {
10502 let Self {
10503 origin,
10504 offset,
10505 length,
10506
10507 } = &mut *out_;
10508 }
10509
10510 ::fidl_next::Wire::zero_padding(origin);
10511
10512 ::fidl_next::Wire::zero_padding(offset);
10513
10514 ::fidl_next::Wire::zero_padding(length);
10515
10516 unsafe {
10517 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
10518 }
10519 }
10520 }
10521
10522 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockRange
10523 where
10524 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10525 {
10526 fn decode(
10527 slot_: ::fidl_next::Slot<'_, Self>,
10528 decoder_: &mut ___D,
10529 _: (),
10530 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10531 if slot_.as_bytes()[4..8] != [0u8; 4] {
10532 return Err(::fidl_next::DecodeError::InvalidPadding);
10533 }
10534
10535 ::fidl_next::munge! {
10536 let Self {
10537 mut origin,
10538 mut offset,
10539 mut length,
10540
10541 } = slot_;
10542 }
10543
10544 let _field = origin.as_mut();
10545
10546 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
10547
10548 let _field = offset.as_mut();
10549
10550 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
10551
10552 let _field = length.as_mut();
10553
10554 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
10555
10556 Ok(())
10557 }
10558 }
10559
10560 impl ::fidl_next::IntoNatural for AdvisoryLockRange {
10561 type Natural = crate::natural::AdvisoryLockRange;
10562 }
10563
10564 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
10566 #[repr(transparent)]
10567 pub struct AdvisoryLockType {
10568 pub(crate) value: ::fidl_next::wire::Uint32,
10569 }
10570
10571 impl ::fidl_next::Constrained for AdvisoryLockType {
10572 type Constraint = ();
10573
10574 fn validate(
10575 _: ::fidl_next::Slot<'_, Self>,
10576 _: Self::Constraint,
10577 ) -> Result<(), ::fidl_next::ValidationError> {
10578 Ok(())
10579 }
10580 }
10581
10582 unsafe impl ::fidl_next::Wire for AdvisoryLockType {
10583 type Narrowed<'de> = Self;
10584
10585 #[inline]
10586 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10587 }
10589 }
10590
10591 impl AdvisoryLockType {
10592 pub const READ: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::wire::Uint32(1) };
10593
10594 pub const WRITE: AdvisoryLockType =
10595 AdvisoryLockType { value: ::fidl_next::wire::Uint32(2) };
10596
10597 pub const UNLOCK: AdvisoryLockType =
10598 AdvisoryLockType { value: ::fidl_next::wire::Uint32(3) };
10599 }
10600
10601 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockType
10602 where
10603 ___D: ?Sized,
10604 {
10605 fn decode(
10606 slot: ::fidl_next::Slot<'_, Self>,
10607 _: &mut ___D,
10608 _: (),
10609 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10610 ::fidl_next::munge!(let Self { value } = slot);
10611
10612 match u32::from(*value) {
10613 1 | 2 | 3 => (),
10614 unknown => {
10615 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
10616 }
10617 }
10618
10619 Ok(())
10620 }
10621 }
10622
10623 impl ::core::convert::From<crate::natural::AdvisoryLockType> for AdvisoryLockType {
10624 fn from(natural: crate::natural::AdvisoryLockType) -> Self {
10625 match natural {
10626 crate::natural::AdvisoryLockType::Read => AdvisoryLockType::READ,
10627
10628 crate::natural::AdvisoryLockType::Write => AdvisoryLockType::WRITE,
10629
10630 crate::natural::AdvisoryLockType::Unlock => AdvisoryLockType::UNLOCK,
10631 }
10632 }
10633 }
10634
10635 impl ::fidl_next::IntoNatural for AdvisoryLockType {
10636 type Natural = crate::natural::AdvisoryLockType;
10637 }
10638
10639 #[repr(C)]
10641 pub struct AdvisoryLockRequest<'de> {
10642 pub(crate) table: ::fidl_next::wire::Table<'de>,
10643 }
10644
10645 impl<'de> Drop for AdvisoryLockRequest<'de> {
10646 fn drop(&mut self) {
10647 let _ = self.table.get(1).map(|envelope| unsafe {
10648 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
10649 });
10650
10651 let _ = self.table.get(2).map(|envelope| unsafe {
10652 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
10653 });
10654
10655 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
10656 }
10657 }
10658
10659 impl ::fidl_next::Constrained for AdvisoryLockRequest<'_> {
10660 type Constraint = ();
10661
10662 fn validate(
10663 _: ::fidl_next::Slot<'_, Self>,
10664 _: Self::Constraint,
10665 ) -> Result<(), ::fidl_next::ValidationError> {
10666 Ok(())
10667 }
10668 }
10669
10670 unsafe impl ::fidl_next::Wire for AdvisoryLockRequest<'static> {
10671 type Narrowed<'de> = AdvisoryLockRequest<'de>;
10672
10673 #[inline]
10674 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10675 ::fidl_next::munge!(let Self { table } = out);
10676 ::fidl_next::wire::Table::zero_padding(table);
10677 }
10678 }
10679
10680 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AdvisoryLockRequest<'de>
10681 where
10682 ___D: ::fidl_next::Decoder<'de> + ?Sized,
10683 {
10684 fn decode(
10685 slot: ::fidl_next::Slot<'_, Self>,
10686 decoder: &mut ___D,
10687 _: (),
10688 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10689 ::fidl_next::munge!(let Self { table } = slot);
10690
10691 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10692 match ordinal {
10693 0 => unsafe { ::core::hint::unreachable_unchecked() },
10694
10695 1 => {
10696 ::fidl_next::wire::Envelope::decode_as::<
10697 ___D,
10698 crate::wire::AdvisoryLockType,
10699 >(slot.as_mut(), decoder, ())?;
10700
10701 Ok(())
10702 }
10703
10704 2 => {
10705 ::fidl_next::wire::Envelope::decode_as::<
10706 ___D,
10707 crate::wire::AdvisoryLockRange,
10708 >(slot.as_mut(), decoder, ())?;
10709
10710 Ok(())
10711 }
10712
10713 3 => {
10714 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10715 slot.as_mut(),
10716 decoder,
10717 (),
10718 )?;
10719
10720 Ok(())
10721 }
10722
10723 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10724 }
10725 })
10726 }
10727 }
10728
10729 impl<'de> AdvisoryLockRequest<'de> {
10730 pub fn type_(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockType> {
10731 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10732 }
10733
10734 pub fn take_type_(&mut self) -> ::core::option::Option<crate::wire::AdvisoryLockType> {
10735 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
10736 }
10737
10738 pub fn range(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockRange> {
10739 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10740 }
10741
10742 pub fn take_range(&mut self) -> ::core::option::Option<crate::wire::AdvisoryLockRange> {
10743 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
10744 }
10745
10746 pub fn wait(&self) -> ::core::option::Option<&bool> {
10747 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10748 }
10749
10750 pub fn take_wait(&mut self) -> ::core::option::Option<bool> {
10751 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
10752 }
10753 }
10754
10755 impl<'de> ::core::fmt::Debug for AdvisoryLockRequest<'de> {
10756 fn fmt(
10757 &self,
10758 f: &mut ::core::fmt::Formatter<'_>,
10759 ) -> ::core::result::Result<(), ::core::fmt::Error> {
10760 f.debug_struct("AdvisoryLockRequest")
10761 .field("type_", &self.type_())
10762 .field("range", &self.range())
10763 .field("wait", &self.wait())
10764 .finish()
10765 }
10766 }
10767
10768 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockRequest<'de> {
10769 type Natural = crate::natural::AdvisoryLockRequest;
10770 }
10771
10772 #[derive(Debug)]
10774 #[repr(C)]
10775 pub struct AdvisoryLockingAdvisoryLockRequest<'de> {
10776 pub request: crate::wire::AdvisoryLockRequest<'de>,
10777 }
10778
10779 static_assertions::const_assert_eq!(
10780 std::mem::size_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
10781 16
10782 );
10783 static_assertions::const_assert_eq!(
10784 std::mem::align_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
10785 8
10786 );
10787
10788 static_assertions::const_assert_eq!(
10789 std::mem::offset_of!(AdvisoryLockingAdvisoryLockRequest<'_>, request),
10790 0
10791 );
10792
10793 impl ::fidl_next::Constrained for AdvisoryLockingAdvisoryLockRequest<'_> {
10794 type Constraint = ();
10795
10796 fn validate(
10797 _: ::fidl_next::Slot<'_, Self>,
10798 _: Self::Constraint,
10799 ) -> Result<(), ::fidl_next::ValidationError> {
10800 Ok(())
10801 }
10802 }
10803
10804 unsafe impl ::fidl_next::Wire for AdvisoryLockingAdvisoryLockRequest<'static> {
10805 type Narrowed<'de> = AdvisoryLockingAdvisoryLockRequest<'de>;
10806
10807 #[inline]
10808 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10809 ::fidl_next::munge! {
10810 let Self {
10811 request,
10812
10813 } = &mut *out_;
10814 }
10815
10816 ::fidl_next::Wire::zero_padding(request);
10817 }
10818 }
10819
10820 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AdvisoryLockingAdvisoryLockRequest<'de>
10821 where
10822 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10823 ___D: ::fidl_next::Decoder<'de>,
10824 {
10825 fn decode(
10826 slot_: ::fidl_next::Slot<'_, Self>,
10827 decoder_: &mut ___D,
10828 _: (),
10829 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10830 ::fidl_next::munge! {
10831 let Self {
10832 mut request,
10833
10834 } = slot_;
10835 }
10836
10837 let _field = request.as_mut();
10838
10839 ::fidl_next::Decode::decode(request.as_mut(), decoder_, ())?;
10840
10841 Ok(())
10842 }
10843 }
10844
10845 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockingAdvisoryLockRequest<'de> {
10846 type Natural = crate::natural::AdvisoryLockingAdvisoryLockRequest;
10847 }
10848
10849 pub type AdvisoryLockingAdvisoryLockResponse = ::fidl_next::wire::Unit;
10851
10852 #[derive(Clone, Copy, Debug)]
10854 #[repr(transparent)]
10855 pub struct AllocateMode {
10856 pub(crate) value: ::fidl_next::wire::Uint32,
10857 }
10858
10859 impl ::fidl_next::Constrained for AllocateMode {
10860 type Constraint = ();
10861
10862 fn validate(
10863 _: ::fidl_next::Slot<'_, Self>,
10864 _: Self::Constraint,
10865 ) -> Result<(), ::fidl_next::ValidationError> {
10866 Ok(())
10867 }
10868 }
10869
10870 unsafe impl ::fidl_next::Wire for AllocateMode {
10871 type Narrowed<'de> = Self;
10872
10873 #[inline]
10874 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10875 }
10877 }
10878
10879 unsafe impl<___D> ::fidl_next::Decode<___D> for AllocateMode
10880 where
10881 ___D: ?Sized,
10882 {
10883 fn decode(
10884 slot: ::fidl_next::Slot<'_, Self>,
10885 _: &mut ___D,
10886 _: (),
10887 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10888 Ok(())
10889 }
10890 }
10891
10892 impl ::core::convert::From<crate::natural::AllocateMode> for AllocateMode {
10893 fn from(natural: crate::natural::AllocateMode) -> Self {
10894 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
10895 }
10896 }
10897
10898 impl ::fidl_next::IntoNatural for AllocateMode {
10899 type Natural = crate::natural::AllocateMode;
10900 }
10901
10902 pub type Rights = crate::wire::Operations;
10904
10905 pub type Id = ::fidl_next::wire::Uint64;
10907
10908 #[derive(Clone, Copy, Debug)]
10910 #[repr(transparent)]
10911 pub struct OpenFlags {
10912 pub(crate) value: ::fidl_next::wire::Uint32,
10913 }
10914
10915 impl ::fidl_next::Constrained for OpenFlags {
10916 type Constraint = ();
10917
10918 fn validate(
10919 _: ::fidl_next::Slot<'_, Self>,
10920 _: Self::Constraint,
10921 ) -> Result<(), ::fidl_next::ValidationError> {
10922 Ok(())
10923 }
10924 }
10925
10926 unsafe impl ::fidl_next::Wire for OpenFlags {
10927 type Narrowed<'de> = Self;
10928
10929 #[inline]
10930 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10931 }
10933 }
10934
10935 unsafe impl<___D> ::fidl_next::Decode<___D> for OpenFlags
10936 where
10937 ___D: ?Sized,
10938 {
10939 fn decode(
10940 slot: ::fidl_next::Slot<'_, Self>,
10941 _: &mut ___D,
10942 _: (),
10943 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10944 ::fidl_next::munge!(let Self { value } = slot);
10945 let set = u32::from(*value);
10946 if set & !crate::natural::OpenFlags::all().bits() != 0 {
10947 return Err(::fidl_next::DecodeError::InvalidBits {
10948 expected: crate::natural::OpenFlags::all().bits() as usize,
10949 actual: set as usize,
10950 });
10951 }
10952
10953 Ok(())
10954 }
10955 }
10956
10957 impl ::core::convert::From<crate::natural::OpenFlags> for OpenFlags {
10958 fn from(natural: crate::natural::OpenFlags) -> Self {
10959 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
10960 }
10961 }
10962
10963 impl ::fidl_next::IntoNatural for OpenFlags {
10964 type Natural = crate::natural::OpenFlags;
10965 }
10966
10967 #[derive(Clone, Debug)]
10969 #[repr(C)]
10970 pub struct NodeAttributes {
10971 pub mode: ::fidl_next::wire::Uint32,
10972
10973 pub id: ::fidl_next::wire::Uint64,
10974
10975 pub content_size: ::fidl_next::wire::Uint64,
10976
10977 pub storage_size: ::fidl_next::wire::Uint64,
10978
10979 pub link_count: ::fidl_next::wire::Uint64,
10980
10981 pub creation_time: ::fidl_next::wire::Uint64,
10982
10983 pub modification_time: ::fidl_next::wire::Uint64,
10984 }
10985
10986 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes>(), 56);
10987 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes>(), 8);
10988
10989 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, mode), 0);
10990
10991 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, id), 8);
10992
10993 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, content_size), 16);
10994
10995 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, storage_size), 24);
10996
10997 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, link_count), 32);
10998
10999 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, creation_time), 40);
11000
11001 static_assertions::const_assert_eq!(
11002 std::mem::offset_of!(NodeAttributes, modification_time),
11003 48
11004 );
11005
11006 impl ::fidl_next::Constrained for NodeAttributes {
11007 type Constraint = ();
11008
11009 fn validate(
11010 _: ::fidl_next::Slot<'_, Self>,
11011 _: Self::Constraint,
11012 ) -> Result<(), ::fidl_next::ValidationError> {
11013 Ok(())
11014 }
11015 }
11016
11017 unsafe impl ::fidl_next::Wire for NodeAttributes {
11018 type Narrowed<'de> = NodeAttributes;
11019
11020 #[inline]
11021 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11022 ::fidl_next::munge! {
11023 let Self {
11024 mode,
11025 id,
11026 content_size,
11027 storage_size,
11028 link_count,
11029 creation_time,
11030 modification_time,
11031
11032 } = &mut *out_;
11033 }
11034
11035 ::fidl_next::Wire::zero_padding(mode);
11036
11037 ::fidl_next::Wire::zero_padding(id);
11038
11039 ::fidl_next::Wire::zero_padding(content_size);
11040
11041 ::fidl_next::Wire::zero_padding(storage_size);
11042
11043 ::fidl_next::Wire::zero_padding(link_count);
11044
11045 ::fidl_next::Wire::zero_padding(creation_time);
11046
11047 ::fidl_next::Wire::zero_padding(modification_time);
11048
11049 unsafe {
11050 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
11051 }
11052 }
11053 }
11054
11055 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributes
11056 where
11057 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11058 {
11059 fn decode(
11060 slot_: ::fidl_next::Slot<'_, Self>,
11061 decoder_: &mut ___D,
11062 _: (),
11063 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11064 if slot_.as_bytes()[4..8] != [0u8; 4] {
11065 return Err(::fidl_next::DecodeError::InvalidPadding);
11066 }
11067
11068 ::fidl_next::munge! {
11069 let Self {
11070 mut mode,
11071 mut id,
11072 mut content_size,
11073 mut storage_size,
11074 mut link_count,
11075 mut creation_time,
11076 mut modification_time,
11077
11078 } = slot_;
11079 }
11080
11081 let _field = mode.as_mut();
11082
11083 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
11084
11085 let _field = id.as_mut();
11086
11087 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
11088
11089 let _field = content_size.as_mut();
11090
11091 ::fidl_next::Decode::decode(content_size.as_mut(), decoder_, ())?;
11092
11093 let _field = storage_size.as_mut();
11094
11095 ::fidl_next::Decode::decode(storage_size.as_mut(), decoder_, ())?;
11096
11097 let _field = link_count.as_mut();
11098
11099 ::fidl_next::Decode::decode(link_count.as_mut(), decoder_, ())?;
11100
11101 let _field = creation_time.as_mut();
11102
11103 ::fidl_next::Decode::decode(creation_time.as_mut(), decoder_, ())?;
11104
11105 let _field = modification_time.as_mut();
11106
11107 ::fidl_next::Decode::decode(modification_time.as_mut(), decoder_, ())?;
11108
11109 Ok(())
11110 }
11111 }
11112
11113 impl ::fidl_next::IntoNatural for NodeAttributes {
11114 type Natural = crate::natural::NodeAttributes;
11115 }
11116
11117 #[derive(Clone, Copy, Debug)]
11119 #[repr(transparent)]
11120 pub struct NodeAttributeFlags {
11121 pub(crate) value: ::fidl_next::wire::Uint32,
11122 }
11123
11124 impl ::fidl_next::Constrained for NodeAttributeFlags {
11125 type Constraint = ();
11126
11127 fn validate(
11128 _: ::fidl_next::Slot<'_, Self>,
11129 _: Self::Constraint,
11130 ) -> Result<(), ::fidl_next::ValidationError> {
11131 Ok(())
11132 }
11133 }
11134
11135 unsafe impl ::fidl_next::Wire for NodeAttributeFlags {
11136 type Narrowed<'de> = Self;
11137
11138 #[inline]
11139 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11140 }
11142 }
11143
11144 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributeFlags
11145 where
11146 ___D: ?Sized,
11147 {
11148 fn decode(
11149 slot: ::fidl_next::Slot<'_, Self>,
11150 _: &mut ___D,
11151 _: (),
11152 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11153 ::fidl_next::munge!(let Self { value } = slot);
11154 let set = u32::from(*value);
11155 if set & !crate::natural::NodeAttributeFlags::all().bits() != 0 {
11156 return Err(::fidl_next::DecodeError::InvalidBits {
11157 expected: crate::natural::NodeAttributeFlags::all().bits() as usize,
11158 actual: set as usize,
11159 });
11160 }
11161
11162 Ok(())
11163 }
11164 }
11165
11166 impl ::core::convert::From<crate::natural::NodeAttributeFlags> for NodeAttributeFlags {
11167 fn from(natural: crate::natural::NodeAttributeFlags) -> Self {
11168 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11169 }
11170 }
11171
11172 impl ::fidl_next::IntoNatural for NodeAttributeFlags {
11173 type Natural = crate::natural::NodeAttributeFlags;
11174 }
11175
11176 #[derive(Debug)]
11178 #[repr(C)]
11179 pub struct NodeQueryFilesystemResponse<'de> {
11180 pub s: ::fidl_next::wire::fuchsia::StatusResult,
11181
11182 pub info: ::fidl_next::wire::Box<'de, crate::wire::FilesystemInfo>,
11183 }
11184
11185 static_assertions::const_assert_eq!(std::mem::size_of::<NodeQueryFilesystemResponse<'_>>(), 16);
11186 static_assertions::const_assert_eq!(std::mem::align_of::<NodeQueryFilesystemResponse<'_>>(), 8);
11187
11188 static_assertions::const_assert_eq!(
11189 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, s),
11190 0
11191 );
11192
11193 static_assertions::const_assert_eq!(
11194 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, info),
11195 8
11196 );
11197
11198 impl ::fidl_next::Constrained for NodeQueryFilesystemResponse<'_> {
11199 type Constraint = ();
11200
11201 fn validate(
11202 _: ::fidl_next::Slot<'_, Self>,
11203 _: Self::Constraint,
11204 ) -> Result<(), ::fidl_next::ValidationError> {
11205 Ok(())
11206 }
11207 }
11208
11209 unsafe impl ::fidl_next::Wire for NodeQueryFilesystemResponse<'static> {
11210 type Narrowed<'de> = NodeQueryFilesystemResponse<'de>;
11211
11212 #[inline]
11213 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11214 ::fidl_next::munge! {
11215 let Self {
11216 s,
11217 info,
11218
11219 } = &mut *out_;
11220 }
11221
11222 ::fidl_next::Wire::zero_padding(s);
11223
11224 ::fidl_next::Wire::zero_padding(info);
11225
11226 unsafe {
11227 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
11228 }
11229 }
11230 }
11231
11232 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeQueryFilesystemResponse<'de>
11233 where
11234 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11235 ___D: ::fidl_next::Decoder<'de>,
11236 {
11237 fn decode(
11238 slot_: ::fidl_next::Slot<'_, Self>,
11239 decoder_: &mut ___D,
11240 _: (),
11241 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11242 if slot_.as_bytes()[4..8] != [0u8; 4] {
11243 return Err(::fidl_next::DecodeError::InvalidPadding);
11244 }
11245
11246 ::fidl_next::munge! {
11247 let Self {
11248 mut s,
11249 mut info,
11250
11251 } = slot_;
11252 }
11253
11254 let _field = s.as_mut();
11255
11256 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11257
11258 let _field = info.as_mut();
11259
11260 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
11261
11262 Ok(())
11263 }
11264 }
11265
11266 impl<'de> ::fidl_next::IntoNatural for NodeQueryFilesystemResponse<'de> {
11267 type Natural = crate::natural::NodeQueryFilesystemResponse;
11268 }
11269
11270 pub type NodeUpdateAttributesResponse = ::fidl_next::wire::Unit;
11272
11273 pub type NodeSyncResponse = ::fidl_next::wire::Unit;
11275
11276 #[derive(Clone, Copy, Debug)]
11278 #[repr(transparent)]
11279 pub struct ModeType {
11280 pub(crate) value: ::fidl_next::wire::Uint32,
11281 }
11282
11283 impl ::fidl_next::Constrained for ModeType {
11284 type Constraint = ();
11285
11286 fn validate(
11287 _: ::fidl_next::Slot<'_, Self>,
11288 _: Self::Constraint,
11289 ) -> Result<(), ::fidl_next::ValidationError> {
11290 Ok(())
11291 }
11292 }
11293
11294 unsafe impl ::fidl_next::Wire for ModeType {
11295 type Narrowed<'de> = Self;
11296
11297 #[inline]
11298 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11299 }
11301 }
11302
11303 unsafe impl<___D> ::fidl_next::Decode<___D> for ModeType
11304 where
11305 ___D: ?Sized,
11306 {
11307 fn decode(
11308 slot: ::fidl_next::Slot<'_, Self>,
11309 _: &mut ___D,
11310 _: (),
11311 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11312 ::fidl_next::munge!(let Self { value } = slot);
11313 let set = u32::from(*value);
11314 if set & !crate::natural::ModeType::all().bits() != 0 {
11315 return Err(::fidl_next::DecodeError::InvalidBits {
11316 expected: crate::natural::ModeType::all().bits() as usize,
11317 actual: set as usize,
11318 });
11319 }
11320
11321 Ok(())
11322 }
11323 }
11324
11325 impl ::core::convert::From<crate::natural::ModeType> for ModeType {
11326 fn from(natural: crate::natural::ModeType) -> Self {
11327 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11328 }
11329 }
11330
11331 impl ::fidl_next::IntoNatural for ModeType {
11332 type Natural = crate::natural::ModeType;
11333 }
11334
11335 pub type Path<'de> = ::fidl_next::wire::String<'de>;
11337
11338 #[derive(Clone, Debug)]
11340 #[repr(C)]
11341 pub struct DirectoryReadDirentsRequest {
11342 pub max_bytes: ::fidl_next::wire::Uint64,
11343 }
11344
11345 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryReadDirentsRequest>(), 8);
11346 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryReadDirentsRequest>(), 8);
11347
11348 static_assertions::const_assert_eq!(
11349 std::mem::offset_of!(DirectoryReadDirentsRequest, max_bytes),
11350 0
11351 );
11352
11353 impl ::fidl_next::Constrained for DirectoryReadDirentsRequest {
11354 type Constraint = ();
11355
11356 fn validate(
11357 _: ::fidl_next::Slot<'_, Self>,
11358 _: Self::Constraint,
11359 ) -> Result<(), ::fidl_next::ValidationError> {
11360 Ok(())
11361 }
11362 }
11363
11364 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsRequest {
11365 type Narrowed<'de> = DirectoryReadDirentsRequest;
11366
11367 #[inline]
11368 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11369 ::fidl_next::munge! {
11370 let Self {
11371 max_bytes,
11372
11373 } = &mut *out_;
11374 }
11375
11376 ::fidl_next::Wire::zero_padding(max_bytes);
11377 }
11378 }
11379
11380 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsRequest
11381 where
11382 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11383 {
11384 fn decode(
11385 slot_: ::fidl_next::Slot<'_, Self>,
11386 decoder_: &mut ___D,
11387 _: (),
11388 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11389 ::fidl_next::munge! {
11390 let Self {
11391 mut max_bytes,
11392
11393 } = slot_;
11394 }
11395
11396 let _field = max_bytes.as_mut();
11397
11398 ::fidl_next::Decode::decode(max_bytes.as_mut(), decoder_, ())?;
11399
11400 Ok(())
11401 }
11402 }
11403
11404 impl ::fidl_next::IntoNatural for DirectoryReadDirentsRequest {
11405 type Natural = crate::natural::DirectoryReadDirentsRequest;
11406 }
11407
11408 #[derive(Debug)]
11410 #[repr(C)]
11411 pub struct DirectoryReadDirentsResponse<'de> {
11412 pub s: ::fidl_next::wire::fuchsia::StatusResult,
11413
11414 pub dirents: ::fidl_next::wire::Vector<'de, u8>,
11415 }
11416
11417 static_assertions::const_assert_eq!(
11418 std::mem::size_of::<DirectoryReadDirentsResponse<'_>>(),
11419 24
11420 );
11421 static_assertions::const_assert_eq!(
11422 std::mem::align_of::<DirectoryReadDirentsResponse<'_>>(),
11423 8
11424 );
11425
11426 static_assertions::const_assert_eq!(
11427 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, s),
11428 0
11429 );
11430
11431 static_assertions::const_assert_eq!(
11432 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, dirents),
11433 8
11434 );
11435
11436 impl ::fidl_next::Constrained for DirectoryReadDirentsResponse<'_> {
11437 type Constraint = ();
11438
11439 fn validate(
11440 _: ::fidl_next::Slot<'_, Self>,
11441 _: Self::Constraint,
11442 ) -> Result<(), ::fidl_next::ValidationError> {
11443 Ok(())
11444 }
11445 }
11446
11447 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsResponse<'static> {
11448 type Narrowed<'de> = DirectoryReadDirentsResponse<'de>;
11449
11450 #[inline]
11451 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11452 ::fidl_next::munge! {
11453 let Self {
11454 s,
11455 dirents,
11456
11457 } = &mut *out_;
11458 }
11459
11460 ::fidl_next::Wire::zero_padding(s);
11461
11462 ::fidl_next::Wire::zero_padding(dirents);
11463
11464 unsafe {
11465 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
11466 }
11467 }
11468 }
11469
11470 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsResponse<'de>
11471 where
11472 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11473 ___D: ::fidl_next::Decoder<'de>,
11474 {
11475 fn decode(
11476 slot_: ::fidl_next::Slot<'_, Self>,
11477 decoder_: &mut ___D,
11478 _: (),
11479 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11480 if slot_.as_bytes()[4..8] != [0u8; 4] {
11481 return Err(::fidl_next::DecodeError::InvalidPadding);
11482 }
11483
11484 ::fidl_next::munge! {
11485 let Self {
11486 mut s,
11487 mut dirents,
11488
11489 } = slot_;
11490 }
11491
11492 let _field = s.as_mut();
11493
11494 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11495
11496 let _field = dirents.as_mut();
11497 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
11498 ::fidl_next::Decode::decode(dirents.as_mut(), decoder_, (8192, ()))?;
11499
11500 let dirents = unsafe { dirents.deref_unchecked() };
11501
11502 if dirents.len() > 8192 {
11503 return Err(::fidl_next::DecodeError::VectorTooLong {
11504 size: dirents.len() as u64,
11505 limit: 8192,
11506 });
11507 }
11508
11509 Ok(())
11510 }
11511 }
11512
11513 impl<'de> ::fidl_next::IntoNatural for DirectoryReadDirentsResponse<'de> {
11514 type Natural = crate::natural::DirectoryReadDirentsResponse;
11515 }
11516
11517 #[derive(Clone, Debug)]
11519 #[repr(C)]
11520 pub struct DirectoryRewindResponse {
11521 pub s: ::fidl_next::wire::fuchsia::StatusResult,
11522 }
11523
11524 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRewindResponse>(), 4);
11525 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRewindResponse>(), 4);
11526
11527 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRewindResponse, s), 0);
11528
11529 impl ::fidl_next::Constrained for DirectoryRewindResponse {
11530 type Constraint = ();
11531
11532 fn validate(
11533 _: ::fidl_next::Slot<'_, Self>,
11534 _: Self::Constraint,
11535 ) -> Result<(), ::fidl_next::ValidationError> {
11536 Ok(())
11537 }
11538 }
11539
11540 unsafe impl ::fidl_next::Wire for DirectoryRewindResponse {
11541 type Narrowed<'de> = DirectoryRewindResponse;
11542
11543 #[inline]
11544 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11545 ::fidl_next::munge! {
11546 let Self {
11547 s,
11548
11549 } = &mut *out_;
11550 }
11551
11552 ::fidl_next::Wire::zero_padding(s);
11553 }
11554 }
11555
11556 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRewindResponse
11557 where
11558 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11559 {
11560 fn decode(
11561 slot_: ::fidl_next::Slot<'_, Self>,
11562 decoder_: &mut ___D,
11563 _: (),
11564 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11565 ::fidl_next::munge! {
11566 let Self {
11567 mut s,
11568
11569 } = slot_;
11570 }
11571
11572 let _field = s.as_mut();
11573
11574 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11575
11576 Ok(())
11577 }
11578 }
11579
11580 impl ::fidl_next::IntoNatural for DirectoryRewindResponse {
11581 type Natural = crate::natural::DirectoryRewindResponse;
11582 }
11583
11584 pub type Name<'de> = ::fidl_next::wire::String<'de>;
11586
11587 #[derive(Clone, Debug)]
11589 #[repr(C)]
11590 pub struct DirectoryLinkResponse {
11591 pub s: ::fidl_next::wire::fuchsia::StatusResult,
11592 }
11593
11594 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkResponse>(), 4);
11595 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkResponse>(), 4);
11596
11597 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkResponse, s), 0);
11598
11599 impl ::fidl_next::Constrained for DirectoryLinkResponse {
11600 type Constraint = ();
11601
11602 fn validate(
11603 _: ::fidl_next::Slot<'_, Self>,
11604 _: Self::Constraint,
11605 ) -> Result<(), ::fidl_next::ValidationError> {
11606 Ok(())
11607 }
11608 }
11609
11610 unsafe impl ::fidl_next::Wire for DirectoryLinkResponse {
11611 type Narrowed<'de> = DirectoryLinkResponse;
11612
11613 #[inline]
11614 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11615 ::fidl_next::munge! {
11616 let Self {
11617 s,
11618
11619 } = &mut *out_;
11620 }
11621
11622 ::fidl_next::Wire::zero_padding(s);
11623 }
11624 }
11625
11626 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryLinkResponse
11627 where
11628 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11629 {
11630 fn decode(
11631 slot_: ::fidl_next::Slot<'_, Self>,
11632 decoder_: &mut ___D,
11633 _: (),
11634 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11635 ::fidl_next::munge! {
11636 let Self {
11637 mut s,
11638
11639 } = slot_;
11640 }
11641
11642 let _field = s.as_mut();
11643
11644 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
11645
11646 Ok(())
11647 }
11648 }
11649
11650 impl ::fidl_next::IntoNatural for DirectoryLinkResponse {
11651 type Natural = crate::natural::DirectoryLinkResponse;
11652 }
11653
11654 #[derive(Clone, Copy, Debug)]
11656 #[repr(transparent)]
11657 pub struct UnlinkFlags {
11658 pub(crate) value: ::fidl_next::wire::Uint64,
11659 }
11660
11661 impl ::fidl_next::Constrained for UnlinkFlags {
11662 type Constraint = ();
11663
11664 fn validate(
11665 _: ::fidl_next::Slot<'_, Self>,
11666 _: Self::Constraint,
11667 ) -> Result<(), ::fidl_next::ValidationError> {
11668 Ok(())
11669 }
11670 }
11671
11672 unsafe impl ::fidl_next::Wire for UnlinkFlags {
11673 type Narrowed<'de> = Self;
11674
11675 #[inline]
11676 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11677 }
11679 }
11680
11681 unsafe impl<___D> ::fidl_next::Decode<___D> for UnlinkFlags
11682 where
11683 ___D: ?Sized,
11684 {
11685 fn decode(
11686 slot: ::fidl_next::Slot<'_, Self>,
11687 _: &mut ___D,
11688 _: (),
11689 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11690 Ok(())
11691 }
11692 }
11693
11694 impl ::core::convert::From<crate::natural::UnlinkFlags> for UnlinkFlags {
11695 fn from(natural: crate::natural::UnlinkFlags) -> Self {
11696 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
11697 }
11698 }
11699
11700 impl ::fidl_next::IntoNatural for UnlinkFlags {
11701 type Natural = crate::natural::UnlinkFlags;
11702 }
11703
11704 #[repr(C)]
11706 pub struct UnlinkOptions<'de> {
11707 pub(crate) table: ::fidl_next::wire::Table<'de>,
11708 }
11709
11710 impl<'de> Drop for UnlinkOptions<'de> {
11711 fn drop(&mut self) {
11712 let _ = self
11713 .table
11714 .get(1)
11715 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::UnlinkFlags>() });
11716 }
11717 }
11718
11719 impl ::fidl_next::Constrained for UnlinkOptions<'_> {
11720 type Constraint = ();
11721
11722 fn validate(
11723 _: ::fidl_next::Slot<'_, Self>,
11724 _: Self::Constraint,
11725 ) -> Result<(), ::fidl_next::ValidationError> {
11726 Ok(())
11727 }
11728 }
11729
11730 unsafe impl ::fidl_next::Wire for UnlinkOptions<'static> {
11731 type Narrowed<'de> = UnlinkOptions<'de>;
11732
11733 #[inline]
11734 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11735 ::fidl_next::munge!(let Self { table } = out);
11736 ::fidl_next::wire::Table::zero_padding(table);
11737 }
11738 }
11739
11740 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for UnlinkOptions<'de>
11741 where
11742 ___D: ::fidl_next::Decoder<'de> + ?Sized,
11743 {
11744 fn decode(
11745 slot: ::fidl_next::Slot<'_, Self>,
11746 decoder: &mut ___D,
11747 _: (),
11748 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11749 ::fidl_next::munge!(let Self { table } = slot);
11750
11751 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11752 match ordinal {
11753 0 => unsafe { ::core::hint::unreachable_unchecked() },
11754
11755 1 => {
11756 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::UnlinkFlags>(
11757 slot.as_mut(),
11758 decoder,
11759 (),
11760 )?;
11761
11762 Ok(())
11763 }
11764
11765 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11766 }
11767 })
11768 }
11769 }
11770
11771 impl<'de> UnlinkOptions<'de> {
11772 pub fn flags(&self) -> ::core::option::Option<&crate::wire::UnlinkFlags> {
11773 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11774 }
11775
11776 pub fn take_flags(&mut self) -> ::core::option::Option<crate::wire::UnlinkFlags> {
11777 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11778 }
11779 }
11780
11781 impl<'de> ::core::fmt::Debug for UnlinkOptions<'de> {
11782 fn fmt(
11783 &self,
11784 f: &mut ::core::fmt::Formatter<'_>,
11785 ) -> ::core::result::Result<(), ::core::fmt::Error> {
11786 f.debug_struct("UnlinkOptions").field("flags", &self.flags()).finish()
11787 }
11788 }
11789
11790 impl<'de> ::fidl_next::IntoNatural for UnlinkOptions<'de> {
11791 type Natural = crate::natural::UnlinkOptions;
11792 }
11793
11794 #[derive(Debug)]
11796 #[repr(C)]
11797 pub struct DirectoryUnlinkRequest<'de> {
11798 pub name: ::fidl_next::wire::String<'de>,
11799
11800 pub options: crate::wire::UnlinkOptions<'de>,
11801 }
11802
11803 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryUnlinkRequest<'_>>(), 32);
11804 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryUnlinkRequest<'_>>(), 8);
11805
11806 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryUnlinkRequest<'_>, name), 0);
11807
11808 static_assertions::const_assert_eq!(
11809 std::mem::offset_of!(DirectoryUnlinkRequest<'_>, options),
11810 16
11811 );
11812
11813 impl ::fidl_next::Constrained for DirectoryUnlinkRequest<'_> {
11814 type Constraint = ();
11815
11816 fn validate(
11817 _: ::fidl_next::Slot<'_, Self>,
11818 _: Self::Constraint,
11819 ) -> Result<(), ::fidl_next::ValidationError> {
11820 Ok(())
11821 }
11822 }
11823
11824 unsafe impl ::fidl_next::Wire for DirectoryUnlinkRequest<'static> {
11825 type Narrowed<'de> = DirectoryUnlinkRequest<'de>;
11826
11827 #[inline]
11828 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11829 ::fidl_next::munge! {
11830 let Self {
11831 name,
11832 options,
11833
11834 } = &mut *out_;
11835 }
11836
11837 ::fidl_next::Wire::zero_padding(name);
11838
11839 ::fidl_next::Wire::zero_padding(options);
11840 }
11841 }
11842
11843 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryUnlinkRequest<'de>
11844 where
11845 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11846 ___D: ::fidl_next::Decoder<'de>,
11847 {
11848 fn decode(
11849 slot_: ::fidl_next::Slot<'_, Self>,
11850 decoder_: &mut ___D,
11851 _: (),
11852 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11853 ::fidl_next::munge! {
11854 let Self {
11855 mut name,
11856 mut options,
11857
11858 } = slot_;
11859 }
11860
11861 let _field = name.as_mut();
11862 ::fidl_next::Constrained::validate(_field, 255)?;
11863 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
11864
11865 let name = unsafe { name.deref_unchecked() };
11866
11867 if name.len() > 255 {
11868 return Err(::fidl_next::DecodeError::VectorTooLong {
11869 size: name.len() as u64,
11870 limit: 255,
11871 });
11872 }
11873
11874 let _field = options.as_mut();
11875
11876 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
11877
11878 Ok(())
11879 }
11880 }
11881
11882 impl<'de> ::fidl_next::IntoNatural for DirectoryUnlinkRequest<'de> {
11883 type Natural = crate::natural::DirectoryUnlinkRequest;
11884 }
11885
11886 pub type DirectoryUnlinkResponse = ::fidl_next::wire::Unit;
11888
11889 pub type DirectoryRenameResponse = ::fidl_next::wire::Unit;
11891
11892 #[derive(Clone, Copy, Debug)]
11894 #[repr(transparent)]
11895 pub struct WatchMask {
11896 pub(crate) value: ::fidl_next::wire::Uint32,
11897 }
11898
11899 impl ::fidl_next::Constrained for WatchMask {
11900 type Constraint = ();
11901
11902 fn validate(
11903 _: ::fidl_next::Slot<'_, Self>,
11904 _: Self::Constraint,
11905 ) -> Result<(), ::fidl_next::ValidationError> {
11906 Ok(())
11907 }
11908 }
11909
11910 unsafe impl ::fidl_next::Wire for WatchMask {
11911 type Narrowed<'de> = Self;
11912
11913 #[inline]
11914 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11915 }
11917 }
11918
11919 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchMask
11920 where
11921 ___D: ?Sized,
11922 {
11923 fn decode(
11924 slot: ::fidl_next::Slot<'_, Self>,
11925 _: &mut ___D,
11926 _: (),
11927 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11928 ::fidl_next::munge!(let Self { value } = slot);
11929 let set = u32::from(*value);
11930 if set & !crate::natural::WatchMask::all().bits() != 0 {
11931 return Err(::fidl_next::DecodeError::InvalidBits {
11932 expected: crate::natural::WatchMask::all().bits() as usize,
11933 actual: set as usize,
11934 });
11935 }
11936
11937 Ok(())
11938 }
11939 }
11940
11941 impl ::core::convert::From<crate::natural::WatchMask> for WatchMask {
11942 fn from(natural: crate::natural::WatchMask) -> Self {
11943 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
11944 }
11945 }
11946
11947 impl ::fidl_next::IntoNatural for WatchMask {
11948 type Natural = crate::natural::WatchMask;
11949 }
11950
11951 #[derive(Clone, Debug)]
11953 #[repr(C)]
11954 pub struct DirectoryWatchResponse {
11955 pub s: ::fidl_next::wire::fuchsia::StatusResult,
11956 }
11957
11958 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchResponse>(), 4);
11959 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchResponse>(), 4);
11960
11961 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchResponse, s), 0);
11962
11963 impl ::fidl_next::Constrained for DirectoryWatchResponse {
11964 type Constraint = ();
11965
11966 fn validate(
11967 _: ::fidl_next::Slot<'_, Self>,
11968 _: Self::Constraint,
11969 ) -> Result<(), ::fidl_next::ValidationError> {
11970 Ok(())
11971 }
11972 }
11973
11974 unsafe impl ::fidl_next::Wire for DirectoryWatchResponse {
11975 type Narrowed<'de> = DirectoryWatchResponse;
11976
11977 #[inline]
11978 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11979 ::fidl_next::munge! {
11980 let Self {
11981 s,
11982
11983 } = &mut *out_;
11984 }
11985
11986 ::fidl_next::Wire::zero_padding(s);
11987 }
11988 }
11989
11990 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchResponse
11991 where
11992 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11993 {
11994 fn decode(
11995 slot_: ::fidl_next::Slot<'_, Self>,
11996 decoder_: &mut ___D,
11997 _: (),
11998 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11999 ::fidl_next::munge! {
12000 let Self {
12001 mut s,
12002
12003 } = slot_;
12004 }
12005
12006 let _field = s.as_mut();
12007
12008 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12009
12010 Ok(())
12011 }
12012 }
12013
12014 impl ::fidl_next::IntoNatural for DirectoryWatchResponse {
12015 type Natural = crate::natural::DirectoryWatchResponse;
12016 }
12017
12018 pub type SymlinkTarget<'de> = ::fidl_next::wire::Vector<'de, u8>;
12020
12021 pub type ExtendedAttributeName<'de> = ::fidl_next::wire::Vector<'de, u8>;
12023
12024 #[derive(Debug)]
12026 #[repr(C)]
12027 pub struct NodeGetExtendedAttributeRequest<'de> {
12028 pub name: ::fidl_next::wire::Vector<'de, u8>,
12029 }
12030
12031 static_assertions::const_assert_eq!(
12032 std::mem::size_of::<NodeGetExtendedAttributeRequest<'_>>(),
12033 16
12034 );
12035 static_assertions::const_assert_eq!(
12036 std::mem::align_of::<NodeGetExtendedAttributeRequest<'_>>(),
12037 8
12038 );
12039
12040 static_assertions::const_assert_eq!(
12041 std::mem::offset_of!(NodeGetExtendedAttributeRequest<'_>, name),
12042 0
12043 );
12044
12045 impl ::fidl_next::Constrained for NodeGetExtendedAttributeRequest<'_> {
12046 type Constraint = ();
12047
12048 fn validate(
12049 _: ::fidl_next::Slot<'_, Self>,
12050 _: Self::Constraint,
12051 ) -> Result<(), ::fidl_next::ValidationError> {
12052 Ok(())
12053 }
12054 }
12055
12056 unsafe impl ::fidl_next::Wire for NodeGetExtendedAttributeRequest<'static> {
12057 type Narrowed<'de> = NodeGetExtendedAttributeRequest<'de>;
12058
12059 #[inline]
12060 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12061 ::fidl_next::munge! {
12062 let Self {
12063 name,
12064
12065 } = &mut *out_;
12066 }
12067
12068 ::fidl_next::Wire::zero_padding(name);
12069 }
12070 }
12071
12072 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeGetExtendedAttributeRequest<'de>
12073 where
12074 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12075 ___D: ::fidl_next::Decoder<'de>,
12076 {
12077 fn decode(
12078 slot_: ::fidl_next::Slot<'_, Self>,
12079 decoder_: &mut ___D,
12080 _: (),
12081 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12082 ::fidl_next::munge! {
12083 let Self {
12084 mut name,
12085
12086 } = slot_;
12087 }
12088
12089 let _field = name.as_mut();
12090 ::fidl_next::Constrained::validate(_field, (255, ()))?;
12091 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
12092
12093 let name = unsafe { name.deref_unchecked() };
12094
12095 if name.len() > 255 {
12096 return Err(::fidl_next::DecodeError::VectorTooLong {
12097 size: name.len() as u64,
12098 limit: 255,
12099 });
12100 }
12101
12102 Ok(())
12103 }
12104 }
12105
12106 impl<'de> ::fidl_next::IntoNatural for NodeGetExtendedAttributeRequest<'de> {
12107 type Natural = crate::natural::NodeGetExtendedAttributeRequest;
12108 }
12109
12110 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12112 #[repr(transparent)]
12113 pub struct SetExtendedAttributeMode {
12114 pub(crate) value: ::fidl_next::wire::Uint32,
12115 }
12116
12117 impl ::fidl_next::Constrained for SetExtendedAttributeMode {
12118 type Constraint = ();
12119
12120 fn validate(
12121 _: ::fidl_next::Slot<'_, Self>,
12122 _: Self::Constraint,
12123 ) -> Result<(), ::fidl_next::ValidationError> {
12124 Ok(())
12125 }
12126 }
12127
12128 unsafe impl ::fidl_next::Wire for SetExtendedAttributeMode {
12129 type Narrowed<'de> = Self;
12130
12131 #[inline]
12132 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12133 }
12135 }
12136
12137 impl SetExtendedAttributeMode {
12138 pub const SET: SetExtendedAttributeMode =
12139 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(1) };
12140
12141 pub const CREATE: SetExtendedAttributeMode =
12142 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(2) };
12143
12144 pub const REPLACE: SetExtendedAttributeMode =
12145 SetExtendedAttributeMode { value: ::fidl_next::wire::Uint32(3) };
12146 }
12147
12148 unsafe impl<___D> ::fidl_next::Decode<___D> for SetExtendedAttributeMode
12149 where
12150 ___D: ?Sized,
12151 {
12152 fn decode(
12153 slot: ::fidl_next::Slot<'_, Self>,
12154 _: &mut ___D,
12155 _: (),
12156 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12157 ::fidl_next::munge!(let Self { value } = slot);
12158
12159 match u32::from(*value) {
12160 1 | 2 | 3 => (),
12161 unknown => {
12162 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
12163 }
12164 }
12165
12166 Ok(())
12167 }
12168 }
12169
12170 impl ::core::convert::From<crate::natural::SetExtendedAttributeMode> for SetExtendedAttributeMode {
12171 fn from(natural: crate::natural::SetExtendedAttributeMode) -> Self {
12172 match natural {
12173 crate::natural::SetExtendedAttributeMode::Set => SetExtendedAttributeMode::SET,
12174
12175 crate::natural::SetExtendedAttributeMode::Create => {
12176 SetExtendedAttributeMode::CREATE
12177 }
12178
12179 crate::natural::SetExtendedAttributeMode::Replace => {
12180 SetExtendedAttributeMode::REPLACE
12181 }
12182 }
12183 }
12184 }
12185
12186 impl ::fidl_next::IntoNatural for SetExtendedAttributeMode {
12187 type Natural = crate::natural::SetExtendedAttributeMode;
12188 }
12189
12190 pub type NodeSetExtendedAttributeResponse = ::fidl_next::wire::Unit;
12192
12193 #[derive(Debug)]
12195 #[repr(C)]
12196 pub struct NodeRemoveExtendedAttributeRequest<'de> {
12197 pub name: ::fidl_next::wire::Vector<'de, u8>,
12198 }
12199
12200 static_assertions::const_assert_eq!(
12201 std::mem::size_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
12202 16
12203 );
12204 static_assertions::const_assert_eq!(
12205 std::mem::align_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
12206 8
12207 );
12208
12209 static_assertions::const_assert_eq!(
12210 std::mem::offset_of!(NodeRemoveExtendedAttributeRequest<'_>, name),
12211 0
12212 );
12213
12214 impl ::fidl_next::Constrained for NodeRemoveExtendedAttributeRequest<'_> {
12215 type Constraint = ();
12216
12217 fn validate(
12218 _: ::fidl_next::Slot<'_, Self>,
12219 _: Self::Constraint,
12220 ) -> Result<(), ::fidl_next::ValidationError> {
12221 Ok(())
12222 }
12223 }
12224
12225 unsafe impl ::fidl_next::Wire for NodeRemoveExtendedAttributeRequest<'static> {
12226 type Narrowed<'de> = NodeRemoveExtendedAttributeRequest<'de>;
12227
12228 #[inline]
12229 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12230 ::fidl_next::munge! {
12231 let Self {
12232 name,
12233
12234 } = &mut *out_;
12235 }
12236
12237 ::fidl_next::Wire::zero_padding(name);
12238 }
12239 }
12240
12241 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeRemoveExtendedAttributeRequest<'de>
12242 where
12243 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12244 ___D: ::fidl_next::Decoder<'de>,
12245 {
12246 fn decode(
12247 slot_: ::fidl_next::Slot<'_, Self>,
12248 decoder_: &mut ___D,
12249 _: (),
12250 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12251 ::fidl_next::munge! {
12252 let Self {
12253 mut name,
12254
12255 } = slot_;
12256 }
12257
12258 let _field = name.as_mut();
12259 ::fidl_next::Constrained::validate(_field, (255, ()))?;
12260 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
12261
12262 let name = unsafe { name.deref_unchecked() };
12263
12264 if name.len() > 255 {
12265 return Err(::fidl_next::DecodeError::VectorTooLong {
12266 size: name.len() as u64,
12267 limit: 255,
12268 });
12269 }
12270
12271 Ok(())
12272 }
12273 }
12274
12275 impl<'de> ::fidl_next::IntoNatural for NodeRemoveExtendedAttributeRequest<'de> {
12276 type Natural = crate::natural::NodeRemoveExtendedAttributeRequest;
12277 }
12278
12279 pub type NodeRemoveExtendedAttributeResponse = ::fidl_next::wire::Unit;
12281
12282 pub type DirectoryCreateSymlinkResponse = ::fidl_next::wire::Unit;
12284
12285 pub type NodeSetFlagsResponse = ::fidl_next::wire::Unit;
12287
12288 #[derive(Clone, Debug)]
12290 #[repr(C)]
12291 pub struct NodeDeprecatedGetAttrResponse {
12292 pub s: ::fidl_next::wire::fuchsia::StatusResult,
12293
12294 pub attributes: crate::wire::NodeAttributes,
12295 }
12296
12297 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetAttrResponse>(), 64);
12298 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetAttrResponse>(), 8);
12299
12300 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetAttrResponse, s), 0);
12301
12302 static_assertions::const_assert_eq!(
12303 std::mem::offset_of!(NodeDeprecatedGetAttrResponse, attributes),
12304 8
12305 );
12306
12307 impl ::fidl_next::Constrained for NodeDeprecatedGetAttrResponse {
12308 type Constraint = ();
12309
12310 fn validate(
12311 _: ::fidl_next::Slot<'_, Self>,
12312 _: Self::Constraint,
12313 ) -> Result<(), ::fidl_next::ValidationError> {
12314 Ok(())
12315 }
12316 }
12317
12318 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetAttrResponse {
12319 type Narrowed<'de> = NodeDeprecatedGetAttrResponse;
12320
12321 #[inline]
12322 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12323 ::fidl_next::munge! {
12324 let Self {
12325 s,
12326 attributes,
12327
12328 } = &mut *out_;
12329 }
12330
12331 ::fidl_next::Wire::zero_padding(s);
12332
12333 ::fidl_next::Wire::zero_padding(attributes);
12334
12335 unsafe {
12336 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12337 }
12338 }
12339 }
12340
12341 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetAttrResponse
12342 where
12343 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12344 {
12345 fn decode(
12346 slot_: ::fidl_next::Slot<'_, Self>,
12347 decoder_: &mut ___D,
12348 _: (),
12349 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12350 if slot_.as_bytes()[4..8] != [0u8; 4] {
12351 return Err(::fidl_next::DecodeError::InvalidPadding);
12352 }
12353
12354 ::fidl_next::munge! {
12355 let Self {
12356 mut s,
12357 mut attributes,
12358
12359 } = slot_;
12360 }
12361
12362 let _field = s.as_mut();
12363
12364 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12365
12366 let _field = attributes.as_mut();
12367
12368 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
12369
12370 Ok(())
12371 }
12372 }
12373
12374 impl ::fidl_next::IntoNatural for NodeDeprecatedGetAttrResponse {
12375 type Natural = crate::natural::NodeDeprecatedGetAttrResponse;
12376 }
12377
12378 #[derive(Clone, Debug)]
12380 #[repr(C)]
12381 pub struct NodeDeprecatedSetAttrRequest {
12382 pub flags: crate::wire::NodeAttributeFlags,
12383
12384 pub attributes: crate::wire::NodeAttributes,
12385 }
12386
12387 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrRequest>(), 64);
12388 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrRequest>(), 8);
12389
12390 static_assertions::const_assert_eq!(
12391 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, flags),
12392 0
12393 );
12394
12395 static_assertions::const_assert_eq!(
12396 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, attributes),
12397 8
12398 );
12399
12400 impl ::fidl_next::Constrained for NodeDeprecatedSetAttrRequest {
12401 type Constraint = ();
12402
12403 fn validate(
12404 _: ::fidl_next::Slot<'_, Self>,
12405 _: Self::Constraint,
12406 ) -> Result<(), ::fidl_next::ValidationError> {
12407 Ok(())
12408 }
12409 }
12410
12411 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrRequest {
12412 type Narrowed<'de> = NodeDeprecatedSetAttrRequest;
12413
12414 #[inline]
12415 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12416 ::fidl_next::munge! {
12417 let Self {
12418 flags,
12419 attributes,
12420
12421 } = &mut *out_;
12422 }
12423
12424 ::fidl_next::Wire::zero_padding(flags);
12425
12426 ::fidl_next::Wire::zero_padding(attributes);
12427
12428 unsafe {
12429 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12430 }
12431 }
12432 }
12433
12434 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrRequest
12435 where
12436 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12437 {
12438 fn decode(
12439 slot_: ::fidl_next::Slot<'_, Self>,
12440 decoder_: &mut ___D,
12441 _: (),
12442 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12443 if slot_.as_bytes()[4..8] != [0u8; 4] {
12444 return Err(::fidl_next::DecodeError::InvalidPadding);
12445 }
12446
12447 ::fidl_next::munge! {
12448 let Self {
12449 mut flags,
12450 mut attributes,
12451
12452 } = slot_;
12453 }
12454
12455 let _field = flags.as_mut();
12456
12457 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12458
12459 let _field = attributes.as_mut();
12460
12461 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
12462
12463 Ok(())
12464 }
12465 }
12466
12467 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrRequest {
12468 type Natural = crate::natural::NodeDeprecatedSetAttrRequest;
12469 }
12470
12471 #[derive(Clone, Debug)]
12473 #[repr(C)]
12474 pub struct NodeDeprecatedSetAttrResponse {
12475 pub s: ::fidl_next::wire::fuchsia::StatusResult,
12476 }
12477
12478 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrResponse>(), 4);
12479 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrResponse>(), 4);
12480
12481 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetAttrResponse, s), 0);
12482
12483 impl ::fidl_next::Constrained for NodeDeprecatedSetAttrResponse {
12484 type Constraint = ();
12485
12486 fn validate(
12487 _: ::fidl_next::Slot<'_, Self>,
12488 _: Self::Constraint,
12489 ) -> Result<(), ::fidl_next::ValidationError> {
12490 Ok(())
12491 }
12492 }
12493
12494 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrResponse {
12495 type Narrowed<'de> = NodeDeprecatedSetAttrResponse;
12496
12497 #[inline]
12498 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12499 ::fidl_next::munge! {
12500 let Self {
12501 s,
12502
12503 } = &mut *out_;
12504 }
12505
12506 ::fidl_next::Wire::zero_padding(s);
12507 }
12508 }
12509
12510 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrResponse
12511 where
12512 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12513 {
12514 fn decode(
12515 slot_: ::fidl_next::Slot<'_, Self>,
12516 decoder_: &mut ___D,
12517 _: (),
12518 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12519 ::fidl_next::munge! {
12520 let Self {
12521 mut s,
12522
12523 } = slot_;
12524 }
12525
12526 let _field = s.as_mut();
12527
12528 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12529
12530 Ok(())
12531 }
12532 }
12533
12534 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrResponse {
12535 type Natural = crate::natural::NodeDeprecatedSetAttrResponse;
12536 }
12537
12538 #[derive(Clone, Debug)]
12540 #[repr(C)]
12541 pub struct NodeDeprecatedGetFlagsResponse {
12542 pub s: ::fidl_next::wire::fuchsia::StatusResult,
12543
12544 pub flags: crate::wire::OpenFlags,
12545 }
12546
12547 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetFlagsResponse>(), 8);
12548 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetFlagsResponse>(), 4);
12549
12550 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, s), 0);
12551
12552 static_assertions::const_assert_eq!(
12553 std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, flags),
12554 4
12555 );
12556
12557 impl ::fidl_next::Constrained for NodeDeprecatedGetFlagsResponse {
12558 type Constraint = ();
12559
12560 fn validate(
12561 _: ::fidl_next::Slot<'_, Self>,
12562 _: Self::Constraint,
12563 ) -> Result<(), ::fidl_next::ValidationError> {
12564 Ok(())
12565 }
12566 }
12567
12568 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetFlagsResponse {
12569 type Narrowed<'de> = NodeDeprecatedGetFlagsResponse;
12570
12571 #[inline]
12572 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12573 ::fidl_next::munge! {
12574 let Self {
12575 s,
12576 flags,
12577
12578 } = &mut *out_;
12579 }
12580
12581 ::fidl_next::Wire::zero_padding(s);
12582
12583 ::fidl_next::Wire::zero_padding(flags);
12584 }
12585 }
12586
12587 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetFlagsResponse
12588 where
12589 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12590 {
12591 fn decode(
12592 slot_: ::fidl_next::Slot<'_, Self>,
12593 decoder_: &mut ___D,
12594 _: (),
12595 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12596 ::fidl_next::munge! {
12597 let Self {
12598 mut s,
12599 mut flags,
12600
12601 } = slot_;
12602 }
12603
12604 let _field = s.as_mut();
12605
12606 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12607
12608 let _field = flags.as_mut();
12609
12610 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12611
12612 Ok(())
12613 }
12614 }
12615
12616 impl ::fidl_next::IntoNatural for NodeDeprecatedGetFlagsResponse {
12617 type Natural = crate::natural::NodeDeprecatedGetFlagsResponse;
12618 }
12619
12620 #[derive(Clone, Debug)]
12622 #[repr(C)]
12623 pub struct NodeDeprecatedSetFlagsRequest {
12624 pub flags: crate::wire::OpenFlags,
12625 }
12626
12627 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsRequest>(), 4);
12628 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsRequest>(), 4);
12629
12630 static_assertions::const_assert_eq!(
12631 std::mem::offset_of!(NodeDeprecatedSetFlagsRequest, flags),
12632 0
12633 );
12634
12635 impl ::fidl_next::Constrained for NodeDeprecatedSetFlagsRequest {
12636 type Constraint = ();
12637
12638 fn validate(
12639 _: ::fidl_next::Slot<'_, Self>,
12640 _: Self::Constraint,
12641 ) -> Result<(), ::fidl_next::ValidationError> {
12642 Ok(())
12643 }
12644 }
12645
12646 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsRequest {
12647 type Narrowed<'de> = NodeDeprecatedSetFlagsRequest;
12648
12649 #[inline]
12650 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12651 ::fidl_next::munge! {
12652 let Self {
12653 flags,
12654
12655 } = &mut *out_;
12656 }
12657
12658 ::fidl_next::Wire::zero_padding(flags);
12659 }
12660 }
12661
12662 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsRequest
12663 where
12664 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12665 {
12666 fn decode(
12667 slot_: ::fidl_next::Slot<'_, Self>,
12668 decoder_: &mut ___D,
12669 _: (),
12670 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12671 ::fidl_next::munge! {
12672 let Self {
12673 mut flags,
12674
12675 } = slot_;
12676 }
12677
12678 let _field = flags.as_mut();
12679
12680 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12681
12682 Ok(())
12683 }
12684 }
12685
12686 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsRequest {
12687 type Natural = crate::natural::NodeDeprecatedSetFlagsRequest;
12688 }
12689
12690 #[derive(Clone, Debug)]
12692 #[repr(C)]
12693 pub struct NodeDeprecatedSetFlagsResponse {
12694 pub s: ::fidl_next::wire::fuchsia::StatusResult,
12695 }
12696
12697 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsResponse>(), 4);
12698 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsResponse>(), 4);
12699
12700 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetFlagsResponse, s), 0);
12701
12702 impl ::fidl_next::Constrained for NodeDeprecatedSetFlagsResponse {
12703 type Constraint = ();
12704
12705 fn validate(
12706 _: ::fidl_next::Slot<'_, Self>,
12707 _: Self::Constraint,
12708 ) -> Result<(), ::fidl_next::ValidationError> {
12709 Ok(())
12710 }
12711 }
12712
12713 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsResponse {
12714 type Narrowed<'de> = NodeDeprecatedSetFlagsResponse;
12715
12716 #[inline]
12717 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12718 ::fidl_next::munge! {
12719 let Self {
12720 s,
12721
12722 } = &mut *out_;
12723 }
12724
12725 ::fidl_next::Wire::zero_padding(s);
12726 }
12727 }
12728
12729 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsResponse
12730 where
12731 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12732 {
12733 fn decode(
12734 slot_: ::fidl_next::Slot<'_, Self>,
12735 decoder_: &mut ___D,
12736 _: (),
12737 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12738 ::fidl_next::munge! {
12739 let Self {
12740 mut s,
12741
12742 } = slot_;
12743 }
12744
12745 let _field = s.as_mut();
12746
12747 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
12748
12749 Ok(())
12750 }
12751 }
12752
12753 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsResponse {
12754 type Natural = crate::natural::NodeDeprecatedSetFlagsResponse;
12755 }
12756
12757 #[derive(Clone, Copy, Debug)]
12759 #[repr(transparent)]
12760 pub struct Flags {
12761 pub(crate) value: ::fidl_next::wire::Uint64,
12762 }
12763
12764 impl ::fidl_next::Constrained for Flags {
12765 type Constraint = ();
12766
12767 fn validate(
12768 _: ::fidl_next::Slot<'_, Self>,
12769 _: Self::Constraint,
12770 ) -> Result<(), ::fidl_next::ValidationError> {
12771 Ok(())
12772 }
12773 }
12774
12775 unsafe impl ::fidl_next::Wire for Flags {
12776 type Narrowed<'de> = Self;
12777
12778 #[inline]
12779 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12780 }
12782 }
12783
12784 unsafe impl<___D> ::fidl_next::Decode<___D> for Flags
12785 where
12786 ___D: ?Sized,
12787 {
12788 fn decode(
12789 slot: ::fidl_next::Slot<'_, Self>,
12790 _: &mut ___D,
12791 _: (),
12792 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12793 Ok(())
12794 }
12795 }
12796
12797 impl ::core::convert::From<crate::natural::Flags> for Flags {
12798 fn from(natural: crate::natural::Flags) -> Self {
12799 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
12800 }
12801 }
12802
12803 impl ::fidl_next::IntoNatural for Flags {
12804 type Natural = crate::natural::Flags;
12805 }
12806
12807 #[derive(Clone, Debug)]
12809 #[repr(C)]
12810 pub struct NodeGetFlagsResponse {
12811 pub flags: crate::wire::Flags,
12812 }
12813
12814 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetFlagsResponse>(), 8);
12815 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetFlagsResponse>(), 8);
12816
12817 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetFlagsResponse, flags), 0);
12818
12819 impl ::fidl_next::Constrained for NodeGetFlagsResponse {
12820 type Constraint = ();
12821
12822 fn validate(
12823 _: ::fidl_next::Slot<'_, Self>,
12824 _: Self::Constraint,
12825 ) -> Result<(), ::fidl_next::ValidationError> {
12826 Ok(())
12827 }
12828 }
12829
12830 unsafe impl ::fidl_next::Wire for NodeGetFlagsResponse {
12831 type Narrowed<'de> = NodeGetFlagsResponse;
12832
12833 #[inline]
12834 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12835 ::fidl_next::munge! {
12836 let Self {
12837 flags,
12838
12839 } = &mut *out_;
12840 }
12841
12842 ::fidl_next::Wire::zero_padding(flags);
12843 }
12844 }
12845
12846 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetFlagsResponse
12847 where
12848 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12849 {
12850 fn decode(
12851 slot_: ::fidl_next::Slot<'_, Self>,
12852 decoder_: &mut ___D,
12853 _: (),
12854 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12855 ::fidl_next::munge! {
12856 let Self {
12857 mut flags,
12858
12859 } = slot_;
12860 }
12861
12862 let _field = flags.as_mut();
12863
12864 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12865
12866 Ok(())
12867 }
12868 }
12869
12870 impl ::fidl_next::IntoNatural for NodeGetFlagsResponse {
12871 type Natural = crate::natural::NodeGetFlagsResponse;
12872 }
12873
12874 #[derive(Clone, Debug)]
12876 #[repr(C)]
12877 pub struct NodeSetFlagsRequest {
12878 pub flags: crate::wire::Flags,
12879 }
12880
12881 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetFlagsRequest>(), 8);
12882 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSetFlagsRequest>(), 8);
12883
12884 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeSetFlagsRequest, flags), 0);
12885
12886 impl ::fidl_next::Constrained for NodeSetFlagsRequest {
12887 type Constraint = ();
12888
12889 fn validate(
12890 _: ::fidl_next::Slot<'_, Self>,
12891 _: Self::Constraint,
12892 ) -> Result<(), ::fidl_next::ValidationError> {
12893 Ok(())
12894 }
12895 }
12896
12897 unsafe impl ::fidl_next::Wire for NodeSetFlagsRequest {
12898 type Narrowed<'de> = NodeSetFlagsRequest;
12899
12900 #[inline]
12901 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12902 ::fidl_next::munge! {
12903 let Self {
12904 flags,
12905
12906 } = &mut *out_;
12907 }
12908
12909 ::fidl_next::Wire::zero_padding(flags);
12910 }
12911 }
12912
12913 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetFlagsRequest
12914 where
12915 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12916 {
12917 fn decode(
12918 slot_: ::fidl_next::Slot<'_, Self>,
12919 decoder_: &mut ___D,
12920 _: (),
12921 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12922 ::fidl_next::munge! {
12923 let Self {
12924 mut flags,
12925
12926 } = slot_;
12927 }
12928
12929 let _field = flags.as_mut();
12930
12931 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
12932
12933 Ok(())
12934 }
12935 }
12936
12937 impl ::fidl_next::IntoNatural for NodeSetFlagsRequest {
12938 type Natural = crate::natural::NodeSetFlagsRequest;
12939 }
12940
12941 pub type EmptyStruct = ::fidl_next::wire::Unit;
12943
12944 #[repr(transparent)]
12946 pub struct SelinuxContext<'de> {
12947 pub(crate) raw: ::fidl_next::wire::Union,
12948 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
12949 }
12950
12951 impl<'de> Drop for SelinuxContext<'de> {
12952 fn drop(&mut self) {
12953 match self.raw.ordinal() {
12954 1 => {
12955 let _ = unsafe {
12956 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
12957 };
12958 }
12959
12960 2 => {
12961 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::EmptyStruct>() };
12962 }
12963
12964 _ => (),
12965 }
12966 }
12967 }
12968
12969 impl ::fidl_next::Constrained for SelinuxContext<'_> {
12970 type Constraint = ();
12971
12972 fn validate(
12973 _: ::fidl_next::Slot<'_, Self>,
12974 _: Self::Constraint,
12975 ) -> Result<(), ::fidl_next::ValidationError> {
12976 Ok(())
12977 }
12978 }
12979
12980 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
12981 type Narrowed<'de> = SelinuxContext<'de>;
12982
12983 #[inline]
12984 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12985 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12986 ::fidl_next::wire::Union::zero_padding(raw);
12987 }
12988 }
12989
12990 pub mod selinux_context {
12991 pub enum Ref<'de> {
12992 Data(&'de ::fidl_next::wire::Vector<'de, u8>),
12993
12994 UseExtendedAttributes(&'de crate::wire::EmptyStruct),
12995
12996 UnknownOrdinal_(u64),
12997 }
12998
12999 pub enum Value<'de> {
13000 Data(::fidl_next::wire::Vector<'de, u8>),
13001
13002 UseExtendedAttributes(crate::wire::EmptyStruct),
13003
13004 UnknownOrdinal_(u64),
13005 }
13006 }
13007
13008 impl<'de> SelinuxContext<'de> {
13009 pub fn as_ref(&self) -> crate::wire::selinux_context::Ref<'_> {
13010 match self.raw.ordinal() {
13011 1 => crate::wire::selinux_context::Ref::Data(unsafe {
13012 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13013 }),
13014
13015 2 => crate::wire::selinux_context::Ref::UseExtendedAttributes(unsafe {
13016 self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
13017 }),
13018
13019 unknown => crate::wire::selinux_context::Ref::UnknownOrdinal_(unknown),
13020 }
13021 }
13022
13023 pub fn into_inner(self) -> crate::wire::selinux_context::Value<'de> {
13024 let this = ::core::mem::ManuallyDrop::new(self);
13025
13026 match this.raw.ordinal() {
13027 1 => crate::wire::selinux_context::Value::Data(unsafe {
13028 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13029 }),
13030
13031 2 => crate::wire::selinux_context::Value::UseExtendedAttributes(unsafe {
13032 this.raw.get().read_unchecked::<crate::wire::EmptyStruct>()
13033 }),
13034
13035 unknown => crate::wire::selinux_context::Value::UnknownOrdinal_(unknown),
13036 }
13037 }
13038 }
13039
13040 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SelinuxContext<'de>
13041 where
13042 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13043 ___D: ::fidl_next::Decoder<'de>,
13044 {
13045 fn decode(
13046 mut slot: ::fidl_next::Slot<'_, Self>,
13047 decoder: &mut ___D,
13048 _: (),
13049 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13050 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
13051 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
13052 1 => {
13053 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
13054 raw,
13055 decoder,
13056 (256, ()),
13057 )?
13058 }
13059
13060 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::EmptyStruct>(
13061 raw,
13062 decoder,
13063 (),
13064 )?,
13065
13066 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
13067 }
13068
13069 Ok(())
13070 }
13071 }
13072
13073 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
13074 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
13075 match self.raw.ordinal() {
13076 1 => unsafe {
13077 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
13078 },
13079 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>().fmt(f) },
13080 _ => unsafe { ::core::hint::unreachable_unchecked() },
13081 }
13082 }
13083 }
13084
13085 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
13086 type Natural = crate::natural::SelinuxContext;
13087 }
13088
13089 #[repr(C)]
13091 pub struct MutableNodeAttributes<'de> {
13092 pub(crate) table: ::fidl_next::wire::Table<'de>,
13093 }
13094
13095 impl<'de> Drop for MutableNodeAttributes<'de> {
13096 fn drop(&mut self) {
13097 let _ = self
13098 .table
13099 .get(1)
13100 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13101
13102 let _ = self
13103 .table
13104 .get(2)
13105 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13106
13107 let _ = self
13108 .table
13109 .get(3)
13110 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13111
13112 let _ = self
13113 .table
13114 .get(4)
13115 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13116
13117 let _ = self
13118 .table
13119 .get(5)
13120 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13121
13122 let _ = self
13123 .table
13124 .get(6)
13125 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13126
13127 let _ = self
13128 .table
13129 .get(7)
13130 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13131
13132 let _ = self.table.get(8).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13133
13134 let _ = self.table.get(9).map(|envelope| unsafe {
13135 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
13136 });
13137
13138 let _ =
13139 self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 16]>() });
13140 }
13141 }
13142
13143 impl ::fidl_next::Constrained for MutableNodeAttributes<'_> {
13144 type Constraint = ();
13145
13146 fn validate(
13147 _: ::fidl_next::Slot<'_, Self>,
13148 _: Self::Constraint,
13149 ) -> Result<(), ::fidl_next::ValidationError> {
13150 Ok(())
13151 }
13152 }
13153
13154 unsafe impl ::fidl_next::Wire for MutableNodeAttributes<'static> {
13155 type Narrowed<'de> = MutableNodeAttributes<'de>;
13156
13157 #[inline]
13158 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13159 ::fidl_next::munge!(let Self { table } = out);
13160 ::fidl_next::wire::Table::zero_padding(table);
13161 }
13162 }
13163
13164 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for MutableNodeAttributes<'de>
13165 where
13166 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13167 {
13168 fn decode(
13169 slot: ::fidl_next::Slot<'_, Self>,
13170 decoder: &mut ___D,
13171 _: (),
13172 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13173 ::fidl_next::munge!(let Self { table } = slot);
13174
13175 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13176 match ordinal {
13177 0 => unsafe { ::core::hint::unreachable_unchecked() },
13178
13179 1 => {
13180 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13181 slot.as_mut(),
13182 decoder,
13183 (),
13184 )?;
13185
13186 Ok(())
13187 }
13188
13189 2 => {
13190 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13191 slot.as_mut(),
13192 decoder,
13193 (),
13194 )?;
13195
13196 Ok(())
13197 }
13198
13199 3 => {
13200 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13201 slot.as_mut(),
13202 decoder,
13203 (),
13204 )?;
13205
13206 Ok(())
13207 }
13208
13209 4 => {
13210 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13211 slot.as_mut(),
13212 decoder,
13213 (),
13214 )?;
13215
13216 Ok(())
13217 }
13218
13219 5 => {
13220 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13221 slot.as_mut(),
13222 decoder,
13223 (),
13224 )?;
13225
13226 Ok(())
13227 }
13228
13229 6 => {
13230 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13231 slot.as_mut(),
13232 decoder,
13233 (),
13234 )?;
13235
13236 Ok(())
13237 }
13238
13239 7 => {
13240 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13241 slot.as_mut(),
13242 decoder,
13243 (),
13244 )?;
13245
13246 Ok(())
13247 }
13248
13249 8 => {
13250 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13251 slot.as_mut(),
13252 decoder,
13253 (),
13254 )?;
13255
13256 Ok(())
13257 }
13258
13259 9 => {
13260 ::fidl_next::wire::Envelope::decode_as::<
13261 ___D,
13262 crate::wire::SelinuxContext<'de>,
13263 >(slot.as_mut(), decoder, ())?;
13264
13265 Ok(())
13266 }
13267
13268 10 => {
13269 ::fidl_next::wire::Envelope::decode_as::<___D, [u8; 16]>(
13270 slot.as_mut(),
13271 decoder,
13272 (),
13273 )?;
13274
13275 Ok(())
13276 }
13277
13278 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13279 }
13280 })
13281 }
13282 }
13283
13284 impl<'de> MutableNodeAttributes<'de> {
13285 pub fn creation_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13286 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13287 }
13288
13289 pub fn take_creation_time(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13290 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13291 }
13292
13293 pub fn modification_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13294 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13295 }
13296
13297 pub fn take_modification_time(
13298 &mut self,
13299 ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13300 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13301 }
13302
13303 pub fn mode(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13304 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
13305 }
13306
13307 pub fn take_mode(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
13308 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
13309 }
13310
13311 pub fn uid(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13312 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
13313 }
13314
13315 pub fn take_uid(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
13316 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
13317 }
13318
13319 pub fn gid(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13320 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13321 }
13322
13323 pub fn take_gid(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
13324 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13325 }
13326
13327 pub fn rdev(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13328 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
13329 }
13330
13331 pub fn take_rdev(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13332 unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
13333 }
13334
13335 pub fn access_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13336 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
13337 }
13338
13339 pub fn take_access_time(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13340 unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
13341 }
13342
13343 pub fn casefold(&self) -> ::core::option::Option<&bool> {
13344 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
13345 }
13346
13347 pub fn take_casefold(&mut self) -> ::core::option::Option<bool> {
13348 unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
13349 }
13350
13351 pub fn selinux_context(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
13352 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
13353 }
13354
13355 pub fn take_selinux_context(
13356 &mut self,
13357 ) -> ::core::option::Option<crate::wire::SelinuxContext<'de>> {
13358 unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
13359 }
13360
13361 pub fn wrapping_key_id(&self) -> ::core::option::Option<&[u8; 16]> {
13362 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
13363 }
13364
13365 pub fn take_wrapping_key_id(&mut self) -> ::core::option::Option<[u8; 16]> {
13366 unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
13367 }
13368 }
13369
13370 impl<'de> ::core::fmt::Debug for MutableNodeAttributes<'de> {
13371 fn fmt(
13372 &self,
13373 f: &mut ::core::fmt::Formatter<'_>,
13374 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13375 f.debug_struct("MutableNodeAttributes")
13376 .field("creation_time", &self.creation_time())
13377 .field("modification_time", &self.modification_time())
13378 .field("mode", &self.mode())
13379 .field("uid", &self.uid())
13380 .field("gid", &self.gid())
13381 .field("rdev", &self.rdev())
13382 .field("access_time", &self.access_time())
13383 .field("casefold", &self.casefold())
13384 .field("selinux_context", &self.selinux_context())
13385 .field("wrapping_key_id", &self.wrapping_key_id())
13386 .finish()
13387 }
13388 }
13389
13390 impl<'de> ::fidl_next::IntoNatural for MutableNodeAttributes<'de> {
13391 type Natural = crate::natural::MutableNodeAttributes;
13392 }
13393
13394 #[derive(Clone, Copy, Debug)]
13396 #[repr(transparent)]
13397 pub struct NodeProtocolKinds {
13398 pub(crate) value: ::fidl_next::wire::Uint64,
13399 }
13400
13401 impl ::fidl_next::Constrained for NodeProtocolKinds {
13402 type Constraint = ();
13403
13404 fn validate(
13405 _: ::fidl_next::Slot<'_, Self>,
13406 _: Self::Constraint,
13407 ) -> Result<(), ::fidl_next::ValidationError> {
13408 Ok(())
13409 }
13410 }
13411
13412 unsafe impl ::fidl_next::Wire for NodeProtocolKinds {
13413 type Narrowed<'de> = Self;
13414
13415 #[inline]
13416 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13417 }
13419 }
13420
13421 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeProtocolKinds
13422 where
13423 ___D: ?Sized,
13424 {
13425 fn decode(
13426 slot: ::fidl_next::Slot<'_, Self>,
13427 _: &mut ___D,
13428 _: (),
13429 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13430 Ok(())
13431 }
13432 }
13433
13434 impl ::core::convert::From<crate::natural::NodeProtocolKinds> for NodeProtocolKinds {
13435 fn from(natural: crate::natural::NodeProtocolKinds) -> Self {
13436 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
13437 }
13438 }
13439
13440 impl ::fidl_next::IntoNatural for NodeProtocolKinds {
13441 type Natural = crate::natural::NodeProtocolKinds;
13442 }
13443
13444 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
13446 #[repr(transparent)]
13447 pub struct HashAlgorithm {
13448 pub(crate) value: u8,
13449 }
13450
13451 impl ::fidl_next::Constrained for HashAlgorithm {
13452 type Constraint = ();
13453
13454 fn validate(
13455 _: ::fidl_next::Slot<'_, Self>,
13456 _: Self::Constraint,
13457 ) -> Result<(), ::fidl_next::ValidationError> {
13458 Ok(())
13459 }
13460 }
13461
13462 unsafe impl ::fidl_next::Wire for HashAlgorithm {
13463 type Narrowed<'de> = Self;
13464
13465 #[inline]
13466 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13467 }
13469 }
13470
13471 impl HashAlgorithm {
13472 pub const SHA256: HashAlgorithm = HashAlgorithm { value: 1 };
13473
13474 pub const SHA512: HashAlgorithm = HashAlgorithm { value: 2 };
13475 }
13476
13477 unsafe impl<___D> ::fidl_next::Decode<___D> for HashAlgorithm
13478 where
13479 ___D: ?Sized,
13480 {
13481 fn decode(
13482 slot: ::fidl_next::Slot<'_, Self>,
13483 _: &mut ___D,
13484 _: (),
13485 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13486 Ok(())
13487 }
13488 }
13489
13490 impl ::core::convert::From<crate::natural::HashAlgorithm> for HashAlgorithm {
13491 fn from(natural: crate::natural::HashAlgorithm) -> Self {
13492 match natural {
13493 crate::natural::HashAlgorithm::Sha256 => HashAlgorithm::SHA256,
13494
13495 crate::natural::HashAlgorithm::Sha512 => HashAlgorithm::SHA512,
13496
13497 crate::natural::HashAlgorithm::UnknownOrdinal_(value) => {
13498 HashAlgorithm { value: u8::from(value) }
13499 }
13500 }
13501 }
13502 }
13503
13504 impl ::fidl_next::IntoNatural for HashAlgorithm {
13505 type Natural = crate::natural::HashAlgorithm;
13506 }
13507
13508 #[repr(C)]
13510 pub struct VerificationOptions<'de> {
13511 pub(crate) table: ::fidl_next::wire::Table<'de>,
13512 }
13513
13514 impl<'de> Drop for VerificationOptions<'de> {
13515 fn drop(&mut self) {
13516 let _ = self
13517 .table
13518 .get(1)
13519 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::HashAlgorithm>() });
13520
13521 let _ = self.table.get(2).map(|envelope| unsafe {
13522 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13523 });
13524 }
13525 }
13526
13527 impl ::fidl_next::Constrained for VerificationOptions<'_> {
13528 type Constraint = ();
13529
13530 fn validate(
13531 _: ::fidl_next::Slot<'_, Self>,
13532 _: Self::Constraint,
13533 ) -> Result<(), ::fidl_next::ValidationError> {
13534 Ok(())
13535 }
13536 }
13537
13538 unsafe impl ::fidl_next::Wire for VerificationOptions<'static> {
13539 type Narrowed<'de> = VerificationOptions<'de>;
13540
13541 #[inline]
13542 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13543 ::fidl_next::munge!(let Self { table } = out);
13544 ::fidl_next::wire::Table::zero_padding(table);
13545 }
13546 }
13547
13548 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for VerificationOptions<'de>
13549 where
13550 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13551 {
13552 fn decode(
13553 slot: ::fidl_next::Slot<'_, Self>,
13554 decoder: &mut ___D,
13555 _: (),
13556 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13557 ::fidl_next::munge!(let Self { table } = slot);
13558
13559 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13560 match ordinal {
13561 0 => unsafe { ::core::hint::unreachable_unchecked() },
13562
13563 1 => {
13564 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::HashAlgorithm>(
13565 slot.as_mut(),
13566 decoder,
13567 (),
13568 )?;
13569
13570 Ok(())
13571 }
13572
13573 2 => {
13574 ::fidl_next::wire::Envelope::decode_as::<
13575 ___D,
13576 ::fidl_next::wire::Vector<'de, u8>,
13577 >(slot.as_mut(), decoder, (32, ()))?;
13578
13579 let value = unsafe {
13580 slot.deref_unchecked()
13581 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13582 };
13583
13584 if value.len() > 32 {
13585 return Err(::fidl_next::DecodeError::VectorTooLong {
13586 size: value.len() as u64,
13587 limit: 32,
13588 });
13589 }
13590
13591 Ok(())
13592 }
13593
13594 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13595 }
13596 })
13597 }
13598 }
13599
13600 impl<'de> VerificationOptions<'de> {
13601 pub fn hash_algorithm(&self) -> ::core::option::Option<&crate::wire::HashAlgorithm> {
13602 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13603 }
13604
13605 pub fn take_hash_algorithm(
13606 &mut self,
13607 ) -> ::core::option::Option<crate::wire::HashAlgorithm> {
13608 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13609 }
13610
13611 pub fn salt(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
13612 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13613 }
13614
13615 pub fn take_salt(&mut self) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
13616 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13617 }
13618 }
13619
13620 impl<'de> ::core::fmt::Debug for VerificationOptions<'de> {
13621 fn fmt(
13622 &self,
13623 f: &mut ::core::fmt::Formatter<'_>,
13624 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13625 f.debug_struct("VerificationOptions")
13626 .field("hash_algorithm", &self.hash_algorithm())
13627 .field("salt", &self.salt())
13628 .finish()
13629 }
13630 }
13631
13632 impl<'de> ::fidl_next::IntoNatural for VerificationOptions<'de> {
13633 type Natural = crate::natural::VerificationOptions;
13634 }
13635
13636 #[repr(C)]
13638 pub struct ImmutableNodeAttributes<'de> {
13639 pub(crate) table: ::fidl_next::wire::Table<'de>,
13640 }
13641
13642 impl<'de> Drop for ImmutableNodeAttributes<'de> {
13643 fn drop(&mut self) {
13644 let _ = self.table.get(1).map(|envelope| unsafe {
13645 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
13646 });
13647
13648 let _ = self
13649 .table
13650 .get(2)
13651 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
13652
13653 let _ = self
13654 .table
13655 .get(3)
13656 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13657
13658 let _ = self
13659 .table
13660 .get(4)
13661 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13662
13663 let _ = self
13664 .table
13665 .get(5)
13666 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13667
13668 let _ = self
13669 .table
13670 .get(6)
13671 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13672
13673 let _ = self
13674 .table
13675 .get(7)
13676 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13677
13678 let _ = self.table.get(8).map(|envelope| unsafe {
13679 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
13680 });
13681
13682 let _ = self.table.get(9).map(|envelope| unsafe {
13683 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
13684 });
13685
13686 let _ = self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13687 }
13688 }
13689
13690 impl ::fidl_next::Constrained for ImmutableNodeAttributes<'_> {
13691 type Constraint = ();
13692
13693 fn validate(
13694 _: ::fidl_next::Slot<'_, Self>,
13695 _: Self::Constraint,
13696 ) -> Result<(), ::fidl_next::ValidationError> {
13697 Ok(())
13698 }
13699 }
13700
13701 unsafe impl ::fidl_next::Wire for ImmutableNodeAttributes<'static> {
13702 type Narrowed<'de> = ImmutableNodeAttributes<'de>;
13703
13704 #[inline]
13705 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13706 ::fidl_next::munge!(let Self { table } = out);
13707 ::fidl_next::wire::Table::zero_padding(table);
13708 }
13709 }
13710
13711 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ImmutableNodeAttributes<'de>
13712 where
13713 ___D: ::fidl_next::Decoder<'de> + ?Sized,
13714 {
13715 fn decode(
13716 slot: ::fidl_next::Slot<'_, Self>,
13717 decoder: &mut ___D,
13718 _: (),
13719 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13720 ::fidl_next::munge!(let Self { table } = slot);
13721
13722 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13723 match ordinal {
13724 0 => unsafe { ::core::hint::unreachable_unchecked() },
13725
13726 1 => {
13727 ::fidl_next::wire::Envelope::decode_as::<
13728 ___D,
13729 crate::wire::NodeProtocolKinds,
13730 >(slot.as_mut(), decoder, ())?;
13731
13732 Ok(())
13733 }
13734
13735 2 => {
13736 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Operations>(
13737 slot.as_mut(),
13738 decoder,
13739 (),
13740 )?;
13741
13742 Ok(())
13743 }
13744
13745 3 => {
13746 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13747 slot.as_mut(),
13748 decoder,
13749 (),
13750 )?;
13751
13752 Ok(())
13753 }
13754
13755 4 => {
13756 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13757 slot.as_mut(),
13758 decoder,
13759 (),
13760 )?;
13761
13762 Ok(())
13763 }
13764
13765 5 => {
13766 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13767 slot.as_mut(),
13768 decoder,
13769 (),
13770 )?;
13771
13772 Ok(())
13773 }
13774
13775 6 => {
13776 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13777 slot.as_mut(),
13778 decoder,
13779 (),
13780 )?;
13781
13782 Ok(())
13783 }
13784
13785 7 => {
13786 ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13787 slot.as_mut(),
13788 decoder,
13789 (),
13790 )?;
13791
13792 Ok(())
13793 }
13794
13795 8 => {
13796 ::fidl_next::wire::Envelope::decode_as::<
13797 ___D,
13798 crate::wire::VerificationOptions<'de>,
13799 >(slot.as_mut(), decoder, ())?;
13800
13801 Ok(())
13802 }
13803
13804 9 => {
13805 ::fidl_next::wire::Envelope::decode_as::<
13806 ___D,
13807 ::fidl_next::wire::Vector<'de, u8>,
13808 >(slot.as_mut(), decoder, (64, ()))?;
13809
13810 let value = unsafe {
13811 slot.deref_unchecked()
13812 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
13813 };
13814
13815 if value.len() > 64 {
13816 return Err(::fidl_next::DecodeError::VectorTooLong {
13817 size: value.len() as u64,
13818 limit: 64,
13819 });
13820 }
13821
13822 Ok(())
13823 }
13824
13825 10 => {
13826 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13827 slot.as_mut(),
13828 decoder,
13829 (),
13830 )?;
13831
13832 Ok(())
13833 }
13834
13835 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13836 }
13837 })
13838 }
13839 }
13840
13841 impl<'de> ImmutableNodeAttributes<'de> {
13842 pub fn protocols(&self) -> ::core::option::Option<&crate::wire::NodeProtocolKinds> {
13843 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13844 }
13845
13846 pub fn take_protocols(&mut self) -> ::core::option::Option<crate::wire::NodeProtocolKinds> {
13847 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13848 }
13849
13850 pub fn abilities(&self) -> ::core::option::Option<&crate::wire::Operations> {
13851 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13852 }
13853
13854 pub fn take_abilities(&mut self) -> ::core::option::Option<crate::wire::Operations> {
13855 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13856 }
13857
13858 pub fn content_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13859 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
13860 }
13861
13862 pub fn take_content_size(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13863 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
13864 }
13865
13866 pub fn storage_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13867 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
13868 }
13869
13870 pub fn take_storage_size(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13871 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
13872 }
13873
13874 pub fn link_count(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13875 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13876 }
13877
13878 pub fn take_link_count(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13879 unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13880 }
13881
13882 pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13883 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
13884 }
13885
13886 pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13887 unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
13888 }
13889
13890 pub fn change_time(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13891 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
13892 }
13893
13894 pub fn take_change_time(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13895 unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
13896 }
13897
13898 pub fn options(&self) -> ::core::option::Option<&crate::wire::VerificationOptions<'de>> {
13899 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
13900 }
13901
13902 pub fn take_options(
13903 &mut self,
13904 ) -> ::core::option::Option<crate::wire::VerificationOptions<'de>> {
13905 unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
13906 }
13907
13908 pub fn root_hash(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
13909 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
13910 }
13911
13912 pub fn take_root_hash(
13913 &mut self,
13914 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
13915 unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
13916 }
13917
13918 pub fn verity_enabled(&self) -> ::core::option::Option<&bool> {
13919 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
13920 }
13921
13922 pub fn take_verity_enabled(&mut self) -> ::core::option::Option<bool> {
13923 unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
13924 }
13925 }
13926
13927 impl<'de> ::core::fmt::Debug for ImmutableNodeAttributes<'de> {
13928 fn fmt(
13929 &self,
13930 f: &mut ::core::fmt::Formatter<'_>,
13931 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13932 f.debug_struct("ImmutableNodeAttributes")
13933 .field("protocols", &self.protocols())
13934 .field("abilities", &self.abilities())
13935 .field("content_size", &self.content_size())
13936 .field("storage_size", &self.storage_size())
13937 .field("link_count", &self.link_count())
13938 .field("id", &self.id())
13939 .field("change_time", &self.change_time())
13940 .field("options", &self.options())
13941 .field("root_hash", &self.root_hash())
13942 .field("verity_enabled", &self.verity_enabled())
13943 .finish()
13944 }
13945 }
13946
13947 impl<'de> ::fidl_next::IntoNatural for ImmutableNodeAttributes<'de> {
13948 type Natural = crate::natural::ImmutableNodeAttributes;
13949 }
13950
13951 #[derive(Debug)]
13953 #[repr(C)]
13954 pub struct NodeAttributes2<'de> {
13955 pub mutable_attributes: crate::wire::MutableNodeAttributes<'de>,
13956
13957 pub immutable_attributes: crate::wire::ImmutableNodeAttributes<'de>,
13958 }
13959
13960 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes2<'_>>(), 32);
13961 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes2<'_>>(), 8);
13962
13963 static_assertions::const_assert_eq!(
13964 std::mem::offset_of!(NodeAttributes2<'_>, mutable_attributes),
13965 0
13966 );
13967
13968 static_assertions::const_assert_eq!(
13969 std::mem::offset_of!(NodeAttributes2<'_>, immutable_attributes),
13970 16
13971 );
13972
13973 impl ::fidl_next::Constrained for NodeAttributes2<'_> {
13974 type Constraint = ();
13975
13976 fn validate(
13977 _: ::fidl_next::Slot<'_, Self>,
13978 _: Self::Constraint,
13979 ) -> Result<(), ::fidl_next::ValidationError> {
13980 Ok(())
13981 }
13982 }
13983
13984 unsafe impl ::fidl_next::Wire for NodeAttributes2<'static> {
13985 type Narrowed<'de> = NodeAttributes2<'de>;
13986
13987 #[inline]
13988 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13989 ::fidl_next::munge! {
13990 let Self {
13991 mutable_attributes,
13992 immutable_attributes,
13993
13994 } = &mut *out_;
13995 }
13996
13997 ::fidl_next::Wire::zero_padding(mutable_attributes);
13998
13999 ::fidl_next::Wire::zero_padding(immutable_attributes);
14000 }
14001 }
14002
14003 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAttributes2<'de>
14004 where
14005 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14006 ___D: ::fidl_next::Decoder<'de>,
14007 {
14008 fn decode(
14009 slot_: ::fidl_next::Slot<'_, Self>,
14010 decoder_: &mut ___D,
14011 _: (),
14012 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14013 ::fidl_next::munge! {
14014 let Self {
14015 mut mutable_attributes,
14016 mut immutable_attributes,
14017
14018 } = slot_;
14019 }
14020
14021 let _field = mutable_attributes.as_mut();
14022
14023 ::fidl_next::Decode::decode(mutable_attributes.as_mut(), decoder_, ())?;
14024
14025 let _field = immutable_attributes.as_mut();
14026
14027 ::fidl_next::Decode::decode(immutable_attributes.as_mut(), decoder_, ())?;
14028
14029 Ok(())
14030 }
14031 }
14032
14033 impl<'de> ::fidl_next::IntoNatural for NodeAttributes2<'de> {
14034 type Natural = crate::natural::NodeAttributes2;
14035 }
14036
14037 #[repr(C)]
14039 pub struct NodeInfo<'de> {
14040 pub(crate) table: ::fidl_next::wire::Table<'de>,
14041 }
14042
14043 impl<'de> Drop for NodeInfo<'de> {
14044 fn drop(&mut self) {
14045 let _ = self.table.get(1).map(|envelope| unsafe {
14046 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
14047 });
14048 }
14049 }
14050
14051 impl ::fidl_next::Constrained for NodeInfo<'_> {
14052 type Constraint = ();
14053
14054 fn validate(
14055 _: ::fidl_next::Slot<'_, Self>,
14056 _: Self::Constraint,
14057 ) -> Result<(), ::fidl_next::ValidationError> {
14058 Ok(())
14059 }
14060 }
14061
14062 unsafe impl ::fidl_next::Wire for NodeInfo<'static> {
14063 type Narrowed<'de> = NodeInfo<'de>;
14064
14065 #[inline]
14066 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14067 ::fidl_next::munge!(let Self { table } = out);
14068 ::fidl_next::wire::Table::zero_padding(table);
14069 }
14070 }
14071
14072 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfo<'de>
14073 where
14074 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14075 {
14076 fn decode(
14077 slot: ::fidl_next::Slot<'_, Self>,
14078 decoder: &mut ___D,
14079 _: (),
14080 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14081 ::fidl_next::munge!(let Self { table } = slot);
14082
14083 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14084 match ordinal {
14085 0 => unsafe { ::core::hint::unreachable_unchecked() },
14086
14087 1 => {
14088 ::fidl_next::wire::Envelope::decode_as::<
14089 ___D,
14090 crate::wire::NodeAttributes2<'de>,
14091 >(slot.as_mut(), decoder, ())?;
14092
14093 Ok(())
14094 }
14095
14096 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14097 }
14098 })
14099 }
14100 }
14101
14102 impl<'de> NodeInfo<'de> {
14103 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
14104 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14105 }
14106
14107 pub fn take_attributes(
14108 &mut self,
14109 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
14110 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14111 }
14112 }
14113
14114 impl<'de> ::core::fmt::Debug for NodeInfo<'de> {
14115 fn fmt(
14116 &self,
14117 f: &mut ::core::fmt::Formatter<'_>,
14118 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14119 f.debug_struct("NodeInfo").field("attributes", &self.attributes()).finish()
14120 }
14121 }
14122
14123 impl<'de> ::fidl_next::IntoNatural for NodeInfo<'de> {
14124 type Natural = crate::natural::NodeInfo;
14125 }
14126
14127 #[repr(C)]
14129 pub struct DirectoryInfo<'de> {
14130 pub(crate) table: ::fidl_next::wire::Table<'de>,
14131 }
14132
14133 impl<'de> Drop for DirectoryInfo<'de> {
14134 fn drop(&mut self) {
14135 let _ = self.table.get(1).map(|envelope| unsafe {
14136 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
14137 });
14138 }
14139 }
14140
14141 impl ::fidl_next::Constrained for DirectoryInfo<'_> {
14142 type Constraint = ();
14143
14144 fn validate(
14145 _: ::fidl_next::Slot<'_, Self>,
14146 _: Self::Constraint,
14147 ) -> Result<(), ::fidl_next::ValidationError> {
14148 Ok(())
14149 }
14150 }
14151
14152 unsafe impl ::fidl_next::Wire for DirectoryInfo<'static> {
14153 type Narrowed<'de> = DirectoryInfo<'de>;
14154
14155 #[inline]
14156 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14157 ::fidl_next::munge!(let Self { table } = out);
14158 ::fidl_next::wire::Table::zero_padding(table);
14159 }
14160 }
14161
14162 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryInfo<'de>
14163 where
14164 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14165 {
14166 fn decode(
14167 slot: ::fidl_next::Slot<'_, Self>,
14168 decoder: &mut ___D,
14169 _: (),
14170 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14171 ::fidl_next::munge!(let Self { table } = slot);
14172
14173 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14174 match ordinal {
14175 0 => unsafe { ::core::hint::unreachable_unchecked() },
14176
14177 1 => {
14178 ::fidl_next::wire::Envelope::decode_as::<
14179 ___D,
14180 crate::wire::NodeAttributes2<'de>,
14181 >(slot.as_mut(), decoder, ())?;
14182
14183 Ok(())
14184 }
14185
14186 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14187 }
14188 })
14189 }
14190 }
14191
14192 impl<'de> DirectoryInfo<'de> {
14193 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
14194 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14195 }
14196
14197 pub fn take_attributes(
14198 &mut self,
14199 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
14200 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14201 }
14202 }
14203
14204 impl<'de> ::core::fmt::Debug for DirectoryInfo<'de> {
14205 fn fmt(
14206 &self,
14207 f: &mut ::core::fmt::Formatter<'_>,
14208 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14209 f.debug_struct("DirectoryInfo").field("attributes", &self.attributes()).finish()
14210 }
14211 }
14212
14213 impl<'de> ::fidl_next::IntoNatural for DirectoryInfo<'de> {
14214 type Natural = crate::natural::DirectoryInfo;
14215 }
14216
14217 #[repr(C)]
14219 pub struct SymlinkInfo<'de> {
14220 pub(crate) table: ::fidl_next::wire::Table<'de>,
14221 }
14222
14223 impl<'de> Drop for SymlinkInfo<'de> {
14224 fn drop(&mut self) {
14225 let _ = self.table.get(1).map(|envelope| unsafe {
14226 envelope.read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
14227 });
14228
14229 let _ = self.table.get(2).map(|envelope| unsafe {
14230 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
14231 });
14232 }
14233 }
14234
14235 impl ::fidl_next::Constrained for SymlinkInfo<'_> {
14236 type Constraint = ();
14237
14238 fn validate(
14239 _: ::fidl_next::Slot<'_, Self>,
14240 _: Self::Constraint,
14241 ) -> Result<(), ::fidl_next::ValidationError> {
14242 Ok(())
14243 }
14244 }
14245
14246 unsafe impl ::fidl_next::Wire for SymlinkInfo<'static> {
14247 type Narrowed<'de> = SymlinkInfo<'de>;
14248
14249 #[inline]
14250 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14251 ::fidl_next::munge!(let Self { table } = out);
14252 ::fidl_next::wire::Table::zero_padding(table);
14253 }
14254 }
14255
14256 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SymlinkInfo<'de>
14257 where
14258 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14259 {
14260 fn decode(
14261 slot: ::fidl_next::Slot<'_, Self>,
14262 decoder: &mut ___D,
14263 _: (),
14264 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14265 ::fidl_next::munge!(let Self { table } = slot);
14266
14267 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14268 match ordinal {
14269 0 => unsafe { ::core::hint::unreachable_unchecked() },
14270
14271 1 => {
14272 ::fidl_next::wire::Envelope::decode_as::<
14273 ___D,
14274 ::fidl_next::wire::Vector<'de, u8>,
14275 >(slot.as_mut(), decoder, (4095, ()))?;
14276
14277 let value = unsafe {
14278 slot.deref_unchecked()
14279 .deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
14280 };
14281
14282 if value.len() > 4095 {
14283 return Err(::fidl_next::DecodeError::VectorTooLong {
14284 size: value.len() as u64,
14285 limit: 4095,
14286 });
14287 }
14288
14289 Ok(())
14290 }
14291
14292 2 => {
14293 ::fidl_next::wire::Envelope::decode_as::<
14294 ___D,
14295 crate::wire::NodeAttributes2<'de>,
14296 >(slot.as_mut(), decoder, ())?;
14297
14298 Ok(())
14299 }
14300
14301 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14302 }
14303 })
14304 }
14305 }
14306
14307 impl<'de> SymlinkInfo<'de> {
14308 pub fn target(&self) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, u8>> {
14309 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14310 }
14311
14312 pub fn take_target(
14313 &mut self,
14314 ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, u8>> {
14315 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14316 }
14317
14318 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
14319 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14320 }
14321
14322 pub fn take_attributes(
14323 &mut self,
14324 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
14325 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14326 }
14327 }
14328
14329 impl<'de> ::core::fmt::Debug for SymlinkInfo<'de> {
14330 fn fmt(
14331 &self,
14332 f: &mut ::core::fmt::Formatter<'_>,
14333 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14334 f.debug_struct("SymlinkInfo")
14335 .field("target", &self.target())
14336 .field("attributes", &self.attributes())
14337 .finish()
14338 }
14339 }
14340
14341 impl<'de> ::fidl_next::IntoNatural for SymlinkInfo<'de> {
14342 type Natural = crate::natural::SymlinkInfo;
14343 }
14344
14345 #[derive(Clone, Copy, Debug)]
14347 #[repr(transparent)]
14348 pub struct NodeAttributesQuery {
14349 pub(crate) value: ::fidl_next::wire::Uint64,
14350 }
14351
14352 impl ::fidl_next::Constrained for NodeAttributesQuery {
14353 type Constraint = ();
14354
14355 fn validate(
14356 _: ::fidl_next::Slot<'_, Self>,
14357 _: Self::Constraint,
14358 ) -> Result<(), ::fidl_next::ValidationError> {
14359 Ok(())
14360 }
14361 }
14362
14363 unsafe impl ::fidl_next::Wire for NodeAttributesQuery {
14364 type Narrowed<'de> = Self;
14365
14366 #[inline]
14367 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14368 }
14370 }
14371
14372 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributesQuery
14373 where
14374 ___D: ?Sized,
14375 {
14376 fn decode(
14377 slot: ::fidl_next::Slot<'_, Self>,
14378 _: &mut ___D,
14379 _: (),
14380 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14381 Ok(())
14382 }
14383 }
14384
14385 impl ::core::convert::From<crate::natural::NodeAttributesQuery> for NodeAttributesQuery {
14386 fn from(natural: crate::natural::NodeAttributesQuery) -> Self {
14387 Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
14388 }
14389 }
14390
14391 impl ::fidl_next::IntoNatural for NodeAttributesQuery {
14392 type Natural = crate::natural::NodeAttributesQuery;
14393 }
14394
14395 #[derive(Clone, Debug)]
14397 #[repr(C)]
14398 pub struct NodeGetAttributesRequest {
14399 pub query: crate::wire::NodeAttributesQuery,
14400 }
14401
14402 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetAttributesRequest>(), 8);
14403 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetAttributesRequest>(), 8);
14404
14405 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetAttributesRequest, query), 0);
14406
14407 impl ::fidl_next::Constrained for NodeGetAttributesRequest {
14408 type Constraint = ();
14409
14410 fn validate(
14411 _: ::fidl_next::Slot<'_, Self>,
14412 _: Self::Constraint,
14413 ) -> Result<(), ::fidl_next::ValidationError> {
14414 Ok(())
14415 }
14416 }
14417
14418 unsafe impl ::fidl_next::Wire for NodeGetAttributesRequest {
14419 type Narrowed<'de> = NodeGetAttributesRequest;
14420
14421 #[inline]
14422 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14423 ::fidl_next::munge! {
14424 let Self {
14425 query,
14426
14427 } = &mut *out_;
14428 }
14429
14430 ::fidl_next::Wire::zero_padding(query);
14431 }
14432 }
14433
14434 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetAttributesRequest
14435 where
14436 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14437 {
14438 fn decode(
14439 slot_: ::fidl_next::Slot<'_, Self>,
14440 decoder_: &mut ___D,
14441 _: (),
14442 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14443 ::fidl_next::munge! {
14444 let Self {
14445 mut query,
14446
14447 } = slot_;
14448 }
14449
14450 let _field = query.as_mut();
14451
14452 ::fidl_next::Decode::decode(query.as_mut(), decoder_, ())?;
14453
14454 Ok(())
14455 }
14456 }
14457
14458 impl ::fidl_next::IntoNatural for NodeGetAttributesRequest {
14459 type Natural = crate::natural::NodeGetAttributesRequest;
14460 }
14461
14462 #[repr(C)]
14464 pub struct Options<'de> {
14465 pub(crate) table: ::fidl_next::wire::Table<'de>,
14466 }
14467
14468 impl<'de> Drop for Options<'de> {
14469 fn drop(&mut self) {
14470 let _ = self.table.get(1).map(|envelope| unsafe {
14471 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
14472 });
14473
14474 let _ = self.table.get(2).map(|envelope| unsafe {
14475 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
14476 });
14477 }
14478 }
14479
14480 impl ::fidl_next::Constrained for Options<'_> {
14481 type Constraint = ();
14482
14483 fn validate(
14484 _: ::fidl_next::Slot<'_, Self>,
14485 _: Self::Constraint,
14486 ) -> Result<(), ::fidl_next::ValidationError> {
14487 Ok(())
14488 }
14489 }
14490
14491 unsafe impl ::fidl_next::Wire for Options<'static> {
14492 type Narrowed<'de> = Options<'de>;
14493
14494 #[inline]
14495 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
14496 ::fidl_next::munge!(let Self { table } = out);
14497 ::fidl_next::wire::Table::zero_padding(table);
14498 }
14499 }
14500
14501 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Options<'de>
14502 where
14503 ___D: ::fidl_next::Decoder<'de> + ?Sized,
14504 {
14505 fn decode(
14506 slot: ::fidl_next::Slot<'_, Self>,
14507 decoder: &mut ___D,
14508 _: (),
14509 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14510 ::fidl_next::munge!(let Self { table } = slot);
14511
14512 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
14513 match ordinal {
14514 0 => unsafe { ::core::hint::unreachable_unchecked() },
14515
14516 1 => {
14517 ::fidl_next::wire::Envelope::decode_as::<
14518 ___D,
14519 crate::wire::NodeAttributesQuery,
14520 >(slot.as_mut(), decoder, ())?;
14521
14522 Ok(())
14523 }
14524
14525 2 => {
14526 ::fidl_next::wire::Envelope::decode_as::<
14527 ___D,
14528 crate::wire::MutableNodeAttributes<'de>,
14529 >(slot.as_mut(), decoder, ())?;
14530
14531 Ok(())
14532 }
14533
14534 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
14535 }
14536 })
14537 }
14538 }
14539
14540 impl<'de> Options<'de> {
14541 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributesQuery> {
14542 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14543 }
14544
14545 pub fn take_attributes(
14546 &mut self,
14547 ) -> ::core::option::Option<crate::wire::NodeAttributesQuery> {
14548 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14549 }
14550
14551 pub fn create_attributes(
14552 &self,
14553 ) -> ::core::option::Option<&crate::wire::MutableNodeAttributes<'de>> {
14554 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14555 }
14556
14557 pub fn take_create_attributes(
14558 &mut self,
14559 ) -> ::core::option::Option<crate::wire::MutableNodeAttributes<'de>> {
14560 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14561 }
14562 }
14563
14564 impl<'de> ::core::fmt::Debug for Options<'de> {
14565 fn fmt(
14566 &self,
14567 f: &mut ::core::fmt::Formatter<'_>,
14568 ) -> ::core::result::Result<(), ::core::fmt::Error> {
14569 f.debug_struct("Options")
14570 .field("attributes", &self.attributes())
14571 .field("create_attributes", &self.create_attributes())
14572 .finish()
14573 }
14574 }
14575
14576 impl<'de> ::fidl_next::IntoNatural for Options<'de> {
14577 type Natural = crate::natural::Options;
14578 }
14579
14580 pub type DirectoryObject = ::fidl_next::wire::Unit;
14582
14583 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
14585 #[repr(transparent)]
14586 pub struct DirentType {
14587 pub(crate) value: u8,
14588 }
14589
14590 impl ::fidl_next::Constrained for DirentType {
14591 type Constraint = ();
14592
14593 fn validate(
14594 _: ::fidl_next::Slot<'_, Self>,
14595 _: Self::Constraint,
14596 ) -> Result<(), ::fidl_next::ValidationError> {
14597 Ok(())
14598 }
14599 }
14600
14601 unsafe impl ::fidl_next::Wire for DirentType {
14602 type Narrowed<'de> = Self;
14603
14604 #[inline]
14605 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14606 }
14608 }
14609
14610 impl DirentType {
14611 pub const UNKNOWN: DirentType = DirentType { value: 0 };
14612
14613 pub const DIRECTORY: DirentType = DirentType { value: 4 };
14614
14615 pub const BLOCK_DEVICE: DirentType = DirentType { value: 6 };
14616
14617 pub const FILE: DirentType = DirentType { value: 8 };
14618
14619 pub const SYMLINK: DirentType = DirentType { value: 10 };
14620
14621 pub const SERVICE: DirentType = DirentType { value: 16 };
14622 }
14623
14624 unsafe impl<___D> ::fidl_next::Decode<___D> for DirentType
14625 where
14626 ___D: ?Sized,
14627 {
14628 fn decode(
14629 slot: ::fidl_next::Slot<'_, Self>,
14630 _: &mut ___D,
14631 _: (),
14632 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14633 Ok(())
14634 }
14635 }
14636
14637 impl ::core::convert::From<crate::natural::DirentType> for DirentType {
14638 fn from(natural: crate::natural::DirentType) -> Self {
14639 match natural {
14640 crate::natural::DirentType::Unknown => DirentType::UNKNOWN,
14641
14642 crate::natural::DirentType::Directory => DirentType::DIRECTORY,
14643
14644 crate::natural::DirentType::BlockDevice => DirentType::BLOCK_DEVICE,
14645
14646 crate::natural::DirentType::File => DirentType::FILE,
14647
14648 crate::natural::DirentType::Symlink => DirentType::SYMLINK,
14649
14650 crate::natural::DirentType::Service => DirentType::SERVICE,
14651
14652 crate::natural::DirentType::UnknownOrdinal_(value) => {
14653 DirentType { value: u8::from(value) }
14654 }
14655 }
14656 }
14657 }
14658
14659 impl ::fidl_next::IntoNatural for DirentType {
14660 type Natural = crate::natural::DirentType;
14661 }
14662
14663 #[derive(Debug)]
14665 #[repr(C)]
14666 pub struct ExtendedAttributeIteratorGetNextResponse<'de> {
14667 pub attributes: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::Vector<'de, u8>>,
14668
14669 pub last: bool,
14670 }
14671
14672 static_assertions::const_assert_eq!(
14673 std::mem::size_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
14674 24
14675 );
14676 static_assertions::const_assert_eq!(
14677 std::mem::align_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
14678 8
14679 );
14680
14681 static_assertions::const_assert_eq!(
14682 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, attributes),
14683 0
14684 );
14685
14686 static_assertions::const_assert_eq!(
14687 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, last),
14688 16
14689 );
14690
14691 impl ::fidl_next::Constrained for ExtendedAttributeIteratorGetNextResponse<'_> {
14692 type Constraint = ();
14693
14694 fn validate(
14695 _: ::fidl_next::Slot<'_, Self>,
14696 _: Self::Constraint,
14697 ) -> Result<(), ::fidl_next::ValidationError> {
14698 Ok(())
14699 }
14700 }
14701
14702 unsafe impl ::fidl_next::Wire for ExtendedAttributeIteratorGetNextResponse<'static> {
14703 type Narrowed<'de> = ExtendedAttributeIteratorGetNextResponse<'de>;
14704
14705 #[inline]
14706 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14707 ::fidl_next::munge! {
14708 let Self {
14709 attributes,
14710 last,
14711
14712 } = &mut *out_;
14713 }
14714
14715 ::fidl_next::Wire::zero_padding(attributes);
14716
14717 ::fidl_next::Wire::zero_padding(last);
14718
14719 unsafe {
14720 out_.as_mut_ptr().cast::<u8>().add(17).write_bytes(0, 7);
14721 }
14722 }
14723 }
14724
14725 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeIteratorGetNextResponse<'de>
14726 where
14727 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14728 ___D: ::fidl_next::Decoder<'de>,
14729 {
14730 fn decode(
14731 slot_: ::fidl_next::Slot<'_, Self>,
14732 decoder_: &mut ___D,
14733 _: (),
14734 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14735 if slot_.as_bytes()[17..24] != [0u8; 7] {
14736 return Err(::fidl_next::DecodeError::InvalidPadding);
14737 }
14738
14739 ::fidl_next::munge! {
14740 let Self {
14741 mut attributes,
14742 mut last,
14743
14744 } = slot_;
14745 }
14746
14747 let _field = attributes.as_mut();
14748 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
14749 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, (128, (255, ())))?;
14750
14751 let attributes = unsafe { attributes.deref_unchecked() };
14752
14753 if attributes.len() > 128 {
14754 return Err(::fidl_next::DecodeError::VectorTooLong {
14755 size: attributes.len() as u64,
14756 limit: 128,
14757 });
14758 }
14759
14760 let _field = last.as_mut();
14761
14762 ::fidl_next::Decode::decode(last.as_mut(), decoder_, ())?;
14763
14764 Ok(())
14765 }
14766 }
14767
14768 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeIteratorGetNextResponse<'de> {
14769 type Natural = crate::natural::ExtendedAttributeIteratorGetNextResponse;
14770 }
14771
14772 #[derive(Clone, Debug)]
14774 #[repr(C)]
14775 pub struct ReadableReadRequest {
14776 pub count: ::fidl_next::wire::Uint64,
14777 }
14778
14779 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadRequest>(), 8);
14780 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadRequest>(), 8);
14781
14782 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadRequest, count), 0);
14783
14784 impl ::fidl_next::Constrained for ReadableReadRequest {
14785 type Constraint = ();
14786
14787 fn validate(
14788 _: ::fidl_next::Slot<'_, Self>,
14789 _: Self::Constraint,
14790 ) -> Result<(), ::fidl_next::ValidationError> {
14791 Ok(())
14792 }
14793 }
14794
14795 unsafe impl ::fidl_next::Wire for ReadableReadRequest {
14796 type Narrowed<'de> = ReadableReadRequest;
14797
14798 #[inline]
14799 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14800 ::fidl_next::munge! {
14801 let Self {
14802 count,
14803
14804 } = &mut *out_;
14805 }
14806
14807 ::fidl_next::Wire::zero_padding(count);
14808 }
14809 }
14810
14811 unsafe impl<___D> ::fidl_next::Decode<___D> for ReadableReadRequest
14812 where
14813 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14814 {
14815 fn decode(
14816 slot_: ::fidl_next::Slot<'_, Self>,
14817 decoder_: &mut ___D,
14818 _: (),
14819 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14820 ::fidl_next::munge! {
14821 let Self {
14822 mut count,
14823
14824 } = slot_;
14825 }
14826
14827 let _field = count.as_mut();
14828
14829 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
14830
14831 Ok(())
14832 }
14833 }
14834
14835 impl ::fidl_next::IntoNatural for ReadableReadRequest {
14836 type Natural = crate::natural::ReadableReadRequest;
14837 }
14838
14839 pub type Transfer<'de> = ::fidl_next::wire::Vector<'de, u8>;
14841
14842 #[derive(Debug)]
14844 #[repr(C)]
14845 pub struct ReadableReadResponse<'de> {
14846 pub data: ::fidl_next::wire::Vector<'de, u8>,
14847 }
14848
14849 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadResponse<'_>>(), 16);
14850 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadResponse<'_>>(), 8);
14851
14852 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadResponse<'_>, data), 0);
14853
14854 impl ::fidl_next::Constrained for ReadableReadResponse<'_> {
14855 type Constraint = ();
14856
14857 fn validate(
14858 _: ::fidl_next::Slot<'_, Self>,
14859 _: Self::Constraint,
14860 ) -> Result<(), ::fidl_next::ValidationError> {
14861 Ok(())
14862 }
14863 }
14864
14865 unsafe impl ::fidl_next::Wire for ReadableReadResponse<'static> {
14866 type Narrowed<'de> = ReadableReadResponse<'de>;
14867
14868 #[inline]
14869 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14870 ::fidl_next::munge! {
14871 let Self {
14872 data,
14873
14874 } = &mut *out_;
14875 }
14876
14877 ::fidl_next::Wire::zero_padding(data);
14878 }
14879 }
14880
14881 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ReadableReadResponse<'de>
14882 where
14883 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14884 ___D: ::fidl_next::Decoder<'de>,
14885 {
14886 fn decode(
14887 slot_: ::fidl_next::Slot<'_, Self>,
14888 decoder_: &mut ___D,
14889 _: (),
14890 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14891 ::fidl_next::munge! {
14892 let Self {
14893 mut data,
14894
14895 } = slot_;
14896 }
14897
14898 let _field = data.as_mut();
14899 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
14900 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
14901
14902 let data = unsafe { data.deref_unchecked() };
14903
14904 if data.len() > 8192 {
14905 return Err(::fidl_next::DecodeError::VectorTooLong {
14906 size: data.len() as u64,
14907 limit: 8192,
14908 });
14909 }
14910
14911 Ok(())
14912 }
14913 }
14914
14915 impl<'de> ::fidl_next::IntoNatural for ReadableReadResponse<'de> {
14916 type Natural = crate::natural::ReadableReadResponse;
14917 }
14918
14919 #[derive(Debug)]
14921 #[repr(C)]
14922 pub struct WritableWriteRequest<'de> {
14923 pub data: ::fidl_next::wire::Vector<'de, u8>,
14924 }
14925
14926 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteRequest<'_>>(), 16);
14927 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteRequest<'_>>(), 8);
14928
14929 static_assertions::const_assert_eq!(std::mem::offset_of!(WritableWriteRequest<'_>, data), 0);
14930
14931 impl ::fidl_next::Constrained for WritableWriteRequest<'_> {
14932 type Constraint = ();
14933
14934 fn validate(
14935 _: ::fidl_next::Slot<'_, Self>,
14936 _: Self::Constraint,
14937 ) -> Result<(), ::fidl_next::ValidationError> {
14938 Ok(())
14939 }
14940 }
14941
14942 unsafe impl ::fidl_next::Wire for WritableWriteRequest<'static> {
14943 type Narrowed<'de> = WritableWriteRequest<'de>;
14944
14945 #[inline]
14946 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14947 ::fidl_next::munge! {
14948 let Self {
14949 data,
14950
14951 } = &mut *out_;
14952 }
14953
14954 ::fidl_next::Wire::zero_padding(data);
14955 }
14956 }
14957
14958 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for WritableWriteRequest<'de>
14959 where
14960 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14961 ___D: ::fidl_next::Decoder<'de>,
14962 {
14963 fn decode(
14964 slot_: ::fidl_next::Slot<'_, Self>,
14965 decoder_: &mut ___D,
14966 _: (),
14967 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14968 ::fidl_next::munge! {
14969 let Self {
14970 mut data,
14971
14972 } = slot_;
14973 }
14974
14975 let _field = data.as_mut();
14976 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
14977 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
14978
14979 let data = unsafe { data.deref_unchecked() };
14980
14981 if data.len() > 8192 {
14982 return Err(::fidl_next::DecodeError::VectorTooLong {
14983 size: data.len() as u64,
14984 limit: 8192,
14985 });
14986 }
14987
14988 Ok(())
14989 }
14990 }
14991
14992 impl<'de> ::fidl_next::IntoNatural for WritableWriteRequest<'de> {
14993 type Natural = crate::natural::WritableWriteRequest;
14994 }
14995
14996 #[derive(Clone, Debug)]
14998 #[repr(C)]
14999 pub struct WritableWriteResponse {
15000 pub actual_count: ::fidl_next::wire::Uint64,
15001 }
15002
15003 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteResponse>(), 8);
15004 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteResponse>(), 8);
15005
15006 static_assertions::const_assert_eq!(
15007 std::mem::offset_of!(WritableWriteResponse, actual_count),
15008 0
15009 );
15010
15011 impl ::fidl_next::Constrained for WritableWriteResponse {
15012 type Constraint = ();
15013
15014 fn validate(
15015 _: ::fidl_next::Slot<'_, Self>,
15016 _: Self::Constraint,
15017 ) -> Result<(), ::fidl_next::ValidationError> {
15018 Ok(())
15019 }
15020 }
15021
15022 unsafe impl ::fidl_next::Wire for WritableWriteResponse {
15023 type Narrowed<'de> = WritableWriteResponse;
15024
15025 #[inline]
15026 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15027 ::fidl_next::munge! {
15028 let Self {
15029 actual_count,
15030
15031 } = &mut *out_;
15032 }
15033
15034 ::fidl_next::Wire::zero_padding(actual_count);
15035 }
15036 }
15037
15038 unsafe impl<___D> ::fidl_next::Decode<___D> for WritableWriteResponse
15039 where
15040 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15041 {
15042 fn decode(
15043 slot_: ::fidl_next::Slot<'_, Self>,
15044 decoder_: &mut ___D,
15045 _: (),
15046 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15047 ::fidl_next::munge! {
15048 let Self {
15049 mut actual_count,
15050
15051 } = slot_;
15052 }
15053
15054 let _field = actual_count.as_mut();
15055
15056 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
15057
15058 Ok(())
15059 }
15060 }
15061
15062 impl ::fidl_next::IntoNatural for WritableWriteResponse {
15063 type Natural = crate::natural::WritableWriteResponse;
15064 }
15065
15066 #[derive(Clone, Debug)]
15068 #[repr(C)]
15069 pub struct FileSeekRequest {
15070 pub origin: crate::wire::SeekOrigin,
15071
15072 pub offset: ::fidl_next::wire::Int64,
15073 }
15074
15075 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekRequest>(), 16);
15076 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekRequest>(), 8);
15077
15078 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, origin), 0);
15079
15080 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, offset), 8);
15081
15082 impl ::fidl_next::Constrained for FileSeekRequest {
15083 type Constraint = ();
15084
15085 fn validate(
15086 _: ::fidl_next::Slot<'_, Self>,
15087 _: Self::Constraint,
15088 ) -> Result<(), ::fidl_next::ValidationError> {
15089 Ok(())
15090 }
15091 }
15092
15093 unsafe impl ::fidl_next::Wire for FileSeekRequest {
15094 type Narrowed<'de> = FileSeekRequest;
15095
15096 #[inline]
15097 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15098 ::fidl_next::munge! {
15099 let Self {
15100 origin,
15101 offset,
15102
15103 } = &mut *out_;
15104 }
15105
15106 ::fidl_next::Wire::zero_padding(origin);
15107
15108 ::fidl_next::Wire::zero_padding(offset);
15109
15110 unsafe {
15111 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
15112 }
15113 }
15114 }
15115
15116 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekRequest
15117 where
15118 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15119 {
15120 fn decode(
15121 slot_: ::fidl_next::Slot<'_, Self>,
15122 decoder_: &mut ___D,
15123 _: (),
15124 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15125 if slot_.as_bytes()[4..8] != [0u8; 4] {
15126 return Err(::fidl_next::DecodeError::InvalidPadding);
15127 }
15128
15129 ::fidl_next::munge! {
15130 let Self {
15131 mut origin,
15132 mut offset,
15133
15134 } = slot_;
15135 }
15136
15137 let _field = origin.as_mut();
15138
15139 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
15140
15141 let _field = offset.as_mut();
15142
15143 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
15144
15145 Ok(())
15146 }
15147 }
15148
15149 impl ::fidl_next::IntoNatural for FileSeekRequest {
15150 type Natural = crate::natural::FileSeekRequest;
15151 }
15152
15153 #[derive(Clone, Debug)]
15155 #[repr(C)]
15156 pub struct FileSeekResponse {
15157 pub offset_from_start: ::fidl_next::wire::Uint64,
15158 }
15159
15160 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekResponse>(), 8);
15161 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekResponse>(), 8);
15162
15163 static_assertions::const_assert_eq!(
15164 std::mem::offset_of!(FileSeekResponse, offset_from_start),
15165 0
15166 );
15167
15168 impl ::fidl_next::Constrained for FileSeekResponse {
15169 type Constraint = ();
15170
15171 fn validate(
15172 _: ::fidl_next::Slot<'_, Self>,
15173 _: Self::Constraint,
15174 ) -> Result<(), ::fidl_next::ValidationError> {
15175 Ok(())
15176 }
15177 }
15178
15179 unsafe impl ::fidl_next::Wire for FileSeekResponse {
15180 type Narrowed<'de> = FileSeekResponse;
15181
15182 #[inline]
15183 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15184 ::fidl_next::munge! {
15185 let Self {
15186 offset_from_start,
15187
15188 } = &mut *out_;
15189 }
15190
15191 ::fidl_next::Wire::zero_padding(offset_from_start);
15192 }
15193 }
15194
15195 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekResponse
15196 where
15197 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15198 {
15199 fn decode(
15200 slot_: ::fidl_next::Slot<'_, Self>,
15201 decoder_: &mut ___D,
15202 _: (),
15203 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15204 ::fidl_next::munge! {
15205 let Self {
15206 mut offset_from_start,
15207
15208 } = slot_;
15209 }
15210
15211 let _field = offset_from_start.as_mut();
15212
15213 ::fidl_next::Decode::decode(offset_from_start.as_mut(), decoder_, ())?;
15214
15215 Ok(())
15216 }
15217 }
15218
15219 impl ::fidl_next::IntoNatural for FileSeekResponse {
15220 type Natural = crate::natural::FileSeekResponse;
15221 }
15222
15223 #[derive(Clone, Debug)]
15225 #[repr(C)]
15226 pub struct FileReadAtRequest {
15227 pub count: ::fidl_next::wire::Uint64,
15228
15229 pub offset: ::fidl_next::wire::Uint64,
15230 }
15231
15232 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtRequest>(), 16);
15233 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtRequest>(), 8);
15234
15235 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, count), 0);
15236
15237 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, offset), 8);
15238
15239 impl ::fidl_next::Constrained for FileReadAtRequest {
15240 type Constraint = ();
15241
15242 fn validate(
15243 _: ::fidl_next::Slot<'_, Self>,
15244 _: Self::Constraint,
15245 ) -> Result<(), ::fidl_next::ValidationError> {
15246 Ok(())
15247 }
15248 }
15249
15250 unsafe impl ::fidl_next::Wire for FileReadAtRequest {
15251 type Narrowed<'de> = FileReadAtRequest;
15252
15253 #[inline]
15254 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15255 ::fidl_next::munge! {
15256 let Self {
15257 count,
15258 offset,
15259
15260 } = &mut *out_;
15261 }
15262
15263 ::fidl_next::Wire::zero_padding(count);
15264
15265 ::fidl_next::Wire::zero_padding(offset);
15266 }
15267 }
15268
15269 unsafe impl<___D> ::fidl_next::Decode<___D> for FileReadAtRequest
15270 where
15271 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15272 {
15273 fn decode(
15274 slot_: ::fidl_next::Slot<'_, Self>,
15275 decoder_: &mut ___D,
15276 _: (),
15277 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15278 ::fidl_next::munge! {
15279 let Self {
15280 mut count,
15281 mut offset,
15282
15283 } = slot_;
15284 }
15285
15286 let _field = count.as_mut();
15287
15288 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
15289
15290 let _field = offset.as_mut();
15291
15292 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
15293
15294 Ok(())
15295 }
15296 }
15297
15298 impl ::fidl_next::IntoNatural for FileReadAtRequest {
15299 type Natural = crate::natural::FileReadAtRequest;
15300 }
15301
15302 #[derive(Debug)]
15304 #[repr(C)]
15305 pub struct FileReadAtResponse<'de> {
15306 pub data: ::fidl_next::wire::Vector<'de, u8>,
15307 }
15308
15309 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtResponse<'_>>(), 16);
15310 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtResponse<'_>>(), 8);
15311
15312 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtResponse<'_>, data), 0);
15313
15314 impl ::fidl_next::Constrained for FileReadAtResponse<'_> {
15315 type Constraint = ();
15316
15317 fn validate(
15318 _: ::fidl_next::Slot<'_, Self>,
15319 _: Self::Constraint,
15320 ) -> Result<(), ::fidl_next::ValidationError> {
15321 Ok(())
15322 }
15323 }
15324
15325 unsafe impl ::fidl_next::Wire for FileReadAtResponse<'static> {
15326 type Narrowed<'de> = FileReadAtResponse<'de>;
15327
15328 #[inline]
15329 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15330 ::fidl_next::munge! {
15331 let Self {
15332 data,
15333
15334 } = &mut *out_;
15335 }
15336
15337 ::fidl_next::Wire::zero_padding(data);
15338 }
15339 }
15340
15341 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileReadAtResponse<'de>
15342 where
15343 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15344 ___D: ::fidl_next::Decoder<'de>,
15345 {
15346 fn decode(
15347 slot_: ::fidl_next::Slot<'_, Self>,
15348 decoder_: &mut ___D,
15349 _: (),
15350 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15351 ::fidl_next::munge! {
15352 let Self {
15353 mut data,
15354
15355 } = slot_;
15356 }
15357
15358 let _field = data.as_mut();
15359 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
15360 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
15361
15362 let data = unsafe { data.deref_unchecked() };
15363
15364 if data.len() > 8192 {
15365 return Err(::fidl_next::DecodeError::VectorTooLong {
15366 size: data.len() as u64,
15367 limit: 8192,
15368 });
15369 }
15370
15371 Ok(())
15372 }
15373 }
15374
15375 impl<'de> ::fidl_next::IntoNatural for FileReadAtResponse<'de> {
15376 type Natural = crate::natural::FileReadAtResponse;
15377 }
15378
15379 #[derive(Debug)]
15381 #[repr(C)]
15382 pub struct FileWriteAtRequest<'de> {
15383 pub data: ::fidl_next::wire::Vector<'de, u8>,
15384
15385 pub offset: ::fidl_next::wire::Uint64,
15386 }
15387
15388 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtRequest<'_>>(), 24);
15389 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtRequest<'_>>(), 8);
15390
15391 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, data), 0);
15392
15393 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, offset), 16);
15394
15395 impl ::fidl_next::Constrained for FileWriteAtRequest<'_> {
15396 type Constraint = ();
15397
15398 fn validate(
15399 _: ::fidl_next::Slot<'_, Self>,
15400 _: Self::Constraint,
15401 ) -> Result<(), ::fidl_next::ValidationError> {
15402 Ok(())
15403 }
15404 }
15405
15406 unsafe impl ::fidl_next::Wire for FileWriteAtRequest<'static> {
15407 type Narrowed<'de> = FileWriteAtRequest<'de>;
15408
15409 #[inline]
15410 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15411 ::fidl_next::munge! {
15412 let Self {
15413 data,
15414 offset,
15415
15416 } = &mut *out_;
15417 }
15418
15419 ::fidl_next::Wire::zero_padding(data);
15420
15421 ::fidl_next::Wire::zero_padding(offset);
15422 }
15423 }
15424
15425 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileWriteAtRequest<'de>
15426 where
15427 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15428 ___D: ::fidl_next::Decoder<'de>,
15429 {
15430 fn decode(
15431 slot_: ::fidl_next::Slot<'_, Self>,
15432 decoder_: &mut ___D,
15433 _: (),
15434 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15435 ::fidl_next::munge! {
15436 let Self {
15437 mut data,
15438 mut offset,
15439
15440 } = slot_;
15441 }
15442
15443 let _field = data.as_mut();
15444 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
15445 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
15446
15447 let data = unsafe { data.deref_unchecked() };
15448
15449 if data.len() > 8192 {
15450 return Err(::fidl_next::DecodeError::VectorTooLong {
15451 size: data.len() as u64,
15452 limit: 8192,
15453 });
15454 }
15455
15456 let _field = offset.as_mut();
15457
15458 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
15459
15460 Ok(())
15461 }
15462 }
15463
15464 impl<'de> ::fidl_next::IntoNatural for FileWriteAtRequest<'de> {
15465 type Natural = crate::natural::FileWriteAtRequest;
15466 }
15467
15468 #[derive(Clone, Debug)]
15470 #[repr(C)]
15471 pub struct FileWriteAtResponse {
15472 pub actual_count: ::fidl_next::wire::Uint64,
15473 }
15474
15475 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtResponse>(), 8);
15476 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtResponse>(), 8);
15477
15478 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtResponse, actual_count), 0);
15479
15480 impl ::fidl_next::Constrained for FileWriteAtResponse {
15481 type Constraint = ();
15482
15483 fn validate(
15484 _: ::fidl_next::Slot<'_, Self>,
15485 _: Self::Constraint,
15486 ) -> Result<(), ::fidl_next::ValidationError> {
15487 Ok(())
15488 }
15489 }
15490
15491 unsafe impl ::fidl_next::Wire for FileWriteAtResponse {
15492 type Narrowed<'de> = FileWriteAtResponse;
15493
15494 #[inline]
15495 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15496 ::fidl_next::munge! {
15497 let Self {
15498 actual_count,
15499
15500 } = &mut *out_;
15501 }
15502
15503 ::fidl_next::Wire::zero_padding(actual_count);
15504 }
15505 }
15506
15507 unsafe impl<___D> ::fidl_next::Decode<___D> for FileWriteAtResponse
15508 where
15509 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15510 {
15511 fn decode(
15512 slot_: ::fidl_next::Slot<'_, Self>,
15513 decoder_: &mut ___D,
15514 _: (),
15515 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15516 ::fidl_next::munge! {
15517 let Self {
15518 mut actual_count,
15519
15520 } = slot_;
15521 }
15522
15523 let _field = actual_count.as_mut();
15524
15525 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
15526
15527 Ok(())
15528 }
15529 }
15530
15531 impl ::fidl_next::IntoNatural for FileWriteAtResponse {
15532 type Natural = crate::natural::FileWriteAtResponse;
15533 }
15534
15535 #[derive(Clone, Debug)]
15537 #[repr(C)]
15538 pub struct FileResizeRequest {
15539 pub length: ::fidl_next::wire::Uint64,
15540 }
15541
15542 static_assertions::const_assert_eq!(std::mem::size_of::<FileResizeRequest>(), 8);
15543 static_assertions::const_assert_eq!(std::mem::align_of::<FileResizeRequest>(), 8);
15544
15545 static_assertions::const_assert_eq!(std::mem::offset_of!(FileResizeRequest, length), 0);
15546
15547 impl ::fidl_next::Constrained for FileResizeRequest {
15548 type Constraint = ();
15549
15550 fn validate(
15551 _: ::fidl_next::Slot<'_, Self>,
15552 _: Self::Constraint,
15553 ) -> Result<(), ::fidl_next::ValidationError> {
15554 Ok(())
15555 }
15556 }
15557
15558 unsafe impl ::fidl_next::Wire for FileResizeRequest {
15559 type Narrowed<'de> = FileResizeRequest;
15560
15561 #[inline]
15562 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15563 ::fidl_next::munge! {
15564 let Self {
15565 length,
15566
15567 } = &mut *out_;
15568 }
15569
15570 ::fidl_next::Wire::zero_padding(length);
15571 }
15572 }
15573
15574 unsafe impl<___D> ::fidl_next::Decode<___D> for FileResizeRequest
15575 where
15576 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15577 {
15578 fn decode(
15579 slot_: ::fidl_next::Slot<'_, Self>,
15580 decoder_: &mut ___D,
15581 _: (),
15582 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15583 ::fidl_next::munge! {
15584 let Self {
15585 mut length,
15586
15587 } = slot_;
15588 }
15589
15590 let _field = length.as_mut();
15591
15592 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
15593
15594 Ok(())
15595 }
15596 }
15597
15598 impl ::fidl_next::IntoNatural for FileResizeRequest {
15599 type Natural = crate::natural::FileResizeRequest;
15600 }
15601
15602 pub type FileResizeResponse = ::fidl_next::wire::Unit;
15604
15605 #[derive(Clone, Copy, Debug)]
15607 #[repr(transparent)]
15608 pub struct VmoFlags {
15609 pub(crate) value: ::fidl_next::wire::Uint32,
15610 }
15611
15612 impl ::fidl_next::Constrained for VmoFlags {
15613 type Constraint = ();
15614
15615 fn validate(
15616 _: ::fidl_next::Slot<'_, Self>,
15617 _: Self::Constraint,
15618 ) -> Result<(), ::fidl_next::ValidationError> {
15619 Ok(())
15620 }
15621 }
15622
15623 unsafe impl ::fidl_next::Wire for VmoFlags {
15624 type Narrowed<'de> = Self;
15625
15626 #[inline]
15627 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15628 }
15630 }
15631
15632 unsafe impl<___D> ::fidl_next::Decode<___D> for VmoFlags
15633 where
15634 ___D: ?Sized,
15635 {
15636 fn decode(
15637 slot: ::fidl_next::Slot<'_, Self>,
15638 _: &mut ___D,
15639 _: (),
15640 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15641 ::fidl_next::munge!(let Self { value } = slot);
15642 let set = u32::from(*value);
15643 if set & !crate::natural::VmoFlags::all().bits() != 0 {
15644 return Err(::fidl_next::DecodeError::InvalidBits {
15645 expected: crate::natural::VmoFlags::all().bits() as usize,
15646 actual: set as usize,
15647 });
15648 }
15649
15650 Ok(())
15651 }
15652 }
15653
15654 impl ::core::convert::From<crate::natural::VmoFlags> for VmoFlags {
15655 fn from(natural: crate::natural::VmoFlags) -> Self {
15656 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
15657 }
15658 }
15659
15660 impl ::fidl_next::IntoNatural for VmoFlags {
15661 type Natural = crate::natural::VmoFlags;
15662 }
15663
15664 #[derive(Clone, Debug)]
15666 #[repr(C)]
15667 pub struct FileGetBackingMemoryRequest {
15668 pub flags: crate::wire::VmoFlags,
15669 }
15670
15671 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryRequest>(), 4);
15672 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryRequest>(), 4);
15673
15674 static_assertions::const_assert_eq!(
15675 std::mem::offset_of!(FileGetBackingMemoryRequest, flags),
15676 0
15677 );
15678
15679 impl ::fidl_next::Constrained for FileGetBackingMemoryRequest {
15680 type Constraint = ();
15681
15682 fn validate(
15683 _: ::fidl_next::Slot<'_, Self>,
15684 _: Self::Constraint,
15685 ) -> Result<(), ::fidl_next::ValidationError> {
15686 Ok(())
15687 }
15688 }
15689
15690 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryRequest {
15691 type Narrowed<'de> = FileGetBackingMemoryRequest;
15692
15693 #[inline]
15694 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15695 ::fidl_next::munge! {
15696 let Self {
15697 flags,
15698
15699 } = &mut *out_;
15700 }
15701
15702 ::fidl_next::Wire::zero_padding(flags);
15703 }
15704 }
15705
15706 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryRequest
15707 where
15708 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15709 {
15710 fn decode(
15711 slot_: ::fidl_next::Slot<'_, Self>,
15712 decoder_: &mut ___D,
15713 _: (),
15714 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15715 ::fidl_next::munge! {
15716 let Self {
15717 mut flags,
15718
15719 } = slot_;
15720 }
15721
15722 let _field = flags.as_mut();
15723
15724 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
15725
15726 Ok(())
15727 }
15728 }
15729
15730 impl ::fidl_next::IntoNatural for FileGetBackingMemoryRequest {
15731 type Natural = crate::natural::FileGetBackingMemoryRequest;
15732 }
15733
15734 pub type LinkableLinkIntoResponse = ::fidl_next::wire::Unit;
15736
15737 pub type FileAllocateResponse = ::fidl_next::wire::Unit;
15739
15740 pub type FileEnableVerityResponse = ::fidl_next::wire::Unit;
15742
15743 #[derive(Clone, Copy, Debug)]
15745 #[repr(transparent)]
15746 pub struct FileSignal {
15747 pub(crate) value: ::fidl_next::wire::Uint32,
15748 }
15749
15750 impl ::fidl_next::Constrained for FileSignal {
15751 type Constraint = ();
15752
15753 fn validate(
15754 _: ::fidl_next::Slot<'_, Self>,
15755 _: Self::Constraint,
15756 ) -> Result<(), ::fidl_next::ValidationError> {
15757 Ok(())
15758 }
15759 }
15760
15761 unsafe impl ::fidl_next::Wire for FileSignal {
15762 type Narrowed<'de> = Self;
15763
15764 #[inline]
15765 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15766 }
15768 }
15769
15770 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSignal
15771 where
15772 ___D: ?Sized,
15773 {
15774 fn decode(
15775 slot: ::fidl_next::Slot<'_, Self>,
15776 _: &mut ___D,
15777 _: (),
15778 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15779 ::fidl_next::munge!(let Self { value } = slot);
15780 let set = u32::from(*value);
15781 if set & !crate::natural::FileSignal::all().bits() != 0 {
15782 return Err(::fidl_next::DecodeError::InvalidBits {
15783 expected: crate::natural::FileSignal::all().bits() as usize,
15784 actual: set as usize,
15785 });
15786 }
15787
15788 Ok(())
15789 }
15790 }
15791
15792 impl ::core::convert::From<crate::natural::FileSignal> for FileSignal {
15793 fn from(natural: crate::natural::FileSignal) -> Self {
15794 Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
15795 }
15796 }
15797
15798 impl ::fidl_next::IntoNatural for FileSignal {
15799 type Natural = crate::natural::FileSignal;
15800 }
15801
15802 #[derive(Clone, Debug)]
15804 #[repr(C)]
15805 pub struct FilesystemInfo {
15806 pub total_bytes: ::fidl_next::wire::Uint64,
15807
15808 pub used_bytes: ::fidl_next::wire::Uint64,
15809
15810 pub total_nodes: ::fidl_next::wire::Uint64,
15811
15812 pub used_nodes: ::fidl_next::wire::Uint64,
15813
15814 pub free_shared_pool_bytes: ::fidl_next::wire::Uint64,
15815
15816 pub fs_id: ::fidl_next::wire::Uint64,
15817
15818 pub block_size: ::fidl_next::wire::Uint32,
15819
15820 pub max_filename_size: ::fidl_next::wire::Uint32,
15821
15822 pub fs_type: ::fidl_next::wire::Uint32,
15823
15824 pub padding: ::fidl_next::wire::Uint32,
15825
15826 pub name: [i8; 32],
15827 }
15828
15829 static_assertions::const_assert_eq!(std::mem::size_of::<FilesystemInfo>(), 96);
15830 static_assertions::const_assert_eq!(std::mem::align_of::<FilesystemInfo>(), 8);
15831
15832 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_bytes), 0);
15833
15834 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_bytes), 8);
15835
15836 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_nodes), 16);
15837
15838 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_nodes), 24);
15839
15840 static_assertions::const_assert_eq!(
15841 std::mem::offset_of!(FilesystemInfo, free_shared_pool_bytes),
15842 32
15843 );
15844
15845 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_id), 40);
15846
15847 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, block_size), 48);
15848
15849 static_assertions::const_assert_eq!(
15850 std::mem::offset_of!(FilesystemInfo, max_filename_size),
15851 52
15852 );
15853
15854 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_type), 56);
15855
15856 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, padding), 60);
15857
15858 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, name), 64);
15859
15860 impl ::fidl_next::Constrained for FilesystemInfo {
15861 type Constraint = ();
15862
15863 fn validate(
15864 _: ::fidl_next::Slot<'_, Self>,
15865 _: Self::Constraint,
15866 ) -> Result<(), ::fidl_next::ValidationError> {
15867 Ok(())
15868 }
15869 }
15870
15871 unsafe impl ::fidl_next::Wire for FilesystemInfo {
15872 type Narrowed<'de> = FilesystemInfo;
15873
15874 #[inline]
15875 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15876 ::fidl_next::munge! {
15877 let Self {
15878 total_bytes,
15879 used_bytes,
15880 total_nodes,
15881 used_nodes,
15882 free_shared_pool_bytes,
15883 fs_id,
15884 block_size,
15885 max_filename_size,
15886 fs_type,
15887 padding,
15888 name,
15889
15890 } = &mut *out_;
15891 }
15892
15893 ::fidl_next::Wire::zero_padding(total_bytes);
15894
15895 ::fidl_next::Wire::zero_padding(used_bytes);
15896
15897 ::fidl_next::Wire::zero_padding(total_nodes);
15898
15899 ::fidl_next::Wire::zero_padding(used_nodes);
15900
15901 ::fidl_next::Wire::zero_padding(free_shared_pool_bytes);
15902
15903 ::fidl_next::Wire::zero_padding(fs_id);
15904
15905 ::fidl_next::Wire::zero_padding(block_size);
15906
15907 ::fidl_next::Wire::zero_padding(max_filename_size);
15908
15909 ::fidl_next::Wire::zero_padding(fs_type);
15910
15911 ::fidl_next::Wire::zero_padding(padding);
15912
15913 ::fidl_next::Wire::zero_padding(name);
15914 }
15915 }
15916
15917 unsafe impl<___D> ::fidl_next::Decode<___D> for FilesystemInfo
15918 where
15919 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15920 {
15921 fn decode(
15922 slot_: ::fidl_next::Slot<'_, Self>,
15923 decoder_: &mut ___D,
15924 _: (),
15925 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15926 ::fidl_next::munge! {
15927 let Self {
15928 mut total_bytes,
15929 mut used_bytes,
15930 mut total_nodes,
15931 mut used_nodes,
15932 mut free_shared_pool_bytes,
15933 mut fs_id,
15934 mut block_size,
15935 mut max_filename_size,
15936 mut fs_type,
15937 mut padding,
15938 mut name,
15939
15940 } = slot_;
15941 }
15942
15943 let _field = total_bytes.as_mut();
15944
15945 ::fidl_next::Decode::decode(total_bytes.as_mut(), decoder_, ())?;
15946
15947 let _field = used_bytes.as_mut();
15948
15949 ::fidl_next::Decode::decode(used_bytes.as_mut(), decoder_, ())?;
15950
15951 let _field = total_nodes.as_mut();
15952
15953 ::fidl_next::Decode::decode(total_nodes.as_mut(), decoder_, ())?;
15954
15955 let _field = used_nodes.as_mut();
15956
15957 ::fidl_next::Decode::decode(used_nodes.as_mut(), decoder_, ())?;
15958
15959 let _field = free_shared_pool_bytes.as_mut();
15960
15961 ::fidl_next::Decode::decode(free_shared_pool_bytes.as_mut(), decoder_, ())?;
15962
15963 let _field = fs_id.as_mut();
15964
15965 ::fidl_next::Decode::decode(fs_id.as_mut(), decoder_, ())?;
15966
15967 let _field = block_size.as_mut();
15968
15969 ::fidl_next::Decode::decode(block_size.as_mut(), decoder_, ())?;
15970
15971 let _field = max_filename_size.as_mut();
15972
15973 ::fidl_next::Decode::decode(max_filename_size.as_mut(), decoder_, ())?;
15974
15975 let _field = fs_type.as_mut();
15976
15977 ::fidl_next::Decode::decode(fs_type.as_mut(), decoder_, ())?;
15978
15979 let _field = padding.as_mut();
15980
15981 ::fidl_next::Decode::decode(padding.as_mut(), decoder_, ())?;
15982
15983 let _field = name.as_mut();
15984
15985 ::fidl_next::Decode::decode(name.as_mut(), decoder_, ())?;
15986
15987 Ok(())
15988 }
15989 }
15990
15991 impl ::fidl_next::IntoNatural for FilesystemInfo {
15992 type Natural = crate::natural::FilesystemInfo;
15993 }
15994
15995 pub type Service = ::fidl_next::wire::Unit;
15997
15998 #[derive(Debug)]
16000 #[repr(C)]
16001 pub struct SymlinkObject<'de> {
16002 pub target: ::fidl_next::wire::Vector<'de, u8>,
16003 }
16004
16005 static_assertions::const_assert_eq!(std::mem::size_of::<SymlinkObject<'_>>(), 16);
16006 static_assertions::const_assert_eq!(std::mem::align_of::<SymlinkObject<'_>>(), 8);
16007
16008 static_assertions::const_assert_eq!(std::mem::offset_of!(SymlinkObject<'_>, target), 0);
16009
16010 impl ::fidl_next::Constrained for SymlinkObject<'_> {
16011 type Constraint = ();
16012
16013 fn validate(
16014 _: ::fidl_next::Slot<'_, Self>,
16015 _: Self::Constraint,
16016 ) -> Result<(), ::fidl_next::ValidationError> {
16017 Ok(())
16018 }
16019 }
16020
16021 unsafe impl ::fidl_next::Wire for SymlinkObject<'static> {
16022 type Narrowed<'de> = SymlinkObject<'de>;
16023
16024 #[inline]
16025 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16026 ::fidl_next::munge! {
16027 let Self {
16028 target,
16029
16030 } = &mut *out_;
16031 }
16032
16033 ::fidl_next::Wire::zero_padding(target);
16034 }
16035 }
16036
16037 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SymlinkObject<'de>
16038 where
16039 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16040 ___D: ::fidl_next::Decoder<'de>,
16041 {
16042 fn decode(
16043 slot_: ::fidl_next::Slot<'_, Self>,
16044 decoder_: &mut ___D,
16045 _: (),
16046 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16047 ::fidl_next::munge! {
16048 let Self {
16049 mut target,
16050
16051 } = slot_;
16052 }
16053
16054 let _field = target.as_mut();
16055 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
16056 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
16057
16058 let target = unsafe { target.deref_unchecked() };
16059
16060 if target.len() > 4095 {
16061 return Err(::fidl_next::DecodeError::VectorTooLong {
16062 size: target.len() as u64,
16063 limit: 4095,
16064 });
16065 }
16066
16067 Ok(())
16068 }
16069 }
16070
16071 impl<'de> ::fidl_next::IntoNatural for SymlinkObject<'de> {
16072 type Natural = crate::natural::SymlinkObject;
16073 }
16074
16075 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
16077 #[repr(transparent)]
16078 pub struct WatchEvent {
16079 pub(crate) value: u8,
16080 }
16081
16082 impl ::fidl_next::Constrained for WatchEvent {
16083 type Constraint = ();
16084
16085 fn validate(
16086 _: ::fidl_next::Slot<'_, Self>,
16087 _: Self::Constraint,
16088 ) -> Result<(), ::fidl_next::ValidationError> {
16089 Ok(())
16090 }
16091 }
16092
16093 unsafe impl ::fidl_next::Wire for WatchEvent {
16094 type Narrowed<'de> = Self;
16095
16096 #[inline]
16097 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
16098 }
16100 }
16101
16102 impl WatchEvent {
16103 pub const DELETED: WatchEvent = WatchEvent { value: 0 };
16104
16105 pub const ADDED: WatchEvent = WatchEvent { value: 1 };
16106
16107 pub const REMOVED: WatchEvent = WatchEvent { value: 2 };
16108
16109 pub const EXISTING: WatchEvent = WatchEvent { value: 3 };
16110
16111 pub const IDLE: WatchEvent = WatchEvent { value: 4 };
16112 }
16113
16114 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchEvent
16115 where
16116 ___D: ?Sized,
16117 {
16118 fn decode(
16119 slot: ::fidl_next::Slot<'_, Self>,
16120 _: &mut ___D,
16121 _: (),
16122 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16123 ::fidl_next::munge!(let Self { value } = slot);
16124
16125 match u8::from(*value) {
16126 0 | 1 | 2 | 3 | 4 => (),
16127 unknown => {
16128 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
16129 }
16130 }
16131
16132 Ok(())
16133 }
16134 }
16135
16136 impl ::core::convert::From<crate::natural::WatchEvent> for WatchEvent {
16137 fn from(natural: crate::natural::WatchEvent) -> Self {
16138 match natural {
16139 crate::natural::WatchEvent::Deleted => WatchEvent::DELETED,
16140
16141 crate::natural::WatchEvent::Added => WatchEvent::ADDED,
16142
16143 crate::natural::WatchEvent::Removed => WatchEvent::REMOVED,
16144
16145 crate::natural::WatchEvent::Existing => WatchEvent::EXISTING,
16146
16147 crate::natural::WatchEvent::Idle => WatchEvent::IDLE,
16148 }
16149 }
16150 }
16151
16152 impl ::fidl_next::IntoNatural for WatchEvent {
16153 type Natural = crate::natural::WatchEvent;
16154 }
16155}
16156
16157pub mod wire_optional {
16158
16159 #[repr(transparent)]
16160 pub struct SelinuxContext<'de> {
16161 pub(crate) raw: ::fidl_next::wire::Union,
16162 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
16163 }
16164
16165 impl ::fidl_next::Constrained for SelinuxContext<'_> {
16166 type Constraint = ();
16167
16168 fn validate(
16169 _: ::fidl_next::Slot<'_, Self>,
16170 _: Self::Constraint,
16171 ) -> Result<(), ::fidl_next::ValidationError> {
16172 Ok(())
16173 }
16174 }
16175
16176 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
16177 type Narrowed<'de> = SelinuxContext<'de>;
16178
16179 #[inline]
16180 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16181 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
16182 ::fidl_next::wire::Union::zero_padding(raw);
16183 }
16184 }
16185
16186 impl<'de> SelinuxContext<'de> {
16187 pub fn is_some(&self) -> bool {
16188 self.raw.is_some()
16189 }
16190
16191 pub fn is_none(&self) -> bool {
16192 self.raw.is_none()
16193 }
16194
16195 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
16196 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
16197 }
16198
16199 pub fn into_option(self) -> ::core::option::Option<crate::wire::SelinuxContext<'de>> {
16200 if self.is_some() {
16201 Some(crate::wire::SelinuxContext {
16202 raw: self.raw,
16203 _phantom: ::core::marker::PhantomData,
16204 })
16205 } else {
16206 None
16207 }
16208 }
16209 }
16210
16211 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SelinuxContext<'de>
16212 where
16213 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16214 ___D: ::fidl_next::Decoder<'de>,
16215 {
16216 fn decode(
16217 mut slot: ::fidl_next::Slot<'_, Self>,
16218 decoder: &mut ___D,
16219 _: (),
16220 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16221 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
16222 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
16223 1 => {
16224 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
16225 raw,
16226 decoder,
16227 (256, ()),
16228 )?
16229 }
16230
16231 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::EmptyStruct>(
16232 raw,
16233 decoder,
16234 (),
16235 )?,
16236
16237 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
16238 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
16239 }
16240
16241 Ok(())
16242 }
16243 }
16244
16245 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
16246 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
16247 self.as_ref().fmt(f)
16248 }
16249 }
16250
16251 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
16252 type Natural = ::core::option::Option<crate::natural::SelinuxContext>;
16253 }
16254}
16255
16256pub mod generic {
16257
16258 pub struct AdvisoryLockRange<T0, T1, T2> {
16260 pub origin: T0,
16261
16262 pub offset: T1,
16263
16264 pub length: T2,
16265 }
16266
16267 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
16268 for AdvisoryLockRange<T0, T1, T2>
16269 where
16270 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16271 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
16272 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
16273 T2: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
16274 {
16275 #[inline]
16276 fn encode(
16277 self,
16278 encoder_: &mut ___E,
16279 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
16280 _: (),
16281 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16282 ::fidl_next::munge! {
16283 let crate::wire::AdvisoryLockRange {
16284 origin,
16285 offset,
16286 length,
16287
16288 } = out_;
16289 }
16290
16291 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
16292
16293 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
16294
16295 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
16296
16297 Ok(())
16298 }
16299 }
16300
16301 pub struct AdvisoryLockingAdvisoryLockRequest<T0> {
16303 pub request: T0,
16304 }
16305
16306 unsafe impl<___E, T0>
16307 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
16308 for AdvisoryLockingAdvisoryLockRequest<T0>
16309 where
16310 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16311 ___E: ::fidl_next::Encoder,
16312 T0: ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>,
16313 {
16314 #[inline]
16315 fn encode(
16316 self,
16317 encoder_: &mut ___E,
16318 out_: &mut ::core::mem::MaybeUninit<
16319 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
16320 >,
16321 _: (),
16322 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16323 ::fidl_next::munge! {
16324 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
16325 request,
16326
16327 } = out_;
16328 }
16329
16330 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
16331
16332 Ok(())
16333 }
16334 }
16335
16336 pub type AdvisoryLockingAdvisoryLockResponse = ();
16338
16339 pub struct NodeAttributes<T0, T1, T2, T3, T4, T5, T6> {
16341 pub mode: T0,
16342
16343 pub id: T1,
16344
16345 pub content_size: T2,
16346
16347 pub storage_size: T3,
16348
16349 pub link_count: T4,
16350
16351 pub creation_time: T5,
16352
16353 pub modification_time: T6,
16354 }
16355
16356 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
16357 ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>
16358 for NodeAttributes<T0, T1, T2, T3, T4, T5, T6>
16359 where
16360 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16361 T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
16362 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16363 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16364 T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16365 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16366 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16367 T6: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16368 {
16369 #[inline]
16370 fn encode(
16371 self,
16372 encoder_: &mut ___E,
16373 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
16374 _: (),
16375 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16376 ::fidl_next::munge! {
16377 let crate::wire::NodeAttributes {
16378 mode,
16379 id,
16380 content_size,
16381 storage_size,
16382 link_count,
16383 creation_time,
16384 modification_time,
16385
16386 } = out_;
16387 }
16388
16389 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
16390
16391 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
16392
16393 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
16394
16395 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
16396
16397 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
16398
16399 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
16400
16401 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
16402
16403 Ok(())
16404 }
16405 }
16406
16407 pub struct NodeQueryFilesystemResponse<T0, T1> {
16409 pub s: T0,
16410
16411 pub info: T1,
16412 }
16413
16414 unsafe impl<___E, T0, T1>
16415 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
16416 for NodeQueryFilesystemResponse<T0, T1>
16417 where
16418 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16419 ___E: ::fidl_next::Encoder,
16420 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16421 T1: ::fidl_next::Encode<::fidl_next::wire::Box<'static, crate::wire::FilesystemInfo>, ___E>,
16422 {
16423 #[inline]
16424 fn encode(
16425 self,
16426 encoder_: &mut ___E,
16427 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
16428 _: (),
16429 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16430 ::fidl_next::munge! {
16431 let crate::wire::NodeQueryFilesystemResponse {
16432 s,
16433 info,
16434
16435 } = out_;
16436 }
16437
16438 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16439
16440 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
16441
16442 Ok(())
16443 }
16444 }
16445
16446 pub type NodeUpdateAttributesResponse = ();
16448
16449 pub type NodeSyncResponse = ();
16451
16452 pub struct DirectoryReadDirentsRequest<T0> {
16454 pub max_bytes: T0,
16455 }
16456
16457 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
16458 for DirectoryReadDirentsRequest<T0>
16459 where
16460 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16461 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
16462 {
16463 #[inline]
16464 fn encode(
16465 self,
16466 encoder_: &mut ___E,
16467 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
16468 _: (),
16469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16470 ::fidl_next::munge! {
16471 let crate::wire::DirectoryReadDirentsRequest {
16472 max_bytes,
16473
16474 } = out_;
16475 }
16476
16477 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
16478
16479 Ok(())
16480 }
16481 }
16482
16483 pub struct DirectoryReadDirentsResponse<T0, T1> {
16485 pub s: T0,
16486
16487 pub dirents: T1,
16488 }
16489
16490 unsafe impl<___E, T0, T1>
16491 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
16492 for DirectoryReadDirentsResponse<T0, T1>
16493 where
16494 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16495 ___E: ::fidl_next::Encoder,
16496 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16497 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16498 {
16499 #[inline]
16500 fn encode(
16501 self,
16502 encoder_: &mut ___E,
16503 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
16504 _: (),
16505 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16506 ::fidl_next::munge! {
16507 let crate::wire::DirectoryReadDirentsResponse {
16508 s,
16509 dirents,
16510
16511 } = out_;
16512 }
16513
16514 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16515
16516 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
16517
16518 Ok(())
16519 }
16520 }
16521
16522 pub struct DirectoryRewindResponse<T0> {
16524 pub s: T0,
16525 }
16526
16527 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
16528 for DirectoryRewindResponse<T0>
16529 where
16530 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16531 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16532 {
16533 #[inline]
16534 fn encode(
16535 self,
16536 encoder_: &mut ___E,
16537 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
16538 _: (),
16539 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16540 ::fidl_next::munge! {
16541 let crate::wire::DirectoryRewindResponse {
16542 s,
16543
16544 } = out_;
16545 }
16546
16547 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16548
16549 Ok(())
16550 }
16551 }
16552
16553 pub struct DirectoryLinkResponse<T0> {
16555 pub s: T0,
16556 }
16557
16558 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
16559 for DirectoryLinkResponse<T0>
16560 where
16561 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16562 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16563 {
16564 #[inline]
16565 fn encode(
16566 self,
16567 encoder_: &mut ___E,
16568 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
16569 _: (),
16570 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16571 ::fidl_next::munge! {
16572 let crate::wire::DirectoryLinkResponse {
16573 s,
16574
16575 } = out_;
16576 }
16577
16578 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16579
16580 Ok(())
16581 }
16582 }
16583
16584 pub struct DirectoryUnlinkRequest<T0, T1> {
16586 pub name: T0,
16587
16588 pub options: T1,
16589 }
16590
16591 unsafe impl<___E, T0, T1>
16592 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
16593 for DirectoryUnlinkRequest<T0, T1>
16594 where
16595 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16596 ___E: ::fidl_next::Encoder,
16597 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
16598 T1: ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>,
16599 {
16600 #[inline]
16601 fn encode(
16602 self,
16603 encoder_: &mut ___E,
16604 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
16605 _: (),
16606 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16607 ::fidl_next::munge! {
16608 let crate::wire::DirectoryUnlinkRequest {
16609 name,
16610 options,
16611
16612 } = out_;
16613 }
16614
16615 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
16616
16617 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
16618
16619 Ok(())
16620 }
16621 }
16622
16623 pub type DirectoryUnlinkResponse = ();
16625
16626 pub type DirectoryRenameResponse = ();
16628
16629 pub struct DirectoryWatchResponse<T0> {
16631 pub s: T0,
16632 }
16633
16634 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
16635 for DirectoryWatchResponse<T0>
16636 where
16637 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16638 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16639 {
16640 #[inline]
16641 fn encode(
16642 self,
16643 encoder_: &mut ___E,
16644 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
16645 _: (),
16646 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16647 ::fidl_next::munge! {
16648 let crate::wire::DirectoryWatchResponse {
16649 s,
16650
16651 } = out_;
16652 }
16653
16654 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16655
16656 Ok(())
16657 }
16658 }
16659
16660 pub struct NodeGetExtendedAttributeRequest<T0> {
16662 pub name: T0,
16663 }
16664
16665 unsafe impl<___E, T0>
16666 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
16667 for NodeGetExtendedAttributeRequest<T0>
16668 where
16669 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16670 ___E: ::fidl_next::Encoder,
16671 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16672 {
16673 #[inline]
16674 fn encode(
16675 self,
16676 encoder_: &mut ___E,
16677 out_: &mut ::core::mem::MaybeUninit<
16678 crate::wire::NodeGetExtendedAttributeRequest<'static>,
16679 >,
16680 _: (),
16681 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16682 ::fidl_next::munge! {
16683 let crate::wire::NodeGetExtendedAttributeRequest {
16684 name,
16685
16686 } = out_;
16687 }
16688
16689 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
16690
16691 Ok(())
16692 }
16693 }
16694
16695 pub type NodeSetExtendedAttributeResponse = ();
16697
16698 pub struct NodeRemoveExtendedAttributeRequest<T0> {
16700 pub name: T0,
16701 }
16702
16703 unsafe impl<___E, T0>
16704 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
16705 for NodeRemoveExtendedAttributeRequest<T0>
16706 where
16707 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16708 ___E: ::fidl_next::Encoder,
16709 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
16710 {
16711 #[inline]
16712 fn encode(
16713 self,
16714 encoder_: &mut ___E,
16715 out_: &mut ::core::mem::MaybeUninit<
16716 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
16717 >,
16718 _: (),
16719 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16720 ::fidl_next::munge! {
16721 let crate::wire::NodeRemoveExtendedAttributeRequest {
16722 name,
16723
16724 } = out_;
16725 }
16726
16727 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
16728
16729 Ok(())
16730 }
16731 }
16732
16733 pub type NodeRemoveExtendedAttributeResponse = ();
16735
16736 pub type DirectoryCreateSymlinkResponse = ();
16738
16739 pub type NodeSetFlagsResponse = ();
16741
16742 pub struct NodeDeprecatedGetAttrResponse<T0, T1> {
16744 pub s: T0,
16745
16746 pub attributes: T1,
16747 }
16748
16749 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
16750 for NodeDeprecatedGetAttrResponse<T0, T1>
16751 where
16752 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16753 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16754 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
16755 {
16756 #[inline]
16757 fn encode(
16758 self,
16759 encoder_: &mut ___E,
16760 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
16761 _: (),
16762 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16763 ::fidl_next::munge! {
16764 let crate::wire::NodeDeprecatedGetAttrResponse {
16765 s,
16766 attributes,
16767
16768 } = out_;
16769 }
16770
16771 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16772
16773 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
16774
16775 Ok(())
16776 }
16777 }
16778
16779 pub struct NodeDeprecatedSetAttrRequest<T0, T1> {
16781 pub flags: T0,
16782
16783 pub attributes: T1,
16784 }
16785
16786 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
16787 for NodeDeprecatedSetAttrRequest<T0, T1>
16788 where
16789 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16790 T0: ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>,
16791 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
16792 {
16793 #[inline]
16794 fn encode(
16795 self,
16796 encoder_: &mut ___E,
16797 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
16798 _: (),
16799 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16800 ::fidl_next::munge! {
16801 let crate::wire::NodeDeprecatedSetAttrRequest {
16802 flags,
16803 attributes,
16804
16805 } = out_;
16806 }
16807
16808 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16809
16810 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
16811
16812 Ok(())
16813 }
16814 }
16815
16816 pub struct NodeDeprecatedSetAttrResponse<T0> {
16818 pub s: T0,
16819 }
16820
16821 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
16822 for NodeDeprecatedSetAttrResponse<T0>
16823 where
16824 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16825 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16826 {
16827 #[inline]
16828 fn encode(
16829 self,
16830 encoder_: &mut ___E,
16831 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
16832 _: (),
16833 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16834 ::fidl_next::munge! {
16835 let crate::wire::NodeDeprecatedSetAttrResponse {
16836 s,
16837
16838 } = out_;
16839 }
16840
16841 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16842
16843 Ok(())
16844 }
16845 }
16846
16847 pub struct NodeDeprecatedGetFlagsResponse<T0, T1> {
16849 pub s: T0,
16850
16851 pub flags: T1,
16852 }
16853
16854 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
16855 for NodeDeprecatedGetFlagsResponse<T0, T1>
16856 where
16857 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16858 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16859 T1: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
16860 {
16861 #[inline]
16862 fn encode(
16863 self,
16864 encoder_: &mut ___E,
16865 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
16866 _: (),
16867 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16868 ::fidl_next::munge! {
16869 let crate::wire::NodeDeprecatedGetFlagsResponse {
16870 s,
16871 flags,
16872
16873 } = out_;
16874 }
16875
16876 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16877
16878 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16879
16880 Ok(())
16881 }
16882 }
16883
16884 pub struct NodeDeprecatedSetFlagsRequest<T0> {
16886 pub flags: T0,
16887 }
16888
16889 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
16890 for NodeDeprecatedSetFlagsRequest<T0>
16891 where
16892 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16893 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
16894 {
16895 #[inline]
16896 fn encode(
16897 self,
16898 encoder_: &mut ___E,
16899 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
16900 _: (),
16901 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16902 ::fidl_next::munge! {
16903 let crate::wire::NodeDeprecatedSetFlagsRequest {
16904 flags,
16905
16906 } = out_;
16907 }
16908
16909 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16910
16911 Ok(())
16912 }
16913 }
16914
16915 pub struct NodeDeprecatedSetFlagsResponse<T0> {
16917 pub s: T0,
16918 }
16919
16920 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
16921 for NodeDeprecatedSetFlagsResponse<T0>
16922 where
16923 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16924 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
16925 {
16926 #[inline]
16927 fn encode(
16928 self,
16929 encoder_: &mut ___E,
16930 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
16931 _: (),
16932 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16933 ::fidl_next::munge! {
16934 let crate::wire::NodeDeprecatedSetFlagsResponse {
16935 s,
16936
16937 } = out_;
16938 }
16939
16940 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
16941
16942 Ok(())
16943 }
16944 }
16945
16946 pub struct NodeGetFlagsResponse<T0> {
16948 pub flags: T0,
16949 }
16950
16951 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
16952 for NodeGetFlagsResponse<T0>
16953 where
16954 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16955 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
16956 {
16957 #[inline]
16958 fn encode(
16959 self,
16960 encoder_: &mut ___E,
16961 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
16962 _: (),
16963 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16964 ::fidl_next::munge! {
16965 let crate::wire::NodeGetFlagsResponse {
16966 flags,
16967
16968 } = out_;
16969 }
16970
16971 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
16972
16973 Ok(())
16974 }
16975 }
16976
16977 pub struct NodeSetFlagsRequest<T0> {
16979 pub flags: T0,
16980 }
16981
16982 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
16983 for NodeSetFlagsRequest<T0>
16984 where
16985 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16986 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
16987 {
16988 #[inline]
16989 fn encode(
16990 self,
16991 encoder_: &mut ___E,
16992 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
16993 _: (),
16994 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
16995 ::fidl_next::munge! {
16996 let crate::wire::NodeSetFlagsRequest {
16997 flags,
16998
16999 } = out_;
17000 }
17001
17002 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
17003
17004 Ok(())
17005 }
17006 }
17007
17008 pub type EmptyStruct = ();
17010
17011 pub struct NodeAttributes2<T0, T1> {
17013 pub mutable_attributes: T0,
17014
17015 pub immutable_attributes: T1,
17016 }
17017
17018 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
17019 for NodeAttributes2<T0, T1>
17020 where
17021 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17022 ___E: ::fidl_next::Encoder,
17023 T0: ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>,
17024 T1: ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>,
17025 {
17026 #[inline]
17027 fn encode(
17028 self,
17029 encoder_: &mut ___E,
17030 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
17031 _: (),
17032 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17033 ::fidl_next::munge! {
17034 let crate::wire::NodeAttributes2 {
17035 mutable_attributes,
17036 immutable_attributes,
17037
17038 } = out_;
17039 }
17040
17041 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
17042
17043 ::fidl_next::Encode::encode(
17044 self.immutable_attributes,
17045 encoder_,
17046 immutable_attributes,
17047 (),
17048 )?;
17049
17050 Ok(())
17051 }
17052 }
17053
17054 pub struct NodeGetAttributesRequest<T0> {
17056 pub query: T0,
17057 }
17058
17059 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
17060 for NodeGetAttributesRequest<T0>
17061 where
17062 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17063 T0: ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>,
17064 {
17065 #[inline]
17066 fn encode(
17067 self,
17068 encoder_: &mut ___E,
17069 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
17070 _: (),
17071 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17072 ::fidl_next::munge! {
17073 let crate::wire::NodeGetAttributesRequest {
17074 query,
17075
17076 } = out_;
17077 }
17078
17079 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
17080
17081 Ok(())
17082 }
17083 }
17084
17085 pub type DirectoryObject = ();
17087
17088 pub struct ExtendedAttributeIteratorGetNextResponse<T0, T1> {
17090 pub attributes: T0,
17091
17092 pub last: T1,
17093 }
17094
17095 unsafe impl<___E, T0, T1>
17096 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
17097 for ExtendedAttributeIteratorGetNextResponse<T0, T1>
17098 where
17099 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17100 ___E: ::fidl_next::Encoder,
17101 T0: ::fidl_next::Encode<
17102 ::fidl_next::wire::Vector<'static, ::fidl_next::wire::Vector<'static, u8>>,
17103 ___E,
17104 >,
17105 T1: ::fidl_next::Encode<bool, ___E>,
17106 {
17107 #[inline]
17108 fn encode(
17109 self,
17110 encoder_: &mut ___E,
17111 out_: &mut ::core::mem::MaybeUninit<
17112 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
17113 >,
17114 _: (),
17115 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17116 ::fidl_next::munge! {
17117 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
17118 attributes,
17119 last,
17120
17121 } = out_;
17122 }
17123
17124 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
17125
17126 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
17127
17128 Ok(())
17129 }
17130 }
17131
17132 pub struct ReadableReadRequest<T0> {
17134 pub count: T0,
17135 }
17136
17137 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
17138 for ReadableReadRequest<T0>
17139 where
17140 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17141 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17142 {
17143 #[inline]
17144 fn encode(
17145 self,
17146 encoder_: &mut ___E,
17147 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
17148 _: (),
17149 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17150 ::fidl_next::munge! {
17151 let crate::wire::ReadableReadRequest {
17152 count,
17153
17154 } = out_;
17155 }
17156
17157 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
17158
17159 Ok(())
17160 }
17161 }
17162
17163 pub struct ReadableReadResponse<T0> {
17165 pub data: T0,
17166 }
17167
17168 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
17169 for ReadableReadResponse<T0>
17170 where
17171 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17172 ___E: ::fidl_next::Encoder,
17173 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17174 {
17175 #[inline]
17176 fn encode(
17177 self,
17178 encoder_: &mut ___E,
17179 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
17180 _: (),
17181 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17182 ::fidl_next::munge! {
17183 let crate::wire::ReadableReadResponse {
17184 data,
17185
17186 } = out_;
17187 }
17188
17189 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17190
17191 Ok(())
17192 }
17193 }
17194
17195 pub struct WritableWriteRequest<T0> {
17197 pub data: T0,
17198 }
17199
17200 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
17201 for WritableWriteRequest<T0>
17202 where
17203 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17204 ___E: ::fidl_next::Encoder,
17205 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17206 {
17207 #[inline]
17208 fn encode(
17209 self,
17210 encoder_: &mut ___E,
17211 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
17212 _: (),
17213 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17214 ::fidl_next::munge! {
17215 let crate::wire::WritableWriteRequest {
17216 data,
17217
17218 } = out_;
17219 }
17220
17221 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17222
17223 Ok(())
17224 }
17225 }
17226
17227 pub struct WritableWriteResponse<T0> {
17229 pub actual_count: T0,
17230 }
17231
17232 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
17233 for WritableWriteResponse<T0>
17234 where
17235 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17236 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17237 {
17238 #[inline]
17239 fn encode(
17240 self,
17241 encoder_: &mut ___E,
17242 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
17243 _: (),
17244 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17245 ::fidl_next::munge! {
17246 let crate::wire::WritableWriteResponse {
17247 actual_count,
17248
17249 } = out_;
17250 }
17251
17252 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
17253
17254 Ok(())
17255 }
17256 }
17257
17258 pub struct FileSeekRequest<T0, T1> {
17260 pub origin: T0,
17261
17262 pub offset: T1,
17263 }
17264
17265 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
17266 for FileSeekRequest<T0, T1>
17267 where
17268 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17269 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
17270 T1: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
17271 {
17272 #[inline]
17273 fn encode(
17274 self,
17275 encoder_: &mut ___E,
17276 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
17277 _: (),
17278 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17279 ::fidl_next::munge! {
17280 let crate::wire::FileSeekRequest {
17281 origin,
17282 offset,
17283
17284 } = out_;
17285 }
17286
17287 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
17288
17289 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17290
17291 Ok(())
17292 }
17293 }
17294
17295 pub struct FileSeekResponse<T0> {
17297 pub offset_from_start: T0,
17298 }
17299
17300 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
17301 for FileSeekResponse<T0>
17302 where
17303 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17304 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17305 {
17306 #[inline]
17307 fn encode(
17308 self,
17309 encoder_: &mut ___E,
17310 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
17311 _: (),
17312 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17313 ::fidl_next::munge! {
17314 let crate::wire::FileSeekResponse {
17315 offset_from_start,
17316
17317 } = out_;
17318 }
17319
17320 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
17321
17322 Ok(())
17323 }
17324 }
17325
17326 pub struct FileReadAtRequest<T0, T1> {
17328 pub count: T0,
17329
17330 pub offset: T1,
17331 }
17332
17333 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
17334 for FileReadAtRequest<T0, T1>
17335 where
17336 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17337 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17338 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17339 {
17340 #[inline]
17341 fn encode(
17342 self,
17343 encoder_: &mut ___E,
17344 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
17345 _: (),
17346 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17347 ::fidl_next::munge! {
17348 let crate::wire::FileReadAtRequest {
17349 count,
17350 offset,
17351
17352 } = out_;
17353 }
17354
17355 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
17356
17357 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17358
17359 Ok(())
17360 }
17361 }
17362
17363 pub struct FileReadAtResponse<T0> {
17365 pub data: T0,
17366 }
17367
17368 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
17369 for FileReadAtResponse<T0>
17370 where
17371 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17372 ___E: ::fidl_next::Encoder,
17373 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17374 {
17375 #[inline]
17376 fn encode(
17377 self,
17378 encoder_: &mut ___E,
17379 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
17380 _: (),
17381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17382 ::fidl_next::munge! {
17383 let crate::wire::FileReadAtResponse {
17384 data,
17385
17386 } = out_;
17387 }
17388
17389 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17390
17391 Ok(())
17392 }
17393 }
17394
17395 pub struct FileWriteAtRequest<T0, T1> {
17397 pub data: T0,
17398
17399 pub offset: T1,
17400 }
17401
17402 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
17403 for FileWriteAtRequest<T0, T1>
17404 where
17405 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17406 ___E: ::fidl_next::Encoder,
17407 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17408 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17409 {
17410 #[inline]
17411 fn encode(
17412 self,
17413 encoder_: &mut ___E,
17414 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
17415 _: (),
17416 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17417 ::fidl_next::munge! {
17418 let crate::wire::FileWriteAtRequest {
17419 data,
17420 offset,
17421
17422 } = out_;
17423 }
17424
17425 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
17426
17427 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
17428
17429 Ok(())
17430 }
17431 }
17432
17433 pub struct FileWriteAtResponse<T0> {
17435 pub actual_count: T0,
17436 }
17437
17438 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
17439 for FileWriteAtResponse<T0>
17440 where
17441 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17442 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17443 {
17444 #[inline]
17445 fn encode(
17446 self,
17447 encoder_: &mut ___E,
17448 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
17449 _: (),
17450 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17451 ::fidl_next::munge! {
17452 let crate::wire::FileWriteAtResponse {
17453 actual_count,
17454
17455 } = out_;
17456 }
17457
17458 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
17459
17460 Ok(())
17461 }
17462 }
17463
17464 pub struct FileResizeRequest<T0> {
17466 pub length: T0,
17467 }
17468
17469 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
17470 for FileResizeRequest<T0>
17471 where
17472 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17473 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17474 {
17475 #[inline]
17476 fn encode(
17477 self,
17478 encoder_: &mut ___E,
17479 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
17480 _: (),
17481 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17482 ::fidl_next::munge! {
17483 let crate::wire::FileResizeRequest {
17484 length,
17485
17486 } = out_;
17487 }
17488
17489 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
17490
17491 Ok(())
17492 }
17493 }
17494
17495 pub type FileResizeResponse = ();
17497
17498 pub struct FileGetBackingMemoryRequest<T0> {
17500 pub flags: T0,
17501 }
17502
17503 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
17504 for FileGetBackingMemoryRequest<T0>
17505 where
17506 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17507 T0: ::fidl_next::Encode<crate::wire::VmoFlags, ___E>,
17508 {
17509 #[inline]
17510 fn encode(
17511 self,
17512 encoder_: &mut ___E,
17513 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
17514 _: (),
17515 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17516 ::fidl_next::munge! {
17517 let crate::wire::FileGetBackingMemoryRequest {
17518 flags,
17519
17520 } = out_;
17521 }
17522
17523 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
17524
17525 Ok(())
17526 }
17527 }
17528
17529 pub type LinkableLinkIntoResponse = ();
17531
17532 pub type FileAllocateResponse = ();
17534
17535 pub type FileEnableVerityResponse = ();
17537
17538 pub struct FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> {
17540 pub total_bytes: T0,
17541
17542 pub used_bytes: T1,
17543
17544 pub total_nodes: T2,
17545
17546 pub used_nodes: T3,
17547
17548 pub free_shared_pool_bytes: T4,
17549
17550 pub fs_id: T5,
17551
17552 pub block_size: T6,
17553
17554 pub max_filename_size: T7,
17555
17556 pub fs_type: T8,
17557
17558 pub padding: T9,
17559
17560 pub name: T10,
17561 }
17562
17563 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
17564 ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>
17565 for FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
17566 where
17567 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17568 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17569 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17570 T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17571 T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17572 T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17573 T5: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
17574 T6: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17575 T7: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17576 T8: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17577 T9: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
17578 T10: ::fidl_next::Encode<[i8; 32], ___E>,
17579 {
17580 #[inline]
17581 fn encode(
17582 self,
17583 encoder_: &mut ___E,
17584 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
17585 _: (),
17586 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17587 ::fidl_next::munge! {
17588 let crate::wire::FilesystemInfo {
17589 total_bytes,
17590 used_bytes,
17591 total_nodes,
17592 used_nodes,
17593 free_shared_pool_bytes,
17594 fs_id,
17595 block_size,
17596 max_filename_size,
17597 fs_type,
17598 padding,
17599 name,
17600
17601 } = out_;
17602 }
17603
17604 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
17605
17606 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
17607
17608 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
17609
17610 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
17611
17612 ::fidl_next::Encode::encode(
17613 self.free_shared_pool_bytes,
17614 encoder_,
17615 free_shared_pool_bytes,
17616 (),
17617 )?;
17618
17619 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
17620
17621 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
17622
17623 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
17624
17625 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
17626
17627 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
17628
17629 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
17630
17631 Ok(())
17632 }
17633 }
17634
17635 pub type Service = ();
17637
17638 pub struct SymlinkObject<T0> {
17640 pub target: T0,
17641 }
17642
17643 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
17644 for SymlinkObject<T0>
17645 where
17646 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
17647 ___E: ::fidl_next::Encoder,
17648 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
17649 {
17650 #[inline]
17651 fn encode(
17652 self,
17653 encoder_: &mut ___E,
17654 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
17655 _: (),
17656 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
17657 ::fidl_next::munge! {
17658 let crate::wire::SymlinkObject {
17659 target,
17660
17661 } = out_;
17662 }
17663
17664 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
17665
17666 Ok(())
17667 }
17668 }
17669}
17670
17671pub use self::natural::*;
17672
17673#[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"]
17675#[derive(PartialEq, Debug)]
17676pub struct AdvisoryLocking;
17677
17678#[cfg(target_os = "fuchsia")]
17679impl ::fidl_next::HasTransport for AdvisoryLocking {
17680 type Transport = ::fidl_next::fuchsia::zx::Channel;
17681}
17682
17683pub mod advisory_locking {
17684 pub mod prelude {
17685 pub use crate::{
17686 AdvisoryLocking, AdvisoryLockingClientHandler, AdvisoryLockingLocalClientHandler,
17687 AdvisoryLockingLocalServerHandler, AdvisoryLockingServerHandler, advisory_locking,
17688 };
17689
17690 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
17691
17692 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
17693 }
17694
17695 pub struct AdvisoryLock;
17696
17697 impl ::fidl_next::Method for AdvisoryLock {
17698 const ORDINAL: u64 = 7992130864415541162;
17699 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17700 ::fidl_next::protocol::Flexibility::Strict;
17701
17702 type Protocol = crate::AdvisoryLocking;
17703
17704 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
17705 }
17706
17707 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
17708 type Response = ::fidl_next::wire::Result<
17709 'static,
17710 crate::wire::AdvisoryLockingAdvisoryLockResponse,
17711 ::fidl_next::wire::fuchsia::StatusResult,
17712 >;
17713 }
17714
17715 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
17716 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17717
17718 fn respond(response: ___R) -> Self::Output {
17719 ::core::result::Result::Ok(response)
17720 }
17721 }
17722
17723 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
17724 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17725
17726 fn respond_err(response: ___R) -> Self::Output {
17727 ::core::result::Result::Err(response)
17728 }
17729 }
17730
17731 mod ___detail {
17732 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::AdvisoryLocking
17733 where
17734 ___T: ::fidl_next::Transport,
17735 {
17736 type Client = AdvisoryLockingClient<___T>;
17737 type Server = AdvisoryLockingServer<___T>;
17738 }
17739
17740 #[repr(transparent)]
17742 pub struct AdvisoryLockingClient<___T: ::fidl_next::Transport> {
17743 #[allow(dead_code)]
17744 client: ::fidl_next::protocol::Client<___T>,
17745 }
17746
17747 impl<___T> AdvisoryLockingClient<___T>
17748 where
17749 ___T: ::fidl_next::Transport,
17750 {
17751 #[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"]
17752 pub fn advisory_lock(
17753 &self,
17754
17755 request: impl ::fidl_next::Encode<
17756 crate::wire::AdvisoryLockRequest<'static>,
17757 <___T as ::fidl_next::Transport>::SendBuffer,
17758 >,
17759 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
17760 where
17761 <___T as ::fidl_next::Transport>::SendBuffer:
17762 ::fidl_next::encoder::InternalHandleEncoder,
17763 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17764 {
17765 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
17766 request,
17767 })
17768 }
17769
17770 #[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"]
17771 pub fn advisory_lock_with<___R>(
17772 &self,
17773 request: ___R,
17774 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
17775 where
17776 ___R: ::fidl_next::Encode<
17777 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
17778 <___T as ::fidl_next::Transport>::SendBuffer,
17779 >,
17780 {
17781 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17782 7992130864415541162,
17783 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
17784 request,
17785 ))
17786 }
17787 }
17788
17789 #[repr(transparent)]
17791 pub struct AdvisoryLockingServer<___T: ::fidl_next::Transport> {
17792 server: ::fidl_next::protocol::Server<___T>,
17793 }
17794
17795 impl<___T> AdvisoryLockingServer<___T> where ___T: ::fidl_next::Transport {}
17796 }
17797}
17798
17799#[diagnostic::on_unimplemented(
17800 note = "If {Self} implements the non-local AdvisoryLockingClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
17801)]
17802
17803pub trait AdvisoryLockingLocalClientHandler<
17807 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17808 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17809>
17810{
17811}
17812
17813impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for AdvisoryLocking
17814where
17815 ___H: AdvisoryLockingLocalClientHandler<___T>,
17816 ___T: ::fidl_next::Transport,
17817{
17818 async fn on_event(
17819 handler: &mut ___H,
17820 mut message: ::fidl_next::Message<___T>,
17821 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17822 match *message.header().ordinal {
17823 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17824 }
17825 }
17826}
17827
17828#[diagnostic::on_unimplemented(
17829 note = "If {Self} implements the non-local AdvisoryLockingServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
17830)]
17831
17832pub trait AdvisoryLockingLocalServerHandler<
17836 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17837 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17838>
17839{
17840 #[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"]
17841 fn advisory_lock(
17842 &mut self,
17843
17844 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
17845
17846 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
17847 ) -> impl ::core::future::Future<Output = ()>;
17848}
17849
17850impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for AdvisoryLocking
17851where
17852 ___H: AdvisoryLockingLocalServerHandler<___T>,
17853 ___T: ::fidl_next::Transport,
17854 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
17855 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17856 Constraint = (),
17857 >,
17858{
17859 async fn on_one_way(
17860 handler: &mut ___H,
17861 mut message: ::fidl_next::Message<___T>,
17862 ) -> ::core::result::Result<
17863 (),
17864 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17865 > {
17866 match *message.header().ordinal {
17867 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17868 }
17869 }
17870
17871 async fn on_two_way(
17872 handler: &mut ___H,
17873 mut message: ::fidl_next::Message<___T>,
17874 responder: ::fidl_next::protocol::Responder<___T>,
17875 ) -> ::core::result::Result<
17876 (),
17877 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17878 > {
17879 match *message.header().ordinal {
17880 7992130864415541162 => {
17881 let responder = ::fidl_next::Responder::from_untyped(responder);
17882
17883 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17884 Ok(decoded) => {
17885 handler
17886 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
17887 .await;
17888 Ok(())
17889 }
17890 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17891 ordinal: 7992130864415541162,
17892 error,
17893 }),
17894 }
17895 }
17896
17897 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17898 }
17899 }
17900}
17901
17902pub trait AdvisoryLockingClientHandler<
17906 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17907 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17908>
17909{
17910}
17911
17912impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for AdvisoryLocking
17913where
17914 ___H: AdvisoryLockingClientHandler<___T> + ::core::marker::Send,
17915 ___T: ::fidl_next::Transport,
17916{
17917 async fn on_event(
17918 handler: &mut ___H,
17919 mut message: ::fidl_next::Message<___T>,
17920 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17921 match *message.header().ordinal {
17922 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17923 }
17924 }
17925}
17926
17927pub trait AdvisoryLockingServerHandler<
17931 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17932 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17933>
17934{
17935 #[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"]
17936 fn advisory_lock(
17937 &mut self,
17938
17939 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
17940
17941 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
17942 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17943}
17944
17945impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for AdvisoryLocking
17946where
17947 ___H: AdvisoryLockingServerHandler<___T> + ::core::marker::Send,
17948 ___T: ::fidl_next::Transport,
17949 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
17950 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17951 Constraint = (),
17952 >,
17953{
17954 async fn on_one_way(
17955 handler: &mut ___H,
17956 mut message: ::fidl_next::Message<___T>,
17957 ) -> ::core::result::Result<
17958 (),
17959 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17960 > {
17961 match *message.header().ordinal {
17962 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17963 }
17964 }
17965
17966 async fn on_two_way(
17967 handler: &mut ___H,
17968 mut message: ::fidl_next::Message<___T>,
17969 responder: ::fidl_next::protocol::Responder<___T>,
17970 ) -> ::core::result::Result<
17971 (),
17972 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17973 > {
17974 match *message.header().ordinal {
17975 7992130864415541162 => {
17976 let responder = ::fidl_next::Responder::from_untyped(responder);
17977
17978 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17979 Ok(decoded) => {
17980 handler
17981 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
17982 .await;
17983 Ok(())
17984 }
17985 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17986 ordinal: 7992130864415541162,
17987 error,
17988 }),
17989 }
17990 }
17991
17992 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
17993 }
17994 }
17995}
17996
17997impl<___T> AdvisoryLockingClientHandler<___T> for ::fidl_next::IgnoreEvents where
17998 ___T: ::fidl_next::Transport
17999{
18000}
18001
18002impl<___H, ___T> AdvisoryLockingLocalClientHandler<___T> for ::fidl_next::Local<___H>
18003where
18004 ___H: AdvisoryLockingClientHandler<___T>,
18005 ___T: ::fidl_next::Transport,
18006{
18007}
18008
18009impl<___H, ___T> AdvisoryLockingLocalServerHandler<___T> for ::fidl_next::Local<___H>
18010where
18011 ___H: AdvisoryLockingServerHandler<___T>,
18012 ___T: ::fidl_next::Transport,
18013{
18014 async fn advisory_lock(
18015 &mut self,
18016
18017 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
18018
18019 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
18020 ) {
18021 ___H::advisory_lock(&mut self.0, request, responder).await
18022 }
18023}
18024
18025pub const DIRECTORY_PROTOCOL_NAME: &str = "fuchsia.io/Directory";
18026
18027#[doc = " The maximum length, in bytes, of a filesystem path.\n"]
18028pub const MAX_PATH_LENGTH: u64 = 4095 as u64;
18029
18030#[doc = " The maximal buffer size which can be transmitted for buffered operations.\n This capacity is currently set somewhat arbitrarily.\n"]
18031pub const MAX_BUF: u64 = 8192 as u64;
18032
18033#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
18034pub const MAX_NAME_LENGTH: u64 = 255 as u64;
18035
18036#[doc = " The maximum size for an extended attribute name.\n"]
18037pub const MAX_ATTRIBUTE_NAME: u64 = 255 as u64;
18038
18039#[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"]
18040pub const MAX_INLINE_ATTRIBUTE_VALUE: u64 = 32768 as u64;
18041
18042#[doc = " The maximum size for passing the SELinux context as an attribute.\n"]
18043pub const MAX_SELINUX_CONTEXT_ATTRIBUTE_LEN: u64 = 256 as u64;
18044
18045#[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"]
18047#[derive(PartialEq, Debug)]
18048pub struct DirectoryWatcher;
18049
18050#[cfg(target_os = "fuchsia")]
18051impl ::fidl_next::HasTransport for DirectoryWatcher {
18052 type Transport = ::fidl_next::fuchsia::zx::Channel;
18053}
18054
18055pub mod directory_watcher {
18056 pub mod prelude {
18057 pub use crate::{
18058 DirectoryWatcher, DirectoryWatcherClientHandler, DirectoryWatcherLocalClientHandler,
18059 DirectoryWatcherLocalServerHandler, DirectoryWatcherServerHandler, directory_watcher,
18060 };
18061 }
18062
18063 mod ___detail {
18064 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirectoryWatcher
18065 where
18066 ___T: ::fidl_next::Transport,
18067 {
18068 type Client = DirectoryWatcherClient<___T>;
18069 type Server = DirectoryWatcherServer<___T>;
18070 }
18071
18072 #[repr(transparent)]
18074 pub struct DirectoryWatcherClient<___T: ::fidl_next::Transport> {
18075 #[allow(dead_code)]
18076 client: ::fidl_next::protocol::Client<___T>,
18077 }
18078
18079 impl<___T> DirectoryWatcherClient<___T> where ___T: ::fidl_next::Transport {}
18080
18081 #[repr(transparent)]
18083 pub struct DirectoryWatcherServer<___T: ::fidl_next::Transport> {
18084 server: ::fidl_next::protocol::Server<___T>,
18085 }
18086
18087 impl<___T> DirectoryWatcherServer<___T> where ___T: ::fidl_next::Transport {}
18088 }
18089}
18090
18091#[diagnostic::on_unimplemented(
18092 note = "If {Self} implements the non-local DirectoryWatcherClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18093)]
18094
18095pub trait DirectoryWatcherLocalClientHandler<
18099 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18100 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18101>
18102{
18103}
18104
18105impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for DirectoryWatcher
18106where
18107 ___H: DirectoryWatcherLocalClientHandler<___T>,
18108 ___T: ::fidl_next::Transport,
18109{
18110 async fn on_event(
18111 handler: &mut ___H,
18112 mut message: ::fidl_next::Message<___T>,
18113 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18114 match *message.header().ordinal {
18115 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18116 }
18117 }
18118}
18119
18120#[diagnostic::on_unimplemented(
18121 note = "If {Self} implements the non-local DirectoryWatcherServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18122)]
18123
18124pub trait DirectoryWatcherLocalServerHandler<
18128 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18129 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18130>
18131{
18132}
18133
18134impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for DirectoryWatcher
18135where
18136 ___H: DirectoryWatcherLocalServerHandler<___T>,
18137 ___T: ::fidl_next::Transport,
18138{
18139 async fn on_one_way(
18140 handler: &mut ___H,
18141 mut message: ::fidl_next::Message<___T>,
18142 ) -> ::core::result::Result<
18143 (),
18144 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18145 > {
18146 match *message.header().ordinal {
18147 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18148 }
18149 }
18150
18151 async fn on_two_way(
18152 handler: &mut ___H,
18153 mut message: ::fidl_next::Message<___T>,
18154 responder: ::fidl_next::protocol::Responder<___T>,
18155 ) -> ::core::result::Result<
18156 (),
18157 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18158 > {
18159 match *message.header().ordinal {
18160 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18161 }
18162 }
18163}
18164
18165pub trait DirectoryWatcherClientHandler<
18169 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18170 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18171>
18172{
18173}
18174
18175impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryWatcher
18176where
18177 ___H: DirectoryWatcherClientHandler<___T> + ::core::marker::Send,
18178 ___T: ::fidl_next::Transport,
18179{
18180 async fn on_event(
18181 handler: &mut ___H,
18182 mut message: ::fidl_next::Message<___T>,
18183 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18184 match *message.header().ordinal {
18185 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18186 }
18187 }
18188}
18189
18190pub trait DirectoryWatcherServerHandler<
18194 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18195 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18196>
18197{
18198}
18199
18200impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryWatcher
18201where
18202 ___H: DirectoryWatcherServerHandler<___T> + ::core::marker::Send,
18203 ___T: ::fidl_next::Transport,
18204{
18205 async fn on_one_way(
18206 handler: &mut ___H,
18207 mut message: ::fidl_next::Message<___T>,
18208 ) -> ::core::result::Result<
18209 (),
18210 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18211 > {
18212 match *message.header().ordinal {
18213 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18214 }
18215 }
18216
18217 async fn on_two_way(
18218 handler: &mut ___H,
18219 mut message: ::fidl_next::Message<___T>,
18220 responder: ::fidl_next::protocol::Responder<___T>,
18221 ) -> ::core::result::Result<
18222 (),
18223 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18224 > {
18225 match *message.header().ordinal {
18226 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18227 }
18228 }
18229}
18230
18231impl<___T> DirectoryWatcherClientHandler<___T> for ::fidl_next::IgnoreEvents where
18232 ___T: ::fidl_next::Transport
18233{
18234}
18235
18236impl<___H, ___T> DirectoryWatcherLocalClientHandler<___T> for ::fidl_next::Local<___H>
18237where
18238 ___H: DirectoryWatcherClientHandler<___T>,
18239 ___T: ::fidl_next::Transport,
18240{
18241}
18242
18243impl<___H, ___T> DirectoryWatcherLocalServerHandler<___T> for ::fidl_next::Local<___H>
18244where
18245 ___H: DirectoryWatcherServerHandler<___T>,
18246 ___T: ::fidl_next::Transport,
18247{
18248}
18249
18250#[doc = " The maximum size of a chunk in the ListExtendedAttributes iterator.\n"]
18251pub const MAX_LIST_ATTRIBUTES_CHUNK: u64 = 128 as u64;
18252
18253#[derive(PartialEq, Debug)]
18255pub struct ExtendedAttributeIterator;
18256
18257#[cfg(target_os = "fuchsia")]
18258impl ::fidl_next::HasTransport for ExtendedAttributeIterator {
18259 type Transport = ::fidl_next::fuchsia::zx::Channel;
18260}
18261
18262pub mod extended_attribute_iterator {
18263 pub mod prelude {
18264 pub use crate::{
18265 ExtendedAttributeIterator, ExtendedAttributeIteratorClientHandler,
18266 ExtendedAttributeIteratorLocalClientHandler,
18267 ExtendedAttributeIteratorLocalServerHandler, ExtendedAttributeIteratorServerHandler,
18268 extended_attribute_iterator,
18269 };
18270
18271 pub use crate::natural::ExtendedAttributeIteratorGetNextResponse;
18272 }
18273
18274 pub struct GetNext;
18275
18276 impl ::fidl_next::Method for GetNext {
18277 const ORDINAL: u64 = 268639596268373415;
18278 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18279 ::fidl_next::protocol::Flexibility::Strict;
18280
18281 type Protocol = crate::ExtendedAttributeIterator;
18282
18283 type Request = ::fidl_next::wire::EmptyMessageBody;
18284 }
18285
18286 impl ::fidl_next::TwoWayMethod for GetNext {
18287 type Response = ::fidl_next::wire::Result<
18288 'static,
18289 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
18290 ::fidl_next::wire::fuchsia::StatusResult,
18291 >;
18292 }
18293
18294 impl<___R> ::fidl_next::Respond<___R> for GetNext {
18295 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18296
18297 fn respond(response: ___R) -> Self::Output {
18298 ::core::result::Result::Ok(response)
18299 }
18300 }
18301
18302 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
18303 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18304
18305 fn respond_err(response: ___R) -> Self::Output {
18306 ::core::result::Result::Err(response)
18307 }
18308 }
18309
18310 mod ___detail {
18311 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ExtendedAttributeIterator
18312 where
18313 ___T: ::fidl_next::Transport,
18314 {
18315 type Client = ExtendedAttributeIteratorClient<___T>;
18316 type Server = ExtendedAttributeIteratorServer<___T>;
18317 }
18318
18319 #[repr(transparent)]
18321 pub struct ExtendedAttributeIteratorClient<___T: ::fidl_next::Transport> {
18322 #[allow(dead_code)]
18323 client: ::fidl_next::protocol::Client<___T>,
18324 }
18325
18326 impl<___T> ExtendedAttributeIteratorClient<___T>
18327 where
18328 ___T: ::fidl_next::Transport,
18329 {
18330 #[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"]
18331 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
18332 ::fidl_next::TwoWayFuture::from_untyped(
18333 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18334 268639596268373415,
18335 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
18336 (),
18337 ),
18338 )
18339 }
18340 }
18341
18342 #[repr(transparent)]
18344 pub struct ExtendedAttributeIteratorServer<___T: ::fidl_next::Transport> {
18345 server: ::fidl_next::protocol::Server<___T>,
18346 }
18347
18348 impl<___T> ExtendedAttributeIteratorServer<___T> where ___T: ::fidl_next::Transport {}
18349 }
18350}
18351
18352#[diagnostic::on_unimplemented(
18353 note = "If {Self} implements the non-local ExtendedAttributeIteratorClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18354)]
18355
18356pub trait ExtendedAttributeIteratorLocalClientHandler<
18360 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18361 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18362>
18363{
18364}
18365
18366impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for ExtendedAttributeIterator
18367where
18368 ___H: ExtendedAttributeIteratorLocalClientHandler<___T>,
18369 ___T: ::fidl_next::Transport,
18370{
18371 async fn on_event(
18372 handler: &mut ___H,
18373 mut message: ::fidl_next::Message<___T>,
18374 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18375 match *message.header().ordinal {
18376 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18377 }
18378 }
18379}
18380
18381#[diagnostic::on_unimplemented(
18382 note = "If {Self} implements the non-local ExtendedAttributeIteratorServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18383)]
18384
18385pub trait ExtendedAttributeIteratorLocalServerHandler<
18389 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18390 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18391>
18392{
18393 #[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"]
18394 fn get_next(
18395 &mut self,
18396
18397 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18398 ) -> impl ::core::future::Future<Output = ()>;
18399}
18400
18401impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for ExtendedAttributeIterator
18402where
18403 ___H: ExtendedAttributeIteratorLocalServerHandler<___T>,
18404 ___T: ::fidl_next::Transport,
18405{
18406 async fn on_one_way(
18407 handler: &mut ___H,
18408 mut message: ::fidl_next::Message<___T>,
18409 ) -> ::core::result::Result<
18410 (),
18411 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18412 > {
18413 match *message.header().ordinal {
18414 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18415 }
18416 }
18417
18418 async fn on_two_way(
18419 handler: &mut ___H,
18420 mut message: ::fidl_next::Message<___T>,
18421 responder: ::fidl_next::protocol::Responder<___T>,
18422 ) -> ::core::result::Result<
18423 (),
18424 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18425 > {
18426 match *message.header().ordinal {
18427 268639596268373415 => {
18428 let responder = ::fidl_next::Responder::from_untyped(responder);
18429
18430 handler.get_next(responder).await;
18431 Ok(())
18432 }
18433
18434 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18435 }
18436 }
18437}
18438
18439pub trait ExtendedAttributeIteratorClientHandler<
18443 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18444 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18445>
18446{
18447}
18448
18449impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExtendedAttributeIterator
18450where
18451 ___H: ExtendedAttributeIteratorClientHandler<___T> + ::core::marker::Send,
18452 ___T: ::fidl_next::Transport,
18453{
18454 async fn on_event(
18455 handler: &mut ___H,
18456 mut message: ::fidl_next::Message<___T>,
18457 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18458 match *message.header().ordinal {
18459 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18460 }
18461 }
18462}
18463
18464pub trait ExtendedAttributeIteratorServerHandler<
18468 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18469 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18470>
18471{
18472 #[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"]
18473 fn get_next(
18474 &mut self,
18475
18476 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18477 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18478}
18479
18480impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExtendedAttributeIterator
18481where
18482 ___H: ExtendedAttributeIteratorServerHandler<___T> + ::core::marker::Send,
18483 ___T: ::fidl_next::Transport,
18484{
18485 async fn on_one_way(
18486 handler: &mut ___H,
18487 mut message: ::fidl_next::Message<___T>,
18488 ) -> ::core::result::Result<
18489 (),
18490 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18491 > {
18492 match *message.header().ordinal {
18493 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18494 }
18495 }
18496
18497 async fn on_two_way(
18498 handler: &mut ___H,
18499 mut message: ::fidl_next::Message<___T>,
18500 responder: ::fidl_next::protocol::Responder<___T>,
18501 ) -> ::core::result::Result<
18502 (),
18503 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18504 > {
18505 match *message.header().ordinal {
18506 268639596268373415 => {
18507 let responder = ::fidl_next::Responder::from_untyped(responder);
18508
18509 handler.get_next(responder).await;
18510 Ok(())
18511 }
18512
18513 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18514 }
18515 }
18516}
18517
18518impl<___T> ExtendedAttributeIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents where
18519 ___T: ::fidl_next::Transport
18520{
18521}
18522
18523impl<___H, ___T> ExtendedAttributeIteratorLocalClientHandler<___T> for ::fidl_next::Local<___H>
18524where
18525 ___H: ExtendedAttributeIteratorClientHandler<___T>,
18526 ___T: ::fidl_next::Transport,
18527{
18528}
18529
18530impl<___H, ___T> ExtendedAttributeIteratorLocalServerHandler<___T> for ::fidl_next::Local<___H>
18531where
18532 ___H: ExtendedAttributeIteratorServerHandler<___T>,
18533 ___T: ::fidl_next::Transport,
18534{
18535 async fn get_next(
18536 &mut self,
18537
18538 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
18539 ) {
18540 ___H::get_next(&mut self.0, responder).await
18541 }
18542}
18543
18544pub const FILE_PROTOCOL_NAME: &str = "fuchsia.io/File";
18545
18546#[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"]
18547pub const FLAG_TEMPORARY_AS_NOT_LINKABLE: crate::natural::Flags =
18548 crate::natural::Flags::FLAG_MUST_CREATE;
18549
18550#[doc = " The maximum I/O size that is allowed for read/write operations using\n byte vectors.\n"]
18551pub const MAX_TRANSFER_SIZE: u64 = 8192 as u64;
18552
18553#[derive(PartialEq, Debug)]
18555pub struct Readable;
18556
18557#[cfg(target_os = "fuchsia")]
18558impl ::fidl_next::HasTransport for Readable {
18559 type Transport = ::fidl_next::fuchsia::zx::Channel;
18560}
18561
18562pub mod readable {
18563 pub mod prelude {
18564 pub use crate::{
18565 Readable, ReadableClientHandler, ReadableLocalClientHandler,
18566 ReadableLocalServerHandler, ReadableServerHandler, readable,
18567 };
18568
18569 pub use crate::natural::ReadableReadRequest;
18570
18571 pub use crate::natural::ReadableReadResponse;
18572 }
18573
18574 pub struct Read;
18575
18576 impl ::fidl_next::Method for Read {
18577 const ORDINAL: u64 = 395825947633028830;
18578 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18579 ::fidl_next::protocol::Flexibility::Strict;
18580
18581 type Protocol = crate::Readable;
18582
18583 type Request = crate::wire::ReadableReadRequest;
18584 }
18585
18586 impl ::fidl_next::TwoWayMethod for Read {
18587 type Response = ::fidl_next::wire::Result<
18588 'static,
18589 crate::wire::ReadableReadResponse<'static>,
18590 ::fidl_next::wire::fuchsia::StatusResult,
18591 >;
18592 }
18593
18594 impl<___R> ::fidl_next::Respond<___R> for Read {
18595 type Output = ::core::result::Result<
18596 crate::generic::ReadableReadResponse<___R>,
18597 ::fidl_next::never::Never,
18598 >;
18599
18600 fn respond(response: ___R) -> Self::Output {
18601 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
18602 }
18603 }
18604
18605 impl<___R> ::fidl_next::RespondErr<___R> for Read {
18606 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18607
18608 fn respond_err(response: ___R) -> Self::Output {
18609 ::core::result::Result::Err(response)
18610 }
18611 }
18612
18613 mod ___detail {
18614 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Readable
18615 where
18616 ___T: ::fidl_next::Transport,
18617 {
18618 type Client = ReadableClient<___T>;
18619 type Server = ReadableServer<___T>;
18620 }
18621
18622 #[repr(transparent)]
18624 pub struct ReadableClient<___T: ::fidl_next::Transport> {
18625 #[allow(dead_code)]
18626 client: ::fidl_next::protocol::Client<___T>,
18627 }
18628
18629 impl<___T> ReadableClient<___T>
18630 where
18631 ___T: ::fidl_next::Transport,
18632 {
18633 #[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"]
18634 pub fn read(
18635 &self,
18636
18637 count: impl ::fidl_next::Encode<
18638 ::fidl_next::wire::Uint64,
18639 <___T as ::fidl_next::Transport>::SendBuffer,
18640 >,
18641 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
18642 where
18643 <___T as ::fidl_next::Transport>::SendBuffer:
18644 ::fidl_next::encoder::InternalHandleEncoder,
18645 {
18646 self.read_with(crate::generic::ReadableReadRequest { count })
18647 }
18648
18649 #[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"]
18650 pub fn read_with<___R>(
18651 &self,
18652 request: ___R,
18653 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
18654 where
18655 ___R: ::fidl_next::Encode<
18656 crate::wire::ReadableReadRequest,
18657 <___T as ::fidl_next::Transport>::SendBuffer,
18658 >,
18659 {
18660 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18661 395825947633028830,
18662 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
18663 request,
18664 ))
18665 }
18666 }
18667
18668 #[repr(transparent)]
18670 pub struct ReadableServer<___T: ::fidl_next::Transport> {
18671 server: ::fidl_next::protocol::Server<___T>,
18672 }
18673
18674 impl<___T> ReadableServer<___T> where ___T: ::fidl_next::Transport {}
18675 }
18676}
18677
18678#[diagnostic::on_unimplemented(
18679 note = "If {Self} implements the non-local ReadableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18680)]
18681
18682pub trait ReadableLocalClientHandler<
18686 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18687 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18688>
18689{
18690}
18691
18692impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Readable
18693where
18694 ___H: ReadableLocalClientHandler<___T>,
18695 ___T: ::fidl_next::Transport,
18696{
18697 async fn on_event(
18698 handler: &mut ___H,
18699 mut message: ::fidl_next::Message<___T>,
18700 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18701 match *message.header().ordinal {
18702 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18703 }
18704 }
18705}
18706
18707#[diagnostic::on_unimplemented(
18708 note = "If {Self} implements the non-local ReadableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18709)]
18710
18711pub trait ReadableLocalServerHandler<
18715 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18716 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18717>
18718{
18719 #[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"]
18720 fn read(
18721 &mut self,
18722
18723 request: ::fidl_next::Request<readable::Read, ___T>,
18724
18725 responder: ::fidl_next::Responder<readable::Read, ___T>,
18726 ) -> impl ::core::future::Future<Output = ()>;
18727}
18728
18729impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Readable
18730where
18731 ___H: ReadableLocalServerHandler<___T>,
18732 ___T: ::fidl_next::Transport,
18733 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
18734 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18735 Constraint = (),
18736 >,
18737{
18738 async fn on_one_way(
18739 handler: &mut ___H,
18740 mut message: ::fidl_next::Message<___T>,
18741 ) -> ::core::result::Result<
18742 (),
18743 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18744 > {
18745 match *message.header().ordinal {
18746 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18747 }
18748 }
18749
18750 async fn on_two_way(
18751 handler: &mut ___H,
18752 mut message: ::fidl_next::Message<___T>,
18753 responder: ::fidl_next::protocol::Responder<___T>,
18754 ) -> ::core::result::Result<
18755 (),
18756 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18757 > {
18758 match *message.header().ordinal {
18759 395825947633028830 => {
18760 let responder = ::fidl_next::Responder::from_untyped(responder);
18761
18762 match ::fidl_next::AsDecoderExt::into_decoded(message) {
18763 Ok(decoded) => {
18764 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
18765 Ok(())
18766 }
18767 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18768 ordinal: 395825947633028830,
18769 error,
18770 }),
18771 }
18772 }
18773
18774 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18775 }
18776 }
18777}
18778
18779pub trait ReadableClientHandler<
18783 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18784 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18785>
18786{
18787}
18788
18789impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Readable
18790where
18791 ___H: ReadableClientHandler<___T> + ::core::marker::Send,
18792 ___T: ::fidl_next::Transport,
18793{
18794 async fn on_event(
18795 handler: &mut ___H,
18796 mut message: ::fidl_next::Message<___T>,
18797 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18798 match *message.header().ordinal {
18799 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18800 }
18801 }
18802}
18803
18804pub trait ReadableServerHandler<
18808 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18809 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18810>
18811{
18812 #[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"]
18813 fn read(
18814 &mut self,
18815
18816 request: ::fidl_next::Request<readable::Read, ___T>,
18817
18818 responder: ::fidl_next::Responder<readable::Read, ___T>,
18819 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18820}
18821
18822impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Readable
18823where
18824 ___H: ReadableServerHandler<___T> + ::core::marker::Send,
18825 ___T: ::fidl_next::Transport,
18826 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
18827 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18828 Constraint = (),
18829 >,
18830{
18831 async fn on_one_way(
18832 handler: &mut ___H,
18833 mut message: ::fidl_next::Message<___T>,
18834 ) -> ::core::result::Result<
18835 (),
18836 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18837 > {
18838 match *message.header().ordinal {
18839 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18840 }
18841 }
18842
18843 async fn on_two_way(
18844 handler: &mut ___H,
18845 mut message: ::fidl_next::Message<___T>,
18846 responder: ::fidl_next::protocol::Responder<___T>,
18847 ) -> ::core::result::Result<
18848 (),
18849 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18850 > {
18851 match *message.header().ordinal {
18852 395825947633028830 => {
18853 let responder = ::fidl_next::Responder::from_untyped(responder);
18854
18855 match ::fidl_next::AsDecoderExt::into_decoded(message) {
18856 Ok(decoded) => {
18857 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
18858 Ok(())
18859 }
18860 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18861 ordinal: 395825947633028830,
18862 error,
18863 }),
18864 }
18865 }
18866
18867 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
18868 }
18869 }
18870}
18871
18872impl<___T> ReadableClientHandler<___T> for ::fidl_next::IgnoreEvents where
18873 ___T: ::fidl_next::Transport
18874{
18875}
18876
18877impl<___H, ___T> ReadableLocalClientHandler<___T> for ::fidl_next::Local<___H>
18878where
18879 ___H: ReadableClientHandler<___T>,
18880 ___T: ::fidl_next::Transport,
18881{
18882}
18883
18884impl<___H, ___T> ReadableLocalServerHandler<___T> for ::fidl_next::Local<___H>
18885where
18886 ___H: ReadableServerHandler<___T>,
18887 ___T: ::fidl_next::Transport,
18888{
18889 async fn read(
18890 &mut self,
18891
18892 request: ::fidl_next::Request<readable::Read, ___T>,
18893
18894 responder: ::fidl_next::Responder<readable::Read, ___T>,
18895 ) {
18896 ___H::read(&mut self.0, request, responder).await
18897 }
18898}
18899
18900#[derive(PartialEq, Debug)]
18902pub struct Writable;
18903
18904#[cfg(target_os = "fuchsia")]
18905impl ::fidl_next::HasTransport for Writable {
18906 type Transport = ::fidl_next::fuchsia::zx::Channel;
18907}
18908
18909pub mod writable {
18910 pub mod prelude {
18911 pub use crate::{
18912 Writable, WritableClientHandler, WritableLocalClientHandler,
18913 WritableLocalServerHandler, WritableServerHandler, writable,
18914 };
18915
18916 pub use crate::natural::WritableWriteRequest;
18917
18918 pub use crate::natural::WritableWriteResponse;
18919 }
18920
18921 pub struct Write;
18922
18923 impl ::fidl_next::Method for Write {
18924 const ORDINAL: u64 = 7651971425397809026;
18925 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18926 ::fidl_next::protocol::Flexibility::Strict;
18927
18928 type Protocol = crate::Writable;
18929
18930 type Request = crate::wire::WritableWriteRequest<'static>;
18931 }
18932
18933 impl ::fidl_next::TwoWayMethod for Write {
18934 type Response = ::fidl_next::wire::Result<
18935 'static,
18936 crate::wire::WritableWriteResponse,
18937 ::fidl_next::wire::fuchsia::StatusResult,
18938 >;
18939 }
18940
18941 impl<___R> ::fidl_next::Respond<___R> for Write {
18942 type Output = ::core::result::Result<
18943 crate::generic::WritableWriteResponse<___R>,
18944 ::fidl_next::never::Never,
18945 >;
18946
18947 fn respond(response: ___R) -> Self::Output {
18948 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
18949 actual_count: response,
18950 })
18951 }
18952 }
18953
18954 impl<___R> ::fidl_next::RespondErr<___R> for Write {
18955 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18956
18957 fn respond_err(response: ___R) -> Self::Output {
18958 ::core::result::Result::Err(response)
18959 }
18960 }
18961
18962 mod ___detail {
18963 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Writable
18964 where
18965 ___T: ::fidl_next::Transport,
18966 {
18967 type Client = WritableClient<___T>;
18968 type Server = WritableServer<___T>;
18969 }
18970
18971 #[repr(transparent)]
18973 pub struct WritableClient<___T: ::fidl_next::Transport> {
18974 #[allow(dead_code)]
18975 client: ::fidl_next::protocol::Client<___T>,
18976 }
18977
18978 impl<___T> WritableClient<___T>
18979 where
18980 ___T: ::fidl_next::Transport,
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(
18984 &self,
18985
18986 data: impl ::fidl_next::Encode<
18987 ::fidl_next::wire::Vector<'static, u8>,
18988 <___T as ::fidl_next::Transport>::SendBuffer,
18989 >,
18990 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
18991 where
18992 <___T as ::fidl_next::Transport>::SendBuffer:
18993 ::fidl_next::encoder::InternalHandleEncoder,
18994 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18995 {
18996 self.write_with(crate::generic::WritableWriteRequest { data })
18997 }
18998
18999 #[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"]
19000 pub fn write_with<___R>(
19001 &self,
19002 request: ___R,
19003 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
19004 where
19005 ___R: ::fidl_next::Encode<
19006 crate::wire::WritableWriteRequest<'static>,
19007 <___T as ::fidl_next::Transport>::SendBuffer,
19008 >,
19009 {
19010 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19011 7651971425397809026,
19012 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
19013 request,
19014 ))
19015 }
19016 }
19017
19018 #[repr(transparent)]
19020 pub struct WritableServer<___T: ::fidl_next::Transport> {
19021 server: ::fidl_next::protocol::Server<___T>,
19022 }
19023
19024 impl<___T> WritableServer<___T> where ___T: ::fidl_next::Transport {}
19025 }
19026}
19027
19028#[diagnostic::on_unimplemented(
19029 note = "If {Self} implements the non-local WritableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
19030)]
19031
19032pub trait WritableLocalClientHandler<
19036 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19037 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19038>
19039{
19040}
19041
19042impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Writable
19043where
19044 ___H: WritableLocalClientHandler<___T>,
19045 ___T: ::fidl_next::Transport,
19046{
19047 async fn on_event(
19048 handler: &mut ___H,
19049 mut message: ::fidl_next::Message<___T>,
19050 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19051 match *message.header().ordinal {
19052 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19053 }
19054 }
19055}
19056
19057#[diagnostic::on_unimplemented(
19058 note = "If {Self} implements the non-local WritableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
19059)]
19060
19061pub trait WritableLocalServerHandler<
19065 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19066 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19067>
19068{
19069 #[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"]
19070 fn write(
19071 &mut self,
19072
19073 request: ::fidl_next::Request<writable::Write, ___T>,
19074
19075 responder: ::fidl_next::Responder<writable::Write, ___T>,
19076 ) -> impl ::core::future::Future<Output = ()>;
19077}
19078
19079impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Writable
19080where
19081 ___H: WritableLocalServerHandler<___T>,
19082 ___T: ::fidl_next::Transport,
19083 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
19084 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19085 Constraint = (),
19086 >,
19087{
19088 async fn on_one_way(
19089 handler: &mut ___H,
19090 mut message: ::fidl_next::Message<___T>,
19091 ) -> ::core::result::Result<
19092 (),
19093 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19094 > {
19095 match *message.header().ordinal {
19096 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19097 }
19098 }
19099
19100 async fn on_two_way(
19101 handler: &mut ___H,
19102 mut message: ::fidl_next::Message<___T>,
19103 responder: ::fidl_next::protocol::Responder<___T>,
19104 ) -> ::core::result::Result<
19105 (),
19106 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19107 > {
19108 match *message.header().ordinal {
19109 7651971425397809026 => {
19110 let responder = ::fidl_next::Responder::from_untyped(responder);
19111
19112 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19113 Ok(decoded) => {
19114 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
19115 Ok(())
19116 }
19117 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19118 ordinal: 7651971425397809026,
19119 error,
19120 }),
19121 }
19122 }
19123
19124 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19125 }
19126 }
19127}
19128
19129pub trait WritableClientHandler<
19133 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19134 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19135>
19136{
19137}
19138
19139impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Writable
19140where
19141 ___H: WritableClientHandler<___T> + ::core::marker::Send,
19142 ___T: ::fidl_next::Transport,
19143{
19144 async fn on_event(
19145 handler: &mut ___H,
19146 mut message: ::fidl_next::Message<___T>,
19147 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19148 match *message.header().ordinal {
19149 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19150 }
19151 }
19152}
19153
19154pub trait WritableServerHandler<
19158 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19159 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19160>
19161{
19162 #[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"]
19163 fn write(
19164 &mut self,
19165
19166 request: ::fidl_next::Request<writable::Write, ___T>,
19167
19168 responder: ::fidl_next::Responder<writable::Write, ___T>,
19169 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19170}
19171
19172impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Writable
19173where
19174 ___H: WritableServerHandler<___T> + ::core::marker::Send,
19175 ___T: ::fidl_next::Transport,
19176 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
19177 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19178 Constraint = (),
19179 >,
19180{
19181 async fn on_one_way(
19182 handler: &mut ___H,
19183 mut message: ::fidl_next::Message<___T>,
19184 ) -> ::core::result::Result<
19185 (),
19186 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19187 > {
19188 match *message.header().ordinal {
19189 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19190 }
19191 }
19192
19193 async fn on_two_way(
19194 handler: &mut ___H,
19195 mut message: ::fidl_next::Message<___T>,
19196 responder: ::fidl_next::protocol::Responder<___T>,
19197 ) -> ::core::result::Result<
19198 (),
19199 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19200 > {
19201 match *message.header().ordinal {
19202 7651971425397809026 => {
19203 let responder = ::fidl_next::Responder::from_untyped(responder);
19204
19205 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19206 Ok(decoded) => {
19207 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
19208 Ok(())
19209 }
19210 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19211 ordinal: 7651971425397809026,
19212 error,
19213 }),
19214 }
19215 }
19216
19217 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19218 }
19219 }
19220}
19221
19222impl<___T> WritableClientHandler<___T> for ::fidl_next::IgnoreEvents where
19223 ___T: ::fidl_next::Transport
19224{
19225}
19226
19227impl<___H, ___T> WritableLocalClientHandler<___T> for ::fidl_next::Local<___H>
19228where
19229 ___H: WritableClientHandler<___T>,
19230 ___T: ::fidl_next::Transport,
19231{
19232}
19233
19234impl<___H, ___T> WritableLocalServerHandler<___T> for ::fidl_next::Local<___H>
19235where
19236 ___H: WritableServerHandler<___T>,
19237 ___T: ::fidl_next::Transport,
19238{
19239 async fn write(
19240 &mut self,
19241
19242 request: ::fidl_next::Request<writable::Write, ___T>,
19243
19244 responder: ::fidl_next::Responder<writable::Write, ___T>,
19245 ) {
19246 ___H::write(&mut self.0, request, responder).await
19247 }
19248}
19249
19250pub const MAX_FS_NAME_BUFFER: u64 = 32 as u64;
19251
19252#[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"]
19253pub const INHERITED_WRITE_PERMISSIONS: crate::natural::Operations =
19254 crate::natural::Operations::from_bits_retain(356);
19255
19256#[doc = " Nodes which do not have ino values should return this value\n from Readdir and GetAttr.\n"]
19257pub const INO_UNKNOWN: u64 = 18446744073709551615 as u64;
19258
19259pub const MASK_KNOWN_PERMISSIONS: crate::natural::Flags =
19260 crate::natural::Flags::from_bits_retain(25087);
19261
19262pub const MASK_KNOWN_PROTOCOLS: crate::natural::Flags =
19263 crate::natural::Flags::from_bits_retain(30069489664);
19264
19265pub const MASK_PERMISSION_FLAGS: u64 = 65535 as u64;
19266
19267pub const MASK_POSIX_FLAGS: u64 = 4294967295 as u64;
19268
19269#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
19270pub const MAX_FILENAME: u64 = 255 as u64;
19271
19272pub const NODE_PROTOCOL_NAME: &str = "fuchsia.io/Node";
19273
19274#[doc = " Flags used when opening a node reference must fall within this mask.\n"]
19275pub const OPEN_FLAGS_ALLOWED_WITH_NODE_REFERENCE: crate::natural::OpenFlags =
19276 crate::natural::OpenFlags::from_bits_retain(46661632);
19277
19278#[doc = " All known rights.\n"]
19279pub const OPEN_RIGHTS: crate::natural::OpenFlags = crate::natural::OpenFlags::from_bits_retain(11);
19280
19281#[doc = " Set of permissions that are expected when opening a node as executable.\n"]
19282pub const PERM_EXECUTABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(201);
19283
19284#[doc = " Set of permissions that are expected when opening a node as readable.\n"]
19285pub const PERM_READABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(211);
19286
19287#[doc = " Set of permissions that are expected when opening a node as writable.\n"]
19288pub const PERM_WRITABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(485);
19289
19290#[doc = " Alias for directory permission alias rw*\n"]
19291pub const RW_STAR_DIR: crate::natural::Operations =
19292 crate::natural::Operations::from_bits_retain(503);
19293
19294#[doc = " Alias for directory permission alias rx*\n"]
19295pub const RX_STAR_DIR: crate::natural::Operations =
19296 crate::natural::Operations::from_bits_retain(219);
19297
19298#[doc = " Alias for directory permission alias r*\n"]
19299pub const R_STAR_DIR: crate::natural::Operations =
19300 crate::natural::Operations::from_bits_retain(211);
19301
19302#[doc = " The name of the extended attribute accessible via the SELinux context attribute.\n"]
19303pub const SELINUX_CONTEXT_NAME: &str = "security.selinux";
19304
19305pub const SYMLINK_PROTOCOL_NAME: &str = "fuchsia.io/Symlink";
19306
19307#[doc = " Alias for directory permission alias w*\n"]
19308pub const W_STAR_DIR: crate::natural::Operations =
19309 crate::natural::Operations::from_bits_retain(485);
19310
19311#[doc = " Alias for directory permission alias x*\n"]
19312pub const X_STAR_DIR: crate::natural::Operations =
19313 crate::natural::Operations::from_bits_retain(201);