1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 ::fidl_next::bitflags::bitflags! {
8 #[doc = " The common members definition behind [`Rights`] and [`Abilities`]. Some operations may apply\n only to certain node types (e.g. [`Operations.MODIFY_DIRECTORY`] only applies to directories).\n"]#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct Operations: u64 {
9 #[doc = " Connecting to a service in a directory.\n"]const CONNECT = 1;
10 #[doc = " Read byte contents of a node or its children.\n"]const READ_BYTES = 2;
11 #[doc = " Writing to the byte contents of a node or its children.\n"]const WRITE_BYTES = 4;
12 #[doc = " Execute the byte contents of a node or its children.\n"]const EXECUTE = 8;
13 #[doc = " Reading the attributes of a node and/or its children.\n"]const GET_ATTRIBUTES = 16;
14 #[doc = " Updating the attributes of a node and/or its children.\n"]const UPDATE_ATTRIBUTES = 32;
15 #[doc = " Reading the list of nodes in a directory.\n"]const ENUMERATE = 64;
16 #[doc = " Opening a node from a directory. Must be specified with [`Rights.ENUMERATE`], as directory\n contents can be probed by opening children.\n"]const TRAVERSE = 128;
17 #[doc = " Modifying the list of nodes in a directory, e.g. creating, renaming, link/unlink, etc...\n Must be specified with [`Rights.ENUMERATE`], as directory contents can be probed via name\n conflicts during node creation.\n"]const MODIFY_DIRECTORY = 256;
18
19 }
20 }
21
22 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Operations, ___E> for Operations
23 where
24 ___E: ?Sized,
25 {
26 #[inline]
27 fn encode(
28 self,
29 encoder: &mut ___E,
30 out: &mut ::core::mem::MaybeUninit<crate::wire::Operations>,
31 _: (),
32 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
33 ::fidl_next::Encode::encode(&self, encoder, out, ())
34 }
35 }
36
37 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Operations, ___E> for &'a Operations
38 where
39 ___E: ?Sized,
40 {
41 #[inline]
42 fn encode(
43 self,
44 _: &mut ___E,
45 out: &mut ::core::mem::MaybeUninit<crate::wire::Operations>,
46 _: (),
47 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
48 ::fidl_next::munge!(let crate::wire::Operations { value } = out);
49
50 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
51 return Err(::fidl_next::EncodeError::InvalidStrictBits);
52 }
53
54 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
55 Ok(())
56 }
57 }
58
59 impl ::core::convert::From<crate::wire::Operations> for Operations {
60 fn from(wire: crate::wire::Operations) -> Self {
61 Self::from_bits_retain(u64::from(wire.value))
62 }
63 }
64
65 impl ::fidl_next::FromWire<crate::wire::Operations> for Operations {
66 #[inline]
67 fn from_wire(wire: crate::wire::Operations) -> Self {
68 Self::from(wire)
69 }
70 }
71
72 impl ::fidl_next::FromWireRef<crate::wire::Operations> for Operations {
73 #[inline]
74 fn from_wire_ref(wire: &crate::wire::Operations) -> Self {
75 Self::from(*wire)
76 }
77 }
78
79 #[doc = " Abilities are properties intrinsic to a node. They specify which operations are supported by it.\n\n Invoking an operation on a node that does not support it results in `ZX_ERR_NOT_SUPPORTED`.\n Note `ZX_ERR_ACCESS_DENIED` takes precedence over `ZX_ERR_NOT_SUPPORTED` when both apply.\n"]
80 pub type Abilities = crate::natural::Operations;
81
82 #[doc = " The reference point for updating the seek offset. See [`File.Seek`].\n\n This enum matches the `zx_stream_seek_origin_t` enum.\n"]
83 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
84 #[repr(u32)]
85 pub enum SeekOrigin {
86 Start = 0,
87 Current = 1,
88 End = 2,
89 }
90 impl ::core::convert::TryFrom<u32> for SeekOrigin {
91 type Error = ::fidl_next::UnknownStrictEnumMemberError;
92 fn try_from(
93 value: u32,
94 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
95 match value {
96 0 => Ok(Self::Start),
97 1 => Ok(Self::Current),
98 2 => Ok(Self::End),
99
100 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
101 }
102 }
103 }
104
105 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SeekOrigin, ___E> for SeekOrigin
106 where
107 ___E: ?Sized,
108 {
109 #[inline]
110 fn encode(
111 self,
112 encoder: &mut ___E,
113 out: &mut ::core::mem::MaybeUninit<crate::wire::SeekOrigin>,
114 _: (),
115 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
116 ::fidl_next::Encode::encode(&self, encoder, out, ())
117 }
118 }
119
120 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SeekOrigin, ___E> for &'a SeekOrigin
121 where
122 ___E: ?Sized,
123 {
124 #[inline]
125 fn encode(
126 self,
127 encoder: &mut ___E,
128 out: &mut ::core::mem::MaybeUninit<crate::wire::SeekOrigin>,
129 _: (),
130 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
131 ::fidl_next::munge!(let crate::wire::SeekOrigin { value } = out);
132 let _ = value.write(::fidl_next::WireU32::from(match *self {
133 SeekOrigin::Start => 0,
134
135 SeekOrigin::Current => 1,
136
137 SeekOrigin::End => 2,
138 }));
139
140 Ok(())
141 }
142 }
143
144 impl ::core::convert::From<crate::wire::SeekOrigin> for SeekOrigin {
145 fn from(wire: crate::wire::SeekOrigin) -> Self {
146 match u32::from(wire.value) {
147 0 => Self::Start,
148
149 1 => Self::Current,
150
151 2 => Self::End,
152
153 _ => unsafe { ::core::hint::unreachable_unchecked() },
154 }
155 }
156 }
157
158 impl ::fidl_next::FromWire<crate::wire::SeekOrigin> for SeekOrigin {
159 #[inline]
160 fn from_wire(wire: crate::wire::SeekOrigin) -> Self {
161 Self::from(wire)
162 }
163 }
164
165 impl ::fidl_next::FromWireRef<crate::wire::SeekOrigin> for SeekOrigin {
166 #[inline]
167 fn from_wire_ref(wire: &crate::wire::SeekOrigin) -> Self {
168 Self::from(*wire)
169 }
170 }
171
172 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
173 pub struct AdvisoryLockRange {
174 pub origin: crate::natural::SeekOrigin,
175
176 pub offset: i64,
177
178 pub length: i64,
179 }
180
181 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E> for AdvisoryLockRange
182 where
183 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
184 {
185 #[inline]
186 fn encode(
187 self,
188 encoder_: &mut ___E,
189 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
190 _: (),
191 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
192 ::fidl_next::munge! {
193 let crate::wire::AdvisoryLockRange {
194 origin,
195 offset,
196 length,
197
198 } = out_;
199 }
200
201 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
202
203 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
204
205 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
206
207 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
208
209 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
210
211 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
212
213 Ok(())
214 }
215 }
216
217 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
218 for &'a AdvisoryLockRange
219 where
220 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
221 {
222 #[inline]
223 fn encode(
224 self,
225 encoder_: &mut ___E,
226 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
227 _: (),
228 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
229 ::fidl_next::munge! {
230 let crate::wire::AdvisoryLockRange {
231
232 origin,
233 offset,
234 length,
235
236 } = out_;
237 }
238
239 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
240
241 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
242
243 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
244
245 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
246
247 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
248
249 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
250
251 Ok(())
252 }
253 }
254
255 unsafe impl<___E>
256 ::fidl_next::EncodeOption<
257 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockRange>,
258 ___E,
259 > for AdvisoryLockRange
260 where
261 ___E: ::fidl_next::Encoder + ?Sized,
262 AdvisoryLockRange: ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>,
263 {
264 #[inline]
265 fn encode_option(
266 this: ::core::option::Option<Self>,
267 encoder: &mut ___E,
268 out: &mut ::core::mem::MaybeUninit<
269 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockRange>,
270 >,
271 _: (),
272 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
273 if let Some(inner) = this {
274 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
275 ::fidl_next::WireBox::encode_present(out);
276 } else {
277 ::fidl_next::WireBox::encode_absent(out);
278 }
279
280 Ok(())
281 }
282 }
283
284 unsafe impl<'a, ___E>
285 ::fidl_next::EncodeOption<
286 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockRange>,
287 ___E,
288 > for &'a AdvisoryLockRange
289 where
290 ___E: ::fidl_next::Encoder + ?Sized,
291 &'a AdvisoryLockRange: ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>,
292 {
293 #[inline]
294 fn encode_option(
295 this: ::core::option::Option<Self>,
296 encoder: &mut ___E,
297 out: &mut ::core::mem::MaybeUninit<
298 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockRange>,
299 >,
300 _: (),
301 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
302 if let Some(inner) = this {
303 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
304 ::fidl_next::WireBox::encode_present(out);
305 } else {
306 ::fidl_next::WireBox::encode_absent(out);
307 }
308
309 Ok(())
310 }
311 }
312
313 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockRange> for AdvisoryLockRange {
314 #[inline]
315 fn from_wire(wire: crate::wire::AdvisoryLockRange) -> Self {
316 Self {
317 origin: ::fidl_next::FromWire::from_wire(wire.origin),
318
319 offset: ::fidl_next::FromWire::from_wire(wire.offset),
320
321 length: ::fidl_next::FromWire::from_wire(wire.length),
322 }
323 }
324 }
325
326 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockRange> for AdvisoryLockRange {
327 #[inline]
328 fn from_wire_ref(wire: &crate::wire::AdvisoryLockRange) -> Self {
329 Self {
330 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
331
332 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
333
334 length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length),
335 }
336 }
337 }
338
339 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
340 #[repr(u32)]
341 pub enum AdvisoryLockType {
342 Read = 1,
343 Write = 2,
344 Unlock = 3,
345 }
346 impl ::core::convert::TryFrom<u32> for AdvisoryLockType {
347 type Error = ::fidl_next::UnknownStrictEnumMemberError;
348 fn try_from(
349 value: u32,
350 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
351 match value {
352 1 => Ok(Self::Read),
353 2 => Ok(Self::Write),
354 3 => Ok(Self::Unlock),
355
356 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
357 }
358 }
359 }
360
361 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockType, ___E> for AdvisoryLockType
362 where
363 ___E: ?Sized,
364 {
365 #[inline]
366 fn encode(
367 self,
368 encoder: &mut ___E,
369 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockType>,
370 _: (),
371 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
372 ::fidl_next::Encode::encode(&self, encoder, out, ())
373 }
374 }
375
376 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockType, ___E>
377 for &'a AdvisoryLockType
378 where
379 ___E: ?Sized,
380 {
381 #[inline]
382 fn encode(
383 self,
384 encoder: &mut ___E,
385 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockType>,
386 _: (),
387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
388 ::fidl_next::munge!(let crate::wire::AdvisoryLockType { value } = out);
389 let _ = value.write(::fidl_next::WireU32::from(match *self {
390 AdvisoryLockType::Read => 1,
391
392 AdvisoryLockType::Write => 2,
393
394 AdvisoryLockType::Unlock => 3,
395 }));
396
397 Ok(())
398 }
399 }
400
401 impl ::core::convert::From<crate::wire::AdvisoryLockType> for AdvisoryLockType {
402 fn from(wire: crate::wire::AdvisoryLockType) -> Self {
403 match u32::from(wire.value) {
404 1 => Self::Read,
405
406 2 => Self::Write,
407
408 3 => Self::Unlock,
409
410 _ => unsafe { ::core::hint::unreachable_unchecked() },
411 }
412 }
413 }
414
415 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockType> for AdvisoryLockType {
416 #[inline]
417 fn from_wire(wire: crate::wire::AdvisoryLockType) -> Self {
418 Self::from(wire)
419 }
420 }
421
422 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockType> for AdvisoryLockType {
423 #[inline]
424 fn from_wire_ref(wire: &crate::wire::AdvisoryLockType) -> Self {
425 Self::from(*wire)
426 }
427 }
428
429 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
430 pub struct AdvisoryLockRequest {
431 pub type_: ::core::option::Option<crate::natural::AdvisoryLockType>,
432
433 pub range: ::core::option::Option<crate::natural::AdvisoryLockRange>,
434
435 pub wait: ::core::option::Option<bool>,
436 }
437
438 impl AdvisoryLockRequest {
439 fn __max_ordinal(&self) -> usize {
440 if self.wait.is_some() {
441 return 3;
442 }
443
444 if self.range.is_some() {
445 return 2;
446 }
447
448 if self.type_.is_some() {
449 return 1;
450 }
451
452 0
453 }
454 }
455
456 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>
457 for AdvisoryLockRequest
458 where
459 ___E: ::fidl_next::Encoder + ?Sized,
460 {
461 #[inline]
462 fn encode(
463 mut self,
464 encoder: &mut ___E,
465 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRequest<'static>>,
466 _: (),
467 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
468 ::fidl_next::munge!(let crate::wire::AdvisoryLockRequest { table } = out);
469
470 let max_ord = self.__max_ordinal();
471
472 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
473 ::fidl_next::Wire::zero_padding(&mut out);
474
475 let mut preallocated =
476 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
477
478 for i in 1..=max_ord {
479 match i {
480 3 => {
481 if let Some(value) = self.wait.take() {
482 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
483 value,
484 preallocated.encoder,
485 &mut out,
486 (),
487 )?;
488 } else {
489 ::fidl_next::WireEnvelope::encode_zero(&mut out)
490 }
491 }
492
493 2 => {
494 if let Some(value) = self.range.take() {
495 ::fidl_next::WireEnvelope::encode_value::<
496 crate::wire::AdvisoryLockRange,
497 ___E,
498 >(
499 value, preallocated.encoder, &mut out, ()
500 )?;
501 } else {
502 ::fidl_next::WireEnvelope::encode_zero(&mut out)
503 }
504 }
505
506 1 => {
507 if let Some(value) = self.type_.take() {
508 ::fidl_next::WireEnvelope::encode_value::<
509 crate::wire::AdvisoryLockType,
510 ___E,
511 >(
512 value, preallocated.encoder, &mut out, ()
513 )?;
514 } else {
515 ::fidl_next::WireEnvelope::encode_zero(&mut out)
516 }
517 }
518
519 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
520 }
521 unsafe {
522 preallocated.write_next(out.assume_init_ref());
523 }
524 }
525
526 ::fidl_next::WireTable::encode_len(table, max_ord);
527
528 Ok(())
529 }
530 }
531
532 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>
533 for &'a AdvisoryLockRequest
534 where
535 ___E: ::fidl_next::Encoder + ?Sized,
536 {
537 #[inline]
538 fn encode(
539 self,
540 encoder: &mut ___E,
541 out: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRequest<'static>>,
542 _: (),
543 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
544 ::fidl_next::munge!(let crate::wire::AdvisoryLockRequest { table } = out);
545
546 let max_ord = self.__max_ordinal();
547
548 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
549 ::fidl_next::Wire::zero_padding(&mut out);
550
551 let mut preallocated =
552 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
553
554 for i in 1..=max_ord {
555 match i {
556 3 => {
557 if let Some(value) = &self.wait {
558 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
559 value,
560 preallocated.encoder,
561 &mut out,
562 (),
563 )?;
564 } else {
565 ::fidl_next::WireEnvelope::encode_zero(&mut out)
566 }
567 }
568
569 2 => {
570 if let Some(value) = &self.range {
571 ::fidl_next::WireEnvelope::encode_value::<
572 crate::wire::AdvisoryLockRange,
573 ___E,
574 >(
575 value, preallocated.encoder, &mut out, ()
576 )?;
577 } else {
578 ::fidl_next::WireEnvelope::encode_zero(&mut out)
579 }
580 }
581
582 1 => {
583 if let Some(value) = &self.type_ {
584 ::fidl_next::WireEnvelope::encode_value::<
585 crate::wire::AdvisoryLockType,
586 ___E,
587 >(
588 value, preallocated.encoder, &mut out, ()
589 )?;
590 } else {
591 ::fidl_next::WireEnvelope::encode_zero(&mut out)
592 }
593 }
594
595 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
596 }
597 unsafe {
598 preallocated.write_next(out.assume_init_ref());
599 }
600 }
601
602 ::fidl_next::WireTable::encode_len(table, max_ord);
603
604 Ok(())
605 }
606 }
607
608 impl<'de> ::fidl_next::FromWire<crate::wire::AdvisoryLockRequest<'de>> for AdvisoryLockRequest {
609 #[inline]
610 fn from_wire(wire_: crate::wire::AdvisoryLockRequest<'de>) -> Self {
611 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
612
613 let type_ = wire_.table.get(1);
614
615 let range = wire_.table.get(2);
616
617 let wait = wire_.table.get(3);
618
619 Self {
620 type_: type_.map(|envelope| {
621 ::fidl_next::FromWire::from_wire(unsafe {
622 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
623 })
624 }),
625
626 range: range.map(|envelope| {
627 ::fidl_next::FromWire::from_wire(unsafe {
628 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
629 })
630 }),
631
632 wait: wait.map(|envelope| {
633 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
634 }),
635 }
636 }
637 }
638
639 impl<'de> ::fidl_next::FromWireRef<crate::wire::AdvisoryLockRequest<'de>> for AdvisoryLockRequest {
640 #[inline]
641 fn from_wire_ref(wire: &crate::wire::AdvisoryLockRequest<'de>) -> Self {
642 Self {
643 type_: wire.table.get(1).map(|envelope| {
644 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
645 envelope.deref_unchecked::<crate::wire::AdvisoryLockType>()
646 })
647 }),
648
649 range: wire.table.get(2).map(|envelope| {
650 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
651 envelope.deref_unchecked::<crate::wire::AdvisoryLockRange>()
652 })
653 }),
654
655 wait: wire.table.get(3).map(|envelope| {
656 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
657 envelope.deref_unchecked::<bool>()
658 })
659 }),
660 }
661 }
662 }
663
664 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
665 pub struct AdvisoryLockingAdvisoryLockRequest {
666 pub request: crate::natural::AdvisoryLockRequest,
667 }
668
669 unsafe impl<___E>
670 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
671 for AdvisoryLockingAdvisoryLockRequest
672 where
673 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
674 ___E: ::fidl_next::Encoder,
675 {
676 #[inline]
677 fn encode(
678 self,
679 encoder_: &mut ___E,
680 out_: &mut ::core::mem::MaybeUninit<
681 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
682 >,
683 _: (),
684 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
685 ::fidl_next::munge! {
686 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
687 request,
688
689 } = out_;
690 }
691
692 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
693
694 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
695
696 Ok(())
697 }
698 }
699
700 unsafe impl<'a, ___E>
701 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
702 for &'a AdvisoryLockingAdvisoryLockRequest
703 where
704 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
705 ___E: ::fidl_next::Encoder,
706 {
707 #[inline]
708 fn encode(
709 self,
710 encoder_: &mut ___E,
711 out_: &mut ::core::mem::MaybeUninit<
712 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
713 >,
714 _: (),
715 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
716 ::fidl_next::munge! {
717 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
718
719 request,
720
721 } = out_;
722 }
723
724 ::fidl_next::Encode::encode(&self.request, encoder_, request, ())?;
725
726 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
727
728 Ok(())
729 }
730 }
731
732 unsafe impl<___E>
733 ::fidl_next::EncodeOption<
734 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>>,
735 ___E,
736 > for AdvisoryLockingAdvisoryLockRequest
737 where
738 ___E: ::fidl_next::Encoder + ?Sized,
739 AdvisoryLockingAdvisoryLockRequest:
740 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>,
741 {
742 #[inline]
743 fn encode_option(
744 this: ::core::option::Option<Self>,
745 encoder: &mut ___E,
746 out: &mut ::core::mem::MaybeUninit<
747 ::fidl_next::WireBox<
748 'static,
749 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
750 >,
751 >,
752 _: (),
753 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
754 if let Some(inner) = this {
755 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
756 ::fidl_next::WireBox::encode_present(out);
757 } else {
758 ::fidl_next::WireBox::encode_absent(out);
759 }
760
761 Ok(())
762 }
763 }
764
765 unsafe impl<'a, ___E>
766 ::fidl_next::EncodeOption<
767 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>>,
768 ___E,
769 > for &'a AdvisoryLockingAdvisoryLockRequest
770 where
771 ___E: ::fidl_next::Encoder + ?Sized,
772 &'a AdvisoryLockingAdvisoryLockRequest:
773 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>,
774 {
775 #[inline]
776 fn encode_option(
777 this: ::core::option::Option<Self>,
778 encoder: &mut ___E,
779 out: &mut ::core::mem::MaybeUninit<
780 ::fidl_next::WireBox<
781 'static,
782 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
783 >,
784 >,
785 _: (),
786 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
787 if let Some(inner) = this {
788 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
789 ::fidl_next::WireBox::encode_present(out);
790 } else {
791 ::fidl_next::WireBox::encode_absent(out);
792 }
793
794 Ok(())
795 }
796 }
797
798 impl<'de> ::fidl_next::FromWire<crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>>
799 for AdvisoryLockingAdvisoryLockRequest
800 {
801 #[inline]
802 fn from_wire(wire: crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
803 Self { request: ::fidl_next::FromWire::from_wire(wire.request) }
804 }
805 }
806
807 impl<'de> ::fidl_next::FromWireRef<crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>>
808 for AdvisoryLockingAdvisoryLockRequest
809 {
810 #[inline]
811 fn from_wire_ref(wire: &crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>) -> Self {
812 Self { request: ::fidl_next::FromWireRef::from_wire_ref(&wire.request) }
813 }
814 }
815
816 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
817 #[repr(C)]
818 pub struct AdvisoryLockingAdvisoryLockResponse {}
819
820 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockResponse, ___E>
821 for AdvisoryLockingAdvisoryLockResponse
822 where
823 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
824 {
825 #[inline]
826 fn encode(
827 self,
828 encoder_: &mut ___E,
829 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockingAdvisoryLockResponse>,
830 _: (),
831 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
832 *out_ = ::core::mem::MaybeUninit::zeroed();
833
834 Ok(())
835 }
836 }
837
838 unsafe impl<'a, ___E>
839 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockResponse, ___E>
840 for &'a AdvisoryLockingAdvisoryLockResponse
841 where
842 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
843 {
844 #[inline]
845 fn encode(
846 self,
847 encoder_: &mut ___E,
848 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockingAdvisoryLockResponse>,
849 _: (),
850 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
851 ::fidl_next::munge! {
852 let crate::wire::AdvisoryLockingAdvisoryLockResponse {
853
854 _empty,
855
856
857 } = out_;
858 }
859
860 Ok(())
861 }
862 }
863
864 unsafe impl<___E>
865 ::fidl_next::EncodeOption<
866 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockResponse>,
867 ___E,
868 > for AdvisoryLockingAdvisoryLockResponse
869 where
870 ___E: ::fidl_next::Encoder + ?Sized,
871 AdvisoryLockingAdvisoryLockResponse:
872 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockResponse, ___E>,
873 {
874 #[inline]
875 fn encode_option(
876 this: ::core::option::Option<Self>,
877 encoder: &mut ___E,
878 out: &mut ::core::mem::MaybeUninit<
879 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockResponse>,
880 >,
881 _: (),
882 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
883 if let Some(inner) = this {
884 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
885 ::fidl_next::WireBox::encode_present(out);
886 } else {
887 ::fidl_next::WireBox::encode_absent(out);
888 }
889
890 Ok(())
891 }
892 }
893
894 unsafe impl<'a, ___E>
895 ::fidl_next::EncodeOption<
896 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockResponse>,
897 ___E,
898 > for &'a AdvisoryLockingAdvisoryLockResponse
899 where
900 ___E: ::fidl_next::Encoder + ?Sized,
901 &'a AdvisoryLockingAdvisoryLockResponse:
902 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockResponse, ___E>,
903 {
904 #[inline]
905 fn encode_option(
906 this: ::core::option::Option<Self>,
907 encoder: &mut ___E,
908 out: &mut ::core::mem::MaybeUninit<
909 ::fidl_next::WireBox<'static, crate::wire::AdvisoryLockingAdvisoryLockResponse>,
910 >,
911 _: (),
912 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
913 if let Some(inner) = this {
914 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
915 ::fidl_next::WireBox::encode_present(out);
916 } else {
917 ::fidl_next::WireBox::encode_absent(out);
918 }
919
920 Ok(())
921 }
922 }
923
924 impl ::fidl_next::FromWire<crate::wire::AdvisoryLockingAdvisoryLockResponse>
925 for AdvisoryLockingAdvisoryLockResponse
926 {
927 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
928 crate::wire::AdvisoryLockingAdvisoryLockResponse,
929 Self,
930 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
931
932 #[inline]
933 fn from_wire(wire: crate::wire::AdvisoryLockingAdvisoryLockResponse) -> Self {
934 Self {}
935 }
936 }
937
938 impl ::fidl_next::FromWireRef<crate::wire::AdvisoryLockingAdvisoryLockResponse>
939 for AdvisoryLockingAdvisoryLockResponse
940 {
941 #[inline]
942 fn from_wire_ref(wire: &crate::wire::AdvisoryLockingAdvisoryLockResponse) -> Self {
943 Self {}
944 }
945 }
946
947 ::fidl_next::bitflags::bitflags! {
948 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct AllocateMode: u32 {
949 const KEEP_SIZE = 1;
950 const UNSHARE_RANGE = 2;
951 const PUNCH_HOLE = 4;
952 const COLLAPSE_RANGE = 8;
953 const ZERO_RANGE = 16;
954 const INSERT_RANGE = 32;
955 const _ = !0;
956 }
957 }
958
959 unsafe impl<___E> ::fidl_next::Encode<crate::wire::AllocateMode, ___E> for AllocateMode
960 where
961 ___E: ?Sized,
962 {
963 #[inline]
964 fn encode(
965 self,
966 encoder: &mut ___E,
967 out: &mut ::core::mem::MaybeUninit<crate::wire::AllocateMode>,
968 _: (),
969 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
970 ::fidl_next::Encode::encode(&self, encoder, out, ())
971 }
972 }
973
974 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::AllocateMode, ___E> for &'a AllocateMode
975 where
976 ___E: ?Sized,
977 {
978 #[inline]
979 fn encode(
980 self,
981 _: &mut ___E,
982 out: &mut ::core::mem::MaybeUninit<crate::wire::AllocateMode>,
983 _: (),
984 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
985 ::fidl_next::munge!(let crate::wire::AllocateMode { value } = out);
986
987 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
988 Ok(())
989 }
990 }
991
992 impl ::core::convert::From<crate::wire::AllocateMode> for AllocateMode {
993 fn from(wire: crate::wire::AllocateMode) -> Self {
994 Self::from_bits_retain(u32::from(wire.value))
995 }
996 }
997
998 impl ::fidl_next::FromWire<crate::wire::AllocateMode> for AllocateMode {
999 #[inline]
1000 fn from_wire(wire: crate::wire::AllocateMode) -> Self {
1001 Self::from(wire)
1002 }
1003 }
1004
1005 impl ::fidl_next::FromWireRef<crate::wire::AllocateMode> for AllocateMode {
1006 #[inline]
1007 fn from_wire_ref(wire: &crate::wire::AllocateMode) -> Self {
1008 Self::from(*wire)
1009 }
1010 }
1011
1012 #[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"]
1013 pub type Rights = crate::natural::Operations;
1014
1015 #[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"]
1016 pub type Id = u64;
1017
1018 ::fidl_next::bitflags::bitflags! {
1019 #[doc = " DEPRECATED - Use Flags instead.\n"]#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct OpenFlags: u32 {
1020 #[doc = " Can read from target object.\n"]const RIGHT_READABLE = 1;
1021 #[doc = " Can write to target object.\n"]const RIGHT_WRITABLE = 2;
1022 #[doc = " Connection can map target object executable.\n"]const RIGHT_EXECUTABLE = 8;
1023 #[doc = " Create the object if it doesn\'t exist.\n"]const CREATE = 65536;
1024 #[doc = " (with Create) Fail if the object already exists.\n"]const CREATE_IF_ABSENT = 131072;
1025 #[doc = " Truncate the object before usage.\n"]const TRUNCATE = 262144;
1026 #[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;
1027 #[doc = " Seek to the end of the object before all writes.\n"]const APPEND = 1048576;
1028 #[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;
1029 #[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;
1030 #[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;
1031 #[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;
1032 #[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;
1033 #[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;
1034 #[doc = " Open the target object as a block device.\n"]const BLOCK_DEVICE = 16777216;
1035
1036 }
1037 }
1038
1039 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OpenFlags, ___E> for OpenFlags
1040 where
1041 ___E: ?Sized,
1042 {
1043 #[inline]
1044 fn encode(
1045 self,
1046 encoder: &mut ___E,
1047 out: &mut ::core::mem::MaybeUninit<crate::wire::OpenFlags>,
1048 _: (),
1049 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1050 ::fidl_next::Encode::encode(&self, encoder, out, ())
1051 }
1052 }
1053
1054 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::OpenFlags, ___E> for &'a OpenFlags
1055 where
1056 ___E: ?Sized,
1057 {
1058 #[inline]
1059 fn encode(
1060 self,
1061 _: &mut ___E,
1062 out: &mut ::core::mem::MaybeUninit<crate::wire::OpenFlags>,
1063 _: (),
1064 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1065 ::fidl_next::munge!(let crate::wire::OpenFlags { value } = out);
1066
1067 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1068 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1069 }
1070
1071 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1072 Ok(())
1073 }
1074 }
1075
1076 impl ::core::convert::From<crate::wire::OpenFlags> for OpenFlags {
1077 fn from(wire: crate::wire::OpenFlags) -> Self {
1078 Self::from_bits_retain(u32::from(wire.value))
1079 }
1080 }
1081
1082 impl ::fidl_next::FromWire<crate::wire::OpenFlags> for OpenFlags {
1083 #[inline]
1084 fn from_wire(wire: crate::wire::OpenFlags) -> Self {
1085 Self::from(wire)
1086 }
1087 }
1088
1089 impl ::fidl_next::FromWireRef<crate::wire::OpenFlags> for OpenFlags {
1090 #[inline]
1091 fn from_wire_ref(wire: &crate::wire::OpenFlags) -> Self {
1092 Self::from(*wire)
1093 }
1094 }
1095
1096 #[doc = " NodeAttributes defines generic information about a filesystem node.\n"]
1097 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1098 pub struct NodeAttributes {
1099 pub mode: u32,
1100
1101 pub id: u64,
1102
1103 pub content_size: u64,
1104
1105 pub storage_size: u64,
1106
1107 pub link_count: u64,
1108
1109 pub creation_time: u64,
1110
1111 pub modification_time: u64,
1112 }
1113
1114 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes, ___E> for NodeAttributes
1115 where
1116 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1117 {
1118 #[inline]
1119 fn encode(
1120 self,
1121 encoder_: &mut ___E,
1122 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
1123 _: (),
1124 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1125 ::fidl_next::munge! {
1126 let crate::wire::NodeAttributes {
1127 mode,
1128 id,
1129 content_size,
1130 storage_size,
1131 link_count,
1132 creation_time,
1133 modification_time,
1134
1135 } = out_;
1136 }
1137
1138 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1139
1140 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1141
1142 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1143
1144 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1145
1146 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
1147
1148 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(content_size.as_mut_ptr()) };
1149
1150 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
1151
1152 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(storage_size.as_mut_ptr()) };
1153
1154 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
1155
1156 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(link_count.as_mut_ptr()) };
1157
1158 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
1159
1160 let mut _field =
1161 unsafe { ::fidl_next::Slot::new_unchecked(creation_time.as_mut_ptr()) };
1162
1163 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
1164
1165 let mut _field =
1166 unsafe { ::fidl_next::Slot::new_unchecked(modification_time.as_mut_ptr()) };
1167
1168 Ok(())
1169 }
1170 }
1171
1172 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes, ___E> for &'a NodeAttributes
1173 where
1174 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1175 {
1176 #[inline]
1177 fn encode(
1178 self,
1179 encoder_: &mut ___E,
1180 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
1181 _: (),
1182 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1183 ::fidl_next::munge! {
1184 let crate::wire::NodeAttributes {
1185
1186 mode,
1187 id,
1188 content_size,
1189 storage_size,
1190 link_count,
1191 creation_time,
1192 modification_time,
1193
1194 } = out_;
1195 }
1196
1197 ::fidl_next::Encode::encode(&self.mode, encoder_, mode, ())?;
1198
1199 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1200
1201 ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1202
1203 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1204
1205 ::fidl_next::Encode::encode(&self.content_size, encoder_, content_size, ())?;
1206
1207 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(content_size.as_mut_ptr()) };
1208
1209 ::fidl_next::Encode::encode(&self.storage_size, encoder_, storage_size, ())?;
1210
1211 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(storage_size.as_mut_ptr()) };
1212
1213 ::fidl_next::Encode::encode(&self.link_count, encoder_, link_count, ())?;
1214
1215 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(link_count.as_mut_ptr()) };
1216
1217 ::fidl_next::Encode::encode(&self.creation_time, encoder_, creation_time, ())?;
1218
1219 let mut _field =
1220 unsafe { ::fidl_next::Slot::new_unchecked(creation_time.as_mut_ptr()) };
1221
1222 ::fidl_next::Encode::encode(&self.modification_time, encoder_, modification_time, ())?;
1223
1224 let mut _field =
1225 unsafe { ::fidl_next::Slot::new_unchecked(modification_time.as_mut_ptr()) };
1226
1227 Ok(())
1228 }
1229 }
1230
1231 unsafe impl<___E>
1232 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::NodeAttributes>, ___E>
1233 for NodeAttributes
1234 where
1235 ___E: ::fidl_next::Encoder + ?Sized,
1236 NodeAttributes: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
1237 {
1238 #[inline]
1239 fn encode_option(
1240 this: ::core::option::Option<Self>,
1241 encoder: &mut ___E,
1242 out: &mut ::core::mem::MaybeUninit<
1243 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes>,
1244 >,
1245 _: (),
1246 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1247 if let Some(inner) = this {
1248 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1249 ::fidl_next::WireBox::encode_present(out);
1250 } else {
1251 ::fidl_next::WireBox::encode_absent(out);
1252 }
1253
1254 Ok(())
1255 }
1256 }
1257
1258 unsafe impl<'a, ___E>
1259 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::NodeAttributes>, ___E>
1260 for &'a NodeAttributes
1261 where
1262 ___E: ::fidl_next::Encoder + ?Sized,
1263 &'a NodeAttributes: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
1264 {
1265 #[inline]
1266 fn encode_option(
1267 this: ::core::option::Option<Self>,
1268 encoder: &mut ___E,
1269 out: &mut ::core::mem::MaybeUninit<
1270 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes>,
1271 >,
1272 _: (),
1273 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1274 if let Some(inner) = this {
1275 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1276 ::fidl_next::WireBox::encode_present(out);
1277 } else {
1278 ::fidl_next::WireBox::encode_absent(out);
1279 }
1280
1281 Ok(())
1282 }
1283 }
1284
1285 impl ::fidl_next::FromWire<crate::wire::NodeAttributes> for NodeAttributes {
1286 #[inline]
1287 fn from_wire(wire: crate::wire::NodeAttributes) -> Self {
1288 Self {
1289 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1290
1291 id: ::fidl_next::FromWire::from_wire(wire.id),
1292
1293 content_size: ::fidl_next::FromWire::from_wire(wire.content_size),
1294
1295 storage_size: ::fidl_next::FromWire::from_wire(wire.storage_size),
1296
1297 link_count: ::fidl_next::FromWire::from_wire(wire.link_count),
1298
1299 creation_time: ::fidl_next::FromWire::from_wire(wire.creation_time),
1300
1301 modification_time: ::fidl_next::FromWire::from_wire(wire.modification_time),
1302 }
1303 }
1304 }
1305
1306 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributes> for NodeAttributes {
1307 #[inline]
1308 fn from_wire_ref(wire: &crate::wire::NodeAttributes) -> Self {
1309 Self {
1310 mode: ::fidl_next::FromWireRef::from_wire_ref(&wire.mode),
1311
1312 id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
1313
1314 content_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.content_size),
1315
1316 storage_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.storage_size),
1317
1318 link_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.link_count),
1319
1320 creation_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.creation_time),
1321
1322 modification_time: ::fidl_next::FromWireRef::from_wire_ref(&wire.modification_time),
1323 }
1324 }
1325 }
1326
1327 ::fidl_next::bitflags::bitflags! {
1328 #[doc = " The fields of \'attributes\' which are used to update the Node are indicated\n by the \'flags\' argument.\n"]#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct NodeAttributeFlags: u32 {
1329 const CREATION_TIME = 1;
1330 const MODIFICATION_TIME = 2;
1331
1332 }
1333 }
1334
1335 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E> for NodeAttributeFlags
1336 where
1337 ___E: ?Sized,
1338 {
1339 #[inline]
1340 fn encode(
1341 self,
1342 encoder: &mut ___E,
1343 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributeFlags>,
1344 _: (),
1345 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1346 ::fidl_next::Encode::encode(&self, encoder, out, ())
1347 }
1348 }
1349
1350 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>
1351 for &'a NodeAttributeFlags
1352 where
1353 ___E: ?Sized,
1354 {
1355 #[inline]
1356 fn encode(
1357 self,
1358 _: &mut ___E,
1359 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributeFlags>,
1360 _: (),
1361 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1362 ::fidl_next::munge!(let crate::wire::NodeAttributeFlags { value } = out);
1363
1364 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1365 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1366 }
1367
1368 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1369 Ok(())
1370 }
1371 }
1372
1373 impl ::core::convert::From<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1374 fn from(wire: crate::wire::NodeAttributeFlags) -> Self {
1375 Self::from_bits_retain(u32::from(wire.value))
1376 }
1377 }
1378
1379 impl ::fidl_next::FromWire<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1380 #[inline]
1381 fn from_wire(wire: crate::wire::NodeAttributeFlags) -> Self {
1382 Self::from(wire)
1383 }
1384 }
1385
1386 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributeFlags> for NodeAttributeFlags {
1387 #[inline]
1388 fn from_wire_ref(wire: &crate::wire::NodeAttributeFlags) -> Self {
1389 Self::from(*wire)
1390 }
1391 }
1392
1393 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1394 pub struct NodeQueryFilesystemResponse {
1395 pub s: i32,
1396
1397 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::FilesystemInfo>>,
1398 }
1399
1400 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
1401 for NodeQueryFilesystemResponse
1402 where
1403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1404 ___E: ::fidl_next::Encoder,
1405 {
1406 #[inline]
1407 fn encode(
1408 self,
1409 encoder_: &mut ___E,
1410 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
1411 _: (),
1412 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1413 ::fidl_next::munge! {
1414 let crate::wire::NodeQueryFilesystemResponse {
1415 s,
1416 info,
1417
1418 } = out_;
1419 }
1420
1421 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1422
1423 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1424
1425 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
1426
1427 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1428
1429 Ok(())
1430 }
1431 }
1432
1433 unsafe impl<'a, ___E>
1434 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
1435 for &'a NodeQueryFilesystemResponse
1436 where
1437 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1438 ___E: ::fidl_next::Encoder,
1439 {
1440 #[inline]
1441 fn encode(
1442 self,
1443 encoder_: &mut ___E,
1444 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
1445 _: (),
1446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1447 ::fidl_next::munge! {
1448 let crate::wire::NodeQueryFilesystemResponse {
1449
1450 s,
1451 info,
1452
1453 } = out_;
1454 }
1455
1456 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
1457
1458 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1459
1460 ::fidl_next::Encode::encode(&self.info, encoder_, info, ())?;
1461
1462 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1463
1464 Ok(())
1465 }
1466 }
1467
1468 unsafe impl<___E>
1469 ::fidl_next::EncodeOption<
1470 ::fidl_next::WireBox<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1471 ___E,
1472 > for NodeQueryFilesystemResponse
1473 where
1474 ___E: ::fidl_next::Encoder + ?Sized,
1475 NodeQueryFilesystemResponse:
1476 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>,
1477 {
1478 #[inline]
1479 fn encode_option(
1480 this: ::core::option::Option<Self>,
1481 encoder: &mut ___E,
1482 out: &mut ::core::mem::MaybeUninit<
1483 ::fidl_next::WireBox<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1484 >,
1485 _: (),
1486 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1487 if let Some(inner) = this {
1488 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1489 ::fidl_next::WireBox::encode_present(out);
1490 } else {
1491 ::fidl_next::WireBox::encode_absent(out);
1492 }
1493
1494 Ok(())
1495 }
1496 }
1497
1498 unsafe impl<'a, ___E>
1499 ::fidl_next::EncodeOption<
1500 ::fidl_next::WireBox<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1501 ___E,
1502 > for &'a NodeQueryFilesystemResponse
1503 where
1504 ___E: ::fidl_next::Encoder + ?Sized,
1505 &'a NodeQueryFilesystemResponse:
1506 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>,
1507 {
1508 #[inline]
1509 fn encode_option(
1510 this: ::core::option::Option<Self>,
1511 encoder: &mut ___E,
1512 out: &mut ::core::mem::MaybeUninit<
1513 ::fidl_next::WireBox<'static, crate::wire::NodeQueryFilesystemResponse<'static>>,
1514 >,
1515 _: (),
1516 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1517 if let Some(inner) = this {
1518 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1519 ::fidl_next::WireBox::encode_present(out);
1520 } else {
1521 ::fidl_next::WireBox::encode_absent(out);
1522 }
1523
1524 Ok(())
1525 }
1526 }
1527
1528 impl<'de> ::fidl_next::FromWire<crate::wire::NodeQueryFilesystemResponse<'de>>
1529 for NodeQueryFilesystemResponse
1530 {
1531 #[inline]
1532 fn from_wire(wire: crate::wire::NodeQueryFilesystemResponse<'de>) -> Self {
1533 Self {
1534 s: ::fidl_next::FromWire::from_wire(wire.s),
1535
1536 info: ::fidl_next::FromWire::from_wire(wire.info),
1537 }
1538 }
1539 }
1540
1541 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeQueryFilesystemResponse<'de>>
1542 for NodeQueryFilesystemResponse
1543 {
1544 #[inline]
1545 fn from_wire_ref(wire: &crate::wire::NodeQueryFilesystemResponse<'de>) -> Self {
1546 Self {
1547 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
1548
1549 info: ::fidl_next::FromWireRef::from_wire_ref(&wire.info),
1550 }
1551 }
1552 }
1553
1554 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1555 #[repr(C)]
1556 pub struct NodeUpdateAttributesResponse {}
1557
1558 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeUpdateAttributesResponse, ___E>
1559 for NodeUpdateAttributesResponse
1560 where
1561 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1562 {
1563 #[inline]
1564 fn encode(
1565 self,
1566 encoder_: &mut ___E,
1567 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeUpdateAttributesResponse>,
1568 _: (),
1569 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1570 *out_ = ::core::mem::MaybeUninit::zeroed();
1571
1572 Ok(())
1573 }
1574 }
1575
1576 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeUpdateAttributesResponse, ___E>
1577 for &'a NodeUpdateAttributesResponse
1578 where
1579 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1580 {
1581 #[inline]
1582 fn encode(
1583 self,
1584 encoder_: &mut ___E,
1585 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeUpdateAttributesResponse>,
1586 _: (),
1587 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1588 ::fidl_next::munge! {
1589 let crate::wire::NodeUpdateAttributesResponse {
1590
1591 _empty,
1592
1593
1594 } = out_;
1595 }
1596
1597 Ok(())
1598 }
1599 }
1600
1601 unsafe impl<___E>
1602 ::fidl_next::EncodeOption<
1603 ::fidl_next::WireBox<'static, crate::wire::NodeUpdateAttributesResponse>,
1604 ___E,
1605 > for NodeUpdateAttributesResponse
1606 where
1607 ___E: ::fidl_next::Encoder + ?Sized,
1608 NodeUpdateAttributesResponse:
1609 ::fidl_next::Encode<crate::wire::NodeUpdateAttributesResponse, ___E>,
1610 {
1611 #[inline]
1612 fn encode_option(
1613 this: ::core::option::Option<Self>,
1614 encoder: &mut ___E,
1615 out: &mut ::core::mem::MaybeUninit<
1616 ::fidl_next::WireBox<'static, crate::wire::NodeUpdateAttributesResponse>,
1617 >,
1618 _: (),
1619 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1620 if let Some(inner) = this {
1621 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1622 ::fidl_next::WireBox::encode_present(out);
1623 } else {
1624 ::fidl_next::WireBox::encode_absent(out);
1625 }
1626
1627 Ok(())
1628 }
1629 }
1630
1631 unsafe impl<'a, ___E>
1632 ::fidl_next::EncodeOption<
1633 ::fidl_next::WireBox<'static, crate::wire::NodeUpdateAttributesResponse>,
1634 ___E,
1635 > for &'a NodeUpdateAttributesResponse
1636 where
1637 ___E: ::fidl_next::Encoder + ?Sized,
1638 &'a NodeUpdateAttributesResponse:
1639 ::fidl_next::Encode<crate::wire::NodeUpdateAttributesResponse, ___E>,
1640 {
1641 #[inline]
1642 fn encode_option(
1643 this: ::core::option::Option<Self>,
1644 encoder: &mut ___E,
1645 out: &mut ::core::mem::MaybeUninit<
1646 ::fidl_next::WireBox<'static, crate::wire::NodeUpdateAttributesResponse>,
1647 >,
1648 _: (),
1649 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1650 if let Some(inner) = this {
1651 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1652 ::fidl_next::WireBox::encode_present(out);
1653 } else {
1654 ::fidl_next::WireBox::encode_absent(out);
1655 }
1656
1657 Ok(())
1658 }
1659 }
1660
1661 impl ::fidl_next::FromWire<crate::wire::NodeUpdateAttributesResponse>
1662 for NodeUpdateAttributesResponse
1663 {
1664 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1665 crate::wire::NodeUpdateAttributesResponse,
1666 Self,
1667 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
1668
1669 #[inline]
1670 fn from_wire(wire: crate::wire::NodeUpdateAttributesResponse) -> Self {
1671 Self {}
1672 }
1673 }
1674
1675 impl ::fidl_next::FromWireRef<crate::wire::NodeUpdateAttributesResponse>
1676 for NodeUpdateAttributesResponse
1677 {
1678 #[inline]
1679 fn from_wire_ref(wire: &crate::wire::NodeUpdateAttributesResponse) -> Self {
1680 Self {}
1681 }
1682 }
1683
1684 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1685 #[repr(C)]
1686 pub struct NodeSyncResponse {}
1687
1688 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSyncResponse, ___E> for NodeSyncResponse
1689 where
1690 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1691 {
1692 #[inline]
1693 fn encode(
1694 self,
1695 encoder_: &mut ___E,
1696 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSyncResponse>,
1697 _: (),
1698 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1699 *out_ = ::core::mem::MaybeUninit::zeroed();
1700
1701 Ok(())
1702 }
1703 }
1704
1705 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSyncResponse, ___E>
1706 for &'a NodeSyncResponse
1707 where
1708 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1709 {
1710 #[inline]
1711 fn encode(
1712 self,
1713 encoder_: &mut ___E,
1714 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSyncResponse>,
1715 _: (),
1716 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1717 ::fidl_next::munge! {
1718 let crate::wire::NodeSyncResponse {
1719
1720 _empty,
1721
1722
1723 } = out_;
1724 }
1725
1726 Ok(())
1727 }
1728 }
1729
1730 unsafe impl<___E>
1731 ::fidl_next::EncodeOption<
1732 ::fidl_next::WireBox<'static, crate::wire::NodeSyncResponse>,
1733 ___E,
1734 > for NodeSyncResponse
1735 where
1736 ___E: ::fidl_next::Encoder + ?Sized,
1737 NodeSyncResponse: ::fidl_next::Encode<crate::wire::NodeSyncResponse, ___E>,
1738 {
1739 #[inline]
1740 fn encode_option(
1741 this: ::core::option::Option<Self>,
1742 encoder: &mut ___E,
1743 out: &mut ::core::mem::MaybeUninit<
1744 ::fidl_next::WireBox<'static, crate::wire::NodeSyncResponse>,
1745 >,
1746 _: (),
1747 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1748 if let Some(inner) = this {
1749 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1750 ::fidl_next::WireBox::encode_present(out);
1751 } else {
1752 ::fidl_next::WireBox::encode_absent(out);
1753 }
1754
1755 Ok(())
1756 }
1757 }
1758
1759 unsafe impl<'a, ___E>
1760 ::fidl_next::EncodeOption<
1761 ::fidl_next::WireBox<'static, crate::wire::NodeSyncResponse>,
1762 ___E,
1763 > for &'a NodeSyncResponse
1764 where
1765 ___E: ::fidl_next::Encoder + ?Sized,
1766 &'a NodeSyncResponse: ::fidl_next::Encode<crate::wire::NodeSyncResponse, ___E>,
1767 {
1768 #[inline]
1769 fn encode_option(
1770 this: ::core::option::Option<Self>,
1771 encoder: &mut ___E,
1772 out: &mut ::core::mem::MaybeUninit<
1773 ::fidl_next::WireBox<'static, crate::wire::NodeSyncResponse>,
1774 >,
1775 _: (),
1776 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1777 if let Some(inner) = this {
1778 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1779 ::fidl_next::WireBox::encode_present(out);
1780 } else {
1781 ::fidl_next::WireBox::encode_absent(out);
1782 }
1783
1784 Ok(())
1785 }
1786 }
1787
1788 impl ::fidl_next::FromWire<crate::wire::NodeSyncResponse> for NodeSyncResponse {
1789 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1790 crate::wire::NodeSyncResponse,
1791 Self,
1792 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
1793
1794 #[inline]
1795 fn from_wire(wire: crate::wire::NodeSyncResponse) -> Self {
1796 Self {}
1797 }
1798 }
1799
1800 impl ::fidl_next::FromWireRef<crate::wire::NodeSyncResponse> for NodeSyncResponse {
1801 #[inline]
1802 fn from_wire_ref(wire: &crate::wire::NodeSyncResponse) -> Self {
1803 Self {}
1804 }
1805 }
1806
1807 ::fidl_next::bitflags::bitflags! {
1808 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct ModeType: u32 {
1809 const DO_NOT_USE = 2147483648;
1810
1811 }
1812 }
1813
1814 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ModeType, ___E> for ModeType
1815 where
1816 ___E: ?Sized,
1817 {
1818 #[inline]
1819 fn encode(
1820 self,
1821 encoder: &mut ___E,
1822 out: &mut ::core::mem::MaybeUninit<crate::wire::ModeType>,
1823 _: (),
1824 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1825 ::fidl_next::Encode::encode(&self, encoder, out, ())
1826 }
1827 }
1828
1829 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ModeType, ___E> for &'a ModeType
1830 where
1831 ___E: ?Sized,
1832 {
1833 #[inline]
1834 fn encode(
1835 self,
1836 _: &mut ___E,
1837 out: &mut ::core::mem::MaybeUninit<crate::wire::ModeType>,
1838 _: (),
1839 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1840 ::fidl_next::munge!(let crate::wire::ModeType { value } = out);
1841
1842 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1843 return Err(::fidl_next::EncodeError::InvalidStrictBits);
1844 }
1845
1846 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
1847 Ok(())
1848 }
1849 }
1850
1851 impl ::core::convert::From<crate::wire::ModeType> for ModeType {
1852 fn from(wire: crate::wire::ModeType) -> Self {
1853 Self::from_bits_retain(u32::from(wire.value))
1854 }
1855 }
1856
1857 impl ::fidl_next::FromWire<crate::wire::ModeType> for ModeType {
1858 #[inline]
1859 fn from_wire(wire: crate::wire::ModeType) -> Self {
1860 Self::from(wire)
1861 }
1862 }
1863
1864 impl ::fidl_next::FromWireRef<crate::wire::ModeType> for ModeType {
1865 #[inline]
1866 fn from_wire_ref(wire: &crate::wire::ModeType) -> Self {
1867 Self::from(*wire)
1868 }
1869 }
1870
1871 #[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"]
1872 pub type Path = ::std::string::String;
1873
1874 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1875 #[repr(C)]
1876 pub struct DirectoryReadDirentsRequest {
1877 pub max_bytes: u64,
1878 }
1879
1880 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
1881 for DirectoryReadDirentsRequest
1882 where
1883 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1884 {
1885 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1886 Self,
1887 crate::wire::DirectoryReadDirentsRequest,
1888 > = unsafe {
1889 ::fidl_next::CopyOptimization::enable_if(
1890 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
1891 .is_enabled(),
1892 )
1893 };
1894
1895 #[inline]
1896 fn encode(
1897 self,
1898 encoder_: &mut ___E,
1899 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
1900 _: (),
1901 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1902 ::fidl_next::munge! {
1903 let crate::wire::DirectoryReadDirentsRequest {
1904 max_bytes,
1905
1906 } = out_;
1907 }
1908
1909 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
1910
1911 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max_bytes.as_mut_ptr()) };
1912
1913 Ok(())
1914 }
1915 }
1916
1917 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
1918 for &'a DirectoryReadDirentsRequest
1919 where
1920 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1921 {
1922 #[inline]
1923 fn encode(
1924 self,
1925 encoder_: &mut ___E,
1926 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
1927 _: (),
1928 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1929 ::fidl_next::munge! {
1930 let crate::wire::DirectoryReadDirentsRequest {
1931
1932 max_bytes,
1933
1934 } = out_;
1935 }
1936
1937 ::fidl_next::Encode::encode(&self.max_bytes, encoder_, max_bytes, ())?;
1938
1939 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(max_bytes.as_mut_ptr()) };
1940
1941 Ok(())
1942 }
1943 }
1944
1945 unsafe impl<___E>
1946 ::fidl_next::EncodeOption<
1947 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsRequest>,
1948 ___E,
1949 > for DirectoryReadDirentsRequest
1950 where
1951 ___E: ::fidl_next::Encoder + ?Sized,
1952 DirectoryReadDirentsRequest:
1953 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>,
1954 {
1955 #[inline]
1956 fn encode_option(
1957 this: ::core::option::Option<Self>,
1958 encoder: &mut ___E,
1959 out: &mut ::core::mem::MaybeUninit<
1960 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsRequest>,
1961 >,
1962 _: (),
1963 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1964 if let Some(inner) = this {
1965 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1966 ::fidl_next::WireBox::encode_present(out);
1967 } else {
1968 ::fidl_next::WireBox::encode_absent(out);
1969 }
1970
1971 Ok(())
1972 }
1973 }
1974
1975 unsafe impl<'a, ___E>
1976 ::fidl_next::EncodeOption<
1977 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsRequest>,
1978 ___E,
1979 > for &'a DirectoryReadDirentsRequest
1980 where
1981 ___E: ::fidl_next::Encoder + ?Sized,
1982 &'a DirectoryReadDirentsRequest:
1983 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>,
1984 {
1985 #[inline]
1986 fn encode_option(
1987 this: ::core::option::Option<Self>,
1988 encoder: &mut ___E,
1989 out: &mut ::core::mem::MaybeUninit<
1990 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsRequest>,
1991 >,
1992 _: (),
1993 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1994 if let Some(inner) = this {
1995 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1996 ::fidl_next::WireBox::encode_present(out);
1997 } else {
1998 ::fidl_next::WireBox::encode_absent(out);
1999 }
2000
2001 Ok(())
2002 }
2003 }
2004
2005 impl ::fidl_next::FromWire<crate::wire::DirectoryReadDirentsRequest>
2006 for DirectoryReadDirentsRequest
2007 {
2008 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2009 crate::wire::DirectoryReadDirentsRequest,
2010 Self,
2011 > = unsafe {
2012 ::fidl_next::CopyOptimization::enable_if(
2013 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
2014 .is_enabled(),
2015 )
2016 };
2017
2018 #[inline]
2019 fn from_wire(wire: crate::wire::DirectoryReadDirentsRequest) -> Self {
2020 Self { max_bytes: ::fidl_next::FromWire::from_wire(wire.max_bytes) }
2021 }
2022 }
2023
2024 impl ::fidl_next::FromWireRef<crate::wire::DirectoryReadDirentsRequest>
2025 for DirectoryReadDirentsRequest
2026 {
2027 #[inline]
2028 fn from_wire_ref(wire: &crate::wire::DirectoryReadDirentsRequest) -> Self {
2029 Self { max_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_bytes) }
2030 }
2031 }
2032
2033 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2034 pub struct DirectoryReadDirentsResponse {
2035 pub s: i32,
2036
2037 pub dirents: ::std::vec::Vec<u8>,
2038 }
2039
2040 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
2041 for DirectoryReadDirentsResponse
2042 where
2043 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2044 ___E: ::fidl_next::Encoder,
2045 {
2046 #[inline]
2047 fn encode(
2048 self,
2049 encoder_: &mut ___E,
2050 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
2051 _: (),
2052 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2053 ::fidl_next::munge! {
2054 let crate::wire::DirectoryReadDirentsResponse {
2055 s,
2056 dirents,
2057
2058 } = out_;
2059 }
2060
2061 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2062
2063 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2064
2065 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
2066
2067 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dirents.as_mut_ptr()) };
2068 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
2069
2070 Ok(())
2071 }
2072 }
2073
2074 unsafe impl<'a, ___E>
2075 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
2076 for &'a DirectoryReadDirentsResponse
2077 where
2078 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2079 ___E: ::fidl_next::Encoder,
2080 {
2081 #[inline]
2082 fn encode(
2083 self,
2084 encoder_: &mut ___E,
2085 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
2086 _: (),
2087 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2088 ::fidl_next::munge! {
2089 let crate::wire::DirectoryReadDirentsResponse {
2090
2091 s,
2092 dirents,
2093
2094 } = out_;
2095 }
2096
2097 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2098
2099 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2100
2101 ::fidl_next::Encode::encode(&self.dirents, encoder_, dirents, (8192, ()))?;
2102
2103 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dirents.as_mut_ptr()) };
2104 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
2105
2106 Ok(())
2107 }
2108 }
2109
2110 unsafe impl<___E>
2111 ::fidl_next::EncodeOption<
2112 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
2113 ___E,
2114 > for DirectoryReadDirentsResponse
2115 where
2116 ___E: ::fidl_next::Encoder + ?Sized,
2117 DirectoryReadDirentsResponse:
2118 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>,
2119 {
2120 #[inline]
2121 fn encode_option(
2122 this: ::core::option::Option<Self>,
2123 encoder: &mut ___E,
2124 out: &mut ::core::mem::MaybeUninit<
2125 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
2126 >,
2127 _: (),
2128 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2129 if let Some(inner) = this {
2130 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2131 ::fidl_next::WireBox::encode_present(out);
2132 } else {
2133 ::fidl_next::WireBox::encode_absent(out);
2134 }
2135
2136 Ok(())
2137 }
2138 }
2139
2140 unsafe impl<'a, ___E>
2141 ::fidl_next::EncodeOption<
2142 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
2143 ___E,
2144 > for &'a DirectoryReadDirentsResponse
2145 where
2146 ___E: ::fidl_next::Encoder + ?Sized,
2147 &'a DirectoryReadDirentsResponse:
2148 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>,
2149 {
2150 #[inline]
2151 fn encode_option(
2152 this: ::core::option::Option<Self>,
2153 encoder: &mut ___E,
2154 out: &mut ::core::mem::MaybeUninit<
2155 ::fidl_next::WireBox<'static, crate::wire::DirectoryReadDirentsResponse<'static>>,
2156 >,
2157 _: (),
2158 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2159 if let Some(inner) = this {
2160 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2161 ::fidl_next::WireBox::encode_present(out);
2162 } else {
2163 ::fidl_next::WireBox::encode_absent(out);
2164 }
2165
2166 Ok(())
2167 }
2168 }
2169
2170 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryReadDirentsResponse<'de>>
2171 for DirectoryReadDirentsResponse
2172 {
2173 #[inline]
2174 fn from_wire(wire: crate::wire::DirectoryReadDirentsResponse<'de>) -> Self {
2175 Self {
2176 s: ::fidl_next::FromWire::from_wire(wire.s),
2177
2178 dirents: ::fidl_next::FromWire::from_wire(wire.dirents),
2179 }
2180 }
2181 }
2182
2183 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryReadDirentsResponse<'de>>
2184 for DirectoryReadDirentsResponse
2185 {
2186 #[inline]
2187 fn from_wire_ref(wire: &crate::wire::DirectoryReadDirentsResponse<'de>) -> Self {
2188 Self {
2189 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
2190
2191 dirents: ::fidl_next::FromWireRef::from_wire_ref(&wire.dirents),
2192 }
2193 }
2194 }
2195
2196 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2197 #[repr(C)]
2198 pub struct DirectoryRewindResponse {
2199 pub s: i32,
2200 }
2201
2202 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
2203 for DirectoryRewindResponse
2204 where
2205 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2206 {
2207 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2208 Self,
2209 crate::wire::DirectoryRewindResponse,
2210 > = unsafe {
2211 ::fidl_next::CopyOptimization::enable_if(
2212 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
2213 .is_enabled(),
2214 )
2215 };
2216
2217 #[inline]
2218 fn encode(
2219 self,
2220 encoder_: &mut ___E,
2221 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
2222 _: (),
2223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2224 ::fidl_next::munge! {
2225 let crate::wire::DirectoryRewindResponse {
2226 s,
2227
2228 } = out_;
2229 }
2230
2231 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2232
2233 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2234
2235 Ok(())
2236 }
2237 }
2238
2239 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
2240 for &'a DirectoryRewindResponse
2241 where
2242 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2243 {
2244 #[inline]
2245 fn encode(
2246 self,
2247 encoder_: &mut ___E,
2248 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
2249 _: (),
2250 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2251 ::fidl_next::munge! {
2252 let crate::wire::DirectoryRewindResponse {
2253
2254 s,
2255
2256 } = out_;
2257 }
2258
2259 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2260
2261 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2262
2263 Ok(())
2264 }
2265 }
2266
2267 unsafe impl<___E>
2268 ::fidl_next::EncodeOption<
2269 ::fidl_next::WireBox<'static, crate::wire::DirectoryRewindResponse>,
2270 ___E,
2271 > for DirectoryRewindResponse
2272 where
2273 ___E: ::fidl_next::Encoder + ?Sized,
2274 DirectoryRewindResponse: ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
2275 {
2276 #[inline]
2277 fn encode_option(
2278 this: ::core::option::Option<Self>,
2279 encoder: &mut ___E,
2280 out: &mut ::core::mem::MaybeUninit<
2281 ::fidl_next::WireBox<'static, crate::wire::DirectoryRewindResponse>,
2282 >,
2283 _: (),
2284 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2285 if let Some(inner) = this {
2286 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2287 ::fidl_next::WireBox::encode_present(out);
2288 } else {
2289 ::fidl_next::WireBox::encode_absent(out);
2290 }
2291
2292 Ok(())
2293 }
2294 }
2295
2296 unsafe impl<'a, ___E>
2297 ::fidl_next::EncodeOption<
2298 ::fidl_next::WireBox<'static, crate::wire::DirectoryRewindResponse>,
2299 ___E,
2300 > for &'a DirectoryRewindResponse
2301 where
2302 ___E: ::fidl_next::Encoder + ?Sized,
2303 &'a DirectoryRewindResponse:
2304 ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>,
2305 {
2306 #[inline]
2307 fn encode_option(
2308 this: ::core::option::Option<Self>,
2309 encoder: &mut ___E,
2310 out: &mut ::core::mem::MaybeUninit<
2311 ::fidl_next::WireBox<'static, crate::wire::DirectoryRewindResponse>,
2312 >,
2313 _: (),
2314 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2315 if let Some(inner) = this {
2316 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2317 ::fidl_next::WireBox::encode_present(out);
2318 } else {
2319 ::fidl_next::WireBox::encode_absent(out);
2320 }
2321
2322 Ok(())
2323 }
2324 }
2325
2326 impl ::fidl_next::FromWire<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
2327 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2328 crate::wire::DirectoryRewindResponse,
2329 Self,
2330 > = unsafe {
2331 ::fidl_next::CopyOptimization::enable_if(
2332 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
2333 .is_enabled(),
2334 )
2335 };
2336
2337 #[inline]
2338 fn from_wire(wire: crate::wire::DirectoryRewindResponse) -> Self {
2339 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2340 }
2341 }
2342
2343 impl ::fidl_next::FromWireRef<crate::wire::DirectoryRewindResponse> for DirectoryRewindResponse {
2344 #[inline]
2345 fn from_wire_ref(wire: &crate::wire::DirectoryRewindResponse) -> Self {
2346 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2347 }
2348 }
2349
2350 #[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"]
2351 pub type Name = ::std::string::String;
2352
2353 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2354 #[repr(C)]
2355 pub struct DirectoryLinkResponse {
2356 pub s: i32,
2357 }
2358
2359 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2360 for DirectoryLinkResponse
2361 where
2362 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2363 {
2364 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2365 Self,
2366 crate::wire::DirectoryLinkResponse,
2367 > = unsafe {
2368 ::fidl_next::CopyOptimization::enable_if(
2369 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
2370 .is_enabled(),
2371 )
2372 };
2373
2374 #[inline]
2375 fn encode(
2376 self,
2377 encoder_: &mut ___E,
2378 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2379 _: (),
2380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2381 ::fidl_next::munge! {
2382 let crate::wire::DirectoryLinkResponse {
2383 s,
2384
2385 } = out_;
2386 }
2387
2388 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
2389
2390 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2391
2392 Ok(())
2393 }
2394 }
2395
2396 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
2397 for &'a DirectoryLinkResponse
2398 where
2399 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2400 {
2401 #[inline]
2402 fn encode(
2403 self,
2404 encoder_: &mut ___E,
2405 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
2406 _: (),
2407 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2408 ::fidl_next::munge! {
2409 let crate::wire::DirectoryLinkResponse {
2410
2411 s,
2412
2413 } = out_;
2414 }
2415
2416 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
2417
2418 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
2419
2420 Ok(())
2421 }
2422 }
2423
2424 unsafe impl<___E>
2425 ::fidl_next::EncodeOption<
2426 ::fidl_next::WireBox<'static, crate::wire::DirectoryLinkResponse>,
2427 ___E,
2428 > for DirectoryLinkResponse
2429 where
2430 ___E: ::fidl_next::Encoder + ?Sized,
2431 DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2432 {
2433 #[inline]
2434 fn encode_option(
2435 this: ::core::option::Option<Self>,
2436 encoder: &mut ___E,
2437 out: &mut ::core::mem::MaybeUninit<
2438 ::fidl_next::WireBox<'static, crate::wire::DirectoryLinkResponse>,
2439 >,
2440 _: (),
2441 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2442 if let Some(inner) = this {
2443 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2444 ::fidl_next::WireBox::encode_present(out);
2445 } else {
2446 ::fidl_next::WireBox::encode_absent(out);
2447 }
2448
2449 Ok(())
2450 }
2451 }
2452
2453 unsafe impl<'a, ___E>
2454 ::fidl_next::EncodeOption<
2455 ::fidl_next::WireBox<'static, crate::wire::DirectoryLinkResponse>,
2456 ___E,
2457 > for &'a DirectoryLinkResponse
2458 where
2459 ___E: ::fidl_next::Encoder + ?Sized,
2460 &'a DirectoryLinkResponse: ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>,
2461 {
2462 #[inline]
2463 fn encode_option(
2464 this: ::core::option::Option<Self>,
2465 encoder: &mut ___E,
2466 out: &mut ::core::mem::MaybeUninit<
2467 ::fidl_next::WireBox<'static, crate::wire::DirectoryLinkResponse>,
2468 >,
2469 _: (),
2470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2471 if let Some(inner) = this {
2472 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2473 ::fidl_next::WireBox::encode_present(out);
2474 } else {
2475 ::fidl_next::WireBox::encode_absent(out);
2476 }
2477
2478 Ok(())
2479 }
2480 }
2481
2482 impl ::fidl_next::FromWire<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2483 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2484 crate::wire::DirectoryLinkResponse,
2485 Self,
2486 > = unsafe {
2487 ::fidl_next::CopyOptimization::enable_if(
2488 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
2489 .is_enabled(),
2490 )
2491 };
2492
2493 #[inline]
2494 fn from_wire(wire: crate::wire::DirectoryLinkResponse) -> Self {
2495 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
2496 }
2497 }
2498
2499 impl ::fidl_next::FromWireRef<crate::wire::DirectoryLinkResponse> for DirectoryLinkResponse {
2500 #[inline]
2501 fn from_wire_ref(wire: &crate::wire::DirectoryLinkResponse) -> Self {
2502 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
2503 }
2504 }
2505
2506 ::fidl_next::bitflags::bitflags! {
2507 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct UnlinkFlags: u64 {
2508 #[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;
2509 const _ = !0;
2510 }
2511 }
2512
2513 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for UnlinkFlags
2514 where
2515 ___E: ?Sized,
2516 {
2517 #[inline]
2518 fn encode(
2519 self,
2520 encoder: &mut ___E,
2521 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2522 _: (),
2523 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2524 ::fidl_next::Encode::encode(&self, encoder, out, ())
2525 }
2526 }
2527
2528 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkFlags, ___E> for &'a UnlinkFlags
2529 where
2530 ___E: ?Sized,
2531 {
2532 #[inline]
2533 fn encode(
2534 self,
2535 _: &mut ___E,
2536 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkFlags>,
2537 _: (),
2538 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2539 ::fidl_next::munge!(let crate::wire::UnlinkFlags { value } = out);
2540
2541 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
2542 Ok(())
2543 }
2544 }
2545
2546 impl ::core::convert::From<crate::wire::UnlinkFlags> for UnlinkFlags {
2547 fn from(wire: crate::wire::UnlinkFlags) -> Self {
2548 Self::from_bits_retain(u64::from(wire.value))
2549 }
2550 }
2551
2552 impl ::fidl_next::FromWire<crate::wire::UnlinkFlags> for UnlinkFlags {
2553 #[inline]
2554 fn from_wire(wire: crate::wire::UnlinkFlags) -> Self {
2555 Self::from(wire)
2556 }
2557 }
2558
2559 impl ::fidl_next::FromWireRef<crate::wire::UnlinkFlags> for UnlinkFlags {
2560 #[inline]
2561 fn from_wire_ref(wire: &crate::wire::UnlinkFlags) -> Self {
2562 Self::from(*wire)
2563 }
2564 }
2565
2566 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2567 pub struct UnlinkOptions {
2568 pub flags: ::core::option::Option<crate::natural::UnlinkFlags>,
2569 }
2570
2571 impl UnlinkOptions {
2572 fn __max_ordinal(&self) -> usize {
2573 if self.flags.is_some() {
2574 return 1;
2575 }
2576
2577 0
2578 }
2579 }
2580
2581 unsafe impl<___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E> for UnlinkOptions
2582 where
2583 ___E: ::fidl_next::Encoder + ?Sized,
2584 {
2585 #[inline]
2586 fn encode(
2587 mut self,
2588 encoder: &mut ___E,
2589 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2590 _: (),
2591 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2592 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2593
2594 let max_ord = self.__max_ordinal();
2595
2596 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2597 ::fidl_next::Wire::zero_padding(&mut out);
2598
2599 let mut preallocated =
2600 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2601
2602 for i in 1..=max_ord {
2603 match i {
2604 1 => {
2605 if let Some(value) = self.flags.take() {
2606 ::fidl_next::WireEnvelope::encode_value::<
2607 crate::wire::UnlinkFlags,
2608 ___E,
2609 >(
2610 value, preallocated.encoder, &mut out, ()
2611 )?;
2612 } else {
2613 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2614 }
2615 }
2616
2617 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2618 }
2619 unsafe {
2620 preallocated.write_next(out.assume_init_ref());
2621 }
2622 }
2623
2624 ::fidl_next::WireTable::encode_len(table, max_ord);
2625
2626 Ok(())
2627 }
2628 }
2629
2630 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>
2631 for &'a UnlinkOptions
2632 where
2633 ___E: ::fidl_next::Encoder + ?Sized,
2634 {
2635 #[inline]
2636 fn encode(
2637 self,
2638 encoder: &mut ___E,
2639 out: &mut ::core::mem::MaybeUninit<crate::wire::UnlinkOptions<'static>>,
2640 _: (),
2641 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2642 ::fidl_next::munge!(let crate::wire::UnlinkOptions { table } = out);
2643
2644 let max_ord = self.__max_ordinal();
2645
2646 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2647 ::fidl_next::Wire::zero_padding(&mut out);
2648
2649 let mut preallocated =
2650 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2651
2652 for i in 1..=max_ord {
2653 match i {
2654 1 => {
2655 if let Some(value) = &self.flags {
2656 ::fidl_next::WireEnvelope::encode_value::<
2657 crate::wire::UnlinkFlags,
2658 ___E,
2659 >(
2660 value, preallocated.encoder, &mut out, ()
2661 )?;
2662 } else {
2663 ::fidl_next::WireEnvelope::encode_zero(&mut out)
2664 }
2665 }
2666
2667 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2668 }
2669 unsafe {
2670 preallocated.write_next(out.assume_init_ref());
2671 }
2672 }
2673
2674 ::fidl_next::WireTable::encode_len(table, max_ord);
2675
2676 Ok(())
2677 }
2678 }
2679
2680 impl<'de> ::fidl_next::FromWire<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2681 #[inline]
2682 fn from_wire(wire_: crate::wire::UnlinkOptions<'de>) -> Self {
2683 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2684
2685 let flags = wire_.table.get(1);
2686
2687 Self {
2688 flags: flags.map(|envelope| {
2689 ::fidl_next::FromWire::from_wire(unsafe {
2690 envelope.read_unchecked::<crate::wire::UnlinkFlags>()
2691 })
2692 }),
2693 }
2694 }
2695 }
2696
2697 impl<'de> ::fidl_next::FromWireRef<crate::wire::UnlinkOptions<'de>> for UnlinkOptions {
2698 #[inline]
2699 fn from_wire_ref(wire: &crate::wire::UnlinkOptions<'de>) -> Self {
2700 Self {
2701 flags: wire.table.get(1).map(|envelope| {
2702 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2703 envelope.deref_unchecked::<crate::wire::UnlinkFlags>()
2704 })
2705 }),
2706 }
2707 }
2708 }
2709
2710 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2711 pub struct DirectoryUnlinkRequest {
2712 pub name: ::std::string::String,
2713
2714 pub options: crate::natural::UnlinkOptions,
2715 }
2716
2717 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2718 for DirectoryUnlinkRequest
2719 where
2720 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2721 ___E: ::fidl_next::Encoder,
2722 {
2723 #[inline]
2724 fn encode(
2725 self,
2726 encoder_: &mut ___E,
2727 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2728 _: (),
2729 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2730 ::fidl_next::munge! {
2731 let crate::wire::DirectoryUnlinkRequest {
2732 name,
2733 options,
2734
2735 } = out_;
2736 }
2737
2738 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
2739
2740 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2741 ::fidl_next::Constrained::validate(_field, 255)?;
2742
2743 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2744
2745 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2746
2747 Ok(())
2748 }
2749 }
2750
2751 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
2752 for &'a DirectoryUnlinkRequest
2753 where
2754 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2755 ___E: ::fidl_next::Encoder,
2756 {
2757 #[inline]
2758 fn encode(
2759 self,
2760 encoder_: &mut ___E,
2761 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
2762 _: (),
2763 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2764 ::fidl_next::munge! {
2765 let crate::wire::DirectoryUnlinkRequest {
2766
2767 name,
2768 options,
2769
2770 } = out_;
2771 }
2772
2773 ::fidl_next::Encode::encode(&self.name, encoder_, name, 255)?;
2774
2775 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
2776 ::fidl_next::Constrained::validate(_field, 255)?;
2777
2778 ::fidl_next::Encode::encode(&self.options, encoder_, options, ())?;
2779
2780 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2781
2782 Ok(())
2783 }
2784 }
2785
2786 unsafe impl<___E>
2787 ::fidl_next::EncodeOption<
2788 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2789 ___E,
2790 > for DirectoryUnlinkRequest
2791 where
2792 ___E: ::fidl_next::Encoder + ?Sized,
2793 DirectoryUnlinkRequest:
2794 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2795 {
2796 #[inline]
2797 fn encode_option(
2798 this: ::core::option::Option<Self>,
2799 encoder: &mut ___E,
2800 out: &mut ::core::mem::MaybeUninit<
2801 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2802 >,
2803 _: (),
2804 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2805 if let Some(inner) = this {
2806 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2807 ::fidl_next::WireBox::encode_present(out);
2808 } else {
2809 ::fidl_next::WireBox::encode_absent(out);
2810 }
2811
2812 Ok(())
2813 }
2814 }
2815
2816 unsafe impl<'a, ___E>
2817 ::fidl_next::EncodeOption<
2818 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2819 ___E,
2820 > for &'a DirectoryUnlinkRequest
2821 where
2822 ___E: ::fidl_next::Encoder + ?Sized,
2823 &'a DirectoryUnlinkRequest:
2824 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>,
2825 {
2826 #[inline]
2827 fn encode_option(
2828 this: ::core::option::Option<Self>,
2829 encoder: &mut ___E,
2830 out: &mut ::core::mem::MaybeUninit<
2831 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkRequest<'static>>,
2832 >,
2833 _: (),
2834 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2835 if let Some(inner) = this {
2836 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2837 ::fidl_next::WireBox::encode_present(out);
2838 } else {
2839 ::fidl_next::WireBox::encode_absent(out);
2840 }
2841
2842 Ok(())
2843 }
2844 }
2845
2846 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryUnlinkRequest<'de>>
2847 for DirectoryUnlinkRequest
2848 {
2849 #[inline]
2850 fn from_wire(wire: crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2851 Self {
2852 name: ::fidl_next::FromWire::from_wire(wire.name),
2853
2854 options: ::fidl_next::FromWire::from_wire(wire.options),
2855 }
2856 }
2857 }
2858
2859 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryUnlinkRequest<'de>>
2860 for DirectoryUnlinkRequest
2861 {
2862 #[inline]
2863 fn from_wire_ref(wire: &crate::wire::DirectoryUnlinkRequest<'de>) -> Self {
2864 Self {
2865 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
2866
2867 options: ::fidl_next::FromWireRef::from_wire_ref(&wire.options),
2868 }
2869 }
2870 }
2871
2872 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2873 #[repr(C)]
2874 pub struct DirectoryUnlinkResponse {}
2875
2876 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkResponse, ___E>
2877 for DirectoryUnlinkResponse
2878 where
2879 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2880 {
2881 #[inline]
2882 fn encode(
2883 self,
2884 encoder_: &mut ___E,
2885 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkResponse>,
2886 _: (),
2887 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2888 *out_ = ::core::mem::MaybeUninit::zeroed();
2889
2890 Ok(())
2891 }
2892 }
2893
2894 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryUnlinkResponse, ___E>
2895 for &'a DirectoryUnlinkResponse
2896 where
2897 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2898 {
2899 #[inline]
2900 fn encode(
2901 self,
2902 encoder_: &mut ___E,
2903 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkResponse>,
2904 _: (),
2905 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2906 ::fidl_next::munge! {
2907 let crate::wire::DirectoryUnlinkResponse {
2908
2909 _empty,
2910
2911
2912 } = out_;
2913 }
2914
2915 Ok(())
2916 }
2917 }
2918
2919 unsafe impl<___E>
2920 ::fidl_next::EncodeOption<
2921 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkResponse>,
2922 ___E,
2923 > for DirectoryUnlinkResponse
2924 where
2925 ___E: ::fidl_next::Encoder + ?Sized,
2926 DirectoryUnlinkResponse: ::fidl_next::Encode<crate::wire::DirectoryUnlinkResponse, ___E>,
2927 {
2928 #[inline]
2929 fn encode_option(
2930 this: ::core::option::Option<Self>,
2931 encoder: &mut ___E,
2932 out: &mut ::core::mem::MaybeUninit<
2933 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkResponse>,
2934 >,
2935 _: (),
2936 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2937 if let Some(inner) = this {
2938 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2939 ::fidl_next::WireBox::encode_present(out);
2940 } else {
2941 ::fidl_next::WireBox::encode_absent(out);
2942 }
2943
2944 Ok(())
2945 }
2946 }
2947
2948 unsafe impl<'a, ___E>
2949 ::fidl_next::EncodeOption<
2950 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkResponse>,
2951 ___E,
2952 > for &'a DirectoryUnlinkResponse
2953 where
2954 ___E: ::fidl_next::Encoder + ?Sized,
2955 &'a DirectoryUnlinkResponse:
2956 ::fidl_next::Encode<crate::wire::DirectoryUnlinkResponse, ___E>,
2957 {
2958 #[inline]
2959 fn encode_option(
2960 this: ::core::option::Option<Self>,
2961 encoder: &mut ___E,
2962 out: &mut ::core::mem::MaybeUninit<
2963 ::fidl_next::WireBox<'static, crate::wire::DirectoryUnlinkResponse>,
2964 >,
2965 _: (),
2966 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2967 if let Some(inner) = this {
2968 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
2969 ::fidl_next::WireBox::encode_present(out);
2970 } else {
2971 ::fidl_next::WireBox::encode_absent(out);
2972 }
2973
2974 Ok(())
2975 }
2976 }
2977
2978 impl ::fidl_next::FromWire<crate::wire::DirectoryUnlinkResponse> for DirectoryUnlinkResponse {
2979 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2980 crate::wire::DirectoryUnlinkResponse,
2981 Self,
2982 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
2983
2984 #[inline]
2985 fn from_wire(wire: crate::wire::DirectoryUnlinkResponse) -> Self {
2986 Self {}
2987 }
2988 }
2989
2990 impl ::fidl_next::FromWireRef<crate::wire::DirectoryUnlinkResponse> for DirectoryUnlinkResponse {
2991 #[inline]
2992 fn from_wire_ref(wire: &crate::wire::DirectoryUnlinkResponse) -> Self {
2993 Self {}
2994 }
2995 }
2996
2997 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2998 #[repr(C)]
2999 pub struct DirectoryRenameResponse {}
3000
3001 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRenameResponse, ___E>
3002 for DirectoryRenameResponse
3003 where
3004 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3005 {
3006 #[inline]
3007 fn encode(
3008 self,
3009 encoder_: &mut ___E,
3010 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameResponse>,
3011 _: (),
3012 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3013 *out_ = ::core::mem::MaybeUninit::zeroed();
3014
3015 Ok(())
3016 }
3017 }
3018
3019 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryRenameResponse, ___E>
3020 for &'a DirectoryRenameResponse
3021 where
3022 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3023 {
3024 #[inline]
3025 fn encode(
3026 self,
3027 encoder_: &mut ___E,
3028 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameResponse>,
3029 _: (),
3030 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3031 ::fidl_next::munge! {
3032 let crate::wire::DirectoryRenameResponse {
3033
3034 _empty,
3035
3036
3037 } = out_;
3038 }
3039
3040 Ok(())
3041 }
3042 }
3043
3044 unsafe impl<___E>
3045 ::fidl_next::EncodeOption<
3046 ::fidl_next::WireBox<'static, crate::wire::DirectoryRenameResponse>,
3047 ___E,
3048 > for DirectoryRenameResponse
3049 where
3050 ___E: ::fidl_next::Encoder + ?Sized,
3051 DirectoryRenameResponse: ::fidl_next::Encode<crate::wire::DirectoryRenameResponse, ___E>,
3052 {
3053 #[inline]
3054 fn encode_option(
3055 this: ::core::option::Option<Self>,
3056 encoder: &mut ___E,
3057 out: &mut ::core::mem::MaybeUninit<
3058 ::fidl_next::WireBox<'static, crate::wire::DirectoryRenameResponse>,
3059 >,
3060 _: (),
3061 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3062 if let Some(inner) = this {
3063 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3064 ::fidl_next::WireBox::encode_present(out);
3065 } else {
3066 ::fidl_next::WireBox::encode_absent(out);
3067 }
3068
3069 Ok(())
3070 }
3071 }
3072
3073 unsafe impl<'a, ___E>
3074 ::fidl_next::EncodeOption<
3075 ::fidl_next::WireBox<'static, crate::wire::DirectoryRenameResponse>,
3076 ___E,
3077 > for &'a DirectoryRenameResponse
3078 where
3079 ___E: ::fidl_next::Encoder + ?Sized,
3080 &'a DirectoryRenameResponse:
3081 ::fidl_next::Encode<crate::wire::DirectoryRenameResponse, ___E>,
3082 {
3083 #[inline]
3084 fn encode_option(
3085 this: ::core::option::Option<Self>,
3086 encoder: &mut ___E,
3087 out: &mut ::core::mem::MaybeUninit<
3088 ::fidl_next::WireBox<'static, crate::wire::DirectoryRenameResponse>,
3089 >,
3090 _: (),
3091 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3092 if let Some(inner) = this {
3093 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3094 ::fidl_next::WireBox::encode_present(out);
3095 } else {
3096 ::fidl_next::WireBox::encode_absent(out);
3097 }
3098
3099 Ok(())
3100 }
3101 }
3102
3103 impl ::fidl_next::FromWire<crate::wire::DirectoryRenameResponse> for DirectoryRenameResponse {
3104 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3105 crate::wire::DirectoryRenameResponse,
3106 Self,
3107 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3108
3109 #[inline]
3110 fn from_wire(wire: crate::wire::DirectoryRenameResponse) -> Self {
3111 Self {}
3112 }
3113 }
3114
3115 impl ::fidl_next::FromWireRef<crate::wire::DirectoryRenameResponse> for DirectoryRenameResponse {
3116 #[inline]
3117 fn from_wire_ref(wire: &crate::wire::DirectoryRenameResponse) -> Self {
3118 Self {}
3119 }
3120 }
3121
3122 ::fidl_next::bitflags::bitflags! {
3123 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct WatchMask: u32 {
3124 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.DELETED`.\n"]const DELETED = 1;
3125 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.ADDED`.\n"]const ADDED = 2;
3126 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.REMOVED`.\n"]const REMOVED = 4;
3127 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.EXISTING`.\n"]const EXISTING = 8;
3128 #[doc = " Used by `Directory.Watch`. Requests transmission of `WatchEvent.IDLE`.\n"]const IDLE = 16;
3129
3130 }
3131 }
3132
3133 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for WatchMask
3134 where
3135 ___E: ?Sized,
3136 {
3137 #[inline]
3138 fn encode(
3139 self,
3140 encoder: &mut ___E,
3141 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
3142 _: (),
3143 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3144 ::fidl_next::Encode::encode(&self, encoder, out, ())
3145 }
3146 }
3147
3148 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchMask, ___E> for &'a WatchMask
3149 where
3150 ___E: ?Sized,
3151 {
3152 #[inline]
3153 fn encode(
3154 self,
3155 _: &mut ___E,
3156 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchMask>,
3157 _: (),
3158 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3159 ::fidl_next::munge!(let crate::wire::WatchMask { value } = out);
3160
3161 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
3162 return Err(::fidl_next::EncodeError::InvalidStrictBits);
3163 }
3164
3165 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
3166 Ok(())
3167 }
3168 }
3169
3170 impl ::core::convert::From<crate::wire::WatchMask> for WatchMask {
3171 fn from(wire: crate::wire::WatchMask) -> Self {
3172 Self::from_bits_retain(u32::from(wire.value))
3173 }
3174 }
3175
3176 impl ::fidl_next::FromWire<crate::wire::WatchMask> for WatchMask {
3177 #[inline]
3178 fn from_wire(wire: crate::wire::WatchMask) -> Self {
3179 Self::from(wire)
3180 }
3181 }
3182
3183 impl ::fidl_next::FromWireRef<crate::wire::WatchMask> for WatchMask {
3184 #[inline]
3185 fn from_wire_ref(wire: &crate::wire::WatchMask) -> Self {
3186 Self::from(*wire)
3187 }
3188 }
3189
3190 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3191 #[repr(C)]
3192 pub struct DirectoryWatchResponse {
3193 pub s: i32,
3194 }
3195
3196 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
3197 for DirectoryWatchResponse
3198 where
3199 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3200 {
3201 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3202 Self,
3203 crate::wire::DirectoryWatchResponse,
3204 > = unsafe {
3205 ::fidl_next::CopyOptimization::enable_if(
3206 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
3207 .is_enabled(),
3208 )
3209 };
3210
3211 #[inline]
3212 fn encode(
3213 self,
3214 encoder_: &mut ___E,
3215 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
3216 _: (),
3217 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3218 ::fidl_next::munge! {
3219 let crate::wire::DirectoryWatchResponse {
3220 s,
3221
3222 } = out_;
3223 }
3224
3225 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
3226
3227 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3228
3229 Ok(())
3230 }
3231 }
3232
3233 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
3234 for &'a DirectoryWatchResponse
3235 where
3236 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3237 {
3238 #[inline]
3239 fn encode(
3240 self,
3241 encoder_: &mut ___E,
3242 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
3243 _: (),
3244 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3245 ::fidl_next::munge! {
3246 let crate::wire::DirectoryWatchResponse {
3247
3248 s,
3249
3250 } = out_;
3251 }
3252
3253 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
3254
3255 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
3256
3257 Ok(())
3258 }
3259 }
3260
3261 unsafe impl<___E>
3262 ::fidl_next::EncodeOption<
3263 ::fidl_next::WireBox<'static, crate::wire::DirectoryWatchResponse>,
3264 ___E,
3265 > for DirectoryWatchResponse
3266 where
3267 ___E: ::fidl_next::Encoder + ?Sized,
3268 DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
3269 {
3270 #[inline]
3271 fn encode_option(
3272 this: ::core::option::Option<Self>,
3273 encoder: &mut ___E,
3274 out: &mut ::core::mem::MaybeUninit<
3275 ::fidl_next::WireBox<'static, crate::wire::DirectoryWatchResponse>,
3276 >,
3277 _: (),
3278 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3279 if let Some(inner) = this {
3280 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3281 ::fidl_next::WireBox::encode_present(out);
3282 } else {
3283 ::fidl_next::WireBox::encode_absent(out);
3284 }
3285
3286 Ok(())
3287 }
3288 }
3289
3290 unsafe impl<'a, ___E>
3291 ::fidl_next::EncodeOption<
3292 ::fidl_next::WireBox<'static, crate::wire::DirectoryWatchResponse>,
3293 ___E,
3294 > for &'a DirectoryWatchResponse
3295 where
3296 ___E: ::fidl_next::Encoder + ?Sized,
3297 &'a DirectoryWatchResponse: ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>,
3298 {
3299 #[inline]
3300 fn encode_option(
3301 this: ::core::option::Option<Self>,
3302 encoder: &mut ___E,
3303 out: &mut ::core::mem::MaybeUninit<
3304 ::fidl_next::WireBox<'static, crate::wire::DirectoryWatchResponse>,
3305 >,
3306 _: (),
3307 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3308 if let Some(inner) = this {
3309 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3310 ::fidl_next::WireBox::encode_present(out);
3311 } else {
3312 ::fidl_next::WireBox::encode_absent(out);
3313 }
3314
3315 Ok(())
3316 }
3317 }
3318
3319 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
3320 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3321 crate::wire::DirectoryWatchResponse,
3322 Self,
3323 > = unsafe {
3324 ::fidl_next::CopyOptimization::enable_if(
3325 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
3326 .is_enabled(),
3327 )
3328 };
3329
3330 #[inline]
3331 fn from_wire(wire: crate::wire::DirectoryWatchResponse) -> Self {
3332 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
3333 }
3334 }
3335
3336 impl ::fidl_next::FromWireRef<crate::wire::DirectoryWatchResponse> for DirectoryWatchResponse {
3337 #[inline]
3338 fn from_wire_ref(wire: &crate::wire::DirectoryWatchResponse) -> Self {
3339 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
3340 }
3341 }
3342
3343 pub type SymlinkTarget = ::std::vec::Vec<u8>;
3344
3345 #[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"]
3346 pub type ExtendedAttributeName = ::std::vec::Vec<u8>;
3347
3348 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3349 pub struct NodeGetExtendedAttributeRequest {
3350 pub name: ::std::vec::Vec<u8>,
3351 }
3352
3353 unsafe impl<___E>
3354 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
3355 for NodeGetExtendedAttributeRequest
3356 where
3357 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3358 ___E: ::fidl_next::Encoder,
3359 {
3360 #[inline]
3361 fn encode(
3362 self,
3363 encoder_: &mut ___E,
3364 out_: &mut ::core::mem::MaybeUninit<
3365 crate::wire::NodeGetExtendedAttributeRequest<'static>,
3366 >,
3367 _: (),
3368 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3369 ::fidl_next::munge! {
3370 let crate::wire::NodeGetExtendedAttributeRequest {
3371 name,
3372
3373 } = out_;
3374 }
3375
3376 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
3377
3378 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3379 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3380
3381 Ok(())
3382 }
3383 }
3384
3385 unsafe impl<'a, ___E>
3386 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
3387 for &'a NodeGetExtendedAttributeRequest
3388 where
3389 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3390 ___E: ::fidl_next::Encoder,
3391 {
3392 #[inline]
3393 fn encode(
3394 self,
3395 encoder_: &mut ___E,
3396 out_: &mut ::core::mem::MaybeUninit<
3397 crate::wire::NodeGetExtendedAttributeRequest<'static>,
3398 >,
3399 _: (),
3400 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3401 ::fidl_next::munge! {
3402 let crate::wire::NodeGetExtendedAttributeRequest {
3403
3404 name,
3405
3406 } = out_;
3407 }
3408
3409 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
3410
3411 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3412 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3413
3414 Ok(())
3415 }
3416 }
3417
3418 unsafe impl<___E>
3419 ::fidl_next::EncodeOption<
3420 ::fidl_next::WireBox<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
3421 ___E,
3422 > for NodeGetExtendedAttributeRequest
3423 where
3424 ___E: ::fidl_next::Encoder + ?Sized,
3425 NodeGetExtendedAttributeRequest:
3426 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
3427 {
3428 #[inline]
3429 fn encode_option(
3430 this: ::core::option::Option<Self>,
3431 encoder: &mut ___E,
3432 out: &mut ::core::mem::MaybeUninit<
3433 ::fidl_next::WireBox<
3434 'static,
3435 crate::wire::NodeGetExtendedAttributeRequest<'static>,
3436 >,
3437 >,
3438 _: (),
3439 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3440 if let Some(inner) = this {
3441 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3442 ::fidl_next::WireBox::encode_present(out);
3443 } else {
3444 ::fidl_next::WireBox::encode_absent(out);
3445 }
3446
3447 Ok(())
3448 }
3449 }
3450
3451 unsafe impl<'a, ___E>
3452 ::fidl_next::EncodeOption<
3453 ::fidl_next::WireBox<'static, crate::wire::NodeGetExtendedAttributeRequest<'static>>,
3454 ___E,
3455 > for &'a NodeGetExtendedAttributeRequest
3456 where
3457 ___E: ::fidl_next::Encoder + ?Sized,
3458 &'a NodeGetExtendedAttributeRequest:
3459 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>,
3460 {
3461 #[inline]
3462 fn encode_option(
3463 this: ::core::option::Option<Self>,
3464 encoder: &mut ___E,
3465 out: &mut ::core::mem::MaybeUninit<
3466 ::fidl_next::WireBox<
3467 'static,
3468 crate::wire::NodeGetExtendedAttributeRequest<'static>,
3469 >,
3470 >,
3471 _: (),
3472 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3473 if let Some(inner) = this {
3474 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3475 ::fidl_next::WireBox::encode_present(out);
3476 } else {
3477 ::fidl_next::WireBox::encode_absent(out);
3478 }
3479
3480 Ok(())
3481 }
3482 }
3483
3484 impl<'de> ::fidl_next::FromWire<crate::wire::NodeGetExtendedAttributeRequest<'de>>
3485 for NodeGetExtendedAttributeRequest
3486 {
3487 #[inline]
3488 fn from_wire(wire: crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
3489 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
3490 }
3491 }
3492
3493 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeGetExtendedAttributeRequest<'de>>
3494 for NodeGetExtendedAttributeRequest
3495 {
3496 #[inline]
3497 fn from_wire_ref(wire: &crate::wire::NodeGetExtendedAttributeRequest<'de>) -> Self {
3498 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
3499 }
3500 }
3501
3502 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3503 #[repr(u32)]
3504 pub enum SetExtendedAttributeMode {
3505 Set = 1,
3506 Create = 2,
3507 Replace = 3,
3508 }
3509 impl ::core::convert::TryFrom<u32> for SetExtendedAttributeMode {
3510 type Error = ::fidl_next::UnknownStrictEnumMemberError;
3511 fn try_from(
3512 value: u32,
3513 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
3514 match value {
3515 1 => Ok(Self::Set),
3516 2 => Ok(Self::Create),
3517 3 => Ok(Self::Replace),
3518
3519 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
3520 }
3521 }
3522 }
3523
3524 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
3525 for SetExtendedAttributeMode
3526 where
3527 ___E: ?Sized,
3528 {
3529 #[inline]
3530 fn encode(
3531 self,
3532 encoder: &mut ___E,
3533 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
3534 _: (),
3535 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3536 ::fidl_next::Encode::encode(&self, encoder, out, ())
3537 }
3538 }
3539
3540 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>
3541 for &'a SetExtendedAttributeMode
3542 where
3543 ___E: ?Sized,
3544 {
3545 #[inline]
3546 fn encode(
3547 self,
3548 encoder: &mut ___E,
3549 out: &mut ::core::mem::MaybeUninit<crate::wire::SetExtendedAttributeMode>,
3550 _: (),
3551 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3552 ::fidl_next::munge!(let crate::wire::SetExtendedAttributeMode { value } = out);
3553 let _ = value.write(::fidl_next::WireU32::from(match *self {
3554 SetExtendedAttributeMode::Set => 1,
3555
3556 SetExtendedAttributeMode::Create => 2,
3557
3558 SetExtendedAttributeMode::Replace => 3,
3559 }));
3560
3561 Ok(())
3562 }
3563 }
3564
3565 impl ::core::convert::From<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3566 fn from(wire: crate::wire::SetExtendedAttributeMode) -> Self {
3567 match u32::from(wire.value) {
3568 1 => Self::Set,
3569
3570 2 => Self::Create,
3571
3572 3 => Self::Replace,
3573
3574 _ => unsafe { ::core::hint::unreachable_unchecked() },
3575 }
3576 }
3577 }
3578
3579 impl ::fidl_next::FromWire<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3580 #[inline]
3581 fn from_wire(wire: crate::wire::SetExtendedAttributeMode) -> Self {
3582 Self::from(wire)
3583 }
3584 }
3585
3586 impl ::fidl_next::FromWireRef<crate::wire::SetExtendedAttributeMode> for SetExtendedAttributeMode {
3587 #[inline]
3588 fn from_wire_ref(wire: &crate::wire::SetExtendedAttributeMode) -> Self {
3589 Self::from(*wire)
3590 }
3591 }
3592
3593 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3594 #[repr(C)]
3595 pub struct NodeSetExtendedAttributeResponse {}
3596
3597 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeResponse, ___E>
3598 for NodeSetExtendedAttributeResponse
3599 where
3600 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3601 {
3602 #[inline]
3603 fn encode(
3604 self,
3605 encoder_: &mut ___E,
3606 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetExtendedAttributeResponse>,
3607 _: (),
3608 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3609 *out_ = ::core::mem::MaybeUninit::zeroed();
3610
3611 Ok(())
3612 }
3613 }
3614
3615 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeResponse, ___E>
3616 for &'a NodeSetExtendedAttributeResponse
3617 where
3618 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3619 {
3620 #[inline]
3621 fn encode(
3622 self,
3623 encoder_: &mut ___E,
3624 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetExtendedAttributeResponse>,
3625 _: (),
3626 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3627 ::fidl_next::munge! {
3628 let crate::wire::NodeSetExtendedAttributeResponse {
3629
3630 _empty,
3631
3632
3633 } = out_;
3634 }
3635
3636 Ok(())
3637 }
3638 }
3639
3640 unsafe impl<___E>
3641 ::fidl_next::EncodeOption<
3642 ::fidl_next::WireBox<'static, crate::wire::NodeSetExtendedAttributeResponse>,
3643 ___E,
3644 > for NodeSetExtendedAttributeResponse
3645 where
3646 ___E: ::fidl_next::Encoder + ?Sized,
3647 NodeSetExtendedAttributeResponse:
3648 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeResponse, ___E>,
3649 {
3650 #[inline]
3651 fn encode_option(
3652 this: ::core::option::Option<Self>,
3653 encoder: &mut ___E,
3654 out: &mut ::core::mem::MaybeUninit<
3655 ::fidl_next::WireBox<'static, crate::wire::NodeSetExtendedAttributeResponse>,
3656 >,
3657 _: (),
3658 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3659 if let Some(inner) = this {
3660 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3661 ::fidl_next::WireBox::encode_present(out);
3662 } else {
3663 ::fidl_next::WireBox::encode_absent(out);
3664 }
3665
3666 Ok(())
3667 }
3668 }
3669
3670 unsafe impl<'a, ___E>
3671 ::fidl_next::EncodeOption<
3672 ::fidl_next::WireBox<'static, crate::wire::NodeSetExtendedAttributeResponse>,
3673 ___E,
3674 > for &'a NodeSetExtendedAttributeResponse
3675 where
3676 ___E: ::fidl_next::Encoder + ?Sized,
3677 &'a NodeSetExtendedAttributeResponse:
3678 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeResponse, ___E>,
3679 {
3680 #[inline]
3681 fn encode_option(
3682 this: ::core::option::Option<Self>,
3683 encoder: &mut ___E,
3684 out: &mut ::core::mem::MaybeUninit<
3685 ::fidl_next::WireBox<'static, crate::wire::NodeSetExtendedAttributeResponse>,
3686 >,
3687 _: (),
3688 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3689 if let Some(inner) = this {
3690 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3691 ::fidl_next::WireBox::encode_present(out);
3692 } else {
3693 ::fidl_next::WireBox::encode_absent(out);
3694 }
3695
3696 Ok(())
3697 }
3698 }
3699
3700 impl ::fidl_next::FromWire<crate::wire::NodeSetExtendedAttributeResponse>
3701 for NodeSetExtendedAttributeResponse
3702 {
3703 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3704 crate::wire::NodeSetExtendedAttributeResponse,
3705 Self,
3706 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3707
3708 #[inline]
3709 fn from_wire(wire: crate::wire::NodeSetExtendedAttributeResponse) -> Self {
3710 Self {}
3711 }
3712 }
3713
3714 impl ::fidl_next::FromWireRef<crate::wire::NodeSetExtendedAttributeResponse>
3715 for NodeSetExtendedAttributeResponse
3716 {
3717 #[inline]
3718 fn from_wire_ref(wire: &crate::wire::NodeSetExtendedAttributeResponse) -> Self {
3719 Self {}
3720 }
3721 }
3722
3723 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3724 pub struct NodeRemoveExtendedAttributeRequest {
3725 pub name: ::std::vec::Vec<u8>,
3726 }
3727
3728 unsafe impl<___E>
3729 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3730 for NodeRemoveExtendedAttributeRequest
3731 where
3732 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3733 ___E: ::fidl_next::Encoder,
3734 {
3735 #[inline]
3736 fn encode(
3737 self,
3738 encoder_: &mut ___E,
3739 out_: &mut ::core::mem::MaybeUninit<
3740 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3741 >,
3742 _: (),
3743 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3744 ::fidl_next::munge! {
3745 let crate::wire::NodeRemoveExtendedAttributeRequest {
3746 name,
3747
3748 } = out_;
3749 }
3750
3751 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
3752
3753 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3754 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3755
3756 Ok(())
3757 }
3758 }
3759
3760 unsafe impl<'a, ___E>
3761 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
3762 for &'a NodeRemoveExtendedAttributeRequest
3763 where
3764 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3765 ___E: ::fidl_next::Encoder,
3766 {
3767 #[inline]
3768 fn encode(
3769 self,
3770 encoder_: &mut ___E,
3771 out_: &mut ::core::mem::MaybeUninit<
3772 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3773 >,
3774 _: (),
3775 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3776 ::fidl_next::munge! {
3777 let crate::wire::NodeRemoveExtendedAttributeRequest {
3778
3779 name,
3780
3781 } = out_;
3782 }
3783
3784 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
3785
3786 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
3787 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3788
3789 Ok(())
3790 }
3791 }
3792
3793 unsafe impl<___E>
3794 ::fidl_next::EncodeOption<
3795 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeRequest<'static>>,
3796 ___E,
3797 > for NodeRemoveExtendedAttributeRequest
3798 where
3799 ___E: ::fidl_next::Encoder + ?Sized,
3800 NodeRemoveExtendedAttributeRequest:
3801 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3802 {
3803 #[inline]
3804 fn encode_option(
3805 this: ::core::option::Option<Self>,
3806 encoder: &mut ___E,
3807 out: &mut ::core::mem::MaybeUninit<
3808 ::fidl_next::WireBox<
3809 'static,
3810 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3811 >,
3812 >,
3813 _: (),
3814 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3815 if let Some(inner) = this {
3816 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3817 ::fidl_next::WireBox::encode_present(out);
3818 } else {
3819 ::fidl_next::WireBox::encode_absent(out);
3820 }
3821
3822 Ok(())
3823 }
3824 }
3825
3826 unsafe impl<'a, ___E>
3827 ::fidl_next::EncodeOption<
3828 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeRequest<'static>>,
3829 ___E,
3830 > for &'a NodeRemoveExtendedAttributeRequest
3831 where
3832 ___E: ::fidl_next::Encoder + ?Sized,
3833 &'a NodeRemoveExtendedAttributeRequest:
3834 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>,
3835 {
3836 #[inline]
3837 fn encode_option(
3838 this: ::core::option::Option<Self>,
3839 encoder: &mut ___E,
3840 out: &mut ::core::mem::MaybeUninit<
3841 ::fidl_next::WireBox<
3842 'static,
3843 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
3844 >,
3845 >,
3846 _: (),
3847 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3848 if let Some(inner) = this {
3849 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3850 ::fidl_next::WireBox::encode_present(out);
3851 } else {
3852 ::fidl_next::WireBox::encode_absent(out);
3853 }
3854
3855 Ok(())
3856 }
3857 }
3858
3859 impl<'de> ::fidl_next::FromWire<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3860 for NodeRemoveExtendedAttributeRequest
3861 {
3862 #[inline]
3863 fn from_wire(wire: crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3864 Self { name: ::fidl_next::FromWire::from_wire(wire.name) }
3865 }
3866 }
3867
3868 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeRemoveExtendedAttributeRequest<'de>>
3869 for NodeRemoveExtendedAttributeRequest
3870 {
3871 #[inline]
3872 fn from_wire_ref(wire: &crate::wire::NodeRemoveExtendedAttributeRequest<'de>) -> Self {
3873 Self { name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name) }
3874 }
3875 }
3876
3877 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3878 #[repr(C)]
3879 pub struct NodeRemoveExtendedAttributeResponse {}
3880
3881 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeResponse, ___E>
3882 for NodeRemoveExtendedAttributeResponse
3883 where
3884 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3885 {
3886 #[inline]
3887 fn encode(
3888 self,
3889 encoder_: &mut ___E,
3890 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeRemoveExtendedAttributeResponse>,
3891 _: (),
3892 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3893 *out_ = ::core::mem::MaybeUninit::zeroed();
3894
3895 Ok(())
3896 }
3897 }
3898
3899 unsafe impl<'a, ___E>
3900 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeResponse, ___E>
3901 for &'a NodeRemoveExtendedAttributeResponse
3902 where
3903 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3904 {
3905 #[inline]
3906 fn encode(
3907 self,
3908 encoder_: &mut ___E,
3909 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeRemoveExtendedAttributeResponse>,
3910 _: (),
3911 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3912 ::fidl_next::munge! {
3913 let crate::wire::NodeRemoveExtendedAttributeResponse {
3914
3915 _empty,
3916
3917
3918 } = out_;
3919 }
3920
3921 Ok(())
3922 }
3923 }
3924
3925 unsafe impl<___E>
3926 ::fidl_next::EncodeOption<
3927 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeResponse>,
3928 ___E,
3929 > for NodeRemoveExtendedAttributeResponse
3930 where
3931 ___E: ::fidl_next::Encoder + ?Sized,
3932 NodeRemoveExtendedAttributeResponse:
3933 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeResponse, ___E>,
3934 {
3935 #[inline]
3936 fn encode_option(
3937 this: ::core::option::Option<Self>,
3938 encoder: &mut ___E,
3939 out: &mut ::core::mem::MaybeUninit<
3940 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeResponse>,
3941 >,
3942 _: (),
3943 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3944 if let Some(inner) = this {
3945 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3946 ::fidl_next::WireBox::encode_present(out);
3947 } else {
3948 ::fidl_next::WireBox::encode_absent(out);
3949 }
3950
3951 Ok(())
3952 }
3953 }
3954
3955 unsafe impl<'a, ___E>
3956 ::fidl_next::EncodeOption<
3957 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeResponse>,
3958 ___E,
3959 > for &'a NodeRemoveExtendedAttributeResponse
3960 where
3961 ___E: ::fidl_next::Encoder + ?Sized,
3962 &'a NodeRemoveExtendedAttributeResponse:
3963 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeResponse, ___E>,
3964 {
3965 #[inline]
3966 fn encode_option(
3967 this: ::core::option::Option<Self>,
3968 encoder: &mut ___E,
3969 out: &mut ::core::mem::MaybeUninit<
3970 ::fidl_next::WireBox<'static, crate::wire::NodeRemoveExtendedAttributeResponse>,
3971 >,
3972 _: (),
3973 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3974 if let Some(inner) = this {
3975 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
3976 ::fidl_next::WireBox::encode_present(out);
3977 } else {
3978 ::fidl_next::WireBox::encode_absent(out);
3979 }
3980
3981 Ok(())
3982 }
3983 }
3984
3985 impl ::fidl_next::FromWire<crate::wire::NodeRemoveExtendedAttributeResponse>
3986 for NodeRemoveExtendedAttributeResponse
3987 {
3988 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3989 crate::wire::NodeRemoveExtendedAttributeResponse,
3990 Self,
3991 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
3992
3993 #[inline]
3994 fn from_wire(wire: crate::wire::NodeRemoveExtendedAttributeResponse) -> Self {
3995 Self {}
3996 }
3997 }
3998
3999 impl ::fidl_next::FromWireRef<crate::wire::NodeRemoveExtendedAttributeResponse>
4000 for NodeRemoveExtendedAttributeResponse
4001 {
4002 #[inline]
4003 fn from_wire_ref(wire: &crate::wire::NodeRemoveExtendedAttributeResponse) -> Self {
4004 Self {}
4005 }
4006 }
4007
4008 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4009 #[repr(C)]
4010 pub struct DirectoryCreateSymlinkResponse {}
4011
4012 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkResponse, ___E>
4013 for DirectoryCreateSymlinkResponse
4014 where
4015 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4016 {
4017 #[inline]
4018 fn encode(
4019 self,
4020 encoder_: &mut ___E,
4021 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryCreateSymlinkResponse>,
4022 _: (),
4023 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4024 *out_ = ::core::mem::MaybeUninit::zeroed();
4025
4026 Ok(())
4027 }
4028 }
4029
4030 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkResponse, ___E>
4031 for &'a DirectoryCreateSymlinkResponse
4032 where
4033 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4034 {
4035 #[inline]
4036 fn encode(
4037 self,
4038 encoder_: &mut ___E,
4039 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryCreateSymlinkResponse>,
4040 _: (),
4041 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4042 ::fidl_next::munge! {
4043 let crate::wire::DirectoryCreateSymlinkResponse {
4044
4045 _empty,
4046
4047
4048 } = out_;
4049 }
4050
4051 Ok(())
4052 }
4053 }
4054
4055 unsafe impl<___E>
4056 ::fidl_next::EncodeOption<
4057 ::fidl_next::WireBox<'static, crate::wire::DirectoryCreateSymlinkResponse>,
4058 ___E,
4059 > for DirectoryCreateSymlinkResponse
4060 where
4061 ___E: ::fidl_next::Encoder + ?Sized,
4062 DirectoryCreateSymlinkResponse:
4063 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkResponse, ___E>,
4064 {
4065 #[inline]
4066 fn encode_option(
4067 this: ::core::option::Option<Self>,
4068 encoder: &mut ___E,
4069 out: &mut ::core::mem::MaybeUninit<
4070 ::fidl_next::WireBox<'static, crate::wire::DirectoryCreateSymlinkResponse>,
4071 >,
4072 _: (),
4073 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4074 if let Some(inner) = this {
4075 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4076 ::fidl_next::WireBox::encode_present(out);
4077 } else {
4078 ::fidl_next::WireBox::encode_absent(out);
4079 }
4080
4081 Ok(())
4082 }
4083 }
4084
4085 unsafe impl<'a, ___E>
4086 ::fidl_next::EncodeOption<
4087 ::fidl_next::WireBox<'static, crate::wire::DirectoryCreateSymlinkResponse>,
4088 ___E,
4089 > for &'a DirectoryCreateSymlinkResponse
4090 where
4091 ___E: ::fidl_next::Encoder + ?Sized,
4092 &'a DirectoryCreateSymlinkResponse:
4093 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkResponse, ___E>,
4094 {
4095 #[inline]
4096 fn encode_option(
4097 this: ::core::option::Option<Self>,
4098 encoder: &mut ___E,
4099 out: &mut ::core::mem::MaybeUninit<
4100 ::fidl_next::WireBox<'static, crate::wire::DirectoryCreateSymlinkResponse>,
4101 >,
4102 _: (),
4103 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4104 if let Some(inner) = this {
4105 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4106 ::fidl_next::WireBox::encode_present(out);
4107 } else {
4108 ::fidl_next::WireBox::encode_absent(out);
4109 }
4110
4111 Ok(())
4112 }
4113 }
4114
4115 impl ::fidl_next::FromWire<crate::wire::DirectoryCreateSymlinkResponse>
4116 for DirectoryCreateSymlinkResponse
4117 {
4118 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4119 crate::wire::DirectoryCreateSymlinkResponse,
4120 Self,
4121 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
4122
4123 #[inline]
4124 fn from_wire(wire: crate::wire::DirectoryCreateSymlinkResponse) -> Self {
4125 Self {}
4126 }
4127 }
4128
4129 impl ::fidl_next::FromWireRef<crate::wire::DirectoryCreateSymlinkResponse>
4130 for DirectoryCreateSymlinkResponse
4131 {
4132 #[inline]
4133 fn from_wire_ref(wire: &crate::wire::DirectoryCreateSymlinkResponse) -> Self {
4134 Self {}
4135 }
4136 }
4137
4138 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4139 #[repr(C)]
4140 pub struct NodeSetFlagsResponse {}
4141
4142 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsResponse, ___E>
4143 for NodeSetFlagsResponse
4144 where
4145 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4146 {
4147 #[inline]
4148 fn encode(
4149 self,
4150 encoder_: &mut ___E,
4151 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsResponse>,
4152 _: (),
4153 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4154 *out_ = ::core::mem::MaybeUninit::zeroed();
4155
4156 Ok(())
4157 }
4158 }
4159
4160 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsResponse, ___E>
4161 for &'a NodeSetFlagsResponse
4162 where
4163 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4164 {
4165 #[inline]
4166 fn encode(
4167 self,
4168 encoder_: &mut ___E,
4169 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsResponse>,
4170 _: (),
4171 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4172 ::fidl_next::munge! {
4173 let crate::wire::NodeSetFlagsResponse {
4174
4175 _empty,
4176
4177
4178 } = out_;
4179 }
4180
4181 Ok(())
4182 }
4183 }
4184
4185 unsafe impl<___E>
4186 ::fidl_next::EncodeOption<
4187 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsResponse>,
4188 ___E,
4189 > for NodeSetFlagsResponse
4190 where
4191 ___E: ::fidl_next::Encoder + ?Sized,
4192 NodeSetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeSetFlagsResponse, ___E>,
4193 {
4194 #[inline]
4195 fn encode_option(
4196 this: ::core::option::Option<Self>,
4197 encoder: &mut ___E,
4198 out: &mut ::core::mem::MaybeUninit<
4199 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsResponse>,
4200 >,
4201 _: (),
4202 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4203 if let Some(inner) = this {
4204 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4205 ::fidl_next::WireBox::encode_present(out);
4206 } else {
4207 ::fidl_next::WireBox::encode_absent(out);
4208 }
4209
4210 Ok(())
4211 }
4212 }
4213
4214 unsafe impl<'a, ___E>
4215 ::fidl_next::EncodeOption<
4216 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsResponse>,
4217 ___E,
4218 > for &'a NodeSetFlagsResponse
4219 where
4220 ___E: ::fidl_next::Encoder + ?Sized,
4221 &'a NodeSetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeSetFlagsResponse, ___E>,
4222 {
4223 #[inline]
4224 fn encode_option(
4225 this: ::core::option::Option<Self>,
4226 encoder: &mut ___E,
4227 out: &mut ::core::mem::MaybeUninit<
4228 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsResponse>,
4229 >,
4230 _: (),
4231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4232 if let Some(inner) = this {
4233 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4234 ::fidl_next::WireBox::encode_present(out);
4235 } else {
4236 ::fidl_next::WireBox::encode_absent(out);
4237 }
4238
4239 Ok(())
4240 }
4241 }
4242
4243 impl ::fidl_next::FromWire<crate::wire::NodeSetFlagsResponse> for NodeSetFlagsResponse {
4244 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4245 crate::wire::NodeSetFlagsResponse,
4246 Self,
4247 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
4248
4249 #[inline]
4250 fn from_wire(wire: crate::wire::NodeSetFlagsResponse) -> Self {
4251 Self {}
4252 }
4253 }
4254
4255 impl ::fidl_next::FromWireRef<crate::wire::NodeSetFlagsResponse> for NodeSetFlagsResponse {
4256 #[inline]
4257 fn from_wire_ref(wire: &crate::wire::NodeSetFlagsResponse) -> Self {
4258 Self {}
4259 }
4260 }
4261
4262 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4263 pub struct NodeDeprecatedGetAttrResponse {
4264 pub s: i32,
4265
4266 pub attributes: crate::natural::NodeAttributes,
4267 }
4268
4269 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
4270 for NodeDeprecatedGetAttrResponse
4271 where
4272 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4273 {
4274 #[inline]
4275 fn encode(
4276 self,
4277 encoder_: &mut ___E,
4278 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
4279 _: (),
4280 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4281 ::fidl_next::munge! {
4282 let crate::wire::NodeDeprecatedGetAttrResponse {
4283 s,
4284 attributes,
4285
4286 } = out_;
4287 }
4288
4289 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4290
4291 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4292
4293 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
4294
4295 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
4296
4297 Ok(())
4298 }
4299 }
4300
4301 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
4302 for &'a NodeDeprecatedGetAttrResponse
4303 where
4304 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4305 {
4306 #[inline]
4307 fn encode(
4308 self,
4309 encoder_: &mut ___E,
4310 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
4311 _: (),
4312 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4313 ::fidl_next::munge! {
4314 let crate::wire::NodeDeprecatedGetAttrResponse {
4315
4316 s,
4317 attributes,
4318
4319 } = out_;
4320 }
4321
4322 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4323
4324 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4325
4326 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
4327
4328 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
4329
4330 Ok(())
4331 }
4332 }
4333
4334 unsafe impl<___E>
4335 ::fidl_next::EncodeOption<
4336 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
4337 ___E,
4338 > for NodeDeprecatedGetAttrResponse
4339 where
4340 ___E: ::fidl_next::Encoder + ?Sized,
4341 NodeDeprecatedGetAttrResponse:
4342 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
4343 {
4344 #[inline]
4345 fn encode_option(
4346 this: ::core::option::Option<Self>,
4347 encoder: &mut ___E,
4348 out: &mut ::core::mem::MaybeUninit<
4349 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
4350 >,
4351 _: (),
4352 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4353 if let Some(inner) = this {
4354 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4355 ::fidl_next::WireBox::encode_present(out);
4356 } else {
4357 ::fidl_next::WireBox::encode_absent(out);
4358 }
4359
4360 Ok(())
4361 }
4362 }
4363
4364 unsafe impl<'a, ___E>
4365 ::fidl_next::EncodeOption<
4366 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
4367 ___E,
4368 > for &'a NodeDeprecatedGetAttrResponse
4369 where
4370 ___E: ::fidl_next::Encoder + ?Sized,
4371 &'a NodeDeprecatedGetAttrResponse:
4372 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>,
4373 {
4374 #[inline]
4375 fn encode_option(
4376 this: ::core::option::Option<Self>,
4377 encoder: &mut ___E,
4378 out: &mut ::core::mem::MaybeUninit<
4379 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetAttrResponse>,
4380 >,
4381 _: (),
4382 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4383 if let Some(inner) = this {
4384 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4385 ::fidl_next::WireBox::encode_present(out);
4386 } else {
4387 ::fidl_next::WireBox::encode_absent(out);
4388 }
4389
4390 Ok(())
4391 }
4392 }
4393
4394 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetAttrResponse>
4395 for NodeDeprecatedGetAttrResponse
4396 {
4397 #[inline]
4398 fn from_wire(wire: crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
4399 Self {
4400 s: ::fidl_next::FromWire::from_wire(wire.s),
4401
4402 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
4403 }
4404 }
4405 }
4406
4407 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetAttrResponse>
4408 for NodeDeprecatedGetAttrResponse
4409 {
4410 #[inline]
4411 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetAttrResponse) -> Self {
4412 Self {
4413 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
4414
4415 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
4416 }
4417 }
4418 }
4419
4420 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4421 pub struct NodeDeprecatedSetAttrRequest {
4422 pub flags: crate::natural::NodeAttributeFlags,
4423
4424 pub attributes: crate::natural::NodeAttributes,
4425 }
4426
4427 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
4428 for NodeDeprecatedSetAttrRequest
4429 where
4430 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4431 {
4432 #[inline]
4433 fn encode(
4434 self,
4435 encoder_: &mut ___E,
4436 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
4437 _: (),
4438 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4439 ::fidl_next::munge! {
4440 let crate::wire::NodeDeprecatedSetAttrRequest {
4441 flags,
4442 attributes,
4443
4444 } = out_;
4445 }
4446
4447 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4448
4449 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4450
4451 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
4452
4453 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
4454
4455 Ok(())
4456 }
4457 }
4458
4459 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
4460 for &'a NodeDeprecatedSetAttrRequest
4461 where
4462 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4463 {
4464 #[inline]
4465 fn encode(
4466 self,
4467 encoder_: &mut ___E,
4468 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
4469 _: (),
4470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4471 ::fidl_next::munge! {
4472 let crate::wire::NodeDeprecatedSetAttrRequest {
4473
4474 flags,
4475 attributes,
4476
4477 } = out_;
4478 }
4479
4480 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4481
4482 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4483
4484 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, ())?;
4485
4486 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
4487
4488 Ok(())
4489 }
4490 }
4491
4492 unsafe impl<___E>
4493 ::fidl_next::EncodeOption<
4494 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
4495 ___E,
4496 > for NodeDeprecatedSetAttrRequest
4497 where
4498 ___E: ::fidl_next::Encoder + ?Sized,
4499 NodeDeprecatedSetAttrRequest:
4500 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
4501 {
4502 #[inline]
4503 fn encode_option(
4504 this: ::core::option::Option<Self>,
4505 encoder: &mut ___E,
4506 out: &mut ::core::mem::MaybeUninit<
4507 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
4508 >,
4509 _: (),
4510 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4511 if let Some(inner) = this {
4512 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4513 ::fidl_next::WireBox::encode_present(out);
4514 } else {
4515 ::fidl_next::WireBox::encode_absent(out);
4516 }
4517
4518 Ok(())
4519 }
4520 }
4521
4522 unsafe impl<'a, ___E>
4523 ::fidl_next::EncodeOption<
4524 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
4525 ___E,
4526 > for &'a NodeDeprecatedSetAttrRequest
4527 where
4528 ___E: ::fidl_next::Encoder + ?Sized,
4529 &'a NodeDeprecatedSetAttrRequest:
4530 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>,
4531 {
4532 #[inline]
4533 fn encode_option(
4534 this: ::core::option::Option<Self>,
4535 encoder: &mut ___E,
4536 out: &mut ::core::mem::MaybeUninit<
4537 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrRequest>,
4538 >,
4539 _: (),
4540 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4541 if let Some(inner) = this {
4542 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4543 ::fidl_next::WireBox::encode_present(out);
4544 } else {
4545 ::fidl_next::WireBox::encode_absent(out);
4546 }
4547
4548 Ok(())
4549 }
4550 }
4551
4552 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrRequest>
4553 for NodeDeprecatedSetAttrRequest
4554 {
4555 #[inline]
4556 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
4557 Self {
4558 flags: ::fidl_next::FromWire::from_wire(wire.flags),
4559
4560 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
4561 }
4562 }
4563 }
4564
4565 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrRequest>
4566 for NodeDeprecatedSetAttrRequest
4567 {
4568 #[inline]
4569 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrRequest) -> Self {
4570 Self {
4571 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
4572
4573 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
4574 }
4575 }
4576 }
4577
4578 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4579 #[repr(C)]
4580 pub struct NodeDeprecatedSetAttrResponse {
4581 pub s: i32,
4582 }
4583
4584 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
4585 for NodeDeprecatedSetAttrResponse
4586 where
4587 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4588 {
4589 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4590 Self,
4591 crate::wire::NodeDeprecatedSetAttrResponse,
4592 > = unsafe {
4593 ::fidl_next::CopyOptimization::enable_if(
4594 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
4595 .is_enabled(),
4596 )
4597 };
4598
4599 #[inline]
4600 fn encode(
4601 self,
4602 encoder_: &mut ___E,
4603 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
4604 _: (),
4605 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4606 ::fidl_next::munge! {
4607 let crate::wire::NodeDeprecatedSetAttrResponse {
4608 s,
4609
4610 } = out_;
4611 }
4612
4613 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4614
4615 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4616
4617 Ok(())
4618 }
4619 }
4620
4621 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
4622 for &'a NodeDeprecatedSetAttrResponse
4623 where
4624 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4625 {
4626 #[inline]
4627 fn encode(
4628 self,
4629 encoder_: &mut ___E,
4630 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
4631 _: (),
4632 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4633 ::fidl_next::munge! {
4634 let crate::wire::NodeDeprecatedSetAttrResponse {
4635
4636 s,
4637
4638 } = out_;
4639 }
4640
4641 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4642
4643 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4644
4645 Ok(())
4646 }
4647 }
4648
4649 unsafe impl<___E>
4650 ::fidl_next::EncodeOption<
4651 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
4652 ___E,
4653 > for NodeDeprecatedSetAttrResponse
4654 where
4655 ___E: ::fidl_next::Encoder + ?Sized,
4656 NodeDeprecatedSetAttrResponse:
4657 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
4658 {
4659 #[inline]
4660 fn encode_option(
4661 this: ::core::option::Option<Self>,
4662 encoder: &mut ___E,
4663 out: &mut ::core::mem::MaybeUninit<
4664 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
4665 >,
4666 _: (),
4667 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4668 if let Some(inner) = this {
4669 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4670 ::fidl_next::WireBox::encode_present(out);
4671 } else {
4672 ::fidl_next::WireBox::encode_absent(out);
4673 }
4674
4675 Ok(())
4676 }
4677 }
4678
4679 unsafe impl<'a, ___E>
4680 ::fidl_next::EncodeOption<
4681 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
4682 ___E,
4683 > for &'a NodeDeprecatedSetAttrResponse
4684 where
4685 ___E: ::fidl_next::Encoder + ?Sized,
4686 &'a NodeDeprecatedSetAttrResponse:
4687 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>,
4688 {
4689 #[inline]
4690 fn encode_option(
4691 this: ::core::option::Option<Self>,
4692 encoder: &mut ___E,
4693 out: &mut ::core::mem::MaybeUninit<
4694 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetAttrResponse>,
4695 >,
4696 _: (),
4697 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4698 if let Some(inner) = this {
4699 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4700 ::fidl_next::WireBox::encode_present(out);
4701 } else {
4702 ::fidl_next::WireBox::encode_absent(out);
4703 }
4704
4705 Ok(())
4706 }
4707 }
4708
4709 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetAttrResponse>
4710 for NodeDeprecatedSetAttrResponse
4711 {
4712 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4713 crate::wire::NodeDeprecatedSetAttrResponse,
4714 Self,
4715 > = unsafe {
4716 ::fidl_next::CopyOptimization::enable_if(
4717 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
4718 .is_enabled(),
4719 )
4720 };
4721
4722 #[inline]
4723 fn from_wire(wire: crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
4724 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
4725 }
4726 }
4727
4728 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetAttrResponse>
4729 for NodeDeprecatedSetAttrResponse
4730 {
4731 #[inline]
4732 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetAttrResponse) -> Self {
4733 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
4734 }
4735 }
4736
4737 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4738 #[repr(C)]
4739 pub struct NodeDeprecatedGetFlagsResponse {
4740 pub s: i32,
4741
4742 pub flags: crate::natural::OpenFlags,
4743 }
4744
4745 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
4746 for NodeDeprecatedGetFlagsResponse
4747 where
4748 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4749 {
4750 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4751 Self,
4752 crate::wire::NodeDeprecatedGetFlagsResponse,
4753 > = unsafe {
4754 ::fidl_next::CopyOptimization::enable_if(
4755 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
4756 .is_enabled()
4757 && <crate::natural::OpenFlags as ::fidl_next::Encode<
4758 crate::wire::OpenFlags,
4759 ___E,
4760 >>::COPY_OPTIMIZATION
4761 .is_enabled(),
4762 )
4763 };
4764
4765 #[inline]
4766 fn encode(
4767 self,
4768 encoder_: &mut ___E,
4769 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
4770 _: (),
4771 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4772 ::fidl_next::munge! {
4773 let crate::wire::NodeDeprecatedGetFlagsResponse {
4774 s,
4775 flags,
4776
4777 } = out_;
4778 }
4779
4780 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4781
4782 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4783
4784 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4785
4786 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4787
4788 Ok(())
4789 }
4790 }
4791
4792 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
4793 for &'a NodeDeprecatedGetFlagsResponse
4794 where
4795 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4796 {
4797 #[inline]
4798 fn encode(
4799 self,
4800 encoder_: &mut ___E,
4801 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
4802 _: (),
4803 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4804 ::fidl_next::munge! {
4805 let crate::wire::NodeDeprecatedGetFlagsResponse {
4806
4807 s,
4808 flags,
4809
4810 } = out_;
4811 }
4812
4813 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
4814
4815 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
4816
4817 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4818
4819 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4820
4821 Ok(())
4822 }
4823 }
4824
4825 unsafe impl<___E>
4826 ::fidl_next::EncodeOption<
4827 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
4828 ___E,
4829 > for NodeDeprecatedGetFlagsResponse
4830 where
4831 ___E: ::fidl_next::Encoder + ?Sized,
4832 NodeDeprecatedGetFlagsResponse:
4833 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
4834 {
4835 #[inline]
4836 fn encode_option(
4837 this: ::core::option::Option<Self>,
4838 encoder: &mut ___E,
4839 out: &mut ::core::mem::MaybeUninit<
4840 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
4841 >,
4842 _: (),
4843 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4844 if let Some(inner) = this {
4845 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4846 ::fidl_next::WireBox::encode_present(out);
4847 } else {
4848 ::fidl_next::WireBox::encode_absent(out);
4849 }
4850
4851 Ok(())
4852 }
4853 }
4854
4855 unsafe impl<'a, ___E>
4856 ::fidl_next::EncodeOption<
4857 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
4858 ___E,
4859 > for &'a NodeDeprecatedGetFlagsResponse
4860 where
4861 ___E: ::fidl_next::Encoder + ?Sized,
4862 &'a NodeDeprecatedGetFlagsResponse:
4863 ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>,
4864 {
4865 #[inline]
4866 fn encode_option(
4867 this: ::core::option::Option<Self>,
4868 encoder: &mut ___E,
4869 out: &mut ::core::mem::MaybeUninit<
4870 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedGetFlagsResponse>,
4871 >,
4872 _: (),
4873 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4874 if let Some(inner) = this {
4875 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
4876 ::fidl_next::WireBox::encode_present(out);
4877 } else {
4878 ::fidl_next::WireBox::encode_absent(out);
4879 }
4880
4881 Ok(())
4882 }
4883 }
4884
4885 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedGetFlagsResponse>
4886 for NodeDeprecatedGetFlagsResponse
4887 {
4888 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4889 crate::wire::NodeDeprecatedGetFlagsResponse,
4890 Self,
4891 > = unsafe {
4892 ::fidl_next::CopyOptimization::enable_if(
4893 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
4894 .is_enabled()
4895 && <crate::natural::OpenFlags as ::fidl_next::FromWire<
4896 crate::wire::OpenFlags,
4897 >>::COPY_OPTIMIZATION
4898 .is_enabled(),
4899 )
4900 };
4901
4902 #[inline]
4903 fn from_wire(wire: crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
4904 Self {
4905 s: ::fidl_next::FromWire::from_wire(wire.s),
4906
4907 flags: ::fidl_next::FromWire::from_wire(wire.flags),
4908 }
4909 }
4910 }
4911
4912 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedGetFlagsResponse>
4913 for NodeDeprecatedGetFlagsResponse
4914 {
4915 #[inline]
4916 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedGetFlagsResponse) -> Self {
4917 Self {
4918 s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s),
4919
4920 flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags),
4921 }
4922 }
4923 }
4924
4925 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4926 #[repr(C)]
4927 pub struct NodeDeprecatedSetFlagsRequest {
4928 pub flags: crate::natural::OpenFlags,
4929 }
4930
4931 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
4932 for NodeDeprecatedSetFlagsRequest
4933 where
4934 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4935 {
4936 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4937 Self,
4938 crate::wire::NodeDeprecatedSetFlagsRequest,
4939 > = unsafe {
4940 ::fidl_next::CopyOptimization::enable_if(
4941 true && <crate::natural::OpenFlags as ::fidl_next::Encode<
4942 crate::wire::OpenFlags,
4943 ___E,
4944 >>::COPY_OPTIMIZATION
4945 .is_enabled(),
4946 )
4947 };
4948
4949 #[inline]
4950 fn encode(
4951 self,
4952 encoder_: &mut ___E,
4953 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
4954 _: (),
4955 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4956 ::fidl_next::munge! {
4957 let crate::wire::NodeDeprecatedSetFlagsRequest {
4958 flags,
4959
4960 } = out_;
4961 }
4962
4963 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
4964
4965 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4966
4967 Ok(())
4968 }
4969 }
4970
4971 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
4972 for &'a NodeDeprecatedSetFlagsRequest
4973 where
4974 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4975 {
4976 #[inline]
4977 fn encode(
4978 self,
4979 encoder_: &mut ___E,
4980 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
4981 _: (),
4982 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4983 ::fidl_next::munge! {
4984 let crate::wire::NodeDeprecatedSetFlagsRequest {
4985
4986 flags,
4987
4988 } = out_;
4989 }
4990
4991 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
4992
4993 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
4994
4995 Ok(())
4996 }
4997 }
4998
4999 unsafe impl<___E>
5000 ::fidl_next::EncodeOption<
5001 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
5002 ___E,
5003 > for NodeDeprecatedSetFlagsRequest
5004 where
5005 ___E: ::fidl_next::Encoder + ?Sized,
5006 NodeDeprecatedSetFlagsRequest:
5007 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
5008 {
5009 #[inline]
5010 fn encode_option(
5011 this: ::core::option::Option<Self>,
5012 encoder: &mut ___E,
5013 out: &mut ::core::mem::MaybeUninit<
5014 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
5015 >,
5016 _: (),
5017 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5018 if let Some(inner) = this {
5019 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5020 ::fidl_next::WireBox::encode_present(out);
5021 } else {
5022 ::fidl_next::WireBox::encode_absent(out);
5023 }
5024
5025 Ok(())
5026 }
5027 }
5028
5029 unsafe impl<'a, ___E>
5030 ::fidl_next::EncodeOption<
5031 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
5032 ___E,
5033 > for &'a NodeDeprecatedSetFlagsRequest
5034 where
5035 ___E: ::fidl_next::Encoder + ?Sized,
5036 &'a NodeDeprecatedSetFlagsRequest:
5037 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>,
5038 {
5039 #[inline]
5040 fn encode_option(
5041 this: ::core::option::Option<Self>,
5042 encoder: &mut ___E,
5043 out: &mut ::core::mem::MaybeUninit<
5044 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsRequest>,
5045 >,
5046 _: (),
5047 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5048 if let Some(inner) = this {
5049 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5050 ::fidl_next::WireBox::encode_present(out);
5051 } else {
5052 ::fidl_next::WireBox::encode_absent(out);
5053 }
5054
5055 Ok(())
5056 }
5057 }
5058
5059 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsRequest>
5060 for NodeDeprecatedSetFlagsRequest
5061 {
5062 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5063 crate::wire::NodeDeprecatedSetFlagsRequest,
5064 Self,
5065 > = unsafe {
5066 ::fidl_next::CopyOptimization::enable_if(
5067 true && <crate::natural::OpenFlags as ::fidl_next::FromWire<
5068 crate::wire::OpenFlags,
5069 >>::COPY_OPTIMIZATION
5070 .is_enabled(),
5071 )
5072 };
5073
5074 #[inline]
5075 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
5076 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
5077 }
5078 }
5079
5080 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsRequest>
5081 for NodeDeprecatedSetFlagsRequest
5082 {
5083 #[inline]
5084 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsRequest) -> Self {
5085 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
5086 }
5087 }
5088
5089 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5090 #[repr(C)]
5091 pub struct NodeDeprecatedSetFlagsResponse {
5092 pub s: i32,
5093 }
5094
5095 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
5096 for NodeDeprecatedSetFlagsResponse
5097 where
5098 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5099 {
5100 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5101 Self,
5102 crate::wire::NodeDeprecatedSetFlagsResponse,
5103 > = unsafe {
5104 ::fidl_next::CopyOptimization::enable_if(
5105 true && <i32 as ::fidl_next::Encode<::fidl_next::WireI32, ___E>>::COPY_OPTIMIZATION
5106 .is_enabled(),
5107 )
5108 };
5109
5110 #[inline]
5111 fn encode(
5112 self,
5113 encoder_: &mut ___E,
5114 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
5115 _: (),
5116 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5117 ::fidl_next::munge! {
5118 let crate::wire::NodeDeprecatedSetFlagsResponse {
5119 s,
5120
5121 } = out_;
5122 }
5123
5124 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5125
5126 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
5127
5128 Ok(())
5129 }
5130 }
5131
5132 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
5133 for &'a NodeDeprecatedSetFlagsResponse
5134 where
5135 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5136 {
5137 #[inline]
5138 fn encode(
5139 self,
5140 encoder_: &mut ___E,
5141 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
5142 _: (),
5143 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5144 ::fidl_next::munge! {
5145 let crate::wire::NodeDeprecatedSetFlagsResponse {
5146
5147 s,
5148
5149 } = out_;
5150 }
5151
5152 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
5153
5154 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
5155
5156 Ok(())
5157 }
5158 }
5159
5160 unsafe impl<___E>
5161 ::fidl_next::EncodeOption<
5162 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
5163 ___E,
5164 > for NodeDeprecatedSetFlagsResponse
5165 where
5166 ___E: ::fidl_next::Encoder + ?Sized,
5167 NodeDeprecatedSetFlagsResponse:
5168 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
5169 {
5170 #[inline]
5171 fn encode_option(
5172 this: ::core::option::Option<Self>,
5173 encoder: &mut ___E,
5174 out: &mut ::core::mem::MaybeUninit<
5175 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
5176 >,
5177 _: (),
5178 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5179 if let Some(inner) = this {
5180 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5181 ::fidl_next::WireBox::encode_present(out);
5182 } else {
5183 ::fidl_next::WireBox::encode_absent(out);
5184 }
5185
5186 Ok(())
5187 }
5188 }
5189
5190 unsafe impl<'a, ___E>
5191 ::fidl_next::EncodeOption<
5192 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
5193 ___E,
5194 > for &'a NodeDeprecatedSetFlagsResponse
5195 where
5196 ___E: ::fidl_next::Encoder + ?Sized,
5197 &'a NodeDeprecatedSetFlagsResponse:
5198 ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>,
5199 {
5200 #[inline]
5201 fn encode_option(
5202 this: ::core::option::Option<Self>,
5203 encoder: &mut ___E,
5204 out: &mut ::core::mem::MaybeUninit<
5205 ::fidl_next::WireBox<'static, crate::wire::NodeDeprecatedSetFlagsResponse>,
5206 >,
5207 _: (),
5208 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5209 if let Some(inner) = this {
5210 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5211 ::fidl_next::WireBox::encode_present(out);
5212 } else {
5213 ::fidl_next::WireBox::encode_absent(out);
5214 }
5215
5216 Ok(())
5217 }
5218 }
5219
5220 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedSetFlagsResponse>
5221 for NodeDeprecatedSetFlagsResponse
5222 {
5223 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5224 crate::wire::NodeDeprecatedSetFlagsResponse,
5225 Self,
5226 > = unsafe {
5227 ::fidl_next::CopyOptimization::enable_if(
5228 true && <i32 as ::fidl_next::FromWire<::fidl_next::WireI32>>::COPY_OPTIMIZATION
5229 .is_enabled(),
5230 )
5231 };
5232
5233 #[inline]
5234 fn from_wire(wire: crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
5235 Self { s: ::fidl_next::FromWire::from_wire(wire.s) }
5236 }
5237 }
5238
5239 impl ::fidl_next::FromWireRef<crate::wire::NodeDeprecatedSetFlagsResponse>
5240 for NodeDeprecatedSetFlagsResponse
5241 {
5242 #[inline]
5243 fn from_wire_ref(wire: &crate::wire::NodeDeprecatedSetFlagsResponse) -> Self {
5244 Self { s: ::fidl_next::FromWireRef::from_wire_ref(&wire.s) }
5245 }
5246 }
5247
5248 ::fidl_next::bitflags::bitflags! {
5249 #[doc = " Flags used to specify how a node should be opened. Note that ranges of bits are reserved\n for specific use cases:\n * Bits 1-16: Permission flags `PERM_*` (e.g. [`Flags.PERM_READ_BYTES`]).\n * Bits 17-32: POSIX compatibile `O_*` flags (e.g. [`Flags.FILE_TRUNCATE`] or `O_TRUNC`).\n * Bits 33-64: Fuchsia-specific flags.\n"]#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct Flags: u64 {
5250 #[doc = " Allows opening child nodes with [`PROTOCOL_SERVICE`].\n"]const PERM_CONNECT = 1;
5251 #[doc = " Read byte contents of a file.\n"]const PERM_READ_BYTES = 2;
5252 #[doc = " Write byte contents to a file.\n"]const PERM_WRITE_BYTES = 4;
5253 #[doc = " Execute byte contents of a file.\n"]const PERM_EXECUTE = 8;
5254 #[doc = " Get/query attributes of a node.\n"]const PERM_GET_ATTRIBUTES = 16;
5255 #[doc = " Set/update attributes of a node.\n"]const PERM_UPDATE_ATTRIBUTES = 32;
5256 #[doc = " Enumerate (list) directory entries.\n"]const PERM_ENUMERATE = 64;
5257 #[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;
5258 #[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;
5259 #[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;
5260 #[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;
5261 #[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;
5262 #[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;
5263 #[doc = " Caller accepts [`fuchsia.io/Directory`] protocol. Equivalent to POSIX `O_DIRECTORY`.\n"]const PROTOCOL_DIRECTORY = 524288;
5264 #[doc = " Caller accepts [`fuchsia.io/File`] protocol.\n"]const PROTOCOL_FILE = 8589934592;
5265 #[doc = " Caller accepts [`fuchsia.io/Symlink`] protocol.\n"]const PROTOCOL_SYMLINK = 17179869184;
5266 #[doc = " Caller requests a [`fuchsia.io/Node.OnRepresentation`] event on success.\n"]const FLAG_SEND_REPRESENTATION = 1099511627776;
5267 #[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;
5268 #[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;
5269 #[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;
5270 #[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;
5271 #[doc = " Truncate the file to zero length upon opening it. Equivalent to POSIX `O_TRUNC`.\n"]const FILE_TRUNCATE = 262144;
5272 const _ = !0;
5273 }
5274 }
5275
5276 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for Flags
5277 where
5278 ___E: ?Sized,
5279 {
5280 #[inline]
5281 fn encode(
5282 self,
5283 encoder: &mut ___E,
5284 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
5285 _: (),
5286 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5287 ::fidl_next::Encode::encode(&self, encoder, out, ())
5288 }
5289 }
5290
5291 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Flags, ___E> for &'a Flags
5292 where
5293 ___E: ?Sized,
5294 {
5295 #[inline]
5296 fn encode(
5297 self,
5298 _: &mut ___E,
5299 out: &mut ::core::mem::MaybeUninit<crate::wire::Flags>,
5300 _: (),
5301 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5302 ::fidl_next::munge!(let crate::wire::Flags { value } = out);
5303
5304 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
5305 Ok(())
5306 }
5307 }
5308
5309 impl ::core::convert::From<crate::wire::Flags> for Flags {
5310 fn from(wire: crate::wire::Flags) -> Self {
5311 Self::from_bits_retain(u64::from(wire.value))
5312 }
5313 }
5314
5315 impl ::fidl_next::FromWire<crate::wire::Flags> for Flags {
5316 #[inline]
5317 fn from_wire(wire: crate::wire::Flags) -> Self {
5318 Self::from(wire)
5319 }
5320 }
5321
5322 impl ::fidl_next::FromWireRef<crate::wire::Flags> for Flags {
5323 #[inline]
5324 fn from_wire_ref(wire: &crate::wire::Flags) -> Self {
5325 Self::from(*wire)
5326 }
5327 }
5328
5329 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5330 #[repr(C)]
5331 pub struct NodeGetFlagsResponse {
5332 pub flags: crate::natural::Flags,
5333 }
5334
5335 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
5336 for NodeGetFlagsResponse
5337 where
5338 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5339 {
5340 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5341 Self,
5342 crate::wire::NodeGetFlagsResponse,
5343 > = unsafe {
5344 ::fidl_next::CopyOptimization::enable_if(
5345 true
5346
5347 && <
5348 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
5349 >::COPY_OPTIMIZATION.is_enabled()
5350
5351 )
5352 };
5353
5354 #[inline]
5355 fn encode(
5356 self,
5357 encoder_: &mut ___E,
5358 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
5359 _: (),
5360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5361 ::fidl_next::munge! {
5362 let crate::wire::NodeGetFlagsResponse {
5363 flags,
5364
5365 } = out_;
5366 }
5367
5368 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5369
5370 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5371
5372 Ok(())
5373 }
5374 }
5375
5376 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
5377 for &'a NodeGetFlagsResponse
5378 where
5379 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5380 {
5381 #[inline]
5382 fn encode(
5383 self,
5384 encoder_: &mut ___E,
5385 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
5386 _: (),
5387 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5388 ::fidl_next::munge! {
5389 let crate::wire::NodeGetFlagsResponse {
5390
5391 flags,
5392
5393 } = out_;
5394 }
5395
5396 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
5397
5398 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5399
5400 Ok(())
5401 }
5402 }
5403
5404 unsafe impl<___E>
5405 ::fidl_next::EncodeOption<
5406 ::fidl_next::WireBox<'static, crate::wire::NodeGetFlagsResponse>,
5407 ___E,
5408 > for NodeGetFlagsResponse
5409 where
5410 ___E: ::fidl_next::Encoder + ?Sized,
5411 NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
5412 {
5413 #[inline]
5414 fn encode_option(
5415 this: ::core::option::Option<Self>,
5416 encoder: &mut ___E,
5417 out: &mut ::core::mem::MaybeUninit<
5418 ::fidl_next::WireBox<'static, crate::wire::NodeGetFlagsResponse>,
5419 >,
5420 _: (),
5421 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5422 if let Some(inner) = this {
5423 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5424 ::fidl_next::WireBox::encode_present(out);
5425 } else {
5426 ::fidl_next::WireBox::encode_absent(out);
5427 }
5428
5429 Ok(())
5430 }
5431 }
5432
5433 unsafe impl<'a, ___E>
5434 ::fidl_next::EncodeOption<
5435 ::fidl_next::WireBox<'static, crate::wire::NodeGetFlagsResponse>,
5436 ___E,
5437 > for &'a NodeGetFlagsResponse
5438 where
5439 ___E: ::fidl_next::Encoder + ?Sized,
5440 &'a NodeGetFlagsResponse: ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>,
5441 {
5442 #[inline]
5443 fn encode_option(
5444 this: ::core::option::Option<Self>,
5445 encoder: &mut ___E,
5446 out: &mut ::core::mem::MaybeUninit<
5447 ::fidl_next::WireBox<'static, crate::wire::NodeGetFlagsResponse>,
5448 >,
5449 _: (),
5450 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5451 if let Some(inner) = this {
5452 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5453 ::fidl_next::WireBox::encode_present(out);
5454 } else {
5455 ::fidl_next::WireBox::encode_absent(out);
5456 }
5457
5458 Ok(())
5459 }
5460 }
5461
5462 impl ::fidl_next::FromWire<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
5463 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5464 crate::wire::NodeGetFlagsResponse,
5465 Self,
5466 > = unsafe {
5467 ::fidl_next::CopyOptimization::enable_if(
5468 true
5469
5470 && <
5471 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
5472 >::COPY_OPTIMIZATION.is_enabled()
5473
5474 )
5475 };
5476
5477 #[inline]
5478 fn from_wire(wire: crate::wire::NodeGetFlagsResponse) -> Self {
5479 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
5480 }
5481 }
5482
5483 impl ::fidl_next::FromWireRef<crate::wire::NodeGetFlagsResponse> for NodeGetFlagsResponse {
5484 #[inline]
5485 fn from_wire_ref(wire: &crate::wire::NodeGetFlagsResponse) -> Self {
5486 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
5487 }
5488 }
5489
5490 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5491 #[repr(C)]
5492 pub struct NodeSetFlagsRequest {
5493 pub flags: crate::natural::Flags,
5494 }
5495
5496 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
5497 for NodeSetFlagsRequest
5498 where
5499 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5500 {
5501 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5502 Self,
5503 crate::wire::NodeSetFlagsRequest,
5504 > = unsafe {
5505 ::fidl_next::CopyOptimization::enable_if(
5506 true
5507
5508 && <
5509 crate::natural::Flags as ::fidl_next::Encode<crate::wire::Flags, ___E>
5510 >::COPY_OPTIMIZATION.is_enabled()
5511
5512 )
5513 };
5514
5515 #[inline]
5516 fn encode(
5517 self,
5518 encoder_: &mut ___E,
5519 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
5520 _: (),
5521 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5522 ::fidl_next::munge! {
5523 let crate::wire::NodeSetFlagsRequest {
5524 flags,
5525
5526 } = out_;
5527 }
5528
5529 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5530
5531 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5532
5533 Ok(())
5534 }
5535 }
5536
5537 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
5538 for &'a NodeSetFlagsRequest
5539 where
5540 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5541 {
5542 #[inline]
5543 fn encode(
5544 self,
5545 encoder_: &mut ___E,
5546 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
5547 _: (),
5548 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5549 ::fidl_next::munge! {
5550 let crate::wire::NodeSetFlagsRequest {
5551
5552 flags,
5553
5554 } = out_;
5555 }
5556
5557 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
5558
5559 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
5560
5561 Ok(())
5562 }
5563 }
5564
5565 unsafe impl<___E>
5566 ::fidl_next::EncodeOption<
5567 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsRequest>,
5568 ___E,
5569 > for NodeSetFlagsRequest
5570 where
5571 ___E: ::fidl_next::Encoder + ?Sized,
5572 NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
5573 {
5574 #[inline]
5575 fn encode_option(
5576 this: ::core::option::Option<Self>,
5577 encoder: &mut ___E,
5578 out: &mut ::core::mem::MaybeUninit<
5579 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsRequest>,
5580 >,
5581 _: (),
5582 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5583 if let Some(inner) = this {
5584 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5585 ::fidl_next::WireBox::encode_present(out);
5586 } else {
5587 ::fidl_next::WireBox::encode_absent(out);
5588 }
5589
5590 Ok(())
5591 }
5592 }
5593
5594 unsafe impl<'a, ___E>
5595 ::fidl_next::EncodeOption<
5596 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsRequest>,
5597 ___E,
5598 > for &'a NodeSetFlagsRequest
5599 where
5600 ___E: ::fidl_next::Encoder + ?Sized,
5601 &'a NodeSetFlagsRequest: ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>,
5602 {
5603 #[inline]
5604 fn encode_option(
5605 this: ::core::option::Option<Self>,
5606 encoder: &mut ___E,
5607 out: &mut ::core::mem::MaybeUninit<
5608 ::fidl_next::WireBox<'static, crate::wire::NodeSetFlagsRequest>,
5609 >,
5610 _: (),
5611 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5612 if let Some(inner) = this {
5613 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5614 ::fidl_next::WireBox::encode_present(out);
5615 } else {
5616 ::fidl_next::WireBox::encode_absent(out);
5617 }
5618
5619 Ok(())
5620 }
5621 }
5622
5623 impl ::fidl_next::FromWire<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
5624 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
5625 crate::wire::NodeSetFlagsRequest,
5626 Self,
5627 > = unsafe {
5628 ::fidl_next::CopyOptimization::enable_if(
5629 true
5630
5631 && <
5632 crate::natural::Flags as ::fidl_next::FromWire<crate::wire::Flags>
5633 >::COPY_OPTIMIZATION.is_enabled()
5634
5635 )
5636 };
5637
5638 #[inline]
5639 fn from_wire(wire: crate::wire::NodeSetFlagsRequest) -> Self {
5640 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
5641 }
5642 }
5643
5644 impl ::fidl_next::FromWireRef<crate::wire::NodeSetFlagsRequest> for NodeSetFlagsRequest {
5645 #[inline]
5646 fn from_wire_ref(wire: &crate::wire::NodeSetFlagsRequest) -> Self {
5647 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
5648 }
5649 }
5650
5651 #[doc = " Used in places where empty structs are needed, such as empty union members, to avoid creating\n new struct types.\n"]
5652 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5653 #[repr(C)]
5654 pub struct EmptyStruct {}
5655
5656 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyStruct, ___E> for EmptyStruct
5657 where
5658 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5659 {
5660 #[inline]
5661 fn encode(
5662 self,
5663 encoder_: &mut ___E,
5664 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyStruct>,
5665 _: (),
5666 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5667 *out_ = ::core::mem::MaybeUninit::zeroed();
5668
5669 Ok(())
5670 }
5671 }
5672
5673 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::EmptyStruct, ___E> for &'a EmptyStruct
5674 where
5675 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5676 {
5677 #[inline]
5678 fn encode(
5679 self,
5680 encoder_: &mut ___E,
5681 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyStruct>,
5682 _: (),
5683 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5684 ::fidl_next::munge! {
5685 let crate::wire::EmptyStruct {
5686
5687 _empty,
5688
5689
5690 } = out_;
5691 }
5692
5693 Ok(())
5694 }
5695 }
5696
5697 unsafe impl<___E>
5698 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::EmptyStruct>, ___E>
5699 for EmptyStruct
5700 where
5701 ___E: ::fidl_next::Encoder + ?Sized,
5702 EmptyStruct: ::fidl_next::Encode<crate::wire::EmptyStruct, ___E>,
5703 {
5704 #[inline]
5705 fn encode_option(
5706 this: ::core::option::Option<Self>,
5707 encoder: &mut ___E,
5708 out: &mut ::core::mem::MaybeUninit<
5709 ::fidl_next::WireBox<'static, crate::wire::EmptyStruct>,
5710 >,
5711 _: (),
5712 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5713 if let Some(inner) = this {
5714 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5715 ::fidl_next::WireBox::encode_present(out);
5716 } else {
5717 ::fidl_next::WireBox::encode_absent(out);
5718 }
5719
5720 Ok(())
5721 }
5722 }
5723
5724 unsafe impl<'a, ___E>
5725 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::EmptyStruct>, ___E>
5726 for &'a EmptyStruct
5727 where
5728 ___E: ::fidl_next::Encoder + ?Sized,
5729 &'a EmptyStruct: ::fidl_next::Encode<crate::wire::EmptyStruct, ___E>,
5730 {
5731 #[inline]
5732 fn encode_option(
5733 this: ::core::option::Option<Self>,
5734 encoder: &mut ___E,
5735 out: &mut ::core::mem::MaybeUninit<
5736 ::fidl_next::WireBox<'static, crate::wire::EmptyStruct>,
5737 >,
5738 _: (),
5739 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5740 if let Some(inner) = this {
5741 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
5742 ::fidl_next::WireBox::encode_present(out);
5743 } else {
5744 ::fidl_next::WireBox::encode_absent(out);
5745 }
5746
5747 Ok(())
5748 }
5749 }
5750
5751 impl ::fidl_next::FromWire<crate::wire::EmptyStruct> for EmptyStruct {
5752 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::EmptyStruct, Self> =
5753 unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
5754
5755 #[inline]
5756 fn from_wire(wire: crate::wire::EmptyStruct) -> Self {
5757 Self {}
5758 }
5759 }
5760
5761 impl ::fidl_next::FromWireRef<crate::wire::EmptyStruct> for EmptyStruct {
5762 #[inline]
5763 fn from_wire_ref(wire: &crate::wire::EmptyStruct) -> Self {
5764 Self {}
5765 }
5766 }
5767
5768 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5769 pub enum SelinuxContext {
5770 Data(::std::vec::Vec<u8>),
5771
5772 UseExtendedAttributes(crate::natural::EmptyStruct),
5773
5774 UnknownOrdinal_(u64),
5775 }
5776
5777 impl SelinuxContext {
5778 pub fn is_unknown(&self) -> bool {
5779 #[allow(unreachable_patterns)]
5780 match self {
5781 Self::UnknownOrdinal_(_) => true,
5782 _ => false,
5783 }
5784 }
5785 }
5786
5787 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E> for SelinuxContext
5788 where
5789 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5790 ___E: ::fidl_next::Encoder,
5791 {
5792 #[inline]
5793 fn encode(
5794 self,
5795 encoder: &mut ___E,
5796 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
5797 _: (),
5798 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5799 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
5800
5801 match self {
5802 Self::Data(value) => ::fidl_next::RawWireUnion::encode_as::<
5803 ___E,
5804 ::fidl_next::WireVector<'static, u8>,
5805 >(value, 1, encoder, raw, (256, ()))?,
5806
5807 Self::UseExtendedAttributes(value) => ::fidl_next::RawWireUnion::encode_as::<
5808 ___E,
5809 crate::wire::EmptyStruct,
5810 >(value, 2, encoder, raw, ())?,
5811
5812 Self::UnknownOrdinal_(ordinal) => {
5813 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
5814 }
5815 }
5816
5817 Ok(())
5818 }
5819 }
5820
5821 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>
5822 for &'a SelinuxContext
5823 where
5824 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5825 ___E: ::fidl_next::Encoder,
5826 {
5827 #[inline]
5828 fn encode(
5829 self,
5830 encoder: &mut ___E,
5831 out: &mut ::core::mem::MaybeUninit<crate::wire::SelinuxContext<'static>>,
5832 _: (),
5833 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5834 ::fidl_next::munge!(let crate::wire::SelinuxContext { raw, _phantom: _ } = out);
5835
5836 match self {
5837 SelinuxContext::Data(value) => ::fidl_next::RawWireUnion::encode_as::<
5838 ___E,
5839 ::fidl_next::WireVector<'static, u8>,
5840 >(value, 1, encoder, raw, (256, ()))?,
5841
5842 SelinuxContext::UseExtendedAttributes(value) => {
5843 ::fidl_next::RawWireUnion::encode_as::<___E, crate::wire::EmptyStruct>(
5844 value,
5845 2,
5846 encoder,
5847 raw,
5848 (),
5849 )?
5850 }
5851
5852 SelinuxContext::UnknownOrdinal_(ordinal) => {
5853 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
5854 }
5855 }
5856
5857 Ok(())
5858 }
5859 }
5860
5861 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
5862 for SelinuxContext
5863 where
5864 ___E: ?Sized,
5865 SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
5866 {
5867 #[inline]
5868 fn encode_option(
5869 this: ::core::option::Option<Self>,
5870 encoder: &mut ___E,
5871 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
5872 _: (),
5873 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5874 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
5875
5876 if let Some(inner) = this {
5877 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
5878 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
5879 } else {
5880 ::fidl_next::RawWireUnion::encode_absent(raw);
5881 }
5882
5883 Ok(())
5884 }
5885 }
5886
5887 unsafe impl<'a, ___E>
5888 ::fidl_next::EncodeOption<crate::wire_optional::SelinuxContext<'static>, ___E>
5889 for &'a SelinuxContext
5890 where
5891 ___E: ?Sized,
5892 &'a SelinuxContext: ::fidl_next::Encode<crate::wire::SelinuxContext<'static>, ___E>,
5893 {
5894 #[inline]
5895 fn encode_option(
5896 this: ::core::option::Option<Self>,
5897 encoder: &mut ___E,
5898 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelinuxContext<'static>>,
5899 _: (),
5900 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5901 ::fidl_next::munge!(let crate::wire_optional::SelinuxContext { raw, _phantom: _ } = &mut *out);
5902
5903 if let Some(inner) = this {
5904 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
5905 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
5906 } else {
5907 ::fidl_next::RawWireUnion::encode_absent(raw);
5908 }
5909
5910 Ok(())
5911 }
5912 }
5913
5914 impl<'de> ::fidl_next::FromWire<crate::wire::SelinuxContext<'de>> for SelinuxContext {
5915 #[inline]
5916 fn from_wire(wire: crate::wire::SelinuxContext<'de>) -> Self {
5917 let wire = ::core::mem::ManuallyDrop::new(wire);
5918 match wire.raw.ordinal() {
5919 1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
5920 wire.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>()
5921 })),
5922
5923 2 => Self::UseExtendedAttributes(::fidl_next::FromWire::from_wire(unsafe {
5924 wire.raw.get().read_unchecked::<crate::wire::EmptyStruct>()
5925 })),
5926
5927 ord => return Self::UnknownOrdinal_(ord as u64),
5928 }
5929 }
5930 }
5931
5932 impl<'de> ::fidl_next::FromWireRef<crate::wire::SelinuxContext<'de>> for SelinuxContext {
5933 #[inline]
5934 fn from_wire_ref(wire: &crate::wire::SelinuxContext<'de>) -> Self {
5935 match wire.raw.ordinal() {
5936 1 => Self::Data(::fidl_next::FromWireRef::from_wire_ref(unsafe {
5937 wire.raw.get().deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
5938 })),
5939
5940 2 => Self::UseExtendedAttributes(::fidl_next::FromWireRef::from_wire_ref(unsafe {
5941 wire.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
5942 })),
5943
5944 ord => return Self::UnknownOrdinal_(ord as u64),
5945 }
5946 }
5947 }
5948
5949 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
5950 for SelinuxContext
5951 {
5952 #[inline]
5953 fn from_wire_option(
5954 wire: crate::wire_optional::SelinuxContext<'de>,
5955 ) -> ::core::option::Option<Self> {
5956 if let Some(inner) = wire.into_option() {
5957 Some(::fidl_next::FromWire::from_wire(inner))
5958 } else {
5959 None
5960 }
5961 }
5962 }
5963
5964 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelinuxContext<'de>>
5965 for Box<SelinuxContext>
5966 {
5967 #[inline]
5968 fn from_wire_option(
5969 wire: crate::wire_optional::SelinuxContext<'de>,
5970 ) -> ::core::option::Option<Self> {
5971 <SelinuxContext as ::fidl_next::FromWireOption<
5972 crate::wire_optional::SelinuxContext<'de>,
5973 >>::from_wire_option(wire)
5974 .map(Box::new)
5975 }
5976 }
5977
5978 impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::SelinuxContext<'de>>
5979 for Box<SelinuxContext>
5980 {
5981 #[inline]
5982 fn from_wire_option_ref(
5983 wire: &crate::wire_optional::SelinuxContext<'de>,
5984 ) -> ::core::option::Option<Self> {
5985 if let Some(inner) = wire.as_ref() {
5986 Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
5987 } else {
5988 None
5989 }
5990 }
5991 }
5992
5993 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5994 pub struct MutableNodeAttributes {
5995 pub creation_time: ::core::option::Option<u64>,
5996
5997 pub modification_time: ::core::option::Option<u64>,
5998
5999 pub mode: ::core::option::Option<u32>,
6000
6001 pub uid: ::core::option::Option<u32>,
6002
6003 pub gid: ::core::option::Option<u32>,
6004
6005 pub rdev: ::core::option::Option<u64>,
6006
6007 pub access_time: ::core::option::Option<u64>,
6008
6009 pub casefold: ::core::option::Option<bool>,
6010
6011 pub selinux_context: ::core::option::Option<crate::natural::SelinuxContext>,
6012
6013 pub wrapping_key_id: ::core::option::Option<[u8; 16]>,
6014 }
6015
6016 impl MutableNodeAttributes {
6017 fn __max_ordinal(&self) -> usize {
6018 if self.wrapping_key_id.is_some() {
6019 return 10;
6020 }
6021
6022 if self.selinux_context.is_some() {
6023 return 9;
6024 }
6025
6026 if self.casefold.is_some() {
6027 return 8;
6028 }
6029
6030 if self.access_time.is_some() {
6031 return 7;
6032 }
6033
6034 if self.rdev.is_some() {
6035 return 6;
6036 }
6037
6038 if self.gid.is_some() {
6039 return 5;
6040 }
6041
6042 if self.uid.is_some() {
6043 return 4;
6044 }
6045
6046 if self.mode.is_some() {
6047 return 3;
6048 }
6049
6050 if self.modification_time.is_some() {
6051 return 2;
6052 }
6053
6054 if self.creation_time.is_some() {
6055 return 1;
6056 }
6057
6058 0
6059 }
6060 }
6061
6062 unsafe impl<___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
6063 for MutableNodeAttributes
6064 where
6065 ___E: ::fidl_next::Encoder + ?Sized,
6066 {
6067 #[inline]
6068 fn encode(
6069 mut self,
6070 encoder: &mut ___E,
6071 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
6072 _: (),
6073 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6074 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
6075
6076 let max_ord = self.__max_ordinal();
6077
6078 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6079 ::fidl_next::Wire::zero_padding(&mut out);
6080
6081 let mut preallocated =
6082 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6083
6084 for i in 1..=max_ord {
6085 match i {
6086 10 => {
6087 if let Some(value) = self.wrapping_key_id.take() {
6088 ::fidl_next::WireEnvelope::encode_value::<[u8; 16], ___E>(
6089 value,
6090 preallocated.encoder,
6091 &mut out,
6092 (),
6093 )?;
6094 } else {
6095 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6096 }
6097 }
6098
6099 9 => {
6100 if let Some(value) = self.selinux_context.take() {
6101 ::fidl_next::WireEnvelope::encode_value::<
6102 crate::wire::SelinuxContext<'static>,
6103 ___E,
6104 >(
6105 value, preallocated.encoder, &mut out, ()
6106 )?;
6107 } else {
6108 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6109 }
6110 }
6111
6112 8 => {
6113 if let Some(value) = self.casefold.take() {
6114 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
6115 value,
6116 preallocated.encoder,
6117 &mut out,
6118 (),
6119 )?;
6120 } else {
6121 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6122 }
6123 }
6124
6125 7 => {
6126 if let Some(value) = self.access_time.take() {
6127 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6128 value,
6129 preallocated.encoder,
6130 &mut out,
6131 (),
6132 )?;
6133 } else {
6134 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6135 }
6136 }
6137
6138 6 => {
6139 if let Some(value) = self.rdev.take() {
6140 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6141 value,
6142 preallocated.encoder,
6143 &mut out,
6144 (),
6145 )?;
6146 } else {
6147 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6148 }
6149 }
6150
6151 5 => {
6152 if let Some(value) = self.gid.take() {
6153 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6154 value,
6155 preallocated.encoder,
6156 &mut out,
6157 (),
6158 )?;
6159 } else {
6160 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6161 }
6162 }
6163
6164 4 => {
6165 if let Some(value) = self.uid.take() {
6166 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6167 value,
6168 preallocated.encoder,
6169 &mut out,
6170 (),
6171 )?;
6172 } else {
6173 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6174 }
6175 }
6176
6177 3 => {
6178 if let Some(value) = self.mode.take() {
6179 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6180 value,
6181 preallocated.encoder,
6182 &mut out,
6183 (),
6184 )?;
6185 } else {
6186 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6187 }
6188 }
6189
6190 2 => {
6191 if let Some(value) = self.modification_time.take() {
6192 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6193 value,
6194 preallocated.encoder,
6195 &mut out,
6196 (),
6197 )?;
6198 } else {
6199 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6200 }
6201 }
6202
6203 1 => {
6204 if let Some(value) = self.creation_time.take() {
6205 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6206 value,
6207 preallocated.encoder,
6208 &mut out,
6209 (),
6210 )?;
6211 } else {
6212 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6213 }
6214 }
6215
6216 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6217 }
6218 unsafe {
6219 preallocated.write_next(out.assume_init_ref());
6220 }
6221 }
6222
6223 ::fidl_next::WireTable::encode_len(table, max_ord);
6224
6225 Ok(())
6226 }
6227 }
6228
6229 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>
6230 for &'a MutableNodeAttributes
6231 where
6232 ___E: ::fidl_next::Encoder + ?Sized,
6233 {
6234 #[inline]
6235 fn encode(
6236 self,
6237 encoder: &mut ___E,
6238 out: &mut ::core::mem::MaybeUninit<crate::wire::MutableNodeAttributes<'static>>,
6239 _: (),
6240 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6241 ::fidl_next::munge!(let crate::wire::MutableNodeAttributes { table } = out);
6242
6243 let max_ord = self.__max_ordinal();
6244
6245 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6246 ::fidl_next::Wire::zero_padding(&mut out);
6247
6248 let mut preallocated =
6249 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6250
6251 for i in 1..=max_ord {
6252 match i {
6253 10 => {
6254 if let Some(value) = &self.wrapping_key_id {
6255 ::fidl_next::WireEnvelope::encode_value::<[u8; 16], ___E>(
6256 value,
6257 preallocated.encoder,
6258 &mut out,
6259 (),
6260 )?;
6261 } else {
6262 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6263 }
6264 }
6265
6266 9 => {
6267 if let Some(value) = &self.selinux_context {
6268 ::fidl_next::WireEnvelope::encode_value::<
6269 crate::wire::SelinuxContext<'static>,
6270 ___E,
6271 >(
6272 value, preallocated.encoder, &mut out, ()
6273 )?;
6274 } else {
6275 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6276 }
6277 }
6278
6279 8 => {
6280 if let Some(value) = &self.casefold {
6281 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
6282 value,
6283 preallocated.encoder,
6284 &mut out,
6285 (),
6286 )?;
6287 } else {
6288 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6289 }
6290 }
6291
6292 7 => {
6293 if let Some(value) = &self.access_time {
6294 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6295 value,
6296 preallocated.encoder,
6297 &mut out,
6298 (),
6299 )?;
6300 } else {
6301 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6302 }
6303 }
6304
6305 6 => {
6306 if let Some(value) = &self.rdev {
6307 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6308 value,
6309 preallocated.encoder,
6310 &mut out,
6311 (),
6312 )?;
6313 } else {
6314 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6315 }
6316 }
6317
6318 5 => {
6319 if let Some(value) = &self.gid {
6320 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6321 value,
6322 preallocated.encoder,
6323 &mut out,
6324 (),
6325 )?;
6326 } else {
6327 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6328 }
6329 }
6330
6331 4 => {
6332 if let Some(value) = &self.uid {
6333 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6334 value,
6335 preallocated.encoder,
6336 &mut out,
6337 (),
6338 )?;
6339 } else {
6340 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6341 }
6342 }
6343
6344 3 => {
6345 if let Some(value) = &self.mode {
6346 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU32, ___E>(
6347 value,
6348 preallocated.encoder,
6349 &mut out,
6350 (),
6351 )?;
6352 } else {
6353 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6354 }
6355 }
6356
6357 2 => {
6358 if let Some(value) = &self.modification_time {
6359 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6360 value,
6361 preallocated.encoder,
6362 &mut out,
6363 (),
6364 )?;
6365 } else {
6366 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6367 }
6368 }
6369
6370 1 => {
6371 if let Some(value) = &self.creation_time {
6372 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
6373 value,
6374 preallocated.encoder,
6375 &mut out,
6376 (),
6377 )?;
6378 } else {
6379 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6380 }
6381 }
6382
6383 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6384 }
6385 unsafe {
6386 preallocated.write_next(out.assume_init_ref());
6387 }
6388 }
6389
6390 ::fidl_next::WireTable::encode_len(table, max_ord);
6391
6392 Ok(())
6393 }
6394 }
6395
6396 impl<'de> ::fidl_next::FromWire<crate::wire::MutableNodeAttributes<'de>> for MutableNodeAttributes {
6397 #[inline]
6398 fn from_wire(wire_: crate::wire::MutableNodeAttributes<'de>) -> Self {
6399 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6400
6401 let creation_time = wire_.table.get(1);
6402
6403 let modification_time = wire_.table.get(2);
6404
6405 let mode = wire_.table.get(3);
6406
6407 let uid = wire_.table.get(4);
6408
6409 let gid = wire_.table.get(5);
6410
6411 let rdev = wire_.table.get(6);
6412
6413 let access_time = wire_.table.get(7);
6414
6415 let casefold = wire_.table.get(8);
6416
6417 let selinux_context = wire_.table.get(9);
6418
6419 let wrapping_key_id = wire_.table.get(10);
6420
6421 Self {
6422 creation_time: creation_time.map(|envelope| {
6423 ::fidl_next::FromWire::from_wire(unsafe {
6424 envelope.read_unchecked::<::fidl_next::WireU64>()
6425 })
6426 }),
6427
6428 modification_time: modification_time.map(|envelope| {
6429 ::fidl_next::FromWire::from_wire(unsafe {
6430 envelope.read_unchecked::<::fidl_next::WireU64>()
6431 })
6432 }),
6433
6434 mode: mode.map(|envelope| {
6435 ::fidl_next::FromWire::from_wire(unsafe {
6436 envelope.read_unchecked::<::fidl_next::WireU32>()
6437 })
6438 }),
6439
6440 uid: uid.map(|envelope| {
6441 ::fidl_next::FromWire::from_wire(unsafe {
6442 envelope.read_unchecked::<::fidl_next::WireU32>()
6443 })
6444 }),
6445
6446 gid: gid.map(|envelope| {
6447 ::fidl_next::FromWire::from_wire(unsafe {
6448 envelope.read_unchecked::<::fidl_next::WireU32>()
6449 })
6450 }),
6451
6452 rdev: rdev.map(|envelope| {
6453 ::fidl_next::FromWire::from_wire(unsafe {
6454 envelope.read_unchecked::<::fidl_next::WireU64>()
6455 })
6456 }),
6457
6458 access_time: access_time.map(|envelope| {
6459 ::fidl_next::FromWire::from_wire(unsafe {
6460 envelope.read_unchecked::<::fidl_next::WireU64>()
6461 })
6462 }),
6463
6464 casefold: casefold.map(|envelope| {
6465 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
6466 }),
6467
6468 selinux_context: selinux_context.map(|envelope| {
6469 ::fidl_next::FromWire::from_wire(unsafe {
6470 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
6471 })
6472 }),
6473
6474 wrapping_key_id: wrapping_key_id.map(|envelope| {
6475 ::fidl_next::FromWire::from_wire(unsafe {
6476 envelope.read_unchecked::<[u8; 16]>()
6477 })
6478 }),
6479 }
6480 }
6481 }
6482
6483 impl<'de> ::fidl_next::FromWireRef<crate::wire::MutableNodeAttributes<'de>>
6484 for MutableNodeAttributes
6485 {
6486 #[inline]
6487 fn from_wire_ref(wire: &crate::wire::MutableNodeAttributes<'de>) -> Self {
6488 Self {
6489 creation_time: wire.table.get(1).map(|envelope| {
6490 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6491 envelope.deref_unchecked::<::fidl_next::WireU64>()
6492 })
6493 }),
6494
6495 modification_time: wire.table.get(2).map(|envelope| {
6496 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6497 envelope.deref_unchecked::<::fidl_next::WireU64>()
6498 })
6499 }),
6500
6501 mode: wire.table.get(3).map(|envelope| {
6502 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6503 envelope.deref_unchecked::<::fidl_next::WireU32>()
6504 })
6505 }),
6506
6507 uid: wire.table.get(4).map(|envelope| {
6508 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6509 envelope.deref_unchecked::<::fidl_next::WireU32>()
6510 })
6511 }),
6512
6513 gid: wire.table.get(5).map(|envelope| {
6514 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6515 envelope.deref_unchecked::<::fidl_next::WireU32>()
6516 })
6517 }),
6518
6519 rdev: wire.table.get(6).map(|envelope| {
6520 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6521 envelope.deref_unchecked::<::fidl_next::WireU64>()
6522 })
6523 }),
6524
6525 access_time: wire.table.get(7).map(|envelope| {
6526 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6527 envelope.deref_unchecked::<::fidl_next::WireU64>()
6528 })
6529 }),
6530
6531 casefold: wire.table.get(8).map(|envelope| {
6532 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6533 envelope.deref_unchecked::<bool>()
6534 })
6535 }),
6536
6537 selinux_context: wire.table.get(9).map(|envelope| {
6538 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6539 envelope.deref_unchecked::<crate::wire::SelinuxContext<'de>>()
6540 })
6541 }),
6542
6543 wrapping_key_id: wire.table.get(10).map(|envelope| {
6544 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6545 envelope.deref_unchecked::<[u8; 16]>()
6546 })
6547 }),
6548 }
6549 }
6550 }
6551
6552 ::fidl_next::bitflags::bitflags! {
6553 #[doc = " A node may have multiple supported representations when opening, even though\n it may have a fixed underlying identity.\n\n Today, a file is accessed via the [`File`] protocol, and sends a\n [`Representation.FileInfo`] when opened with `GET_REPRESENTATION`. However,\n in the future we might introduce a more sophisticated `FileV2` protocol, or\n a more efficient `SuperFastFile` backed by a specialized kernel object. New\n clients can request the more advanced representations by specifying the\n corresponding bits in [`NodeProtocolKinds`], whereas existing clients would\n continue to talk to the node via the old representation.\n\n [`NodeProtocolKinds`] enables forward-compatibility through a form of protocol\n negotiation.\n\n The elements have one-to-one correspondence with the members of\n [`Representation`].\n"]#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct NodeProtocolKinds: u64 {
6554 #[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;
6555 #[doc = " The directory representation of a node.\n\n The connection will speak the [`Directory`] protocol.\n"]const DIRECTORY = 2;
6556 #[doc = " The file representation of a node.\n\n The connection will speak the [`File`] protocol.\n"]const FILE = 4;
6557 #[doc = " The symlink representation of a node.\n\n The connection will speak the [`Symlink`] protocol.\n"]const SYMLINK = 8;
6558 const _ = !0;
6559 }
6560 }
6561
6562 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E> for NodeProtocolKinds
6563 where
6564 ___E: ?Sized,
6565 {
6566 #[inline]
6567 fn encode(
6568 self,
6569 encoder: &mut ___E,
6570 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
6571 _: (),
6572 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6573 ::fidl_next::Encode::encode(&self, encoder, out, ())
6574 }
6575 }
6576
6577 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeProtocolKinds, ___E>
6578 for &'a NodeProtocolKinds
6579 where
6580 ___E: ?Sized,
6581 {
6582 #[inline]
6583 fn encode(
6584 self,
6585 _: &mut ___E,
6586 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeProtocolKinds>,
6587 _: (),
6588 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6589 ::fidl_next::munge!(let crate::wire::NodeProtocolKinds { value } = out);
6590
6591 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
6592 Ok(())
6593 }
6594 }
6595
6596 impl ::core::convert::From<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
6597 fn from(wire: crate::wire::NodeProtocolKinds) -> Self {
6598 Self::from_bits_retain(u64::from(wire.value))
6599 }
6600 }
6601
6602 impl ::fidl_next::FromWire<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
6603 #[inline]
6604 fn from_wire(wire: crate::wire::NodeProtocolKinds) -> Self {
6605 Self::from(wire)
6606 }
6607 }
6608
6609 impl ::fidl_next::FromWireRef<crate::wire::NodeProtocolKinds> for NodeProtocolKinds {
6610 #[inline]
6611 fn from_wire_ref(wire: &crate::wire::NodeProtocolKinds) -> Self {
6612 Self::from(*wire)
6613 }
6614 }
6615
6616 #[doc = " Denotes which hash algorithm is used to build the merkle tree for\n fsverity-enabled files.\n"]
6617 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6618 #[repr(u8)]
6619 pub enum HashAlgorithm {
6620 Sha256 = 1,
6621 Sha512 = 2,
6622 UnknownOrdinal_(u8) = 3,
6623 }
6624 impl ::std::convert::From<u8> for HashAlgorithm {
6625 fn from(value: u8) -> Self {
6626 match value {
6627 1 => Self::Sha256,
6628 2 => Self::Sha512,
6629
6630 _ => Self::UnknownOrdinal_(value),
6631 }
6632 }
6633 }
6634
6635 unsafe impl<___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for HashAlgorithm
6636 where
6637 ___E: ?Sized,
6638 {
6639 #[inline]
6640 fn encode(
6641 self,
6642 encoder: &mut ___E,
6643 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
6644 _: (),
6645 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6646 ::fidl_next::Encode::encode(&self, encoder, out, ())
6647 }
6648 }
6649
6650 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::HashAlgorithm, ___E> for &'a HashAlgorithm
6651 where
6652 ___E: ?Sized,
6653 {
6654 #[inline]
6655 fn encode(
6656 self,
6657 encoder: &mut ___E,
6658 out: &mut ::core::mem::MaybeUninit<crate::wire::HashAlgorithm>,
6659 _: (),
6660 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6661 ::fidl_next::munge!(let crate::wire::HashAlgorithm { value } = out);
6662 let _ = value.write(u8::from(match *self {
6663 HashAlgorithm::Sha256 => 1,
6664
6665 HashAlgorithm::Sha512 => 2,
6666
6667 HashAlgorithm::UnknownOrdinal_(value) => value,
6668 }));
6669
6670 Ok(())
6671 }
6672 }
6673
6674 impl ::core::convert::From<crate::wire::HashAlgorithm> for HashAlgorithm {
6675 fn from(wire: crate::wire::HashAlgorithm) -> Self {
6676 match u8::from(wire.value) {
6677 1 => Self::Sha256,
6678
6679 2 => Self::Sha512,
6680
6681 value => Self::UnknownOrdinal_(value),
6682 }
6683 }
6684 }
6685
6686 impl ::fidl_next::FromWire<crate::wire::HashAlgorithm> for HashAlgorithm {
6687 #[inline]
6688 fn from_wire(wire: crate::wire::HashAlgorithm) -> Self {
6689 Self::from(wire)
6690 }
6691 }
6692
6693 impl ::fidl_next::FromWireRef<crate::wire::HashAlgorithm> for HashAlgorithm {
6694 #[inline]
6695 fn from_wire_ref(wire: &crate::wire::HashAlgorithm) -> Self {
6696 Self::from(*wire)
6697 }
6698 }
6699
6700 #[doc = " Set of options used to enable verity on a file.\n"]
6701 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6702 pub struct VerificationOptions {
6703 pub hash_algorithm: ::core::option::Option<crate::natural::HashAlgorithm>,
6704
6705 pub salt: ::core::option::Option<::std::vec::Vec<u8>>,
6706 }
6707
6708 impl VerificationOptions {
6709 fn __max_ordinal(&self) -> usize {
6710 if self.salt.is_some() {
6711 return 2;
6712 }
6713
6714 if self.hash_algorithm.is_some() {
6715 return 1;
6716 }
6717
6718 0
6719 }
6720 }
6721
6722 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
6723 for VerificationOptions
6724 where
6725 ___E: ::fidl_next::Encoder + ?Sized,
6726 {
6727 #[inline]
6728 fn encode(
6729 mut self,
6730 encoder: &mut ___E,
6731 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
6732 _: (),
6733 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6734 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
6735
6736 let max_ord = self.__max_ordinal();
6737
6738 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6739 ::fidl_next::Wire::zero_padding(&mut out);
6740
6741 let mut preallocated =
6742 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6743
6744 for i in 1..=max_ord {
6745 match i {
6746 2 => {
6747 if let Some(value) = self.salt.take() {
6748 ::fidl_next::WireEnvelope::encode_value::<
6749 ::fidl_next::WireVector<'static, u8>,
6750 ___E,
6751 >(
6752 value, preallocated.encoder, &mut out, (32, ())
6753 )?;
6754 } else {
6755 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6756 }
6757 }
6758
6759 1 => {
6760 if let Some(value) = self.hash_algorithm.take() {
6761 ::fidl_next::WireEnvelope::encode_value::<
6762 crate::wire::HashAlgorithm,
6763 ___E,
6764 >(
6765 value, preallocated.encoder, &mut out, ()
6766 )?;
6767 } else {
6768 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6769 }
6770 }
6771
6772 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6773 }
6774 unsafe {
6775 preallocated.write_next(out.assume_init_ref());
6776 }
6777 }
6778
6779 ::fidl_next::WireTable::encode_len(table, max_ord);
6780
6781 Ok(())
6782 }
6783 }
6784
6785 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>
6786 for &'a VerificationOptions
6787 where
6788 ___E: ::fidl_next::Encoder + ?Sized,
6789 {
6790 #[inline]
6791 fn encode(
6792 self,
6793 encoder: &mut ___E,
6794 out: &mut ::core::mem::MaybeUninit<crate::wire::VerificationOptions<'static>>,
6795 _: (),
6796 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6797 ::fidl_next::munge!(let crate::wire::VerificationOptions { table } = out);
6798
6799 let max_ord = self.__max_ordinal();
6800
6801 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6802 ::fidl_next::Wire::zero_padding(&mut out);
6803
6804 let mut preallocated =
6805 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6806
6807 for i in 1..=max_ord {
6808 match i {
6809 2 => {
6810 if let Some(value) = &self.salt {
6811 ::fidl_next::WireEnvelope::encode_value::<
6812 ::fidl_next::WireVector<'static, u8>,
6813 ___E,
6814 >(
6815 value, preallocated.encoder, &mut out, (32, ())
6816 )?;
6817 } else {
6818 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6819 }
6820 }
6821
6822 1 => {
6823 if let Some(value) = &self.hash_algorithm {
6824 ::fidl_next::WireEnvelope::encode_value::<
6825 crate::wire::HashAlgorithm,
6826 ___E,
6827 >(
6828 value, preallocated.encoder, &mut out, ()
6829 )?;
6830 } else {
6831 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6832 }
6833 }
6834
6835 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6836 }
6837 unsafe {
6838 preallocated.write_next(out.assume_init_ref());
6839 }
6840 }
6841
6842 ::fidl_next::WireTable::encode_len(table, max_ord);
6843
6844 Ok(())
6845 }
6846 }
6847
6848 impl<'de> ::fidl_next::FromWire<crate::wire::VerificationOptions<'de>> for VerificationOptions {
6849 #[inline]
6850 fn from_wire(wire_: crate::wire::VerificationOptions<'de>) -> Self {
6851 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6852
6853 let hash_algorithm = wire_.table.get(1);
6854
6855 let salt = wire_.table.get(2);
6856
6857 Self {
6858 hash_algorithm: hash_algorithm.map(|envelope| {
6859 ::fidl_next::FromWire::from_wire(unsafe {
6860 envelope.read_unchecked::<crate::wire::HashAlgorithm>()
6861 })
6862 }),
6863
6864 salt: salt.map(|envelope| {
6865 ::fidl_next::FromWire::from_wire(unsafe {
6866 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
6867 })
6868 }),
6869 }
6870 }
6871 }
6872
6873 impl<'de> ::fidl_next::FromWireRef<crate::wire::VerificationOptions<'de>> for VerificationOptions {
6874 #[inline]
6875 fn from_wire_ref(wire: &crate::wire::VerificationOptions<'de>) -> Self {
6876 Self {
6877 hash_algorithm: wire.table.get(1).map(|envelope| {
6878 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6879 envelope.deref_unchecked::<crate::wire::HashAlgorithm>()
6880 })
6881 }),
6882
6883 salt: wire.table.get(2).map(|envelope| {
6884 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6885 envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
6886 })
6887 }),
6888 }
6889 }
6890 }
6891
6892 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6893 pub struct ImmutableNodeAttributes {
6894 pub protocols: ::core::option::Option<crate::natural::NodeProtocolKinds>,
6895
6896 pub abilities: ::core::option::Option<crate::natural::Operations>,
6897
6898 pub content_size: ::core::option::Option<u64>,
6899
6900 pub storage_size: ::core::option::Option<u64>,
6901
6902 pub link_count: ::core::option::Option<u64>,
6903
6904 pub id: ::core::option::Option<u64>,
6905
6906 pub change_time: ::core::option::Option<u64>,
6907
6908 pub options: ::core::option::Option<crate::natural::VerificationOptions>,
6909
6910 pub root_hash: ::core::option::Option<::std::vec::Vec<u8>>,
6911
6912 pub verity_enabled: ::core::option::Option<bool>,
6913 }
6914
6915 impl ImmutableNodeAttributes {
6916 fn __max_ordinal(&self) -> usize {
6917 if self.verity_enabled.is_some() {
6918 return 10;
6919 }
6920
6921 if self.root_hash.is_some() {
6922 return 9;
6923 }
6924
6925 if self.options.is_some() {
6926 return 8;
6927 }
6928
6929 if self.change_time.is_some() {
6930 return 7;
6931 }
6932
6933 if self.id.is_some() {
6934 return 6;
6935 }
6936
6937 if self.link_count.is_some() {
6938 return 5;
6939 }
6940
6941 if self.storage_size.is_some() {
6942 return 4;
6943 }
6944
6945 if self.content_size.is_some() {
6946 return 3;
6947 }
6948
6949 if self.abilities.is_some() {
6950 return 2;
6951 }
6952
6953 if self.protocols.is_some() {
6954 return 1;
6955 }
6956
6957 0
6958 }
6959 }
6960
6961 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
6962 for ImmutableNodeAttributes
6963 where
6964 ___E: ::fidl_next::Encoder + ?Sized,
6965 {
6966 #[inline]
6967 fn encode(
6968 mut self,
6969 encoder: &mut ___E,
6970 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
6971 _: (),
6972 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6973 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
6974
6975 let max_ord = self.__max_ordinal();
6976
6977 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6978 ::fidl_next::Wire::zero_padding(&mut out);
6979
6980 let mut preallocated =
6981 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6982
6983 for i in 1..=max_ord {
6984 match i {
6985 10 => {
6986 if let Some(value) = self.verity_enabled.take() {
6987 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
6988 value,
6989 preallocated.encoder,
6990 &mut out,
6991 (),
6992 )?;
6993 } else {
6994 ::fidl_next::WireEnvelope::encode_zero(&mut out)
6995 }
6996 }
6997
6998 9 => {
6999 if let Some(value) = self.root_hash.take() {
7000 ::fidl_next::WireEnvelope::encode_value::<
7001 ::fidl_next::WireVector<'static, u8>,
7002 ___E,
7003 >(
7004 value, preallocated.encoder, &mut out, (64, ())
7005 )?;
7006 } else {
7007 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7008 }
7009 }
7010
7011 8 => {
7012 if let Some(value) = self.options.take() {
7013 ::fidl_next::WireEnvelope::encode_value::<
7014 crate::wire::VerificationOptions<'static>,
7015 ___E,
7016 >(
7017 value, preallocated.encoder, &mut out, ()
7018 )?;
7019 } else {
7020 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7021 }
7022 }
7023
7024 7 => {
7025 if let Some(value) = self.change_time.take() {
7026 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7027 value,
7028 preallocated.encoder,
7029 &mut out,
7030 (),
7031 )?;
7032 } else {
7033 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7034 }
7035 }
7036
7037 6 => {
7038 if let Some(value) = self.id.take() {
7039 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7040 value,
7041 preallocated.encoder,
7042 &mut out,
7043 (),
7044 )?;
7045 } else {
7046 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7047 }
7048 }
7049
7050 5 => {
7051 if let Some(value) = self.link_count.take() {
7052 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7053 value,
7054 preallocated.encoder,
7055 &mut out,
7056 (),
7057 )?;
7058 } else {
7059 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7060 }
7061 }
7062
7063 4 => {
7064 if let Some(value) = self.storage_size.take() {
7065 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7066 value,
7067 preallocated.encoder,
7068 &mut out,
7069 (),
7070 )?;
7071 } else {
7072 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7073 }
7074 }
7075
7076 3 => {
7077 if let Some(value) = self.content_size.take() {
7078 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7079 value,
7080 preallocated.encoder,
7081 &mut out,
7082 (),
7083 )?;
7084 } else {
7085 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7086 }
7087 }
7088
7089 2 => {
7090 if let Some(value) = self.abilities.take() {
7091 ::fidl_next::WireEnvelope::encode_value::<crate::wire::Operations, ___E>(
7092 value,
7093 preallocated.encoder,
7094 &mut out,
7095 (),
7096 )?;
7097 } else {
7098 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7099 }
7100 }
7101
7102 1 => {
7103 if let Some(value) = self.protocols.take() {
7104 ::fidl_next::WireEnvelope::encode_value::<
7105 crate::wire::NodeProtocolKinds,
7106 ___E,
7107 >(
7108 value, preallocated.encoder, &mut out, ()
7109 )?;
7110 } else {
7111 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7112 }
7113 }
7114
7115 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7116 }
7117 unsafe {
7118 preallocated.write_next(out.assume_init_ref());
7119 }
7120 }
7121
7122 ::fidl_next::WireTable::encode_len(table, max_ord);
7123
7124 Ok(())
7125 }
7126 }
7127
7128 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>
7129 for &'a ImmutableNodeAttributes
7130 where
7131 ___E: ::fidl_next::Encoder + ?Sized,
7132 {
7133 #[inline]
7134 fn encode(
7135 self,
7136 encoder: &mut ___E,
7137 out: &mut ::core::mem::MaybeUninit<crate::wire::ImmutableNodeAttributes<'static>>,
7138 _: (),
7139 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7140 ::fidl_next::munge!(let crate::wire::ImmutableNodeAttributes { table } = out);
7141
7142 let max_ord = self.__max_ordinal();
7143
7144 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7145 ::fidl_next::Wire::zero_padding(&mut out);
7146
7147 let mut preallocated =
7148 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7149
7150 for i in 1..=max_ord {
7151 match i {
7152 10 => {
7153 if let Some(value) = &self.verity_enabled {
7154 ::fidl_next::WireEnvelope::encode_value::<bool, ___E>(
7155 value,
7156 preallocated.encoder,
7157 &mut out,
7158 (),
7159 )?;
7160 } else {
7161 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7162 }
7163 }
7164
7165 9 => {
7166 if let Some(value) = &self.root_hash {
7167 ::fidl_next::WireEnvelope::encode_value::<
7168 ::fidl_next::WireVector<'static, u8>,
7169 ___E,
7170 >(
7171 value, preallocated.encoder, &mut out, (64, ())
7172 )?;
7173 } else {
7174 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7175 }
7176 }
7177
7178 8 => {
7179 if let Some(value) = &self.options {
7180 ::fidl_next::WireEnvelope::encode_value::<
7181 crate::wire::VerificationOptions<'static>,
7182 ___E,
7183 >(
7184 value, preallocated.encoder, &mut out, ()
7185 )?;
7186 } else {
7187 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7188 }
7189 }
7190
7191 7 => {
7192 if let Some(value) = &self.change_time {
7193 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7194 value,
7195 preallocated.encoder,
7196 &mut out,
7197 (),
7198 )?;
7199 } else {
7200 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7201 }
7202 }
7203
7204 6 => {
7205 if let Some(value) = &self.id {
7206 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7207 value,
7208 preallocated.encoder,
7209 &mut out,
7210 (),
7211 )?;
7212 } else {
7213 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7214 }
7215 }
7216
7217 5 => {
7218 if let Some(value) = &self.link_count {
7219 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7220 value,
7221 preallocated.encoder,
7222 &mut out,
7223 (),
7224 )?;
7225 } else {
7226 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7227 }
7228 }
7229
7230 4 => {
7231 if let Some(value) = &self.storage_size {
7232 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7233 value,
7234 preallocated.encoder,
7235 &mut out,
7236 (),
7237 )?;
7238 } else {
7239 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7240 }
7241 }
7242
7243 3 => {
7244 if let Some(value) = &self.content_size {
7245 ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireU64, ___E>(
7246 value,
7247 preallocated.encoder,
7248 &mut out,
7249 (),
7250 )?;
7251 } else {
7252 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7253 }
7254 }
7255
7256 2 => {
7257 if let Some(value) = &self.abilities {
7258 ::fidl_next::WireEnvelope::encode_value::<crate::wire::Operations, ___E>(
7259 value,
7260 preallocated.encoder,
7261 &mut out,
7262 (),
7263 )?;
7264 } else {
7265 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7266 }
7267 }
7268
7269 1 => {
7270 if let Some(value) = &self.protocols {
7271 ::fidl_next::WireEnvelope::encode_value::<
7272 crate::wire::NodeProtocolKinds,
7273 ___E,
7274 >(
7275 value, preallocated.encoder, &mut out, ()
7276 )?;
7277 } else {
7278 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7279 }
7280 }
7281
7282 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7283 }
7284 unsafe {
7285 preallocated.write_next(out.assume_init_ref());
7286 }
7287 }
7288
7289 ::fidl_next::WireTable::encode_len(table, max_ord);
7290
7291 Ok(())
7292 }
7293 }
7294
7295 impl<'de> ::fidl_next::FromWire<crate::wire::ImmutableNodeAttributes<'de>>
7296 for ImmutableNodeAttributes
7297 {
7298 #[inline]
7299 fn from_wire(wire_: crate::wire::ImmutableNodeAttributes<'de>) -> Self {
7300 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7301
7302 let protocols = wire_.table.get(1);
7303
7304 let abilities = wire_.table.get(2);
7305
7306 let content_size = wire_.table.get(3);
7307
7308 let storage_size = wire_.table.get(4);
7309
7310 let link_count = wire_.table.get(5);
7311
7312 let id = wire_.table.get(6);
7313
7314 let change_time = wire_.table.get(7);
7315
7316 let options = wire_.table.get(8);
7317
7318 let root_hash = wire_.table.get(9);
7319
7320 let verity_enabled = wire_.table.get(10);
7321
7322 Self {
7323 protocols: protocols.map(|envelope| {
7324 ::fidl_next::FromWire::from_wire(unsafe {
7325 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
7326 })
7327 }),
7328
7329 abilities: abilities.map(|envelope| {
7330 ::fidl_next::FromWire::from_wire(unsafe {
7331 envelope.read_unchecked::<crate::wire::Operations>()
7332 })
7333 }),
7334
7335 content_size: content_size.map(|envelope| {
7336 ::fidl_next::FromWire::from_wire(unsafe {
7337 envelope.read_unchecked::<::fidl_next::WireU64>()
7338 })
7339 }),
7340
7341 storage_size: storage_size.map(|envelope| {
7342 ::fidl_next::FromWire::from_wire(unsafe {
7343 envelope.read_unchecked::<::fidl_next::WireU64>()
7344 })
7345 }),
7346
7347 link_count: link_count.map(|envelope| {
7348 ::fidl_next::FromWire::from_wire(unsafe {
7349 envelope.read_unchecked::<::fidl_next::WireU64>()
7350 })
7351 }),
7352
7353 id: id.map(|envelope| {
7354 ::fidl_next::FromWire::from_wire(unsafe {
7355 envelope.read_unchecked::<::fidl_next::WireU64>()
7356 })
7357 }),
7358
7359 change_time: change_time.map(|envelope| {
7360 ::fidl_next::FromWire::from_wire(unsafe {
7361 envelope.read_unchecked::<::fidl_next::WireU64>()
7362 })
7363 }),
7364
7365 options: options.map(|envelope| {
7366 ::fidl_next::FromWire::from_wire(unsafe {
7367 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
7368 })
7369 }),
7370
7371 root_hash: root_hash.map(|envelope| {
7372 ::fidl_next::FromWire::from_wire(unsafe {
7373 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
7374 })
7375 }),
7376
7377 verity_enabled: verity_enabled.map(|envelope| {
7378 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
7379 }),
7380 }
7381 }
7382 }
7383
7384 impl<'de> ::fidl_next::FromWireRef<crate::wire::ImmutableNodeAttributes<'de>>
7385 for ImmutableNodeAttributes
7386 {
7387 #[inline]
7388 fn from_wire_ref(wire: &crate::wire::ImmutableNodeAttributes<'de>) -> Self {
7389 Self {
7390 protocols: wire.table.get(1).map(|envelope| {
7391 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7392 envelope.deref_unchecked::<crate::wire::NodeProtocolKinds>()
7393 })
7394 }),
7395
7396 abilities: wire.table.get(2).map(|envelope| {
7397 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7398 envelope.deref_unchecked::<crate::wire::Operations>()
7399 })
7400 }),
7401
7402 content_size: wire.table.get(3).map(|envelope| {
7403 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7404 envelope.deref_unchecked::<::fidl_next::WireU64>()
7405 })
7406 }),
7407
7408 storage_size: wire.table.get(4).map(|envelope| {
7409 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7410 envelope.deref_unchecked::<::fidl_next::WireU64>()
7411 })
7412 }),
7413
7414 link_count: wire.table.get(5).map(|envelope| {
7415 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7416 envelope.deref_unchecked::<::fidl_next::WireU64>()
7417 })
7418 }),
7419
7420 id: wire.table.get(6).map(|envelope| {
7421 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7422 envelope.deref_unchecked::<::fidl_next::WireU64>()
7423 })
7424 }),
7425
7426 change_time: wire.table.get(7).map(|envelope| {
7427 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7428 envelope.deref_unchecked::<::fidl_next::WireU64>()
7429 })
7430 }),
7431
7432 options: wire.table.get(8).map(|envelope| {
7433 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7434 envelope.deref_unchecked::<crate::wire::VerificationOptions<'de>>()
7435 })
7436 }),
7437
7438 root_hash: wire.table.get(9).map(|envelope| {
7439 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7440 envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
7441 })
7442 }),
7443
7444 verity_enabled: wire.table.get(10).map(|envelope| {
7445 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7446 envelope.deref_unchecked::<bool>()
7447 })
7448 }),
7449 }
7450 }
7451 }
7452
7453 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7454 pub struct NodeAttributes2 {
7455 pub mutable_attributes: crate::natural::MutableNodeAttributes,
7456
7457 pub immutable_attributes: crate::natural::ImmutableNodeAttributes,
7458 }
7459
7460 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
7461 for NodeAttributes2
7462 where
7463 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7464 ___E: ::fidl_next::Encoder,
7465 {
7466 #[inline]
7467 fn encode(
7468 self,
7469 encoder_: &mut ___E,
7470 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
7471 _: (),
7472 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7473 ::fidl_next::munge! {
7474 let crate::wire::NodeAttributes2 {
7475 mutable_attributes,
7476 immutable_attributes,
7477
7478 } = out_;
7479 }
7480
7481 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
7482
7483 let mut _field =
7484 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
7485
7486 ::fidl_next::Encode::encode(
7487 self.immutable_attributes,
7488 encoder_,
7489 immutable_attributes,
7490 (),
7491 )?;
7492
7493 let mut _field =
7494 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
7495
7496 Ok(())
7497 }
7498 }
7499
7500 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
7501 for &'a NodeAttributes2
7502 where
7503 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7504 ___E: ::fidl_next::Encoder,
7505 {
7506 #[inline]
7507 fn encode(
7508 self,
7509 encoder_: &mut ___E,
7510 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
7511 _: (),
7512 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7513 ::fidl_next::munge! {
7514 let crate::wire::NodeAttributes2 {
7515
7516 mutable_attributes,
7517 immutable_attributes,
7518
7519 } = out_;
7520 }
7521
7522 ::fidl_next::Encode::encode(
7523 &self.mutable_attributes,
7524 encoder_,
7525 mutable_attributes,
7526 (),
7527 )?;
7528
7529 let mut _field =
7530 unsafe { ::fidl_next::Slot::new_unchecked(mutable_attributes.as_mut_ptr()) };
7531
7532 ::fidl_next::Encode::encode(
7533 &self.immutable_attributes,
7534 encoder_,
7535 immutable_attributes,
7536 (),
7537 )?;
7538
7539 let mut _field =
7540 unsafe { ::fidl_next::Slot::new_unchecked(immutable_attributes.as_mut_ptr()) };
7541
7542 Ok(())
7543 }
7544 }
7545
7546 unsafe impl<___E>
7547 ::fidl_next::EncodeOption<
7548 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes2<'static>>,
7549 ___E,
7550 > for NodeAttributes2
7551 where
7552 ___E: ::fidl_next::Encoder + ?Sized,
7553 NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
7554 {
7555 #[inline]
7556 fn encode_option(
7557 this: ::core::option::Option<Self>,
7558 encoder: &mut ___E,
7559 out: &mut ::core::mem::MaybeUninit<
7560 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes2<'static>>,
7561 >,
7562 _: (),
7563 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7564 if let Some(inner) = this {
7565 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
7566 ::fidl_next::WireBox::encode_present(out);
7567 } else {
7568 ::fidl_next::WireBox::encode_absent(out);
7569 }
7570
7571 Ok(())
7572 }
7573 }
7574
7575 unsafe impl<'a, ___E>
7576 ::fidl_next::EncodeOption<
7577 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes2<'static>>,
7578 ___E,
7579 > for &'a NodeAttributes2
7580 where
7581 ___E: ::fidl_next::Encoder + ?Sized,
7582 &'a NodeAttributes2: ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>,
7583 {
7584 #[inline]
7585 fn encode_option(
7586 this: ::core::option::Option<Self>,
7587 encoder: &mut ___E,
7588 out: &mut ::core::mem::MaybeUninit<
7589 ::fidl_next::WireBox<'static, crate::wire::NodeAttributes2<'static>>,
7590 >,
7591 _: (),
7592 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7593 if let Some(inner) = this {
7594 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
7595 ::fidl_next::WireBox::encode_present(out);
7596 } else {
7597 ::fidl_next::WireBox::encode_absent(out);
7598 }
7599
7600 Ok(())
7601 }
7602 }
7603
7604 impl<'de> ::fidl_next::FromWire<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
7605 #[inline]
7606 fn from_wire(wire: crate::wire::NodeAttributes2<'de>) -> Self {
7607 Self {
7608 mutable_attributes: ::fidl_next::FromWire::from_wire(wire.mutable_attributes),
7609
7610 immutable_attributes: ::fidl_next::FromWire::from_wire(wire.immutable_attributes),
7611 }
7612 }
7613 }
7614
7615 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeAttributes2<'de>> for NodeAttributes2 {
7616 #[inline]
7617 fn from_wire_ref(wire: &crate::wire::NodeAttributes2<'de>) -> Self {
7618 Self {
7619 mutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
7620 &wire.mutable_attributes,
7621 ),
7622
7623 immutable_attributes: ::fidl_next::FromWireRef::from_wire_ref(
7624 &wire.immutable_attributes,
7625 ),
7626 }
7627 }
7628 }
7629
7630 #[doc = " Information that describes the target node.\n"]
7631 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7632 pub struct NodeInfo {
7633 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
7634 }
7635
7636 impl NodeInfo {
7637 fn __max_ordinal(&self) -> usize {
7638 if self.attributes.is_some() {
7639 return 1;
7640 }
7641
7642 0
7643 }
7644 }
7645
7646 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for NodeInfo
7647 where
7648 ___E: ::fidl_next::Encoder + ?Sized,
7649 {
7650 #[inline]
7651 fn encode(
7652 mut self,
7653 encoder: &mut ___E,
7654 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
7655 _: (),
7656 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7657 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
7658
7659 let max_ord = self.__max_ordinal();
7660
7661 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7662 ::fidl_next::Wire::zero_padding(&mut out);
7663
7664 let mut preallocated =
7665 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7666
7667 for i in 1..=max_ord {
7668 match i {
7669 1 => {
7670 if let Some(value) = self.attributes.take() {
7671 ::fidl_next::WireEnvelope::encode_value::<
7672 crate::wire::NodeAttributes2<'static>,
7673 ___E,
7674 >(
7675 value, preallocated.encoder, &mut out, ()
7676 )?;
7677 } else {
7678 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7679 }
7680 }
7681
7682 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7683 }
7684 unsafe {
7685 preallocated.write_next(out.assume_init_ref());
7686 }
7687 }
7688
7689 ::fidl_next::WireTable::encode_len(table, max_ord);
7690
7691 Ok(())
7692 }
7693 }
7694
7695 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeInfo<'static>, ___E> for &'a NodeInfo
7696 where
7697 ___E: ::fidl_next::Encoder + ?Sized,
7698 {
7699 #[inline]
7700 fn encode(
7701 self,
7702 encoder: &mut ___E,
7703 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfo<'static>>,
7704 _: (),
7705 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7706 ::fidl_next::munge!(let crate::wire::NodeInfo { table } = out);
7707
7708 let max_ord = self.__max_ordinal();
7709
7710 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7711 ::fidl_next::Wire::zero_padding(&mut out);
7712
7713 let mut preallocated =
7714 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7715
7716 for i in 1..=max_ord {
7717 match i {
7718 1 => {
7719 if let Some(value) = &self.attributes {
7720 ::fidl_next::WireEnvelope::encode_value::<
7721 crate::wire::NodeAttributes2<'static>,
7722 ___E,
7723 >(
7724 value, preallocated.encoder, &mut out, ()
7725 )?;
7726 } else {
7727 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7728 }
7729 }
7730
7731 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7732 }
7733 unsafe {
7734 preallocated.write_next(out.assume_init_ref());
7735 }
7736 }
7737
7738 ::fidl_next::WireTable::encode_len(table, max_ord);
7739
7740 Ok(())
7741 }
7742 }
7743
7744 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfo<'de>> for NodeInfo {
7745 #[inline]
7746 fn from_wire(wire_: crate::wire::NodeInfo<'de>) -> Self {
7747 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7748
7749 let attributes = wire_.table.get(1);
7750
7751 Self {
7752 attributes: attributes.map(|envelope| {
7753 ::fidl_next::FromWire::from_wire(unsafe {
7754 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
7755 })
7756 }),
7757 }
7758 }
7759 }
7760
7761 impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeInfo<'de>> for NodeInfo {
7762 #[inline]
7763 fn from_wire_ref(wire: &crate::wire::NodeInfo<'de>) -> Self {
7764 Self {
7765 attributes: wire.table.get(1).map(|envelope| {
7766 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7767 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
7768 })
7769 }),
7770 }
7771 }
7772 }
7773
7774 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7775 pub struct DirectoryInfo {
7776 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
7777 }
7778
7779 impl DirectoryInfo {
7780 fn __max_ordinal(&self) -> usize {
7781 if self.attributes.is_some() {
7782 return 1;
7783 }
7784
7785 0
7786 }
7787 }
7788
7789 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E> for DirectoryInfo
7790 where
7791 ___E: ::fidl_next::Encoder + ?Sized,
7792 {
7793 #[inline]
7794 fn encode(
7795 mut self,
7796 encoder: &mut ___E,
7797 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
7798 _: (),
7799 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7800 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
7801
7802 let max_ord = self.__max_ordinal();
7803
7804 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7805 ::fidl_next::Wire::zero_padding(&mut out);
7806
7807 let mut preallocated =
7808 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7809
7810 for i in 1..=max_ord {
7811 match i {
7812 1 => {
7813 if let Some(value) = self.attributes.take() {
7814 ::fidl_next::WireEnvelope::encode_value::<
7815 crate::wire::NodeAttributes2<'static>,
7816 ___E,
7817 >(
7818 value, preallocated.encoder, &mut out, ()
7819 )?;
7820 } else {
7821 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7822 }
7823 }
7824
7825 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7826 }
7827 unsafe {
7828 preallocated.write_next(out.assume_init_ref());
7829 }
7830 }
7831
7832 ::fidl_next::WireTable::encode_len(table, max_ord);
7833
7834 Ok(())
7835 }
7836 }
7837
7838 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryInfo<'static>, ___E>
7839 for &'a DirectoryInfo
7840 where
7841 ___E: ::fidl_next::Encoder + ?Sized,
7842 {
7843 #[inline]
7844 fn encode(
7845 self,
7846 encoder: &mut ___E,
7847 out: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryInfo<'static>>,
7848 _: (),
7849 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7850 ::fidl_next::munge!(let crate::wire::DirectoryInfo { table } = out);
7851
7852 let max_ord = self.__max_ordinal();
7853
7854 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7855 ::fidl_next::Wire::zero_padding(&mut out);
7856
7857 let mut preallocated =
7858 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7859
7860 for i in 1..=max_ord {
7861 match i {
7862 1 => {
7863 if let Some(value) = &self.attributes {
7864 ::fidl_next::WireEnvelope::encode_value::<
7865 crate::wire::NodeAttributes2<'static>,
7866 ___E,
7867 >(
7868 value, preallocated.encoder, &mut out, ()
7869 )?;
7870 } else {
7871 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7872 }
7873 }
7874
7875 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7876 }
7877 unsafe {
7878 preallocated.write_next(out.assume_init_ref());
7879 }
7880 }
7881
7882 ::fidl_next::WireTable::encode_len(table, max_ord);
7883
7884 Ok(())
7885 }
7886 }
7887
7888 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
7889 #[inline]
7890 fn from_wire(wire_: crate::wire::DirectoryInfo<'de>) -> Self {
7891 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7892
7893 let attributes = wire_.table.get(1);
7894
7895 Self {
7896 attributes: attributes.map(|envelope| {
7897 ::fidl_next::FromWire::from_wire(unsafe {
7898 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
7899 })
7900 }),
7901 }
7902 }
7903 }
7904
7905 impl<'de> ::fidl_next::FromWireRef<crate::wire::DirectoryInfo<'de>> for DirectoryInfo {
7906 #[inline]
7907 fn from_wire_ref(wire: &crate::wire::DirectoryInfo<'de>) -> Self {
7908 Self {
7909 attributes: wire.table.get(1).map(|envelope| {
7910 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7911 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
7912 })
7913 }),
7914 }
7915 }
7916 }
7917
7918 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7919 pub struct SymlinkInfo {
7920 pub target: ::core::option::Option<::std::vec::Vec<u8>>,
7921
7922 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
7923 }
7924
7925 impl SymlinkInfo {
7926 fn __max_ordinal(&self) -> usize {
7927 if self.attributes.is_some() {
7928 return 2;
7929 }
7930
7931 if self.target.is_some() {
7932 return 1;
7933 }
7934
7935 0
7936 }
7937 }
7938
7939 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E> for SymlinkInfo
7940 where
7941 ___E: ::fidl_next::Encoder + ?Sized,
7942 {
7943 #[inline]
7944 fn encode(
7945 mut self,
7946 encoder: &mut ___E,
7947 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
7948 _: (),
7949 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7950 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
7951
7952 let max_ord = self.__max_ordinal();
7953
7954 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
7955 ::fidl_next::Wire::zero_padding(&mut out);
7956
7957 let mut preallocated =
7958 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
7959
7960 for i in 1..=max_ord {
7961 match i {
7962 2 => {
7963 if let Some(value) = self.attributes.take() {
7964 ::fidl_next::WireEnvelope::encode_value::<
7965 crate::wire::NodeAttributes2<'static>,
7966 ___E,
7967 >(
7968 value, preallocated.encoder, &mut out, ()
7969 )?;
7970 } else {
7971 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7972 }
7973 }
7974
7975 1 => {
7976 if let Some(value) = self.target.take() {
7977 ::fidl_next::WireEnvelope::encode_value::<
7978 ::fidl_next::WireVector<'static, u8>,
7979 ___E,
7980 >(
7981 value, preallocated.encoder, &mut out, (4095, ())
7982 )?;
7983 } else {
7984 ::fidl_next::WireEnvelope::encode_zero(&mut out)
7985 }
7986 }
7987
7988 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
7989 }
7990 unsafe {
7991 preallocated.write_next(out.assume_init_ref());
7992 }
7993 }
7994
7995 ::fidl_next::WireTable::encode_len(table, max_ord);
7996
7997 Ok(())
7998 }
7999 }
8000
8001 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkInfo<'static>, ___E>
8002 for &'a SymlinkInfo
8003 where
8004 ___E: ::fidl_next::Encoder + ?Sized,
8005 {
8006 #[inline]
8007 fn encode(
8008 self,
8009 encoder: &mut ___E,
8010 out: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkInfo<'static>>,
8011 _: (),
8012 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8013 ::fidl_next::munge!(let crate::wire::SymlinkInfo { table } = out);
8014
8015 let max_ord = self.__max_ordinal();
8016
8017 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8018 ::fidl_next::Wire::zero_padding(&mut out);
8019
8020 let mut preallocated =
8021 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8022
8023 for i in 1..=max_ord {
8024 match i {
8025 2 => {
8026 if let Some(value) = &self.attributes {
8027 ::fidl_next::WireEnvelope::encode_value::<
8028 crate::wire::NodeAttributes2<'static>,
8029 ___E,
8030 >(
8031 value, preallocated.encoder, &mut out, ()
8032 )?;
8033 } else {
8034 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8035 }
8036 }
8037
8038 1 => {
8039 if let Some(value) = &self.target {
8040 ::fidl_next::WireEnvelope::encode_value::<
8041 ::fidl_next::WireVector<'static, u8>,
8042 ___E,
8043 >(
8044 value, preallocated.encoder, &mut out, (4095, ())
8045 )?;
8046 } else {
8047 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8048 }
8049 }
8050
8051 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8052 }
8053 unsafe {
8054 preallocated.write_next(out.assume_init_ref());
8055 }
8056 }
8057
8058 ::fidl_next::WireTable::encode_len(table, max_ord);
8059
8060 Ok(())
8061 }
8062 }
8063
8064 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
8065 #[inline]
8066 fn from_wire(wire_: crate::wire::SymlinkInfo<'de>) -> Self {
8067 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8068
8069 let target = wire_.table.get(1);
8070
8071 let attributes = wire_.table.get(2);
8072
8073 Self {
8074 target: target.map(|envelope| {
8075 ::fidl_next::FromWire::from_wire(unsafe {
8076 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
8077 })
8078 }),
8079
8080 attributes: attributes.map(|envelope| {
8081 ::fidl_next::FromWire::from_wire(unsafe {
8082 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
8083 })
8084 }),
8085 }
8086 }
8087 }
8088
8089 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkInfo<'de>> for SymlinkInfo {
8090 #[inline]
8091 fn from_wire_ref(wire: &crate::wire::SymlinkInfo<'de>) -> Self {
8092 Self {
8093 target: wire.table.get(1).map(|envelope| {
8094 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8095 envelope.deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
8096 })
8097 }),
8098
8099 attributes: wire.table.get(2).map(|envelope| {
8100 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8101 envelope.deref_unchecked::<crate::wire::NodeAttributes2<'de>>()
8102 })
8103 }),
8104 }
8105 }
8106 }
8107
8108 ::fidl_next::bitflags::bitflags! {
8109 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct NodeAttributesQuery: u64 {
8110 #[doc = " Requests [`NodeAttributes.protocols`].\n"]const PROTOCOLS = 1;
8111 #[doc = " Requests [`NodeAttributes.abilities`].\n"]const ABILITIES = 2;
8112 #[doc = " Requests [`NodeAttributes.content_size`].\n"]const CONTENT_SIZE = 4;
8113 #[doc = " Requests [`NodeAttributes.storage_size`].\n"]const STORAGE_SIZE = 8;
8114 #[doc = " Requests [`NodeAttributes.link_count`].\n"]const LINK_COUNT = 16;
8115 #[doc = " Requests [`NodeAttributes.id`].\n"]const ID = 32;
8116 #[doc = " Requests [`NodeAttributes.creation_time`].\n"]const CREATION_TIME = 64;
8117 #[doc = " Requests [`NodeAttributes.modification_time`].\n"]const MODIFICATION_TIME = 128;
8118 #[doc = " Posix attributes.\n"]const MODE = 256;
8119 const UID = 512;
8120 const GID = 1024;
8121 const RDEV = 2048;
8122 const ACCESS_TIME = 4096;
8123 const CHANGE_TIME = 8192;
8124 #[doc = " Verity attributes.\n"]const OPTIONS = 16384;
8125 const ROOT_HASH = 32768;
8126 const VERITY_ENABLED = 65536;
8127 #[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;
8128 #[doc = " Requests [`MutableNodeAttributes.selinux_context`]. See that field for more detail.\n"]const SELINUX_CONTEXT = 262144;
8129 #[doc = " fscrypt attribute.\n"]const WRAPPING_KEY_ID = 524288;
8130 #[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;
8131 const _ = !0;
8132 }
8133 }
8134
8135 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
8136 for NodeAttributesQuery
8137 where
8138 ___E: ?Sized,
8139 {
8140 #[inline]
8141 fn encode(
8142 self,
8143 encoder: &mut ___E,
8144 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
8145 _: (),
8146 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8147 ::fidl_next::Encode::encode(&self, encoder, out, ())
8148 }
8149 }
8150
8151 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>
8152 for &'a NodeAttributesQuery
8153 where
8154 ___E: ?Sized,
8155 {
8156 #[inline]
8157 fn encode(
8158 self,
8159 _: &mut ___E,
8160 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributesQuery>,
8161 _: (),
8162 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8163 ::fidl_next::munge!(let crate::wire::NodeAttributesQuery { value } = out);
8164
8165 let _ = value.write(::fidl_next::WireU64::from(self.bits()));
8166 Ok(())
8167 }
8168 }
8169
8170 impl ::core::convert::From<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
8171 fn from(wire: crate::wire::NodeAttributesQuery) -> Self {
8172 Self::from_bits_retain(u64::from(wire.value))
8173 }
8174 }
8175
8176 impl ::fidl_next::FromWire<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
8177 #[inline]
8178 fn from_wire(wire: crate::wire::NodeAttributesQuery) -> Self {
8179 Self::from(wire)
8180 }
8181 }
8182
8183 impl ::fidl_next::FromWireRef<crate::wire::NodeAttributesQuery> for NodeAttributesQuery {
8184 #[inline]
8185 fn from_wire_ref(wire: &crate::wire::NodeAttributesQuery) -> Self {
8186 Self::from(*wire)
8187 }
8188 }
8189
8190 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8191 #[repr(C)]
8192 pub struct NodeGetAttributesRequest {
8193 pub query: crate::natural::NodeAttributesQuery,
8194 }
8195
8196 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
8197 for NodeGetAttributesRequest
8198 where
8199 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8200 {
8201 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8202 Self,
8203 crate::wire::NodeGetAttributesRequest,
8204 > = unsafe {
8205 ::fidl_next::CopyOptimization::enable_if(
8206 true && <crate::natural::NodeAttributesQuery as ::fidl_next::Encode<
8207 crate::wire::NodeAttributesQuery,
8208 ___E,
8209 >>::COPY_OPTIMIZATION
8210 .is_enabled(),
8211 )
8212 };
8213
8214 #[inline]
8215 fn encode(
8216 self,
8217 encoder_: &mut ___E,
8218 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
8219 _: (),
8220 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8221 ::fidl_next::munge! {
8222 let crate::wire::NodeGetAttributesRequest {
8223 query,
8224
8225 } = out_;
8226 }
8227
8228 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
8229
8230 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
8231
8232 Ok(())
8233 }
8234 }
8235
8236 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
8237 for &'a NodeGetAttributesRequest
8238 where
8239 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8240 {
8241 #[inline]
8242 fn encode(
8243 self,
8244 encoder_: &mut ___E,
8245 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
8246 _: (),
8247 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8248 ::fidl_next::munge! {
8249 let crate::wire::NodeGetAttributesRequest {
8250
8251 query,
8252
8253 } = out_;
8254 }
8255
8256 ::fidl_next::Encode::encode(&self.query, encoder_, query, ())?;
8257
8258 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(query.as_mut_ptr()) };
8259
8260 Ok(())
8261 }
8262 }
8263
8264 unsafe impl<___E>
8265 ::fidl_next::EncodeOption<
8266 ::fidl_next::WireBox<'static, crate::wire::NodeGetAttributesRequest>,
8267 ___E,
8268 > for NodeGetAttributesRequest
8269 where
8270 ___E: ::fidl_next::Encoder + ?Sized,
8271 NodeGetAttributesRequest: ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
8272 {
8273 #[inline]
8274 fn encode_option(
8275 this: ::core::option::Option<Self>,
8276 encoder: &mut ___E,
8277 out: &mut ::core::mem::MaybeUninit<
8278 ::fidl_next::WireBox<'static, crate::wire::NodeGetAttributesRequest>,
8279 >,
8280 _: (),
8281 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8282 if let Some(inner) = this {
8283 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8284 ::fidl_next::WireBox::encode_present(out);
8285 } else {
8286 ::fidl_next::WireBox::encode_absent(out);
8287 }
8288
8289 Ok(())
8290 }
8291 }
8292
8293 unsafe impl<'a, ___E>
8294 ::fidl_next::EncodeOption<
8295 ::fidl_next::WireBox<'static, crate::wire::NodeGetAttributesRequest>,
8296 ___E,
8297 > for &'a NodeGetAttributesRequest
8298 where
8299 ___E: ::fidl_next::Encoder + ?Sized,
8300 &'a NodeGetAttributesRequest:
8301 ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>,
8302 {
8303 #[inline]
8304 fn encode_option(
8305 this: ::core::option::Option<Self>,
8306 encoder: &mut ___E,
8307 out: &mut ::core::mem::MaybeUninit<
8308 ::fidl_next::WireBox<'static, crate::wire::NodeGetAttributesRequest>,
8309 >,
8310 _: (),
8311 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8312 if let Some(inner) = this {
8313 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8314 ::fidl_next::WireBox::encode_present(out);
8315 } else {
8316 ::fidl_next::WireBox::encode_absent(out);
8317 }
8318
8319 Ok(())
8320 }
8321 }
8322
8323 impl ::fidl_next::FromWire<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
8324 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8325 crate::wire::NodeGetAttributesRequest,
8326 Self,
8327 > = unsafe {
8328 ::fidl_next::CopyOptimization::enable_if(
8329 true && <crate::natural::NodeAttributesQuery as ::fidl_next::FromWire<
8330 crate::wire::NodeAttributesQuery,
8331 >>::COPY_OPTIMIZATION
8332 .is_enabled(),
8333 )
8334 };
8335
8336 #[inline]
8337 fn from_wire(wire: crate::wire::NodeGetAttributesRequest) -> Self {
8338 Self { query: ::fidl_next::FromWire::from_wire(wire.query) }
8339 }
8340 }
8341
8342 impl ::fidl_next::FromWireRef<crate::wire::NodeGetAttributesRequest> for NodeGetAttributesRequest {
8343 #[inline]
8344 fn from_wire_ref(wire: &crate::wire::NodeGetAttributesRequest) -> Self {
8345 Self { query: ::fidl_next::FromWireRef::from_wire_ref(&wire.query) }
8346 }
8347 }
8348
8349 #[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"]
8350 #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8351 pub struct Options {
8352 pub attributes: ::core::option::Option<crate::natural::NodeAttributesQuery>,
8353
8354 pub create_attributes: ::core::option::Option<crate::natural::MutableNodeAttributes>,
8355 }
8356
8357 impl Options {
8358 fn __max_ordinal(&self) -> usize {
8359 if self.create_attributes.is_some() {
8360 return 2;
8361 }
8362
8363 if self.attributes.is_some() {
8364 return 1;
8365 }
8366
8367 0
8368 }
8369 }
8370
8371 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for Options
8372 where
8373 ___E: ::fidl_next::Encoder + ?Sized,
8374 {
8375 #[inline]
8376 fn encode(
8377 mut self,
8378 encoder: &mut ___E,
8379 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
8380 _: (),
8381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8382 ::fidl_next::munge!(let crate::wire::Options { table } = out);
8383
8384 let max_ord = self.__max_ordinal();
8385
8386 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8387 ::fidl_next::Wire::zero_padding(&mut out);
8388
8389 let mut preallocated =
8390 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8391
8392 for i in 1..=max_ord {
8393 match i {
8394 2 => {
8395 if let Some(value) = self.create_attributes.take() {
8396 ::fidl_next::WireEnvelope::encode_value::<
8397 crate::wire::MutableNodeAttributes<'static>,
8398 ___E,
8399 >(
8400 value, preallocated.encoder, &mut out, ()
8401 )?;
8402 } else {
8403 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8404 }
8405 }
8406
8407 1 => {
8408 if let Some(value) = self.attributes.take() {
8409 ::fidl_next::WireEnvelope::encode_value::<
8410 crate::wire::NodeAttributesQuery,
8411 ___E,
8412 >(
8413 value, preallocated.encoder, &mut out, ()
8414 )?;
8415 } else {
8416 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8417 }
8418 }
8419
8420 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8421 }
8422 unsafe {
8423 preallocated.write_next(out.assume_init_ref());
8424 }
8425 }
8426
8427 ::fidl_next::WireTable::encode_len(table, max_ord);
8428
8429 Ok(())
8430 }
8431 }
8432
8433 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Options<'static>, ___E> for &'a Options
8434 where
8435 ___E: ::fidl_next::Encoder + ?Sized,
8436 {
8437 #[inline]
8438 fn encode(
8439 self,
8440 encoder: &mut ___E,
8441 out: &mut ::core::mem::MaybeUninit<crate::wire::Options<'static>>,
8442 _: (),
8443 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8444 ::fidl_next::munge!(let crate::wire::Options { table } = out);
8445
8446 let max_ord = self.__max_ordinal();
8447
8448 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8449 ::fidl_next::Wire::zero_padding(&mut out);
8450
8451 let mut preallocated =
8452 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8453
8454 for i in 1..=max_ord {
8455 match i {
8456 2 => {
8457 if let Some(value) = &self.create_attributes {
8458 ::fidl_next::WireEnvelope::encode_value::<
8459 crate::wire::MutableNodeAttributes<'static>,
8460 ___E,
8461 >(
8462 value, preallocated.encoder, &mut out, ()
8463 )?;
8464 } else {
8465 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8466 }
8467 }
8468
8469 1 => {
8470 if let Some(value) = &self.attributes {
8471 ::fidl_next::WireEnvelope::encode_value::<
8472 crate::wire::NodeAttributesQuery,
8473 ___E,
8474 >(
8475 value, preallocated.encoder, &mut out, ()
8476 )?;
8477 } else {
8478 ::fidl_next::WireEnvelope::encode_zero(&mut out)
8479 }
8480 }
8481
8482 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8483 }
8484 unsafe {
8485 preallocated.write_next(out.assume_init_ref());
8486 }
8487 }
8488
8489 ::fidl_next::WireTable::encode_len(table, max_ord);
8490
8491 Ok(())
8492 }
8493 }
8494
8495 impl<'de> ::fidl_next::FromWire<crate::wire::Options<'de>> for Options {
8496 #[inline]
8497 fn from_wire(wire_: crate::wire::Options<'de>) -> Self {
8498 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8499
8500 let attributes = wire_.table.get(1);
8501
8502 let create_attributes = wire_.table.get(2);
8503
8504 Self {
8505 attributes: attributes.map(|envelope| {
8506 ::fidl_next::FromWire::from_wire(unsafe {
8507 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
8508 })
8509 }),
8510
8511 create_attributes: create_attributes.map(|envelope| {
8512 ::fidl_next::FromWire::from_wire(unsafe {
8513 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
8514 })
8515 }),
8516 }
8517 }
8518 }
8519
8520 impl<'de> ::fidl_next::FromWireRef<crate::wire::Options<'de>> for Options {
8521 #[inline]
8522 fn from_wire_ref(wire: &crate::wire::Options<'de>) -> Self {
8523 Self {
8524 attributes: wire.table.get(1).map(|envelope| {
8525 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8526 envelope.deref_unchecked::<crate::wire::NodeAttributesQuery>()
8527 })
8528 }),
8529
8530 create_attributes: wire.table.get(2).map(|envelope| {
8531 ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8532 envelope.deref_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
8533 })
8534 }),
8535 }
8536 }
8537 }
8538
8539 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8540 #[repr(C)]
8541 pub struct DirectoryObject {}
8542
8543 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryObject, ___E> for DirectoryObject
8544 where
8545 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8546 {
8547 #[inline]
8548 fn encode(
8549 self,
8550 encoder_: &mut ___E,
8551 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryObject>,
8552 _: (),
8553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8554 *out_ = ::core::mem::MaybeUninit::zeroed();
8555
8556 Ok(())
8557 }
8558 }
8559
8560 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirectoryObject, ___E>
8561 for &'a DirectoryObject
8562 where
8563 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8564 {
8565 #[inline]
8566 fn encode(
8567 self,
8568 encoder_: &mut ___E,
8569 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryObject>,
8570 _: (),
8571 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8572 ::fidl_next::munge! {
8573 let crate::wire::DirectoryObject {
8574
8575 _empty,
8576
8577
8578 } = out_;
8579 }
8580
8581 Ok(())
8582 }
8583 }
8584
8585 unsafe impl<___E>
8586 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::DirectoryObject>, ___E>
8587 for DirectoryObject
8588 where
8589 ___E: ::fidl_next::Encoder + ?Sized,
8590 DirectoryObject: ::fidl_next::Encode<crate::wire::DirectoryObject, ___E>,
8591 {
8592 #[inline]
8593 fn encode_option(
8594 this: ::core::option::Option<Self>,
8595 encoder: &mut ___E,
8596 out: &mut ::core::mem::MaybeUninit<
8597 ::fidl_next::WireBox<'static, crate::wire::DirectoryObject>,
8598 >,
8599 _: (),
8600 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8601 if let Some(inner) = this {
8602 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8603 ::fidl_next::WireBox::encode_present(out);
8604 } else {
8605 ::fidl_next::WireBox::encode_absent(out);
8606 }
8607
8608 Ok(())
8609 }
8610 }
8611
8612 unsafe impl<'a, ___E>
8613 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::DirectoryObject>, ___E>
8614 for &'a DirectoryObject
8615 where
8616 ___E: ::fidl_next::Encoder + ?Sized,
8617 &'a DirectoryObject: ::fidl_next::Encode<crate::wire::DirectoryObject, ___E>,
8618 {
8619 #[inline]
8620 fn encode_option(
8621 this: ::core::option::Option<Self>,
8622 encoder: &mut ___E,
8623 out: &mut ::core::mem::MaybeUninit<
8624 ::fidl_next::WireBox<'static, crate::wire::DirectoryObject>,
8625 >,
8626 _: (),
8627 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8628 if let Some(inner) = this {
8629 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8630 ::fidl_next::WireBox::encode_present(out);
8631 } else {
8632 ::fidl_next::WireBox::encode_absent(out);
8633 }
8634
8635 Ok(())
8636 }
8637 }
8638
8639 impl ::fidl_next::FromWire<crate::wire::DirectoryObject> for DirectoryObject {
8640 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::DirectoryObject, Self> =
8641 unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
8642
8643 #[inline]
8644 fn from_wire(wire: crate::wire::DirectoryObject) -> Self {
8645 Self {}
8646 }
8647 }
8648
8649 impl ::fidl_next::FromWireRef<crate::wire::DirectoryObject> for DirectoryObject {
8650 #[inline]
8651 fn from_wire_ref(wire: &crate::wire::DirectoryObject) -> Self {
8652 Self {}
8653 }
8654 }
8655
8656 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8657 #[repr(u8)]
8658 pub enum DirentType {
8659 Unknown = 0,
8660 Directory = 4,
8661 BlockDevice = 6,
8662 File = 8,
8663 Symlink = 10,
8664 Service = 16,
8665 UnknownOrdinal_(u8) = 17,
8666 }
8667 impl ::std::convert::From<u8> for DirentType {
8668 fn from(value: u8) -> Self {
8669 match value {
8670 0 => Self::Unknown,
8671 4 => Self::Directory,
8672 6 => Self::BlockDevice,
8673 8 => Self::File,
8674 10 => Self::Symlink,
8675 16 => Self::Service,
8676
8677 _ => Self::UnknownOrdinal_(value),
8678 }
8679 }
8680 }
8681
8682 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for DirentType
8683 where
8684 ___E: ?Sized,
8685 {
8686 #[inline]
8687 fn encode(
8688 self,
8689 encoder: &mut ___E,
8690 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
8691 _: (),
8692 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8693 ::fidl_next::Encode::encode(&self, encoder, out, ())
8694 }
8695 }
8696
8697 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DirentType, ___E> for &'a DirentType
8698 where
8699 ___E: ?Sized,
8700 {
8701 #[inline]
8702 fn encode(
8703 self,
8704 encoder: &mut ___E,
8705 out: &mut ::core::mem::MaybeUninit<crate::wire::DirentType>,
8706 _: (),
8707 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8708 ::fidl_next::munge!(let crate::wire::DirentType { value } = out);
8709 let _ = value.write(u8::from(match *self {
8710 DirentType::Unknown => 0,
8711
8712 DirentType::Directory => 4,
8713
8714 DirentType::BlockDevice => 6,
8715
8716 DirentType::File => 8,
8717
8718 DirentType::Symlink => 10,
8719
8720 DirentType::Service => 16,
8721
8722 DirentType::UnknownOrdinal_(value) => value,
8723 }));
8724
8725 Ok(())
8726 }
8727 }
8728
8729 impl ::core::convert::From<crate::wire::DirentType> for DirentType {
8730 fn from(wire: crate::wire::DirentType) -> Self {
8731 match u8::from(wire.value) {
8732 0 => Self::Unknown,
8733
8734 4 => Self::Directory,
8735
8736 6 => Self::BlockDevice,
8737
8738 8 => Self::File,
8739
8740 10 => Self::Symlink,
8741
8742 16 => Self::Service,
8743
8744 value => Self::UnknownOrdinal_(value),
8745 }
8746 }
8747 }
8748
8749 impl ::fidl_next::FromWire<crate::wire::DirentType> for DirentType {
8750 #[inline]
8751 fn from_wire(wire: crate::wire::DirentType) -> Self {
8752 Self::from(wire)
8753 }
8754 }
8755
8756 impl ::fidl_next::FromWireRef<crate::wire::DirentType> for DirentType {
8757 #[inline]
8758 fn from_wire_ref(wire: &crate::wire::DirentType) -> Self {
8759 Self::from(*wire)
8760 }
8761 }
8762
8763 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8764 pub struct ExtendedAttributeIteratorGetNextResponse {
8765 pub attributes: ::std::vec::Vec<::std::vec::Vec<u8>>,
8766
8767 pub last: bool,
8768 }
8769
8770 unsafe impl<___E>
8771 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
8772 for ExtendedAttributeIteratorGetNextResponse
8773 where
8774 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8775 ___E: ::fidl_next::Encoder,
8776 {
8777 #[inline]
8778 fn encode(
8779 self,
8780 encoder_: &mut ___E,
8781 out_: &mut ::core::mem::MaybeUninit<
8782 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8783 >,
8784 _: (),
8785 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8786 ::fidl_next::munge! {
8787 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
8788 attributes,
8789 last,
8790
8791 } = out_;
8792 }
8793
8794 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
8795
8796 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
8797 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
8798
8799 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
8800
8801 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
8802
8803 Ok(())
8804 }
8805 }
8806
8807 unsafe impl<'a, ___E>
8808 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
8809 for &'a ExtendedAttributeIteratorGetNextResponse
8810 where
8811 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8812 ___E: ::fidl_next::Encoder,
8813 {
8814 #[inline]
8815 fn encode(
8816 self,
8817 encoder_: &mut ___E,
8818 out_: &mut ::core::mem::MaybeUninit<
8819 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8820 >,
8821 _: (),
8822 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8823 ::fidl_next::munge! {
8824 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
8825
8826 attributes,
8827 last,
8828
8829 } = out_;
8830 }
8831
8832 ::fidl_next::Encode::encode(&self.attributes, encoder_, attributes, (128, (255, ())))?;
8833
8834 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(attributes.as_mut_ptr()) };
8835 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
8836
8837 ::fidl_next::Encode::encode(&self.last, encoder_, last, ())?;
8838
8839 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(last.as_mut_ptr()) };
8840
8841 Ok(())
8842 }
8843 }
8844
8845 unsafe impl<___E>
8846 ::fidl_next::EncodeOption<
8847 ::fidl_next::WireBox<
8848 'static,
8849 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8850 >,
8851 ___E,
8852 > for ExtendedAttributeIteratorGetNextResponse
8853 where
8854 ___E: ::fidl_next::Encoder + ?Sized,
8855 ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
8856 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8857 ___E,
8858 >,
8859 {
8860 #[inline]
8861 fn encode_option(
8862 this: ::core::option::Option<Self>,
8863 encoder: &mut ___E,
8864 out: &mut ::core::mem::MaybeUninit<
8865 ::fidl_next::WireBox<
8866 'static,
8867 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8868 >,
8869 >,
8870 _: (),
8871 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8872 if let Some(inner) = this {
8873 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8874 ::fidl_next::WireBox::encode_present(out);
8875 } else {
8876 ::fidl_next::WireBox::encode_absent(out);
8877 }
8878
8879 Ok(())
8880 }
8881 }
8882
8883 unsafe impl<'a, ___E>
8884 ::fidl_next::EncodeOption<
8885 ::fidl_next::WireBox<
8886 'static,
8887 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8888 >,
8889 ___E,
8890 > for &'a ExtendedAttributeIteratorGetNextResponse
8891 where
8892 ___E: ::fidl_next::Encoder + ?Sized,
8893 &'a ExtendedAttributeIteratorGetNextResponse: ::fidl_next::Encode<
8894 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8895 ___E,
8896 >,
8897 {
8898 #[inline]
8899 fn encode_option(
8900 this: ::core::option::Option<Self>,
8901 encoder: &mut ___E,
8902 out: &mut ::core::mem::MaybeUninit<
8903 ::fidl_next::WireBox<
8904 'static,
8905 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
8906 >,
8907 >,
8908 _: (),
8909 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8910 if let Some(inner) = this {
8911 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
8912 ::fidl_next::WireBox::encode_present(out);
8913 } else {
8914 ::fidl_next::WireBox::encode_absent(out);
8915 }
8916
8917 Ok(())
8918 }
8919 }
8920
8921 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
8922 for ExtendedAttributeIteratorGetNextResponse
8923 {
8924 #[inline]
8925 fn from_wire(wire: crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>) -> Self {
8926 Self {
8927 attributes: ::fidl_next::FromWire::from_wire(wire.attributes),
8928
8929 last: ::fidl_next::FromWire::from_wire(wire.last),
8930 }
8931 }
8932 }
8933
8934 impl<'de> ::fidl_next::FromWireRef<crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>>
8935 for ExtendedAttributeIteratorGetNextResponse
8936 {
8937 #[inline]
8938 fn from_wire_ref(
8939 wire: &crate::wire::ExtendedAttributeIteratorGetNextResponse<'de>,
8940 ) -> Self {
8941 Self {
8942 attributes: ::fidl_next::FromWireRef::from_wire_ref(&wire.attributes),
8943
8944 last: ::fidl_next::FromWireRef::from_wire_ref(&wire.last),
8945 }
8946 }
8947 }
8948
8949 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8950 #[repr(C)]
8951 pub struct ReadableReadRequest {
8952 pub count: u64,
8953 }
8954
8955 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
8956 for ReadableReadRequest
8957 where
8958 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8959 {
8960 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8961 Self,
8962 crate::wire::ReadableReadRequest,
8963 > = unsafe {
8964 ::fidl_next::CopyOptimization::enable_if(
8965 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
8966 .is_enabled(),
8967 )
8968 };
8969
8970 #[inline]
8971 fn encode(
8972 self,
8973 encoder_: &mut ___E,
8974 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
8975 _: (),
8976 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8977 ::fidl_next::munge! {
8978 let crate::wire::ReadableReadRequest {
8979 count,
8980
8981 } = out_;
8982 }
8983
8984 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
8985
8986 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
8987
8988 Ok(())
8989 }
8990 }
8991
8992 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
8993 for &'a ReadableReadRequest
8994 where
8995 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8996 {
8997 #[inline]
8998 fn encode(
8999 self,
9000 encoder_: &mut ___E,
9001 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
9002 _: (),
9003 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9004 ::fidl_next::munge! {
9005 let crate::wire::ReadableReadRequest {
9006
9007 count,
9008
9009 } = out_;
9010 }
9011
9012 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
9013
9014 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
9015
9016 Ok(())
9017 }
9018 }
9019
9020 unsafe impl<___E>
9021 ::fidl_next::EncodeOption<
9022 ::fidl_next::WireBox<'static, crate::wire::ReadableReadRequest>,
9023 ___E,
9024 > for ReadableReadRequest
9025 where
9026 ___E: ::fidl_next::Encoder + ?Sized,
9027 ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
9028 {
9029 #[inline]
9030 fn encode_option(
9031 this: ::core::option::Option<Self>,
9032 encoder: &mut ___E,
9033 out: &mut ::core::mem::MaybeUninit<
9034 ::fidl_next::WireBox<'static, crate::wire::ReadableReadRequest>,
9035 >,
9036 _: (),
9037 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9038 if let Some(inner) = this {
9039 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9040 ::fidl_next::WireBox::encode_present(out);
9041 } else {
9042 ::fidl_next::WireBox::encode_absent(out);
9043 }
9044
9045 Ok(())
9046 }
9047 }
9048
9049 unsafe impl<'a, ___E>
9050 ::fidl_next::EncodeOption<
9051 ::fidl_next::WireBox<'static, crate::wire::ReadableReadRequest>,
9052 ___E,
9053 > for &'a ReadableReadRequest
9054 where
9055 ___E: ::fidl_next::Encoder + ?Sized,
9056 &'a ReadableReadRequest: ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>,
9057 {
9058 #[inline]
9059 fn encode_option(
9060 this: ::core::option::Option<Self>,
9061 encoder: &mut ___E,
9062 out: &mut ::core::mem::MaybeUninit<
9063 ::fidl_next::WireBox<'static, crate::wire::ReadableReadRequest>,
9064 >,
9065 _: (),
9066 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9067 if let Some(inner) = this {
9068 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9069 ::fidl_next::WireBox::encode_present(out);
9070 } else {
9071 ::fidl_next::WireBox::encode_absent(out);
9072 }
9073
9074 Ok(())
9075 }
9076 }
9077
9078 impl ::fidl_next::FromWire<crate::wire::ReadableReadRequest> for ReadableReadRequest {
9079 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9080 crate::wire::ReadableReadRequest,
9081 Self,
9082 > = unsafe {
9083 ::fidl_next::CopyOptimization::enable_if(
9084 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
9085 .is_enabled(),
9086 )
9087 };
9088
9089 #[inline]
9090 fn from_wire(wire: crate::wire::ReadableReadRequest) -> Self {
9091 Self { count: ::fidl_next::FromWire::from_wire(wire.count) }
9092 }
9093 }
9094
9095 impl ::fidl_next::FromWireRef<crate::wire::ReadableReadRequest> for ReadableReadRequest {
9096 #[inline]
9097 fn from_wire_ref(wire: &crate::wire::ReadableReadRequest) -> Self {
9098 Self { count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count) }
9099 }
9100 }
9101
9102 #[doc = " The byte vector type used for read/write operations.\n"]
9103 pub type Transfer = ::std::vec::Vec<u8>;
9104
9105 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9106 pub struct ReadableReadResponse {
9107 pub data: ::std::vec::Vec<u8>,
9108 }
9109
9110 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
9111 for ReadableReadResponse
9112 where
9113 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9114 ___E: ::fidl_next::Encoder,
9115 {
9116 #[inline]
9117 fn encode(
9118 self,
9119 encoder_: &mut ___E,
9120 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
9121 _: (),
9122 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9123 ::fidl_next::munge! {
9124 let crate::wire::ReadableReadResponse {
9125 data,
9126
9127 } = out_;
9128 }
9129
9130 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
9131
9132 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
9133 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
9134
9135 Ok(())
9136 }
9137 }
9138
9139 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
9140 for &'a ReadableReadResponse
9141 where
9142 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9143 ___E: ::fidl_next::Encoder,
9144 {
9145 #[inline]
9146 fn encode(
9147 self,
9148 encoder_: &mut ___E,
9149 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
9150 _: (),
9151 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9152 ::fidl_next::munge! {
9153 let crate::wire::ReadableReadResponse {
9154
9155 data,
9156
9157 } = out_;
9158 }
9159
9160 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
9161
9162 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
9163 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
9164
9165 Ok(())
9166 }
9167 }
9168
9169 unsafe impl<___E>
9170 ::fidl_next::EncodeOption<
9171 ::fidl_next::WireBox<'static, crate::wire::ReadableReadResponse<'static>>,
9172 ___E,
9173 > for ReadableReadResponse
9174 where
9175 ___E: ::fidl_next::Encoder + ?Sized,
9176 ReadableReadResponse: ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
9177 {
9178 #[inline]
9179 fn encode_option(
9180 this: ::core::option::Option<Self>,
9181 encoder: &mut ___E,
9182 out: &mut ::core::mem::MaybeUninit<
9183 ::fidl_next::WireBox<'static, crate::wire::ReadableReadResponse<'static>>,
9184 >,
9185 _: (),
9186 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9187 if let Some(inner) = this {
9188 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9189 ::fidl_next::WireBox::encode_present(out);
9190 } else {
9191 ::fidl_next::WireBox::encode_absent(out);
9192 }
9193
9194 Ok(())
9195 }
9196 }
9197
9198 unsafe impl<'a, ___E>
9199 ::fidl_next::EncodeOption<
9200 ::fidl_next::WireBox<'static, crate::wire::ReadableReadResponse<'static>>,
9201 ___E,
9202 > for &'a ReadableReadResponse
9203 where
9204 ___E: ::fidl_next::Encoder + ?Sized,
9205 &'a ReadableReadResponse:
9206 ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>,
9207 {
9208 #[inline]
9209 fn encode_option(
9210 this: ::core::option::Option<Self>,
9211 encoder: &mut ___E,
9212 out: &mut ::core::mem::MaybeUninit<
9213 ::fidl_next::WireBox<'static, crate::wire::ReadableReadResponse<'static>>,
9214 >,
9215 _: (),
9216 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9217 if let Some(inner) = this {
9218 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9219 ::fidl_next::WireBox::encode_present(out);
9220 } else {
9221 ::fidl_next::WireBox::encode_absent(out);
9222 }
9223
9224 Ok(())
9225 }
9226 }
9227
9228 impl<'de> ::fidl_next::FromWire<crate::wire::ReadableReadResponse<'de>> for ReadableReadResponse {
9229 #[inline]
9230 fn from_wire(wire: crate::wire::ReadableReadResponse<'de>) -> Self {
9231 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
9232 }
9233 }
9234
9235 impl<'de> ::fidl_next::FromWireRef<crate::wire::ReadableReadResponse<'de>>
9236 for ReadableReadResponse
9237 {
9238 #[inline]
9239 fn from_wire_ref(wire: &crate::wire::ReadableReadResponse<'de>) -> Self {
9240 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
9241 }
9242 }
9243
9244 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9245 pub struct WritableWriteRequest {
9246 pub data: ::std::vec::Vec<u8>,
9247 }
9248
9249 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
9250 for WritableWriteRequest
9251 where
9252 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9253 ___E: ::fidl_next::Encoder,
9254 {
9255 #[inline]
9256 fn encode(
9257 self,
9258 encoder_: &mut ___E,
9259 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
9260 _: (),
9261 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9262 ::fidl_next::munge! {
9263 let crate::wire::WritableWriteRequest {
9264 data,
9265
9266 } = out_;
9267 }
9268
9269 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
9270
9271 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
9272 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
9273
9274 Ok(())
9275 }
9276 }
9277
9278 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
9279 for &'a WritableWriteRequest
9280 where
9281 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9282 ___E: ::fidl_next::Encoder,
9283 {
9284 #[inline]
9285 fn encode(
9286 self,
9287 encoder_: &mut ___E,
9288 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
9289 _: (),
9290 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9291 ::fidl_next::munge! {
9292 let crate::wire::WritableWriteRequest {
9293
9294 data,
9295
9296 } = out_;
9297 }
9298
9299 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
9300
9301 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
9302 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
9303
9304 Ok(())
9305 }
9306 }
9307
9308 unsafe impl<___E>
9309 ::fidl_next::EncodeOption<
9310 ::fidl_next::WireBox<'static, crate::wire::WritableWriteRequest<'static>>,
9311 ___E,
9312 > for WritableWriteRequest
9313 where
9314 ___E: ::fidl_next::Encoder + ?Sized,
9315 WritableWriteRequest: ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
9316 {
9317 #[inline]
9318 fn encode_option(
9319 this: ::core::option::Option<Self>,
9320 encoder: &mut ___E,
9321 out: &mut ::core::mem::MaybeUninit<
9322 ::fidl_next::WireBox<'static, crate::wire::WritableWriteRequest<'static>>,
9323 >,
9324 _: (),
9325 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9326 if let Some(inner) = this {
9327 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9328 ::fidl_next::WireBox::encode_present(out);
9329 } else {
9330 ::fidl_next::WireBox::encode_absent(out);
9331 }
9332
9333 Ok(())
9334 }
9335 }
9336
9337 unsafe impl<'a, ___E>
9338 ::fidl_next::EncodeOption<
9339 ::fidl_next::WireBox<'static, crate::wire::WritableWriteRequest<'static>>,
9340 ___E,
9341 > for &'a WritableWriteRequest
9342 where
9343 ___E: ::fidl_next::Encoder + ?Sized,
9344 &'a WritableWriteRequest:
9345 ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>,
9346 {
9347 #[inline]
9348 fn encode_option(
9349 this: ::core::option::Option<Self>,
9350 encoder: &mut ___E,
9351 out: &mut ::core::mem::MaybeUninit<
9352 ::fidl_next::WireBox<'static, crate::wire::WritableWriteRequest<'static>>,
9353 >,
9354 _: (),
9355 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9356 if let Some(inner) = this {
9357 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9358 ::fidl_next::WireBox::encode_present(out);
9359 } else {
9360 ::fidl_next::WireBox::encode_absent(out);
9361 }
9362
9363 Ok(())
9364 }
9365 }
9366
9367 impl<'de> ::fidl_next::FromWire<crate::wire::WritableWriteRequest<'de>> for WritableWriteRequest {
9368 #[inline]
9369 fn from_wire(wire: crate::wire::WritableWriteRequest<'de>) -> Self {
9370 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
9371 }
9372 }
9373
9374 impl<'de> ::fidl_next::FromWireRef<crate::wire::WritableWriteRequest<'de>>
9375 for WritableWriteRequest
9376 {
9377 #[inline]
9378 fn from_wire_ref(wire: &crate::wire::WritableWriteRequest<'de>) -> Self {
9379 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
9380 }
9381 }
9382
9383 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9384 #[repr(C)]
9385 pub struct WritableWriteResponse {
9386 pub actual_count: u64,
9387 }
9388
9389 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
9390 for WritableWriteResponse
9391 where
9392 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9393 {
9394 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9395 Self,
9396 crate::wire::WritableWriteResponse,
9397 > = unsafe {
9398 ::fidl_next::CopyOptimization::enable_if(
9399 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9400 .is_enabled(),
9401 )
9402 };
9403
9404 #[inline]
9405 fn encode(
9406 self,
9407 encoder_: &mut ___E,
9408 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
9409 _: (),
9410 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9411 ::fidl_next::munge! {
9412 let crate::wire::WritableWriteResponse {
9413 actual_count,
9414
9415 } = out_;
9416 }
9417
9418 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
9419
9420 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9421
9422 Ok(())
9423 }
9424 }
9425
9426 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
9427 for &'a WritableWriteResponse
9428 where
9429 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9430 {
9431 #[inline]
9432 fn encode(
9433 self,
9434 encoder_: &mut ___E,
9435 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
9436 _: (),
9437 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9438 ::fidl_next::munge! {
9439 let crate::wire::WritableWriteResponse {
9440
9441 actual_count,
9442
9443 } = out_;
9444 }
9445
9446 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
9447
9448 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
9449
9450 Ok(())
9451 }
9452 }
9453
9454 unsafe impl<___E>
9455 ::fidl_next::EncodeOption<
9456 ::fidl_next::WireBox<'static, crate::wire::WritableWriteResponse>,
9457 ___E,
9458 > for WritableWriteResponse
9459 where
9460 ___E: ::fidl_next::Encoder + ?Sized,
9461 WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
9462 {
9463 #[inline]
9464 fn encode_option(
9465 this: ::core::option::Option<Self>,
9466 encoder: &mut ___E,
9467 out: &mut ::core::mem::MaybeUninit<
9468 ::fidl_next::WireBox<'static, crate::wire::WritableWriteResponse>,
9469 >,
9470 _: (),
9471 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9472 if let Some(inner) = this {
9473 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9474 ::fidl_next::WireBox::encode_present(out);
9475 } else {
9476 ::fidl_next::WireBox::encode_absent(out);
9477 }
9478
9479 Ok(())
9480 }
9481 }
9482
9483 unsafe impl<'a, ___E>
9484 ::fidl_next::EncodeOption<
9485 ::fidl_next::WireBox<'static, crate::wire::WritableWriteResponse>,
9486 ___E,
9487 > for &'a WritableWriteResponse
9488 where
9489 ___E: ::fidl_next::Encoder + ?Sized,
9490 &'a WritableWriteResponse: ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>,
9491 {
9492 #[inline]
9493 fn encode_option(
9494 this: ::core::option::Option<Self>,
9495 encoder: &mut ___E,
9496 out: &mut ::core::mem::MaybeUninit<
9497 ::fidl_next::WireBox<'static, crate::wire::WritableWriteResponse>,
9498 >,
9499 _: (),
9500 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9501 if let Some(inner) = this {
9502 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9503 ::fidl_next::WireBox::encode_present(out);
9504 } else {
9505 ::fidl_next::WireBox::encode_absent(out);
9506 }
9507
9508 Ok(())
9509 }
9510 }
9511
9512 impl ::fidl_next::FromWire<crate::wire::WritableWriteResponse> for WritableWriteResponse {
9513 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9514 crate::wire::WritableWriteResponse,
9515 Self,
9516 > = unsafe {
9517 ::fidl_next::CopyOptimization::enable_if(
9518 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
9519 .is_enabled(),
9520 )
9521 };
9522
9523 #[inline]
9524 fn from_wire(wire: crate::wire::WritableWriteResponse) -> Self {
9525 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
9526 }
9527 }
9528
9529 impl ::fidl_next::FromWireRef<crate::wire::WritableWriteResponse> for WritableWriteResponse {
9530 #[inline]
9531 fn from_wire_ref(wire: &crate::wire::WritableWriteResponse) -> Self {
9532 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
9533 }
9534 }
9535
9536 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9537 pub struct FileSeekRequest {
9538 pub origin: crate::natural::SeekOrigin,
9539
9540 pub offset: i64,
9541 }
9542
9543 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E> for FileSeekRequest
9544 where
9545 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9546 {
9547 #[inline]
9548 fn encode(
9549 self,
9550 encoder_: &mut ___E,
9551 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
9552 _: (),
9553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9554 ::fidl_next::munge! {
9555 let crate::wire::FileSeekRequest {
9556 origin,
9557 offset,
9558
9559 } = out_;
9560 }
9561
9562 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
9563
9564 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
9565
9566 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
9567
9568 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
9569
9570 Ok(())
9571 }
9572 }
9573
9574 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
9575 for &'a FileSeekRequest
9576 where
9577 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9578 {
9579 #[inline]
9580 fn encode(
9581 self,
9582 encoder_: &mut ___E,
9583 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
9584 _: (),
9585 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9586 ::fidl_next::munge! {
9587 let crate::wire::FileSeekRequest {
9588
9589 origin,
9590 offset,
9591
9592 } = out_;
9593 }
9594
9595 ::fidl_next::Encode::encode(&self.origin, encoder_, origin, ())?;
9596
9597 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(origin.as_mut_ptr()) };
9598
9599 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
9600
9601 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
9602
9603 Ok(())
9604 }
9605 }
9606
9607 unsafe impl<___E>
9608 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::FileSeekRequest>, ___E>
9609 for FileSeekRequest
9610 where
9611 ___E: ::fidl_next::Encoder + ?Sized,
9612 FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
9613 {
9614 #[inline]
9615 fn encode_option(
9616 this: ::core::option::Option<Self>,
9617 encoder: &mut ___E,
9618 out: &mut ::core::mem::MaybeUninit<
9619 ::fidl_next::WireBox<'static, crate::wire::FileSeekRequest>,
9620 >,
9621 _: (),
9622 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9623 if let Some(inner) = this {
9624 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9625 ::fidl_next::WireBox::encode_present(out);
9626 } else {
9627 ::fidl_next::WireBox::encode_absent(out);
9628 }
9629
9630 Ok(())
9631 }
9632 }
9633
9634 unsafe impl<'a, ___E>
9635 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::FileSeekRequest>, ___E>
9636 for &'a FileSeekRequest
9637 where
9638 ___E: ::fidl_next::Encoder + ?Sized,
9639 &'a FileSeekRequest: ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>,
9640 {
9641 #[inline]
9642 fn encode_option(
9643 this: ::core::option::Option<Self>,
9644 encoder: &mut ___E,
9645 out: &mut ::core::mem::MaybeUninit<
9646 ::fidl_next::WireBox<'static, crate::wire::FileSeekRequest>,
9647 >,
9648 _: (),
9649 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9650 if let Some(inner) = this {
9651 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9652 ::fidl_next::WireBox::encode_present(out);
9653 } else {
9654 ::fidl_next::WireBox::encode_absent(out);
9655 }
9656
9657 Ok(())
9658 }
9659 }
9660
9661 impl ::fidl_next::FromWire<crate::wire::FileSeekRequest> for FileSeekRequest {
9662 #[inline]
9663 fn from_wire(wire: crate::wire::FileSeekRequest) -> Self {
9664 Self {
9665 origin: ::fidl_next::FromWire::from_wire(wire.origin),
9666
9667 offset: ::fidl_next::FromWire::from_wire(wire.offset),
9668 }
9669 }
9670 }
9671
9672 impl ::fidl_next::FromWireRef<crate::wire::FileSeekRequest> for FileSeekRequest {
9673 #[inline]
9674 fn from_wire_ref(wire: &crate::wire::FileSeekRequest) -> Self {
9675 Self {
9676 origin: ::fidl_next::FromWireRef::from_wire_ref(&wire.origin),
9677
9678 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
9679 }
9680 }
9681 }
9682
9683 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9684 #[repr(C)]
9685 pub struct FileSeekResponse {
9686 pub offset_from_start: u64,
9687 }
9688
9689 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E> for FileSeekResponse
9690 where
9691 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9692 {
9693 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9694 Self,
9695 crate::wire::FileSeekResponse,
9696 > = unsafe {
9697 ::fidl_next::CopyOptimization::enable_if(
9698 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9699 .is_enabled(),
9700 )
9701 };
9702
9703 #[inline]
9704 fn encode(
9705 self,
9706 encoder_: &mut ___E,
9707 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
9708 _: (),
9709 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9710 ::fidl_next::munge! {
9711 let crate::wire::FileSeekResponse {
9712 offset_from_start,
9713
9714 } = out_;
9715 }
9716
9717 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
9718
9719 let mut _field =
9720 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
9721
9722 Ok(())
9723 }
9724 }
9725
9726 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
9727 for &'a FileSeekResponse
9728 where
9729 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9730 {
9731 #[inline]
9732 fn encode(
9733 self,
9734 encoder_: &mut ___E,
9735 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
9736 _: (),
9737 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9738 ::fidl_next::munge! {
9739 let crate::wire::FileSeekResponse {
9740
9741 offset_from_start,
9742
9743 } = out_;
9744 }
9745
9746 ::fidl_next::Encode::encode(&self.offset_from_start, encoder_, offset_from_start, ())?;
9747
9748 let mut _field =
9749 unsafe { ::fidl_next::Slot::new_unchecked(offset_from_start.as_mut_ptr()) };
9750
9751 Ok(())
9752 }
9753 }
9754
9755 unsafe impl<___E>
9756 ::fidl_next::EncodeOption<
9757 ::fidl_next::WireBox<'static, crate::wire::FileSeekResponse>,
9758 ___E,
9759 > for FileSeekResponse
9760 where
9761 ___E: ::fidl_next::Encoder + ?Sized,
9762 FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
9763 {
9764 #[inline]
9765 fn encode_option(
9766 this: ::core::option::Option<Self>,
9767 encoder: &mut ___E,
9768 out: &mut ::core::mem::MaybeUninit<
9769 ::fidl_next::WireBox<'static, crate::wire::FileSeekResponse>,
9770 >,
9771 _: (),
9772 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9773 if let Some(inner) = this {
9774 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9775 ::fidl_next::WireBox::encode_present(out);
9776 } else {
9777 ::fidl_next::WireBox::encode_absent(out);
9778 }
9779
9780 Ok(())
9781 }
9782 }
9783
9784 unsafe impl<'a, ___E>
9785 ::fidl_next::EncodeOption<
9786 ::fidl_next::WireBox<'static, crate::wire::FileSeekResponse>,
9787 ___E,
9788 > for &'a FileSeekResponse
9789 where
9790 ___E: ::fidl_next::Encoder + ?Sized,
9791 &'a FileSeekResponse: ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>,
9792 {
9793 #[inline]
9794 fn encode_option(
9795 this: ::core::option::Option<Self>,
9796 encoder: &mut ___E,
9797 out: &mut ::core::mem::MaybeUninit<
9798 ::fidl_next::WireBox<'static, crate::wire::FileSeekResponse>,
9799 >,
9800 _: (),
9801 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9802 if let Some(inner) = this {
9803 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9804 ::fidl_next::WireBox::encode_present(out);
9805 } else {
9806 ::fidl_next::WireBox::encode_absent(out);
9807 }
9808
9809 Ok(())
9810 }
9811 }
9812
9813 impl ::fidl_next::FromWire<crate::wire::FileSeekResponse> for FileSeekResponse {
9814 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9815 crate::wire::FileSeekResponse,
9816 Self,
9817 > = unsafe {
9818 ::fidl_next::CopyOptimization::enable_if(
9819 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
9820 .is_enabled(),
9821 )
9822 };
9823
9824 #[inline]
9825 fn from_wire(wire: crate::wire::FileSeekResponse) -> Self {
9826 Self { offset_from_start: ::fidl_next::FromWire::from_wire(wire.offset_from_start) }
9827 }
9828 }
9829
9830 impl ::fidl_next::FromWireRef<crate::wire::FileSeekResponse> for FileSeekResponse {
9831 #[inline]
9832 fn from_wire_ref(wire: &crate::wire::FileSeekResponse) -> Self {
9833 Self {
9834 offset_from_start: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset_from_start),
9835 }
9836 }
9837 }
9838
9839 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9840 #[repr(C)]
9841 pub struct FileReadAtRequest {
9842 pub count: u64,
9843
9844 pub offset: u64,
9845 }
9846
9847 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E> for FileReadAtRequest
9848 where
9849 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9850 {
9851 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9852 Self,
9853 crate::wire::FileReadAtRequest,
9854 > = unsafe {
9855 ::fidl_next::CopyOptimization::enable_if(
9856 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9857 .is_enabled()
9858 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
9859 .is_enabled(),
9860 )
9861 };
9862
9863 #[inline]
9864 fn encode(
9865 self,
9866 encoder_: &mut ___E,
9867 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
9868 _: (),
9869 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9870 ::fidl_next::munge! {
9871 let crate::wire::FileReadAtRequest {
9872 count,
9873 offset,
9874
9875 } = out_;
9876 }
9877
9878 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
9879
9880 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
9881
9882 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
9883
9884 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
9885
9886 Ok(())
9887 }
9888 }
9889
9890 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
9891 for &'a FileReadAtRequest
9892 where
9893 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9894 {
9895 #[inline]
9896 fn encode(
9897 self,
9898 encoder_: &mut ___E,
9899 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
9900 _: (),
9901 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9902 ::fidl_next::munge! {
9903 let crate::wire::FileReadAtRequest {
9904
9905 count,
9906 offset,
9907
9908 } = out_;
9909 }
9910
9911 ::fidl_next::Encode::encode(&self.count, encoder_, count, ())?;
9912
9913 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(count.as_mut_ptr()) };
9914
9915 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
9916
9917 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
9918
9919 Ok(())
9920 }
9921 }
9922
9923 unsafe impl<___E>
9924 ::fidl_next::EncodeOption<
9925 ::fidl_next::WireBox<'static, crate::wire::FileReadAtRequest>,
9926 ___E,
9927 > for FileReadAtRequest
9928 where
9929 ___E: ::fidl_next::Encoder + ?Sized,
9930 FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
9931 {
9932 #[inline]
9933 fn encode_option(
9934 this: ::core::option::Option<Self>,
9935 encoder: &mut ___E,
9936 out: &mut ::core::mem::MaybeUninit<
9937 ::fidl_next::WireBox<'static, crate::wire::FileReadAtRequest>,
9938 >,
9939 _: (),
9940 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9941 if let Some(inner) = this {
9942 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9943 ::fidl_next::WireBox::encode_present(out);
9944 } else {
9945 ::fidl_next::WireBox::encode_absent(out);
9946 }
9947
9948 Ok(())
9949 }
9950 }
9951
9952 unsafe impl<'a, ___E>
9953 ::fidl_next::EncodeOption<
9954 ::fidl_next::WireBox<'static, crate::wire::FileReadAtRequest>,
9955 ___E,
9956 > for &'a FileReadAtRequest
9957 where
9958 ___E: ::fidl_next::Encoder + ?Sized,
9959 &'a FileReadAtRequest: ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>,
9960 {
9961 #[inline]
9962 fn encode_option(
9963 this: ::core::option::Option<Self>,
9964 encoder: &mut ___E,
9965 out: &mut ::core::mem::MaybeUninit<
9966 ::fidl_next::WireBox<'static, crate::wire::FileReadAtRequest>,
9967 >,
9968 _: (),
9969 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9970 if let Some(inner) = this {
9971 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
9972 ::fidl_next::WireBox::encode_present(out);
9973 } else {
9974 ::fidl_next::WireBox::encode_absent(out);
9975 }
9976
9977 Ok(())
9978 }
9979 }
9980
9981 impl ::fidl_next::FromWire<crate::wire::FileReadAtRequest> for FileReadAtRequest {
9982 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
9983 crate::wire::FileReadAtRequest,
9984 Self,
9985 > = unsafe {
9986 ::fidl_next::CopyOptimization::enable_if(
9987 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
9988 .is_enabled()
9989 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
9990 .is_enabled(),
9991 )
9992 };
9993
9994 #[inline]
9995 fn from_wire(wire: crate::wire::FileReadAtRequest) -> Self {
9996 Self {
9997 count: ::fidl_next::FromWire::from_wire(wire.count),
9998
9999 offset: ::fidl_next::FromWire::from_wire(wire.offset),
10000 }
10001 }
10002 }
10003
10004 impl ::fidl_next::FromWireRef<crate::wire::FileReadAtRequest> for FileReadAtRequest {
10005 #[inline]
10006 fn from_wire_ref(wire: &crate::wire::FileReadAtRequest) -> Self {
10007 Self {
10008 count: ::fidl_next::FromWireRef::from_wire_ref(&wire.count),
10009
10010 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
10011 }
10012 }
10013 }
10014
10015 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10016 pub struct FileReadAtResponse {
10017 pub data: ::std::vec::Vec<u8>,
10018 }
10019
10020 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
10021 for FileReadAtResponse
10022 where
10023 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10024 ___E: ::fidl_next::Encoder,
10025 {
10026 #[inline]
10027 fn encode(
10028 self,
10029 encoder_: &mut ___E,
10030 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
10031 _: (),
10032 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10033 ::fidl_next::munge! {
10034 let crate::wire::FileReadAtResponse {
10035 data,
10036
10037 } = out_;
10038 }
10039
10040 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
10041
10042 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
10043 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
10044
10045 Ok(())
10046 }
10047 }
10048
10049 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
10050 for &'a FileReadAtResponse
10051 where
10052 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10053 ___E: ::fidl_next::Encoder,
10054 {
10055 #[inline]
10056 fn encode(
10057 self,
10058 encoder_: &mut ___E,
10059 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
10060 _: (),
10061 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10062 ::fidl_next::munge! {
10063 let crate::wire::FileReadAtResponse {
10064
10065 data,
10066
10067 } = out_;
10068 }
10069
10070 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
10071
10072 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
10073 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
10074
10075 Ok(())
10076 }
10077 }
10078
10079 unsafe impl<___E>
10080 ::fidl_next::EncodeOption<
10081 ::fidl_next::WireBox<'static, crate::wire::FileReadAtResponse<'static>>,
10082 ___E,
10083 > for FileReadAtResponse
10084 where
10085 ___E: ::fidl_next::Encoder + ?Sized,
10086 FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
10087 {
10088 #[inline]
10089 fn encode_option(
10090 this: ::core::option::Option<Self>,
10091 encoder: &mut ___E,
10092 out: &mut ::core::mem::MaybeUninit<
10093 ::fidl_next::WireBox<'static, crate::wire::FileReadAtResponse<'static>>,
10094 >,
10095 _: (),
10096 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10097 if let Some(inner) = this {
10098 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10099 ::fidl_next::WireBox::encode_present(out);
10100 } else {
10101 ::fidl_next::WireBox::encode_absent(out);
10102 }
10103
10104 Ok(())
10105 }
10106 }
10107
10108 unsafe impl<'a, ___E>
10109 ::fidl_next::EncodeOption<
10110 ::fidl_next::WireBox<'static, crate::wire::FileReadAtResponse<'static>>,
10111 ___E,
10112 > for &'a FileReadAtResponse
10113 where
10114 ___E: ::fidl_next::Encoder + ?Sized,
10115 &'a FileReadAtResponse: ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>,
10116 {
10117 #[inline]
10118 fn encode_option(
10119 this: ::core::option::Option<Self>,
10120 encoder: &mut ___E,
10121 out: &mut ::core::mem::MaybeUninit<
10122 ::fidl_next::WireBox<'static, crate::wire::FileReadAtResponse<'static>>,
10123 >,
10124 _: (),
10125 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10126 if let Some(inner) = this {
10127 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10128 ::fidl_next::WireBox::encode_present(out);
10129 } else {
10130 ::fidl_next::WireBox::encode_absent(out);
10131 }
10132
10133 Ok(())
10134 }
10135 }
10136
10137 impl<'de> ::fidl_next::FromWire<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
10138 #[inline]
10139 fn from_wire(wire: crate::wire::FileReadAtResponse<'de>) -> Self {
10140 Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
10141 }
10142 }
10143
10144 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileReadAtResponse<'de>> for FileReadAtResponse {
10145 #[inline]
10146 fn from_wire_ref(wire: &crate::wire::FileReadAtResponse<'de>) -> Self {
10147 Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
10148 }
10149 }
10150
10151 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10152 pub struct FileWriteAtRequest {
10153 pub data: ::std::vec::Vec<u8>,
10154
10155 pub offset: u64,
10156 }
10157
10158 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
10159 for FileWriteAtRequest
10160 where
10161 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10162 ___E: ::fidl_next::Encoder,
10163 {
10164 #[inline]
10165 fn encode(
10166 self,
10167 encoder_: &mut ___E,
10168 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
10169 _: (),
10170 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10171 ::fidl_next::munge! {
10172 let crate::wire::FileWriteAtRequest {
10173 data,
10174 offset,
10175
10176 } = out_;
10177 }
10178
10179 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
10180
10181 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
10182 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
10183
10184 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
10185
10186 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
10187
10188 Ok(())
10189 }
10190 }
10191
10192 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
10193 for &'a FileWriteAtRequest
10194 where
10195 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10196 ___E: ::fidl_next::Encoder,
10197 {
10198 #[inline]
10199 fn encode(
10200 self,
10201 encoder_: &mut ___E,
10202 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
10203 _: (),
10204 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10205 ::fidl_next::munge! {
10206 let crate::wire::FileWriteAtRequest {
10207
10208 data,
10209 offset,
10210
10211 } = out_;
10212 }
10213
10214 ::fidl_next::Encode::encode(&self.data, encoder_, data, (8192, ()))?;
10215
10216 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
10217 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
10218
10219 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
10220
10221 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
10222
10223 Ok(())
10224 }
10225 }
10226
10227 unsafe impl<___E>
10228 ::fidl_next::EncodeOption<
10229 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtRequest<'static>>,
10230 ___E,
10231 > for FileWriteAtRequest
10232 where
10233 ___E: ::fidl_next::Encoder + ?Sized,
10234 FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
10235 {
10236 #[inline]
10237 fn encode_option(
10238 this: ::core::option::Option<Self>,
10239 encoder: &mut ___E,
10240 out: &mut ::core::mem::MaybeUninit<
10241 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtRequest<'static>>,
10242 >,
10243 _: (),
10244 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10245 if let Some(inner) = this {
10246 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10247 ::fidl_next::WireBox::encode_present(out);
10248 } else {
10249 ::fidl_next::WireBox::encode_absent(out);
10250 }
10251
10252 Ok(())
10253 }
10254 }
10255
10256 unsafe impl<'a, ___E>
10257 ::fidl_next::EncodeOption<
10258 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtRequest<'static>>,
10259 ___E,
10260 > for &'a FileWriteAtRequest
10261 where
10262 ___E: ::fidl_next::Encoder + ?Sized,
10263 &'a FileWriteAtRequest: ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>,
10264 {
10265 #[inline]
10266 fn encode_option(
10267 this: ::core::option::Option<Self>,
10268 encoder: &mut ___E,
10269 out: &mut ::core::mem::MaybeUninit<
10270 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtRequest<'static>>,
10271 >,
10272 _: (),
10273 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10274 if let Some(inner) = this {
10275 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10276 ::fidl_next::WireBox::encode_present(out);
10277 } else {
10278 ::fidl_next::WireBox::encode_absent(out);
10279 }
10280
10281 Ok(())
10282 }
10283 }
10284
10285 impl<'de> ::fidl_next::FromWire<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
10286 #[inline]
10287 fn from_wire(wire: crate::wire::FileWriteAtRequest<'de>) -> Self {
10288 Self {
10289 data: ::fidl_next::FromWire::from_wire(wire.data),
10290
10291 offset: ::fidl_next::FromWire::from_wire(wire.offset),
10292 }
10293 }
10294 }
10295
10296 impl<'de> ::fidl_next::FromWireRef<crate::wire::FileWriteAtRequest<'de>> for FileWriteAtRequest {
10297 #[inline]
10298 fn from_wire_ref(wire: &crate::wire::FileWriteAtRequest<'de>) -> Self {
10299 Self {
10300 data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data),
10301
10302 offset: ::fidl_next::FromWireRef::from_wire_ref(&wire.offset),
10303 }
10304 }
10305 }
10306
10307 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10308 #[repr(C)]
10309 pub struct FileWriteAtResponse {
10310 pub actual_count: u64,
10311 }
10312
10313 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
10314 for FileWriteAtResponse
10315 where
10316 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10317 {
10318 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10319 Self,
10320 crate::wire::FileWriteAtResponse,
10321 > = unsafe {
10322 ::fidl_next::CopyOptimization::enable_if(
10323 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
10324 .is_enabled(),
10325 )
10326 };
10327
10328 #[inline]
10329 fn encode(
10330 self,
10331 encoder_: &mut ___E,
10332 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
10333 _: (),
10334 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10335 ::fidl_next::munge! {
10336 let crate::wire::FileWriteAtResponse {
10337 actual_count,
10338
10339 } = out_;
10340 }
10341
10342 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
10343
10344 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
10345
10346 Ok(())
10347 }
10348 }
10349
10350 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
10351 for &'a FileWriteAtResponse
10352 where
10353 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10354 {
10355 #[inline]
10356 fn encode(
10357 self,
10358 encoder_: &mut ___E,
10359 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
10360 _: (),
10361 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10362 ::fidl_next::munge! {
10363 let crate::wire::FileWriteAtResponse {
10364
10365 actual_count,
10366
10367 } = out_;
10368 }
10369
10370 ::fidl_next::Encode::encode(&self.actual_count, encoder_, actual_count, ())?;
10371
10372 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(actual_count.as_mut_ptr()) };
10373
10374 Ok(())
10375 }
10376 }
10377
10378 unsafe impl<___E>
10379 ::fidl_next::EncodeOption<
10380 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtResponse>,
10381 ___E,
10382 > for FileWriteAtResponse
10383 where
10384 ___E: ::fidl_next::Encoder + ?Sized,
10385 FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
10386 {
10387 #[inline]
10388 fn encode_option(
10389 this: ::core::option::Option<Self>,
10390 encoder: &mut ___E,
10391 out: &mut ::core::mem::MaybeUninit<
10392 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtResponse>,
10393 >,
10394 _: (),
10395 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10396 if let Some(inner) = this {
10397 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10398 ::fidl_next::WireBox::encode_present(out);
10399 } else {
10400 ::fidl_next::WireBox::encode_absent(out);
10401 }
10402
10403 Ok(())
10404 }
10405 }
10406
10407 unsafe impl<'a, ___E>
10408 ::fidl_next::EncodeOption<
10409 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtResponse>,
10410 ___E,
10411 > for &'a FileWriteAtResponse
10412 where
10413 ___E: ::fidl_next::Encoder + ?Sized,
10414 &'a FileWriteAtResponse: ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>,
10415 {
10416 #[inline]
10417 fn encode_option(
10418 this: ::core::option::Option<Self>,
10419 encoder: &mut ___E,
10420 out: &mut ::core::mem::MaybeUninit<
10421 ::fidl_next::WireBox<'static, crate::wire::FileWriteAtResponse>,
10422 >,
10423 _: (),
10424 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10425 if let Some(inner) = this {
10426 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10427 ::fidl_next::WireBox::encode_present(out);
10428 } else {
10429 ::fidl_next::WireBox::encode_absent(out);
10430 }
10431
10432 Ok(())
10433 }
10434 }
10435
10436 impl ::fidl_next::FromWire<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
10437 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10438 crate::wire::FileWriteAtResponse,
10439 Self,
10440 > = unsafe {
10441 ::fidl_next::CopyOptimization::enable_if(
10442 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
10443 .is_enabled(),
10444 )
10445 };
10446
10447 #[inline]
10448 fn from_wire(wire: crate::wire::FileWriteAtResponse) -> Self {
10449 Self { actual_count: ::fidl_next::FromWire::from_wire(wire.actual_count) }
10450 }
10451 }
10452
10453 impl ::fidl_next::FromWireRef<crate::wire::FileWriteAtResponse> for FileWriteAtResponse {
10454 #[inline]
10455 fn from_wire_ref(wire: &crate::wire::FileWriteAtResponse) -> Self {
10456 Self { actual_count: ::fidl_next::FromWireRef::from_wire_ref(&wire.actual_count) }
10457 }
10458 }
10459
10460 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10461 #[repr(C)]
10462 pub struct FileResizeRequest {
10463 pub length: u64,
10464 }
10465
10466 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E> for FileResizeRequest
10467 where
10468 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10469 {
10470 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10471 Self,
10472 crate::wire::FileResizeRequest,
10473 > = unsafe {
10474 ::fidl_next::CopyOptimization::enable_if(
10475 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
10476 .is_enabled(),
10477 )
10478 };
10479
10480 #[inline]
10481 fn encode(
10482 self,
10483 encoder_: &mut ___E,
10484 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
10485 _: (),
10486 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10487 ::fidl_next::munge! {
10488 let crate::wire::FileResizeRequest {
10489 length,
10490
10491 } = out_;
10492 }
10493
10494 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
10495
10496 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
10497
10498 Ok(())
10499 }
10500 }
10501
10502 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
10503 for &'a FileResizeRequest
10504 where
10505 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10506 {
10507 #[inline]
10508 fn encode(
10509 self,
10510 encoder_: &mut ___E,
10511 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
10512 _: (),
10513 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10514 ::fidl_next::munge! {
10515 let crate::wire::FileResizeRequest {
10516
10517 length,
10518
10519 } = out_;
10520 }
10521
10522 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
10523
10524 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
10525
10526 Ok(())
10527 }
10528 }
10529
10530 unsafe impl<___E>
10531 ::fidl_next::EncodeOption<
10532 ::fidl_next::WireBox<'static, crate::wire::FileResizeRequest>,
10533 ___E,
10534 > for FileResizeRequest
10535 where
10536 ___E: ::fidl_next::Encoder + ?Sized,
10537 FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
10538 {
10539 #[inline]
10540 fn encode_option(
10541 this: ::core::option::Option<Self>,
10542 encoder: &mut ___E,
10543 out: &mut ::core::mem::MaybeUninit<
10544 ::fidl_next::WireBox<'static, crate::wire::FileResizeRequest>,
10545 >,
10546 _: (),
10547 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10548 if let Some(inner) = this {
10549 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10550 ::fidl_next::WireBox::encode_present(out);
10551 } else {
10552 ::fidl_next::WireBox::encode_absent(out);
10553 }
10554
10555 Ok(())
10556 }
10557 }
10558
10559 unsafe impl<'a, ___E>
10560 ::fidl_next::EncodeOption<
10561 ::fidl_next::WireBox<'static, crate::wire::FileResizeRequest>,
10562 ___E,
10563 > for &'a FileResizeRequest
10564 where
10565 ___E: ::fidl_next::Encoder + ?Sized,
10566 &'a FileResizeRequest: ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>,
10567 {
10568 #[inline]
10569 fn encode_option(
10570 this: ::core::option::Option<Self>,
10571 encoder: &mut ___E,
10572 out: &mut ::core::mem::MaybeUninit<
10573 ::fidl_next::WireBox<'static, crate::wire::FileResizeRequest>,
10574 >,
10575 _: (),
10576 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10577 if let Some(inner) = this {
10578 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10579 ::fidl_next::WireBox::encode_present(out);
10580 } else {
10581 ::fidl_next::WireBox::encode_absent(out);
10582 }
10583
10584 Ok(())
10585 }
10586 }
10587
10588 impl ::fidl_next::FromWire<crate::wire::FileResizeRequest> for FileResizeRequest {
10589 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10590 crate::wire::FileResizeRequest,
10591 Self,
10592 > = unsafe {
10593 ::fidl_next::CopyOptimization::enable_if(
10594 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
10595 .is_enabled(),
10596 )
10597 };
10598
10599 #[inline]
10600 fn from_wire(wire: crate::wire::FileResizeRequest) -> Self {
10601 Self { length: ::fidl_next::FromWire::from_wire(wire.length) }
10602 }
10603 }
10604
10605 impl ::fidl_next::FromWireRef<crate::wire::FileResizeRequest> for FileResizeRequest {
10606 #[inline]
10607 fn from_wire_ref(wire: &crate::wire::FileResizeRequest) -> Self {
10608 Self { length: ::fidl_next::FromWireRef::from_wire_ref(&wire.length) }
10609 }
10610 }
10611
10612 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10613 #[repr(C)]
10614 pub struct FileResizeResponse {}
10615
10616 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileResizeResponse, ___E> for FileResizeResponse
10617 where
10618 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10619 {
10620 #[inline]
10621 fn encode(
10622 self,
10623 encoder_: &mut ___E,
10624 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeResponse>,
10625 _: (),
10626 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10627 *out_ = ::core::mem::MaybeUninit::zeroed();
10628
10629 Ok(())
10630 }
10631 }
10632
10633 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileResizeResponse, ___E>
10634 for &'a FileResizeResponse
10635 where
10636 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10637 {
10638 #[inline]
10639 fn encode(
10640 self,
10641 encoder_: &mut ___E,
10642 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeResponse>,
10643 _: (),
10644 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10645 ::fidl_next::munge! {
10646 let crate::wire::FileResizeResponse {
10647
10648 _empty,
10649
10650
10651 } = out_;
10652 }
10653
10654 Ok(())
10655 }
10656 }
10657
10658 unsafe impl<___E>
10659 ::fidl_next::EncodeOption<
10660 ::fidl_next::WireBox<'static, crate::wire::FileResizeResponse>,
10661 ___E,
10662 > for FileResizeResponse
10663 where
10664 ___E: ::fidl_next::Encoder + ?Sized,
10665 FileResizeResponse: ::fidl_next::Encode<crate::wire::FileResizeResponse, ___E>,
10666 {
10667 #[inline]
10668 fn encode_option(
10669 this: ::core::option::Option<Self>,
10670 encoder: &mut ___E,
10671 out: &mut ::core::mem::MaybeUninit<
10672 ::fidl_next::WireBox<'static, crate::wire::FileResizeResponse>,
10673 >,
10674 _: (),
10675 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10676 if let Some(inner) = this {
10677 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10678 ::fidl_next::WireBox::encode_present(out);
10679 } else {
10680 ::fidl_next::WireBox::encode_absent(out);
10681 }
10682
10683 Ok(())
10684 }
10685 }
10686
10687 unsafe impl<'a, ___E>
10688 ::fidl_next::EncodeOption<
10689 ::fidl_next::WireBox<'static, crate::wire::FileResizeResponse>,
10690 ___E,
10691 > for &'a FileResizeResponse
10692 where
10693 ___E: ::fidl_next::Encoder + ?Sized,
10694 &'a FileResizeResponse: ::fidl_next::Encode<crate::wire::FileResizeResponse, ___E>,
10695 {
10696 #[inline]
10697 fn encode_option(
10698 this: ::core::option::Option<Self>,
10699 encoder: &mut ___E,
10700 out: &mut ::core::mem::MaybeUninit<
10701 ::fidl_next::WireBox<'static, crate::wire::FileResizeResponse>,
10702 >,
10703 _: (),
10704 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10705 if let Some(inner) = this {
10706 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10707 ::fidl_next::WireBox::encode_present(out);
10708 } else {
10709 ::fidl_next::WireBox::encode_absent(out);
10710 }
10711
10712 Ok(())
10713 }
10714 }
10715
10716 impl ::fidl_next::FromWire<crate::wire::FileResizeResponse> for FileResizeResponse {
10717 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10718 crate::wire::FileResizeResponse,
10719 Self,
10720 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
10721
10722 #[inline]
10723 fn from_wire(wire: crate::wire::FileResizeResponse) -> Self {
10724 Self {}
10725 }
10726 }
10727
10728 impl ::fidl_next::FromWireRef<crate::wire::FileResizeResponse> for FileResizeResponse {
10729 #[inline]
10730 fn from_wire_ref(wire: &crate::wire::FileResizeResponse) -> Self {
10731 Self {}
10732 }
10733 }
10734
10735 ::fidl_next::bitflags::bitflags! {
10736 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct VmoFlags: u32 {
10737 #[doc = " Requests that the VMO be readable.\n"]const READ = 1;
10738 #[doc = " Requests that the VMO be writable.\n"]const WRITE = 2;
10739 #[doc = " Request that the VMO be executable.\n"]const EXECUTE = 4;
10740 #[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;
10741 #[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;
10742
10743 }
10744 }
10745
10746 unsafe impl<___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for VmoFlags
10747 where
10748 ___E: ?Sized,
10749 {
10750 #[inline]
10751 fn encode(
10752 self,
10753 encoder: &mut ___E,
10754 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
10755 _: (),
10756 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10757 ::fidl_next::Encode::encode(&self, encoder, out, ())
10758 }
10759 }
10760
10761 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::VmoFlags, ___E> for &'a VmoFlags
10762 where
10763 ___E: ?Sized,
10764 {
10765 #[inline]
10766 fn encode(
10767 self,
10768 _: &mut ___E,
10769 out: &mut ::core::mem::MaybeUninit<crate::wire::VmoFlags>,
10770 _: (),
10771 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10772 ::fidl_next::munge!(let crate::wire::VmoFlags { value } = out);
10773
10774 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
10775 return Err(::fidl_next::EncodeError::InvalidStrictBits);
10776 }
10777
10778 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
10779 Ok(())
10780 }
10781 }
10782
10783 impl ::core::convert::From<crate::wire::VmoFlags> for VmoFlags {
10784 fn from(wire: crate::wire::VmoFlags) -> Self {
10785 Self::from_bits_retain(u32::from(wire.value))
10786 }
10787 }
10788
10789 impl ::fidl_next::FromWire<crate::wire::VmoFlags> for VmoFlags {
10790 #[inline]
10791 fn from_wire(wire: crate::wire::VmoFlags) -> Self {
10792 Self::from(wire)
10793 }
10794 }
10795
10796 impl ::fidl_next::FromWireRef<crate::wire::VmoFlags> for VmoFlags {
10797 #[inline]
10798 fn from_wire_ref(wire: &crate::wire::VmoFlags) -> Self {
10799 Self::from(*wire)
10800 }
10801 }
10802
10803 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10804 #[repr(C)]
10805 pub struct FileGetBackingMemoryRequest {
10806 pub flags: crate::natural::VmoFlags,
10807 }
10808
10809 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
10810 for FileGetBackingMemoryRequest
10811 where
10812 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10813 {
10814 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10815 Self,
10816 crate::wire::FileGetBackingMemoryRequest,
10817 > = unsafe {
10818 ::fidl_next::CopyOptimization::enable_if(
10819 true && <crate::natural::VmoFlags as ::fidl_next::Encode<
10820 crate::wire::VmoFlags,
10821 ___E,
10822 >>::COPY_OPTIMIZATION
10823 .is_enabled(),
10824 )
10825 };
10826
10827 #[inline]
10828 fn encode(
10829 self,
10830 encoder_: &mut ___E,
10831 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
10832 _: (),
10833 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10834 ::fidl_next::munge! {
10835 let crate::wire::FileGetBackingMemoryRequest {
10836 flags,
10837
10838 } = out_;
10839 }
10840
10841 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
10842
10843 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
10844
10845 Ok(())
10846 }
10847 }
10848
10849 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
10850 for &'a FileGetBackingMemoryRequest
10851 where
10852 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10853 {
10854 #[inline]
10855 fn encode(
10856 self,
10857 encoder_: &mut ___E,
10858 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
10859 _: (),
10860 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10861 ::fidl_next::munge! {
10862 let crate::wire::FileGetBackingMemoryRequest {
10863
10864 flags,
10865
10866 } = out_;
10867 }
10868
10869 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
10870
10871 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
10872
10873 Ok(())
10874 }
10875 }
10876
10877 unsafe impl<___E>
10878 ::fidl_next::EncodeOption<
10879 ::fidl_next::WireBox<'static, crate::wire::FileGetBackingMemoryRequest>,
10880 ___E,
10881 > for FileGetBackingMemoryRequest
10882 where
10883 ___E: ::fidl_next::Encoder + ?Sized,
10884 FileGetBackingMemoryRequest:
10885 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
10886 {
10887 #[inline]
10888 fn encode_option(
10889 this: ::core::option::Option<Self>,
10890 encoder: &mut ___E,
10891 out: &mut ::core::mem::MaybeUninit<
10892 ::fidl_next::WireBox<'static, crate::wire::FileGetBackingMemoryRequest>,
10893 >,
10894 _: (),
10895 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10896 if let Some(inner) = this {
10897 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10898 ::fidl_next::WireBox::encode_present(out);
10899 } else {
10900 ::fidl_next::WireBox::encode_absent(out);
10901 }
10902
10903 Ok(())
10904 }
10905 }
10906
10907 unsafe impl<'a, ___E>
10908 ::fidl_next::EncodeOption<
10909 ::fidl_next::WireBox<'static, crate::wire::FileGetBackingMemoryRequest>,
10910 ___E,
10911 > for &'a FileGetBackingMemoryRequest
10912 where
10913 ___E: ::fidl_next::Encoder + ?Sized,
10914 &'a FileGetBackingMemoryRequest:
10915 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>,
10916 {
10917 #[inline]
10918 fn encode_option(
10919 this: ::core::option::Option<Self>,
10920 encoder: &mut ___E,
10921 out: &mut ::core::mem::MaybeUninit<
10922 ::fidl_next::WireBox<'static, crate::wire::FileGetBackingMemoryRequest>,
10923 >,
10924 _: (),
10925 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10926 if let Some(inner) = this {
10927 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
10928 ::fidl_next::WireBox::encode_present(out);
10929 } else {
10930 ::fidl_next::WireBox::encode_absent(out);
10931 }
10932
10933 Ok(())
10934 }
10935 }
10936
10937 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryRequest>
10938 for FileGetBackingMemoryRequest
10939 {
10940 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
10941 crate::wire::FileGetBackingMemoryRequest,
10942 Self,
10943 > = unsafe {
10944 ::fidl_next::CopyOptimization::enable_if(
10945 true && <crate::natural::VmoFlags as ::fidl_next::FromWire<
10946 crate::wire::VmoFlags,
10947 >>::COPY_OPTIMIZATION
10948 .is_enabled(),
10949 )
10950 };
10951
10952 #[inline]
10953 fn from_wire(wire: crate::wire::FileGetBackingMemoryRequest) -> Self {
10954 Self { flags: ::fidl_next::FromWire::from_wire(wire.flags) }
10955 }
10956 }
10957
10958 impl ::fidl_next::FromWireRef<crate::wire::FileGetBackingMemoryRequest>
10959 for FileGetBackingMemoryRequest
10960 {
10961 #[inline]
10962 fn from_wire_ref(wire: &crate::wire::FileGetBackingMemoryRequest) -> Self {
10963 Self { flags: ::fidl_next::FromWireRef::from_wire_ref(&wire.flags) }
10964 }
10965 }
10966
10967 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10968 #[repr(C)]
10969 pub struct LinkableLinkIntoResponse {}
10970
10971 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LinkableLinkIntoResponse, ___E>
10972 for LinkableLinkIntoResponse
10973 where
10974 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10975 {
10976 #[inline]
10977 fn encode(
10978 self,
10979 encoder_: &mut ___E,
10980 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoResponse>,
10981 _: (),
10982 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10983 *out_ = ::core::mem::MaybeUninit::zeroed();
10984
10985 Ok(())
10986 }
10987 }
10988
10989 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LinkableLinkIntoResponse, ___E>
10990 for &'a LinkableLinkIntoResponse
10991 where
10992 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10993 {
10994 #[inline]
10995 fn encode(
10996 self,
10997 encoder_: &mut ___E,
10998 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoResponse>,
10999 _: (),
11000 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11001 ::fidl_next::munge! {
11002 let crate::wire::LinkableLinkIntoResponse {
11003
11004 _empty,
11005
11006
11007 } = out_;
11008 }
11009
11010 Ok(())
11011 }
11012 }
11013
11014 unsafe impl<___E>
11015 ::fidl_next::EncodeOption<
11016 ::fidl_next::WireBox<'static, crate::wire::LinkableLinkIntoResponse>,
11017 ___E,
11018 > for LinkableLinkIntoResponse
11019 where
11020 ___E: ::fidl_next::Encoder + ?Sized,
11021 LinkableLinkIntoResponse: ::fidl_next::Encode<crate::wire::LinkableLinkIntoResponse, ___E>,
11022 {
11023 #[inline]
11024 fn encode_option(
11025 this: ::core::option::Option<Self>,
11026 encoder: &mut ___E,
11027 out: &mut ::core::mem::MaybeUninit<
11028 ::fidl_next::WireBox<'static, crate::wire::LinkableLinkIntoResponse>,
11029 >,
11030 _: (),
11031 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11032 if let Some(inner) = this {
11033 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11034 ::fidl_next::WireBox::encode_present(out);
11035 } else {
11036 ::fidl_next::WireBox::encode_absent(out);
11037 }
11038
11039 Ok(())
11040 }
11041 }
11042
11043 unsafe impl<'a, ___E>
11044 ::fidl_next::EncodeOption<
11045 ::fidl_next::WireBox<'static, crate::wire::LinkableLinkIntoResponse>,
11046 ___E,
11047 > for &'a LinkableLinkIntoResponse
11048 where
11049 ___E: ::fidl_next::Encoder + ?Sized,
11050 &'a LinkableLinkIntoResponse:
11051 ::fidl_next::Encode<crate::wire::LinkableLinkIntoResponse, ___E>,
11052 {
11053 #[inline]
11054 fn encode_option(
11055 this: ::core::option::Option<Self>,
11056 encoder: &mut ___E,
11057 out: &mut ::core::mem::MaybeUninit<
11058 ::fidl_next::WireBox<'static, crate::wire::LinkableLinkIntoResponse>,
11059 >,
11060 _: (),
11061 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11062 if let Some(inner) = this {
11063 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11064 ::fidl_next::WireBox::encode_present(out);
11065 } else {
11066 ::fidl_next::WireBox::encode_absent(out);
11067 }
11068
11069 Ok(())
11070 }
11071 }
11072
11073 impl ::fidl_next::FromWire<crate::wire::LinkableLinkIntoResponse> for LinkableLinkIntoResponse {
11074 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
11075 crate::wire::LinkableLinkIntoResponse,
11076 Self,
11077 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11078
11079 #[inline]
11080 fn from_wire(wire: crate::wire::LinkableLinkIntoResponse) -> Self {
11081 Self {}
11082 }
11083 }
11084
11085 impl ::fidl_next::FromWireRef<crate::wire::LinkableLinkIntoResponse> for LinkableLinkIntoResponse {
11086 #[inline]
11087 fn from_wire_ref(wire: &crate::wire::LinkableLinkIntoResponse) -> Self {
11088 Self {}
11089 }
11090 }
11091
11092 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11093 #[repr(C)]
11094 pub struct FileAllocateResponse {}
11095
11096 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileAllocateResponse, ___E>
11097 for FileAllocateResponse
11098 where
11099 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11100 {
11101 #[inline]
11102 fn encode(
11103 self,
11104 encoder_: &mut ___E,
11105 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateResponse>,
11106 _: (),
11107 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11108 *out_ = ::core::mem::MaybeUninit::zeroed();
11109
11110 Ok(())
11111 }
11112 }
11113
11114 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileAllocateResponse, ___E>
11115 for &'a FileAllocateResponse
11116 where
11117 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11118 {
11119 #[inline]
11120 fn encode(
11121 self,
11122 encoder_: &mut ___E,
11123 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateResponse>,
11124 _: (),
11125 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11126 ::fidl_next::munge! {
11127 let crate::wire::FileAllocateResponse {
11128
11129 _empty,
11130
11131
11132 } = out_;
11133 }
11134
11135 Ok(())
11136 }
11137 }
11138
11139 unsafe impl<___E>
11140 ::fidl_next::EncodeOption<
11141 ::fidl_next::WireBox<'static, crate::wire::FileAllocateResponse>,
11142 ___E,
11143 > for FileAllocateResponse
11144 where
11145 ___E: ::fidl_next::Encoder + ?Sized,
11146 FileAllocateResponse: ::fidl_next::Encode<crate::wire::FileAllocateResponse, ___E>,
11147 {
11148 #[inline]
11149 fn encode_option(
11150 this: ::core::option::Option<Self>,
11151 encoder: &mut ___E,
11152 out: &mut ::core::mem::MaybeUninit<
11153 ::fidl_next::WireBox<'static, crate::wire::FileAllocateResponse>,
11154 >,
11155 _: (),
11156 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11157 if let Some(inner) = this {
11158 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11159 ::fidl_next::WireBox::encode_present(out);
11160 } else {
11161 ::fidl_next::WireBox::encode_absent(out);
11162 }
11163
11164 Ok(())
11165 }
11166 }
11167
11168 unsafe impl<'a, ___E>
11169 ::fidl_next::EncodeOption<
11170 ::fidl_next::WireBox<'static, crate::wire::FileAllocateResponse>,
11171 ___E,
11172 > for &'a FileAllocateResponse
11173 where
11174 ___E: ::fidl_next::Encoder + ?Sized,
11175 &'a FileAllocateResponse: ::fidl_next::Encode<crate::wire::FileAllocateResponse, ___E>,
11176 {
11177 #[inline]
11178 fn encode_option(
11179 this: ::core::option::Option<Self>,
11180 encoder: &mut ___E,
11181 out: &mut ::core::mem::MaybeUninit<
11182 ::fidl_next::WireBox<'static, crate::wire::FileAllocateResponse>,
11183 >,
11184 _: (),
11185 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11186 if let Some(inner) = this {
11187 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11188 ::fidl_next::WireBox::encode_present(out);
11189 } else {
11190 ::fidl_next::WireBox::encode_absent(out);
11191 }
11192
11193 Ok(())
11194 }
11195 }
11196
11197 impl ::fidl_next::FromWire<crate::wire::FileAllocateResponse> for FileAllocateResponse {
11198 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
11199 crate::wire::FileAllocateResponse,
11200 Self,
11201 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11202
11203 #[inline]
11204 fn from_wire(wire: crate::wire::FileAllocateResponse) -> Self {
11205 Self {}
11206 }
11207 }
11208
11209 impl ::fidl_next::FromWireRef<crate::wire::FileAllocateResponse> for FileAllocateResponse {
11210 #[inline]
11211 fn from_wire_ref(wire: &crate::wire::FileAllocateResponse) -> Self {
11212 Self {}
11213 }
11214 }
11215
11216 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11217 #[repr(C)]
11218 pub struct FileEnableVerityResponse {}
11219
11220 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileEnableVerityResponse, ___E>
11221 for FileEnableVerityResponse
11222 where
11223 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11224 {
11225 #[inline]
11226 fn encode(
11227 self,
11228 encoder_: &mut ___E,
11229 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityResponse>,
11230 _: (),
11231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11232 *out_ = ::core::mem::MaybeUninit::zeroed();
11233
11234 Ok(())
11235 }
11236 }
11237
11238 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileEnableVerityResponse, ___E>
11239 for &'a FileEnableVerityResponse
11240 where
11241 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11242 {
11243 #[inline]
11244 fn encode(
11245 self,
11246 encoder_: &mut ___E,
11247 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityResponse>,
11248 _: (),
11249 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11250 ::fidl_next::munge! {
11251 let crate::wire::FileEnableVerityResponse {
11252
11253 _empty,
11254
11255
11256 } = out_;
11257 }
11258
11259 Ok(())
11260 }
11261 }
11262
11263 unsafe impl<___E>
11264 ::fidl_next::EncodeOption<
11265 ::fidl_next::WireBox<'static, crate::wire::FileEnableVerityResponse>,
11266 ___E,
11267 > for FileEnableVerityResponse
11268 where
11269 ___E: ::fidl_next::Encoder + ?Sized,
11270 FileEnableVerityResponse: ::fidl_next::Encode<crate::wire::FileEnableVerityResponse, ___E>,
11271 {
11272 #[inline]
11273 fn encode_option(
11274 this: ::core::option::Option<Self>,
11275 encoder: &mut ___E,
11276 out: &mut ::core::mem::MaybeUninit<
11277 ::fidl_next::WireBox<'static, crate::wire::FileEnableVerityResponse>,
11278 >,
11279 _: (),
11280 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11281 if let Some(inner) = this {
11282 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11283 ::fidl_next::WireBox::encode_present(out);
11284 } else {
11285 ::fidl_next::WireBox::encode_absent(out);
11286 }
11287
11288 Ok(())
11289 }
11290 }
11291
11292 unsafe impl<'a, ___E>
11293 ::fidl_next::EncodeOption<
11294 ::fidl_next::WireBox<'static, crate::wire::FileEnableVerityResponse>,
11295 ___E,
11296 > for &'a FileEnableVerityResponse
11297 where
11298 ___E: ::fidl_next::Encoder + ?Sized,
11299 &'a FileEnableVerityResponse:
11300 ::fidl_next::Encode<crate::wire::FileEnableVerityResponse, ___E>,
11301 {
11302 #[inline]
11303 fn encode_option(
11304 this: ::core::option::Option<Self>,
11305 encoder: &mut ___E,
11306 out: &mut ::core::mem::MaybeUninit<
11307 ::fidl_next::WireBox<'static, crate::wire::FileEnableVerityResponse>,
11308 >,
11309 _: (),
11310 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11311 if let Some(inner) = this {
11312 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11313 ::fidl_next::WireBox::encode_present(out);
11314 } else {
11315 ::fidl_next::WireBox::encode_absent(out);
11316 }
11317
11318 Ok(())
11319 }
11320 }
11321
11322 impl ::fidl_next::FromWire<crate::wire::FileEnableVerityResponse> for FileEnableVerityResponse {
11323 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
11324 crate::wire::FileEnableVerityResponse,
11325 Self,
11326 > = unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11327
11328 #[inline]
11329 fn from_wire(wire: crate::wire::FileEnableVerityResponse) -> Self {
11330 Self {}
11331 }
11332 }
11333
11334 impl ::fidl_next::FromWireRef<crate::wire::FileEnableVerityResponse> for FileEnableVerityResponse {
11335 #[inline]
11336 fn from_wire_ref(wire: &crate::wire::FileEnableVerityResponse) -> Self {
11337 Self {}
11338 }
11339 }
11340
11341 ::fidl_next::bitflags::bitflags! {
11342 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct FileSignal: u32 {
11343 #[doc = " Indicates the file is ready for reading.\n"]const READABLE = 16777216;
11344 #[doc = " Indicates the file is ready for writing.\n"]const WRITABLE = 33554432;
11345
11346 }
11347 }
11348
11349 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for FileSignal
11350 where
11351 ___E: ?Sized,
11352 {
11353 #[inline]
11354 fn encode(
11355 self,
11356 encoder: &mut ___E,
11357 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
11358 _: (),
11359 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11360 ::fidl_next::Encode::encode(&self, encoder, out, ())
11361 }
11362 }
11363
11364 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FileSignal, ___E> for &'a FileSignal
11365 where
11366 ___E: ?Sized,
11367 {
11368 #[inline]
11369 fn encode(
11370 self,
11371 _: &mut ___E,
11372 out: &mut ::core::mem::MaybeUninit<crate::wire::FileSignal>,
11373 _: (),
11374 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11375 ::fidl_next::munge!(let crate::wire::FileSignal { value } = out);
11376
11377 if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
11378 return Err(::fidl_next::EncodeError::InvalidStrictBits);
11379 }
11380
11381 let _ = value.write(::fidl_next::WireU32::from(self.bits()));
11382 Ok(())
11383 }
11384 }
11385
11386 impl ::core::convert::From<crate::wire::FileSignal> for FileSignal {
11387 fn from(wire: crate::wire::FileSignal) -> Self {
11388 Self::from_bits_retain(u32::from(wire.value))
11389 }
11390 }
11391
11392 impl ::fidl_next::FromWire<crate::wire::FileSignal> for FileSignal {
11393 #[inline]
11394 fn from_wire(wire: crate::wire::FileSignal) -> Self {
11395 Self::from(wire)
11396 }
11397 }
11398
11399 impl ::fidl_next::FromWireRef<crate::wire::FileSignal> for FileSignal {
11400 #[inline]
11401 fn from_wire_ref(wire: &crate::wire::FileSignal) -> Self {
11402 Self::from(*wire)
11403 }
11404 }
11405
11406 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11407 #[repr(C)]
11408 pub struct FilesystemInfo {
11409 pub total_bytes: u64,
11410
11411 pub used_bytes: u64,
11412
11413 pub total_nodes: u64,
11414
11415 pub used_nodes: u64,
11416
11417 pub free_shared_pool_bytes: u64,
11418
11419 pub fs_id: u64,
11420
11421 pub block_size: u32,
11422
11423 pub max_filename_size: u32,
11424
11425 pub fs_type: u32,
11426
11427 pub padding: u32,
11428
11429 pub name: [i8; 32],
11430 }
11431
11432 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for FilesystemInfo
11433 where
11434 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11435 {
11436 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FilesystemInfo> = unsafe {
11437 ::fidl_next::CopyOptimization::enable_if(
11438 true && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11439 .is_enabled()
11440 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11441 .is_enabled()
11442 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11443 .is_enabled()
11444 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11445 .is_enabled()
11446 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11447 .is_enabled()
11448 && <u64 as ::fidl_next::Encode<::fidl_next::WireU64, ___E>>::COPY_OPTIMIZATION
11449 .is_enabled()
11450 && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION
11451 .is_enabled()
11452 && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION
11453 .is_enabled()
11454 && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION
11455 .is_enabled()
11456 && <u32 as ::fidl_next::Encode<::fidl_next::WireU32, ___E>>::COPY_OPTIMIZATION
11457 .is_enabled()
11458 && <[i8; 32] as ::fidl_next::Encode<[i8; 32], ___E>>::COPY_OPTIMIZATION
11459 .is_enabled(),
11460 )
11461 };
11462
11463 #[inline]
11464 fn encode(
11465 self,
11466 encoder_: &mut ___E,
11467 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
11468 _: (),
11469 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11470 ::fidl_next::munge! {
11471 let crate::wire::FilesystemInfo {
11472 total_bytes,
11473 used_bytes,
11474 total_nodes,
11475 used_nodes,
11476 free_shared_pool_bytes,
11477 fs_id,
11478 block_size,
11479 max_filename_size,
11480 fs_type,
11481 padding,
11482 name,
11483
11484 } = out_;
11485 }
11486
11487 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
11488
11489 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
11490
11491 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
11492
11493 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
11494
11495 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
11496
11497 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
11498
11499 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
11500
11501 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
11502
11503 ::fidl_next::Encode::encode(
11504 self.free_shared_pool_bytes,
11505 encoder_,
11506 free_shared_pool_bytes,
11507 (),
11508 )?;
11509
11510 let mut _field =
11511 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
11512
11513 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
11514
11515 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
11516
11517 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
11518
11519 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
11520
11521 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
11522
11523 let mut _field =
11524 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
11525
11526 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
11527
11528 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
11529
11530 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
11531
11532 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
11533
11534 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
11535
11536 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
11537
11538 Ok(())
11539 }
11540 }
11541
11542 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E> for &'a FilesystemInfo
11543 where
11544 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11545 {
11546 #[inline]
11547 fn encode(
11548 self,
11549 encoder_: &mut ___E,
11550 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
11551 _: (),
11552 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11553 ::fidl_next::munge! {
11554 let crate::wire::FilesystemInfo {
11555
11556 total_bytes,
11557 used_bytes,
11558 total_nodes,
11559 used_nodes,
11560 free_shared_pool_bytes,
11561 fs_id,
11562 block_size,
11563 max_filename_size,
11564 fs_type,
11565 padding,
11566 name,
11567
11568 } = out_;
11569 }
11570
11571 ::fidl_next::Encode::encode(&self.total_bytes, encoder_, total_bytes, ())?;
11572
11573 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_bytes.as_mut_ptr()) };
11574
11575 ::fidl_next::Encode::encode(&self.used_bytes, encoder_, used_bytes, ())?;
11576
11577 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_bytes.as_mut_ptr()) };
11578
11579 ::fidl_next::Encode::encode(&self.total_nodes, encoder_, total_nodes, ())?;
11580
11581 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(total_nodes.as_mut_ptr()) };
11582
11583 ::fidl_next::Encode::encode(&self.used_nodes, encoder_, used_nodes, ())?;
11584
11585 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(used_nodes.as_mut_ptr()) };
11586
11587 ::fidl_next::Encode::encode(
11588 &self.free_shared_pool_bytes,
11589 encoder_,
11590 free_shared_pool_bytes,
11591 (),
11592 )?;
11593
11594 let mut _field =
11595 unsafe { ::fidl_next::Slot::new_unchecked(free_shared_pool_bytes.as_mut_ptr()) };
11596
11597 ::fidl_next::Encode::encode(&self.fs_id, encoder_, fs_id, ())?;
11598
11599 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_id.as_mut_ptr()) };
11600
11601 ::fidl_next::Encode::encode(&self.block_size, encoder_, block_size, ())?;
11602
11603 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(block_size.as_mut_ptr()) };
11604
11605 ::fidl_next::Encode::encode(&self.max_filename_size, encoder_, max_filename_size, ())?;
11606
11607 let mut _field =
11608 unsafe { ::fidl_next::Slot::new_unchecked(max_filename_size.as_mut_ptr()) };
11609
11610 ::fidl_next::Encode::encode(&self.fs_type, encoder_, fs_type, ())?;
11611
11612 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(fs_type.as_mut_ptr()) };
11613
11614 ::fidl_next::Encode::encode(&self.padding, encoder_, padding, ())?;
11615
11616 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(padding.as_mut_ptr()) };
11617
11618 ::fidl_next::Encode::encode(&self.name, encoder_, name, ())?;
11619
11620 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
11621
11622 Ok(())
11623 }
11624 }
11625
11626 unsafe impl<___E>
11627 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>, ___E>
11628 for FilesystemInfo
11629 where
11630 ___E: ::fidl_next::Encoder + ?Sized,
11631 FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
11632 {
11633 #[inline]
11634 fn encode_option(
11635 this: ::core::option::Option<Self>,
11636 encoder: &mut ___E,
11637 out: &mut ::core::mem::MaybeUninit<
11638 ::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>,
11639 >,
11640 _: (),
11641 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11642 if let Some(inner) = this {
11643 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11644 ::fidl_next::WireBox::encode_present(out);
11645 } else {
11646 ::fidl_next::WireBox::encode_absent(out);
11647 }
11648
11649 Ok(())
11650 }
11651 }
11652
11653 unsafe impl<'a, ___E>
11654 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>, ___E>
11655 for &'a FilesystemInfo
11656 where
11657 ___E: ::fidl_next::Encoder + ?Sized,
11658 &'a FilesystemInfo: ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>,
11659 {
11660 #[inline]
11661 fn encode_option(
11662 this: ::core::option::Option<Self>,
11663 encoder: &mut ___E,
11664 out: &mut ::core::mem::MaybeUninit<
11665 ::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>,
11666 >,
11667 _: (),
11668 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11669 if let Some(inner) = this {
11670 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11671 ::fidl_next::WireBox::encode_present(out);
11672 } else {
11673 ::fidl_next::WireBox::encode_absent(out);
11674 }
11675
11676 Ok(())
11677 }
11678 }
11679
11680 impl ::fidl_next::FromWire<crate::wire::FilesystemInfo> for FilesystemInfo {
11681 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FilesystemInfo, Self> = unsafe {
11682 ::fidl_next::CopyOptimization::enable_if(
11683 true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11684 .is_enabled()
11685 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11686 .is_enabled()
11687 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11688 .is_enabled()
11689 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11690 .is_enabled()
11691 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11692 .is_enabled()
11693 && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
11694 .is_enabled()
11695 && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
11696 .is_enabled()
11697 && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
11698 .is_enabled()
11699 && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
11700 .is_enabled()
11701 && <u32 as ::fidl_next::FromWire<::fidl_next::WireU32>>::COPY_OPTIMIZATION
11702 .is_enabled()
11703 && <[i8; 32] as ::fidl_next::FromWire<[i8; 32]>>::COPY_OPTIMIZATION
11704 .is_enabled(),
11705 )
11706 };
11707
11708 #[inline]
11709 fn from_wire(wire: crate::wire::FilesystemInfo) -> Self {
11710 Self {
11711 total_bytes: ::fidl_next::FromWire::from_wire(wire.total_bytes),
11712
11713 used_bytes: ::fidl_next::FromWire::from_wire(wire.used_bytes),
11714
11715 total_nodes: ::fidl_next::FromWire::from_wire(wire.total_nodes),
11716
11717 used_nodes: ::fidl_next::FromWire::from_wire(wire.used_nodes),
11718
11719 free_shared_pool_bytes: ::fidl_next::FromWire::from_wire(
11720 wire.free_shared_pool_bytes,
11721 ),
11722
11723 fs_id: ::fidl_next::FromWire::from_wire(wire.fs_id),
11724
11725 block_size: ::fidl_next::FromWire::from_wire(wire.block_size),
11726
11727 max_filename_size: ::fidl_next::FromWire::from_wire(wire.max_filename_size),
11728
11729 fs_type: ::fidl_next::FromWire::from_wire(wire.fs_type),
11730
11731 padding: ::fidl_next::FromWire::from_wire(wire.padding),
11732
11733 name: ::fidl_next::FromWire::from_wire(wire.name),
11734 }
11735 }
11736 }
11737
11738 impl ::fidl_next::FromWireRef<crate::wire::FilesystemInfo> for FilesystemInfo {
11739 #[inline]
11740 fn from_wire_ref(wire: &crate::wire::FilesystemInfo) -> Self {
11741 Self {
11742 total_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_bytes),
11743
11744 used_bytes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_bytes),
11745
11746 total_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.total_nodes),
11747
11748 used_nodes: ::fidl_next::FromWireRef::from_wire_ref(&wire.used_nodes),
11749
11750 free_shared_pool_bytes: ::fidl_next::FromWireRef::from_wire_ref(
11751 &wire.free_shared_pool_bytes,
11752 ),
11753
11754 fs_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_id),
11755
11756 block_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.block_size),
11757
11758 max_filename_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_filename_size),
11759
11760 fs_type: ::fidl_next::FromWireRef::from_wire_ref(&wire.fs_type),
11761
11762 padding: ::fidl_next::FromWireRef::from_wire_ref(&wire.padding),
11763
11764 name: ::fidl_next::FromWireRef::from_wire_ref(&wire.name),
11765 }
11766 }
11767 }
11768
11769 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11770 #[repr(C)]
11771 pub struct Service {}
11772
11773 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Service, ___E> for Service
11774 where
11775 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11776 {
11777 #[inline]
11778 fn encode(
11779 self,
11780 encoder_: &mut ___E,
11781 out_: &mut ::core::mem::MaybeUninit<crate::wire::Service>,
11782 _: (),
11783 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11784 *out_ = ::core::mem::MaybeUninit::zeroed();
11785
11786 Ok(())
11787 }
11788 }
11789
11790 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Service, ___E> for &'a Service
11791 where
11792 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11793 {
11794 #[inline]
11795 fn encode(
11796 self,
11797 encoder_: &mut ___E,
11798 out_: &mut ::core::mem::MaybeUninit<crate::wire::Service>,
11799 _: (),
11800 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11801 ::fidl_next::munge! {
11802 let crate::wire::Service {
11803
11804 _empty,
11805
11806
11807 } = out_;
11808 }
11809
11810 Ok(())
11811 }
11812 }
11813
11814 unsafe impl<___E>
11815 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::Service>, ___E>
11816 for Service
11817 where
11818 ___E: ::fidl_next::Encoder + ?Sized,
11819 Service: ::fidl_next::Encode<crate::wire::Service, ___E>,
11820 {
11821 #[inline]
11822 fn encode_option(
11823 this: ::core::option::Option<Self>,
11824 encoder: &mut ___E,
11825 out: &mut ::core::mem::MaybeUninit<::fidl_next::WireBox<'static, crate::wire::Service>>,
11826 _: (),
11827 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11828 if let Some(inner) = this {
11829 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11830 ::fidl_next::WireBox::encode_present(out);
11831 } else {
11832 ::fidl_next::WireBox::encode_absent(out);
11833 }
11834
11835 Ok(())
11836 }
11837 }
11838
11839 unsafe impl<'a, ___E>
11840 ::fidl_next::EncodeOption<::fidl_next::WireBox<'static, crate::wire::Service>, ___E>
11841 for &'a Service
11842 where
11843 ___E: ::fidl_next::Encoder + ?Sized,
11844 &'a Service: ::fidl_next::Encode<crate::wire::Service, ___E>,
11845 {
11846 #[inline]
11847 fn encode_option(
11848 this: ::core::option::Option<Self>,
11849 encoder: &mut ___E,
11850 out: &mut ::core::mem::MaybeUninit<::fidl_next::WireBox<'static, crate::wire::Service>>,
11851 _: (),
11852 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11853 if let Some(inner) = this {
11854 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11855 ::fidl_next::WireBox::encode_present(out);
11856 } else {
11857 ::fidl_next::WireBox::encode_absent(out);
11858 }
11859
11860 Ok(())
11861 }
11862 }
11863
11864 impl ::fidl_next::FromWire<crate::wire::Service> for Service {
11865 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::Service, Self> =
11866 unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11867
11868 #[inline]
11869 fn from_wire(wire: crate::wire::Service) -> Self {
11870 Self {}
11871 }
11872 }
11873
11874 impl ::fidl_next::FromWireRef<crate::wire::Service> for Service {
11875 #[inline]
11876 fn from_wire_ref(wire: &crate::wire::Service) -> Self {
11877 Self {}
11878 }
11879 }
11880
11881 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
11882 pub struct SymlinkObject {
11883 pub target: ::std::vec::Vec<u8>,
11884 }
11885
11886 unsafe impl<___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E> for SymlinkObject
11887 where
11888 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11889 ___E: ::fidl_next::Encoder,
11890 {
11891 #[inline]
11892 fn encode(
11893 self,
11894 encoder_: &mut ___E,
11895 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
11896 _: (),
11897 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11898 ::fidl_next::munge! {
11899 let crate::wire::SymlinkObject {
11900 target,
11901
11902 } = out_;
11903 }
11904
11905 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
11906
11907 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
11908 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
11909
11910 Ok(())
11911 }
11912 }
11913
11914 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
11915 for &'a SymlinkObject
11916 where
11917 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11918 ___E: ::fidl_next::Encoder,
11919 {
11920 #[inline]
11921 fn encode(
11922 self,
11923 encoder_: &mut ___E,
11924 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
11925 _: (),
11926 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11927 ::fidl_next::munge! {
11928 let crate::wire::SymlinkObject {
11929
11930 target,
11931
11932 } = out_;
11933 }
11934
11935 ::fidl_next::Encode::encode(&self.target, encoder_, target, (4095, ()))?;
11936
11937 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
11938 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
11939
11940 Ok(())
11941 }
11942 }
11943
11944 unsafe impl<___E>
11945 ::fidl_next::EncodeOption<
11946 ::fidl_next::WireBox<'static, crate::wire::SymlinkObject<'static>>,
11947 ___E,
11948 > for SymlinkObject
11949 where
11950 ___E: ::fidl_next::Encoder + ?Sized,
11951 SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
11952 {
11953 #[inline]
11954 fn encode_option(
11955 this: ::core::option::Option<Self>,
11956 encoder: &mut ___E,
11957 out: &mut ::core::mem::MaybeUninit<
11958 ::fidl_next::WireBox<'static, crate::wire::SymlinkObject<'static>>,
11959 >,
11960 _: (),
11961 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11962 if let Some(inner) = this {
11963 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11964 ::fidl_next::WireBox::encode_present(out);
11965 } else {
11966 ::fidl_next::WireBox::encode_absent(out);
11967 }
11968
11969 Ok(())
11970 }
11971 }
11972
11973 unsafe impl<'a, ___E>
11974 ::fidl_next::EncodeOption<
11975 ::fidl_next::WireBox<'static, crate::wire::SymlinkObject<'static>>,
11976 ___E,
11977 > for &'a SymlinkObject
11978 where
11979 ___E: ::fidl_next::Encoder + ?Sized,
11980 &'a SymlinkObject: ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>,
11981 {
11982 #[inline]
11983 fn encode_option(
11984 this: ::core::option::Option<Self>,
11985 encoder: &mut ___E,
11986 out: &mut ::core::mem::MaybeUninit<
11987 ::fidl_next::WireBox<'static, crate::wire::SymlinkObject<'static>>,
11988 >,
11989 _: (),
11990 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11991 if let Some(inner) = this {
11992 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
11993 ::fidl_next::WireBox::encode_present(out);
11994 } else {
11995 ::fidl_next::WireBox::encode_absent(out);
11996 }
11997
11998 Ok(())
11999 }
12000 }
12001
12002 impl<'de> ::fidl_next::FromWire<crate::wire::SymlinkObject<'de>> for SymlinkObject {
12003 #[inline]
12004 fn from_wire(wire: crate::wire::SymlinkObject<'de>) -> Self {
12005 Self { target: ::fidl_next::FromWire::from_wire(wire.target) }
12006 }
12007 }
12008
12009 impl<'de> ::fidl_next::FromWireRef<crate::wire::SymlinkObject<'de>> for SymlinkObject {
12010 #[inline]
12011 fn from_wire_ref(wire: &crate::wire::SymlinkObject<'de>) -> Self {
12012 Self { target: ::fidl_next::FromWireRef::from_wire_ref(&wire.target) }
12013 }
12014 }
12015
12016 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
12017 #[repr(u8)]
12018 pub enum WatchEvent {
12019 Deleted = 0,
12020 Added = 1,
12021 Removed = 2,
12022 Existing = 3,
12023 Idle = 4,
12024 }
12025 impl ::core::convert::TryFrom<u8> for WatchEvent {
12026 type Error = ::fidl_next::UnknownStrictEnumMemberError;
12027 fn try_from(
12028 value: u8,
12029 ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
12030 match value {
12031 0 => Ok(Self::Deleted),
12032 1 => Ok(Self::Added),
12033 2 => Ok(Self::Removed),
12034 3 => Ok(Self::Existing),
12035 4 => Ok(Self::Idle),
12036
12037 _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
12038 }
12039 }
12040 }
12041
12042 unsafe impl<___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for WatchEvent
12043 where
12044 ___E: ?Sized,
12045 {
12046 #[inline]
12047 fn encode(
12048 self,
12049 encoder: &mut ___E,
12050 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
12051 _: (),
12052 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12053 ::fidl_next::Encode::encode(&self, encoder, out, ())
12054 }
12055 }
12056
12057 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WatchEvent, ___E> for &'a WatchEvent
12058 where
12059 ___E: ?Sized,
12060 {
12061 #[inline]
12062 fn encode(
12063 self,
12064 encoder: &mut ___E,
12065 out: &mut ::core::mem::MaybeUninit<crate::wire::WatchEvent>,
12066 _: (),
12067 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12068 ::fidl_next::munge!(let crate::wire::WatchEvent { value } = out);
12069 let _ = value.write(u8::from(match *self {
12070 WatchEvent::Deleted => 0,
12071
12072 WatchEvent::Added => 1,
12073
12074 WatchEvent::Removed => 2,
12075
12076 WatchEvent::Existing => 3,
12077
12078 WatchEvent::Idle => 4,
12079 }));
12080
12081 Ok(())
12082 }
12083 }
12084
12085 impl ::core::convert::From<crate::wire::WatchEvent> for WatchEvent {
12086 fn from(wire: crate::wire::WatchEvent) -> Self {
12087 match u8::from(wire.value) {
12088 0 => Self::Deleted,
12089
12090 1 => Self::Added,
12091
12092 2 => Self::Removed,
12093
12094 3 => Self::Existing,
12095
12096 4 => Self::Idle,
12097
12098 _ => unsafe { ::core::hint::unreachable_unchecked() },
12099 }
12100 }
12101 }
12102
12103 impl ::fidl_next::FromWire<crate::wire::WatchEvent> for WatchEvent {
12104 #[inline]
12105 fn from_wire(wire: crate::wire::WatchEvent) -> Self {
12106 Self::from(wire)
12107 }
12108 }
12109
12110 impl ::fidl_next::FromWireRef<crate::wire::WatchEvent> for WatchEvent {
12111 #[inline]
12112 fn from_wire_ref(wire: &crate::wire::WatchEvent) -> Self {
12113 Self::from(*wire)
12114 }
12115 }
12116}
12117
12118pub mod wire {
12119
12120 #[derive(Clone, Copy, Debug)]
12122 #[repr(transparent)]
12123 pub struct Operations {
12124 pub(crate) value: ::fidl_next::WireU64,
12125 }
12126
12127 unsafe impl ::fidl_next::Wire for Operations {
12128 type Owned<'de> = Self;
12129
12130 #[inline]
12131 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12132 }
12134 }
12135
12136 unsafe impl<___D> ::fidl_next::Decode<___D> for Operations
12137 where
12138 ___D: ?Sized,
12139 {
12140 fn decode(
12141 slot: ::fidl_next::Slot<'_, Self>,
12142 _: &mut ___D,
12143 _: (),
12144 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12145 ::fidl_next::munge!(let Self { value } = slot);
12146 let set = u64::from(*value);
12147 if set & !crate::natural::Operations::all().bits() != 0 {
12148 return Err(::fidl_next::DecodeError::InvalidBits {
12149 expected: crate::natural::Operations::all().bits() as usize,
12150 actual: set as usize,
12151 });
12152 }
12153
12154 Ok(())
12155 }
12156 }
12157
12158 impl ::core::convert::From<crate::natural::Operations> for Operations {
12159 fn from(natural: crate::natural::Operations) -> Self {
12160 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
12161 }
12162 }
12163
12164 impl ::fidl_next::IntoNatural for Operations {
12165 type Natural = crate::natural::Operations;
12166 }
12167
12168 impl ::fidl_next::Unconstrained for Operations {}
12169
12170 pub type Abilities = crate::wire::Operations;
12172
12173 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12175 #[repr(transparent)]
12176 pub struct SeekOrigin {
12177 pub(crate) value: ::fidl_next::WireU32,
12178 }
12179
12180 unsafe impl ::fidl_next::Wire for SeekOrigin {
12181 type Owned<'de> = Self;
12182
12183 #[inline]
12184 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12185 }
12187 }
12188
12189 impl SeekOrigin {
12190 pub const START: SeekOrigin = SeekOrigin { value: ::fidl_next::WireU32(0) };
12191
12192 pub const CURRENT: SeekOrigin = SeekOrigin { value: ::fidl_next::WireU32(1) };
12193
12194 pub const END: SeekOrigin = SeekOrigin { value: ::fidl_next::WireU32(2) };
12195 }
12196
12197 unsafe impl<___D> ::fidl_next::Decode<___D> for SeekOrigin
12198 where
12199 ___D: ?Sized,
12200 {
12201 fn decode(
12202 slot: ::fidl_next::Slot<'_, Self>,
12203 _: &mut ___D,
12204 _: (),
12205 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12206 ::fidl_next::munge!(let Self { value } = slot);
12207
12208 match u32::from(*value) {
12209 0 | 1 | 2 => (),
12210 unknown => {
12211 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
12212 }
12213 }
12214
12215 Ok(())
12216 }
12217 }
12218
12219 impl ::core::convert::From<crate::natural::SeekOrigin> for SeekOrigin {
12220 fn from(natural: crate::natural::SeekOrigin) -> Self {
12221 match natural {
12222 crate::natural::SeekOrigin::Start => SeekOrigin::START,
12223
12224 crate::natural::SeekOrigin::Current => SeekOrigin::CURRENT,
12225
12226 crate::natural::SeekOrigin::End => SeekOrigin::END,
12227 }
12228 }
12229 }
12230
12231 impl ::fidl_next::IntoNatural for SeekOrigin {
12232 type Natural = crate::natural::SeekOrigin;
12233 }
12234
12235 impl ::fidl_next::Unconstrained for SeekOrigin {}
12236
12237 #[derive(Clone, Debug)]
12239 #[repr(C)]
12240 pub struct AdvisoryLockRange {
12241 pub origin: crate::wire::SeekOrigin,
12242
12243 pub offset: ::fidl_next::WireI64,
12244
12245 pub length: ::fidl_next::WireI64,
12246 }
12247
12248 static_assertions::const_assert_eq!(std::mem::size_of::<AdvisoryLockRange>(), 24);
12249 static_assertions::const_assert_eq!(std::mem::align_of::<AdvisoryLockRange>(), 8);
12250
12251 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, origin), 0);
12252
12253 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, offset), 8);
12254
12255 static_assertions::const_assert_eq!(std::mem::offset_of!(AdvisoryLockRange, length), 16);
12256
12257 unsafe impl ::fidl_next::Wire for AdvisoryLockRange {
12258 type Owned<'de> = AdvisoryLockRange;
12259
12260 #[inline]
12261 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12262 ::fidl_next::munge! {
12263 let Self {
12264
12265 origin,
12266 offset,
12267 length,
12268
12269 } = &mut *out_;
12270 }
12271
12272 ::fidl_next::Wire::zero_padding(origin);
12273
12274 ::fidl_next::Wire::zero_padding(offset);
12275
12276 ::fidl_next::Wire::zero_padding(length);
12277
12278 unsafe {
12279 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12280 }
12281 }
12282 }
12283
12284 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockRange
12285 where
12286 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12287 {
12288 fn decode(
12289 slot_: ::fidl_next::Slot<'_, Self>,
12290 decoder_: &mut ___D,
12291 _: (),
12292 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12293 if slot_.as_bytes()[4..8] != [0u8; 4] {
12294 return Err(::fidl_next::DecodeError::InvalidPadding);
12295 }
12296
12297 ::fidl_next::munge! {
12298 let Self {
12299
12300 mut origin,
12301 mut offset,
12302 mut length,
12303
12304 } = slot_;
12305 }
12306
12307 let _field = origin.as_mut();
12308
12309 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
12310
12311 let _field = offset.as_mut();
12312
12313 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
12314
12315 let _field = length.as_mut();
12316
12317 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
12318
12319 Ok(())
12320 }
12321 }
12322
12323 impl ::fidl_next::IntoNatural for AdvisoryLockRange {
12324 type Natural = crate::natural::AdvisoryLockRange;
12325 }
12326
12327 impl ::fidl_next::Unconstrained for AdvisoryLockRange {}
12328
12329 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
12331 #[repr(transparent)]
12332 pub struct AdvisoryLockType {
12333 pub(crate) value: ::fidl_next::WireU32,
12334 }
12335
12336 unsafe impl ::fidl_next::Wire for AdvisoryLockType {
12337 type Owned<'de> = Self;
12338
12339 #[inline]
12340 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12341 }
12343 }
12344
12345 impl AdvisoryLockType {
12346 pub const READ: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::WireU32(1) };
12347
12348 pub const WRITE: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::WireU32(2) };
12349
12350 pub const UNLOCK: AdvisoryLockType = AdvisoryLockType { value: ::fidl_next::WireU32(3) };
12351 }
12352
12353 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockType
12354 where
12355 ___D: ?Sized,
12356 {
12357 fn decode(
12358 slot: ::fidl_next::Slot<'_, Self>,
12359 _: &mut ___D,
12360 _: (),
12361 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12362 ::fidl_next::munge!(let Self { value } = slot);
12363
12364 match u32::from(*value) {
12365 1 | 2 | 3 => (),
12366 unknown => {
12367 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
12368 }
12369 }
12370
12371 Ok(())
12372 }
12373 }
12374
12375 impl ::core::convert::From<crate::natural::AdvisoryLockType> for AdvisoryLockType {
12376 fn from(natural: crate::natural::AdvisoryLockType) -> Self {
12377 match natural {
12378 crate::natural::AdvisoryLockType::Read => AdvisoryLockType::READ,
12379
12380 crate::natural::AdvisoryLockType::Write => AdvisoryLockType::WRITE,
12381
12382 crate::natural::AdvisoryLockType::Unlock => AdvisoryLockType::UNLOCK,
12383 }
12384 }
12385 }
12386
12387 impl ::fidl_next::IntoNatural for AdvisoryLockType {
12388 type Natural = crate::natural::AdvisoryLockType;
12389 }
12390
12391 impl ::fidl_next::Unconstrained for AdvisoryLockType {}
12392
12393 #[repr(C)]
12395 pub struct AdvisoryLockRequest<'de> {
12396 pub(crate) table: ::fidl_next::WireTable<'de>,
12397 }
12398
12399 impl<'de> Drop for AdvisoryLockRequest<'de> {
12400 fn drop(&mut self) {
12401 let _ = self.table.get(1).map(|envelope| unsafe {
12402 envelope.read_unchecked::<crate::wire::AdvisoryLockType>()
12403 });
12404
12405 let _ = self.table.get(2).map(|envelope| unsafe {
12406 envelope.read_unchecked::<crate::wire::AdvisoryLockRange>()
12407 });
12408
12409 let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
12410 }
12411 }
12412
12413 unsafe impl ::fidl_next::Wire for AdvisoryLockRequest<'static> {
12414 type Owned<'de> = AdvisoryLockRequest<'de>;
12415
12416 #[inline]
12417 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12418 ::fidl_next::munge!(let Self { table } = out);
12419 ::fidl_next::WireTable::zero_padding(table);
12420 }
12421 }
12422
12423 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockRequest<'static>
12424 where
12425 ___D: ::fidl_next::Decoder + ?Sized,
12426 {
12427 fn decode(
12428 slot: ::fidl_next::Slot<'_, Self>,
12429 decoder: &mut ___D,
12430 _: (),
12431 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12432 ::fidl_next::munge!(let Self { table } = slot);
12433
12434 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12435 match ordinal {
12436 0 => unsafe { ::core::hint::unreachable_unchecked() },
12437
12438 1 => {
12439 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::AdvisoryLockType>(
12440 slot.as_mut(),
12441 decoder,
12442 (),
12443 )?;
12444
12445 Ok(())
12446 }
12447
12448 2 => {
12449 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::AdvisoryLockRange>(
12450 slot.as_mut(),
12451 decoder,
12452 (),
12453 )?;
12454
12455 Ok(())
12456 }
12457
12458 3 => {
12459 ::fidl_next::WireEnvelope::decode_as::<___D, bool>(
12460 slot.as_mut(),
12461 decoder,
12462 (),
12463 )?;
12464
12465 Ok(())
12466 }
12467
12468 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
12469 }
12470 })
12471 }
12472 }
12473
12474 impl<'de> AdvisoryLockRequest<'de> {
12475 pub fn type_(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockType> {
12476 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12477 }
12478
12479 pub fn range(&self) -> ::core::option::Option<&crate::wire::AdvisoryLockRange> {
12480 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12481 }
12482
12483 pub fn wait(&self) -> ::core::option::Option<&bool> {
12484 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
12485 }
12486 }
12487
12488 impl<'de> ::core::fmt::Debug for AdvisoryLockRequest<'de> {
12489 fn fmt(
12490 &self,
12491 f: &mut ::core::fmt::Formatter<'_>,
12492 ) -> ::core::result::Result<(), ::core::fmt::Error> {
12493 f.debug_struct("AdvisoryLockRequest")
12494 .field("type_", &self.type_())
12495 .field("range", &self.range())
12496 .field("wait", &self.wait())
12497 .finish()
12498 }
12499 }
12500
12501 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockRequest<'de> {
12502 type Natural = crate::natural::AdvisoryLockRequest;
12503 }
12504
12505 impl ::fidl_next::Unconstrained for AdvisoryLockRequest<'_> {}
12506
12507 #[derive(Debug)]
12509 #[repr(C)]
12510 pub struct AdvisoryLockingAdvisoryLockRequest<'de> {
12511 pub request: crate::wire::AdvisoryLockRequest<'de>,
12512 }
12513
12514 static_assertions::const_assert_eq!(
12515 std::mem::size_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
12516 16
12517 );
12518 static_assertions::const_assert_eq!(
12519 std::mem::align_of::<AdvisoryLockingAdvisoryLockRequest<'_>>(),
12520 8
12521 );
12522
12523 static_assertions::const_assert_eq!(
12524 std::mem::offset_of!(AdvisoryLockingAdvisoryLockRequest<'_>, request),
12525 0
12526 );
12527
12528 unsafe impl ::fidl_next::Wire for AdvisoryLockingAdvisoryLockRequest<'static> {
12529 type Owned<'de> = AdvisoryLockingAdvisoryLockRequest<'de>;
12530
12531 #[inline]
12532 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12533 ::fidl_next::munge! {
12534 let Self {
12535
12536 request,
12537
12538 } = &mut *out_;
12539 }
12540
12541 ::fidl_next::Wire::zero_padding(request);
12542 }
12543 }
12544
12545 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockingAdvisoryLockRequest<'static>
12546 where
12547 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12548 ___D: ::fidl_next::Decoder,
12549 {
12550 fn decode(
12551 slot_: ::fidl_next::Slot<'_, Self>,
12552 decoder_: &mut ___D,
12553 _: (),
12554 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12555 ::fidl_next::munge! {
12556 let Self {
12557
12558 mut request,
12559
12560 } = slot_;
12561 }
12562
12563 let _field = request.as_mut();
12564
12565 ::fidl_next::Decode::decode(request.as_mut(), decoder_, ())?;
12566
12567 Ok(())
12568 }
12569 }
12570
12571 impl<'de> ::fidl_next::IntoNatural for AdvisoryLockingAdvisoryLockRequest<'de> {
12572 type Natural = crate::natural::AdvisoryLockingAdvisoryLockRequest;
12573 }
12574
12575 impl ::fidl_next::Unconstrained for AdvisoryLockingAdvisoryLockRequest<'static> {}
12576
12577 #[derive(Clone, Debug)]
12579 #[repr(C)]
12580 pub struct AdvisoryLockingAdvisoryLockResponse {
12581 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
12582 }
12583
12584 static_assertions::const_assert_eq!(
12585 std::mem::size_of::<AdvisoryLockingAdvisoryLockResponse>(),
12586 1
12587 );
12588 static_assertions::const_assert_eq!(
12589 std::mem::align_of::<AdvisoryLockingAdvisoryLockResponse>(),
12590 1
12591 );
12592
12593 unsafe impl ::fidl_next::Wire for AdvisoryLockingAdvisoryLockResponse {
12594 type Owned<'de> = AdvisoryLockingAdvisoryLockResponse;
12595
12596 #[inline]
12597 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12598 ::fidl_next::munge! {
12599 let Self {
12600
12601 _empty,
12602
12603
12604 } = &mut *out_;
12605 }
12606 }
12607 }
12608
12609 unsafe impl<___D> ::fidl_next::Decode<___D> for AdvisoryLockingAdvisoryLockResponse
12610 where
12611 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12612 {
12613 fn decode(
12614 slot_: ::fidl_next::Slot<'_, Self>,
12615 decoder_: &mut ___D,
12616 _: (),
12617 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12618 ::fidl_next::munge! {
12619 let Self {
12620
12621 mut _empty,
12622
12623
12624 } = slot_;
12625 }
12626
12627 if _empty.as_bytes() != &[0u8] {
12628 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
12629 }
12630
12631 Ok(())
12632 }
12633 }
12634
12635 impl ::fidl_next::IntoNatural for AdvisoryLockingAdvisoryLockResponse {
12636 type Natural = crate::natural::AdvisoryLockingAdvisoryLockResponse;
12637 }
12638
12639 impl ::fidl_next::Unconstrained for AdvisoryLockingAdvisoryLockResponse {}
12640
12641 #[derive(Clone, Copy, Debug)]
12643 #[repr(transparent)]
12644 pub struct AllocateMode {
12645 pub(crate) value: ::fidl_next::WireU32,
12646 }
12647
12648 unsafe impl ::fidl_next::Wire for AllocateMode {
12649 type Owned<'de> = Self;
12650
12651 #[inline]
12652 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12653 }
12655 }
12656
12657 unsafe impl<___D> ::fidl_next::Decode<___D> for AllocateMode
12658 where
12659 ___D: ?Sized,
12660 {
12661 fn decode(
12662 slot: ::fidl_next::Slot<'_, Self>,
12663 _: &mut ___D,
12664 _: (),
12665 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12666 Ok(())
12667 }
12668 }
12669
12670 impl ::core::convert::From<crate::natural::AllocateMode> for AllocateMode {
12671 fn from(natural: crate::natural::AllocateMode) -> Self {
12672 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
12673 }
12674 }
12675
12676 impl ::fidl_next::IntoNatural for AllocateMode {
12677 type Natural = crate::natural::AllocateMode;
12678 }
12679
12680 impl ::fidl_next::Unconstrained for AllocateMode {}
12681
12682 pub type Rights = crate::wire::Operations;
12684
12685 pub type Id = ::fidl_next::WireU64;
12687
12688 #[derive(Clone, Copy, Debug)]
12690 #[repr(transparent)]
12691 pub struct OpenFlags {
12692 pub(crate) value: ::fidl_next::WireU32,
12693 }
12694
12695 unsafe impl ::fidl_next::Wire for OpenFlags {
12696 type Owned<'de> = Self;
12697
12698 #[inline]
12699 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12700 }
12702 }
12703
12704 unsafe impl<___D> ::fidl_next::Decode<___D> for OpenFlags
12705 where
12706 ___D: ?Sized,
12707 {
12708 fn decode(
12709 slot: ::fidl_next::Slot<'_, Self>,
12710 _: &mut ___D,
12711 _: (),
12712 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12713 ::fidl_next::munge!(let Self { value } = slot);
12714 let set = u32::from(*value);
12715 if set & !crate::natural::OpenFlags::all().bits() != 0 {
12716 return Err(::fidl_next::DecodeError::InvalidBits {
12717 expected: crate::natural::OpenFlags::all().bits() as usize,
12718 actual: set as usize,
12719 });
12720 }
12721
12722 Ok(())
12723 }
12724 }
12725
12726 impl ::core::convert::From<crate::natural::OpenFlags> for OpenFlags {
12727 fn from(natural: crate::natural::OpenFlags) -> Self {
12728 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
12729 }
12730 }
12731
12732 impl ::fidl_next::IntoNatural for OpenFlags {
12733 type Natural = crate::natural::OpenFlags;
12734 }
12735
12736 impl ::fidl_next::Unconstrained for OpenFlags {}
12737
12738 #[derive(Clone, Debug)]
12740 #[repr(C)]
12741 pub struct NodeAttributes {
12742 pub mode: ::fidl_next::WireU32,
12743
12744 pub id: ::fidl_next::WireU64,
12745
12746 pub content_size: ::fidl_next::WireU64,
12747
12748 pub storage_size: ::fidl_next::WireU64,
12749
12750 pub link_count: ::fidl_next::WireU64,
12751
12752 pub creation_time: ::fidl_next::WireU64,
12753
12754 pub modification_time: ::fidl_next::WireU64,
12755 }
12756
12757 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes>(), 56);
12758 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes>(), 8);
12759
12760 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, mode), 0);
12761
12762 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, id), 8);
12763
12764 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, content_size), 16);
12765
12766 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, storage_size), 24);
12767
12768 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, link_count), 32);
12769
12770 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAttributes, creation_time), 40);
12771
12772 static_assertions::const_assert_eq!(
12773 std::mem::offset_of!(NodeAttributes, modification_time),
12774 48
12775 );
12776
12777 unsafe impl ::fidl_next::Wire for NodeAttributes {
12778 type Owned<'de> = NodeAttributes;
12779
12780 #[inline]
12781 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12782 ::fidl_next::munge! {
12783 let Self {
12784
12785 mode,
12786 id,
12787 content_size,
12788 storage_size,
12789 link_count,
12790 creation_time,
12791 modification_time,
12792
12793 } = &mut *out_;
12794 }
12795
12796 ::fidl_next::Wire::zero_padding(mode);
12797
12798 ::fidl_next::Wire::zero_padding(id);
12799
12800 ::fidl_next::Wire::zero_padding(content_size);
12801
12802 ::fidl_next::Wire::zero_padding(storage_size);
12803
12804 ::fidl_next::Wire::zero_padding(link_count);
12805
12806 ::fidl_next::Wire::zero_padding(creation_time);
12807
12808 ::fidl_next::Wire::zero_padding(modification_time);
12809
12810 unsafe {
12811 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12812 }
12813 }
12814 }
12815
12816 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributes
12817 where
12818 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12819 {
12820 fn decode(
12821 slot_: ::fidl_next::Slot<'_, Self>,
12822 decoder_: &mut ___D,
12823 _: (),
12824 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12825 if slot_.as_bytes()[4..8] != [0u8; 4] {
12826 return Err(::fidl_next::DecodeError::InvalidPadding);
12827 }
12828
12829 ::fidl_next::munge! {
12830 let Self {
12831
12832 mut mode,
12833 mut id,
12834 mut content_size,
12835 mut storage_size,
12836 mut link_count,
12837 mut creation_time,
12838 mut modification_time,
12839
12840 } = slot_;
12841 }
12842
12843 let _field = mode.as_mut();
12844
12845 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
12846
12847 let _field = id.as_mut();
12848
12849 ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
12850
12851 let _field = content_size.as_mut();
12852
12853 ::fidl_next::Decode::decode(content_size.as_mut(), decoder_, ())?;
12854
12855 let _field = storage_size.as_mut();
12856
12857 ::fidl_next::Decode::decode(storage_size.as_mut(), decoder_, ())?;
12858
12859 let _field = link_count.as_mut();
12860
12861 ::fidl_next::Decode::decode(link_count.as_mut(), decoder_, ())?;
12862
12863 let _field = creation_time.as_mut();
12864
12865 ::fidl_next::Decode::decode(creation_time.as_mut(), decoder_, ())?;
12866
12867 let _field = modification_time.as_mut();
12868
12869 ::fidl_next::Decode::decode(modification_time.as_mut(), decoder_, ())?;
12870
12871 Ok(())
12872 }
12873 }
12874
12875 impl ::fidl_next::IntoNatural for NodeAttributes {
12876 type Natural = crate::natural::NodeAttributes;
12877 }
12878
12879 impl ::fidl_next::Unconstrained for NodeAttributes {}
12880
12881 #[derive(Clone, Copy, Debug)]
12883 #[repr(transparent)]
12884 pub struct NodeAttributeFlags {
12885 pub(crate) value: ::fidl_next::WireU32,
12886 }
12887
12888 unsafe impl ::fidl_next::Wire for NodeAttributeFlags {
12889 type Owned<'de> = Self;
12890
12891 #[inline]
12892 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
12893 }
12895 }
12896
12897 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributeFlags
12898 where
12899 ___D: ?Sized,
12900 {
12901 fn decode(
12902 slot: ::fidl_next::Slot<'_, Self>,
12903 _: &mut ___D,
12904 _: (),
12905 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12906 ::fidl_next::munge!(let Self { value } = slot);
12907 let set = u32::from(*value);
12908 if set & !crate::natural::NodeAttributeFlags::all().bits() != 0 {
12909 return Err(::fidl_next::DecodeError::InvalidBits {
12910 expected: crate::natural::NodeAttributeFlags::all().bits() as usize,
12911 actual: set as usize,
12912 });
12913 }
12914
12915 Ok(())
12916 }
12917 }
12918
12919 impl ::core::convert::From<crate::natural::NodeAttributeFlags> for NodeAttributeFlags {
12920 fn from(natural: crate::natural::NodeAttributeFlags) -> Self {
12921 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
12922 }
12923 }
12924
12925 impl ::fidl_next::IntoNatural for NodeAttributeFlags {
12926 type Natural = crate::natural::NodeAttributeFlags;
12927 }
12928
12929 impl ::fidl_next::Unconstrained for NodeAttributeFlags {}
12930
12931 #[derive(Debug)]
12933 #[repr(C)]
12934 pub struct NodeQueryFilesystemResponse<'de> {
12935 pub s: ::fidl_next::WireI32,
12936
12937 pub info: ::fidl_next::WireBox<'de, crate::wire::FilesystemInfo>,
12938 }
12939
12940 static_assertions::const_assert_eq!(std::mem::size_of::<NodeQueryFilesystemResponse<'_>>(), 16);
12941 static_assertions::const_assert_eq!(std::mem::align_of::<NodeQueryFilesystemResponse<'_>>(), 8);
12942
12943 static_assertions::const_assert_eq!(
12944 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, s),
12945 0
12946 );
12947
12948 static_assertions::const_assert_eq!(
12949 std::mem::offset_of!(NodeQueryFilesystemResponse<'_>, info),
12950 8
12951 );
12952
12953 unsafe impl ::fidl_next::Wire for NodeQueryFilesystemResponse<'static> {
12954 type Owned<'de> = NodeQueryFilesystemResponse<'de>;
12955
12956 #[inline]
12957 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12958 ::fidl_next::munge! {
12959 let Self {
12960
12961 s,
12962 info,
12963
12964 } = &mut *out_;
12965 }
12966
12967 ::fidl_next::Wire::zero_padding(s);
12968
12969 ::fidl_next::Wire::zero_padding(info);
12970
12971 unsafe {
12972 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
12973 }
12974 }
12975 }
12976
12977 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeQueryFilesystemResponse<'static>
12978 where
12979 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12980 ___D: ::fidl_next::Decoder,
12981 {
12982 fn decode(
12983 slot_: ::fidl_next::Slot<'_, Self>,
12984 decoder_: &mut ___D,
12985 _: (),
12986 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12987 if slot_.as_bytes()[4..8] != [0u8; 4] {
12988 return Err(::fidl_next::DecodeError::InvalidPadding);
12989 }
12990
12991 ::fidl_next::munge! {
12992 let Self {
12993
12994 mut s,
12995 mut info,
12996
12997 } = slot_;
12998 }
12999
13000 let _field = s.as_mut();
13001
13002 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13003
13004 let _field = info.as_mut();
13005
13006 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
13007
13008 Ok(())
13009 }
13010 }
13011
13012 impl<'de> ::fidl_next::IntoNatural for NodeQueryFilesystemResponse<'de> {
13013 type Natural = crate::natural::NodeQueryFilesystemResponse;
13014 }
13015
13016 impl ::fidl_next::Unconstrained for NodeQueryFilesystemResponse<'static> {}
13017
13018 #[derive(Clone, Debug)]
13020 #[repr(C)]
13021 pub struct NodeUpdateAttributesResponse {
13022 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
13023 }
13024
13025 static_assertions::const_assert_eq!(std::mem::size_of::<NodeUpdateAttributesResponse>(), 1);
13026 static_assertions::const_assert_eq!(std::mem::align_of::<NodeUpdateAttributesResponse>(), 1);
13027
13028 unsafe impl ::fidl_next::Wire for NodeUpdateAttributesResponse {
13029 type Owned<'de> = NodeUpdateAttributesResponse;
13030
13031 #[inline]
13032 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13033 ::fidl_next::munge! {
13034 let Self {
13035
13036 _empty,
13037
13038
13039 } = &mut *out_;
13040 }
13041 }
13042 }
13043
13044 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeUpdateAttributesResponse
13045 where
13046 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13047 {
13048 fn decode(
13049 slot_: ::fidl_next::Slot<'_, Self>,
13050 decoder_: &mut ___D,
13051 _: (),
13052 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13053 ::fidl_next::munge! {
13054 let Self {
13055
13056 mut _empty,
13057
13058
13059 } = slot_;
13060 }
13061
13062 if _empty.as_bytes() != &[0u8] {
13063 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
13064 }
13065
13066 Ok(())
13067 }
13068 }
13069
13070 impl ::fidl_next::IntoNatural for NodeUpdateAttributesResponse {
13071 type Natural = crate::natural::NodeUpdateAttributesResponse;
13072 }
13073
13074 impl ::fidl_next::Unconstrained for NodeUpdateAttributesResponse {}
13075
13076 #[derive(Clone, Debug)]
13078 #[repr(C)]
13079 pub struct NodeSyncResponse {
13080 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
13081 }
13082
13083 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSyncResponse>(), 1);
13084 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSyncResponse>(), 1);
13085
13086 unsafe impl ::fidl_next::Wire for NodeSyncResponse {
13087 type Owned<'de> = NodeSyncResponse;
13088
13089 #[inline]
13090 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13091 ::fidl_next::munge! {
13092 let Self {
13093
13094 _empty,
13095
13096
13097 } = &mut *out_;
13098 }
13099 }
13100 }
13101
13102 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSyncResponse
13103 where
13104 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13105 {
13106 fn decode(
13107 slot_: ::fidl_next::Slot<'_, Self>,
13108 decoder_: &mut ___D,
13109 _: (),
13110 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13111 ::fidl_next::munge! {
13112 let Self {
13113
13114 mut _empty,
13115
13116
13117 } = slot_;
13118 }
13119
13120 if _empty.as_bytes() != &[0u8] {
13121 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
13122 }
13123
13124 Ok(())
13125 }
13126 }
13127
13128 impl ::fidl_next::IntoNatural for NodeSyncResponse {
13129 type Natural = crate::natural::NodeSyncResponse;
13130 }
13131
13132 impl ::fidl_next::Unconstrained for NodeSyncResponse {}
13133
13134 #[derive(Clone, Copy, Debug)]
13136 #[repr(transparent)]
13137 pub struct ModeType {
13138 pub(crate) value: ::fidl_next::WireU32,
13139 }
13140
13141 unsafe impl ::fidl_next::Wire for ModeType {
13142 type Owned<'de> = Self;
13143
13144 #[inline]
13145 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13146 }
13148 }
13149
13150 unsafe impl<___D> ::fidl_next::Decode<___D> for ModeType
13151 where
13152 ___D: ?Sized,
13153 {
13154 fn decode(
13155 slot: ::fidl_next::Slot<'_, Self>,
13156 _: &mut ___D,
13157 _: (),
13158 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13159 ::fidl_next::munge!(let Self { value } = slot);
13160 let set = u32::from(*value);
13161 if set & !crate::natural::ModeType::all().bits() != 0 {
13162 return Err(::fidl_next::DecodeError::InvalidBits {
13163 expected: crate::natural::ModeType::all().bits() as usize,
13164 actual: set as usize,
13165 });
13166 }
13167
13168 Ok(())
13169 }
13170 }
13171
13172 impl ::core::convert::From<crate::natural::ModeType> for ModeType {
13173 fn from(natural: crate::natural::ModeType) -> Self {
13174 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
13175 }
13176 }
13177
13178 impl ::fidl_next::IntoNatural for ModeType {
13179 type Natural = crate::natural::ModeType;
13180 }
13181
13182 impl ::fidl_next::Unconstrained for ModeType {}
13183
13184 pub type Path<'de> = ::fidl_next::WireString<'de>;
13186
13187 #[derive(Clone, Debug)]
13189 #[repr(C)]
13190 pub struct DirectoryReadDirentsRequest {
13191 pub max_bytes: ::fidl_next::WireU64,
13192 }
13193
13194 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryReadDirentsRequest>(), 8);
13195 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryReadDirentsRequest>(), 8);
13196
13197 static_assertions::const_assert_eq!(
13198 std::mem::offset_of!(DirectoryReadDirentsRequest, max_bytes),
13199 0
13200 );
13201
13202 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsRequest {
13203 type Owned<'de> = DirectoryReadDirentsRequest;
13204
13205 #[inline]
13206 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13207 ::fidl_next::munge! {
13208 let Self {
13209
13210 max_bytes,
13211
13212 } = &mut *out_;
13213 }
13214
13215 ::fidl_next::Wire::zero_padding(max_bytes);
13216 }
13217 }
13218
13219 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsRequest
13220 where
13221 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13222 {
13223 fn decode(
13224 slot_: ::fidl_next::Slot<'_, Self>,
13225 decoder_: &mut ___D,
13226 _: (),
13227 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13228 ::fidl_next::munge! {
13229 let Self {
13230
13231 mut max_bytes,
13232
13233 } = slot_;
13234 }
13235
13236 let _field = max_bytes.as_mut();
13237
13238 ::fidl_next::Decode::decode(max_bytes.as_mut(), decoder_, ())?;
13239
13240 Ok(())
13241 }
13242 }
13243
13244 impl ::fidl_next::IntoNatural for DirectoryReadDirentsRequest {
13245 type Natural = crate::natural::DirectoryReadDirentsRequest;
13246 }
13247
13248 impl ::fidl_next::Unconstrained for DirectoryReadDirentsRequest {}
13249
13250 #[derive(Debug)]
13252 #[repr(C)]
13253 pub struct DirectoryReadDirentsResponse<'de> {
13254 pub s: ::fidl_next::WireI32,
13255
13256 pub dirents: ::fidl_next::WireVector<'de, u8>,
13257 }
13258
13259 static_assertions::const_assert_eq!(
13260 std::mem::size_of::<DirectoryReadDirentsResponse<'_>>(),
13261 24
13262 );
13263 static_assertions::const_assert_eq!(
13264 std::mem::align_of::<DirectoryReadDirentsResponse<'_>>(),
13265 8
13266 );
13267
13268 static_assertions::const_assert_eq!(
13269 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, s),
13270 0
13271 );
13272
13273 static_assertions::const_assert_eq!(
13274 std::mem::offset_of!(DirectoryReadDirentsResponse<'_>, dirents),
13275 8
13276 );
13277
13278 unsafe impl ::fidl_next::Wire for DirectoryReadDirentsResponse<'static> {
13279 type Owned<'de> = DirectoryReadDirentsResponse<'de>;
13280
13281 #[inline]
13282 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13283 ::fidl_next::munge! {
13284 let Self {
13285
13286 s,
13287 dirents,
13288
13289 } = &mut *out_;
13290 }
13291
13292 ::fidl_next::Wire::zero_padding(s);
13293
13294 ::fidl_next::Wire::zero_padding(dirents);
13295
13296 unsafe {
13297 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
13298 }
13299 }
13300 }
13301
13302 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryReadDirentsResponse<'static>
13303 where
13304 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13305 ___D: ::fidl_next::Decoder,
13306 {
13307 fn decode(
13308 slot_: ::fidl_next::Slot<'_, Self>,
13309 decoder_: &mut ___D,
13310 _: (),
13311 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13312 if slot_.as_bytes()[4..8] != [0u8; 4] {
13313 return Err(::fidl_next::DecodeError::InvalidPadding);
13314 }
13315
13316 ::fidl_next::munge! {
13317 let Self {
13318
13319 mut s,
13320 mut dirents,
13321
13322 } = slot_;
13323 }
13324
13325 let _field = s.as_mut();
13326
13327 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13328
13329 let _field = dirents.as_mut();
13330 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
13331 ::fidl_next::Decode::decode(dirents.as_mut(), decoder_, (8192, ()))?;
13332
13333 let dirents = unsafe { dirents.deref_unchecked() };
13334
13335 if dirents.len() > 8192 {
13336 return Err(::fidl_next::DecodeError::VectorTooLong {
13337 size: dirents.len() as u64,
13338 limit: 8192,
13339 });
13340 }
13341
13342 Ok(())
13343 }
13344 }
13345
13346 impl<'de> ::fidl_next::IntoNatural for DirectoryReadDirentsResponse<'de> {
13347 type Natural = crate::natural::DirectoryReadDirentsResponse;
13348 }
13349
13350 impl ::fidl_next::Unconstrained for DirectoryReadDirentsResponse<'static> {}
13351
13352 #[derive(Clone, Debug)]
13354 #[repr(C)]
13355 pub struct DirectoryRewindResponse {
13356 pub s: ::fidl_next::WireI32,
13357 }
13358
13359 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRewindResponse>(), 4);
13360 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRewindResponse>(), 4);
13361
13362 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRewindResponse, s), 0);
13363
13364 unsafe impl ::fidl_next::Wire for DirectoryRewindResponse {
13365 type Owned<'de> = DirectoryRewindResponse;
13366
13367 #[inline]
13368 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13369 ::fidl_next::munge! {
13370 let Self {
13371
13372 s,
13373
13374 } = &mut *out_;
13375 }
13376
13377 ::fidl_next::Wire::zero_padding(s);
13378 }
13379 }
13380
13381 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRewindResponse
13382 where
13383 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13384 {
13385 fn decode(
13386 slot_: ::fidl_next::Slot<'_, Self>,
13387 decoder_: &mut ___D,
13388 _: (),
13389 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13390 ::fidl_next::munge! {
13391 let Self {
13392
13393 mut s,
13394
13395 } = slot_;
13396 }
13397
13398 let _field = s.as_mut();
13399
13400 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13401
13402 Ok(())
13403 }
13404 }
13405
13406 impl ::fidl_next::IntoNatural for DirectoryRewindResponse {
13407 type Natural = crate::natural::DirectoryRewindResponse;
13408 }
13409
13410 impl ::fidl_next::Unconstrained for DirectoryRewindResponse {}
13411
13412 pub type Name<'de> = ::fidl_next::WireString<'de>;
13414
13415 #[derive(Clone, Debug)]
13417 #[repr(C)]
13418 pub struct DirectoryLinkResponse {
13419 pub s: ::fidl_next::WireI32,
13420 }
13421
13422 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkResponse>(), 4);
13423 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkResponse>(), 4);
13424
13425 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkResponse, s), 0);
13426
13427 unsafe impl ::fidl_next::Wire for DirectoryLinkResponse {
13428 type Owned<'de> = DirectoryLinkResponse;
13429
13430 #[inline]
13431 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13432 ::fidl_next::munge! {
13433 let Self {
13434
13435 s,
13436
13437 } = &mut *out_;
13438 }
13439
13440 ::fidl_next::Wire::zero_padding(s);
13441 }
13442 }
13443
13444 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryLinkResponse
13445 where
13446 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13447 {
13448 fn decode(
13449 slot_: ::fidl_next::Slot<'_, Self>,
13450 decoder_: &mut ___D,
13451 _: (),
13452 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13453 ::fidl_next::munge! {
13454 let Self {
13455
13456 mut s,
13457
13458 } = slot_;
13459 }
13460
13461 let _field = s.as_mut();
13462
13463 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13464
13465 Ok(())
13466 }
13467 }
13468
13469 impl ::fidl_next::IntoNatural for DirectoryLinkResponse {
13470 type Natural = crate::natural::DirectoryLinkResponse;
13471 }
13472
13473 impl ::fidl_next::Unconstrained for DirectoryLinkResponse {}
13474
13475 #[derive(Clone, Copy, Debug)]
13477 #[repr(transparent)]
13478 pub struct UnlinkFlags {
13479 pub(crate) value: ::fidl_next::WireU64,
13480 }
13481
13482 unsafe impl ::fidl_next::Wire for UnlinkFlags {
13483 type Owned<'de> = Self;
13484
13485 #[inline]
13486 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13487 }
13489 }
13490
13491 unsafe impl<___D> ::fidl_next::Decode<___D> for UnlinkFlags
13492 where
13493 ___D: ?Sized,
13494 {
13495 fn decode(
13496 slot: ::fidl_next::Slot<'_, Self>,
13497 _: &mut ___D,
13498 _: (),
13499 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13500 Ok(())
13501 }
13502 }
13503
13504 impl ::core::convert::From<crate::natural::UnlinkFlags> for UnlinkFlags {
13505 fn from(natural: crate::natural::UnlinkFlags) -> Self {
13506 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
13507 }
13508 }
13509
13510 impl ::fidl_next::IntoNatural for UnlinkFlags {
13511 type Natural = crate::natural::UnlinkFlags;
13512 }
13513
13514 impl ::fidl_next::Unconstrained for UnlinkFlags {}
13515
13516 #[repr(C)]
13518 pub struct UnlinkOptions<'de> {
13519 pub(crate) table: ::fidl_next::WireTable<'de>,
13520 }
13521
13522 impl<'de> Drop for UnlinkOptions<'de> {
13523 fn drop(&mut self) {
13524 let _ = self
13525 .table
13526 .get(1)
13527 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::UnlinkFlags>() });
13528 }
13529 }
13530
13531 unsafe impl ::fidl_next::Wire for UnlinkOptions<'static> {
13532 type Owned<'de> = UnlinkOptions<'de>;
13533
13534 #[inline]
13535 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13536 ::fidl_next::munge!(let Self { table } = out);
13537 ::fidl_next::WireTable::zero_padding(table);
13538 }
13539 }
13540
13541 unsafe impl<___D> ::fidl_next::Decode<___D> for UnlinkOptions<'static>
13542 where
13543 ___D: ::fidl_next::Decoder + ?Sized,
13544 {
13545 fn decode(
13546 slot: ::fidl_next::Slot<'_, Self>,
13547 decoder: &mut ___D,
13548 _: (),
13549 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13550 ::fidl_next::munge!(let Self { table } = slot);
13551
13552 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13553 match ordinal {
13554 0 => unsafe { ::core::hint::unreachable_unchecked() },
13555
13556 1 => {
13557 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::UnlinkFlags>(
13558 slot.as_mut(),
13559 decoder,
13560 (),
13561 )?;
13562
13563 Ok(())
13564 }
13565
13566 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
13567 }
13568 })
13569 }
13570 }
13571
13572 impl<'de> UnlinkOptions<'de> {
13573 pub fn flags(&self) -> ::core::option::Option<&crate::wire::UnlinkFlags> {
13574 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13575 }
13576 }
13577
13578 impl<'de> ::core::fmt::Debug for UnlinkOptions<'de> {
13579 fn fmt(
13580 &self,
13581 f: &mut ::core::fmt::Formatter<'_>,
13582 ) -> ::core::result::Result<(), ::core::fmt::Error> {
13583 f.debug_struct("UnlinkOptions").field("flags", &self.flags()).finish()
13584 }
13585 }
13586
13587 impl<'de> ::fidl_next::IntoNatural for UnlinkOptions<'de> {
13588 type Natural = crate::natural::UnlinkOptions;
13589 }
13590
13591 impl ::fidl_next::Unconstrained for UnlinkOptions<'_> {}
13592
13593 #[derive(Debug)]
13595 #[repr(C)]
13596 pub struct DirectoryUnlinkRequest<'de> {
13597 pub name: ::fidl_next::WireString<'de>,
13598
13599 pub options: crate::wire::UnlinkOptions<'de>,
13600 }
13601
13602 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryUnlinkRequest<'_>>(), 32);
13603 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryUnlinkRequest<'_>>(), 8);
13604
13605 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryUnlinkRequest<'_>, name), 0);
13606
13607 static_assertions::const_assert_eq!(
13608 std::mem::offset_of!(DirectoryUnlinkRequest<'_>, options),
13609 16
13610 );
13611
13612 unsafe impl ::fidl_next::Wire for DirectoryUnlinkRequest<'static> {
13613 type Owned<'de> = DirectoryUnlinkRequest<'de>;
13614
13615 #[inline]
13616 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13617 ::fidl_next::munge! {
13618 let Self {
13619
13620 name,
13621 options,
13622
13623 } = &mut *out_;
13624 }
13625
13626 ::fidl_next::Wire::zero_padding(name);
13627
13628 ::fidl_next::Wire::zero_padding(options);
13629 }
13630 }
13631
13632 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryUnlinkRequest<'static>
13633 where
13634 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13635 ___D: ::fidl_next::Decoder,
13636 {
13637 fn decode(
13638 slot_: ::fidl_next::Slot<'_, Self>,
13639 decoder_: &mut ___D,
13640 _: (),
13641 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13642 ::fidl_next::munge! {
13643 let Self {
13644
13645 mut name,
13646 mut options,
13647
13648 } = slot_;
13649 }
13650
13651 let _field = name.as_mut();
13652 ::fidl_next::Constrained::validate(_field, 255)?;
13653 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
13654
13655 let name = unsafe { name.deref_unchecked() };
13656
13657 if name.len() > 255 {
13658 return Err(::fidl_next::DecodeError::VectorTooLong {
13659 size: name.len() as u64,
13660 limit: 255,
13661 });
13662 }
13663
13664 let _field = options.as_mut();
13665
13666 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
13667
13668 Ok(())
13669 }
13670 }
13671
13672 impl<'de> ::fidl_next::IntoNatural for DirectoryUnlinkRequest<'de> {
13673 type Natural = crate::natural::DirectoryUnlinkRequest;
13674 }
13675
13676 impl ::fidl_next::Unconstrained for DirectoryUnlinkRequest<'static> {}
13677
13678 #[derive(Clone, Debug)]
13680 #[repr(C)]
13681 pub struct DirectoryUnlinkResponse {
13682 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
13683 }
13684
13685 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryUnlinkResponse>(), 1);
13686 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryUnlinkResponse>(), 1);
13687
13688 unsafe impl ::fidl_next::Wire for DirectoryUnlinkResponse {
13689 type Owned<'de> = DirectoryUnlinkResponse;
13690
13691 #[inline]
13692 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13693 ::fidl_next::munge! {
13694 let Self {
13695
13696 _empty,
13697
13698
13699 } = &mut *out_;
13700 }
13701 }
13702 }
13703
13704 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryUnlinkResponse
13705 where
13706 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13707 {
13708 fn decode(
13709 slot_: ::fidl_next::Slot<'_, Self>,
13710 decoder_: &mut ___D,
13711 _: (),
13712 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13713 ::fidl_next::munge! {
13714 let Self {
13715
13716 mut _empty,
13717
13718
13719 } = slot_;
13720 }
13721
13722 if _empty.as_bytes() != &[0u8] {
13723 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
13724 }
13725
13726 Ok(())
13727 }
13728 }
13729
13730 impl ::fidl_next::IntoNatural for DirectoryUnlinkResponse {
13731 type Natural = crate::natural::DirectoryUnlinkResponse;
13732 }
13733
13734 impl ::fidl_next::Unconstrained for DirectoryUnlinkResponse {}
13735
13736 #[derive(Clone, Debug)]
13738 #[repr(C)]
13739 pub struct DirectoryRenameResponse {
13740 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
13741 }
13742
13743 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRenameResponse>(), 1);
13744 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRenameResponse>(), 1);
13745
13746 unsafe impl ::fidl_next::Wire for DirectoryRenameResponse {
13747 type Owned<'de> = DirectoryRenameResponse;
13748
13749 #[inline]
13750 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13751 ::fidl_next::munge! {
13752 let Self {
13753
13754 _empty,
13755
13756
13757 } = &mut *out_;
13758 }
13759 }
13760 }
13761
13762 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryRenameResponse
13763 where
13764 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13765 {
13766 fn decode(
13767 slot_: ::fidl_next::Slot<'_, Self>,
13768 decoder_: &mut ___D,
13769 _: (),
13770 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13771 ::fidl_next::munge! {
13772 let Self {
13773
13774 mut _empty,
13775
13776
13777 } = slot_;
13778 }
13779
13780 if _empty.as_bytes() != &[0u8] {
13781 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
13782 }
13783
13784 Ok(())
13785 }
13786 }
13787
13788 impl ::fidl_next::IntoNatural for DirectoryRenameResponse {
13789 type Natural = crate::natural::DirectoryRenameResponse;
13790 }
13791
13792 impl ::fidl_next::Unconstrained for DirectoryRenameResponse {}
13793
13794 #[derive(Clone, Copy, Debug)]
13796 #[repr(transparent)]
13797 pub struct WatchMask {
13798 pub(crate) value: ::fidl_next::WireU32,
13799 }
13800
13801 unsafe impl ::fidl_next::Wire for WatchMask {
13802 type Owned<'de> = Self;
13803
13804 #[inline]
13805 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
13806 }
13808 }
13809
13810 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchMask
13811 where
13812 ___D: ?Sized,
13813 {
13814 fn decode(
13815 slot: ::fidl_next::Slot<'_, Self>,
13816 _: &mut ___D,
13817 _: (),
13818 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13819 ::fidl_next::munge!(let Self { value } = slot);
13820 let set = u32::from(*value);
13821 if set & !crate::natural::WatchMask::all().bits() != 0 {
13822 return Err(::fidl_next::DecodeError::InvalidBits {
13823 expected: crate::natural::WatchMask::all().bits() as usize,
13824 actual: set as usize,
13825 });
13826 }
13827
13828 Ok(())
13829 }
13830 }
13831
13832 impl ::core::convert::From<crate::natural::WatchMask> for WatchMask {
13833 fn from(natural: crate::natural::WatchMask) -> Self {
13834 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
13835 }
13836 }
13837
13838 impl ::fidl_next::IntoNatural for WatchMask {
13839 type Natural = crate::natural::WatchMask;
13840 }
13841
13842 impl ::fidl_next::Unconstrained for WatchMask {}
13843
13844 #[derive(Clone, Debug)]
13846 #[repr(C)]
13847 pub struct DirectoryWatchResponse {
13848 pub s: ::fidl_next::WireI32,
13849 }
13850
13851 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchResponse>(), 4);
13852 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchResponse>(), 4);
13853
13854 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchResponse, s), 0);
13855
13856 unsafe impl ::fidl_next::Wire for DirectoryWatchResponse {
13857 type Owned<'de> = DirectoryWatchResponse;
13858
13859 #[inline]
13860 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13861 ::fidl_next::munge! {
13862 let Self {
13863
13864 s,
13865
13866 } = &mut *out_;
13867 }
13868
13869 ::fidl_next::Wire::zero_padding(s);
13870 }
13871 }
13872
13873 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchResponse
13874 where
13875 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13876 {
13877 fn decode(
13878 slot_: ::fidl_next::Slot<'_, Self>,
13879 decoder_: &mut ___D,
13880 _: (),
13881 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13882 ::fidl_next::munge! {
13883 let Self {
13884
13885 mut s,
13886
13887 } = slot_;
13888 }
13889
13890 let _field = s.as_mut();
13891
13892 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
13893
13894 Ok(())
13895 }
13896 }
13897
13898 impl ::fidl_next::IntoNatural for DirectoryWatchResponse {
13899 type Natural = crate::natural::DirectoryWatchResponse;
13900 }
13901
13902 impl ::fidl_next::Unconstrained for DirectoryWatchResponse {}
13903
13904 pub type SymlinkTarget<'de> = ::fidl_next::WireVector<'de, u8>;
13906
13907 pub type ExtendedAttributeName<'de> = ::fidl_next::WireVector<'de, u8>;
13909
13910 #[derive(Debug)]
13912 #[repr(C)]
13913 pub struct NodeGetExtendedAttributeRequest<'de> {
13914 pub name: ::fidl_next::WireVector<'de, u8>,
13915 }
13916
13917 static_assertions::const_assert_eq!(
13918 std::mem::size_of::<NodeGetExtendedAttributeRequest<'_>>(),
13919 16
13920 );
13921 static_assertions::const_assert_eq!(
13922 std::mem::align_of::<NodeGetExtendedAttributeRequest<'_>>(),
13923 8
13924 );
13925
13926 static_assertions::const_assert_eq!(
13927 std::mem::offset_of!(NodeGetExtendedAttributeRequest<'_>, name),
13928 0
13929 );
13930
13931 unsafe impl ::fidl_next::Wire for NodeGetExtendedAttributeRequest<'static> {
13932 type Owned<'de> = NodeGetExtendedAttributeRequest<'de>;
13933
13934 #[inline]
13935 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
13936 ::fidl_next::munge! {
13937 let Self {
13938
13939 name,
13940
13941 } = &mut *out_;
13942 }
13943
13944 ::fidl_next::Wire::zero_padding(name);
13945 }
13946 }
13947
13948 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetExtendedAttributeRequest<'static>
13949 where
13950 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13951 ___D: ::fidl_next::Decoder,
13952 {
13953 fn decode(
13954 slot_: ::fidl_next::Slot<'_, Self>,
13955 decoder_: &mut ___D,
13956 _: (),
13957 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13958 ::fidl_next::munge! {
13959 let Self {
13960
13961 mut name,
13962
13963 } = slot_;
13964 }
13965
13966 let _field = name.as_mut();
13967 ::fidl_next::Constrained::validate(_field, (255, ()))?;
13968 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
13969
13970 let name = unsafe { name.deref_unchecked() };
13971
13972 if name.len() > 255 {
13973 return Err(::fidl_next::DecodeError::VectorTooLong {
13974 size: name.len() as u64,
13975 limit: 255,
13976 });
13977 }
13978
13979 Ok(())
13980 }
13981 }
13982
13983 impl<'de> ::fidl_next::IntoNatural for NodeGetExtendedAttributeRequest<'de> {
13984 type Natural = crate::natural::NodeGetExtendedAttributeRequest;
13985 }
13986
13987 impl ::fidl_next::Unconstrained for NodeGetExtendedAttributeRequest<'static> {}
13988
13989 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
13991 #[repr(transparent)]
13992 pub struct SetExtendedAttributeMode {
13993 pub(crate) value: ::fidl_next::WireU32,
13994 }
13995
13996 unsafe impl ::fidl_next::Wire for SetExtendedAttributeMode {
13997 type Owned<'de> = Self;
13998
13999 #[inline]
14000 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14001 }
14003 }
14004
14005 impl SetExtendedAttributeMode {
14006 pub const SET: SetExtendedAttributeMode =
14007 SetExtendedAttributeMode { value: ::fidl_next::WireU32(1) };
14008
14009 pub const CREATE: SetExtendedAttributeMode =
14010 SetExtendedAttributeMode { value: ::fidl_next::WireU32(2) };
14011
14012 pub const REPLACE: SetExtendedAttributeMode =
14013 SetExtendedAttributeMode { value: ::fidl_next::WireU32(3) };
14014 }
14015
14016 unsafe impl<___D> ::fidl_next::Decode<___D> for SetExtendedAttributeMode
14017 where
14018 ___D: ?Sized,
14019 {
14020 fn decode(
14021 slot: ::fidl_next::Slot<'_, Self>,
14022 _: &mut ___D,
14023 _: (),
14024 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14025 ::fidl_next::munge!(let Self { value } = slot);
14026
14027 match u32::from(*value) {
14028 1 | 2 | 3 => (),
14029 unknown => {
14030 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
14031 }
14032 }
14033
14034 Ok(())
14035 }
14036 }
14037
14038 impl ::core::convert::From<crate::natural::SetExtendedAttributeMode> for SetExtendedAttributeMode {
14039 fn from(natural: crate::natural::SetExtendedAttributeMode) -> Self {
14040 match natural {
14041 crate::natural::SetExtendedAttributeMode::Set => SetExtendedAttributeMode::SET,
14042
14043 crate::natural::SetExtendedAttributeMode::Create => {
14044 SetExtendedAttributeMode::CREATE
14045 }
14046
14047 crate::natural::SetExtendedAttributeMode::Replace => {
14048 SetExtendedAttributeMode::REPLACE
14049 }
14050 }
14051 }
14052 }
14053
14054 impl ::fidl_next::IntoNatural for SetExtendedAttributeMode {
14055 type Natural = crate::natural::SetExtendedAttributeMode;
14056 }
14057
14058 impl ::fidl_next::Unconstrained for SetExtendedAttributeMode {}
14059
14060 #[derive(Clone, Debug)]
14062 #[repr(C)]
14063 pub struct NodeSetExtendedAttributeResponse {
14064 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14065 }
14066
14067 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetExtendedAttributeResponse>(), 1);
14068 static_assertions::const_assert_eq!(
14069 std::mem::align_of::<NodeSetExtendedAttributeResponse>(),
14070 1
14071 );
14072
14073 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeResponse {
14074 type Owned<'de> = NodeSetExtendedAttributeResponse;
14075
14076 #[inline]
14077 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14078 ::fidl_next::munge! {
14079 let Self {
14080
14081 _empty,
14082
14083
14084 } = &mut *out_;
14085 }
14086 }
14087 }
14088
14089 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeResponse
14090 where
14091 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14092 {
14093 fn decode(
14094 slot_: ::fidl_next::Slot<'_, Self>,
14095 decoder_: &mut ___D,
14096 _: (),
14097 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14098 ::fidl_next::munge! {
14099 let Self {
14100
14101 mut _empty,
14102
14103
14104 } = slot_;
14105 }
14106
14107 if _empty.as_bytes() != &[0u8] {
14108 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
14109 }
14110
14111 Ok(())
14112 }
14113 }
14114
14115 impl ::fidl_next::IntoNatural for NodeSetExtendedAttributeResponse {
14116 type Natural = crate::natural::NodeSetExtendedAttributeResponse;
14117 }
14118
14119 impl ::fidl_next::Unconstrained for NodeSetExtendedAttributeResponse {}
14120
14121 #[derive(Debug)]
14123 #[repr(C)]
14124 pub struct NodeRemoveExtendedAttributeRequest<'de> {
14125 pub name: ::fidl_next::WireVector<'de, u8>,
14126 }
14127
14128 static_assertions::const_assert_eq!(
14129 std::mem::size_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
14130 16
14131 );
14132 static_assertions::const_assert_eq!(
14133 std::mem::align_of::<NodeRemoveExtendedAttributeRequest<'_>>(),
14134 8
14135 );
14136
14137 static_assertions::const_assert_eq!(
14138 std::mem::offset_of!(NodeRemoveExtendedAttributeRequest<'_>, name),
14139 0
14140 );
14141
14142 unsafe impl ::fidl_next::Wire for NodeRemoveExtendedAttributeRequest<'static> {
14143 type Owned<'de> = NodeRemoveExtendedAttributeRequest<'de>;
14144
14145 #[inline]
14146 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14147 ::fidl_next::munge! {
14148 let Self {
14149
14150 name,
14151
14152 } = &mut *out_;
14153 }
14154
14155 ::fidl_next::Wire::zero_padding(name);
14156 }
14157 }
14158
14159 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeRemoveExtendedAttributeRequest<'static>
14160 where
14161 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14162 ___D: ::fidl_next::Decoder,
14163 {
14164 fn decode(
14165 slot_: ::fidl_next::Slot<'_, Self>,
14166 decoder_: &mut ___D,
14167 _: (),
14168 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14169 ::fidl_next::munge! {
14170 let Self {
14171
14172 mut name,
14173
14174 } = slot_;
14175 }
14176
14177 let _field = name.as_mut();
14178 ::fidl_next::Constrained::validate(_field, (255, ()))?;
14179 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
14180
14181 let name = unsafe { name.deref_unchecked() };
14182
14183 if name.len() > 255 {
14184 return Err(::fidl_next::DecodeError::VectorTooLong {
14185 size: name.len() as u64,
14186 limit: 255,
14187 });
14188 }
14189
14190 Ok(())
14191 }
14192 }
14193
14194 impl<'de> ::fidl_next::IntoNatural for NodeRemoveExtendedAttributeRequest<'de> {
14195 type Natural = crate::natural::NodeRemoveExtendedAttributeRequest;
14196 }
14197
14198 impl ::fidl_next::Unconstrained for NodeRemoveExtendedAttributeRequest<'static> {}
14199
14200 #[derive(Clone, Debug)]
14202 #[repr(C)]
14203 pub struct NodeRemoveExtendedAttributeResponse {
14204 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14205 }
14206
14207 static_assertions::const_assert_eq!(
14208 std::mem::size_of::<NodeRemoveExtendedAttributeResponse>(),
14209 1
14210 );
14211 static_assertions::const_assert_eq!(
14212 std::mem::align_of::<NodeRemoveExtendedAttributeResponse>(),
14213 1
14214 );
14215
14216 unsafe impl ::fidl_next::Wire for NodeRemoveExtendedAttributeResponse {
14217 type Owned<'de> = NodeRemoveExtendedAttributeResponse;
14218
14219 #[inline]
14220 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14221 ::fidl_next::munge! {
14222 let Self {
14223
14224 _empty,
14225
14226
14227 } = &mut *out_;
14228 }
14229 }
14230 }
14231
14232 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeRemoveExtendedAttributeResponse
14233 where
14234 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14235 {
14236 fn decode(
14237 slot_: ::fidl_next::Slot<'_, Self>,
14238 decoder_: &mut ___D,
14239 _: (),
14240 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14241 ::fidl_next::munge! {
14242 let Self {
14243
14244 mut _empty,
14245
14246
14247 } = slot_;
14248 }
14249
14250 if _empty.as_bytes() != &[0u8] {
14251 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
14252 }
14253
14254 Ok(())
14255 }
14256 }
14257
14258 impl ::fidl_next::IntoNatural for NodeRemoveExtendedAttributeResponse {
14259 type Natural = crate::natural::NodeRemoveExtendedAttributeResponse;
14260 }
14261
14262 impl ::fidl_next::Unconstrained for NodeRemoveExtendedAttributeResponse {}
14263
14264 #[derive(Clone, Debug)]
14266 #[repr(C)]
14267 pub struct DirectoryCreateSymlinkResponse {
14268 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14269 }
14270
14271 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryCreateSymlinkResponse>(), 1);
14272 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryCreateSymlinkResponse>(), 1);
14273
14274 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkResponse {
14275 type Owned<'de> = DirectoryCreateSymlinkResponse;
14276
14277 #[inline]
14278 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14279 ::fidl_next::munge! {
14280 let Self {
14281
14282 _empty,
14283
14284
14285 } = &mut *out_;
14286 }
14287 }
14288 }
14289
14290 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkResponse
14291 where
14292 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14293 {
14294 fn decode(
14295 slot_: ::fidl_next::Slot<'_, Self>,
14296 decoder_: &mut ___D,
14297 _: (),
14298 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14299 ::fidl_next::munge! {
14300 let Self {
14301
14302 mut _empty,
14303
14304
14305 } = slot_;
14306 }
14307
14308 if _empty.as_bytes() != &[0u8] {
14309 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
14310 }
14311
14312 Ok(())
14313 }
14314 }
14315
14316 impl ::fidl_next::IntoNatural for DirectoryCreateSymlinkResponse {
14317 type Natural = crate::natural::DirectoryCreateSymlinkResponse;
14318 }
14319
14320 impl ::fidl_next::Unconstrained for DirectoryCreateSymlinkResponse {}
14321
14322 #[derive(Clone, Debug)]
14324 #[repr(C)]
14325 pub struct NodeSetFlagsResponse {
14326 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14327 }
14328
14329 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetFlagsResponse>(), 1);
14330 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSetFlagsResponse>(), 1);
14331
14332 unsafe impl ::fidl_next::Wire for NodeSetFlagsResponse {
14333 type Owned<'de> = NodeSetFlagsResponse;
14334
14335 #[inline]
14336 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14337 ::fidl_next::munge! {
14338 let Self {
14339
14340 _empty,
14341
14342
14343 } = &mut *out_;
14344 }
14345 }
14346 }
14347
14348 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetFlagsResponse
14349 where
14350 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14351 {
14352 fn decode(
14353 slot_: ::fidl_next::Slot<'_, Self>,
14354 decoder_: &mut ___D,
14355 _: (),
14356 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14357 ::fidl_next::munge! {
14358 let Self {
14359
14360 mut _empty,
14361
14362
14363 } = slot_;
14364 }
14365
14366 if _empty.as_bytes() != &[0u8] {
14367 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
14368 }
14369
14370 Ok(())
14371 }
14372 }
14373
14374 impl ::fidl_next::IntoNatural for NodeSetFlagsResponse {
14375 type Natural = crate::natural::NodeSetFlagsResponse;
14376 }
14377
14378 impl ::fidl_next::Unconstrained for NodeSetFlagsResponse {}
14379
14380 #[derive(Clone, Debug)]
14382 #[repr(C)]
14383 pub struct NodeDeprecatedGetAttrResponse {
14384 pub s: ::fidl_next::WireI32,
14385
14386 pub attributes: crate::wire::NodeAttributes,
14387 }
14388
14389 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetAttrResponse>(), 64);
14390 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetAttrResponse>(), 8);
14391
14392 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetAttrResponse, s), 0);
14393
14394 static_assertions::const_assert_eq!(
14395 std::mem::offset_of!(NodeDeprecatedGetAttrResponse, attributes),
14396 8
14397 );
14398
14399 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetAttrResponse {
14400 type Owned<'de> = NodeDeprecatedGetAttrResponse;
14401
14402 #[inline]
14403 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14404 ::fidl_next::munge! {
14405 let Self {
14406
14407 s,
14408 attributes,
14409
14410 } = &mut *out_;
14411 }
14412
14413 ::fidl_next::Wire::zero_padding(s);
14414
14415 ::fidl_next::Wire::zero_padding(attributes);
14416
14417 unsafe {
14418 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
14419 }
14420 }
14421 }
14422
14423 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetAttrResponse
14424 where
14425 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14426 {
14427 fn decode(
14428 slot_: ::fidl_next::Slot<'_, Self>,
14429 decoder_: &mut ___D,
14430 _: (),
14431 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14432 if slot_.as_bytes()[4..8] != [0u8; 4] {
14433 return Err(::fidl_next::DecodeError::InvalidPadding);
14434 }
14435
14436 ::fidl_next::munge! {
14437 let Self {
14438
14439 mut s,
14440 mut attributes,
14441
14442 } = slot_;
14443 }
14444
14445 let _field = s.as_mut();
14446
14447 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
14448
14449 let _field = attributes.as_mut();
14450
14451 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
14452
14453 Ok(())
14454 }
14455 }
14456
14457 impl ::fidl_next::IntoNatural for NodeDeprecatedGetAttrResponse {
14458 type Natural = crate::natural::NodeDeprecatedGetAttrResponse;
14459 }
14460
14461 impl ::fidl_next::Unconstrained for NodeDeprecatedGetAttrResponse {}
14462
14463 #[derive(Clone, Debug)]
14465 #[repr(C)]
14466 pub struct NodeDeprecatedSetAttrRequest {
14467 pub flags: crate::wire::NodeAttributeFlags,
14468
14469 pub attributes: crate::wire::NodeAttributes,
14470 }
14471
14472 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrRequest>(), 64);
14473 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrRequest>(), 8);
14474
14475 static_assertions::const_assert_eq!(
14476 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, flags),
14477 0
14478 );
14479
14480 static_assertions::const_assert_eq!(
14481 std::mem::offset_of!(NodeDeprecatedSetAttrRequest, attributes),
14482 8
14483 );
14484
14485 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrRequest {
14486 type Owned<'de> = NodeDeprecatedSetAttrRequest;
14487
14488 #[inline]
14489 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14490 ::fidl_next::munge! {
14491 let Self {
14492
14493 flags,
14494 attributes,
14495
14496 } = &mut *out_;
14497 }
14498
14499 ::fidl_next::Wire::zero_padding(flags);
14500
14501 ::fidl_next::Wire::zero_padding(attributes);
14502
14503 unsafe {
14504 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
14505 }
14506 }
14507 }
14508
14509 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrRequest
14510 where
14511 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14512 {
14513 fn decode(
14514 slot_: ::fidl_next::Slot<'_, Self>,
14515 decoder_: &mut ___D,
14516 _: (),
14517 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14518 if slot_.as_bytes()[4..8] != [0u8; 4] {
14519 return Err(::fidl_next::DecodeError::InvalidPadding);
14520 }
14521
14522 ::fidl_next::munge! {
14523 let Self {
14524
14525 mut flags,
14526 mut attributes,
14527
14528 } = slot_;
14529 }
14530
14531 let _field = flags.as_mut();
14532
14533 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14534
14535 let _field = attributes.as_mut();
14536
14537 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, ())?;
14538
14539 Ok(())
14540 }
14541 }
14542
14543 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrRequest {
14544 type Natural = crate::natural::NodeDeprecatedSetAttrRequest;
14545 }
14546
14547 impl ::fidl_next::Unconstrained for NodeDeprecatedSetAttrRequest {}
14548
14549 #[derive(Clone, Debug)]
14551 #[repr(C)]
14552 pub struct NodeDeprecatedSetAttrResponse {
14553 pub s: ::fidl_next::WireI32,
14554 }
14555
14556 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetAttrResponse>(), 4);
14557 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetAttrResponse>(), 4);
14558
14559 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetAttrResponse, s), 0);
14560
14561 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetAttrResponse {
14562 type Owned<'de> = NodeDeprecatedSetAttrResponse;
14563
14564 #[inline]
14565 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14566 ::fidl_next::munge! {
14567 let Self {
14568
14569 s,
14570
14571 } = &mut *out_;
14572 }
14573
14574 ::fidl_next::Wire::zero_padding(s);
14575 }
14576 }
14577
14578 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetAttrResponse
14579 where
14580 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14581 {
14582 fn decode(
14583 slot_: ::fidl_next::Slot<'_, Self>,
14584 decoder_: &mut ___D,
14585 _: (),
14586 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14587 ::fidl_next::munge! {
14588 let Self {
14589
14590 mut s,
14591
14592 } = slot_;
14593 }
14594
14595 let _field = s.as_mut();
14596
14597 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
14598
14599 Ok(())
14600 }
14601 }
14602
14603 impl ::fidl_next::IntoNatural for NodeDeprecatedSetAttrResponse {
14604 type Natural = crate::natural::NodeDeprecatedSetAttrResponse;
14605 }
14606
14607 impl ::fidl_next::Unconstrained for NodeDeprecatedSetAttrResponse {}
14608
14609 #[derive(Clone, Debug)]
14611 #[repr(C)]
14612 pub struct NodeDeprecatedGetFlagsResponse {
14613 pub s: ::fidl_next::WireI32,
14614
14615 pub flags: crate::wire::OpenFlags,
14616 }
14617
14618 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedGetFlagsResponse>(), 8);
14619 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedGetFlagsResponse>(), 4);
14620
14621 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, s), 0);
14622
14623 static_assertions::const_assert_eq!(
14624 std::mem::offset_of!(NodeDeprecatedGetFlagsResponse, flags),
14625 4
14626 );
14627
14628 unsafe impl ::fidl_next::Wire for NodeDeprecatedGetFlagsResponse {
14629 type Owned<'de> = NodeDeprecatedGetFlagsResponse;
14630
14631 #[inline]
14632 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14633 ::fidl_next::munge! {
14634 let Self {
14635
14636 s,
14637 flags,
14638
14639 } = &mut *out_;
14640 }
14641
14642 ::fidl_next::Wire::zero_padding(s);
14643
14644 ::fidl_next::Wire::zero_padding(flags);
14645 }
14646 }
14647
14648 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedGetFlagsResponse
14649 where
14650 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14651 {
14652 fn decode(
14653 slot_: ::fidl_next::Slot<'_, Self>,
14654 decoder_: &mut ___D,
14655 _: (),
14656 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14657 ::fidl_next::munge! {
14658 let Self {
14659
14660 mut s,
14661 mut flags,
14662
14663 } = slot_;
14664 }
14665
14666 let _field = s.as_mut();
14667
14668 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
14669
14670 let _field = flags.as_mut();
14671
14672 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14673
14674 Ok(())
14675 }
14676 }
14677
14678 impl ::fidl_next::IntoNatural for NodeDeprecatedGetFlagsResponse {
14679 type Natural = crate::natural::NodeDeprecatedGetFlagsResponse;
14680 }
14681
14682 impl ::fidl_next::Unconstrained for NodeDeprecatedGetFlagsResponse {}
14683
14684 #[derive(Clone, Debug)]
14686 #[repr(C)]
14687 pub struct NodeDeprecatedSetFlagsRequest {
14688 pub flags: crate::wire::OpenFlags,
14689 }
14690
14691 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsRequest>(), 4);
14692 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsRequest>(), 4);
14693
14694 static_assertions::const_assert_eq!(
14695 std::mem::offset_of!(NodeDeprecatedSetFlagsRequest, flags),
14696 0
14697 );
14698
14699 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsRequest {
14700 type Owned<'de> = NodeDeprecatedSetFlagsRequest;
14701
14702 #[inline]
14703 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14704 ::fidl_next::munge! {
14705 let Self {
14706
14707 flags,
14708
14709 } = &mut *out_;
14710 }
14711
14712 ::fidl_next::Wire::zero_padding(flags);
14713 }
14714 }
14715
14716 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsRequest
14717 where
14718 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14719 {
14720 fn decode(
14721 slot_: ::fidl_next::Slot<'_, Self>,
14722 decoder_: &mut ___D,
14723 _: (),
14724 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14725 ::fidl_next::munge! {
14726 let Self {
14727
14728 mut flags,
14729
14730 } = slot_;
14731 }
14732
14733 let _field = flags.as_mut();
14734
14735 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14736
14737 Ok(())
14738 }
14739 }
14740
14741 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsRequest {
14742 type Natural = crate::natural::NodeDeprecatedSetFlagsRequest;
14743 }
14744
14745 impl ::fidl_next::Unconstrained for NodeDeprecatedSetFlagsRequest {}
14746
14747 #[derive(Clone, Debug)]
14749 #[repr(C)]
14750 pub struct NodeDeprecatedSetFlagsResponse {
14751 pub s: ::fidl_next::WireI32,
14752 }
14753
14754 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedSetFlagsResponse>(), 4);
14755 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedSetFlagsResponse>(), 4);
14756
14757 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedSetFlagsResponse, s), 0);
14758
14759 unsafe impl ::fidl_next::Wire for NodeDeprecatedSetFlagsResponse {
14760 type Owned<'de> = NodeDeprecatedSetFlagsResponse;
14761
14762 #[inline]
14763 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14764 ::fidl_next::munge! {
14765 let Self {
14766
14767 s,
14768
14769 } = &mut *out_;
14770 }
14771
14772 ::fidl_next::Wire::zero_padding(s);
14773 }
14774 }
14775
14776 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedSetFlagsResponse
14777 where
14778 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14779 {
14780 fn decode(
14781 slot_: ::fidl_next::Slot<'_, Self>,
14782 decoder_: &mut ___D,
14783 _: (),
14784 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14785 ::fidl_next::munge! {
14786 let Self {
14787
14788 mut s,
14789
14790 } = slot_;
14791 }
14792
14793 let _field = s.as_mut();
14794
14795 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
14796
14797 Ok(())
14798 }
14799 }
14800
14801 impl ::fidl_next::IntoNatural for NodeDeprecatedSetFlagsResponse {
14802 type Natural = crate::natural::NodeDeprecatedSetFlagsResponse;
14803 }
14804
14805 impl ::fidl_next::Unconstrained for NodeDeprecatedSetFlagsResponse {}
14806
14807 #[derive(Clone, Copy, Debug)]
14809 #[repr(transparent)]
14810 pub struct Flags {
14811 pub(crate) value: ::fidl_next::WireU64,
14812 }
14813
14814 unsafe impl ::fidl_next::Wire for Flags {
14815 type Owned<'de> = Self;
14816
14817 #[inline]
14818 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
14819 }
14821 }
14822
14823 unsafe impl<___D> ::fidl_next::Decode<___D> for Flags
14824 where
14825 ___D: ?Sized,
14826 {
14827 fn decode(
14828 slot: ::fidl_next::Slot<'_, Self>,
14829 _: &mut ___D,
14830 _: (),
14831 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14832 Ok(())
14833 }
14834 }
14835
14836 impl ::core::convert::From<crate::natural::Flags> for Flags {
14837 fn from(natural: crate::natural::Flags) -> Self {
14838 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
14839 }
14840 }
14841
14842 impl ::fidl_next::IntoNatural for Flags {
14843 type Natural = crate::natural::Flags;
14844 }
14845
14846 impl ::fidl_next::Unconstrained for Flags {}
14847
14848 #[derive(Clone, Debug)]
14850 #[repr(C)]
14851 pub struct NodeGetFlagsResponse {
14852 pub flags: crate::wire::Flags,
14853 }
14854
14855 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetFlagsResponse>(), 8);
14856 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetFlagsResponse>(), 8);
14857
14858 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetFlagsResponse, flags), 0);
14859
14860 unsafe impl ::fidl_next::Wire for NodeGetFlagsResponse {
14861 type Owned<'de> = NodeGetFlagsResponse;
14862
14863 #[inline]
14864 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14865 ::fidl_next::munge! {
14866 let Self {
14867
14868 flags,
14869
14870 } = &mut *out_;
14871 }
14872
14873 ::fidl_next::Wire::zero_padding(flags);
14874 }
14875 }
14876
14877 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetFlagsResponse
14878 where
14879 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14880 {
14881 fn decode(
14882 slot_: ::fidl_next::Slot<'_, Self>,
14883 decoder_: &mut ___D,
14884 _: (),
14885 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14886 ::fidl_next::munge! {
14887 let Self {
14888
14889 mut flags,
14890
14891 } = slot_;
14892 }
14893
14894 let _field = flags.as_mut();
14895
14896 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14897
14898 Ok(())
14899 }
14900 }
14901
14902 impl ::fidl_next::IntoNatural for NodeGetFlagsResponse {
14903 type Natural = crate::natural::NodeGetFlagsResponse;
14904 }
14905
14906 impl ::fidl_next::Unconstrained for NodeGetFlagsResponse {}
14907
14908 #[derive(Clone, Debug)]
14910 #[repr(C)]
14911 pub struct NodeSetFlagsRequest {
14912 pub flags: crate::wire::Flags,
14913 }
14914
14915 static_assertions::const_assert_eq!(std::mem::size_of::<NodeSetFlagsRequest>(), 8);
14916 static_assertions::const_assert_eq!(std::mem::align_of::<NodeSetFlagsRequest>(), 8);
14917
14918 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeSetFlagsRequest, flags), 0);
14919
14920 unsafe impl ::fidl_next::Wire for NodeSetFlagsRequest {
14921 type Owned<'de> = NodeSetFlagsRequest;
14922
14923 #[inline]
14924 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14925 ::fidl_next::munge! {
14926 let Self {
14927
14928 flags,
14929
14930 } = &mut *out_;
14931 }
14932
14933 ::fidl_next::Wire::zero_padding(flags);
14934 }
14935 }
14936
14937 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeSetFlagsRequest
14938 where
14939 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14940 {
14941 fn decode(
14942 slot_: ::fidl_next::Slot<'_, Self>,
14943 decoder_: &mut ___D,
14944 _: (),
14945 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
14946 ::fidl_next::munge! {
14947 let Self {
14948
14949 mut flags,
14950
14951 } = slot_;
14952 }
14953
14954 let _field = flags.as_mut();
14955
14956 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
14957
14958 Ok(())
14959 }
14960 }
14961
14962 impl ::fidl_next::IntoNatural for NodeSetFlagsRequest {
14963 type Natural = crate::natural::NodeSetFlagsRequest;
14964 }
14965
14966 impl ::fidl_next::Unconstrained for NodeSetFlagsRequest {}
14967
14968 #[derive(Clone, Debug)]
14970 #[repr(C)]
14971 pub struct EmptyStruct {
14972 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
14973 }
14974
14975 static_assertions::const_assert_eq!(std::mem::size_of::<EmptyStruct>(), 1);
14976 static_assertions::const_assert_eq!(std::mem::align_of::<EmptyStruct>(), 1);
14977
14978 unsafe impl ::fidl_next::Wire for EmptyStruct {
14979 type Owned<'de> = EmptyStruct;
14980
14981 #[inline]
14982 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
14983 ::fidl_next::munge! {
14984 let Self {
14985
14986 _empty,
14987
14988
14989 } = &mut *out_;
14990 }
14991 }
14992 }
14993
14994 unsafe impl<___D> ::fidl_next::Decode<___D> for EmptyStruct
14995 where
14996 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
14997 {
14998 fn decode(
14999 slot_: ::fidl_next::Slot<'_, Self>,
15000 decoder_: &mut ___D,
15001 _: (),
15002 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15003 ::fidl_next::munge! {
15004 let Self {
15005
15006 mut _empty,
15007
15008
15009 } = slot_;
15010 }
15011
15012 if _empty.as_bytes() != &[0u8] {
15013 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
15014 }
15015
15016 Ok(())
15017 }
15018 }
15019
15020 impl ::fidl_next::IntoNatural for EmptyStruct {
15021 type Natural = crate::natural::EmptyStruct;
15022 }
15023
15024 impl ::fidl_next::Unconstrained for EmptyStruct {}
15025
15026 #[repr(transparent)]
15028 pub struct SelinuxContext<'de> {
15029 pub(crate) raw: ::fidl_next::RawWireUnion,
15030 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
15031 }
15032
15033 impl<'de> Drop for SelinuxContext<'de> {
15034 fn drop(&mut self) {
15035 match self.raw.ordinal() {
15036 1 => {
15037 let _ = unsafe {
15038 self.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>()
15039 };
15040 }
15041
15042 2 => {
15043 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::EmptyStruct>() };
15044 }
15045
15046 _ => (),
15047 }
15048 }
15049 }
15050
15051 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
15052 type Owned<'de> = SelinuxContext<'de>;
15053
15054 #[inline]
15055 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15056 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
15057 ::fidl_next::RawWireUnion::zero_padding(raw);
15058 }
15059 }
15060
15061 pub mod selinux_context {
15062 pub enum Ref<'de> {
15063 Data(&'de ::fidl_next::WireVector<'de, u8>),
15064
15065 UseExtendedAttributes(&'de crate::wire::EmptyStruct),
15066
15067 UnknownOrdinal_(u64),
15068 }
15069 }
15070
15071 impl<'de> SelinuxContext<'de> {
15072 pub fn as_ref(&self) -> crate::wire::selinux_context::Ref<'_> {
15073 match self.raw.ordinal() {
15074 1 => crate::wire::selinux_context::Ref::Data(unsafe {
15075 self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
15076 }),
15077
15078 2 => crate::wire::selinux_context::Ref::UseExtendedAttributes(unsafe {
15079 self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>()
15080 }),
15081
15082 unknown => crate::wire::selinux_context::Ref::UnknownOrdinal_(unknown),
15083 }
15084 }
15085 }
15086
15087 unsafe impl<___D> ::fidl_next::Decode<___D> for SelinuxContext<'static>
15088 where
15089 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15090 ___D: ::fidl_next::Decoder,
15091 {
15092 fn decode(
15093 mut slot: ::fidl_next::Slot<'_, Self>,
15094 decoder: &mut ___D,
15095 _: (),
15096 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15097 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
15098 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
15099 1 => ::fidl_next::RawWireUnion::decode_as::<
15100 ___D,
15101 ::fidl_next::WireVector<'static, u8>,
15102 >(raw, decoder, (256, ()))?,
15103
15104 2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::wire::EmptyStruct>(
15105 raw,
15106 decoder,
15107 (),
15108 )?,
15109
15110 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
15111 }
15112
15113 Ok(())
15114 }
15115 }
15116
15117 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
15118 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
15119 match self.raw.ordinal() {
15120 1 => unsafe {
15121 self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>().fmt(f)
15122 },
15123 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::EmptyStruct>().fmt(f) },
15124 _ => unsafe { ::core::hint::unreachable_unchecked() },
15125 }
15126 }
15127 }
15128
15129 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
15130 type Natural = crate::natural::SelinuxContext;
15131 }
15132
15133 impl ::fidl_next::Unconstrained for SelinuxContext<'static> {}
15134
15135 #[repr(C)]
15137 pub struct MutableNodeAttributes<'de> {
15138 pub(crate) table: ::fidl_next::WireTable<'de>,
15139 }
15140
15141 impl<'de> Drop for MutableNodeAttributes<'de> {
15142 fn drop(&mut self) {
15143 let _ = self
15144 .table
15145 .get(1)
15146 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15147
15148 let _ = self
15149 .table
15150 .get(2)
15151 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15152
15153 let _ = self
15154 .table
15155 .get(3)
15156 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
15157
15158 let _ = self
15159 .table
15160 .get(4)
15161 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
15162
15163 let _ = self
15164 .table
15165 .get(5)
15166 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU32>() });
15167
15168 let _ = self
15169 .table
15170 .get(6)
15171 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15172
15173 let _ = self
15174 .table
15175 .get(7)
15176 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15177
15178 let _ = self.table.get(8).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
15179
15180 let _ = self.table.get(9).map(|envelope| unsafe {
15181 envelope.read_unchecked::<crate::wire::SelinuxContext<'de>>()
15182 });
15183
15184 let _ =
15185 self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<[u8; 16]>() });
15186 }
15187 }
15188
15189 unsafe impl ::fidl_next::Wire for MutableNodeAttributes<'static> {
15190 type Owned<'de> = MutableNodeAttributes<'de>;
15191
15192 #[inline]
15193 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15194 ::fidl_next::munge!(let Self { table } = out);
15195 ::fidl_next::WireTable::zero_padding(table);
15196 }
15197 }
15198
15199 unsafe impl<___D> ::fidl_next::Decode<___D> for MutableNodeAttributes<'static>
15200 where
15201 ___D: ::fidl_next::Decoder + ?Sized,
15202 {
15203 fn decode(
15204 slot: ::fidl_next::Slot<'_, Self>,
15205 decoder: &mut ___D,
15206 _: (),
15207 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15208 ::fidl_next::munge!(let Self { table } = slot);
15209
15210 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15211 match ordinal {
15212 0 => unsafe { ::core::hint::unreachable_unchecked() },
15213
15214 1 => {
15215 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15216 slot.as_mut(),
15217 decoder,
15218 (),
15219 )?;
15220
15221 Ok(())
15222 }
15223
15224 2 => {
15225 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15226 slot.as_mut(),
15227 decoder,
15228 (),
15229 )?;
15230
15231 Ok(())
15232 }
15233
15234 3 => {
15235 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
15236 slot.as_mut(),
15237 decoder,
15238 (),
15239 )?;
15240
15241 Ok(())
15242 }
15243
15244 4 => {
15245 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
15246 slot.as_mut(),
15247 decoder,
15248 (),
15249 )?;
15250
15251 Ok(())
15252 }
15253
15254 5 => {
15255 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU32>(
15256 slot.as_mut(),
15257 decoder,
15258 (),
15259 )?;
15260
15261 Ok(())
15262 }
15263
15264 6 => {
15265 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15266 slot.as_mut(),
15267 decoder,
15268 (),
15269 )?;
15270
15271 Ok(())
15272 }
15273
15274 7 => {
15275 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15276 slot.as_mut(),
15277 decoder,
15278 (),
15279 )?;
15280
15281 Ok(())
15282 }
15283
15284 8 => {
15285 ::fidl_next::WireEnvelope::decode_as::<___D, bool>(
15286 slot.as_mut(),
15287 decoder,
15288 (),
15289 )?;
15290
15291 Ok(())
15292 }
15293
15294 9 => {
15295 ::fidl_next::WireEnvelope::decode_as::<
15296 ___D,
15297 crate::wire::SelinuxContext<'static>,
15298 >(slot.as_mut(), decoder, ())?;
15299
15300 Ok(())
15301 }
15302
15303 10 => {
15304 ::fidl_next::WireEnvelope::decode_as::<___D, [u8; 16]>(
15305 slot.as_mut(),
15306 decoder,
15307 (),
15308 )?;
15309
15310 Ok(())
15311 }
15312
15313 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
15314 }
15315 })
15316 }
15317 }
15318
15319 impl<'de> MutableNodeAttributes<'de> {
15320 pub fn creation_time(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15321 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15322 }
15323
15324 pub fn modification_time(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15325 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15326 }
15327
15328 pub fn mode(&self) -> ::core::option::Option<&::fidl_next::WireU32> {
15329 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
15330 }
15331
15332 pub fn uid(&self) -> ::core::option::Option<&::fidl_next::WireU32> {
15333 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
15334 }
15335
15336 pub fn gid(&self) -> ::core::option::Option<&::fidl_next::WireU32> {
15337 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
15338 }
15339
15340 pub fn rdev(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15341 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
15342 }
15343
15344 pub fn access_time(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15345 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
15346 }
15347
15348 pub fn casefold(&self) -> ::core::option::Option<&bool> {
15349 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
15350 }
15351
15352 pub fn selinux_context(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
15353 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
15354 }
15355
15356 pub fn wrapping_key_id(&self) -> ::core::option::Option<&[u8; 16]> {
15357 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
15358 }
15359 }
15360
15361 impl<'de> ::core::fmt::Debug for MutableNodeAttributes<'de> {
15362 fn fmt(
15363 &self,
15364 f: &mut ::core::fmt::Formatter<'_>,
15365 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15366 f.debug_struct("MutableNodeAttributes")
15367 .field("creation_time", &self.creation_time())
15368 .field("modification_time", &self.modification_time())
15369 .field("mode", &self.mode())
15370 .field("uid", &self.uid())
15371 .field("gid", &self.gid())
15372 .field("rdev", &self.rdev())
15373 .field("access_time", &self.access_time())
15374 .field("casefold", &self.casefold())
15375 .field("selinux_context", &self.selinux_context())
15376 .field("wrapping_key_id", &self.wrapping_key_id())
15377 .finish()
15378 }
15379 }
15380
15381 impl<'de> ::fidl_next::IntoNatural for MutableNodeAttributes<'de> {
15382 type Natural = crate::natural::MutableNodeAttributes;
15383 }
15384
15385 impl ::fidl_next::Unconstrained for MutableNodeAttributes<'_> {}
15386
15387 #[derive(Clone, Copy, Debug)]
15389 #[repr(transparent)]
15390 pub struct NodeProtocolKinds {
15391 pub(crate) value: ::fidl_next::WireU64,
15392 }
15393
15394 unsafe impl ::fidl_next::Wire for NodeProtocolKinds {
15395 type Owned<'de> = Self;
15396
15397 #[inline]
15398 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15399 }
15401 }
15402
15403 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeProtocolKinds
15404 where
15405 ___D: ?Sized,
15406 {
15407 fn decode(
15408 slot: ::fidl_next::Slot<'_, Self>,
15409 _: &mut ___D,
15410 _: (),
15411 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15412 Ok(())
15413 }
15414 }
15415
15416 impl ::core::convert::From<crate::natural::NodeProtocolKinds> for NodeProtocolKinds {
15417 fn from(natural: crate::natural::NodeProtocolKinds) -> Self {
15418 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
15419 }
15420 }
15421
15422 impl ::fidl_next::IntoNatural for NodeProtocolKinds {
15423 type Natural = crate::natural::NodeProtocolKinds;
15424 }
15425
15426 impl ::fidl_next::Unconstrained for NodeProtocolKinds {}
15427
15428 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
15430 #[repr(transparent)]
15431 pub struct HashAlgorithm {
15432 pub(crate) value: u8,
15433 }
15434
15435 unsafe impl ::fidl_next::Wire for HashAlgorithm {
15436 type Owned<'de> = Self;
15437
15438 #[inline]
15439 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
15440 }
15442 }
15443
15444 impl HashAlgorithm {
15445 pub const SHA256: HashAlgorithm = HashAlgorithm { value: 1 };
15446
15447 pub const SHA512: HashAlgorithm = HashAlgorithm { value: 2 };
15448 }
15449
15450 unsafe impl<___D> ::fidl_next::Decode<___D> for HashAlgorithm
15451 where
15452 ___D: ?Sized,
15453 {
15454 fn decode(
15455 slot: ::fidl_next::Slot<'_, Self>,
15456 _: &mut ___D,
15457 _: (),
15458 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15459 Ok(())
15460 }
15461 }
15462
15463 impl ::core::convert::From<crate::natural::HashAlgorithm> for HashAlgorithm {
15464 fn from(natural: crate::natural::HashAlgorithm) -> Self {
15465 match natural {
15466 crate::natural::HashAlgorithm::Sha256 => HashAlgorithm::SHA256,
15467
15468 crate::natural::HashAlgorithm::Sha512 => HashAlgorithm::SHA512,
15469
15470 crate::natural::HashAlgorithm::UnknownOrdinal_(value) => {
15471 HashAlgorithm { value: u8::from(value) }
15472 }
15473 }
15474 }
15475 }
15476
15477 impl ::fidl_next::IntoNatural for HashAlgorithm {
15478 type Natural = crate::natural::HashAlgorithm;
15479 }
15480
15481 impl ::fidl_next::Unconstrained for HashAlgorithm {}
15482
15483 #[repr(C)]
15485 pub struct VerificationOptions<'de> {
15486 pub(crate) table: ::fidl_next::WireTable<'de>,
15487 }
15488
15489 impl<'de> Drop for VerificationOptions<'de> {
15490 fn drop(&mut self) {
15491 let _ = self
15492 .table
15493 .get(1)
15494 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::HashAlgorithm>() });
15495
15496 let _ = self.table.get(2).map(|envelope| unsafe {
15497 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
15498 });
15499 }
15500 }
15501
15502 unsafe impl ::fidl_next::Wire for VerificationOptions<'static> {
15503 type Owned<'de> = VerificationOptions<'de>;
15504
15505 #[inline]
15506 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15507 ::fidl_next::munge!(let Self { table } = out);
15508 ::fidl_next::WireTable::zero_padding(table);
15509 }
15510 }
15511
15512 unsafe impl<___D> ::fidl_next::Decode<___D> for VerificationOptions<'static>
15513 where
15514 ___D: ::fidl_next::Decoder + ?Sized,
15515 {
15516 fn decode(
15517 slot: ::fidl_next::Slot<'_, Self>,
15518 decoder: &mut ___D,
15519 _: (),
15520 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15521 ::fidl_next::munge!(let Self { table } = slot);
15522
15523 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15524 match ordinal {
15525 0 => unsafe { ::core::hint::unreachable_unchecked() },
15526
15527 1 => {
15528 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::HashAlgorithm>(
15529 slot.as_mut(),
15530 decoder,
15531 (),
15532 )?;
15533
15534 Ok(())
15535 }
15536
15537 2 => {
15538 ::fidl_next::WireEnvelope::decode_as::<
15539 ___D,
15540 ::fidl_next::WireVector<'static, u8>,
15541 >(slot.as_mut(), decoder, (32, ()))?;
15542
15543 let value = unsafe {
15544 slot.deref_unchecked()
15545 .deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
15546 };
15547
15548 if value.len() > 32 {
15549 return Err(::fidl_next::DecodeError::VectorTooLong {
15550 size: value.len() as u64,
15551 limit: 32,
15552 });
15553 }
15554
15555 Ok(())
15556 }
15557
15558 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
15559 }
15560 })
15561 }
15562 }
15563
15564 impl<'de> VerificationOptions<'de> {
15565 pub fn hash_algorithm(&self) -> ::core::option::Option<&crate::wire::HashAlgorithm> {
15566 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15567 }
15568
15569 pub fn salt(&self) -> ::core::option::Option<&::fidl_next::WireVector<'de, u8>> {
15570 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15571 }
15572 }
15573
15574 impl<'de> ::core::fmt::Debug for VerificationOptions<'de> {
15575 fn fmt(
15576 &self,
15577 f: &mut ::core::fmt::Formatter<'_>,
15578 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15579 f.debug_struct("VerificationOptions")
15580 .field("hash_algorithm", &self.hash_algorithm())
15581 .field("salt", &self.salt())
15582 .finish()
15583 }
15584 }
15585
15586 impl<'de> ::fidl_next::IntoNatural for VerificationOptions<'de> {
15587 type Natural = crate::natural::VerificationOptions;
15588 }
15589
15590 impl ::fidl_next::Unconstrained for VerificationOptions<'_> {}
15591
15592 #[repr(C)]
15594 pub struct ImmutableNodeAttributes<'de> {
15595 pub(crate) table: ::fidl_next::WireTable<'de>,
15596 }
15597
15598 impl<'de> Drop for ImmutableNodeAttributes<'de> {
15599 fn drop(&mut self) {
15600 let _ = self.table.get(1).map(|envelope| unsafe {
15601 envelope.read_unchecked::<crate::wire::NodeProtocolKinds>()
15602 });
15603
15604 let _ = self
15605 .table
15606 .get(2)
15607 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
15608
15609 let _ = self
15610 .table
15611 .get(3)
15612 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15613
15614 let _ = self
15615 .table
15616 .get(4)
15617 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15618
15619 let _ = self
15620 .table
15621 .get(5)
15622 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15623
15624 let _ = self
15625 .table
15626 .get(6)
15627 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15628
15629 let _ = self
15630 .table
15631 .get(7)
15632 .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
15633
15634 let _ = self.table.get(8).map(|envelope| unsafe {
15635 envelope.read_unchecked::<crate::wire::VerificationOptions<'de>>()
15636 });
15637
15638 let _ = self.table.get(9).map(|envelope| unsafe {
15639 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
15640 });
15641
15642 let _ = self.table.get(10).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
15643 }
15644 }
15645
15646 unsafe impl ::fidl_next::Wire for ImmutableNodeAttributes<'static> {
15647 type Owned<'de> = ImmutableNodeAttributes<'de>;
15648
15649 #[inline]
15650 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15651 ::fidl_next::munge!(let Self { table } = out);
15652 ::fidl_next::WireTable::zero_padding(table);
15653 }
15654 }
15655
15656 unsafe impl<___D> ::fidl_next::Decode<___D> for ImmutableNodeAttributes<'static>
15657 where
15658 ___D: ::fidl_next::Decoder + ?Sized,
15659 {
15660 fn decode(
15661 slot: ::fidl_next::Slot<'_, Self>,
15662 decoder: &mut ___D,
15663 _: (),
15664 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15665 ::fidl_next::munge!(let Self { table } = slot);
15666
15667 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15668 match ordinal {
15669 0 => unsafe { ::core::hint::unreachable_unchecked() },
15670
15671 1 => {
15672 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::NodeProtocolKinds>(
15673 slot.as_mut(),
15674 decoder,
15675 (),
15676 )?;
15677
15678 Ok(())
15679 }
15680
15681 2 => {
15682 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::Operations>(
15683 slot.as_mut(),
15684 decoder,
15685 (),
15686 )?;
15687
15688 Ok(())
15689 }
15690
15691 3 => {
15692 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15693 slot.as_mut(),
15694 decoder,
15695 (),
15696 )?;
15697
15698 Ok(())
15699 }
15700
15701 4 => {
15702 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15703 slot.as_mut(),
15704 decoder,
15705 (),
15706 )?;
15707
15708 Ok(())
15709 }
15710
15711 5 => {
15712 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15713 slot.as_mut(),
15714 decoder,
15715 (),
15716 )?;
15717
15718 Ok(())
15719 }
15720
15721 6 => {
15722 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15723 slot.as_mut(),
15724 decoder,
15725 (),
15726 )?;
15727
15728 Ok(())
15729 }
15730
15731 7 => {
15732 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
15733 slot.as_mut(),
15734 decoder,
15735 (),
15736 )?;
15737
15738 Ok(())
15739 }
15740
15741 8 => {
15742 ::fidl_next::WireEnvelope::decode_as::<
15743 ___D,
15744 crate::wire::VerificationOptions<'static>,
15745 >(slot.as_mut(), decoder, ())?;
15746
15747 Ok(())
15748 }
15749
15750 9 => {
15751 ::fidl_next::WireEnvelope::decode_as::<
15752 ___D,
15753 ::fidl_next::WireVector<'static, u8>,
15754 >(slot.as_mut(), decoder, (64, ()))?;
15755
15756 let value = unsafe {
15757 slot.deref_unchecked()
15758 .deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
15759 };
15760
15761 if value.len() > 64 {
15762 return Err(::fidl_next::DecodeError::VectorTooLong {
15763 size: value.len() as u64,
15764 limit: 64,
15765 });
15766 }
15767
15768 Ok(())
15769 }
15770
15771 10 => {
15772 ::fidl_next::WireEnvelope::decode_as::<___D, bool>(
15773 slot.as_mut(),
15774 decoder,
15775 (),
15776 )?;
15777
15778 Ok(())
15779 }
15780
15781 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
15782 }
15783 })
15784 }
15785 }
15786
15787 impl<'de> ImmutableNodeAttributes<'de> {
15788 pub fn protocols(&self) -> ::core::option::Option<&crate::wire::NodeProtocolKinds> {
15789 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15790 }
15791
15792 pub fn abilities(&self) -> ::core::option::Option<&crate::wire::Operations> {
15793 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
15794 }
15795
15796 pub fn content_size(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15797 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
15798 }
15799
15800 pub fn storage_size(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15801 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
15802 }
15803
15804 pub fn link_count(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15805 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
15806 }
15807
15808 pub fn id(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15809 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
15810 }
15811
15812 pub fn change_time(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
15813 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
15814 }
15815
15816 pub fn options(&self) -> ::core::option::Option<&crate::wire::VerificationOptions<'de>> {
15817 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
15818 }
15819
15820 pub fn root_hash(&self) -> ::core::option::Option<&::fidl_next::WireVector<'de, u8>> {
15821 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
15822 }
15823
15824 pub fn verity_enabled(&self) -> ::core::option::Option<&bool> {
15825 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
15826 }
15827 }
15828
15829 impl<'de> ::core::fmt::Debug for ImmutableNodeAttributes<'de> {
15830 fn fmt(
15831 &self,
15832 f: &mut ::core::fmt::Formatter<'_>,
15833 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15834 f.debug_struct("ImmutableNodeAttributes")
15835 .field("protocols", &self.protocols())
15836 .field("abilities", &self.abilities())
15837 .field("content_size", &self.content_size())
15838 .field("storage_size", &self.storage_size())
15839 .field("link_count", &self.link_count())
15840 .field("id", &self.id())
15841 .field("change_time", &self.change_time())
15842 .field("options", &self.options())
15843 .field("root_hash", &self.root_hash())
15844 .field("verity_enabled", &self.verity_enabled())
15845 .finish()
15846 }
15847 }
15848
15849 impl<'de> ::fidl_next::IntoNatural for ImmutableNodeAttributes<'de> {
15850 type Natural = crate::natural::ImmutableNodeAttributes;
15851 }
15852
15853 impl ::fidl_next::Unconstrained for ImmutableNodeAttributes<'_> {}
15854
15855 #[derive(Debug)]
15857 #[repr(C)]
15858 pub struct NodeAttributes2<'de> {
15859 pub mutable_attributes: crate::wire::MutableNodeAttributes<'de>,
15860
15861 pub immutable_attributes: crate::wire::ImmutableNodeAttributes<'de>,
15862 }
15863
15864 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAttributes2<'_>>(), 32);
15865 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAttributes2<'_>>(), 8);
15866
15867 static_assertions::const_assert_eq!(
15868 std::mem::offset_of!(NodeAttributes2<'_>, mutable_attributes),
15869 0
15870 );
15871
15872 static_assertions::const_assert_eq!(
15873 std::mem::offset_of!(NodeAttributes2<'_>, immutable_attributes),
15874 16
15875 );
15876
15877 unsafe impl ::fidl_next::Wire for NodeAttributes2<'static> {
15878 type Owned<'de> = NodeAttributes2<'de>;
15879
15880 #[inline]
15881 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
15882 ::fidl_next::munge! {
15883 let Self {
15884
15885 mutable_attributes,
15886 immutable_attributes,
15887
15888 } = &mut *out_;
15889 }
15890
15891 ::fidl_next::Wire::zero_padding(mutable_attributes);
15892
15893 ::fidl_next::Wire::zero_padding(immutable_attributes);
15894 }
15895 }
15896
15897 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributes2<'static>
15898 where
15899 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
15900 ___D: ::fidl_next::Decoder,
15901 {
15902 fn decode(
15903 slot_: ::fidl_next::Slot<'_, Self>,
15904 decoder_: &mut ___D,
15905 _: (),
15906 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15907 ::fidl_next::munge! {
15908 let Self {
15909
15910 mut mutable_attributes,
15911 mut immutable_attributes,
15912
15913 } = slot_;
15914 }
15915
15916 let _field = mutable_attributes.as_mut();
15917
15918 ::fidl_next::Decode::decode(mutable_attributes.as_mut(), decoder_, ())?;
15919
15920 let _field = immutable_attributes.as_mut();
15921
15922 ::fidl_next::Decode::decode(immutable_attributes.as_mut(), decoder_, ())?;
15923
15924 Ok(())
15925 }
15926 }
15927
15928 impl<'de> ::fidl_next::IntoNatural for NodeAttributes2<'de> {
15929 type Natural = crate::natural::NodeAttributes2;
15930 }
15931
15932 impl ::fidl_next::Unconstrained for NodeAttributes2<'static> {}
15933
15934 #[repr(C)]
15936 pub struct NodeInfo<'de> {
15937 pub(crate) table: ::fidl_next::WireTable<'de>,
15938 }
15939
15940 impl<'de> Drop for NodeInfo<'de> {
15941 fn drop(&mut self) {
15942 let _ = self.table.get(1).map(|envelope| unsafe {
15943 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
15944 });
15945 }
15946 }
15947
15948 unsafe impl ::fidl_next::Wire for NodeInfo<'static> {
15949 type Owned<'de> = NodeInfo<'de>;
15950
15951 #[inline]
15952 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
15953 ::fidl_next::munge!(let Self { table } = out);
15954 ::fidl_next::WireTable::zero_padding(table);
15955 }
15956 }
15957
15958 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeInfo<'static>
15959 where
15960 ___D: ::fidl_next::Decoder + ?Sized,
15961 {
15962 fn decode(
15963 slot: ::fidl_next::Slot<'_, Self>,
15964 decoder: &mut ___D,
15965 _: (),
15966 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
15967 ::fidl_next::munge!(let Self { table } = slot);
15968
15969 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
15970 match ordinal {
15971 0 => unsafe { ::core::hint::unreachable_unchecked() },
15972
15973 1 => {
15974 ::fidl_next::WireEnvelope::decode_as::<
15975 ___D,
15976 crate::wire::NodeAttributes2<'static>,
15977 >(slot.as_mut(), decoder, ())?;
15978
15979 Ok(())
15980 }
15981
15982 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
15983 }
15984 })
15985 }
15986 }
15987
15988 impl<'de> NodeInfo<'de> {
15989 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
15990 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
15991 }
15992 }
15993
15994 impl<'de> ::core::fmt::Debug for NodeInfo<'de> {
15995 fn fmt(
15996 &self,
15997 f: &mut ::core::fmt::Formatter<'_>,
15998 ) -> ::core::result::Result<(), ::core::fmt::Error> {
15999 f.debug_struct("NodeInfo").field("attributes", &self.attributes()).finish()
16000 }
16001 }
16002
16003 impl<'de> ::fidl_next::IntoNatural for NodeInfo<'de> {
16004 type Natural = crate::natural::NodeInfo;
16005 }
16006
16007 impl ::fidl_next::Unconstrained for NodeInfo<'_> {}
16008
16009 #[repr(C)]
16011 pub struct DirectoryInfo<'de> {
16012 pub(crate) table: ::fidl_next::WireTable<'de>,
16013 }
16014
16015 impl<'de> Drop for DirectoryInfo<'de> {
16016 fn drop(&mut self) {
16017 let _ = self.table.get(1).map(|envelope| unsafe {
16018 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
16019 });
16020 }
16021 }
16022
16023 unsafe impl ::fidl_next::Wire for DirectoryInfo<'static> {
16024 type Owned<'de> = DirectoryInfo<'de>;
16025
16026 #[inline]
16027 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16028 ::fidl_next::munge!(let Self { table } = out);
16029 ::fidl_next::WireTable::zero_padding(table);
16030 }
16031 }
16032
16033 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryInfo<'static>
16034 where
16035 ___D: ::fidl_next::Decoder + ?Sized,
16036 {
16037 fn decode(
16038 slot: ::fidl_next::Slot<'_, Self>,
16039 decoder: &mut ___D,
16040 _: (),
16041 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16042 ::fidl_next::munge!(let Self { table } = slot);
16043
16044 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16045 match ordinal {
16046 0 => unsafe { ::core::hint::unreachable_unchecked() },
16047
16048 1 => {
16049 ::fidl_next::WireEnvelope::decode_as::<
16050 ___D,
16051 crate::wire::NodeAttributes2<'static>,
16052 >(slot.as_mut(), decoder, ())?;
16053
16054 Ok(())
16055 }
16056
16057 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
16058 }
16059 })
16060 }
16061 }
16062
16063 impl<'de> DirectoryInfo<'de> {
16064 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
16065 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16066 }
16067 }
16068
16069 impl<'de> ::core::fmt::Debug for DirectoryInfo<'de> {
16070 fn fmt(
16071 &self,
16072 f: &mut ::core::fmt::Formatter<'_>,
16073 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16074 f.debug_struct("DirectoryInfo").field("attributes", &self.attributes()).finish()
16075 }
16076 }
16077
16078 impl<'de> ::fidl_next::IntoNatural for DirectoryInfo<'de> {
16079 type Natural = crate::natural::DirectoryInfo;
16080 }
16081
16082 impl ::fidl_next::Unconstrained for DirectoryInfo<'_> {}
16083
16084 #[repr(C)]
16086 pub struct SymlinkInfo<'de> {
16087 pub(crate) table: ::fidl_next::WireTable<'de>,
16088 }
16089
16090 impl<'de> Drop for SymlinkInfo<'de> {
16091 fn drop(&mut self) {
16092 let _ = self.table.get(1).map(|envelope| unsafe {
16093 envelope.read_unchecked::<::fidl_next::WireVector<'de, u8>>()
16094 });
16095
16096 let _ = self.table.get(2).map(|envelope| unsafe {
16097 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
16098 });
16099 }
16100 }
16101
16102 unsafe impl ::fidl_next::Wire for SymlinkInfo<'static> {
16103 type Owned<'de> = SymlinkInfo<'de>;
16104
16105 #[inline]
16106 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16107 ::fidl_next::munge!(let Self { table } = out);
16108 ::fidl_next::WireTable::zero_padding(table);
16109 }
16110 }
16111
16112 unsafe impl<___D> ::fidl_next::Decode<___D> for SymlinkInfo<'static>
16113 where
16114 ___D: ::fidl_next::Decoder + ?Sized,
16115 {
16116 fn decode(
16117 slot: ::fidl_next::Slot<'_, Self>,
16118 decoder: &mut ___D,
16119 _: (),
16120 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16121 ::fidl_next::munge!(let Self { table } = slot);
16122
16123 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16124 match ordinal {
16125 0 => unsafe { ::core::hint::unreachable_unchecked() },
16126
16127 1 => {
16128 ::fidl_next::WireEnvelope::decode_as::<
16129 ___D,
16130 ::fidl_next::WireVector<'static, u8>,
16131 >(slot.as_mut(), decoder, (4095, ()))?;
16132
16133 let value = unsafe {
16134 slot.deref_unchecked()
16135 .deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
16136 };
16137
16138 if value.len() > 4095 {
16139 return Err(::fidl_next::DecodeError::VectorTooLong {
16140 size: value.len() as u64,
16141 limit: 4095,
16142 });
16143 }
16144
16145 Ok(())
16146 }
16147
16148 2 => {
16149 ::fidl_next::WireEnvelope::decode_as::<
16150 ___D,
16151 crate::wire::NodeAttributes2<'static>,
16152 >(slot.as_mut(), decoder, ())?;
16153
16154 Ok(())
16155 }
16156
16157 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
16158 }
16159 })
16160 }
16161 }
16162
16163 impl<'de> SymlinkInfo<'de> {
16164 pub fn target(&self) -> ::core::option::Option<&::fidl_next::WireVector<'de, u8>> {
16165 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16166 }
16167
16168 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
16169 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16170 }
16171 }
16172
16173 impl<'de> ::core::fmt::Debug for SymlinkInfo<'de> {
16174 fn fmt(
16175 &self,
16176 f: &mut ::core::fmt::Formatter<'_>,
16177 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16178 f.debug_struct("SymlinkInfo")
16179 .field("target", &self.target())
16180 .field("attributes", &self.attributes())
16181 .finish()
16182 }
16183 }
16184
16185 impl<'de> ::fidl_next::IntoNatural for SymlinkInfo<'de> {
16186 type Natural = crate::natural::SymlinkInfo;
16187 }
16188
16189 impl ::fidl_next::Unconstrained for SymlinkInfo<'_> {}
16190
16191 #[derive(Clone, Copy, Debug)]
16193 #[repr(transparent)]
16194 pub struct NodeAttributesQuery {
16195 pub(crate) value: ::fidl_next::WireU64,
16196 }
16197
16198 unsafe impl ::fidl_next::Wire for NodeAttributesQuery {
16199 type Owned<'de> = Self;
16200
16201 #[inline]
16202 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
16203 }
16205 }
16206
16207 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAttributesQuery
16208 where
16209 ___D: ?Sized,
16210 {
16211 fn decode(
16212 slot: ::fidl_next::Slot<'_, Self>,
16213 _: &mut ___D,
16214 _: (),
16215 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16216 Ok(())
16217 }
16218 }
16219
16220 impl ::core::convert::From<crate::natural::NodeAttributesQuery> for NodeAttributesQuery {
16221 fn from(natural: crate::natural::NodeAttributesQuery) -> Self {
16222 Self { value: ::fidl_next::WireU64::from(natural.bits()) }
16223 }
16224 }
16225
16226 impl ::fidl_next::IntoNatural for NodeAttributesQuery {
16227 type Natural = crate::natural::NodeAttributesQuery;
16228 }
16229
16230 impl ::fidl_next::Unconstrained for NodeAttributesQuery {}
16231
16232 #[derive(Clone, Debug)]
16234 #[repr(C)]
16235 pub struct NodeGetAttributesRequest {
16236 pub query: crate::wire::NodeAttributesQuery,
16237 }
16238
16239 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetAttributesRequest>(), 8);
16240 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetAttributesRequest>(), 8);
16241
16242 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetAttributesRequest, query), 0);
16243
16244 unsafe impl ::fidl_next::Wire for NodeGetAttributesRequest {
16245 type Owned<'de> = NodeGetAttributesRequest;
16246
16247 #[inline]
16248 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16249 ::fidl_next::munge! {
16250 let Self {
16251
16252 query,
16253
16254 } = &mut *out_;
16255 }
16256
16257 ::fidl_next::Wire::zero_padding(query);
16258 }
16259 }
16260
16261 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetAttributesRequest
16262 where
16263 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16264 {
16265 fn decode(
16266 slot_: ::fidl_next::Slot<'_, Self>,
16267 decoder_: &mut ___D,
16268 _: (),
16269 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16270 ::fidl_next::munge! {
16271 let Self {
16272
16273 mut query,
16274
16275 } = slot_;
16276 }
16277
16278 let _field = query.as_mut();
16279
16280 ::fidl_next::Decode::decode(query.as_mut(), decoder_, ())?;
16281
16282 Ok(())
16283 }
16284 }
16285
16286 impl ::fidl_next::IntoNatural for NodeGetAttributesRequest {
16287 type Natural = crate::natural::NodeGetAttributesRequest;
16288 }
16289
16290 impl ::fidl_next::Unconstrained for NodeGetAttributesRequest {}
16291
16292 #[repr(C)]
16294 pub struct Options<'de> {
16295 pub(crate) table: ::fidl_next::WireTable<'de>,
16296 }
16297
16298 impl<'de> Drop for Options<'de> {
16299 fn drop(&mut self) {
16300 let _ = self.table.get(1).map(|envelope| unsafe {
16301 envelope.read_unchecked::<crate::wire::NodeAttributesQuery>()
16302 });
16303
16304 let _ = self.table.get(2).map(|envelope| unsafe {
16305 envelope.read_unchecked::<crate::wire::MutableNodeAttributes<'de>>()
16306 });
16307 }
16308 }
16309
16310 unsafe impl ::fidl_next::Wire for Options<'static> {
16311 type Owned<'de> = Options<'de>;
16312
16313 #[inline]
16314 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
16315 ::fidl_next::munge!(let Self { table } = out);
16316 ::fidl_next::WireTable::zero_padding(table);
16317 }
16318 }
16319
16320 unsafe impl<___D> ::fidl_next::Decode<___D> for Options<'static>
16321 where
16322 ___D: ::fidl_next::Decoder + ?Sized,
16323 {
16324 fn decode(
16325 slot: ::fidl_next::Slot<'_, Self>,
16326 decoder: &mut ___D,
16327 _: (),
16328 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16329 ::fidl_next::munge!(let Self { table } = slot);
16330
16331 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
16332 match ordinal {
16333 0 => unsafe { ::core::hint::unreachable_unchecked() },
16334
16335 1 => {
16336 ::fidl_next::WireEnvelope::decode_as::<
16337 ___D,
16338 crate::wire::NodeAttributesQuery,
16339 >(slot.as_mut(), decoder, ())?;
16340
16341 Ok(())
16342 }
16343
16344 2 => {
16345 ::fidl_next::WireEnvelope::decode_as::<
16346 ___D,
16347 crate::wire::MutableNodeAttributes<'static>,
16348 >(slot.as_mut(), decoder, ())?;
16349
16350 Ok(())
16351 }
16352
16353 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
16354 }
16355 })
16356 }
16357 }
16358
16359 impl<'de> Options<'de> {
16360 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributesQuery> {
16361 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
16362 }
16363
16364 pub fn create_attributes(
16365 &self,
16366 ) -> ::core::option::Option<&crate::wire::MutableNodeAttributes<'de>> {
16367 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
16368 }
16369 }
16370
16371 impl<'de> ::core::fmt::Debug for Options<'de> {
16372 fn fmt(
16373 &self,
16374 f: &mut ::core::fmt::Formatter<'_>,
16375 ) -> ::core::result::Result<(), ::core::fmt::Error> {
16376 f.debug_struct("Options")
16377 .field("attributes", &self.attributes())
16378 .field("create_attributes", &self.create_attributes())
16379 .finish()
16380 }
16381 }
16382
16383 impl<'de> ::fidl_next::IntoNatural for Options<'de> {
16384 type Natural = crate::natural::Options;
16385 }
16386
16387 impl ::fidl_next::Unconstrained for Options<'_> {}
16388
16389 #[derive(Clone, Debug)]
16391 #[repr(C)]
16392 pub struct DirectoryObject {
16393 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
16394 }
16395
16396 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryObject>(), 1);
16397 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryObject>(), 1);
16398
16399 unsafe impl ::fidl_next::Wire for DirectoryObject {
16400 type Owned<'de> = DirectoryObject;
16401
16402 #[inline]
16403 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16404 ::fidl_next::munge! {
16405 let Self {
16406
16407 _empty,
16408
16409
16410 } = &mut *out_;
16411 }
16412 }
16413 }
16414
16415 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryObject
16416 where
16417 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16418 {
16419 fn decode(
16420 slot_: ::fidl_next::Slot<'_, Self>,
16421 decoder_: &mut ___D,
16422 _: (),
16423 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16424 ::fidl_next::munge! {
16425 let Self {
16426
16427 mut _empty,
16428
16429
16430 } = slot_;
16431 }
16432
16433 if _empty.as_bytes() != &[0u8] {
16434 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
16435 }
16436
16437 Ok(())
16438 }
16439 }
16440
16441 impl ::fidl_next::IntoNatural for DirectoryObject {
16442 type Natural = crate::natural::DirectoryObject;
16443 }
16444
16445 impl ::fidl_next::Unconstrained for DirectoryObject {}
16446
16447 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
16449 #[repr(transparent)]
16450 pub struct DirentType {
16451 pub(crate) value: u8,
16452 }
16453
16454 unsafe impl ::fidl_next::Wire for DirentType {
16455 type Owned<'de> = Self;
16456
16457 #[inline]
16458 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
16459 }
16461 }
16462
16463 impl DirentType {
16464 pub const UNKNOWN: DirentType = DirentType { value: 0 };
16465
16466 pub const DIRECTORY: DirentType = DirentType { value: 4 };
16467
16468 pub const BLOCK_DEVICE: DirentType = DirentType { value: 6 };
16469
16470 pub const FILE: DirentType = DirentType { value: 8 };
16471
16472 pub const SYMLINK: DirentType = DirentType { value: 10 };
16473
16474 pub const SERVICE: DirentType = DirentType { value: 16 };
16475 }
16476
16477 unsafe impl<___D> ::fidl_next::Decode<___D> for DirentType
16478 where
16479 ___D: ?Sized,
16480 {
16481 fn decode(
16482 slot: ::fidl_next::Slot<'_, Self>,
16483 _: &mut ___D,
16484 _: (),
16485 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16486 Ok(())
16487 }
16488 }
16489
16490 impl ::core::convert::From<crate::natural::DirentType> for DirentType {
16491 fn from(natural: crate::natural::DirentType) -> Self {
16492 match natural {
16493 crate::natural::DirentType::Unknown => DirentType::UNKNOWN,
16494
16495 crate::natural::DirentType::Directory => DirentType::DIRECTORY,
16496
16497 crate::natural::DirentType::BlockDevice => DirentType::BLOCK_DEVICE,
16498
16499 crate::natural::DirentType::File => DirentType::FILE,
16500
16501 crate::natural::DirentType::Symlink => DirentType::SYMLINK,
16502
16503 crate::natural::DirentType::Service => DirentType::SERVICE,
16504
16505 crate::natural::DirentType::UnknownOrdinal_(value) => {
16506 DirentType { value: u8::from(value) }
16507 }
16508 }
16509 }
16510 }
16511
16512 impl ::fidl_next::IntoNatural for DirentType {
16513 type Natural = crate::natural::DirentType;
16514 }
16515
16516 impl ::fidl_next::Unconstrained for DirentType {}
16517
16518 #[derive(Debug)]
16520 #[repr(C)]
16521 pub struct ExtendedAttributeIteratorGetNextResponse<'de> {
16522 pub attributes: ::fidl_next::WireVector<'de, ::fidl_next::WireVector<'de, u8>>,
16523
16524 pub last: bool,
16525 }
16526
16527 static_assertions::const_assert_eq!(
16528 std::mem::size_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
16529 24
16530 );
16531 static_assertions::const_assert_eq!(
16532 std::mem::align_of::<ExtendedAttributeIteratorGetNextResponse<'_>>(),
16533 8
16534 );
16535
16536 static_assertions::const_assert_eq!(
16537 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, attributes),
16538 0
16539 );
16540
16541 static_assertions::const_assert_eq!(
16542 std::mem::offset_of!(ExtendedAttributeIteratorGetNextResponse<'_>, last),
16543 16
16544 );
16545
16546 unsafe impl ::fidl_next::Wire for ExtendedAttributeIteratorGetNextResponse<'static> {
16547 type Owned<'de> = ExtendedAttributeIteratorGetNextResponse<'de>;
16548
16549 #[inline]
16550 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16551 ::fidl_next::munge! {
16552 let Self {
16553
16554 attributes,
16555 last,
16556
16557 } = &mut *out_;
16558 }
16559
16560 ::fidl_next::Wire::zero_padding(attributes);
16561
16562 ::fidl_next::Wire::zero_padding(last);
16563
16564 unsafe {
16565 out_.as_mut_ptr().cast::<u8>().add(17).write_bytes(0, 7);
16566 }
16567 }
16568 }
16569
16570 unsafe impl<___D> ::fidl_next::Decode<___D> for ExtendedAttributeIteratorGetNextResponse<'static>
16571 where
16572 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16573 ___D: ::fidl_next::Decoder,
16574 {
16575 fn decode(
16576 slot_: ::fidl_next::Slot<'_, Self>,
16577 decoder_: &mut ___D,
16578 _: (),
16579 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16580 if slot_.as_bytes()[17..24] != [0u8; 7] {
16581 return Err(::fidl_next::DecodeError::InvalidPadding);
16582 }
16583
16584 ::fidl_next::munge! {
16585 let Self {
16586
16587 mut attributes,
16588 mut last,
16589
16590 } = slot_;
16591 }
16592
16593 let _field = attributes.as_mut();
16594 ::fidl_next::Constrained::validate(_field, (128, (255, ())))?;
16595 ::fidl_next::Decode::decode(attributes.as_mut(), decoder_, (128, (255, ())))?;
16596
16597 let attributes = unsafe { attributes.deref_unchecked() };
16598
16599 if attributes.len() > 128 {
16600 return Err(::fidl_next::DecodeError::VectorTooLong {
16601 size: attributes.len() as u64,
16602 limit: 128,
16603 });
16604 }
16605
16606 let _field = last.as_mut();
16607
16608 ::fidl_next::Decode::decode(last.as_mut(), decoder_, ())?;
16609
16610 Ok(())
16611 }
16612 }
16613
16614 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeIteratorGetNextResponse<'de> {
16615 type Natural = crate::natural::ExtendedAttributeIteratorGetNextResponse;
16616 }
16617
16618 impl ::fidl_next::Unconstrained for ExtendedAttributeIteratorGetNextResponse<'static> {}
16619
16620 #[derive(Clone, Debug)]
16622 #[repr(C)]
16623 pub struct ReadableReadRequest {
16624 pub count: ::fidl_next::WireU64,
16625 }
16626
16627 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadRequest>(), 8);
16628 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadRequest>(), 8);
16629
16630 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadRequest, count), 0);
16631
16632 unsafe impl ::fidl_next::Wire for ReadableReadRequest {
16633 type Owned<'de> = ReadableReadRequest;
16634
16635 #[inline]
16636 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16637 ::fidl_next::munge! {
16638 let Self {
16639
16640 count,
16641
16642 } = &mut *out_;
16643 }
16644
16645 ::fidl_next::Wire::zero_padding(count);
16646 }
16647 }
16648
16649 unsafe impl<___D> ::fidl_next::Decode<___D> for ReadableReadRequest
16650 where
16651 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16652 {
16653 fn decode(
16654 slot_: ::fidl_next::Slot<'_, Self>,
16655 decoder_: &mut ___D,
16656 _: (),
16657 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16658 ::fidl_next::munge! {
16659 let Self {
16660
16661 mut count,
16662
16663 } = slot_;
16664 }
16665
16666 let _field = count.as_mut();
16667
16668 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
16669
16670 Ok(())
16671 }
16672 }
16673
16674 impl ::fidl_next::IntoNatural for ReadableReadRequest {
16675 type Natural = crate::natural::ReadableReadRequest;
16676 }
16677
16678 impl ::fidl_next::Unconstrained for ReadableReadRequest {}
16679
16680 pub type Transfer<'de> = ::fidl_next::WireVector<'de, u8>;
16682
16683 #[derive(Debug)]
16685 #[repr(C)]
16686 pub struct ReadableReadResponse<'de> {
16687 pub data: ::fidl_next::WireVector<'de, u8>,
16688 }
16689
16690 static_assertions::const_assert_eq!(std::mem::size_of::<ReadableReadResponse<'_>>(), 16);
16691 static_assertions::const_assert_eq!(std::mem::align_of::<ReadableReadResponse<'_>>(), 8);
16692
16693 static_assertions::const_assert_eq!(std::mem::offset_of!(ReadableReadResponse<'_>, data), 0);
16694
16695 unsafe impl ::fidl_next::Wire for ReadableReadResponse<'static> {
16696 type Owned<'de> = ReadableReadResponse<'de>;
16697
16698 #[inline]
16699 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16700 ::fidl_next::munge! {
16701 let Self {
16702
16703 data,
16704
16705 } = &mut *out_;
16706 }
16707
16708 ::fidl_next::Wire::zero_padding(data);
16709 }
16710 }
16711
16712 unsafe impl<___D> ::fidl_next::Decode<___D> for ReadableReadResponse<'static>
16713 where
16714 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16715 ___D: ::fidl_next::Decoder,
16716 {
16717 fn decode(
16718 slot_: ::fidl_next::Slot<'_, Self>,
16719 decoder_: &mut ___D,
16720 _: (),
16721 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16722 ::fidl_next::munge! {
16723 let Self {
16724
16725 mut data,
16726
16727 } = slot_;
16728 }
16729
16730 let _field = data.as_mut();
16731 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
16732 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
16733
16734 let data = unsafe { data.deref_unchecked() };
16735
16736 if data.len() > 8192 {
16737 return Err(::fidl_next::DecodeError::VectorTooLong {
16738 size: data.len() as u64,
16739 limit: 8192,
16740 });
16741 }
16742
16743 Ok(())
16744 }
16745 }
16746
16747 impl<'de> ::fidl_next::IntoNatural for ReadableReadResponse<'de> {
16748 type Natural = crate::natural::ReadableReadResponse;
16749 }
16750
16751 impl ::fidl_next::Unconstrained for ReadableReadResponse<'static> {}
16752
16753 #[derive(Debug)]
16755 #[repr(C)]
16756 pub struct WritableWriteRequest<'de> {
16757 pub data: ::fidl_next::WireVector<'de, u8>,
16758 }
16759
16760 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteRequest<'_>>(), 16);
16761 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteRequest<'_>>(), 8);
16762
16763 static_assertions::const_assert_eq!(std::mem::offset_of!(WritableWriteRequest<'_>, data), 0);
16764
16765 unsafe impl ::fidl_next::Wire for WritableWriteRequest<'static> {
16766 type Owned<'de> = WritableWriteRequest<'de>;
16767
16768 #[inline]
16769 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16770 ::fidl_next::munge! {
16771 let Self {
16772
16773 data,
16774
16775 } = &mut *out_;
16776 }
16777
16778 ::fidl_next::Wire::zero_padding(data);
16779 }
16780 }
16781
16782 unsafe impl<___D> ::fidl_next::Decode<___D> for WritableWriteRequest<'static>
16783 where
16784 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16785 ___D: ::fidl_next::Decoder,
16786 {
16787 fn decode(
16788 slot_: ::fidl_next::Slot<'_, Self>,
16789 decoder_: &mut ___D,
16790 _: (),
16791 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16792 ::fidl_next::munge! {
16793 let Self {
16794
16795 mut data,
16796
16797 } = slot_;
16798 }
16799
16800 let _field = data.as_mut();
16801 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
16802 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
16803
16804 let data = unsafe { data.deref_unchecked() };
16805
16806 if data.len() > 8192 {
16807 return Err(::fidl_next::DecodeError::VectorTooLong {
16808 size: data.len() as u64,
16809 limit: 8192,
16810 });
16811 }
16812
16813 Ok(())
16814 }
16815 }
16816
16817 impl<'de> ::fidl_next::IntoNatural for WritableWriteRequest<'de> {
16818 type Natural = crate::natural::WritableWriteRequest;
16819 }
16820
16821 impl ::fidl_next::Unconstrained for WritableWriteRequest<'static> {}
16822
16823 #[derive(Clone, Debug)]
16825 #[repr(C)]
16826 pub struct WritableWriteResponse {
16827 pub actual_count: ::fidl_next::WireU64,
16828 }
16829
16830 static_assertions::const_assert_eq!(std::mem::size_of::<WritableWriteResponse>(), 8);
16831 static_assertions::const_assert_eq!(std::mem::align_of::<WritableWriteResponse>(), 8);
16832
16833 static_assertions::const_assert_eq!(
16834 std::mem::offset_of!(WritableWriteResponse, actual_count),
16835 0
16836 );
16837
16838 unsafe impl ::fidl_next::Wire for WritableWriteResponse {
16839 type Owned<'de> = WritableWriteResponse;
16840
16841 #[inline]
16842 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16843 ::fidl_next::munge! {
16844 let Self {
16845
16846 actual_count,
16847
16848 } = &mut *out_;
16849 }
16850
16851 ::fidl_next::Wire::zero_padding(actual_count);
16852 }
16853 }
16854
16855 unsafe impl<___D> ::fidl_next::Decode<___D> for WritableWriteResponse
16856 where
16857 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16858 {
16859 fn decode(
16860 slot_: ::fidl_next::Slot<'_, Self>,
16861 decoder_: &mut ___D,
16862 _: (),
16863 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16864 ::fidl_next::munge! {
16865 let Self {
16866
16867 mut actual_count,
16868
16869 } = slot_;
16870 }
16871
16872 let _field = actual_count.as_mut();
16873
16874 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
16875
16876 Ok(())
16877 }
16878 }
16879
16880 impl ::fidl_next::IntoNatural for WritableWriteResponse {
16881 type Natural = crate::natural::WritableWriteResponse;
16882 }
16883
16884 impl ::fidl_next::Unconstrained for WritableWriteResponse {}
16885
16886 #[derive(Clone, Debug)]
16888 #[repr(C)]
16889 pub struct FileSeekRequest {
16890 pub origin: crate::wire::SeekOrigin,
16891
16892 pub offset: ::fidl_next::WireI64,
16893 }
16894
16895 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekRequest>(), 16);
16896 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekRequest>(), 8);
16897
16898 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, origin), 0);
16899
16900 static_assertions::const_assert_eq!(std::mem::offset_of!(FileSeekRequest, offset), 8);
16901
16902 unsafe impl ::fidl_next::Wire for FileSeekRequest {
16903 type Owned<'de> = FileSeekRequest;
16904
16905 #[inline]
16906 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16907 ::fidl_next::munge! {
16908 let Self {
16909
16910 origin,
16911 offset,
16912
16913 } = &mut *out_;
16914 }
16915
16916 ::fidl_next::Wire::zero_padding(origin);
16917
16918 ::fidl_next::Wire::zero_padding(offset);
16919
16920 unsafe {
16921 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
16922 }
16923 }
16924 }
16925
16926 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekRequest
16927 where
16928 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
16929 {
16930 fn decode(
16931 slot_: ::fidl_next::Slot<'_, Self>,
16932 decoder_: &mut ___D,
16933 _: (),
16934 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
16935 if slot_.as_bytes()[4..8] != [0u8; 4] {
16936 return Err(::fidl_next::DecodeError::InvalidPadding);
16937 }
16938
16939 ::fidl_next::munge! {
16940 let Self {
16941
16942 mut origin,
16943 mut offset,
16944
16945 } = slot_;
16946 }
16947
16948 let _field = origin.as_mut();
16949
16950 ::fidl_next::Decode::decode(origin.as_mut(), decoder_, ())?;
16951
16952 let _field = offset.as_mut();
16953
16954 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
16955
16956 Ok(())
16957 }
16958 }
16959
16960 impl ::fidl_next::IntoNatural for FileSeekRequest {
16961 type Natural = crate::natural::FileSeekRequest;
16962 }
16963
16964 impl ::fidl_next::Unconstrained for FileSeekRequest {}
16965
16966 #[derive(Clone, Debug)]
16968 #[repr(C)]
16969 pub struct FileSeekResponse {
16970 pub offset_from_start: ::fidl_next::WireU64,
16971 }
16972
16973 static_assertions::const_assert_eq!(std::mem::size_of::<FileSeekResponse>(), 8);
16974 static_assertions::const_assert_eq!(std::mem::align_of::<FileSeekResponse>(), 8);
16975
16976 static_assertions::const_assert_eq!(
16977 std::mem::offset_of!(FileSeekResponse, offset_from_start),
16978 0
16979 );
16980
16981 unsafe impl ::fidl_next::Wire for FileSeekResponse {
16982 type Owned<'de> = FileSeekResponse;
16983
16984 #[inline]
16985 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
16986 ::fidl_next::munge! {
16987 let Self {
16988
16989 offset_from_start,
16990
16991 } = &mut *out_;
16992 }
16993
16994 ::fidl_next::Wire::zero_padding(offset_from_start);
16995 }
16996 }
16997
16998 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSeekResponse
16999 where
17000 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17001 {
17002 fn decode(
17003 slot_: ::fidl_next::Slot<'_, Self>,
17004 decoder_: &mut ___D,
17005 _: (),
17006 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17007 ::fidl_next::munge! {
17008 let Self {
17009
17010 mut offset_from_start,
17011
17012 } = slot_;
17013 }
17014
17015 let _field = offset_from_start.as_mut();
17016
17017 ::fidl_next::Decode::decode(offset_from_start.as_mut(), decoder_, ())?;
17018
17019 Ok(())
17020 }
17021 }
17022
17023 impl ::fidl_next::IntoNatural for FileSeekResponse {
17024 type Natural = crate::natural::FileSeekResponse;
17025 }
17026
17027 impl ::fidl_next::Unconstrained for FileSeekResponse {}
17028
17029 #[derive(Clone, Debug)]
17031 #[repr(C)]
17032 pub struct FileReadAtRequest {
17033 pub count: ::fidl_next::WireU64,
17034
17035 pub offset: ::fidl_next::WireU64,
17036 }
17037
17038 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtRequest>(), 16);
17039 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtRequest>(), 8);
17040
17041 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, count), 0);
17042
17043 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtRequest, offset), 8);
17044
17045 unsafe impl ::fidl_next::Wire for FileReadAtRequest {
17046 type Owned<'de> = FileReadAtRequest;
17047
17048 #[inline]
17049 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17050 ::fidl_next::munge! {
17051 let Self {
17052
17053 count,
17054 offset,
17055
17056 } = &mut *out_;
17057 }
17058
17059 ::fidl_next::Wire::zero_padding(count);
17060
17061 ::fidl_next::Wire::zero_padding(offset);
17062 }
17063 }
17064
17065 unsafe impl<___D> ::fidl_next::Decode<___D> for FileReadAtRequest
17066 where
17067 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17068 {
17069 fn decode(
17070 slot_: ::fidl_next::Slot<'_, Self>,
17071 decoder_: &mut ___D,
17072 _: (),
17073 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17074 ::fidl_next::munge! {
17075 let Self {
17076
17077 mut count,
17078 mut offset,
17079
17080 } = slot_;
17081 }
17082
17083 let _field = count.as_mut();
17084
17085 ::fidl_next::Decode::decode(count.as_mut(), decoder_, ())?;
17086
17087 let _field = offset.as_mut();
17088
17089 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
17090
17091 Ok(())
17092 }
17093 }
17094
17095 impl ::fidl_next::IntoNatural for FileReadAtRequest {
17096 type Natural = crate::natural::FileReadAtRequest;
17097 }
17098
17099 impl ::fidl_next::Unconstrained for FileReadAtRequest {}
17100
17101 #[derive(Debug)]
17103 #[repr(C)]
17104 pub struct FileReadAtResponse<'de> {
17105 pub data: ::fidl_next::WireVector<'de, u8>,
17106 }
17107
17108 static_assertions::const_assert_eq!(std::mem::size_of::<FileReadAtResponse<'_>>(), 16);
17109 static_assertions::const_assert_eq!(std::mem::align_of::<FileReadAtResponse<'_>>(), 8);
17110
17111 static_assertions::const_assert_eq!(std::mem::offset_of!(FileReadAtResponse<'_>, data), 0);
17112
17113 unsafe impl ::fidl_next::Wire for FileReadAtResponse<'static> {
17114 type Owned<'de> = FileReadAtResponse<'de>;
17115
17116 #[inline]
17117 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17118 ::fidl_next::munge! {
17119 let Self {
17120
17121 data,
17122
17123 } = &mut *out_;
17124 }
17125
17126 ::fidl_next::Wire::zero_padding(data);
17127 }
17128 }
17129
17130 unsafe impl<___D> ::fidl_next::Decode<___D> for FileReadAtResponse<'static>
17131 where
17132 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17133 ___D: ::fidl_next::Decoder,
17134 {
17135 fn decode(
17136 slot_: ::fidl_next::Slot<'_, Self>,
17137 decoder_: &mut ___D,
17138 _: (),
17139 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17140 ::fidl_next::munge! {
17141 let Self {
17142
17143 mut data,
17144
17145 } = slot_;
17146 }
17147
17148 let _field = data.as_mut();
17149 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
17150 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
17151
17152 let data = unsafe { data.deref_unchecked() };
17153
17154 if data.len() > 8192 {
17155 return Err(::fidl_next::DecodeError::VectorTooLong {
17156 size: data.len() as u64,
17157 limit: 8192,
17158 });
17159 }
17160
17161 Ok(())
17162 }
17163 }
17164
17165 impl<'de> ::fidl_next::IntoNatural for FileReadAtResponse<'de> {
17166 type Natural = crate::natural::FileReadAtResponse;
17167 }
17168
17169 impl ::fidl_next::Unconstrained for FileReadAtResponse<'static> {}
17170
17171 #[derive(Debug)]
17173 #[repr(C)]
17174 pub struct FileWriteAtRequest<'de> {
17175 pub data: ::fidl_next::WireVector<'de, u8>,
17176
17177 pub offset: ::fidl_next::WireU64,
17178 }
17179
17180 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtRequest<'_>>(), 24);
17181 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtRequest<'_>>(), 8);
17182
17183 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, data), 0);
17184
17185 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtRequest<'_>, offset), 16);
17186
17187 unsafe impl ::fidl_next::Wire for FileWriteAtRequest<'static> {
17188 type Owned<'de> = FileWriteAtRequest<'de>;
17189
17190 #[inline]
17191 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17192 ::fidl_next::munge! {
17193 let Self {
17194
17195 data,
17196 offset,
17197
17198 } = &mut *out_;
17199 }
17200
17201 ::fidl_next::Wire::zero_padding(data);
17202
17203 ::fidl_next::Wire::zero_padding(offset);
17204 }
17205 }
17206
17207 unsafe impl<___D> ::fidl_next::Decode<___D> for FileWriteAtRequest<'static>
17208 where
17209 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17210 ___D: ::fidl_next::Decoder,
17211 {
17212 fn decode(
17213 slot_: ::fidl_next::Slot<'_, Self>,
17214 decoder_: &mut ___D,
17215 _: (),
17216 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17217 ::fidl_next::munge! {
17218 let Self {
17219
17220 mut data,
17221 mut offset,
17222
17223 } = slot_;
17224 }
17225
17226 let _field = data.as_mut();
17227 ::fidl_next::Constrained::validate(_field, (8192, ()))?;
17228 ::fidl_next::Decode::decode(data.as_mut(), decoder_, (8192, ()))?;
17229
17230 let data = unsafe { data.deref_unchecked() };
17231
17232 if data.len() > 8192 {
17233 return Err(::fidl_next::DecodeError::VectorTooLong {
17234 size: data.len() as u64,
17235 limit: 8192,
17236 });
17237 }
17238
17239 let _field = offset.as_mut();
17240
17241 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
17242
17243 Ok(())
17244 }
17245 }
17246
17247 impl<'de> ::fidl_next::IntoNatural for FileWriteAtRequest<'de> {
17248 type Natural = crate::natural::FileWriteAtRequest;
17249 }
17250
17251 impl ::fidl_next::Unconstrained for FileWriteAtRequest<'static> {}
17252
17253 #[derive(Clone, Debug)]
17255 #[repr(C)]
17256 pub struct FileWriteAtResponse {
17257 pub actual_count: ::fidl_next::WireU64,
17258 }
17259
17260 static_assertions::const_assert_eq!(std::mem::size_of::<FileWriteAtResponse>(), 8);
17261 static_assertions::const_assert_eq!(std::mem::align_of::<FileWriteAtResponse>(), 8);
17262
17263 static_assertions::const_assert_eq!(std::mem::offset_of!(FileWriteAtResponse, actual_count), 0);
17264
17265 unsafe impl ::fidl_next::Wire for FileWriteAtResponse {
17266 type Owned<'de> = FileWriteAtResponse;
17267
17268 #[inline]
17269 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17270 ::fidl_next::munge! {
17271 let Self {
17272
17273 actual_count,
17274
17275 } = &mut *out_;
17276 }
17277
17278 ::fidl_next::Wire::zero_padding(actual_count);
17279 }
17280 }
17281
17282 unsafe impl<___D> ::fidl_next::Decode<___D> for FileWriteAtResponse
17283 where
17284 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17285 {
17286 fn decode(
17287 slot_: ::fidl_next::Slot<'_, Self>,
17288 decoder_: &mut ___D,
17289 _: (),
17290 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17291 ::fidl_next::munge! {
17292 let Self {
17293
17294 mut actual_count,
17295
17296 } = slot_;
17297 }
17298
17299 let _field = actual_count.as_mut();
17300
17301 ::fidl_next::Decode::decode(actual_count.as_mut(), decoder_, ())?;
17302
17303 Ok(())
17304 }
17305 }
17306
17307 impl ::fidl_next::IntoNatural for FileWriteAtResponse {
17308 type Natural = crate::natural::FileWriteAtResponse;
17309 }
17310
17311 impl ::fidl_next::Unconstrained for FileWriteAtResponse {}
17312
17313 #[derive(Clone, Debug)]
17315 #[repr(C)]
17316 pub struct FileResizeRequest {
17317 pub length: ::fidl_next::WireU64,
17318 }
17319
17320 static_assertions::const_assert_eq!(std::mem::size_of::<FileResizeRequest>(), 8);
17321 static_assertions::const_assert_eq!(std::mem::align_of::<FileResizeRequest>(), 8);
17322
17323 static_assertions::const_assert_eq!(std::mem::offset_of!(FileResizeRequest, length), 0);
17324
17325 unsafe impl ::fidl_next::Wire for FileResizeRequest {
17326 type Owned<'de> = FileResizeRequest;
17327
17328 #[inline]
17329 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17330 ::fidl_next::munge! {
17331 let Self {
17332
17333 length,
17334
17335 } = &mut *out_;
17336 }
17337
17338 ::fidl_next::Wire::zero_padding(length);
17339 }
17340 }
17341
17342 unsafe impl<___D> ::fidl_next::Decode<___D> for FileResizeRequest
17343 where
17344 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17345 {
17346 fn decode(
17347 slot_: ::fidl_next::Slot<'_, Self>,
17348 decoder_: &mut ___D,
17349 _: (),
17350 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17351 ::fidl_next::munge! {
17352 let Self {
17353
17354 mut length,
17355
17356 } = slot_;
17357 }
17358
17359 let _field = length.as_mut();
17360
17361 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
17362
17363 Ok(())
17364 }
17365 }
17366
17367 impl ::fidl_next::IntoNatural for FileResizeRequest {
17368 type Natural = crate::natural::FileResizeRequest;
17369 }
17370
17371 impl ::fidl_next::Unconstrained for FileResizeRequest {}
17372
17373 #[derive(Clone, Debug)]
17375 #[repr(C)]
17376 pub struct FileResizeResponse {
17377 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17378 }
17379
17380 static_assertions::const_assert_eq!(std::mem::size_of::<FileResizeResponse>(), 1);
17381 static_assertions::const_assert_eq!(std::mem::align_of::<FileResizeResponse>(), 1);
17382
17383 unsafe impl ::fidl_next::Wire for FileResizeResponse {
17384 type Owned<'de> = FileResizeResponse;
17385
17386 #[inline]
17387 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17388 ::fidl_next::munge! {
17389 let Self {
17390
17391 _empty,
17392
17393
17394 } = &mut *out_;
17395 }
17396 }
17397 }
17398
17399 unsafe impl<___D> ::fidl_next::Decode<___D> for FileResizeResponse
17400 where
17401 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17402 {
17403 fn decode(
17404 slot_: ::fidl_next::Slot<'_, Self>,
17405 decoder_: &mut ___D,
17406 _: (),
17407 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17408 ::fidl_next::munge! {
17409 let Self {
17410
17411 mut _empty,
17412
17413
17414 } = slot_;
17415 }
17416
17417 if _empty.as_bytes() != &[0u8] {
17418 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
17419 }
17420
17421 Ok(())
17422 }
17423 }
17424
17425 impl ::fidl_next::IntoNatural for FileResizeResponse {
17426 type Natural = crate::natural::FileResizeResponse;
17427 }
17428
17429 impl ::fidl_next::Unconstrained for FileResizeResponse {}
17430
17431 #[derive(Clone, Copy, Debug)]
17433 #[repr(transparent)]
17434 pub struct VmoFlags {
17435 pub(crate) value: ::fidl_next::WireU32,
17436 }
17437
17438 unsafe impl ::fidl_next::Wire for VmoFlags {
17439 type Owned<'de> = Self;
17440
17441 #[inline]
17442 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
17443 }
17445 }
17446
17447 unsafe impl<___D> ::fidl_next::Decode<___D> for VmoFlags
17448 where
17449 ___D: ?Sized,
17450 {
17451 fn decode(
17452 slot: ::fidl_next::Slot<'_, Self>,
17453 _: &mut ___D,
17454 _: (),
17455 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17456 ::fidl_next::munge!(let Self { value } = slot);
17457 let set = u32::from(*value);
17458 if set & !crate::natural::VmoFlags::all().bits() != 0 {
17459 return Err(::fidl_next::DecodeError::InvalidBits {
17460 expected: crate::natural::VmoFlags::all().bits() as usize,
17461 actual: set as usize,
17462 });
17463 }
17464
17465 Ok(())
17466 }
17467 }
17468
17469 impl ::core::convert::From<crate::natural::VmoFlags> for VmoFlags {
17470 fn from(natural: crate::natural::VmoFlags) -> Self {
17471 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
17472 }
17473 }
17474
17475 impl ::fidl_next::IntoNatural for VmoFlags {
17476 type Natural = crate::natural::VmoFlags;
17477 }
17478
17479 impl ::fidl_next::Unconstrained for VmoFlags {}
17480
17481 #[derive(Clone, Debug)]
17483 #[repr(C)]
17484 pub struct FileGetBackingMemoryRequest {
17485 pub flags: crate::wire::VmoFlags,
17486 }
17487
17488 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryRequest>(), 4);
17489 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryRequest>(), 4);
17490
17491 static_assertions::const_assert_eq!(
17492 std::mem::offset_of!(FileGetBackingMemoryRequest, flags),
17493 0
17494 );
17495
17496 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryRequest {
17497 type Owned<'de> = FileGetBackingMemoryRequest;
17498
17499 #[inline]
17500 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17501 ::fidl_next::munge! {
17502 let Self {
17503
17504 flags,
17505
17506 } = &mut *out_;
17507 }
17508
17509 ::fidl_next::Wire::zero_padding(flags);
17510 }
17511 }
17512
17513 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryRequest
17514 where
17515 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17516 {
17517 fn decode(
17518 slot_: ::fidl_next::Slot<'_, Self>,
17519 decoder_: &mut ___D,
17520 _: (),
17521 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17522 ::fidl_next::munge! {
17523 let Self {
17524
17525 mut flags,
17526
17527 } = slot_;
17528 }
17529
17530 let _field = flags.as_mut();
17531
17532 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
17533
17534 Ok(())
17535 }
17536 }
17537
17538 impl ::fidl_next::IntoNatural for FileGetBackingMemoryRequest {
17539 type Natural = crate::natural::FileGetBackingMemoryRequest;
17540 }
17541
17542 impl ::fidl_next::Unconstrained for FileGetBackingMemoryRequest {}
17543
17544 #[derive(Clone, Debug)]
17546 #[repr(C)]
17547 pub struct LinkableLinkIntoResponse {
17548 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17549 }
17550
17551 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoResponse>(), 1);
17552 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoResponse>(), 1);
17553
17554 unsafe impl ::fidl_next::Wire for LinkableLinkIntoResponse {
17555 type Owned<'de> = LinkableLinkIntoResponse;
17556
17557 #[inline]
17558 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17559 ::fidl_next::munge! {
17560 let Self {
17561
17562 _empty,
17563
17564
17565 } = &mut *out_;
17566 }
17567 }
17568 }
17569
17570 unsafe impl<___D> ::fidl_next::Decode<___D> for LinkableLinkIntoResponse
17571 where
17572 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17573 {
17574 fn decode(
17575 slot_: ::fidl_next::Slot<'_, Self>,
17576 decoder_: &mut ___D,
17577 _: (),
17578 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17579 ::fidl_next::munge! {
17580 let Self {
17581
17582 mut _empty,
17583
17584
17585 } = slot_;
17586 }
17587
17588 if _empty.as_bytes() != &[0u8] {
17589 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
17590 }
17591
17592 Ok(())
17593 }
17594 }
17595
17596 impl ::fidl_next::IntoNatural for LinkableLinkIntoResponse {
17597 type Natural = crate::natural::LinkableLinkIntoResponse;
17598 }
17599
17600 impl ::fidl_next::Unconstrained for LinkableLinkIntoResponse {}
17601
17602 #[derive(Clone, Debug)]
17604 #[repr(C)]
17605 pub struct FileAllocateResponse {
17606 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17607 }
17608
17609 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateResponse>(), 1);
17610 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateResponse>(), 1);
17611
17612 unsafe impl ::fidl_next::Wire for FileAllocateResponse {
17613 type Owned<'de> = FileAllocateResponse;
17614
17615 #[inline]
17616 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17617 ::fidl_next::munge! {
17618 let Self {
17619
17620 _empty,
17621
17622
17623 } = &mut *out_;
17624 }
17625 }
17626 }
17627
17628 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateResponse
17629 where
17630 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17631 {
17632 fn decode(
17633 slot_: ::fidl_next::Slot<'_, Self>,
17634 decoder_: &mut ___D,
17635 _: (),
17636 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17637 ::fidl_next::munge! {
17638 let Self {
17639
17640 mut _empty,
17641
17642
17643 } = slot_;
17644 }
17645
17646 if _empty.as_bytes() != &[0u8] {
17647 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
17648 }
17649
17650 Ok(())
17651 }
17652 }
17653
17654 impl ::fidl_next::IntoNatural for FileAllocateResponse {
17655 type Natural = crate::natural::FileAllocateResponse;
17656 }
17657
17658 impl ::fidl_next::Unconstrained for FileAllocateResponse {}
17659
17660 #[derive(Clone, Debug)]
17662 #[repr(C)]
17663 pub struct FileEnableVerityResponse {
17664 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17665 }
17666
17667 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityResponse>(), 1);
17668 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityResponse>(), 1);
17669
17670 unsafe impl ::fidl_next::Wire for FileEnableVerityResponse {
17671 type Owned<'de> = FileEnableVerityResponse;
17672
17673 #[inline]
17674 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17675 ::fidl_next::munge! {
17676 let Self {
17677
17678 _empty,
17679
17680
17681 } = &mut *out_;
17682 }
17683 }
17684 }
17685
17686 unsafe impl<___D> ::fidl_next::Decode<___D> for FileEnableVerityResponse
17687 where
17688 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17689 {
17690 fn decode(
17691 slot_: ::fidl_next::Slot<'_, Self>,
17692 decoder_: &mut ___D,
17693 _: (),
17694 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17695 ::fidl_next::munge! {
17696 let Self {
17697
17698 mut _empty,
17699
17700
17701 } = slot_;
17702 }
17703
17704 if _empty.as_bytes() != &[0u8] {
17705 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
17706 }
17707
17708 Ok(())
17709 }
17710 }
17711
17712 impl ::fidl_next::IntoNatural for FileEnableVerityResponse {
17713 type Natural = crate::natural::FileEnableVerityResponse;
17714 }
17715
17716 impl ::fidl_next::Unconstrained for FileEnableVerityResponse {}
17717
17718 #[derive(Clone, Copy, Debug)]
17720 #[repr(transparent)]
17721 pub struct FileSignal {
17722 pub(crate) value: ::fidl_next::WireU32,
17723 }
17724
17725 unsafe impl ::fidl_next::Wire for FileSignal {
17726 type Owned<'de> = Self;
17727
17728 #[inline]
17729 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
17730 }
17732 }
17733
17734 unsafe impl<___D> ::fidl_next::Decode<___D> for FileSignal
17735 where
17736 ___D: ?Sized,
17737 {
17738 fn decode(
17739 slot: ::fidl_next::Slot<'_, Self>,
17740 _: &mut ___D,
17741 _: (),
17742 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17743 ::fidl_next::munge!(let Self { value } = slot);
17744 let set = u32::from(*value);
17745 if set & !crate::natural::FileSignal::all().bits() != 0 {
17746 return Err(::fidl_next::DecodeError::InvalidBits {
17747 expected: crate::natural::FileSignal::all().bits() as usize,
17748 actual: set as usize,
17749 });
17750 }
17751
17752 Ok(())
17753 }
17754 }
17755
17756 impl ::core::convert::From<crate::natural::FileSignal> for FileSignal {
17757 fn from(natural: crate::natural::FileSignal) -> Self {
17758 Self { value: ::fidl_next::WireU32::from(natural.bits()) }
17759 }
17760 }
17761
17762 impl ::fidl_next::IntoNatural for FileSignal {
17763 type Natural = crate::natural::FileSignal;
17764 }
17765
17766 impl ::fidl_next::Unconstrained for FileSignal {}
17767
17768 #[derive(Clone, Debug)]
17770 #[repr(C)]
17771 pub struct FilesystemInfo {
17772 pub total_bytes: ::fidl_next::WireU64,
17773
17774 pub used_bytes: ::fidl_next::WireU64,
17775
17776 pub total_nodes: ::fidl_next::WireU64,
17777
17778 pub used_nodes: ::fidl_next::WireU64,
17779
17780 pub free_shared_pool_bytes: ::fidl_next::WireU64,
17781
17782 pub fs_id: ::fidl_next::WireU64,
17783
17784 pub block_size: ::fidl_next::WireU32,
17785
17786 pub max_filename_size: ::fidl_next::WireU32,
17787
17788 pub fs_type: ::fidl_next::WireU32,
17789
17790 pub padding: ::fidl_next::WireU32,
17791
17792 pub name: [i8; 32],
17793 }
17794
17795 static_assertions::const_assert_eq!(std::mem::size_of::<FilesystemInfo>(), 96);
17796 static_assertions::const_assert_eq!(std::mem::align_of::<FilesystemInfo>(), 8);
17797
17798 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_bytes), 0);
17799
17800 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_bytes), 8);
17801
17802 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, total_nodes), 16);
17803
17804 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, used_nodes), 24);
17805
17806 static_assertions::const_assert_eq!(
17807 std::mem::offset_of!(FilesystemInfo, free_shared_pool_bytes),
17808 32
17809 );
17810
17811 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_id), 40);
17812
17813 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, block_size), 48);
17814
17815 static_assertions::const_assert_eq!(
17816 std::mem::offset_of!(FilesystemInfo, max_filename_size),
17817 52
17818 );
17819
17820 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, fs_type), 56);
17821
17822 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, padding), 60);
17823
17824 static_assertions::const_assert_eq!(std::mem::offset_of!(FilesystemInfo, name), 64);
17825
17826 unsafe impl ::fidl_next::Wire for FilesystemInfo {
17827 type Owned<'de> = FilesystemInfo;
17828
17829 #[inline]
17830 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17831 ::fidl_next::munge! {
17832 let Self {
17833
17834 total_bytes,
17835 used_bytes,
17836 total_nodes,
17837 used_nodes,
17838 free_shared_pool_bytes,
17839 fs_id,
17840 block_size,
17841 max_filename_size,
17842 fs_type,
17843 padding,
17844 name,
17845
17846 } = &mut *out_;
17847 }
17848
17849 ::fidl_next::Wire::zero_padding(total_bytes);
17850
17851 ::fidl_next::Wire::zero_padding(used_bytes);
17852
17853 ::fidl_next::Wire::zero_padding(total_nodes);
17854
17855 ::fidl_next::Wire::zero_padding(used_nodes);
17856
17857 ::fidl_next::Wire::zero_padding(free_shared_pool_bytes);
17858
17859 ::fidl_next::Wire::zero_padding(fs_id);
17860
17861 ::fidl_next::Wire::zero_padding(block_size);
17862
17863 ::fidl_next::Wire::zero_padding(max_filename_size);
17864
17865 ::fidl_next::Wire::zero_padding(fs_type);
17866
17867 ::fidl_next::Wire::zero_padding(padding);
17868
17869 ::fidl_next::Wire::zero_padding(name);
17870 }
17871 }
17872
17873 unsafe impl<___D> ::fidl_next::Decode<___D> for FilesystemInfo
17874 where
17875 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17876 {
17877 fn decode(
17878 slot_: ::fidl_next::Slot<'_, Self>,
17879 decoder_: &mut ___D,
17880 _: (),
17881 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17882 ::fidl_next::munge! {
17883 let Self {
17884
17885 mut total_bytes,
17886 mut used_bytes,
17887 mut total_nodes,
17888 mut used_nodes,
17889 mut free_shared_pool_bytes,
17890 mut fs_id,
17891 mut block_size,
17892 mut max_filename_size,
17893 mut fs_type,
17894 mut padding,
17895 mut name,
17896
17897 } = slot_;
17898 }
17899
17900 let _field = total_bytes.as_mut();
17901
17902 ::fidl_next::Decode::decode(total_bytes.as_mut(), decoder_, ())?;
17903
17904 let _field = used_bytes.as_mut();
17905
17906 ::fidl_next::Decode::decode(used_bytes.as_mut(), decoder_, ())?;
17907
17908 let _field = total_nodes.as_mut();
17909
17910 ::fidl_next::Decode::decode(total_nodes.as_mut(), decoder_, ())?;
17911
17912 let _field = used_nodes.as_mut();
17913
17914 ::fidl_next::Decode::decode(used_nodes.as_mut(), decoder_, ())?;
17915
17916 let _field = free_shared_pool_bytes.as_mut();
17917
17918 ::fidl_next::Decode::decode(free_shared_pool_bytes.as_mut(), decoder_, ())?;
17919
17920 let _field = fs_id.as_mut();
17921
17922 ::fidl_next::Decode::decode(fs_id.as_mut(), decoder_, ())?;
17923
17924 let _field = block_size.as_mut();
17925
17926 ::fidl_next::Decode::decode(block_size.as_mut(), decoder_, ())?;
17927
17928 let _field = max_filename_size.as_mut();
17929
17930 ::fidl_next::Decode::decode(max_filename_size.as_mut(), decoder_, ())?;
17931
17932 let _field = fs_type.as_mut();
17933
17934 ::fidl_next::Decode::decode(fs_type.as_mut(), decoder_, ())?;
17935
17936 let _field = padding.as_mut();
17937
17938 ::fidl_next::Decode::decode(padding.as_mut(), decoder_, ())?;
17939
17940 let _field = name.as_mut();
17941
17942 ::fidl_next::Decode::decode(name.as_mut(), decoder_, ())?;
17943
17944 Ok(())
17945 }
17946 }
17947
17948 impl ::fidl_next::IntoNatural for FilesystemInfo {
17949 type Natural = crate::natural::FilesystemInfo;
17950 }
17951
17952 impl ::fidl_next::Unconstrained for FilesystemInfo {}
17953
17954 #[derive(Clone, Debug)]
17956 #[repr(C)]
17957 pub struct Service {
17958 pub(crate) _empty: fidl_next::WireEmptyStructPlaceholder,
17959 }
17960
17961 static_assertions::const_assert_eq!(std::mem::size_of::<Service>(), 1);
17962 static_assertions::const_assert_eq!(std::mem::align_of::<Service>(), 1);
17963
17964 unsafe impl ::fidl_next::Wire for Service {
17965 type Owned<'de> = Service;
17966
17967 #[inline]
17968 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
17969 ::fidl_next::munge! {
17970 let Self {
17971
17972 _empty,
17973
17974
17975 } = &mut *out_;
17976 }
17977 }
17978 }
17979
17980 unsafe impl<___D> ::fidl_next::Decode<___D> for Service
17981 where
17982 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
17983 {
17984 fn decode(
17985 slot_: ::fidl_next::Slot<'_, Self>,
17986 decoder_: &mut ___D,
17987 _: (),
17988 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
17989 ::fidl_next::munge! {
17990 let Self {
17991
17992 mut _empty,
17993
17994
17995 } = slot_;
17996 }
17997
17998 if _empty.as_bytes() != &[0u8] {
17999 return Err(::fidl_next::DecodeError::InvalidEmptyStruct);
18000 }
18001
18002 Ok(())
18003 }
18004 }
18005
18006 impl ::fidl_next::IntoNatural for Service {
18007 type Natural = crate::natural::Service;
18008 }
18009
18010 impl ::fidl_next::Unconstrained for Service {}
18011
18012 #[derive(Debug)]
18014 #[repr(C)]
18015 pub struct SymlinkObject<'de> {
18016 pub target: ::fidl_next::WireVector<'de, u8>,
18017 }
18018
18019 static_assertions::const_assert_eq!(std::mem::size_of::<SymlinkObject<'_>>(), 16);
18020 static_assertions::const_assert_eq!(std::mem::align_of::<SymlinkObject<'_>>(), 8);
18021
18022 static_assertions::const_assert_eq!(std::mem::offset_of!(SymlinkObject<'_>, target), 0);
18023
18024 unsafe impl ::fidl_next::Wire for SymlinkObject<'static> {
18025 type Owned<'de> = SymlinkObject<'de>;
18026
18027 #[inline]
18028 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
18029 ::fidl_next::munge! {
18030 let Self {
18031
18032 target,
18033
18034 } = &mut *out_;
18035 }
18036
18037 ::fidl_next::Wire::zero_padding(target);
18038 }
18039 }
18040
18041 unsafe impl<___D> ::fidl_next::Decode<___D> for SymlinkObject<'static>
18042 where
18043 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18044 ___D: ::fidl_next::Decoder,
18045 {
18046 fn decode(
18047 slot_: ::fidl_next::Slot<'_, Self>,
18048 decoder_: &mut ___D,
18049 _: (),
18050 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18051 ::fidl_next::munge! {
18052 let Self {
18053
18054 mut target,
18055
18056 } = slot_;
18057 }
18058
18059 let _field = target.as_mut();
18060 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
18061 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
18062
18063 let target = unsafe { target.deref_unchecked() };
18064
18065 if target.len() > 4095 {
18066 return Err(::fidl_next::DecodeError::VectorTooLong {
18067 size: target.len() as u64,
18068 limit: 4095,
18069 });
18070 }
18071
18072 Ok(())
18073 }
18074 }
18075
18076 impl<'de> ::fidl_next::IntoNatural for SymlinkObject<'de> {
18077 type Natural = crate::natural::SymlinkObject;
18078 }
18079
18080 impl ::fidl_next::Unconstrained for SymlinkObject<'static> {}
18081
18082 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
18084 #[repr(transparent)]
18085 pub struct WatchEvent {
18086 pub(crate) value: u8,
18087 }
18088
18089 unsafe impl ::fidl_next::Wire for WatchEvent {
18090 type Owned<'de> = Self;
18091
18092 #[inline]
18093 fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
18094 }
18096 }
18097
18098 impl WatchEvent {
18099 pub const DELETED: WatchEvent = WatchEvent { value: 0 };
18100
18101 pub const ADDED: WatchEvent = WatchEvent { value: 1 };
18102
18103 pub const REMOVED: WatchEvent = WatchEvent { value: 2 };
18104
18105 pub const EXISTING: WatchEvent = WatchEvent { value: 3 };
18106
18107 pub const IDLE: WatchEvent = WatchEvent { value: 4 };
18108 }
18109
18110 unsafe impl<___D> ::fidl_next::Decode<___D> for WatchEvent
18111 where
18112 ___D: ?Sized,
18113 {
18114 fn decode(
18115 slot: ::fidl_next::Slot<'_, Self>,
18116 _: &mut ___D,
18117 _: (),
18118 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18119 ::fidl_next::munge!(let Self { value } = slot);
18120
18121 match u8::from(*value) {
18122 0 | 1 | 2 | 3 | 4 => (),
18123 unknown => {
18124 return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
18125 }
18126 }
18127
18128 Ok(())
18129 }
18130 }
18131
18132 impl ::core::convert::From<crate::natural::WatchEvent> for WatchEvent {
18133 fn from(natural: crate::natural::WatchEvent) -> Self {
18134 match natural {
18135 crate::natural::WatchEvent::Deleted => WatchEvent::DELETED,
18136
18137 crate::natural::WatchEvent::Added => WatchEvent::ADDED,
18138
18139 crate::natural::WatchEvent::Removed => WatchEvent::REMOVED,
18140
18141 crate::natural::WatchEvent::Existing => WatchEvent::EXISTING,
18142
18143 crate::natural::WatchEvent::Idle => WatchEvent::IDLE,
18144 }
18145 }
18146 }
18147
18148 impl ::fidl_next::IntoNatural for WatchEvent {
18149 type Natural = crate::natural::WatchEvent;
18150 }
18151
18152 impl ::fidl_next::Unconstrained for WatchEvent {}
18153}
18154
18155pub mod wire_optional {
18156
18157 #[repr(transparent)]
18158 pub struct SelinuxContext<'de> {
18159 pub(crate) raw: ::fidl_next::RawWireUnion,
18160 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
18161 }
18162
18163 unsafe impl ::fidl_next::Wire for SelinuxContext<'static> {
18164 type Owned<'de> = SelinuxContext<'de>;
18165
18166 #[inline]
18167 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
18168 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
18169 ::fidl_next::RawWireUnion::zero_padding(raw);
18170 }
18171 }
18172
18173 impl<'de> SelinuxContext<'de> {
18174 pub fn is_some(&self) -> bool {
18175 self.raw.is_some()
18176 }
18177
18178 pub fn is_none(&self) -> bool {
18179 self.raw.is_none()
18180 }
18181
18182 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SelinuxContext<'de>> {
18183 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
18184 }
18185
18186 pub fn into_option(self) -> ::core::option::Option<crate::wire::SelinuxContext<'de>> {
18187 if self.is_some() {
18188 Some(crate::wire::SelinuxContext {
18189 raw: self.raw,
18190 _phantom: ::core::marker::PhantomData,
18191 })
18192 } else {
18193 None
18194 }
18195 }
18196 }
18197
18198 unsafe impl<___D> ::fidl_next::Decode<___D> for SelinuxContext<'static>
18199 where
18200 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
18201 ___D: ::fidl_next::Decoder,
18202 {
18203 fn decode(
18204 mut slot: ::fidl_next::Slot<'_, Self>,
18205 decoder: &mut ___D,
18206 _: (),
18207 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
18208 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
18209 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
18210 1 => ::fidl_next::RawWireUnion::decode_as::<
18211 ___D,
18212 ::fidl_next::WireVector<'static, u8>,
18213 >(raw, decoder, (256, ()))?,
18214
18215 2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::wire::EmptyStruct>(
18216 raw,
18217 decoder,
18218 (),
18219 )?,
18220
18221 0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
18222 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
18223 }
18224
18225 Ok(())
18226 }
18227 }
18228
18229 impl<'de> ::core::fmt::Debug for SelinuxContext<'de> {
18230 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
18231 self.as_ref().fmt(f)
18232 }
18233 }
18234
18235 impl<'de> ::fidl_next::IntoNatural for SelinuxContext<'de> {
18236 type Natural = ::core::option::Option<crate::natural::SelinuxContext>;
18237 }
18238
18239 impl ::fidl_next::Unconstrained for SelinuxContext<'static> {}
18240}
18241
18242pub mod generic {
18243
18244 pub struct AdvisoryLockRange<T0, T1, T2> {
18245 pub origin: T0,
18246
18247 pub offset: T1,
18248
18249 pub length: T2,
18250 }
18251
18252 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::AdvisoryLockRange, ___E>
18253 for AdvisoryLockRange<T0, T1, T2>
18254 where
18255 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18256 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
18257 T1: ::fidl_next::Encode<::fidl_next::WireI64, ___E>,
18258 T2: ::fidl_next::Encode<::fidl_next::WireI64, ___E>,
18259 {
18260 #[inline]
18261 fn encode(
18262 self,
18263 encoder_: &mut ___E,
18264 out_: &mut ::core::mem::MaybeUninit<crate::wire::AdvisoryLockRange>,
18265 _: (),
18266 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18267 ::fidl_next::munge! {
18268 let crate::wire::AdvisoryLockRange {
18269
18270 origin,
18271 offset,
18272 length,
18273
18274 } = out_;
18275 }
18276
18277 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
18278
18279 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
18280
18281 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
18282
18283 Ok(())
18284 }
18285 }
18286
18287 pub struct AdvisoryLockingAdvisoryLockRequest<T0> {
18288 pub request: T0,
18289 }
18290
18291 unsafe impl<___E, T0>
18292 ::fidl_next::Encode<crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>, ___E>
18293 for AdvisoryLockingAdvisoryLockRequest<T0>
18294 where
18295 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18296 ___E: ::fidl_next::Encoder,
18297 T0: ::fidl_next::Encode<crate::wire::AdvisoryLockRequest<'static>, ___E>,
18298 {
18299 #[inline]
18300 fn encode(
18301 self,
18302 encoder_: &mut ___E,
18303 out_: &mut ::core::mem::MaybeUninit<
18304 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
18305 >,
18306 _: (),
18307 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18308 ::fidl_next::munge! {
18309 let crate::wire::AdvisoryLockingAdvisoryLockRequest {
18310
18311 request,
18312
18313 } = out_;
18314 }
18315
18316 ::fidl_next::Encode::encode(self.request, encoder_, request, ())?;
18317
18318 Ok(())
18319 }
18320 }
18321
18322 pub struct NodeAttributes<T0, T1, T2, T3, T4, T5, T6> {
18323 pub mode: T0,
18324
18325 pub id: T1,
18326
18327 pub content_size: T2,
18328
18329 pub storage_size: T3,
18330
18331 pub link_count: T4,
18332
18333 pub creation_time: T5,
18334
18335 pub modification_time: T6,
18336 }
18337
18338 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
18339 ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>
18340 for NodeAttributes<T0, T1, T2, T3, T4, T5, T6>
18341 where
18342 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18343 T0: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
18344 T1: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18345 T2: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18346 T3: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18347 T4: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18348 T5: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18349 T6: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18350 {
18351 #[inline]
18352 fn encode(
18353 self,
18354 encoder_: &mut ___E,
18355 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes>,
18356 _: (),
18357 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18358 ::fidl_next::munge! {
18359 let crate::wire::NodeAttributes {
18360
18361 mode,
18362 id,
18363 content_size,
18364 storage_size,
18365 link_count,
18366 creation_time,
18367 modification_time,
18368
18369 } = out_;
18370 }
18371
18372 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
18373
18374 ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
18375
18376 ::fidl_next::Encode::encode(self.content_size, encoder_, content_size, ())?;
18377
18378 ::fidl_next::Encode::encode(self.storage_size, encoder_, storage_size, ())?;
18379
18380 ::fidl_next::Encode::encode(self.link_count, encoder_, link_count, ())?;
18381
18382 ::fidl_next::Encode::encode(self.creation_time, encoder_, creation_time, ())?;
18383
18384 ::fidl_next::Encode::encode(self.modification_time, encoder_, modification_time, ())?;
18385
18386 Ok(())
18387 }
18388 }
18389
18390 pub struct NodeQueryFilesystemResponse<T0, T1> {
18391 pub s: T0,
18392
18393 pub info: T1,
18394 }
18395
18396 unsafe impl<___E, T0, T1>
18397 ::fidl_next::Encode<crate::wire::NodeQueryFilesystemResponse<'static>, ___E>
18398 for NodeQueryFilesystemResponse<T0, T1>
18399 where
18400 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18401 ___E: ::fidl_next::Encoder,
18402 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18403 T1: ::fidl_next::Encode<::fidl_next::WireBox<'static, crate::wire::FilesystemInfo>, ___E>,
18404 {
18405 #[inline]
18406 fn encode(
18407 self,
18408 encoder_: &mut ___E,
18409 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeQueryFilesystemResponse<'static>>,
18410 _: (),
18411 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18412 ::fidl_next::munge! {
18413 let crate::wire::NodeQueryFilesystemResponse {
18414
18415 s,
18416 info,
18417
18418 } = out_;
18419 }
18420
18421 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18422
18423 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
18424
18425 Ok(())
18426 }
18427 }
18428
18429 pub struct DirectoryReadDirentsRequest<T0> {
18430 pub max_bytes: T0,
18431 }
18432
18433 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryReadDirentsRequest, ___E>
18434 for DirectoryReadDirentsRequest<T0>
18435 where
18436 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18437 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
18438 {
18439 #[inline]
18440 fn encode(
18441 self,
18442 encoder_: &mut ___E,
18443 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsRequest>,
18444 _: (),
18445 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18446 ::fidl_next::munge! {
18447 let crate::wire::DirectoryReadDirentsRequest {
18448
18449 max_bytes,
18450
18451 } = out_;
18452 }
18453
18454 ::fidl_next::Encode::encode(self.max_bytes, encoder_, max_bytes, ())?;
18455
18456 Ok(())
18457 }
18458 }
18459
18460 pub struct DirectoryReadDirentsResponse<T0, T1> {
18461 pub s: T0,
18462
18463 pub dirents: T1,
18464 }
18465
18466 unsafe impl<___E, T0, T1>
18467 ::fidl_next::Encode<crate::wire::DirectoryReadDirentsResponse<'static>, ___E>
18468 for DirectoryReadDirentsResponse<T0, T1>
18469 where
18470 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18471 ___E: ::fidl_next::Encoder,
18472 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18473 T1: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
18474 {
18475 #[inline]
18476 fn encode(
18477 self,
18478 encoder_: &mut ___E,
18479 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryReadDirentsResponse<'static>>,
18480 _: (),
18481 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18482 ::fidl_next::munge! {
18483 let crate::wire::DirectoryReadDirentsResponse {
18484
18485 s,
18486 dirents,
18487
18488 } = out_;
18489 }
18490
18491 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18492
18493 ::fidl_next::Encode::encode(self.dirents, encoder_, dirents, (8192, ()))?;
18494
18495 Ok(())
18496 }
18497 }
18498
18499 pub struct DirectoryRewindResponse<T0> {
18500 pub s: T0,
18501 }
18502
18503 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryRewindResponse, ___E>
18504 for DirectoryRewindResponse<T0>
18505 where
18506 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18507 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18508 {
18509 #[inline]
18510 fn encode(
18511 self,
18512 encoder_: &mut ___E,
18513 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRewindResponse>,
18514 _: (),
18515 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18516 ::fidl_next::munge! {
18517 let crate::wire::DirectoryRewindResponse {
18518
18519 s,
18520
18521 } = out_;
18522 }
18523
18524 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18525
18526 Ok(())
18527 }
18528 }
18529
18530 pub struct DirectoryLinkResponse<T0> {
18531 pub s: T0,
18532 }
18533
18534 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryLinkResponse, ___E>
18535 for DirectoryLinkResponse<T0>
18536 where
18537 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18538 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18539 {
18540 #[inline]
18541 fn encode(
18542 self,
18543 encoder_: &mut ___E,
18544 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkResponse>,
18545 _: (),
18546 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18547 ::fidl_next::munge! {
18548 let crate::wire::DirectoryLinkResponse {
18549
18550 s,
18551
18552 } = out_;
18553 }
18554
18555 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18556
18557 Ok(())
18558 }
18559 }
18560
18561 pub struct DirectoryUnlinkRequest<T0, T1> {
18562 pub name: T0,
18563
18564 pub options: T1,
18565 }
18566
18567 unsafe impl<___E, T0, T1>
18568 ::fidl_next::Encode<crate::wire::DirectoryUnlinkRequest<'static>, ___E>
18569 for DirectoryUnlinkRequest<T0, T1>
18570 where
18571 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18572 ___E: ::fidl_next::Encoder,
18573 T0: ::fidl_next::Encode<::fidl_next::WireString<'static>, ___E>,
18574 T1: ::fidl_next::Encode<crate::wire::UnlinkOptions<'static>, ___E>,
18575 {
18576 #[inline]
18577 fn encode(
18578 self,
18579 encoder_: &mut ___E,
18580 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryUnlinkRequest<'static>>,
18581 _: (),
18582 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18583 ::fidl_next::munge! {
18584 let crate::wire::DirectoryUnlinkRequest {
18585
18586 name,
18587 options,
18588
18589 } = out_;
18590 }
18591
18592 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
18593
18594 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
18595
18596 Ok(())
18597 }
18598 }
18599
18600 pub struct DirectoryWatchResponse<T0> {
18601 pub s: T0,
18602 }
18603
18604 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DirectoryWatchResponse, ___E>
18605 for DirectoryWatchResponse<T0>
18606 where
18607 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18608 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18609 {
18610 #[inline]
18611 fn encode(
18612 self,
18613 encoder_: &mut ___E,
18614 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchResponse>,
18615 _: (),
18616 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18617 ::fidl_next::munge! {
18618 let crate::wire::DirectoryWatchResponse {
18619
18620 s,
18621
18622 } = out_;
18623 }
18624
18625 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18626
18627 Ok(())
18628 }
18629 }
18630
18631 pub struct NodeGetExtendedAttributeRequest<T0> {
18632 pub name: T0,
18633 }
18634
18635 unsafe impl<___E, T0>
18636 ::fidl_next::Encode<crate::wire::NodeGetExtendedAttributeRequest<'static>, ___E>
18637 for NodeGetExtendedAttributeRequest<T0>
18638 where
18639 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18640 ___E: ::fidl_next::Encoder,
18641 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
18642 {
18643 #[inline]
18644 fn encode(
18645 self,
18646 encoder_: &mut ___E,
18647 out_: &mut ::core::mem::MaybeUninit<
18648 crate::wire::NodeGetExtendedAttributeRequest<'static>,
18649 >,
18650 _: (),
18651 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18652 ::fidl_next::munge! {
18653 let crate::wire::NodeGetExtendedAttributeRequest {
18654
18655 name,
18656
18657 } = out_;
18658 }
18659
18660 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
18661
18662 Ok(())
18663 }
18664 }
18665
18666 pub struct NodeRemoveExtendedAttributeRequest<T0> {
18667 pub name: T0,
18668 }
18669
18670 unsafe impl<___E, T0>
18671 ::fidl_next::Encode<crate::wire::NodeRemoveExtendedAttributeRequest<'static>, ___E>
18672 for NodeRemoveExtendedAttributeRequest<T0>
18673 where
18674 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18675 ___E: ::fidl_next::Encoder,
18676 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
18677 {
18678 #[inline]
18679 fn encode(
18680 self,
18681 encoder_: &mut ___E,
18682 out_: &mut ::core::mem::MaybeUninit<
18683 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
18684 >,
18685 _: (),
18686 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18687 ::fidl_next::munge! {
18688 let crate::wire::NodeRemoveExtendedAttributeRequest {
18689
18690 name,
18691
18692 } = out_;
18693 }
18694
18695 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
18696
18697 Ok(())
18698 }
18699 }
18700
18701 pub struct NodeDeprecatedGetAttrResponse<T0, T1> {
18702 pub s: T0,
18703
18704 pub attributes: T1,
18705 }
18706
18707 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetAttrResponse, ___E>
18708 for NodeDeprecatedGetAttrResponse<T0, T1>
18709 where
18710 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18711 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18712 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
18713 {
18714 #[inline]
18715 fn encode(
18716 self,
18717 encoder_: &mut ___E,
18718 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetAttrResponse>,
18719 _: (),
18720 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18721 ::fidl_next::munge! {
18722 let crate::wire::NodeDeprecatedGetAttrResponse {
18723
18724 s,
18725 attributes,
18726
18727 } = out_;
18728 }
18729
18730 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18731
18732 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
18733
18734 Ok(())
18735 }
18736 }
18737
18738 pub struct NodeDeprecatedSetAttrRequest<T0, T1> {
18739 pub flags: T0,
18740
18741 pub attributes: T1,
18742 }
18743
18744 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrRequest, ___E>
18745 for NodeDeprecatedSetAttrRequest<T0, T1>
18746 where
18747 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18748 T0: ::fidl_next::Encode<crate::wire::NodeAttributeFlags, ___E>,
18749 T1: ::fidl_next::Encode<crate::wire::NodeAttributes, ___E>,
18750 {
18751 #[inline]
18752 fn encode(
18753 self,
18754 encoder_: &mut ___E,
18755 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrRequest>,
18756 _: (),
18757 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18758 ::fidl_next::munge! {
18759 let crate::wire::NodeDeprecatedSetAttrRequest {
18760
18761 flags,
18762 attributes,
18763
18764 } = out_;
18765 }
18766
18767 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
18768
18769 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, ())?;
18770
18771 Ok(())
18772 }
18773 }
18774
18775 pub struct NodeDeprecatedSetAttrResponse<T0> {
18776 pub s: T0,
18777 }
18778
18779 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetAttrResponse, ___E>
18780 for NodeDeprecatedSetAttrResponse<T0>
18781 where
18782 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18783 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18784 {
18785 #[inline]
18786 fn encode(
18787 self,
18788 encoder_: &mut ___E,
18789 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetAttrResponse>,
18790 _: (),
18791 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18792 ::fidl_next::munge! {
18793 let crate::wire::NodeDeprecatedSetAttrResponse {
18794
18795 s,
18796
18797 } = out_;
18798 }
18799
18800 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18801
18802 Ok(())
18803 }
18804 }
18805
18806 pub struct NodeDeprecatedGetFlagsResponse<T0, T1> {
18807 pub s: T0,
18808
18809 pub flags: T1,
18810 }
18811
18812 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedGetFlagsResponse, ___E>
18813 for NodeDeprecatedGetFlagsResponse<T0, T1>
18814 where
18815 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18816 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18817 T1: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
18818 {
18819 #[inline]
18820 fn encode(
18821 self,
18822 encoder_: &mut ___E,
18823 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedGetFlagsResponse>,
18824 _: (),
18825 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18826 ::fidl_next::munge! {
18827 let crate::wire::NodeDeprecatedGetFlagsResponse {
18828
18829 s,
18830 flags,
18831
18832 } = out_;
18833 }
18834
18835 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18836
18837 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
18838
18839 Ok(())
18840 }
18841 }
18842
18843 pub struct NodeDeprecatedSetFlagsRequest<T0> {
18844 pub flags: T0,
18845 }
18846
18847 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsRequest, ___E>
18848 for NodeDeprecatedSetFlagsRequest<T0>
18849 where
18850 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18851 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
18852 {
18853 #[inline]
18854 fn encode(
18855 self,
18856 encoder_: &mut ___E,
18857 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsRequest>,
18858 _: (),
18859 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18860 ::fidl_next::munge! {
18861 let crate::wire::NodeDeprecatedSetFlagsRequest {
18862
18863 flags,
18864
18865 } = out_;
18866 }
18867
18868 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
18869
18870 Ok(())
18871 }
18872 }
18873
18874 pub struct NodeDeprecatedSetFlagsResponse<T0> {
18875 pub s: T0,
18876 }
18877
18878 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeDeprecatedSetFlagsResponse, ___E>
18879 for NodeDeprecatedSetFlagsResponse<T0>
18880 where
18881 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18882 T0: ::fidl_next::Encode<::fidl_next::WireI32, ___E>,
18883 {
18884 #[inline]
18885 fn encode(
18886 self,
18887 encoder_: &mut ___E,
18888 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedSetFlagsResponse>,
18889 _: (),
18890 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18891 ::fidl_next::munge! {
18892 let crate::wire::NodeDeprecatedSetFlagsResponse {
18893
18894 s,
18895
18896 } = out_;
18897 }
18898
18899 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
18900
18901 Ok(())
18902 }
18903 }
18904
18905 pub struct NodeGetFlagsResponse<T0> {
18906 pub flags: T0,
18907 }
18908
18909 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetFlagsResponse, ___E>
18910 for NodeGetFlagsResponse<T0>
18911 where
18912 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18913 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
18914 {
18915 #[inline]
18916 fn encode(
18917 self,
18918 encoder_: &mut ___E,
18919 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetFlagsResponse>,
18920 _: (),
18921 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18922 ::fidl_next::munge! {
18923 let crate::wire::NodeGetFlagsResponse {
18924
18925 flags,
18926
18927 } = out_;
18928 }
18929
18930 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
18931
18932 Ok(())
18933 }
18934 }
18935
18936 pub struct NodeSetFlagsRequest<T0> {
18937 pub flags: T0,
18938 }
18939
18940 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeSetFlagsRequest, ___E>
18941 for NodeSetFlagsRequest<T0>
18942 where
18943 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18944 T0: ::fidl_next::Encode<crate::wire::Flags, ___E>,
18945 {
18946 #[inline]
18947 fn encode(
18948 self,
18949 encoder_: &mut ___E,
18950 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetFlagsRequest>,
18951 _: (),
18952 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18953 ::fidl_next::munge! {
18954 let crate::wire::NodeSetFlagsRequest {
18955
18956 flags,
18957
18958 } = out_;
18959 }
18960
18961 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
18962
18963 Ok(())
18964 }
18965 }
18966
18967 pub struct EmptyStruct {}
18968
18969 unsafe impl<___E> ::fidl_next::Encode<crate::wire::EmptyStruct, ___E> for EmptyStruct
18970 where
18971 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18972 {
18973 #[inline]
18974 fn encode(
18975 self,
18976 encoder_: &mut ___E,
18977 out_: &mut ::core::mem::MaybeUninit<crate::wire::EmptyStruct>,
18978 _: (),
18979 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
18980 ::fidl_next::munge! {
18981 let crate::wire::EmptyStruct {
18982
18983 _empty,
18984
18985
18986 } = out_;
18987 }
18988
18989 Ok(())
18990 }
18991 }
18992
18993 pub struct NodeAttributes2<T0, T1> {
18994 pub mutable_attributes: T0,
18995
18996 pub immutable_attributes: T1,
18997 }
18998
18999 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeAttributes2<'static>, ___E>
19000 for NodeAttributes2<T0, T1>
19001 where
19002 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19003 ___E: ::fidl_next::Encoder,
19004 T0: ::fidl_next::Encode<crate::wire::MutableNodeAttributes<'static>, ___E>,
19005 T1: ::fidl_next::Encode<crate::wire::ImmutableNodeAttributes<'static>, ___E>,
19006 {
19007 #[inline]
19008 fn encode(
19009 self,
19010 encoder_: &mut ___E,
19011 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAttributes2<'static>>,
19012 _: (),
19013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19014 ::fidl_next::munge! {
19015 let crate::wire::NodeAttributes2 {
19016
19017 mutable_attributes,
19018 immutable_attributes,
19019
19020 } = out_;
19021 }
19022
19023 ::fidl_next::Encode::encode(self.mutable_attributes, encoder_, mutable_attributes, ())?;
19024
19025 ::fidl_next::Encode::encode(
19026 self.immutable_attributes,
19027 encoder_,
19028 immutable_attributes,
19029 (),
19030 )?;
19031
19032 Ok(())
19033 }
19034 }
19035
19036 pub struct NodeGetAttributesRequest<T0> {
19037 pub query: T0,
19038 }
19039
19040 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetAttributesRequest, ___E>
19041 for NodeGetAttributesRequest<T0>
19042 where
19043 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19044 T0: ::fidl_next::Encode<crate::wire::NodeAttributesQuery, ___E>,
19045 {
19046 #[inline]
19047 fn encode(
19048 self,
19049 encoder_: &mut ___E,
19050 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetAttributesRequest>,
19051 _: (),
19052 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19053 ::fidl_next::munge! {
19054 let crate::wire::NodeGetAttributesRequest {
19055
19056 query,
19057
19058 } = out_;
19059 }
19060
19061 ::fidl_next::Encode::encode(self.query, encoder_, query, ())?;
19062
19063 Ok(())
19064 }
19065 }
19066
19067 pub struct DirectoryObject {}
19068
19069 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryObject, ___E> for DirectoryObject
19070 where
19071 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19072 {
19073 #[inline]
19074 fn encode(
19075 self,
19076 encoder_: &mut ___E,
19077 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryObject>,
19078 _: (),
19079 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19080 ::fidl_next::munge! {
19081 let crate::wire::DirectoryObject {
19082
19083 _empty,
19084
19085
19086 } = out_;
19087 }
19088
19089 Ok(())
19090 }
19091 }
19092
19093 pub struct ExtendedAttributeIteratorGetNextResponse<T0, T1> {
19094 pub attributes: T0,
19095
19096 pub last: T1,
19097 }
19098
19099 unsafe impl<___E, T0, T1>
19100 ::fidl_next::Encode<crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>, ___E>
19101 for ExtendedAttributeIteratorGetNextResponse<T0, T1>
19102 where
19103 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19104 ___E: ::fidl_next::Encoder,
19105 T0: ::fidl_next::Encode<
19106 ::fidl_next::WireVector<'static, ::fidl_next::WireVector<'static, u8>>,
19107 ___E,
19108 >,
19109 T1: ::fidl_next::Encode<bool, ___E>,
19110 {
19111 #[inline]
19112 fn encode(
19113 self,
19114 encoder_: &mut ___E,
19115 out_: &mut ::core::mem::MaybeUninit<
19116 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
19117 >,
19118 _: (),
19119 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19120 ::fidl_next::munge! {
19121 let crate::wire::ExtendedAttributeIteratorGetNextResponse {
19122
19123 attributes,
19124 last,
19125
19126 } = out_;
19127 }
19128
19129 ::fidl_next::Encode::encode(self.attributes, encoder_, attributes, (128, (255, ())))?;
19130
19131 ::fidl_next::Encode::encode(self.last, encoder_, last, ())?;
19132
19133 Ok(())
19134 }
19135 }
19136
19137 pub struct ReadableReadRequest<T0> {
19138 pub count: T0,
19139 }
19140
19141 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadRequest, ___E>
19142 for ReadableReadRequest<T0>
19143 where
19144 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19145 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19146 {
19147 #[inline]
19148 fn encode(
19149 self,
19150 encoder_: &mut ___E,
19151 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadRequest>,
19152 _: (),
19153 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19154 ::fidl_next::munge! {
19155 let crate::wire::ReadableReadRequest {
19156
19157 count,
19158
19159 } = out_;
19160 }
19161
19162 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
19163
19164 Ok(())
19165 }
19166 }
19167
19168 pub struct ReadableReadResponse<T0> {
19169 pub data: T0,
19170 }
19171
19172 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ReadableReadResponse<'static>, ___E>
19173 for ReadableReadResponse<T0>
19174 where
19175 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19176 ___E: ::fidl_next::Encoder,
19177 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19178 {
19179 #[inline]
19180 fn encode(
19181 self,
19182 encoder_: &mut ___E,
19183 out_: &mut ::core::mem::MaybeUninit<crate::wire::ReadableReadResponse<'static>>,
19184 _: (),
19185 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19186 ::fidl_next::munge! {
19187 let crate::wire::ReadableReadResponse {
19188
19189 data,
19190
19191 } = out_;
19192 }
19193
19194 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
19195
19196 Ok(())
19197 }
19198 }
19199
19200 pub struct WritableWriteRequest<T0> {
19201 pub data: T0,
19202 }
19203
19204 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteRequest<'static>, ___E>
19205 for WritableWriteRequest<T0>
19206 where
19207 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19208 ___E: ::fidl_next::Encoder,
19209 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19210 {
19211 #[inline]
19212 fn encode(
19213 self,
19214 encoder_: &mut ___E,
19215 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteRequest<'static>>,
19216 _: (),
19217 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19218 ::fidl_next::munge! {
19219 let crate::wire::WritableWriteRequest {
19220
19221 data,
19222
19223 } = out_;
19224 }
19225
19226 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
19227
19228 Ok(())
19229 }
19230 }
19231
19232 pub struct WritableWriteResponse<T0> {
19233 pub actual_count: T0,
19234 }
19235
19236 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WritableWriteResponse, ___E>
19237 for WritableWriteResponse<T0>
19238 where
19239 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19240 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19241 {
19242 #[inline]
19243 fn encode(
19244 self,
19245 encoder_: &mut ___E,
19246 out_: &mut ::core::mem::MaybeUninit<crate::wire::WritableWriteResponse>,
19247 _: (),
19248 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19249 ::fidl_next::munge! {
19250 let crate::wire::WritableWriteResponse {
19251
19252 actual_count,
19253
19254 } = out_;
19255 }
19256
19257 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
19258
19259 Ok(())
19260 }
19261 }
19262
19263 pub struct FileSeekRequest<T0, T1> {
19264 pub origin: T0,
19265
19266 pub offset: T1,
19267 }
19268
19269 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileSeekRequest, ___E>
19270 for FileSeekRequest<T0, T1>
19271 where
19272 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19273 T0: ::fidl_next::Encode<crate::wire::SeekOrigin, ___E>,
19274 T1: ::fidl_next::Encode<::fidl_next::WireI64, ___E>,
19275 {
19276 #[inline]
19277 fn encode(
19278 self,
19279 encoder_: &mut ___E,
19280 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekRequest>,
19281 _: (),
19282 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19283 ::fidl_next::munge! {
19284 let crate::wire::FileSeekRequest {
19285
19286 origin,
19287 offset,
19288
19289 } = out_;
19290 }
19291
19292 ::fidl_next::Encode::encode(self.origin, encoder_, origin, ())?;
19293
19294 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
19295
19296 Ok(())
19297 }
19298 }
19299
19300 pub struct FileSeekResponse<T0> {
19301 pub offset_from_start: T0,
19302 }
19303
19304 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileSeekResponse, ___E>
19305 for FileSeekResponse<T0>
19306 where
19307 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19308 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19309 {
19310 #[inline]
19311 fn encode(
19312 self,
19313 encoder_: &mut ___E,
19314 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileSeekResponse>,
19315 _: (),
19316 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19317 ::fidl_next::munge! {
19318 let crate::wire::FileSeekResponse {
19319
19320 offset_from_start,
19321
19322 } = out_;
19323 }
19324
19325 ::fidl_next::Encode::encode(self.offset_from_start, encoder_, offset_from_start, ())?;
19326
19327 Ok(())
19328 }
19329 }
19330
19331 pub struct FileReadAtRequest<T0, T1> {
19332 pub count: T0,
19333
19334 pub offset: T1,
19335 }
19336
19337 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileReadAtRequest, ___E>
19338 for FileReadAtRequest<T0, T1>
19339 where
19340 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19341 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19342 T1: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19343 {
19344 #[inline]
19345 fn encode(
19346 self,
19347 encoder_: &mut ___E,
19348 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtRequest>,
19349 _: (),
19350 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19351 ::fidl_next::munge! {
19352 let crate::wire::FileReadAtRequest {
19353
19354 count,
19355 offset,
19356
19357 } = out_;
19358 }
19359
19360 ::fidl_next::Encode::encode(self.count, encoder_, count, ())?;
19361
19362 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
19363
19364 Ok(())
19365 }
19366 }
19367
19368 pub struct FileReadAtResponse<T0> {
19369 pub data: T0,
19370 }
19371
19372 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileReadAtResponse<'static>, ___E>
19373 for FileReadAtResponse<T0>
19374 where
19375 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19376 ___E: ::fidl_next::Encoder,
19377 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19378 {
19379 #[inline]
19380 fn encode(
19381 self,
19382 encoder_: &mut ___E,
19383 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileReadAtResponse<'static>>,
19384 _: (),
19385 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19386 ::fidl_next::munge! {
19387 let crate::wire::FileReadAtResponse {
19388
19389 data,
19390
19391 } = out_;
19392 }
19393
19394 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
19395
19396 Ok(())
19397 }
19398 }
19399
19400 pub struct FileWriteAtRequest<T0, T1> {
19401 pub data: T0,
19402
19403 pub offset: T1,
19404 }
19405
19406 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileWriteAtRequest<'static>, ___E>
19407 for FileWriteAtRequest<T0, T1>
19408 where
19409 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19410 ___E: ::fidl_next::Encoder,
19411 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19412 T1: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19413 {
19414 #[inline]
19415 fn encode(
19416 self,
19417 encoder_: &mut ___E,
19418 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtRequest<'static>>,
19419 _: (),
19420 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19421 ::fidl_next::munge! {
19422 let crate::wire::FileWriteAtRequest {
19423
19424 data,
19425 offset,
19426
19427 } = out_;
19428 }
19429
19430 ::fidl_next::Encode::encode(self.data, encoder_, data, (8192, ()))?;
19431
19432 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
19433
19434 Ok(())
19435 }
19436 }
19437
19438 pub struct FileWriteAtResponse<T0> {
19439 pub actual_count: T0,
19440 }
19441
19442 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileWriteAtResponse, ___E>
19443 for FileWriteAtResponse<T0>
19444 where
19445 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19446 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19447 {
19448 #[inline]
19449 fn encode(
19450 self,
19451 encoder_: &mut ___E,
19452 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileWriteAtResponse>,
19453 _: (),
19454 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19455 ::fidl_next::munge! {
19456 let crate::wire::FileWriteAtResponse {
19457
19458 actual_count,
19459
19460 } = out_;
19461 }
19462
19463 ::fidl_next::Encode::encode(self.actual_count, encoder_, actual_count, ())?;
19464
19465 Ok(())
19466 }
19467 }
19468
19469 pub struct FileResizeRequest<T0> {
19470 pub length: T0,
19471 }
19472
19473 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileResizeRequest, ___E>
19474 for FileResizeRequest<T0>
19475 where
19476 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19477 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19478 {
19479 #[inline]
19480 fn encode(
19481 self,
19482 encoder_: &mut ___E,
19483 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileResizeRequest>,
19484 _: (),
19485 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19486 ::fidl_next::munge! {
19487 let crate::wire::FileResizeRequest {
19488
19489 length,
19490
19491 } = out_;
19492 }
19493
19494 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
19495
19496 Ok(())
19497 }
19498 }
19499
19500 pub struct FileGetBackingMemoryRequest<T0> {
19501 pub flags: T0,
19502 }
19503
19504 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryRequest, ___E>
19505 for FileGetBackingMemoryRequest<T0>
19506 where
19507 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19508 T0: ::fidl_next::Encode<crate::wire::VmoFlags, ___E>,
19509 {
19510 #[inline]
19511 fn encode(
19512 self,
19513 encoder_: &mut ___E,
19514 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryRequest>,
19515 _: (),
19516 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19517 ::fidl_next::munge! {
19518 let crate::wire::FileGetBackingMemoryRequest {
19519
19520 flags,
19521
19522 } = out_;
19523 }
19524
19525 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
19526
19527 Ok(())
19528 }
19529 }
19530
19531 pub struct FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> {
19532 pub total_bytes: T0,
19533
19534 pub used_bytes: T1,
19535
19536 pub total_nodes: T2,
19537
19538 pub used_nodes: T3,
19539
19540 pub free_shared_pool_bytes: T4,
19541
19542 pub fs_id: T5,
19543
19544 pub block_size: T6,
19545
19546 pub max_filename_size: T7,
19547
19548 pub fs_type: T8,
19549
19550 pub padding: T9,
19551
19552 pub name: T10,
19553 }
19554
19555 unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
19556 ::fidl_next::Encode<crate::wire::FilesystemInfo, ___E>
19557 for FilesystemInfo<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
19558 where
19559 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19560 T0: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19561 T1: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19562 T2: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19563 T3: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19564 T4: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19565 T5: ::fidl_next::Encode<::fidl_next::WireU64, ___E>,
19566 T6: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
19567 T7: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
19568 T8: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
19569 T9: ::fidl_next::Encode<::fidl_next::WireU32, ___E>,
19570 T10: ::fidl_next::Encode<[i8; 32], ___E>,
19571 {
19572 #[inline]
19573 fn encode(
19574 self,
19575 encoder_: &mut ___E,
19576 out_: &mut ::core::mem::MaybeUninit<crate::wire::FilesystemInfo>,
19577 _: (),
19578 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19579 ::fidl_next::munge! {
19580 let crate::wire::FilesystemInfo {
19581
19582 total_bytes,
19583 used_bytes,
19584 total_nodes,
19585 used_nodes,
19586 free_shared_pool_bytes,
19587 fs_id,
19588 block_size,
19589 max_filename_size,
19590 fs_type,
19591 padding,
19592 name,
19593
19594 } = out_;
19595 }
19596
19597 ::fidl_next::Encode::encode(self.total_bytes, encoder_, total_bytes, ())?;
19598
19599 ::fidl_next::Encode::encode(self.used_bytes, encoder_, used_bytes, ())?;
19600
19601 ::fidl_next::Encode::encode(self.total_nodes, encoder_, total_nodes, ())?;
19602
19603 ::fidl_next::Encode::encode(self.used_nodes, encoder_, used_nodes, ())?;
19604
19605 ::fidl_next::Encode::encode(
19606 self.free_shared_pool_bytes,
19607 encoder_,
19608 free_shared_pool_bytes,
19609 (),
19610 )?;
19611
19612 ::fidl_next::Encode::encode(self.fs_id, encoder_, fs_id, ())?;
19613
19614 ::fidl_next::Encode::encode(self.block_size, encoder_, block_size, ())?;
19615
19616 ::fidl_next::Encode::encode(self.max_filename_size, encoder_, max_filename_size, ())?;
19617
19618 ::fidl_next::Encode::encode(self.fs_type, encoder_, fs_type, ())?;
19619
19620 ::fidl_next::Encode::encode(self.padding, encoder_, padding, ())?;
19621
19622 ::fidl_next::Encode::encode(self.name, encoder_, name, ())?;
19623
19624 Ok(())
19625 }
19626 }
19627
19628 pub struct Service {}
19629
19630 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Service, ___E> for Service
19631 where
19632 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19633 {
19634 #[inline]
19635 fn encode(
19636 self,
19637 encoder_: &mut ___E,
19638 out_: &mut ::core::mem::MaybeUninit<crate::wire::Service>,
19639 _: (),
19640 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19641 ::fidl_next::munge! {
19642 let crate::wire::Service {
19643
19644 _empty,
19645
19646
19647 } = out_;
19648 }
19649
19650 Ok(())
19651 }
19652 }
19653
19654 pub struct SymlinkObject<T0> {
19655 pub target: T0,
19656 }
19657
19658 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SymlinkObject<'static>, ___E>
19659 for SymlinkObject<T0>
19660 where
19661 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19662 ___E: ::fidl_next::Encoder,
19663 T0: ::fidl_next::Encode<::fidl_next::WireVector<'static, u8>, ___E>,
19664 {
19665 #[inline]
19666 fn encode(
19667 self,
19668 encoder_: &mut ___E,
19669 out_: &mut ::core::mem::MaybeUninit<crate::wire::SymlinkObject<'static>>,
19670 _: (),
19671 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
19672 ::fidl_next::munge! {
19673 let crate::wire::SymlinkObject {
19674
19675 target,
19676
19677 } = out_;
19678 }
19679
19680 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
19681
19682 Ok(())
19683 }
19684 }
19685}
19686
19687pub use self::natural::*;
19688
19689#[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"]
19691#[derive(PartialEq, Debug)]
19692pub struct AdvisoryLocking;
19693
19694#[cfg(target_os = "fuchsia")]
19695impl ::fidl_next::HasTransport for AdvisoryLocking {
19696 type Transport = ::fidl_next::fuchsia::zx::Channel;
19697}
19698
19699pub mod advisory_locking {
19700 pub mod prelude {
19701 pub use crate::{
19702 AdvisoryLocking, AdvisoryLockingClientHandler, AdvisoryLockingServerHandler,
19703 advisory_locking,
19704 };
19705
19706 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
19707
19708 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
19709 }
19710
19711 pub struct AdvisoryLock;
19712
19713 impl ::fidl_next::Method for AdvisoryLock {
19714 const ORDINAL: u64 = 7992130864415541162;
19715 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
19716 ::fidl_next::protocol::Flexibility::Strict;
19717
19718 type Protocol = crate::AdvisoryLocking;
19719
19720 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
19721 }
19722
19723 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
19724 type Response = ::fidl_next::WireResult<
19725 'static,
19726 crate::wire::AdvisoryLockingAdvisoryLockResponse,
19727 ::fidl_next::WireI32,
19728 >;
19729 }
19730
19731 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
19732 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
19733
19734 fn respond(response: ___R) -> Self::Output {
19735 ::core::result::Result::Ok(response)
19736 }
19737 }
19738
19739 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
19740 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
19741
19742 fn respond_err(response: ___R) -> Self::Output {
19743 ::core::result::Result::Err(response)
19744 }
19745 }
19746
19747 mod ___detail {
19748 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::AdvisoryLocking
19749 where
19750 ___T: ::fidl_next::Transport,
19751 {
19752 type Client = AdvisoryLockingClient<___T>;
19753 type Server = AdvisoryLockingServer<___T>;
19754 }
19755
19756 #[repr(transparent)]
19758 pub struct AdvisoryLockingClient<___T: ::fidl_next::Transport> {
19759 #[allow(dead_code)]
19760 client: ::fidl_next::protocol::Client<___T>,
19761 }
19762
19763 impl<___T> AdvisoryLockingClient<___T>
19764 where
19765 ___T: ::fidl_next::Transport,
19766 {
19767 #[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"]
19768 pub fn advisory_lock(
19769 &self,
19770
19771 request: impl ::fidl_next::Encode<
19772 crate::wire::AdvisoryLockRequest<'static>,
19773 <___T as ::fidl_next::Transport>::SendBuffer,
19774 >,
19775 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
19776 where
19777 <___T as ::fidl_next::Transport>::SendBuffer:
19778 ::fidl_next::encoder::InternalHandleEncoder,
19779 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
19780 {
19781 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
19782 request,
19783 })
19784 }
19785
19786 #[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"]
19787 pub fn advisory_lock_with<___R>(
19788 &self,
19789 request: ___R,
19790 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
19791 where
19792 ___R: ::fidl_next::Encode<
19793 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
19794 <___T as ::fidl_next::Transport>::SendBuffer,
19795 >,
19796 {
19797 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19798 7992130864415541162,
19799 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
19800 request,
19801 ))
19802 }
19803 }
19804
19805 #[repr(transparent)]
19807 pub struct AdvisoryLockingServer<___T: ::fidl_next::Transport> {
19808 server: ::fidl_next::protocol::Server<___T>,
19809 }
19810
19811 impl<___T> AdvisoryLockingServer<___T> where ___T: ::fidl_next::Transport {}
19812 }
19813}
19814
19815pub trait AdvisoryLockingClientHandler<
19819 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19820 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19821>
19822{
19823}
19824
19825impl<___T> AdvisoryLockingClientHandler<___T> for ::fidl_next::IgnoreEvents where
19826 ___T: ::fidl_next::Transport
19827{
19828}
19829
19830impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for AdvisoryLocking
19831where
19832 ___H: AdvisoryLockingClientHandler<___T> + ::core::marker::Send,
19833 ___T: ::fidl_next::Transport,
19834{
19835 async fn on_event(
19836 handler: &mut ___H,
19837 ordinal: u64,
19838 flexibility: ::fidl_next::protocol::Flexibility,
19839 buffer: ___T::RecvBuffer,
19840 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19841 match ordinal {
19842 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19843 }
19844 }
19845}
19846
19847pub trait AdvisoryLockingServerHandler<
19851 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19852 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19853>
19854{
19855 #[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"]
19856 fn advisory_lock(
19857 &mut self,
19858
19859 request: ::fidl_next::Request<advisory_locking::AdvisoryLock, ___T>,
19860
19861 responder: ::fidl_next::Responder<advisory_locking::AdvisoryLock, ___T>,
19862 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19863}
19864
19865impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for AdvisoryLocking
19866where
19867 ___H: AdvisoryLockingServerHandler<___T> + ::core::marker::Send,
19868 ___T: ::fidl_next::Transport,
19869 <advisory_locking::AdvisoryLock as ::fidl_next::Method>::Request:
19870 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
19871{
19872 async fn on_one_way(
19873 handler: &mut ___H,
19874 ordinal: u64,
19875 flexibility: ::fidl_next::protocol::Flexibility,
19876 buffer: ___T::RecvBuffer,
19877 ) -> ::core::result::Result<
19878 (),
19879 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19880 > {
19881 match ordinal {
19882 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19883 }
19884 }
19885
19886 async fn on_two_way(
19887 handler: &mut ___H,
19888 ordinal: u64,
19889 flexibility: ::fidl_next::protocol::Flexibility,
19890 buffer: ___T::RecvBuffer,
19891 responder: ::fidl_next::protocol::Responder<___T>,
19892 ) -> ::core::result::Result<
19893 (),
19894 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19895 > {
19896 match ordinal {
19897 7992130864415541162 => {
19898 let responder = ::fidl_next::Responder::from_untyped(responder);
19899
19900 match ::fidl_next::DecoderExt::decode(buffer) {
19901 Ok(decoded) => {
19902 handler
19903 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
19904 .await;
19905 Ok(())
19906 }
19907 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19908 ordinal: 7992130864415541162,
19909 error,
19910 }),
19911 }
19912 }
19913
19914 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
19915 }
19916 }
19917}
19918
19919pub const DIRECTORY_PROTOCOL_NAME: &str = "fuchsia.io/Directory";
19920
19921#[doc = " The maximum length, in bytes, of a filesystem path.\n"]
19922pub const MAX_PATH_LENGTH: u64 = 4095 as u64;
19923
19924#[doc = " The maximal buffer size which can be transmitted for buffered operations.\n This capacity is currently set somewhat arbitrarily.\n"]
19925pub const MAX_BUF: u64 = 8192 as u64;
19926
19927#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
19928pub const MAX_NAME_LENGTH: u64 = 255 as u64;
19929
19930#[doc = " The maximum size for an extended attribute name.\n"]
19931pub const MAX_ATTRIBUTE_NAME: u64 = 255 as u64;
19932
19933#[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"]
19934pub const MAX_INLINE_ATTRIBUTE_VALUE: u64 = 32768 as u64;
19935
19936#[doc = " The maximum size for passing the SELinux context as an attribute.\n"]
19937pub const MAX_SELINUX_CONTEXT_ATTRIBUTE_LEN: u64 = 256 as u64;
19938
19939#[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"]
19941#[derive(PartialEq, Debug)]
19942pub struct DirectoryWatcher;
19943
19944#[cfg(target_os = "fuchsia")]
19945impl ::fidl_next::HasTransport for DirectoryWatcher {
19946 type Transport = ::fidl_next::fuchsia::zx::Channel;
19947}
19948
19949pub mod directory_watcher {
19950 pub mod prelude {
19951 pub use crate::{
19952 DirectoryWatcher, DirectoryWatcherClientHandler, DirectoryWatcherServerHandler,
19953 directory_watcher,
19954 };
19955 }
19956
19957 mod ___detail {
19958 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::DirectoryWatcher
19959 where
19960 ___T: ::fidl_next::Transport,
19961 {
19962 type Client = DirectoryWatcherClient<___T>;
19963 type Server = DirectoryWatcherServer<___T>;
19964 }
19965
19966 #[repr(transparent)]
19968 pub struct DirectoryWatcherClient<___T: ::fidl_next::Transport> {
19969 #[allow(dead_code)]
19970 client: ::fidl_next::protocol::Client<___T>,
19971 }
19972
19973 impl<___T> DirectoryWatcherClient<___T> where ___T: ::fidl_next::Transport {}
19974
19975 #[repr(transparent)]
19977 pub struct DirectoryWatcherServer<___T: ::fidl_next::Transport> {
19978 server: ::fidl_next::protocol::Server<___T>,
19979 }
19980
19981 impl<___T> DirectoryWatcherServer<___T> where ___T: ::fidl_next::Transport {}
19982 }
19983}
19984
19985pub trait DirectoryWatcherClientHandler<
19989 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19990 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19991>
19992{
19993}
19994
19995impl<___T> DirectoryWatcherClientHandler<___T> for ::fidl_next::IgnoreEvents where
19996 ___T: ::fidl_next::Transport
19997{
19998}
19999
20000impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryWatcher
20001where
20002 ___H: DirectoryWatcherClientHandler<___T> + ::core::marker::Send,
20003 ___T: ::fidl_next::Transport,
20004{
20005 async fn on_event(
20006 handler: &mut ___H,
20007 ordinal: u64,
20008 flexibility: ::fidl_next::protocol::Flexibility,
20009 buffer: ___T::RecvBuffer,
20010 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20011 match ordinal {
20012 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20013 }
20014 }
20015}
20016
20017pub trait DirectoryWatcherServerHandler<
20021 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20022 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20023>
20024{
20025}
20026
20027impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryWatcher
20028where
20029 ___H: DirectoryWatcherServerHandler<___T> + ::core::marker::Send,
20030 ___T: ::fidl_next::Transport,
20031{
20032 async fn on_one_way(
20033 handler: &mut ___H,
20034 ordinal: u64,
20035 flexibility: ::fidl_next::protocol::Flexibility,
20036 buffer: ___T::RecvBuffer,
20037 ) -> ::core::result::Result<
20038 (),
20039 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20040 > {
20041 match ordinal {
20042 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20043 }
20044 }
20045
20046 async fn on_two_way(
20047 handler: &mut ___H,
20048 ordinal: u64,
20049 flexibility: ::fidl_next::protocol::Flexibility,
20050 buffer: ___T::RecvBuffer,
20051 responder: ::fidl_next::protocol::Responder<___T>,
20052 ) -> ::core::result::Result<
20053 (),
20054 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20055 > {
20056 match ordinal {
20057 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20058 }
20059 }
20060}
20061
20062#[doc = " The maximum size of a chunk in the ListExtendedAttributes iterator.\n"]
20063pub const MAX_LIST_ATTRIBUTES_CHUNK: u64 = 128 as u64;
20064
20065#[derive(PartialEq, Debug)]
20067pub struct ExtendedAttributeIterator;
20068
20069#[cfg(target_os = "fuchsia")]
20070impl ::fidl_next::HasTransport for ExtendedAttributeIterator {
20071 type Transport = ::fidl_next::fuchsia::zx::Channel;
20072}
20073
20074pub mod extended_attribute_iterator {
20075 pub mod prelude {
20076 pub use crate::{
20077 ExtendedAttributeIterator, ExtendedAttributeIteratorClientHandler,
20078 ExtendedAttributeIteratorServerHandler, extended_attribute_iterator,
20079 };
20080
20081 pub use crate::natural::ExtendedAttributeIteratorGetNextResponse;
20082 }
20083
20084 pub struct GetNext;
20085
20086 impl ::fidl_next::Method for GetNext {
20087 const ORDINAL: u64 = 268639596268373415;
20088 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
20089 ::fidl_next::protocol::Flexibility::Strict;
20090
20091 type Protocol = crate::ExtendedAttributeIterator;
20092
20093 type Request = ();
20094 }
20095
20096 impl ::fidl_next::TwoWayMethod for GetNext {
20097 type Response = ::fidl_next::WireResult<
20098 'static,
20099 crate::wire::ExtendedAttributeIteratorGetNextResponse<'static>,
20100 ::fidl_next::WireI32,
20101 >;
20102 }
20103
20104 impl<___R> ::fidl_next::Respond<___R> for GetNext {
20105 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
20106
20107 fn respond(response: ___R) -> Self::Output {
20108 ::core::result::Result::Ok(response)
20109 }
20110 }
20111
20112 impl<___R> ::fidl_next::RespondErr<___R> for GetNext {
20113 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
20114
20115 fn respond_err(response: ___R) -> Self::Output {
20116 ::core::result::Result::Err(response)
20117 }
20118 }
20119
20120 mod ___detail {
20121 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::ExtendedAttributeIterator
20122 where
20123 ___T: ::fidl_next::Transport,
20124 {
20125 type Client = ExtendedAttributeIteratorClient<___T>;
20126 type Server = ExtendedAttributeIteratorServer<___T>;
20127 }
20128
20129 #[repr(transparent)]
20131 pub struct ExtendedAttributeIteratorClient<___T: ::fidl_next::Transport> {
20132 #[allow(dead_code)]
20133 client: ::fidl_next::protocol::Client<___T>,
20134 }
20135
20136 impl<___T> ExtendedAttributeIteratorClient<___T>
20137 where
20138 ___T: ::fidl_next::Transport,
20139 {
20140 #[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"]
20141 pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
20142 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
20143 268639596268373415,
20144 <super::GetNext as ::fidl_next::Method>::FLEXIBILITY,
20145 (),
20146 ))
20147 }
20148 }
20149
20150 #[repr(transparent)]
20152 pub struct ExtendedAttributeIteratorServer<___T: ::fidl_next::Transport> {
20153 server: ::fidl_next::protocol::Server<___T>,
20154 }
20155
20156 impl<___T> ExtendedAttributeIteratorServer<___T> where ___T: ::fidl_next::Transport {}
20157 }
20158}
20159
20160pub trait ExtendedAttributeIteratorClientHandler<
20164 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20165 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20166>
20167{
20168}
20169
20170impl<___T> ExtendedAttributeIteratorClientHandler<___T> for ::fidl_next::IgnoreEvents where
20171 ___T: ::fidl_next::Transport
20172{
20173}
20174
20175impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExtendedAttributeIterator
20176where
20177 ___H: ExtendedAttributeIteratorClientHandler<___T> + ::core::marker::Send,
20178 ___T: ::fidl_next::Transport,
20179{
20180 async fn on_event(
20181 handler: &mut ___H,
20182 ordinal: u64,
20183 flexibility: ::fidl_next::protocol::Flexibility,
20184 buffer: ___T::RecvBuffer,
20185 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20186 match ordinal {
20187 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20188 }
20189 }
20190}
20191
20192pub trait ExtendedAttributeIteratorServerHandler<
20196 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20197 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20198>
20199{
20200 #[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"]
20201 fn get_next(
20202 &mut self,
20203
20204 responder: ::fidl_next::Responder<extended_attribute_iterator::GetNext, ___T>,
20205 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20206}
20207
20208impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExtendedAttributeIterator
20209where
20210 ___H: ExtendedAttributeIteratorServerHandler<___T> + ::core::marker::Send,
20211 ___T: ::fidl_next::Transport,
20212{
20213 async fn on_one_way(
20214 handler: &mut ___H,
20215 ordinal: u64,
20216 flexibility: ::fidl_next::protocol::Flexibility,
20217 buffer: ___T::RecvBuffer,
20218 ) -> ::core::result::Result<
20219 (),
20220 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20221 > {
20222 match ordinal {
20223 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20224 }
20225 }
20226
20227 async fn on_two_way(
20228 handler: &mut ___H,
20229 ordinal: u64,
20230 flexibility: ::fidl_next::protocol::Flexibility,
20231 buffer: ___T::RecvBuffer,
20232 responder: ::fidl_next::protocol::Responder<___T>,
20233 ) -> ::core::result::Result<
20234 (),
20235 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20236 > {
20237 match ordinal {
20238 268639596268373415 => {
20239 let responder = ::fidl_next::Responder::from_untyped(responder);
20240
20241 handler.get_next(responder).await;
20242 Ok(())
20243 }
20244
20245 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20246 }
20247 }
20248}
20249
20250pub const FILE_PROTOCOL_NAME: &str = "fuchsia.io/File";
20251
20252#[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"]
20253pub const FLAG_TEMPORARY_AS_NOT_LINKABLE: crate::natural::Flags =
20254 crate::natural::Flags::FLAG_MUST_CREATE;
20255
20256#[doc = " The maximum I/O size that is allowed for read/write operations using\n byte vectors.\n"]
20257pub const MAX_TRANSFER_SIZE: u64 = 8192 as u64;
20258
20259#[derive(PartialEq, Debug)]
20261pub struct Readable;
20262
20263#[cfg(target_os = "fuchsia")]
20264impl ::fidl_next::HasTransport for Readable {
20265 type Transport = ::fidl_next::fuchsia::zx::Channel;
20266}
20267
20268pub mod readable {
20269 pub mod prelude {
20270 pub use crate::{Readable, ReadableClientHandler, ReadableServerHandler, readable};
20271
20272 pub use crate::natural::ReadableReadRequest;
20273
20274 pub use crate::natural::ReadableReadResponse;
20275 }
20276
20277 pub struct Read;
20278
20279 impl ::fidl_next::Method for Read {
20280 const ORDINAL: u64 = 395825947633028830;
20281 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
20282 ::fidl_next::protocol::Flexibility::Strict;
20283
20284 type Protocol = crate::Readable;
20285
20286 type Request = crate::wire::ReadableReadRequest;
20287 }
20288
20289 impl ::fidl_next::TwoWayMethod for Read {
20290 type Response = ::fidl_next::WireResult<
20291 'static,
20292 crate::wire::ReadableReadResponse<'static>,
20293 ::fidl_next::WireI32,
20294 >;
20295 }
20296
20297 impl<___R> ::fidl_next::Respond<___R> for Read {
20298 type Output = ::core::result::Result<
20299 crate::generic::ReadableReadResponse<___R>,
20300 ::fidl_next::util::Never,
20301 >;
20302
20303 fn respond(response: ___R) -> Self::Output {
20304 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
20305 }
20306 }
20307
20308 impl<___R> ::fidl_next::RespondErr<___R> for Read {
20309 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
20310
20311 fn respond_err(response: ___R) -> Self::Output {
20312 ::core::result::Result::Err(response)
20313 }
20314 }
20315
20316 mod ___detail {
20317 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Readable
20318 where
20319 ___T: ::fidl_next::Transport,
20320 {
20321 type Client = ReadableClient<___T>;
20322 type Server = ReadableServer<___T>;
20323 }
20324
20325 #[repr(transparent)]
20327 pub struct ReadableClient<___T: ::fidl_next::Transport> {
20328 #[allow(dead_code)]
20329 client: ::fidl_next::protocol::Client<___T>,
20330 }
20331
20332 impl<___T> ReadableClient<___T>
20333 where
20334 ___T: ::fidl_next::Transport,
20335 {
20336 #[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"]
20337 pub fn read(
20338 &self,
20339
20340 count: impl ::fidl_next::Encode<
20341 ::fidl_next::WireU64,
20342 <___T as ::fidl_next::Transport>::SendBuffer,
20343 >,
20344 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
20345 where
20346 <___T as ::fidl_next::Transport>::SendBuffer:
20347 ::fidl_next::encoder::InternalHandleEncoder,
20348 {
20349 self.read_with(crate::generic::ReadableReadRequest { count })
20350 }
20351
20352 #[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"]
20353 pub fn read_with<___R>(
20354 &self,
20355 request: ___R,
20356 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
20357 where
20358 ___R: ::fidl_next::Encode<
20359 crate::wire::ReadableReadRequest,
20360 <___T as ::fidl_next::Transport>::SendBuffer,
20361 >,
20362 {
20363 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
20364 395825947633028830,
20365 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
20366 request,
20367 ))
20368 }
20369 }
20370
20371 #[repr(transparent)]
20373 pub struct ReadableServer<___T: ::fidl_next::Transport> {
20374 server: ::fidl_next::protocol::Server<___T>,
20375 }
20376
20377 impl<___T> ReadableServer<___T> where ___T: ::fidl_next::Transport {}
20378 }
20379}
20380
20381pub trait ReadableClientHandler<
20385 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20386 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20387>
20388{
20389}
20390
20391impl<___T> ReadableClientHandler<___T> for ::fidl_next::IgnoreEvents where
20392 ___T: ::fidl_next::Transport
20393{
20394}
20395
20396impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Readable
20397where
20398 ___H: ReadableClientHandler<___T> + ::core::marker::Send,
20399 ___T: ::fidl_next::Transport,
20400{
20401 async fn on_event(
20402 handler: &mut ___H,
20403 ordinal: u64,
20404 flexibility: ::fidl_next::protocol::Flexibility,
20405 buffer: ___T::RecvBuffer,
20406 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20407 match ordinal {
20408 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20409 }
20410 }
20411}
20412
20413pub trait ReadableServerHandler<
20417 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20418 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20419>
20420{
20421 #[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"]
20422 fn read(
20423 &mut self,
20424
20425 request: ::fidl_next::Request<readable::Read, ___T>,
20426
20427 responder: ::fidl_next::Responder<readable::Read, ___T>,
20428 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20429}
20430
20431impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Readable
20432where
20433 ___H: ReadableServerHandler<___T> + ::core::marker::Send,
20434 ___T: ::fidl_next::Transport,
20435 <readable::Read as ::fidl_next::Method>::Request:
20436 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
20437{
20438 async fn on_one_way(
20439 handler: &mut ___H,
20440 ordinal: u64,
20441 flexibility: ::fidl_next::protocol::Flexibility,
20442 buffer: ___T::RecvBuffer,
20443 ) -> ::core::result::Result<
20444 (),
20445 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20446 > {
20447 match ordinal {
20448 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20449 }
20450 }
20451
20452 async fn on_two_way(
20453 handler: &mut ___H,
20454 ordinal: u64,
20455 flexibility: ::fidl_next::protocol::Flexibility,
20456 buffer: ___T::RecvBuffer,
20457 responder: ::fidl_next::protocol::Responder<___T>,
20458 ) -> ::core::result::Result<
20459 (),
20460 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20461 > {
20462 match ordinal {
20463 395825947633028830 => {
20464 let responder = ::fidl_next::Responder::from_untyped(responder);
20465
20466 match ::fidl_next::DecoderExt::decode(buffer) {
20467 Ok(decoded) => {
20468 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
20469 Ok(())
20470 }
20471 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20472 ordinal: 395825947633028830,
20473 error,
20474 }),
20475 }
20476 }
20477
20478 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20479 }
20480 }
20481}
20482
20483#[derive(PartialEq, Debug)]
20485pub struct Writable;
20486
20487#[cfg(target_os = "fuchsia")]
20488impl ::fidl_next::HasTransport for Writable {
20489 type Transport = ::fidl_next::fuchsia::zx::Channel;
20490}
20491
20492pub mod writable {
20493 pub mod prelude {
20494 pub use crate::{Writable, WritableClientHandler, WritableServerHandler, writable};
20495
20496 pub use crate::natural::WritableWriteRequest;
20497
20498 pub use crate::natural::WritableWriteResponse;
20499 }
20500
20501 pub struct Write;
20502
20503 impl ::fidl_next::Method for Write {
20504 const ORDINAL: u64 = 7651971425397809026;
20505 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
20506 ::fidl_next::protocol::Flexibility::Strict;
20507
20508 type Protocol = crate::Writable;
20509
20510 type Request = crate::wire::WritableWriteRequest<'static>;
20511 }
20512
20513 impl ::fidl_next::TwoWayMethod for Write {
20514 type Response = ::fidl_next::WireResult<
20515 'static,
20516 crate::wire::WritableWriteResponse,
20517 ::fidl_next::WireI32,
20518 >;
20519 }
20520
20521 impl<___R> ::fidl_next::Respond<___R> for Write {
20522 type Output = ::core::result::Result<
20523 crate::generic::WritableWriteResponse<___R>,
20524 ::fidl_next::util::Never,
20525 >;
20526
20527 fn respond(response: ___R) -> Self::Output {
20528 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
20529 actual_count: response,
20530 })
20531 }
20532 }
20533
20534 impl<___R> ::fidl_next::RespondErr<___R> for Write {
20535 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
20536
20537 fn respond_err(response: ___R) -> Self::Output {
20538 ::core::result::Result::Err(response)
20539 }
20540 }
20541
20542 mod ___detail {
20543 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Writable
20544 where
20545 ___T: ::fidl_next::Transport,
20546 {
20547 type Client = WritableClient<___T>;
20548 type Server = WritableServer<___T>;
20549 }
20550
20551 #[repr(transparent)]
20553 pub struct WritableClient<___T: ::fidl_next::Transport> {
20554 #[allow(dead_code)]
20555 client: ::fidl_next::protocol::Client<___T>,
20556 }
20557
20558 impl<___T> WritableClient<___T>
20559 where
20560 ___T: ::fidl_next::Transport,
20561 {
20562 #[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"]
20563 pub fn write(
20564 &self,
20565
20566 data: impl ::fidl_next::Encode<
20567 ::fidl_next::WireVector<'static, u8>,
20568 <___T as ::fidl_next::Transport>::SendBuffer,
20569 >,
20570 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
20571 where
20572 <___T as ::fidl_next::Transport>::SendBuffer:
20573 ::fidl_next::encoder::InternalHandleEncoder,
20574 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
20575 {
20576 self.write_with(crate::generic::WritableWriteRequest { data })
20577 }
20578
20579 #[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"]
20580 pub fn write_with<___R>(
20581 &self,
20582 request: ___R,
20583 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
20584 where
20585 ___R: ::fidl_next::Encode<
20586 crate::wire::WritableWriteRequest<'static>,
20587 <___T as ::fidl_next::Transport>::SendBuffer,
20588 >,
20589 {
20590 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
20591 7651971425397809026,
20592 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
20593 request,
20594 ))
20595 }
20596 }
20597
20598 #[repr(transparent)]
20600 pub struct WritableServer<___T: ::fidl_next::Transport> {
20601 server: ::fidl_next::protocol::Server<___T>,
20602 }
20603
20604 impl<___T> WritableServer<___T> where ___T: ::fidl_next::Transport {}
20605 }
20606}
20607
20608pub trait WritableClientHandler<
20612 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20613 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20614>
20615{
20616}
20617
20618impl<___T> WritableClientHandler<___T> for ::fidl_next::IgnoreEvents where
20619 ___T: ::fidl_next::Transport
20620{
20621}
20622
20623impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Writable
20624where
20625 ___H: WritableClientHandler<___T> + ::core::marker::Send,
20626 ___T: ::fidl_next::Transport,
20627{
20628 async fn on_event(
20629 handler: &mut ___H,
20630 ordinal: u64,
20631 flexibility: ::fidl_next::protocol::Flexibility,
20632 buffer: ___T::RecvBuffer,
20633 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20634 match ordinal {
20635 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20636 }
20637 }
20638}
20639
20640pub trait WritableServerHandler<
20644 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20645 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20646>
20647{
20648 #[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"]
20649 fn write(
20650 &mut self,
20651
20652 request: ::fidl_next::Request<writable::Write, ___T>,
20653
20654 responder: ::fidl_next::Responder<writable::Write, ___T>,
20655 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20656}
20657
20658impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Writable
20659where
20660 ___H: WritableServerHandler<___T> + ::core::marker::Send,
20661 ___T: ::fidl_next::Transport,
20662 <writable::Write as ::fidl_next::Method>::Request:
20663 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
20664{
20665 async fn on_one_way(
20666 handler: &mut ___H,
20667 ordinal: u64,
20668 flexibility: ::fidl_next::protocol::Flexibility,
20669 buffer: ___T::RecvBuffer,
20670 ) -> ::core::result::Result<
20671 (),
20672 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20673 > {
20674 match ordinal {
20675 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20676 }
20677 }
20678
20679 async fn on_two_way(
20680 handler: &mut ___H,
20681 ordinal: u64,
20682 flexibility: ::fidl_next::protocol::Flexibility,
20683 buffer: ___T::RecvBuffer,
20684 responder: ::fidl_next::protocol::Responder<___T>,
20685 ) -> ::core::result::Result<
20686 (),
20687 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20688 > {
20689 match ordinal {
20690 7651971425397809026 => {
20691 let responder = ::fidl_next::Responder::from_untyped(responder);
20692
20693 match ::fidl_next::DecoderExt::decode(buffer) {
20694 Ok(decoded) => {
20695 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
20696 Ok(())
20697 }
20698 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20699 ordinal: 7651971425397809026,
20700 error,
20701 }),
20702 }
20703 }
20704
20705 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
20706 }
20707 }
20708}
20709
20710pub const MAX_FS_NAME_BUFFER: u64 = 32 as u64;
20711
20712#[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"]
20713pub const INHERITED_WRITE_PERMISSIONS: crate::natural::Operations =
20714 crate::natural::Operations::from_bits_retain(356);
20715
20716#[doc = " Nodes which do not have ino values should return this value\n from Readdir and GetAttr.\n"]
20717pub const INO_UNKNOWN: u64 = 18446744073709551615 as u64;
20718
20719pub const MASK_KNOWN_PERMISSIONS: crate::natural::Flags =
20720 crate::natural::Flags::from_bits_retain(25087);
20721
20722pub const MASK_KNOWN_PROTOCOLS: crate::natural::Flags =
20723 crate::natural::Flags::from_bits_retain(30069489664);
20724
20725pub const MASK_PERMISSION_FLAGS: u64 = 65535 as u64;
20726
20727pub const MASK_POSIX_FLAGS: u64 = 4294967295 as u64;
20728
20729#[doc = " The maximum length, in bytes, of a single filesystem component.\n"]
20730pub const MAX_FILENAME: u64 = 255 as u64;
20731
20732pub const NODE_PROTOCOL_NAME: &str = "fuchsia.io/Node";
20733
20734#[doc = " Flags used when opening a node reference must fall within this mask.\n"]
20735pub const OPEN_FLAGS_ALLOWED_WITH_NODE_REFERENCE: crate::natural::OpenFlags =
20736 crate::natural::OpenFlags::from_bits_retain(46661632);
20737
20738#[doc = " All known rights.\n"]
20739pub const OPEN_RIGHTS: crate::natural::OpenFlags = crate::natural::OpenFlags::from_bits_retain(11);
20740
20741#[doc = " Set of permissions that are expected when opening a node as executable.\n"]
20742pub const PERM_EXECUTABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(201);
20743
20744#[doc = " Set of permissions that are expected when opening a node as readable.\n"]
20745pub const PERM_READABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(211);
20746
20747#[doc = " Set of permissions that are expected when opening a node as writable.\n"]
20748pub const PERM_WRITABLE: crate::natural::Flags = crate::natural::Flags::from_bits_retain(485);
20749
20750#[doc = " Alias for directory permission alias rw*\n"]
20751pub const RW_STAR_DIR: crate::natural::Operations =
20752 crate::natural::Operations::from_bits_retain(503);
20753
20754#[doc = " Alias for directory permission alias rx*\n"]
20755pub const RX_STAR_DIR: crate::natural::Operations =
20756 crate::natural::Operations::from_bits_retain(219);
20757
20758#[doc = " Alias for directory permission alias r*\n"]
20759pub const R_STAR_DIR: crate::natural::Operations =
20760 crate::natural::Operations::from_bits_retain(211);
20761
20762#[doc = " The name of the extended attribute accessible via the SELinux context attribute.\n"]
20763pub const SELINUX_CONTEXT_NAME: &str = "security.selinux";
20764
20765pub const SYMLINK_PROTOCOL_NAME: &str = "fuchsia.io/Symlink";
20766
20767#[doc = " Alias for directory permission alias w*\n"]
20768pub const W_STAR_DIR: crate::natural::Operations =
20769 crate::natural::Operations::from_bits_retain(485);
20770
20771#[doc = " Alias for directory permission alias x*\n"]
20772pub const X_STAR_DIR: crate::natural::Operations =
20773 crate::natural::Operations::from_bits_retain(201);
20774
20775pub mod compat {
20777
20778 impl ::fidl_next::CompatFrom<crate::Operations> for ::fidl_fuchsia_io::Operations {
20779 fn compat_from(value: crate::Operations) -> Self {
20780 Self::from_bits_retain(value.bits())
20781 }
20782 }
20783
20784 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Operations> for crate::Operations {
20785 fn compat_from(value: ::fidl_fuchsia_io::Operations) -> Self {
20786 Self::from_bits_retain(value.bits())
20787 }
20788 }
20789
20790 impl ::fidl_next::CompatFrom<crate::SeekOrigin> for ::fidl_fuchsia_io::SeekOrigin {
20791 fn compat_from(value: crate::SeekOrigin) -> Self {
20792 match value {
20793 crate::SeekOrigin::Start => Self::Start,
20794
20795 crate::SeekOrigin::Current => Self::Current,
20796
20797 crate::SeekOrigin::End => Self::End,
20798 }
20799 }
20800 }
20801
20802 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SeekOrigin> for crate::SeekOrigin {
20803 fn compat_from(value: ::fidl_fuchsia_io::SeekOrigin) -> Self {
20804 match value {
20805 ::fidl_fuchsia_io::SeekOrigin::Start => Self::Start,
20806
20807 ::fidl_fuchsia_io::SeekOrigin::Current => Self::Current,
20808
20809 ::fidl_fuchsia_io::SeekOrigin::End => Self::End,
20810 }
20811 }
20812 }
20813
20814 impl ::fidl_next::CompatFrom<crate::AdvisoryLockRange> for ::fidl_fuchsia_io::AdvisoryLockRange {
20815 #[inline]
20816 fn compat_from(value: crate::AdvisoryLockRange) -> Self {
20817 Self {
20818 origin: ::fidl_next::CompatFrom::compat_from(value.origin),
20819
20820 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
20821
20822 length: ::fidl_next::CompatFrom::compat_from(value.length),
20823 }
20824 }
20825 }
20826
20827 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockRange> for crate::AdvisoryLockRange {
20828 #[inline]
20829 fn compat_from(value: ::fidl_fuchsia_io::AdvisoryLockRange) -> Self {
20830 Self {
20831 origin: ::fidl_next::CompatFrom::compat_from(value.origin),
20832
20833 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
20834
20835 length: ::fidl_next::CompatFrom::compat_from(value.length),
20836 }
20837 }
20838 }
20839
20840 impl ::fidl_next::CompatFrom<crate::AdvisoryLockType> for ::fidl_fuchsia_io::AdvisoryLockType {
20841 fn compat_from(value: crate::AdvisoryLockType) -> Self {
20842 match value {
20843 crate::AdvisoryLockType::Read => Self::Read,
20844
20845 crate::AdvisoryLockType::Write => Self::Write,
20846
20847 crate::AdvisoryLockType::Unlock => Self::Unlock,
20848 }
20849 }
20850 }
20851
20852 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockType> for crate::AdvisoryLockType {
20853 fn compat_from(value: ::fidl_fuchsia_io::AdvisoryLockType) -> Self {
20854 match value {
20855 ::fidl_fuchsia_io::AdvisoryLockType::Read => Self::Read,
20856
20857 ::fidl_fuchsia_io::AdvisoryLockType::Write => Self::Write,
20858
20859 ::fidl_fuchsia_io::AdvisoryLockType::Unlock => Self::Unlock,
20860 }
20861 }
20862 }
20863
20864 impl ::fidl_next::CompatFrom<crate::AdvisoryLockRequest>
20865 for ::fidl_fuchsia_io::AdvisoryLockRequest
20866 {
20867 fn compat_from(value: crate::AdvisoryLockRequest) -> Self {
20868 Self {
20869 type_: ::fidl_next::CompatFrom::compat_from(value.type_),
20870
20871 range: ::fidl_next::CompatFrom::compat_from(value.range),
20872
20873 wait: ::fidl_next::CompatFrom::compat_from(value.wait),
20874
20875 __source_breaking: ::fidl::marker::SourceBreaking,
20876 }
20877 }
20878 }
20879
20880 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockRequest>
20881 for crate::AdvisoryLockRequest
20882 {
20883 fn compat_from(value: ::fidl_fuchsia_io::AdvisoryLockRequest) -> Self {
20884 Self {
20885 type_: ::fidl_next::CompatFrom::compat_from(value.type_),
20886
20887 range: ::fidl_next::CompatFrom::compat_from(value.range),
20888
20889 wait: ::fidl_next::CompatFrom::compat_from(value.wait),
20890 }
20891 }
20892 }
20893
20894 impl ::fidl_next::CompatFrom<crate::AdvisoryLockingAdvisoryLockRequest>
20895 for ::fidl_fuchsia_io::AdvisoryLockingAdvisoryLockRequest
20896 {
20897 #[inline]
20898 fn compat_from(value: crate::AdvisoryLockingAdvisoryLockRequest) -> Self {
20899 Self { request: ::fidl_next::CompatFrom::compat_from(value.request) }
20900 }
20901 }
20902
20903 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockingAdvisoryLockRequest>
20904 for crate::AdvisoryLockingAdvisoryLockRequest
20905 {
20906 #[inline]
20907 fn compat_from(value: ::fidl_fuchsia_io::AdvisoryLockingAdvisoryLockRequest) -> Self {
20908 Self { request: ::fidl_next::CompatFrom::compat_from(value.request) }
20909 }
20910 }
20911
20912 #[cfg(target_os = "fuchsia")]
20913 pub type AdvisoryLockingProxy = ::fidl_next::Client<crate::AdvisoryLocking>;
20916
20917 impl ::fidl_next::CompatFrom<crate::AdvisoryLocking> for ::fidl_fuchsia_io::AdvisoryLockingMarker {
20918 fn compat_from(_: crate::AdvisoryLocking) -> Self {
20919 Self
20920 }
20921 }
20922
20923 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AdvisoryLockingMarker> for crate::AdvisoryLocking {
20924 fn compat_from(_: ::fidl_fuchsia_io::AdvisoryLockingMarker) -> Self {
20925 Self
20926 }
20927 }
20928
20929 #[cfg(target_os = "fuchsia")]
20930
20931 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::AdvisoryLockingProxy>
20932 for crate::AdvisoryLocking
20933 {
20934 fn client_compat_from(
20935 proxy: ::fidl_fuchsia_io::AdvisoryLockingProxy,
20936 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
20937 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
20938 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
20939 ::fidl_next::ClientDispatcher::new(client_end)
20940 }
20941 }
20942
20943 impl ::fidl_next::CompatFrom<crate::AllocateMode> for ::fidl_fuchsia_io::AllocateMode {
20944 fn compat_from(value: crate::AllocateMode) -> Self {
20945 Self::from_bits_retain(value.bits())
20946 }
20947 }
20948
20949 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::AllocateMode> for crate::AllocateMode {
20950 fn compat_from(value: ::fidl_fuchsia_io::AllocateMode) -> Self {
20951 Self::from_bits_retain(value.bits())
20952 }
20953 }
20954
20955 impl ::fidl_next::CompatFrom<crate::OpenFlags> for ::fidl_fuchsia_io::OpenFlags {
20956 fn compat_from(value: crate::OpenFlags) -> Self {
20957 Self::from_bits_retain(value.bits())
20958 }
20959 }
20960
20961 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::OpenFlags> for crate::OpenFlags {
20962 fn compat_from(value: ::fidl_fuchsia_io::OpenFlags) -> Self {
20963 Self::from_bits_retain(value.bits())
20964 }
20965 }
20966
20967 impl ::fidl_next::CompatFrom<crate::NodeAttributes> for ::fidl_fuchsia_io::NodeAttributes {
20968 #[inline]
20969 fn compat_from(value: crate::NodeAttributes) -> Self {
20970 Self {
20971 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
20972
20973 id: ::fidl_next::CompatFrom::compat_from(value.id),
20974
20975 content_size: ::fidl_next::CompatFrom::compat_from(value.content_size),
20976
20977 storage_size: ::fidl_next::CompatFrom::compat_from(value.storage_size),
20978
20979 link_count: ::fidl_next::CompatFrom::compat_from(value.link_count),
20980
20981 creation_time: ::fidl_next::CompatFrom::compat_from(value.creation_time),
20982
20983 modification_time: ::fidl_next::CompatFrom::compat_from(value.modification_time),
20984 }
20985 }
20986 }
20987
20988 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeAttributes> for crate::NodeAttributes {
20989 #[inline]
20990 fn compat_from(value: ::fidl_fuchsia_io::NodeAttributes) -> Self {
20991 Self {
20992 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
20993
20994 id: ::fidl_next::CompatFrom::compat_from(value.id),
20995
20996 content_size: ::fidl_next::CompatFrom::compat_from(value.content_size),
20997
20998 storage_size: ::fidl_next::CompatFrom::compat_from(value.storage_size),
20999
21000 link_count: ::fidl_next::CompatFrom::compat_from(value.link_count),
21001
21002 creation_time: ::fidl_next::CompatFrom::compat_from(value.creation_time),
21003
21004 modification_time: ::fidl_next::CompatFrom::compat_from(value.modification_time),
21005 }
21006 }
21007 }
21008
21009 impl ::fidl_next::CompatFrom<crate::NodeAttributeFlags> for ::fidl_fuchsia_io::NodeAttributeFlags {
21010 fn compat_from(value: crate::NodeAttributeFlags) -> Self {
21011 Self::from_bits_retain(value.bits())
21012 }
21013 }
21014
21015 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeAttributeFlags> for crate::NodeAttributeFlags {
21016 fn compat_from(value: ::fidl_fuchsia_io::NodeAttributeFlags) -> Self {
21017 Self::from_bits_retain(value.bits())
21018 }
21019 }
21020
21021 impl ::fidl_next::CompatFrom<crate::NodeQueryFilesystemResponse>
21022 for ::fidl_fuchsia_io::NodeQueryFilesystemResponse
21023 {
21024 #[inline]
21025 fn compat_from(value: crate::NodeQueryFilesystemResponse) -> Self {
21026 Self {
21027 s: ::fidl_next::CompatFrom::compat_from(value.s),
21028
21029 info: ::fidl_next::CompatFrom::compat_from(value.info),
21030 }
21031 }
21032 }
21033
21034 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeQueryFilesystemResponse>
21035 for crate::NodeQueryFilesystemResponse
21036 {
21037 #[inline]
21038 fn compat_from(value: ::fidl_fuchsia_io::NodeQueryFilesystemResponse) -> Self {
21039 Self {
21040 s: ::fidl_next::CompatFrom::compat_from(value.s),
21041
21042 info: ::fidl_next::CompatFrom::compat_from(value.info),
21043 }
21044 }
21045 }
21046
21047 impl ::fidl_next::CompatFrom<crate::ModeType> for ::fidl_fuchsia_io::ModeType {
21048 fn compat_from(value: crate::ModeType) -> Self {
21049 Self::from_bits_retain(value.bits())
21050 }
21051 }
21052
21053 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ModeType> for crate::ModeType {
21054 fn compat_from(value: ::fidl_fuchsia_io::ModeType) -> Self {
21055 Self::from_bits_retain(value.bits())
21056 }
21057 }
21058
21059 impl ::fidl_next::CompatFrom<crate::DirectoryReadDirentsRequest>
21060 for ::fidl_fuchsia_io::DirectoryReadDirentsRequest
21061 {
21062 #[inline]
21063 fn compat_from(value: crate::DirectoryReadDirentsRequest) -> Self {
21064 Self { max_bytes: ::fidl_next::CompatFrom::compat_from(value.max_bytes) }
21065 }
21066 }
21067
21068 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryReadDirentsRequest>
21069 for crate::DirectoryReadDirentsRequest
21070 {
21071 #[inline]
21072 fn compat_from(value: ::fidl_fuchsia_io::DirectoryReadDirentsRequest) -> Self {
21073 Self { max_bytes: ::fidl_next::CompatFrom::compat_from(value.max_bytes) }
21074 }
21075 }
21076
21077 impl ::fidl_next::CompatFrom<crate::DirectoryReadDirentsResponse>
21078 for ::fidl_fuchsia_io::DirectoryReadDirentsResponse
21079 {
21080 #[inline]
21081 fn compat_from(value: crate::DirectoryReadDirentsResponse) -> Self {
21082 Self {
21083 s: ::fidl_next::CompatFrom::compat_from(value.s),
21084
21085 dirents: ::fidl_next::CompatFrom::compat_from(value.dirents),
21086 }
21087 }
21088 }
21089
21090 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryReadDirentsResponse>
21091 for crate::DirectoryReadDirentsResponse
21092 {
21093 #[inline]
21094 fn compat_from(value: ::fidl_fuchsia_io::DirectoryReadDirentsResponse) -> Self {
21095 Self {
21096 s: ::fidl_next::CompatFrom::compat_from(value.s),
21097
21098 dirents: ::fidl_next::CompatFrom::compat_from(value.dirents),
21099 }
21100 }
21101 }
21102
21103 impl ::fidl_next::CompatFrom<crate::DirectoryRewindResponse>
21104 for ::fidl_fuchsia_io::DirectoryRewindResponse
21105 {
21106 #[inline]
21107 fn compat_from(value: crate::DirectoryRewindResponse) -> Self {
21108 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21109 }
21110 }
21111
21112 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryRewindResponse>
21113 for crate::DirectoryRewindResponse
21114 {
21115 #[inline]
21116 fn compat_from(value: ::fidl_fuchsia_io::DirectoryRewindResponse) -> Self {
21117 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21118 }
21119 }
21120
21121 impl ::fidl_next::CompatFrom<crate::DirectoryLinkResponse>
21122 for ::fidl_fuchsia_io::DirectoryLinkResponse
21123 {
21124 #[inline]
21125 fn compat_from(value: crate::DirectoryLinkResponse) -> Self {
21126 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21127 }
21128 }
21129
21130 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryLinkResponse>
21131 for crate::DirectoryLinkResponse
21132 {
21133 #[inline]
21134 fn compat_from(value: ::fidl_fuchsia_io::DirectoryLinkResponse) -> Self {
21135 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21136 }
21137 }
21138
21139 impl ::fidl_next::CompatFrom<crate::UnlinkFlags> for ::fidl_fuchsia_io::UnlinkFlags {
21140 fn compat_from(value: crate::UnlinkFlags) -> Self {
21141 Self::from_bits_retain(value.bits())
21142 }
21143 }
21144
21145 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::UnlinkFlags> for crate::UnlinkFlags {
21146 fn compat_from(value: ::fidl_fuchsia_io::UnlinkFlags) -> Self {
21147 Self::from_bits_retain(value.bits())
21148 }
21149 }
21150
21151 impl ::fidl_next::CompatFrom<crate::UnlinkOptions> for ::fidl_fuchsia_io::UnlinkOptions {
21152 fn compat_from(value: crate::UnlinkOptions) -> Self {
21153 Self {
21154 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21155
21156 __source_breaking: ::fidl::marker::SourceBreaking,
21157 }
21158 }
21159 }
21160
21161 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::UnlinkOptions> for crate::UnlinkOptions {
21162 fn compat_from(value: ::fidl_fuchsia_io::UnlinkOptions) -> Self {
21163 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21164 }
21165 }
21166
21167 impl ::fidl_next::CompatFrom<crate::DirectoryUnlinkRequest>
21168 for ::fidl_fuchsia_io::DirectoryUnlinkRequest
21169 {
21170 #[inline]
21171 fn compat_from(value: crate::DirectoryUnlinkRequest) -> Self {
21172 Self {
21173 name: ::fidl_next::CompatFrom::compat_from(value.name),
21174
21175 options: ::fidl_next::CompatFrom::compat_from(value.options),
21176 }
21177 }
21178 }
21179
21180 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryUnlinkRequest>
21181 for crate::DirectoryUnlinkRequest
21182 {
21183 #[inline]
21184 fn compat_from(value: ::fidl_fuchsia_io::DirectoryUnlinkRequest) -> Self {
21185 Self {
21186 name: ::fidl_next::CompatFrom::compat_from(value.name),
21187
21188 options: ::fidl_next::CompatFrom::compat_from(value.options),
21189 }
21190 }
21191 }
21192
21193 impl ::fidl_next::CompatFrom<crate::WatchMask> for ::fidl_fuchsia_io::WatchMask {
21194 fn compat_from(value: crate::WatchMask) -> Self {
21195 Self::from_bits_retain(value.bits())
21196 }
21197 }
21198
21199 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WatchMask> for crate::WatchMask {
21200 fn compat_from(value: ::fidl_fuchsia_io::WatchMask) -> Self {
21201 Self::from_bits_retain(value.bits())
21202 }
21203 }
21204
21205 impl ::fidl_next::CompatFrom<crate::DirectoryWatchResponse>
21206 for ::fidl_fuchsia_io::DirectoryWatchResponse
21207 {
21208 #[inline]
21209 fn compat_from(value: crate::DirectoryWatchResponse) -> Self {
21210 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21211 }
21212 }
21213
21214 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryWatchResponse>
21215 for crate::DirectoryWatchResponse
21216 {
21217 #[inline]
21218 fn compat_from(value: ::fidl_fuchsia_io::DirectoryWatchResponse) -> Self {
21219 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21220 }
21221 }
21222
21223 impl ::fidl_next::CompatFrom<crate::NodeGetExtendedAttributeRequest>
21224 for ::fidl_fuchsia_io::NodeGetExtendedAttributeRequest
21225 {
21226 #[inline]
21227 fn compat_from(value: crate::NodeGetExtendedAttributeRequest) -> Self {
21228 Self { name: ::fidl_next::CompatFrom::compat_from(value.name) }
21229 }
21230 }
21231
21232 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeGetExtendedAttributeRequest>
21233 for crate::NodeGetExtendedAttributeRequest
21234 {
21235 #[inline]
21236 fn compat_from(value: ::fidl_fuchsia_io::NodeGetExtendedAttributeRequest) -> Self {
21237 Self { name: ::fidl_next::CompatFrom::compat_from(value.name) }
21238 }
21239 }
21240
21241 impl ::fidl_next::CompatFrom<crate::SetExtendedAttributeMode>
21242 for ::fidl_fuchsia_io::SetExtendedAttributeMode
21243 {
21244 fn compat_from(value: crate::SetExtendedAttributeMode) -> Self {
21245 match value {
21246 crate::SetExtendedAttributeMode::Set => Self::Set,
21247
21248 crate::SetExtendedAttributeMode::Create => Self::Create,
21249
21250 crate::SetExtendedAttributeMode::Replace => Self::Replace,
21251 }
21252 }
21253 }
21254
21255 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SetExtendedAttributeMode>
21256 for crate::SetExtendedAttributeMode
21257 {
21258 fn compat_from(value: ::fidl_fuchsia_io::SetExtendedAttributeMode) -> Self {
21259 match value {
21260 ::fidl_fuchsia_io::SetExtendedAttributeMode::Set => Self::Set,
21261
21262 ::fidl_fuchsia_io::SetExtendedAttributeMode::Create => Self::Create,
21263
21264 ::fidl_fuchsia_io::SetExtendedAttributeMode::Replace => Self::Replace,
21265 }
21266 }
21267 }
21268
21269 impl ::fidl_next::CompatFrom<crate::NodeRemoveExtendedAttributeRequest>
21270 for ::fidl_fuchsia_io::NodeRemoveExtendedAttributeRequest
21271 {
21272 #[inline]
21273 fn compat_from(value: crate::NodeRemoveExtendedAttributeRequest) -> Self {
21274 Self { name: ::fidl_next::CompatFrom::compat_from(value.name) }
21275 }
21276 }
21277
21278 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeRemoveExtendedAttributeRequest>
21279 for crate::NodeRemoveExtendedAttributeRequest
21280 {
21281 #[inline]
21282 fn compat_from(value: ::fidl_fuchsia_io::NodeRemoveExtendedAttributeRequest) -> Self {
21283 Self { name: ::fidl_next::CompatFrom::compat_from(value.name) }
21284 }
21285 }
21286
21287 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedGetAttrResponse>
21288 for ::fidl_fuchsia_io::NodeDeprecatedGetAttrResponse
21289 {
21290 #[inline]
21291 fn compat_from(value: crate::NodeDeprecatedGetAttrResponse) -> Self {
21292 Self {
21293 s: ::fidl_next::CompatFrom::compat_from(value.s),
21294
21295 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21296 }
21297 }
21298 }
21299
21300 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedGetAttrResponse>
21301 for crate::NodeDeprecatedGetAttrResponse
21302 {
21303 #[inline]
21304 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedGetAttrResponse) -> Self {
21305 Self {
21306 s: ::fidl_next::CompatFrom::compat_from(value.s),
21307
21308 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21309 }
21310 }
21311 }
21312
21313 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedSetAttrRequest>
21314 for ::fidl_fuchsia_io::NodeDeprecatedSetAttrRequest
21315 {
21316 #[inline]
21317 fn compat_from(value: crate::NodeDeprecatedSetAttrRequest) -> Self {
21318 Self {
21319 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21320
21321 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21322 }
21323 }
21324 }
21325
21326 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedSetAttrRequest>
21327 for crate::NodeDeprecatedSetAttrRequest
21328 {
21329 #[inline]
21330 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedSetAttrRequest) -> Self {
21331 Self {
21332 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21333
21334 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21335 }
21336 }
21337 }
21338
21339 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedSetAttrResponse>
21340 for ::fidl_fuchsia_io::NodeDeprecatedSetAttrResponse
21341 {
21342 #[inline]
21343 fn compat_from(value: crate::NodeDeprecatedSetAttrResponse) -> Self {
21344 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21345 }
21346 }
21347
21348 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedSetAttrResponse>
21349 for crate::NodeDeprecatedSetAttrResponse
21350 {
21351 #[inline]
21352 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedSetAttrResponse) -> Self {
21353 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21354 }
21355 }
21356
21357 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedGetFlagsResponse>
21358 for ::fidl_fuchsia_io::NodeDeprecatedGetFlagsResponse
21359 {
21360 #[inline]
21361 fn compat_from(value: crate::NodeDeprecatedGetFlagsResponse) -> Self {
21362 Self {
21363 s: ::fidl_next::CompatFrom::compat_from(value.s),
21364
21365 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21366 }
21367 }
21368 }
21369
21370 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedGetFlagsResponse>
21371 for crate::NodeDeprecatedGetFlagsResponse
21372 {
21373 #[inline]
21374 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedGetFlagsResponse) -> Self {
21375 Self {
21376 s: ::fidl_next::CompatFrom::compat_from(value.s),
21377
21378 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
21379 }
21380 }
21381 }
21382
21383 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedSetFlagsRequest>
21384 for ::fidl_fuchsia_io::NodeDeprecatedSetFlagsRequest
21385 {
21386 #[inline]
21387 fn compat_from(value: crate::NodeDeprecatedSetFlagsRequest) -> Self {
21388 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21389 }
21390 }
21391
21392 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedSetFlagsRequest>
21393 for crate::NodeDeprecatedSetFlagsRequest
21394 {
21395 #[inline]
21396 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedSetFlagsRequest) -> Self {
21397 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21398 }
21399 }
21400
21401 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedSetFlagsResponse>
21402 for ::fidl_fuchsia_io::NodeDeprecatedSetFlagsResponse
21403 {
21404 #[inline]
21405 fn compat_from(value: crate::NodeDeprecatedSetFlagsResponse) -> Self {
21406 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21407 }
21408 }
21409
21410 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedSetFlagsResponse>
21411 for crate::NodeDeprecatedSetFlagsResponse
21412 {
21413 #[inline]
21414 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedSetFlagsResponse) -> Self {
21415 Self { s: ::fidl_next::CompatFrom::compat_from(value.s) }
21416 }
21417 }
21418
21419 impl ::fidl_next::CompatFrom<crate::Flags> for ::fidl_fuchsia_io::Flags {
21420 fn compat_from(value: crate::Flags) -> Self {
21421 Self::from_bits_retain(value.bits())
21422 }
21423 }
21424
21425 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Flags> for crate::Flags {
21426 fn compat_from(value: ::fidl_fuchsia_io::Flags) -> Self {
21427 Self::from_bits_retain(value.bits())
21428 }
21429 }
21430
21431 impl ::fidl_next::CompatFrom<crate::NodeGetFlagsResponse>
21432 for ::fidl_fuchsia_io::NodeGetFlagsResponse
21433 {
21434 #[inline]
21435 fn compat_from(value: crate::NodeGetFlagsResponse) -> Self {
21436 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21437 }
21438 }
21439
21440 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeGetFlagsResponse>
21441 for crate::NodeGetFlagsResponse
21442 {
21443 #[inline]
21444 fn compat_from(value: ::fidl_fuchsia_io::NodeGetFlagsResponse) -> Self {
21445 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21446 }
21447 }
21448
21449 impl ::fidl_next::CompatFrom<crate::NodeSetFlagsRequest>
21450 for ::fidl_fuchsia_io::NodeSetFlagsRequest
21451 {
21452 #[inline]
21453 fn compat_from(value: crate::NodeSetFlagsRequest) -> Self {
21454 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21455 }
21456 }
21457
21458 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeSetFlagsRequest>
21459 for crate::NodeSetFlagsRequest
21460 {
21461 #[inline]
21462 fn compat_from(value: ::fidl_fuchsia_io::NodeSetFlagsRequest) -> Self {
21463 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
21464 }
21465 }
21466
21467 impl ::fidl_next::CompatFrom<crate::EmptyStruct> for ::fidl_fuchsia_io::EmptyStruct {
21468 #[inline]
21469 fn compat_from(value: crate::EmptyStruct) -> Self {
21470 Self {}
21471 }
21472 }
21473
21474 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::EmptyStruct> for crate::EmptyStruct {
21475 #[inline]
21476 fn compat_from(value: ::fidl_fuchsia_io::EmptyStruct) -> Self {
21477 Self {}
21478 }
21479 }
21480
21481 impl ::fidl_next::CompatFrom<crate::SelinuxContext> for ::fidl_fuchsia_io::SelinuxContext {
21482 fn compat_from(value: crate::SelinuxContext) -> Self {
21483 match value {
21484 crate::SelinuxContext::Data(value) => {
21485 Self::Data(::fidl_next::CompatFrom::compat_from(value))
21486 }
21487
21488 crate::SelinuxContext::UseExtendedAttributes(value) => {
21489 Self::UseExtendedAttributes(::fidl_next::CompatFrom::compat_from(value))
21490 }
21491
21492 crate::SelinuxContext::UnknownOrdinal_(unknown_ordinal) => {
21493 Self::__SourceBreaking { unknown_ordinal }
21494 }
21495 }
21496 }
21497 }
21498
21499 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SelinuxContext> for crate::SelinuxContext {
21500 fn compat_from(value: ::fidl_fuchsia_io::SelinuxContext) -> Self {
21501 match value {
21502 ::fidl_fuchsia_io::SelinuxContext::Data(value) => {
21503 Self::Data(::fidl_next::CompatFrom::compat_from(value))
21504 }
21505
21506 ::fidl_fuchsia_io::SelinuxContext::UseExtendedAttributes(value) => {
21507 Self::UseExtendedAttributes(::fidl_next::CompatFrom::compat_from(value))
21508 }
21509
21510 ::fidl_fuchsia_io::SelinuxContext::__SourceBreaking { unknown_ordinal } => {
21511 Self::UnknownOrdinal_(unknown_ordinal)
21512 }
21513 }
21514 }
21515 }
21516
21517 impl ::fidl_next::CompatFrom<crate::MutableNodeAttributes>
21518 for ::fidl_fuchsia_io::MutableNodeAttributes
21519 {
21520 fn compat_from(value: crate::MutableNodeAttributes) -> Self {
21521 Self {
21522 creation_time: ::fidl_next::CompatFrom::compat_from(value.creation_time),
21523
21524 modification_time: ::fidl_next::CompatFrom::compat_from(value.modification_time),
21525
21526 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
21527
21528 uid: ::fidl_next::CompatFrom::compat_from(value.uid),
21529
21530 gid: ::fidl_next::CompatFrom::compat_from(value.gid),
21531
21532 rdev: ::fidl_next::CompatFrom::compat_from(value.rdev),
21533
21534 access_time: ::fidl_next::CompatFrom::compat_from(value.access_time),
21535
21536 casefold: ::fidl_next::CompatFrom::compat_from(value.casefold),
21537
21538 selinux_context: ::fidl_next::CompatFrom::compat_from(value.selinux_context),
21539
21540 wrapping_key_id: ::fidl_next::CompatFrom::compat_from(value.wrapping_key_id),
21541
21542 __source_breaking: ::fidl::marker::SourceBreaking,
21543 }
21544 }
21545 }
21546
21547 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::MutableNodeAttributes>
21548 for crate::MutableNodeAttributes
21549 {
21550 fn compat_from(value: ::fidl_fuchsia_io::MutableNodeAttributes) -> Self {
21551 Self {
21552 creation_time: ::fidl_next::CompatFrom::compat_from(value.creation_time),
21553
21554 modification_time: ::fidl_next::CompatFrom::compat_from(value.modification_time),
21555
21556 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
21557
21558 uid: ::fidl_next::CompatFrom::compat_from(value.uid),
21559
21560 gid: ::fidl_next::CompatFrom::compat_from(value.gid),
21561
21562 rdev: ::fidl_next::CompatFrom::compat_from(value.rdev),
21563
21564 access_time: ::fidl_next::CompatFrom::compat_from(value.access_time),
21565
21566 casefold: ::fidl_next::CompatFrom::compat_from(value.casefold),
21567
21568 selinux_context: ::fidl_next::CompatFrom::compat_from(value.selinux_context),
21569
21570 wrapping_key_id: ::fidl_next::CompatFrom::compat_from(value.wrapping_key_id),
21571 }
21572 }
21573 }
21574
21575 impl ::fidl_next::CompatFrom<crate::NodeProtocolKinds> for ::fidl_fuchsia_io::NodeProtocolKinds {
21576 fn compat_from(value: crate::NodeProtocolKinds) -> Self {
21577 Self::from_bits_retain(value.bits())
21578 }
21579 }
21580
21581 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeProtocolKinds> for crate::NodeProtocolKinds {
21582 fn compat_from(value: ::fidl_fuchsia_io::NodeProtocolKinds) -> Self {
21583 Self::from_bits_retain(value.bits())
21584 }
21585 }
21586
21587 impl ::fidl_next::CompatFrom<crate::HashAlgorithm> for ::fidl_fuchsia_io::HashAlgorithm {
21588 fn compat_from(value: crate::HashAlgorithm) -> Self {
21589 match value {
21590 crate::HashAlgorithm::Sha256 => Self::Sha256,
21591
21592 crate::HashAlgorithm::Sha512 => Self::Sha512,
21593
21594 crate::HashAlgorithm::UnknownOrdinal_(unknown_ordinal) => {
21595 Self::__SourceBreaking { unknown_ordinal }
21596 }
21597 }
21598 }
21599 }
21600
21601 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::HashAlgorithm> for crate::HashAlgorithm {
21602 fn compat_from(value: ::fidl_fuchsia_io::HashAlgorithm) -> Self {
21603 match value {
21604 ::fidl_fuchsia_io::HashAlgorithm::Sha256 => Self::Sha256,
21605
21606 ::fidl_fuchsia_io::HashAlgorithm::Sha512 => Self::Sha512,
21607
21608 ::fidl_fuchsia_io::HashAlgorithm::__SourceBreaking { unknown_ordinal: value } => {
21609 Self::UnknownOrdinal_(value)
21610 }
21611 }
21612 }
21613 }
21614
21615 impl ::fidl_next::CompatFrom<crate::VerificationOptions>
21616 for ::fidl_fuchsia_io::VerificationOptions
21617 {
21618 fn compat_from(value: crate::VerificationOptions) -> Self {
21619 Self {
21620 hash_algorithm: ::fidl_next::CompatFrom::compat_from(value.hash_algorithm),
21621
21622 salt: ::fidl_next::CompatFrom::compat_from(value.salt),
21623
21624 __source_breaking: ::fidl::marker::SourceBreaking,
21625 }
21626 }
21627 }
21628
21629 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::VerificationOptions>
21630 for crate::VerificationOptions
21631 {
21632 fn compat_from(value: ::fidl_fuchsia_io::VerificationOptions) -> Self {
21633 Self {
21634 hash_algorithm: ::fidl_next::CompatFrom::compat_from(value.hash_algorithm),
21635
21636 salt: ::fidl_next::CompatFrom::compat_from(value.salt),
21637 }
21638 }
21639 }
21640
21641 impl ::fidl_next::CompatFrom<crate::ImmutableNodeAttributes>
21642 for ::fidl_fuchsia_io::ImmutableNodeAttributes
21643 {
21644 fn compat_from(value: crate::ImmutableNodeAttributes) -> Self {
21645 Self {
21646 protocols: ::fidl_next::CompatFrom::compat_from(value.protocols),
21647
21648 abilities: ::fidl_next::CompatFrom::compat_from(value.abilities),
21649
21650 content_size: ::fidl_next::CompatFrom::compat_from(value.content_size),
21651
21652 storage_size: ::fidl_next::CompatFrom::compat_from(value.storage_size),
21653
21654 link_count: ::fidl_next::CompatFrom::compat_from(value.link_count),
21655
21656 id: ::fidl_next::CompatFrom::compat_from(value.id),
21657
21658 change_time: ::fidl_next::CompatFrom::compat_from(value.change_time),
21659
21660 options: ::fidl_next::CompatFrom::compat_from(value.options),
21661
21662 root_hash: ::fidl_next::CompatFrom::compat_from(value.root_hash),
21663
21664 verity_enabled: ::fidl_next::CompatFrom::compat_from(value.verity_enabled),
21665
21666 __source_breaking: ::fidl::marker::SourceBreaking,
21667 }
21668 }
21669 }
21670
21671 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ImmutableNodeAttributes>
21672 for crate::ImmutableNodeAttributes
21673 {
21674 fn compat_from(value: ::fidl_fuchsia_io::ImmutableNodeAttributes) -> Self {
21675 Self {
21676 protocols: ::fidl_next::CompatFrom::compat_from(value.protocols),
21677
21678 abilities: ::fidl_next::CompatFrom::compat_from(value.abilities),
21679
21680 content_size: ::fidl_next::CompatFrom::compat_from(value.content_size),
21681
21682 storage_size: ::fidl_next::CompatFrom::compat_from(value.storage_size),
21683
21684 link_count: ::fidl_next::CompatFrom::compat_from(value.link_count),
21685
21686 id: ::fidl_next::CompatFrom::compat_from(value.id),
21687
21688 change_time: ::fidl_next::CompatFrom::compat_from(value.change_time),
21689
21690 options: ::fidl_next::CompatFrom::compat_from(value.options),
21691
21692 root_hash: ::fidl_next::CompatFrom::compat_from(value.root_hash),
21693
21694 verity_enabled: ::fidl_next::CompatFrom::compat_from(value.verity_enabled),
21695 }
21696 }
21697 }
21698
21699 impl ::fidl_next::CompatFrom<crate::NodeAttributes2> for ::fidl_fuchsia_io::NodeAttributes2 {
21700 #[inline]
21701 fn compat_from(value: crate::NodeAttributes2) -> Self {
21702 Self {
21703 mutable_attributes: ::fidl_next::CompatFrom::compat_from(value.mutable_attributes),
21704
21705 immutable_attributes: ::fidl_next::CompatFrom::compat_from(
21706 value.immutable_attributes,
21707 ),
21708 }
21709 }
21710 }
21711
21712 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeAttributes2> for crate::NodeAttributes2 {
21713 #[inline]
21714 fn compat_from(value: ::fidl_fuchsia_io::NodeAttributes2) -> Self {
21715 Self {
21716 mutable_attributes: ::fidl_next::CompatFrom::compat_from(value.mutable_attributes),
21717
21718 immutable_attributes: ::fidl_next::CompatFrom::compat_from(
21719 value.immutable_attributes,
21720 ),
21721 }
21722 }
21723 }
21724
21725 impl ::fidl_next::CompatFrom<crate::NodeInfo> for ::fidl_fuchsia_io::NodeInfo {
21726 fn compat_from(value: crate::NodeInfo) -> Self {
21727 Self {
21728 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21729
21730 __source_breaking: ::fidl::marker::SourceBreaking,
21731 }
21732 }
21733 }
21734
21735 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeInfo> for crate::NodeInfo {
21736 fn compat_from(value: ::fidl_fuchsia_io::NodeInfo) -> Self {
21737 Self { attributes: ::fidl_next::CompatFrom::compat_from(value.attributes) }
21738 }
21739 }
21740
21741 impl ::fidl_next::CompatFrom<crate::DirectoryInfo> for ::fidl_fuchsia_io::DirectoryInfo {
21742 fn compat_from(value: crate::DirectoryInfo) -> Self {
21743 Self {
21744 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21745
21746 __source_breaking: ::fidl::marker::SourceBreaking,
21747 }
21748 }
21749 }
21750
21751 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryInfo> for crate::DirectoryInfo {
21752 fn compat_from(value: ::fidl_fuchsia_io::DirectoryInfo) -> Self {
21753 Self { attributes: ::fidl_next::CompatFrom::compat_from(value.attributes) }
21754 }
21755 }
21756
21757 impl ::fidl_next::CompatFrom<crate::SymlinkInfo> for ::fidl_fuchsia_io::SymlinkInfo {
21758 fn compat_from(value: crate::SymlinkInfo) -> Self {
21759 Self {
21760 target: ::fidl_next::CompatFrom::compat_from(value.target),
21761
21762 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21763
21764 __source_breaking: ::fidl::marker::SourceBreaking,
21765 }
21766 }
21767 }
21768
21769 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SymlinkInfo> for crate::SymlinkInfo {
21770 fn compat_from(value: ::fidl_fuchsia_io::SymlinkInfo) -> Self {
21771 Self {
21772 target: ::fidl_next::CompatFrom::compat_from(value.target),
21773
21774 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21775 }
21776 }
21777 }
21778
21779 impl ::fidl_next::CompatFrom<crate::NodeAttributesQuery>
21780 for ::fidl_fuchsia_io::NodeAttributesQuery
21781 {
21782 fn compat_from(value: crate::NodeAttributesQuery) -> Self {
21783 Self::from_bits_retain(value.bits())
21784 }
21785 }
21786
21787 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeAttributesQuery>
21788 for crate::NodeAttributesQuery
21789 {
21790 fn compat_from(value: ::fidl_fuchsia_io::NodeAttributesQuery) -> Self {
21791 Self::from_bits_retain(value.bits())
21792 }
21793 }
21794
21795 impl ::fidl_next::CompatFrom<crate::NodeGetAttributesRequest>
21796 for ::fidl_fuchsia_io::NodeGetAttributesRequest
21797 {
21798 #[inline]
21799 fn compat_from(value: crate::NodeGetAttributesRequest) -> Self {
21800 Self { query: ::fidl_next::CompatFrom::compat_from(value.query) }
21801 }
21802 }
21803
21804 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeGetAttributesRequest>
21805 for crate::NodeGetAttributesRequest
21806 {
21807 #[inline]
21808 fn compat_from(value: ::fidl_fuchsia_io::NodeGetAttributesRequest) -> Self {
21809 Self { query: ::fidl_next::CompatFrom::compat_from(value.query) }
21810 }
21811 }
21812
21813 impl ::fidl_next::CompatFrom<crate::Options> for ::fidl_fuchsia_io::Options {
21814 fn compat_from(value: crate::Options) -> Self {
21815 Self {
21816 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21817
21818 create_attributes: ::fidl_next::CompatFrom::compat_from(value.create_attributes),
21819
21820 __source_breaking: ::fidl::marker::SourceBreaking,
21821 }
21822 }
21823 }
21824
21825 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Options> for crate::Options {
21826 fn compat_from(value: ::fidl_fuchsia_io::Options) -> Self {
21827 Self {
21828 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21829
21830 create_attributes: ::fidl_next::CompatFrom::compat_from(value.create_attributes),
21831 }
21832 }
21833 }
21834
21835 impl ::fidl_next::CompatFrom<crate::DirectoryObject> for ::fidl_fuchsia_io::DirectoryObject {
21836 #[inline]
21837 fn compat_from(value: crate::DirectoryObject) -> Self {
21838 Self {}
21839 }
21840 }
21841
21842 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryObject> for crate::DirectoryObject {
21843 #[inline]
21844 fn compat_from(value: ::fidl_fuchsia_io::DirectoryObject) -> Self {
21845 Self {}
21846 }
21847 }
21848
21849 #[cfg(target_os = "fuchsia")]
21850 pub type DirectoryWatcherProxy = ::fidl_next::Client<crate::DirectoryWatcher>;
21853
21854 impl ::fidl_next::CompatFrom<crate::DirectoryWatcher>
21855 for ::fidl_fuchsia_io::DirectoryWatcherMarker
21856 {
21857 fn compat_from(_: crate::DirectoryWatcher) -> Self {
21858 Self
21859 }
21860 }
21861
21862 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryWatcherMarker>
21863 for crate::DirectoryWatcher
21864 {
21865 fn compat_from(_: ::fidl_fuchsia_io::DirectoryWatcherMarker) -> Self {
21866 Self
21867 }
21868 }
21869
21870 #[cfg(target_os = "fuchsia")]
21871
21872 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::DirectoryWatcherProxy>
21873 for crate::DirectoryWatcher
21874 {
21875 fn client_compat_from(
21876 proxy: ::fidl_fuchsia_io::DirectoryWatcherProxy,
21877 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
21878 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
21879 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
21880 ::fidl_next::ClientDispatcher::new(client_end)
21881 }
21882 }
21883
21884 impl ::fidl_next::CompatFrom<crate::DirentType> for ::fidl_fuchsia_io::DirentType {
21885 fn compat_from(value: crate::DirentType) -> Self {
21886 match value {
21887 crate::DirentType::Unknown => Self::Unknown,
21888
21889 crate::DirentType::Directory => Self::Directory,
21890
21891 crate::DirentType::BlockDevice => Self::BlockDevice,
21892
21893 crate::DirentType::File => Self::File,
21894
21895 crate::DirentType::Symlink => Self::Symlink,
21896
21897 crate::DirentType::Service => Self::Service,
21898
21899 crate::DirentType::UnknownOrdinal_(unknown_ordinal) => {
21900 Self::__SourceBreaking { unknown_ordinal }
21901 }
21902 }
21903 }
21904 }
21905
21906 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirentType> for crate::DirentType {
21907 fn compat_from(value: ::fidl_fuchsia_io::DirentType) -> Self {
21908 match value {
21909 ::fidl_fuchsia_io::DirentType::Unknown => Self::Unknown,
21910
21911 ::fidl_fuchsia_io::DirentType::Directory => Self::Directory,
21912
21913 ::fidl_fuchsia_io::DirentType::BlockDevice => Self::BlockDevice,
21914
21915 ::fidl_fuchsia_io::DirentType::File => Self::File,
21916
21917 ::fidl_fuchsia_io::DirentType::Symlink => Self::Symlink,
21918
21919 ::fidl_fuchsia_io::DirentType::Service => Self::Service,
21920
21921 ::fidl_fuchsia_io::DirentType::__SourceBreaking { unknown_ordinal: value } => {
21922 Self::UnknownOrdinal_(value)
21923 }
21924 }
21925 }
21926 }
21927
21928 impl ::fidl_next::CompatFrom<crate::ExtendedAttributeIteratorGetNextResponse>
21929 for ::fidl_fuchsia_io::ExtendedAttributeIteratorGetNextResponse
21930 {
21931 #[inline]
21932 fn compat_from(value: crate::ExtendedAttributeIteratorGetNextResponse) -> Self {
21933 Self {
21934 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21935
21936 last: ::fidl_next::CompatFrom::compat_from(value.last),
21937 }
21938 }
21939 }
21940
21941 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ExtendedAttributeIteratorGetNextResponse>
21942 for crate::ExtendedAttributeIteratorGetNextResponse
21943 {
21944 #[inline]
21945 fn compat_from(value: ::fidl_fuchsia_io::ExtendedAttributeIteratorGetNextResponse) -> Self {
21946 Self {
21947 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
21948
21949 last: ::fidl_next::CompatFrom::compat_from(value.last),
21950 }
21951 }
21952 }
21953
21954 #[cfg(target_os = "fuchsia")]
21955 pub type ExtendedAttributeIteratorProxy = ::fidl_next::Client<crate::ExtendedAttributeIterator>;
21958
21959 impl ::fidl_next::CompatFrom<crate::ExtendedAttributeIterator>
21960 for ::fidl_fuchsia_io::ExtendedAttributeIteratorMarker
21961 {
21962 fn compat_from(_: crate::ExtendedAttributeIterator) -> Self {
21963 Self
21964 }
21965 }
21966
21967 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ExtendedAttributeIteratorMarker>
21968 for crate::ExtendedAttributeIterator
21969 {
21970 fn compat_from(_: ::fidl_fuchsia_io::ExtendedAttributeIteratorMarker) -> Self {
21971 Self
21972 }
21973 }
21974
21975 #[cfg(target_os = "fuchsia")]
21976
21977 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::ExtendedAttributeIteratorProxy>
21978 for crate::ExtendedAttributeIterator
21979 {
21980 fn client_compat_from(
21981 proxy: ::fidl_fuchsia_io::ExtendedAttributeIteratorProxy,
21982 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
21983 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
21984 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
21985 ::fidl_next::ClientDispatcher::new(client_end)
21986 }
21987 }
21988
21989 impl ::fidl_next::CompatFrom<crate::ReadableReadRequest>
21990 for ::fidl_fuchsia_io::ReadableReadRequest
21991 {
21992 #[inline]
21993 fn compat_from(value: crate::ReadableReadRequest) -> Self {
21994 Self { count: ::fidl_next::CompatFrom::compat_from(value.count) }
21995 }
21996 }
21997
21998 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ReadableReadRequest>
21999 for crate::ReadableReadRequest
22000 {
22001 #[inline]
22002 fn compat_from(value: ::fidl_fuchsia_io::ReadableReadRequest) -> Self {
22003 Self { count: ::fidl_next::CompatFrom::compat_from(value.count) }
22004 }
22005 }
22006
22007 impl ::fidl_next::CompatFrom<crate::ReadableReadResponse>
22008 for ::fidl_fuchsia_io::ReadableReadResponse
22009 {
22010 #[inline]
22011 fn compat_from(value: crate::ReadableReadResponse) -> Self {
22012 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22013 }
22014 }
22015
22016 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ReadableReadResponse>
22017 for crate::ReadableReadResponse
22018 {
22019 #[inline]
22020 fn compat_from(value: ::fidl_fuchsia_io::ReadableReadResponse) -> Self {
22021 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22022 }
22023 }
22024
22025 #[cfg(target_os = "fuchsia")]
22026 pub type ReadableProxy = ::fidl_next::Client<crate::Readable>;
22029
22030 impl ::fidl_next::CompatFrom<crate::Readable> for ::fidl_fuchsia_io::ReadableMarker {
22031 fn compat_from(_: crate::Readable) -> Self {
22032 Self
22033 }
22034 }
22035
22036 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ReadableMarker> for crate::Readable {
22037 fn compat_from(_: ::fidl_fuchsia_io::ReadableMarker) -> Self {
22038 Self
22039 }
22040 }
22041
22042 #[cfg(target_os = "fuchsia")]
22043
22044 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::ReadableProxy> for crate::Readable {
22045 fn client_compat_from(
22046 proxy: ::fidl_fuchsia_io::ReadableProxy,
22047 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
22048 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
22049 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
22050 ::fidl_next::ClientDispatcher::new(client_end)
22051 }
22052 }
22053
22054 impl ::fidl_next::CompatFrom<crate::WritableWriteRequest>
22055 for ::fidl_fuchsia_io::WritableWriteRequest
22056 {
22057 #[inline]
22058 fn compat_from(value: crate::WritableWriteRequest) -> Self {
22059 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22060 }
22061 }
22062
22063 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WritableWriteRequest>
22064 for crate::WritableWriteRequest
22065 {
22066 #[inline]
22067 fn compat_from(value: ::fidl_fuchsia_io::WritableWriteRequest) -> Self {
22068 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22069 }
22070 }
22071
22072 impl ::fidl_next::CompatFrom<crate::WritableWriteResponse>
22073 for ::fidl_fuchsia_io::WritableWriteResponse
22074 {
22075 #[inline]
22076 fn compat_from(value: crate::WritableWriteResponse) -> Self {
22077 Self { actual_count: ::fidl_next::CompatFrom::compat_from(value.actual_count) }
22078 }
22079 }
22080
22081 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WritableWriteResponse>
22082 for crate::WritableWriteResponse
22083 {
22084 #[inline]
22085 fn compat_from(value: ::fidl_fuchsia_io::WritableWriteResponse) -> Self {
22086 Self { actual_count: ::fidl_next::CompatFrom::compat_from(value.actual_count) }
22087 }
22088 }
22089
22090 #[cfg(target_os = "fuchsia")]
22091 pub type WritableProxy = ::fidl_next::Client<crate::Writable>;
22094
22095 impl ::fidl_next::CompatFrom<crate::Writable> for ::fidl_fuchsia_io::WritableMarker {
22096 fn compat_from(_: crate::Writable) -> Self {
22097 Self
22098 }
22099 }
22100
22101 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WritableMarker> for crate::Writable {
22102 fn compat_from(_: ::fidl_fuchsia_io::WritableMarker) -> Self {
22103 Self
22104 }
22105 }
22106
22107 #[cfg(target_os = "fuchsia")]
22108
22109 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::WritableProxy> for crate::Writable {
22110 fn client_compat_from(
22111 proxy: ::fidl_fuchsia_io::WritableProxy,
22112 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
22113 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
22114 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
22115 ::fidl_next::ClientDispatcher::new(client_end)
22116 }
22117 }
22118
22119 impl ::fidl_next::CompatFrom<crate::FileSeekRequest> for ::fidl_fuchsia_io::FileSeekRequest {
22120 #[inline]
22121 fn compat_from(value: crate::FileSeekRequest) -> Self {
22122 Self {
22123 origin: ::fidl_next::CompatFrom::compat_from(value.origin),
22124
22125 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22126 }
22127 }
22128 }
22129
22130 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileSeekRequest> for crate::FileSeekRequest {
22131 #[inline]
22132 fn compat_from(value: ::fidl_fuchsia_io::FileSeekRequest) -> Self {
22133 Self {
22134 origin: ::fidl_next::CompatFrom::compat_from(value.origin),
22135
22136 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22137 }
22138 }
22139 }
22140
22141 impl ::fidl_next::CompatFrom<crate::FileSeekResponse> for ::fidl_fuchsia_io::FileSeekResponse {
22142 #[inline]
22143 fn compat_from(value: crate::FileSeekResponse) -> Self {
22144 Self {
22145 offset_from_start: ::fidl_next::CompatFrom::compat_from(value.offset_from_start),
22146 }
22147 }
22148 }
22149
22150 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileSeekResponse> for crate::FileSeekResponse {
22151 #[inline]
22152 fn compat_from(value: ::fidl_fuchsia_io::FileSeekResponse) -> Self {
22153 Self {
22154 offset_from_start: ::fidl_next::CompatFrom::compat_from(value.offset_from_start),
22155 }
22156 }
22157 }
22158
22159 impl ::fidl_next::CompatFrom<crate::FileReadAtRequest> for ::fidl_fuchsia_io::FileReadAtRequest {
22160 #[inline]
22161 fn compat_from(value: crate::FileReadAtRequest) -> Self {
22162 Self {
22163 count: ::fidl_next::CompatFrom::compat_from(value.count),
22164
22165 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22166 }
22167 }
22168 }
22169
22170 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileReadAtRequest> for crate::FileReadAtRequest {
22171 #[inline]
22172 fn compat_from(value: ::fidl_fuchsia_io::FileReadAtRequest) -> Self {
22173 Self {
22174 count: ::fidl_next::CompatFrom::compat_from(value.count),
22175
22176 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22177 }
22178 }
22179 }
22180
22181 impl ::fidl_next::CompatFrom<crate::FileReadAtResponse> for ::fidl_fuchsia_io::FileReadAtResponse {
22182 #[inline]
22183 fn compat_from(value: crate::FileReadAtResponse) -> Self {
22184 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22185 }
22186 }
22187
22188 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileReadAtResponse> for crate::FileReadAtResponse {
22189 #[inline]
22190 fn compat_from(value: ::fidl_fuchsia_io::FileReadAtResponse) -> Self {
22191 Self { data: ::fidl_next::CompatFrom::compat_from(value.data) }
22192 }
22193 }
22194
22195 impl ::fidl_next::CompatFrom<crate::FileWriteAtRequest> for ::fidl_fuchsia_io::FileWriteAtRequest {
22196 #[inline]
22197 fn compat_from(value: crate::FileWriteAtRequest) -> Self {
22198 Self {
22199 data: ::fidl_next::CompatFrom::compat_from(value.data),
22200
22201 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22202 }
22203 }
22204 }
22205
22206 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileWriteAtRequest> for crate::FileWriteAtRequest {
22207 #[inline]
22208 fn compat_from(value: ::fidl_fuchsia_io::FileWriteAtRequest) -> Self {
22209 Self {
22210 data: ::fidl_next::CompatFrom::compat_from(value.data),
22211
22212 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
22213 }
22214 }
22215 }
22216
22217 impl ::fidl_next::CompatFrom<crate::FileWriteAtResponse>
22218 for ::fidl_fuchsia_io::FileWriteAtResponse
22219 {
22220 #[inline]
22221 fn compat_from(value: crate::FileWriteAtResponse) -> Self {
22222 Self { actual_count: ::fidl_next::CompatFrom::compat_from(value.actual_count) }
22223 }
22224 }
22225
22226 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileWriteAtResponse>
22227 for crate::FileWriteAtResponse
22228 {
22229 #[inline]
22230 fn compat_from(value: ::fidl_fuchsia_io::FileWriteAtResponse) -> Self {
22231 Self { actual_count: ::fidl_next::CompatFrom::compat_from(value.actual_count) }
22232 }
22233 }
22234
22235 impl ::fidl_next::CompatFrom<crate::FileResizeRequest> for ::fidl_fuchsia_io::FileResizeRequest {
22236 #[inline]
22237 fn compat_from(value: crate::FileResizeRequest) -> Self {
22238 Self { length: ::fidl_next::CompatFrom::compat_from(value.length) }
22239 }
22240 }
22241
22242 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileResizeRequest> for crate::FileResizeRequest {
22243 #[inline]
22244 fn compat_from(value: ::fidl_fuchsia_io::FileResizeRequest) -> Self {
22245 Self { length: ::fidl_next::CompatFrom::compat_from(value.length) }
22246 }
22247 }
22248
22249 impl ::fidl_next::CompatFrom<crate::VmoFlags> for ::fidl_fuchsia_io::VmoFlags {
22250 fn compat_from(value: crate::VmoFlags) -> Self {
22251 Self::from_bits_retain(value.bits())
22252 }
22253 }
22254
22255 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::VmoFlags> for crate::VmoFlags {
22256 fn compat_from(value: ::fidl_fuchsia_io::VmoFlags) -> Self {
22257 Self::from_bits_retain(value.bits())
22258 }
22259 }
22260
22261 impl ::fidl_next::CompatFrom<crate::FileGetBackingMemoryRequest>
22262 for ::fidl_fuchsia_io::FileGetBackingMemoryRequest
22263 {
22264 #[inline]
22265 fn compat_from(value: crate::FileGetBackingMemoryRequest) -> Self {
22266 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
22267 }
22268 }
22269
22270 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileGetBackingMemoryRequest>
22271 for crate::FileGetBackingMemoryRequest
22272 {
22273 #[inline]
22274 fn compat_from(value: ::fidl_fuchsia_io::FileGetBackingMemoryRequest) -> Self {
22275 Self { flags: ::fidl_next::CompatFrom::compat_from(value.flags) }
22276 }
22277 }
22278
22279 impl ::fidl_next::CompatFrom<crate::FileSignal> for ::fidl_fuchsia_io::FileSignal {
22280 fn compat_from(value: crate::FileSignal) -> Self {
22281 Self::from_bits_retain(value.bits())
22282 }
22283 }
22284
22285 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileSignal> for crate::FileSignal {
22286 fn compat_from(value: ::fidl_fuchsia_io::FileSignal) -> Self {
22287 Self::from_bits_retain(value.bits())
22288 }
22289 }
22290
22291 impl ::fidl_next::CompatFrom<crate::FilesystemInfo> for ::fidl_fuchsia_io::FilesystemInfo {
22292 #[inline]
22293 fn compat_from(value: crate::FilesystemInfo) -> Self {
22294 Self {
22295 total_bytes: ::fidl_next::CompatFrom::compat_from(value.total_bytes),
22296
22297 used_bytes: ::fidl_next::CompatFrom::compat_from(value.used_bytes),
22298
22299 total_nodes: ::fidl_next::CompatFrom::compat_from(value.total_nodes),
22300
22301 used_nodes: ::fidl_next::CompatFrom::compat_from(value.used_nodes),
22302
22303 free_shared_pool_bytes: ::fidl_next::CompatFrom::compat_from(
22304 value.free_shared_pool_bytes,
22305 ),
22306
22307 fs_id: ::fidl_next::CompatFrom::compat_from(value.fs_id),
22308
22309 block_size: ::fidl_next::CompatFrom::compat_from(value.block_size),
22310
22311 max_filename_size: ::fidl_next::CompatFrom::compat_from(value.max_filename_size),
22312
22313 fs_type: ::fidl_next::CompatFrom::compat_from(value.fs_type),
22314
22315 padding: ::fidl_next::CompatFrom::compat_from(value.padding),
22316
22317 name: ::fidl_next::CompatFrom::compat_from(value.name),
22318 }
22319 }
22320 }
22321
22322 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FilesystemInfo> for crate::FilesystemInfo {
22323 #[inline]
22324 fn compat_from(value: ::fidl_fuchsia_io::FilesystemInfo) -> Self {
22325 Self {
22326 total_bytes: ::fidl_next::CompatFrom::compat_from(value.total_bytes),
22327
22328 used_bytes: ::fidl_next::CompatFrom::compat_from(value.used_bytes),
22329
22330 total_nodes: ::fidl_next::CompatFrom::compat_from(value.total_nodes),
22331
22332 used_nodes: ::fidl_next::CompatFrom::compat_from(value.used_nodes),
22333
22334 free_shared_pool_bytes: ::fidl_next::CompatFrom::compat_from(
22335 value.free_shared_pool_bytes,
22336 ),
22337
22338 fs_id: ::fidl_next::CompatFrom::compat_from(value.fs_id),
22339
22340 block_size: ::fidl_next::CompatFrom::compat_from(value.block_size),
22341
22342 max_filename_size: ::fidl_next::CompatFrom::compat_from(value.max_filename_size),
22343
22344 fs_type: ::fidl_next::CompatFrom::compat_from(value.fs_type),
22345
22346 padding: ::fidl_next::CompatFrom::compat_from(value.padding),
22347
22348 name: ::fidl_next::CompatFrom::compat_from(value.name),
22349 }
22350 }
22351 }
22352
22353 impl ::fidl_next::CompatFrom<crate::Service> for ::fidl_fuchsia_io::Service {
22354 #[inline]
22355 fn compat_from(value: crate::Service) -> Self {
22356 Self {}
22357 }
22358 }
22359
22360 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Service> for crate::Service {
22361 #[inline]
22362 fn compat_from(value: ::fidl_fuchsia_io::Service) -> Self {
22363 Self {}
22364 }
22365 }
22366
22367 impl ::fidl_next::CompatFrom<crate::SymlinkObject> for ::fidl_fuchsia_io::SymlinkObject {
22368 #[inline]
22369 fn compat_from(value: crate::SymlinkObject) -> Self {
22370 Self { target: ::fidl_next::CompatFrom::compat_from(value.target) }
22371 }
22372 }
22373
22374 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SymlinkObject> for crate::SymlinkObject {
22375 #[inline]
22376 fn compat_from(value: ::fidl_fuchsia_io::SymlinkObject) -> Self {
22377 Self { target: ::fidl_next::CompatFrom::compat_from(value.target) }
22378 }
22379 }
22380
22381 impl ::fidl_next::CompatFrom<crate::WatchEvent> for ::fidl_fuchsia_io::WatchEvent {
22382 fn compat_from(value: crate::WatchEvent) -> Self {
22383 match value {
22384 crate::WatchEvent::Deleted => Self::Deleted,
22385
22386 crate::WatchEvent::Added => Self::Added,
22387
22388 crate::WatchEvent::Removed => Self::Removed,
22389
22390 crate::WatchEvent::Existing => Self::Existing,
22391
22392 crate::WatchEvent::Idle => Self::Idle,
22393 }
22394 }
22395 }
22396
22397 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::WatchEvent> for crate::WatchEvent {
22398 fn compat_from(value: ::fidl_fuchsia_io::WatchEvent) -> Self {
22399 match value {
22400 ::fidl_fuchsia_io::WatchEvent::Deleted => Self::Deleted,
22401
22402 ::fidl_fuchsia_io::WatchEvent::Added => Self::Added,
22403
22404 ::fidl_fuchsia_io::WatchEvent::Removed => Self::Removed,
22405
22406 ::fidl_fuchsia_io::WatchEvent::Existing => Self::Existing,
22407
22408 ::fidl_fuchsia_io::WatchEvent::Idle => Self::Idle,
22409 }
22410 }
22411 }
22412}