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(
9 Clone,
10 Copy,
11 Debug,
12 PartialEq,
13 Eq,
14 Hash,
15 )]
16 pub struct Operations: u64 {
17 #[doc = " Connecting to a service in a directory.\n"]const CONNECT = 1;
18 #[doc = " Read byte contents of a node or its children.\n"]const READ_BYTES = 2;
19 #[doc = " Writing to the byte contents of a node or its children.\n"]const WRITE_BYTES = 4;
20 #[doc = " Execute the byte contents of a node or its children.\n"]const EXECUTE = 8;
21 #[doc = " Reading the attributes of a node and/or its children.\n"]const GET_ATTRIBUTES = 16;
22 #[doc = " Updating the attributes of a node and/or its children.\n"]const UPDATE_ATTRIBUTES = 32;
23 #[doc = " Reading the list of nodes in a directory.\n"]const ENUMERATE = 64;
24 #[doc = " Opening a node from a directory. Must be specified with [`Rights.ENUMERATE`], as directory\n contents can be probed by opening children.\n"]const TRAVERSE = 128;
25 #[doc = " Modifying the list of nodes in a directory, e.g. creating, renaming, link/unlink, etc...\n Must be specified with [`Rights.ENUMERATE`], as directory contents can be probed via name\n conflicts during node creation.\n"]const MODIFY_DIRECTORY = 256;
26
27 }
28 }
29
30 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Operations, ___E> for Operations
31 where
32 ___E: ?Sized,
33 {
34 #[inline]
35 fn encode(
36 self,
37 encoder: &mut ___E,
38 out: &mut ::core::mem::MaybeUninit<crate::wire::Operations>,
39 _: (),
40 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
41 ::fidl_next::Encode::encode(&self, encoder, out, ())
42 }
43 }
44
45 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Operations, ___E> for &'a Operations
46 where
47 ___E: ?Sized,
48 {
49 #[inline]
50 fn encode(
51 self,
52 _: &mut ___E,
53 out: &mut ::core::mem::MaybeUninit<crate::wire::Operations>,
54 _: (),
55 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
56 ::fidl_next::munge!(let crate::wire::Operations { value } = out);
57
58 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
59 return Err(::fidl_next::EncodeError::InvalidStrictBits);
60 }
61
62 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
63 Ok(())
64 }
65 }
66
67 impl ::core::convert::From<crate::wire::Operations> for Operations {
68 fn from(wire: crate::wire::Operations) -> Self {
69 Self::from_bits_retain(u64::from(wire.value))
70 }
71 }
72
73 impl ::fidl_next::FromWire<crate::wire::Operations> for Operations {
74 #[inline]
75 fn from_wire(wire: crate::wire::Operations) -> Self {
76 Self::from(wire)
77 }
78 }
79
80 impl ::fidl_next::FromWireRef<crate::wire::Operations> for Operations {
81 #[inline]
82 fn from_wire_ref(wire: &crate::wire::Operations) -> Self {
83 Self::from(*wire)
84 }
85 }
86
87 #[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"]
88 pub type Abilities = crate::natural::Operations;
89
90 #[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"]
91 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
92 #[repr(u32)]
93 pub enum SeekOrigin {
94 Start = 0,
95 Current = 1,
96 End = 2,
97 }
98 impl ::core::convert::TryFrom<u32> for SeekOrigin {
99 type Error = ::fidl_next::UnknownStrictEnumMemberError;
100 fn try_from(
101 value: u32,
102 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
103 match value {
104 0 => Ok(Self::Start),
105 1 => Ok(Self::Current),
106 2 => Ok(Self::End),
107
108 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
109 }
110 }
111 }
112
113 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SeekOrigin, ___E> for SeekOrigin
114 where
115 ___E: ?Sized,
116 {
117 #[inline]
118 fn encode(
119 self,
120 encoder: &mut ___E,
121 out: &mut ::core::mem::MaybeUninit<crate::wire::SeekOrigin>,
122 _: (),
123 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
124 ::fidl_next::Encode::encode(&self, encoder, out, ())
125 }
126 }
127
128 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SeekOrigin, ___E> for &'a SeekOrigin
129 where
130 ___E: ?Sized,
131 {
132 #[inline]
133 fn encode(
134 self,
135 encoder: &mut ___E,
136 out: &mut ::core::mem::MaybeUninit<crate::wire::SeekOrigin>,
137 _: (),
138 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
139 ::fidl_next::munge!(let crate::wire::SeekOrigin { value } = out);
140 let _ = value.write(::fidl_next::WireU32::from(match *self {
141 SeekOrigin::Start => 0,
142
143 SeekOrigin::Current => 1,
144
145 SeekOrigin::End => 2,
146 }));
147
148 Ok(())
149 }
150 }
151
152 impl ::core::convert::From<crate::wire::SeekOrigin> for SeekOrigin {
153 fn from(wire: crate::wire::SeekOrigin) -> Self {
154 match u32::from(wire.value) {
155 0 => Self::Start,
156
157 1 => Self::Current,
158
159 2 => Self::End,
160
161 _ => unsafe { ::core::hint::unreachable_unchecked() },
162 }
163 }
164 }
165
166 impl ::fidl_next::FromWire<crate::wire::SeekOrigin> for SeekOrigin {
167 #[inline]
168 fn from_wire(wire: crate::wire::SeekOrigin) -> Self {
169 Self::from(wire)
170 }
171 }
172
173 impl ::fidl_next::FromWireRef<crate::wire::SeekOrigin> for SeekOrigin {
174 #[inline]
175 fn from_wire_ref(wire: &crate::wire::SeekOrigin) -> Self {
176 Self::from(*wire)
177 }
178 }
179
180 #[derive(PartialEq, Clone, Debug)]
181 pub struct AdvisoryLockRange {
182 pub origin: crate::natural::SeekOrigin,
183
184 pub offset: i64,
185
186 pub length: i64,
187 }
188
189 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E> for AdvisoryLockRange
190 where
191 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
192 {
193 #[inline]
194 fn encode(
195 self,
196 encoder_: &mut ___E,
197 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
198 _: (),
199 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
200 ::fidl_next::munge! {
201 let crate::wire::AdvisoryLockRange {
202 origin,
203 offset,
204 length,
205
206 } = out_;
207 }
208
209 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
210
211 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
212
213 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
214
215 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
216
217 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
218
219 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
220
221 Ok(())
222 }
223 }
224
225 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
226 for &'a AdvisoryLockRange
227 where
228 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
229 {
230 #[inline]
231 fn encode(
232 self,
233 encoder_: &mut ___E,
234 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
235 _: (),
236 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
237 ::fidl_next::munge! {
238 let crate::wire::AdvisoryLockRange {
239
240 origin,
241 offset,
242 length,
243
244 } = out_;
245 }
246
247 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
248
249 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
250
251 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
252
253 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
254
255 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
256
257 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
258
259 Ok(())
260 }
261 }
262
263 unsafe impl<___E>
264 ::fidl_next::EncodeOption<
265 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockRange>,
266 ___E,
267 > for AdvisoryLockRange
268 where
269 ___E: ::fidl_next::Encoder + ?Sized,
270 AdvisoryLockRange: ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>,
271 {
272 #[inline]
273 fn encode_option(
274 this: ::core::option::Option<Self>,
275 encoder: &mut ___E,
276 out: &mut ::core::mem::MaybeUninit<
277 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockRange>,
278 >,
279 _: (),
280 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
281 if let Some(inner) = this {
282 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
283 ::fidl_next::WireBox::encode_present(out);
284 } else {
285 ::fidl_next::WireBox::encode_absent(out);
286 }
287
288 Ok(())
289 }
290 }
291
292 unsafe impl<'a, ___E>
293 ::fidl_next::EncodeOption<
294 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockRange>,
295 ___E,
296 > for &'a AdvisoryLockRange
297 where
298 ___E: ::fidl_next::Encoder + ?Sized,
299 &'a AdvisoryLockRange: ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>,
300 {
301 #[inline]
302 fn encode_option(
303 this: ::core::option::Option<Self>,
304 encoder: &mut ___E,
305 out: &mut ::core::mem::MaybeUninit<
306 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockRange>,
307 >,
308 _: (),
309 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
310 if let Some(inner) = this {
311 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
312 ::fidl_next::WireBox::encode_present(out);
313 } else {
314 ::fidl_next::WireBox::encode_absent(out);
315 }
316
317 Ok(())
318 }
319 }
320
321 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockRange> for AdvisoryLockRange {
322 #[inline]
323 fn from_wire(wire: crate::wire::AdvisoryLockRange) -> Self {
324 Self {
325 origin: ::fidl_next::FromWire::from_wire(wire.origin),
326
327 offset: ::fidl_next::FromWire::from_wire(wire.offset),
328
329 length: ::fidl_next::FromWire::from_wire(wire.length),
330 }
331 }
332 }
333
334 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockRange> for AdvisoryLockRange {
335 #[inline]
336 fn from_wire_ref(wire: &crate::wire::AdvisoryLockRange) -> Self {
337 Self {
338 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
339
340 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
341
342 length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length),
343 }
344 }
345 }
346
347 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
348 #[repr(u32)]
349 pub enum AdvisoryLockType {
350 Read = 1,
351 Write = 2,
352 Unlock = 3,
353 }
354 impl ::core::convert::TryFrom<u32> for AdvisoryLockType {
355 type Error = ::fidl_next::UnknownStrictEnumMemberError;
356 fn try_from(
357 value: u32,
358 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
359 match value {
360 1 => Ok(Self::Read),
361 2 => Ok(Self::Write),
362 3 => Ok(Self::Unlock),
363
364 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
365 }
366 }
367 }
368
369 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockType, ___E> for AdvisoryLockType
370 where
371 ___E: ?Sized,
372 {
373 #[inline]
374 fn encode(
375 self,
376 encoder: &mut ___E,
377 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockType>,
378 _: (),
379 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
380 ::fidl_next::Encode::encode(&self, encoder, out, ())
381 }
382 }
383
384 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockType, ___E>
385 for &'a AdvisoryLockType
386 where
387 ___E: ?Sized,
388 {
389 #[inline]
390 fn encode(
391 self,
392 encoder: &mut ___E,
393 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockType>,
394 _: (),
395 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
396 ::fidl_next::munge!(let crate::wire::AdvisoryLockType { value } = out);
397 let _ = value.write(::fidl_next::WireU32::from(match *self {
398 AdvisoryLockType::Read => 1,
399
400 AdvisoryLockType::Write => 2,
401
402 AdvisoryLockType::Unlock => 3,
403 }));
404
405 Ok(())
406 }
407 }
408
409 impl ::core::convert::From<crate::wire::AdvisoryLockType> for AdvisoryLockType {
410 fn from(wire: crate::wire::AdvisoryLockType) -> Self {
411 match u32::from(wire.value) {
412 1 => Self::Read,
413
414 2 => Self::Write,
415
416 3 => Self::Unlock,
417
418 _ => unsafe { ::core::hint::unreachable_unchecked() },
419 }
420 }
421 }
422
423 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockType> for AdvisoryLockType {
424 #[inline]
425 fn from_wire(wire: crate::wire::AdvisoryLockType) -> Self {
426 Self::from(wire)
427 }
428 }
429
430 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockType> for AdvisoryLockType {
431 #[inline]
432 fn from_wire_ref(wire: &crate::wire::AdvisoryLockType) -> Self {
433 Self::from(*wire)
434 }
435 }
436
437 #[derive(PartialEq, Clone, Debug, Default)]
438 pub struct AdvisoryLockRequest {
439 pub type_: ::core::option::Option<crate::natural::AdvisoryLockType>,
440
441 pub range: ::core::option::Option<crate::natural::AdvisoryLockRange>,
442
443 pub wait: ::core::option::Option<bool>,
444 }
445
446 impl AdvisoryLockRequest {
447 fn __max_ordinal(&self) -> usize {
448 if self.wait.is_some() {
449 return 3;
450 }
451
452 if self.range.is_some() {
453 return 2;
454 }
455
456 if self.type_.is_some() {
457 return 1;
458 }
459
460 0
461 }
462 }
463
464 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>
465 for AdvisoryLockRequest
466 where
467 ___E: ::fidl_next::Encoder + ?Sized,
468 {
469 #[inline]
470 fn encode(
471 mut self,
472 encoder: &mut ___E,
473 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRequest<'static>>,
474 _: (),
475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
476 ::fidl_next::munge!(let crate::wire::AdvisoryLockRequest { table } = out);
477
478 let max_ord = self.__max_ordinal();
479
480 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
481 ::fidl_next::Wire::zero_padding(&mut out);
482
483 let mut preallocated =
484 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
485
486 for i in 1..=max_ord {
487 match i {
488 3 => {
489 if let Some(value) = self.wait.take() {
490 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
491 value,
492 preallocated.encoder,
493 &mut out,
494 (),
495 )?;
496 } else {
497 ::fidl_next::WireEnvelope::encode_zero(&mut out)
498 }
499 }
500
501 2 => {
502 if let Some(value) = self.range.take() {
503 ::fidl_next::WireEnvelope::encode_value::<
504 crate::wire::AdvisoryLockRange,
505 ___E,
506 >(
507 value, preallocated.encoder, &mut out, ()
508 )?;
509 } else {
510 ::fidl_next::WireEnvelope::encode_zero(&mut out)
511 }
512 }
513
514 1 => {
515 if let Some(value) = self.type_.take() {
516 ::fidl_next::WireEnvelope::encode_value::<
517 crate::wire::AdvisoryLockType,
518 ___E,
519 >(
520 value, preallocated.encoder, &mut out, ()
521 )?;
522 } else {
523 ::fidl_next::WireEnvelope::encode_zero(&mut out)
524 }
525 }
526
527 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
528 }
529 unsafe {
530 preallocated.write_next(out.assume_init_ref());
531 }
532 }
533
534 ::fidl_next::WireTable::encode_len(table, max_ord);
535
536 Ok(())
537 }
538 }
539
540 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>
541 for &'a AdvisoryLockRequest
542 where
543 ___E: ::fidl_next::Encoder + ?Sized,
544 {
545 #[inline]
546 fn encode(
547 self,
548 encoder: &mut ___E,
549 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRequest<'static>>,
550 _: (),
551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
552 ::fidl_next::munge!(let crate::wire::AdvisoryLockRequest { table } = out);
553
554 let max_ord = self.__max_ordinal();
555
556 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
557 ::fidl_next::Wire::zero_padding(&mut out);
558
559 let mut preallocated =
560 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
561
562 for i in 1..=max_ord {
563 match i {
564 3 => {
565 if let Some(value) = &self.wait {
566 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
567 value,
568 preallocated.encoder,
569 &mut out,
570 (),
571 )?;
572 } else {
573 ::fidl_next::WireEnvelope::encode_zero(&mut out)
574 }
575 }
576
577 2 => {
578 if let Some(value) = &self.range {
579 ::fidl_next::WireEnvelope::encode_value::<
580 crate::wire::AdvisoryLockRange,
581 ___E,
582 >(
583 value, preallocated.encoder, &mut out, ()
584 )?;
585 } else {
586 ::fidl_next::WireEnvelope::encode_zero(&mut out)
587 }
588 }
589
590 1 => {
591 if let Some(value) = &self.type_ {
592 ::fidl_next::WireEnvelope::encode_value::<
593 crate::wire::AdvisoryLockType,
594 ___E,
595 >(
596 value, preallocated.encoder, &mut out, ()
597 )?;
598 } else {
599 ::fidl_next::WireEnvelope::encode_zero(&mut out)
600 }
601 }
602
603 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
604 }
605 unsafe {
606 preallocated.write_next(out.assume_init_ref());
607 }
608 }
609
610 ::fidl_next::WireTable::encode_len(table, max_ord);
611
612 Ok(())
613 }
614 }
615
616 impl<'de> ::fidl_next::FromWire<crate::wire::AdvisoryLockRequest<'de>> for AdvisoryLockRequest {
617 #[inline]
618 fn from_wire(wire_: crate::wire::AdvisoryLockRequest<'de>) -> Self {
619 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
620
621 let type_ = wire_.table.get(1);
622
623 let range = wire_.table.get(2);
624
625 let wait = wire_.table.get(3);
626
627 Self {
628 type_: type_.map(|envelope| {
629 ::fidl_next::FromWire::from_wire(unsafe {
630 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
631 })
632 }),
633
634 range: range.map(|envelope| {
635 ::fidl_next::FromWire::from_wire(unsafe {
636 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
637 })
638 }),
639
640 wait: wait.map(|envelope| {
641 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
642 }),
643 }
644 }
645 }
646
647 impl<'de> ::fidl_next::FromWireRef<crate::wire::AdvisoryLockRequest<'de>> for AdvisoryLockRequest {
648 #[inline]
649 fn from_wire_ref(wire: &crate::wire::AdvisoryLockRequest<'de>) -> Self {
650 Self {
651 type_: wire.table.get(1).map(|envelope| {
652 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
653 envelope.deref_unchecked::<crate::wire::AdvisoryLockType>()
654 })
655 }),
656
657 range: wire.table.get(2).map(|envelope| {
658 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
659 envelope.deref_unchecked::<crate::wire::AdvisoryLockRange>()
660 })
661 }),
662
663 wait: wire.table.get(3).map(|envelope| {
664 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
665 envelope.deref_unchecked::<bool>()
666 })
667 }),
668 }
669 }
670 }
671
672 #[derive(PartialEq, Clone, Debug)]
673 pub struct AdvisoryLockingAdvisoryLockRequest {
674 pub request: crate::natural::AdvisoryLockRequest,
675 }
676
677 unsafe impl<___E>
678 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
679 for AdvisoryLockingAdvisoryLockRequest
680 where
681 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
682 ___E: ::fidl_next::Encoder,
683 {
684 #[inline]
685 fn encode(
686 self,
687 encoder_: &mut ___E,
688 out_: &mut ::core::mem::MaybeUninit<
689 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
690 >,
691 _: (),
692 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
693 ::fidl_next::munge! {
694 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
695 request,
696
697 } = out_;
698 }
699
700 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
701
702 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
703
704 Ok(())
705 }
706 }
707
708 unsafe impl<'a, ___E>
709 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
710 for &'a AdvisoryLockingAdvisoryLockRequest
711 where
712 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
713 ___E: ::fidl_next::Encoder,
714 {
715 #[inline]
716 fn encode(
717 self,
718 encoder_: &mut ___E,
719 out_: &mut ::core::mem::MaybeUninit<
720 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
721 >,
722 _: (),
723 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
724 ::fidl_next::munge! {
725 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
726
727 request,
728
729 } = out_;
730 }
731
732 ::fidl_next::Encode::encode(&self.request, encoder_, request, ())?;
733
734 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
735
736 Ok(())
737 }
738 }
739
740 unsafe impl<___E>
741 ::fidl_next::EncodeOption<
742 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>>,
743 ___E,
744 > for AdvisoryLockingAdvisoryLockRequest
745 where
746 ___E: ::fidl_next::Encoder + ?Sized,
747 AdvisoryLockingAdvisoryLockRequest:
748 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>,
749 {
750 #[inline]
751 fn encode_option(
752 this: ::core::option::Option<Self>,
753 encoder: &mut ___E,
754 out: &mut ::core::mem::MaybeUninit<
755 ::fidl_next::WireBox<
756 'static,
757 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
758 >,
759 >,
760 _: (),
761 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
762 if let Some(inner) = this {
763 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
764 ::fidl_next::WireBox::encode_present(out);
765 } else {
766 ::fidl_next::WireBox::encode_absent(out);
767 }
768
769 Ok(())
770 }
771 }
772
773 unsafe impl<'a, ___E>
774 ::fidl_next::EncodeOption<
775 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>>,
776 ___E,
777 > for &'a AdvisoryLockingAdvisoryLockRequest
778 where
779 ___E: ::fidl_next::Encoder + ?Sized,
780 &'a AdvisoryLockingAdvisoryLockRequest:
781 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>,
782 {
783 #[inline]
784 fn encode_option(
785 this: ::core::option::Option<Self>,
786 encoder: &mut ___E,
787 out: &mut ::core::mem::MaybeUninit<
788 ::fidl_next::WireBox<
789 'static,
790 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
791 >,
792 >,
793 _: (),
794 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
795 if let Some(inner) = this {
796 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
797 ::fidl_next::WireBox::encode_present(out);
798 } else {
799 ::fidl_next::WireBox::encode_absent(out);
800 }
801
802 Ok(())
803 }
804 }
805
806 impl<'de> ::fidl_next::FromWire<crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>>
807 for AdvisoryLockingAdvisoryLockRequest
808 {
809 #[inline]
810 fn from_wire(wire: crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
811 Self { request: ::fidl_next::FromWire::from_wire(wire.request) }
812 }
813 }
814
815 impl<'de> ::fidl_next::FromWireRef<crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>>
816 for AdvisoryLockingAdvisoryLockRequest
817 {
818 #[inline]
819 fn from_wire_ref(wire: &crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
820 Self { request: ::fidl_next::FromWireRef::from_wire_ref(&wire.request) }
821 }
822 }
823
824 #[derive(PartialEq, Clone, Debug)]
825 #[repr(C)]
826 pub struct AdvisoryLockingAdvisoryLockResponse {}
827
828 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockResponse, ___E>
829 for AdvisoryLockingAdvisoryLockResponse
830 where
831 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
832 {
833 #[inline]
834 fn encode(
835 self,
836 encoder_: &mut ___E,
837 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockingAdvisoryLockResponse>,
838 _: (),
839 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
840 *out_ = ::core::mem::MaybeUninit::zeroed();
841
842 Ok(())
843 }
844 }
845
846 unsafe impl<'a, ___E>
847 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockResponse, ___E>
848 for &'a AdvisoryLockingAdvisoryLockResponse
849 where
850 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
851 {
852 #[inline]
853 fn encode(
854 self,
855 encoder_: &mut ___E,
856 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockingAdvisoryLockResponse>,
857 _: (),
858 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
859 ::fidl_next::munge! {
860 let crate::wire::AdvisoryLockingAdvisoryLockResponse {
861
862 _empty,
863
864
865 } = out_;
866 }
867
868 Ok(())
869 }
870 }
871
872 unsafe impl<___E>
873 ::fidl_next::EncodeOption<
874 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockResponse>,
875 ___E,
876 > for AdvisoryLockingAdvisoryLockResponse
877 where
878 ___E: ::fidl_next::Encoder + ?Sized,
879 AdvisoryLockingAdvisoryLockResponse:
880 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockResponse, ___E>,
881 {
882 #[inline]
883 fn encode_option(
884 this: ::core::option::Option<Self>,
885 encoder: &mut ___E,
886 out: &mut ::core::mem::MaybeUninit<
887 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockResponse>,
888 >,
889 _: (),
890 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
891 if let Some(inner) = this {
892 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
893 ::fidl_next::WireBox::encode_present(out);
894 } else {
895 ::fidl_next::WireBox::encode_absent(out);
896 }
897
898 Ok(())
899 }
900 }
901
902 unsafe impl<'a, ___E>
903 ::fidl_next::EncodeOption<
904 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockResponse>,
905 ___E,
906 > for &'a AdvisoryLockingAdvisoryLockResponse
907 where
908 ___E: ::fidl_next::Encoder + ?Sized,
909 &'a AdvisoryLockingAdvisoryLockResponse:
910 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockResponse, ___E>,
911 {
912 #[inline]
913 fn encode_option(
914 this: ::core::option::Option<Self>,
915 encoder: &mut ___E,
916 out: &mut ::core::mem::MaybeUninit<
917 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockResponse>,
918 >,
919 _: (),
920 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
921 if let Some(inner) = this {
922 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
923 ::fidl_next::WireBox::encode_present(out);
924 } else {
925 ::fidl_next::WireBox::encode_absent(out);
926 }
927
928 Ok(())
929 }
930 }
931
932 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockingAdvisoryLockResponse>
933 for AdvisoryLockingAdvisoryLockResponse
934 {
935 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
936 crate::wire::AdvisoryLockingAdvisoryLockResponse,
937 Self,
938 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
939
940 #[inline]
941 fn from_wire(wire: crate::wire::AdvisoryLockingAdvisoryLockResponse) -> Self {
942 Self {}
943 }
944 }
945
946 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockingAdvisoryLockResponse>
947 for AdvisoryLockingAdvisoryLockResponse
948 {
949 #[inline]
950 fn from_wire_ref(wire: &crate::wire::AdvisoryLockingAdvisoryLockResponse) -> Self {
951 Self {}
952 }
953 }
954
955 ::fidl_next::bitflags::bitflags! {
956 #[derive(
957 Clone,
958 Copy,
959 Debug,
960 PartialEq,
961 Eq,
962 Hash,
963 )]
964 pub struct AllocateMode: u32 {
965 const KEEP_SIZE = 1;
966 const UNSHARE_RANGE = 2;
967 const PUNCH_HOLE = 4;
968 const COLLAPSE_RANGE = 8;
969 const ZERO_RANGE = 16;
970 const INSERT_RANGE = 32;
971 const _ = !0;
972 }
973 }
974
975 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AllocateMode, ___E> for AllocateMode
976 where
977 ___E: ?Sized,
978 {
979 #[inline]
980 fn encode(
981 self,
982 encoder: &mut ___E,
983 out: &mut ::core::mem::MaybeUninit<crate::wire::AllocateMode>,
984 _: (),
985 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
986 ::fidl_next::Encode::encode(&self, encoder, out, ())
987 }
988 }
989
990 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AllocateMode, ___E> for &'a AllocateMode
991 where
992 ___E: ?Sized,
993 {
994 #[inline]
995 fn encode(
996 self,
997 _: &mut ___E,
998 out: &mut ::core::mem::MaybeUninit<crate::wire::AllocateMode>,
999 _: (),
1000 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1001 ::fidl_next::munge!(let crate::wire::AllocateMode { value } = out);
1002
1003 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1004 Ok(())
1005 }
1006 }
1007
1008 impl ::core::convert::From<crate::wire::AllocateMode> for AllocateMode {
1009 fn from(wire: crate::wire::AllocateMode) -> Self {
1010 Self::from_bits_retain(u32::from(wire.value))
1011 }
1012 }
1013
1014 impl ::fidl_next::FromWire<crate::wire::AllocateMode> for AllocateMode {
1015 #[inline]
1016 fn from_wire(wire: crate::wire::AllocateMode) -> Self {
1017 Self::from(wire)
1018 }
1019 }
1020
1021 impl ::fidl_next::FromWireRef<crate::wire::AllocateMode> for AllocateMode {
1022 #[inline]
1023 fn from_wire_ref(wire: &crate::wire::AllocateMode) -> Self {
1024 Self::from(*wire)
1025 }
1026 }
1027
1028 #[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"]
1029 pub type Rights = crate::natural::Operations;
1030
1031 #[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"]
1032 pub type Id = u64;
1033
1034 ::fidl_next::bitflags::bitflags! {
1035 #[doc = " DEPRECATED - Use Flags instead.\n"]#[derive(
1036 Clone,
1037 Copy,
1038 Debug,
1039 PartialEq,
1040 Eq,
1041 Hash,
1042 )]
1043 pub struct OpenFlags: u32 {
1044 #[doc = " Can read from target object.\n"]const RIGHT_READABLE = 1;
1045 #[doc = " Can write to target object.\n"]const RIGHT_WRITABLE = 2;
1046 #[doc = " Connection can map target object executable.\n"]const RIGHT_EXECUTABLE = 8;
1047 #[doc = " Create the object if it doesn\'t exist.\n"]const CREATE = 65536;
1048 #[doc = " (with Create) Fail if the object already exists.\n"]const CREATE_IF_ABSENT = 131072;
1049 #[doc = " Truncate the object before usage.\n"]const TRUNCATE = 262144;
1050 #[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;
1051 #[doc = " Seek to the end of the object before all writes.\n"]const APPEND = 1048576;
1052 #[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;
1053 #[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;
1054 #[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;
1055 #[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;
1056 #[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;
1057 #[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;
1058 #[doc = " Open the target object as a block device.\n"]const BLOCK_DEVICE = 16777216;
1059
1060 }
1061 }
1062
1063 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OpenFlags, ___E> for OpenFlags
1064 where
1065 ___E: ?Sized,
1066 {
1067 #[inline]
1068 fn encode(
1069 self,
1070 encoder: &mut ___E,
1071 out: &mut ::core::mem::MaybeUninit<crate::wire::OpenFlags>,
1072 _: (),
1073 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1074 ::fidl_next::Encode::encode(&self, encoder, out, ())
1075 }
1076 }
1077
1078 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::OpenFlags, ___E> for &'a OpenFlags
1079 where
1080 ___E: ?Sized,
1081 {
1082 #[inline]
1083 fn encode(
1084 self,
1085 _: &mut ___E,
1086 out: &mut ::core::mem::MaybeUninit<crate::wire::OpenFlags>,
1087 _: (),
1088 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1089 ::fidl_next::munge!(let crate::wire::OpenFlags { value } = out);
1090
1091 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1092 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1093 }
1094
1095 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1096 Ok(())
1097 }
1098 }
1099
1100 impl ::core::convert::From<crate::wire::OpenFlags> for OpenFlags {
1101 fn from(wire: crate::wire::OpenFlags) -> Self {
1102 Self::from_bits_retain(u32::from(wire.value))
1103 }
1104 }
1105
1106 impl ::fidl_next::FromWire<crate::wire::OpenFlags> for OpenFlags {
1107 #[inline]
1108 fn from_wire(wire: crate::wire::OpenFlags) -> Self {
1109 Self::from(wire)
1110 }
1111 }
1112
1113 impl ::fidl_next::FromWireRef<crate::wire::OpenFlags> for OpenFlags {
1114 #[inline]
1115 fn from_wire_ref(wire: &crate::wire::OpenFlags) -> Self {
1116 Self::from(*wire)
1117 }
1118 }
1119
1120 #[doc = " NodeAttributes defines generic information about a filesystem node.\n"]
1121 #[derive(PartialEq, Clone, Debug)]
1122 pub struct NodeAttributes {
1123 pub mode: u32,
1124
1125 pub id: u64,
1126
1127 pub content_size: u64,
1128
1129 pub storage_size: u64,
1130
1131 pub link_count: u64,
1132
1133 pub creation_time: u64,
1134
1135 pub modification_time: u64,
1136 }
1137
1138 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes, ___E> for NodeAttributes
1139 where
1140 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1141 {
1142 #[inline]
1143 fn encode(
1144 self,
1145 encoder_: &mut ___E,
1146 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
1147 _: (),
1148 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1149 ::fidl_next::munge! {
1150 let crate::wire::NodeAttributes {
1151 mode,
1152 id,
1153 content_size,
1154 storage_size,
1155 link_count,
1156 creation_time,
1157 modification_time,
1158
1159 } = out_;
1160 }
1161
1162 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1163
1164 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1165
1166 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1167
1168 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1169
1170 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
1171
1172 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(content_size.as_mut_ptr()) };
1173
1174 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
1175
1176 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(storage_size.as_mut_ptr()) };
1177
1178 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
1179
1180 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(link_count.as_mut_ptr()) };
1181
1182 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
1183
1184 let mut _field =
1185 unsafe { ::fidl_next::Slot::new_unchecked(creation_time.as_mut_ptr()) };
1186
1187 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
1188
1189 let mut _field =
1190 unsafe { ::fidl_next::Slot::new_unchecked(modification_time.as_mut_ptr()) };
1191
1192 Ok(())
1193 }
1194 }
1195
1196 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes, ___E> for &'a NodeAttributes
1197 where
1198 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1199 {
1200 #[inline]
1201 fn encode(
1202 self,
1203 encoder_: &mut ___E,
1204 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
1205 _: (),
1206 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1207 ::fidl_next::munge! {
1208 let crate::wire::NodeAttributes {
1209
1210 mode,
1211 id,
1212 content_size,
1213 storage_size,
1214 link_count,
1215 creation_time,
1216 modification_time,
1217
1218 } = out_;
1219 }
1220
1221 ::fidl_next::Encode::encode(&self.mode, encoder_, mode, ())?;
1222
1223 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1224
1225 ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1226
1227 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1228
1229 ::fidl_next::Encode::encode(&self.content_size, encoder_, content_size, ())?;
1230
1231 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(content_size.as_mut_ptr()) };
1232
1233 ::fidl_next::Encode::encode(&self.storage_size, encoder_, storage_size, ())?;
1234
1235 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(storage_size.as_mut_ptr()) };
1236
1237 ::fidl_next::Encode::encode(&self.link_count, encoder_, link_count, ())?;
1238
1239 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(link_count.as_mut_ptr()) };
1240
1241 ::fidl_next::Encode::encode(&self.creation_time, encoder_, creation_time, ())?;
1242
1243 let mut _field =
1244 unsafe { ::fidl_next::Slot::new_unchecked(creation_time.as_mut_ptr()) };
1245
1246 ::fidl_next::Encode::encode(&self.modification_time, encoder_, modification_time, ())?;
1247
1248 let mut _field =
1249 unsafe { ::fidl_next::Slot::new_unchecked(modification_time.as_mut_ptr()) };
1250
1251 Ok(())
1252 }
1253 }
1254
1255 unsafe impl<___E>
1256 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::NodeAttributes>, ___E>
1257 for NodeAttributes
1258 where
1259 ___E: ::fidl_next::Encoder + ?Sized,
1260 NodeAttributes: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
1261 {
1262 #[inline]
1263 fn encode_option(
1264 this: ::core::option::Option<Self>,
1265 encoder: &mut ___E,
1266 out: &mut ::core::mem::MaybeUninit<
1267 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes>,
1268 >,
1269 _: (),
1270 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1271 if let Some(inner) = this {
1272 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1273 ::fidl_next::WireBox::encode_present(out);
1274 } else {
1275 ::fidl_next::WireBox::encode_absent(out);
1276 }
1277
1278 Ok(())
1279 }
1280 }
1281
1282 unsafe impl<'a, ___E>
1283 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::NodeAttributes>, ___E>
1284 for &'a NodeAttributes
1285 where
1286 ___E: ::fidl_next::Encoder + ?Sized,
1287 &'a NodeAttributes: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
1288 {
1289 #[inline]
1290 fn encode_option(
1291 this: ::core::option::Option<Self>,
1292 encoder: &mut ___E,
1293 out: &mut ::core::mem::MaybeUninit<
1294 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes>,
1295 >,
1296 _: (),
1297 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1298 if let Some(inner) = this {
1299 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1300 ::fidl_next::WireBox::encode_present(out);
1301 } else {
1302 ::fidl_next::WireBox::encode_absent(out);
1303 }
1304
1305 Ok(())
1306 }
1307 }
1308
1309 impl ::fidl_next::FromWire<crate::wire::NodeAttributes> for NodeAttributes {
1310 #[inline]
1311 fn from_wire(wire: crate::wire::NodeAttributes) -> Self {
1312 Self {
1313 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1314
1315 id: ::fidl_next::FromWire::from_wire(wire.id),
1316
1317 content_size: ::fidl_next::FromWire::from_wire(wire.content_size),
1318
1319 storage_size: ::fidl_next::FromWire::from_wire(wire.storage_size),
1320
1321 link_count: ::fidl_next::FromWire::from_wire(wire.link_count),
1322
1323 creation_time: ::fidl_next::FromWire::from_wire(wire.creation_time),
1324
1325 modification_time: ::fidl_next::FromWire::from_wire(wire.modification_time),
1326 }
1327 }
1328 }
1329
1330 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributes> for NodeAttributes {
1331 #[inline]
1332 fn from_wire_ref(wire: &crate::wire::NodeAttributes) -> Self {
1333 Self {
1334 mode: ::fidl_next::FromWireRef::from_wire_ref(&wire.mode),
1335
1336 id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
1337
1338 content_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.content_size),
1339
1340 storage_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.storage_size),
1341
1342 link_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.link_count),
1343
1344 creation_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.creation_time),
1345
1346 modification_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.modification_time),
1347 }
1348 }
1349 }
1350
1351 ::fidl_next::bitflags::bitflags! {
1352 #[doc = " The fields of \'attributes\' which are used to update the Node are indicated\n by the \'flags\' argument.\n"]#[derive(
1353 Clone,
1354 Copy,
1355 Debug,
1356 PartialEq,
1357 Eq,
1358 Hash,
1359 )]
1360 pub struct NodeAttributeFlags: u32 {
1361 const CREATION_TIME = 1;
1362 const MODIFICATION_TIME = 2;
1363
1364 }
1365 }
1366
1367 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E> for NodeAttributeFlags
1368 where
1369 ___E: ?Sized,
1370 {
1371 #[inline]
1372 fn encode(
1373 self,
1374 encoder: &mut ___E,
1375 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributeFlags>,
1376 _: (),
1377 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1378 ::fidl_next::Encode::encode(&self, encoder, out, ())
1379 }
1380 }
1381
1382 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>
1383 for &'a NodeAttributeFlags
1384 where
1385 ___E: ?Sized,
1386 {
1387 #[inline]
1388 fn encode(
1389 self,
1390 _: &mut ___E,
1391 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributeFlags>,
1392 _: (),
1393 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1394 ::fidl_next::munge!(let crate::wire::NodeAttributeFlags { value } = out);
1395
1396 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1397 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1398 }
1399
1400 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1401 Ok(())
1402 }
1403 }
1404
1405 impl ::core::convert::From<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1406 fn from(wire: crate::wire::NodeAttributeFlags) -> Self {
1407 Self::from_bits_retain(u32::from(wire.value))
1408 }
1409 }
1410
1411 impl ::fidl_next::FromWire<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1412 #[inline]
1413 fn from_wire(wire: crate::wire::NodeAttributeFlags) -> Self {
1414 Self::from(wire)
1415 }
1416 }
1417
1418 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1419 #[inline]
1420 fn from_wire_ref(wire: &crate::wire::NodeAttributeFlags) -> Self {
1421 Self::from(*wire)
1422 }
1423 }
1424
1425 #[derive(PartialEq, Clone, Debug)]
1426 pub struct NodeQueryFilesystemResponse {
1427 pub s: i32,
1428
1429 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::FilesystemInfo>>,
1430 }
1431
1432 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
1433 for NodeQueryFilesystemResponse
1434 where
1435 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1436 ___E: ::fidl_next::Encoder,
1437 {
1438 #[inline]
1439 fn encode(
1440 self,
1441 encoder_: &mut ___E,
1442 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
1443 _: (),
1444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1445 ::fidl_next::munge! {
1446 let crate::wire::NodeQueryFilesystemResponse {
1447 s,
1448 info,
1449
1450 } = out_;
1451 }
1452
1453 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1454
1455 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1456
1457 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
1458
1459 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1460
1461 Ok(())
1462 }
1463 }
1464
1465 unsafe impl<'a, ___E>
1466 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
1467 for &'a NodeQueryFilesystemResponse
1468 where
1469 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1470 ___E: ::fidl_next::Encoder,
1471 {
1472 #[inline]
1473 fn encode(
1474 self,
1475 encoder_: &mut ___E,
1476 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
1477 _: (),
1478 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1479 ::fidl_next::munge! {
1480 let crate::wire::NodeQueryFilesystemResponse {
1481
1482 s,
1483 info,
1484
1485 } = out_;
1486 }
1487
1488 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1489
1490 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1491
1492 ::fidl_next::Encode::encode(&self.info, encoder_, info, ())?;
1493
1494 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1495
1496 Ok(())
1497 }
1498 }
1499
1500 unsafe impl<___E>
1501 ::fidl_next::EncodeOption<
1502 ::fidl_next::WireBox<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1503 ___E,
1504 > for NodeQueryFilesystemResponse
1505 where
1506 ___E: ::fidl_next::Encoder + ?Sized,
1507 NodeQueryFilesystemResponse:
1508 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>,
1509 {
1510 #[inline]
1511 fn encode_option(
1512 this: ::core::option::Option<Self>,
1513 encoder: &mut ___E,
1514 out: &mut ::core::mem::MaybeUninit<
1515 ::fidl_next::WireBox<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1516 >,
1517 _: (),
1518 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1519 if let Some(inner) = this {
1520 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1521 ::fidl_next::WireBox::encode_present(out);
1522 } else {
1523 ::fidl_next::WireBox::encode_absent(out);
1524 }
1525
1526 Ok(())
1527 }
1528 }
1529
1530 unsafe impl<'a, ___E>
1531 ::fidl_next::EncodeOption<
1532 ::fidl_next::WireBox<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1533 ___E,
1534 > for &'a NodeQueryFilesystemResponse
1535 where
1536 ___E: ::fidl_next::Encoder + ?Sized,
1537 &'a NodeQueryFilesystemResponse:
1538 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>,
1539 {
1540 #[inline]
1541 fn encode_option(
1542 this: ::core::option::Option<Self>,
1543 encoder: &mut ___E,
1544 out: &mut ::core::mem::MaybeUninit<
1545 ::fidl_next::WireBox<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1546 >,
1547 _: (),
1548 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1549 if let Some(inner) = this {
1550 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1551 ::fidl_next::WireBox::encode_present(out);
1552 } else {
1553 ::fidl_next::WireBox::encode_absent(out);
1554 }
1555
1556 Ok(())
1557 }
1558 }
1559
1560 impl<'de> ::fidl_next::FromWire<crate::wire::NodeQueryFilesystemResponse<'de>>
1561 for NodeQueryFilesystemResponse
1562 {
1563 #[inline]
1564 fn from_wire(wire: crate::wire::NodeQueryFilesystemResponse<'de>) -> Self {
1565 Self {
1566 s: ::fidl_next::FromWire::from_wire(wire.s),
1567
1568 info: ::fidl_next::FromWire::from_wire(wire.info),
1569 }
1570 }
1571 }
1572
1573 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeQueryFilesystemResponse<'de>>
1574 for NodeQueryFilesystemResponse
1575 {
1576 #[inline]
1577 fn from_wire_ref(wire: &crate::wire::NodeQueryFilesystemResponse<'de>) -> Self {
1578 Self {
1579 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
1580
1581 info: ::fidl_next::FromWireRef::from_wire_ref(&wire.info),
1582 }
1583 }
1584 }
1585
1586 #[derive(PartialEq, Clone, Debug)]
1587 #[repr(C)]
1588 pub struct NodeUpdateAttributesResponse {}
1589
1590 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeUpdateAttributesResponse, ___E>
1591 for NodeUpdateAttributesResponse
1592 where
1593 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1594 {
1595 #[inline]
1596 fn encode(
1597 self,
1598 encoder_: &mut ___E,
1599 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeUpdateAttributesResponse>,
1600 _: (),
1601 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1602 *out_ = ::core::mem::MaybeUninit::zeroed();
1603
1604 Ok(())
1605 }
1606 }
1607
1608 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeUpdateAttributesResponse, ___E>
1609 for &'a NodeUpdateAttributesResponse
1610 where
1611 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1612 {
1613 #[inline]
1614 fn encode(
1615 self,
1616 encoder_: &mut ___E,
1617 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeUpdateAttributesResponse>,
1618 _: (),
1619 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1620 ::fidl_next::munge! {
1621 let crate::wire::NodeUpdateAttributesResponse {
1622
1623 _empty,
1624
1625
1626 } = out_;
1627 }
1628
1629 Ok(())
1630 }
1631 }
1632
1633 unsafe impl<___E>
1634 ::fidl_next::EncodeOption<
1635 ::fidl_next::WireBox<'static, crate::wire::NodeUpdateAttributesResponse>,
1636 ___E,
1637 > for NodeUpdateAttributesResponse
1638 where
1639 ___E: ::fidl_next::Encoder + ?Sized,
1640 NodeUpdateAttributesResponse:
1641 ::fidl_next::Encode<crate::wire::NodeUpdateAttributesResponse, ___E>,
1642 {
1643 #[inline]
1644 fn encode_option(
1645 this: ::core::option::Option<Self>,
1646 encoder: &mut ___E,
1647 out: &mut ::core::mem::MaybeUninit<
1648 ::fidl_next::WireBox<'static, crate::wire::NodeUpdateAttributesResponse>,
1649 >,
1650 _: (),
1651 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1652 if let Some(inner) = this {
1653 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1654 ::fidl_next::WireBox::encode_present(out);
1655 } else {
1656 ::fidl_next::WireBox::encode_absent(out);
1657 }
1658
1659 Ok(())
1660 }
1661 }
1662
1663 unsafe impl<'a, ___E>
1664 ::fidl_next::EncodeOption<
1665 ::fidl_next::WireBox<'static, crate::wire::NodeUpdateAttributesResponse>,
1666 ___E,
1667 > for &'a NodeUpdateAttributesResponse
1668 where
1669 ___E: ::fidl_next::Encoder + ?Sized,
1670 &'a NodeUpdateAttributesResponse:
1671 ::fidl_next::Encode<crate::wire::NodeUpdateAttributesResponse, ___E>,
1672 {
1673 #[inline]
1674 fn encode_option(
1675 this: ::core::option::Option<Self>,
1676 encoder: &mut ___E,
1677 out: &mut ::core::mem::MaybeUninit<
1678 ::fidl_next::WireBox<'static, crate::wire::NodeUpdateAttributesResponse>,
1679 >,
1680 _: (),
1681 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1682 if let Some(inner) = this {
1683 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1684 ::fidl_next::WireBox::encode_present(out);
1685 } else {
1686 ::fidl_next::WireBox::encode_absent(out);
1687 }
1688
1689 Ok(())
1690 }
1691 }
1692
1693 impl ::fidl_next::FromWire<crate::wire::NodeUpdateAttributesResponse>
1694 for NodeUpdateAttributesResponse
1695 {
1696 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1697 crate::wire::NodeUpdateAttributesResponse,
1698 Self,
1699 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
1700
1701 #[inline]
1702 fn from_wire(wire: crate::wire::NodeUpdateAttributesResponse) -> Self {
1703 Self {}
1704 }
1705 }
1706
1707 impl ::fidl_next::FromWireRef<crate::wire::NodeUpdateAttributesResponse>
1708 for NodeUpdateAttributesResponse
1709 {
1710 #[inline]
1711 fn from_wire_ref(wire: &crate::wire::NodeUpdateAttributesResponse) -> Self {
1712 Self {}
1713 }
1714 }
1715
1716 #[derive(PartialEq, Clone, Debug)]
1717 #[repr(C)]
1718 pub struct NodeSyncResponse {}
1719
1720 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSyncResponse, ___E> for NodeSyncResponse
1721 where
1722 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1723 {
1724 #[inline]
1725 fn encode(
1726 self,
1727 encoder_: &mut ___E,
1728 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSyncResponse>,
1729 _: (),
1730 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1731 *out_ = ::core::mem::MaybeUninit::zeroed();
1732
1733 Ok(())
1734 }
1735 }
1736
1737 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSyncResponse, ___E>
1738 for &'a NodeSyncResponse
1739 where
1740 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1741 {
1742 #[inline]
1743 fn encode(
1744 self,
1745 encoder_: &mut ___E,
1746 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSyncResponse>,
1747 _: (),
1748 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1749 ::fidl_next::munge! {
1750 let crate::wire::NodeSyncResponse {
1751
1752 _empty,
1753
1754
1755 } = out_;
1756 }
1757
1758 Ok(())
1759 }
1760 }
1761
1762 unsafe impl<___E>
1763 ::fidl_next::EncodeOption<
1764 ::fidl_next::WireBox<'static, crate::wire::NodeSyncResponse>,
1765 ___E,
1766 > for NodeSyncResponse
1767 where
1768 ___E: ::fidl_next::Encoder + ?Sized,
1769 NodeSyncResponse: ::fidl_next::Encode<crate::wire::NodeSyncResponse, ___E>,
1770 {
1771 #[inline]
1772 fn encode_option(
1773 this: ::core::option::Option<Self>,
1774 encoder: &mut ___E,
1775 out: &mut ::core::mem::MaybeUninit<
1776 ::fidl_next::WireBox<'static, crate::wire::NodeSyncResponse>,
1777 >,
1778 _: (),
1779 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1780 if let Some(inner) = this {
1781 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1782 ::fidl_next::WireBox::encode_present(out);
1783 } else {
1784 ::fidl_next::WireBox::encode_absent(out);
1785 }
1786
1787 Ok(())
1788 }
1789 }
1790
1791 unsafe impl<'a, ___E>
1792 ::fidl_next::EncodeOption<
1793 ::fidl_next::WireBox<'static, crate::wire::NodeSyncResponse>,
1794 ___E,
1795 > for &'a NodeSyncResponse
1796 where
1797 ___E: ::fidl_next::Encoder + ?Sized,
1798 &'a NodeSyncResponse: ::fidl_next::Encode<crate::wire::NodeSyncResponse, ___E>,
1799 {
1800 #[inline]
1801 fn encode_option(
1802 this: ::core::option::Option<Self>,
1803 encoder: &mut ___E,
1804 out: &mut ::core::mem::MaybeUninit<
1805 ::fidl_next::WireBox<'static, crate::wire::NodeSyncResponse>,
1806 >,
1807 _: (),
1808 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1809 if let Some(inner) = this {
1810 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1811 ::fidl_next::WireBox::encode_present(out);
1812 } else {
1813 ::fidl_next::WireBox::encode_absent(out);
1814 }
1815
1816 Ok(())
1817 }
1818 }
1819
1820 impl ::fidl_next::FromWire<crate::wire::NodeSyncResponse> for NodeSyncResponse {
1821 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1822 crate::wire::NodeSyncResponse,
1823 Self,
1824 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
1825
1826 #[inline]
1827 fn from_wire(wire: crate::wire::NodeSyncResponse) -> Self {
1828 Self {}
1829 }
1830 }
1831
1832 impl ::fidl_next::FromWireRef<crate::wire::NodeSyncResponse> for NodeSyncResponse {
1833 #[inline]
1834 fn from_wire_ref(wire: &crate::wire::NodeSyncResponse) -> Self {
1835 Self {}
1836 }
1837 }
1838
1839 ::fidl_next::bitflags::bitflags! {
1840 #[derive(
1841 Clone,
1842 Copy,
1843 Debug,
1844 PartialEq,
1845 Eq,
1846 Hash,
1847 )]
1848 pub struct ModeType: u32 {
1849 const DO_NOT_USE = 2147483648;
1850
1851 }
1852 }
1853
1854 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ModeType, ___E> for ModeType
1855 where
1856 ___E: ?Sized,
1857 {
1858 #[inline]
1859 fn encode(
1860 self,
1861 encoder: &mut ___E,
1862 out: &mut ::core::mem::MaybeUninit<crate::wire::ModeType>,
1863 _: (),
1864 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1865 ::fidl_next::Encode::encode(&self, encoder, out, ())
1866 }
1867 }
1868
1869 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ModeType, ___E> for &'a ModeType
1870 where
1871 ___E: ?Sized,
1872 {
1873 #[inline]
1874 fn encode(
1875 self,
1876 _: &mut ___E,
1877 out: &mut ::core::mem::MaybeUninit<crate::wire::ModeType>,
1878 _: (),
1879 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1880 ::fidl_next::munge!(let crate::wire::ModeType { value } = out);
1881
1882 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1883 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1884 }
1885
1886 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1887 Ok(())
1888 }
1889 }
1890
1891 impl ::core::convert::From<crate::wire::ModeType> for ModeType {
1892 fn from(wire: crate::wire::ModeType) -> Self {
1893 Self::from_bits_retain(u32::from(wire.value))
1894 }
1895 }
1896
1897 impl ::fidl_next::FromWire<crate::wire::ModeType> for ModeType {
1898 #[inline]
1899 fn from_wire(wire: crate::wire::ModeType) -> Self {
1900 Self::from(wire)
1901 }
1902 }
1903
1904 impl ::fidl_next::FromWireRef<crate::wire::ModeType> for ModeType {
1905 #[inline]
1906 fn from_wire_ref(wire: &crate::wire::ModeType) -> Self {
1907 Self::from(*wire)
1908 }
1909 }
1910
1911 #[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"]
1912 pub type Path = ::std::string::String;
1913
1914 #[derive(PartialEq, Clone, Debug)]
1915 #[repr(C)]
1916 pub struct DirectoryReadDirentsRequest {
1917 pub max_bytes: u64,
1918 }
1919
1920 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
1921 for DirectoryReadDirentsRequest
1922 where
1923 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1924 {
1925 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1926 Self,
1927 crate::wire::DirectoryReadDirentsRequest,
1928 > = unsafe {
1929 ::fidl_next::CopyOptimization::enable_if(
1930 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
1931 .is_enabled(),
1932 )
1933 };
1934
1935 #[inline]
1936 fn encode(
1937 self,
1938 encoder_: &mut ___E,
1939 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
1940 _: (),
1941 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1942 ::fidl_next::munge! {
1943 let crate::wire::DirectoryReadDirentsRequest {
1944 max_bytes,
1945
1946 } = out_;
1947 }
1948
1949 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
1950
1951 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max_bytes.as_mut_ptr()) };
1952
1953 Ok(())
1954 }
1955 }
1956
1957 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
1958 for &'a DirectoryReadDirentsRequest
1959 where
1960 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1961 {
1962 #[inline]
1963 fn encode(
1964 self,
1965 encoder_: &mut ___E,
1966 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
1967 _: (),
1968 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1969 ::fidl_next::munge! {
1970 let crate::wire::DirectoryReadDirentsRequest {
1971
1972 max_bytes,
1973
1974 } = out_;
1975 }
1976
1977 ::fidl_next::Encode::encode(&self.max_bytes, encoder_, max_bytes, ())?;
1978
1979 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max_bytes.as_mut_ptr()) };
1980
1981 Ok(())
1982 }
1983 }
1984
1985 unsafe impl<___E>
1986 ::fidl_next::EncodeOption<
1987 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsRequest>,
1988 ___E,
1989 > for DirectoryReadDirentsRequest
1990 where
1991 ___E: ::fidl_next::Encoder + ?Sized,
1992 DirectoryReadDirentsRequest:
1993 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>,
1994 {
1995 #[inline]
1996 fn encode_option(
1997 this: ::core::option::Option<Self>,
1998 encoder: &mut ___E,
1999 out: &mut ::core::mem::MaybeUninit<
2000 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsRequest>,
2001 >,
2002 _: (),
2003 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2004 if let Some(inner) = this {
2005 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2006 ::fidl_next::WireBox::encode_present(out);
2007 } else {
2008 ::fidl_next::WireBox::encode_absent(out);
2009 }
2010
2011 Ok(())
2012 }
2013 }
2014
2015 unsafe impl<'a, ___E>
2016 ::fidl_next::EncodeOption<
2017 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsRequest>,
2018 ___E,
2019 > for &'a DirectoryReadDirentsRequest
2020 where
2021 ___E: ::fidl_next::Encoder + ?Sized,
2022 &'a DirectoryReadDirentsRequest:
2023 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>,
2024 {
2025 #[inline]
2026 fn encode_option(
2027 this: ::core::option::Option<Self>,
2028 encoder: &mut ___E,
2029 out: &mut ::core::mem::MaybeUninit<
2030 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsRequest>,
2031 >,
2032 _: (),
2033 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2034 if let Some(inner) = this {
2035 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2036 ::fidl_next::WireBox::encode_present(out);
2037 } else {
2038 ::fidl_next::WireBox::encode_absent(out);
2039 }
2040
2041 Ok(())
2042 }
2043 }
2044
2045 impl ::fidl_next::FromWire<crate::wire::DirectoryReadDirentsRequest>
2046 for DirectoryReadDirentsRequest
2047 {
2048 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2049 crate::wire::DirectoryReadDirentsRequest,
2050 Self,
2051 > = unsafe {
2052 ::fidl_next::CopyOptimization::enable_if(
2053 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
2054 .is_enabled(),
2055 )
2056 };
2057
2058 #[inline]
2059 fn from_wire(wire: crate::wire::DirectoryReadDirentsRequest) -> Self {
2060 Self { max_bytes: ::fidl_next::FromWire::from_wire(wire.max_bytes) }
2061 }
2062 }
2063
2064 impl ::fidl_next::FromWireRef<crate::wire::DirectoryReadDirentsRequest>
2065 for DirectoryReadDirentsRequest
2066 {
2067 #[inline]
2068 fn from_wire_ref(wire: &crate::wire::DirectoryReadDirentsRequest) -> Self {
2069 Self { max_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_bytes) }
2070 }
2071 }
2072
2073 #[derive(PartialEq, Clone, Debug)]
2074 pub struct DirectoryReadDirentsResponse {
2075 pub s: i32,
2076
2077 pub dirents: ::std::vec::Vec<u8>,
2078 }
2079
2080 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
2081 for DirectoryReadDirentsResponse
2082 where
2083 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2084 ___E: ::fidl_next::Encoder,
2085 {
2086 #[inline]
2087 fn encode(
2088 self,
2089 encoder_: &mut ___E,
2090 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
2091 _: (),
2092 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2093 ::fidl_next::munge! {
2094 let crate::wire::DirectoryReadDirentsResponse {
2095 s,
2096 dirents,
2097
2098 } = out_;
2099 }
2100
2101 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2102
2103 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2104
2105 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
2106
2107 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dirents.as_mut_ptr()) };
2108 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
2109
2110 Ok(())
2111 }
2112 }
2113
2114 unsafe impl<'a, ___E>
2115 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
2116 for &'a DirectoryReadDirentsResponse
2117 where
2118 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2119 ___E: ::fidl_next::Encoder,
2120 {
2121 #[inline]
2122 fn encode(
2123 self,
2124 encoder_: &mut ___E,
2125 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
2126 _: (),
2127 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2128 ::fidl_next::munge! {
2129 let crate::wire::DirectoryReadDirentsResponse {
2130
2131 s,
2132 dirents,
2133
2134 } = out_;
2135 }
2136
2137 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2138
2139 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2140
2141 ::fidl_next::Encode::encode(&self.dirents, encoder_, dirents, (8192, ()))?;
2142
2143 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dirents.as_mut_ptr()) };
2144 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
2145
2146 Ok(())
2147 }
2148 }
2149
2150 unsafe impl<___E>
2151 ::fidl_next::EncodeOption<
2152 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
2153 ___E,
2154 > for DirectoryReadDirentsResponse
2155 where
2156 ___E: ::fidl_next::Encoder + ?Sized,
2157 DirectoryReadDirentsResponse:
2158 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>,
2159 {
2160 #[inline]
2161 fn encode_option(
2162 this: ::core::option::Option<Self>,
2163 encoder: &mut ___E,
2164 out: &mut ::core::mem::MaybeUninit<
2165 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
2166 >,
2167 _: (),
2168 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2169 if let Some(inner) = this {
2170 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2171 ::fidl_next::WireBox::encode_present(out);
2172 } else {
2173 ::fidl_next::WireBox::encode_absent(out);
2174 }
2175
2176 Ok(())
2177 }
2178 }
2179
2180 unsafe impl<'a, ___E>
2181 ::fidl_next::EncodeOption<
2182 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
2183 ___E,
2184 > for &'a DirectoryReadDirentsResponse
2185 where
2186 ___E: ::fidl_next::Encoder + ?Sized,
2187 &'a DirectoryReadDirentsResponse:
2188 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>,
2189 {
2190 #[inline]
2191 fn encode_option(
2192 this: ::core::option::Option<Self>,
2193 encoder: &mut ___E,
2194 out: &mut ::core::mem::MaybeUninit<
2195 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
2196 >,
2197 _: (),
2198 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2199 if let Some(inner) = this {
2200 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2201 ::fidl_next::WireBox::encode_present(out);
2202 } else {
2203 ::fidl_next::WireBox::encode_absent(out);
2204 }
2205
2206 Ok(())
2207 }
2208 }
2209
2210 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryReadDirentsResponse<'de>>
2211 for DirectoryReadDirentsResponse
2212 {
2213 #[inline]
2214 fn from_wire(wire: crate::wire::DirectoryReadDirentsResponse<'de>) -> Self {
2215 Self {
2216 s: ::fidl_next::FromWire::from_wire(wire.s),
2217
2218 dirents: ::fidl_next::FromWire::from_wire(wire.dirents),
2219 }
2220 }
2221 }
2222
2223 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryReadDirentsResponse<'de>>
2224 for DirectoryReadDirentsResponse
2225 {
2226 #[inline]
2227 fn from_wire_ref(wire: &crate::wire::DirectoryReadDirentsResponse<'de>) -> Self {
2228 Self {
2229 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
2230
2231 dirents: ::fidl_next::FromWireRef::from_wire_ref(&wire.dirents),
2232 }
2233 }
2234 }
2235
2236 #[derive(PartialEq, Clone, Debug)]
2237 #[repr(C)]
2238 pub struct DirectoryRewindResponse {
2239 pub s: i32,
2240 }
2241
2242 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
2243 for DirectoryRewindResponse
2244 where
2245 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2246 {
2247 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2248 Self,
2249 crate::wire::DirectoryRewindResponse,
2250 > = unsafe {
2251 ::fidl_next::CopyOptimization::enable_if(
2252 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
2253 .is_enabled(),
2254 )
2255 };
2256
2257 #[inline]
2258 fn encode(
2259 self,
2260 encoder_: &mut ___E,
2261 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
2262 _: (),
2263 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2264 ::fidl_next::munge! {
2265 let crate::wire::DirectoryRewindResponse {
2266 s,
2267
2268 } = out_;
2269 }
2270
2271 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2272
2273 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2274
2275 Ok(())
2276 }
2277 }
2278
2279 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
2280 for &'a DirectoryRewindResponse
2281 where
2282 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2283 {
2284 #[inline]
2285 fn encode(
2286 self,
2287 encoder_: &mut ___E,
2288 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
2289 _: (),
2290 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2291 ::fidl_next::munge! {
2292 let crate::wire::DirectoryRewindResponse {
2293
2294 s,
2295
2296 } = out_;
2297 }
2298
2299 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2300
2301 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2302
2303 Ok(())
2304 }
2305 }
2306
2307 unsafe impl<___E>
2308 ::fidl_next::EncodeOption<
2309 ::fidl_next::WireBox<'static, crate::wire::DirectoryRewindResponse>,
2310 ___E,
2311 > for DirectoryRewindResponse
2312 where
2313 ___E: ::fidl_next::Encoder + ?Sized,
2314 DirectoryRewindResponse: ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
2315 {
2316 #[inline]
2317 fn encode_option(
2318 this: ::core::option::Option<Self>,
2319 encoder: &mut ___E,
2320 out: &mut ::core::mem::MaybeUninit<
2321 ::fidl_next::WireBox<'static, crate::wire::DirectoryRewindResponse>,
2322 >,
2323 _: (),
2324 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2325 if let Some(inner) = this {
2326 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2327 ::fidl_next::WireBox::encode_present(out);
2328 } else {
2329 ::fidl_next::WireBox::encode_absent(out);
2330 }
2331
2332 Ok(())
2333 }
2334 }
2335
2336 unsafe impl<'a, ___E>
2337 ::fidl_next::EncodeOption<
2338 ::fidl_next::WireBox<'static, crate::wire::DirectoryRewindResponse>,
2339 ___E,
2340 > for &'a DirectoryRewindResponse
2341 where
2342 ___E: ::fidl_next::Encoder + ?Sized,
2343 &'a DirectoryRewindResponse:
2344 ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
2345 {
2346 #[inline]
2347 fn encode_option(
2348 this: ::core::option::Option<Self>,
2349 encoder: &mut ___E,
2350 out: &mut ::core::mem::MaybeUninit<
2351 ::fidl_next::WireBox<'static, crate::wire::DirectoryRewindResponse>,
2352 >,
2353 _: (),
2354 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2355 if let Some(inner) = this {
2356 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2357 ::fidl_next::WireBox::encode_present(out);
2358 } else {
2359 ::fidl_next::WireBox::encode_absent(out);
2360 }
2361
2362 Ok(())
2363 }
2364 }
2365
2366 impl ::fidl_next::FromWire<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
2367 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2368 crate::wire::DirectoryRewindResponse,
2369 Self,
2370 > = unsafe {
2371 ::fidl_next::CopyOptimization::enable_if(
2372 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
2373 .is_enabled(),
2374 )
2375 };
2376
2377 #[inline]
2378 fn from_wire(wire: crate::wire::DirectoryRewindResponse) -> Self {
2379 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2380 }
2381 }
2382
2383 impl ::fidl_next::FromWireRef<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
2384 #[inline]
2385 fn from_wire_ref(wire: &crate::wire::DirectoryRewindResponse) -> Self {
2386 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2387 }
2388 }
2389
2390 #[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"]
2391 pub type Name = ::std::string::String;
2392
2393 #[derive(PartialEq, Clone, Debug)]
2394 #[repr(C)]
2395 pub struct DirectoryLinkResponse {
2396 pub s: i32,
2397 }
2398
2399 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2400 for DirectoryLinkResponse
2401 where
2402 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2403 {
2404 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2405 Self,
2406 crate::wire::DirectoryLinkResponse,
2407 > = unsafe {
2408 ::fidl_next::CopyOptimization::enable_if(
2409 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
2410 .is_enabled(),
2411 )
2412 };
2413
2414 #[inline]
2415 fn encode(
2416 self,
2417 encoder_: &mut ___E,
2418 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2419 _: (),
2420 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2421 ::fidl_next::munge! {
2422 let crate::wire::DirectoryLinkResponse {
2423 s,
2424
2425 } = out_;
2426 }
2427
2428 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2429
2430 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2431
2432 Ok(())
2433 }
2434 }
2435
2436 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2437 for &'a DirectoryLinkResponse
2438 where
2439 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2440 {
2441 #[inline]
2442 fn encode(
2443 self,
2444 encoder_: &mut ___E,
2445 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2446 _: (),
2447 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2448 ::fidl_next::munge! {
2449 let crate::wire::DirectoryLinkResponse {
2450
2451 s,
2452
2453 } = out_;
2454 }
2455
2456 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2457
2458 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2459
2460 Ok(())
2461 }
2462 }
2463
2464 unsafe impl<___E>
2465 ::fidl_next::EncodeOption<
2466 ::fidl_next::WireBox<'static, crate::wire::DirectoryLinkResponse>,
2467 ___E,
2468 > for DirectoryLinkResponse
2469 where
2470 ___E: ::fidl_next::Encoder + ?Sized,
2471 DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2472 {
2473 #[inline]
2474 fn encode_option(
2475 this: ::core::option::Option<Self>,
2476 encoder: &mut ___E,
2477 out: &mut ::core::mem::MaybeUninit<
2478 ::fidl_next::WireBox<'static, crate::wire::DirectoryLinkResponse>,
2479 >,
2480 _: (),
2481 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2482 if let Some(inner) = this {
2483 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2484 ::fidl_next::WireBox::encode_present(out);
2485 } else {
2486 ::fidl_next::WireBox::encode_absent(out);
2487 }
2488
2489 Ok(())
2490 }
2491 }
2492
2493 unsafe impl<'a, ___E>
2494 ::fidl_next::EncodeOption<
2495 ::fidl_next::WireBox<'static, crate::wire::DirectoryLinkResponse>,
2496 ___E,
2497 > for &'a DirectoryLinkResponse
2498 where
2499 ___E: ::fidl_next::Encoder + ?Sized,
2500 &'a DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2501 {
2502 #[inline]
2503 fn encode_option(
2504 this: ::core::option::Option<Self>,
2505 encoder: &mut ___E,
2506 out: &mut ::core::mem::MaybeUninit<
2507 ::fidl_next::WireBox<'static, crate::wire::DirectoryLinkResponse>,
2508 >,
2509 _: (),
2510 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2511 if let Some(inner) = this {
2512 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2513 ::fidl_next::WireBox::encode_present(out);
2514 } else {
2515 ::fidl_next::WireBox::encode_absent(out);
2516 }
2517
2518 Ok(())
2519 }
2520 }
2521
2522 impl ::fidl_next::FromWire<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2523 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2524 crate::wire::DirectoryLinkResponse,
2525 Self,
2526 > = unsafe {
2527 ::fidl_next::CopyOptimization::enable_if(
2528 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
2529 .is_enabled(),
2530 )
2531 };
2532
2533 #[inline]
2534 fn from_wire(wire: crate::wire::DirectoryLinkResponse) -> Self {
2535 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2536 }
2537 }
2538
2539 impl ::fidl_next::FromWireRef<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2540 #[inline]
2541 fn from_wire_ref(wire: &crate::wire::DirectoryLinkResponse) -> Self {
2542 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2543 }
2544 }
2545
2546 ::fidl_next::bitflags::bitflags! {
2547 #[derive(
2548 Clone,
2549 Copy,
2550 Debug,
2551 PartialEq,
2552 Eq,
2553 Hash,
2554 )]
2555 pub struct UnlinkFlags: u64 {
2556 #[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;
2557 const _ = !0;
2558 }
2559 }
2560
2561 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for UnlinkFlags
2562 where
2563 ___E: ?Sized,
2564 {
2565 #[inline]
2566 fn encode(
2567 self,
2568 encoder: &mut ___E,
2569 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2570 _: (),
2571 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2572 ::fidl_next::Encode::encode(&self, encoder, out, ())
2573 }
2574 }
2575
2576 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for &'a UnlinkFlags
2577 where
2578 ___E: ?Sized,
2579 {
2580 #[inline]
2581 fn encode(
2582 self,
2583 _: &mut ___E,
2584 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2585 _: (),
2586 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2587 ::fidl_next::munge!(let crate::wire::UnlinkFlags { value } = out);
2588
2589 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
2590 Ok(())
2591 }
2592 }
2593
2594 impl ::core::convert::From<crate::wire::UnlinkFlags> for UnlinkFlags {
2595 fn from(wire: crate::wire::UnlinkFlags) -> Self {
2596 Self::from_bits_retain(u64::from(wire.value))
2597 }
2598 }
2599
2600 impl ::fidl_next::FromWire<crate::wire::UnlinkFlags> for UnlinkFlags {
2601 #[inline]
2602 fn from_wire(wire: crate::wire::UnlinkFlags) -> Self {
2603 Self::from(wire)
2604 }
2605 }
2606
2607 impl ::fidl_next::FromWireRef<crate::wire::UnlinkFlags> for UnlinkFlags {
2608 #[inline]
2609 fn from_wire_ref(wire: &crate::wire::UnlinkFlags) -> Self {
2610 Self::from(*wire)
2611 }
2612 }
2613
2614 #[derive(PartialEq, Clone, Debug, Default)]
2615 pub struct UnlinkOptions {
2616 pub flags: ::core::option::Option<crate::natural::UnlinkFlags>,
2617 }
2618
2619 impl UnlinkOptions {
2620 fn __max_ordinal(&self) -> usize {
2621 if self.flags.is_some() {
2622 return 1;
2623 }
2624
2625 0
2626 }
2627 }
2628
2629 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E> for UnlinkOptions
2630 where
2631 ___E: ::fidl_next::Encoder + ?Sized,
2632 {
2633 #[inline]
2634 fn encode(
2635 mut self,
2636 encoder: &mut ___E,
2637 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2638 _: (),
2639 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2640 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2641
2642 let max_ord = self.__max_ordinal();
2643
2644 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2645 ::fidl_next::Wire::zero_padding(&mut out);
2646
2647 let mut preallocated =
2648 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2649
2650 for i in 1..=max_ord {
2651 match i {
2652 1 => {
2653 if let Some(value) = self.flags.take() {
2654 ::fidl_next::WireEnvelope::encode_value::<
2655 crate::wire::UnlinkFlags,
2656 ___E,
2657 >(
2658 value, preallocated.encoder, &mut out, ()
2659 )?;
2660 } else {
2661 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2662 }
2663 }
2664
2665 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2666 }
2667 unsafe {
2668 preallocated.write_next(out.assume_init_ref());
2669 }
2670 }
2671
2672 ::fidl_next::WireTable::encode_len(table, max_ord);
2673
2674 Ok(())
2675 }
2676 }
2677
2678 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>
2679 for &'a UnlinkOptions
2680 where
2681 ___E: ::fidl_next::Encoder + ?Sized,
2682 {
2683 #[inline]
2684 fn encode(
2685 self,
2686 encoder: &mut ___E,
2687 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2688 _: (),
2689 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2690 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2691
2692 let max_ord = self.__max_ordinal();
2693
2694 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2695 ::fidl_next::Wire::zero_padding(&mut out);
2696
2697 let mut preallocated =
2698 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2699
2700 for i in 1..=max_ord {
2701 match i {
2702 1 => {
2703 if let Some(value) = &self.flags {
2704 ::fidl_next::WireEnvelope::encode_value::<
2705 crate::wire::UnlinkFlags,
2706 ___E,
2707 >(
2708 value, preallocated.encoder, &mut out, ()
2709 )?;
2710 } else {
2711 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2712 }
2713 }
2714
2715 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2716 }
2717 unsafe {
2718 preallocated.write_next(out.assume_init_ref());
2719 }
2720 }
2721
2722 ::fidl_next::WireTable::encode_len(table, max_ord);
2723
2724 Ok(())
2725 }
2726 }
2727
2728 impl<'de> ::fidl_next::FromWire<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2729 #[inline]
2730 fn from_wire(wire_: crate::wire::UnlinkOptions<'de>) -> Self {
2731 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2732
2733 let flags = wire_.table.get(1);
2734
2735 Self {
2736 flags: flags.map(|envelope| {
2737 ::fidl_next::FromWire::from_wire(unsafe {
2738 envelope.read_unchecked::<crate::wire::UnlinkFlags>()
2739 })
2740 }),
2741 }
2742 }
2743 }
2744
2745 impl<'de> ::fidl_next::FromWireRef<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2746 #[inline]
2747 fn from_wire_ref(wire: &crate::wire::UnlinkOptions<'de>) -> Self {
2748 Self {
2749 flags: wire.table.get(1).map(|envelope| {
2750 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2751 envelope.deref_unchecked::<crate::wire::UnlinkFlags>()
2752 })
2753 }),
2754 }
2755 }
2756 }
2757
2758 #[derive(PartialEq, Clone, Debug)]
2759 pub struct DirectoryUnlinkRequest {
2760 pub name: ::std::string::String,
2761
2762 pub options: crate::natural::UnlinkOptions,
2763 }
2764
2765 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2766 for DirectoryUnlinkRequest
2767 where
2768 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2769 ___E: ::fidl_next::Encoder,
2770 {
2771 #[inline]
2772 fn encode(
2773 self,
2774 encoder_: &mut ___E,
2775 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2776 _: (),
2777 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2778 ::fidl_next::munge! {
2779 let crate::wire::DirectoryUnlinkRequest {
2780 name,
2781 options,
2782
2783 } = out_;
2784 }
2785
2786 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
2787
2788 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2789 ::fidl_next::Constrained::validate(_field, 255)?;
2790
2791 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2792
2793 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2794
2795 Ok(())
2796 }
2797 }
2798
2799 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2800 for &'a DirectoryUnlinkRequest
2801 where
2802 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2803 ___E: ::fidl_next::Encoder,
2804 {
2805 #[inline]
2806 fn encode(
2807 self,
2808 encoder_: &mut ___E,
2809 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2810 _: (),
2811 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2812 ::fidl_next::munge! {
2813 let crate::wire::DirectoryUnlinkRequest {
2814
2815 name,
2816 options,
2817
2818 } = out_;
2819 }
2820
2821 ::fidl_next::Encode::encode(&self.name, encoder_, name, 255)?;
2822
2823 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2824 ::fidl_next::Constrained::validate(_field, 255)?;
2825
2826 ::fidl_next::Encode::encode(&self.options, encoder_, options, ())?;
2827
2828 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2829
2830 Ok(())
2831 }
2832 }
2833
2834 unsafe impl<___E>
2835 ::fidl_next::EncodeOption<
2836 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2837 ___E,
2838 > for DirectoryUnlinkRequest
2839 where
2840 ___E: ::fidl_next::Encoder + ?Sized,
2841 DirectoryUnlinkRequest:
2842 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2843 {
2844 #[inline]
2845 fn encode_option(
2846 this: ::core::option::Option<Self>,
2847 encoder: &mut ___E,
2848 out: &mut ::core::mem::MaybeUninit<
2849 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2850 >,
2851 _: (),
2852 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2853 if let Some(inner) = this {
2854 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2855 ::fidl_next::WireBox::encode_present(out);
2856 } else {
2857 ::fidl_next::WireBox::encode_absent(out);
2858 }
2859
2860 Ok(())
2861 }
2862 }
2863
2864 unsafe impl<'a, ___E>
2865 ::fidl_next::EncodeOption<
2866 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2867 ___E,
2868 > for &'a DirectoryUnlinkRequest
2869 where
2870 ___E: ::fidl_next::Encoder + ?Sized,
2871 &'a DirectoryUnlinkRequest:
2872 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2873 {
2874 #[inline]
2875 fn encode_option(
2876 this: ::core::option::Option<Self>,
2877 encoder: &mut ___E,
2878 out: &mut ::core::mem::MaybeUninit<
2879 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2880 >,
2881 _: (),
2882 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2883 if let Some(inner) = this {
2884 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2885 ::fidl_next::WireBox::encode_present(out);
2886 } else {
2887 ::fidl_next::WireBox::encode_absent(out);
2888 }
2889
2890 Ok(())
2891 }
2892 }
2893
2894 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryUnlinkRequest<'de>>
2895 for DirectoryUnlinkRequest
2896 {
2897 #[inline]
2898 fn from_wire(wire: crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2899 Self {
2900 name: ::fidl_next::FromWire::from_wire(wire.name),
2901
2902 options: ::fidl_next::FromWire::from_wire(wire.options),
2903 }
2904 }
2905 }
2906
2907 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryUnlinkRequest<'de>>
2908 for DirectoryUnlinkRequest
2909 {
2910 #[inline]
2911 fn from_wire_ref(wire: &crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2912 Self {
2913 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
2914
2915 options: ::fidl_next::FromWireRef::from_wire_ref(&wire.options),
2916 }
2917 }
2918 }
2919
2920 #[derive(PartialEq, Clone, Debug)]
2921 #[repr(C)]
2922 pub struct DirectoryUnlinkResponse {}
2923
2924 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkResponse, ___E>
2925 for DirectoryUnlinkResponse
2926 where
2927 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2928 {
2929 #[inline]
2930 fn encode(
2931 self,
2932 encoder_: &mut ___E,
2933 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkResponse>,
2934 _: (),
2935 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2936 *out_ = ::core::mem::MaybeUninit::zeroed();
2937
2938 Ok(())
2939 }
2940 }
2941
2942 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkResponse, ___E>
2943 for &'a DirectoryUnlinkResponse
2944 where
2945 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2946 {
2947 #[inline]
2948 fn encode(
2949 self,
2950 encoder_: &mut ___E,
2951 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkResponse>,
2952 _: (),
2953 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2954 ::fidl_next::munge! {
2955 let crate::wire::DirectoryUnlinkResponse {
2956
2957 _empty,
2958
2959
2960 } = out_;
2961 }
2962
2963 Ok(())
2964 }
2965 }
2966
2967 unsafe impl<___E>
2968 ::fidl_next::EncodeOption<
2969 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkResponse>,
2970 ___E,
2971 > for DirectoryUnlinkResponse
2972 where
2973 ___E: ::fidl_next::Encoder + ?Sized,
2974 DirectoryUnlinkResponse: ::fidl_next::Encode<crate::wire::DirectoryUnlinkResponse, ___E>,
2975 {
2976 #[inline]
2977 fn encode_option(
2978 this: ::core::option::Option<Self>,
2979 encoder: &mut ___E,
2980 out: &mut ::core::mem::MaybeUninit<
2981 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkResponse>,
2982 >,
2983 _: (),
2984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2985 if let Some(inner) = this {
2986 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2987 ::fidl_next::WireBox::encode_present(out);
2988 } else {
2989 ::fidl_next::WireBox::encode_absent(out);
2990 }
2991
2992 Ok(())
2993 }
2994 }
2995
2996 unsafe impl<'a, ___E>
2997 ::fidl_next::EncodeOption<
2998 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkResponse>,
2999 ___E,
3000 > for &'a DirectoryUnlinkResponse
3001 where
3002 ___E: ::fidl_next::Encoder + ?Sized,
3003 &'a DirectoryUnlinkResponse:
3004 ::fidl_next::Encode<crate::wire::DirectoryUnlinkResponse, ___E>,
3005 {
3006 #[inline]
3007 fn encode_option(
3008 this: ::core::option::Option<Self>,
3009 encoder: &mut ___E,
3010 out: &mut ::core::mem::MaybeUninit<
3011 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkResponse>,
3012 >,
3013 _: (),
3014 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3015 if let Some(inner) = this {
3016 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3017 ::fidl_next::WireBox::encode_present(out);
3018 } else {
3019 ::fidl_next::WireBox::encode_absent(out);
3020 }
3021
3022 Ok(())
3023 }
3024 }
3025
3026 impl ::fidl_next::FromWire<crate::wire::DirectoryUnlinkResponse> for DirectoryUnlinkResponse {
3027 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3028 crate::wire::DirectoryUnlinkResponse,
3029 Self,
3030 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3031
3032 #[inline]
3033 fn from_wire(wire: crate::wire::DirectoryUnlinkResponse) -> Self {
3034 Self {}
3035 }
3036 }
3037
3038 impl ::fidl_next::FromWireRef<crate::wire::DirectoryUnlinkResponse> for DirectoryUnlinkResponse {
3039 #[inline]
3040 fn from_wire_ref(wire: &crate::wire::DirectoryUnlinkResponse) -> Self {
3041 Self {}
3042 }
3043 }
3044
3045 #[derive(PartialEq, Clone, Debug)]
3046 #[repr(C)]
3047 pub struct DirectoryRenameResponse {}
3048
3049 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRenameResponse, ___E>
3050 for DirectoryRenameResponse
3051 where
3052 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3053 {
3054 #[inline]
3055 fn encode(
3056 self,
3057 encoder_: &mut ___E,
3058 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameResponse>,
3059 _: (),
3060 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3061 *out_ = ::core::mem::MaybeUninit::zeroed();
3062
3063 Ok(())
3064 }
3065 }
3066
3067 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryRenameResponse, ___E>
3068 for &'a DirectoryRenameResponse
3069 where
3070 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3071 {
3072 #[inline]
3073 fn encode(
3074 self,
3075 encoder_: &mut ___E,
3076 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameResponse>,
3077 _: (),
3078 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3079 ::fidl_next::munge! {
3080 let crate::wire::DirectoryRenameResponse {
3081
3082 _empty,
3083
3084
3085 } = out_;
3086 }
3087
3088 Ok(())
3089 }
3090 }
3091
3092 unsafe impl<___E>
3093 ::fidl_next::EncodeOption<
3094 ::fidl_next::WireBox<'static, crate::wire::DirectoryRenameResponse>,
3095 ___E,
3096 > for DirectoryRenameResponse
3097 where
3098 ___E: ::fidl_next::Encoder + ?Sized,
3099 DirectoryRenameResponse: ::fidl_next::Encode<crate::wire::DirectoryRenameResponse, ___E>,
3100 {
3101 #[inline]
3102 fn encode_option(
3103 this: ::core::option::Option<Self>,
3104 encoder: &mut ___E,
3105 out: &mut ::core::mem::MaybeUninit<
3106 ::fidl_next::WireBox<'static, crate::wire::DirectoryRenameResponse>,
3107 >,
3108 _: (),
3109 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3110 if let Some(inner) = this {
3111 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3112 ::fidl_next::WireBox::encode_present(out);
3113 } else {
3114 ::fidl_next::WireBox::encode_absent(out);
3115 }
3116
3117 Ok(())
3118 }
3119 }
3120
3121 unsafe impl<'a, ___E>
3122 ::fidl_next::EncodeOption<
3123 ::fidl_next::WireBox<'static, crate::wire::DirectoryRenameResponse>,
3124 ___E,
3125 > for &'a DirectoryRenameResponse
3126 where
3127 ___E: ::fidl_next::Encoder + ?Sized,
3128 &'a DirectoryRenameResponse:
3129 ::fidl_next::Encode<crate::wire::DirectoryRenameResponse, ___E>,
3130 {
3131 #[inline]
3132 fn encode_option(
3133 this: ::core::option::Option<Self>,
3134 encoder: &mut ___E,
3135 out: &mut ::core::mem::MaybeUninit<
3136 ::fidl_next::WireBox<'static, crate::wire::DirectoryRenameResponse>,
3137 >,
3138 _: (),
3139 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3140 if let Some(inner) = this {
3141 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3142 ::fidl_next::WireBox::encode_present(out);
3143 } else {
3144 ::fidl_next::WireBox::encode_absent(out);
3145 }
3146
3147 Ok(())
3148 }
3149 }
3150
3151 impl ::fidl_next::FromWire<crate::wire::DirectoryRenameResponse> for DirectoryRenameResponse {
3152 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3153 crate::wire::DirectoryRenameResponse,
3154 Self,
3155 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3156
3157 #[inline]
3158 fn from_wire(wire: crate::wire::DirectoryRenameResponse) -> Self {
3159 Self {}
3160 }
3161 }
3162
3163 impl ::fidl_next::FromWireRef<crate::wire::DirectoryRenameResponse> for DirectoryRenameResponse {
3164 #[inline]
3165 fn from_wire_ref(wire: &crate::wire::DirectoryRenameResponse) -> Self {
3166 Self {}
3167 }
3168 }
3169
3170 ::fidl_next::bitflags::bitflags! {
3171 #[derive(
3172 Clone,
3173 Copy,
3174 Debug,
3175 PartialEq,
3176 Eq,
3177 Hash,
3178 )]
3179 pub struct WatchMask: u32 {
3180 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.DELETED`.\n"]const DELETED = 1;
3181 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.ADDED`.\n"]const ADDED = 2;
3182 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.REMOVED`.\n"]const REMOVED = 4;
3183 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.EXISTING`.\n"]const EXISTING = 8;
3184 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.IDLE`.\n"]const IDLE = 16;
3185
3186 }
3187 }
3188
3189 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for WatchMask
3190 where
3191 ___E: ?Sized,
3192 {
3193 #[inline]
3194 fn encode(
3195 self,
3196 encoder: &mut ___E,
3197 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
3198 _: (),
3199 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3200 ::fidl_next::Encode::encode(&self, encoder, out, ())
3201 }
3202 }
3203
3204 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for &'a WatchMask
3205 where
3206 ___E: ?Sized,
3207 {
3208 #[inline]
3209 fn encode(
3210 self,
3211 _: &mut ___E,
3212 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
3213 _: (),
3214 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3215 ::fidl_next::munge!(let crate::wire::WatchMask { value } = out);
3216
3217 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
3218 return Err(::fidl_next::EncodeError::InvalidStrictBits);
3219 }
3220
3221 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
3222 Ok(())
3223 }
3224 }
3225
3226 impl ::core::convert::From<crate::wire::WatchMask> for WatchMask {
3227 fn from(wire: crate::wire::WatchMask) -> Self {
3228 Self::from_bits_retain(u32::from(wire.value))
3229 }
3230 }
3231
3232 impl ::fidl_next::FromWire<crate::wire::WatchMask> for WatchMask {
3233 #[inline]
3234 fn from_wire(wire: crate::wire::WatchMask) -> Self {
3235 Self::from(wire)
3236 }
3237 }
3238
3239 impl ::fidl_next::FromWireRef<crate::wire::WatchMask> for WatchMask {
3240 #[inline]
3241 fn from_wire_ref(wire: &crate::wire::WatchMask) -> Self {
3242 Self::from(*wire)
3243 }
3244 }
3245
3246 #[derive(PartialEq, Clone, Debug)]
3247 #[repr(C)]
3248 pub struct DirectoryWatchResponse {
3249 pub s: i32,
3250 }
3251
3252 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
3253 for DirectoryWatchResponse
3254 where
3255 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3256 {
3257 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3258 Self,
3259 crate::wire::DirectoryWatchResponse,
3260 > = unsafe {
3261 ::fidl_next::CopyOptimization::enable_if(
3262 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
3263 .is_enabled(),
3264 )
3265 };
3266
3267 #[inline]
3268 fn encode(
3269 self,
3270 encoder_: &mut ___E,
3271 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
3272 _: (),
3273 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3274 ::fidl_next::munge! {
3275 let crate::wire::DirectoryWatchResponse {
3276 s,
3277
3278 } = out_;
3279 }
3280
3281 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3282
3283 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3284
3285 Ok(())
3286 }
3287 }
3288
3289 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
3290 for &'a DirectoryWatchResponse
3291 where
3292 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3293 {
3294 #[inline]
3295 fn encode(
3296 self,
3297 encoder_: &mut ___E,
3298 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
3299 _: (),
3300 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3301 ::fidl_next::munge! {
3302 let crate::wire::DirectoryWatchResponse {
3303
3304 s,
3305
3306 } = out_;
3307 }
3308
3309 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3310
3311 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3312
3313 Ok(())
3314 }
3315 }
3316
3317 unsafe impl<___E>
3318 ::fidl_next::EncodeOption<
3319 ::fidl_next::WireBox<'static, crate::wire::DirectoryWatchResponse>,
3320 ___E,
3321 > for DirectoryWatchResponse
3322 where
3323 ___E: ::fidl_next::Encoder + ?Sized,
3324 DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
3325 {
3326 #[inline]
3327 fn encode_option(
3328 this: ::core::option::Option<Self>,
3329 encoder: &mut ___E,
3330 out: &mut ::core::mem::MaybeUninit<
3331 ::fidl_next::WireBox<'static, crate::wire::DirectoryWatchResponse>,
3332 >,
3333 _: (),
3334 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3335 if let Some(inner) = this {
3336 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3337 ::fidl_next::WireBox::encode_present(out);
3338 } else {
3339 ::fidl_next::WireBox::encode_absent(out);
3340 }
3341
3342 Ok(())
3343 }
3344 }
3345
3346 unsafe impl<'a, ___E>
3347 ::fidl_next::EncodeOption<
3348 ::fidl_next::WireBox<'static, crate::wire::DirectoryWatchResponse>,
3349 ___E,
3350 > for &'a DirectoryWatchResponse
3351 where
3352 ___E: ::fidl_next::Encoder + ?Sized,
3353 &'a DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
3354 {
3355 #[inline]
3356 fn encode_option(
3357 this: ::core::option::Option<Self>,
3358 encoder: &mut ___E,
3359 out: &mut ::core::mem::MaybeUninit<
3360 ::fidl_next::WireBox<'static, crate::wire::DirectoryWatchResponse>,
3361 >,
3362 _: (),
3363 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3364 if let Some(inner) = this {
3365 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3366 ::fidl_next::WireBox::encode_present(out);
3367 } else {
3368 ::fidl_next::WireBox::encode_absent(out);
3369 }
3370
3371 Ok(())
3372 }
3373 }
3374
3375 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
3376 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3377 crate::wire::DirectoryWatchResponse,
3378 Self,
3379 > = unsafe {
3380 ::fidl_next::CopyOptimization::enable_if(
3381 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
3382 .is_enabled(),
3383 )
3384 };
3385
3386 #[inline]
3387 fn from_wire(wire: crate::wire::DirectoryWatchResponse) -> Self {
3388 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
3389 }
3390 }
3391
3392 impl ::fidl_next::FromWireRef<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
3393 #[inline]
3394 fn from_wire_ref(wire: &crate::wire::DirectoryWatchResponse) -> Self {
3395 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
3396 }
3397 }
3398
3399 pub type SymlinkTarget = ::std::vec::Vec<u8>;
3400
3401 #[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"]
3402 pub type ExtendedAttributeName = ::std::vec::Vec<u8>;
3403
3404 #[derive(PartialEq, Clone, Debug)]
3405 pub struct NodeGetExtendedAttributeRequest {
3406 pub name: ::std::vec::Vec<u8>,
3407 }
3408
3409 unsafe impl<___E>
3410 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
3411 for NodeGetExtendedAttributeRequest
3412 where
3413 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3414 ___E: ::fidl_next::Encoder,
3415 {
3416 #[inline]
3417 fn encode(
3418 self,
3419 encoder_: &mut ___E,
3420 out_: &mut ::core::mem::MaybeUninit<
3421 crate::wire::NodeGetExtendedAttributeRequest<'static>,
3422 >,
3423 _: (),
3424 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3425 ::fidl_next::munge! {
3426 let crate::wire::NodeGetExtendedAttributeRequest {
3427 name,
3428
3429 } = out_;
3430 }
3431
3432 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
3433
3434 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3435 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3436
3437 Ok(())
3438 }
3439 }
3440
3441 unsafe impl<'a, ___E>
3442 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
3443 for &'a NodeGetExtendedAttributeRequest
3444 where
3445 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3446 ___E: ::fidl_next::Encoder,
3447 {
3448 #[inline]
3449 fn encode(
3450 self,
3451 encoder_: &mut ___E,
3452 out_: &mut ::core::mem::MaybeUninit<
3453 crate::wire::NodeGetExtendedAttributeRequest<'static>,
3454 >,
3455 _: (),
3456 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3457 ::fidl_next::munge! {
3458 let crate::wire::NodeGetExtendedAttributeRequest {
3459
3460 name,
3461
3462 } = out_;
3463 }
3464
3465 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
3466
3467 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3468 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3469
3470 Ok(())
3471 }
3472 }
3473
3474 unsafe impl<___E>
3475 ::fidl_next::EncodeOption<
3476 ::fidl_next::WireBox<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
3477 ___E,
3478 > for NodeGetExtendedAttributeRequest
3479 where
3480 ___E: ::fidl_next::Encoder + ?Sized,
3481 NodeGetExtendedAttributeRequest:
3482 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
3483 {
3484 #[inline]
3485 fn encode_option(
3486 this: ::core::option::Option<Self>,
3487 encoder: &mut ___E,
3488 out: &mut ::core::mem::MaybeUninit<
3489 ::fidl_next::WireBox<
3490 'static,
3491 crate::wire::NodeGetExtendedAttributeRequest<'static>,
3492 >,
3493 >,
3494 _: (),
3495 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3496 if let Some(inner) = this {
3497 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3498 ::fidl_next::WireBox::encode_present(out);
3499 } else {
3500 ::fidl_next::WireBox::encode_absent(out);
3501 }
3502
3503 Ok(())
3504 }
3505 }
3506
3507 unsafe impl<'a, ___E>
3508 ::fidl_next::EncodeOption<
3509 ::fidl_next::WireBox<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
3510 ___E,
3511 > for &'a NodeGetExtendedAttributeRequest
3512 where
3513 ___E: ::fidl_next::Encoder + ?Sized,
3514 &'a NodeGetExtendedAttributeRequest:
3515 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
3516 {
3517 #[inline]
3518 fn encode_option(
3519 this: ::core::option::Option<Self>,
3520 encoder: &mut ___E,
3521 out: &mut ::core::mem::MaybeUninit<
3522 ::fidl_next::WireBox<
3523 'static,
3524 crate::wire::NodeGetExtendedAttributeRequest<'static>,
3525 >,
3526 >,
3527 _: (),
3528 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3529 if let Some(inner) = this {
3530 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3531 ::fidl_next::WireBox::encode_present(out);
3532 } else {
3533 ::fidl_next::WireBox::encode_absent(out);
3534 }
3535
3536 Ok(())
3537 }
3538 }
3539
3540 impl<'de> ::fidl_next::FromWire<crate::wire::NodeGetExtendedAttributeRequest<'de>>
3541 for NodeGetExtendedAttributeRequest
3542 {
3543 #[inline]
3544 fn from_wire(wire: crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
3545 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
3546 }
3547 }
3548
3549 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeGetExtendedAttributeRequest<'de>>
3550 for NodeGetExtendedAttributeRequest
3551 {
3552 #[inline]
3553 fn from_wire_ref(wire: &crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
3554 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
3555 }
3556 }
3557
3558 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3559 #[repr(u32)]
3560 pub enum SetExtendedAttributeMode {
3561 Set = 1,
3562 Create = 2,
3563 Replace = 3,
3564 }
3565 impl ::core::convert::TryFrom<u32> for SetExtendedAttributeMode {
3566 type Error = ::fidl_next::UnknownStrictEnumMemberError;
3567 fn try_from(
3568 value: u32,
3569 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
3570 match value {
3571 1 => Ok(Self::Set),
3572 2 => Ok(Self::Create),
3573 3 => Ok(Self::Replace),
3574
3575 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
3576 }
3577 }
3578 }
3579
3580 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
3581 for SetExtendedAttributeMode
3582 where
3583 ___E: ?Sized,
3584 {
3585 #[inline]
3586 fn encode(
3587 self,
3588 encoder: &mut ___E,
3589 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
3590 _: (),
3591 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3592 ::fidl_next::Encode::encode(&self, encoder, out, ())
3593 }
3594 }
3595
3596 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
3597 for &'a SetExtendedAttributeMode
3598 where
3599 ___E: ?Sized,
3600 {
3601 #[inline]
3602 fn encode(
3603 self,
3604 encoder: &mut ___E,
3605 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
3606 _: (),
3607 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3608 ::fidl_next::munge!(let crate::wire::SetExtendedAttributeMode { value } = out);
3609 let _ = value.write(::fidl_next::WireU32::from(match *self {
3610 SetExtendedAttributeMode::Set => 1,
3611
3612 SetExtendedAttributeMode::Create => 2,
3613
3614 SetExtendedAttributeMode::Replace => 3,
3615 }));
3616
3617 Ok(())
3618 }
3619 }
3620
3621 impl ::core::convert::From<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3622 fn from(wire: crate::wire::SetExtendedAttributeMode) -> Self {
3623 match u32::from(wire.value) {
3624 1 => Self::Set,
3625
3626 2 => Self::Create,
3627
3628 3 => Self::Replace,
3629
3630 _ => unsafe { ::core::hint::unreachable_unchecked() },
3631 }
3632 }
3633 }
3634
3635 impl ::fidl_next::FromWire<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3636 #[inline]
3637 fn from_wire(wire: crate::wire::SetExtendedAttributeMode) -> Self {
3638 Self::from(wire)
3639 }
3640 }
3641
3642 impl ::fidl_next::FromWireRef<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3643 #[inline]
3644 fn from_wire_ref(wire: &crate::wire::SetExtendedAttributeMode) -> Self {
3645 Self::from(*wire)
3646 }
3647 }
3648
3649 #[derive(PartialEq, Clone, Debug)]
3650 #[repr(C)]
3651 pub struct NodeSetExtendedAttributeResponse {}
3652
3653 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeResponse, ___E>
3654 for NodeSetExtendedAttributeResponse
3655 where
3656 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3657 {
3658 #[inline]
3659 fn encode(
3660 self,
3661 encoder_: &mut ___E,
3662 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetExtendedAttributeResponse>,
3663 _: (),
3664 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3665 *out_ = ::core::mem::MaybeUninit::zeroed();
3666
3667 Ok(())
3668 }
3669 }
3670
3671 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeResponse, ___E>
3672 for &'a NodeSetExtendedAttributeResponse
3673 where
3674 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3675 {
3676 #[inline]
3677 fn encode(
3678 self,
3679 encoder_: &mut ___E,
3680 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetExtendedAttributeResponse>,
3681 _: (),
3682 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3683 ::fidl_next::munge! {
3684 let crate::wire::NodeSetExtendedAttributeResponse {
3685
3686 _empty,
3687
3688
3689 } = out_;
3690 }
3691
3692 Ok(())
3693 }
3694 }
3695
3696 unsafe impl<___E>
3697 ::fidl_next::EncodeOption<
3698 ::fidl_next::WireBox<'static, crate::wire::NodeSetExtendedAttributeResponse>,
3699 ___E,
3700 > for NodeSetExtendedAttributeResponse
3701 where
3702 ___E: ::fidl_next::Encoder + ?Sized,
3703 NodeSetExtendedAttributeResponse:
3704 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeResponse, ___E>,
3705 {
3706 #[inline]
3707 fn encode_option(
3708 this: ::core::option::Option<Self>,
3709 encoder: &mut ___E,
3710 out: &mut ::core::mem::MaybeUninit<
3711 ::fidl_next::WireBox<'static, crate::wire::NodeSetExtendedAttributeResponse>,
3712 >,
3713 _: (),
3714 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3715 if let Some(inner) = this {
3716 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3717 ::fidl_next::WireBox::encode_present(out);
3718 } else {
3719 ::fidl_next::WireBox::encode_absent(out);
3720 }
3721
3722 Ok(())
3723 }
3724 }
3725
3726 unsafe impl<'a, ___E>
3727 ::fidl_next::EncodeOption<
3728 ::fidl_next::WireBox<'static, crate::wire::NodeSetExtendedAttributeResponse>,
3729 ___E,
3730 > for &'a NodeSetExtendedAttributeResponse
3731 where
3732 ___E: ::fidl_next::Encoder + ?Sized,
3733 &'a NodeSetExtendedAttributeResponse:
3734 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeResponse, ___E>,
3735 {
3736 #[inline]
3737 fn encode_option(
3738 this: ::core::option::Option<Self>,
3739 encoder: &mut ___E,
3740 out: &mut ::core::mem::MaybeUninit<
3741 ::fidl_next::WireBox<'static, crate::wire::NodeSetExtendedAttributeResponse>,
3742 >,
3743 _: (),
3744 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3745 if let Some(inner) = this {
3746 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3747 ::fidl_next::WireBox::encode_present(out);
3748 } else {
3749 ::fidl_next::WireBox::encode_absent(out);
3750 }
3751
3752 Ok(())
3753 }
3754 }
3755
3756 impl ::fidl_next::FromWire<crate::wire::NodeSetExtendedAttributeResponse>
3757 for NodeSetExtendedAttributeResponse
3758 {
3759 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3760 crate::wire::NodeSetExtendedAttributeResponse,
3761 Self,
3762 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3763
3764 #[inline]
3765 fn from_wire(wire: crate::wire::NodeSetExtendedAttributeResponse) -> Self {
3766 Self {}
3767 }
3768 }
3769
3770 impl ::fidl_next::FromWireRef<crate::wire::NodeSetExtendedAttributeResponse>
3771 for NodeSetExtendedAttributeResponse
3772 {
3773 #[inline]
3774 fn from_wire_ref(wire: &crate::wire::NodeSetExtendedAttributeResponse) -> Self {
3775 Self {}
3776 }
3777 }
3778
3779 #[derive(PartialEq, Clone, Debug)]
3780 pub struct NodeRemoveExtendedAttributeRequest {
3781 pub name: ::std::vec::Vec<u8>,
3782 }
3783
3784 unsafe impl<___E>
3785 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3786 for NodeRemoveExtendedAttributeRequest
3787 where
3788 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3789 ___E: ::fidl_next::Encoder,
3790 {
3791 #[inline]
3792 fn encode(
3793 self,
3794 encoder_: &mut ___E,
3795 out_: &mut ::core::mem::MaybeUninit<
3796 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3797 >,
3798 _: (),
3799 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3800 ::fidl_next::munge! {
3801 let crate::wire::NodeRemoveExtendedAttributeRequest {
3802 name,
3803
3804 } = out_;
3805 }
3806
3807 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
3808
3809 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3810 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3811
3812 Ok(())
3813 }
3814 }
3815
3816 unsafe impl<'a, ___E>
3817 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3818 for &'a NodeRemoveExtendedAttributeRequest
3819 where
3820 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3821 ___E: ::fidl_next::Encoder,
3822 {
3823 #[inline]
3824 fn encode(
3825 self,
3826 encoder_: &mut ___E,
3827 out_: &mut ::core::mem::MaybeUninit<
3828 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3829 >,
3830 _: (),
3831 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3832 ::fidl_next::munge! {
3833 let crate::wire::NodeRemoveExtendedAttributeRequest {
3834
3835 name,
3836
3837 } = out_;
3838 }
3839
3840 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
3841
3842 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3843 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3844
3845 Ok(())
3846 }
3847 }
3848
3849 unsafe impl<___E>
3850 ::fidl_next::EncodeOption<
3851 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeRequest<'static>>,
3852 ___E,
3853 > for NodeRemoveExtendedAttributeRequest
3854 where
3855 ___E: ::fidl_next::Encoder + ?Sized,
3856 NodeRemoveExtendedAttributeRequest:
3857 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3858 {
3859 #[inline]
3860 fn encode_option(
3861 this: ::core::option::Option<Self>,
3862 encoder: &mut ___E,
3863 out: &mut ::core::mem::MaybeUninit<
3864 ::fidl_next::WireBox<
3865 'static,
3866 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3867 >,
3868 >,
3869 _: (),
3870 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3871 if let Some(inner) = this {
3872 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3873 ::fidl_next::WireBox::encode_present(out);
3874 } else {
3875 ::fidl_next::WireBox::encode_absent(out);
3876 }
3877
3878 Ok(())
3879 }
3880 }
3881
3882 unsafe impl<'a, ___E>
3883 ::fidl_next::EncodeOption<
3884 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeRequest<'static>>,
3885 ___E,
3886 > for &'a NodeRemoveExtendedAttributeRequest
3887 where
3888 ___E: ::fidl_next::Encoder + ?Sized,
3889 &'a NodeRemoveExtendedAttributeRequest:
3890 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3891 {
3892 #[inline]
3893 fn encode_option(
3894 this: ::core::option::Option<Self>,
3895 encoder: &mut ___E,
3896 out: &mut ::core::mem::MaybeUninit<
3897 ::fidl_next::WireBox<
3898 'static,
3899 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3900 >,
3901 >,
3902 _: (),
3903 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3904 if let Some(inner) = this {
3905 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3906 ::fidl_next::WireBox::encode_present(out);
3907 } else {
3908 ::fidl_next::WireBox::encode_absent(out);
3909 }
3910
3911 Ok(())
3912 }
3913 }
3914
3915 impl<'de> ::fidl_next::FromWire<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3916 for NodeRemoveExtendedAttributeRequest
3917 {
3918 #[inline]
3919 fn from_wire(wire: crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3920 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
3921 }
3922 }
3923
3924 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3925 for NodeRemoveExtendedAttributeRequest
3926 {
3927 #[inline]
3928 fn from_wire_ref(wire: &crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3929 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
3930 }
3931 }
3932
3933 #[derive(PartialEq, Clone, Debug)]
3934 #[repr(C)]
3935 pub struct NodeRemoveExtendedAttributeResponse {}
3936
3937 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeResponse, ___E>
3938 for NodeRemoveExtendedAttributeResponse
3939 where
3940 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3941 {
3942 #[inline]
3943 fn encode(
3944 self,
3945 encoder_: &mut ___E,
3946 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeRemoveExtendedAttributeResponse>,
3947 _: (),
3948 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3949 *out_ = ::core::mem::MaybeUninit::zeroed();
3950
3951 Ok(())
3952 }
3953 }
3954
3955 unsafe impl<'a, ___E>
3956 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeResponse, ___E>
3957 for &'a NodeRemoveExtendedAttributeResponse
3958 where
3959 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3960 {
3961 #[inline]
3962 fn encode(
3963 self,
3964 encoder_: &mut ___E,
3965 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeRemoveExtendedAttributeResponse>,
3966 _: (),
3967 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3968 ::fidl_next::munge! {
3969 let crate::wire::NodeRemoveExtendedAttributeResponse {
3970
3971 _empty,
3972
3973
3974 } = out_;
3975 }
3976
3977 Ok(())
3978 }
3979 }
3980
3981 unsafe impl<___E>
3982 ::fidl_next::EncodeOption<
3983 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeResponse>,
3984 ___E,
3985 > for NodeRemoveExtendedAttributeResponse
3986 where
3987 ___E: ::fidl_next::Encoder + ?Sized,
3988 NodeRemoveExtendedAttributeResponse:
3989 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeResponse, ___E>,
3990 {
3991 #[inline]
3992 fn encode_option(
3993 this: ::core::option::Option<Self>,
3994 encoder: &mut ___E,
3995 out: &mut ::core::mem::MaybeUninit<
3996 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeResponse>,
3997 >,
3998 _: (),
3999 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4000 if let Some(inner) = this {
4001 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4002 ::fidl_next::WireBox::encode_present(out);
4003 } else {
4004 ::fidl_next::WireBox::encode_absent(out);
4005 }
4006
4007 Ok(())
4008 }
4009 }
4010
4011 unsafe impl<'a, ___E>
4012 ::fidl_next::EncodeOption<
4013 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeResponse>,
4014 ___E,
4015 > for &'a NodeRemoveExtendedAttributeResponse
4016 where
4017 ___E: ::fidl_next::Encoder + ?Sized,
4018 &'a NodeRemoveExtendedAttributeResponse:
4019 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeResponse, ___E>,
4020 {
4021 #[inline]
4022 fn encode_option(
4023 this: ::core::option::Option<Self>,
4024 encoder: &mut ___E,
4025 out: &mut ::core::mem::MaybeUninit<
4026 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeResponse>,
4027 >,
4028 _: (),
4029 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4030 if let Some(inner) = this {
4031 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4032 ::fidl_next::WireBox::encode_present(out);
4033 } else {
4034 ::fidl_next::WireBox::encode_absent(out);
4035 }
4036
4037 Ok(())
4038 }
4039 }
4040
4041 impl ::fidl_next::FromWire<crate::wire::NodeRemoveExtendedAttributeResponse>
4042 for NodeRemoveExtendedAttributeResponse
4043 {
4044 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4045 crate::wire::NodeRemoveExtendedAttributeResponse,
4046 Self,
4047 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
4048
4049 #[inline]
4050 fn from_wire(wire: crate::wire::NodeRemoveExtendedAttributeResponse) -> Self {
4051 Self {}
4052 }
4053 }
4054
4055 impl ::fidl_next::FromWireRef<crate::wire::NodeRemoveExtendedAttributeResponse>
4056 for NodeRemoveExtendedAttributeResponse
4057 {
4058 #[inline]
4059 fn from_wire_ref(wire: &crate::wire::NodeRemoveExtendedAttributeResponse) -> Self {
4060 Self {}
4061 }
4062 }
4063
4064 #[derive(PartialEq, Clone, Debug)]
4065 #[repr(C)]
4066 pub struct DirectoryCreateSymlinkResponse {}
4067
4068 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkResponse, ___E>
4069 for DirectoryCreateSymlinkResponse
4070 where
4071 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4072 {
4073 #[inline]
4074 fn encode(
4075 self,
4076 encoder_: &mut ___E,
4077 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryCreateSymlinkResponse>,
4078 _: (),
4079 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4080 *out_ = ::core::mem::MaybeUninit::zeroed();
4081
4082 Ok(())
4083 }
4084 }
4085
4086 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkResponse, ___E>
4087 for &'a DirectoryCreateSymlinkResponse
4088 where
4089 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4090 {
4091 #[inline]
4092 fn encode(
4093 self,
4094 encoder_: &mut ___E,
4095 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryCreateSymlinkResponse>,
4096 _: (),
4097 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4098 ::fidl_next::munge! {
4099 let crate::wire::DirectoryCreateSymlinkResponse {
4100
4101 _empty,
4102
4103
4104 } = out_;
4105 }
4106
4107 Ok(())
4108 }
4109 }
4110
4111 unsafe impl<___E>
4112 ::fidl_next::EncodeOption<
4113 ::fidl_next::WireBox<'static, crate::wire::DirectoryCreateSymlinkResponse>,
4114 ___E,
4115 > for DirectoryCreateSymlinkResponse
4116 where
4117 ___E: ::fidl_next::Encoder + ?Sized,
4118 DirectoryCreateSymlinkResponse:
4119 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkResponse, ___E>,
4120 {
4121 #[inline]
4122 fn encode_option(
4123 this: ::core::option::Option<Self>,
4124 encoder: &mut ___E,
4125 out: &mut ::core::mem::MaybeUninit<
4126 ::fidl_next::WireBox<'static, crate::wire::DirectoryCreateSymlinkResponse>,
4127 >,
4128 _: (),
4129 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4130 if let Some(inner) = this {
4131 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4132 ::fidl_next::WireBox::encode_present(out);
4133 } else {
4134 ::fidl_next::WireBox::encode_absent(out);
4135 }
4136
4137 Ok(())
4138 }
4139 }
4140
4141 unsafe impl<'a, ___E>
4142 ::fidl_next::EncodeOption<
4143 ::fidl_next::WireBox<'static, crate::wire::DirectoryCreateSymlinkResponse>,
4144 ___E,
4145 > for &'a DirectoryCreateSymlinkResponse
4146 where
4147 ___E: ::fidl_next::Encoder + ?Sized,
4148 &'a DirectoryCreateSymlinkResponse:
4149 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkResponse, ___E>,
4150 {
4151 #[inline]
4152 fn encode_option(
4153 this: ::core::option::Option<Self>,
4154 encoder: &mut ___E,
4155 out: &mut ::core::mem::MaybeUninit<
4156 ::fidl_next::WireBox<'static, crate::wire::DirectoryCreateSymlinkResponse>,
4157 >,
4158 _: (),
4159 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4160 if let Some(inner) = this {
4161 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4162 ::fidl_next::WireBox::encode_present(out);
4163 } else {
4164 ::fidl_next::WireBox::encode_absent(out);
4165 }
4166
4167 Ok(())
4168 }
4169 }
4170
4171 impl ::fidl_next::FromWire<crate::wire::DirectoryCreateSymlinkResponse>
4172 for DirectoryCreateSymlinkResponse
4173 {
4174 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4175 crate::wire::DirectoryCreateSymlinkResponse,
4176 Self,
4177 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
4178
4179 #[inline]
4180 fn from_wire(wire: crate::wire::DirectoryCreateSymlinkResponse) -> Self {
4181 Self {}
4182 }
4183 }
4184
4185 impl ::fidl_next::FromWireRef<crate::wire::DirectoryCreateSymlinkResponse>
4186 for DirectoryCreateSymlinkResponse
4187 {
4188 #[inline]
4189 fn from_wire_ref(wire: &crate::wire::DirectoryCreateSymlinkResponse) -> Self {
4190 Self {}
4191 }
4192 }
4193
4194 #[derive(PartialEq, Clone, Debug)]
4195 #[repr(C)]
4196 pub struct NodeSetFlagsResponse {}
4197
4198 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsResponse, ___E>
4199 for NodeSetFlagsResponse
4200 where
4201 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4202 {
4203 #[inline]
4204 fn encode(
4205 self,
4206 encoder_: &mut ___E,
4207 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsResponse>,
4208 _: (),
4209 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4210 *out_ = ::core::mem::MaybeUninit::zeroed();
4211
4212 Ok(())
4213 }
4214 }
4215
4216 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsResponse, ___E>
4217 for &'a NodeSetFlagsResponse
4218 where
4219 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4220 {
4221 #[inline]
4222 fn encode(
4223 self,
4224 encoder_: &mut ___E,
4225 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsResponse>,
4226 _: (),
4227 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4228 ::fidl_next::munge! {
4229 let crate::wire::NodeSetFlagsResponse {
4230
4231 _empty,
4232
4233
4234 } = out_;
4235 }
4236
4237 Ok(())
4238 }
4239 }
4240
4241 unsafe impl<___E>
4242 ::fidl_next::EncodeOption<
4243 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsResponse>,
4244 ___E,
4245 > for NodeSetFlagsResponse
4246 where
4247 ___E: ::fidl_next::Encoder + ?Sized,
4248 NodeSetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeSetFlagsResponse, ___E>,
4249 {
4250 #[inline]
4251 fn encode_option(
4252 this: ::core::option::Option<Self>,
4253 encoder: &mut ___E,
4254 out: &mut ::core::mem::MaybeUninit<
4255 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsResponse>,
4256 >,
4257 _: (),
4258 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4259 if let Some(inner) = this {
4260 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4261 ::fidl_next::WireBox::encode_present(out);
4262 } else {
4263 ::fidl_next::WireBox::encode_absent(out);
4264 }
4265
4266 Ok(())
4267 }
4268 }
4269
4270 unsafe impl<'a, ___E>
4271 ::fidl_next::EncodeOption<
4272 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsResponse>,
4273 ___E,
4274 > for &'a NodeSetFlagsResponse
4275 where
4276 ___E: ::fidl_next::Encoder + ?Sized,
4277 &'a NodeSetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeSetFlagsResponse, ___E>,
4278 {
4279 #[inline]
4280 fn encode_option(
4281 this: ::core::option::Option<Self>,
4282 encoder: &mut ___E,
4283 out: &mut ::core::mem::MaybeUninit<
4284 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsResponse>,
4285 >,
4286 _: (),
4287 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4288 if let Some(inner) = this {
4289 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4290 ::fidl_next::WireBox::encode_present(out);
4291 } else {
4292 ::fidl_next::WireBox::encode_absent(out);
4293 }
4294
4295 Ok(())
4296 }
4297 }
4298
4299 impl ::fidl_next::FromWire<crate::wire::NodeSetFlagsResponse> for NodeSetFlagsResponse {
4300 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4301 crate::wire::NodeSetFlagsResponse,
4302 Self,
4303 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
4304
4305 #[inline]
4306 fn from_wire(wire: crate::wire::NodeSetFlagsResponse) -> Self {
4307 Self {}
4308 }
4309 }
4310
4311 impl ::fidl_next::FromWireRef<crate::wire::NodeSetFlagsResponse> for NodeSetFlagsResponse {
4312 #[inline]
4313 fn from_wire_ref(wire: &crate::wire::NodeSetFlagsResponse) -> Self {
4314 Self {}
4315 }
4316 }
4317
4318 #[derive(PartialEq, Clone, Debug)]
4319 pub struct NodeDeprecatedGetAttrResponse {
4320 pub s: i32,
4321
4322 pub attributes: crate::natural::NodeAttributes,
4323 }
4324
4325 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
4326 for NodeDeprecatedGetAttrResponse
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::NodeDeprecatedGetAttrResponse>,
4335 _: (),
4336 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4337 ::fidl_next::munge! {
4338 let crate::wire::NodeDeprecatedGetAttrResponse {
4339 s,
4340 attributes,
4341
4342 } = out_;
4343 }
4344
4345 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4346
4347 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4348
4349 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
4350
4351 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
4352
4353 Ok(())
4354 }
4355 }
4356
4357 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
4358 for &'a NodeDeprecatedGetAttrResponse
4359 where
4360 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4361 {
4362 #[inline]
4363 fn encode(
4364 self,
4365 encoder_: &mut ___E,
4366 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
4367 _: (),
4368 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4369 ::fidl_next::munge! {
4370 let crate::wire::NodeDeprecatedGetAttrResponse {
4371
4372 s,
4373 attributes,
4374
4375 } = out_;
4376 }
4377
4378 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4379
4380 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4381
4382 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
4383
4384 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
4385
4386 Ok(())
4387 }
4388 }
4389
4390 unsafe impl<___E>
4391 ::fidl_next::EncodeOption<
4392 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
4393 ___E,
4394 > for NodeDeprecatedGetAttrResponse
4395 where
4396 ___E: ::fidl_next::Encoder + ?Sized,
4397 NodeDeprecatedGetAttrResponse:
4398 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
4399 {
4400 #[inline]
4401 fn encode_option(
4402 this: ::core::option::Option<Self>,
4403 encoder: &mut ___E,
4404 out: &mut ::core::mem::MaybeUninit<
4405 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
4406 >,
4407 _: (),
4408 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4409 if let Some(inner) = this {
4410 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4411 ::fidl_next::WireBox::encode_present(out);
4412 } else {
4413 ::fidl_next::WireBox::encode_absent(out);
4414 }
4415
4416 Ok(())
4417 }
4418 }
4419
4420 unsafe impl<'a, ___E>
4421 ::fidl_next::EncodeOption<
4422 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
4423 ___E,
4424 > for &'a NodeDeprecatedGetAttrResponse
4425 where
4426 ___E: ::fidl_next::Encoder + ?Sized,
4427 &'a NodeDeprecatedGetAttrResponse:
4428 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
4429 {
4430 #[inline]
4431 fn encode_option(
4432 this: ::core::option::Option<Self>,
4433 encoder: &mut ___E,
4434 out: &mut ::core::mem::MaybeUninit<
4435 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
4436 >,
4437 _: (),
4438 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4439 if let Some(inner) = this {
4440 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4441 ::fidl_next::WireBox::encode_present(out);
4442 } else {
4443 ::fidl_next::WireBox::encode_absent(out);
4444 }
4445
4446 Ok(())
4447 }
4448 }
4449
4450 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetAttrResponse>
4451 for NodeDeprecatedGetAttrResponse
4452 {
4453 #[inline]
4454 fn from_wire(wire: crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
4455 Self {
4456 s: ::fidl_next::FromWire::from_wire(wire.s),
4457
4458 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
4459 }
4460 }
4461 }
4462
4463 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetAttrResponse>
4464 for NodeDeprecatedGetAttrResponse
4465 {
4466 #[inline]
4467 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
4468 Self {
4469 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
4470
4471 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
4472 }
4473 }
4474 }
4475
4476 #[derive(PartialEq, Clone, Debug)]
4477 pub struct NodeDeprecatedSetAttrRequest {
4478 pub flags: crate::natural::NodeAttributeFlags,
4479
4480 pub attributes: crate::natural::NodeAttributes,
4481 }
4482
4483 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
4484 for NodeDeprecatedSetAttrRequest
4485 where
4486 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4487 {
4488 #[inline]
4489 fn encode(
4490 self,
4491 encoder_: &mut ___E,
4492 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
4493 _: (),
4494 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4495 ::fidl_next::munge! {
4496 let crate::wire::NodeDeprecatedSetAttrRequest {
4497 flags,
4498 attributes,
4499
4500 } = out_;
4501 }
4502
4503 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4504
4505 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4506
4507 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
4508
4509 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
4510
4511 Ok(())
4512 }
4513 }
4514
4515 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
4516 for &'a NodeDeprecatedSetAttrRequest
4517 where
4518 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4519 {
4520 #[inline]
4521 fn encode(
4522 self,
4523 encoder_: &mut ___E,
4524 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
4525 _: (),
4526 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4527 ::fidl_next::munge! {
4528 let crate::wire::NodeDeprecatedSetAttrRequest {
4529
4530 flags,
4531 attributes,
4532
4533 } = out_;
4534 }
4535
4536 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4537
4538 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4539
4540 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
4541
4542 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
4543
4544 Ok(())
4545 }
4546 }
4547
4548 unsafe impl<___E>
4549 ::fidl_next::EncodeOption<
4550 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
4551 ___E,
4552 > for NodeDeprecatedSetAttrRequest
4553 where
4554 ___E: ::fidl_next::Encoder + ?Sized,
4555 NodeDeprecatedSetAttrRequest:
4556 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
4557 {
4558 #[inline]
4559 fn encode_option(
4560 this: ::core::option::Option<Self>,
4561 encoder: &mut ___E,
4562 out: &mut ::core::mem::MaybeUninit<
4563 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
4564 >,
4565 _: (),
4566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4567 if let Some(inner) = this {
4568 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4569 ::fidl_next::WireBox::encode_present(out);
4570 } else {
4571 ::fidl_next::WireBox::encode_absent(out);
4572 }
4573
4574 Ok(())
4575 }
4576 }
4577
4578 unsafe impl<'a, ___E>
4579 ::fidl_next::EncodeOption<
4580 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
4581 ___E,
4582 > for &'a NodeDeprecatedSetAttrRequest
4583 where
4584 ___E: ::fidl_next::Encoder + ?Sized,
4585 &'a NodeDeprecatedSetAttrRequest:
4586 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
4587 {
4588 #[inline]
4589 fn encode_option(
4590 this: ::core::option::Option<Self>,
4591 encoder: &mut ___E,
4592 out: &mut ::core::mem::MaybeUninit<
4593 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
4594 >,
4595 _: (),
4596 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4597 if let Some(inner) = this {
4598 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4599 ::fidl_next::WireBox::encode_present(out);
4600 } else {
4601 ::fidl_next::WireBox::encode_absent(out);
4602 }
4603
4604 Ok(())
4605 }
4606 }
4607
4608 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrRequest>
4609 for NodeDeprecatedSetAttrRequest
4610 {
4611 #[inline]
4612 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
4613 Self {
4614 flags: ::fidl_next::FromWire::from_wire(wire.flags),
4615
4616 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
4617 }
4618 }
4619 }
4620
4621 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrRequest>
4622 for NodeDeprecatedSetAttrRequest
4623 {
4624 #[inline]
4625 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
4626 Self {
4627 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
4628
4629 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
4630 }
4631 }
4632 }
4633
4634 #[derive(PartialEq, Clone, Debug)]
4635 #[repr(C)]
4636 pub struct NodeDeprecatedSetAttrResponse {
4637 pub s: i32,
4638 }
4639
4640 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
4641 for NodeDeprecatedSetAttrResponse
4642 where
4643 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4644 {
4645 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4646 Self,
4647 crate::wire::NodeDeprecatedSetAttrResponse,
4648 > = unsafe {
4649 ::fidl_next::CopyOptimization::enable_if(
4650 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
4651 .is_enabled(),
4652 )
4653 };
4654
4655 #[inline]
4656 fn encode(
4657 self,
4658 encoder_: &mut ___E,
4659 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
4660 _: (),
4661 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4662 ::fidl_next::munge! {
4663 let crate::wire::NodeDeprecatedSetAttrResponse {
4664 s,
4665
4666 } = out_;
4667 }
4668
4669 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4670
4671 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4672
4673 Ok(())
4674 }
4675 }
4676
4677 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
4678 for &'a NodeDeprecatedSetAttrResponse
4679 where
4680 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4681 {
4682 #[inline]
4683 fn encode(
4684 self,
4685 encoder_: &mut ___E,
4686 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
4687 _: (),
4688 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4689 ::fidl_next::munge! {
4690 let crate::wire::NodeDeprecatedSetAttrResponse {
4691
4692 s,
4693
4694 } = out_;
4695 }
4696
4697 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4698
4699 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4700
4701 Ok(())
4702 }
4703 }
4704
4705 unsafe impl<___E>
4706 ::fidl_next::EncodeOption<
4707 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
4708 ___E,
4709 > for NodeDeprecatedSetAttrResponse
4710 where
4711 ___E: ::fidl_next::Encoder + ?Sized,
4712 NodeDeprecatedSetAttrResponse:
4713 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
4714 {
4715 #[inline]
4716 fn encode_option(
4717 this: ::core::option::Option<Self>,
4718 encoder: &mut ___E,
4719 out: &mut ::core::mem::MaybeUninit<
4720 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
4721 >,
4722 _: (),
4723 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4724 if let Some(inner) = this {
4725 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4726 ::fidl_next::WireBox::encode_present(out);
4727 } else {
4728 ::fidl_next::WireBox::encode_absent(out);
4729 }
4730
4731 Ok(())
4732 }
4733 }
4734
4735 unsafe impl<'a, ___E>
4736 ::fidl_next::EncodeOption<
4737 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
4738 ___E,
4739 > for &'a NodeDeprecatedSetAttrResponse
4740 where
4741 ___E: ::fidl_next::Encoder + ?Sized,
4742 &'a NodeDeprecatedSetAttrResponse:
4743 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
4744 {
4745 #[inline]
4746 fn encode_option(
4747 this: ::core::option::Option<Self>,
4748 encoder: &mut ___E,
4749 out: &mut ::core::mem::MaybeUninit<
4750 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
4751 >,
4752 _: (),
4753 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4754 if let Some(inner) = this {
4755 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4756 ::fidl_next::WireBox::encode_present(out);
4757 } else {
4758 ::fidl_next::WireBox::encode_absent(out);
4759 }
4760
4761 Ok(())
4762 }
4763 }
4764
4765 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrResponse>
4766 for NodeDeprecatedSetAttrResponse
4767 {
4768 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4769 crate::wire::NodeDeprecatedSetAttrResponse,
4770 Self,
4771 > = unsafe {
4772 ::fidl_next::CopyOptimization::enable_if(
4773 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
4774 .is_enabled(),
4775 )
4776 };
4777
4778 #[inline]
4779 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
4780 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
4781 }
4782 }
4783
4784 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrResponse>
4785 for NodeDeprecatedSetAttrResponse
4786 {
4787 #[inline]
4788 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
4789 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
4790 }
4791 }
4792
4793 #[derive(PartialEq, Clone, Debug)]
4794 #[repr(C)]
4795 pub struct NodeDeprecatedGetFlagsResponse {
4796 pub s: i32,
4797
4798 pub flags: crate::natural::OpenFlags,
4799 }
4800
4801 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
4802 for NodeDeprecatedGetFlagsResponse
4803 where
4804 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4805 {
4806 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4807 Self,
4808 crate::wire::NodeDeprecatedGetFlagsResponse,
4809 > = unsafe {
4810 ::fidl_next::CopyOptimization::enable_if(
4811 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
4812 .is_enabled()
4813 && <crate::natural::OpenFlags as ::fidl_next::Encode<
4814 crate::wire::OpenFlags,
4815 ___E,
4816 >>::COPY_OPTIMIZATION
4817 .is_enabled(),
4818 )
4819 };
4820
4821 #[inline]
4822 fn encode(
4823 self,
4824 encoder_: &mut ___E,
4825 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
4826 _: (),
4827 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4828 ::fidl_next::munge! {
4829 let crate::wire::NodeDeprecatedGetFlagsResponse {
4830 s,
4831 flags,
4832
4833 } = out_;
4834 }
4835
4836 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4837
4838 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4839
4840 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4841
4842 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4843
4844 Ok(())
4845 }
4846 }
4847
4848 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
4849 for &'a NodeDeprecatedGetFlagsResponse
4850 where
4851 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4852 {
4853 #[inline]
4854 fn encode(
4855 self,
4856 encoder_: &mut ___E,
4857 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
4858 _: (),
4859 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4860 ::fidl_next::munge! {
4861 let crate::wire::NodeDeprecatedGetFlagsResponse {
4862
4863 s,
4864 flags,
4865
4866 } = out_;
4867 }
4868
4869 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4870
4871 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4872
4873 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4874
4875 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4876
4877 Ok(())
4878 }
4879 }
4880
4881 unsafe impl<___E>
4882 ::fidl_next::EncodeOption<
4883 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
4884 ___E,
4885 > for NodeDeprecatedGetFlagsResponse
4886 where
4887 ___E: ::fidl_next::Encoder + ?Sized,
4888 NodeDeprecatedGetFlagsResponse:
4889 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
4890 {
4891 #[inline]
4892 fn encode_option(
4893 this: ::core::option::Option<Self>,
4894 encoder: &mut ___E,
4895 out: &mut ::core::mem::MaybeUninit<
4896 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
4897 >,
4898 _: (),
4899 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4900 if let Some(inner) = this {
4901 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4902 ::fidl_next::WireBox::encode_present(out);
4903 } else {
4904 ::fidl_next::WireBox::encode_absent(out);
4905 }
4906
4907 Ok(())
4908 }
4909 }
4910
4911 unsafe impl<'a, ___E>
4912 ::fidl_next::EncodeOption<
4913 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
4914 ___E,
4915 > for &'a NodeDeprecatedGetFlagsResponse
4916 where
4917 ___E: ::fidl_next::Encoder + ?Sized,
4918 &'a NodeDeprecatedGetFlagsResponse:
4919 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
4920 {
4921 #[inline]
4922 fn encode_option(
4923 this: ::core::option::Option<Self>,
4924 encoder: &mut ___E,
4925 out: &mut ::core::mem::MaybeUninit<
4926 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
4927 >,
4928 _: (),
4929 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4930 if let Some(inner) = this {
4931 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4932 ::fidl_next::WireBox::encode_present(out);
4933 } else {
4934 ::fidl_next::WireBox::encode_absent(out);
4935 }
4936
4937 Ok(())
4938 }
4939 }
4940
4941 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetFlagsResponse>
4942 for NodeDeprecatedGetFlagsResponse
4943 {
4944 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4945 crate::wire::NodeDeprecatedGetFlagsResponse,
4946 Self,
4947 > = unsafe {
4948 ::fidl_next::CopyOptimization::enable_if(
4949 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
4950 .is_enabled()
4951 && <crate::natural::OpenFlags as ::fidl_next::FromWire<
4952 crate::wire::OpenFlags,
4953 >>::COPY_OPTIMIZATION
4954 .is_enabled(),
4955 )
4956 };
4957
4958 #[inline]
4959 fn from_wire(wire: crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
4960 Self {
4961 s: ::fidl_next::FromWire::from_wire(wire.s),
4962
4963 flags: ::fidl_next::FromWire::from_wire(wire.flags),
4964 }
4965 }
4966 }
4967
4968 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetFlagsResponse>
4969 for NodeDeprecatedGetFlagsResponse
4970 {
4971 #[inline]
4972 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
4973 Self {
4974 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
4975
4976 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
4977 }
4978 }
4979 }
4980
4981 #[derive(PartialEq, Clone, Debug)]
4982 #[repr(C)]
4983 pub struct NodeDeprecatedSetFlagsRequest {
4984 pub flags: crate::natural::OpenFlags,
4985 }
4986
4987 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
4988 for NodeDeprecatedSetFlagsRequest
4989 where
4990 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4991 {
4992 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4993 Self,
4994 crate::wire::NodeDeprecatedSetFlagsRequest,
4995 > = unsafe {
4996 ::fidl_next::CopyOptimization::enable_if(
4997 true && <crate::natural::OpenFlags as ::fidl_next::Encode<
4998 crate::wire::OpenFlags,
4999 ___E,
5000 >>::COPY_OPTIMIZATION
5001 .is_enabled(),
5002 )
5003 };
5004
5005 #[inline]
5006 fn encode(
5007 self,
5008 encoder_: &mut ___E,
5009 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
5010 _: (),
5011 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5012 ::fidl_next::munge! {
5013 let crate::wire::NodeDeprecatedSetFlagsRequest {
5014 flags,
5015
5016 } = out_;
5017 }
5018
5019 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5020
5021 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5022
5023 Ok(())
5024 }
5025 }
5026
5027 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
5028 for &'a NodeDeprecatedSetFlagsRequest
5029 where
5030 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5031 {
5032 #[inline]
5033 fn encode(
5034 self,
5035 encoder_: &mut ___E,
5036 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
5037 _: (),
5038 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5039 ::fidl_next::munge! {
5040 let crate::wire::NodeDeprecatedSetFlagsRequest {
5041
5042 flags,
5043
5044 } = out_;
5045 }
5046
5047 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
5048
5049 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5050
5051 Ok(())
5052 }
5053 }
5054
5055 unsafe impl<___E>
5056 ::fidl_next::EncodeOption<
5057 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
5058 ___E,
5059 > for NodeDeprecatedSetFlagsRequest
5060 where
5061 ___E: ::fidl_next::Encoder + ?Sized,
5062 NodeDeprecatedSetFlagsRequest:
5063 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
5064 {
5065 #[inline]
5066 fn encode_option(
5067 this: ::core::option::Option<Self>,
5068 encoder: &mut ___E,
5069 out: &mut ::core::mem::MaybeUninit<
5070 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
5071 >,
5072 _: (),
5073 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5074 if let Some(inner) = this {
5075 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5076 ::fidl_next::WireBox::encode_present(out);
5077 } else {
5078 ::fidl_next::WireBox::encode_absent(out);
5079 }
5080
5081 Ok(())
5082 }
5083 }
5084
5085 unsafe impl<'a, ___E>
5086 ::fidl_next::EncodeOption<
5087 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
5088 ___E,
5089 > for &'a NodeDeprecatedSetFlagsRequest
5090 where
5091 ___E: ::fidl_next::Encoder + ?Sized,
5092 &'a NodeDeprecatedSetFlagsRequest:
5093 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
5094 {
5095 #[inline]
5096 fn encode_option(
5097 this: ::core::option::Option<Self>,
5098 encoder: &mut ___E,
5099 out: &mut ::core::mem::MaybeUninit<
5100 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
5101 >,
5102 _: (),
5103 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5104 if let Some(inner) = this {
5105 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5106 ::fidl_next::WireBox::encode_present(out);
5107 } else {
5108 ::fidl_next::WireBox::encode_absent(out);
5109 }
5110
5111 Ok(())
5112 }
5113 }
5114
5115 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsRequest>
5116 for NodeDeprecatedSetFlagsRequest
5117 {
5118 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5119 crate::wire::NodeDeprecatedSetFlagsRequest,
5120 Self,
5121 > = unsafe {
5122 ::fidl_next::CopyOptimization::enable_if(
5123 true && <crate::natural::OpenFlags as ::fidl_next::FromWire<
5124 crate::wire::OpenFlags,
5125 >>::COPY_OPTIMIZATION
5126 .is_enabled(),
5127 )
5128 };
5129
5130 #[inline]
5131 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
5132 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
5133 }
5134 }
5135
5136 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsRequest>
5137 for NodeDeprecatedSetFlagsRequest
5138 {
5139 #[inline]
5140 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
5141 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
5142 }
5143 }
5144
5145 #[derive(PartialEq, Clone, Debug)]
5146 #[repr(C)]
5147 pub struct NodeDeprecatedSetFlagsResponse {
5148 pub s: i32,
5149 }
5150
5151 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
5152 for NodeDeprecatedSetFlagsResponse
5153 where
5154 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5155 {
5156 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5157 Self,
5158 crate::wire::NodeDeprecatedSetFlagsResponse,
5159 > = unsafe {
5160 ::fidl_next::CopyOptimization::enable_if(
5161 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
5162 .is_enabled(),
5163 )
5164 };
5165
5166 #[inline]
5167 fn encode(
5168 self,
5169 encoder_: &mut ___E,
5170 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
5171 _: (),
5172 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5173 ::fidl_next::munge! {
5174 let crate::wire::NodeDeprecatedSetFlagsResponse {
5175 s,
5176
5177 } = out_;
5178 }
5179
5180 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5181
5182 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
5183
5184 Ok(())
5185 }
5186 }
5187
5188 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
5189 for &'a NodeDeprecatedSetFlagsResponse
5190 where
5191 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5192 {
5193 #[inline]
5194 fn encode(
5195 self,
5196 encoder_: &mut ___E,
5197 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
5198 _: (),
5199 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5200 ::fidl_next::munge! {
5201 let crate::wire::NodeDeprecatedSetFlagsResponse {
5202
5203 s,
5204
5205 } = out_;
5206 }
5207
5208 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
5209
5210 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
5211
5212 Ok(())
5213 }
5214 }
5215
5216 unsafe impl<___E>
5217 ::fidl_next::EncodeOption<
5218 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
5219 ___E,
5220 > for NodeDeprecatedSetFlagsResponse
5221 where
5222 ___E: ::fidl_next::Encoder + ?Sized,
5223 NodeDeprecatedSetFlagsResponse:
5224 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
5225 {
5226 #[inline]
5227 fn encode_option(
5228 this: ::core::option::Option<Self>,
5229 encoder: &mut ___E,
5230 out: &mut ::core::mem::MaybeUninit<
5231 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
5232 >,
5233 _: (),
5234 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5235 if let Some(inner) = this {
5236 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5237 ::fidl_next::WireBox::encode_present(out);
5238 } else {
5239 ::fidl_next::WireBox::encode_absent(out);
5240 }
5241
5242 Ok(())
5243 }
5244 }
5245
5246 unsafe impl<'a, ___E>
5247 ::fidl_next::EncodeOption<
5248 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
5249 ___E,
5250 > for &'a NodeDeprecatedSetFlagsResponse
5251 where
5252 ___E: ::fidl_next::Encoder + ?Sized,
5253 &'a NodeDeprecatedSetFlagsResponse:
5254 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
5255 {
5256 #[inline]
5257 fn encode_option(
5258 this: ::core::option::Option<Self>,
5259 encoder: &mut ___E,
5260 out: &mut ::core::mem::MaybeUninit<
5261 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
5262 >,
5263 _: (),
5264 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5265 if let Some(inner) = this {
5266 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5267 ::fidl_next::WireBox::encode_present(out);
5268 } else {
5269 ::fidl_next::WireBox::encode_absent(out);
5270 }
5271
5272 Ok(())
5273 }
5274 }
5275
5276 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsResponse>
5277 for NodeDeprecatedSetFlagsResponse
5278 {
5279 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5280 crate::wire::NodeDeprecatedSetFlagsResponse,
5281 Self,
5282 > = unsafe {
5283 ::fidl_next::CopyOptimization::enable_if(
5284 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
5285 .is_enabled(),
5286 )
5287 };
5288
5289 #[inline]
5290 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
5291 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
5292 }
5293 }
5294
5295 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsResponse>
5296 for NodeDeprecatedSetFlagsResponse
5297 {
5298 #[inline]
5299 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
5300 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
5301 }
5302 }
5303
5304 ::fidl_next::bitflags::bitflags! {
5305 #[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(
5306 Clone,
5307 Copy,
5308 Debug,
5309 PartialEq,
5310 Eq,
5311 Hash,
5312 )]
5313 pub struct Flags: u64 {
5314 #[doc = " Allows opening child nodes with [`PROTOCOL_SERVICE`].\n"]const PERM_CONNECT = 1;
5315 #[doc = " Read byte contents of a file.\n"]const PERM_READ_BYTES = 2;
5316 #[doc = " Write byte contents to a file.\n"]const PERM_WRITE_BYTES = 4;
5317 #[doc = " Execute byte contents of a file.\n"]const PERM_EXECUTE = 8;
5318 #[doc = " Get/query attributes of a node.\n"]const PERM_GET_ATTRIBUTES = 16;
5319 #[doc = " Set/update attributes of a node.\n"]const PERM_UPDATE_ATTRIBUTES = 32;
5320 #[doc = " Enumerate (list) directory entries.\n"]const PERM_ENUMERATE = 64;
5321 #[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;
5322 #[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;
5323 #[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;
5324 #[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;
5325 #[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;
5326 #[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;
5327 #[doc = " Caller accepts [`fuchsia.io/Directory`] protocol. Equivalent to POSIX `O_DIRECTORY`.\n"]const PROTOCOL_DIRECTORY = 524288;
5328 #[doc = " Caller accepts [`fuchsia.io/File`] protocol.\n"]const PROTOCOL_FILE = 8589934592;
5329 #[doc = " Caller accepts [`fuchsia.io/Symlink`] protocol.\n"]const PROTOCOL_SYMLINK = 17179869184;
5330 #[doc = " Caller requests a [`fuchsia.io/Node.OnRepresentation`] event on success.\n"]const FLAG_SEND_REPRESENTATION = 1099511627776;
5331 #[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;
5332 #[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;
5333 #[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;
5334 #[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;
5335 #[doc = " Truncate the file to zero length upon opening it. Equivalent to POSIX `O_TRUNC`.\n"]const FILE_TRUNCATE = 262144;
5336 const _ = !0;
5337 }
5338 }
5339
5340 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for Flags
5341 where
5342 ___E: ?Sized,
5343 {
5344 #[inline]
5345 fn encode(
5346 self,
5347 encoder: &mut ___E,
5348 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
5349 _: (),
5350 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5351 ::fidl_next::Encode::encode(&self, encoder, out, ())
5352 }
5353 }
5354
5355 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for &'a Flags
5356 where
5357 ___E: ?Sized,
5358 {
5359 #[inline]
5360 fn encode(
5361 self,
5362 _: &mut ___E,
5363 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
5364 _: (),
5365 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5366 ::fidl_next::munge!(let crate::wire::Flags { value } = out);
5367
5368 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
5369 Ok(())
5370 }
5371 }
5372
5373 impl ::core::convert::From<crate::wire::Flags> for Flags {
5374 fn from(wire: crate::wire::Flags) -> Self {
5375 Self::from_bits_retain(u64::from(wire.value))
5376 }
5377 }
5378
5379 impl ::fidl_next::FromWire<crate::wire::Flags> for Flags {
5380 #[inline]
5381 fn from_wire(wire: crate::wire::Flags) -> Self {
5382 Self::from(wire)
5383 }
5384 }
5385
5386 impl ::fidl_next::FromWireRef<crate::wire::Flags> for Flags {
5387 #[inline]
5388 fn from_wire_ref(wire: &crate::wire::Flags) -> Self {
5389 Self::from(*wire)
5390 }
5391 }
5392
5393 #[derive(PartialEq, Clone, Debug)]
5394 #[repr(C)]
5395 pub struct NodeGetFlagsResponse {
5396 pub flags: crate::natural::Flags,
5397 }
5398
5399 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
5400 for NodeGetFlagsResponse
5401 where
5402 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5403 {
5404 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5405 Self,
5406 crate::wire::NodeGetFlagsResponse,
5407 > = unsafe {
5408 ::fidl_next::CopyOptimization::enable_if(
5409 true
5410
5411 && <
5412 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
5413 >::COPY_OPTIMIZATION.is_enabled()
5414
5415 )
5416 };
5417
5418 #[inline]
5419 fn encode(
5420 self,
5421 encoder_: &mut ___E,
5422 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
5423 _: (),
5424 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5425 ::fidl_next::munge! {
5426 let crate::wire::NodeGetFlagsResponse {
5427 flags,
5428
5429 } = out_;
5430 }
5431
5432 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5433
5434 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5435
5436 Ok(())
5437 }
5438 }
5439
5440 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
5441 for &'a NodeGetFlagsResponse
5442 where
5443 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5444 {
5445 #[inline]
5446 fn encode(
5447 self,
5448 encoder_: &mut ___E,
5449 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
5450 _: (),
5451 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5452 ::fidl_next::munge! {
5453 let crate::wire::NodeGetFlagsResponse {
5454
5455 flags,
5456
5457 } = out_;
5458 }
5459
5460 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
5461
5462 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5463
5464 Ok(())
5465 }
5466 }
5467
5468 unsafe impl<___E>
5469 ::fidl_next::EncodeOption<
5470 ::fidl_next::WireBox<'static, crate::wire::NodeGetFlagsResponse>,
5471 ___E,
5472 > for NodeGetFlagsResponse
5473 where
5474 ___E: ::fidl_next::Encoder + ?Sized,
5475 NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
5476 {
5477 #[inline]
5478 fn encode_option(
5479 this: ::core::option::Option<Self>,
5480 encoder: &mut ___E,
5481 out: &mut ::core::mem::MaybeUninit<
5482 ::fidl_next::WireBox<'static, crate::wire::NodeGetFlagsResponse>,
5483 >,
5484 _: (),
5485 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5486 if let Some(inner) = this {
5487 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5488 ::fidl_next::WireBox::encode_present(out);
5489 } else {
5490 ::fidl_next::WireBox::encode_absent(out);
5491 }
5492
5493 Ok(())
5494 }
5495 }
5496
5497 unsafe impl<'a, ___E>
5498 ::fidl_next::EncodeOption<
5499 ::fidl_next::WireBox<'static, crate::wire::NodeGetFlagsResponse>,
5500 ___E,
5501 > for &'a NodeGetFlagsResponse
5502 where
5503 ___E: ::fidl_next::Encoder + ?Sized,
5504 &'a NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
5505 {
5506 #[inline]
5507 fn encode_option(
5508 this: ::core::option::Option<Self>,
5509 encoder: &mut ___E,
5510 out: &mut ::core::mem::MaybeUninit<
5511 ::fidl_next::WireBox<'static, crate::wire::NodeGetFlagsResponse>,
5512 >,
5513 _: (),
5514 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5515 if let Some(inner) = this {
5516 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5517 ::fidl_next::WireBox::encode_present(out);
5518 } else {
5519 ::fidl_next::WireBox::encode_absent(out);
5520 }
5521
5522 Ok(())
5523 }
5524 }
5525
5526 impl ::fidl_next::FromWire<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
5527 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5528 crate::wire::NodeGetFlagsResponse,
5529 Self,
5530 > = unsafe {
5531 ::fidl_next::CopyOptimization::enable_if(
5532 true
5533
5534 && <
5535 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
5536 >::COPY_OPTIMIZATION.is_enabled()
5537
5538 )
5539 };
5540
5541 #[inline]
5542 fn from_wire(wire: crate::wire::NodeGetFlagsResponse) -> Self {
5543 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
5544 }
5545 }
5546
5547 impl ::fidl_next::FromWireRef<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
5548 #[inline]
5549 fn from_wire_ref(wire: &crate::wire::NodeGetFlagsResponse) -> Self {
5550 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
5551 }
5552 }
5553
5554 #[derive(PartialEq, Clone, Debug)]
5555 #[repr(C)]
5556 pub struct NodeSetFlagsRequest {
5557 pub flags: crate::natural::Flags,
5558 }
5559
5560 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
5561 for NodeSetFlagsRequest
5562 where
5563 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5564 {
5565 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5566 Self,
5567 crate::wire::NodeSetFlagsRequest,
5568 > = unsafe {
5569 ::fidl_next::CopyOptimization::enable_if(
5570 true
5571
5572 && <
5573 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
5574 >::COPY_OPTIMIZATION.is_enabled()
5575
5576 )
5577 };
5578
5579 #[inline]
5580 fn encode(
5581 self,
5582 encoder_: &mut ___E,
5583 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
5584 _: (),
5585 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5586 ::fidl_next::munge! {
5587 let crate::wire::NodeSetFlagsRequest {
5588 flags,
5589
5590 } = out_;
5591 }
5592
5593 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5594
5595 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5596
5597 Ok(())
5598 }
5599 }
5600
5601 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
5602 for &'a NodeSetFlagsRequest
5603 where
5604 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5605 {
5606 #[inline]
5607 fn encode(
5608 self,
5609 encoder_: &mut ___E,
5610 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
5611 _: (),
5612 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5613 ::fidl_next::munge! {
5614 let crate::wire::NodeSetFlagsRequest {
5615
5616 flags,
5617
5618 } = out_;
5619 }
5620
5621 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
5622
5623 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5624
5625 Ok(())
5626 }
5627 }
5628
5629 unsafe impl<___E>
5630 ::fidl_next::EncodeOption<
5631 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsRequest>,
5632 ___E,
5633 > for NodeSetFlagsRequest
5634 where
5635 ___E: ::fidl_next::Encoder + ?Sized,
5636 NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
5637 {
5638 #[inline]
5639 fn encode_option(
5640 this: ::core::option::Option<Self>,
5641 encoder: &mut ___E,
5642 out: &mut ::core::mem::MaybeUninit<
5643 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsRequest>,
5644 >,
5645 _: (),
5646 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5647 if let Some(inner) = this {
5648 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5649 ::fidl_next::WireBox::encode_present(out);
5650 } else {
5651 ::fidl_next::WireBox::encode_absent(out);
5652 }
5653
5654 Ok(())
5655 }
5656 }
5657
5658 unsafe impl<'a, ___E>
5659 ::fidl_next::EncodeOption<
5660 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsRequest>,
5661 ___E,
5662 > for &'a NodeSetFlagsRequest
5663 where
5664 ___E: ::fidl_next::Encoder + ?Sized,
5665 &'a NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
5666 {
5667 #[inline]
5668 fn encode_option(
5669 this: ::core::option::Option<Self>,
5670 encoder: &mut ___E,
5671 out: &mut ::core::mem::MaybeUninit<
5672 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsRequest>,
5673 >,
5674 _: (),
5675 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5676 if let Some(inner) = this {
5677 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5678 ::fidl_next::WireBox::encode_present(out);
5679 } else {
5680 ::fidl_next::WireBox::encode_absent(out);
5681 }
5682
5683 Ok(())
5684 }
5685 }
5686
5687 impl ::fidl_next::FromWire<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
5688 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5689 crate::wire::NodeSetFlagsRequest,
5690 Self,
5691 > = unsafe {
5692 ::fidl_next::CopyOptimization::enable_if(
5693 true
5694
5695 && <
5696 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
5697 >::COPY_OPTIMIZATION.is_enabled()
5698
5699 )
5700 };
5701
5702 #[inline]
5703 fn from_wire(wire: crate::wire::NodeSetFlagsRequest) -> Self {
5704 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
5705 }
5706 }
5707
5708 impl ::fidl_next::FromWireRef<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
5709 #[inline]
5710 fn from_wire_ref(wire: &crate::wire::NodeSetFlagsRequest) -> Self {
5711 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
5712 }
5713 }
5714
5715 #[doc = " Used in places where empty structs are needed, such as empty union members, to avoid creating\n new struct types.\n"]
5716 #[derive(PartialEq, Clone, Debug)]
5717 #[repr(C)]
5718 pub struct EmptyStruct {}
5719
5720 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyStruct, ___E> for EmptyStruct
5721 where
5722 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5723 {
5724 #[inline]
5725 fn encode(
5726 self,
5727 encoder_: &mut ___E,
5728 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyStruct>,
5729 _: (),
5730 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5731 *out_ = ::core::mem::MaybeUninit::zeroed();
5732
5733 Ok(())
5734 }
5735 }
5736
5737 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::EmptyStruct, ___E> for &'a EmptyStruct
5738 where
5739 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5740 {
5741 #[inline]
5742 fn encode(
5743 self,
5744 encoder_: &mut ___E,
5745 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyStruct>,
5746 _: (),
5747 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5748 ::fidl_next::munge! {
5749 let crate::wire::EmptyStruct {
5750
5751 _empty,
5752
5753
5754 } = out_;
5755 }
5756
5757 Ok(())
5758 }
5759 }
5760
5761 unsafe impl<___E>
5762 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::EmptyStruct>, ___E>
5763 for EmptyStruct
5764 where
5765 ___E: ::fidl_next::Encoder + ?Sized,
5766 EmptyStruct: ::fidl_next::Encode<crate::wire::EmptyStruct, ___E>,
5767 {
5768 #[inline]
5769 fn encode_option(
5770 this: ::core::option::Option<Self>,
5771 encoder: &mut ___E,
5772 out: &mut ::core::mem::MaybeUninit<
5773 ::fidl_next::WireBox<'static, crate::wire::EmptyStruct>,
5774 >,
5775 _: (),
5776 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5777 if let Some(inner) = this {
5778 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5779 ::fidl_next::WireBox::encode_present(out);
5780 } else {
5781 ::fidl_next::WireBox::encode_absent(out);
5782 }
5783
5784 Ok(())
5785 }
5786 }
5787
5788 unsafe impl<'a, ___E>
5789 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::EmptyStruct>, ___E>
5790 for &'a EmptyStruct
5791 where
5792 ___E: ::fidl_next::Encoder + ?Sized,
5793 &'a EmptyStruct: ::fidl_next::Encode<crate::wire::EmptyStruct, ___E>,
5794 {
5795 #[inline]
5796 fn encode_option(
5797 this: ::core::option::Option<Self>,
5798 encoder: &mut ___E,
5799 out: &mut ::core::mem::MaybeUninit<
5800 ::fidl_next::WireBox<'static, crate::wire::EmptyStruct>,
5801 >,
5802 _: (),
5803 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5804 if let Some(inner) = this {
5805 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5806 ::fidl_next::WireBox::encode_present(out);
5807 } else {
5808 ::fidl_next::WireBox::encode_absent(out);
5809 }
5810
5811 Ok(())
5812 }
5813 }
5814
5815 impl ::fidl_next::FromWire<crate::wire::EmptyStruct> for EmptyStruct {
5816 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::EmptyStruct, Self> =
5817 unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
5818
5819 #[inline]
5820 fn from_wire(wire: crate::wire::EmptyStruct) -> Self {
5821 Self {}
5822 }
5823 }
5824
5825 impl ::fidl_next::FromWireRef<crate::wire::EmptyStruct> for EmptyStruct {
5826 #[inline]
5827 fn from_wire_ref(wire: &crate::wire::EmptyStruct) -> Self {
5828 Self {}
5829 }
5830 }
5831
5832 #[derive(PartialEq, Clone, Debug)]
5833 pub enum SelinuxContext {
5834 Data(::std::vec::Vec<u8>),
5835
5836 UseExtendedAttributes(crate::natural::EmptyStruct),
5837
5838 UnknownOrdinal_(u64),
5839 }
5840
5841 impl SelinuxContext {
5842 pub fn is_unknown(&self) -> bool {
5843 #[allow(unreachable_patterns)]
5844 match self {
5845 Self::UnknownOrdinal_(_) => true,
5846 _ => false,
5847 }
5848 }
5849 }
5850
5851 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E> for SelinuxContext
5852 where
5853 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5854 ___E: ::fidl_next::Encoder,
5855 {
5856 #[inline]
5857 fn encode(
5858 self,
5859 encoder: &mut ___E,
5860 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
5861 _: (),
5862 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5863 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
5864
5865 match self {
5866 Self::Data(value) => ::fidl_next::RawWireUnion::encode_as::<
5867 ___E,
5868 ::fidl_next::WireVector<'static, u8>,
5869 >(value, 1, encoder, raw, (256, ()))?,
5870
5871 Self::UseExtendedAttributes(value) => ::fidl_next::RawWireUnion::encode_as::<
5872 ___E,
5873 crate::wire::EmptyStruct,
5874 >(value, 2, encoder, raw, ())?,
5875
5876 Self::UnknownOrdinal_(ordinal) => {
5877 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
5878 }
5879 }
5880
5881 Ok(())
5882 }
5883 }
5884
5885 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>
5886 for &'a SelinuxContext
5887 where
5888 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5889 ___E: ::fidl_next::Encoder,
5890 {
5891 #[inline]
5892 fn encode(
5893 self,
5894 encoder: &mut ___E,
5895 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
5896 _: (),
5897 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5898 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
5899
5900 match self {
5901 SelinuxContext::Data(value) => ::fidl_next::RawWireUnion::encode_as::<
5902 ___E,
5903 ::fidl_next::WireVector<'static, u8>,
5904 >(value, 1, encoder, raw, (256, ()))?,
5905
5906 SelinuxContext::UseExtendedAttributes(value) => {
5907 ::fidl_next::RawWireUnion::encode_as::<___E, crate::wire::EmptyStruct>(
5908 value,
5909 2,
5910 encoder,
5911 raw,
5912 (),
5913 )?
5914 }
5915
5916 SelinuxContext::UnknownOrdinal_(ordinal) => {
5917 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
5918 }
5919 }
5920
5921 Ok(())
5922 }
5923 }
5924
5925 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
5926 for SelinuxContext
5927 where
5928 ___E: ?Sized,
5929 SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
5930 {
5931 #[inline]
5932 fn encode_option(
5933 this: ::core::option::Option<Self>,
5934 encoder: &mut ___E,
5935 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
5936 _: (),
5937 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5938 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
5939
5940 if let Some(inner) = this {
5941 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
5942 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
5943 } else {
5944 ::fidl_next::RawWireUnion::encode_absent(raw);
5945 }
5946
5947 Ok(())
5948 }
5949 }
5950
5951 unsafe impl<'a, ___E>
5952 ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
5953 for &'a SelinuxContext
5954 where
5955 ___E: ?Sized,
5956 &'a SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
5957 {
5958 #[inline]
5959 fn encode_option(
5960 this: ::core::option::Option<Self>,
5961 encoder: &mut ___E,
5962 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
5963 _: (),
5964 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5965 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
5966
5967 if let Some(inner) = this {
5968 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
5969 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
5970 } else {
5971 ::fidl_next::RawWireUnion::encode_absent(raw);
5972 }
5973
5974 Ok(())
5975 }
5976 }
5977
5978 impl<'de> ::fidl_next::FromWire<crate::wire::SelinuxContext<'de>> for SelinuxContext {
5979 #[inline]
5980 fn from_wire(wire: crate::wire::SelinuxContext<'de>) -> Self {
5981 let wire = ::core::mem::ManuallyDrop::new(wire);
5982 match wire.raw.ordinal() {
5983 1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
5984 wire.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>()
5985 })),
5986
5987 2 => Self::UseExtendedAttributes(::fidl_next::FromWire::from_wire(unsafe {
5988 wire.raw.get().read_unchecked::<crate::wire::EmptyStruct>()
5989 })),
5990
5991 ord => return Self::UnknownOrdinal_(ord as u64),
5992 }
5993 }
5994 }
5995
5996 impl<'de> ::fidl_next::FromWireRef<crate::wire::SelinuxContext<'de>> for SelinuxContext {
5997 #[inline]
5998 fn from_wire_ref(wire: &crate::wire::SelinuxContext<'de>) -> Self {
5999 match wire.raw.ordinal() {
6000 1 => Self::Data(::fidl_next::FromWireRef::from_wire_ref(unsafe {
6001 wire.raw.get().deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
6002 })),
6003
6004 2 => Self::UseExtendedAttributes(::fidl_next::FromWireRef::from_wire_ref(unsafe {
6005 wire.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
6006 })),
6007
6008 ord => return Self::UnknownOrdinal_(ord as u64),
6009 }
6010 }
6011 }
6012
6013 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
6014 for SelinuxContext
6015 {
6016 #[inline]
6017 fn from_wire_option(
6018 wire: crate::wire_optional::SelinuxContext<'de>,
6019 ) -> ::core::option::Option<Self> {
6020 if let Some(inner) = wire.into_option() {
6021 Some(::fidl_next::FromWire::from_wire(inner))
6022 } else {
6023 None
6024 }
6025 }
6026 }
6027
6028 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
6029 for Box<SelinuxContext>
6030 {
6031 #[inline]
6032 fn from_wire_option(
6033 wire: crate::wire_optional::SelinuxContext<'de>,
6034 ) -> ::core::option::Option<Self> {
6035 <SelinuxContext as ::fidl_next::FromWireOption<
6036 crate::wire_optional::SelinuxContext<'de>,
6037 >>::from_wire_option(wire)
6038 .map(Box::new)
6039 }
6040 }
6041
6042 impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::SelinuxContext<'de>>
6043 for Box<SelinuxContext>
6044 {
6045 #[inline]
6046 fn from_wire_option_ref(
6047 wire: &crate::wire_optional::SelinuxContext<'de>,
6048 ) -> ::core::option::Option<Self> {
6049 if let Some(inner) = wire.as_ref() {
6050 Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
6051 } else {
6052 None
6053 }
6054 }
6055 }
6056
6057 #[derive(PartialEq, Clone, Debug, Default)]
6058 pub struct MutableNodeAttributes {
6059 pub creation_time: ::core::option::Option<u64>,
6060
6061 pub modification_time: ::core::option::Option<u64>,
6062
6063 pub mode: ::core::option::Option<u32>,
6064
6065 pub uid: ::core::option::Option<u32>,
6066
6067 pub gid: ::core::option::Option<u32>,
6068
6069 pub rdev: ::core::option::Option<u64>,
6070
6071 pub access_time: ::core::option::Option<u64>,
6072
6073 pub casefold: ::core::option::Option<bool>,
6074
6075 pub selinux_context: ::core::option::Option<crate::natural::SelinuxContext>,
6076
6077 pub wrapping_key_id: ::core::option::Option<[u8; 16]>,
6078 }
6079
6080 impl MutableNodeAttributes {
6081 fn __max_ordinal(&self) -> usize {
6082 if self.wrapping_key_id.is_some() {
6083 return 10;
6084 }
6085
6086 if self.selinux_context.is_some() {
6087 return 9;
6088 }
6089
6090 if self.casefold.is_some() {
6091 return 8;
6092 }
6093
6094 if self.access_time.is_some() {
6095 return 7;
6096 }
6097
6098 if self.rdev.is_some() {
6099 return 6;
6100 }
6101
6102 if self.gid.is_some() {
6103 return 5;
6104 }
6105
6106 if self.uid.is_some() {
6107 return 4;
6108 }
6109
6110 if self.mode.is_some() {
6111 return 3;
6112 }
6113
6114 if self.modification_time.is_some() {
6115 return 2;
6116 }
6117
6118 if self.creation_time.is_some() {
6119 return 1;
6120 }
6121
6122 0
6123 }
6124 }
6125
6126 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
6127 for MutableNodeAttributes
6128 where
6129 ___E: ::fidl_next::Encoder + ?Sized,
6130 {
6131 #[inline]
6132 fn encode(
6133 mut self,
6134 encoder: &mut ___E,
6135 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
6136 _: (),
6137 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6138 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
6139
6140 let max_ord = self.__max_ordinal();
6141
6142 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6143 ::fidl_next::Wire::zero_padding(&mut out);
6144
6145 let mut preallocated =
6146 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6147
6148 for i in 1..=max_ord {
6149 match i {
6150 10 => {
6151 if let Some(value) = self.wrapping_key_id.take() {
6152 ::fidl_next::WireEnvelope::encode_value::<[u8; 16], ___E>(
6153 value,
6154 preallocated.encoder,
6155 &mut out,
6156 (),
6157 )?;
6158 } else {
6159 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6160 }
6161 }
6162
6163 9 => {
6164 if let Some(value) = self.selinux_context.take() {
6165 ::fidl_next::WireEnvelope::encode_value::<
6166 crate::wire::SelinuxContext<'static>,
6167 ___E,
6168 >(
6169 value, preallocated.encoder, &mut out, ()
6170 )?;
6171 } else {
6172 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6173 }
6174 }
6175
6176 8 => {
6177 if let Some(value) = self.casefold.take() {
6178 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
6179 value,
6180 preallocated.encoder,
6181 &mut out,
6182 (),
6183 )?;
6184 } else {
6185 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6186 }
6187 }
6188
6189 7 => {
6190 if let Some(value) = self.access_time.take() {
6191 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6192 value,
6193 preallocated.encoder,
6194 &mut out,
6195 (),
6196 )?;
6197 } else {
6198 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6199 }
6200 }
6201
6202 6 => {
6203 if let Some(value) = self.rdev.take() {
6204 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6205 value,
6206 preallocated.encoder,
6207 &mut out,
6208 (),
6209 )?;
6210 } else {
6211 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6212 }
6213 }
6214
6215 5 => {
6216 if let Some(value) = self.gid.take() {
6217 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6218 value,
6219 preallocated.encoder,
6220 &mut out,
6221 (),
6222 )?;
6223 } else {
6224 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6225 }
6226 }
6227
6228 4 => {
6229 if let Some(value) = self.uid.take() {
6230 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6231 value,
6232 preallocated.encoder,
6233 &mut out,
6234 (),
6235 )?;
6236 } else {
6237 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6238 }
6239 }
6240
6241 3 => {
6242 if let Some(value) = self.mode.take() {
6243 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6244 value,
6245 preallocated.encoder,
6246 &mut out,
6247 (),
6248 )?;
6249 } else {
6250 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6251 }
6252 }
6253
6254 2 => {
6255 if let Some(value) = self.modification_time.take() {
6256 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6257 value,
6258 preallocated.encoder,
6259 &mut out,
6260 (),
6261 )?;
6262 } else {
6263 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6264 }
6265 }
6266
6267 1 => {
6268 if let Some(value) = self.creation_time.take() {
6269 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6270 value,
6271 preallocated.encoder,
6272 &mut out,
6273 (),
6274 )?;
6275 } else {
6276 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6277 }
6278 }
6279
6280 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6281 }
6282 unsafe {
6283 preallocated.write_next(out.assume_init_ref());
6284 }
6285 }
6286
6287 ::fidl_next::WireTable::encode_len(table, max_ord);
6288
6289 Ok(())
6290 }
6291 }
6292
6293 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
6294 for &'a MutableNodeAttributes
6295 where
6296 ___E: ::fidl_next::Encoder + ?Sized,
6297 {
6298 #[inline]
6299 fn encode(
6300 self,
6301 encoder: &mut ___E,
6302 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
6303 _: (),
6304 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6305 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
6306
6307 let max_ord = self.__max_ordinal();
6308
6309 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6310 ::fidl_next::Wire::zero_padding(&mut out);
6311
6312 let mut preallocated =
6313 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6314
6315 for i in 1..=max_ord {
6316 match i {
6317 10 => {
6318 if let Some(value) = &self.wrapping_key_id {
6319 ::fidl_next::WireEnvelope::encode_value::<[u8; 16], ___E>(
6320 value,
6321 preallocated.encoder,
6322 &mut out,
6323 (),
6324 )?;
6325 } else {
6326 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6327 }
6328 }
6329
6330 9 => {
6331 if let Some(value) = &self.selinux_context {
6332 ::fidl_next::WireEnvelope::encode_value::<
6333 crate::wire::SelinuxContext<'static>,
6334 ___E,
6335 >(
6336 value, preallocated.encoder, &mut out, ()
6337 )?;
6338 } else {
6339 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6340 }
6341 }
6342
6343 8 => {
6344 if let Some(value) = &self.casefold {
6345 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
6346 value,
6347 preallocated.encoder,
6348 &mut out,
6349 (),
6350 )?;
6351 } else {
6352 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6353 }
6354 }
6355
6356 7 => {
6357 if let Some(value) = &self.access_time {
6358 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6359 value,
6360 preallocated.encoder,
6361 &mut out,
6362 (),
6363 )?;
6364 } else {
6365 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6366 }
6367 }
6368
6369 6 => {
6370 if let Some(value) = &self.rdev {
6371 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6372 value,
6373 preallocated.encoder,
6374 &mut out,
6375 (),
6376 )?;
6377 } else {
6378 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6379 }
6380 }
6381
6382 5 => {
6383 if let Some(value) = &self.gid {
6384 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6385 value,
6386 preallocated.encoder,
6387 &mut out,
6388 (),
6389 )?;
6390 } else {
6391 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6392 }
6393 }
6394
6395 4 => {
6396 if let Some(value) = &self.uid {
6397 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6398 value,
6399 preallocated.encoder,
6400 &mut out,
6401 (),
6402 )?;
6403 } else {
6404 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6405 }
6406 }
6407
6408 3 => {
6409 if let Some(value) = &self.mode {
6410 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6411 value,
6412 preallocated.encoder,
6413 &mut out,
6414 (),
6415 )?;
6416 } else {
6417 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6418 }
6419 }
6420
6421 2 => {
6422 if let Some(value) = &self.modification_time {
6423 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6424 value,
6425 preallocated.encoder,
6426 &mut out,
6427 (),
6428 )?;
6429 } else {
6430 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6431 }
6432 }
6433
6434 1 => {
6435 if let Some(value) = &self.creation_time {
6436 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6437 value,
6438 preallocated.encoder,
6439 &mut out,
6440 (),
6441 )?;
6442 } else {
6443 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6444 }
6445 }
6446
6447 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6448 }
6449 unsafe {
6450 preallocated.write_next(out.assume_init_ref());
6451 }
6452 }
6453
6454 ::fidl_next::WireTable::encode_len(table, max_ord);
6455
6456 Ok(())
6457 }
6458 }
6459
6460 impl<'de> ::fidl_next::FromWire<crate::wire::MutableNodeAttributes<'de>> for MutableNodeAttributes {
6461 #[inline]
6462 fn from_wire(wire_: crate::wire::MutableNodeAttributes<'de>) -> Self {
6463 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6464
6465 let creation_time = wire_.table.get(1);
6466
6467 let modification_time = wire_.table.get(2);
6468
6469 let mode = wire_.table.get(3);
6470
6471 let uid = wire_.table.get(4);
6472
6473 let gid = wire_.table.get(5);
6474
6475 let rdev = wire_.table.get(6);
6476
6477 let access_time = wire_.table.get(7);
6478
6479 let casefold = wire_.table.get(8);
6480
6481 let selinux_context = wire_.table.get(9);
6482
6483 let wrapping_key_id = wire_.table.get(10);
6484
6485 Self {
6486 creation_time: creation_time.map(|envelope| {
6487 ::fidl_next::FromWire::from_wire(unsafe {
6488 envelope.read_unchecked::<::fidl_next::WireU64>()
6489 })
6490 }),
6491
6492 modification_time: modification_time.map(|envelope| {
6493 ::fidl_next::FromWire::from_wire(unsafe {
6494 envelope.read_unchecked::<::fidl_next::WireU64>()
6495 })
6496 }),
6497
6498 mode: mode.map(|envelope| {
6499 ::fidl_next::FromWire::from_wire(unsafe {
6500 envelope.read_unchecked::<::fidl_next::WireU32>()
6501 })
6502 }),
6503
6504 uid: uid.map(|envelope| {
6505 ::fidl_next::FromWire::from_wire(unsafe {
6506 envelope.read_unchecked::<::fidl_next::WireU32>()
6507 })
6508 }),
6509
6510 gid: gid.map(|envelope| {
6511 ::fidl_next::FromWire::from_wire(unsafe {
6512 envelope.read_unchecked::<::fidl_next::WireU32>()
6513 })
6514 }),
6515
6516 rdev: rdev.map(|envelope| {
6517 ::fidl_next::FromWire::from_wire(unsafe {
6518 envelope.read_unchecked::<::fidl_next::WireU64>()
6519 })
6520 }),
6521
6522 access_time: access_time.map(|envelope| {
6523 ::fidl_next::FromWire::from_wire(unsafe {
6524 envelope.read_unchecked::<::fidl_next::WireU64>()
6525 })
6526 }),
6527
6528 casefold: casefold.map(|envelope| {
6529 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
6530 }),
6531
6532 selinux_context: selinux_context.map(|envelope| {
6533 ::fidl_next::FromWire::from_wire(unsafe {
6534 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
6535 })
6536 }),
6537
6538 wrapping_key_id: wrapping_key_id.map(|envelope| {
6539 ::fidl_next::FromWire::from_wire(unsafe {
6540 envelope.read_unchecked::<[u8; 16]>()
6541 })
6542 }),
6543 }
6544 }
6545 }
6546
6547 impl<'de> ::fidl_next::FromWireRef<crate::wire::MutableNodeAttributes<'de>>
6548 for MutableNodeAttributes
6549 {
6550 #[inline]
6551 fn from_wire_ref(wire: &crate::wire::MutableNodeAttributes<'de>) -> Self {
6552 Self {
6553 creation_time: wire.table.get(1).map(|envelope| {
6554 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6555 envelope.deref_unchecked::<::fidl_next::WireU64>()
6556 })
6557 }),
6558
6559 modification_time: wire.table.get(2).map(|envelope| {
6560 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6561 envelope.deref_unchecked::<::fidl_next::WireU64>()
6562 })
6563 }),
6564
6565 mode: wire.table.get(3).map(|envelope| {
6566 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6567 envelope.deref_unchecked::<::fidl_next::WireU32>()
6568 })
6569 }),
6570
6571 uid: wire.table.get(4).map(|envelope| {
6572 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6573 envelope.deref_unchecked::<::fidl_next::WireU32>()
6574 })
6575 }),
6576
6577 gid: wire.table.get(5).map(|envelope| {
6578 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6579 envelope.deref_unchecked::<::fidl_next::WireU32>()
6580 })
6581 }),
6582
6583 rdev: wire.table.get(6).map(|envelope| {
6584 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6585 envelope.deref_unchecked::<::fidl_next::WireU64>()
6586 })
6587 }),
6588
6589 access_time: wire.table.get(7).map(|envelope| {
6590 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6591 envelope.deref_unchecked::<::fidl_next::WireU64>()
6592 })
6593 }),
6594
6595 casefold: wire.table.get(8).map(|envelope| {
6596 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6597 envelope.deref_unchecked::<bool>()
6598 })
6599 }),
6600
6601 selinux_context: wire.table.get(9).map(|envelope| {
6602 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6603 envelope.deref_unchecked::<crate::wire::SelinuxContext<'de>>()
6604 })
6605 }),
6606
6607 wrapping_key_id: wire.table.get(10).map(|envelope| {
6608 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6609 envelope.deref_unchecked::<[u8; 16]>()
6610 })
6611 }),
6612 }
6613 }
6614 }
6615
6616 ::fidl_next::bitflags::bitflags! {
6617 #[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(
6618 Clone,
6619 Copy,
6620 Debug,
6621 PartialEq,
6622 Eq,
6623 Hash,
6624 )]
6625 pub struct NodeProtocolKinds: u64 {
6626 #[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;
6627 #[doc = " The directory representation of a node.\n\n The connection will speak the [`Directory`] protocol.\n"]const DIRECTORY = 2;
6628 #[doc = " The file representation of a node.\n\n The connection will speak the [`File`] protocol.\n"]const FILE = 4;
6629 #[doc = " The symlink representation of a node.\n\n The connection will speak the [`Symlink`] protocol.\n"]const SYMLINK = 8;
6630 const _ = !0;
6631 }
6632 }
6633
6634 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E> for NodeProtocolKinds
6635 where
6636 ___E: ?Sized,
6637 {
6638 #[inline]
6639 fn encode(
6640 self,
6641 encoder: &mut ___E,
6642 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
6643 _: (),
6644 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6645 ::fidl_next::Encode::encode(&self, encoder, out, ())
6646 }
6647 }
6648
6649 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E>
6650 for &'a NodeProtocolKinds
6651 where
6652 ___E: ?Sized,
6653 {
6654 #[inline]
6655 fn encode(
6656 self,
6657 _: &mut ___E,
6658 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
6659 _: (),
6660 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6661 ::fidl_next::munge!(let crate::wire::NodeProtocolKinds { value } = out);
6662
6663 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
6664 Ok(())
6665 }
6666 }
6667
6668 impl ::core::convert::From<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
6669 fn from(wire: crate::wire::NodeProtocolKinds) -> Self {
6670 Self::from_bits_retain(u64::from(wire.value))
6671 }
6672 }
6673
6674 impl ::fidl_next::FromWire<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
6675 #[inline]
6676 fn from_wire(wire: crate::wire::NodeProtocolKinds) -> Self {
6677 Self::from(wire)
6678 }
6679 }
6680
6681 impl ::fidl_next::FromWireRef<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
6682 #[inline]
6683 fn from_wire_ref(wire: &crate::wire::NodeProtocolKinds) -> Self {
6684 Self::from(*wire)
6685 }
6686 }
6687
6688 #[doc = " Denotes which hash algorithm is used to build the merkle tree for\n fsverity-enabled files.\n"]
6689 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6690 #[repr(u8)]
6691 pub enum HashAlgorithm {
6692 Sha256 = 1,
6693 Sha512 = 2,
6694 UnknownOrdinal_(u8) = 3,
6695 }
6696 impl ::std::convert::From<u8> for HashAlgorithm {
6697 fn from(value: u8) -> Self {
6698 match value {
6699 1 => Self::Sha256,
6700 2 => Self::Sha512,
6701
6702 _ => Self::UnknownOrdinal_(value),
6703 }
6704 }
6705 }
6706
6707 unsafe impl<___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for HashAlgorithm
6708 where
6709 ___E: ?Sized,
6710 {
6711 #[inline]
6712 fn encode(
6713 self,
6714 encoder: &mut ___E,
6715 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
6716 _: (),
6717 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6718 ::fidl_next::Encode::encode(&self, encoder, out, ())
6719 }
6720 }
6721
6722 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for &'a HashAlgorithm
6723 where
6724 ___E: ?Sized,
6725 {
6726 #[inline]
6727 fn encode(
6728 self,
6729 encoder: &mut ___E,
6730 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
6731 _: (),
6732 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6733 ::fidl_next::munge!(let crate::wire::HashAlgorithm { value } = out);
6734 let _ = value.write(u8::from(match *self {
6735 HashAlgorithm::Sha256 => 1,
6736
6737 HashAlgorithm::Sha512 => 2,
6738
6739 HashAlgorithm::UnknownOrdinal_(value) => value,
6740 }));
6741
6742 Ok(())
6743 }
6744 }
6745
6746 impl ::core::convert::From<crate::wire::HashAlgorithm> for HashAlgorithm {
6747 fn from(wire: crate::wire::HashAlgorithm) -> Self {
6748 match u8::from(wire.value) {
6749 1 => Self::Sha256,
6750
6751 2 => Self::Sha512,
6752
6753 value => Self::UnknownOrdinal_(value),
6754 }
6755 }
6756 }
6757
6758 impl ::fidl_next::FromWire<crate::wire::HashAlgorithm> for HashAlgorithm {
6759 #[inline]
6760 fn from_wire(wire: crate::wire::HashAlgorithm) -> Self {
6761 Self::from(wire)
6762 }
6763 }
6764
6765 impl ::fidl_next::FromWireRef<crate::wire::HashAlgorithm> for HashAlgorithm {
6766 #[inline]
6767 fn from_wire_ref(wire: &crate::wire::HashAlgorithm) -> Self {
6768 Self::from(*wire)
6769 }
6770 }
6771
6772 #[doc = " Set of options used to enable verity on a file.\n"]
6773 #[derive(PartialEq, Clone, Debug, Default)]
6774 pub struct VerificationOptions {
6775 pub hash_algorithm: ::core::option::Option<crate::natural::HashAlgorithm>,
6776
6777 pub salt: ::core::option::Option<::std::vec::Vec<u8>>,
6778 }
6779
6780 impl VerificationOptions {
6781 fn __max_ordinal(&self) -> usize {
6782 if self.salt.is_some() {
6783 return 2;
6784 }
6785
6786 if self.hash_algorithm.is_some() {
6787 return 1;
6788 }
6789
6790 0
6791 }
6792 }
6793
6794 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
6795 for VerificationOptions
6796 where
6797 ___E: ::fidl_next::Encoder + ?Sized,
6798 {
6799 #[inline]
6800 fn encode(
6801 mut self,
6802 encoder: &mut ___E,
6803 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
6804 _: (),
6805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6806 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
6807
6808 let max_ord = self.__max_ordinal();
6809
6810 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6811 ::fidl_next::Wire::zero_padding(&mut out);
6812
6813 let mut preallocated =
6814 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6815
6816 for i in 1..=max_ord {
6817 match i {
6818 2 => {
6819 if let Some(value) = self.salt.take() {
6820 ::fidl_next::WireEnvelope::encode_value::<
6821 ::fidl_next::WireVector<'static, u8>,
6822 ___E,
6823 >(
6824 value, preallocated.encoder, &mut out, (32, ())
6825 )?;
6826 } else {
6827 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6828 }
6829 }
6830
6831 1 => {
6832 if let Some(value) = self.hash_algorithm.take() {
6833 ::fidl_next::WireEnvelope::encode_value::<
6834 crate::wire::HashAlgorithm,
6835 ___E,
6836 >(
6837 value, preallocated.encoder, &mut out, ()
6838 )?;
6839 } else {
6840 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6841 }
6842 }
6843
6844 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6845 }
6846 unsafe {
6847 preallocated.write_next(out.assume_init_ref());
6848 }
6849 }
6850
6851 ::fidl_next::WireTable::encode_len(table, max_ord);
6852
6853 Ok(())
6854 }
6855 }
6856
6857 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
6858 for &'a VerificationOptions
6859 where
6860 ___E: ::fidl_next::Encoder + ?Sized,
6861 {
6862 #[inline]
6863 fn encode(
6864 self,
6865 encoder: &mut ___E,
6866 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
6867 _: (),
6868 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6869 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
6870
6871 let max_ord = self.__max_ordinal();
6872
6873 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6874 ::fidl_next::Wire::zero_padding(&mut out);
6875
6876 let mut preallocated =
6877 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6878
6879 for i in 1..=max_ord {
6880 match i {
6881 2 => {
6882 if let Some(value) = &self.salt {
6883 ::fidl_next::WireEnvelope::encode_value::<
6884 ::fidl_next::WireVector<'static, u8>,
6885 ___E,
6886 >(
6887 value, preallocated.encoder, &mut out, (32, ())
6888 )?;
6889 } else {
6890 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6891 }
6892 }
6893
6894 1 => {
6895 if let Some(value) = &self.hash_algorithm {
6896 ::fidl_next::WireEnvelope::encode_value::<
6897 crate::wire::HashAlgorithm,
6898 ___E,
6899 >(
6900 value, preallocated.encoder, &mut out, ()
6901 )?;
6902 } else {
6903 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6904 }
6905 }
6906
6907 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6908 }
6909 unsafe {
6910 preallocated.write_next(out.assume_init_ref());
6911 }
6912 }
6913
6914 ::fidl_next::WireTable::encode_len(table, max_ord);
6915
6916 Ok(())
6917 }
6918 }
6919
6920 impl<'de> ::fidl_next::FromWire<crate::wire::VerificationOptions<'de>> for VerificationOptions {
6921 #[inline]
6922 fn from_wire(wire_: crate::wire::VerificationOptions<'de>) -> Self {
6923 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6924
6925 let hash_algorithm = wire_.table.get(1);
6926
6927 let salt = wire_.table.get(2);
6928
6929 Self {
6930 hash_algorithm: hash_algorithm.map(|envelope| {
6931 ::fidl_next::FromWire::from_wire(unsafe {
6932 envelope.read_unchecked::<crate::wire::HashAlgorithm>()
6933 })
6934 }),
6935
6936 salt: salt.map(|envelope| {
6937 ::fidl_next::FromWire::from_wire(unsafe {
6938 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
6939 })
6940 }),
6941 }
6942 }
6943 }
6944
6945 impl<'de> ::fidl_next::FromWireRef<crate::wire::VerificationOptions<'de>> for VerificationOptions {
6946 #[inline]
6947 fn from_wire_ref(wire: &crate::wire::VerificationOptions<'de>) -> Self {
6948 Self {
6949 hash_algorithm: wire.table.get(1).map(|envelope| {
6950 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6951 envelope.deref_unchecked::<crate::wire::HashAlgorithm>()
6952 })
6953 }),
6954
6955 salt: wire.table.get(2).map(|envelope| {
6956 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6957 envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
6958 })
6959 }),
6960 }
6961 }
6962 }
6963
6964 #[derive(PartialEq, Clone, Debug, Default)]
6965 pub struct ImmutableNodeAttributes {
6966 pub protocols: ::core::option::Option<crate::natural::NodeProtocolKinds>,
6967
6968 pub abilities: ::core::option::Option<crate::natural::Operations>,
6969
6970 pub content_size: ::core::option::Option<u64>,
6971
6972 pub storage_size: ::core::option::Option<u64>,
6973
6974 pub link_count: ::core::option::Option<u64>,
6975
6976 pub id: ::core::option::Option<u64>,
6977
6978 pub change_time: ::core::option::Option<u64>,
6979
6980 pub options: ::core::option::Option<crate::natural::VerificationOptions>,
6981
6982 pub root_hash: ::core::option::Option<::std::vec::Vec<u8>>,
6983
6984 pub verity_enabled: ::core::option::Option<bool>,
6985 }
6986
6987 impl ImmutableNodeAttributes {
6988 fn __max_ordinal(&self) -> usize {
6989 if self.verity_enabled.is_some() {
6990 return 10;
6991 }
6992
6993 if self.root_hash.is_some() {
6994 return 9;
6995 }
6996
6997 if self.options.is_some() {
6998 return 8;
6999 }
7000
7001 if self.change_time.is_some() {
7002 return 7;
7003 }
7004
7005 if self.id.is_some() {
7006 return 6;
7007 }
7008
7009 if self.link_count.is_some() {
7010 return 5;
7011 }
7012
7013 if self.storage_size.is_some() {
7014 return 4;
7015 }
7016
7017 if self.content_size.is_some() {
7018 return 3;
7019 }
7020
7021 if self.abilities.is_some() {
7022 return 2;
7023 }
7024
7025 if self.protocols.is_some() {
7026 return 1;
7027 }
7028
7029 0
7030 }
7031 }
7032
7033 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
7034 for ImmutableNodeAttributes
7035 where
7036 ___E: ::fidl_next::Encoder + ?Sized,
7037 {
7038 #[inline]
7039 fn encode(
7040 mut self,
7041 encoder: &mut ___E,
7042 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
7043 _: (),
7044 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7045 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
7046
7047 let max_ord = self.__max_ordinal();
7048
7049 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7050 ::fidl_next::Wire::zero_padding(&mut out);
7051
7052 let mut preallocated =
7053 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7054
7055 for i in 1..=max_ord {
7056 match i {
7057 10 => {
7058 if let Some(value) = self.verity_enabled.take() {
7059 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
7060 value,
7061 preallocated.encoder,
7062 &mut out,
7063 (),
7064 )?;
7065 } else {
7066 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7067 }
7068 }
7069
7070 9 => {
7071 if let Some(value) = self.root_hash.take() {
7072 ::fidl_next::WireEnvelope::encode_value::<
7073 ::fidl_next::WireVector<'static, u8>,
7074 ___E,
7075 >(
7076 value, preallocated.encoder, &mut out, (64, ())
7077 )?;
7078 } else {
7079 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7080 }
7081 }
7082
7083 8 => {
7084 if let Some(value) = self.options.take() {
7085 ::fidl_next::WireEnvelope::encode_value::<
7086 crate::wire::VerificationOptions<'static>,
7087 ___E,
7088 >(
7089 value, preallocated.encoder, &mut out, ()
7090 )?;
7091 } else {
7092 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7093 }
7094 }
7095
7096 7 => {
7097 if let Some(value) = self.change_time.take() {
7098 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7099 value,
7100 preallocated.encoder,
7101 &mut out,
7102 (),
7103 )?;
7104 } else {
7105 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7106 }
7107 }
7108
7109 6 => {
7110 if let Some(value) = self.id.take() {
7111 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7112 value,
7113 preallocated.encoder,
7114 &mut out,
7115 (),
7116 )?;
7117 } else {
7118 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7119 }
7120 }
7121
7122 5 => {
7123 if let Some(value) = self.link_count.take() {
7124 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7125 value,
7126 preallocated.encoder,
7127 &mut out,
7128 (),
7129 )?;
7130 } else {
7131 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7132 }
7133 }
7134
7135 4 => {
7136 if let Some(value) = self.storage_size.take() {
7137 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7138 value,
7139 preallocated.encoder,
7140 &mut out,
7141 (),
7142 )?;
7143 } else {
7144 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7145 }
7146 }
7147
7148 3 => {
7149 if let Some(value) = self.content_size.take() {
7150 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7151 value,
7152 preallocated.encoder,
7153 &mut out,
7154 (),
7155 )?;
7156 } else {
7157 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7158 }
7159 }
7160
7161 2 => {
7162 if let Some(value) = self.abilities.take() {
7163 ::fidl_next::WireEnvelope::encode_value::<crate::wire::Operations, ___E>(
7164 value,
7165 preallocated.encoder,
7166 &mut out,
7167 (),
7168 )?;
7169 } else {
7170 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7171 }
7172 }
7173
7174 1 => {
7175 if let Some(value) = self.protocols.take() {
7176 ::fidl_next::WireEnvelope::encode_value::<
7177 crate::wire::NodeProtocolKinds,
7178 ___E,
7179 >(
7180 value, preallocated.encoder, &mut out, ()
7181 )?;
7182 } else {
7183 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7184 }
7185 }
7186
7187 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7188 }
7189 unsafe {
7190 preallocated.write_next(out.assume_init_ref());
7191 }
7192 }
7193
7194 ::fidl_next::WireTable::encode_len(table, max_ord);
7195
7196 Ok(())
7197 }
7198 }
7199
7200 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
7201 for &'a ImmutableNodeAttributes
7202 where
7203 ___E: ::fidl_next::Encoder + ?Sized,
7204 {
7205 #[inline]
7206 fn encode(
7207 self,
7208 encoder: &mut ___E,
7209 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
7210 _: (),
7211 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7212 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
7213
7214 let max_ord = self.__max_ordinal();
7215
7216 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7217 ::fidl_next::Wire::zero_padding(&mut out);
7218
7219 let mut preallocated =
7220 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7221
7222 for i in 1..=max_ord {
7223 match i {
7224 10 => {
7225 if let Some(value) = &self.verity_enabled {
7226 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
7227 value,
7228 preallocated.encoder,
7229 &mut out,
7230 (),
7231 )?;
7232 } else {
7233 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7234 }
7235 }
7236
7237 9 => {
7238 if let Some(value) = &self.root_hash {
7239 ::fidl_next::WireEnvelope::encode_value::<
7240 ::fidl_next::WireVector<'static, u8>,
7241 ___E,
7242 >(
7243 value, preallocated.encoder, &mut out, (64, ())
7244 )?;
7245 } else {
7246 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7247 }
7248 }
7249
7250 8 => {
7251 if let Some(value) = &self.options {
7252 ::fidl_next::WireEnvelope::encode_value::<
7253 crate::wire::VerificationOptions<'static>,
7254 ___E,
7255 >(
7256 value, preallocated.encoder, &mut out, ()
7257 )?;
7258 } else {
7259 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7260 }
7261 }
7262
7263 7 => {
7264 if let Some(value) = &self.change_time {
7265 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7266 value,
7267 preallocated.encoder,
7268 &mut out,
7269 (),
7270 )?;
7271 } else {
7272 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7273 }
7274 }
7275
7276 6 => {
7277 if let Some(value) = &self.id {
7278 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7279 value,
7280 preallocated.encoder,
7281 &mut out,
7282 (),
7283 )?;
7284 } else {
7285 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7286 }
7287 }
7288
7289 5 => {
7290 if let Some(value) = &self.link_count {
7291 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7292 value,
7293 preallocated.encoder,
7294 &mut out,
7295 (),
7296 )?;
7297 } else {
7298 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7299 }
7300 }
7301
7302 4 => {
7303 if let Some(value) = &self.storage_size {
7304 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7305 value,
7306 preallocated.encoder,
7307 &mut out,
7308 (),
7309 )?;
7310 } else {
7311 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7312 }
7313 }
7314
7315 3 => {
7316 if let Some(value) = &self.content_size {
7317 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7318 value,
7319 preallocated.encoder,
7320 &mut out,
7321 (),
7322 )?;
7323 } else {
7324 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7325 }
7326 }
7327
7328 2 => {
7329 if let Some(value) = &self.abilities {
7330 ::fidl_next::WireEnvelope::encode_value::<crate::wire::Operations, ___E>(
7331 value,
7332 preallocated.encoder,
7333 &mut out,
7334 (),
7335 )?;
7336 } else {
7337 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7338 }
7339 }
7340
7341 1 => {
7342 if let Some(value) = &self.protocols {
7343 ::fidl_next::WireEnvelope::encode_value::<
7344 crate::wire::NodeProtocolKinds,
7345 ___E,
7346 >(
7347 value, preallocated.encoder, &mut out, ()
7348 )?;
7349 } else {
7350 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7351 }
7352 }
7353
7354 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7355 }
7356 unsafe {
7357 preallocated.write_next(out.assume_init_ref());
7358 }
7359 }
7360
7361 ::fidl_next::WireTable::encode_len(table, max_ord);
7362
7363 Ok(())
7364 }
7365 }
7366
7367 impl<'de> ::fidl_next::FromWire<crate::wire::ImmutableNodeAttributes<'de>>
7368 for ImmutableNodeAttributes
7369 {
7370 #[inline]
7371 fn from_wire(wire_: crate::wire::ImmutableNodeAttributes<'de>) -> Self {
7372 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7373
7374 let protocols = wire_.table.get(1);
7375
7376 let abilities = wire_.table.get(2);
7377
7378 let content_size = wire_.table.get(3);
7379
7380 let storage_size = wire_.table.get(4);
7381
7382 let link_count = wire_.table.get(5);
7383
7384 let id = wire_.table.get(6);
7385
7386 let change_time = wire_.table.get(7);
7387
7388 let options = wire_.table.get(8);
7389
7390 let root_hash = wire_.table.get(9);
7391
7392 let verity_enabled = wire_.table.get(10);
7393
7394 Self {
7395 protocols: protocols.map(|envelope| {
7396 ::fidl_next::FromWire::from_wire(unsafe {
7397 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
7398 })
7399 }),
7400
7401 abilities: abilities.map(|envelope| {
7402 ::fidl_next::FromWire::from_wire(unsafe {
7403 envelope.read_unchecked::<crate::wire::Operations>()
7404 })
7405 }),
7406
7407 content_size: content_size.map(|envelope| {
7408 ::fidl_next::FromWire::from_wire(unsafe {
7409 envelope.read_unchecked::<::fidl_next::WireU64>()
7410 })
7411 }),
7412
7413 storage_size: storage_size.map(|envelope| {
7414 ::fidl_next::FromWire::from_wire(unsafe {
7415 envelope.read_unchecked::<::fidl_next::WireU64>()
7416 })
7417 }),
7418
7419 link_count: link_count.map(|envelope| {
7420 ::fidl_next::FromWire::from_wire(unsafe {
7421 envelope.read_unchecked::<::fidl_next::WireU64>()
7422 })
7423 }),
7424
7425 id: id.map(|envelope| {
7426 ::fidl_next::FromWire::from_wire(unsafe {
7427 envelope.read_unchecked::<::fidl_next::WireU64>()
7428 })
7429 }),
7430
7431 change_time: change_time.map(|envelope| {
7432 ::fidl_next::FromWire::from_wire(unsafe {
7433 envelope.read_unchecked::<::fidl_next::WireU64>()
7434 })
7435 }),
7436
7437 options: options.map(|envelope| {
7438 ::fidl_next::FromWire::from_wire(unsafe {
7439 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
7440 })
7441 }),
7442
7443 root_hash: root_hash.map(|envelope| {
7444 ::fidl_next::FromWire::from_wire(unsafe {
7445 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
7446 })
7447 }),
7448
7449 verity_enabled: verity_enabled.map(|envelope| {
7450 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
7451 }),
7452 }
7453 }
7454 }
7455
7456 impl<'de> ::fidl_next::FromWireRef<crate::wire::ImmutableNodeAttributes<'de>>
7457 for ImmutableNodeAttributes
7458 {
7459 #[inline]
7460 fn from_wire_ref(wire: &crate::wire::ImmutableNodeAttributes<'de>) -> Self {
7461 Self {
7462 protocols: wire.table.get(1).map(|envelope| {
7463 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7464 envelope.deref_unchecked::<crate::wire::NodeProtocolKinds>()
7465 })
7466 }),
7467
7468 abilities: wire.table.get(2).map(|envelope| {
7469 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7470 envelope.deref_unchecked::<crate::wire::Operations>()
7471 })
7472 }),
7473
7474 content_size: wire.table.get(3).map(|envelope| {
7475 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7476 envelope.deref_unchecked::<::fidl_next::WireU64>()
7477 })
7478 }),
7479
7480 storage_size: wire.table.get(4).map(|envelope| {
7481 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7482 envelope.deref_unchecked::<::fidl_next::WireU64>()
7483 })
7484 }),
7485
7486 link_count: wire.table.get(5).map(|envelope| {
7487 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7488 envelope.deref_unchecked::<::fidl_next::WireU64>()
7489 })
7490 }),
7491
7492 id: wire.table.get(6).map(|envelope| {
7493 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7494 envelope.deref_unchecked::<::fidl_next::WireU64>()
7495 })
7496 }),
7497
7498 change_time: wire.table.get(7).map(|envelope| {
7499 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7500 envelope.deref_unchecked::<::fidl_next::WireU64>()
7501 })
7502 }),
7503
7504 options: wire.table.get(8).map(|envelope| {
7505 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7506 envelope.deref_unchecked::<crate::wire::VerificationOptions<'de>>()
7507 })
7508 }),
7509
7510 root_hash: wire.table.get(9).map(|envelope| {
7511 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7512 envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
7513 })
7514 }),
7515
7516 verity_enabled: wire.table.get(10).map(|envelope| {
7517 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7518 envelope.deref_unchecked::<bool>()
7519 })
7520 }),
7521 }
7522 }
7523 }
7524
7525 #[derive(PartialEq, Clone, Debug)]
7526 pub struct NodeAttributes2 {
7527 pub mutable_attributes: crate::natural::MutableNodeAttributes,
7528
7529 pub immutable_attributes: crate::natural::ImmutableNodeAttributes,
7530 }
7531
7532 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
7533 for NodeAttributes2
7534 where
7535 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7536 ___E: ::fidl_next::Encoder,
7537 {
7538 #[inline]
7539 fn encode(
7540 self,
7541 encoder_: &mut ___E,
7542 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
7543 _: (),
7544 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7545 ::fidl_next::munge! {
7546 let crate::wire::NodeAttributes2 {
7547 mutable_attributes,
7548 immutable_attributes,
7549
7550 } = out_;
7551 }
7552
7553 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
7554
7555 let mut _field =
7556 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
7557
7558 ::fidl_next::Encode::encode(
7559 self.immutable_attributes,
7560 encoder_,
7561 immutable_attributes,
7562 (),
7563 )?;
7564
7565 let mut _field =
7566 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
7567
7568 Ok(())
7569 }
7570 }
7571
7572 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
7573 for &'a NodeAttributes2
7574 where
7575 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7576 ___E: ::fidl_next::Encoder,
7577 {
7578 #[inline]
7579 fn encode(
7580 self,
7581 encoder_: &mut ___E,
7582 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
7583 _: (),
7584 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7585 ::fidl_next::munge! {
7586 let crate::wire::NodeAttributes2 {
7587
7588 mutable_attributes,
7589 immutable_attributes,
7590
7591 } = out_;
7592 }
7593
7594 ::fidl_next::Encode::encode(
7595 &self.mutable_attributes,
7596 encoder_,
7597 mutable_attributes,
7598 (),
7599 )?;
7600
7601 let mut _field =
7602 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
7603
7604 ::fidl_next::Encode::encode(
7605 &self.immutable_attributes,
7606 encoder_,
7607 immutable_attributes,
7608 (),
7609 )?;
7610
7611 let mut _field =
7612 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
7613
7614 Ok(())
7615 }
7616 }
7617
7618 unsafe impl<___E>
7619 ::fidl_next::EncodeOption<
7620 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes2<'static>>,
7621 ___E,
7622 > for NodeAttributes2
7623 where
7624 ___E: ::fidl_next::Encoder + ?Sized,
7625 NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
7626 {
7627 #[inline]
7628 fn encode_option(
7629 this: ::core::option::Option<Self>,
7630 encoder: &mut ___E,
7631 out: &mut ::core::mem::MaybeUninit<
7632 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes2<'static>>,
7633 >,
7634 _: (),
7635 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7636 if let Some(inner) = this {
7637 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
7638 ::fidl_next::WireBox::encode_present(out);
7639 } else {
7640 ::fidl_next::WireBox::encode_absent(out);
7641 }
7642
7643 Ok(())
7644 }
7645 }
7646
7647 unsafe impl<'a, ___E>
7648 ::fidl_next::EncodeOption<
7649 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes2<'static>>,
7650 ___E,
7651 > for &'a NodeAttributes2
7652 where
7653 ___E: ::fidl_next::Encoder + ?Sized,
7654 &'a NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
7655 {
7656 #[inline]
7657 fn encode_option(
7658 this: ::core::option::Option<Self>,
7659 encoder: &mut ___E,
7660 out: &mut ::core::mem::MaybeUninit<
7661 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes2<'static>>,
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::WireBox::encode_present(out);
7668 } else {
7669 ::fidl_next::WireBox::encode_absent(out);
7670 }
7671
7672 Ok(())
7673 }
7674 }
7675
7676 impl<'de> ::fidl_next::FromWire<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
7677 #[inline]
7678 fn from_wire(wire: crate::wire::NodeAttributes2<'de>) -> Self {
7679 Self {
7680 mutable_attributes: ::fidl_next::FromWire::from_wire(wire.mutable_attributes),
7681
7682 immutable_attributes: ::fidl_next::FromWire::from_wire(wire.immutable_attributes),
7683 }
7684 }
7685 }
7686
7687 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
7688 #[inline]
7689 fn from_wire_ref(wire: &crate::wire::NodeAttributes2<'de>) -> Self {
7690 Self {
7691 mutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
7692 &wire.mutable_attributes,
7693 ),
7694
7695 immutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
7696 &wire.immutable_attributes,
7697 ),
7698 }
7699 }
7700 }
7701
7702 #[doc = " Information that describes the target node.\n"]
7703 #[derive(PartialEq, Clone, Debug, Default)]
7704 pub struct NodeInfo {
7705 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
7706 }
7707
7708 impl NodeInfo {
7709 fn __max_ordinal(&self) -> usize {
7710 if self.attributes.is_some() {
7711 return 1;
7712 }
7713
7714 0
7715 }
7716 }
7717
7718 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for NodeInfo
7719 where
7720 ___E: ::fidl_next::Encoder + ?Sized,
7721 {
7722 #[inline]
7723 fn encode(
7724 mut self,
7725 encoder: &mut ___E,
7726 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
7727 _: (),
7728 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7729 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
7730
7731 let max_ord = self.__max_ordinal();
7732
7733 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7734 ::fidl_next::Wire::zero_padding(&mut out);
7735
7736 let mut preallocated =
7737 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7738
7739 for i in 1..=max_ord {
7740 match i {
7741 1 => {
7742 if let Some(value) = self.attributes.take() {
7743 ::fidl_next::WireEnvelope::encode_value::<
7744 crate::wire::NodeAttributes2<'static>,
7745 ___E,
7746 >(
7747 value, preallocated.encoder, &mut out, ()
7748 )?;
7749 } else {
7750 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7751 }
7752 }
7753
7754 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7755 }
7756 unsafe {
7757 preallocated.write_next(out.assume_init_ref());
7758 }
7759 }
7760
7761 ::fidl_next::WireTable::encode_len(table, max_ord);
7762
7763 Ok(())
7764 }
7765 }
7766
7767 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for &'a NodeInfo
7768 where
7769 ___E: ::fidl_next::Encoder + ?Sized,
7770 {
7771 #[inline]
7772 fn encode(
7773 self,
7774 encoder: &mut ___E,
7775 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
7776 _: (),
7777 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7778 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
7779
7780 let max_ord = self.__max_ordinal();
7781
7782 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7783 ::fidl_next::Wire::zero_padding(&mut out);
7784
7785 let mut preallocated =
7786 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7787
7788 for i in 1..=max_ord {
7789 match i {
7790 1 => {
7791 if let Some(value) = &self.attributes {
7792 ::fidl_next::WireEnvelope::encode_value::<
7793 crate::wire::NodeAttributes2<'static>,
7794 ___E,
7795 >(
7796 value, preallocated.encoder, &mut out, ()
7797 )?;
7798 } else {
7799 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7800 }
7801 }
7802
7803 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7804 }
7805 unsafe {
7806 preallocated.write_next(out.assume_init_ref());
7807 }
7808 }
7809
7810 ::fidl_next::WireTable::encode_len(table, max_ord);
7811
7812 Ok(())
7813 }
7814 }
7815
7816 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfo<'de>> for NodeInfo {
7817 #[inline]
7818 fn from_wire(wire_: crate::wire::NodeInfo<'de>) -> Self {
7819 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7820
7821 let attributes = wire_.table.get(1);
7822
7823 Self {
7824 attributes: attributes.map(|envelope| {
7825 ::fidl_next::FromWire::from_wire(unsafe {
7826 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
7827 })
7828 }),
7829 }
7830 }
7831 }
7832
7833 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeInfo<'de>> for NodeInfo {
7834 #[inline]
7835 fn from_wire_ref(wire: &crate::wire::NodeInfo<'de>) -> Self {
7836 Self {
7837 attributes: wire.table.get(1).map(|envelope| {
7838 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7839 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
7840 })
7841 }),
7842 }
7843 }
7844 }
7845
7846 #[derive(PartialEq, Clone, Debug, Default)]
7847 pub struct DirectoryInfo {
7848 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
7849 }
7850
7851 impl DirectoryInfo {
7852 fn __max_ordinal(&self) -> usize {
7853 if self.attributes.is_some() {
7854 return 1;
7855 }
7856
7857 0
7858 }
7859 }
7860
7861 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E> for DirectoryInfo
7862 where
7863 ___E: ::fidl_next::Encoder + ?Sized,
7864 {
7865 #[inline]
7866 fn encode(
7867 mut self,
7868 encoder: &mut ___E,
7869 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
7870 _: (),
7871 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7872 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
7873
7874 let max_ord = self.__max_ordinal();
7875
7876 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7877 ::fidl_next::Wire::zero_padding(&mut out);
7878
7879 let mut preallocated =
7880 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7881
7882 for i in 1..=max_ord {
7883 match i {
7884 1 => {
7885 if let Some(value) = self.attributes.take() {
7886 ::fidl_next::WireEnvelope::encode_value::<
7887 crate::wire::NodeAttributes2<'static>,
7888 ___E,
7889 >(
7890 value, preallocated.encoder, &mut out, ()
7891 )?;
7892 } else {
7893 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7894 }
7895 }
7896
7897 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7898 }
7899 unsafe {
7900 preallocated.write_next(out.assume_init_ref());
7901 }
7902 }
7903
7904 ::fidl_next::WireTable::encode_len(table, max_ord);
7905
7906 Ok(())
7907 }
7908 }
7909
7910 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E>
7911 for &'a DirectoryInfo
7912 where
7913 ___E: ::fidl_next::Encoder + ?Sized,
7914 {
7915 #[inline]
7916 fn encode(
7917 self,
7918 encoder: &mut ___E,
7919 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
7920 _: (),
7921 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7922 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
7923
7924 let max_ord = self.__max_ordinal();
7925
7926 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7927 ::fidl_next::Wire::zero_padding(&mut out);
7928
7929 let mut preallocated =
7930 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7931
7932 for i in 1..=max_ord {
7933 match i {
7934 1 => {
7935 if let Some(value) = &self.attributes {
7936 ::fidl_next::WireEnvelope::encode_value::<
7937 crate::wire::NodeAttributes2<'static>,
7938 ___E,
7939 >(
7940 value, preallocated.encoder, &mut out, ()
7941 )?;
7942 } else {
7943 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7944 }
7945 }
7946
7947 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7948 }
7949 unsafe {
7950 preallocated.write_next(out.assume_init_ref());
7951 }
7952 }
7953
7954 ::fidl_next::WireTable::encode_len(table, max_ord);
7955
7956 Ok(())
7957 }
7958 }
7959
7960 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
7961 #[inline]
7962 fn from_wire(wire_: crate::wire::DirectoryInfo<'de>) -> Self {
7963 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7964
7965 let attributes = wire_.table.get(1);
7966
7967 Self {
7968 attributes: attributes.map(|envelope| {
7969 ::fidl_next::FromWire::from_wire(unsafe {
7970 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
7971 })
7972 }),
7973 }
7974 }
7975 }
7976
7977 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
7978 #[inline]
7979 fn from_wire_ref(wire: &crate::wire::DirectoryInfo<'de>) -> Self {
7980 Self {
7981 attributes: wire.table.get(1).map(|envelope| {
7982 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7983 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
7984 })
7985 }),
7986 }
7987 }
7988 }
7989
7990 #[derive(PartialEq, Clone, Debug, Default)]
7991 pub struct SymlinkInfo {
7992 pub target: ::core::option::Option<::std::vec::Vec<u8>>,
7993
7994 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
7995 }
7996
7997 impl SymlinkInfo {
7998 fn __max_ordinal(&self) -> usize {
7999 if self.attributes.is_some() {
8000 return 2;
8001 }
8002
8003 if self.target.is_some() {
8004 return 1;
8005 }
8006
8007 0
8008 }
8009 }
8010
8011 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E> for SymlinkInfo
8012 where
8013 ___E: ::fidl_next::Encoder + ?Sized,
8014 {
8015 #[inline]
8016 fn encode(
8017 mut self,
8018 encoder: &mut ___E,
8019 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
8020 _: (),
8021 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8022 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
8023
8024 let max_ord = self.__max_ordinal();
8025
8026 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8027 ::fidl_next::Wire::zero_padding(&mut out);
8028
8029 let mut preallocated =
8030 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8031
8032 for i in 1..=max_ord {
8033 match i {
8034 2 => {
8035 if let Some(value) = self.attributes.take() {
8036 ::fidl_next::WireEnvelope::encode_value::<
8037 crate::wire::NodeAttributes2<'static>,
8038 ___E,
8039 >(
8040 value, preallocated.encoder, &mut out, ()
8041 )?;
8042 } else {
8043 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8044 }
8045 }
8046
8047 1 => {
8048 if let Some(value) = self.target.take() {
8049 ::fidl_next::WireEnvelope::encode_value::<
8050 ::fidl_next::WireVector<'static, u8>,
8051 ___E,
8052 >(
8053 value, preallocated.encoder, &mut out, (4095, ())
8054 )?;
8055 } else {
8056 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8057 }
8058 }
8059
8060 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8061 }
8062 unsafe {
8063 preallocated.write_next(out.assume_init_ref());
8064 }
8065 }
8066
8067 ::fidl_next::WireTable::encode_len(table, max_ord);
8068
8069 Ok(())
8070 }
8071 }
8072
8073 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E>
8074 for &'a SymlinkInfo
8075 where
8076 ___E: ::fidl_next::Encoder + ?Sized,
8077 {
8078 #[inline]
8079 fn encode(
8080 self,
8081 encoder: &mut ___E,
8082 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
8083 _: (),
8084 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8085 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
8086
8087 let max_ord = self.__max_ordinal();
8088
8089 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8090 ::fidl_next::Wire::zero_padding(&mut out);
8091
8092 let mut preallocated =
8093 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8094
8095 for i in 1..=max_ord {
8096 match i {
8097 2 => {
8098 if let Some(value) = &self.attributes {
8099 ::fidl_next::WireEnvelope::encode_value::<
8100 crate::wire::NodeAttributes2<'static>,
8101 ___E,
8102 >(
8103 value, preallocated.encoder, &mut out, ()
8104 )?;
8105 } else {
8106 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8107 }
8108 }
8109
8110 1 => {
8111 if let Some(value) = &self.target {
8112 ::fidl_next::WireEnvelope::encode_value::<
8113 ::fidl_next::WireVector<'static, u8>,
8114 ___E,
8115 >(
8116 value, preallocated.encoder, &mut out, (4095, ())
8117 )?;
8118 } else {
8119 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8120 }
8121 }
8122
8123 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8124 }
8125 unsafe {
8126 preallocated.write_next(out.assume_init_ref());
8127 }
8128 }
8129
8130 ::fidl_next::WireTable::encode_len(table, max_ord);
8131
8132 Ok(())
8133 }
8134 }
8135
8136 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
8137 #[inline]
8138 fn from_wire(wire_: crate::wire::SymlinkInfo<'de>) -> Self {
8139 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8140
8141 let target = wire_.table.get(1);
8142
8143 let attributes = wire_.table.get(2);
8144
8145 Self {
8146 target: target.map(|envelope| {
8147 ::fidl_next::FromWire::from_wire(unsafe {
8148 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
8149 })
8150 }),
8151
8152 attributes: attributes.map(|envelope| {
8153 ::fidl_next::FromWire::from_wire(unsafe {
8154 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
8155 })
8156 }),
8157 }
8158 }
8159 }
8160
8161 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
8162 #[inline]
8163 fn from_wire_ref(wire: &crate::wire::SymlinkInfo<'de>) -> Self {
8164 Self {
8165 target: wire.table.get(1).map(|envelope| {
8166 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8167 envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
8168 })
8169 }),
8170
8171 attributes: wire.table.get(2).map(|envelope| {
8172 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8173 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
8174 })
8175 }),
8176 }
8177 }
8178 }
8179
8180 ::fidl_next::bitflags::bitflags! {
8181 #[derive(
8182 Clone,
8183 Copy,
8184 Debug,
8185 PartialEq,
8186 Eq,
8187 Hash,
8188 )]
8189 pub struct NodeAttributesQuery: u64 {
8190 #[doc = " Requests [`NodeAttributes.protocols`].\n"]const PROTOCOLS = 1;
8191 #[doc = " Requests [`NodeAttributes.abilities`].\n"]const ABILITIES = 2;
8192 #[doc = " Requests [`NodeAttributes.content_size`].\n"]const CONTENT_SIZE = 4;
8193 #[doc = " Requests [`NodeAttributes.storage_size`].\n"]const STORAGE_SIZE = 8;
8194 #[doc = " Requests [`NodeAttributes.link_count`].\n"]const LINK_COUNT = 16;
8195 #[doc = " Requests [`NodeAttributes.id`].\n"]const ID = 32;
8196 #[doc = " Requests [`NodeAttributes.creation_time`].\n"]const CREATION_TIME = 64;
8197 #[doc = " Requests [`NodeAttributes.modification_time`].\n"]const MODIFICATION_TIME = 128;
8198 #[doc = " Posix attributes.\n"]const MODE = 256;
8199 const UID = 512;
8200 const GID = 1024;
8201 const RDEV = 2048;
8202 const ACCESS_TIME = 4096;
8203 const CHANGE_TIME = 8192;
8204 #[doc = " Verity attributes.\n"]const OPTIONS = 16384;
8205 const ROOT_HASH = 32768;
8206 const VERITY_ENABLED = 65536;
8207 #[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;
8208 #[doc = " Requests [`MutableNodeAttributes.selinux_context`]. See that field for more detail.\n"]const SELINUX_CONTEXT = 262144;
8209 #[doc = " fscrypt attribute.\n"]const WRAPPING_KEY_ID = 524288;
8210 #[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;
8211 const _ = !0;
8212 }
8213 }
8214
8215 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
8216 for NodeAttributesQuery
8217 where
8218 ___E: ?Sized,
8219 {
8220 #[inline]
8221 fn encode(
8222 self,
8223 encoder: &mut ___E,
8224 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
8225 _: (),
8226 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8227 ::fidl_next::Encode::encode(&self, encoder, out, ())
8228 }
8229 }
8230
8231 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
8232 for &'a NodeAttributesQuery
8233 where
8234 ___E: ?Sized,
8235 {
8236 #[inline]
8237 fn encode(
8238 self,
8239 _: &mut ___E,
8240 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
8241 _: (),
8242 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8243 ::fidl_next::munge!(let crate::wire::NodeAttributesQuery { value } = out);
8244
8245 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
8246 Ok(())
8247 }
8248 }
8249
8250 impl ::core::convert::From<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
8251 fn from(wire: crate::wire::NodeAttributesQuery) -> Self {
8252 Self::from_bits_retain(u64::from(wire.value))
8253 }
8254 }
8255
8256 impl ::fidl_next::FromWire<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
8257 #[inline]
8258 fn from_wire(wire: crate::wire::NodeAttributesQuery) -> Self {
8259 Self::from(wire)
8260 }
8261 }
8262
8263 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
8264 #[inline]
8265 fn from_wire_ref(wire: &crate::wire::NodeAttributesQuery) -> Self {
8266 Self::from(*wire)
8267 }
8268 }
8269
8270 #[derive(PartialEq, Clone, Debug)]
8271 #[repr(C)]
8272 pub struct NodeGetAttributesRequest {
8273 pub query: crate::natural::NodeAttributesQuery,
8274 }
8275
8276 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
8277 for NodeGetAttributesRequest
8278 where
8279 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8280 {
8281 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8282 Self,
8283 crate::wire::NodeGetAttributesRequest,
8284 > = unsafe {
8285 ::fidl_next::CopyOptimization::enable_if(
8286 true && <crate::natural::NodeAttributesQuery as ::fidl_next::Encode<
8287 crate::wire::NodeAttributesQuery,
8288 ___E,
8289 >>::COPY_OPTIMIZATION
8290 .is_enabled(),
8291 )
8292 };
8293
8294 #[inline]
8295 fn encode(
8296 self,
8297 encoder_: &mut ___E,
8298 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
8299 _: (),
8300 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8301 ::fidl_next::munge! {
8302 let crate::wire::NodeGetAttributesRequest {
8303 query,
8304
8305 } = out_;
8306 }
8307
8308 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
8309
8310 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
8311
8312 Ok(())
8313 }
8314 }
8315
8316 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
8317 for &'a NodeGetAttributesRequest
8318 where
8319 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8320 {
8321 #[inline]
8322 fn encode(
8323 self,
8324 encoder_: &mut ___E,
8325 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
8326 _: (),
8327 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8328 ::fidl_next::munge! {
8329 let crate::wire::NodeGetAttributesRequest {
8330
8331 query,
8332
8333 } = out_;
8334 }
8335
8336 ::fidl_next::Encode::encode(&self.query, encoder_, query, ())?;
8337
8338 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
8339
8340 Ok(())
8341 }
8342 }
8343
8344 unsafe impl<___E>
8345 ::fidl_next::EncodeOption<
8346 ::fidl_next::WireBox<'static, crate::wire::NodeGetAttributesRequest>,
8347 ___E,
8348 > for NodeGetAttributesRequest
8349 where
8350 ___E: ::fidl_next::Encoder + ?Sized,
8351 NodeGetAttributesRequest: ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
8352 {
8353 #[inline]
8354 fn encode_option(
8355 this: ::core::option::Option<Self>,
8356 encoder: &mut ___E,
8357 out: &mut ::core::mem::MaybeUninit<
8358 ::fidl_next::WireBox<'static, crate::wire::NodeGetAttributesRequest>,
8359 >,
8360 _: (),
8361 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8362 if let Some(inner) = this {
8363 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8364 ::fidl_next::WireBox::encode_present(out);
8365 } else {
8366 ::fidl_next::WireBox::encode_absent(out);
8367 }
8368
8369 Ok(())
8370 }
8371 }
8372
8373 unsafe impl<'a, ___E>
8374 ::fidl_next::EncodeOption<
8375 ::fidl_next::WireBox<'static, crate::wire::NodeGetAttributesRequest>,
8376 ___E,
8377 > for &'a NodeGetAttributesRequest
8378 where
8379 ___E: ::fidl_next::Encoder + ?Sized,
8380 &'a NodeGetAttributesRequest:
8381 ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
8382 {
8383 #[inline]
8384 fn encode_option(
8385 this: ::core::option::Option<Self>,
8386 encoder: &mut ___E,
8387 out: &mut ::core::mem::MaybeUninit<
8388 ::fidl_next::WireBox<'static, crate::wire::NodeGetAttributesRequest>,
8389 >,
8390 _: (),
8391 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8392 if let Some(inner) = this {
8393 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8394 ::fidl_next::WireBox::encode_present(out);
8395 } else {
8396 ::fidl_next::WireBox::encode_absent(out);
8397 }
8398
8399 Ok(())
8400 }
8401 }
8402
8403 impl ::fidl_next::FromWire<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
8404 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8405 crate::wire::NodeGetAttributesRequest,
8406 Self,
8407 > = unsafe {
8408 ::fidl_next::CopyOptimization::enable_if(
8409 true && <crate::natural::NodeAttributesQuery as ::fidl_next::FromWire<
8410 crate::wire::NodeAttributesQuery,
8411 >>::COPY_OPTIMIZATION
8412 .is_enabled(),
8413 )
8414 };
8415
8416 #[inline]
8417 fn from_wire(wire: crate::wire::NodeGetAttributesRequest) -> Self {
8418 Self { query: ::fidl_next::FromWire::from_wire(wire.query) }
8419 }
8420 }
8421
8422 impl ::fidl_next::FromWireRef<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
8423 #[inline]
8424 fn from_wire_ref(wire: &crate::wire::NodeGetAttributesRequest) -> Self {
8425 Self { query: ::fidl_next::FromWireRef::from_wire_ref(&wire.query) }
8426 }
8427 }
8428
8429 #[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"]
8430 #[derive(PartialEq, Clone, Debug, Default)]
8431 pub struct Options {
8432 pub attributes: ::core::option::Option<crate::natural::NodeAttributesQuery>,
8433
8434 pub create_attributes: ::core::option::Option<crate::natural::MutableNodeAttributes>,
8435 }
8436
8437 impl Options {
8438 fn __max_ordinal(&self) -> usize {
8439 if self.create_attributes.is_some() {
8440 return 2;
8441 }
8442
8443 if self.attributes.is_some() {
8444 return 1;
8445 }
8446
8447 0
8448 }
8449 }
8450
8451 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for Options
8452 where
8453 ___E: ::fidl_next::Encoder + ?Sized,
8454 {
8455 #[inline]
8456 fn encode(
8457 mut self,
8458 encoder: &mut ___E,
8459 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
8460 _: (),
8461 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8462 ::fidl_next::munge!(let crate::wire::Options { table } = out);
8463
8464 let max_ord = self.__max_ordinal();
8465
8466 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8467 ::fidl_next::Wire::zero_padding(&mut out);
8468
8469 let mut preallocated =
8470 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8471
8472 for i in 1..=max_ord {
8473 match i {
8474 2 => {
8475 if let Some(value) = self.create_attributes.take() {
8476 ::fidl_next::WireEnvelope::encode_value::<
8477 crate::wire::MutableNodeAttributes<'static>,
8478 ___E,
8479 >(
8480 value, preallocated.encoder, &mut out, ()
8481 )?;
8482 } else {
8483 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8484 }
8485 }
8486
8487 1 => {
8488 if let Some(value) = self.attributes.take() {
8489 ::fidl_next::WireEnvelope::encode_value::<
8490 crate::wire::NodeAttributesQuery,
8491 ___E,
8492 >(
8493 value, preallocated.encoder, &mut out, ()
8494 )?;
8495 } else {
8496 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8497 }
8498 }
8499
8500 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8501 }
8502 unsafe {
8503 preallocated.write_next(out.assume_init_ref());
8504 }
8505 }
8506
8507 ::fidl_next::WireTable::encode_len(table, max_ord);
8508
8509 Ok(())
8510 }
8511 }
8512
8513 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for &'a Options
8514 where
8515 ___E: ::fidl_next::Encoder + ?Sized,
8516 {
8517 #[inline]
8518 fn encode(
8519 self,
8520 encoder: &mut ___E,
8521 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
8522 _: (),
8523 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8524 ::fidl_next::munge!(let crate::wire::Options { table } = out);
8525
8526 let max_ord = self.__max_ordinal();
8527
8528 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8529 ::fidl_next::Wire::zero_padding(&mut out);
8530
8531 let mut preallocated =
8532 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8533
8534 for i in 1..=max_ord {
8535 match i {
8536 2 => {
8537 if let Some(value) = &self.create_attributes {
8538 ::fidl_next::WireEnvelope::encode_value::<
8539 crate::wire::MutableNodeAttributes<'static>,
8540 ___E,
8541 >(
8542 value, preallocated.encoder, &mut out, ()
8543 )?;
8544 } else {
8545 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8546 }
8547 }
8548
8549 1 => {
8550 if let Some(value) = &self.attributes {
8551 ::fidl_next::WireEnvelope::encode_value::<
8552 crate::wire::NodeAttributesQuery,
8553 ___E,
8554 >(
8555 value, preallocated.encoder, &mut out, ()
8556 )?;
8557 } else {
8558 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8559 }
8560 }
8561
8562 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8563 }
8564 unsafe {
8565 preallocated.write_next(out.assume_init_ref());
8566 }
8567 }
8568
8569 ::fidl_next::WireTable::encode_len(table, max_ord);
8570
8571 Ok(())
8572 }
8573 }
8574
8575 impl<'de> ::fidl_next::FromWire<crate::wire::Options<'de>> for Options {
8576 #[inline]
8577 fn from_wire(wire_: crate::wire::Options<'de>) -> Self {
8578 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8579
8580 let attributes = wire_.table.get(1);
8581
8582 let create_attributes = wire_.table.get(2);
8583
8584 Self {
8585 attributes: attributes.map(|envelope| {
8586 ::fidl_next::FromWire::from_wire(unsafe {
8587 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
8588 })
8589 }),
8590
8591 create_attributes: create_attributes.map(|envelope| {
8592 ::fidl_next::FromWire::from_wire(unsafe {
8593 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
8594 })
8595 }),
8596 }
8597 }
8598 }
8599
8600 impl<'de> ::fidl_next::FromWireRef<crate::wire::Options<'de>> for Options {
8601 #[inline]
8602 fn from_wire_ref(wire: &crate::wire::Options<'de>) -> Self {
8603 Self {
8604 attributes: wire.table.get(1).map(|envelope| {
8605 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8606 envelope.deref_unchecked::<crate::wire::NodeAttributesQuery>()
8607 })
8608 }),
8609
8610 create_attributes: wire.table.get(2).map(|envelope| {
8611 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8612 envelope.deref_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
8613 })
8614 }),
8615 }
8616 }
8617 }
8618
8619 #[derive(PartialEq, Clone, Debug)]
8620 #[repr(C)]
8621 pub struct DirectoryObject {}
8622
8623 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryObject, ___E> for DirectoryObject
8624 where
8625 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8626 {
8627 #[inline]
8628 fn encode(
8629 self,
8630 encoder_: &mut ___E,
8631 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryObject>,
8632 _: (),
8633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8634 *out_ = ::core::mem::MaybeUninit::zeroed();
8635
8636 Ok(())
8637 }
8638 }
8639
8640 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryObject, ___E>
8641 for &'a DirectoryObject
8642 where
8643 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8644 {
8645 #[inline]
8646 fn encode(
8647 self,
8648 encoder_: &mut ___E,
8649 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryObject>,
8650 _: (),
8651 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8652 ::fidl_next::munge! {
8653 let crate::wire::DirectoryObject {
8654
8655 _empty,
8656
8657
8658 } = out_;
8659 }
8660
8661 Ok(())
8662 }
8663 }
8664
8665 unsafe impl<___E>
8666 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::DirectoryObject>, ___E>
8667 for DirectoryObject
8668 where
8669 ___E: ::fidl_next::Encoder + ?Sized,
8670 DirectoryObject: ::fidl_next::Encode<crate::wire::DirectoryObject, ___E>,
8671 {
8672 #[inline]
8673 fn encode_option(
8674 this: ::core::option::Option<Self>,
8675 encoder: &mut ___E,
8676 out: &mut ::core::mem::MaybeUninit<
8677 ::fidl_next::WireBox<'static, crate::wire::DirectoryObject>,
8678 >,
8679 _: (),
8680 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8681 if let Some(inner) = this {
8682 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8683 ::fidl_next::WireBox::encode_present(out);
8684 } else {
8685 ::fidl_next::WireBox::encode_absent(out);
8686 }
8687
8688 Ok(())
8689 }
8690 }
8691
8692 unsafe impl<'a, ___E>
8693 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::DirectoryObject>, ___E>
8694 for &'a DirectoryObject
8695 where
8696 ___E: ::fidl_next::Encoder + ?Sized,
8697 &'a DirectoryObject: ::fidl_next::Encode<crate::wire::DirectoryObject, ___E>,
8698 {
8699 #[inline]
8700 fn encode_option(
8701 this: ::core::option::Option<Self>,
8702 encoder: &mut ___E,
8703 out: &mut ::core::mem::MaybeUninit<
8704 ::fidl_next::WireBox<'static, crate::wire::DirectoryObject>,
8705 >,
8706 _: (),
8707 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8708 if let Some(inner) = this {
8709 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8710 ::fidl_next::WireBox::encode_present(out);
8711 } else {
8712 ::fidl_next::WireBox::encode_absent(out);
8713 }
8714
8715 Ok(())
8716 }
8717 }
8718
8719 impl ::fidl_next::FromWire<crate::wire::DirectoryObject> for DirectoryObject {
8720 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::DirectoryObject, Self> =
8721 unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
8722
8723 #[inline]
8724 fn from_wire(wire: crate::wire::DirectoryObject) -> Self {
8725 Self {}
8726 }
8727 }
8728
8729 impl ::fidl_next::FromWireRef<crate::wire::DirectoryObject> for DirectoryObject {
8730 #[inline]
8731 fn from_wire_ref(wire: &crate::wire::DirectoryObject) -> Self {
8732 Self {}
8733 }
8734 }
8735
8736 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
8737 #[repr(u8)]
8738 pub enum DirentType {
8739 Unknown = 0,
8740 Directory = 4,
8741 BlockDevice = 6,
8742 File = 8,
8743 Symlink = 10,
8744 Service = 16,
8745 UnknownOrdinal_(u8) = 17,
8746 }
8747 impl ::std::convert::From<u8> for DirentType {
8748 fn from(value: u8) -> Self {
8749 match value {
8750 0 => Self::Unknown,
8751 4 => Self::Directory,
8752 6 => Self::BlockDevice,
8753 8 => Self::File,
8754 10 => Self::Symlink,
8755 16 => Self::Service,
8756
8757 _ => Self::UnknownOrdinal_(value),
8758 }
8759 }
8760 }
8761
8762 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for DirentType
8763 where
8764 ___E: ?Sized,
8765 {
8766 #[inline]
8767 fn encode(
8768 self,
8769 encoder: &mut ___E,
8770 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
8771 _: (),
8772 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8773 ::fidl_next::Encode::encode(&self, encoder, out, ())
8774 }
8775 }
8776
8777 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for &'a DirentType
8778 where
8779 ___E: ?Sized,
8780 {
8781 #[inline]
8782 fn encode(
8783 self,
8784 encoder: &mut ___E,
8785 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
8786 _: (),
8787 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8788 ::fidl_next::munge!(let crate::wire::DirentType { value } = out);
8789 let _ = value.write(u8::from(match *self {
8790 DirentType::Unknown => 0,
8791
8792 DirentType::Directory => 4,
8793
8794 DirentType::BlockDevice => 6,
8795
8796 DirentType::File => 8,
8797
8798 DirentType::Symlink => 10,
8799
8800 DirentType::Service => 16,
8801
8802 DirentType::UnknownOrdinal_(value) => value,
8803 }));
8804
8805 Ok(())
8806 }
8807 }
8808
8809 impl ::core::convert::From<crate::wire::DirentType> for DirentType {
8810 fn from(wire: crate::wire::DirentType) -> Self {
8811 match u8::from(wire.value) {
8812 0 => Self::Unknown,
8813
8814 4 => Self::Directory,
8815
8816 6 => Self::BlockDevice,
8817
8818 8 => Self::File,
8819
8820 10 => Self::Symlink,
8821
8822 16 => Self::Service,
8823
8824 value => Self::UnknownOrdinal_(value),
8825 }
8826 }
8827 }
8828
8829 impl ::fidl_next::FromWire<crate::wire::DirentType> for DirentType {
8830 #[inline]
8831 fn from_wire(wire: crate::wire::DirentType) -> Self {
8832 Self::from(wire)
8833 }
8834 }
8835
8836 impl ::fidl_next::FromWireRef<crate::wire::DirentType> for DirentType {
8837 #[inline]
8838 fn from_wire_ref(wire: &crate::wire::DirentType) -> Self {
8839 Self::from(*wire)
8840 }
8841 }
8842
8843 #[derive(PartialEq, Clone, Debug)]
8844 pub struct ExtendedAttributeIteratorGetNextResponse {
8845 pub attributes: ::std::vec::Vec<::std::vec::Vec<u8>>,
8846
8847 pub last: bool,
8848 }
8849
8850 unsafe impl<___E>
8851 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
8852 for ExtendedAttributeIteratorGetNextResponse
8853 where
8854 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8855 ___E: ::fidl_next::Encoder,
8856 {
8857 #[inline]
8858 fn encode(
8859 self,
8860 encoder_: &mut ___E,
8861 out_: &mut ::core::mem::MaybeUninit<
8862 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8863 >,
8864 _: (),
8865 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8866 ::fidl_next::munge! {
8867 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
8868 attributes,
8869 last,
8870
8871 } = out_;
8872 }
8873
8874 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
8875
8876 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
8877 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
8878
8879 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
8880
8881 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
8882
8883 Ok(())
8884 }
8885 }
8886
8887 unsafe impl<'a, ___E>
8888 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
8889 for &'a ExtendedAttributeIteratorGetNextResponse
8890 where
8891 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8892 ___E: ::fidl_next::Encoder,
8893 {
8894 #[inline]
8895 fn encode(
8896 self,
8897 encoder_: &mut ___E,
8898 out_: &mut ::core::mem::MaybeUninit<
8899 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8900 >,
8901 _: (),
8902 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8903 ::fidl_next::munge! {
8904 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
8905
8906 attributes,
8907 last,
8908
8909 } = out_;
8910 }
8911
8912 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, (128, (255, ())))?;
8913
8914 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
8915 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
8916
8917 ::fidl_next::Encode::encode(&self.last, encoder_, last, ())?;
8918
8919 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
8920
8921 Ok(())
8922 }
8923 }
8924
8925 unsafe impl<___E>
8926 ::fidl_next::EncodeOption<
8927 ::fidl_next::WireBox<
8928 'static,
8929 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8930 >,
8931 ___E,
8932 > for ExtendedAttributeIteratorGetNextResponse
8933 where
8934 ___E: ::fidl_next::Encoder + ?Sized,
8935 ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
8936 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8937 ___E,
8938 >,
8939 {
8940 #[inline]
8941 fn encode_option(
8942 this: ::core::option::Option<Self>,
8943 encoder: &mut ___E,
8944 out: &mut ::core::mem::MaybeUninit<
8945 ::fidl_next::WireBox<
8946 'static,
8947 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8948 >,
8949 >,
8950 _: (),
8951 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8952 if let Some(inner) = this {
8953 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8954 ::fidl_next::WireBox::encode_present(out);
8955 } else {
8956 ::fidl_next::WireBox::encode_absent(out);
8957 }
8958
8959 Ok(())
8960 }
8961 }
8962
8963 unsafe impl<'a, ___E>
8964 ::fidl_next::EncodeOption<
8965 ::fidl_next::WireBox<
8966 'static,
8967 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8968 >,
8969 ___E,
8970 > for &'a ExtendedAttributeIteratorGetNextResponse
8971 where
8972 ___E: ::fidl_next::Encoder + ?Sized,
8973 &'a ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
8974 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8975 ___E,
8976 >,
8977 {
8978 #[inline]
8979 fn encode_option(
8980 this: ::core::option::Option<Self>,
8981 encoder: &mut ___E,
8982 out: &mut ::core::mem::MaybeUninit<
8983 ::fidl_next::WireBox<
8984 'static,
8985 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8986 >,
8987 >,
8988 _: (),
8989 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8990 if let Some(inner) = this {
8991 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8992 ::fidl_next::WireBox::encode_present(out);
8993 } else {
8994 ::fidl_next::WireBox::encode_absent(out);
8995 }
8996
8997 Ok(())
8998 }
8999 }
9000
9001 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
9002 for ExtendedAttributeIteratorGetNextResponse
9003 {
9004 #[inline]
9005 fn from_wire(wire: crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>) -> Self {
9006 Self {
9007 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
9008
9009 last: ::fidl_next::FromWire::from_wire(wire.last),
9010 }
9011 }
9012 }
9013
9014 impl<'de> ::fidl_next::FromWireRef<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
9015 for ExtendedAttributeIteratorGetNextResponse
9016 {
9017 #[inline]
9018 fn from_wire_ref(
9019 wire: &crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>,
9020 ) -> Self {
9021 Self {
9022 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
9023
9024 last: ::fidl_next::FromWireRef::from_wire_ref(&wire.last),
9025 }
9026 }
9027 }
9028
9029 #[derive(PartialEq, Clone, Debug)]
9030 #[repr(C)]
9031 pub struct ReadableReadRequest {
9032 pub count: u64,
9033 }
9034
9035 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
9036 for ReadableReadRequest
9037 where
9038 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9039 {
9040 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9041 Self,
9042 crate::wire::ReadableReadRequest,
9043 > = unsafe {
9044 ::fidl_next::CopyOptimization::enable_if(
9045 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9046 .is_enabled(),
9047 )
9048 };
9049
9050 #[inline]
9051 fn encode(
9052 self,
9053 encoder_: &mut ___E,
9054 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
9055 _: (),
9056 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9057 ::fidl_next::munge! {
9058 let crate::wire::ReadableReadRequest {
9059 count,
9060
9061 } = out_;
9062 }
9063
9064 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
9065
9066 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
9067
9068 Ok(())
9069 }
9070 }
9071
9072 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
9073 for &'a ReadableReadRequest
9074 where
9075 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9076 {
9077 #[inline]
9078 fn encode(
9079 self,
9080 encoder_: &mut ___E,
9081 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
9082 _: (),
9083 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9084 ::fidl_next::munge! {
9085 let crate::wire::ReadableReadRequest {
9086
9087 count,
9088
9089 } = out_;
9090 }
9091
9092 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
9093
9094 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
9095
9096 Ok(())
9097 }
9098 }
9099
9100 unsafe impl<___E>
9101 ::fidl_next::EncodeOption<
9102 ::fidl_next::WireBox<'static, crate::wire::ReadableReadRequest>,
9103 ___E,
9104 > for ReadableReadRequest
9105 where
9106 ___E: ::fidl_next::Encoder + ?Sized,
9107 ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
9108 {
9109 #[inline]
9110 fn encode_option(
9111 this: ::core::option::Option<Self>,
9112 encoder: &mut ___E,
9113 out: &mut ::core::mem::MaybeUninit<
9114 ::fidl_next::WireBox<'static, crate::wire::ReadableReadRequest>,
9115 >,
9116 _: (),
9117 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9118 if let Some(inner) = this {
9119 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9120 ::fidl_next::WireBox::encode_present(out);
9121 } else {
9122 ::fidl_next::WireBox::encode_absent(out);
9123 }
9124
9125 Ok(())
9126 }
9127 }
9128
9129 unsafe impl<'a, ___E>
9130 ::fidl_next::EncodeOption<
9131 ::fidl_next::WireBox<'static, crate::wire::ReadableReadRequest>,
9132 ___E,
9133 > for &'a ReadableReadRequest
9134 where
9135 ___E: ::fidl_next::Encoder + ?Sized,
9136 &'a ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
9137 {
9138 #[inline]
9139 fn encode_option(
9140 this: ::core::option::Option<Self>,
9141 encoder: &mut ___E,
9142 out: &mut ::core::mem::MaybeUninit<
9143 ::fidl_next::WireBox<'static, crate::wire::ReadableReadRequest>,
9144 >,
9145 _: (),
9146 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9147 if let Some(inner) = this {
9148 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9149 ::fidl_next::WireBox::encode_present(out);
9150 } else {
9151 ::fidl_next::WireBox::encode_absent(out);
9152 }
9153
9154 Ok(())
9155 }
9156 }
9157
9158 impl ::fidl_next::FromWire<crate::wire::ReadableReadRequest> for ReadableReadRequest {
9159 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9160 crate::wire::ReadableReadRequest,
9161 Self,
9162 > = unsafe {
9163 ::fidl_next::CopyOptimization::enable_if(
9164 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
9165 .is_enabled(),
9166 )
9167 };
9168
9169 #[inline]
9170 fn from_wire(wire: crate::wire::ReadableReadRequest) -> Self {
9171 Self { count: ::fidl_next::FromWire::from_wire(wire.count) }
9172 }
9173 }
9174
9175 impl ::fidl_next::FromWireRef<crate::wire::ReadableReadRequest> for ReadableReadRequest {
9176 #[inline]
9177 fn from_wire_ref(wire: &crate::wire::ReadableReadRequest) -> Self {
9178 Self { count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count) }
9179 }
9180 }
9181
9182 #[doc = " The byte vector type used for read/write operations.\n"]
9183 pub type Transfer = ::std::vec::Vec<u8>;
9184
9185 #[derive(PartialEq, Clone, Debug)]
9186 pub struct ReadableReadResponse {
9187 pub data: ::std::vec::Vec<u8>,
9188 }
9189
9190 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
9191 for ReadableReadResponse
9192 where
9193 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9194 ___E: ::fidl_next::Encoder,
9195 {
9196 #[inline]
9197 fn encode(
9198 self,
9199 encoder_: &mut ___E,
9200 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
9201 _: (),
9202 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9203 ::fidl_next::munge! {
9204 let crate::wire::ReadableReadResponse {
9205 data,
9206
9207 } = out_;
9208 }
9209
9210 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
9211
9212 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
9213 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
9214
9215 Ok(())
9216 }
9217 }
9218
9219 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
9220 for &'a ReadableReadResponse
9221 where
9222 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9223 ___E: ::fidl_next::Encoder,
9224 {
9225 #[inline]
9226 fn encode(
9227 self,
9228 encoder_: &mut ___E,
9229 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
9230 _: (),
9231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9232 ::fidl_next::munge! {
9233 let crate::wire::ReadableReadResponse {
9234
9235 data,
9236
9237 } = out_;
9238 }
9239
9240 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
9241
9242 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
9243 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
9244
9245 Ok(())
9246 }
9247 }
9248
9249 unsafe impl<___E>
9250 ::fidl_next::EncodeOption<
9251 ::fidl_next::WireBox<'static, crate::wire::ReadableReadResponse<'static>>,
9252 ___E,
9253 > for ReadableReadResponse
9254 where
9255 ___E: ::fidl_next::Encoder + ?Sized,
9256 ReadableReadResponse: ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
9257 {
9258 #[inline]
9259 fn encode_option(
9260 this: ::core::option::Option<Self>,
9261 encoder: &mut ___E,
9262 out: &mut ::core::mem::MaybeUninit<
9263 ::fidl_next::WireBox<'static, crate::wire::ReadableReadResponse<'static>>,
9264 >,
9265 _: (),
9266 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9267 if let Some(inner) = this {
9268 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9269 ::fidl_next::WireBox::encode_present(out);
9270 } else {
9271 ::fidl_next::WireBox::encode_absent(out);
9272 }
9273
9274 Ok(())
9275 }
9276 }
9277
9278 unsafe impl<'a, ___E>
9279 ::fidl_next::EncodeOption<
9280 ::fidl_next::WireBox<'static, crate::wire::ReadableReadResponse<'static>>,
9281 ___E,
9282 > for &'a ReadableReadResponse
9283 where
9284 ___E: ::fidl_next::Encoder + ?Sized,
9285 &'a ReadableReadResponse:
9286 ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
9287 {
9288 #[inline]
9289 fn encode_option(
9290 this: ::core::option::Option<Self>,
9291 encoder: &mut ___E,
9292 out: &mut ::core::mem::MaybeUninit<
9293 ::fidl_next::WireBox<'static, crate::wire::ReadableReadResponse<'static>>,
9294 >,
9295 _: (),
9296 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9297 if let Some(inner) = this {
9298 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9299 ::fidl_next::WireBox::encode_present(out);
9300 } else {
9301 ::fidl_next::WireBox::encode_absent(out);
9302 }
9303
9304 Ok(())
9305 }
9306 }
9307
9308 impl<'de> ::fidl_next::FromWire<crate::wire::ReadableReadResponse<'de>> for ReadableReadResponse {
9309 #[inline]
9310 fn from_wire(wire: crate::wire::ReadableReadResponse<'de>) -> Self {
9311 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
9312 }
9313 }
9314
9315 impl<'de> ::fidl_next::FromWireRef<crate::wire::ReadableReadResponse<'de>>
9316 for ReadableReadResponse
9317 {
9318 #[inline]
9319 fn from_wire_ref(wire: &crate::wire::ReadableReadResponse<'de>) -> Self {
9320 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
9321 }
9322 }
9323
9324 #[derive(PartialEq, Clone, Debug)]
9325 pub struct WritableWriteRequest {
9326 pub data: ::std::vec::Vec<u8>,
9327 }
9328
9329 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
9330 for WritableWriteRequest
9331 where
9332 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9333 ___E: ::fidl_next::Encoder,
9334 {
9335 #[inline]
9336 fn encode(
9337 self,
9338 encoder_: &mut ___E,
9339 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
9340 _: (),
9341 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9342 ::fidl_next::munge! {
9343 let crate::wire::WritableWriteRequest {
9344 data,
9345
9346 } = out_;
9347 }
9348
9349 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
9350
9351 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
9352 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
9353
9354 Ok(())
9355 }
9356 }
9357
9358 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
9359 for &'a WritableWriteRequest
9360 where
9361 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9362 ___E: ::fidl_next::Encoder,
9363 {
9364 #[inline]
9365 fn encode(
9366 self,
9367 encoder_: &mut ___E,
9368 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
9369 _: (),
9370 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9371 ::fidl_next::munge! {
9372 let crate::wire::WritableWriteRequest {
9373
9374 data,
9375
9376 } = out_;
9377 }
9378
9379 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
9380
9381 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
9382 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
9383
9384 Ok(())
9385 }
9386 }
9387
9388 unsafe impl<___E>
9389 ::fidl_next::EncodeOption<
9390 ::fidl_next::WireBox<'static, crate::wire::WritableWriteRequest<'static>>,
9391 ___E,
9392 > for WritableWriteRequest
9393 where
9394 ___E: ::fidl_next::Encoder + ?Sized,
9395 WritableWriteRequest: ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
9396 {
9397 #[inline]
9398 fn encode_option(
9399 this: ::core::option::Option<Self>,
9400 encoder: &mut ___E,
9401 out: &mut ::core::mem::MaybeUninit<
9402 ::fidl_next::WireBox<'static, crate::wire::WritableWriteRequest<'static>>,
9403 >,
9404 _: (),
9405 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9406 if let Some(inner) = this {
9407 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9408 ::fidl_next::WireBox::encode_present(out);
9409 } else {
9410 ::fidl_next::WireBox::encode_absent(out);
9411 }
9412
9413 Ok(())
9414 }
9415 }
9416
9417 unsafe impl<'a, ___E>
9418 ::fidl_next::EncodeOption<
9419 ::fidl_next::WireBox<'static, crate::wire::WritableWriteRequest<'static>>,
9420 ___E,
9421 > for &'a WritableWriteRequest
9422 where
9423 ___E: ::fidl_next::Encoder + ?Sized,
9424 &'a WritableWriteRequest:
9425 ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
9426 {
9427 #[inline]
9428 fn encode_option(
9429 this: ::core::option::Option<Self>,
9430 encoder: &mut ___E,
9431 out: &mut ::core::mem::MaybeUninit<
9432 ::fidl_next::WireBox<'static, crate::wire::WritableWriteRequest<'static>>,
9433 >,
9434 _: (),
9435 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9436 if let Some(inner) = this {
9437 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9438 ::fidl_next::WireBox::encode_present(out);
9439 } else {
9440 ::fidl_next::WireBox::encode_absent(out);
9441 }
9442
9443 Ok(())
9444 }
9445 }
9446
9447 impl<'de> ::fidl_next::FromWire<crate::wire::WritableWriteRequest<'de>> for WritableWriteRequest {
9448 #[inline]
9449 fn from_wire(wire: crate::wire::WritableWriteRequest<'de>) -> Self {
9450 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
9451 }
9452 }
9453
9454 impl<'de> ::fidl_next::FromWireRef<crate::wire::WritableWriteRequest<'de>>
9455 for WritableWriteRequest
9456 {
9457 #[inline]
9458 fn from_wire_ref(wire: &crate::wire::WritableWriteRequest<'de>) -> Self {
9459 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
9460 }
9461 }
9462
9463 #[derive(PartialEq, Clone, Debug)]
9464 #[repr(C)]
9465 pub struct WritableWriteResponse {
9466 pub actual_count: u64,
9467 }
9468
9469 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
9470 for WritableWriteResponse
9471 where
9472 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9473 {
9474 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9475 Self,
9476 crate::wire::WritableWriteResponse,
9477 > = unsafe {
9478 ::fidl_next::CopyOptimization::enable_if(
9479 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9480 .is_enabled(),
9481 )
9482 };
9483
9484 #[inline]
9485 fn encode(
9486 self,
9487 encoder_: &mut ___E,
9488 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
9489 _: (),
9490 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9491 ::fidl_next::munge! {
9492 let crate::wire::WritableWriteResponse {
9493 actual_count,
9494
9495 } = out_;
9496 }
9497
9498 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
9499
9500 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9501
9502 Ok(())
9503 }
9504 }
9505
9506 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
9507 for &'a WritableWriteResponse
9508 where
9509 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9510 {
9511 #[inline]
9512 fn encode(
9513 self,
9514 encoder_: &mut ___E,
9515 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
9516 _: (),
9517 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9518 ::fidl_next::munge! {
9519 let crate::wire::WritableWriteResponse {
9520
9521 actual_count,
9522
9523 } = out_;
9524 }
9525
9526 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
9527
9528 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9529
9530 Ok(())
9531 }
9532 }
9533
9534 unsafe impl<___E>
9535 ::fidl_next::EncodeOption<
9536 ::fidl_next::WireBox<'static, crate::wire::WritableWriteResponse>,
9537 ___E,
9538 > for WritableWriteResponse
9539 where
9540 ___E: ::fidl_next::Encoder + ?Sized,
9541 WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
9542 {
9543 #[inline]
9544 fn encode_option(
9545 this: ::core::option::Option<Self>,
9546 encoder: &mut ___E,
9547 out: &mut ::core::mem::MaybeUninit<
9548 ::fidl_next::WireBox<'static, crate::wire::WritableWriteResponse>,
9549 >,
9550 _: (),
9551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9552 if let Some(inner) = this {
9553 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9554 ::fidl_next::WireBox::encode_present(out);
9555 } else {
9556 ::fidl_next::WireBox::encode_absent(out);
9557 }
9558
9559 Ok(())
9560 }
9561 }
9562
9563 unsafe impl<'a, ___E>
9564 ::fidl_next::EncodeOption<
9565 ::fidl_next::WireBox<'static, crate::wire::WritableWriteResponse>,
9566 ___E,
9567 > for &'a WritableWriteResponse
9568 where
9569 ___E: ::fidl_next::Encoder + ?Sized,
9570 &'a WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
9571 {
9572 #[inline]
9573 fn encode_option(
9574 this: ::core::option::Option<Self>,
9575 encoder: &mut ___E,
9576 out: &mut ::core::mem::MaybeUninit<
9577 ::fidl_next::WireBox<'static, crate::wire::WritableWriteResponse>,
9578 >,
9579 _: (),
9580 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9581 if let Some(inner) = this {
9582 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9583 ::fidl_next::WireBox::encode_present(out);
9584 } else {
9585 ::fidl_next::WireBox::encode_absent(out);
9586 }
9587
9588 Ok(())
9589 }
9590 }
9591
9592 impl ::fidl_next::FromWire<crate::wire::WritableWriteResponse> for WritableWriteResponse {
9593 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9594 crate::wire::WritableWriteResponse,
9595 Self,
9596 > = unsafe {
9597 ::fidl_next::CopyOptimization::enable_if(
9598 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
9599 .is_enabled(),
9600 )
9601 };
9602
9603 #[inline]
9604 fn from_wire(wire: crate::wire::WritableWriteResponse) -> Self {
9605 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
9606 }
9607 }
9608
9609 impl ::fidl_next::FromWireRef<crate::wire::WritableWriteResponse> for WritableWriteResponse {
9610 #[inline]
9611 fn from_wire_ref(wire: &crate::wire::WritableWriteResponse) -> Self {
9612 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
9613 }
9614 }
9615
9616 #[derive(PartialEq, Clone, Debug)]
9617 pub struct FileSeekRequest {
9618 pub origin: crate::natural::SeekOrigin,
9619
9620 pub offset: i64,
9621 }
9622
9623 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E> for FileSeekRequest
9624 where
9625 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9626 {
9627 #[inline]
9628 fn encode(
9629 self,
9630 encoder_: &mut ___E,
9631 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
9632 _: (),
9633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9634 ::fidl_next::munge! {
9635 let crate::wire::FileSeekRequest {
9636 origin,
9637 offset,
9638
9639 } = out_;
9640 }
9641
9642 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
9643
9644 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
9645
9646 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
9647
9648 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
9649
9650 Ok(())
9651 }
9652 }
9653
9654 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
9655 for &'a FileSeekRequest
9656 where
9657 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9658 {
9659 #[inline]
9660 fn encode(
9661 self,
9662 encoder_: &mut ___E,
9663 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
9664 _: (),
9665 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9666 ::fidl_next::munge! {
9667 let crate::wire::FileSeekRequest {
9668
9669 origin,
9670 offset,
9671
9672 } = out_;
9673 }
9674
9675 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
9676
9677 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
9678
9679 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
9680
9681 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
9682
9683 Ok(())
9684 }
9685 }
9686
9687 unsafe impl<___E>
9688 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::FileSeekRequest>, ___E>
9689 for FileSeekRequest
9690 where
9691 ___E: ::fidl_next::Encoder + ?Sized,
9692 FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
9693 {
9694 #[inline]
9695 fn encode_option(
9696 this: ::core::option::Option<Self>,
9697 encoder: &mut ___E,
9698 out: &mut ::core::mem::MaybeUninit<
9699 ::fidl_next::WireBox<'static, crate::wire::FileSeekRequest>,
9700 >,
9701 _: (),
9702 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9703 if let Some(inner) = this {
9704 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9705 ::fidl_next::WireBox::encode_present(out);
9706 } else {
9707 ::fidl_next::WireBox::encode_absent(out);
9708 }
9709
9710 Ok(())
9711 }
9712 }
9713
9714 unsafe impl<'a, ___E>
9715 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::FileSeekRequest>, ___E>
9716 for &'a FileSeekRequest
9717 where
9718 ___E: ::fidl_next::Encoder + ?Sized,
9719 &'a FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
9720 {
9721 #[inline]
9722 fn encode_option(
9723 this: ::core::option::Option<Self>,
9724 encoder: &mut ___E,
9725 out: &mut ::core::mem::MaybeUninit<
9726 ::fidl_next::WireBox<'static, crate::wire::FileSeekRequest>,
9727 >,
9728 _: (),
9729 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9730 if let Some(inner) = this {
9731 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9732 ::fidl_next::WireBox::encode_present(out);
9733 } else {
9734 ::fidl_next::WireBox::encode_absent(out);
9735 }
9736
9737 Ok(())
9738 }
9739 }
9740
9741 impl ::fidl_next::FromWire<crate::wire::FileSeekRequest> for FileSeekRequest {
9742 #[inline]
9743 fn from_wire(wire: crate::wire::FileSeekRequest) -> Self {
9744 Self {
9745 origin: ::fidl_next::FromWire::from_wire(wire.origin),
9746
9747 offset: ::fidl_next::FromWire::from_wire(wire.offset),
9748 }
9749 }
9750 }
9751
9752 impl ::fidl_next::FromWireRef<crate::wire::FileSeekRequest> for FileSeekRequest {
9753 #[inline]
9754 fn from_wire_ref(wire: &crate::wire::FileSeekRequest) -> Self {
9755 Self {
9756 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
9757
9758 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
9759 }
9760 }
9761 }
9762
9763 #[derive(PartialEq, Clone, Debug)]
9764 #[repr(C)]
9765 pub struct FileSeekResponse {
9766 pub offset_from_start: u64,
9767 }
9768
9769 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E> for FileSeekResponse
9770 where
9771 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9772 {
9773 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9774 Self,
9775 crate::wire::FileSeekResponse,
9776 > = unsafe {
9777 ::fidl_next::CopyOptimization::enable_if(
9778 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9779 .is_enabled(),
9780 )
9781 };
9782
9783 #[inline]
9784 fn encode(
9785 self,
9786 encoder_: &mut ___E,
9787 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
9788 _: (),
9789 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9790 ::fidl_next::munge! {
9791 let crate::wire::FileSeekResponse {
9792 offset_from_start,
9793
9794 } = out_;
9795 }
9796
9797 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
9798
9799 let mut _field =
9800 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
9801
9802 Ok(())
9803 }
9804 }
9805
9806 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
9807 for &'a FileSeekResponse
9808 where
9809 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9810 {
9811 #[inline]
9812 fn encode(
9813 self,
9814 encoder_: &mut ___E,
9815 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
9816 _: (),
9817 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9818 ::fidl_next::munge! {
9819 let crate::wire::FileSeekResponse {
9820
9821 offset_from_start,
9822
9823 } = out_;
9824 }
9825
9826 ::fidl_next::Encode::encode(&self.offset_from_start, encoder_, offset_from_start, ())?;
9827
9828 let mut _field =
9829 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
9830
9831 Ok(())
9832 }
9833 }
9834
9835 unsafe impl<___E>
9836 ::fidl_next::EncodeOption<
9837 ::fidl_next::WireBox<'static, crate::wire::FileSeekResponse>,
9838 ___E,
9839 > for FileSeekResponse
9840 where
9841 ___E: ::fidl_next::Encoder + ?Sized,
9842 FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
9843 {
9844 #[inline]
9845 fn encode_option(
9846 this: ::core::option::Option<Self>,
9847 encoder: &mut ___E,
9848 out: &mut ::core::mem::MaybeUninit<
9849 ::fidl_next::WireBox<'static, crate::wire::FileSeekResponse>,
9850 >,
9851 _: (),
9852 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9853 if let Some(inner) = this {
9854 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9855 ::fidl_next::WireBox::encode_present(out);
9856 } else {
9857 ::fidl_next::WireBox::encode_absent(out);
9858 }
9859
9860 Ok(())
9861 }
9862 }
9863
9864 unsafe impl<'a, ___E>
9865 ::fidl_next::EncodeOption<
9866 ::fidl_next::WireBox<'static, crate::wire::FileSeekResponse>,
9867 ___E,
9868 > for &'a FileSeekResponse
9869 where
9870 ___E: ::fidl_next::Encoder + ?Sized,
9871 &'a FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
9872 {
9873 #[inline]
9874 fn encode_option(
9875 this: ::core::option::Option<Self>,
9876 encoder: &mut ___E,
9877 out: &mut ::core::mem::MaybeUninit<
9878 ::fidl_next::WireBox<'static, crate::wire::FileSeekResponse>,
9879 >,
9880 _: (),
9881 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9882 if let Some(inner) = this {
9883 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9884 ::fidl_next::WireBox::encode_present(out);
9885 } else {
9886 ::fidl_next::WireBox::encode_absent(out);
9887 }
9888
9889 Ok(())
9890 }
9891 }
9892
9893 impl ::fidl_next::FromWire<crate::wire::FileSeekResponse> for FileSeekResponse {
9894 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9895 crate::wire::FileSeekResponse,
9896 Self,
9897 > = unsafe {
9898 ::fidl_next::CopyOptimization::enable_if(
9899 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
9900 .is_enabled(),
9901 )
9902 };
9903
9904 #[inline]
9905 fn from_wire(wire: crate::wire::FileSeekResponse) -> Self {
9906 Self { offset_from_start: ::fidl_next::FromWire::from_wire(wire.offset_from_start) }
9907 }
9908 }
9909
9910 impl ::fidl_next::FromWireRef<crate::wire::FileSeekResponse> for FileSeekResponse {
9911 #[inline]
9912 fn from_wire_ref(wire: &crate::wire::FileSeekResponse) -> Self {
9913 Self {
9914 offset_from_start: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset_from_start),
9915 }
9916 }
9917 }
9918
9919 #[derive(PartialEq, Clone, Debug)]
9920 #[repr(C)]
9921 pub struct FileReadAtRequest {
9922 pub count: u64,
9923
9924 pub offset: u64,
9925 }
9926
9927 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E> for FileReadAtRequest
9928 where
9929 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9930 {
9931 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9932 Self,
9933 crate::wire::FileReadAtRequest,
9934 > = unsafe {
9935 ::fidl_next::CopyOptimization::enable_if(
9936 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9937 .is_enabled()
9938 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9939 .is_enabled(),
9940 )
9941 };
9942
9943 #[inline]
9944 fn encode(
9945 self,
9946 encoder_: &mut ___E,
9947 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
9948 _: (),
9949 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9950 ::fidl_next::munge! {
9951 let crate::wire::FileReadAtRequest {
9952 count,
9953 offset,
9954
9955 } = out_;
9956 }
9957
9958 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
9959
9960 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
9961
9962 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
9963
9964 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
9965
9966 Ok(())
9967 }
9968 }
9969
9970 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
9971 for &'a FileReadAtRequest
9972 where
9973 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9974 {
9975 #[inline]
9976 fn encode(
9977 self,
9978 encoder_: &mut ___E,
9979 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
9980 _: (),
9981 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9982 ::fidl_next::munge! {
9983 let crate::wire::FileReadAtRequest {
9984
9985 count,
9986 offset,
9987
9988 } = out_;
9989 }
9990
9991 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
9992
9993 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
9994
9995 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
9996
9997 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
9998
9999 Ok(())
10000 }
10001 }
10002
10003 unsafe impl<___E>
10004 ::fidl_next::EncodeOption<
10005 ::fidl_next::WireBox<'static, crate::wire::FileReadAtRequest>,
10006 ___E,
10007 > for FileReadAtRequest
10008 where
10009 ___E: ::fidl_next::Encoder + ?Sized,
10010 FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
10011 {
10012 #[inline]
10013 fn encode_option(
10014 this: ::core::option::Option<Self>,
10015 encoder: &mut ___E,
10016 out: &mut ::core::mem::MaybeUninit<
10017 ::fidl_next::WireBox<'static, crate::wire::FileReadAtRequest>,
10018 >,
10019 _: (),
10020 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10021 if let Some(inner) = this {
10022 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10023 ::fidl_next::WireBox::encode_present(out);
10024 } else {
10025 ::fidl_next::WireBox::encode_absent(out);
10026 }
10027
10028 Ok(())
10029 }
10030 }
10031
10032 unsafe impl<'a, ___E>
10033 ::fidl_next::EncodeOption<
10034 ::fidl_next::WireBox<'static, crate::wire::FileReadAtRequest>,
10035 ___E,
10036 > for &'a FileReadAtRequest
10037 where
10038 ___E: ::fidl_next::Encoder + ?Sized,
10039 &'a FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
10040 {
10041 #[inline]
10042 fn encode_option(
10043 this: ::core::option::Option<Self>,
10044 encoder: &mut ___E,
10045 out: &mut ::core::mem::MaybeUninit<
10046 ::fidl_next::WireBox<'static, crate::wire::FileReadAtRequest>,
10047 >,
10048 _: (),
10049 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10050 if let Some(inner) = this {
10051 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10052 ::fidl_next::WireBox::encode_present(out);
10053 } else {
10054 ::fidl_next::WireBox::encode_absent(out);
10055 }
10056
10057 Ok(())
10058 }
10059 }
10060
10061 impl ::fidl_next::FromWire<crate::wire::FileReadAtRequest> for FileReadAtRequest {
10062 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10063 crate::wire::FileReadAtRequest,
10064 Self,
10065 > = unsafe {
10066 ::fidl_next::CopyOptimization::enable_if(
10067 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
10068 .is_enabled()
10069 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
10070 .is_enabled(),
10071 )
10072 };
10073
10074 #[inline]
10075 fn from_wire(wire: crate::wire::FileReadAtRequest) -> Self {
10076 Self {
10077 count: ::fidl_next::FromWire::from_wire(wire.count),
10078
10079 offset: ::fidl_next::FromWire::from_wire(wire.offset),
10080 }
10081 }
10082 }
10083
10084 impl ::fidl_next::FromWireRef<crate::wire::FileReadAtRequest> for FileReadAtRequest {
10085 #[inline]
10086 fn from_wire_ref(wire: &crate::wire::FileReadAtRequest) -> Self {
10087 Self {
10088 count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count),
10089
10090 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
10091 }
10092 }
10093 }
10094
10095 #[derive(PartialEq, Clone, Debug)]
10096 pub struct FileReadAtResponse {
10097 pub data: ::std::vec::Vec<u8>,
10098 }
10099
10100 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
10101 for FileReadAtResponse
10102 where
10103 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10104 ___E: ::fidl_next::Encoder,
10105 {
10106 #[inline]
10107 fn encode(
10108 self,
10109 encoder_: &mut ___E,
10110 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
10111 _: (),
10112 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10113 ::fidl_next::munge! {
10114 let crate::wire::FileReadAtResponse {
10115 data,
10116
10117 } = out_;
10118 }
10119
10120 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
10121
10122 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
10123 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
10124
10125 Ok(())
10126 }
10127 }
10128
10129 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
10130 for &'a FileReadAtResponse
10131 where
10132 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10133 ___E: ::fidl_next::Encoder,
10134 {
10135 #[inline]
10136 fn encode(
10137 self,
10138 encoder_: &mut ___E,
10139 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
10140 _: (),
10141 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10142 ::fidl_next::munge! {
10143 let crate::wire::FileReadAtResponse {
10144
10145 data,
10146
10147 } = out_;
10148 }
10149
10150 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
10151
10152 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
10153 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
10154
10155 Ok(())
10156 }
10157 }
10158
10159 unsafe impl<___E>
10160 ::fidl_next::EncodeOption<
10161 ::fidl_next::WireBox<'static, crate::wire::FileReadAtResponse<'static>>,
10162 ___E,
10163 > for FileReadAtResponse
10164 where
10165 ___E: ::fidl_next::Encoder + ?Sized,
10166 FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
10167 {
10168 #[inline]
10169 fn encode_option(
10170 this: ::core::option::Option<Self>,
10171 encoder: &mut ___E,
10172 out: &mut ::core::mem::MaybeUninit<
10173 ::fidl_next::WireBox<'static, crate::wire::FileReadAtResponse<'static>>,
10174 >,
10175 _: (),
10176 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10177 if let Some(inner) = this {
10178 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10179 ::fidl_next::WireBox::encode_present(out);
10180 } else {
10181 ::fidl_next::WireBox::encode_absent(out);
10182 }
10183
10184 Ok(())
10185 }
10186 }
10187
10188 unsafe impl<'a, ___E>
10189 ::fidl_next::EncodeOption<
10190 ::fidl_next::WireBox<'static, crate::wire::FileReadAtResponse<'static>>,
10191 ___E,
10192 > for &'a FileReadAtResponse
10193 where
10194 ___E: ::fidl_next::Encoder + ?Sized,
10195 &'a FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
10196 {
10197 #[inline]
10198 fn encode_option(
10199 this: ::core::option::Option<Self>,
10200 encoder: &mut ___E,
10201 out: &mut ::core::mem::MaybeUninit<
10202 ::fidl_next::WireBox<'static, crate::wire::FileReadAtResponse<'static>>,
10203 >,
10204 _: (),
10205 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10206 if let Some(inner) = this {
10207 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10208 ::fidl_next::WireBox::encode_present(out);
10209 } else {
10210 ::fidl_next::WireBox::encode_absent(out);
10211 }
10212
10213 Ok(())
10214 }
10215 }
10216
10217 impl<'de> ::fidl_next::FromWire<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
10218 #[inline]
10219 fn from_wire(wire: crate::wire::FileReadAtResponse<'de>) -> Self {
10220 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
10221 }
10222 }
10223
10224 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
10225 #[inline]
10226 fn from_wire_ref(wire: &crate::wire::FileReadAtResponse<'de>) -> Self {
10227 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
10228 }
10229 }
10230
10231 #[derive(PartialEq, Clone, Debug)]
10232 pub struct FileWriteAtRequest {
10233 pub data: ::std::vec::Vec<u8>,
10234
10235 pub offset: u64,
10236 }
10237
10238 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
10239 for FileWriteAtRequest
10240 where
10241 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10242 ___E: ::fidl_next::Encoder,
10243 {
10244 #[inline]
10245 fn encode(
10246 self,
10247 encoder_: &mut ___E,
10248 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
10249 _: (),
10250 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10251 ::fidl_next::munge! {
10252 let crate::wire::FileWriteAtRequest {
10253 data,
10254 offset,
10255
10256 } = out_;
10257 }
10258
10259 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
10260
10261 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
10262 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
10263
10264 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
10265
10266 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
10267
10268 Ok(())
10269 }
10270 }
10271
10272 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
10273 for &'a FileWriteAtRequest
10274 where
10275 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10276 ___E: ::fidl_next::Encoder,
10277 {
10278 #[inline]
10279 fn encode(
10280 self,
10281 encoder_: &mut ___E,
10282 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
10283 _: (),
10284 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10285 ::fidl_next::munge! {
10286 let crate::wire::FileWriteAtRequest {
10287
10288 data,
10289 offset,
10290
10291 } = out_;
10292 }
10293
10294 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
10295
10296 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
10297 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
10298
10299 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
10300
10301 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
10302
10303 Ok(())
10304 }
10305 }
10306
10307 unsafe impl<___E>
10308 ::fidl_next::EncodeOption<
10309 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtRequest<'static>>,
10310 ___E,
10311 > for FileWriteAtRequest
10312 where
10313 ___E: ::fidl_next::Encoder + ?Sized,
10314 FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
10315 {
10316 #[inline]
10317 fn encode_option(
10318 this: ::core::option::Option<Self>,
10319 encoder: &mut ___E,
10320 out: &mut ::core::mem::MaybeUninit<
10321 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtRequest<'static>>,
10322 >,
10323 _: (),
10324 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10325 if let Some(inner) = this {
10326 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10327 ::fidl_next::WireBox::encode_present(out);
10328 } else {
10329 ::fidl_next::WireBox::encode_absent(out);
10330 }
10331
10332 Ok(())
10333 }
10334 }
10335
10336 unsafe impl<'a, ___E>
10337 ::fidl_next::EncodeOption<
10338 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtRequest<'static>>,
10339 ___E,
10340 > for &'a FileWriteAtRequest
10341 where
10342 ___E: ::fidl_next::Encoder + ?Sized,
10343 &'a FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
10344 {
10345 #[inline]
10346 fn encode_option(
10347 this: ::core::option::Option<Self>,
10348 encoder: &mut ___E,
10349 out: &mut ::core::mem::MaybeUninit<
10350 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtRequest<'static>>,
10351 >,
10352 _: (),
10353 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10354 if let Some(inner) = this {
10355 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10356 ::fidl_next::WireBox::encode_present(out);
10357 } else {
10358 ::fidl_next::WireBox::encode_absent(out);
10359 }
10360
10361 Ok(())
10362 }
10363 }
10364
10365 impl<'de> ::fidl_next::FromWire<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
10366 #[inline]
10367 fn from_wire(wire: crate::wire::FileWriteAtRequest<'de>) -> Self {
10368 Self {
10369 data: ::fidl_next::FromWire::from_wire(wire.data),
10370
10371 offset: ::fidl_next::FromWire::from_wire(wire.offset),
10372 }
10373 }
10374 }
10375
10376 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
10377 #[inline]
10378 fn from_wire_ref(wire: &crate::wire::FileWriteAtRequest<'de>) -> Self {
10379 Self {
10380 data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data),
10381
10382 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
10383 }
10384 }
10385 }
10386
10387 #[derive(PartialEq, Clone, Debug)]
10388 #[repr(C)]
10389 pub struct FileWriteAtResponse {
10390 pub actual_count: u64,
10391 }
10392
10393 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
10394 for FileWriteAtResponse
10395 where
10396 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10397 {
10398 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10399 Self,
10400 crate::wire::FileWriteAtResponse,
10401 > = unsafe {
10402 ::fidl_next::CopyOptimization::enable_if(
10403 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
10404 .is_enabled(),
10405 )
10406 };
10407
10408 #[inline]
10409 fn encode(
10410 self,
10411 encoder_: &mut ___E,
10412 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
10413 _: (),
10414 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10415 ::fidl_next::munge! {
10416 let crate::wire::FileWriteAtResponse {
10417 actual_count,
10418
10419 } = out_;
10420 }
10421
10422 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
10423
10424 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
10425
10426 Ok(())
10427 }
10428 }
10429
10430 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
10431 for &'a FileWriteAtResponse
10432 where
10433 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10434 {
10435 #[inline]
10436 fn encode(
10437 self,
10438 encoder_: &mut ___E,
10439 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
10440 _: (),
10441 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10442 ::fidl_next::munge! {
10443 let crate::wire::FileWriteAtResponse {
10444
10445 actual_count,
10446
10447 } = out_;
10448 }
10449
10450 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
10451
10452 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
10453
10454 Ok(())
10455 }
10456 }
10457
10458 unsafe impl<___E>
10459 ::fidl_next::EncodeOption<
10460 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtResponse>,
10461 ___E,
10462 > for FileWriteAtResponse
10463 where
10464 ___E: ::fidl_next::Encoder + ?Sized,
10465 FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
10466 {
10467 #[inline]
10468 fn encode_option(
10469 this: ::core::option::Option<Self>,
10470 encoder: &mut ___E,
10471 out: &mut ::core::mem::MaybeUninit<
10472 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtResponse>,
10473 >,
10474 _: (),
10475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10476 if let Some(inner) = this {
10477 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10478 ::fidl_next::WireBox::encode_present(out);
10479 } else {
10480 ::fidl_next::WireBox::encode_absent(out);
10481 }
10482
10483 Ok(())
10484 }
10485 }
10486
10487 unsafe impl<'a, ___E>
10488 ::fidl_next::EncodeOption<
10489 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtResponse>,
10490 ___E,
10491 > for &'a FileWriteAtResponse
10492 where
10493 ___E: ::fidl_next::Encoder + ?Sized,
10494 &'a FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
10495 {
10496 #[inline]
10497 fn encode_option(
10498 this: ::core::option::Option<Self>,
10499 encoder: &mut ___E,
10500 out: &mut ::core::mem::MaybeUninit<
10501 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtResponse>,
10502 >,
10503 _: (),
10504 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10505 if let Some(inner) = this {
10506 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10507 ::fidl_next::WireBox::encode_present(out);
10508 } else {
10509 ::fidl_next::WireBox::encode_absent(out);
10510 }
10511
10512 Ok(())
10513 }
10514 }
10515
10516 impl ::fidl_next::FromWire<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
10517 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10518 crate::wire::FileWriteAtResponse,
10519 Self,
10520 > = unsafe {
10521 ::fidl_next::CopyOptimization::enable_if(
10522 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
10523 .is_enabled(),
10524 )
10525 };
10526
10527 #[inline]
10528 fn from_wire(wire: crate::wire::FileWriteAtResponse) -> Self {
10529 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
10530 }
10531 }
10532
10533 impl ::fidl_next::FromWireRef<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
10534 #[inline]
10535 fn from_wire_ref(wire: &crate::wire::FileWriteAtResponse) -> Self {
10536 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
10537 }
10538 }
10539
10540 #[derive(PartialEq, Clone, Debug)]
10541 #[repr(C)]
10542 pub struct FileResizeRequest {
10543 pub length: u64,
10544 }
10545
10546 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E> for FileResizeRequest
10547 where
10548 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10549 {
10550 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10551 Self,
10552 crate::wire::FileResizeRequest,
10553 > = unsafe {
10554 ::fidl_next::CopyOptimization::enable_if(
10555 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
10556 .is_enabled(),
10557 )
10558 };
10559
10560 #[inline]
10561 fn encode(
10562 self,
10563 encoder_: &mut ___E,
10564 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
10565 _: (),
10566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10567 ::fidl_next::munge! {
10568 let crate::wire::FileResizeRequest {
10569 length,
10570
10571 } = out_;
10572 }
10573
10574 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
10575
10576 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
10577
10578 Ok(())
10579 }
10580 }
10581
10582 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
10583 for &'a FileResizeRequest
10584 where
10585 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10586 {
10587 #[inline]
10588 fn encode(
10589 self,
10590 encoder_: &mut ___E,
10591 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
10592 _: (),
10593 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10594 ::fidl_next::munge! {
10595 let crate::wire::FileResizeRequest {
10596
10597 length,
10598
10599 } = out_;
10600 }
10601
10602 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
10603
10604 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
10605
10606 Ok(())
10607 }
10608 }
10609
10610 unsafe impl<___E>
10611 ::fidl_next::EncodeOption<
10612 ::fidl_next::WireBox<'static, crate::wire::FileResizeRequest>,
10613 ___E,
10614 > for FileResizeRequest
10615 where
10616 ___E: ::fidl_next::Encoder + ?Sized,
10617 FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
10618 {
10619 #[inline]
10620 fn encode_option(
10621 this: ::core::option::Option<Self>,
10622 encoder: &mut ___E,
10623 out: &mut ::core::mem::MaybeUninit<
10624 ::fidl_next::WireBox<'static, crate::wire::FileResizeRequest>,
10625 >,
10626 _: (),
10627 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10628 if let Some(inner) = this {
10629 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10630 ::fidl_next::WireBox::encode_present(out);
10631 } else {
10632 ::fidl_next::WireBox::encode_absent(out);
10633 }
10634
10635 Ok(())
10636 }
10637 }
10638
10639 unsafe impl<'a, ___E>
10640 ::fidl_next::EncodeOption<
10641 ::fidl_next::WireBox<'static, crate::wire::FileResizeRequest>,
10642 ___E,
10643 > for &'a FileResizeRequest
10644 where
10645 ___E: ::fidl_next::Encoder + ?Sized,
10646 &'a FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
10647 {
10648 #[inline]
10649 fn encode_option(
10650 this: ::core::option::Option<Self>,
10651 encoder: &mut ___E,
10652 out: &mut ::core::mem::MaybeUninit<
10653 ::fidl_next::WireBox<'static, crate::wire::FileResizeRequest>,
10654 >,
10655 _: (),
10656 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10657 if let Some(inner) = this {
10658 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10659 ::fidl_next::WireBox::encode_present(out);
10660 } else {
10661 ::fidl_next::WireBox::encode_absent(out);
10662 }
10663
10664 Ok(())
10665 }
10666 }
10667
10668 impl ::fidl_next::FromWire<crate::wire::FileResizeRequest> for FileResizeRequest {
10669 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10670 crate::wire::FileResizeRequest,
10671 Self,
10672 > = unsafe {
10673 ::fidl_next::CopyOptimization::enable_if(
10674 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
10675 .is_enabled(),
10676 )
10677 };
10678
10679 #[inline]
10680 fn from_wire(wire: crate::wire::FileResizeRequest) -> Self {
10681 Self { length: ::fidl_next::FromWire::from_wire(wire.length) }
10682 }
10683 }
10684
10685 impl ::fidl_next::FromWireRef<crate::wire::FileResizeRequest> for FileResizeRequest {
10686 #[inline]
10687 fn from_wire_ref(wire: &crate::wire::FileResizeRequest) -> Self {
10688 Self { length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length) }
10689 }
10690 }
10691
10692 #[derive(PartialEq, Clone, Debug)]
10693 #[repr(C)]
10694 pub struct FileResizeResponse {}
10695
10696 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileResizeResponse, ___E> for FileResizeResponse
10697 where
10698 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10699 {
10700 #[inline]
10701 fn encode(
10702 self,
10703 encoder_: &mut ___E,
10704 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeResponse>,
10705 _: (),
10706 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10707 *out_ = ::core::mem::MaybeUninit::zeroed();
10708
10709 Ok(())
10710 }
10711 }
10712
10713 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileResizeResponse, ___E>
10714 for &'a FileResizeResponse
10715 where
10716 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10717 {
10718 #[inline]
10719 fn encode(
10720 self,
10721 encoder_: &mut ___E,
10722 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeResponse>,
10723 _: (),
10724 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10725 ::fidl_next::munge! {
10726 let crate::wire::FileResizeResponse {
10727
10728 _empty,
10729
10730
10731 } = out_;
10732 }
10733
10734 Ok(())
10735 }
10736 }
10737
10738 unsafe impl<___E>
10739 ::fidl_next::EncodeOption<
10740 ::fidl_next::WireBox<'static, crate::wire::FileResizeResponse>,
10741 ___E,
10742 > for FileResizeResponse
10743 where
10744 ___E: ::fidl_next::Encoder + ?Sized,
10745 FileResizeResponse: ::fidl_next::Encode<crate::wire::FileResizeResponse, ___E>,
10746 {
10747 #[inline]
10748 fn encode_option(
10749 this: ::core::option::Option<Self>,
10750 encoder: &mut ___E,
10751 out: &mut ::core::mem::MaybeUninit<
10752 ::fidl_next::WireBox<'static, crate::wire::FileResizeResponse>,
10753 >,
10754 _: (),
10755 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10756 if let Some(inner) = this {
10757 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10758 ::fidl_next::WireBox::encode_present(out);
10759 } else {
10760 ::fidl_next::WireBox::encode_absent(out);
10761 }
10762
10763 Ok(())
10764 }
10765 }
10766
10767 unsafe impl<'a, ___E>
10768 ::fidl_next::EncodeOption<
10769 ::fidl_next::WireBox<'static, crate::wire::FileResizeResponse>,
10770 ___E,
10771 > for &'a FileResizeResponse
10772 where
10773 ___E: ::fidl_next::Encoder + ?Sized,
10774 &'a FileResizeResponse: ::fidl_next::Encode<crate::wire::FileResizeResponse, ___E>,
10775 {
10776 #[inline]
10777 fn encode_option(
10778 this: ::core::option::Option<Self>,
10779 encoder: &mut ___E,
10780 out: &mut ::core::mem::MaybeUninit<
10781 ::fidl_next::WireBox<'static, crate::wire::FileResizeResponse>,
10782 >,
10783 _: (),
10784 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10785 if let Some(inner) = this {
10786 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10787 ::fidl_next::WireBox::encode_present(out);
10788 } else {
10789 ::fidl_next::WireBox::encode_absent(out);
10790 }
10791
10792 Ok(())
10793 }
10794 }
10795
10796 impl ::fidl_next::FromWire<crate::wire::FileResizeResponse> for FileResizeResponse {
10797 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10798 crate::wire::FileResizeResponse,
10799 Self,
10800 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
10801
10802 #[inline]
10803 fn from_wire(wire: crate::wire::FileResizeResponse) -> Self {
10804 Self {}
10805 }
10806 }
10807
10808 impl ::fidl_next::FromWireRef<crate::wire::FileResizeResponse> for FileResizeResponse {
10809 #[inline]
10810 fn from_wire_ref(wire: &crate::wire::FileResizeResponse) -> Self {
10811 Self {}
10812 }
10813 }
10814
10815 ::fidl_next::bitflags::bitflags! {
10816 #[derive(
10817 Clone,
10818 Copy,
10819 Debug,
10820 PartialEq,
10821 Eq,
10822 Hash,
10823 )]
10824 pub struct VmoFlags: u32 {
10825 #[doc = " Requests that the VMO be readable.\n"]const READ = 1;
10826 #[doc = " Requests that the VMO be writable.\n"]const WRITE = 2;
10827 #[doc = " Request that the VMO be executable.\n"]const EXECUTE = 4;
10828 #[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;
10829 #[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;
10830
10831 }
10832 }
10833
10834 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for VmoFlags
10835 where
10836 ___E: ?Sized,
10837 {
10838 #[inline]
10839 fn encode(
10840 self,
10841 encoder: &mut ___E,
10842 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
10843 _: (),
10844 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10845 ::fidl_next::Encode::encode(&self, encoder, out, ())
10846 }
10847 }
10848
10849 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for &'a VmoFlags
10850 where
10851 ___E: ?Sized,
10852 {
10853 #[inline]
10854 fn encode(
10855 self,
10856 _: &mut ___E,
10857 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
10858 _: (),
10859 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10860 ::fidl_next::munge!(let crate::wire::VmoFlags { value } = out);
10861
10862 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
10863 return Err(::fidl_next::EncodeError::InvalidStrictBits);
10864 }
10865
10866 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
10867 Ok(())
10868 }
10869 }
10870
10871 impl ::core::convert::From<crate::wire::VmoFlags> for VmoFlags {
10872 fn from(wire: crate::wire::VmoFlags) -> Self {
10873 Self::from_bits_retain(u32::from(wire.value))
10874 }
10875 }
10876
10877 impl ::fidl_next::FromWire<crate::wire::VmoFlags> for VmoFlags {
10878 #[inline]
10879 fn from_wire(wire: crate::wire::VmoFlags) -> Self {
10880 Self::from(wire)
10881 }
10882 }
10883
10884 impl ::fidl_next::FromWireRef<crate::wire::VmoFlags> for VmoFlags {
10885 #[inline]
10886 fn from_wire_ref(wire: &crate::wire::VmoFlags) -> Self {
10887 Self::from(*wire)
10888 }
10889 }
10890
10891 #[derive(PartialEq, Clone, Debug)]
10892 #[repr(C)]
10893 pub struct FileGetBackingMemoryRequest {
10894 pub flags: crate::natural::VmoFlags,
10895 }
10896
10897 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
10898 for FileGetBackingMemoryRequest
10899 where
10900 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10901 {
10902 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10903 Self,
10904 crate::wire::FileGetBackingMemoryRequest,
10905 > = unsafe {
10906 ::fidl_next::CopyOptimization::enable_if(
10907 true && <crate::natural::VmoFlags as ::fidl_next::Encode<
10908 crate::wire::VmoFlags,
10909 ___E,
10910 >>::COPY_OPTIMIZATION
10911 .is_enabled(),
10912 )
10913 };
10914
10915 #[inline]
10916 fn encode(
10917 self,
10918 encoder_: &mut ___E,
10919 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
10920 _: (),
10921 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10922 ::fidl_next::munge! {
10923 let crate::wire::FileGetBackingMemoryRequest {
10924 flags,
10925
10926 } = out_;
10927 }
10928
10929 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
10930
10931 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
10932
10933 Ok(())
10934 }
10935 }
10936
10937 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
10938 for &'a FileGetBackingMemoryRequest
10939 where
10940 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10941 {
10942 #[inline]
10943 fn encode(
10944 self,
10945 encoder_: &mut ___E,
10946 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
10947 _: (),
10948 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10949 ::fidl_next::munge! {
10950 let crate::wire::FileGetBackingMemoryRequest {
10951
10952 flags,
10953
10954 } = out_;
10955 }
10956
10957 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
10958
10959 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
10960
10961 Ok(())
10962 }
10963 }
10964
10965 unsafe impl<___E>
10966 ::fidl_next::EncodeOption<
10967 ::fidl_next::WireBox<'static, crate::wire::FileGetBackingMemoryRequest>,
10968 ___E,
10969 > for FileGetBackingMemoryRequest
10970 where
10971 ___E: ::fidl_next::Encoder + ?Sized,
10972 FileGetBackingMemoryRequest:
10973 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
10974 {
10975 #[inline]
10976 fn encode_option(
10977 this: ::core::option::Option<Self>,
10978 encoder: &mut ___E,
10979 out: &mut ::core::mem::MaybeUninit<
10980 ::fidl_next::WireBox<'static, crate::wire::FileGetBackingMemoryRequest>,
10981 >,
10982 _: (),
10983 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10984 if let Some(inner) = this {
10985 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10986 ::fidl_next::WireBox::encode_present(out);
10987 } else {
10988 ::fidl_next::WireBox::encode_absent(out);
10989 }
10990
10991 Ok(())
10992 }
10993 }
10994
10995 unsafe impl<'a, ___E>
10996 ::fidl_next::EncodeOption<
10997 ::fidl_next::WireBox<'static, crate::wire::FileGetBackingMemoryRequest>,
10998 ___E,
10999 > for &'a FileGetBackingMemoryRequest
11000 where
11001 ___E: ::fidl_next::Encoder + ?Sized,
11002 &'a FileGetBackingMemoryRequest:
11003 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
11004 {
11005 #[inline]
11006 fn encode_option(
11007 this: ::core::option::Option<Self>,
11008 encoder: &mut ___E,
11009 out: &mut ::core::mem::MaybeUninit<
11010 ::fidl_next::WireBox<'static, crate::wire::FileGetBackingMemoryRequest>,
11011 >,
11012 _: (),
11013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11014 if let Some(inner) = this {
11015 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11016 ::fidl_next::WireBox::encode_present(out);
11017 } else {
11018 ::fidl_next::WireBox::encode_absent(out);
11019 }
11020
11021 Ok(())
11022 }
11023 }
11024
11025 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryRequest>
11026 for FileGetBackingMemoryRequest
11027 {
11028 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
11029 crate::wire::FileGetBackingMemoryRequest,
11030 Self,
11031 > = unsafe {
11032 ::fidl_next::CopyOptimization::enable_if(
11033 true && <crate::natural::VmoFlags as ::fidl_next::FromWire<
11034 crate::wire::VmoFlags,
11035 >>::COPY_OPTIMIZATION
11036 .is_enabled(),
11037 )
11038 };
11039
11040 #[inline]
11041 fn from_wire(wire: crate::wire::FileGetBackingMemoryRequest) -> Self {
11042 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
11043 }
11044 }
11045
11046 impl ::fidl_next::FromWireRef<crate::wire::FileGetBackingMemoryRequest>
11047 for FileGetBackingMemoryRequest
11048 {
11049 #[inline]
11050 fn from_wire_ref(wire: &crate::wire::FileGetBackingMemoryRequest) -> Self {
11051 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
11052 }
11053 }
11054
11055 #[derive(PartialEq, Clone, Debug)]
11056 #[repr(C)]
11057 pub struct LinkableLinkIntoResponse {}
11058
11059 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LinkableLinkIntoResponse, ___E>
11060 for LinkableLinkIntoResponse
11061 where
11062 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11063 {
11064 #[inline]
11065 fn encode(
11066 self,
11067 encoder_: &mut ___E,
11068 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoResponse>,
11069 _: (),
11070 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11071 *out_ = ::core::mem::MaybeUninit::zeroed();
11072
11073 Ok(())
11074 }
11075 }
11076
11077 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LinkableLinkIntoResponse, ___E>
11078 for &'a LinkableLinkIntoResponse
11079 where
11080 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11081 {
11082 #[inline]
11083 fn encode(
11084 self,
11085 encoder_: &mut ___E,
11086 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoResponse>,
11087 _: (),
11088 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11089 ::fidl_next::munge! {
11090 let crate::wire::LinkableLinkIntoResponse {
11091
11092 _empty,
11093
11094
11095 } = out_;
11096 }
11097
11098 Ok(())
11099 }
11100 }
11101
11102 unsafe impl<___E>
11103 ::fidl_next::EncodeOption<
11104 ::fidl_next::WireBox<'static, crate::wire::LinkableLinkIntoResponse>,
11105 ___E,
11106 > for LinkableLinkIntoResponse
11107 where
11108 ___E: ::fidl_next::Encoder + ?Sized,
11109 LinkableLinkIntoResponse: ::fidl_next::Encode<crate::wire::LinkableLinkIntoResponse, ___E>,
11110 {
11111 #[inline]
11112 fn encode_option(
11113 this: ::core::option::Option<Self>,
11114 encoder: &mut ___E,
11115 out: &mut ::core::mem::MaybeUninit<
11116 ::fidl_next::WireBox<'static, crate::wire::LinkableLinkIntoResponse>,
11117 >,
11118 _: (),
11119 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11120 if let Some(inner) = this {
11121 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11122 ::fidl_next::WireBox::encode_present(out);
11123 } else {
11124 ::fidl_next::WireBox::encode_absent(out);
11125 }
11126
11127 Ok(())
11128 }
11129 }
11130
11131 unsafe impl<'a, ___E>
11132 ::fidl_next::EncodeOption<
11133 ::fidl_next::WireBox<'static, crate::wire::LinkableLinkIntoResponse>,
11134 ___E,
11135 > for &'a LinkableLinkIntoResponse
11136 where
11137 ___E: ::fidl_next::Encoder + ?Sized,
11138 &'a LinkableLinkIntoResponse:
11139 ::fidl_next::Encode<crate::wire::LinkableLinkIntoResponse, ___E>,
11140 {
11141 #[inline]
11142 fn encode_option(
11143 this: ::core::option::Option<Self>,
11144 encoder: &mut ___E,
11145 out: &mut ::core::mem::MaybeUninit<
11146 ::fidl_next::WireBox<'static, crate::wire::LinkableLinkIntoResponse>,
11147 >,
11148 _: (),
11149 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11150 if let Some(inner) = this {
11151 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11152 ::fidl_next::WireBox::encode_present(out);
11153 } else {
11154 ::fidl_next::WireBox::encode_absent(out);
11155 }
11156
11157 Ok(())
11158 }
11159 }
11160
11161 impl ::fidl_next::FromWire<crate::wire::LinkableLinkIntoResponse> for LinkableLinkIntoResponse {
11162 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
11163 crate::wire::LinkableLinkIntoResponse,
11164 Self,
11165 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11166
11167 #[inline]
11168 fn from_wire(wire: crate::wire::LinkableLinkIntoResponse) -> Self {
11169 Self {}
11170 }
11171 }
11172
11173 impl ::fidl_next::FromWireRef<crate::wire::LinkableLinkIntoResponse> for LinkableLinkIntoResponse {
11174 #[inline]
11175 fn from_wire_ref(wire: &crate::wire::LinkableLinkIntoResponse) -> Self {
11176 Self {}
11177 }
11178 }
11179
11180 #[derive(PartialEq, Clone, Debug)]
11181 #[repr(C)]
11182 pub struct FileAllocateResponse {}
11183
11184 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileAllocateResponse, ___E>
11185 for FileAllocateResponse
11186 where
11187 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11188 {
11189 #[inline]
11190 fn encode(
11191 self,
11192 encoder_: &mut ___E,
11193 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateResponse>,
11194 _: (),
11195 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11196 *out_ = ::core::mem::MaybeUninit::zeroed();
11197
11198 Ok(())
11199 }
11200 }
11201
11202 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileAllocateResponse, ___E>
11203 for &'a FileAllocateResponse
11204 where
11205 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11206 {
11207 #[inline]
11208 fn encode(
11209 self,
11210 encoder_: &mut ___E,
11211 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateResponse>,
11212 _: (),
11213 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11214 ::fidl_next::munge! {
11215 let crate::wire::FileAllocateResponse {
11216
11217 _empty,
11218
11219
11220 } = out_;
11221 }
11222
11223 Ok(())
11224 }
11225 }
11226
11227 unsafe impl<___E>
11228 ::fidl_next::EncodeOption<
11229 ::fidl_next::WireBox<'static, crate::wire::FileAllocateResponse>,
11230 ___E,
11231 > for FileAllocateResponse
11232 where
11233 ___E: ::fidl_next::Encoder + ?Sized,
11234 FileAllocateResponse: ::fidl_next::Encode<crate::wire::FileAllocateResponse, ___E>,
11235 {
11236 #[inline]
11237 fn encode_option(
11238 this: ::core::option::Option<Self>,
11239 encoder: &mut ___E,
11240 out: &mut ::core::mem::MaybeUninit<
11241 ::fidl_next::WireBox<'static, crate::wire::FileAllocateResponse>,
11242 >,
11243 _: (),
11244 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11245 if let Some(inner) = this {
11246 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11247 ::fidl_next::WireBox::encode_present(out);
11248 } else {
11249 ::fidl_next::WireBox::encode_absent(out);
11250 }
11251
11252 Ok(())
11253 }
11254 }
11255
11256 unsafe impl<'a, ___E>
11257 ::fidl_next::EncodeOption<
11258 ::fidl_next::WireBox<'static, crate::wire::FileAllocateResponse>,
11259 ___E,
11260 > for &'a FileAllocateResponse
11261 where
11262 ___E: ::fidl_next::Encoder + ?Sized,
11263 &'a FileAllocateResponse: ::fidl_next::Encode<crate::wire::FileAllocateResponse, ___E>,
11264 {
11265 #[inline]
11266 fn encode_option(
11267 this: ::core::option::Option<Self>,
11268 encoder: &mut ___E,
11269 out: &mut ::core::mem::MaybeUninit<
11270 ::fidl_next::WireBox<'static, crate::wire::FileAllocateResponse>,
11271 >,
11272 _: (),
11273 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11274 if let Some(inner) = this {
11275 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11276 ::fidl_next::WireBox::encode_present(out);
11277 } else {
11278 ::fidl_next::WireBox::encode_absent(out);
11279 }
11280
11281 Ok(())
11282 }
11283 }
11284
11285 impl ::fidl_next::FromWire<crate::wire::FileAllocateResponse> for FileAllocateResponse {
11286 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
11287 crate::wire::FileAllocateResponse,
11288 Self,
11289 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11290
11291 #[inline]
11292 fn from_wire(wire: crate::wire::FileAllocateResponse) -> Self {
11293 Self {}
11294 }
11295 }
11296
11297 impl ::fidl_next::FromWireRef<crate::wire::FileAllocateResponse> for FileAllocateResponse {
11298 #[inline]
11299 fn from_wire_ref(wire: &crate::wire::FileAllocateResponse) -> Self {
11300 Self {}
11301 }
11302 }
11303
11304 #[derive(PartialEq, Clone, Debug)]
11305 #[repr(C)]
11306 pub struct FileEnableVerityResponse {}
11307
11308 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileEnableVerityResponse, ___E>
11309 for FileEnableVerityResponse
11310 where
11311 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11312 {
11313 #[inline]
11314 fn encode(
11315 self,
11316 encoder_: &mut ___E,
11317 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityResponse>,
11318 _: (),
11319 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11320 *out_ = ::core::mem::MaybeUninit::zeroed();
11321
11322 Ok(())
11323 }
11324 }
11325
11326 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileEnableVerityResponse, ___E>
11327 for &'a FileEnableVerityResponse
11328 where
11329 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11330 {
11331 #[inline]
11332 fn encode(
11333 self,
11334 encoder_: &mut ___E,
11335 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityResponse>,
11336 _: (),
11337 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11338 ::fidl_next::munge! {
11339 let crate::wire::FileEnableVerityResponse {
11340
11341 _empty,
11342
11343
11344 } = out_;
11345 }
11346
11347 Ok(())
11348 }
11349 }
11350
11351 unsafe impl<___E>
11352 ::fidl_next::EncodeOption<
11353 ::fidl_next::WireBox<'static, crate::wire::FileEnableVerityResponse>,
11354 ___E,
11355 > for FileEnableVerityResponse
11356 where
11357 ___E: ::fidl_next::Encoder + ?Sized,
11358 FileEnableVerityResponse: ::fidl_next::Encode<crate::wire::FileEnableVerityResponse, ___E>,
11359 {
11360 #[inline]
11361 fn encode_option(
11362 this: ::core::option::Option<Self>,
11363 encoder: &mut ___E,
11364 out: &mut ::core::mem::MaybeUninit<
11365 ::fidl_next::WireBox<'static, crate::wire::FileEnableVerityResponse>,
11366 >,
11367 _: (),
11368 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11369 if let Some(inner) = this {
11370 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11371 ::fidl_next::WireBox::encode_present(out);
11372 } else {
11373 ::fidl_next::WireBox::encode_absent(out);
11374 }
11375
11376 Ok(())
11377 }
11378 }
11379
11380 unsafe impl<'a, ___E>
11381 ::fidl_next::EncodeOption<
11382 ::fidl_next::WireBox<'static, crate::wire::FileEnableVerityResponse>,
11383 ___E,
11384 > for &'a FileEnableVerityResponse
11385 where
11386 ___E: ::fidl_next::Encoder + ?Sized,
11387 &'a FileEnableVerityResponse:
11388 ::fidl_next::Encode<crate::wire::FileEnableVerityResponse, ___E>,
11389 {
11390 #[inline]
11391 fn encode_option(
11392 this: ::core::option::Option<Self>,
11393 encoder: &mut ___E,
11394 out: &mut ::core::mem::MaybeUninit<
11395 ::fidl_next::WireBox<'static, crate::wire::FileEnableVerityResponse>,
11396 >,
11397 _: (),
11398 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11399 if let Some(inner) = this {
11400 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11401 ::fidl_next::WireBox::encode_present(out);
11402 } else {
11403 ::fidl_next::WireBox::encode_absent(out);
11404 }
11405
11406 Ok(())
11407 }
11408 }
11409
11410 impl ::fidl_next::FromWire<crate::wire::FileEnableVerityResponse> for FileEnableVerityResponse {
11411 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
11412 crate::wire::FileEnableVerityResponse,
11413 Self,
11414 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11415
11416 #[inline]
11417 fn from_wire(wire: crate::wire::FileEnableVerityResponse) -> Self {
11418 Self {}
11419 }
11420 }
11421
11422 impl ::fidl_next::FromWireRef<crate::wire::FileEnableVerityResponse> for FileEnableVerityResponse {
11423 #[inline]
11424 fn from_wire_ref(wire: &crate::wire::FileEnableVerityResponse) -> Self {
11425 Self {}
11426 }
11427 }
11428
11429 ::fidl_next::bitflags::bitflags! {
11430 #[derive(
11431 Clone,
11432 Copy,
11433 Debug,
11434 PartialEq,
11435 Eq,
11436 Hash,
11437 )]
11438 pub struct FileSignal: u32 {
11439 #[doc = " Indicates the file is ready for reading.\n"]const READABLE = 16777216;
11440 #[doc = " Indicates the file is ready for writing.\n"]const WRITABLE = 33554432;
11441
11442 }
11443 }
11444
11445 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for FileSignal
11446 where
11447 ___E: ?Sized,
11448 {
11449 #[inline]
11450 fn encode(
11451 self,
11452 encoder: &mut ___E,
11453 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
11454 _: (),
11455 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11456 ::fidl_next::Encode::encode(&self, encoder, out, ())
11457 }
11458 }
11459
11460 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for &'a FileSignal
11461 where
11462 ___E: ?Sized,
11463 {
11464 #[inline]
11465 fn encode(
11466 self,
11467 _: &mut ___E,
11468 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
11469 _: (),
11470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11471 ::fidl_next::munge!(let crate::wire::FileSignal { value } = out);
11472
11473 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
11474 return Err(::fidl_next::EncodeError::InvalidStrictBits);
11475 }
11476
11477 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
11478 Ok(())
11479 }
11480 }
11481
11482 impl ::core::convert::From<crate::wire::FileSignal> for FileSignal {
11483 fn from(wire: crate::wire::FileSignal) -> Self {
11484 Self::from_bits_retain(u32::from(wire.value))
11485 }
11486 }
11487
11488 impl ::fidl_next::FromWire<crate::wire::FileSignal> for FileSignal {
11489 #[inline]
11490 fn from_wire(wire: crate::wire::FileSignal) -> Self {
11491 Self::from(wire)
11492 }
11493 }
11494
11495 impl ::fidl_next::FromWireRef<crate::wire::FileSignal> for FileSignal {
11496 #[inline]
11497 fn from_wire_ref(wire: &crate::wire::FileSignal) -> Self {
11498 Self::from(*wire)
11499 }
11500 }
11501
11502 #[derive(PartialEq, Clone, Debug)]
11503 #[repr(C)]
11504 pub struct FilesystemInfo {
11505 pub total_bytes: u64,
11506
11507 pub used_bytes: u64,
11508
11509 pub total_nodes: u64,
11510
11511 pub used_nodes: u64,
11512
11513 pub free_shared_pool_bytes: u64,
11514
11515 pub fs_id: u64,
11516
11517 pub block_size: u32,
11518
11519 pub max_filename_size: u32,
11520
11521 pub fs_type: u32,
11522
11523 pub padding: u32,
11524
11525 pub name: [i8; 32],
11526 }
11527
11528 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for FilesystemInfo
11529 where
11530 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11531 {
11532 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FilesystemInfo> = unsafe {
11533 ::fidl_next::CopyOptimization::enable_if(
11534 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11535 .is_enabled()
11536 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11537 .is_enabled()
11538 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11539 .is_enabled()
11540 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11541 .is_enabled()
11542 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11543 .is_enabled()
11544 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11545 .is_enabled()
11546 && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION
11547 .is_enabled()
11548 && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION
11549 .is_enabled()
11550 && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION
11551 .is_enabled()
11552 && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION
11553 .is_enabled()
11554 && <[i8; 32] as ::fidl_next::Encode<[i8; 32], ___E>>::COPY_OPTIMIZATION
11555 .is_enabled(),
11556 )
11557 };
11558
11559 #[inline]
11560 fn encode(
11561 self,
11562 encoder_: &mut ___E,
11563 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
11564 _: (),
11565 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11566 ::fidl_next::munge! {
11567 let crate::wire::FilesystemInfo {
11568 total_bytes,
11569 used_bytes,
11570 total_nodes,
11571 used_nodes,
11572 free_shared_pool_bytes,
11573 fs_id,
11574 block_size,
11575 max_filename_size,
11576 fs_type,
11577 padding,
11578 name,
11579
11580 } = out_;
11581 }
11582
11583 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
11584
11585 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
11586
11587 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
11588
11589 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
11590
11591 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
11592
11593 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
11594
11595 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
11596
11597 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
11598
11599 ::fidl_next::Encode::encode(
11600 self.free_shared_pool_bytes,
11601 encoder_,
11602 free_shared_pool_bytes,
11603 (),
11604 )?;
11605
11606 let mut _field =
11607 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
11608
11609 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
11610
11611 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
11612
11613 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
11614
11615 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
11616
11617 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
11618
11619 let mut _field =
11620 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
11621
11622 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
11623
11624 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
11625
11626 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
11627
11628 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
11629
11630 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
11631
11632 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
11633
11634 Ok(())
11635 }
11636 }
11637
11638 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for &'a FilesystemInfo
11639 where
11640 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11641 {
11642 #[inline]
11643 fn encode(
11644 self,
11645 encoder_: &mut ___E,
11646 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
11647 _: (),
11648 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11649 ::fidl_next::munge! {
11650 let crate::wire::FilesystemInfo {
11651
11652 total_bytes,
11653 used_bytes,
11654 total_nodes,
11655 used_nodes,
11656 free_shared_pool_bytes,
11657 fs_id,
11658 block_size,
11659 max_filename_size,
11660 fs_type,
11661 padding,
11662 name,
11663
11664 } = out_;
11665 }
11666
11667 ::fidl_next::Encode::encode(&self.total_bytes, encoder_, total_bytes, ())?;
11668
11669 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
11670
11671 ::fidl_next::Encode::encode(&self.used_bytes, encoder_, used_bytes, ())?;
11672
11673 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
11674
11675 ::fidl_next::Encode::encode(&self.total_nodes, encoder_, total_nodes, ())?;
11676
11677 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
11678
11679 ::fidl_next::Encode::encode(&self.used_nodes, encoder_, used_nodes, ())?;
11680
11681 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
11682
11683 ::fidl_next::Encode::encode(
11684 &self.free_shared_pool_bytes,
11685 encoder_,
11686 free_shared_pool_bytes,
11687 (),
11688 )?;
11689
11690 let mut _field =
11691 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
11692
11693 ::fidl_next::Encode::encode(&self.fs_id, encoder_, fs_id, ())?;
11694
11695 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
11696
11697 ::fidl_next::Encode::encode(&self.block_size, encoder_, block_size, ())?;
11698
11699 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
11700
11701 ::fidl_next::Encode::encode(&self.max_filename_size, encoder_, max_filename_size, ())?;
11702
11703 let mut _field =
11704 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
11705
11706 ::fidl_next::Encode::encode(&self.fs_type, encoder_, fs_type, ())?;
11707
11708 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
11709
11710 ::fidl_next::Encode::encode(&self.padding, encoder_, padding, ())?;
11711
11712 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
11713
11714 ::fidl_next::Encode::encode(&self.name, encoder_, name, ())?;
11715
11716 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
11717
11718 Ok(())
11719 }
11720 }
11721
11722 unsafe impl<___E>
11723 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>, ___E>
11724 for FilesystemInfo
11725 where
11726 ___E: ::fidl_next::Encoder + ?Sized,
11727 FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
11728 {
11729 #[inline]
11730 fn encode_option(
11731 this: ::core::option::Option<Self>,
11732 encoder: &mut ___E,
11733 out: &mut ::core::mem::MaybeUninit<
11734 ::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>,
11735 >,
11736 _: (),
11737 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11738 if let Some(inner) = this {
11739 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11740 ::fidl_next::WireBox::encode_present(out);
11741 } else {
11742 ::fidl_next::WireBox::encode_absent(out);
11743 }
11744
11745 Ok(())
11746 }
11747 }
11748
11749 unsafe impl<'a, ___E>
11750 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>, ___E>
11751 for &'a FilesystemInfo
11752 where
11753 ___E: ::fidl_next::Encoder + ?Sized,
11754 &'a FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
11755 {
11756 #[inline]
11757 fn encode_option(
11758 this: ::core::option::Option<Self>,
11759 encoder: &mut ___E,
11760 out: &mut ::core::mem::MaybeUninit<
11761 ::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>,
11762 >,
11763 _: (),
11764 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11765 if let Some(inner) = this {
11766 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11767 ::fidl_next::WireBox::encode_present(out);
11768 } else {
11769 ::fidl_next::WireBox::encode_absent(out);
11770 }
11771
11772 Ok(())
11773 }
11774 }
11775
11776 impl ::fidl_next::FromWire<crate::wire::FilesystemInfo> for FilesystemInfo {
11777 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FilesystemInfo, Self> = unsafe {
11778 ::fidl_next::CopyOptimization::enable_if(
11779 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11780 .is_enabled()
11781 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11782 .is_enabled()
11783 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11784 .is_enabled()
11785 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11786 .is_enabled()
11787 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11788 .is_enabled()
11789 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11790 .is_enabled()
11791 && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
11792 .is_enabled()
11793 && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
11794 .is_enabled()
11795 && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
11796 .is_enabled()
11797 && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
11798 .is_enabled()
11799 && <[i8; 32] as ::fidl_next::FromWire<[i8; 32]>>::COPY_OPTIMIZATION
11800 .is_enabled(),
11801 )
11802 };
11803
11804 #[inline]
11805 fn from_wire(wire: crate::wire::FilesystemInfo) -> Self {
11806 Self {
11807 total_bytes: ::fidl_next::FromWire::from_wire(wire.total_bytes),
11808
11809 used_bytes: ::fidl_next::FromWire::from_wire(wire.used_bytes),
11810
11811 total_nodes: ::fidl_next::FromWire::from_wire(wire.total_nodes),
11812
11813 used_nodes: ::fidl_next::FromWire::from_wire(wire.used_nodes),
11814
11815 free_shared_pool_bytes: ::fidl_next::FromWire::from_wire(
11816 wire.free_shared_pool_bytes,
11817 ),
11818
11819 fs_id: ::fidl_next::FromWire::from_wire(wire.fs_id),
11820
11821 block_size: ::fidl_next::FromWire::from_wire(wire.block_size),
11822
11823 max_filename_size: ::fidl_next::FromWire::from_wire(wire.max_filename_size),
11824
11825 fs_type: ::fidl_next::FromWire::from_wire(wire.fs_type),
11826
11827 padding: ::fidl_next::FromWire::from_wire(wire.padding),
11828
11829 name: ::fidl_next::FromWire::from_wire(wire.name),
11830 }
11831 }
11832 }
11833
11834 impl ::fidl_next::FromWireRef<crate::wire::FilesystemInfo> for FilesystemInfo {
11835 #[inline]
11836 fn from_wire_ref(wire: &crate::wire::FilesystemInfo) -> Self {
11837 Self {
11838 total_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_bytes),
11839
11840 used_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_bytes),
11841
11842 total_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_nodes),
11843
11844 used_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_nodes),
11845
11846 free_shared_pool_bytes: ::fidl_next::FromWireRef::from_wire_ref(
11847 &wire.free_shared_pool_bytes,
11848 ),
11849
11850 fs_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_id),
11851
11852 block_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.block_size),
11853
11854 max_filename_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_filename_size),
11855
11856 fs_type: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_type),
11857
11858 padding: ::fidl_next::FromWireRef::from_wire_ref(&wire.padding),
11859
11860 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
11861 }
11862 }
11863 }
11864
11865 #[derive(PartialEq, Clone, Debug)]
11866 #[repr(C)]
11867 pub struct Service {}
11868
11869 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Service, ___E> for Service
11870 where
11871 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11872 {
11873 #[inline]
11874 fn encode(
11875 self,
11876 encoder_: &mut ___E,
11877 out_: &mut ::core::mem::MaybeUninit<crate::wire::Service>,
11878 _: (),
11879 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11880 *out_ = ::core::mem::MaybeUninit::zeroed();
11881
11882 Ok(())
11883 }
11884 }
11885
11886 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Service, ___E> for &'a Service
11887 where
11888 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11889 {
11890 #[inline]
11891 fn encode(
11892 self,
11893 encoder_: &mut ___E,
11894 out_: &mut ::core::mem::MaybeUninit<crate::wire::Service>,
11895 _: (),
11896 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11897 ::fidl_next::munge! {
11898 let crate::wire::Service {
11899
11900 _empty,
11901
11902
11903 } = out_;
11904 }
11905
11906 Ok(())
11907 }
11908 }
11909
11910 unsafe impl<___E>
11911 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::Service>, ___E>
11912 for Service
11913 where
11914 ___E: ::fidl_next::Encoder + ?Sized,
11915 Service: ::fidl_next::Encode<crate::wire::Service, ___E>,
11916 {
11917 #[inline]
11918 fn encode_option(
11919 this: ::core::option::Option<Self>,
11920 encoder: &mut ___E,
11921 out: &mut ::core::mem::MaybeUninit<::fidl_next::WireBox<'static, crate::wire::Service>>,
11922 _: (),
11923 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11924 if let Some(inner) = this {
11925 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11926 ::fidl_next::WireBox::encode_present(out);
11927 } else {
11928 ::fidl_next::WireBox::encode_absent(out);
11929 }
11930
11931 Ok(())
11932 }
11933 }
11934
11935 unsafe impl<'a, ___E>
11936 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::Service>, ___E>
11937 for &'a Service
11938 where
11939 ___E: ::fidl_next::Encoder + ?Sized,
11940 &'a Service: ::fidl_next::Encode<crate::wire::Service, ___E>,
11941 {
11942 #[inline]
11943 fn encode_option(
11944 this: ::core::option::Option<Self>,
11945 encoder: &mut ___E,
11946 out: &mut ::core::mem::MaybeUninit<::fidl_next::WireBox<'static, crate::wire::Service>>,
11947 _: (),
11948 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11949 if let Some(inner) = this {
11950 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11951 ::fidl_next::WireBox::encode_present(out);
11952 } else {
11953 ::fidl_next::WireBox::encode_absent(out);
11954 }
11955
11956 Ok(())
11957 }
11958 }
11959
11960 impl ::fidl_next::FromWire<crate::wire::Service> for Service {
11961 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Service, Self> =
11962 unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11963
11964 #[inline]
11965 fn from_wire(wire: crate::wire::Service) -> Self {
11966 Self {}
11967 }
11968 }
11969
11970 impl ::fidl_next::FromWireRef<crate::wire::Service> for Service {
11971 #[inline]
11972 fn from_wire_ref(wire: &crate::wire::Service) -> Self {
11973 Self {}
11974 }
11975 }
11976
11977 #[derive(PartialEq, Clone, Debug)]
11978 pub struct SymlinkObject {
11979 pub target: ::std::vec::Vec<u8>,
11980 }
11981
11982 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E> for SymlinkObject
11983 where
11984 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11985 ___E: ::fidl_next::Encoder,
11986 {
11987 #[inline]
11988 fn encode(
11989 self,
11990 encoder_: &mut ___E,
11991 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
11992 _: (),
11993 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11994 ::fidl_next::munge! {
11995 let crate::wire::SymlinkObject {
11996 target,
11997
11998 } = out_;
11999 }
12000
12001 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
12002
12003 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
12004 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
12005
12006 Ok(())
12007 }
12008 }
12009
12010 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
12011 for &'a SymlinkObject
12012 where
12013 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12014 ___E: ::fidl_next::Encoder,
12015 {
12016 #[inline]
12017 fn encode(
12018 self,
12019 encoder_: &mut ___E,
12020 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
12021 _: (),
12022 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12023 ::fidl_next::munge! {
12024 let crate::wire::SymlinkObject {
12025
12026 target,
12027
12028 } = out_;
12029 }
12030
12031 ::fidl_next::Encode::encode(&self.target, encoder_, target, (4095, ()))?;
12032
12033 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
12034 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
12035
12036 Ok(())
12037 }
12038 }
12039
12040 unsafe impl<___E>
12041 ::fidl_next::EncodeOption<
12042 ::fidl_next::WireBox<'static, crate::wire::SymlinkObject<'static>>,
12043 ___E,
12044 > for SymlinkObject
12045 where
12046 ___E: ::fidl_next::Encoder + ?Sized,
12047 SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
12048 {
12049 #[inline]
12050 fn encode_option(
12051 this: ::core::option::Option<Self>,
12052 encoder: &mut ___E,
12053 out: &mut ::core::mem::MaybeUninit<
12054 ::fidl_next::WireBox<'static, crate::wire::SymlinkObject<'static>>,
12055 >,
12056 _: (),
12057 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12058 if let Some(inner) = this {
12059 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
12060 ::fidl_next::WireBox::encode_present(out);
12061 } else {
12062 ::fidl_next::WireBox::encode_absent(out);
12063 }
12064
12065 Ok(())
12066 }
12067 }
12068
12069 unsafe impl<'a, ___E>
12070 ::fidl_next::EncodeOption<
12071 ::fidl_next::WireBox<'static, crate::wire::SymlinkObject<'static>>,
12072 ___E,
12073 > for &'a SymlinkObject
12074 where
12075 ___E: ::fidl_next::Encoder + ?Sized,
12076 &'a SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
12077 {
12078 #[inline]
12079 fn encode_option(
12080 this: ::core::option::Option<Self>,
12081 encoder: &mut ___E,
12082 out: &mut ::core::mem::MaybeUninit<
12083 ::fidl_next::WireBox<'static, crate::wire::SymlinkObject<'static>>,
12084 >,
12085 _: (),
12086 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12087 if let Some(inner) = this {
12088 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
12089 ::fidl_next::WireBox::encode_present(out);
12090 } else {
12091 ::fidl_next::WireBox::encode_absent(out);
12092 }
12093
12094 Ok(())
12095 }
12096 }
12097
12098 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkObject<'de>> for SymlinkObject {
12099 #[inline]
12100 fn from_wire(wire: crate::wire::SymlinkObject<'de>) -> Self {
12101 Self { target: ::fidl_next::FromWire::from_wire(wire.target) }
12102 }
12103 }
12104
12105 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkObject<'de>> for SymlinkObject {
12106 #[inline]
12107 fn from_wire_ref(wire: &crate::wire::SymlinkObject<'de>) -> Self {
12108 Self { target: ::fidl_next::FromWireRef::from_wire_ref(&wire.target) }
12109 }
12110 }
12111
12112 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12113 #[repr(u8)]
12114 pub enum WatchEvent {
12115 Deleted = 0,
12116 Added = 1,
12117 Removed = 2,
12118 Existing = 3,
12119 Idle = 4,
12120 }
12121 impl ::core::convert::TryFrom<u8> for WatchEvent {
12122 type Error = ::fidl_next::UnknownStrictEnumMemberError;
12123 fn try_from(
12124 value: u8,
12125 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
12126 match value {
12127 0 => Ok(Self::Deleted),
12128 1 => Ok(Self::Added),
12129 2 => Ok(Self::Removed),
12130 3 => Ok(Self::Existing),
12131 4 => Ok(Self::Idle),
12132
12133 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
12134 }
12135 }
12136 }
12137
12138 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for WatchEvent
12139 where
12140 ___E: ?Sized,
12141 {
12142 #[inline]
12143 fn encode(
12144 self,
12145 encoder: &mut ___E,
12146 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
12147 _: (),
12148 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12149 ::fidl_next::Encode::encode(&self, encoder, out, ())
12150 }
12151 }
12152
12153 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for &'a WatchEvent
12154 where
12155 ___E: ?Sized,
12156 {
12157 #[inline]
12158 fn encode(
12159 self,
12160 encoder: &mut ___E,
12161 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
12162 _: (),
12163 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12164 ::fidl_next::munge!(let crate::wire::WatchEvent { value } = out);
12165 let _ = value.write(u8::from(match *self {
12166 WatchEvent::Deleted => 0,
12167
12168 WatchEvent::Added => 1,
12169
12170 WatchEvent::Removed => 2,
12171
12172 WatchEvent::Existing => 3,
12173
12174 WatchEvent::Idle => 4,
12175 }));
12176
12177 Ok(())
12178 }
12179 }
12180
12181 impl ::core::convert::From<crate::wire::WatchEvent> for WatchEvent {
12182 fn from(wire: crate::wire::WatchEvent) -> Self {
12183 match u8::from(wire.value) {
12184 0 => Self::Deleted,
12185
12186 1 => Self::Added,
12187
12188 2 => Self::Removed,
12189
12190 3 => Self::Existing,
12191
12192 4 => Self::Idle,
12193
12194 _ => unsafe { ::core::hint::unreachable_unchecked() },
12195 }
12196 }
12197 }
12198
12199 impl ::fidl_next::FromWire<crate::wire::WatchEvent> for WatchEvent {
12200 #[inline]
12201 fn from_wire(wire: crate::wire::WatchEvent) -> Self {
12202 Self::from(wire)
12203 }
12204 }
12205
12206 impl ::fidl_next::FromWireRef<crate::wire::WatchEvent> for WatchEvent {
12207 #[inline]
12208 fn from_wire_ref(wire: &crate::wire::WatchEvent) -> Self {
12209 Self::from(*wire)
12210 }
12211 }
12212}
12213
12214pub mod wire {
12215
12216 #[derive(Clone, Copy, Debug)]
12218 #[repr(transparent)]
12219 pub struct Operations {
12220 pub(crate) value: ::fidl_next::WireU64,
12221 }
12222
12223 unsafe impl ::fidl_next::Wire for Operations {
12224 type Owned<'de> = Self;
12225
12226 #[inline]
12227 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12228 }
12230 }
12231
12232 unsafe impl<___D> ::fidl_next::Decode<___D> for Operations
12233 where
12234 ___D: ?Sized,
12235 {
12236 fn decode(
12237 slot: ::fidl_next::Slot<'_, Self>,
12238 _: &mut ___D,
12239 _: (),
12240 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12241 ::fidl_next::munge!(let Self { value } = slot);
12242 let set = u64::from(*value);
12243 if set & !crate::natural::Operations::all().bits() != 0 {
12244 return Err(::fidl_next::DecodeError::InvalidBits {
12245 expected: crate::natural::Operations::all().bits() as usize,
12246 actual: set as usize,
12247 });
12248 }
12249
12250 Ok(())
12251 }
12252 }
12253
12254 impl ::core::convert::From<crate::natural::Operations> for Operations {
12255 fn from(natural: crate::natural::Operations) -> Self {
12256 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
12257 }
12258 }
12259
12260 impl ::fidl_next::IntoNatural for Operations {
12261 type Natural = crate::natural::Operations;
12262 }
12263
12264 impl ::fidl_next::Unconstrained for Operations {}
12265
12266 pub type Abilities = crate::wire::Operations;
12268
12269 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12271 #[repr(transparent)]
12272 pub struct SeekOrigin {
12273 pub(crate) value: ::fidl_next::WireU32,
12274 }
12275
12276 unsafe impl ::fidl_next::Wire for SeekOrigin {
12277 type Owned<'de> = Self;
12278
12279 #[inline]
12280 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12281 }
12283 }
12284
12285 impl SeekOrigin {
12286 pub const START: SeekOrigin = SeekOrigin { value: ::fidl_next::WireU32(0) };
12287
12288 pub const CURRENT: SeekOrigin = SeekOrigin { value: ::fidl_next::WireU32(1) };
12289
12290 pub const END: SeekOrigin = SeekOrigin { value: ::fidl_next::WireU32(2) };
12291 }
12292
12293 unsafe impl<___D> ::fidl_next::Decode<___D> for SeekOrigin
12294 where
12295 ___D: ?Sized,
12296 {
12297 fn decode(
12298 slot: ::fidl_next::Slot<'_, Self>,
12299 _: &mut ___D,
12300 _: (),
12301 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12302 ::fidl_next::munge!(let Self { value } = slot);
12303
12304 match u32::from(*value) {
12305 0 | 1 | 2 => (),
12306 unknown => {
12307 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
12308 }
12309 }
12310
12311 Ok(())
12312 }
12313 }
12314
12315 impl ::core::convert::From<crate::natural::SeekOrigin> for SeekOrigin {
12316 fn from(natural: crate::natural::SeekOrigin) -> Self {
12317 match natural {
12318 crate::natural::SeekOrigin::Start => SeekOrigin::START,
12319
12320 crate::natural::SeekOrigin::Current => SeekOrigin::CURRENT,
12321
12322 crate::natural::SeekOrigin::End => SeekOrigin::END,
12323 }
12324 }
12325 }
12326
12327 impl ::fidl_next::IntoNatural for SeekOrigin {
12328 type Natural = crate::natural::SeekOrigin;
12329 }
12330
12331 impl ::fidl_next::Unconstrained for SeekOrigin {}
12332
12333 #[derive(Clone, Debug)]
12335 #[repr(C)]
12336 pub struct AdvisoryLockRange {
12337 pub origin: crate::wire::SeekOrigin,
12338
12339 pub offset: ::fidl_next::WireI64,
12340
12341 pub length: ::fidl_next::WireI64,
12342 }
12343
12344 static_assertions::const_assert_eq!(std::mem::size_of::<AdvisoryLockRange>(), 24);
12345 static_assertions::const_assert_eq!(std::mem::align_of::<AdvisoryLockRange>(), 8);
12346
12347 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, origin), 0);
12348
12349 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, offset), 8);
12350
12351 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, length), 16);
12352
12353 unsafe impl ::fidl_next::Wire for AdvisoryLockRange {
12354 type Owned<'de> = AdvisoryLockRange;
12355
12356 #[inline]
12357 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12358 ::fidl_next::munge! {
12359 let Self {
12360
12361 origin,
12362 offset,
12363 length,
12364
12365 } = &mut *out_;
12366 }
12367
12368 ::fidl_next::Wire::zero_padding(origin);
12369
12370 ::fidl_next::Wire::zero_padding(offset);
12371
12372 ::fidl_next::Wire::zero_padding(length);
12373
12374 unsafe {
12375 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12376 }
12377 }
12378 }
12379
12380 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockRange
12381 where
12382 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12383 {
12384 fn decode(
12385 slot_: ::fidl_next::Slot<'_, Self>,
12386 decoder_: &mut ___D,
12387 _: (),
12388 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12389 if slot_.as_bytes()[4..8] != [0u8; 4] {
12390 return Err(::fidl_next::DecodeError::InvalidPadding);
12391 }
12392
12393 ::fidl_next::munge! {
12394 let Self {
12395
12396 mut origin,
12397 mut offset,
12398 mut length,
12399
12400 } = slot_;
12401 }
12402
12403 let _field = origin.as_mut();
12404
12405 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
12406
12407 let _field = offset.as_mut();
12408
12409 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
12410
12411 let _field = length.as_mut();
12412
12413 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
12414
12415 Ok(())
12416 }
12417 }
12418
12419 impl ::fidl_next::IntoNatural for AdvisoryLockRange {
12420 type Natural = crate::natural::AdvisoryLockRange;
12421 }
12422
12423 impl ::fidl_next::Unconstrained for AdvisoryLockRange {}
12424
12425 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12427 #[repr(transparent)]
12428 pub struct AdvisoryLockType {
12429 pub(crate) value: ::fidl_next::WireU32,
12430 }
12431
12432 unsafe impl ::fidl_next::Wire for AdvisoryLockType {
12433 type Owned<'de> = Self;
12434
12435 #[inline]
12436 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12437 }
12439 }
12440
12441 impl AdvisoryLockType {
12442 pub const READ: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::WireU32(1) };
12443
12444 pub const WRITE: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::WireU32(2) };
12445
12446 pub const UNLOCK: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::WireU32(3) };
12447 }
12448
12449 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockType
12450 where
12451 ___D: ?Sized,
12452 {
12453 fn decode(
12454 slot: ::fidl_next::Slot<'_, Self>,
12455 _: &mut ___D,
12456 _: (),
12457 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12458 ::fidl_next::munge!(let Self { value } = slot);
12459
12460 match u32::from(*value) {
12461 1 | 2 | 3 => (),
12462 unknown => {
12463 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
12464 }
12465 }
12466
12467 Ok(())
12468 }
12469 }
12470
12471 impl ::core::convert::From<crate::natural::AdvisoryLockType> for AdvisoryLockType {
12472 fn from(natural: crate::natural::AdvisoryLockType) -> Self {
12473 match natural {
12474 crate::natural::AdvisoryLockType::Read => AdvisoryLockType::READ,
12475
12476 crate::natural::AdvisoryLockType::Write => AdvisoryLockType::WRITE,
12477
12478 crate::natural::AdvisoryLockType::Unlock => AdvisoryLockType::UNLOCK,
12479 }
12480 }
12481 }
12482
12483 impl ::fidl_next::IntoNatural for AdvisoryLockType {
12484 type Natural = crate::natural::AdvisoryLockType;
12485 }
12486
12487 impl ::fidl_next::Unconstrained for AdvisoryLockType {}
12488
12489 #[repr(C)]
12491 pub struct AdvisoryLockRequest<'de> {
12492 pub(crate) table: ::fidl_next::WireTable<'de>,
12493 }
12494
12495 impl<'de> Drop for AdvisoryLockRequest<'de> {
12496 fn drop(&mut self) {
12497 let _ = self.table.get(1).map(|envelope| unsafe {
12498 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
12499 });
12500
12501 let _ = self.table.get(2).map(|envelope| unsafe {
12502 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
12503 });
12504
12505 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
12506 }
12507 }
12508
12509 unsafe impl ::fidl_next::Wire for AdvisoryLockRequest<'static> {
12510 type Owned<'de> = AdvisoryLockRequest<'de>;
12511
12512 #[inline]
12513 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12514 ::fidl_next::munge!(let Self { table } = out);
12515 ::fidl_next::WireTable::zero_padding(table);
12516 }
12517 }
12518
12519 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockRequest<'static>
12520 where
12521 ___D: ::fidl_next::Decoder + ?Sized,
12522 {
12523 fn decode(
12524 slot: ::fidl_next::Slot<'_, Self>,
12525 decoder: &mut ___D,
12526 _: (),
12527 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12528 ::fidl_next::munge!(let Self { table } = slot);
12529
12530 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12531 match ordinal {
12532 0 => unsafe { ::core::hint::unreachable_unchecked() },
12533
12534 1 => {
12535 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::AdvisoryLockType>(
12536 slot.as_mut(),
12537 decoder,
12538 (),
12539 )?;
12540
12541 Ok(())
12542 }
12543
12544 2 => {
12545 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::AdvisoryLockRange>(
12546 slot.as_mut(),
12547 decoder,
12548 (),
12549 )?;
12550
12551 Ok(())
12552 }
12553
12554 3 => {
12555 ::fidl_next::WireEnvelope::decode_as::<___D, bool>(
12556 slot.as_mut(),
12557 decoder,
12558 (),
12559 )?;
12560
12561 Ok(())
12562 }
12563
12564 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
12565 }
12566 })
12567 }
12568 }
12569
12570 impl<'de> AdvisoryLockRequest<'de> {
12571 pub fn type_(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockType> {
12572 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12573 }
12574
12575 pub fn range(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockRange> {
12576 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12577 }
12578
12579 pub fn wait(&self) -> ::core::option::Option<&bool> {
12580 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
12581 }
12582 }
12583
12584 impl<'de> ::core::fmt::Debug for AdvisoryLockRequest<'de> {
12585 fn fmt(
12586 &self,
12587 f: &mut ::core::fmt::Formatter<'_>,
12588 ) -> ::core::result::Result<(), ::core::fmt::Error> {
12589 f.debug_struct("AdvisoryLockRequest")
12590 .field("type_", &self.type_())
12591 .field("range", &self.range())
12592 .field("wait", &self.wait())
12593 .finish()
12594 }
12595 }
12596
12597 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockRequest<'de> {
12598 type Natural = crate::natural::AdvisoryLockRequest;
12599 }
12600
12601 impl ::fidl_next::Unconstrained for AdvisoryLockRequest<'_> {}
12602
12603 #[derive(Debug)]
12605 #[repr(C)]
12606 pub struct AdvisoryLockingAdvisoryLockRequest<'de> {
12607 pub request: crate::wire::AdvisoryLockRequest<'de>,
12608 }
12609
12610 static_assertions::const_assert_eq!(
12611 std::mem::size_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
12612 16
12613 );
12614 static_assertions::const_assert_eq!(
12615 std::mem::align_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
12616 8
12617 );
12618
12619 static_assertions::const_assert_eq!(
12620 std::mem::offset_of!(AdvisoryLockingAdvisoryLockRequest<'_>, request),
12621 0
12622 );
12623
12624 unsafe impl ::fidl_next::Wire for AdvisoryLockingAdvisoryLockRequest<'static> {
12625 type Owned<'de> = AdvisoryLockingAdvisoryLockRequest<'de>;
12626
12627 #[inline]
12628 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12629 ::fidl_next::munge! {
12630 let Self {
12631
12632 request,
12633
12634 } = &mut *out_;
12635 }
12636
12637 ::fidl_next::Wire::zero_padding(request);
12638 }
12639 }
12640
12641 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockingAdvisoryLockRequest<'static>
12642 where
12643 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12644 ___D: ::fidl_next::Decoder,
12645 {
12646 fn decode(
12647 slot_: ::fidl_next::Slot<'_, Self>,
12648 decoder_: &mut ___D,
12649 _: (),
12650 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12651 ::fidl_next::munge! {
12652 let Self {
12653
12654 mut request,
12655
12656 } = slot_;
12657 }
12658
12659 let _field = request.as_mut();
12660
12661 ::fidl_next::Decode::decode(request.as_mut(), decoder_, ())?;
12662
12663 Ok(())
12664 }
12665 }
12666
12667 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockingAdvisoryLockRequest<'de> {
12668 type Natural = crate::natural::AdvisoryLockingAdvisoryLockRequest;
12669 }
12670
12671 impl ::fidl_next::Unconstrained for AdvisoryLockingAdvisoryLockRequest<'static> {}
12672
12673 #[derive(Clone, Debug)]
12675 #[repr(C)]
12676 pub struct AdvisoryLockingAdvisoryLockResponse {
12677 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
12678 }
12679
12680 static_assertions::const_assert_eq!(
12681 std::mem::size_of::<AdvisoryLockingAdvisoryLockResponse>(),
12682 1
12683 );
12684 static_assertions::const_assert_eq!(
12685 std::mem::align_of::<AdvisoryLockingAdvisoryLockResponse>(),
12686 1
12687 );
12688
12689 unsafe impl ::fidl_next::Wire for AdvisoryLockingAdvisoryLockResponse {
12690 type Owned<'de> = AdvisoryLockingAdvisoryLockResponse;
12691
12692 #[inline]
12693 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12694 ::fidl_next::munge! {
12695 let Self {
12696
12697 _empty,
12698
12699
12700 } = &mut *out_;
12701 }
12702 }
12703 }
12704
12705 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockingAdvisoryLockResponse
12706 where
12707 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12708 {
12709 fn decode(
12710 slot_: ::fidl_next::Slot<'_, Self>,
12711 decoder_: &mut ___D,
12712 _: (),
12713 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12714 ::fidl_next::munge! {
12715 let Self {
12716
12717 mut _empty,
12718
12719
12720 } = slot_;
12721 }
12722
12723 if _empty.as_bytes() != &[0u8] {
12724 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
12725 }
12726
12727 Ok(())
12728 }
12729 }
12730
12731 impl ::fidl_next::IntoNatural for AdvisoryLockingAdvisoryLockResponse {
12732 type Natural = crate::natural::AdvisoryLockingAdvisoryLockResponse;
12733 }
12734
12735 impl ::fidl_next::Unconstrained for AdvisoryLockingAdvisoryLockResponse {}
12736
12737 #[derive(Clone, Copy, Debug)]
12739 #[repr(transparent)]
12740 pub struct AllocateMode {
12741 pub(crate) value: ::fidl_next::WireU32,
12742 }
12743
12744 unsafe impl ::fidl_next::Wire for AllocateMode {
12745 type Owned<'de> = Self;
12746
12747 #[inline]
12748 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12749 }
12751 }
12752
12753 unsafe impl<___D> ::fidl_next::Decode<___D> for AllocateMode
12754 where
12755 ___D: ?Sized,
12756 {
12757 fn decode(
12758 slot: ::fidl_next::Slot<'_, Self>,
12759 _: &mut ___D,
12760 _: (),
12761 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12762 Ok(())
12763 }
12764 }
12765
12766 impl ::core::convert::From<crate::natural::AllocateMode> for AllocateMode {
12767 fn from(natural: crate::natural::AllocateMode) -> Self {
12768 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
12769 }
12770 }
12771
12772 impl ::fidl_next::IntoNatural for AllocateMode {
12773 type Natural = crate::natural::AllocateMode;
12774 }
12775
12776 impl ::fidl_next::Unconstrained for AllocateMode {}
12777
12778 pub type Rights = crate::wire::Operations;
12780
12781 pub type Id = ::fidl_next::WireU64;
12783
12784 #[derive(Clone, Copy, Debug)]
12786 #[repr(transparent)]
12787 pub struct OpenFlags {
12788 pub(crate) value: ::fidl_next::WireU32,
12789 }
12790
12791 unsafe impl ::fidl_next::Wire for OpenFlags {
12792 type Owned<'de> = Self;
12793
12794 #[inline]
12795 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12796 }
12798 }
12799
12800 unsafe impl<___D> ::fidl_next::Decode<___D> for OpenFlags
12801 where
12802 ___D: ?Sized,
12803 {
12804 fn decode(
12805 slot: ::fidl_next::Slot<'_, Self>,
12806 _: &mut ___D,
12807 _: (),
12808 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12809 ::fidl_next::munge!(let Self { value } = slot);
12810 let set = u32::from(*value);
12811 if set & !crate::natural::OpenFlags::all().bits() != 0 {
12812 return Err(::fidl_next::DecodeError::InvalidBits {
12813 expected: crate::natural::OpenFlags::all().bits() as usize,
12814 actual: set as usize,
12815 });
12816 }
12817
12818 Ok(())
12819 }
12820 }
12821
12822 impl ::core::convert::From<crate::natural::OpenFlags> for OpenFlags {
12823 fn from(natural: crate::natural::OpenFlags) -> Self {
12824 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
12825 }
12826 }
12827
12828 impl ::fidl_next::IntoNatural for OpenFlags {
12829 type Natural = crate::natural::OpenFlags;
12830 }
12831
12832 impl ::fidl_next::Unconstrained for OpenFlags {}
12833
12834 #[derive(Clone, Debug)]
12836 #[repr(C)]
12837 pub struct NodeAttributes {
12838 pub mode: ::fidl_next::WireU32,
12839
12840 pub id: ::fidl_next::WireU64,
12841
12842 pub content_size: ::fidl_next::WireU64,
12843
12844 pub storage_size: ::fidl_next::WireU64,
12845
12846 pub link_count: ::fidl_next::WireU64,
12847
12848 pub creation_time: ::fidl_next::WireU64,
12849
12850 pub modification_time: ::fidl_next::WireU64,
12851 }
12852
12853 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes>(), 56);
12854 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes>(), 8);
12855
12856 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, mode), 0);
12857
12858 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, id), 8);
12859
12860 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, content_size), 16);
12861
12862 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, storage_size), 24);
12863
12864 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, link_count), 32);
12865
12866 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, creation_time), 40);
12867
12868 static_assertions::const_assert_eq!(
12869 std::mem::offset_of!(NodeAttributes, modification_time),
12870 48
12871 );
12872
12873 unsafe impl ::fidl_next::Wire for NodeAttributes {
12874 type Owned<'de> = NodeAttributes;
12875
12876 #[inline]
12877 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12878 ::fidl_next::munge! {
12879 let Self {
12880
12881 mode,
12882 id,
12883 content_size,
12884 storage_size,
12885 link_count,
12886 creation_time,
12887 modification_time,
12888
12889 } = &mut *out_;
12890 }
12891
12892 ::fidl_next::Wire::zero_padding(mode);
12893
12894 ::fidl_next::Wire::zero_padding(id);
12895
12896 ::fidl_next::Wire::zero_padding(content_size);
12897
12898 ::fidl_next::Wire::zero_padding(storage_size);
12899
12900 ::fidl_next::Wire::zero_padding(link_count);
12901
12902 ::fidl_next::Wire::zero_padding(creation_time);
12903
12904 ::fidl_next::Wire::zero_padding(modification_time);
12905
12906 unsafe {
12907 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12908 }
12909 }
12910 }
12911
12912 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributes
12913 where
12914 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12915 {
12916 fn decode(
12917 slot_: ::fidl_next::Slot<'_, Self>,
12918 decoder_: &mut ___D,
12919 _: (),
12920 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12921 if slot_.as_bytes()[4..8] != [0u8; 4] {
12922 return Err(::fidl_next::DecodeError::InvalidPadding);
12923 }
12924
12925 ::fidl_next::munge! {
12926 let Self {
12927
12928 mut mode,
12929 mut id,
12930 mut content_size,
12931 mut storage_size,
12932 mut link_count,
12933 mut creation_time,
12934 mut modification_time,
12935
12936 } = slot_;
12937 }
12938
12939 let _field = mode.as_mut();
12940
12941 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
12942
12943 let _field = id.as_mut();
12944
12945 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
12946
12947 let _field = content_size.as_mut();
12948
12949 ::fidl_next::Decode::decode(content_size.as_mut(), decoder_, ())?;
12950
12951 let _field = storage_size.as_mut();
12952
12953 ::fidl_next::Decode::decode(storage_size.as_mut(), decoder_, ())?;
12954
12955 let _field = link_count.as_mut();
12956
12957 ::fidl_next::Decode::decode(link_count.as_mut(), decoder_, ())?;
12958
12959 let _field = creation_time.as_mut();
12960
12961 ::fidl_next::Decode::decode(creation_time.as_mut(), decoder_, ())?;
12962
12963 let _field = modification_time.as_mut();
12964
12965 ::fidl_next::Decode::decode(modification_time.as_mut(), decoder_, ())?;
12966
12967 Ok(())
12968 }
12969 }
12970
12971 impl ::fidl_next::IntoNatural for NodeAttributes {
12972 type Natural = crate::natural::NodeAttributes;
12973 }
12974
12975 impl ::fidl_next::Unconstrained for NodeAttributes {}
12976
12977 #[derive(Clone, Copy, Debug)]
12979 #[repr(transparent)]
12980 pub struct NodeAttributeFlags {
12981 pub(crate) value: ::fidl_next::WireU32,
12982 }
12983
12984 unsafe impl ::fidl_next::Wire for NodeAttributeFlags {
12985 type Owned<'de> = Self;
12986
12987 #[inline]
12988 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12989 }
12991 }
12992
12993 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributeFlags
12994 where
12995 ___D: ?Sized,
12996 {
12997 fn decode(
12998 slot: ::fidl_next::Slot<'_, Self>,
12999 _: &mut ___D,
13000 _: (),
13001 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13002 ::fidl_next::munge!(let Self { value } = slot);
13003 let set = u32::from(*value);
13004 if set & !crate::natural::NodeAttributeFlags::all().bits() != 0 {
13005 return Err(::fidl_next::DecodeError::InvalidBits {
13006 expected: crate::natural::NodeAttributeFlags::all().bits() as usize,
13007 actual: set as usize,
13008 });
13009 }
13010
13011 Ok(())
13012 }
13013 }
13014
13015 impl ::core::convert::From<crate::natural::NodeAttributeFlags> for NodeAttributeFlags {
13016 fn from(natural: crate::natural::NodeAttributeFlags) -> Self {
13017 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
13018 }
13019 }
13020
13021 impl ::fidl_next::IntoNatural for NodeAttributeFlags {
13022 type Natural = crate::natural::NodeAttributeFlags;
13023 }
13024
13025 impl ::fidl_next::Unconstrained for NodeAttributeFlags {}
13026
13027 #[derive(Debug)]
13029 #[repr(C)]
13030 pub struct NodeQueryFilesystemResponse<'de> {
13031 pub s: ::fidl_next::WireI32,
13032
13033 pub info: ::fidl_next::WireBox<'de, crate::wire::FilesystemInfo>,
13034 }
13035
13036 static_assertions::const_assert_eq!(std::mem::size_of::<NodeQueryFilesystemResponse<'_>>(), 16);
13037 static_assertions::const_assert_eq!(std::mem::align_of::<NodeQueryFilesystemResponse<'_>>(), 8);
13038
13039 static_assertions::const_assert_eq!(
13040 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, s),
13041 0
13042 );
13043
13044 static_assertions::const_assert_eq!(
13045 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, info),
13046 8
13047 );
13048
13049 unsafe impl ::fidl_next::Wire for NodeQueryFilesystemResponse<'static> {
13050 type Owned<'de> = NodeQueryFilesystemResponse<'de>;
13051
13052 #[inline]
13053 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13054 ::fidl_next::munge! {
13055 let Self {
13056
13057 s,
13058 info,
13059
13060 } = &mut *out_;
13061 }
13062
13063 ::fidl_next::Wire::zero_padding(s);
13064
13065 ::fidl_next::Wire::zero_padding(info);
13066
13067 unsafe {
13068 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
13069 }
13070 }
13071 }
13072
13073 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeQueryFilesystemResponse<'static>
13074 where
13075 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13076 ___D: ::fidl_next::Decoder,
13077 {
13078 fn decode(
13079 slot_: ::fidl_next::Slot<'_, Self>,
13080 decoder_: &mut ___D,
13081 _: (),
13082 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13083 if slot_.as_bytes()[4..8] != [0u8; 4] {
13084 return Err(::fidl_next::DecodeError::InvalidPadding);
13085 }
13086
13087 ::fidl_next::munge! {
13088 let Self {
13089
13090 mut s,
13091 mut info,
13092
13093 } = slot_;
13094 }
13095
13096 let _field = s.as_mut();
13097
13098 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13099
13100 let _field = info.as_mut();
13101
13102 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
13103
13104 Ok(())
13105 }
13106 }
13107
13108 impl<'de> ::fidl_next::IntoNatural for NodeQueryFilesystemResponse<'de> {
13109 type Natural = crate::natural::NodeQueryFilesystemResponse;
13110 }
13111
13112 impl ::fidl_next::Unconstrained for NodeQueryFilesystemResponse<'static> {}
13113
13114 #[derive(Clone, Debug)]
13116 #[repr(C)]
13117 pub struct NodeUpdateAttributesResponse {
13118 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
13119 }
13120
13121 static_assertions::const_assert_eq!(std::mem::size_of::<NodeUpdateAttributesResponse>(), 1);
13122 static_assertions::const_assert_eq!(std::mem::align_of::<NodeUpdateAttributesResponse>(), 1);
13123
13124 unsafe impl ::fidl_next::Wire for NodeUpdateAttributesResponse {
13125 type Owned<'de> = NodeUpdateAttributesResponse;
13126
13127 #[inline]
13128 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13129 ::fidl_next::munge! {
13130 let Self {
13131
13132 _empty,
13133
13134
13135 } = &mut *out_;
13136 }
13137 }
13138 }
13139
13140 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeUpdateAttributesResponse
13141 where
13142 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13143 {
13144 fn decode(
13145 slot_: ::fidl_next::Slot<'_, Self>,
13146 decoder_: &mut ___D,
13147 _: (),
13148 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13149 ::fidl_next::munge! {
13150 let Self {
13151
13152 mut _empty,
13153
13154
13155 } = slot_;
13156 }
13157
13158 if _empty.as_bytes() != &[0u8] {
13159 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
13160 }
13161
13162 Ok(())
13163 }
13164 }
13165
13166 impl ::fidl_next::IntoNatural for NodeUpdateAttributesResponse {
13167 type Natural = crate::natural::NodeUpdateAttributesResponse;
13168 }
13169
13170 impl ::fidl_next::Unconstrained for NodeUpdateAttributesResponse {}
13171
13172 #[derive(Clone, Debug)]
13174 #[repr(C)]
13175 pub struct NodeSyncResponse {
13176 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
13177 }
13178
13179 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSyncResponse>(), 1);
13180 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSyncResponse>(), 1);
13181
13182 unsafe impl ::fidl_next::Wire for NodeSyncResponse {
13183 type Owned<'de> = NodeSyncResponse;
13184
13185 #[inline]
13186 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13187 ::fidl_next::munge! {
13188 let Self {
13189
13190 _empty,
13191
13192
13193 } = &mut *out_;
13194 }
13195 }
13196 }
13197
13198 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSyncResponse
13199 where
13200 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13201 {
13202 fn decode(
13203 slot_: ::fidl_next::Slot<'_, Self>,
13204 decoder_: &mut ___D,
13205 _: (),
13206 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13207 ::fidl_next::munge! {
13208 let Self {
13209
13210 mut _empty,
13211
13212
13213 } = slot_;
13214 }
13215
13216 if _empty.as_bytes() != &[0u8] {
13217 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
13218 }
13219
13220 Ok(())
13221 }
13222 }
13223
13224 impl ::fidl_next::IntoNatural for NodeSyncResponse {
13225 type Natural = crate::natural::NodeSyncResponse;
13226 }
13227
13228 impl ::fidl_next::Unconstrained for NodeSyncResponse {}
13229
13230 #[derive(Clone, Copy, Debug)]
13232 #[repr(transparent)]
13233 pub struct ModeType {
13234 pub(crate) value: ::fidl_next::WireU32,
13235 }
13236
13237 unsafe impl ::fidl_next::Wire for ModeType {
13238 type Owned<'de> = Self;
13239
13240 #[inline]
13241 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13242 }
13244 }
13245
13246 unsafe impl<___D> ::fidl_next::Decode<___D> for ModeType
13247 where
13248 ___D: ?Sized,
13249 {
13250 fn decode(
13251 slot: ::fidl_next::Slot<'_, Self>,
13252 _: &mut ___D,
13253 _: (),
13254 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13255 ::fidl_next::munge!(let Self { value } = slot);
13256 let set = u32::from(*value);
13257 if set & !crate::natural::ModeType::all().bits() != 0 {
13258 return Err(::fidl_next::DecodeError::InvalidBits {
13259 expected: crate::natural::ModeType::all().bits() as usize,
13260 actual: set as usize,
13261 });
13262 }
13263
13264 Ok(())
13265 }
13266 }
13267
13268 impl ::core::convert::From<crate::natural::ModeType> for ModeType {
13269 fn from(natural: crate::natural::ModeType) -> Self {
13270 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
13271 }
13272 }
13273
13274 impl ::fidl_next::IntoNatural for ModeType {
13275 type Natural = crate::natural::ModeType;
13276 }
13277
13278 impl ::fidl_next::Unconstrained for ModeType {}
13279
13280 pub type Path<'de> = ::fidl_next::WireString<'de>;
13282
13283 #[derive(Clone, Debug)]
13285 #[repr(C)]
13286 pub struct DirectoryReadDirentsRequest {
13287 pub max_bytes: ::fidl_next::WireU64,
13288 }
13289
13290 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryReadDirentsRequest>(), 8);
13291 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryReadDirentsRequest>(), 8);
13292
13293 static_assertions::const_assert_eq!(
13294 std::mem::offset_of!(DirectoryReadDirentsRequest, max_bytes),
13295 0
13296 );
13297
13298 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsRequest {
13299 type Owned<'de> = DirectoryReadDirentsRequest;
13300
13301 #[inline]
13302 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13303 ::fidl_next::munge! {
13304 let Self {
13305
13306 max_bytes,
13307
13308 } = &mut *out_;
13309 }
13310
13311 ::fidl_next::Wire::zero_padding(max_bytes);
13312 }
13313 }
13314
13315 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsRequest
13316 where
13317 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13318 {
13319 fn decode(
13320 slot_: ::fidl_next::Slot<'_, Self>,
13321 decoder_: &mut ___D,
13322 _: (),
13323 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13324 ::fidl_next::munge! {
13325 let Self {
13326
13327 mut max_bytes,
13328
13329 } = slot_;
13330 }
13331
13332 let _field = max_bytes.as_mut();
13333
13334 ::fidl_next::Decode::decode(max_bytes.as_mut(), decoder_, ())?;
13335
13336 Ok(())
13337 }
13338 }
13339
13340 impl ::fidl_next::IntoNatural for DirectoryReadDirentsRequest {
13341 type Natural = crate::natural::DirectoryReadDirentsRequest;
13342 }
13343
13344 impl ::fidl_next::Unconstrained for DirectoryReadDirentsRequest {}
13345
13346 #[derive(Debug)]
13348 #[repr(C)]
13349 pub struct DirectoryReadDirentsResponse<'de> {
13350 pub s: ::fidl_next::WireI32,
13351
13352 pub dirents: ::fidl_next::WireVector<'de, u8>,
13353 }
13354
13355 static_assertions::const_assert_eq!(
13356 std::mem::size_of::<DirectoryReadDirentsResponse<'_>>(),
13357 24
13358 );
13359 static_assertions::const_assert_eq!(
13360 std::mem::align_of::<DirectoryReadDirentsResponse<'_>>(),
13361 8
13362 );
13363
13364 static_assertions::const_assert_eq!(
13365 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, s),
13366 0
13367 );
13368
13369 static_assertions::const_assert_eq!(
13370 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, dirents),
13371 8
13372 );
13373
13374 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsResponse<'static> {
13375 type Owned<'de> = DirectoryReadDirentsResponse<'de>;
13376
13377 #[inline]
13378 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13379 ::fidl_next::munge! {
13380 let Self {
13381
13382 s,
13383 dirents,
13384
13385 } = &mut *out_;
13386 }
13387
13388 ::fidl_next::Wire::zero_padding(s);
13389
13390 ::fidl_next::Wire::zero_padding(dirents);
13391
13392 unsafe {
13393 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
13394 }
13395 }
13396 }
13397
13398 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsResponse<'static>
13399 where
13400 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13401 ___D: ::fidl_next::Decoder,
13402 {
13403 fn decode(
13404 slot_: ::fidl_next::Slot<'_, Self>,
13405 decoder_: &mut ___D,
13406 _: (),
13407 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13408 if slot_.as_bytes()[4..8] != [0u8; 4] {
13409 return Err(::fidl_next::DecodeError::InvalidPadding);
13410 }
13411
13412 ::fidl_next::munge! {
13413 let Self {
13414
13415 mut s,
13416 mut dirents,
13417
13418 } = slot_;
13419 }
13420
13421 let _field = s.as_mut();
13422
13423 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13424
13425 let _field = dirents.as_mut();
13426 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
13427 ::fidl_next::Decode::decode(dirents.as_mut(), decoder_, (8192, ()))?;
13428
13429 let dirents = unsafe { dirents.deref_unchecked() };
13430
13431 if dirents.len() > 8192 {
13432 return Err(::fidl_next::DecodeError::VectorTooLong {
13433 size: dirents.len() as u64,
13434 limit: 8192,
13435 });
13436 }
13437
13438 Ok(())
13439 }
13440 }
13441
13442 impl<'de> ::fidl_next::IntoNatural for DirectoryReadDirentsResponse<'de> {
13443 type Natural = crate::natural::DirectoryReadDirentsResponse;
13444 }
13445
13446 impl ::fidl_next::Unconstrained for DirectoryReadDirentsResponse<'static> {}
13447
13448 #[derive(Clone, Debug)]
13450 #[repr(C)]
13451 pub struct DirectoryRewindResponse {
13452 pub s: ::fidl_next::WireI32,
13453 }
13454
13455 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRewindResponse>(), 4);
13456 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRewindResponse>(), 4);
13457
13458 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRewindResponse, s), 0);
13459
13460 unsafe impl ::fidl_next::Wire for DirectoryRewindResponse {
13461 type Owned<'de> = DirectoryRewindResponse;
13462
13463 #[inline]
13464 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13465 ::fidl_next::munge! {
13466 let Self {
13467
13468 s,
13469
13470 } = &mut *out_;
13471 }
13472
13473 ::fidl_next::Wire::zero_padding(s);
13474 }
13475 }
13476
13477 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRewindResponse
13478 where
13479 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13480 {
13481 fn decode(
13482 slot_: ::fidl_next::Slot<'_, Self>,
13483 decoder_: &mut ___D,
13484 _: (),
13485 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13486 ::fidl_next::munge! {
13487 let Self {
13488
13489 mut s,
13490
13491 } = slot_;
13492 }
13493
13494 let _field = s.as_mut();
13495
13496 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13497
13498 Ok(())
13499 }
13500 }
13501
13502 impl ::fidl_next::IntoNatural for DirectoryRewindResponse {
13503 type Natural = crate::natural::DirectoryRewindResponse;
13504 }
13505
13506 impl ::fidl_next::Unconstrained for DirectoryRewindResponse {}
13507
13508 pub type Name<'de> = ::fidl_next::WireString<'de>;
13510
13511 #[derive(Clone, Debug)]
13513 #[repr(C)]
13514 pub struct DirectoryLinkResponse {
13515 pub s: ::fidl_next::WireI32,
13516 }
13517
13518 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkResponse>(), 4);
13519 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkResponse>(), 4);
13520
13521 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkResponse, s), 0);
13522
13523 unsafe impl ::fidl_next::Wire for DirectoryLinkResponse {
13524 type Owned<'de> = DirectoryLinkResponse;
13525
13526 #[inline]
13527 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13528 ::fidl_next::munge! {
13529 let Self {
13530
13531 s,
13532
13533 } = &mut *out_;
13534 }
13535
13536 ::fidl_next::Wire::zero_padding(s);
13537 }
13538 }
13539
13540 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryLinkResponse
13541 where
13542 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13543 {
13544 fn decode(
13545 slot_: ::fidl_next::Slot<'_, Self>,
13546 decoder_: &mut ___D,
13547 _: (),
13548 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13549 ::fidl_next::munge! {
13550 let Self {
13551
13552 mut s,
13553
13554 } = slot_;
13555 }
13556
13557 let _field = s.as_mut();
13558
13559 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13560
13561 Ok(())
13562 }
13563 }
13564
13565 impl ::fidl_next::IntoNatural for DirectoryLinkResponse {
13566 type Natural = crate::natural::DirectoryLinkResponse;
13567 }
13568
13569 impl ::fidl_next::Unconstrained for DirectoryLinkResponse {}
13570
13571 #[derive(Clone, Copy, Debug)]
13573 #[repr(transparent)]
13574 pub struct UnlinkFlags {
13575 pub(crate) value: ::fidl_next::WireU64,
13576 }
13577
13578 unsafe impl ::fidl_next::Wire for UnlinkFlags {
13579 type Owned<'de> = Self;
13580
13581 #[inline]
13582 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13583 }
13585 }
13586
13587 unsafe impl<___D> ::fidl_next::Decode<___D> for UnlinkFlags
13588 where
13589 ___D: ?Sized,
13590 {
13591 fn decode(
13592 slot: ::fidl_next::Slot<'_, Self>,
13593 _: &mut ___D,
13594 _: (),
13595 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13596 Ok(())
13597 }
13598 }
13599
13600 impl ::core::convert::From<crate::natural::UnlinkFlags> for UnlinkFlags {
13601 fn from(natural: crate::natural::UnlinkFlags) -> Self {
13602 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
13603 }
13604 }
13605
13606 impl ::fidl_next::IntoNatural for UnlinkFlags {
13607 type Natural = crate::natural::UnlinkFlags;
13608 }
13609
13610 impl ::fidl_next::Unconstrained for UnlinkFlags {}
13611
13612 #[repr(C)]
13614 pub struct UnlinkOptions<'de> {
13615 pub(crate) table: ::fidl_next::WireTable<'de>,
13616 }
13617
13618 impl<'de> Drop for UnlinkOptions<'de> {
13619 fn drop(&mut self) {
13620 let _ = self
13621 .table
13622 .get(1)
13623 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::UnlinkFlags>() });
13624 }
13625 }
13626
13627 unsafe impl ::fidl_next::Wire for UnlinkOptions<'static> {
13628 type Owned<'de> = UnlinkOptions<'de>;
13629
13630 #[inline]
13631 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13632 ::fidl_next::munge!(let Self { table } = out);
13633 ::fidl_next::WireTable::zero_padding(table);
13634 }
13635 }
13636
13637 unsafe impl<___D> ::fidl_next::Decode<___D> for UnlinkOptions<'static>
13638 where
13639 ___D: ::fidl_next::Decoder + ?Sized,
13640 {
13641 fn decode(
13642 slot: ::fidl_next::Slot<'_, Self>,
13643 decoder: &mut ___D,
13644 _: (),
13645 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13646 ::fidl_next::munge!(let Self { table } = slot);
13647
13648 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13649 match ordinal {
13650 0 => unsafe { ::core::hint::unreachable_unchecked() },
13651
13652 1 => {
13653 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::UnlinkFlags>(
13654 slot.as_mut(),
13655 decoder,
13656 (),
13657 )?;
13658
13659 Ok(())
13660 }
13661
13662 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
13663 }
13664 })
13665 }
13666 }
13667
13668 impl<'de> UnlinkOptions<'de> {
13669 pub fn flags(&self) -> ::core::option::Option<&crate::wire::UnlinkFlags> {
13670 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13671 }
13672 }
13673
13674 impl<'de> ::core::fmt::Debug for UnlinkOptions<'de> {
13675 fn fmt(
13676 &self,
13677 f: &mut ::core::fmt::Formatter<'_>,
13678 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13679 f.debug_struct("UnlinkOptions").field("flags", &self.flags()).finish()
13680 }
13681 }
13682
13683 impl<'de> ::fidl_next::IntoNatural for UnlinkOptions<'de> {
13684 type Natural = crate::natural::UnlinkOptions;
13685 }
13686
13687 impl ::fidl_next::Unconstrained for UnlinkOptions<'_> {}
13688
13689 #[derive(Debug)]
13691 #[repr(C)]
13692 pub struct DirectoryUnlinkRequest<'de> {
13693 pub name: ::fidl_next::WireString<'de>,
13694
13695 pub options: crate::wire::UnlinkOptions<'de>,
13696 }
13697
13698 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryUnlinkRequest<'_>>(), 32);
13699 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryUnlinkRequest<'_>>(), 8);
13700
13701 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryUnlinkRequest<'_>, name), 0);
13702
13703 static_assertions::const_assert_eq!(
13704 std::mem::offset_of!(DirectoryUnlinkRequest<'_>, options),
13705 16
13706 );
13707
13708 unsafe impl ::fidl_next::Wire for DirectoryUnlinkRequest<'static> {
13709 type Owned<'de> = DirectoryUnlinkRequest<'de>;
13710
13711 #[inline]
13712 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13713 ::fidl_next::munge! {
13714 let Self {
13715
13716 name,
13717 options,
13718
13719 } = &mut *out_;
13720 }
13721
13722 ::fidl_next::Wire::zero_padding(name);
13723
13724 ::fidl_next::Wire::zero_padding(options);
13725 }
13726 }
13727
13728 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryUnlinkRequest<'static>
13729 where
13730 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13731 ___D: ::fidl_next::Decoder,
13732 {
13733 fn decode(
13734 slot_: ::fidl_next::Slot<'_, Self>,
13735 decoder_: &mut ___D,
13736 _: (),
13737 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13738 ::fidl_next::munge! {
13739 let Self {
13740
13741 mut name,
13742 mut options,
13743
13744 } = slot_;
13745 }
13746
13747 let _field = name.as_mut();
13748 ::fidl_next::Constrained::validate(_field, 255)?;
13749 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
13750
13751 let name = unsafe { name.deref_unchecked() };
13752
13753 if name.len() > 255 {
13754 return Err(::fidl_next::DecodeError::VectorTooLong {
13755 size: name.len() as u64,
13756 limit: 255,
13757 });
13758 }
13759
13760 let _field = options.as_mut();
13761
13762 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
13763
13764 Ok(())
13765 }
13766 }
13767
13768 impl<'de> ::fidl_next::IntoNatural for DirectoryUnlinkRequest<'de> {
13769 type Natural = crate::natural::DirectoryUnlinkRequest;
13770 }
13771
13772 impl ::fidl_next::Unconstrained for DirectoryUnlinkRequest<'static> {}
13773
13774 #[derive(Clone, Debug)]
13776 #[repr(C)]
13777 pub struct DirectoryUnlinkResponse {
13778 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
13779 }
13780
13781 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryUnlinkResponse>(), 1);
13782 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryUnlinkResponse>(), 1);
13783
13784 unsafe impl ::fidl_next::Wire for DirectoryUnlinkResponse {
13785 type Owned<'de> = DirectoryUnlinkResponse;
13786
13787 #[inline]
13788 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13789 ::fidl_next::munge! {
13790 let Self {
13791
13792 _empty,
13793
13794
13795 } = &mut *out_;
13796 }
13797 }
13798 }
13799
13800 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryUnlinkResponse
13801 where
13802 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13803 {
13804 fn decode(
13805 slot_: ::fidl_next::Slot<'_, Self>,
13806 decoder_: &mut ___D,
13807 _: (),
13808 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13809 ::fidl_next::munge! {
13810 let Self {
13811
13812 mut _empty,
13813
13814
13815 } = slot_;
13816 }
13817
13818 if _empty.as_bytes() != &[0u8] {
13819 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
13820 }
13821
13822 Ok(())
13823 }
13824 }
13825
13826 impl ::fidl_next::IntoNatural for DirectoryUnlinkResponse {
13827 type Natural = crate::natural::DirectoryUnlinkResponse;
13828 }
13829
13830 impl ::fidl_next::Unconstrained for DirectoryUnlinkResponse {}
13831
13832 #[derive(Clone, Debug)]
13834 #[repr(C)]
13835 pub struct DirectoryRenameResponse {
13836 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
13837 }
13838
13839 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRenameResponse>(), 1);
13840 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRenameResponse>(), 1);
13841
13842 unsafe impl ::fidl_next::Wire for DirectoryRenameResponse {
13843 type Owned<'de> = DirectoryRenameResponse;
13844
13845 #[inline]
13846 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13847 ::fidl_next::munge! {
13848 let Self {
13849
13850 _empty,
13851
13852
13853 } = &mut *out_;
13854 }
13855 }
13856 }
13857
13858 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRenameResponse
13859 where
13860 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13861 {
13862 fn decode(
13863 slot_: ::fidl_next::Slot<'_, Self>,
13864 decoder_: &mut ___D,
13865 _: (),
13866 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13867 ::fidl_next::munge! {
13868 let Self {
13869
13870 mut _empty,
13871
13872
13873 } = slot_;
13874 }
13875
13876 if _empty.as_bytes() != &[0u8] {
13877 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
13878 }
13879
13880 Ok(())
13881 }
13882 }
13883
13884 impl ::fidl_next::IntoNatural for DirectoryRenameResponse {
13885 type Natural = crate::natural::DirectoryRenameResponse;
13886 }
13887
13888 impl ::fidl_next::Unconstrained for DirectoryRenameResponse {}
13889
13890 #[derive(Clone, Copy, Debug)]
13892 #[repr(transparent)]
13893 pub struct WatchMask {
13894 pub(crate) value: ::fidl_next::WireU32,
13895 }
13896
13897 unsafe impl ::fidl_next::Wire for WatchMask {
13898 type Owned<'de> = Self;
13899
13900 #[inline]
13901 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13902 }
13904 }
13905
13906 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchMask
13907 where
13908 ___D: ?Sized,
13909 {
13910 fn decode(
13911 slot: ::fidl_next::Slot<'_, Self>,
13912 _: &mut ___D,
13913 _: (),
13914 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13915 ::fidl_next::munge!(let Self { value } = slot);
13916 let set = u32::from(*value);
13917 if set & !crate::natural::WatchMask::all().bits() != 0 {
13918 return Err(::fidl_next::DecodeError::InvalidBits {
13919 expected: crate::natural::WatchMask::all().bits() as usize,
13920 actual: set as usize,
13921 });
13922 }
13923
13924 Ok(())
13925 }
13926 }
13927
13928 impl ::core::convert::From<crate::natural::WatchMask> for WatchMask {
13929 fn from(natural: crate::natural::WatchMask) -> Self {
13930 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
13931 }
13932 }
13933
13934 impl ::fidl_next::IntoNatural for WatchMask {
13935 type Natural = crate::natural::WatchMask;
13936 }
13937
13938 impl ::fidl_next::Unconstrained for WatchMask {}
13939
13940 #[derive(Clone, Debug)]
13942 #[repr(C)]
13943 pub struct DirectoryWatchResponse {
13944 pub s: ::fidl_next::WireI32,
13945 }
13946
13947 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchResponse>(), 4);
13948 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchResponse>(), 4);
13949
13950 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchResponse, s), 0);
13951
13952 unsafe impl ::fidl_next::Wire for DirectoryWatchResponse {
13953 type Owned<'de> = DirectoryWatchResponse;
13954
13955 #[inline]
13956 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13957 ::fidl_next::munge! {
13958 let Self {
13959
13960 s,
13961
13962 } = &mut *out_;
13963 }
13964
13965 ::fidl_next::Wire::zero_padding(s);
13966 }
13967 }
13968
13969 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchResponse
13970 where
13971 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13972 {
13973 fn decode(
13974 slot_: ::fidl_next::Slot<'_, Self>,
13975 decoder_: &mut ___D,
13976 _: (),
13977 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13978 ::fidl_next::munge! {
13979 let Self {
13980
13981 mut s,
13982
13983 } = slot_;
13984 }
13985
13986 let _field = s.as_mut();
13987
13988 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13989
13990 Ok(())
13991 }
13992 }
13993
13994 impl ::fidl_next::IntoNatural for DirectoryWatchResponse {
13995 type Natural = crate::natural::DirectoryWatchResponse;
13996 }
13997
13998 impl ::fidl_next::Unconstrained for DirectoryWatchResponse {}
13999
14000 pub type SymlinkTarget<'de> = ::fidl_next::WireVector<'de, u8>;
14002
14003 pub type ExtendedAttributeName<'de> = ::fidl_next::WireVector<'de, u8>;
14005
14006 #[derive(Debug)]
14008 #[repr(C)]
14009 pub struct NodeGetExtendedAttributeRequest<'de> {
14010 pub name: ::fidl_next::WireVector<'de, u8>,
14011 }
14012
14013 static_assertions::const_assert_eq!(
14014 std::mem::size_of::<NodeGetExtendedAttributeRequest<'_>>(),
14015 16
14016 );
14017 static_assertions::const_assert_eq!(
14018 std::mem::align_of::<NodeGetExtendedAttributeRequest<'_>>(),
14019 8
14020 );
14021
14022 static_assertions::const_assert_eq!(
14023 std::mem::offset_of!(NodeGetExtendedAttributeRequest<'_>, name),
14024 0
14025 );
14026
14027 unsafe impl ::fidl_next::Wire for NodeGetExtendedAttributeRequest<'static> {
14028 type Owned<'de> = NodeGetExtendedAttributeRequest<'de>;
14029
14030 #[inline]
14031 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14032 ::fidl_next::munge! {
14033 let Self {
14034
14035 name,
14036
14037 } = &mut *out_;
14038 }
14039
14040 ::fidl_next::Wire::zero_padding(name);
14041 }
14042 }
14043
14044 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetExtendedAttributeRequest<'static>
14045 where
14046 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14047 ___D: ::fidl_next::Decoder,
14048 {
14049 fn decode(
14050 slot_: ::fidl_next::Slot<'_, Self>,
14051 decoder_: &mut ___D,
14052 _: (),
14053 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14054 ::fidl_next::munge! {
14055 let Self {
14056
14057 mut name,
14058
14059 } = slot_;
14060 }
14061
14062 let _field = name.as_mut();
14063 ::fidl_next::Constrained::validate(_field, (255, ()))?;
14064 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
14065
14066 let name = unsafe { name.deref_unchecked() };
14067
14068 if name.len() > 255 {
14069 return Err(::fidl_next::DecodeError::VectorTooLong {
14070 size: name.len() as u64,
14071 limit: 255,
14072 });
14073 }
14074
14075 Ok(())
14076 }
14077 }
14078
14079 impl<'de> ::fidl_next::IntoNatural for NodeGetExtendedAttributeRequest<'de> {
14080 type Natural = crate::natural::NodeGetExtendedAttributeRequest;
14081 }
14082
14083 impl ::fidl_next::Unconstrained for NodeGetExtendedAttributeRequest<'static> {}
14084
14085 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
14087 #[repr(transparent)]
14088 pub struct SetExtendedAttributeMode {
14089 pub(crate) value: ::fidl_next::WireU32,
14090 }
14091
14092 unsafe impl ::fidl_next::Wire for SetExtendedAttributeMode {
14093 type Owned<'de> = Self;
14094
14095 #[inline]
14096 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14097 }
14099 }
14100
14101 impl SetExtendedAttributeMode {
14102 pub const SET: SetExtendedAttributeMode =
14103 SetExtendedAttributeMode { value: ::fidl_next::WireU32(1) };
14104
14105 pub const CREATE: SetExtendedAttributeMode =
14106 SetExtendedAttributeMode { value: ::fidl_next::WireU32(2) };
14107
14108 pub const REPLACE: SetExtendedAttributeMode =
14109 SetExtendedAttributeMode { value: ::fidl_next::WireU32(3) };
14110 }
14111
14112 unsafe impl<___D> ::fidl_next::Decode<___D> for SetExtendedAttributeMode
14113 where
14114 ___D: ?Sized,
14115 {
14116 fn decode(
14117 slot: ::fidl_next::Slot<'_, Self>,
14118 _: &mut ___D,
14119 _: (),
14120 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14121 ::fidl_next::munge!(let Self { value } = slot);
14122
14123 match u32::from(*value) {
14124 1 | 2 | 3 => (),
14125 unknown => {
14126 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
14127 }
14128 }
14129
14130 Ok(())
14131 }
14132 }
14133
14134 impl ::core::convert::From<crate::natural::SetExtendedAttributeMode> for SetExtendedAttributeMode {
14135 fn from(natural: crate::natural::SetExtendedAttributeMode) -> Self {
14136 match natural {
14137 crate::natural::SetExtendedAttributeMode::Set => SetExtendedAttributeMode::SET,
14138
14139 crate::natural::SetExtendedAttributeMode::Create => {
14140 SetExtendedAttributeMode::CREATE
14141 }
14142
14143 crate::natural::SetExtendedAttributeMode::Replace => {
14144 SetExtendedAttributeMode::REPLACE
14145 }
14146 }
14147 }
14148 }
14149
14150 impl ::fidl_next::IntoNatural for SetExtendedAttributeMode {
14151 type Natural = crate::natural::SetExtendedAttributeMode;
14152 }
14153
14154 impl ::fidl_next::Unconstrained for SetExtendedAttributeMode {}
14155
14156 #[derive(Clone, Debug)]
14158 #[repr(C)]
14159 pub struct NodeSetExtendedAttributeResponse {
14160 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14161 }
14162
14163 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetExtendedAttributeResponse>(), 1);
14164 static_assertions::const_assert_eq!(
14165 std::mem::align_of::<NodeSetExtendedAttributeResponse>(),
14166 1
14167 );
14168
14169 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeResponse {
14170 type Owned<'de> = NodeSetExtendedAttributeResponse;
14171
14172 #[inline]
14173 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14174 ::fidl_next::munge! {
14175 let Self {
14176
14177 _empty,
14178
14179
14180 } = &mut *out_;
14181 }
14182 }
14183 }
14184
14185 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeResponse
14186 where
14187 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14188 {
14189 fn decode(
14190 slot_: ::fidl_next::Slot<'_, Self>,
14191 decoder_: &mut ___D,
14192 _: (),
14193 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14194 ::fidl_next::munge! {
14195 let Self {
14196
14197 mut _empty,
14198
14199
14200 } = slot_;
14201 }
14202
14203 if _empty.as_bytes() != &[0u8] {
14204 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
14205 }
14206
14207 Ok(())
14208 }
14209 }
14210
14211 impl ::fidl_next::IntoNatural for NodeSetExtendedAttributeResponse {
14212 type Natural = crate::natural::NodeSetExtendedAttributeResponse;
14213 }
14214
14215 impl ::fidl_next::Unconstrained for NodeSetExtendedAttributeResponse {}
14216
14217 #[derive(Debug)]
14219 #[repr(C)]
14220 pub struct NodeRemoveExtendedAttributeRequest<'de> {
14221 pub name: ::fidl_next::WireVector<'de, u8>,
14222 }
14223
14224 static_assertions::const_assert_eq!(
14225 std::mem::size_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
14226 16
14227 );
14228 static_assertions::const_assert_eq!(
14229 std::mem::align_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
14230 8
14231 );
14232
14233 static_assertions::const_assert_eq!(
14234 std::mem::offset_of!(NodeRemoveExtendedAttributeRequest<'_>, name),
14235 0
14236 );
14237
14238 unsafe impl ::fidl_next::Wire for NodeRemoveExtendedAttributeRequest<'static> {
14239 type Owned<'de> = NodeRemoveExtendedAttributeRequest<'de>;
14240
14241 #[inline]
14242 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14243 ::fidl_next::munge! {
14244 let Self {
14245
14246 name,
14247
14248 } = &mut *out_;
14249 }
14250
14251 ::fidl_next::Wire::zero_padding(name);
14252 }
14253 }
14254
14255 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeRemoveExtendedAttributeRequest<'static>
14256 where
14257 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14258 ___D: ::fidl_next::Decoder,
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! {
14266 let Self {
14267
14268 mut name,
14269
14270 } = slot_;
14271 }
14272
14273 let _field = name.as_mut();
14274 ::fidl_next::Constrained::validate(_field, (255, ()))?;
14275 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
14276
14277 let name = unsafe { name.deref_unchecked() };
14278
14279 if name.len() > 255 {
14280 return Err(::fidl_next::DecodeError::VectorTooLong {
14281 size: name.len() as u64,
14282 limit: 255,
14283 });
14284 }
14285
14286 Ok(())
14287 }
14288 }
14289
14290 impl<'de> ::fidl_next::IntoNatural for NodeRemoveExtendedAttributeRequest<'de> {
14291 type Natural = crate::natural::NodeRemoveExtendedAttributeRequest;
14292 }
14293
14294 impl ::fidl_next::Unconstrained for NodeRemoveExtendedAttributeRequest<'static> {}
14295
14296 #[derive(Clone, Debug)]
14298 #[repr(C)]
14299 pub struct NodeRemoveExtendedAttributeResponse {
14300 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14301 }
14302
14303 static_assertions::const_assert_eq!(
14304 std::mem::size_of::<NodeRemoveExtendedAttributeResponse>(),
14305 1
14306 );
14307 static_assertions::const_assert_eq!(
14308 std::mem::align_of::<NodeRemoveExtendedAttributeResponse>(),
14309 1
14310 );
14311
14312 unsafe impl ::fidl_next::Wire for NodeRemoveExtendedAttributeResponse {
14313 type Owned<'de> = NodeRemoveExtendedAttributeResponse;
14314
14315 #[inline]
14316 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14317 ::fidl_next::munge! {
14318 let Self {
14319
14320 _empty,
14321
14322
14323 } = &mut *out_;
14324 }
14325 }
14326 }
14327
14328 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeRemoveExtendedAttributeResponse
14329 where
14330 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14331 {
14332 fn decode(
14333 slot_: ::fidl_next::Slot<'_, Self>,
14334 decoder_: &mut ___D,
14335 _: (),
14336 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14337 ::fidl_next::munge! {
14338 let Self {
14339
14340 mut _empty,
14341
14342
14343 } = slot_;
14344 }
14345
14346 if _empty.as_bytes() != &[0u8] {
14347 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
14348 }
14349
14350 Ok(())
14351 }
14352 }
14353
14354 impl ::fidl_next::IntoNatural for NodeRemoveExtendedAttributeResponse {
14355 type Natural = crate::natural::NodeRemoveExtendedAttributeResponse;
14356 }
14357
14358 impl ::fidl_next::Unconstrained for NodeRemoveExtendedAttributeResponse {}
14359
14360 #[derive(Clone, Debug)]
14362 #[repr(C)]
14363 pub struct DirectoryCreateSymlinkResponse {
14364 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14365 }
14366
14367 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryCreateSymlinkResponse>(), 1);
14368 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryCreateSymlinkResponse>(), 1);
14369
14370 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkResponse {
14371 type Owned<'de> = DirectoryCreateSymlinkResponse;
14372
14373 #[inline]
14374 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14375 ::fidl_next::munge! {
14376 let Self {
14377
14378 _empty,
14379
14380
14381 } = &mut *out_;
14382 }
14383 }
14384 }
14385
14386 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkResponse
14387 where
14388 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14389 {
14390 fn decode(
14391 slot_: ::fidl_next::Slot<'_, Self>,
14392 decoder_: &mut ___D,
14393 _: (),
14394 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14395 ::fidl_next::munge! {
14396 let Self {
14397
14398 mut _empty,
14399
14400
14401 } = slot_;
14402 }
14403
14404 if _empty.as_bytes() != &[0u8] {
14405 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
14406 }
14407
14408 Ok(())
14409 }
14410 }
14411
14412 impl ::fidl_next::IntoNatural for DirectoryCreateSymlinkResponse {
14413 type Natural = crate::natural::DirectoryCreateSymlinkResponse;
14414 }
14415
14416 impl ::fidl_next::Unconstrained for DirectoryCreateSymlinkResponse {}
14417
14418 #[derive(Clone, Debug)]
14420 #[repr(C)]
14421 pub struct NodeSetFlagsResponse {
14422 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14423 }
14424
14425 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetFlagsResponse>(), 1);
14426 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSetFlagsResponse>(), 1);
14427
14428 unsafe impl ::fidl_next::Wire for NodeSetFlagsResponse {
14429 type Owned<'de> = NodeSetFlagsResponse;
14430
14431 #[inline]
14432 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14433 ::fidl_next::munge! {
14434 let Self {
14435
14436 _empty,
14437
14438
14439 } = &mut *out_;
14440 }
14441 }
14442 }
14443
14444 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetFlagsResponse
14445 where
14446 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14447 {
14448 fn decode(
14449 slot_: ::fidl_next::Slot<'_, Self>,
14450 decoder_: &mut ___D,
14451 _: (),
14452 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14453 ::fidl_next::munge! {
14454 let Self {
14455
14456 mut _empty,
14457
14458
14459 } = slot_;
14460 }
14461
14462 if _empty.as_bytes() != &[0u8] {
14463 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
14464 }
14465
14466 Ok(())
14467 }
14468 }
14469
14470 impl ::fidl_next::IntoNatural for NodeSetFlagsResponse {
14471 type Natural = crate::natural::NodeSetFlagsResponse;
14472 }
14473
14474 impl ::fidl_next::Unconstrained for NodeSetFlagsResponse {}
14475
14476 #[derive(Clone, Debug)]
14478 #[repr(C)]
14479 pub struct NodeDeprecatedGetAttrResponse {
14480 pub s: ::fidl_next::WireI32,
14481
14482 pub attributes: crate::wire::NodeAttributes,
14483 }
14484
14485 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetAttrResponse>(), 64);
14486 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetAttrResponse>(), 8);
14487
14488 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetAttrResponse, s), 0);
14489
14490 static_assertions::const_assert_eq!(
14491 std::mem::offset_of!(NodeDeprecatedGetAttrResponse, attributes),
14492 8
14493 );
14494
14495 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetAttrResponse {
14496 type Owned<'de> = NodeDeprecatedGetAttrResponse;
14497
14498 #[inline]
14499 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14500 ::fidl_next::munge! {
14501 let Self {
14502
14503 s,
14504 attributes,
14505
14506 } = &mut *out_;
14507 }
14508
14509 ::fidl_next::Wire::zero_padding(s);
14510
14511 ::fidl_next::Wire::zero_padding(attributes);
14512
14513 unsafe {
14514 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
14515 }
14516 }
14517 }
14518
14519 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetAttrResponse
14520 where
14521 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14522 {
14523 fn decode(
14524 slot_: ::fidl_next::Slot<'_, Self>,
14525 decoder_: &mut ___D,
14526 _: (),
14527 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14528 if slot_.as_bytes()[4..8] != [0u8; 4] {
14529 return Err(::fidl_next::DecodeError::InvalidPadding);
14530 }
14531
14532 ::fidl_next::munge! {
14533 let Self {
14534
14535 mut s,
14536 mut attributes,
14537
14538 } = slot_;
14539 }
14540
14541 let _field = s.as_mut();
14542
14543 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
14544
14545 let _field = attributes.as_mut();
14546
14547 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
14548
14549 Ok(())
14550 }
14551 }
14552
14553 impl ::fidl_next::IntoNatural for NodeDeprecatedGetAttrResponse {
14554 type Natural = crate::natural::NodeDeprecatedGetAttrResponse;
14555 }
14556
14557 impl ::fidl_next::Unconstrained for NodeDeprecatedGetAttrResponse {}
14558
14559 #[derive(Clone, Debug)]
14561 #[repr(C)]
14562 pub struct NodeDeprecatedSetAttrRequest {
14563 pub flags: crate::wire::NodeAttributeFlags,
14564
14565 pub attributes: crate::wire::NodeAttributes,
14566 }
14567
14568 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrRequest>(), 64);
14569 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrRequest>(), 8);
14570
14571 static_assertions::const_assert_eq!(
14572 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, flags),
14573 0
14574 );
14575
14576 static_assertions::const_assert_eq!(
14577 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, attributes),
14578 8
14579 );
14580
14581 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrRequest {
14582 type Owned<'de> = NodeDeprecatedSetAttrRequest;
14583
14584 #[inline]
14585 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14586 ::fidl_next::munge! {
14587 let Self {
14588
14589 flags,
14590 attributes,
14591
14592 } = &mut *out_;
14593 }
14594
14595 ::fidl_next::Wire::zero_padding(flags);
14596
14597 ::fidl_next::Wire::zero_padding(attributes);
14598
14599 unsafe {
14600 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
14601 }
14602 }
14603 }
14604
14605 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrRequest
14606 where
14607 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14608 {
14609 fn decode(
14610 slot_: ::fidl_next::Slot<'_, Self>,
14611 decoder_: &mut ___D,
14612 _: (),
14613 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14614 if slot_.as_bytes()[4..8] != [0u8; 4] {
14615 return Err(::fidl_next::DecodeError::InvalidPadding);
14616 }
14617
14618 ::fidl_next::munge! {
14619 let Self {
14620
14621 mut flags,
14622 mut attributes,
14623
14624 } = slot_;
14625 }
14626
14627 let _field = flags.as_mut();
14628
14629 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14630
14631 let _field = attributes.as_mut();
14632
14633 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
14634
14635 Ok(())
14636 }
14637 }
14638
14639 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrRequest {
14640 type Natural = crate::natural::NodeDeprecatedSetAttrRequest;
14641 }
14642
14643 impl ::fidl_next::Unconstrained for NodeDeprecatedSetAttrRequest {}
14644
14645 #[derive(Clone, Debug)]
14647 #[repr(C)]
14648 pub struct NodeDeprecatedSetAttrResponse {
14649 pub s: ::fidl_next::WireI32,
14650 }
14651
14652 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrResponse>(), 4);
14653 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrResponse>(), 4);
14654
14655 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetAttrResponse, s), 0);
14656
14657 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrResponse {
14658 type Owned<'de> = NodeDeprecatedSetAttrResponse;
14659
14660 #[inline]
14661 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14662 ::fidl_next::munge! {
14663 let Self {
14664
14665 s,
14666
14667 } = &mut *out_;
14668 }
14669
14670 ::fidl_next::Wire::zero_padding(s);
14671 }
14672 }
14673
14674 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrResponse
14675 where
14676 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14677 {
14678 fn decode(
14679 slot_: ::fidl_next::Slot<'_, Self>,
14680 decoder_: &mut ___D,
14681 _: (),
14682 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14683 ::fidl_next::munge! {
14684 let Self {
14685
14686 mut s,
14687
14688 } = slot_;
14689 }
14690
14691 let _field = s.as_mut();
14692
14693 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
14694
14695 Ok(())
14696 }
14697 }
14698
14699 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrResponse {
14700 type Natural = crate::natural::NodeDeprecatedSetAttrResponse;
14701 }
14702
14703 impl ::fidl_next::Unconstrained for NodeDeprecatedSetAttrResponse {}
14704
14705 #[derive(Clone, Debug)]
14707 #[repr(C)]
14708 pub struct NodeDeprecatedGetFlagsResponse {
14709 pub s: ::fidl_next::WireI32,
14710
14711 pub flags: crate::wire::OpenFlags,
14712 }
14713
14714 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetFlagsResponse>(), 8);
14715 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetFlagsResponse>(), 4);
14716
14717 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, s), 0);
14718
14719 static_assertions::const_assert_eq!(
14720 std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, flags),
14721 4
14722 );
14723
14724 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetFlagsResponse {
14725 type Owned<'de> = NodeDeprecatedGetFlagsResponse;
14726
14727 #[inline]
14728 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14729 ::fidl_next::munge! {
14730 let Self {
14731
14732 s,
14733 flags,
14734
14735 } = &mut *out_;
14736 }
14737
14738 ::fidl_next::Wire::zero_padding(s);
14739
14740 ::fidl_next::Wire::zero_padding(flags);
14741 }
14742 }
14743
14744 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetFlagsResponse
14745 where
14746 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14747 {
14748 fn decode(
14749 slot_: ::fidl_next::Slot<'_, Self>,
14750 decoder_: &mut ___D,
14751 _: (),
14752 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14753 ::fidl_next::munge! {
14754 let Self {
14755
14756 mut s,
14757 mut flags,
14758
14759 } = slot_;
14760 }
14761
14762 let _field = s.as_mut();
14763
14764 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
14765
14766 let _field = flags.as_mut();
14767
14768 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14769
14770 Ok(())
14771 }
14772 }
14773
14774 impl ::fidl_next::IntoNatural for NodeDeprecatedGetFlagsResponse {
14775 type Natural = crate::natural::NodeDeprecatedGetFlagsResponse;
14776 }
14777
14778 impl ::fidl_next::Unconstrained for NodeDeprecatedGetFlagsResponse {}
14779
14780 #[derive(Clone, Debug)]
14782 #[repr(C)]
14783 pub struct NodeDeprecatedSetFlagsRequest {
14784 pub flags: crate::wire::OpenFlags,
14785 }
14786
14787 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsRequest>(), 4);
14788 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsRequest>(), 4);
14789
14790 static_assertions::const_assert_eq!(
14791 std::mem::offset_of!(NodeDeprecatedSetFlagsRequest, flags),
14792 0
14793 );
14794
14795 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsRequest {
14796 type Owned<'de> = NodeDeprecatedSetFlagsRequest;
14797
14798 #[inline]
14799 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14800 ::fidl_next::munge! {
14801 let Self {
14802
14803 flags,
14804
14805 } = &mut *out_;
14806 }
14807
14808 ::fidl_next::Wire::zero_padding(flags);
14809 }
14810 }
14811
14812 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsRequest
14813 where
14814 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14815 {
14816 fn decode(
14817 slot_: ::fidl_next::Slot<'_, Self>,
14818 decoder_: &mut ___D,
14819 _: (),
14820 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14821 ::fidl_next::munge! {
14822 let Self {
14823
14824 mut flags,
14825
14826 } = slot_;
14827 }
14828
14829 let _field = flags.as_mut();
14830
14831 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14832
14833 Ok(())
14834 }
14835 }
14836
14837 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsRequest {
14838 type Natural = crate::natural::NodeDeprecatedSetFlagsRequest;
14839 }
14840
14841 impl ::fidl_next::Unconstrained for NodeDeprecatedSetFlagsRequest {}
14842
14843 #[derive(Clone, Debug)]
14845 #[repr(C)]
14846 pub struct NodeDeprecatedSetFlagsResponse {
14847 pub s: ::fidl_next::WireI32,
14848 }
14849
14850 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsResponse>(), 4);
14851 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsResponse>(), 4);
14852
14853 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetFlagsResponse, s), 0);
14854
14855 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsResponse {
14856 type Owned<'de> = NodeDeprecatedSetFlagsResponse;
14857
14858 #[inline]
14859 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14860 ::fidl_next::munge! {
14861 let Self {
14862
14863 s,
14864
14865 } = &mut *out_;
14866 }
14867
14868 ::fidl_next::Wire::zero_padding(s);
14869 }
14870 }
14871
14872 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsResponse
14873 where
14874 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14875 {
14876 fn decode(
14877 slot_: ::fidl_next::Slot<'_, Self>,
14878 decoder_: &mut ___D,
14879 _: (),
14880 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14881 ::fidl_next::munge! {
14882 let Self {
14883
14884 mut s,
14885
14886 } = slot_;
14887 }
14888
14889 let _field = s.as_mut();
14890
14891 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
14892
14893 Ok(())
14894 }
14895 }
14896
14897 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsResponse {
14898 type Natural = crate::natural::NodeDeprecatedSetFlagsResponse;
14899 }
14900
14901 impl ::fidl_next::Unconstrained for NodeDeprecatedSetFlagsResponse {}
14902
14903 #[derive(Clone, Copy, Debug)]
14905 #[repr(transparent)]
14906 pub struct Flags {
14907 pub(crate) value: ::fidl_next::WireU64,
14908 }
14909
14910 unsafe impl ::fidl_next::Wire for Flags {
14911 type Owned<'de> = Self;
14912
14913 #[inline]
14914 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14915 }
14917 }
14918
14919 unsafe impl<___D> ::fidl_next::Decode<___D> for Flags
14920 where
14921 ___D: ?Sized,
14922 {
14923 fn decode(
14924 slot: ::fidl_next::Slot<'_, Self>,
14925 _: &mut ___D,
14926 _: (),
14927 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14928 Ok(())
14929 }
14930 }
14931
14932 impl ::core::convert::From<crate::natural::Flags> for Flags {
14933 fn from(natural: crate::natural::Flags) -> Self {
14934 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
14935 }
14936 }
14937
14938 impl ::fidl_next::IntoNatural for Flags {
14939 type Natural = crate::natural::Flags;
14940 }
14941
14942 impl ::fidl_next::Unconstrained for Flags {}
14943
14944 #[derive(Clone, Debug)]
14946 #[repr(C)]
14947 pub struct NodeGetFlagsResponse {
14948 pub flags: crate::wire::Flags,
14949 }
14950
14951 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetFlagsResponse>(), 8);
14952 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetFlagsResponse>(), 8);
14953
14954 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetFlagsResponse, flags), 0);
14955
14956 unsafe impl ::fidl_next::Wire for NodeGetFlagsResponse {
14957 type Owned<'de> = NodeGetFlagsResponse;
14958
14959 #[inline]
14960 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14961 ::fidl_next::munge! {
14962 let Self {
14963
14964 flags,
14965
14966 } = &mut *out_;
14967 }
14968
14969 ::fidl_next::Wire::zero_padding(flags);
14970 }
14971 }
14972
14973 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetFlagsResponse
14974 where
14975 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14976 {
14977 fn decode(
14978 slot_: ::fidl_next::Slot<'_, Self>,
14979 decoder_: &mut ___D,
14980 _: (),
14981 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14982 ::fidl_next::munge! {
14983 let Self {
14984
14985 mut flags,
14986
14987 } = slot_;
14988 }
14989
14990 let _field = flags.as_mut();
14991
14992 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14993
14994 Ok(())
14995 }
14996 }
14997
14998 impl ::fidl_next::IntoNatural for NodeGetFlagsResponse {
14999 type Natural = crate::natural::NodeGetFlagsResponse;
15000 }
15001
15002 impl ::fidl_next::Unconstrained for NodeGetFlagsResponse {}
15003
15004 #[derive(Clone, Debug)]
15006 #[repr(C)]
15007 pub struct NodeSetFlagsRequest {
15008 pub flags: crate::wire::Flags,
15009 }
15010
15011 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetFlagsRequest>(), 8);
15012 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSetFlagsRequest>(), 8);
15013
15014 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeSetFlagsRequest, flags), 0);
15015
15016 unsafe impl ::fidl_next::Wire for NodeSetFlagsRequest {
15017 type Owned<'de> = NodeSetFlagsRequest;
15018
15019 #[inline]
15020 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15021 ::fidl_next::munge! {
15022 let Self {
15023
15024 flags,
15025
15026 } = &mut *out_;
15027 }
15028
15029 ::fidl_next::Wire::zero_padding(flags);
15030 }
15031 }
15032
15033 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetFlagsRequest
15034 where
15035 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15036 {
15037 fn decode(
15038 slot_: ::fidl_next::Slot<'_, Self>,
15039 decoder_: &mut ___D,
15040 _: (),
15041 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15042 ::fidl_next::munge! {
15043 let Self {
15044
15045 mut flags,
15046
15047 } = slot_;
15048 }
15049
15050 let _field = flags.as_mut();
15051
15052 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
15053
15054 Ok(())
15055 }
15056 }
15057
15058 impl ::fidl_next::IntoNatural for NodeSetFlagsRequest {
15059 type Natural = crate::natural::NodeSetFlagsRequest;
15060 }
15061
15062 impl ::fidl_next::Unconstrained for NodeSetFlagsRequest {}
15063
15064 #[derive(Clone, Debug)]
15066 #[repr(C)]
15067 pub struct EmptyStruct {
15068 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
15069 }
15070
15071 static_assertions::const_assert_eq!(std::mem::size_of::<EmptyStruct>(), 1);
15072 static_assertions::const_assert_eq!(std::mem::align_of::<EmptyStruct>(), 1);
15073
15074 unsafe impl ::fidl_next::Wire for EmptyStruct {
15075 type Owned<'de> = EmptyStruct;
15076
15077 #[inline]
15078 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15079 ::fidl_next::munge! {
15080 let Self {
15081
15082 _empty,
15083
15084
15085 } = &mut *out_;
15086 }
15087 }
15088 }
15089
15090 unsafe impl<___D> ::fidl_next::Decode<___D> for EmptyStruct
15091 where
15092 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15093 {
15094 fn decode(
15095 slot_: ::fidl_next::Slot<'_, Self>,
15096 decoder_: &mut ___D,
15097 _: (),
15098 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15099 ::fidl_next::munge! {
15100 let Self {
15101
15102 mut _empty,
15103
15104
15105 } = slot_;
15106 }
15107
15108 if _empty.as_bytes() != &[0u8] {
15109 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
15110 }
15111
15112 Ok(())
15113 }
15114 }
15115
15116 impl ::fidl_next::IntoNatural for EmptyStruct {
15117 type Natural = crate::natural::EmptyStruct;
15118 }
15119
15120 impl ::fidl_next::Unconstrained for EmptyStruct {}
15121
15122 #[repr(transparent)]
15124 pub struct SelinuxContext<'de> {
15125 pub(crate) raw: ::fidl_next::RawWireUnion,
15126 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15127 }
15128
15129 impl<'de> Drop for SelinuxContext<'de> {
15130 fn drop(&mut self) {
15131 match self.raw.ordinal() {
15132 1 => {
15133 let _ = unsafe {
15134 self.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>()
15135 };
15136 }
15137
15138 2 => {
15139 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::EmptyStruct>() };
15140 }
15141
15142 _ => (),
15143 }
15144 }
15145 }
15146
15147 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
15148 type Owned<'de> = SelinuxContext<'de>;
15149
15150 #[inline]
15151 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15152 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15153 ::fidl_next::RawWireUnion::zero_padding(raw);
15154 }
15155 }
15156
15157 pub mod selinux_context {
15158 pub enum Ref<'de> {
15159 Data(&'de ::fidl_next::WireVector<'de, u8>),
15160
15161 UseExtendedAttributes(&'de crate::wire::EmptyStruct),
15162
15163 UnknownOrdinal_(u64),
15164 }
15165 }
15166
15167 impl<'de> SelinuxContext<'de> {
15168 pub fn as_ref(&self) -> crate::wire::selinux_context::Ref<'_> {
15169 match self.raw.ordinal() {
15170 1 => crate::wire::selinux_context::Ref::Data(unsafe {
15171 self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
15172 }),
15173
15174 2 => crate::wire::selinux_context::Ref::UseExtendedAttributes(unsafe {
15175 self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
15176 }),
15177
15178 unknown => crate::wire::selinux_context::Ref::UnknownOrdinal_(unknown),
15179 }
15180 }
15181 }
15182
15183 unsafe impl<___D> ::fidl_next::Decode<___D> for SelinuxContext<'static>
15184 where
15185 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15186 ___D: ::fidl_next::Decoder,
15187 {
15188 fn decode(
15189 mut slot: ::fidl_next::Slot<'_, Self>,
15190 decoder: &mut ___D,
15191 _: (),
15192 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15193 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15194 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
15195 1 => ::fidl_next::RawWireUnion::decode_as::<
15196 ___D,
15197 ::fidl_next::WireVector<'static, u8>,
15198 >(raw, decoder, (256, ()))?,
15199
15200 2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::wire::EmptyStruct>(
15201 raw,
15202 decoder,
15203 (),
15204 )?,
15205
15206 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
15207 }
15208
15209 Ok(())
15210 }
15211 }
15212
15213 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
15214 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15215 match self.raw.ordinal() {
15216 1 => unsafe {
15217 self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>().fmt(f)
15218 },
15219 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>().fmt(f) },
15220 _ => unsafe { ::core::hint::unreachable_unchecked() },
15221 }
15222 }
15223 }
15224
15225 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
15226 type Natural = crate::natural::SelinuxContext;
15227 }
15228
15229 impl ::fidl_next::Unconstrained for SelinuxContext<'static> {}
15230
15231 #[repr(C)]
15233 pub struct MutableNodeAttributes<'de> {
15234 pub(crate) table: ::fidl_next::WireTable<'de>,
15235 }
15236
15237 impl<'de> Drop for MutableNodeAttributes<'de> {
15238 fn drop(&mut self) {
15239 let _ = self
15240 .table
15241 .get(1)
15242 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15243
15244 let _ = self
15245 .table
15246 .get(2)
15247 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15248
15249 let _ = self
15250 .table
15251 .get(3)
15252 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
15253
15254 let _ = self
15255 .table
15256 .get(4)
15257 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
15258
15259 let _ = self
15260 .table
15261 .get(5)
15262 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
15263
15264 let _ = self
15265 .table
15266 .get(6)
15267 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15268
15269 let _ = self
15270 .table
15271 .get(7)
15272 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15273
15274 let _ = self.table.get(8).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
15275
15276 let _ = self.table.get(9).map(|envelope| unsafe {
15277 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
15278 });
15279
15280 let _ =
15281 self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 16]>() });
15282 }
15283 }
15284
15285 unsafe impl ::fidl_next::Wire for MutableNodeAttributes<'static> {
15286 type Owned<'de> = MutableNodeAttributes<'de>;
15287
15288 #[inline]
15289 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15290 ::fidl_next::munge!(let Self { table } = out);
15291 ::fidl_next::WireTable::zero_padding(table);
15292 }
15293 }
15294
15295 unsafe impl<___D> ::fidl_next::Decode<___D> for MutableNodeAttributes<'static>
15296 where
15297 ___D: ::fidl_next::Decoder + ?Sized,
15298 {
15299 fn decode(
15300 slot: ::fidl_next::Slot<'_, Self>,
15301 decoder: &mut ___D,
15302 _: (),
15303 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15304 ::fidl_next::munge!(let Self { table } = slot);
15305
15306 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15307 match ordinal {
15308 0 => unsafe { ::core::hint::unreachable_unchecked() },
15309
15310 1 => {
15311 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15312 slot.as_mut(),
15313 decoder,
15314 (),
15315 )?;
15316
15317 Ok(())
15318 }
15319
15320 2 => {
15321 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15322 slot.as_mut(),
15323 decoder,
15324 (),
15325 )?;
15326
15327 Ok(())
15328 }
15329
15330 3 => {
15331 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
15332 slot.as_mut(),
15333 decoder,
15334 (),
15335 )?;
15336
15337 Ok(())
15338 }
15339
15340 4 => {
15341 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
15342 slot.as_mut(),
15343 decoder,
15344 (),
15345 )?;
15346
15347 Ok(())
15348 }
15349
15350 5 => {
15351 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
15352 slot.as_mut(),
15353 decoder,
15354 (),
15355 )?;
15356
15357 Ok(())
15358 }
15359
15360 6 => {
15361 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15362 slot.as_mut(),
15363 decoder,
15364 (),
15365 )?;
15366
15367 Ok(())
15368 }
15369
15370 7 => {
15371 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15372 slot.as_mut(),
15373 decoder,
15374 (),
15375 )?;
15376
15377 Ok(())
15378 }
15379
15380 8 => {
15381 ::fidl_next::WireEnvelope::decode_as::<___D, bool>(
15382 slot.as_mut(),
15383 decoder,
15384 (),
15385 )?;
15386
15387 Ok(())
15388 }
15389
15390 9 => {
15391 ::fidl_next::WireEnvelope::decode_as::<
15392 ___D,
15393 crate::wire::SelinuxContext<'static>,
15394 >(slot.as_mut(), decoder, ())?;
15395
15396 Ok(())
15397 }
15398
15399 10 => {
15400 ::fidl_next::WireEnvelope::decode_as::<___D, [u8; 16]>(
15401 slot.as_mut(),
15402 decoder,
15403 (),
15404 )?;
15405
15406 Ok(())
15407 }
15408
15409 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
15410 }
15411 })
15412 }
15413 }
15414
15415 impl<'de> MutableNodeAttributes<'de> {
15416 pub fn creation_time(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15417 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15418 }
15419
15420 pub fn modification_time(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15421 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15422 }
15423
15424 pub fn mode(&self) -> ::core::option::Option<&::fidl_next::WireU32> {
15425 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
15426 }
15427
15428 pub fn uid(&self) -> ::core::option::Option<&::fidl_next::WireU32> {
15429 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
15430 }
15431
15432 pub fn gid(&self) -> ::core::option::Option<&::fidl_next::WireU32> {
15433 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
15434 }
15435
15436 pub fn rdev(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15437 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
15438 }
15439
15440 pub fn access_time(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15441 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
15442 }
15443
15444 pub fn casefold(&self) -> ::core::option::Option<&bool> {
15445 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
15446 }
15447
15448 pub fn selinux_context(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
15449 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
15450 }
15451
15452 pub fn wrapping_key_id(&self) -> ::core::option::Option<&[u8; 16]> {
15453 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
15454 }
15455 }
15456
15457 impl<'de> ::core::fmt::Debug for MutableNodeAttributes<'de> {
15458 fn fmt(
15459 &self,
15460 f: &mut ::core::fmt::Formatter<'_>,
15461 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15462 f.debug_struct("MutableNodeAttributes")
15463 .field("creation_time", &self.creation_time())
15464 .field("modification_time", &self.modification_time())
15465 .field("mode", &self.mode())
15466 .field("uid", &self.uid())
15467 .field("gid", &self.gid())
15468 .field("rdev", &self.rdev())
15469 .field("access_time", &self.access_time())
15470 .field("casefold", &self.casefold())
15471 .field("selinux_context", &self.selinux_context())
15472 .field("wrapping_key_id", &self.wrapping_key_id())
15473 .finish()
15474 }
15475 }
15476
15477 impl<'de> ::fidl_next::IntoNatural for MutableNodeAttributes<'de> {
15478 type Natural = crate::natural::MutableNodeAttributes;
15479 }
15480
15481 impl ::fidl_next::Unconstrained for MutableNodeAttributes<'_> {}
15482
15483 #[derive(Clone, Copy, Debug)]
15485 #[repr(transparent)]
15486 pub struct NodeProtocolKinds {
15487 pub(crate) value: ::fidl_next::WireU64,
15488 }
15489
15490 unsafe impl ::fidl_next::Wire for NodeProtocolKinds {
15491 type Owned<'de> = Self;
15492
15493 #[inline]
15494 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15495 }
15497 }
15498
15499 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeProtocolKinds
15500 where
15501 ___D: ?Sized,
15502 {
15503 fn decode(
15504 slot: ::fidl_next::Slot<'_, Self>,
15505 _: &mut ___D,
15506 _: (),
15507 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15508 Ok(())
15509 }
15510 }
15511
15512 impl ::core::convert::From<crate::natural::NodeProtocolKinds> for NodeProtocolKinds {
15513 fn from(natural: crate::natural::NodeProtocolKinds) -> Self {
15514 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
15515 }
15516 }
15517
15518 impl ::fidl_next::IntoNatural for NodeProtocolKinds {
15519 type Natural = crate::natural::NodeProtocolKinds;
15520 }
15521
15522 impl ::fidl_next::Unconstrained for NodeProtocolKinds {}
15523
15524 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
15526 #[repr(transparent)]
15527 pub struct HashAlgorithm {
15528 pub(crate) value: u8,
15529 }
15530
15531 unsafe impl ::fidl_next::Wire for HashAlgorithm {
15532 type Owned<'de> = Self;
15533
15534 #[inline]
15535 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15536 }
15538 }
15539
15540 impl HashAlgorithm {
15541 pub const SHA256: HashAlgorithm = HashAlgorithm { value: 1 };
15542
15543 pub const SHA512: HashAlgorithm = HashAlgorithm { value: 2 };
15544 }
15545
15546 unsafe impl<___D> ::fidl_next::Decode<___D> for HashAlgorithm
15547 where
15548 ___D: ?Sized,
15549 {
15550 fn decode(
15551 slot: ::fidl_next::Slot<'_, Self>,
15552 _: &mut ___D,
15553 _: (),
15554 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15555 Ok(())
15556 }
15557 }
15558
15559 impl ::core::convert::From<crate::natural::HashAlgorithm> for HashAlgorithm {
15560 fn from(natural: crate::natural::HashAlgorithm) -> Self {
15561 match natural {
15562 crate::natural::HashAlgorithm::Sha256 => HashAlgorithm::SHA256,
15563
15564 crate::natural::HashAlgorithm::Sha512 => HashAlgorithm::SHA512,
15565
15566 crate::natural::HashAlgorithm::UnknownOrdinal_(value) => {
15567 HashAlgorithm { value: u8::from(value) }
15568 }
15569 }
15570 }
15571 }
15572
15573 impl ::fidl_next::IntoNatural for HashAlgorithm {
15574 type Natural = crate::natural::HashAlgorithm;
15575 }
15576
15577 impl ::fidl_next::Unconstrained for HashAlgorithm {}
15578
15579 #[repr(C)]
15581 pub struct VerificationOptions<'de> {
15582 pub(crate) table: ::fidl_next::WireTable<'de>,
15583 }
15584
15585 impl<'de> Drop for VerificationOptions<'de> {
15586 fn drop(&mut self) {
15587 let _ = self
15588 .table
15589 .get(1)
15590 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::HashAlgorithm>() });
15591
15592 let _ = self.table.get(2).map(|envelope| unsafe {
15593 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
15594 });
15595 }
15596 }
15597
15598 unsafe impl ::fidl_next::Wire for VerificationOptions<'static> {
15599 type Owned<'de> = VerificationOptions<'de>;
15600
15601 #[inline]
15602 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15603 ::fidl_next::munge!(let Self { table } = out);
15604 ::fidl_next::WireTable::zero_padding(table);
15605 }
15606 }
15607
15608 unsafe impl<___D> ::fidl_next::Decode<___D> for VerificationOptions<'static>
15609 where
15610 ___D: ::fidl_next::Decoder + ?Sized,
15611 {
15612 fn decode(
15613 slot: ::fidl_next::Slot<'_, Self>,
15614 decoder: &mut ___D,
15615 _: (),
15616 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15617 ::fidl_next::munge!(let Self { table } = slot);
15618
15619 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15620 match ordinal {
15621 0 => unsafe { ::core::hint::unreachable_unchecked() },
15622
15623 1 => {
15624 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::HashAlgorithm>(
15625 slot.as_mut(),
15626 decoder,
15627 (),
15628 )?;
15629
15630 Ok(())
15631 }
15632
15633 2 => {
15634 ::fidl_next::WireEnvelope::decode_as::<
15635 ___D,
15636 ::fidl_next::WireVector<'static, u8>,
15637 >(slot.as_mut(), decoder, (32, ()))?;
15638
15639 let value = unsafe {
15640 slot.deref_unchecked()
15641 .deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
15642 };
15643
15644 if value.len() > 32 {
15645 return Err(::fidl_next::DecodeError::VectorTooLong {
15646 size: value.len() as u64,
15647 limit: 32,
15648 });
15649 }
15650
15651 Ok(())
15652 }
15653
15654 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
15655 }
15656 })
15657 }
15658 }
15659
15660 impl<'de> VerificationOptions<'de> {
15661 pub fn hash_algorithm(&self) -> ::core::option::Option<&crate::wire::HashAlgorithm> {
15662 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15663 }
15664
15665 pub fn salt(&self) -> ::core::option::Option<&::fidl_next::WireVector<'de, u8>> {
15666 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15667 }
15668 }
15669
15670 impl<'de> ::core::fmt::Debug for VerificationOptions<'de> {
15671 fn fmt(
15672 &self,
15673 f: &mut ::core::fmt::Formatter<'_>,
15674 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15675 f.debug_struct("VerificationOptions")
15676 .field("hash_algorithm", &self.hash_algorithm())
15677 .field("salt", &self.salt())
15678 .finish()
15679 }
15680 }
15681
15682 impl<'de> ::fidl_next::IntoNatural for VerificationOptions<'de> {
15683 type Natural = crate::natural::VerificationOptions;
15684 }
15685
15686 impl ::fidl_next::Unconstrained for VerificationOptions<'_> {}
15687
15688 #[repr(C)]
15690 pub struct ImmutableNodeAttributes<'de> {
15691 pub(crate) table: ::fidl_next::WireTable<'de>,
15692 }
15693
15694 impl<'de> Drop for ImmutableNodeAttributes<'de> {
15695 fn drop(&mut self) {
15696 let _ = self.table.get(1).map(|envelope| unsafe {
15697 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
15698 });
15699
15700 let _ = self
15701 .table
15702 .get(2)
15703 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
15704
15705 let _ = self
15706 .table
15707 .get(3)
15708 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15709
15710 let _ = self
15711 .table
15712 .get(4)
15713 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15714
15715 let _ = self
15716 .table
15717 .get(5)
15718 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15719
15720 let _ = self
15721 .table
15722 .get(6)
15723 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15724
15725 let _ = self
15726 .table
15727 .get(7)
15728 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15729
15730 let _ = self.table.get(8).map(|envelope| unsafe {
15731 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
15732 });
15733
15734 let _ = self.table.get(9).map(|envelope| unsafe {
15735 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
15736 });
15737
15738 let _ = self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
15739 }
15740 }
15741
15742 unsafe impl ::fidl_next::Wire for ImmutableNodeAttributes<'static> {
15743 type Owned<'de> = ImmutableNodeAttributes<'de>;
15744
15745 #[inline]
15746 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15747 ::fidl_next::munge!(let Self { table } = out);
15748 ::fidl_next::WireTable::zero_padding(table);
15749 }
15750 }
15751
15752 unsafe impl<___D> ::fidl_next::Decode<___D> for ImmutableNodeAttributes<'static>
15753 where
15754 ___D: ::fidl_next::Decoder + ?Sized,
15755 {
15756 fn decode(
15757 slot: ::fidl_next::Slot<'_, Self>,
15758 decoder: &mut ___D,
15759 _: (),
15760 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15761 ::fidl_next::munge!(let Self { table } = slot);
15762
15763 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15764 match ordinal {
15765 0 => unsafe { ::core::hint::unreachable_unchecked() },
15766
15767 1 => {
15768 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::NodeProtocolKinds>(
15769 slot.as_mut(),
15770 decoder,
15771 (),
15772 )?;
15773
15774 Ok(())
15775 }
15776
15777 2 => {
15778 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::Operations>(
15779 slot.as_mut(),
15780 decoder,
15781 (),
15782 )?;
15783
15784 Ok(())
15785 }
15786
15787 3 => {
15788 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15789 slot.as_mut(),
15790 decoder,
15791 (),
15792 )?;
15793
15794 Ok(())
15795 }
15796
15797 4 => {
15798 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15799 slot.as_mut(),
15800 decoder,
15801 (),
15802 )?;
15803
15804 Ok(())
15805 }
15806
15807 5 => {
15808 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15809 slot.as_mut(),
15810 decoder,
15811 (),
15812 )?;
15813
15814 Ok(())
15815 }
15816
15817 6 => {
15818 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15819 slot.as_mut(),
15820 decoder,
15821 (),
15822 )?;
15823
15824 Ok(())
15825 }
15826
15827 7 => {
15828 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15829 slot.as_mut(),
15830 decoder,
15831 (),
15832 )?;
15833
15834 Ok(())
15835 }
15836
15837 8 => {
15838 ::fidl_next::WireEnvelope::decode_as::<
15839 ___D,
15840 crate::wire::VerificationOptions<'static>,
15841 >(slot.as_mut(), decoder, ())?;
15842
15843 Ok(())
15844 }
15845
15846 9 => {
15847 ::fidl_next::WireEnvelope::decode_as::<
15848 ___D,
15849 ::fidl_next::WireVector<'static, u8>,
15850 >(slot.as_mut(), decoder, (64, ()))?;
15851
15852 let value = unsafe {
15853 slot.deref_unchecked()
15854 .deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
15855 };
15856
15857 if value.len() > 64 {
15858 return Err(::fidl_next::DecodeError::VectorTooLong {
15859 size: value.len() as u64,
15860 limit: 64,
15861 });
15862 }
15863
15864 Ok(())
15865 }
15866
15867 10 => {
15868 ::fidl_next::WireEnvelope::decode_as::<___D, bool>(
15869 slot.as_mut(),
15870 decoder,
15871 (),
15872 )?;
15873
15874 Ok(())
15875 }
15876
15877 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
15878 }
15879 })
15880 }
15881 }
15882
15883 impl<'de> ImmutableNodeAttributes<'de> {
15884 pub fn protocols(&self) -> ::core::option::Option<&crate::wire::NodeProtocolKinds> {
15885 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15886 }
15887
15888 pub fn abilities(&self) -> ::core::option::Option<&crate::wire::Operations> {
15889 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15890 }
15891
15892 pub fn content_size(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15893 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
15894 }
15895
15896 pub fn storage_size(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15897 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
15898 }
15899
15900 pub fn link_count(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15901 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
15902 }
15903
15904 pub fn id(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15905 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
15906 }
15907
15908 pub fn change_time(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15909 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
15910 }
15911
15912 pub fn options(&self) -> ::core::option::Option<&crate::wire::VerificationOptions<'de>> {
15913 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
15914 }
15915
15916 pub fn root_hash(&self) -> ::core::option::Option<&::fidl_next::WireVector<'de, u8>> {
15917 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
15918 }
15919
15920 pub fn verity_enabled(&self) -> ::core::option::Option<&bool> {
15921 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
15922 }
15923 }
15924
15925 impl<'de> ::core::fmt::Debug for ImmutableNodeAttributes<'de> {
15926 fn fmt(
15927 &self,
15928 f: &mut ::core::fmt::Formatter<'_>,
15929 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15930 f.debug_struct("ImmutableNodeAttributes")
15931 .field("protocols", &self.protocols())
15932 .field("abilities", &self.abilities())
15933 .field("content_size", &self.content_size())
15934 .field("storage_size", &self.storage_size())
15935 .field("link_count", &self.link_count())
15936 .field("id", &self.id())
15937 .field("change_time", &self.change_time())
15938 .field("options", &self.options())
15939 .field("root_hash", &self.root_hash())
15940 .field("verity_enabled", &self.verity_enabled())
15941 .finish()
15942 }
15943 }
15944
15945 impl<'de> ::fidl_next::IntoNatural for ImmutableNodeAttributes<'de> {
15946 type Natural = crate::natural::ImmutableNodeAttributes;
15947 }
15948
15949 impl ::fidl_next::Unconstrained for ImmutableNodeAttributes<'_> {}
15950
15951 #[derive(Debug)]
15953 #[repr(C)]
15954 pub struct NodeAttributes2<'de> {
15955 pub mutable_attributes: crate::wire::MutableNodeAttributes<'de>,
15956
15957 pub immutable_attributes: crate::wire::ImmutableNodeAttributes<'de>,
15958 }
15959
15960 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes2<'_>>(), 32);
15961 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes2<'_>>(), 8);
15962
15963 static_assertions::const_assert_eq!(
15964 std::mem::offset_of!(NodeAttributes2<'_>, mutable_attributes),
15965 0
15966 );
15967
15968 static_assertions::const_assert_eq!(
15969 std::mem::offset_of!(NodeAttributes2<'_>, immutable_attributes),
15970 16
15971 );
15972
15973 unsafe impl ::fidl_next::Wire for NodeAttributes2<'static> {
15974 type Owned<'de> = NodeAttributes2<'de>;
15975
15976 #[inline]
15977 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15978 ::fidl_next::munge! {
15979 let Self {
15980
15981 mutable_attributes,
15982 immutable_attributes,
15983
15984 } = &mut *out_;
15985 }
15986
15987 ::fidl_next::Wire::zero_padding(mutable_attributes);
15988
15989 ::fidl_next::Wire::zero_padding(immutable_attributes);
15990 }
15991 }
15992
15993 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributes2<'static>
15994 where
15995 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15996 ___D: ::fidl_next::Decoder,
15997 {
15998 fn decode(
15999 slot_: ::fidl_next::Slot<'_, Self>,
16000 decoder_: &mut ___D,
16001 _: (),
16002 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16003 ::fidl_next::munge! {
16004 let Self {
16005
16006 mut mutable_attributes,
16007 mut immutable_attributes,
16008
16009 } = slot_;
16010 }
16011
16012 let _field = mutable_attributes.as_mut();
16013
16014 ::fidl_next::Decode::decode(mutable_attributes.as_mut(), decoder_, ())?;
16015
16016 let _field = immutable_attributes.as_mut();
16017
16018 ::fidl_next::Decode::decode(immutable_attributes.as_mut(), decoder_, ())?;
16019
16020 Ok(())
16021 }
16022 }
16023
16024 impl<'de> ::fidl_next::IntoNatural for NodeAttributes2<'de> {
16025 type Natural = crate::natural::NodeAttributes2;
16026 }
16027
16028 impl ::fidl_next::Unconstrained for NodeAttributes2<'static> {}
16029
16030 #[repr(C)]
16032 pub struct NodeInfo<'de> {
16033 pub(crate) table: ::fidl_next::WireTable<'de>,
16034 }
16035
16036 impl<'de> Drop for NodeInfo<'de> {
16037 fn drop(&mut self) {
16038 let _ = self.table.get(1).map(|envelope| unsafe {
16039 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
16040 });
16041 }
16042 }
16043
16044 unsafe impl ::fidl_next::Wire for NodeInfo<'static> {
16045 type Owned<'de> = NodeInfo<'de>;
16046
16047 #[inline]
16048 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16049 ::fidl_next::munge!(let Self { table } = out);
16050 ::fidl_next::WireTable::zero_padding(table);
16051 }
16052 }
16053
16054 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeInfo<'static>
16055 where
16056 ___D: ::fidl_next::Decoder + ?Sized,
16057 {
16058 fn decode(
16059 slot: ::fidl_next::Slot<'_, Self>,
16060 decoder: &mut ___D,
16061 _: (),
16062 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16063 ::fidl_next::munge!(let Self { table } = slot);
16064
16065 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16066 match ordinal {
16067 0 => unsafe { ::core::hint::unreachable_unchecked() },
16068
16069 1 => {
16070 ::fidl_next::WireEnvelope::decode_as::<
16071 ___D,
16072 crate::wire::NodeAttributes2<'static>,
16073 >(slot.as_mut(), decoder, ())?;
16074
16075 Ok(())
16076 }
16077
16078 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
16079 }
16080 })
16081 }
16082 }
16083
16084 impl<'de> NodeInfo<'de> {
16085 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
16086 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16087 }
16088 }
16089
16090 impl<'de> ::core::fmt::Debug for NodeInfo<'de> {
16091 fn fmt(
16092 &self,
16093 f: &mut ::core::fmt::Formatter<'_>,
16094 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16095 f.debug_struct("NodeInfo").field("attributes", &self.attributes()).finish()
16096 }
16097 }
16098
16099 impl<'de> ::fidl_next::IntoNatural for NodeInfo<'de> {
16100 type Natural = crate::natural::NodeInfo;
16101 }
16102
16103 impl ::fidl_next::Unconstrained for NodeInfo<'_> {}
16104
16105 #[repr(C)]
16107 pub struct DirectoryInfo<'de> {
16108 pub(crate) table: ::fidl_next::WireTable<'de>,
16109 }
16110
16111 impl<'de> Drop for DirectoryInfo<'de> {
16112 fn drop(&mut self) {
16113 let _ = self.table.get(1).map(|envelope| unsafe {
16114 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
16115 });
16116 }
16117 }
16118
16119 unsafe impl ::fidl_next::Wire for DirectoryInfo<'static> {
16120 type Owned<'de> = DirectoryInfo<'de>;
16121
16122 #[inline]
16123 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16124 ::fidl_next::munge!(let Self { table } = out);
16125 ::fidl_next::WireTable::zero_padding(table);
16126 }
16127 }
16128
16129 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryInfo<'static>
16130 where
16131 ___D: ::fidl_next::Decoder + ?Sized,
16132 {
16133 fn decode(
16134 slot: ::fidl_next::Slot<'_, Self>,
16135 decoder: &mut ___D,
16136 _: (),
16137 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16138 ::fidl_next::munge!(let Self { table } = slot);
16139
16140 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16141 match ordinal {
16142 0 => unsafe { ::core::hint::unreachable_unchecked() },
16143
16144 1 => {
16145 ::fidl_next::WireEnvelope::decode_as::<
16146 ___D,
16147 crate::wire::NodeAttributes2<'static>,
16148 >(slot.as_mut(), decoder, ())?;
16149
16150 Ok(())
16151 }
16152
16153 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
16154 }
16155 })
16156 }
16157 }
16158
16159 impl<'de> DirectoryInfo<'de> {
16160 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
16161 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16162 }
16163 }
16164
16165 impl<'de> ::core::fmt::Debug for DirectoryInfo<'de> {
16166 fn fmt(
16167 &self,
16168 f: &mut ::core::fmt::Formatter<'_>,
16169 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16170 f.debug_struct("DirectoryInfo").field("attributes", &self.attributes()).finish()
16171 }
16172 }
16173
16174 impl<'de> ::fidl_next::IntoNatural for DirectoryInfo<'de> {
16175 type Natural = crate::natural::DirectoryInfo;
16176 }
16177
16178 impl ::fidl_next::Unconstrained for DirectoryInfo<'_> {}
16179
16180 #[repr(C)]
16182 pub struct SymlinkInfo<'de> {
16183 pub(crate) table: ::fidl_next::WireTable<'de>,
16184 }
16185
16186 impl<'de> Drop for SymlinkInfo<'de> {
16187 fn drop(&mut self) {
16188 let _ = self.table.get(1).map(|envelope| unsafe {
16189 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
16190 });
16191
16192 let _ = self.table.get(2).map(|envelope| unsafe {
16193 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
16194 });
16195 }
16196 }
16197
16198 unsafe impl ::fidl_next::Wire for SymlinkInfo<'static> {
16199 type Owned<'de> = SymlinkInfo<'de>;
16200
16201 #[inline]
16202 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16203 ::fidl_next::munge!(let Self { table } = out);
16204 ::fidl_next::WireTable::zero_padding(table);
16205 }
16206 }
16207
16208 unsafe impl<___D> ::fidl_next::Decode<___D> for SymlinkInfo<'static>
16209 where
16210 ___D: ::fidl_next::Decoder + ?Sized,
16211 {
16212 fn decode(
16213 slot: ::fidl_next::Slot<'_, Self>,
16214 decoder: &mut ___D,
16215 _: (),
16216 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16217 ::fidl_next::munge!(let Self { table } = slot);
16218
16219 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16220 match ordinal {
16221 0 => unsafe { ::core::hint::unreachable_unchecked() },
16222
16223 1 => {
16224 ::fidl_next::WireEnvelope::decode_as::<
16225 ___D,
16226 ::fidl_next::WireVector<'static, u8>,
16227 >(slot.as_mut(), decoder, (4095, ()))?;
16228
16229 let value = unsafe {
16230 slot.deref_unchecked()
16231 .deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
16232 };
16233
16234 if value.len() > 4095 {
16235 return Err(::fidl_next::DecodeError::VectorTooLong {
16236 size: value.len() as u64,
16237 limit: 4095,
16238 });
16239 }
16240
16241 Ok(())
16242 }
16243
16244 2 => {
16245 ::fidl_next::WireEnvelope::decode_as::<
16246 ___D,
16247 crate::wire::NodeAttributes2<'static>,
16248 >(slot.as_mut(), decoder, ())?;
16249
16250 Ok(())
16251 }
16252
16253 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
16254 }
16255 })
16256 }
16257 }
16258
16259 impl<'de> SymlinkInfo<'de> {
16260 pub fn target(&self) -> ::core::option::Option<&::fidl_next::WireVector<'de, u8>> {
16261 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16262 }
16263
16264 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
16265 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16266 }
16267 }
16268
16269 impl<'de> ::core::fmt::Debug for SymlinkInfo<'de> {
16270 fn fmt(
16271 &self,
16272 f: &mut ::core::fmt::Formatter<'_>,
16273 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16274 f.debug_struct("SymlinkInfo")
16275 .field("target", &self.target())
16276 .field("attributes", &self.attributes())
16277 .finish()
16278 }
16279 }
16280
16281 impl<'de> ::fidl_next::IntoNatural for SymlinkInfo<'de> {
16282 type Natural = crate::natural::SymlinkInfo;
16283 }
16284
16285 impl ::fidl_next::Unconstrained for SymlinkInfo<'_> {}
16286
16287 #[derive(Clone, Copy, Debug)]
16289 #[repr(transparent)]
16290 pub struct NodeAttributesQuery {
16291 pub(crate) value: ::fidl_next::WireU64,
16292 }
16293
16294 unsafe impl ::fidl_next::Wire for NodeAttributesQuery {
16295 type Owned<'de> = Self;
16296
16297 #[inline]
16298 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
16299 }
16301 }
16302
16303 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributesQuery
16304 where
16305 ___D: ?Sized,
16306 {
16307 fn decode(
16308 slot: ::fidl_next::Slot<'_, Self>,
16309 _: &mut ___D,
16310 _: (),
16311 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16312 Ok(())
16313 }
16314 }
16315
16316 impl ::core::convert::From<crate::natural::NodeAttributesQuery> for NodeAttributesQuery {
16317 fn from(natural: crate::natural::NodeAttributesQuery) -> Self {
16318 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
16319 }
16320 }
16321
16322 impl ::fidl_next::IntoNatural for NodeAttributesQuery {
16323 type Natural = crate::natural::NodeAttributesQuery;
16324 }
16325
16326 impl ::fidl_next::Unconstrained for NodeAttributesQuery {}
16327
16328 #[derive(Clone, Debug)]
16330 #[repr(C)]
16331 pub struct NodeGetAttributesRequest {
16332 pub query: crate::wire::NodeAttributesQuery,
16333 }
16334
16335 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetAttributesRequest>(), 8);
16336 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetAttributesRequest>(), 8);
16337
16338 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetAttributesRequest, query), 0);
16339
16340 unsafe impl ::fidl_next::Wire for NodeGetAttributesRequest {
16341 type Owned<'de> = NodeGetAttributesRequest;
16342
16343 #[inline]
16344 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16345 ::fidl_next::munge! {
16346 let Self {
16347
16348 query,
16349
16350 } = &mut *out_;
16351 }
16352
16353 ::fidl_next::Wire::zero_padding(query);
16354 }
16355 }
16356
16357 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetAttributesRequest
16358 where
16359 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16360 {
16361 fn decode(
16362 slot_: ::fidl_next::Slot<'_, Self>,
16363 decoder_: &mut ___D,
16364 _: (),
16365 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16366 ::fidl_next::munge! {
16367 let Self {
16368
16369 mut query,
16370
16371 } = slot_;
16372 }
16373
16374 let _field = query.as_mut();
16375
16376 ::fidl_next::Decode::decode(query.as_mut(), decoder_, ())?;
16377
16378 Ok(())
16379 }
16380 }
16381
16382 impl ::fidl_next::IntoNatural for NodeGetAttributesRequest {
16383 type Natural = crate::natural::NodeGetAttributesRequest;
16384 }
16385
16386 impl ::fidl_next::Unconstrained for NodeGetAttributesRequest {}
16387
16388 #[repr(C)]
16390 pub struct Options<'de> {
16391 pub(crate) table: ::fidl_next::WireTable<'de>,
16392 }
16393
16394 impl<'de> Drop for Options<'de> {
16395 fn drop(&mut self) {
16396 let _ = self.table.get(1).map(|envelope| unsafe {
16397 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
16398 });
16399
16400 let _ = self.table.get(2).map(|envelope| unsafe {
16401 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
16402 });
16403 }
16404 }
16405
16406 unsafe impl ::fidl_next::Wire for Options<'static> {
16407 type Owned<'de> = Options<'de>;
16408
16409 #[inline]
16410 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16411 ::fidl_next::munge!(let Self { table } = out);
16412 ::fidl_next::WireTable::zero_padding(table);
16413 }
16414 }
16415
16416 unsafe impl<___D> ::fidl_next::Decode<___D> for Options<'static>
16417 where
16418 ___D: ::fidl_next::Decoder + ?Sized,
16419 {
16420 fn decode(
16421 slot: ::fidl_next::Slot<'_, Self>,
16422 decoder: &mut ___D,
16423 _: (),
16424 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16425 ::fidl_next::munge!(let Self { table } = slot);
16426
16427 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16428 match ordinal {
16429 0 => unsafe { ::core::hint::unreachable_unchecked() },
16430
16431 1 => {
16432 ::fidl_next::WireEnvelope::decode_as::<
16433 ___D,
16434 crate::wire::NodeAttributesQuery,
16435 >(slot.as_mut(), decoder, ())?;
16436
16437 Ok(())
16438 }
16439
16440 2 => {
16441 ::fidl_next::WireEnvelope::decode_as::<
16442 ___D,
16443 crate::wire::MutableNodeAttributes<'static>,
16444 >(slot.as_mut(), decoder, ())?;
16445
16446 Ok(())
16447 }
16448
16449 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
16450 }
16451 })
16452 }
16453 }
16454
16455 impl<'de> Options<'de> {
16456 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributesQuery> {
16457 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16458 }
16459
16460 pub fn create_attributes(
16461 &self,
16462 ) -> ::core::option::Option<&crate::wire::MutableNodeAttributes<'de>> {
16463 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16464 }
16465 }
16466
16467 impl<'de> ::core::fmt::Debug for Options<'de> {
16468 fn fmt(
16469 &self,
16470 f: &mut ::core::fmt::Formatter<'_>,
16471 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16472 f.debug_struct("Options")
16473 .field("attributes", &self.attributes())
16474 .field("create_attributes", &self.create_attributes())
16475 .finish()
16476 }
16477 }
16478
16479 impl<'de> ::fidl_next::IntoNatural for Options<'de> {
16480 type Natural = crate::natural::Options;
16481 }
16482
16483 impl ::fidl_next::Unconstrained for Options<'_> {}
16484
16485 #[derive(Clone, Debug)]
16487 #[repr(C)]
16488 pub struct DirectoryObject {
16489 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
16490 }
16491
16492 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryObject>(), 1);
16493 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryObject>(), 1);
16494
16495 unsafe impl ::fidl_next::Wire for DirectoryObject {
16496 type Owned<'de> = DirectoryObject;
16497
16498 #[inline]
16499 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16500 ::fidl_next::munge! {
16501 let Self {
16502
16503 _empty,
16504
16505
16506 } = &mut *out_;
16507 }
16508 }
16509 }
16510
16511 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryObject
16512 where
16513 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16514 {
16515 fn decode(
16516 slot_: ::fidl_next::Slot<'_, Self>,
16517 decoder_: &mut ___D,
16518 _: (),
16519 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16520 ::fidl_next::munge! {
16521 let Self {
16522
16523 mut _empty,
16524
16525
16526 } = slot_;
16527 }
16528
16529 if _empty.as_bytes() != &[0u8] {
16530 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
16531 }
16532
16533 Ok(())
16534 }
16535 }
16536
16537 impl ::fidl_next::IntoNatural for DirectoryObject {
16538 type Natural = crate::natural::DirectoryObject;
16539 }
16540
16541 impl ::fidl_next::Unconstrained for DirectoryObject {}
16542
16543 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
16545 #[repr(transparent)]
16546 pub struct DirentType {
16547 pub(crate) value: u8,
16548 }
16549
16550 unsafe impl ::fidl_next::Wire for DirentType {
16551 type Owned<'de> = Self;
16552
16553 #[inline]
16554 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
16555 }
16557 }
16558
16559 impl DirentType {
16560 pub const UNKNOWN: DirentType = DirentType { value: 0 };
16561
16562 pub const DIRECTORY: DirentType = DirentType { value: 4 };
16563
16564 pub const BLOCK_DEVICE: DirentType = DirentType { value: 6 };
16565
16566 pub const FILE: DirentType = DirentType { value: 8 };
16567
16568 pub const SYMLINK: DirentType = DirentType { value: 10 };
16569
16570 pub const SERVICE: DirentType = DirentType { value: 16 };
16571 }
16572
16573 unsafe impl<___D> ::fidl_next::Decode<___D> for DirentType
16574 where
16575 ___D: ?Sized,
16576 {
16577 fn decode(
16578 slot: ::fidl_next::Slot<'_, Self>,
16579 _: &mut ___D,
16580 _: (),
16581 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16582 Ok(())
16583 }
16584 }
16585
16586 impl ::core::convert::From<crate::natural::DirentType> for DirentType {
16587 fn from(natural: crate::natural::DirentType) -> Self {
16588 match natural {
16589 crate::natural::DirentType::Unknown => DirentType::UNKNOWN,
16590
16591 crate::natural::DirentType::Directory => DirentType::DIRECTORY,
16592
16593 crate::natural::DirentType::BlockDevice => DirentType::BLOCK_DEVICE,
16594
16595 crate::natural::DirentType::File => DirentType::FILE,
16596
16597 crate::natural::DirentType::Symlink => DirentType::SYMLINK,
16598
16599 crate::natural::DirentType::Service => DirentType::SERVICE,
16600
16601 crate::natural::DirentType::UnknownOrdinal_(value) => {
16602 DirentType { value: u8::from(value) }
16603 }
16604 }
16605 }
16606 }
16607
16608 impl ::fidl_next::IntoNatural for DirentType {
16609 type Natural = crate::natural::DirentType;
16610 }
16611
16612 impl ::fidl_next::Unconstrained for DirentType {}
16613
16614 #[derive(Debug)]
16616 #[repr(C)]
16617 pub struct ExtendedAttributeIteratorGetNextResponse<'de> {
16618 pub attributes: ::fidl_next::WireVector<'de, ::fidl_next::WireVector<'de, u8>>,
16619
16620 pub last: bool,
16621 }
16622
16623 static_assertions::const_assert_eq!(
16624 std::mem::size_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
16625 24
16626 );
16627 static_assertions::const_assert_eq!(
16628 std::mem::align_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
16629 8
16630 );
16631
16632 static_assertions::const_assert_eq!(
16633 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, attributes),
16634 0
16635 );
16636
16637 static_assertions::const_assert_eq!(
16638 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, last),
16639 16
16640 );
16641
16642 unsafe impl ::fidl_next::Wire for ExtendedAttributeIteratorGetNextResponse<'static> {
16643 type Owned<'de> = ExtendedAttributeIteratorGetNextResponse<'de>;
16644
16645 #[inline]
16646 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16647 ::fidl_next::munge! {
16648 let Self {
16649
16650 attributes,
16651 last,
16652
16653 } = &mut *out_;
16654 }
16655
16656 ::fidl_next::Wire::zero_padding(attributes);
16657
16658 ::fidl_next::Wire::zero_padding(last);
16659
16660 unsafe {
16661 out_.as_mut_ptr().cast::<u8>().add(17).write_bytes(0, 7);
16662 }
16663 }
16664 }
16665
16666 unsafe impl<___D> ::fidl_next::Decode<___D> for ExtendedAttributeIteratorGetNextResponse<'static>
16667 where
16668 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16669 ___D: ::fidl_next::Decoder,
16670 {
16671 fn decode(
16672 slot_: ::fidl_next::Slot<'_, Self>,
16673 decoder_: &mut ___D,
16674 _: (),
16675 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16676 if slot_.as_bytes()[17..24] != [0u8; 7] {
16677 return Err(::fidl_next::DecodeError::InvalidPadding);
16678 }
16679
16680 ::fidl_next::munge! {
16681 let Self {
16682
16683 mut attributes,
16684 mut last,
16685
16686 } = slot_;
16687 }
16688
16689 let _field = attributes.as_mut();
16690 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
16691 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, (128, (255, ())))?;
16692
16693 let attributes = unsafe { attributes.deref_unchecked() };
16694
16695 if attributes.len() > 128 {
16696 return Err(::fidl_next::DecodeError::VectorTooLong {
16697 size: attributes.len() as u64,
16698 limit: 128,
16699 });
16700 }
16701
16702 let _field = last.as_mut();
16703
16704 ::fidl_next::Decode::decode(last.as_mut(), decoder_, ())?;
16705
16706 Ok(())
16707 }
16708 }
16709
16710 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeIteratorGetNextResponse<'de> {
16711 type Natural = crate::natural::ExtendedAttributeIteratorGetNextResponse;
16712 }
16713
16714 impl ::fidl_next::Unconstrained for ExtendedAttributeIteratorGetNextResponse<'static> {}
16715
16716 #[derive(Clone, Debug)]
16718 #[repr(C)]
16719 pub struct ReadableReadRequest {
16720 pub count: ::fidl_next::WireU64,
16721 }
16722
16723 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadRequest>(), 8);
16724 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadRequest>(), 8);
16725
16726 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadRequest, count), 0);
16727
16728 unsafe impl ::fidl_next::Wire for ReadableReadRequest {
16729 type Owned<'de> = ReadableReadRequest;
16730
16731 #[inline]
16732 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16733 ::fidl_next::munge! {
16734 let Self {
16735
16736 count,
16737
16738 } = &mut *out_;
16739 }
16740
16741 ::fidl_next::Wire::zero_padding(count);
16742 }
16743 }
16744
16745 unsafe impl<___D> ::fidl_next::Decode<___D> for ReadableReadRequest
16746 where
16747 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16748 {
16749 fn decode(
16750 slot_: ::fidl_next::Slot<'_, Self>,
16751 decoder_: &mut ___D,
16752 _: (),
16753 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16754 ::fidl_next::munge! {
16755 let Self {
16756
16757 mut count,
16758
16759 } = slot_;
16760 }
16761
16762 let _field = count.as_mut();
16763
16764 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
16765
16766 Ok(())
16767 }
16768 }
16769
16770 impl ::fidl_next::IntoNatural for ReadableReadRequest {
16771 type Natural = crate::natural::ReadableReadRequest;
16772 }
16773
16774 impl ::fidl_next::Unconstrained for ReadableReadRequest {}
16775
16776 pub type Transfer<'de> = ::fidl_next::WireVector<'de, u8>;
16778
16779 #[derive(Debug)]
16781 #[repr(C)]
16782 pub struct ReadableReadResponse<'de> {
16783 pub data: ::fidl_next::WireVector<'de, u8>,
16784 }
16785
16786 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadResponse<'_>>(), 16);
16787 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadResponse<'_>>(), 8);
16788
16789 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadResponse<'_>, data), 0);
16790
16791 unsafe impl ::fidl_next::Wire for ReadableReadResponse<'static> {
16792 type Owned<'de> = ReadableReadResponse<'de>;
16793
16794 #[inline]
16795 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16796 ::fidl_next::munge! {
16797 let Self {
16798
16799 data,
16800
16801 } = &mut *out_;
16802 }
16803
16804 ::fidl_next::Wire::zero_padding(data);
16805 }
16806 }
16807
16808 unsafe impl<___D> ::fidl_next::Decode<___D> for ReadableReadResponse<'static>
16809 where
16810 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16811 ___D: ::fidl_next::Decoder,
16812 {
16813 fn decode(
16814 slot_: ::fidl_next::Slot<'_, Self>,
16815 decoder_: &mut ___D,
16816 _: (),
16817 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16818 ::fidl_next::munge! {
16819 let Self {
16820
16821 mut data,
16822
16823 } = slot_;
16824 }
16825
16826 let _field = data.as_mut();
16827 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
16828 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
16829
16830 let data = unsafe { data.deref_unchecked() };
16831
16832 if data.len() > 8192 {
16833 return Err(::fidl_next::DecodeError::VectorTooLong {
16834 size: data.len() as u64,
16835 limit: 8192,
16836 });
16837 }
16838
16839 Ok(())
16840 }
16841 }
16842
16843 impl<'de> ::fidl_next::IntoNatural for ReadableReadResponse<'de> {
16844 type Natural = crate::natural::ReadableReadResponse;
16845 }
16846
16847 impl ::fidl_next::Unconstrained for ReadableReadResponse<'static> {}
16848
16849 #[derive(Debug)]
16851 #[repr(C)]
16852 pub struct WritableWriteRequest<'de> {
16853 pub data: ::fidl_next::WireVector<'de, u8>,
16854 }
16855
16856 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteRequest<'_>>(), 16);
16857 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteRequest<'_>>(), 8);
16858
16859 static_assertions::const_assert_eq!(std::mem::offset_of!(WritableWriteRequest<'_>, data), 0);
16860
16861 unsafe impl ::fidl_next::Wire for WritableWriteRequest<'static> {
16862 type Owned<'de> = WritableWriteRequest<'de>;
16863
16864 #[inline]
16865 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16866 ::fidl_next::munge! {
16867 let Self {
16868
16869 data,
16870
16871 } = &mut *out_;
16872 }
16873
16874 ::fidl_next::Wire::zero_padding(data);
16875 }
16876 }
16877
16878 unsafe impl<___D> ::fidl_next::Decode<___D> for WritableWriteRequest<'static>
16879 where
16880 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16881 ___D: ::fidl_next::Decoder,
16882 {
16883 fn decode(
16884 slot_: ::fidl_next::Slot<'_, Self>,
16885 decoder_: &mut ___D,
16886 _: (),
16887 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16888 ::fidl_next::munge! {
16889 let Self {
16890
16891 mut data,
16892
16893 } = slot_;
16894 }
16895
16896 let _field = data.as_mut();
16897 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
16898 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
16899
16900 let data = unsafe { data.deref_unchecked() };
16901
16902 if data.len() > 8192 {
16903 return Err(::fidl_next::DecodeError::VectorTooLong {
16904 size: data.len() as u64,
16905 limit: 8192,
16906 });
16907 }
16908
16909 Ok(())
16910 }
16911 }
16912
16913 impl<'de> ::fidl_next::IntoNatural for WritableWriteRequest<'de> {
16914 type Natural = crate::natural::WritableWriteRequest;
16915 }
16916
16917 impl ::fidl_next::Unconstrained for WritableWriteRequest<'static> {}
16918
16919 #[derive(Clone, Debug)]
16921 #[repr(C)]
16922 pub struct WritableWriteResponse {
16923 pub actual_count: ::fidl_next::WireU64,
16924 }
16925
16926 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteResponse>(), 8);
16927 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteResponse>(), 8);
16928
16929 static_assertions::const_assert_eq!(
16930 std::mem::offset_of!(WritableWriteResponse, actual_count),
16931 0
16932 );
16933
16934 unsafe impl ::fidl_next::Wire for WritableWriteResponse {
16935 type Owned<'de> = WritableWriteResponse;
16936
16937 #[inline]
16938 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16939 ::fidl_next::munge! {
16940 let Self {
16941
16942 actual_count,
16943
16944 } = &mut *out_;
16945 }
16946
16947 ::fidl_next::Wire::zero_padding(actual_count);
16948 }
16949 }
16950
16951 unsafe impl<___D> ::fidl_next::Decode<___D> for WritableWriteResponse
16952 where
16953 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16954 {
16955 fn decode(
16956 slot_: ::fidl_next::Slot<'_, Self>,
16957 decoder_: &mut ___D,
16958 _: (),
16959 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16960 ::fidl_next::munge! {
16961 let Self {
16962
16963 mut actual_count,
16964
16965 } = slot_;
16966 }
16967
16968 let _field = actual_count.as_mut();
16969
16970 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
16971
16972 Ok(())
16973 }
16974 }
16975
16976 impl ::fidl_next::IntoNatural for WritableWriteResponse {
16977 type Natural = crate::natural::WritableWriteResponse;
16978 }
16979
16980 impl ::fidl_next::Unconstrained for WritableWriteResponse {}
16981
16982 #[derive(Clone, Debug)]
16984 #[repr(C)]
16985 pub struct FileSeekRequest {
16986 pub origin: crate::wire::SeekOrigin,
16987
16988 pub offset: ::fidl_next::WireI64,
16989 }
16990
16991 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekRequest>(), 16);
16992 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekRequest>(), 8);
16993
16994 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, origin), 0);
16995
16996 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, offset), 8);
16997
16998 unsafe impl ::fidl_next::Wire for FileSeekRequest {
16999 type Owned<'de> = FileSeekRequest;
17000
17001 #[inline]
17002 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17003 ::fidl_next::munge! {
17004 let Self {
17005
17006 origin,
17007 offset,
17008
17009 } = &mut *out_;
17010 }
17011
17012 ::fidl_next::Wire::zero_padding(origin);
17013
17014 ::fidl_next::Wire::zero_padding(offset);
17015
17016 unsafe {
17017 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
17018 }
17019 }
17020 }
17021
17022 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekRequest
17023 where
17024 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17025 {
17026 fn decode(
17027 slot_: ::fidl_next::Slot<'_, Self>,
17028 decoder_: &mut ___D,
17029 _: (),
17030 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17031 if slot_.as_bytes()[4..8] != [0u8; 4] {
17032 return Err(::fidl_next::DecodeError::InvalidPadding);
17033 }
17034
17035 ::fidl_next::munge! {
17036 let Self {
17037
17038 mut origin,
17039 mut offset,
17040
17041 } = slot_;
17042 }
17043
17044 let _field = origin.as_mut();
17045
17046 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
17047
17048 let _field = offset.as_mut();
17049
17050 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
17051
17052 Ok(())
17053 }
17054 }
17055
17056 impl ::fidl_next::IntoNatural for FileSeekRequest {
17057 type Natural = crate::natural::FileSeekRequest;
17058 }
17059
17060 impl ::fidl_next::Unconstrained for FileSeekRequest {}
17061
17062 #[derive(Clone, Debug)]
17064 #[repr(C)]
17065 pub struct FileSeekResponse {
17066 pub offset_from_start: ::fidl_next::WireU64,
17067 }
17068
17069 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekResponse>(), 8);
17070 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekResponse>(), 8);
17071
17072 static_assertions::const_assert_eq!(
17073 std::mem::offset_of!(FileSeekResponse, offset_from_start),
17074 0
17075 );
17076
17077 unsafe impl ::fidl_next::Wire for FileSeekResponse {
17078 type Owned<'de> = FileSeekResponse;
17079
17080 #[inline]
17081 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17082 ::fidl_next::munge! {
17083 let Self {
17084
17085 offset_from_start,
17086
17087 } = &mut *out_;
17088 }
17089
17090 ::fidl_next::Wire::zero_padding(offset_from_start);
17091 }
17092 }
17093
17094 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekResponse
17095 where
17096 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17097 {
17098 fn decode(
17099 slot_: ::fidl_next::Slot<'_, Self>,
17100 decoder_: &mut ___D,
17101 _: (),
17102 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17103 ::fidl_next::munge! {
17104 let Self {
17105
17106 mut offset_from_start,
17107
17108 } = slot_;
17109 }
17110
17111 let _field = offset_from_start.as_mut();
17112
17113 ::fidl_next::Decode::decode(offset_from_start.as_mut(), decoder_, ())?;
17114
17115 Ok(())
17116 }
17117 }
17118
17119 impl ::fidl_next::IntoNatural for FileSeekResponse {
17120 type Natural = crate::natural::FileSeekResponse;
17121 }
17122
17123 impl ::fidl_next::Unconstrained for FileSeekResponse {}
17124
17125 #[derive(Clone, Debug)]
17127 #[repr(C)]
17128 pub struct FileReadAtRequest {
17129 pub count: ::fidl_next::WireU64,
17130
17131 pub offset: ::fidl_next::WireU64,
17132 }
17133
17134 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtRequest>(), 16);
17135 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtRequest>(), 8);
17136
17137 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, count), 0);
17138
17139 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, offset), 8);
17140
17141 unsafe impl ::fidl_next::Wire for FileReadAtRequest {
17142 type Owned<'de> = FileReadAtRequest;
17143
17144 #[inline]
17145 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17146 ::fidl_next::munge! {
17147 let Self {
17148
17149 count,
17150 offset,
17151
17152 } = &mut *out_;
17153 }
17154
17155 ::fidl_next::Wire::zero_padding(count);
17156
17157 ::fidl_next::Wire::zero_padding(offset);
17158 }
17159 }
17160
17161 unsafe impl<___D> ::fidl_next::Decode<___D> for FileReadAtRequest
17162 where
17163 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17164 {
17165 fn decode(
17166 slot_: ::fidl_next::Slot<'_, Self>,
17167 decoder_: &mut ___D,
17168 _: (),
17169 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17170 ::fidl_next::munge! {
17171 let Self {
17172
17173 mut count,
17174 mut offset,
17175
17176 } = slot_;
17177 }
17178
17179 let _field = count.as_mut();
17180
17181 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
17182
17183 let _field = offset.as_mut();
17184
17185 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
17186
17187 Ok(())
17188 }
17189 }
17190
17191 impl ::fidl_next::IntoNatural for FileReadAtRequest {
17192 type Natural = crate::natural::FileReadAtRequest;
17193 }
17194
17195 impl ::fidl_next::Unconstrained for FileReadAtRequest {}
17196
17197 #[derive(Debug)]
17199 #[repr(C)]
17200 pub struct FileReadAtResponse<'de> {
17201 pub data: ::fidl_next::WireVector<'de, u8>,
17202 }
17203
17204 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtResponse<'_>>(), 16);
17205 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtResponse<'_>>(), 8);
17206
17207 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtResponse<'_>, data), 0);
17208
17209 unsafe impl ::fidl_next::Wire for FileReadAtResponse<'static> {
17210 type Owned<'de> = FileReadAtResponse<'de>;
17211
17212 #[inline]
17213 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17214 ::fidl_next::munge! {
17215 let Self {
17216
17217 data,
17218
17219 } = &mut *out_;
17220 }
17221
17222 ::fidl_next::Wire::zero_padding(data);
17223 }
17224 }
17225
17226 unsafe impl<___D> ::fidl_next::Decode<___D> for FileReadAtResponse<'static>
17227 where
17228 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17229 ___D: ::fidl_next::Decoder,
17230 {
17231 fn decode(
17232 slot_: ::fidl_next::Slot<'_, Self>,
17233 decoder_: &mut ___D,
17234 _: (),
17235 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17236 ::fidl_next::munge! {
17237 let Self {
17238
17239 mut data,
17240
17241 } = slot_;
17242 }
17243
17244 let _field = data.as_mut();
17245 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
17246 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
17247
17248 let data = unsafe { data.deref_unchecked() };
17249
17250 if data.len() > 8192 {
17251 return Err(::fidl_next::DecodeError::VectorTooLong {
17252 size: data.len() as u64,
17253 limit: 8192,
17254 });
17255 }
17256
17257 Ok(())
17258 }
17259 }
17260
17261 impl<'de> ::fidl_next::IntoNatural for FileReadAtResponse<'de> {
17262 type Natural = crate::natural::FileReadAtResponse;
17263 }
17264
17265 impl ::fidl_next::Unconstrained for FileReadAtResponse<'static> {}
17266
17267 #[derive(Debug)]
17269 #[repr(C)]
17270 pub struct FileWriteAtRequest<'de> {
17271 pub data: ::fidl_next::WireVector<'de, u8>,
17272
17273 pub offset: ::fidl_next::WireU64,
17274 }
17275
17276 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtRequest<'_>>(), 24);
17277 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtRequest<'_>>(), 8);
17278
17279 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, data), 0);
17280
17281 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, offset), 16);
17282
17283 unsafe impl ::fidl_next::Wire for FileWriteAtRequest<'static> {
17284 type Owned<'de> = FileWriteAtRequest<'de>;
17285
17286 #[inline]
17287 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17288 ::fidl_next::munge! {
17289 let Self {
17290
17291 data,
17292 offset,
17293
17294 } = &mut *out_;
17295 }
17296
17297 ::fidl_next::Wire::zero_padding(data);
17298
17299 ::fidl_next::Wire::zero_padding(offset);
17300 }
17301 }
17302
17303 unsafe impl<___D> ::fidl_next::Decode<___D> for FileWriteAtRequest<'static>
17304 where
17305 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17306 ___D: ::fidl_next::Decoder,
17307 {
17308 fn decode(
17309 slot_: ::fidl_next::Slot<'_, Self>,
17310 decoder_: &mut ___D,
17311 _: (),
17312 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17313 ::fidl_next::munge! {
17314 let Self {
17315
17316 mut data,
17317 mut offset,
17318
17319 } = slot_;
17320 }
17321
17322 let _field = data.as_mut();
17323 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
17324 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
17325
17326 let data = unsafe { data.deref_unchecked() };
17327
17328 if data.len() > 8192 {
17329 return Err(::fidl_next::DecodeError::VectorTooLong {
17330 size: data.len() as u64,
17331 limit: 8192,
17332 });
17333 }
17334
17335 let _field = offset.as_mut();
17336
17337 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
17338
17339 Ok(())
17340 }
17341 }
17342
17343 impl<'de> ::fidl_next::IntoNatural for FileWriteAtRequest<'de> {
17344 type Natural = crate::natural::FileWriteAtRequest;
17345 }
17346
17347 impl ::fidl_next::Unconstrained for FileWriteAtRequest<'static> {}
17348
17349 #[derive(Clone, Debug)]
17351 #[repr(C)]
17352 pub struct FileWriteAtResponse {
17353 pub actual_count: ::fidl_next::WireU64,
17354 }
17355
17356 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtResponse>(), 8);
17357 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtResponse>(), 8);
17358
17359 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtResponse, actual_count), 0);
17360
17361 unsafe impl ::fidl_next::Wire for FileWriteAtResponse {
17362 type Owned<'de> = FileWriteAtResponse;
17363
17364 #[inline]
17365 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17366 ::fidl_next::munge! {
17367 let Self {
17368
17369 actual_count,
17370
17371 } = &mut *out_;
17372 }
17373
17374 ::fidl_next::Wire::zero_padding(actual_count);
17375 }
17376 }
17377
17378 unsafe impl<___D> ::fidl_next::Decode<___D> for FileWriteAtResponse
17379 where
17380 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17381 {
17382 fn decode(
17383 slot_: ::fidl_next::Slot<'_, Self>,
17384 decoder_: &mut ___D,
17385 _: (),
17386 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17387 ::fidl_next::munge! {
17388 let Self {
17389
17390 mut actual_count,
17391
17392 } = slot_;
17393 }
17394
17395 let _field = actual_count.as_mut();
17396
17397 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
17398
17399 Ok(())
17400 }
17401 }
17402
17403 impl ::fidl_next::IntoNatural for FileWriteAtResponse {
17404 type Natural = crate::natural::FileWriteAtResponse;
17405 }
17406
17407 impl ::fidl_next::Unconstrained for FileWriteAtResponse {}
17408
17409 #[derive(Clone, Debug)]
17411 #[repr(C)]
17412 pub struct FileResizeRequest {
17413 pub length: ::fidl_next::WireU64,
17414 }
17415
17416 static_assertions::const_assert_eq!(std::mem::size_of::<FileResizeRequest>(), 8);
17417 static_assertions::const_assert_eq!(std::mem::align_of::<FileResizeRequest>(), 8);
17418
17419 static_assertions::const_assert_eq!(std::mem::offset_of!(FileResizeRequest, length), 0);
17420
17421 unsafe impl ::fidl_next::Wire for FileResizeRequest {
17422 type Owned<'de> = FileResizeRequest;
17423
17424 #[inline]
17425 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17426 ::fidl_next::munge! {
17427 let Self {
17428
17429 length,
17430
17431 } = &mut *out_;
17432 }
17433
17434 ::fidl_next::Wire::zero_padding(length);
17435 }
17436 }
17437
17438 unsafe impl<___D> ::fidl_next::Decode<___D> for FileResizeRequest
17439 where
17440 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17441 {
17442 fn decode(
17443 slot_: ::fidl_next::Slot<'_, Self>,
17444 decoder_: &mut ___D,
17445 _: (),
17446 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17447 ::fidl_next::munge! {
17448 let Self {
17449
17450 mut length,
17451
17452 } = slot_;
17453 }
17454
17455 let _field = length.as_mut();
17456
17457 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
17458
17459 Ok(())
17460 }
17461 }
17462
17463 impl ::fidl_next::IntoNatural for FileResizeRequest {
17464 type Natural = crate::natural::FileResizeRequest;
17465 }
17466
17467 impl ::fidl_next::Unconstrained for FileResizeRequest {}
17468
17469 #[derive(Clone, Debug)]
17471 #[repr(C)]
17472 pub struct FileResizeResponse {
17473 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17474 }
17475
17476 static_assertions::const_assert_eq!(std::mem::size_of::<FileResizeResponse>(), 1);
17477 static_assertions::const_assert_eq!(std::mem::align_of::<FileResizeResponse>(), 1);
17478
17479 unsafe impl ::fidl_next::Wire for FileResizeResponse {
17480 type Owned<'de> = FileResizeResponse;
17481
17482 #[inline]
17483 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17484 ::fidl_next::munge! {
17485 let Self {
17486
17487 _empty,
17488
17489
17490 } = &mut *out_;
17491 }
17492 }
17493 }
17494
17495 unsafe impl<___D> ::fidl_next::Decode<___D> for FileResizeResponse
17496 where
17497 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17498 {
17499 fn decode(
17500 slot_: ::fidl_next::Slot<'_, Self>,
17501 decoder_: &mut ___D,
17502 _: (),
17503 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17504 ::fidl_next::munge! {
17505 let Self {
17506
17507 mut _empty,
17508
17509
17510 } = slot_;
17511 }
17512
17513 if _empty.as_bytes() != &[0u8] {
17514 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
17515 }
17516
17517 Ok(())
17518 }
17519 }
17520
17521 impl ::fidl_next::IntoNatural for FileResizeResponse {
17522 type Natural = crate::natural::FileResizeResponse;
17523 }
17524
17525 impl ::fidl_next::Unconstrained for FileResizeResponse {}
17526
17527 #[derive(Clone, Copy, Debug)]
17529 #[repr(transparent)]
17530 pub struct VmoFlags {
17531 pub(crate) value: ::fidl_next::WireU32,
17532 }
17533
17534 unsafe impl ::fidl_next::Wire for VmoFlags {
17535 type Owned<'de> = Self;
17536
17537 #[inline]
17538 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
17539 }
17541 }
17542
17543 unsafe impl<___D> ::fidl_next::Decode<___D> for VmoFlags
17544 where
17545 ___D: ?Sized,
17546 {
17547 fn decode(
17548 slot: ::fidl_next::Slot<'_, Self>,
17549 _: &mut ___D,
17550 _: (),
17551 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17552 ::fidl_next::munge!(let Self { value } = slot);
17553 let set = u32::from(*value);
17554 if set & !crate::natural::VmoFlags::all().bits() != 0 {
17555 return Err(::fidl_next::DecodeError::InvalidBits {
17556 expected: crate::natural::VmoFlags::all().bits() as usize,
17557 actual: set as usize,
17558 });
17559 }
17560
17561 Ok(())
17562 }
17563 }
17564
17565 impl ::core::convert::From<crate::natural::VmoFlags> for VmoFlags {
17566 fn from(natural: crate::natural::VmoFlags) -> Self {
17567 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
17568 }
17569 }
17570
17571 impl ::fidl_next::IntoNatural for VmoFlags {
17572 type Natural = crate::natural::VmoFlags;
17573 }
17574
17575 impl ::fidl_next::Unconstrained for VmoFlags {}
17576
17577 #[derive(Clone, Debug)]
17579 #[repr(C)]
17580 pub struct FileGetBackingMemoryRequest {
17581 pub flags: crate::wire::VmoFlags,
17582 }
17583
17584 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryRequest>(), 4);
17585 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryRequest>(), 4);
17586
17587 static_assertions::const_assert_eq!(
17588 std::mem::offset_of!(FileGetBackingMemoryRequest, flags),
17589 0
17590 );
17591
17592 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryRequest {
17593 type Owned<'de> = FileGetBackingMemoryRequest;
17594
17595 #[inline]
17596 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17597 ::fidl_next::munge! {
17598 let Self {
17599
17600 flags,
17601
17602 } = &mut *out_;
17603 }
17604
17605 ::fidl_next::Wire::zero_padding(flags);
17606 }
17607 }
17608
17609 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryRequest
17610 where
17611 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17612 {
17613 fn decode(
17614 slot_: ::fidl_next::Slot<'_, Self>,
17615 decoder_: &mut ___D,
17616 _: (),
17617 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17618 ::fidl_next::munge! {
17619 let Self {
17620
17621 mut flags,
17622
17623 } = slot_;
17624 }
17625
17626 let _field = flags.as_mut();
17627
17628 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
17629
17630 Ok(())
17631 }
17632 }
17633
17634 impl ::fidl_next::IntoNatural for FileGetBackingMemoryRequest {
17635 type Natural = crate::natural::FileGetBackingMemoryRequest;
17636 }
17637
17638 impl ::fidl_next::Unconstrained for FileGetBackingMemoryRequest {}
17639
17640 #[derive(Clone, Debug)]
17642 #[repr(C)]
17643 pub struct LinkableLinkIntoResponse {
17644 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17645 }
17646
17647 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoResponse>(), 1);
17648 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoResponse>(), 1);
17649
17650 unsafe impl ::fidl_next::Wire for LinkableLinkIntoResponse {
17651 type Owned<'de> = LinkableLinkIntoResponse;
17652
17653 #[inline]
17654 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17655 ::fidl_next::munge! {
17656 let Self {
17657
17658 _empty,
17659
17660
17661 } = &mut *out_;
17662 }
17663 }
17664 }
17665
17666 unsafe impl<___D> ::fidl_next::Decode<___D> for LinkableLinkIntoResponse
17667 where
17668 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17669 {
17670 fn decode(
17671 slot_: ::fidl_next::Slot<'_, Self>,
17672 decoder_: &mut ___D,
17673 _: (),
17674 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17675 ::fidl_next::munge! {
17676 let Self {
17677
17678 mut _empty,
17679
17680
17681 } = slot_;
17682 }
17683
17684 if _empty.as_bytes() != &[0u8] {
17685 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
17686 }
17687
17688 Ok(())
17689 }
17690 }
17691
17692 impl ::fidl_next::IntoNatural for LinkableLinkIntoResponse {
17693 type Natural = crate::natural::LinkableLinkIntoResponse;
17694 }
17695
17696 impl ::fidl_next::Unconstrained for LinkableLinkIntoResponse {}
17697
17698 #[derive(Clone, Debug)]
17700 #[repr(C)]
17701 pub struct FileAllocateResponse {
17702 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17703 }
17704
17705 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateResponse>(), 1);
17706 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateResponse>(), 1);
17707
17708 unsafe impl ::fidl_next::Wire for FileAllocateResponse {
17709 type Owned<'de> = FileAllocateResponse;
17710
17711 #[inline]
17712 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17713 ::fidl_next::munge! {
17714 let Self {
17715
17716 _empty,
17717
17718
17719 } = &mut *out_;
17720 }
17721 }
17722 }
17723
17724 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateResponse
17725 where
17726 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17727 {
17728 fn decode(
17729 slot_: ::fidl_next::Slot<'_, Self>,
17730 decoder_: &mut ___D,
17731 _: (),
17732 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17733 ::fidl_next::munge! {
17734 let Self {
17735
17736 mut _empty,
17737
17738
17739 } = slot_;
17740 }
17741
17742 if _empty.as_bytes() != &[0u8] {
17743 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
17744 }
17745
17746 Ok(())
17747 }
17748 }
17749
17750 impl ::fidl_next::IntoNatural for FileAllocateResponse {
17751 type Natural = crate::natural::FileAllocateResponse;
17752 }
17753
17754 impl ::fidl_next::Unconstrained for FileAllocateResponse {}
17755
17756 #[derive(Clone, Debug)]
17758 #[repr(C)]
17759 pub struct FileEnableVerityResponse {
17760 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17761 }
17762
17763 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityResponse>(), 1);
17764 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityResponse>(), 1);
17765
17766 unsafe impl ::fidl_next::Wire for FileEnableVerityResponse {
17767 type Owned<'de> = FileEnableVerityResponse;
17768
17769 #[inline]
17770 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17771 ::fidl_next::munge! {
17772 let Self {
17773
17774 _empty,
17775
17776
17777 } = &mut *out_;
17778 }
17779 }
17780 }
17781
17782 unsafe impl<___D> ::fidl_next::Decode<___D> for FileEnableVerityResponse
17783 where
17784 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17785 {
17786 fn decode(
17787 slot_: ::fidl_next::Slot<'_, Self>,
17788 decoder_: &mut ___D,
17789 _: (),
17790 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17791 ::fidl_next::munge! {
17792 let Self {
17793
17794 mut _empty,
17795
17796
17797 } = slot_;
17798 }
17799
17800 if _empty.as_bytes() != &[0u8] {
17801 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
17802 }
17803
17804 Ok(())
17805 }
17806 }
17807
17808 impl ::fidl_next::IntoNatural for FileEnableVerityResponse {
17809 type Natural = crate::natural::FileEnableVerityResponse;
17810 }
17811
17812 impl ::fidl_next::Unconstrained for FileEnableVerityResponse {}
17813
17814 #[derive(Clone, Copy, Debug)]
17816 #[repr(transparent)]
17817 pub struct FileSignal {
17818 pub(crate) value: ::fidl_next::WireU32,
17819 }
17820
17821 unsafe impl ::fidl_next::Wire for FileSignal {
17822 type Owned<'de> = Self;
17823
17824 #[inline]
17825 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
17826 }
17828 }
17829
17830 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSignal
17831 where
17832 ___D: ?Sized,
17833 {
17834 fn decode(
17835 slot: ::fidl_next::Slot<'_, Self>,
17836 _: &mut ___D,
17837 _: (),
17838 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17839 ::fidl_next::munge!(let Self { value } = slot);
17840 let set = u32::from(*value);
17841 if set & !crate::natural::FileSignal::all().bits() != 0 {
17842 return Err(::fidl_next::DecodeError::InvalidBits {
17843 expected: crate::natural::FileSignal::all().bits() as usize,
17844 actual: set as usize,
17845 });
17846 }
17847
17848 Ok(())
17849 }
17850 }
17851
17852 impl ::core::convert::From<crate::natural::FileSignal> for FileSignal {
17853 fn from(natural: crate::natural::FileSignal) -> Self {
17854 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
17855 }
17856 }
17857
17858 impl ::fidl_next::IntoNatural for FileSignal {
17859 type Natural = crate::natural::FileSignal;
17860 }
17861
17862 impl ::fidl_next::Unconstrained for FileSignal {}
17863
17864 #[derive(Clone, Debug)]
17866 #[repr(C)]
17867 pub struct FilesystemInfo {
17868 pub total_bytes: ::fidl_next::WireU64,
17869
17870 pub used_bytes: ::fidl_next::WireU64,
17871
17872 pub total_nodes: ::fidl_next::WireU64,
17873
17874 pub used_nodes: ::fidl_next::WireU64,
17875
17876 pub free_shared_pool_bytes: ::fidl_next::WireU64,
17877
17878 pub fs_id: ::fidl_next::WireU64,
17879
17880 pub block_size: ::fidl_next::WireU32,
17881
17882 pub max_filename_size: ::fidl_next::WireU32,
17883
17884 pub fs_type: ::fidl_next::WireU32,
17885
17886 pub padding: ::fidl_next::WireU32,
17887
17888 pub name: [i8; 32],
17889 }
17890
17891 static_assertions::const_assert_eq!(std::mem::size_of::<FilesystemInfo>(), 96);
17892 static_assertions::const_assert_eq!(std::mem::align_of::<FilesystemInfo>(), 8);
17893
17894 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_bytes), 0);
17895
17896 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_bytes), 8);
17897
17898 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_nodes), 16);
17899
17900 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_nodes), 24);
17901
17902 static_assertions::const_assert_eq!(
17903 std::mem::offset_of!(FilesystemInfo, free_shared_pool_bytes),
17904 32
17905 );
17906
17907 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_id), 40);
17908
17909 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, block_size), 48);
17910
17911 static_assertions::const_assert_eq!(
17912 std::mem::offset_of!(FilesystemInfo, max_filename_size),
17913 52
17914 );
17915
17916 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_type), 56);
17917
17918 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, padding), 60);
17919
17920 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, name), 64);
17921
17922 unsafe impl ::fidl_next::Wire for FilesystemInfo {
17923 type Owned<'de> = FilesystemInfo;
17924
17925 #[inline]
17926 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17927 ::fidl_next::munge! {
17928 let Self {
17929
17930 total_bytes,
17931 used_bytes,
17932 total_nodes,
17933 used_nodes,
17934 free_shared_pool_bytes,
17935 fs_id,
17936 block_size,
17937 max_filename_size,
17938 fs_type,
17939 padding,
17940 name,
17941
17942 } = &mut *out_;
17943 }
17944
17945 ::fidl_next::Wire::zero_padding(total_bytes);
17946
17947 ::fidl_next::Wire::zero_padding(used_bytes);
17948
17949 ::fidl_next::Wire::zero_padding(total_nodes);
17950
17951 ::fidl_next::Wire::zero_padding(used_nodes);
17952
17953 ::fidl_next::Wire::zero_padding(free_shared_pool_bytes);
17954
17955 ::fidl_next::Wire::zero_padding(fs_id);
17956
17957 ::fidl_next::Wire::zero_padding(block_size);
17958
17959 ::fidl_next::Wire::zero_padding(max_filename_size);
17960
17961 ::fidl_next::Wire::zero_padding(fs_type);
17962
17963 ::fidl_next::Wire::zero_padding(padding);
17964
17965 ::fidl_next::Wire::zero_padding(name);
17966 }
17967 }
17968
17969 unsafe impl<___D> ::fidl_next::Decode<___D> for FilesystemInfo
17970 where
17971 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17972 {
17973 fn decode(
17974 slot_: ::fidl_next::Slot<'_, Self>,
17975 decoder_: &mut ___D,
17976 _: (),
17977 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17978 ::fidl_next::munge! {
17979 let Self {
17980
17981 mut total_bytes,
17982 mut used_bytes,
17983 mut total_nodes,
17984 mut used_nodes,
17985 mut free_shared_pool_bytes,
17986 mut fs_id,
17987 mut block_size,
17988 mut max_filename_size,
17989 mut fs_type,
17990 mut padding,
17991 mut name,
17992
17993 } = slot_;
17994 }
17995
17996 let _field = total_bytes.as_mut();
17997
17998 ::fidl_next::Decode::decode(total_bytes.as_mut(), decoder_, ())?;
17999
18000 let _field = used_bytes.as_mut();
18001
18002 ::fidl_next::Decode::decode(used_bytes.as_mut(), decoder_, ())?;
18003
18004 let _field = total_nodes.as_mut();
18005
18006 ::fidl_next::Decode::decode(total_nodes.as_mut(), decoder_, ())?;
18007
18008 let _field = used_nodes.as_mut();
18009
18010 ::fidl_next::Decode::decode(used_nodes.as_mut(), decoder_, ())?;
18011
18012 let _field = free_shared_pool_bytes.as_mut();
18013
18014 ::fidl_next::Decode::decode(free_shared_pool_bytes.as_mut(), decoder_, ())?;
18015
18016 let _field = fs_id.as_mut();
18017
18018 ::fidl_next::Decode::decode(fs_id.as_mut(), decoder_, ())?;
18019
18020 let _field = block_size.as_mut();
18021
18022 ::fidl_next::Decode::decode(block_size.as_mut(), decoder_, ())?;
18023
18024 let _field = max_filename_size.as_mut();
18025
18026 ::fidl_next::Decode::decode(max_filename_size.as_mut(), decoder_, ())?;
18027
18028 let _field = fs_type.as_mut();
18029
18030 ::fidl_next::Decode::decode(fs_type.as_mut(), decoder_, ())?;
18031
18032 let _field = padding.as_mut();
18033
18034 ::fidl_next::Decode::decode(padding.as_mut(), decoder_, ())?;
18035
18036 let _field = name.as_mut();
18037
18038 ::fidl_next::Decode::decode(name.as_mut(), decoder_, ())?;
18039
18040 Ok(())
18041 }
18042 }
18043
18044 impl ::fidl_next::IntoNatural for FilesystemInfo {
18045 type Natural = crate::natural::FilesystemInfo;
18046 }
18047
18048 impl ::fidl_next::Unconstrained for FilesystemInfo {}
18049
18050 #[derive(Clone, Debug)]
18052 #[repr(C)]
18053 pub struct Service {
18054 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
18055 }
18056
18057 static_assertions::const_assert_eq!(std::mem::size_of::<Service>(), 1);
18058 static_assertions::const_assert_eq!(std::mem::align_of::<Service>(), 1);
18059
18060 unsafe impl ::fidl_next::Wire for Service {
18061 type Owned<'de> = Service;
18062
18063 #[inline]
18064 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18065 ::fidl_next::munge! {
18066 let Self {
18067
18068 _empty,
18069
18070
18071 } = &mut *out_;
18072 }
18073 }
18074 }
18075
18076 unsafe impl<___D> ::fidl_next::Decode<___D> for Service
18077 where
18078 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18079 {
18080 fn decode(
18081 slot_: ::fidl_next::Slot<'_, Self>,
18082 decoder_: &mut ___D,
18083 _: (),
18084 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18085 ::fidl_next::munge! {
18086 let Self {
18087
18088 mut _empty,
18089
18090
18091 } = slot_;
18092 }
18093
18094 if _empty.as_bytes() != &[0u8] {
18095 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
18096 }
18097
18098 Ok(())
18099 }
18100 }
18101
18102 impl ::fidl_next::IntoNatural for Service {
18103 type Natural = crate::natural::Service;
18104 }
18105
18106 impl ::fidl_next::Unconstrained for Service {}
18107
18108 #[derive(Debug)]
18110 #[repr(C)]
18111 pub struct SymlinkObject<'de> {
18112 pub target: ::fidl_next::WireVector<'de, u8>,
18113 }
18114
18115 static_assertions::const_assert_eq!(std::mem::size_of::<SymlinkObject<'_>>(), 16);
18116 static_assertions::const_assert_eq!(std::mem::align_of::<SymlinkObject<'_>>(), 8);
18117
18118 static_assertions::const_assert_eq!(std::mem::offset_of!(SymlinkObject<'_>, target), 0);
18119
18120 unsafe impl ::fidl_next::Wire for SymlinkObject<'static> {
18121 type Owned<'de> = SymlinkObject<'de>;
18122
18123 #[inline]
18124 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18125 ::fidl_next::munge! {
18126 let Self {
18127
18128 target,
18129
18130 } = &mut *out_;
18131 }
18132
18133 ::fidl_next::Wire::zero_padding(target);
18134 }
18135 }
18136
18137 unsafe impl<___D> ::fidl_next::Decode<___D> for SymlinkObject<'static>
18138 where
18139 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18140 ___D: ::fidl_next::Decoder,
18141 {
18142 fn decode(
18143 slot_: ::fidl_next::Slot<'_, Self>,
18144 decoder_: &mut ___D,
18145 _: (),
18146 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18147 ::fidl_next::munge! {
18148 let Self {
18149
18150 mut target,
18151
18152 } = slot_;
18153 }
18154
18155 let _field = target.as_mut();
18156 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
18157 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
18158
18159 let target = unsafe { target.deref_unchecked() };
18160
18161 if target.len() > 4095 {
18162 return Err(::fidl_next::DecodeError::VectorTooLong {
18163 size: target.len() as u64,
18164 limit: 4095,
18165 });
18166 }
18167
18168 Ok(())
18169 }
18170 }
18171
18172 impl<'de> ::fidl_next::IntoNatural for SymlinkObject<'de> {
18173 type Natural = crate::natural::SymlinkObject;
18174 }
18175
18176 impl ::fidl_next::Unconstrained for SymlinkObject<'static> {}
18177
18178 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
18180 #[repr(transparent)]
18181 pub struct WatchEvent {
18182 pub(crate) value: u8,
18183 }
18184
18185 unsafe impl ::fidl_next::Wire for WatchEvent {
18186 type Owned<'de> = Self;
18187
18188 #[inline]
18189 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
18190 }
18192 }
18193
18194 impl WatchEvent {
18195 pub const DELETED: WatchEvent = WatchEvent { value: 0 };
18196
18197 pub const ADDED: WatchEvent = WatchEvent { value: 1 };
18198
18199 pub const REMOVED: WatchEvent = WatchEvent { value: 2 };
18200
18201 pub const EXISTING: WatchEvent = WatchEvent { value: 3 };
18202
18203 pub const IDLE: WatchEvent = WatchEvent { value: 4 };
18204 }
18205
18206 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchEvent
18207 where
18208 ___D: ?Sized,
18209 {
18210 fn decode(
18211 slot: ::fidl_next::Slot<'_, Self>,
18212 _: &mut ___D,
18213 _: (),
18214 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18215 ::fidl_next::munge!(let Self { value } = slot);
18216
18217 match u8::from(*value) {
18218 0 | 1 | 2 | 3 | 4 => (),
18219 unknown => {
18220 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
18221 }
18222 }
18223
18224 Ok(())
18225 }
18226 }
18227
18228 impl ::core::convert::From<crate::natural::WatchEvent> for WatchEvent {
18229 fn from(natural: crate::natural::WatchEvent) -> Self {
18230 match natural {
18231 crate::natural::WatchEvent::Deleted => WatchEvent::DELETED,
18232
18233 crate::natural::WatchEvent::Added => WatchEvent::ADDED,
18234
18235 crate::natural::WatchEvent::Removed => WatchEvent::REMOVED,
18236
18237 crate::natural::WatchEvent::Existing => WatchEvent::EXISTING,
18238
18239 crate::natural::WatchEvent::Idle => WatchEvent::IDLE,
18240 }
18241 }
18242 }
18243
18244 impl ::fidl_next::IntoNatural for WatchEvent {
18245 type Natural = crate::natural::WatchEvent;
18246 }
18247
18248 impl ::fidl_next::Unconstrained for WatchEvent {}
18249}
18250
18251pub mod wire_optional {
18252
18253 #[repr(transparent)]
18254 pub struct SelinuxContext<'de> {
18255 pub(crate) raw: ::fidl_next::RawWireUnion,
18256 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
18257 }
18258
18259 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
18260 type Owned<'de> = SelinuxContext<'de>;
18261
18262 #[inline]
18263 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
18264 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
18265 ::fidl_next::RawWireUnion::zero_padding(raw);
18266 }
18267 }
18268
18269 impl<'de> SelinuxContext<'de> {
18270 pub fn is_some(&self) -> bool {
18271 self.raw.is_some()
18272 }
18273
18274 pub fn is_none(&self) -> bool {
18275 self.raw.is_none()
18276 }
18277
18278 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
18279 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
18280 }
18281
18282 pub fn into_option(self) -> ::core::option::Option<crate::wire::SelinuxContext<'de>> {
18283 if self.is_some() {
18284 Some(crate::wire::SelinuxContext {
18285 raw: self.raw,
18286 _phantom: ::core::marker::PhantomData,
18287 })
18288 } else {
18289 None
18290 }
18291 }
18292 }
18293
18294 unsafe impl<___D> ::fidl_next::Decode<___D> for SelinuxContext<'static>
18295 where
18296 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18297 ___D: ::fidl_next::Decoder,
18298 {
18299 fn decode(
18300 mut slot: ::fidl_next::Slot<'_, Self>,
18301 decoder: &mut ___D,
18302 _: (),
18303 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18304 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
18305 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
18306 1 => ::fidl_next::RawWireUnion::decode_as::<
18307 ___D,
18308 ::fidl_next::WireVector<'static, u8>,
18309 >(raw, decoder, (256, ()))?,
18310
18311 2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::wire::EmptyStruct>(
18312 raw,
18313 decoder,
18314 (),
18315 )?,
18316
18317 0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
18318 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
18319 }
18320
18321 Ok(())
18322 }
18323 }
18324
18325 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
18326 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
18327 self.as_ref().fmt(f)
18328 }
18329 }
18330
18331 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
18332 type Natural = ::core::option::Option<crate::natural::SelinuxContext>;
18333 }
18334
18335 impl ::fidl_next::Unconstrained for SelinuxContext<'static> {}
18336}
18337
18338pub mod generic {
18339
18340 pub struct AdvisoryLockRange<T0, T1, T2> {
18341 pub origin: T0,
18342
18343 pub offset: T1,
18344
18345 pub length: T2,
18346 }
18347
18348 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
18349 for AdvisoryLockRange<T0, T1, T2>
18350 where
18351 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18352 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
18353 T1: ::fidl_next::Encode<::fidl_next::WireI64, ___E>,
18354 T2: ::fidl_next::Encode<::fidl_next::WireI64, ___E>,
18355 {
18356 #[inline]
18357 fn encode(
18358 self,
18359 encoder_: &mut ___E,
18360 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
18361 _: (),
18362 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18363 ::fidl_next::munge! {
18364 let crate::wire::AdvisoryLockRange {
18365
18366 origin,
18367 offset,
18368 length,
18369
18370 } = out_;
18371 }
18372
18373 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
18374
18375 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
18376
18377 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
18378
18379 Ok(())
18380 }
18381 }
18382
18383 pub struct AdvisoryLockingAdvisoryLockRequest<T0> {
18384 pub request: T0,
18385 }
18386
18387 unsafe impl<___E, T0>
18388 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
18389 for AdvisoryLockingAdvisoryLockRequest<T0>
18390 where
18391 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18392 ___E: ::fidl_next::Encoder,
18393 T0: ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>,
18394 {
18395 #[inline]
18396 fn encode(
18397 self,
18398 encoder_: &mut ___E,
18399 out_: &mut ::core::mem::MaybeUninit<
18400 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
18401 >,
18402 _: (),
18403 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18404 ::fidl_next::munge! {
18405 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
18406
18407 request,
18408
18409 } = out_;
18410 }
18411
18412 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
18413
18414 Ok(())
18415 }
18416 }
18417
18418 pub struct NodeAttributes<T0, T1, T2, T3, T4, T5, T6> {
18419 pub mode: T0,
18420
18421 pub id: T1,
18422
18423 pub content_size: T2,
18424
18425 pub storage_size: T3,
18426
18427 pub link_count: T4,
18428
18429 pub creation_time: T5,
18430
18431 pub modification_time: T6,
18432 }
18433
18434 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
18435 ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>
18436 for NodeAttributes<T0, T1, T2, T3, T4, T5, T6>
18437 where
18438 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18439 T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
18440 T1: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18441 T2: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18442 T3: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18443 T4: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18444 T5: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18445 T6: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18446 {
18447 #[inline]
18448 fn encode(
18449 self,
18450 encoder_: &mut ___E,
18451 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
18452 _: (),
18453 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18454 ::fidl_next::munge! {
18455 let crate::wire::NodeAttributes {
18456
18457 mode,
18458 id,
18459 content_size,
18460 storage_size,
18461 link_count,
18462 creation_time,
18463 modification_time,
18464
18465 } = out_;
18466 }
18467
18468 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
18469
18470 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
18471
18472 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
18473
18474 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
18475
18476 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
18477
18478 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
18479
18480 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
18481
18482 Ok(())
18483 }
18484 }
18485
18486 pub struct NodeQueryFilesystemResponse<T0, T1> {
18487 pub s: T0,
18488
18489 pub info: T1,
18490 }
18491
18492 unsafe impl<___E, T0, T1>
18493 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
18494 for NodeQueryFilesystemResponse<T0, T1>
18495 where
18496 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18497 ___E: ::fidl_next::Encoder,
18498 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18499 T1: ::fidl_next::Encode<::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>, ___E>,
18500 {
18501 #[inline]
18502 fn encode(
18503 self,
18504 encoder_: &mut ___E,
18505 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
18506 _: (),
18507 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18508 ::fidl_next::munge! {
18509 let crate::wire::NodeQueryFilesystemResponse {
18510
18511 s,
18512 info,
18513
18514 } = out_;
18515 }
18516
18517 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18518
18519 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
18520
18521 Ok(())
18522 }
18523 }
18524
18525 pub struct DirectoryReadDirentsRequest<T0> {
18526 pub max_bytes: T0,
18527 }
18528
18529 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
18530 for DirectoryReadDirentsRequest<T0>
18531 where
18532 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18533 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18534 {
18535 #[inline]
18536 fn encode(
18537 self,
18538 encoder_: &mut ___E,
18539 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
18540 _: (),
18541 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18542 ::fidl_next::munge! {
18543 let crate::wire::DirectoryReadDirentsRequest {
18544
18545 max_bytes,
18546
18547 } = out_;
18548 }
18549
18550 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
18551
18552 Ok(())
18553 }
18554 }
18555
18556 pub struct DirectoryReadDirentsResponse<T0, T1> {
18557 pub s: T0,
18558
18559 pub dirents: T1,
18560 }
18561
18562 unsafe impl<___E, T0, T1>
18563 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
18564 for DirectoryReadDirentsResponse<T0, T1>
18565 where
18566 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18567 ___E: ::fidl_next::Encoder,
18568 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18569 T1: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
18570 {
18571 #[inline]
18572 fn encode(
18573 self,
18574 encoder_: &mut ___E,
18575 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
18576 _: (),
18577 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18578 ::fidl_next::munge! {
18579 let crate::wire::DirectoryReadDirentsResponse {
18580
18581 s,
18582 dirents,
18583
18584 } = out_;
18585 }
18586
18587 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18588
18589 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
18590
18591 Ok(())
18592 }
18593 }
18594
18595 pub struct DirectoryRewindResponse<T0> {
18596 pub s: T0,
18597 }
18598
18599 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
18600 for DirectoryRewindResponse<T0>
18601 where
18602 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18603 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18604 {
18605 #[inline]
18606 fn encode(
18607 self,
18608 encoder_: &mut ___E,
18609 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
18610 _: (),
18611 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18612 ::fidl_next::munge! {
18613 let crate::wire::DirectoryRewindResponse {
18614
18615 s,
18616
18617 } = out_;
18618 }
18619
18620 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18621
18622 Ok(())
18623 }
18624 }
18625
18626 pub struct DirectoryLinkResponse<T0> {
18627 pub s: T0,
18628 }
18629
18630 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
18631 for DirectoryLinkResponse<T0>
18632 where
18633 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18634 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18635 {
18636 #[inline]
18637 fn encode(
18638 self,
18639 encoder_: &mut ___E,
18640 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
18641 _: (),
18642 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18643 ::fidl_next::munge! {
18644 let crate::wire::DirectoryLinkResponse {
18645
18646 s,
18647
18648 } = out_;
18649 }
18650
18651 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18652
18653 Ok(())
18654 }
18655 }
18656
18657 pub struct DirectoryUnlinkRequest<T0, T1> {
18658 pub name: T0,
18659
18660 pub options: T1,
18661 }
18662
18663 unsafe impl<___E, T0, T1>
18664 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
18665 for DirectoryUnlinkRequest<T0, T1>
18666 where
18667 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18668 ___E: ::fidl_next::Encoder,
18669 T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>,
18670 T1: ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>,
18671 {
18672 #[inline]
18673 fn encode(
18674 self,
18675 encoder_: &mut ___E,
18676 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
18677 _: (),
18678 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18679 ::fidl_next::munge! {
18680 let crate::wire::DirectoryUnlinkRequest {
18681
18682 name,
18683 options,
18684
18685 } = out_;
18686 }
18687
18688 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
18689
18690 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
18691
18692 Ok(())
18693 }
18694 }
18695
18696 pub struct DirectoryWatchResponse<T0> {
18697 pub s: T0,
18698 }
18699
18700 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
18701 for DirectoryWatchResponse<T0>
18702 where
18703 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18704 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18705 {
18706 #[inline]
18707 fn encode(
18708 self,
18709 encoder_: &mut ___E,
18710 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
18711 _: (),
18712 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18713 ::fidl_next::munge! {
18714 let crate::wire::DirectoryWatchResponse {
18715
18716 s,
18717
18718 } = out_;
18719 }
18720
18721 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18722
18723 Ok(())
18724 }
18725 }
18726
18727 pub struct NodeGetExtendedAttributeRequest<T0> {
18728 pub name: T0,
18729 }
18730
18731 unsafe impl<___E, T0>
18732 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
18733 for NodeGetExtendedAttributeRequest<T0>
18734 where
18735 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18736 ___E: ::fidl_next::Encoder,
18737 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
18738 {
18739 #[inline]
18740 fn encode(
18741 self,
18742 encoder_: &mut ___E,
18743 out_: &mut ::core::mem::MaybeUninit<
18744 crate::wire::NodeGetExtendedAttributeRequest<'static>,
18745 >,
18746 _: (),
18747 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18748 ::fidl_next::munge! {
18749 let crate::wire::NodeGetExtendedAttributeRequest {
18750
18751 name,
18752
18753 } = out_;
18754 }
18755
18756 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
18757
18758 Ok(())
18759 }
18760 }
18761
18762 pub struct NodeRemoveExtendedAttributeRequest<T0> {
18763 pub name: T0,
18764 }
18765
18766 unsafe impl<___E, T0>
18767 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
18768 for NodeRemoveExtendedAttributeRequest<T0>
18769 where
18770 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18771 ___E: ::fidl_next::Encoder,
18772 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
18773 {
18774 #[inline]
18775 fn encode(
18776 self,
18777 encoder_: &mut ___E,
18778 out_: &mut ::core::mem::MaybeUninit<
18779 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
18780 >,
18781 _: (),
18782 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18783 ::fidl_next::munge! {
18784 let crate::wire::NodeRemoveExtendedAttributeRequest {
18785
18786 name,
18787
18788 } = out_;
18789 }
18790
18791 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
18792
18793 Ok(())
18794 }
18795 }
18796
18797 pub struct NodeDeprecatedGetAttrResponse<T0, T1> {
18798 pub s: T0,
18799
18800 pub attributes: T1,
18801 }
18802
18803 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
18804 for NodeDeprecatedGetAttrResponse<T0, T1>
18805 where
18806 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18807 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18808 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
18809 {
18810 #[inline]
18811 fn encode(
18812 self,
18813 encoder_: &mut ___E,
18814 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
18815 _: (),
18816 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18817 ::fidl_next::munge! {
18818 let crate::wire::NodeDeprecatedGetAttrResponse {
18819
18820 s,
18821 attributes,
18822
18823 } = out_;
18824 }
18825
18826 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18827
18828 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
18829
18830 Ok(())
18831 }
18832 }
18833
18834 pub struct NodeDeprecatedSetAttrRequest<T0, T1> {
18835 pub flags: T0,
18836
18837 pub attributes: T1,
18838 }
18839
18840 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
18841 for NodeDeprecatedSetAttrRequest<T0, T1>
18842 where
18843 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18844 T0: ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>,
18845 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
18846 {
18847 #[inline]
18848 fn encode(
18849 self,
18850 encoder_: &mut ___E,
18851 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
18852 _: (),
18853 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18854 ::fidl_next::munge! {
18855 let crate::wire::NodeDeprecatedSetAttrRequest {
18856
18857 flags,
18858 attributes,
18859
18860 } = out_;
18861 }
18862
18863 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
18864
18865 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
18866
18867 Ok(())
18868 }
18869 }
18870
18871 pub struct NodeDeprecatedSetAttrResponse<T0> {
18872 pub s: T0,
18873 }
18874
18875 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
18876 for NodeDeprecatedSetAttrResponse<T0>
18877 where
18878 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18879 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18880 {
18881 #[inline]
18882 fn encode(
18883 self,
18884 encoder_: &mut ___E,
18885 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
18886 _: (),
18887 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18888 ::fidl_next::munge! {
18889 let crate::wire::NodeDeprecatedSetAttrResponse {
18890
18891 s,
18892
18893 } = out_;
18894 }
18895
18896 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18897
18898 Ok(())
18899 }
18900 }
18901
18902 pub struct NodeDeprecatedGetFlagsResponse<T0, T1> {
18903 pub s: T0,
18904
18905 pub flags: T1,
18906 }
18907
18908 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
18909 for NodeDeprecatedGetFlagsResponse<T0, T1>
18910 where
18911 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18912 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18913 T1: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
18914 {
18915 #[inline]
18916 fn encode(
18917 self,
18918 encoder_: &mut ___E,
18919 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
18920 _: (),
18921 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18922 ::fidl_next::munge! {
18923 let crate::wire::NodeDeprecatedGetFlagsResponse {
18924
18925 s,
18926 flags,
18927
18928 } = out_;
18929 }
18930
18931 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18932
18933 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
18934
18935 Ok(())
18936 }
18937 }
18938
18939 pub struct NodeDeprecatedSetFlagsRequest<T0> {
18940 pub flags: T0,
18941 }
18942
18943 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
18944 for NodeDeprecatedSetFlagsRequest<T0>
18945 where
18946 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18947 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
18948 {
18949 #[inline]
18950 fn encode(
18951 self,
18952 encoder_: &mut ___E,
18953 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
18954 _: (),
18955 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18956 ::fidl_next::munge! {
18957 let crate::wire::NodeDeprecatedSetFlagsRequest {
18958
18959 flags,
18960
18961 } = out_;
18962 }
18963
18964 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
18965
18966 Ok(())
18967 }
18968 }
18969
18970 pub struct NodeDeprecatedSetFlagsResponse<T0> {
18971 pub s: T0,
18972 }
18973
18974 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
18975 for NodeDeprecatedSetFlagsResponse<T0>
18976 where
18977 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18978 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18979 {
18980 #[inline]
18981 fn encode(
18982 self,
18983 encoder_: &mut ___E,
18984 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
18985 _: (),
18986 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18987 ::fidl_next::munge! {
18988 let crate::wire::NodeDeprecatedSetFlagsResponse {
18989
18990 s,
18991
18992 } = out_;
18993 }
18994
18995 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18996
18997 Ok(())
18998 }
18999 }
19000
19001 pub struct NodeGetFlagsResponse<T0> {
19002 pub flags: T0,
19003 }
19004
19005 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
19006 for NodeGetFlagsResponse<T0>
19007 where
19008 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19009 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
19010 {
19011 #[inline]
19012 fn encode(
19013 self,
19014 encoder_: &mut ___E,
19015 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
19016 _: (),
19017 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19018 ::fidl_next::munge! {
19019 let crate::wire::NodeGetFlagsResponse {
19020
19021 flags,
19022
19023 } = out_;
19024 }
19025
19026 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
19027
19028 Ok(())
19029 }
19030 }
19031
19032 pub struct NodeSetFlagsRequest<T0> {
19033 pub flags: T0,
19034 }
19035
19036 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
19037 for NodeSetFlagsRequest<T0>
19038 where
19039 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19040 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
19041 {
19042 #[inline]
19043 fn encode(
19044 self,
19045 encoder_: &mut ___E,
19046 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
19047 _: (),
19048 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19049 ::fidl_next::munge! {
19050 let crate::wire::NodeSetFlagsRequest {
19051
19052 flags,
19053
19054 } = out_;
19055 }
19056
19057 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
19058
19059 Ok(())
19060 }
19061 }
19062
19063 pub struct EmptyStruct {}
19064
19065 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyStruct, ___E> for EmptyStruct
19066 where
19067 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19068 {
19069 #[inline]
19070 fn encode(
19071 self,
19072 encoder_: &mut ___E,
19073 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyStruct>,
19074 _: (),
19075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19076 ::fidl_next::munge! {
19077 let crate::wire::EmptyStruct {
19078
19079 _empty,
19080
19081
19082 } = out_;
19083 }
19084
19085 Ok(())
19086 }
19087 }
19088
19089 pub struct NodeAttributes2<T0, T1> {
19090 pub mutable_attributes: T0,
19091
19092 pub immutable_attributes: T1,
19093 }
19094
19095 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
19096 for NodeAttributes2<T0, T1>
19097 where
19098 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19099 ___E: ::fidl_next::Encoder,
19100 T0: ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>,
19101 T1: ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>,
19102 {
19103 #[inline]
19104 fn encode(
19105 self,
19106 encoder_: &mut ___E,
19107 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
19108 _: (),
19109 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19110 ::fidl_next::munge! {
19111 let crate::wire::NodeAttributes2 {
19112
19113 mutable_attributes,
19114 immutable_attributes,
19115
19116 } = out_;
19117 }
19118
19119 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
19120
19121 ::fidl_next::Encode::encode(
19122 self.immutable_attributes,
19123 encoder_,
19124 immutable_attributes,
19125 (),
19126 )?;
19127
19128 Ok(())
19129 }
19130 }
19131
19132 pub struct NodeGetAttributesRequest<T0> {
19133 pub query: T0,
19134 }
19135
19136 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
19137 for NodeGetAttributesRequest<T0>
19138 where
19139 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19140 T0: ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>,
19141 {
19142 #[inline]
19143 fn encode(
19144 self,
19145 encoder_: &mut ___E,
19146 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
19147 _: (),
19148 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19149 ::fidl_next::munge! {
19150 let crate::wire::NodeGetAttributesRequest {
19151
19152 query,
19153
19154 } = out_;
19155 }
19156
19157 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
19158
19159 Ok(())
19160 }
19161 }
19162
19163 pub struct DirectoryObject {}
19164
19165 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryObject, ___E> for DirectoryObject
19166 where
19167 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19168 {
19169 #[inline]
19170 fn encode(
19171 self,
19172 encoder_: &mut ___E,
19173 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryObject>,
19174 _: (),
19175 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19176 ::fidl_next::munge! {
19177 let crate::wire::DirectoryObject {
19178
19179 _empty,
19180
19181
19182 } = out_;
19183 }
19184
19185 Ok(())
19186 }
19187 }
19188
19189 pub struct ExtendedAttributeIteratorGetNextResponse<T0, T1> {
19190 pub attributes: T0,
19191
19192 pub last: T1,
19193 }
19194
19195 unsafe impl<___E, T0, T1>
19196 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
19197 for ExtendedAttributeIteratorGetNextResponse<T0, T1>
19198 where
19199 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19200 ___E: ::fidl_next::Encoder,
19201 T0: ::fidl_next::Encode<
19202 ::fidl_next::WireVector<'static, ::fidl_next::WireVector<'static, u8>>,
19203 ___E,
19204 >,
19205 T1: ::fidl_next::Encode<bool, ___E>,
19206 {
19207 #[inline]
19208 fn encode(
19209 self,
19210 encoder_: &mut ___E,
19211 out_: &mut ::core::mem::MaybeUninit<
19212 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
19213 >,
19214 _: (),
19215 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19216 ::fidl_next::munge! {
19217 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
19218
19219 attributes,
19220 last,
19221
19222 } = out_;
19223 }
19224
19225 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
19226
19227 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
19228
19229 Ok(())
19230 }
19231 }
19232
19233 pub struct ReadableReadRequest<T0> {
19234 pub count: T0,
19235 }
19236
19237 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
19238 for ReadableReadRequest<T0>
19239 where
19240 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19241 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19242 {
19243 #[inline]
19244 fn encode(
19245 self,
19246 encoder_: &mut ___E,
19247 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
19248 _: (),
19249 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19250 ::fidl_next::munge! {
19251 let crate::wire::ReadableReadRequest {
19252
19253 count,
19254
19255 } = out_;
19256 }
19257
19258 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
19259
19260 Ok(())
19261 }
19262 }
19263
19264 pub struct ReadableReadResponse<T0> {
19265 pub data: T0,
19266 }
19267
19268 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
19269 for ReadableReadResponse<T0>
19270 where
19271 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19272 ___E: ::fidl_next::Encoder,
19273 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19274 {
19275 #[inline]
19276 fn encode(
19277 self,
19278 encoder_: &mut ___E,
19279 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
19280 _: (),
19281 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19282 ::fidl_next::munge! {
19283 let crate::wire::ReadableReadResponse {
19284
19285 data,
19286
19287 } = out_;
19288 }
19289
19290 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
19291
19292 Ok(())
19293 }
19294 }
19295
19296 pub struct WritableWriteRequest<T0> {
19297 pub data: T0,
19298 }
19299
19300 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
19301 for WritableWriteRequest<T0>
19302 where
19303 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19304 ___E: ::fidl_next::Encoder,
19305 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19306 {
19307 #[inline]
19308 fn encode(
19309 self,
19310 encoder_: &mut ___E,
19311 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
19312 _: (),
19313 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19314 ::fidl_next::munge! {
19315 let crate::wire::WritableWriteRequest {
19316
19317 data,
19318
19319 } = out_;
19320 }
19321
19322 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
19323
19324 Ok(())
19325 }
19326 }
19327
19328 pub struct WritableWriteResponse<T0> {
19329 pub actual_count: T0,
19330 }
19331
19332 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
19333 for WritableWriteResponse<T0>
19334 where
19335 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19336 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19337 {
19338 #[inline]
19339 fn encode(
19340 self,
19341 encoder_: &mut ___E,
19342 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
19343 _: (),
19344 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19345 ::fidl_next::munge! {
19346 let crate::wire::WritableWriteResponse {
19347
19348 actual_count,
19349
19350 } = out_;
19351 }
19352
19353 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
19354
19355 Ok(())
19356 }
19357 }
19358
19359 pub struct FileSeekRequest<T0, T1> {
19360 pub origin: T0,
19361
19362 pub offset: T1,
19363 }
19364
19365 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
19366 for FileSeekRequest<T0, T1>
19367 where
19368 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19369 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
19370 T1: ::fidl_next::Encode<::fidl_next::WireI64, ___E>,
19371 {
19372 #[inline]
19373 fn encode(
19374 self,
19375 encoder_: &mut ___E,
19376 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
19377 _: (),
19378 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19379 ::fidl_next::munge! {
19380 let crate::wire::FileSeekRequest {
19381
19382 origin,
19383 offset,
19384
19385 } = out_;
19386 }
19387
19388 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
19389
19390 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
19391
19392 Ok(())
19393 }
19394 }
19395
19396 pub struct FileSeekResponse<T0> {
19397 pub offset_from_start: T0,
19398 }
19399
19400 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
19401 for FileSeekResponse<T0>
19402 where
19403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19404 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19405 {
19406 #[inline]
19407 fn encode(
19408 self,
19409 encoder_: &mut ___E,
19410 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
19411 _: (),
19412 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19413 ::fidl_next::munge! {
19414 let crate::wire::FileSeekResponse {
19415
19416 offset_from_start,
19417
19418 } = out_;
19419 }
19420
19421 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
19422
19423 Ok(())
19424 }
19425 }
19426
19427 pub struct FileReadAtRequest<T0, T1> {
19428 pub count: T0,
19429
19430 pub offset: T1,
19431 }
19432
19433 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
19434 for FileReadAtRequest<T0, T1>
19435 where
19436 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19437 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19438 T1: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19439 {
19440 #[inline]
19441 fn encode(
19442 self,
19443 encoder_: &mut ___E,
19444 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
19445 _: (),
19446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19447 ::fidl_next::munge! {
19448 let crate::wire::FileReadAtRequest {
19449
19450 count,
19451 offset,
19452
19453 } = out_;
19454 }
19455
19456 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
19457
19458 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
19459
19460 Ok(())
19461 }
19462 }
19463
19464 pub struct FileReadAtResponse<T0> {
19465 pub data: T0,
19466 }
19467
19468 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
19469 for FileReadAtResponse<T0>
19470 where
19471 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19472 ___E: ::fidl_next::Encoder,
19473 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19474 {
19475 #[inline]
19476 fn encode(
19477 self,
19478 encoder_: &mut ___E,
19479 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
19480 _: (),
19481 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19482 ::fidl_next::munge! {
19483 let crate::wire::FileReadAtResponse {
19484
19485 data,
19486
19487 } = out_;
19488 }
19489
19490 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
19491
19492 Ok(())
19493 }
19494 }
19495
19496 pub struct FileWriteAtRequest<T0, T1> {
19497 pub data: T0,
19498
19499 pub offset: T1,
19500 }
19501
19502 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
19503 for FileWriteAtRequest<T0, T1>
19504 where
19505 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19506 ___E: ::fidl_next::Encoder,
19507 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19508 T1: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19509 {
19510 #[inline]
19511 fn encode(
19512 self,
19513 encoder_: &mut ___E,
19514 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
19515 _: (),
19516 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19517 ::fidl_next::munge! {
19518 let crate::wire::FileWriteAtRequest {
19519
19520 data,
19521 offset,
19522
19523 } = out_;
19524 }
19525
19526 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
19527
19528 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
19529
19530 Ok(())
19531 }
19532 }
19533
19534 pub struct FileWriteAtResponse<T0> {
19535 pub actual_count: T0,
19536 }
19537
19538 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
19539 for FileWriteAtResponse<T0>
19540 where
19541 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19542 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19543 {
19544 #[inline]
19545 fn encode(
19546 self,
19547 encoder_: &mut ___E,
19548 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
19549 _: (),
19550 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19551 ::fidl_next::munge! {
19552 let crate::wire::FileWriteAtResponse {
19553
19554 actual_count,
19555
19556 } = out_;
19557 }
19558
19559 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
19560
19561 Ok(())
19562 }
19563 }
19564
19565 pub struct FileResizeRequest<T0> {
19566 pub length: T0,
19567 }
19568
19569 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
19570 for FileResizeRequest<T0>
19571 where
19572 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19573 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19574 {
19575 #[inline]
19576 fn encode(
19577 self,
19578 encoder_: &mut ___E,
19579 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
19580 _: (),
19581 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19582 ::fidl_next::munge! {
19583 let crate::wire::FileResizeRequest {
19584
19585 length,
19586
19587 } = out_;
19588 }
19589
19590 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
19591
19592 Ok(())
19593 }
19594 }
19595
19596 pub struct FileGetBackingMemoryRequest<T0> {
19597 pub flags: T0,
19598 }
19599
19600 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
19601 for FileGetBackingMemoryRequest<T0>
19602 where
19603 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19604 T0: ::fidl_next::Encode<crate::wire::VmoFlags, ___E>,
19605 {
19606 #[inline]
19607 fn encode(
19608 self,
19609 encoder_: &mut ___E,
19610 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
19611 _: (),
19612 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19613 ::fidl_next::munge! {
19614 let crate::wire::FileGetBackingMemoryRequest {
19615
19616 flags,
19617
19618 } = out_;
19619 }
19620
19621 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
19622
19623 Ok(())
19624 }
19625 }
19626
19627 pub struct FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> {
19628 pub total_bytes: T0,
19629
19630 pub used_bytes: T1,
19631
19632 pub total_nodes: T2,
19633
19634 pub used_nodes: T3,
19635
19636 pub free_shared_pool_bytes: T4,
19637
19638 pub fs_id: T5,
19639
19640 pub block_size: T6,
19641
19642 pub max_filename_size: T7,
19643
19644 pub fs_type: T8,
19645
19646 pub padding: T9,
19647
19648 pub name: T10,
19649 }
19650
19651 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
19652 ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>
19653 for FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
19654 where
19655 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19656 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19657 T1: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19658 T2: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19659 T3: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19660 T4: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19661 T5: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19662 T6: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
19663 T7: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
19664 T8: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
19665 T9: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
19666 T10: ::fidl_next::Encode<[i8; 32], ___E>,
19667 {
19668 #[inline]
19669 fn encode(
19670 self,
19671 encoder_: &mut ___E,
19672 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
19673 _: (),
19674 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19675 ::fidl_next::munge! {
19676 let crate::wire::FilesystemInfo {
19677
19678 total_bytes,
19679 used_bytes,
19680 total_nodes,
19681 used_nodes,
19682 free_shared_pool_bytes,
19683 fs_id,
19684 block_size,
19685 max_filename_size,
19686 fs_type,
19687 padding,
19688 name,
19689
19690 } = out_;
19691 }
19692
19693 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
19694
19695 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
19696
19697 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
19698
19699 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
19700
19701 ::fidl_next::Encode::encode(
19702 self.free_shared_pool_bytes,
19703 encoder_,
19704 free_shared_pool_bytes,
19705 (),
19706 )?;
19707
19708 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
19709
19710 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
19711
19712 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
19713
19714 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
19715
19716 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
19717
19718 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
19719
19720 Ok(())
19721 }
19722 }
19723
19724 pub struct Service {}
19725
19726 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Service, ___E> for Service
19727 where
19728 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19729 {
19730 #[inline]
19731 fn encode(
19732 self,
19733 encoder_: &mut ___E,
19734 out_: &mut ::core::mem::MaybeUninit<crate::wire::Service>,
19735 _: (),
19736 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19737 ::fidl_next::munge! {
19738 let crate::wire::Service {
19739
19740 _empty,
19741
19742
19743 } = out_;
19744 }
19745
19746 Ok(())
19747 }
19748 }
19749
19750 pub struct SymlinkObject<T0> {
19751 pub target: T0,
19752 }
19753
19754 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
19755 for SymlinkObject<T0>
19756 where
19757 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19758 ___E: ::fidl_next::Encoder,
19759 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19760 {
19761 #[inline]
19762 fn encode(
19763 self,
19764 encoder_: &mut ___E,
19765 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
19766 _: (),
19767 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19768 ::fidl_next::munge! {
19769 let crate::wire::SymlinkObject {
19770
19771 target,
19772
19773 } = out_;
19774 }
19775
19776 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
19777
19778 Ok(())
19779 }
19780 }
19781}
19782
19783pub use self::natural::*;
19784
19785#[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"]
19787#[derive(PartialEq, Debug)]
19788pub struct AdvisoryLocking;
19789
19790#[cfg(target_os = "fuchsia")]
19791impl ::fidl_next::HasTransport for AdvisoryLocking {
19792 type Transport = ::fidl_next::fuchsia::zx::Channel;
19793}
19794
19795pub mod advisory_locking {
19796 pub mod prelude {
19797 pub use crate::{
19798 AdvisoryLocking, AdvisoryLockingClientHandler, AdvisoryLockingServerHandler,
19799 advisory_locking,
19800 };
19801
19802 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
19803
19804 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
19805 }
19806
19807 pub struct AdvisoryLock;
19808
19809 impl ::fidl_next::Method for AdvisoryLock {
19810 const ORDINAL: u64 = 7992130864415541162;
19811 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
19812 ::fidl_next::protocol::Flexibility::Strict;
19813
19814 type Protocol = crate::AdvisoryLocking;
19815
19816 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
19817 }
19818
19819 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
19820 type Response = ::fidl_next::WireResult<
19821 'static,
19822 crate::wire::AdvisoryLockingAdvisoryLockResponse,
19823 ::fidl_next::WireI32,
19824 >;
19825 }
19826
19827 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
19828 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
19829
19830 fn respond(response: ___R) -> Self::Output {
19831 ::core::result::Result::Ok(response)
19832 }
19833 }
19834
19835 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
19836 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
19837
19838 fn respond_err(response: ___R) -> Self::Output {
19839 ::core::result::Result::Err(response)
19840 }
19841 }
19842
19843 mod ___detail {
19844 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::AdvisoryLocking
19845 where
19846 ___T: ::fidl_next::Transport,
19847 {
19848 type Client = AdvisoryLockingClient<___T>;
19849 type Server = AdvisoryLockingServer<___T>;
19850 }
19851
19852 #[repr(transparent)]
19854 pub struct AdvisoryLockingClient<___T: ::fidl_next::Transport> {
19855 #[allow(dead_code)]
19856 client: ::fidl_next::protocol::Client<___T>,
19857 }
19858
19859 impl<___T> AdvisoryLockingClient<___T>
19860 where
19861 ___T: ::fidl_next::Transport,
19862 {
19863 #[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"]
19864 pub fn advisory_lock(
19865 &self,
19866
19867 request: impl ::fidl_next::Encode<
19868 crate::wire::AdvisoryLockRequest<'static>,
19869 <___T as ::fidl_next::Transport>::SendBuffer,
19870 >,
19871 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
19872 where
19873 <___T as ::fidl_next::Transport>::SendBuffer:
19874 ::fidl_next::encoder::InternalHandleEncoder,
19875 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
19876 {
19877 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
19878 request,
19879 })
19880 }
19881
19882 #[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"]
19883 pub fn advisory_lock_with<___R>(
19884 &self,
19885 request: ___R,
19886 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
19887 where
19888 ___R: ::fidl_next::Encode<
19889 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
19890 <___T as ::fidl_next::Transport>::SendBuffer,
19891 >,
19892 {
19893 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19894 7992130864415541162,
19895 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
19896 request,
19897 ))
19898 }
19899 }
19900
19901 #[repr(transparent)]
19903 pub struct AdvisoryLockingServer<___T: ::fidl_next::Transport> {
19904 server: ::fidl_next::protocol::Server<___T>,
19905 }
19906
19907 impl<___T> AdvisoryLockingServer<___T> where ___T: ::fidl_next::Transport {}
19908 }
19909}
19910
19911pub trait AdvisoryLockingClientHandler<
19915 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19916 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19917>
19918{
19919}
19920
19921impl<___T> AdvisoryLockingClientHandler<___T> for ::fidl_next::IgnoreEvents where
19922 ___T: ::fidl_next::Transport
19923{
19924}
19925
19926impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for AdvisoryLocking
19927where
19928 ___H: AdvisoryLockingClientHandler<___T> + ::core::marker::Send,
19929 ___T: ::fidl_next::Transport,
19930{
19931 async fn on_event(
19932 handler: &mut ___H,
19933 ordinal: u64,
19934 flexibility: ::fidl_next::protocol::Flexibility,
19935 buffer: ___T::RecvBuffer,
19936 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19937 match ordinal {
19938 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19939 }
19940 }
19941}
19942
19943pub trait AdvisoryLockingServerHandler<
19947 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19948 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19949>
19950{
19951 #[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"]
19952 fn advisory_lock(
19953 &mut self,
19954
19955 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
19956
19957 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
19958 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19959}
19960
19961impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for AdvisoryLocking
19962where
19963 ___H: AdvisoryLockingServerHandler<___T> + ::core::marker::Send,
19964 ___T: ::fidl_next::Transport,
19965 <advisory_locking::AdvisoryLock as ::fidl_next::Method>::Request:
19966 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
19967{
19968 async fn on_one_way(
19969 handler: &mut ___H,
19970 ordinal: u64,
19971 flexibility: ::fidl_next::protocol::Flexibility,
19972 buffer: ___T::RecvBuffer,
19973 ) -> ::core::result::Result<
19974 (),
19975 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19976 > {
19977 match ordinal {
19978 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19979 }
19980 }
19981
19982 async fn on_two_way(
19983 handler: &mut ___H,
19984 ordinal: u64,
19985 flexibility: ::fidl_next::protocol::Flexibility,
19986 buffer: ___T::RecvBuffer,
19987 responder: ::fidl_next::protocol::Responder<___T>,
19988 ) -> ::core::result::Result<
19989 (),
19990 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19991 > {
19992 match ordinal {
19993 7992130864415541162 => {
19994 let responder = ::fidl_next::Responder::from_untyped(responder);
19995
19996 match ::fidl_next::DecoderExt::decode(buffer) {
19997 Ok(decoded) => {
19998 handler
19999 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
20000 .await;
20001 Ok(())
20002 }
20003 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20004 ordinal: 7992130864415541162,
20005 error,
20006 }),
20007 }
20008 }
20009
20010 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20011 }
20012 }
20013}
20014
20015pub const DIRECTORY_PROTOCOL_NAME: &str = "fuchsia.io/Directory";
20016
20017#[doc = " The maximum length, in bytes, of a filesystem path.\n"]
20018pub const MAX_PATH_LENGTH: u64 = 4095 as u64;
20019
20020#[doc = " The maximal buffer size which can be transmitted for buffered operations.\n This capacity is currently set somewhat arbitrarily.\n"]
20021pub const MAX_BUF: u64 = 8192 as u64;
20022
20023#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
20024pub const MAX_NAME_LENGTH: u64 = 255 as u64;
20025
20026#[doc = " The maximum size for an extended attribute name.\n"]
20027pub const MAX_ATTRIBUTE_NAME: u64 = 255 as u64;
20028
20029#[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"]
20030pub const MAX_INLINE_ATTRIBUTE_VALUE: u64 = 32768 as u64;
20031
20032#[doc = " The maximum size for passing the SELinux context as an attribute.\n"]
20033pub const MAX_SELINUX_CONTEXT_ATTRIBUTE_LEN: u64 = 256 as u64;
20034
20035#[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"]
20037#[derive(PartialEq, Debug)]
20038pub struct DirectoryWatcher;
20039
20040#[cfg(target_os = "fuchsia")]
20041impl ::fidl_next::HasTransport for DirectoryWatcher {
20042 type Transport = ::fidl_next::fuchsia::zx::Channel;
20043}
20044
20045pub mod directory_watcher {
20046 pub mod prelude {
20047 pub use crate::{
20048 DirectoryWatcher, DirectoryWatcherClientHandler, DirectoryWatcherServerHandler,
20049 directory_watcher,
20050 };
20051 }
20052
20053 mod ___detail {
20054 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirectoryWatcher
20055 where
20056 ___T: ::fidl_next::Transport,
20057 {
20058 type Client = DirectoryWatcherClient<___T>;
20059 type Server = DirectoryWatcherServer<___T>;
20060 }
20061
20062 #[repr(transparent)]
20064 pub struct DirectoryWatcherClient<___T: ::fidl_next::Transport> {
20065 #[allow(dead_code)]
20066 client: ::fidl_next::protocol::Client<___T>,
20067 }
20068
20069 impl<___T> DirectoryWatcherClient<___T> where ___T: ::fidl_next::Transport {}
20070
20071 #[repr(transparent)]
20073 pub struct DirectoryWatcherServer<___T: ::fidl_next::Transport> {
20074 server: ::fidl_next::protocol::Server<___T>,
20075 }
20076
20077 impl<___T> DirectoryWatcherServer<___T> where ___T: ::fidl_next::Transport {}
20078 }
20079}
20080
20081pub trait DirectoryWatcherClientHandler<
20085 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20086 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20087>
20088{
20089}
20090
20091impl<___T> DirectoryWatcherClientHandler<___T> for ::fidl_next::IgnoreEvents where
20092 ___T: ::fidl_next::Transport
20093{
20094}
20095
20096impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryWatcher
20097where
20098 ___H: DirectoryWatcherClientHandler<___T> + ::core::marker::Send,
20099 ___T: ::fidl_next::Transport,
20100{
20101 async fn on_event(
20102 handler: &mut ___H,
20103 ordinal: u64,
20104 flexibility: ::fidl_next::protocol::Flexibility,
20105 buffer: ___T::RecvBuffer,
20106 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20107 match ordinal {
20108 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20109 }
20110 }
20111}
20112
20113pub trait DirectoryWatcherServerHandler<
20117 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20118 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20119>
20120{
20121}
20122
20123impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryWatcher
20124where
20125 ___H: DirectoryWatcherServerHandler<___T> + ::core::marker::Send,
20126 ___T: ::fidl_next::Transport,
20127{
20128 async fn on_one_way(
20129 handler: &mut ___H,
20130 ordinal: u64,
20131 flexibility: ::fidl_next::protocol::Flexibility,
20132 buffer: ___T::RecvBuffer,
20133 ) -> ::core::result::Result<
20134 (),
20135 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20136 > {
20137 match ordinal {
20138 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20139 }
20140 }
20141
20142 async fn on_two_way(
20143 handler: &mut ___H,
20144 ordinal: u64,
20145 flexibility: ::fidl_next::protocol::Flexibility,
20146 buffer: ___T::RecvBuffer,
20147 responder: ::fidl_next::protocol::Responder<___T>,
20148 ) -> ::core::result::Result<
20149 (),
20150 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20151 > {
20152 match ordinal {
20153 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20154 }
20155 }
20156}
20157
20158#[doc = " The maximum size of a chunk in the ListExtendedAttributes iterator.\n"]
20159pub const MAX_LIST_ATTRIBUTES_CHUNK: u64 = 128 as u64;
20160
20161#[derive(PartialEq, Debug)]
20163pub struct ExtendedAttributeIterator;
20164
20165#[cfg(target_os = "fuchsia")]
20166impl ::fidl_next::HasTransport for ExtendedAttributeIterator {
20167 type Transport = ::fidl_next::fuchsia::zx::Channel;
20168}
20169
20170pub mod extended_attribute_iterator {
20171 pub mod prelude {
20172 pub use crate::{
20173 ExtendedAttributeIterator, ExtendedAttributeIteratorClientHandler,
20174 ExtendedAttributeIteratorServerHandler, extended_attribute_iterator,
20175 };
20176
20177 pub use crate::natural::ExtendedAttributeIteratorGetNextResponse;
20178 }
20179
20180 pub struct GetNext;
20181
20182 impl ::fidl_next::Method for GetNext {
20183 const ORDINAL: u64 = 268639596268373415;
20184 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
20185 ::fidl_next::protocol::Flexibility::Strict;
20186
20187 type Protocol = crate::ExtendedAttributeIterator;
20188
20189 type Request = ();
20190 }
20191
20192 impl ::fidl_next::TwoWayMethod for GetNext {
20193 type Response = ::fidl_next::WireResult<
20194 'static,
20195 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
20196 ::fidl_next::WireI32,
20197 >;
20198 }
20199
20200 impl<___R> ::fidl_next::Respond<___R> for GetNext {
20201 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
20202
20203 fn respond(response: ___R) -> Self::Output {
20204 ::core::result::Result::Ok(response)
20205 }
20206 }
20207
20208 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
20209 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
20210
20211 fn respond_err(response: ___R) -> Self::Output {
20212 ::core::result::Result::Err(response)
20213 }
20214 }
20215
20216 mod ___detail {
20217 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ExtendedAttributeIterator
20218 where
20219 ___T: ::fidl_next::Transport,
20220 {
20221 type Client = ExtendedAttributeIteratorClient<___T>;
20222 type Server = ExtendedAttributeIteratorServer<___T>;
20223 }
20224
20225 #[repr(transparent)]
20227 pub struct ExtendedAttributeIteratorClient<___T: ::fidl_next::Transport> {
20228 #[allow(dead_code)]
20229 client: ::fidl_next::protocol::Client<___T>,
20230 }
20231
20232 impl<___T> ExtendedAttributeIteratorClient<___T>
20233 where
20234 ___T: ::fidl_next::Transport,
20235 {
20236 #[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"]
20237 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
20238 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
20239 268639596268373415,
20240 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
20241 (),
20242 ))
20243 }
20244 }
20245
20246 #[repr(transparent)]
20248 pub struct ExtendedAttributeIteratorServer<___T: ::fidl_next::Transport> {
20249 server: ::fidl_next::protocol::Server<___T>,
20250 }
20251
20252 impl<___T> ExtendedAttributeIteratorServer<___T> where ___T: ::fidl_next::Transport {}
20253 }
20254}
20255
20256pub trait ExtendedAttributeIteratorClientHandler<
20260 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20261 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20262>
20263{
20264}
20265
20266impl<___T> ExtendedAttributeIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents where
20267 ___T: ::fidl_next::Transport
20268{
20269}
20270
20271impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExtendedAttributeIterator
20272where
20273 ___H: ExtendedAttributeIteratorClientHandler<___T> + ::core::marker::Send,
20274 ___T: ::fidl_next::Transport,
20275{
20276 async fn on_event(
20277 handler: &mut ___H,
20278 ordinal: u64,
20279 flexibility: ::fidl_next::protocol::Flexibility,
20280 buffer: ___T::RecvBuffer,
20281 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20282 match ordinal {
20283 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20284 }
20285 }
20286}
20287
20288pub trait ExtendedAttributeIteratorServerHandler<
20292 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20293 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20294>
20295{
20296 #[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"]
20297 fn get_next(
20298 &mut self,
20299
20300 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
20301 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20302}
20303
20304impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExtendedAttributeIterator
20305where
20306 ___H: ExtendedAttributeIteratorServerHandler<___T> + ::core::marker::Send,
20307 ___T: ::fidl_next::Transport,
20308{
20309 async fn on_one_way(
20310 handler: &mut ___H,
20311 ordinal: u64,
20312 flexibility: ::fidl_next::protocol::Flexibility,
20313 buffer: ___T::RecvBuffer,
20314 ) -> ::core::result::Result<
20315 (),
20316 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20317 > {
20318 match ordinal {
20319 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20320 }
20321 }
20322
20323 async fn on_two_way(
20324 handler: &mut ___H,
20325 ordinal: u64,
20326 flexibility: ::fidl_next::protocol::Flexibility,
20327 buffer: ___T::RecvBuffer,
20328 responder: ::fidl_next::protocol::Responder<___T>,
20329 ) -> ::core::result::Result<
20330 (),
20331 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20332 > {
20333 match ordinal {
20334 268639596268373415 => {
20335 let responder = ::fidl_next::Responder::from_untyped(responder);
20336
20337 handler.get_next(responder).await;
20338 Ok(())
20339 }
20340
20341 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20342 }
20343 }
20344}
20345
20346pub const FILE_PROTOCOL_NAME: &str = "fuchsia.io/File";
20347
20348#[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"]
20349pub const FLAG_TEMPORARY_AS_NOT_LINKABLE: crate::natural::Flags =
20350 crate::natural::Flags::FLAG_MUST_CREATE;
20351
20352#[doc = " The maximum I/O size that is allowed for read/write operations using\n byte vectors.\n"]
20353pub const MAX_TRANSFER_SIZE: u64 = 8192 as u64;
20354
20355#[derive(PartialEq, Debug)]
20357pub struct Readable;
20358
20359#[cfg(target_os = "fuchsia")]
20360impl ::fidl_next::HasTransport for Readable {
20361 type Transport = ::fidl_next::fuchsia::zx::Channel;
20362}
20363
20364pub mod readable {
20365 pub mod prelude {
20366 pub use crate::{Readable, ReadableClientHandler, ReadableServerHandler, readable};
20367
20368 pub use crate::natural::ReadableReadRequest;
20369
20370 pub use crate::natural::ReadableReadResponse;
20371 }
20372
20373 pub struct Read;
20374
20375 impl ::fidl_next::Method for Read {
20376 const ORDINAL: u64 = 395825947633028830;
20377 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
20378 ::fidl_next::protocol::Flexibility::Strict;
20379
20380 type Protocol = crate::Readable;
20381
20382 type Request = crate::wire::ReadableReadRequest;
20383 }
20384
20385 impl ::fidl_next::TwoWayMethod for Read {
20386 type Response = ::fidl_next::WireResult<
20387 'static,
20388 crate::wire::ReadableReadResponse<'static>,
20389 ::fidl_next::WireI32,
20390 >;
20391 }
20392
20393 impl<___R> ::fidl_next::Respond<___R> for Read {
20394 type Output = ::core::result::Result<
20395 crate::generic::ReadableReadResponse<___R>,
20396 ::fidl_next::util::Never,
20397 >;
20398
20399 fn respond(response: ___R) -> Self::Output {
20400 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
20401 }
20402 }
20403
20404 impl<___R> ::fidl_next::RespondErr<___R> for Read {
20405 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
20406
20407 fn respond_err(response: ___R) -> Self::Output {
20408 ::core::result::Result::Err(response)
20409 }
20410 }
20411
20412 mod ___detail {
20413 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Readable
20414 where
20415 ___T: ::fidl_next::Transport,
20416 {
20417 type Client = ReadableClient<___T>;
20418 type Server = ReadableServer<___T>;
20419 }
20420
20421 #[repr(transparent)]
20423 pub struct ReadableClient<___T: ::fidl_next::Transport> {
20424 #[allow(dead_code)]
20425 client: ::fidl_next::protocol::Client<___T>,
20426 }
20427
20428 impl<___T> ReadableClient<___T>
20429 where
20430 ___T: ::fidl_next::Transport,
20431 {
20432 #[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"]
20433 pub fn read(
20434 &self,
20435
20436 count: impl ::fidl_next::Encode<
20437 ::fidl_next::WireU64,
20438 <___T as ::fidl_next::Transport>::SendBuffer,
20439 >,
20440 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
20441 where
20442 <___T as ::fidl_next::Transport>::SendBuffer:
20443 ::fidl_next::encoder::InternalHandleEncoder,
20444 {
20445 self.read_with(crate::generic::ReadableReadRequest { count })
20446 }
20447
20448 #[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"]
20449 pub fn read_with<___R>(
20450 &self,
20451 request: ___R,
20452 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
20453 where
20454 ___R: ::fidl_next::Encode<
20455 crate::wire::ReadableReadRequest,
20456 <___T as ::fidl_next::Transport>::SendBuffer,
20457 >,
20458 {
20459 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
20460 395825947633028830,
20461 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
20462 request,
20463 ))
20464 }
20465 }
20466
20467 #[repr(transparent)]
20469 pub struct ReadableServer<___T: ::fidl_next::Transport> {
20470 server: ::fidl_next::protocol::Server<___T>,
20471 }
20472
20473 impl<___T> ReadableServer<___T> where ___T: ::fidl_next::Transport {}
20474 }
20475}
20476
20477pub trait ReadableClientHandler<
20481 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20482 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20483>
20484{
20485}
20486
20487impl<___T> ReadableClientHandler<___T> for ::fidl_next::IgnoreEvents where
20488 ___T: ::fidl_next::Transport
20489{
20490}
20491
20492impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Readable
20493where
20494 ___H: ReadableClientHandler<___T> + ::core::marker::Send,
20495 ___T: ::fidl_next::Transport,
20496{
20497 async fn on_event(
20498 handler: &mut ___H,
20499 ordinal: u64,
20500 flexibility: ::fidl_next::protocol::Flexibility,
20501 buffer: ___T::RecvBuffer,
20502 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20503 match ordinal {
20504 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20505 }
20506 }
20507}
20508
20509pub trait ReadableServerHandler<
20513 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20514 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20515>
20516{
20517 #[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"]
20518 fn read(
20519 &mut self,
20520
20521 request: ::fidl_next::Request<readable::Read, ___T>,
20522
20523 responder: ::fidl_next::Responder<readable::Read, ___T>,
20524 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20525}
20526
20527impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Readable
20528where
20529 ___H: ReadableServerHandler<___T> + ::core::marker::Send,
20530 ___T: ::fidl_next::Transport,
20531 <readable::Read as ::fidl_next::Method>::Request:
20532 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
20533{
20534 async fn on_one_way(
20535 handler: &mut ___H,
20536 ordinal: u64,
20537 flexibility: ::fidl_next::protocol::Flexibility,
20538 buffer: ___T::RecvBuffer,
20539 ) -> ::core::result::Result<
20540 (),
20541 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20542 > {
20543 match ordinal {
20544 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20545 }
20546 }
20547
20548 async fn on_two_way(
20549 handler: &mut ___H,
20550 ordinal: u64,
20551 flexibility: ::fidl_next::protocol::Flexibility,
20552 buffer: ___T::RecvBuffer,
20553 responder: ::fidl_next::protocol::Responder<___T>,
20554 ) -> ::core::result::Result<
20555 (),
20556 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20557 > {
20558 match ordinal {
20559 395825947633028830 => {
20560 let responder = ::fidl_next::Responder::from_untyped(responder);
20561
20562 match ::fidl_next::DecoderExt::decode(buffer) {
20563 Ok(decoded) => {
20564 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
20565 Ok(())
20566 }
20567 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20568 ordinal: 395825947633028830,
20569 error,
20570 }),
20571 }
20572 }
20573
20574 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20575 }
20576 }
20577}
20578
20579#[derive(PartialEq, Debug)]
20581pub struct Writable;
20582
20583#[cfg(target_os = "fuchsia")]
20584impl ::fidl_next::HasTransport for Writable {
20585 type Transport = ::fidl_next::fuchsia::zx::Channel;
20586}
20587
20588pub mod writable {
20589 pub mod prelude {
20590 pub use crate::{Writable, WritableClientHandler, WritableServerHandler, writable};
20591
20592 pub use crate::natural::WritableWriteRequest;
20593
20594 pub use crate::natural::WritableWriteResponse;
20595 }
20596
20597 pub struct Write;
20598
20599 impl ::fidl_next::Method for Write {
20600 const ORDINAL: u64 = 7651971425397809026;
20601 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
20602 ::fidl_next::protocol::Flexibility::Strict;
20603
20604 type Protocol = crate::Writable;
20605
20606 type Request = crate::wire::WritableWriteRequest<'static>;
20607 }
20608
20609 impl ::fidl_next::TwoWayMethod for Write {
20610 type Response = ::fidl_next::WireResult<
20611 'static,
20612 crate::wire::WritableWriteResponse,
20613 ::fidl_next::WireI32,
20614 >;
20615 }
20616
20617 impl<___R> ::fidl_next::Respond<___R> for Write {
20618 type Output = ::core::result::Result<
20619 crate::generic::WritableWriteResponse<___R>,
20620 ::fidl_next::util::Never,
20621 >;
20622
20623 fn respond(response: ___R) -> Self::Output {
20624 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
20625 actual_count: response,
20626 })
20627 }
20628 }
20629
20630 impl<___R> ::fidl_next::RespondErr<___R> for Write {
20631 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
20632
20633 fn respond_err(response: ___R) -> Self::Output {
20634 ::core::result::Result::Err(response)
20635 }
20636 }
20637
20638 mod ___detail {
20639 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Writable
20640 where
20641 ___T: ::fidl_next::Transport,
20642 {
20643 type Client = WritableClient<___T>;
20644 type Server = WritableServer<___T>;
20645 }
20646
20647 #[repr(transparent)]
20649 pub struct WritableClient<___T: ::fidl_next::Transport> {
20650 #[allow(dead_code)]
20651 client: ::fidl_next::protocol::Client<___T>,
20652 }
20653
20654 impl<___T> WritableClient<___T>
20655 where
20656 ___T: ::fidl_next::Transport,
20657 {
20658 #[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"]
20659 pub fn write(
20660 &self,
20661
20662 data: impl ::fidl_next::Encode<
20663 ::fidl_next::WireVector<'static, u8>,
20664 <___T as ::fidl_next::Transport>::SendBuffer,
20665 >,
20666 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
20667 where
20668 <___T as ::fidl_next::Transport>::SendBuffer:
20669 ::fidl_next::encoder::InternalHandleEncoder,
20670 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
20671 {
20672 self.write_with(crate::generic::WritableWriteRequest { data })
20673 }
20674
20675 #[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"]
20676 pub fn write_with<___R>(
20677 &self,
20678 request: ___R,
20679 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
20680 where
20681 ___R: ::fidl_next::Encode<
20682 crate::wire::WritableWriteRequest<'static>,
20683 <___T as ::fidl_next::Transport>::SendBuffer,
20684 >,
20685 {
20686 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
20687 7651971425397809026,
20688 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
20689 request,
20690 ))
20691 }
20692 }
20693
20694 #[repr(transparent)]
20696 pub struct WritableServer<___T: ::fidl_next::Transport> {
20697 server: ::fidl_next::protocol::Server<___T>,
20698 }
20699
20700 impl<___T> WritableServer<___T> where ___T: ::fidl_next::Transport {}
20701 }
20702}
20703
20704pub trait WritableClientHandler<
20708 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20709 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20710>
20711{
20712}
20713
20714impl<___T> WritableClientHandler<___T> for ::fidl_next::IgnoreEvents where
20715 ___T: ::fidl_next::Transport
20716{
20717}
20718
20719impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Writable
20720where
20721 ___H: WritableClientHandler<___T> + ::core::marker::Send,
20722 ___T: ::fidl_next::Transport,
20723{
20724 async fn on_event(
20725 handler: &mut ___H,
20726 ordinal: u64,
20727 flexibility: ::fidl_next::protocol::Flexibility,
20728 buffer: ___T::RecvBuffer,
20729 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20730 match ordinal {
20731 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20732 }
20733 }
20734}
20735
20736pub trait WritableServerHandler<
20740 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20741 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20742>
20743{
20744 #[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"]
20745 fn write(
20746 &mut self,
20747
20748 request: ::fidl_next::Request<writable::Write, ___T>,
20749
20750 responder: ::fidl_next::Responder<writable::Write, ___T>,
20751 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20752}
20753
20754impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Writable
20755where
20756 ___H: WritableServerHandler<___T> + ::core::marker::Send,
20757 ___T: ::fidl_next::Transport,
20758 <writable::Write as ::fidl_next::Method>::Request:
20759 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
20760{
20761 async fn on_one_way(
20762 handler: &mut ___H,
20763 ordinal: u64,
20764 flexibility: ::fidl_next::protocol::Flexibility,
20765 buffer: ___T::RecvBuffer,
20766 ) -> ::core::result::Result<
20767 (),
20768 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20769 > {
20770 match ordinal {
20771 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20772 }
20773 }
20774
20775 async fn on_two_way(
20776 handler: &mut ___H,
20777 ordinal: u64,
20778 flexibility: ::fidl_next::protocol::Flexibility,
20779 buffer: ___T::RecvBuffer,
20780 responder: ::fidl_next::protocol::Responder<___T>,
20781 ) -> ::core::result::Result<
20782 (),
20783 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20784 > {
20785 match ordinal {
20786 7651971425397809026 => {
20787 let responder = ::fidl_next::Responder::from_untyped(responder);
20788
20789 match ::fidl_next::DecoderExt::decode(buffer) {
20790 Ok(decoded) => {
20791 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
20792 Ok(())
20793 }
20794 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20795 ordinal: 7651971425397809026,
20796 error,
20797 }),
20798 }
20799 }
20800
20801 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20802 }
20803 }
20804}
20805
20806pub const MAX_FS_NAME_BUFFER: u64 = 32 as u64;
20807
20808#[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"]
20809pub const INHERITED_WRITE_PERMISSIONS: crate::natural::Operations =
20810 crate::natural::Operations::from_bits_retain(356);
20811
20812#[doc = " Nodes which do not have ino values should return this value\n from Readdir and GetAttr.\n"]
20813pub const INO_UNKNOWN: u64 = 18446744073709551615 as u64;
20814
20815pub const MASK_KNOWN_PERMISSIONS: crate::natural::Flags =
20816 crate::natural::Flags::from_bits_retain(25087);
20817
20818pub const MASK_KNOWN_PROTOCOLS: crate::natural::Flags =
20819 crate::natural::Flags::from_bits_retain(30069489664);
20820
20821pub const MASK_PERMISSION_FLAGS: u64 = 65535 as u64;
20822
20823pub const MASK_POSIX_FLAGS: u64 = 4294967295 as u64;
20824
20825#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
20826pub const MAX_FILENAME: u64 = 255 as u64;
20827
20828pub const NODE_PROTOCOL_NAME: &str = "fuchsia.io/Node";
20829
20830#[doc = " Flags used when opening a node reference must fall within this mask.\n"]
20831pub const OPEN_FLAGS_ALLOWED_WITH_NODE_REFERENCE: crate::natural::OpenFlags =
20832 crate::natural::OpenFlags::from_bits_retain(46661632);
20833
20834#[doc = " All known rights.\n"]
20835pub const OPEN_RIGHTS: crate::natural::OpenFlags = crate::natural::OpenFlags::from_bits_retain(11);
20836
20837#[doc = " Set of permissions that are expected when opening a node as executable.\n"]
20838pub const PERM_EXECUTABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(201);
20839
20840#[doc = " Set of permissions that are expected when opening a node as readable.\n"]
20841pub const PERM_READABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(211);
20842
20843#[doc = " Set of permissions that are expected when opening a node as writable.\n"]
20844pub const PERM_WRITABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(485);
20845
20846#[doc = " Alias for directory permission alias rw*\n"]
20847pub const RW_STAR_DIR: crate::natural::Operations =
20848 crate::natural::Operations::from_bits_retain(503);
20849
20850#[doc = " Alias for directory permission alias rx*\n"]
20851pub const RX_STAR_DIR: crate::natural::Operations =
20852 crate::natural::Operations::from_bits_retain(219);
20853
20854#[doc = " Alias for directory permission alias r*\n"]
20855pub const R_STAR_DIR: crate::natural::Operations =
20856 crate::natural::Operations::from_bits_retain(211);
20857
20858#[doc = " The name of the extended attribute accessible via the SELinux context attribute.\n"]
20859pub const SELINUX_CONTEXT_NAME: &str = "security.selinux";
20860
20861pub const SYMLINK_PROTOCOL_NAME: &str = "fuchsia.io/Symlink";
20862
20863#[doc = " Alias for directory permission alias w*\n"]
20864pub const W_STAR_DIR: crate::natural::Operations =
20865 crate::natural::Operations::from_bits_retain(485);
20866
20867#[doc = " Alias for directory permission alias x*\n"]
20868pub const X_STAR_DIR: crate::natural::Operations =
20869 crate::natural::Operations::from_bits_retain(201);
20870
20871pub mod compat {
20873
20874 impl ::fidl_next::CompatFrom<crate::Operations> for ::fidl_fuchsia_io::Operations {
20875 fn compat_from(value: crate::Operations) -> Self {
20876 Self::from_bits_retain(value.bits())
20877 }
20878 }
20879
20880 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Operations> for crate::Operations {
20881 fn compat_from(value: ::fidl_fuchsia_io::Operations) -> Self {
20882 Self::from_bits_retain(value.bits())
20883 }
20884 }
20885
20886 impl ::fidl_next::CompatFrom<crate::SeekOrigin> for ::fidl_fuchsia_io::SeekOrigin {
20887 fn compat_from(value: crate::SeekOrigin) -> Self {
20888 match value {
20889 crate::SeekOrigin::Start => Self::Start,
20890
20891 crate::SeekOrigin::Current => Self::Current,
20892
20893 crate::SeekOrigin::End => Self::End,
20894 }
20895 }
20896 }
20897
20898 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SeekOrigin> for crate::SeekOrigin {
20899 fn compat_from(value: ::fidl_fuchsia_io::SeekOrigin) -> Self {
20900 match value {
20901 ::fidl_fuchsia_io::SeekOrigin::Start => Self::Start,
20902
20903 ::fidl_fuchsia_io::SeekOrigin::Current => Self::Current,
20904
20905 ::fidl_fuchsia_io::SeekOrigin::End => Self::End,
20906 }
20907 }
20908 }
20909
20910 impl ::fidl_next::CompatFrom<crate::AdvisoryLockRange> for ::fidl_fuchsia_io::AdvisoryLockRange {
20911 #[inline]
20912 fn compat_from(value: crate::AdvisoryLockRange) -> Self {
20913 Self {
20914 origin: ::fidl_next::CompatFrom::compat_from(value.origin),
20915
20916 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
20917
20918 length: ::fidl_next::CompatFrom::compat_from(value.length),
20919 }
20920 }
20921 }
20922
20923 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockRange> for crate::AdvisoryLockRange {
20924 #[inline]
20925 fn compat_from(value: ::fidl_fuchsia_io::AdvisoryLockRange) -> Self {
20926 Self {
20927 origin: ::fidl_next::CompatFrom::compat_from(value.origin),
20928
20929 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
20930
20931 length: ::fidl_next::CompatFrom::compat_from(value.length),
20932 }
20933 }
20934 }
20935
20936 impl ::fidl_next::CompatFrom<crate::AdvisoryLockType> for ::fidl_fuchsia_io::AdvisoryLockType {
20937 fn compat_from(value: crate::AdvisoryLockType) -> Self {
20938 match value {
20939 crate::AdvisoryLockType::Read => Self::Read,
20940
20941 crate::AdvisoryLockType::Write => Self::Write,
20942
20943 crate::AdvisoryLockType::Unlock => Self::Unlock,
20944 }
20945 }
20946 }
20947
20948 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockType> for crate::AdvisoryLockType {
20949 fn compat_from(value: ::fidl_fuchsia_io::AdvisoryLockType) -> Self {
20950 match value {
20951 ::fidl_fuchsia_io::AdvisoryLockType::Read => Self::Read,
20952
20953 ::fidl_fuchsia_io::AdvisoryLockType::Write => Self::Write,
20954
20955 ::fidl_fuchsia_io::AdvisoryLockType::Unlock => Self::Unlock,
20956 }
20957 }
20958 }
20959
20960 impl ::fidl_next::CompatFrom<crate::AdvisoryLockRequest>
20961 for ::fidl_fuchsia_io::AdvisoryLockRequest
20962 {
20963 fn compat_from(value: crate::AdvisoryLockRequest) -> Self {
20964 Self {
20965 type_: ::fidl_next::CompatFrom::compat_from(value.type_),
20966
20967 range: ::fidl_next::CompatFrom::compat_from(value.range),
20968
20969 wait: ::fidl_next::CompatFrom::compat_from(value.wait),
20970
20971 __source_breaking: ::fidl::marker::SourceBreaking,
20972 }
20973 }
20974 }
20975
20976 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockRequest>
20977 for crate::AdvisoryLockRequest
20978 {
20979 fn compat_from(value: ::fidl_fuchsia_io::AdvisoryLockRequest) -> Self {
20980 Self {
20981 type_: ::fidl_next::CompatFrom::compat_from(value.type_),
20982
20983 range: ::fidl_next::CompatFrom::compat_from(value.range),
20984
20985 wait: ::fidl_next::CompatFrom::compat_from(value.wait),
20986 }
20987 }
20988 }
20989
20990 impl ::fidl_next::CompatFrom<crate::AdvisoryLockingAdvisoryLockRequest>
20991 for ::fidl_fuchsia_io::AdvisoryLockingAdvisoryLockRequest
20992 {
20993 #[inline]
20994 fn compat_from(value: crate::AdvisoryLockingAdvisoryLockRequest) -> Self {
20995 Self { request: ::fidl_next::CompatFrom::compat_from(value.request) }
20996 }
20997 }
20998
20999 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockingAdvisoryLockRequest>
21000 for crate::AdvisoryLockingAdvisoryLockRequest
21001 {
21002 #[inline]
21003 fn compat_from(value: ::fidl_fuchsia_io::AdvisoryLockingAdvisoryLockRequest) -> Self {
21004 Self { request: ::fidl_next::CompatFrom::compat_from(value.request) }
21005 }
21006 }
21007
21008 #[cfg(target_os = "fuchsia")]
21009 pub type AdvisoryLockingProxy = ::fidl_next::Client<crate::AdvisoryLocking>;
21012
21013 impl ::fidl_next::CompatFrom<crate::AdvisoryLocking> for ::fidl_fuchsia_io::AdvisoryLockingMarker {
21014 fn compat_from(_: crate::AdvisoryLocking) -> Self {
21015 Self
21016 }
21017 }
21018
21019 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockingMarker> for crate::AdvisoryLocking {
21020 fn compat_from(_: ::fidl_fuchsia_io::AdvisoryLockingMarker) -> Self {
21021 Self
21022 }
21023 }
21024
21025 #[cfg(target_os = "fuchsia")]
21026
21027 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::AdvisoryLockingProxy>
21028 for crate::AdvisoryLocking
21029 {
21030 fn client_compat_from(
21031 proxy: ::fidl_fuchsia_io::AdvisoryLockingProxy,
21032 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
21033 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
21034 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
21035 ::fidl_next::ClientDispatcher::new(client_end)
21036 }
21037 }
21038
21039 impl ::fidl_next::CompatFrom<crate::AllocateMode> for ::fidl_fuchsia_io::AllocateMode {
21040 fn compat_from(value: crate::AllocateMode) -> Self {
21041 Self::from_bits_retain(value.bits())
21042 }
21043 }
21044
21045 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AllocateMode> for crate::AllocateMode {
21046 fn compat_from(value: ::fidl_fuchsia_io::AllocateMode) -> Self {
21047 Self::from_bits_retain(value.bits())
21048 }
21049 }
21050
21051 impl ::fidl_next::CompatFrom<crate::OpenFlags> for ::fidl_fuchsia_io::OpenFlags {
21052 fn compat_from(value: crate::OpenFlags) -> Self {
21053 Self::from_bits_retain(value.bits())
21054 }
21055 }
21056
21057 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::OpenFlags> for crate::OpenFlags {
21058 fn compat_from(value: ::fidl_fuchsia_io::OpenFlags) -> Self {
21059 Self::from_bits_retain(value.bits())
21060 }
21061 }
21062
21063 impl ::fidl_next::CompatFrom<crate::NodeAttributes> for ::fidl_fuchsia_io::NodeAttributes {
21064 #[inline]
21065 fn compat_from(value: crate::NodeAttributes) -> Self {
21066 Self {
21067 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
21068
21069 id: ::fidl_next::CompatFrom::compat_from(value.id),
21070
21071 content_size: ::fidl_next::CompatFrom::compat_from(value.content_size),
21072
21073 storage_size: ::fidl_next::CompatFrom::compat_from(value.storage_size),
21074
21075 link_count: ::fidl_next::CompatFrom::compat_from(value.link_count),
21076
21077 creation_time: ::fidl_next::CompatFrom::compat_from(value.creation_time),
21078
21079 modification_time: ::fidl_next::CompatFrom::compat_from(value.modification_time),
21080 }
21081 }
21082 }
21083
21084 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeAttributes> for crate::NodeAttributes {
21085 #[inline]
21086 fn compat_from(value: ::fidl_fuchsia_io::NodeAttributes) -> Self {
21087 Self {
21088 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
21089
21090 id: ::fidl_next::CompatFrom::compat_from(value.id),
21091
21092 content_size: ::fidl_next::CompatFrom::compat_from(value.content_size),
21093
21094 storage_size: ::fidl_next::CompatFrom::compat_from(value.storage_size),
21095
21096 link_count: ::fidl_next::CompatFrom::compat_from(value.link_count),
21097
21098 creation_time: ::fidl_next::CompatFrom::compat_from(value.creation_time),
21099
21100 modification_time: ::fidl_next::CompatFrom::compat_from(value.modification_time),
21101 }
21102 }
21103 }
21104
21105 impl ::fidl_next::CompatFrom<crate::NodeAttributeFlags> for ::fidl_fuchsia_io::NodeAttributeFlags {
21106 fn compat_from(value: crate::NodeAttributeFlags) -> Self {
21107 Self::from_bits_retain(value.bits())
21108 }
21109 }
21110
21111 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeAttributeFlags> for crate::NodeAttributeFlags {
21112 fn compat_from(value: ::fidl_fuchsia_io::NodeAttributeFlags) -> Self {
21113 Self::from_bits_retain(value.bits())
21114 }
21115 }
21116
21117 impl ::fidl_next::CompatFrom<crate::NodeQueryFilesystemResponse>
21118 for ::fidl_fuchsia_io::NodeQueryFilesystemResponse
21119 {
21120 #[inline]
21121 fn compat_from(value: crate::NodeQueryFilesystemResponse) -> Self {
21122 Self {
21123 s: ::fidl_next::CompatFrom::compat_from(value.s),
21124
21125 info: ::fidl_next::CompatFrom::compat_from(value.info),
21126 }
21127 }
21128 }
21129
21130 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeQueryFilesystemResponse>
21131 for crate::NodeQueryFilesystemResponse
21132 {
21133 #[inline]
21134 fn compat_from(value: ::fidl_fuchsia_io::NodeQueryFilesystemResponse) -> Self {
21135 Self {
21136 s: ::fidl_next::CompatFrom::compat_from(value.s),
21137
21138 info: ::fidl_next::CompatFrom::compat_from(value.info),
21139 }
21140 }
21141 }
21142
21143 impl ::fidl_next::CompatFrom<crate::ModeType> for ::fidl_fuchsia_io::ModeType {
21144 fn compat_from(value: crate::ModeType) -> Self {
21145 Self::from_bits_retain(value.bits())
21146 }
21147 }
21148
21149 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ModeType> for crate::ModeType {
21150 fn compat_from(value: ::fidl_fuchsia_io::ModeType) -> Self {
21151 Self::from_bits_retain(value.bits())
21152 }
21153 }
21154
21155 impl ::fidl_next::CompatFrom<crate::DirectoryReadDirentsRequest>
21156 for ::fidl_fuchsia_io::DirectoryReadDirentsRequest
21157 {
21158 #[inline]
21159 fn compat_from(value: crate::DirectoryReadDirentsRequest) -> Self {
21160 Self { max_bytes: ::fidl_next::CompatFrom::compat_from(value.max_bytes) }
21161 }
21162 }
21163
21164 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryReadDirentsRequest>
21165 for crate::DirectoryReadDirentsRequest
21166 {
21167 #[inline]
21168 fn compat_from(value: ::fidl_fuchsia_io::DirectoryReadDirentsRequest) -> Self {
21169 Self { max_bytes: ::fidl_next::CompatFrom::compat_from(value.max_bytes) }
21170 }
21171 }
21172
21173 impl ::fidl_next::CompatFrom<crate::DirectoryReadDirentsResponse>
21174 for ::fidl_fuchsia_io::DirectoryReadDirentsResponse
21175 {
21176 #[inline]
21177 fn compat_from(value: crate::DirectoryReadDirentsResponse) -> Self {
21178 Self {
21179 s: ::fidl_next::CompatFrom::compat_from(value.s),
21180
21181 dirents: ::fidl_next::CompatFrom::compat_from(value.dirents),
21182 }
21183 }
21184 }
21185
21186 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryReadDirentsResponse>
21187 for crate::DirectoryReadDirentsResponse
21188 {
21189 #[inline]
21190 fn compat_from(value: ::fidl_fuchsia_io::DirectoryReadDirentsResponse) -> Self {
21191 Self {
21192 s: ::fidl_next::CompatFrom::compat_from(value.s),
21193
21194 dirents: ::fidl_next::CompatFrom::compat_from(value.dirents),
21195 }
21196 }
21197 }
21198
21199 impl ::fidl_next::CompatFrom<crate::DirectoryRewindResponse>
21200 for ::fidl_fuchsia_io::DirectoryRewindResponse
21201 {
21202 #[inline]
21203 fn compat_from(value: crate::DirectoryRewindResponse) -> Self {
21204 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21205 }
21206 }
21207
21208 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryRewindResponse>
21209 for crate::DirectoryRewindResponse
21210 {
21211 #[inline]
21212 fn compat_from(value: ::fidl_fuchsia_io::DirectoryRewindResponse) -> Self {
21213 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21214 }
21215 }
21216
21217 impl ::fidl_next::CompatFrom<crate::DirectoryLinkResponse>
21218 for ::fidl_fuchsia_io::DirectoryLinkResponse
21219 {
21220 #[inline]
21221 fn compat_from(value: crate::DirectoryLinkResponse) -> Self {
21222 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21223 }
21224 }
21225
21226 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryLinkResponse>
21227 for crate::DirectoryLinkResponse
21228 {
21229 #[inline]
21230 fn compat_from(value: ::fidl_fuchsia_io::DirectoryLinkResponse) -> Self {
21231 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21232 }
21233 }
21234
21235 impl ::fidl_next::CompatFrom<crate::UnlinkFlags> for ::fidl_fuchsia_io::UnlinkFlags {
21236 fn compat_from(value: crate::UnlinkFlags) -> Self {
21237 Self::from_bits_retain(value.bits())
21238 }
21239 }
21240
21241 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::UnlinkFlags> for crate::UnlinkFlags {
21242 fn compat_from(value: ::fidl_fuchsia_io::UnlinkFlags) -> Self {
21243 Self::from_bits_retain(value.bits())
21244 }
21245 }
21246
21247 impl ::fidl_next::CompatFrom<crate::UnlinkOptions> for ::fidl_fuchsia_io::UnlinkOptions {
21248 fn compat_from(value: crate::UnlinkOptions) -> Self {
21249 Self {
21250 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21251
21252 __source_breaking: ::fidl::marker::SourceBreaking,
21253 }
21254 }
21255 }
21256
21257 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::UnlinkOptions> for crate::UnlinkOptions {
21258 fn compat_from(value: ::fidl_fuchsia_io::UnlinkOptions) -> Self {
21259 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21260 }
21261 }
21262
21263 impl ::fidl_next::CompatFrom<crate::DirectoryUnlinkRequest>
21264 for ::fidl_fuchsia_io::DirectoryUnlinkRequest
21265 {
21266 #[inline]
21267 fn compat_from(value: crate::DirectoryUnlinkRequest) -> Self {
21268 Self {
21269 name: ::fidl_next::CompatFrom::compat_from(value.name),
21270
21271 options: ::fidl_next::CompatFrom::compat_from(value.options),
21272 }
21273 }
21274 }
21275
21276 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryUnlinkRequest>
21277 for crate::DirectoryUnlinkRequest
21278 {
21279 #[inline]
21280 fn compat_from(value: ::fidl_fuchsia_io::DirectoryUnlinkRequest) -> Self {
21281 Self {
21282 name: ::fidl_next::CompatFrom::compat_from(value.name),
21283
21284 options: ::fidl_next::CompatFrom::compat_from(value.options),
21285 }
21286 }
21287 }
21288
21289 impl ::fidl_next::CompatFrom<crate::WatchMask> for ::fidl_fuchsia_io::WatchMask {
21290 fn compat_from(value: crate::WatchMask) -> Self {
21291 Self::from_bits_retain(value.bits())
21292 }
21293 }
21294
21295 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WatchMask> for crate::WatchMask {
21296 fn compat_from(value: ::fidl_fuchsia_io::WatchMask) -> Self {
21297 Self::from_bits_retain(value.bits())
21298 }
21299 }
21300
21301 impl ::fidl_next::CompatFrom<crate::DirectoryWatchResponse>
21302 for ::fidl_fuchsia_io::DirectoryWatchResponse
21303 {
21304 #[inline]
21305 fn compat_from(value: crate::DirectoryWatchResponse) -> Self {
21306 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21307 }
21308 }
21309
21310 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryWatchResponse>
21311 for crate::DirectoryWatchResponse
21312 {
21313 #[inline]
21314 fn compat_from(value: ::fidl_fuchsia_io::DirectoryWatchResponse) -> Self {
21315 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21316 }
21317 }
21318
21319 impl ::fidl_next::CompatFrom<crate::NodeGetExtendedAttributeRequest>
21320 for ::fidl_fuchsia_io::NodeGetExtendedAttributeRequest
21321 {
21322 #[inline]
21323 fn compat_from(value: crate::NodeGetExtendedAttributeRequest) -> Self {
21324 Self { name: ::fidl_next::CompatFrom::compat_from(value.name) }
21325 }
21326 }
21327
21328 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeGetExtendedAttributeRequest>
21329 for crate::NodeGetExtendedAttributeRequest
21330 {
21331 #[inline]
21332 fn compat_from(value: ::fidl_fuchsia_io::NodeGetExtendedAttributeRequest) -> Self {
21333 Self { name: ::fidl_next::CompatFrom::compat_from(value.name) }
21334 }
21335 }
21336
21337 impl ::fidl_next::CompatFrom<crate::SetExtendedAttributeMode>
21338 for ::fidl_fuchsia_io::SetExtendedAttributeMode
21339 {
21340 fn compat_from(value: crate::SetExtendedAttributeMode) -> Self {
21341 match value {
21342 crate::SetExtendedAttributeMode::Set => Self::Set,
21343
21344 crate::SetExtendedAttributeMode::Create => Self::Create,
21345
21346 crate::SetExtendedAttributeMode::Replace => Self::Replace,
21347 }
21348 }
21349 }
21350
21351 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SetExtendedAttributeMode>
21352 for crate::SetExtendedAttributeMode
21353 {
21354 fn compat_from(value: ::fidl_fuchsia_io::SetExtendedAttributeMode) -> Self {
21355 match value {
21356 ::fidl_fuchsia_io::SetExtendedAttributeMode::Set => Self::Set,
21357
21358 ::fidl_fuchsia_io::SetExtendedAttributeMode::Create => Self::Create,
21359
21360 ::fidl_fuchsia_io::SetExtendedAttributeMode::Replace => Self::Replace,
21361 }
21362 }
21363 }
21364
21365 impl ::fidl_next::CompatFrom<crate::NodeRemoveExtendedAttributeRequest>
21366 for ::fidl_fuchsia_io::NodeRemoveExtendedAttributeRequest
21367 {
21368 #[inline]
21369 fn compat_from(value: crate::NodeRemoveExtendedAttributeRequest) -> Self {
21370 Self { name: ::fidl_next::CompatFrom::compat_from(value.name) }
21371 }
21372 }
21373
21374 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeRemoveExtendedAttributeRequest>
21375 for crate::NodeRemoveExtendedAttributeRequest
21376 {
21377 #[inline]
21378 fn compat_from(value: ::fidl_fuchsia_io::NodeRemoveExtendedAttributeRequest) -> Self {
21379 Self { name: ::fidl_next::CompatFrom::compat_from(value.name) }
21380 }
21381 }
21382
21383 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedGetAttrResponse>
21384 for ::fidl_fuchsia_io::NodeDeprecatedGetAttrResponse
21385 {
21386 #[inline]
21387 fn compat_from(value: crate::NodeDeprecatedGetAttrResponse) -> Self {
21388 Self {
21389 s: ::fidl_next::CompatFrom::compat_from(value.s),
21390
21391 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21392 }
21393 }
21394 }
21395
21396 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedGetAttrResponse>
21397 for crate::NodeDeprecatedGetAttrResponse
21398 {
21399 #[inline]
21400 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedGetAttrResponse) -> Self {
21401 Self {
21402 s: ::fidl_next::CompatFrom::compat_from(value.s),
21403
21404 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21405 }
21406 }
21407 }
21408
21409 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedSetAttrRequest>
21410 for ::fidl_fuchsia_io::NodeDeprecatedSetAttrRequest
21411 {
21412 #[inline]
21413 fn compat_from(value: crate::NodeDeprecatedSetAttrRequest) -> Self {
21414 Self {
21415 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21416
21417 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21418 }
21419 }
21420 }
21421
21422 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedSetAttrRequest>
21423 for crate::NodeDeprecatedSetAttrRequest
21424 {
21425 #[inline]
21426 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedSetAttrRequest) -> Self {
21427 Self {
21428 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21429
21430 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21431 }
21432 }
21433 }
21434
21435 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedSetAttrResponse>
21436 for ::fidl_fuchsia_io::NodeDeprecatedSetAttrResponse
21437 {
21438 #[inline]
21439 fn compat_from(value: crate::NodeDeprecatedSetAttrResponse) -> Self {
21440 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21441 }
21442 }
21443
21444 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedSetAttrResponse>
21445 for crate::NodeDeprecatedSetAttrResponse
21446 {
21447 #[inline]
21448 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedSetAttrResponse) -> Self {
21449 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21450 }
21451 }
21452
21453 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedGetFlagsResponse>
21454 for ::fidl_fuchsia_io::NodeDeprecatedGetFlagsResponse
21455 {
21456 #[inline]
21457 fn compat_from(value: crate::NodeDeprecatedGetFlagsResponse) -> Self {
21458 Self {
21459 s: ::fidl_next::CompatFrom::compat_from(value.s),
21460
21461 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21462 }
21463 }
21464 }
21465
21466 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedGetFlagsResponse>
21467 for crate::NodeDeprecatedGetFlagsResponse
21468 {
21469 #[inline]
21470 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedGetFlagsResponse) -> Self {
21471 Self {
21472 s: ::fidl_next::CompatFrom::compat_from(value.s),
21473
21474 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21475 }
21476 }
21477 }
21478
21479 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedSetFlagsRequest>
21480 for ::fidl_fuchsia_io::NodeDeprecatedSetFlagsRequest
21481 {
21482 #[inline]
21483 fn compat_from(value: crate::NodeDeprecatedSetFlagsRequest) -> Self {
21484 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21485 }
21486 }
21487
21488 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedSetFlagsRequest>
21489 for crate::NodeDeprecatedSetFlagsRequest
21490 {
21491 #[inline]
21492 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedSetFlagsRequest) -> Self {
21493 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21494 }
21495 }
21496
21497 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedSetFlagsResponse>
21498 for ::fidl_fuchsia_io::NodeDeprecatedSetFlagsResponse
21499 {
21500 #[inline]
21501 fn compat_from(value: crate::NodeDeprecatedSetFlagsResponse) -> Self {
21502 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21503 }
21504 }
21505
21506 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedSetFlagsResponse>
21507 for crate::NodeDeprecatedSetFlagsResponse
21508 {
21509 #[inline]
21510 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedSetFlagsResponse) -> Self {
21511 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21512 }
21513 }
21514
21515 impl ::fidl_next::CompatFrom<crate::Flags> for ::fidl_fuchsia_io::Flags {
21516 fn compat_from(value: crate::Flags) -> Self {
21517 Self::from_bits_retain(value.bits())
21518 }
21519 }
21520
21521 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Flags> for crate::Flags {
21522 fn compat_from(value: ::fidl_fuchsia_io::Flags) -> Self {
21523 Self::from_bits_retain(value.bits())
21524 }
21525 }
21526
21527 impl ::fidl_next::CompatFrom<crate::NodeGetFlagsResponse>
21528 for ::fidl_fuchsia_io::NodeGetFlagsResponse
21529 {
21530 #[inline]
21531 fn compat_from(value: crate::NodeGetFlagsResponse) -> Self {
21532 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21533 }
21534 }
21535
21536 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeGetFlagsResponse>
21537 for crate::NodeGetFlagsResponse
21538 {
21539 #[inline]
21540 fn compat_from(value: ::fidl_fuchsia_io::NodeGetFlagsResponse) -> Self {
21541 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21542 }
21543 }
21544
21545 impl ::fidl_next::CompatFrom<crate::NodeSetFlagsRequest>
21546 for ::fidl_fuchsia_io::NodeSetFlagsRequest
21547 {
21548 #[inline]
21549 fn compat_from(value: crate::NodeSetFlagsRequest) -> Self {
21550 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21551 }
21552 }
21553
21554 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeSetFlagsRequest>
21555 for crate::NodeSetFlagsRequest
21556 {
21557 #[inline]
21558 fn compat_from(value: ::fidl_fuchsia_io::NodeSetFlagsRequest) -> Self {
21559 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21560 }
21561 }
21562
21563 impl ::fidl_next::CompatFrom<crate::EmptyStruct> for ::fidl_fuchsia_io::EmptyStruct {
21564 #[inline]
21565 fn compat_from(value: crate::EmptyStruct) -> Self {
21566 Self {}
21567 }
21568 }
21569
21570 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::EmptyStruct> for crate::EmptyStruct {
21571 #[inline]
21572 fn compat_from(value: ::fidl_fuchsia_io::EmptyStruct) -> Self {
21573 Self {}
21574 }
21575 }
21576
21577 impl ::fidl_next::CompatFrom<crate::SelinuxContext> for ::fidl_fuchsia_io::SelinuxContext {
21578 fn compat_from(value: crate::SelinuxContext) -> Self {
21579 match value {
21580 crate::SelinuxContext::Data(value) => {
21581 Self::Data(::fidl_next::CompatFrom::compat_from(value))
21582 }
21583
21584 crate::SelinuxContext::UseExtendedAttributes(value) => {
21585 Self::UseExtendedAttributes(::fidl_next::CompatFrom::compat_from(value))
21586 }
21587
21588 crate::SelinuxContext::UnknownOrdinal_(unknown_ordinal) => {
21589 Self::__SourceBreaking { unknown_ordinal }
21590 }
21591 }
21592 }
21593 }
21594
21595 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SelinuxContext> for crate::SelinuxContext {
21596 fn compat_from(value: ::fidl_fuchsia_io::SelinuxContext) -> Self {
21597 match value {
21598 ::fidl_fuchsia_io::SelinuxContext::Data(value) => {
21599 Self::Data(::fidl_next::CompatFrom::compat_from(value))
21600 }
21601
21602 ::fidl_fuchsia_io::SelinuxContext::UseExtendedAttributes(value) => {
21603 Self::UseExtendedAttributes(::fidl_next::CompatFrom::compat_from(value))
21604 }
21605
21606 ::fidl_fuchsia_io::SelinuxContext::__SourceBreaking { unknown_ordinal } => {
21607 Self::UnknownOrdinal_(unknown_ordinal)
21608 }
21609 }
21610 }
21611 }
21612
21613 impl ::fidl_next::CompatFrom<crate::MutableNodeAttributes>
21614 for ::fidl_fuchsia_io::MutableNodeAttributes
21615 {
21616 fn compat_from(value: crate::MutableNodeAttributes) -> Self {
21617 Self {
21618 creation_time: ::fidl_next::CompatFrom::compat_from(value.creation_time),
21619
21620 modification_time: ::fidl_next::CompatFrom::compat_from(value.modification_time),
21621
21622 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
21623
21624 uid: ::fidl_next::CompatFrom::compat_from(value.uid),
21625
21626 gid: ::fidl_next::CompatFrom::compat_from(value.gid),
21627
21628 rdev: ::fidl_next::CompatFrom::compat_from(value.rdev),
21629
21630 access_time: ::fidl_next::CompatFrom::compat_from(value.access_time),
21631
21632 casefold: ::fidl_next::CompatFrom::compat_from(value.casefold),
21633
21634 selinux_context: ::fidl_next::CompatFrom::compat_from(value.selinux_context),
21635
21636 wrapping_key_id: ::fidl_next::CompatFrom::compat_from(value.wrapping_key_id),
21637
21638 __source_breaking: ::fidl::marker::SourceBreaking,
21639 }
21640 }
21641 }
21642
21643 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::MutableNodeAttributes>
21644 for crate::MutableNodeAttributes
21645 {
21646 fn compat_from(value: ::fidl_fuchsia_io::MutableNodeAttributes) -> Self {
21647 Self {
21648 creation_time: ::fidl_next::CompatFrom::compat_from(value.creation_time),
21649
21650 modification_time: ::fidl_next::CompatFrom::compat_from(value.modification_time),
21651
21652 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
21653
21654 uid: ::fidl_next::CompatFrom::compat_from(value.uid),
21655
21656 gid: ::fidl_next::CompatFrom::compat_from(value.gid),
21657
21658 rdev: ::fidl_next::CompatFrom::compat_from(value.rdev),
21659
21660 access_time: ::fidl_next::CompatFrom::compat_from(value.access_time),
21661
21662 casefold: ::fidl_next::CompatFrom::compat_from(value.casefold),
21663
21664 selinux_context: ::fidl_next::CompatFrom::compat_from(value.selinux_context),
21665
21666 wrapping_key_id: ::fidl_next::CompatFrom::compat_from(value.wrapping_key_id),
21667 }
21668 }
21669 }
21670
21671 impl ::fidl_next::CompatFrom<crate::NodeProtocolKinds> for ::fidl_fuchsia_io::NodeProtocolKinds {
21672 fn compat_from(value: crate::NodeProtocolKinds) -> Self {
21673 Self::from_bits_retain(value.bits())
21674 }
21675 }
21676
21677 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeProtocolKinds> for crate::NodeProtocolKinds {
21678 fn compat_from(value: ::fidl_fuchsia_io::NodeProtocolKinds) -> Self {
21679 Self::from_bits_retain(value.bits())
21680 }
21681 }
21682
21683 impl ::fidl_next::CompatFrom<crate::HashAlgorithm> for ::fidl_fuchsia_io::HashAlgorithm {
21684 fn compat_from(value: crate::HashAlgorithm) -> Self {
21685 match value {
21686 crate::HashAlgorithm::Sha256 => Self::Sha256,
21687
21688 crate::HashAlgorithm::Sha512 => Self::Sha512,
21689
21690 crate::HashAlgorithm::UnknownOrdinal_(unknown_ordinal) => {
21691 Self::__SourceBreaking { unknown_ordinal }
21692 }
21693 }
21694 }
21695 }
21696
21697 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::HashAlgorithm> for crate::HashAlgorithm {
21698 fn compat_from(value: ::fidl_fuchsia_io::HashAlgorithm) -> Self {
21699 match value {
21700 ::fidl_fuchsia_io::HashAlgorithm::Sha256 => Self::Sha256,
21701
21702 ::fidl_fuchsia_io::HashAlgorithm::Sha512 => Self::Sha512,
21703
21704 ::fidl_fuchsia_io::HashAlgorithm::__SourceBreaking { unknown_ordinal: value } => {
21705 Self::UnknownOrdinal_(value)
21706 }
21707 }
21708 }
21709 }
21710
21711 impl ::fidl_next::CompatFrom<crate::VerificationOptions>
21712 for ::fidl_fuchsia_io::VerificationOptions
21713 {
21714 fn compat_from(value: crate::VerificationOptions) -> Self {
21715 Self {
21716 hash_algorithm: ::fidl_next::CompatFrom::compat_from(value.hash_algorithm),
21717
21718 salt: ::fidl_next::CompatFrom::compat_from(value.salt),
21719
21720 __source_breaking: ::fidl::marker::SourceBreaking,
21721 }
21722 }
21723 }
21724
21725 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::VerificationOptions>
21726 for crate::VerificationOptions
21727 {
21728 fn compat_from(value: ::fidl_fuchsia_io::VerificationOptions) -> Self {
21729 Self {
21730 hash_algorithm: ::fidl_next::CompatFrom::compat_from(value.hash_algorithm),
21731
21732 salt: ::fidl_next::CompatFrom::compat_from(value.salt),
21733 }
21734 }
21735 }
21736
21737 impl ::fidl_next::CompatFrom<crate::ImmutableNodeAttributes>
21738 for ::fidl_fuchsia_io::ImmutableNodeAttributes
21739 {
21740 fn compat_from(value: crate::ImmutableNodeAttributes) -> Self {
21741 Self {
21742 protocols: ::fidl_next::CompatFrom::compat_from(value.protocols),
21743
21744 abilities: ::fidl_next::CompatFrom::compat_from(value.abilities),
21745
21746 content_size: ::fidl_next::CompatFrom::compat_from(value.content_size),
21747
21748 storage_size: ::fidl_next::CompatFrom::compat_from(value.storage_size),
21749
21750 link_count: ::fidl_next::CompatFrom::compat_from(value.link_count),
21751
21752 id: ::fidl_next::CompatFrom::compat_from(value.id),
21753
21754 change_time: ::fidl_next::CompatFrom::compat_from(value.change_time),
21755
21756 options: ::fidl_next::CompatFrom::compat_from(value.options),
21757
21758 root_hash: ::fidl_next::CompatFrom::compat_from(value.root_hash),
21759
21760 verity_enabled: ::fidl_next::CompatFrom::compat_from(value.verity_enabled),
21761
21762 __source_breaking: ::fidl::marker::SourceBreaking,
21763 }
21764 }
21765 }
21766
21767 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ImmutableNodeAttributes>
21768 for crate::ImmutableNodeAttributes
21769 {
21770 fn compat_from(value: ::fidl_fuchsia_io::ImmutableNodeAttributes) -> Self {
21771 Self {
21772 protocols: ::fidl_next::CompatFrom::compat_from(value.protocols),
21773
21774 abilities: ::fidl_next::CompatFrom::compat_from(value.abilities),
21775
21776 content_size: ::fidl_next::CompatFrom::compat_from(value.content_size),
21777
21778 storage_size: ::fidl_next::CompatFrom::compat_from(value.storage_size),
21779
21780 link_count: ::fidl_next::CompatFrom::compat_from(value.link_count),
21781
21782 id: ::fidl_next::CompatFrom::compat_from(value.id),
21783
21784 change_time: ::fidl_next::CompatFrom::compat_from(value.change_time),
21785
21786 options: ::fidl_next::CompatFrom::compat_from(value.options),
21787
21788 root_hash: ::fidl_next::CompatFrom::compat_from(value.root_hash),
21789
21790 verity_enabled: ::fidl_next::CompatFrom::compat_from(value.verity_enabled),
21791 }
21792 }
21793 }
21794
21795 impl ::fidl_next::CompatFrom<crate::NodeAttributes2> for ::fidl_fuchsia_io::NodeAttributes2 {
21796 #[inline]
21797 fn compat_from(value: crate::NodeAttributes2) -> Self {
21798 Self {
21799 mutable_attributes: ::fidl_next::CompatFrom::compat_from(value.mutable_attributes),
21800
21801 immutable_attributes: ::fidl_next::CompatFrom::compat_from(
21802 value.immutable_attributes,
21803 ),
21804 }
21805 }
21806 }
21807
21808 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeAttributes2> for crate::NodeAttributes2 {
21809 #[inline]
21810 fn compat_from(value: ::fidl_fuchsia_io::NodeAttributes2) -> Self {
21811 Self {
21812 mutable_attributes: ::fidl_next::CompatFrom::compat_from(value.mutable_attributes),
21813
21814 immutable_attributes: ::fidl_next::CompatFrom::compat_from(
21815 value.immutable_attributes,
21816 ),
21817 }
21818 }
21819 }
21820
21821 impl ::fidl_next::CompatFrom<crate::NodeInfo> for ::fidl_fuchsia_io::NodeInfo {
21822 fn compat_from(value: crate::NodeInfo) -> Self {
21823 Self {
21824 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21825
21826 __source_breaking: ::fidl::marker::SourceBreaking,
21827 }
21828 }
21829 }
21830
21831 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeInfo> for crate::NodeInfo {
21832 fn compat_from(value: ::fidl_fuchsia_io::NodeInfo) -> Self {
21833 Self { attributes: ::fidl_next::CompatFrom::compat_from(value.attributes) }
21834 }
21835 }
21836
21837 impl ::fidl_next::CompatFrom<crate::DirectoryInfo> for ::fidl_fuchsia_io::DirectoryInfo {
21838 fn compat_from(value: crate::DirectoryInfo) -> Self {
21839 Self {
21840 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21841
21842 __source_breaking: ::fidl::marker::SourceBreaking,
21843 }
21844 }
21845 }
21846
21847 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryInfo> for crate::DirectoryInfo {
21848 fn compat_from(value: ::fidl_fuchsia_io::DirectoryInfo) -> Self {
21849 Self { attributes: ::fidl_next::CompatFrom::compat_from(value.attributes) }
21850 }
21851 }
21852
21853 impl ::fidl_next::CompatFrom<crate::SymlinkInfo> for ::fidl_fuchsia_io::SymlinkInfo {
21854 fn compat_from(value: crate::SymlinkInfo) -> Self {
21855 Self {
21856 target: ::fidl_next::CompatFrom::compat_from(value.target),
21857
21858 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21859
21860 __source_breaking: ::fidl::marker::SourceBreaking,
21861 }
21862 }
21863 }
21864
21865 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SymlinkInfo> for crate::SymlinkInfo {
21866 fn compat_from(value: ::fidl_fuchsia_io::SymlinkInfo) -> Self {
21867 Self {
21868 target: ::fidl_next::CompatFrom::compat_from(value.target),
21869
21870 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21871 }
21872 }
21873 }
21874
21875 impl ::fidl_next::CompatFrom<crate::NodeAttributesQuery>
21876 for ::fidl_fuchsia_io::NodeAttributesQuery
21877 {
21878 fn compat_from(value: crate::NodeAttributesQuery) -> Self {
21879 Self::from_bits_retain(value.bits())
21880 }
21881 }
21882
21883 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeAttributesQuery>
21884 for crate::NodeAttributesQuery
21885 {
21886 fn compat_from(value: ::fidl_fuchsia_io::NodeAttributesQuery) -> Self {
21887 Self::from_bits_retain(value.bits())
21888 }
21889 }
21890
21891 impl ::fidl_next::CompatFrom<crate::NodeGetAttributesRequest>
21892 for ::fidl_fuchsia_io::NodeGetAttributesRequest
21893 {
21894 #[inline]
21895 fn compat_from(value: crate::NodeGetAttributesRequest) -> Self {
21896 Self { query: ::fidl_next::CompatFrom::compat_from(value.query) }
21897 }
21898 }
21899
21900 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeGetAttributesRequest>
21901 for crate::NodeGetAttributesRequest
21902 {
21903 #[inline]
21904 fn compat_from(value: ::fidl_fuchsia_io::NodeGetAttributesRequest) -> Self {
21905 Self { query: ::fidl_next::CompatFrom::compat_from(value.query) }
21906 }
21907 }
21908
21909 impl ::fidl_next::CompatFrom<crate::Options> for ::fidl_fuchsia_io::Options {
21910 fn compat_from(value: crate::Options) -> Self {
21911 Self {
21912 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21913
21914 create_attributes: ::fidl_next::CompatFrom::compat_from(value.create_attributes),
21915
21916 __source_breaking: ::fidl::marker::SourceBreaking,
21917 }
21918 }
21919 }
21920
21921 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Options> for crate::Options {
21922 fn compat_from(value: ::fidl_fuchsia_io::Options) -> Self {
21923 Self {
21924 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21925
21926 create_attributes: ::fidl_next::CompatFrom::compat_from(value.create_attributes),
21927 }
21928 }
21929 }
21930
21931 impl ::fidl_next::CompatFrom<crate::DirectoryObject> for ::fidl_fuchsia_io::DirectoryObject {
21932 #[inline]
21933 fn compat_from(value: crate::DirectoryObject) -> Self {
21934 Self {}
21935 }
21936 }
21937
21938 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryObject> for crate::DirectoryObject {
21939 #[inline]
21940 fn compat_from(value: ::fidl_fuchsia_io::DirectoryObject) -> Self {
21941 Self {}
21942 }
21943 }
21944
21945 #[cfg(target_os = "fuchsia")]
21946 pub type DirectoryWatcherProxy = ::fidl_next::Client<crate::DirectoryWatcher>;
21949
21950 impl ::fidl_next::CompatFrom<crate::DirectoryWatcher>
21951 for ::fidl_fuchsia_io::DirectoryWatcherMarker
21952 {
21953 fn compat_from(_: crate::DirectoryWatcher) -> Self {
21954 Self
21955 }
21956 }
21957
21958 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryWatcherMarker>
21959 for crate::DirectoryWatcher
21960 {
21961 fn compat_from(_: ::fidl_fuchsia_io::DirectoryWatcherMarker) -> Self {
21962 Self
21963 }
21964 }
21965
21966 #[cfg(target_os = "fuchsia")]
21967
21968 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::DirectoryWatcherProxy>
21969 for crate::DirectoryWatcher
21970 {
21971 fn client_compat_from(
21972 proxy: ::fidl_fuchsia_io::DirectoryWatcherProxy,
21973 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
21974 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
21975 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
21976 ::fidl_next::ClientDispatcher::new(client_end)
21977 }
21978 }
21979
21980 impl ::fidl_next::CompatFrom<crate::DirentType> for ::fidl_fuchsia_io::DirentType {
21981 fn compat_from(value: crate::DirentType) -> Self {
21982 match value {
21983 crate::DirentType::Unknown => Self::Unknown,
21984
21985 crate::DirentType::Directory => Self::Directory,
21986
21987 crate::DirentType::BlockDevice => Self::BlockDevice,
21988
21989 crate::DirentType::File => Self::File,
21990
21991 crate::DirentType::Symlink => Self::Symlink,
21992
21993 crate::DirentType::Service => Self::Service,
21994
21995 crate::DirentType::UnknownOrdinal_(unknown_ordinal) => {
21996 Self::__SourceBreaking { unknown_ordinal }
21997 }
21998 }
21999 }
22000 }
22001
22002 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirentType> for crate::DirentType {
22003 fn compat_from(value: ::fidl_fuchsia_io::DirentType) -> Self {
22004 match value {
22005 ::fidl_fuchsia_io::DirentType::Unknown => Self::Unknown,
22006
22007 ::fidl_fuchsia_io::DirentType::Directory => Self::Directory,
22008
22009 ::fidl_fuchsia_io::DirentType::BlockDevice => Self::BlockDevice,
22010
22011 ::fidl_fuchsia_io::DirentType::File => Self::File,
22012
22013 ::fidl_fuchsia_io::DirentType::Symlink => Self::Symlink,
22014
22015 ::fidl_fuchsia_io::DirentType::Service => Self::Service,
22016
22017 ::fidl_fuchsia_io::DirentType::__SourceBreaking { unknown_ordinal: value } => {
22018 Self::UnknownOrdinal_(value)
22019 }
22020 }
22021 }
22022 }
22023
22024 impl ::fidl_next::CompatFrom<crate::ExtendedAttributeIteratorGetNextResponse>
22025 for ::fidl_fuchsia_io::ExtendedAttributeIteratorGetNextResponse
22026 {
22027 #[inline]
22028 fn compat_from(value: crate::ExtendedAttributeIteratorGetNextResponse) -> Self {
22029 Self {
22030 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
22031
22032 last: ::fidl_next::CompatFrom::compat_from(value.last),
22033 }
22034 }
22035 }
22036
22037 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ExtendedAttributeIteratorGetNextResponse>
22038 for crate::ExtendedAttributeIteratorGetNextResponse
22039 {
22040 #[inline]
22041 fn compat_from(value: ::fidl_fuchsia_io::ExtendedAttributeIteratorGetNextResponse) -> Self {
22042 Self {
22043 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
22044
22045 last: ::fidl_next::CompatFrom::compat_from(value.last),
22046 }
22047 }
22048 }
22049
22050 #[cfg(target_os = "fuchsia")]
22051 pub type ExtendedAttributeIteratorProxy = ::fidl_next::Client<crate::ExtendedAttributeIterator>;
22054
22055 impl ::fidl_next::CompatFrom<crate::ExtendedAttributeIterator>
22056 for ::fidl_fuchsia_io::ExtendedAttributeIteratorMarker
22057 {
22058 fn compat_from(_: crate::ExtendedAttributeIterator) -> Self {
22059 Self
22060 }
22061 }
22062
22063 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ExtendedAttributeIteratorMarker>
22064 for crate::ExtendedAttributeIterator
22065 {
22066 fn compat_from(_: ::fidl_fuchsia_io::ExtendedAttributeIteratorMarker) -> Self {
22067 Self
22068 }
22069 }
22070
22071 #[cfg(target_os = "fuchsia")]
22072
22073 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::ExtendedAttributeIteratorProxy>
22074 for crate::ExtendedAttributeIterator
22075 {
22076 fn client_compat_from(
22077 proxy: ::fidl_fuchsia_io::ExtendedAttributeIteratorProxy,
22078 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
22079 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
22080 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
22081 ::fidl_next::ClientDispatcher::new(client_end)
22082 }
22083 }
22084
22085 impl ::fidl_next::CompatFrom<crate::ReadableReadRequest>
22086 for ::fidl_fuchsia_io::ReadableReadRequest
22087 {
22088 #[inline]
22089 fn compat_from(value: crate::ReadableReadRequest) -> Self {
22090 Self { count: ::fidl_next::CompatFrom::compat_from(value.count) }
22091 }
22092 }
22093
22094 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ReadableReadRequest>
22095 for crate::ReadableReadRequest
22096 {
22097 #[inline]
22098 fn compat_from(value: ::fidl_fuchsia_io::ReadableReadRequest) -> Self {
22099 Self { count: ::fidl_next::CompatFrom::compat_from(value.count) }
22100 }
22101 }
22102
22103 impl ::fidl_next::CompatFrom<crate::ReadableReadResponse>
22104 for ::fidl_fuchsia_io::ReadableReadResponse
22105 {
22106 #[inline]
22107 fn compat_from(value: crate::ReadableReadResponse) -> Self {
22108 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22109 }
22110 }
22111
22112 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ReadableReadResponse>
22113 for crate::ReadableReadResponse
22114 {
22115 #[inline]
22116 fn compat_from(value: ::fidl_fuchsia_io::ReadableReadResponse) -> Self {
22117 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22118 }
22119 }
22120
22121 #[cfg(target_os = "fuchsia")]
22122 pub type ReadableProxy = ::fidl_next::Client<crate::Readable>;
22125
22126 impl ::fidl_next::CompatFrom<crate::Readable> for ::fidl_fuchsia_io::ReadableMarker {
22127 fn compat_from(_: crate::Readable) -> Self {
22128 Self
22129 }
22130 }
22131
22132 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ReadableMarker> for crate::Readable {
22133 fn compat_from(_: ::fidl_fuchsia_io::ReadableMarker) -> Self {
22134 Self
22135 }
22136 }
22137
22138 #[cfg(target_os = "fuchsia")]
22139
22140 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::ReadableProxy> for crate::Readable {
22141 fn client_compat_from(
22142 proxy: ::fidl_fuchsia_io::ReadableProxy,
22143 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
22144 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
22145 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
22146 ::fidl_next::ClientDispatcher::new(client_end)
22147 }
22148 }
22149
22150 impl ::fidl_next::CompatFrom<crate::WritableWriteRequest>
22151 for ::fidl_fuchsia_io::WritableWriteRequest
22152 {
22153 #[inline]
22154 fn compat_from(value: crate::WritableWriteRequest) -> Self {
22155 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22156 }
22157 }
22158
22159 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WritableWriteRequest>
22160 for crate::WritableWriteRequest
22161 {
22162 #[inline]
22163 fn compat_from(value: ::fidl_fuchsia_io::WritableWriteRequest) -> Self {
22164 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22165 }
22166 }
22167
22168 impl ::fidl_next::CompatFrom<crate::WritableWriteResponse>
22169 for ::fidl_fuchsia_io::WritableWriteResponse
22170 {
22171 #[inline]
22172 fn compat_from(value: crate::WritableWriteResponse) -> Self {
22173 Self { actual_count: ::fidl_next::CompatFrom::compat_from(value.actual_count) }
22174 }
22175 }
22176
22177 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WritableWriteResponse>
22178 for crate::WritableWriteResponse
22179 {
22180 #[inline]
22181 fn compat_from(value: ::fidl_fuchsia_io::WritableWriteResponse) -> Self {
22182 Self { actual_count: ::fidl_next::CompatFrom::compat_from(value.actual_count) }
22183 }
22184 }
22185
22186 #[cfg(target_os = "fuchsia")]
22187 pub type WritableProxy = ::fidl_next::Client<crate::Writable>;
22190
22191 impl ::fidl_next::CompatFrom<crate::Writable> for ::fidl_fuchsia_io::WritableMarker {
22192 fn compat_from(_: crate::Writable) -> Self {
22193 Self
22194 }
22195 }
22196
22197 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WritableMarker> for crate::Writable {
22198 fn compat_from(_: ::fidl_fuchsia_io::WritableMarker) -> Self {
22199 Self
22200 }
22201 }
22202
22203 #[cfg(target_os = "fuchsia")]
22204
22205 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::WritableProxy> for crate::Writable {
22206 fn client_compat_from(
22207 proxy: ::fidl_fuchsia_io::WritableProxy,
22208 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
22209 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
22210 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
22211 ::fidl_next::ClientDispatcher::new(client_end)
22212 }
22213 }
22214
22215 impl ::fidl_next::CompatFrom<crate::FileSeekRequest> for ::fidl_fuchsia_io::FileSeekRequest {
22216 #[inline]
22217 fn compat_from(value: crate::FileSeekRequest) -> Self {
22218 Self {
22219 origin: ::fidl_next::CompatFrom::compat_from(value.origin),
22220
22221 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22222 }
22223 }
22224 }
22225
22226 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileSeekRequest> for crate::FileSeekRequest {
22227 #[inline]
22228 fn compat_from(value: ::fidl_fuchsia_io::FileSeekRequest) -> Self {
22229 Self {
22230 origin: ::fidl_next::CompatFrom::compat_from(value.origin),
22231
22232 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22233 }
22234 }
22235 }
22236
22237 impl ::fidl_next::CompatFrom<crate::FileSeekResponse> for ::fidl_fuchsia_io::FileSeekResponse {
22238 #[inline]
22239 fn compat_from(value: crate::FileSeekResponse) -> Self {
22240 Self {
22241 offset_from_start: ::fidl_next::CompatFrom::compat_from(value.offset_from_start),
22242 }
22243 }
22244 }
22245
22246 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileSeekResponse> for crate::FileSeekResponse {
22247 #[inline]
22248 fn compat_from(value: ::fidl_fuchsia_io::FileSeekResponse) -> Self {
22249 Self {
22250 offset_from_start: ::fidl_next::CompatFrom::compat_from(value.offset_from_start),
22251 }
22252 }
22253 }
22254
22255 impl ::fidl_next::CompatFrom<crate::FileReadAtRequest> for ::fidl_fuchsia_io::FileReadAtRequest {
22256 #[inline]
22257 fn compat_from(value: crate::FileReadAtRequest) -> Self {
22258 Self {
22259 count: ::fidl_next::CompatFrom::compat_from(value.count),
22260
22261 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22262 }
22263 }
22264 }
22265
22266 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileReadAtRequest> for crate::FileReadAtRequest {
22267 #[inline]
22268 fn compat_from(value: ::fidl_fuchsia_io::FileReadAtRequest) -> Self {
22269 Self {
22270 count: ::fidl_next::CompatFrom::compat_from(value.count),
22271
22272 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22273 }
22274 }
22275 }
22276
22277 impl ::fidl_next::CompatFrom<crate::FileReadAtResponse> for ::fidl_fuchsia_io::FileReadAtResponse {
22278 #[inline]
22279 fn compat_from(value: crate::FileReadAtResponse) -> Self {
22280 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22281 }
22282 }
22283
22284 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileReadAtResponse> for crate::FileReadAtResponse {
22285 #[inline]
22286 fn compat_from(value: ::fidl_fuchsia_io::FileReadAtResponse) -> Self {
22287 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22288 }
22289 }
22290
22291 impl ::fidl_next::CompatFrom<crate::FileWriteAtRequest> for ::fidl_fuchsia_io::FileWriteAtRequest {
22292 #[inline]
22293 fn compat_from(value: crate::FileWriteAtRequest) -> Self {
22294 Self {
22295 data: ::fidl_next::CompatFrom::compat_from(value.data),
22296
22297 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22298 }
22299 }
22300 }
22301
22302 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileWriteAtRequest> for crate::FileWriteAtRequest {
22303 #[inline]
22304 fn compat_from(value: ::fidl_fuchsia_io::FileWriteAtRequest) -> Self {
22305 Self {
22306 data: ::fidl_next::CompatFrom::compat_from(value.data),
22307
22308 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22309 }
22310 }
22311 }
22312
22313 impl ::fidl_next::CompatFrom<crate::FileWriteAtResponse>
22314 for ::fidl_fuchsia_io::FileWriteAtResponse
22315 {
22316 #[inline]
22317 fn compat_from(value: crate::FileWriteAtResponse) -> Self {
22318 Self { actual_count: ::fidl_next::CompatFrom::compat_from(value.actual_count) }
22319 }
22320 }
22321
22322 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileWriteAtResponse>
22323 for crate::FileWriteAtResponse
22324 {
22325 #[inline]
22326 fn compat_from(value: ::fidl_fuchsia_io::FileWriteAtResponse) -> Self {
22327 Self { actual_count: ::fidl_next::CompatFrom::compat_from(value.actual_count) }
22328 }
22329 }
22330
22331 impl ::fidl_next::CompatFrom<crate::FileResizeRequest> for ::fidl_fuchsia_io::FileResizeRequest {
22332 #[inline]
22333 fn compat_from(value: crate::FileResizeRequest) -> Self {
22334 Self { length: ::fidl_next::CompatFrom::compat_from(value.length) }
22335 }
22336 }
22337
22338 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileResizeRequest> for crate::FileResizeRequest {
22339 #[inline]
22340 fn compat_from(value: ::fidl_fuchsia_io::FileResizeRequest) -> Self {
22341 Self { length: ::fidl_next::CompatFrom::compat_from(value.length) }
22342 }
22343 }
22344
22345 impl ::fidl_next::CompatFrom<crate::VmoFlags> for ::fidl_fuchsia_io::VmoFlags {
22346 fn compat_from(value: crate::VmoFlags) -> Self {
22347 Self::from_bits_retain(value.bits())
22348 }
22349 }
22350
22351 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::VmoFlags> for crate::VmoFlags {
22352 fn compat_from(value: ::fidl_fuchsia_io::VmoFlags) -> Self {
22353 Self::from_bits_retain(value.bits())
22354 }
22355 }
22356
22357 impl ::fidl_next::CompatFrom<crate::FileGetBackingMemoryRequest>
22358 for ::fidl_fuchsia_io::FileGetBackingMemoryRequest
22359 {
22360 #[inline]
22361 fn compat_from(value: crate::FileGetBackingMemoryRequest) -> Self {
22362 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
22363 }
22364 }
22365
22366 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileGetBackingMemoryRequest>
22367 for crate::FileGetBackingMemoryRequest
22368 {
22369 #[inline]
22370 fn compat_from(value: ::fidl_fuchsia_io::FileGetBackingMemoryRequest) -> Self {
22371 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
22372 }
22373 }
22374
22375 impl ::fidl_next::CompatFrom<crate::FileSignal> for ::fidl_fuchsia_io::FileSignal {
22376 fn compat_from(value: crate::FileSignal) -> Self {
22377 Self::from_bits_retain(value.bits())
22378 }
22379 }
22380
22381 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileSignal> for crate::FileSignal {
22382 fn compat_from(value: ::fidl_fuchsia_io::FileSignal) -> Self {
22383 Self::from_bits_retain(value.bits())
22384 }
22385 }
22386
22387 impl ::fidl_next::CompatFrom<crate::FilesystemInfo> for ::fidl_fuchsia_io::FilesystemInfo {
22388 #[inline]
22389 fn compat_from(value: crate::FilesystemInfo) -> Self {
22390 Self {
22391 total_bytes: ::fidl_next::CompatFrom::compat_from(value.total_bytes),
22392
22393 used_bytes: ::fidl_next::CompatFrom::compat_from(value.used_bytes),
22394
22395 total_nodes: ::fidl_next::CompatFrom::compat_from(value.total_nodes),
22396
22397 used_nodes: ::fidl_next::CompatFrom::compat_from(value.used_nodes),
22398
22399 free_shared_pool_bytes: ::fidl_next::CompatFrom::compat_from(
22400 value.free_shared_pool_bytes,
22401 ),
22402
22403 fs_id: ::fidl_next::CompatFrom::compat_from(value.fs_id),
22404
22405 block_size: ::fidl_next::CompatFrom::compat_from(value.block_size),
22406
22407 max_filename_size: ::fidl_next::CompatFrom::compat_from(value.max_filename_size),
22408
22409 fs_type: ::fidl_next::CompatFrom::compat_from(value.fs_type),
22410
22411 padding: ::fidl_next::CompatFrom::compat_from(value.padding),
22412
22413 name: ::fidl_next::CompatFrom::compat_from(value.name),
22414 }
22415 }
22416 }
22417
22418 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FilesystemInfo> for crate::FilesystemInfo {
22419 #[inline]
22420 fn compat_from(value: ::fidl_fuchsia_io::FilesystemInfo) -> Self {
22421 Self {
22422 total_bytes: ::fidl_next::CompatFrom::compat_from(value.total_bytes),
22423
22424 used_bytes: ::fidl_next::CompatFrom::compat_from(value.used_bytes),
22425
22426 total_nodes: ::fidl_next::CompatFrom::compat_from(value.total_nodes),
22427
22428 used_nodes: ::fidl_next::CompatFrom::compat_from(value.used_nodes),
22429
22430 free_shared_pool_bytes: ::fidl_next::CompatFrom::compat_from(
22431 value.free_shared_pool_bytes,
22432 ),
22433
22434 fs_id: ::fidl_next::CompatFrom::compat_from(value.fs_id),
22435
22436 block_size: ::fidl_next::CompatFrom::compat_from(value.block_size),
22437
22438 max_filename_size: ::fidl_next::CompatFrom::compat_from(value.max_filename_size),
22439
22440 fs_type: ::fidl_next::CompatFrom::compat_from(value.fs_type),
22441
22442 padding: ::fidl_next::CompatFrom::compat_from(value.padding),
22443
22444 name: ::fidl_next::CompatFrom::compat_from(value.name),
22445 }
22446 }
22447 }
22448
22449 impl ::fidl_next::CompatFrom<crate::Service> for ::fidl_fuchsia_io::Service {
22450 #[inline]
22451 fn compat_from(value: crate::Service) -> Self {
22452 Self {}
22453 }
22454 }
22455
22456 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Service> for crate::Service {
22457 #[inline]
22458 fn compat_from(value: ::fidl_fuchsia_io::Service) -> Self {
22459 Self {}
22460 }
22461 }
22462
22463 impl ::fidl_next::CompatFrom<crate::SymlinkObject> for ::fidl_fuchsia_io::SymlinkObject {
22464 #[inline]
22465 fn compat_from(value: crate::SymlinkObject) -> Self {
22466 Self { target: ::fidl_next::CompatFrom::compat_from(value.target) }
22467 }
22468 }
22469
22470 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SymlinkObject> for crate::SymlinkObject {
22471 #[inline]
22472 fn compat_from(value: ::fidl_fuchsia_io::SymlinkObject) -> Self {
22473 Self { target: ::fidl_next::CompatFrom::compat_from(value.target) }
22474 }
22475 }
22476
22477 impl ::fidl_next::CompatFrom<crate::WatchEvent> for ::fidl_fuchsia_io::WatchEvent {
22478 fn compat_from(value: crate::WatchEvent) -> Self {
22479 match value {
22480 crate::WatchEvent::Deleted => Self::Deleted,
22481
22482 crate::WatchEvent::Added => Self::Added,
22483
22484 crate::WatchEvent::Removed => Self::Removed,
22485
22486 crate::WatchEvent::Existing => Self::Existing,
22487
22488 crate::WatchEvent::Idle => Self::Idle,
22489 }
22490 }
22491 }
22492
22493 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WatchEvent> for crate::WatchEvent {
22494 fn compat_from(value: ::fidl_fuchsia_io::WatchEvent) -> Self {
22495 match value {
22496 ::fidl_fuchsia_io::WatchEvent::Deleted => Self::Deleted,
22497
22498 ::fidl_fuchsia_io::WatchEvent::Added => Self::Added,
22499
22500 ::fidl_fuchsia_io::WatchEvent::Removed => Self::Removed,
22501
22502 ::fidl_fuchsia_io::WatchEvent::Existing => Self::Existing,
22503
22504 ::fidl_fuchsia_io::WatchEvent::Idle => Self::Idle,
22505 }
22506 }
22507 }
22508}