1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
12#[repr(u32)]
13pub enum OutOfBoundsDirection {
14 Below = 1,
15 Above = 2,
16}
17
18impl OutOfBoundsDirection {
19 #[inline]
20 pub fn from_primitive(prim: u32) -> Option<Self> {
21 match prim {
22 1 => Some(Self::Below),
23 2 => Some(Self::Above),
24 _ => None,
25 }
26 }
27
28 #[inline]
29 pub const fn into_primitive(self) -> u32 {
30 self as u32
31 }
32}
33
34#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35pub struct BadDirectory {
36 pub path: String,
38}
39
40impl fidl::Persistable for BadDirectory {}
41
42#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44#[repr(C)]
45pub struct BadEntryType {
46 pub value: u8,
48}
49
50impl fidl::Persistable for BadEntryType {}
51
52#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
53pub struct BadFile {
54 pub path: String,
56}
57
58impl fidl::Persistable for BadFile {}
59
60#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
62#[repr(C)]
63pub struct BannedFeatureIncompat {
64 pub value: u32,
66}
67
68impl fidl::Persistable for BannedFeatureIncompat {}
69
70#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71#[repr(C)]
72pub struct BlockNumberOutOfBounds {
73 pub block_number: u64,
75}
76
77impl fidl::Persistable for BlockNumberOutOfBounds {}
78
79#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
80#[repr(C)]
81pub struct BlockSizeInvalid {
82 pub block_size: u32,
84}
85
86impl fidl::Persistable for BlockSizeInvalid {}
87
88#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89pub struct DirEntry2NonUtf8 {
90 pub data: Vec<u8>,
93}
94
95impl fidl::Persistable for DirEntry2NonUtf8 {}
96
97#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
98#[repr(C)]
99pub struct ExtentUnexpectedLength {
100 pub size: u64,
102 pub expected: u64,
104}
105
106impl fidl::Persistable for ExtentUnexpectedLength {}
107
108#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109pub struct Incompatible {
110 pub msg: String,
112}
113
114impl fidl::Persistable for Incompatible {}
115
116#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
117pub struct InvalidAddress {
118 pub position: u64,
120 pub direction: OutOfBoundsDirection,
122 pub bound: u64,
124}
125
126impl fidl::Persistable for InvalidAddress {}
127
128#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
129#[repr(C)]
130pub struct InvalidBlockGroupDesc {
131 pub position: u64,
133}
134
135impl fidl::Persistable for InvalidBlockGroupDesc {}
136
137#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
138#[repr(C)]
139pub struct InvalidDirEntry2 {
140 pub position: u64,
142}
143
144impl fidl::Persistable for InvalidDirEntry2 {}
145
146#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
147#[repr(C)]
148pub struct InvalidExtent {
149 pub position: u64,
151}
152
153impl fidl::Persistable for InvalidExtent {}
154
155#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
156pub struct InvalidExtentHeader;
157
158impl fidl::Persistable for InvalidExtentHeader {}
159
160#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161#[repr(C)]
162pub struct InvalidExtentHeaderMagic {
163 pub value: u16,
165}
166
167impl fidl::Persistable for InvalidExtentHeaderMagic {}
168
169#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
170#[repr(C)]
171pub struct InvalidINode {
172 pub inode_number: u32,
174}
175
176impl fidl::Persistable for InvalidINode {}
177
178#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
179pub struct InvalidInputPath {
180 pub path: String,
182}
183
184impl fidl::Persistable for InvalidInputPath {}
185
186#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
187#[repr(C)]
188pub struct InvalidSuperBlock {
189 pub position: u64,
191}
192
193impl fidl::Persistable for InvalidSuperBlock {}
194
195#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
196#[repr(C)]
197pub struct InvalidSuperBlockMagic {
198 pub value: u16,
200}
201
202impl fidl::Persistable for InvalidSuperBlockMagic {}
203
204#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
205pub struct PathNotFound {
206 pub path: String,
208}
209
210impl fidl::Persistable for PathNotFound {}
211
212#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
214#[repr(C)]
215pub struct ReaderOutOfBounds {
216 pub position: u64,
218 pub size: u64,
220}
221
222impl fidl::Persistable for ReaderOutOfBounds {}
223
224#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
225#[repr(C)]
226pub struct ReaderReadError {
227 pub position: u64,
229}
230
231impl fidl::Persistable for ReaderReadError {}
232
233#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
235#[repr(C)]
236pub struct RequiredFeatureIncompat {
237 pub value: u32,
239}
240
241impl fidl::Persistable for RequiredFeatureIncompat {}
242
243#[derive(Clone, Debug, PartialEq)]
244pub struct ServerMountVmoResponse {
245 pub result: MountVmoResult,
246}
247
248impl fidl::Persistable for ServerMountVmoResponse {}
249
250#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
251pub struct Success;
252
253impl fidl::Persistable for Success {}
254
255#[derive(Clone, Debug)]
257pub enum MountVmoResult {
258 Success(Success),
261 VmoReadFailure(i32),
263 ParseError(ParseError),
264 #[doc(hidden)]
265 __SourceBreaking {
266 unknown_ordinal: u64,
267 },
268}
269
270#[macro_export]
272macro_rules! MountVmoResultUnknown {
273 () => {
274 _
275 };
276}
277
278impl PartialEq for MountVmoResult {
280 fn eq(&self, other: &Self) -> bool {
281 match (self, other) {
282 (Self::Success(x), Self::Success(y)) => *x == *y,
283 (Self::VmoReadFailure(x), Self::VmoReadFailure(y)) => *x == *y,
284 (Self::ParseError(x), Self::ParseError(y)) => *x == *y,
285 _ => false,
286 }
287 }
288}
289
290impl MountVmoResult {
291 #[inline]
292 pub fn ordinal(&self) -> u64 {
293 match *self {
294 Self::Success(_) => 1,
295 Self::VmoReadFailure(_) => 2,
296 Self::ParseError(_) => 3,
297 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
298 }
299 }
300
301 #[inline]
302 pub fn unknown_variant_for_testing() -> Self {
303 Self::__SourceBreaking { unknown_ordinal: 0 }
304 }
305
306 #[inline]
307 pub fn is_unknown(&self) -> bool {
308 match self {
309 Self::__SourceBreaking { .. } => true,
310 _ => false,
311 }
312 }
313}
314
315impl fidl::Persistable for MountVmoResult {}
316
317#[derive(Clone, Debug)]
320pub enum ParseError {
321 InvalidSuperBlock(InvalidSuperBlock),
322 InvalidSuperBlockMagic(InvalidSuperBlockMagic),
323 BlockNumberOutOfBounds(BlockNumberOutOfBounds),
324 BlockSizeInvalid(BlockSizeInvalid),
325 InvalidBlockGroupDesc(InvalidBlockGroupDesc),
326 InvalidInode(InvalidINode),
327 InvalidExtentHeader(InvalidExtentHeader),
328 InvalidExtentHeaderMagic(InvalidExtentHeaderMagic),
329 InvalidExtent(InvalidExtent),
330 ExtentUnexpectedLength(ExtentUnexpectedLength),
331 InvalidDirEntry2(InvalidDirEntry2),
332 DirEntry2NonUtf8(DirEntry2NonUtf8),
333 InvalidInputPath(InvalidInputPath),
334 PathNotFound(PathNotFound),
335 BadEntryType(BadEntryType),
336 Incompatible(Incompatible),
337 BadFile(BadFile),
338 BadDirectory(BadDirectory),
339 ReaderReadError(ReaderReadError),
340 ReaderOutOfBounds(ReaderOutOfBounds),
341 RequiredFeatureIncompat(RequiredFeatureIncompat),
342 BannedFeatureIncompat(BannedFeatureIncompat),
343 InvalidAddress(InvalidAddress),
344 #[doc(hidden)]
345 __SourceBreaking {
346 unknown_ordinal: u64,
347 },
348}
349
350#[macro_export]
352macro_rules! ParseErrorUnknown {
353 () => {
354 _
355 };
356}
357
358impl PartialEq for ParseError {
360 fn eq(&self, other: &Self) -> bool {
361 match (self, other) {
362 (Self::InvalidSuperBlock(x), Self::InvalidSuperBlock(y)) => *x == *y,
363 (Self::InvalidSuperBlockMagic(x), Self::InvalidSuperBlockMagic(y)) => *x == *y,
364 (Self::BlockNumberOutOfBounds(x), Self::BlockNumberOutOfBounds(y)) => *x == *y,
365 (Self::BlockSizeInvalid(x), Self::BlockSizeInvalid(y)) => *x == *y,
366 (Self::InvalidBlockGroupDesc(x), Self::InvalidBlockGroupDesc(y)) => *x == *y,
367 (Self::InvalidInode(x), Self::InvalidInode(y)) => *x == *y,
368 (Self::InvalidExtentHeader(x), Self::InvalidExtentHeader(y)) => *x == *y,
369 (Self::InvalidExtentHeaderMagic(x), Self::InvalidExtentHeaderMagic(y)) => *x == *y,
370 (Self::InvalidExtent(x), Self::InvalidExtent(y)) => *x == *y,
371 (Self::ExtentUnexpectedLength(x), Self::ExtentUnexpectedLength(y)) => *x == *y,
372 (Self::InvalidDirEntry2(x), Self::InvalidDirEntry2(y)) => *x == *y,
373 (Self::DirEntry2NonUtf8(x), Self::DirEntry2NonUtf8(y)) => *x == *y,
374 (Self::InvalidInputPath(x), Self::InvalidInputPath(y)) => *x == *y,
375 (Self::PathNotFound(x), Self::PathNotFound(y)) => *x == *y,
376 (Self::BadEntryType(x), Self::BadEntryType(y)) => *x == *y,
377 (Self::Incompatible(x), Self::Incompatible(y)) => *x == *y,
378 (Self::BadFile(x), Self::BadFile(y)) => *x == *y,
379 (Self::BadDirectory(x), Self::BadDirectory(y)) => *x == *y,
380 (Self::ReaderReadError(x), Self::ReaderReadError(y)) => *x == *y,
381 (Self::ReaderOutOfBounds(x), Self::ReaderOutOfBounds(y)) => *x == *y,
382 (Self::RequiredFeatureIncompat(x), Self::RequiredFeatureIncompat(y)) => *x == *y,
383 (Self::BannedFeatureIncompat(x), Self::BannedFeatureIncompat(y)) => *x == *y,
384 (Self::InvalidAddress(x), Self::InvalidAddress(y)) => *x == *y,
385 _ => false,
386 }
387 }
388}
389
390impl ParseError {
391 #[inline]
392 pub fn ordinal(&self) -> u64 {
393 match *self {
394 Self::InvalidSuperBlock(_) => 1,
395 Self::InvalidSuperBlockMagic(_) => 2,
396 Self::BlockNumberOutOfBounds(_) => 3,
397 Self::BlockSizeInvalid(_) => 4,
398 Self::InvalidBlockGroupDesc(_) => 5,
399 Self::InvalidInode(_) => 6,
400 Self::InvalidExtentHeader(_) => 7,
401 Self::InvalidExtentHeaderMagic(_) => 8,
402 Self::InvalidExtent(_) => 9,
403 Self::ExtentUnexpectedLength(_) => 10,
404 Self::InvalidDirEntry2(_) => 11,
405 Self::DirEntry2NonUtf8(_) => 12,
406 Self::InvalidInputPath(_) => 13,
407 Self::PathNotFound(_) => 14,
408 Self::BadEntryType(_) => 15,
409 Self::Incompatible(_) => 16,
410 Self::BadFile(_) => 17,
411 Self::BadDirectory(_) => 18,
412 Self::ReaderReadError(_) => 19,
413 Self::ReaderOutOfBounds(_) => 20,
414 Self::RequiredFeatureIncompat(_) => 21,
415 Self::BannedFeatureIncompat(_) => 22,
416 Self::InvalidAddress(_) => 23,
417 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
418 }
419 }
420
421 #[inline]
422 pub fn unknown_variant_for_testing() -> Self {
423 Self::__SourceBreaking { unknown_ordinal: 0 }
424 }
425
426 #[inline]
427 pub fn is_unknown(&self) -> bool {
428 match self {
429 Self::__SourceBreaking { .. } => true,
430 _ => false,
431 }
432 }
433}
434
435impl fidl::Persistable for ParseError {}
436
437pub mod server__ordinals {
438 pub const MOUNT_VMO: u64 = 0x191360124db7f6a6;
439}
440
441mod internal {
442 use super::*;
443 unsafe impl fidl::encoding::TypeMarker for OutOfBoundsDirection {
444 type Owned = Self;
445
446 #[inline(always)]
447 fn inline_align(_context: fidl::encoding::Context) -> usize {
448 std::mem::align_of::<u32>()
449 }
450
451 #[inline(always)]
452 fn inline_size(_context: fidl::encoding::Context) -> usize {
453 std::mem::size_of::<u32>()
454 }
455
456 #[inline(always)]
457 fn encode_is_copy() -> bool {
458 true
459 }
460
461 #[inline(always)]
462 fn decode_is_copy() -> bool {
463 false
464 }
465 }
466
467 impl fidl::encoding::ValueTypeMarker for OutOfBoundsDirection {
468 type Borrowed<'a> = Self;
469 #[inline(always)]
470 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
471 *value
472 }
473 }
474
475 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
476 for OutOfBoundsDirection
477 {
478 #[inline]
479 unsafe fn encode(
480 self,
481 encoder: &mut fidl::encoding::Encoder<'_, D>,
482 offset: usize,
483 _depth: fidl::encoding::Depth,
484 ) -> fidl::Result<()> {
485 encoder.debug_check_bounds::<Self>(offset);
486 encoder.write_num(self.into_primitive(), offset);
487 Ok(())
488 }
489 }
490
491 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OutOfBoundsDirection {
492 #[inline(always)]
493 fn new_empty() -> Self {
494 Self::Below
495 }
496
497 #[inline]
498 unsafe fn decode(
499 &mut self,
500 decoder: &mut fidl::encoding::Decoder<'_, D>,
501 offset: usize,
502 _depth: fidl::encoding::Depth,
503 ) -> fidl::Result<()> {
504 decoder.debug_check_bounds::<Self>(offset);
505 let prim = decoder.read_num::<u32>(offset);
506
507 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
508 Ok(())
509 }
510 }
511
512 impl fidl::encoding::ValueTypeMarker for BadDirectory {
513 type Borrowed<'a> = &'a Self;
514 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
515 value
516 }
517 }
518
519 unsafe impl fidl::encoding::TypeMarker for BadDirectory {
520 type Owned = Self;
521
522 #[inline(always)]
523 fn inline_align(_context: fidl::encoding::Context) -> usize {
524 8
525 }
526
527 #[inline(always)]
528 fn inline_size(_context: fidl::encoding::Context) -> usize {
529 16
530 }
531 }
532
533 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BadDirectory, D>
534 for &BadDirectory
535 {
536 #[inline]
537 unsafe fn encode(
538 self,
539 encoder: &mut fidl::encoding::Encoder<'_, D>,
540 offset: usize,
541 _depth: fidl::encoding::Depth,
542 ) -> fidl::Result<()> {
543 encoder.debug_check_bounds::<BadDirectory>(offset);
544 fidl::encoding::Encode::<BadDirectory, D>::encode(
546 (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
547 &self.path,
548 ),),
549 encoder,
550 offset,
551 _depth,
552 )
553 }
554 }
555 unsafe impl<
556 D: fidl::encoding::ResourceDialect,
557 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
558 > fidl::encoding::Encode<BadDirectory, D> for (T0,)
559 {
560 #[inline]
561 unsafe fn encode(
562 self,
563 encoder: &mut fidl::encoding::Encoder<'_, D>,
564 offset: usize,
565 depth: fidl::encoding::Depth,
566 ) -> fidl::Result<()> {
567 encoder.debug_check_bounds::<BadDirectory>(offset);
568 self.0.encode(encoder, offset + 0, depth)?;
572 Ok(())
573 }
574 }
575
576 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadDirectory {
577 #[inline(always)]
578 fn new_empty() -> Self {
579 Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
580 }
581
582 #[inline]
583 unsafe fn decode(
584 &mut self,
585 decoder: &mut fidl::encoding::Decoder<'_, D>,
586 offset: usize,
587 _depth: fidl::encoding::Depth,
588 ) -> fidl::Result<()> {
589 decoder.debug_check_bounds::<Self>(offset);
590 fidl::decode!(
592 fidl::encoding::BoundedString<1024>,
593 D,
594 &mut self.path,
595 decoder,
596 offset + 0,
597 _depth
598 )?;
599 Ok(())
600 }
601 }
602
603 impl fidl::encoding::ValueTypeMarker for BadEntryType {
604 type Borrowed<'a> = &'a Self;
605 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
606 value
607 }
608 }
609
610 unsafe impl fidl::encoding::TypeMarker for BadEntryType {
611 type Owned = Self;
612
613 #[inline(always)]
614 fn inline_align(_context: fidl::encoding::Context) -> usize {
615 1
616 }
617
618 #[inline(always)]
619 fn inline_size(_context: fidl::encoding::Context) -> usize {
620 1
621 }
622 #[inline(always)]
623 fn encode_is_copy() -> bool {
624 true
625 }
626
627 #[inline(always)]
628 fn decode_is_copy() -> bool {
629 true
630 }
631 }
632
633 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BadEntryType, D>
634 for &BadEntryType
635 {
636 #[inline]
637 unsafe fn encode(
638 self,
639 encoder: &mut fidl::encoding::Encoder<'_, D>,
640 offset: usize,
641 _depth: fidl::encoding::Depth,
642 ) -> fidl::Result<()> {
643 encoder.debug_check_bounds::<BadEntryType>(offset);
644 unsafe {
645 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
647 (buf_ptr as *mut BadEntryType)
648 .write_unaligned((self as *const BadEntryType).read());
649 }
652 Ok(())
653 }
654 }
655 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
656 fidl::encoding::Encode<BadEntryType, D> for (T0,)
657 {
658 #[inline]
659 unsafe fn encode(
660 self,
661 encoder: &mut fidl::encoding::Encoder<'_, D>,
662 offset: usize,
663 depth: fidl::encoding::Depth,
664 ) -> fidl::Result<()> {
665 encoder.debug_check_bounds::<BadEntryType>(offset);
666 self.0.encode(encoder, offset + 0, depth)?;
670 Ok(())
671 }
672 }
673
674 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadEntryType {
675 #[inline(always)]
676 fn new_empty() -> Self {
677 Self { value: fidl::new_empty!(u8, D) }
678 }
679
680 #[inline]
681 unsafe fn decode(
682 &mut self,
683 decoder: &mut fidl::encoding::Decoder<'_, D>,
684 offset: usize,
685 _depth: fidl::encoding::Depth,
686 ) -> fidl::Result<()> {
687 decoder.debug_check_bounds::<Self>(offset);
688 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
689 unsafe {
692 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
693 }
694 Ok(())
695 }
696 }
697
698 impl fidl::encoding::ValueTypeMarker for BadFile {
699 type Borrowed<'a> = &'a Self;
700 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
701 value
702 }
703 }
704
705 unsafe impl fidl::encoding::TypeMarker for BadFile {
706 type Owned = Self;
707
708 #[inline(always)]
709 fn inline_align(_context: fidl::encoding::Context) -> usize {
710 8
711 }
712
713 #[inline(always)]
714 fn inline_size(_context: fidl::encoding::Context) -> usize {
715 16
716 }
717 }
718
719 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BadFile, D> for &BadFile {
720 #[inline]
721 unsafe fn encode(
722 self,
723 encoder: &mut fidl::encoding::Encoder<'_, D>,
724 offset: usize,
725 _depth: fidl::encoding::Depth,
726 ) -> fidl::Result<()> {
727 encoder.debug_check_bounds::<BadFile>(offset);
728 fidl::encoding::Encode::<BadFile, D>::encode(
730 (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
731 &self.path,
732 ),),
733 encoder,
734 offset,
735 _depth,
736 )
737 }
738 }
739 unsafe impl<
740 D: fidl::encoding::ResourceDialect,
741 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
742 > fidl::encoding::Encode<BadFile, D> for (T0,)
743 {
744 #[inline]
745 unsafe fn encode(
746 self,
747 encoder: &mut fidl::encoding::Encoder<'_, D>,
748 offset: usize,
749 depth: fidl::encoding::Depth,
750 ) -> fidl::Result<()> {
751 encoder.debug_check_bounds::<BadFile>(offset);
752 self.0.encode(encoder, offset + 0, depth)?;
756 Ok(())
757 }
758 }
759
760 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadFile {
761 #[inline(always)]
762 fn new_empty() -> Self {
763 Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
764 }
765
766 #[inline]
767 unsafe fn decode(
768 &mut self,
769 decoder: &mut fidl::encoding::Decoder<'_, D>,
770 offset: usize,
771 _depth: fidl::encoding::Depth,
772 ) -> fidl::Result<()> {
773 decoder.debug_check_bounds::<Self>(offset);
774 fidl::decode!(
776 fidl::encoding::BoundedString<1024>,
777 D,
778 &mut self.path,
779 decoder,
780 offset + 0,
781 _depth
782 )?;
783 Ok(())
784 }
785 }
786
787 impl fidl::encoding::ValueTypeMarker for BannedFeatureIncompat {
788 type Borrowed<'a> = &'a Self;
789 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
790 value
791 }
792 }
793
794 unsafe impl fidl::encoding::TypeMarker for BannedFeatureIncompat {
795 type Owned = Self;
796
797 #[inline(always)]
798 fn inline_align(_context: fidl::encoding::Context) -> usize {
799 4
800 }
801
802 #[inline(always)]
803 fn inline_size(_context: fidl::encoding::Context) -> usize {
804 4
805 }
806 #[inline(always)]
807 fn encode_is_copy() -> bool {
808 true
809 }
810
811 #[inline(always)]
812 fn decode_is_copy() -> bool {
813 true
814 }
815 }
816
817 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BannedFeatureIncompat, D>
818 for &BannedFeatureIncompat
819 {
820 #[inline]
821 unsafe fn encode(
822 self,
823 encoder: &mut fidl::encoding::Encoder<'_, D>,
824 offset: usize,
825 _depth: fidl::encoding::Depth,
826 ) -> fidl::Result<()> {
827 encoder.debug_check_bounds::<BannedFeatureIncompat>(offset);
828 unsafe {
829 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
831 (buf_ptr as *mut BannedFeatureIncompat)
832 .write_unaligned((self as *const BannedFeatureIncompat).read());
833 }
836 Ok(())
837 }
838 }
839 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
840 fidl::encoding::Encode<BannedFeatureIncompat, D> for (T0,)
841 {
842 #[inline]
843 unsafe fn encode(
844 self,
845 encoder: &mut fidl::encoding::Encoder<'_, D>,
846 offset: usize,
847 depth: fidl::encoding::Depth,
848 ) -> fidl::Result<()> {
849 encoder.debug_check_bounds::<BannedFeatureIncompat>(offset);
850 self.0.encode(encoder, offset + 0, depth)?;
854 Ok(())
855 }
856 }
857
858 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BannedFeatureIncompat {
859 #[inline(always)]
860 fn new_empty() -> Self {
861 Self { value: fidl::new_empty!(u32, D) }
862 }
863
864 #[inline]
865 unsafe fn decode(
866 &mut self,
867 decoder: &mut fidl::encoding::Decoder<'_, D>,
868 offset: usize,
869 _depth: fidl::encoding::Depth,
870 ) -> fidl::Result<()> {
871 decoder.debug_check_bounds::<Self>(offset);
872 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
873 unsafe {
876 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
877 }
878 Ok(())
879 }
880 }
881
882 impl fidl::encoding::ValueTypeMarker for BlockNumberOutOfBounds {
883 type Borrowed<'a> = &'a Self;
884 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
885 value
886 }
887 }
888
889 unsafe impl fidl::encoding::TypeMarker for BlockNumberOutOfBounds {
890 type Owned = Self;
891
892 #[inline(always)]
893 fn inline_align(_context: fidl::encoding::Context) -> usize {
894 8
895 }
896
897 #[inline(always)]
898 fn inline_size(_context: fidl::encoding::Context) -> usize {
899 8
900 }
901 #[inline(always)]
902 fn encode_is_copy() -> bool {
903 true
904 }
905
906 #[inline(always)]
907 fn decode_is_copy() -> bool {
908 true
909 }
910 }
911
912 unsafe impl<D: fidl::encoding::ResourceDialect>
913 fidl::encoding::Encode<BlockNumberOutOfBounds, D> for &BlockNumberOutOfBounds
914 {
915 #[inline]
916 unsafe fn encode(
917 self,
918 encoder: &mut fidl::encoding::Encoder<'_, D>,
919 offset: usize,
920 _depth: fidl::encoding::Depth,
921 ) -> fidl::Result<()> {
922 encoder.debug_check_bounds::<BlockNumberOutOfBounds>(offset);
923 unsafe {
924 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
926 (buf_ptr as *mut BlockNumberOutOfBounds)
927 .write_unaligned((self as *const BlockNumberOutOfBounds).read());
928 }
931 Ok(())
932 }
933 }
934 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
935 fidl::encoding::Encode<BlockNumberOutOfBounds, D> for (T0,)
936 {
937 #[inline]
938 unsafe fn encode(
939 self,
940 encoder: &mut fidl::encoding::Encoder<'_, D>,
941 offset: usize,
942 depth: fidl::encoding::Depth,
943 ) -> fidl::Result<()> {
944 encoder.debug_check_bounds::<BlockNumberOutOfBounds>(offset);
945 self.0.encode(encoder, offset + 0, depth)?;
949 Ok(())
950 }
951 }
952
953 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
954 for BlockNumberOutOfBounds
955 {
956 #[inline(always)]
957 fn new_empty() -> Self {
958 Self { block_number: fidl::new_empty!(u64, D) }
959 }
960
961 #[inline]
962 unsafe fn decode(
963 &mut self,
964 decoder: &mut fidl::encoding::Decoder<'_, D>,
965 offset: usize,
966 _depth: fidl::encoding::Depth,
967 ) -> fidl::Result<()> {
968 decoder.debug_check_bounds::<Self>(offset);
969 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
970 unsafe {
973 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
974 }
975 Ok(())
976 }
977 }
978
979 impl fidl::encoding::ValueTypeMarker for BlockSizeInvalid {
980 type Borrowed<'a> = &'a Self;
981 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
982 value
983 }
984 }
985
986 unsafe impl fidl::encoding::TypeMarker for BlockSizeInvalid {
987 type Owned = Self;
988
989 #[inline(always)]
990 fn inline_align(_context: fidl::encoding::Context) -> usize {
991 4
992 }
993
994 #[inline(always)]
995 fn inline_size(_context: fidl::encoding::Context) -> usize {
996 4
997 }
998 #[inline(always)]
999 fn encode_is_copy() -> bool {
1000 true
1001 }
1002
1003 #[inline(always)]
1004 fn decode_is_copy() -> bool {
1005 true
1006 }
1007 }
1008
1009 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BlockSizeInvalid, D>
1010 for &BlockSizeInvalid
1011 {
1012 #[inline]
1013 unsafe fn encode(
1014 self,
1015 encoder: &mut fidl::encoding::Encoder<'_, D>,
1016 offset: usize,
1017 _depth: fidl::encoding::Depth,
1018 ) -> fidl::Result<()> {
1019 encoder.debug_check_bounds::<BlockSizeInvalid>(offset);
1020 unsafe {
1021 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1023 (buf_ptr as *mut BlockSizeInvalid)
1024 .write_unaligned((self as *const BlockSizeInvalid).read());
1025 }
1028 Ok(())
1029 }
1030 }
1031 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1032 fidl::encoding::Encode<BlockSizeInvalid, D> for (T0,)
1033 {
1034 #[inline]
1035 unsafe fn encode(
1036 self,
1037 encoder: &mut fidl::encoding::Encoder<'_, D>,
1038 offset: usize,
1039 depth: fidl::encoding::Depth,
1040 ) -> fidl::Result<()> {
1041 encoder.debug_check_bounds::<BlockSizeInvalid>(offset);
1042 self.0.encode(encoder, offset + 0, depth)?;
1046 Ok(())
1047 }
1048 }
1049
1050 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BlockSizeInvalid {
1051 #[inline(always)]
1052 fn new_empty() -> Self {
1053 Self { block_size: fidl::new_empty!(u32, D) }
1054 }
1055
1056 #[inline]
1057 unsafe fn decode(
1058 &mut self,
1059 decoder: &mut fidl::encoding::Decoder<'_, D>,
1060 offset: usize,
1061 _depth: fidl::encoding::Depth,
1062 ) -> fidl::Result<()> {
1063 decoder.debug_check_bounds::<Self>(offset);
1064 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1065 unsafe {
1068 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1069 }
1070 Ok(())
1071 }
1072 }
1073
1074 impl fidl::encoding::ValueTypeMarker for DirEntry2NonUtf8 {
1075 type Borrowed<'a> = &'a Self;
1076 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1077 value
1078 }
1079 }
1080
1081 unsafe impl fidl::encoding::TypeMarker for DirEntry2NonUtf8 {
1082 type Owned = Self;
1083
1084 #[inline(always)]
1085 fn inline_align(_context: fidl::encoding::Context) -> usize {
1086 8
1087 }
1088
1089 #[inline(always)]
1090 fn inline_size(_context: fidl::encoding::Context) -> usize {
1091 16
1092 }
1093 }
1094
1095 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DirEntry2NonUtf8, D>
1096 for &DirEntry2NonUtf8
1097 {
1098 #[inline]
1099 unsafe fn encode(
1100 self,
1101 encoder: &mut fidl::encoding::Encoder<'_, D>,
1102 offset: usize,
1103 _depth: fidl::encoding::Depth,
1104 ) -> fidl::Result<()> {
1105 encoder.debug_check_bounds::<DirEntry2NonUtf8>(offset);
1106 fidl::encoding::Encode::<DirEntry2NonUtf8, D>::encode(
1108 (<fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
1109 &self.data,
1110 ),),
1111 encoder,
1112 offset,
1113 _depth,
1114 )
1115 }
1116 }
1117 unsafe impl<
1118 D: fidl::encoding::ResourceDialect,
1119 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 255>, D>,
1120 > fidl::encoding::Encode<DirEntry2NonUtf8, D> for (T0,)
1121 {
1122 #[inline]
1123 unsafe fn encode(
1124 self,
1125 encoder: &mut fidl::encoding::Encoder<'_, D>,
1126 offset: usize,
1127 depth: fidl::encoding::Depth,
1128 ) -> fidl::Result<()> {
1129 encoder.debug_check_bounds::<DirEntry2NonUtf8>(offset);
1130 self.0.encode(encoder, offset + 0, depth)?;
1134 Ok(())
1135 }
1136 }
1137
1138 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DirEntry2NonUtf8 {
1139 #[inline(always)]
1140 fn new_empty() -> Self {
1141 Self { data: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, D) }
1142 }
1143
1144 #[inline]
1145 unsafe fn decode(
1146 &mut self,
1147 decoder: &mut fidl::encoding::Decoder<'_, D>,
1148 offset: usize,
1149 _depth: fidl::encoding::Depth,
1150 ) -> fidl::Result<()> {
1151 decoder.debug_check_bounds::<Self>(offset);
1152 fidl::decode!(fidl::encoding::Vector<u8, 255>, D, &mut self.data, decoder, offset + 0, _depth)?;
1154 Ok(())
1155 }
1156 }
1157
1158 impl fidl::encoding::ValueTypeMarker for ExtentUnexpectedLength {
1159 type Borrowed<'a> = &'a Self;
1160 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1161 value
1162 }
1163 }
1164
1165 unsafe impl fidl::encoding::TypeMarker for ExtentUnexpectedLength {
1166 type Owned = Self;
1167
1168 #[inline(always)]
1169 fn inline_align(_context: fidl::encoding::Context) -> usize {
1170 8
1171 }
1172
1173 #[inline(always)]
1174 fn inline_size(_context: fidl::encoding::Context) -> usize {
1175 16
1176 }
1177 #[inline(always)]
1178 fn encode_is_copy() -> bool {
1179 true
1180 }
1181
1182 #[inline(always)]
1183 fn decode_is_copy() -> bool {
1184 true
1185 }
1186 }
1187
1188 unsafe impl<D: fidl::encoding::ResourceDialect>
1189 fidl::encoding::Encode<ExtentUnexpectedLength, D> for &ExtentUnexpectedLength
1190 {
1191 #[inline]
1192 unsafe fn encode(
1193 self,
1194 encoder: &mut fidl::encoding::Encoder<'_, D>,
1195 offset: usize,
1196 _depth: fidl::encoding::Depth,
1197 ) -> fidl::Result<()> {
1198 encoder.debug_check_bounds::<ExtentUnexpectedLength>(offset);
1199 unsafe {
1200 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1202 (buf_ptr as *mut ExtentUnexpectedLength)
1203 .write_unaligned((self as *const ExtentUnexpectedLength).read());
1204 }
1207 Ok(())
1208 }
1209 }
1210 unsafe impl<
1211 D: fidl::encoding::ResourceDialect,
1212 T0: fidl::encoding::Encode<u64, D>,
1213 T1: fidl::encoding::Encode<u64, D>,
1214 > fidl::encoding::Encode<ExtentUnexpectedLength, D> for (T0, T1)
1215 {
1216 #[inline]
1217 unsafe fn encode(
1218 self,
1219 encoder: &mut fidl::encoding::Encoder<'_, D>,
1220 offset: usize,
1221 depth: fidl::encoding::Depth,
1222 ) -> fidl::Result<()> {
1223 encoder.debug_check_bounds::<ExtentUnexpectedLength>(offset);
1224 self.0.encode(encoder, offset + 0, depth)?;
1228 self.1.encode(encoder, offset + 8, depth)?;
1229 Ok(())
1230 }
1231 }
1232
1233 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1234 for ExtentUnexpectedLength
1235 {
1236 #[inline(always)]
1237 fn new_empty() -> Self {
1238 Self { size: fidl::new_empty!(u64, D), expected: fidl::new_empty!(u64, D) }
1239 }
1240
1241 #[inline]
1242 unsafe fn decode(
1243 &mut self,
1244 decoder: &mut fidl::encoding::Decoder<'_, D>,
1245 offset: usize,
1246 _depth: fidl::encoding::Depth,
1247 ) -> fidl::Result<()> {
1248 decoder.debug_check_bounds::<Self>(offset);
1249 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1250 unsafe {
1253 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
1254 }
1255 Ok(())
1256 }
1257 }
1258
1259 impl fidl::encoding::ValueTypeMarker for Incompatible {
1260 type Borrowed<'a> = &'a Self;
1261 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1262 value
1263 }
1264 }
1265
1266 unsafe impl fidl::encoding::TypeMarker for Incompatible {
1267 type Owned = Self;
1268
1269 #[inline(always)]
1270 fn inline_align(_context: fidl::encoding::Context) -> usize {
1271 8
1272 }
1273
1274 #[inline(always)]
1275 fn inline_size(_context: fidl::encoding::Context) -> usize {
1276 16
1277 }
1278 }
1279
1280 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Incompatible, D>
1281 for &Incompatible
1282 {
1283 #[inline]
1284 unsafe fn encode(
1285 self,
1286 encoder: &mut fidl::encoding::Encoder<'_, D>,
1287 offset: usize,
1288 _depth: fidl::encoding::Depth,
1289 ) -> fidl::Result<()> {
1290 encoder.debug_check_bounds::<Incompatible>(offset);
1291 fidl::encoding::Encode::<Incompatible, D>::encode(
1293 (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
1294 &self.msg,
1295 ),),
1296 encoder,
1297 offset,
1298 _depth,
1299 )
1300 }
1301 }
1302 unsafe impl<
1303 D: fidl::encoding::ResourceDialect,
1304 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
1305 > fidl::encoding::Encode<Incompatible, D> for (T0,)
1306 {
1307 #[inline]
1308 unsafe fn encode(
1309 self,
1310 encoder: &mut fidl::encoding::Encoder<'_, D>,
1311 offset: usize,
1312 depth: fidl::encoding::Depth,
1313 ) -> fidl::Result<()> {
1314 encoder.debug_check_bounds::<Incompatible>(offset);
1315 self.0.encode(encoder, offset + 0, depth)?;
1319 Ok(())
1320 }
1321 }
1322
1323 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Incompatible {
1324 #[inline(always)]
1325 fn new_empty() -> Self {
1326 Self { msg: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
1327 }
1328
1329 #[inline]
1330 unsafe fn decode(
1331 &mut self,
1332 decoder: &mut fidl::encoding::Decoder<'_, D>,
1333 offset: usize,
1334 _depth: fidl::encoding::Depth,
1335 ) -> fidl::Result<()> {
1336 decoder.debug_check_bounds::<Self>(offset);
1337 fidl::decode!(
1339 fidl::encoding::BoundedString<1024>,
1340 D,
1341 &mut self.msg,
1342 decoder,
1343 offset + 0,
1344 _depth
1345 )?;
1346 Ok(())
1347 }
1348 }
1349
1350 impl fidl::encoding::ValueTypeMarker for InvalidAddress {
1351 type Borrowed<'a> = &'a Self;
1352 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1353 value
1354 }
1355 }
1356
1357 unsafe impl fidl::encoding::TypeMarker for InvalidAddress {
1358 type Owned = Self;
1359
1360 #[inline(always)]
1361 fn inline_align(_context: fidl::encoding::Context) -> usize {
1362 8
1363 }
1364
1365 #[inline(always)]
1366 fn inline_size(_context: fidl::encoding::Context) -> usize {
1367 24
1368 }
1369 }
1370
1371 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidAddress, D>
1372 for &InvalidAddress
1373 {
1374 #[inline]
1375 unsafe fn encode(
1376 self,
1377 encoder: &mut fidl::encoding::Encoder<'_, D>,
1378 offset: usize,
1379 _depth: fidl::encoding::Depth,
1380 ) -> fidl::Result<()> {
1381 encoder.debug_check_bounds::<InvalidAddress>(offset);
1382 fidl::encoding::Encode::<InvalidAddress, D>::encode(
1384 (
1385 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.position),
1386 <OutOfBoundsDirection as fidl::encoding::ValueTypeMarker>::borrow(
1387 &self.direction,
1388 ),
1389 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.bound),
1390 ),
1391 encoder,
1392 offset,
1393 _depth,
1394 )
1395 }
1396 }
1397 unsafe impl<
1398 D: fidl::encoding::ResourceDialect,
1399 T0: fidl::encoding::Encode<u64, D>,
1400 T1: fidl::encoding::Encode<OutOfBoundsDirection, D>,
1401 T2: fidl::encoding::Encode<u64, D>,
1402 > fidl::encoding::Encode<InvalidAddress, D> for (T0, T1, T2)
1403 {
1404 #[inline]
1405 unsafe fn encode(
1406 self,
1407 encoder: &mut fidl::encoding::Encoder<'_, D>,
1408 offset: usize,
1409 depth: fidl::encoding::Depth,
1410 ) -> fidl::Result<()> {
1411 encoder.debug_check_bounds::<InvalidAddress>(offset);
1412 unsafe {
1415 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
1416 (ptr as *mut u64).write_unaligned(0);
1417 }
1418 self.0.encode(encoder, offset + 0, depth)?;
1420 self.1.encode(encoder, offset + 8, depth)?;
1421 self.2.encode(encoder, offset + 16, depth)?;
1422 Ok(())
1423 }
1424 }
1425
1426 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidAddress {
1427 #[inline(always)]
1428 fn new_empty() -> Self {
1429 Self {
1430 position: fidl::new_empty!(u64, D),
1431 direction: fidl::new_empty!(OutOfBoundsDirection, D),
1432 bound: fidl::new_empty!(u64, D),
1433 }
1434 }
1435
1436 #[inline]
1437 unsafe fn decode(
1438 &mut self,
1439 decoder: &mut fidl::encoding::Decoder<'_, D>,
1440 offset: usize,
1441 _depth: fidl::encoding::Depth,
1442 ) -> fidl::Result<()> {
1443 decoder.debug_check_bounds::<Self>(offset);
1444 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
1446 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1447 let mask = 0xffffffff00000000u64;
1448 let maskedval = padval & mask;
1449 if maskedval != 0 {
1450 return Err(fidl::Error::NonZeroPadding {
1451 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
1452 });
1453 }
1454 fidl::decode!(u64, D, &mut self.position, decoder, offset + 0, _depth)?;
1455 fidl::decode!(
1456 OutOfBoundsDirection,
1457 D,
1458 &mut self.direction,
1459 decoder,
1460 offset + 8,
1461 _depth
1462 )?;
1463 fidl::decode!(u64, D, &mut self.bound, decoder, offset + 16, _depth)?;
1464 Ok(())
1465 }
1466 }
1467
1468 impl fidl::encoding::ValueTypeMarker for InvalidBlockGroupDesc {
1469 type Borrowed<'a> = &'a Self;
1470 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1471 value
1472 }
1473 }
1474
1475 unsafe impl fidl::encoding::TypeMarker for InvalidBlockGroupDesc {
1476 type Owned = Self;
1477
1478 #[inline(always)]
1479 fn inline_align(_context: fidl::encoding::Context) -> usize {
1480 8
1481 }
1482
1483 #[inline(always)]
1484 fn inline_size(_context: fidl::encoding::Context) -> usize {
1485 8
1486 }
1487 #[inline(always)]
1488 fn encode_is_copy() -> bool {
1489 true
1490 }
1491
1492 #[inline(always)]
1493 fn decode_is_copy() -> bool {
1494 true
1495 }
1496 }
1497
1498 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidBlockGroupDesc, D>
1499 for &InvalidBlockGroupDesc
1500 {
1501 #[inline]
1502 unsafe fn encode(
1503 self,
1504 encoder: &mut fidl::encoding::Encoder<'_, D>,
1505 offset: usize,
1506 _depth: fidl::encoding::Depth,
1507 ) -> fidl::Result<()> {
1508 encoder.debug_check_bounds::<InvalidBlockGroupDesc>(offset);
1509 unsafe {
1510 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1512 (buf_ptr as *mut InvalidBlockGroupDesc)
1513 .write_unaligned((self as *const InvalidBlockGroupDesc).read());
1514 }
1517 Ok(())
1518 }
1519 }
1520 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1521 fidl::encoding::Encode<InvalidBlockGroupDesc, D> for (T0,)
1522 {
1523 #[inline]
1524 unsafe fn encode(
1525 self,
1526 encoder: &mut fidl::encoding::Encoder<'_, D>,
1527 offset: usize,
1528 depth: fidl::encoding::Depth,
1529 ) -> fidl::Result<()> {
1530 encoder.debug_check_bounds::<InvalidBlockGroupDesc>(offset);
1531 self.0.encode(encoder, offset + 0, depth)?;
1535 Ok(())
1536 }
1537 }
1538
1539 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidBlockGroupDesc {
1540 #[inline(always)]
1541 fn new_empty() -> Self {
1542 Self { position: fidl::new_empty!(u64, D) }
1543 }
1544
1545 #[inline]
1546 unsafe fn decode(
1547 &mut self,
1548 decoder: &mut fidl::encoding::Decoder<'_, D>,
1549 offset: usize,
1550 _depth: fidl::encoding::Depth,
1551 ) -> fidl::Result<()> {
1552 decoder.debug_check_bounds::<Self>(offset);
1553 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1554 unsafe {
1557 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1558 }
1559 Ok(())
1560 }
1561 }
1562
1563 impl fidl::encoding::ValueTypeMarker for InvalidDirEntry2 {
1564 type Borrowed<'a> = &'a Self;
1565 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1566 value
1567 }
1568 }
1569
1570 unsafe impl fidl::encoding::TypeMarker for InvalidDirEntry2 {
1571 type Owned = Self;
1572
1573 #[inline(always)]
1574 fn inline_align(_context: fidl::encoding::Context) -> usize {
1575 8
1576 }
1577
1578 #[inline(always)]
1579 fn inline_size(_context: fidl::encoding::Context) -> usize {
1580 8
1581 }
1582 #[inline(always)]
1583 fn encode_is_copy() -> bool {
1584 true
1585 }
1586
1587 #[inline(always)]
1588 fn decode_is_copy() -> bool {
1589 true
1590 }
1591 }
1592
1593 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidDirEntry2, D>
1594 for &InvalidDirEntry2
1595 {
1596 #[inline]
1597 unsafe fn encode(
1598 self,
1599 encoder: &mut fidl::encoding::Encoder<'_, D>,
1600 offset: usize,
1601 _depth: fidl::encoding::Depth,
1602 ) -> fidl::Result<()> {
1603 encoder.debug_check_bounds::<InvalidDirEntry2>(offset);
1604 unsafe {
1605 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1607 (buf_ptr as *mut InvalidDirEntry2)
1608 .write_unaligned((self as *const InvalidDirEntry2).read());
1609 }
1612 Ok(())
1613 }
1614 }
1615 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1616 fidl::encoding::Encode<InvalidDirEntry2, D> for (T0,)
1617 {
1618 #[inline]
1619 unsafe fn encode(
1620 self,
1621 encoder: &mut fidl::encoding::Encoder<'_, D>,
1622 offset: usize,
1623 depth: fidl::encoding::Depth,
1624 ) -> fidl::Result<()> {
1625 encoder.debug_check_bounds::<InvalidDirEntry2>(offset);
1626 self.0.encode(encoder, offset + 0, depth)?;
1630 Ok(())
1631 }
1632 }
1633
1634 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidDirEntry2 {
1635 #[inline(always)]
1636 fn new_empty() -> Self {
1637 Self { position: fidl::new_empty!(u64, D) }
1638 }
1639
1640 #[inline]
1641 unsafe fn decode(
1642 &mut self,
1643 decoder: &mut fidl::encoding::Decoder<'_, D>,
1644 offset: usize,
1645 _depth: fidl::encoding::Depth,
1646 ) -> fidl::Result<()> {
1647 decoder.debug_check_bounds::<Self>(offset);
1648 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1649 unsafe {
1652 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1653 }
1654 Ok(())
1655 }
1656 }
1657
1658 impl fidl::encoding::ValueTypeMarker for InvalidExtent {
1659 type Borrowed<'a> = &'a Self;
1660 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1661 value
1662 }
1663 }
1664
1665 unsafe impl fidl::encoding::TypeMarker for InvalidExtent {
1666 type Owned = Self;
1667
1668 #[inline(always)]
1669 fn inline_align(_context: fidl::encoding::Context) -> usize {
1670 8
1671 }
1672
1673 #[inline(always)]
1674 fn inline_size(_context: fidl::encoding::Context) -> usize {
1675 8
1676 }
1677 #[inline(always)]
1678 fn encode_is_copy() -> bool {
1679 true
1680 }
1681
1682 #[inline(always)]
1683 fn decode_is_copy() -> bool {
1684 true
1685 }
1686 }
1687
1688 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidExtent, D>
1689 for &InvalidExtent
1690 {
1691 #[inline]
1692 unsafe fn encode(
1693 self,
1694 encoder: &mut fidl::encoding::Encoder<'_, D>,
1695 offset: usize,
1696 _depth: fidl::encoding::Depth,
1697 ) -> fidl::Result<()> {
1698 encoder.debug_check_bounds::<InvalidExtent>(offset);
1699 unsafe {
1700 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1702 (buf_ptr as *mut InvalidExtent)
1703 .write_unaligned((self as *const InvalidExtent).read());
1704 }
1707 Ok(())
1708 }
1709 }
1710 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1711 fidl::encoding::Encode<InvalidExtent, D> for (T0,)
1712 {
1713 #[inline]
1714 unsafe fn encode(
1715 self,
1716 encoder: &mut fidl::encoding::Encoder<'_, D>,
1717 offset: usize,
1718 depth: fidl::encoding::Depth,
1719 ) -> fidl::Result<()> {
1720 encoder.debug_check_bounds::<InvalidExtent>(offset);
1721 self.0.encode(encoder, offset + 0, depth)?;
1725 Ok(())
1726 }
1727 }
1728
1729 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidExtent {
1730 #[inline(always)]
1731 fn new_empty() -> Self {
1732 Self { position: fidl::new_empty!(u64, D) }
1733 }
1734
1735 #[inline]
1736 unsafe fn decode(
1737 &mut self,
1738 decoder: &mut fidl::encoding::Decoder<'_, D>,
1739 offset: usize,
1740 _depth: fidl::encoding::Depth,
1741 ) -> fidl::Result<()> {
1742 decoder.debug_check_bounds::<Self>(offset);
1743 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1744 unsafe {
1747 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1748 }
1749 Ok(())
1750 }
1751 }
1752
1753 impl fidl::encoding::ValueTypeMarker for InvalidExtentHeader {
1754 type Borrowed<'a> = &'a Self;
1755 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1756 value
1757 }
1758 }
1759
1760 unsafe impl fidl::encoding::TypeMarker for InvalidExtentHeader {
1761 type Owned = Self;
1762
1763 #[inline(always)]
1764 fn inline_align(_context: fidl::encoding::Context) -> usize {
1765 1
1766 }
1767
1768 #[inline(always)]
1769 fn inline_size(_context: fidl::encoding::Context) -> usize {
1770 1
1771 }
1772 }
1773
1774 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidExtentHeader, D>
1775 for &InvalidExtentHeader
1776 {
1777 #[inline]
1778 unsafe fn encode(
1779 self,
1780 encoder: &mut fidl::encoding::Encoder<'_, D>,
1781 offset: usize,
1782 _depth: fidl::encoding::Depth,
1783 ) -> fidl::Result<()> {
1784 encoder.debug_check_bounds::<InvalidExtentHeader>(offset);
1785 encoder.write_num(0u8, offset);
1786 Ok(())
1787 }
1788 }
1789
1790 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidExtentHeader {
1791 #[inline(always)]
1792 fn new_empty() -> Self {
1793 Self
1794 }
1795
1796 #[inline]
1797 unsafe fn decode(
1798 &mut self,
1799 decoder: &mut fidl::encoding::Decoder<'_, D>,
1800 offset: usize,
1801 _depth: fidl::encoding::Depth,
1802 ) -> fidl::Result<()> {
1803 decoder.debug_check_bounds::<Self>(offset);
1804 match decoder.read_num::<u8>(offset) {
1805 0 => Ok(()),
1806 _ => Err(fidl::Error::Invalid),
1807 }
1808 }
1809 }
1810
1811 impl fidl::encoding::ValueTypeMarker for InvalidExtentHeaderMagic {
1812 type Borrowed<'a> = &'a Self;
1813 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1814 value
1815 }
1816 }
1817
1818 unsafe impl fidl::encoding::TypeMarker for InvalidExtentHeaderMagic {
1819 type Owned = Self;
1820
1821 #[inline(always)]
1822 fn inline_align(_context: fidl::encoding::Context) -> usize {
1823 2
1824 }
1825
1826 #[inline(always)]
1827 fn inline_size(_context: fidl::encoding::Context) -> usize {
1828 2
1829 }
1830 #[inline(always)]
1831 fn encode_is_copy() -> bool {
1832 true
1833 }
1834
1835 #[inline(always)]
1836 fn decode_is_copy() -> bool {
1837 true
1838 }
1839 }
1840
1841 unsafe impl<D: fidl::encoding::ResourceDialect>
1842 fidl::encoding::Encode<InvalidExtentHeaderMagic, D> for &InvalidExtentHeaderMagic
1843 {
1844 #[inline]
1845 unsafe fn encode(
1846 self,
1847 encoder: &mut fidl::encoding::Encoder<'_, D>,
1848 offset: usize,
1849 _depth: fidl::encoding::Depth,
1850 ) -> fidl::Result<()> {
1851 encoder.debug_check_bounds::<InvalidExtentHeaderMagic>(offset);
1852 unsafe {
1853 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1855 (buf_ptr as *mut InvalidExtentHeaderMagic)
1856 .write_unaligned((self as *const InvalidExtentHeaderMagic).read());
1857 }
1860 Ok(())
1861 }
1862 }
1863 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1864 fidl::encoding::Encode<InvalidExtentHeaderMagic, D> for (T0,)
1865 {
1866 #[inline]
1867 unsafe fn encode(
1868 self,
1869 encoder: &mut fidl::encoding::Encoder<'_, D>,
1870 offset: usize,
1871 depth: fidl::encoding::Depth,
1872 ) -> fidl::Result<()> {
1873 encoder.debug_check_bounds::<InvalidExtentHeaderMagic>(offset);
1874 self.0.encode(encoder, offset + 0, depth)?;
1878 Ok(())
1879 }
1880 }
1881
1882 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1883 for InvalidExtentHeaderMagic
1884 {
1885 #[inline(always)]
1886 fn new_empty() -> Self {
1887 Self { value: fidl::new_empty!(u16, D) }
1888 }
1889
1890 #[inline]
1891 unsafe fn decode(
1892 &mut self,
1893 decoder: &mut fidl::encoding::Decoder<'_, D>,
1894 offset: usize,
1895 _depth: fidl::encoding::Depth,
1896 ) -> fidl::Result<()> {
1897 decoder.debug_check_bounds::<Self>(offset);
1898 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1899 unsafe {
1902 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1903 }
1904 Ok(())
1905 }
1906 }
1907
1908 impl fidl::encoding::ValueTypeMarker for InvalidINode {
1909 type Borrowed<'a> = &'a Self;
1910 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1911 value
1912 }
1913 }
1914
1915 unsafe impl fidl::encoding::TypeMarker for InvalidINode {
1916 type Owned = Self;
1917
1918 #[inline(always)]
1919 fn inline_align(_context: fidl::encoding::Context) -> usize {
1920 4
1921 }
1922
1923 #[inline(always)]
1924 fn inline_size(_context: fidl::encoding::Context) -> usize {
1925 4
1926 }
1927 #[inline(always)]
1928 fn encode_is_copy() -> bool {
1929 true
1930 }
1931
1932 #[inline(always)]
1933 fn decode_is_copy() -> bool {
1934 true
1935 }
1936 }
1937
1938 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidINode, D>
1939 for &InvalidINode
1940 {
1941 #[inline]
1942 unsafe fn encode(
1943 self,
1944 encoder: &mut fidl::encoding::Encoder<'_, D>,
1945 offset: usize,
1946 _depth: fidl::encoding::Depth,
1947 ) -> fidl::Result<()> {
1948 encoder.debug_check_bounds::<InvalidINode>(offset);
1949 unsafe {
1950 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1952 (buf_ptr as *mut InvalidINode)
1953 .write_unaligned((self as *const InvalidINode).read());
1954 }
1957 Ok(())
1958 }
1959 }
1960 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1961 fidl::encoding::Encode<InvalidINode, D> for (T0,)
1962 {
1963 #[inline]
1964 unsafe fn encode(
1965 self,
1966 encoder: &mut fidl::encoding::Encoder<'_, D>,
1967 offset: usize,
1968 depth: fidl::encoding::Depth,
1969 ) -> fidl::Result<()> {
1970 encoder.debug_check_bounds::<InvalidINode>(offset);
1971 self.0.encode(encoder, offset + 0, depth)?;
1975 Ok(())
1976 }
1977 }
1978
1979 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidINode {
1980 #[inline(always)]
1981 fn new_empty() -> Self {
1982 Self { inode_number: fidl::new_empty!(u32, D) }
1983 }
1984
1985 #[inline]
1986 unsafe fn decode(
1987 &mut self,
1988 decoder: &mut fidl::encoding::Decoder<'_, D>,
1989 offset: usize,
1990 _depth: fidl::encoding::Depth,
1991 ) -> fidl::Result<()> {
1992 decoder.debug_check_bounds::<Self>(offset);
1993 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1994 unsafe {
1997 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1998 }
1999 Ok(())
2000 }
2001 }
2002
2003 impl fidl::encoding::ValueTypeMarker for InvalidInputPath {
2004 type Borrowed<'a> = &'a Self;
2005 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2006 value
2007 }
2008 }
2009
2010 unsafe impl fidl::encoding::TypeMarker for InvalidInputPath {
2011 type Owned = Self;
2012
2013 #[inline(always)]
2014 fn inline_align(_context: fidl::encoding::Context) -> usize {
2015 8
2016 }
2017
2018 #[inline(always)]
2019 fn inline_size(_context: fidl::encoding::Context) -> usize {
2020 16
2021 }
2022 }
2023
2024 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidInputPath, D>
2025 for &InvalidInputPath
2026 {
2027 #[inline]
2028 unsafe fn encode(
2029 self,
2030 encoder: &mut fidl::encoding::Encoder<'_, D>,
2031 offset: usize,
2032 _depth: fidl::encoding::Depth,
2033 ) -> fidl::Result<()> {
2034 encoder.debug_check_bounds::<InvalidInputPath>(offset);
2035 fidl::encoding::Encode::<InvalidInputPath, D>::encode(
2037 (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
2038 &self.path,
2039 ),),
2040 encoder,
2041 offset,
2042 _depth,
2043 )
2044 }
2045 }
2046 unsafe impl<
2047 D: fidl::encoding::ResourceDialect,
2048 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
2049 > fidl::encoding::Encode<InvalidInputPath, D> for (T0,)
2050 {
2051 #[inline]
2052 unsafe fn encode(
2053 self,
2054 encoder: &mut fidl::encoding::Encoder<'_, D>,
2055 offset: usize,
2056 depth: fidl::encoding::Depth,
2057 ) -> fidl::Result<()> {
2058 encoder.debug_check_bounds::<InvalidInputPath>(offset);
2059 self.0.encode(encoder, offset + 0, depth)?;
2063 Ok(())
2064 }
2065 }
2066
2067 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidInputPath {
2068 #[inline(always)]
2069 fn new_empty() -> Self {
2070 Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
2071 }
2072
2073 #[inline]
2074 unsafe fn decode(
2075 &mut self,
2076 decoder: &mut fidl::encoding::Decoder<'_, D>,
2077 offset: usize,
2078 _depth: fidl::encoding::Depth,
2079 ) -> fidl::Result<()> {
2080 decoder.debug_check_bounds::<Self>(offset);
2081 fidl::decode!(
2083 fidl::encoding::BoundedString<1024>,
2084 D,
2085 &mut self.path,
2086 decoder,
2087 offset + 0,
2088 _depth
2089 )?;
2090 Ok(())
2091 }
2092 }
2093
2094 impl fidl::encoding::ValueTypeMarker for InvalidSuperBlock {
2095 type Borrowed<'a> = &'a Self;
2096 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2097 value
2098 }
2099 }
2100
2101 unsafe impl fidl::encoding::TypeMarker for InvalidSuperBlock {
2102 type Owned = Self;
2103
2104 #[inline(always)]
2105 fn inline_align(_context: fidl::encoding::Context) -> usize {
2106 8
2107 }
2108
2109 #[inline(always)]
2110 fn inline_size(_context: fidl::encoding::Context) -> usize {
2111 8
2112 }
2113 #[inline(always)]
2114 fn encode_is_copy() -> bool {
2115 true
2116 }
2117
2118 #[inline(always)]
2119 fn decode_is_copy() -> bool {
2120 true
2121 }
2122 }
2123
2124 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidSuperBlock, D>
2125 for &InvalidSuperBlock
2126 {
2127 #[inline]
2128 unsafe fn encode(
2129 self,
2130 encoder: &mut fidl::encoding::Encoder<'_, D>,
2131 offset: usize,
2132 _depth: fidl::encoding::Depth,
2133 ) -> fidl::Result<()> {
2134 encoder.debug_check_bounds::<InvalidSuperBlock>(offset);
2135 unsafe {
2136 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2138 (buf_ptr as *mut InvalidSuperBlock)
2139 .write_unaligned((self as *const InvalidSuperBlock).read());
2140 }
2143 Ok(())
2144 }
2145 }
2146 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2147 fidl::encoding::Encode<InvalidSuperBlock, D> for (T0,)
2148 {
2149 #[inline]
2150 unsafe fn encode(
2151 self,
2152 encoder: &mut fidl::encoding::Encoder<'_, D>,
2153 offset: usize,
2154 depth: fidl::encoding::Depth,
2155 ) -> fidl::Result<()> {
2156 encoder.debug_check_bounds::<InvalidSuperBlock>(offset);
2157 self.0.encode(encoder, offset + 0, depth)?;
2161 Ok(())
2162 }
2163 }
2164
2165 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidSuperBlock {
2166 #[inline(always)]
2167 fn new_empty() -> Self {
2168 Self { position: fidl::new_empty!(u64, D) }
2169 }
2170
2171 #[inline]
2172 unsafe fn decode(
2173 &mut self,
2174 decoder: &mut fidl::encoding::Decoder<'_, D>,
2175 offset: usize,
2176 _depth: fidl::encoding::Depth,
2177 ) -> fidl::Result<()> {
2178 decoder.debug_check_bounds::<Self>(offset);
2179 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2180 unsafe {
2183 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2184 }
2185 Ok(())
2186 }
2187 }
2188
2189 impl fidl::encoding::ValueTypeMarker for InvalidSuperBlockMagic {
2190 type Borrowed<'a> = &'a Self;
2191 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2192 value
2193 }
2194 }
2195
2196 unsafe impl fidl::encoding::TypeMarker for InvalidSuperBlockMagic {
2197 type Owned = Self;
2198
2199 #[inline(always)]
2200 fn inline_align(_context: fidl::encoding::Context) -> usize {
2201 2
2202 }
2203
2204 #[inline(always)]
2205 fn inline_size(_context: fidl::encoding::Context) -> usize {
2206 2
2207 }
2208 #[inline(always)]
2209 fn encode_is_copy() -> bool {
2210 true
2211 }
2212
2213 #[inline(always)]
2214 fn decode_is_copy() -> bool {
2215 true
2216 }
2217 }
2218
2219 unsafe impl<D: fidl::encoding::ResourceDialect>
2220 fidl::encoding::Encode<InvalidSuperBlockMagic, D> for &InvalidSuperBlockMagic
2221 {
2222 #[inline]
2223 unsafe fn encode(
2224 self,
2225 encoder: &mut fidl::encoding::Encoder<'_, D>,
2226 offset: usize,
2227 _depth: fidl::encoding::Depth,
2228 ) -> fidl::Result<()> {
2229 encoder.debug_check_bounds::<InvalidSuperBlockMagic>(offset);
2230 unsafe {
2231 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2233 (buf_ptr as *mut InvalidSuperBlockMagic)
2234 .write_unaligned((self as *const InvalidSuperBlockMagic).read());
2235 }
2238 Ok(())
2239 }
2240 }
2241 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
2242 fidl::encoding::Encode<InvalidSuperBlockMagic, D> for (T0,)
2243 {
2244 #[inline]
2245 unsafe fn encode(
2246 self,
2247 encoder: &mut fidl::encoding::Encoder<'_, D>,
2248 offset: usize,
2249 depth: fidl::encoding::Depth,
2250 ) -> fidl::Result<()> {
2251 encoder.debug_check_bounds::<InvalidSuperBlockMagic>(offset);
2252 self.0.encode(encoder, offset + 0, depth)?;
2256 Ok(())
2257 }
2258 }
2259
2260 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2261 for InvalidSuperBlockMagic
2262 {
2263 #[inline(always)]
2264 fn new_empty() -> Self {
2265 Self { value: fidl::new_empty!(u16, D) }
2266 }
2267
2268 #[inline]
2269 unsafe fn decode(
2270 &mut self,
2271 decoder: &mut fidl::encoding::Decoder<'_, D>,
2272 offset: usize,
2273 _depth: fidl::encoding::Depth,
2274 ) -> fidl::Result<()> {
2275 decoder.debug_check_bounds::<Self>(offset);
2276 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2277 unsafe {
2280 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2281 }
2282 Ok(())
2283 }
2284 }
2285
2286 impl fidl::encoding::ValueTypeMarker for PathNotFound {
2287 type Borrowed<'a> = &'a Self;
2288 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2289 value
2290 }
2291 }
2292
2293 unsafe impl fidl::encoding::TypeMarker for PathNotFound {
2294 type Owned = Self;
2295
2296 #[inline(always)]
2297 fn inline_align(_context: fidl::encoding::Context) -> usize {
2298 8
2299 }
2300
2301 #[inline(always)]
2302 fn inline_size(_context: fidl::encoding::Context) -> usize {
2303 16
2304 }
2305 }
2306
2307 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PathNotFound, D>
2308 for &PathNotFound
2309 {
2310 #[inline]
2311 unsafe fn encode(
2312 self,
2313 encoder: &mut fidl::encoding::Encoder<'_, D>,
2314 offset: usize,
2315 _depth: fidl::encoding::Depth,
2316 ) -> fidl::Result<()> {
2317 encoder.debug_check_bounds::<PathNotFound>(offset);
2318 fidl::encoding::Encode::<PathNotFound, D>::encode(
2320 (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
2321 &self.path,
2322 ),),
2323 encoder,
2324 offset,
2325 _depth,
2326 )
2327 }
2328 }
2329 unsafe impl<
2330 D: fidl::encoding::ResourceDialect,
2331 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
2332 > fidl::encoding::Encode<PathNotFound, D> for (T0,)
2333 {
2334 #[inline]
2335 unsafe fn encode(
2336 self,
2337 encoder: &mut fidl::encoding::Encoder<'_, D>,
2338 offset: usize,
2339 depth: fidl::encoding::Depth,
2340 ) -> fidl::Result<()> {
2341 encoder.debug_check_bounds::<PathNotFound>(offset);
2342 self.0.encode(encoder, offset + 0, depth)?;
2346 Ok(())
2347 }
2348 }
2349
2350 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PathNotFound {
2351 #[inline(always)]
2352 fn new_empty() -> Self {
2353 Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
2354 }
2355
2356 #[inline]
2357 unsafe fn decode(
2358 &mut self,
2359 decoder: &mut fidl::encoding::Decoder<'_, D>,
2360 offset: usize,
2361 _depth: fidl::encoding::Depth,
2362 ) -> fidl::Result<()> {
2363 decoder.debug_check_bounds::<Self>(offset);
2364 fidl::decode!(
2366 fidl::encoding::BoundedString<1024>,
2367 D,
2368 &mut self.path,
2369 decoder,
2370 offset + 0,
2371 _depth
2372 )?;
2373 Ok(())
2374 }
2375 }
2376
2377 impl fidl::encoding::ValueTypeMarker for ReaderOutOfBounds {
2378 type Borrowed<'a> = &'a Self;
2379 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2380 value
2381 }
2382 }
2383
2384 unsafe impl fidl::encoding::TypeMarker for ReaderOutOfBounds {
2385 type Owned = Self;
2386
2387 #[inline(always)]
2388 fn inline_align(_context: fidl::encoding::Context) -> usize {
2389 8
2390 }
2391
2392 #[inline(always)]
2393 fn inline_size(_context: fidl::encoding::Context) -> usize {
2394 16
2395 }
2396 #[inline(always)]
2397 fn encode_is_copy() -> bool {
2398 true
2399 }
2400
2401 #[inline(always)]
2402 fn decode_is_copy() -> bool {
2403 true
2404 }
2405 }
2406
2407 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReaderOutOfBounds, D>
2408 for &ReaderOutOfBounds
2409 {
2410 #[inline]
2411 unsafe fn encode(
2412 self,
2413 encoder: &mut fidl::encoding::Encoder<'_, D>,
2414 offset: usize,
2415 _depth: fidl::encoding::Depth,
2416 ) -> fidl::Result<()> {
2417 encoder.debug_check_bounds::<ReaderOutOfBounds>(offset);
2418 unsafe {
2419 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2421 (buf_ptr as *mut ReaderOutOfBounds)
2422 .write_unaligned((self as *const ReaderOutOfBounds).read());
2423 }
2426 Ok(())
2427 }
2428 }
2429 unsafe impl<
2430 D: fidl::encoding::ResourceDialect,
2431 T0: fidl::encoding::Encode<u64, D>,
2432 T1: fidl::encoding::Encode<u64, D>,
2433 > fidl::encoding::Encode<ReaderOutOfBounds, D> for (T0, T1)
2434 {
2435 #[inline]
2436 unsafe fn encode(
2437 self,
2438 encoder: &mut fidl::encoding::Encoder<'_, D>,
2439 offset: usize,
2440 depth: fidl::encoding::Depth,
2441 ) -> fidl::Result<()> {
2442 encoder.debug_check_bounds::<ReaderOutOfBounds>(offset);
2443 self.0.encode(encoder, offset + 0, depth)?;
2447 self.1.encode(encoder, offset + 8, depth)?;
2448 Ok(())
2449 }
2450 }
2451
2452 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReaderOutOfBounds {
2453 #[inline(always)]
2454 fn new_empty() -> Self {
2455 Self { position: fidl::new_empty!(u64, D), size: fidl::new_empty!(u64, D) }
2456 }
2457
2458 #[inline]
2459 unsafe fn decode(
2460 &mut self,
2461 decoder: &mut fidl::encoding::Decoder<'_, D>,
2462 offset: usize,
2463 _depth: fidl::encoding::Depth,
2464 ) -> fidl::Result<()> {
2465 decoder.debug_check_bounds::<Self>(offset);
2466 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2467 unsafe {
2470 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
2471 }
2472 Ok(())
2473 }
2474 }
2475
2476 impl fidl::encoding::ValueTypeMarker for ReaderReadError {
2477 type Borrowed<'a> = &'a Self;
2478 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2479 value
2480 }
2481 }
2482
2483 unsafe impl fidl::encoding::TypeMarker for ReaderReadError {
2484 type Owned = Self;
2485
2486 #[inline(always)]
2487 fn inline_align(_context: fidl::encoding::Context) -> usize {
2488 8
2489 }
2490
2491 #[inline(always)]
2492 fn inline_size(_context: fidl::encoding::Context) -> usize {
2493 8
2494 }
2495 #[inline(always)]
2496 fn encode_is_copy() -> bool {
2497 true
2498 }
2499
2500 #[inline(always)]
2501 fn decode_is_copy() -> bool {
2502 true
2503 }
2504 }
2505
2506 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReaderReadError, D>
2507 for &ReaderReadError
2508 {
2509 #[inline]
2510 unsafe fn encode(
2511 self,
2512 encoder: &mut fidl::encoding::Encoder<'_, D>,
2513 offset: usize,
2514 _depth: fidl::encoding::Depth,
2515 ) -> fidl::Result<()> {
2516 encoder.debug_check_bounds::<ReaderReadError>(offset);
2517 unsafe {
2518 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2520 (buf_ptr as *mut ReaderReadError)
2521 .write_unaligned((self as *const ReaderReadError).read());
2522 }
2525 Ok(())
2526 }
2527 }
2528 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2529 fidl::encoding::Encode<ReaderReadError, D> for (T0,)
2530 {
2531 #[inline]
2532 unsafe fn encode(
2533 self,
2534 encoder: &mut fidl::encoding::Encoder<'_, D>,
2535 offset: usize,
2536 depth: fidl::encoding::Depth,
2537 ) -> fidl::Result<()> {
2538 encoder.debug_check_bounds::<ReaderReadError>(offset);
2539 self.0.encode(encoder, offset + 0, depth)?;
2543 Ok(())
2544 }
2545 }
2546
2547 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReaderReadError {
2548 #[inline(always)]
2549 fn new_empty() -> Self {
2550 Self { position: fidl::new_empty!(u64, D) }
2551 }
2552
2553 #[inline]
2554 unsafe fn decode(
2555 &mut self,
2556 decoder: &mut fidl::encoding::Decoder<'_, D>,
2557 offset: usize,
2558 _depth: fidl::encoding::Depth,
2559 ) -> fidl::Result<()> {
2560 decoder.debug_check_bounds::<Self>(offset);
2561 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2562 unsafe {
2565 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2566 }
2567 Ok(())
2568 }
2569 }
2570
2571 impl fidl::encoding::ValueTypeMarker for RequiredFeatureIncompat {
2572 type Borrowed<'a> = &'a Self;
2573 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2574 value
2575 }
2576 }
2577
2578 unsafe impl fidl::encoding::TypeMarker for RequiredFeatureIncompat {
2579 type Owned = Self;
2580
2581 #[inline(always)]
2582 fn inline_align(_context: fidl::encoding::Context) -> usize {
2583 4
2584 }
2585
2586 #[inline(always)]
2587 fn inline_size(_context: fidl::encoding::Context) -> usize {
2588 4
2589 }
2590 #[inline(always)]
2591 fn encode_is_copy() -> bool {
2592 true
2593 }
2594
2595 #[inline(always)]
2596 fn decode_is_copy() -> bool {
2597 true
2598 }
2599 }
2600
2601 unsafe impl<D: fidl::encoding::ResourceDialect>
2602 fidl::encoding::Encode<RequiredFeatureIncompat, D> for &RequiredFeatureIncompat
2603 {
2604 #[inline]
2605 unsafe fn encode(
2606 self,
2607 encoder: &mut fidl::encoding::Encoder<'_, D>,
2608 offset: usize,
2609 _depth: fidl::encoding::Depth,
2610 ) -> fidl::Result<()> {
2611 encoder.debug_check_bounds::<RequiredFeatureIncompat>(offset);
2612 unsafe {
2613 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2615 (buf_ptr as *mut RequiredFeatureIncompat)
2616 .write_unaligned((self as *const RequiredFeatureIncompat).read());
2617 }
2620 Ok(())
2621 }
2622 }
2623 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
2624 fidl::encoding::Encode<RequiredFeatureIncompat, D> for (T0,)
2625 {
2626 #[inline]
2627 unsafe fn encode(
2628 self,
2629 encoder: &mut fidl::encoding::Encoder<'_, D>,
2630 offset: usize,
2631 depth: fidl::encoding::Depth,
2632 ) -> fidl::Result<()> {
2633 encoder.debug_check_bounds::<RequiredFeatureIncompat>(offset);
2634 self.0.encode(encoder, offset + 0, depth)?;
2638 Ok(())
2639 }
2640 }
2641
2642 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2643 for RequiredFeatureIncompat
2644 {
2645 #[inline(always)]
2646 fn new_empty() -> Self {
2647 Self { value: fidl::new_empty!(u32, D) }
2648 }
2649
2650 #[inline]
2651 unsafe fn decode(
2652 &mut self,
2653 decoder: &mut fidl::encoding::Decoder<'_, D>,
2654 offset: usize,
2655 _depth: fidl::encoding::Depth,
2656 ) -> fidl::Result<()> {
2657 decoder.debug_check_bounds::<Self>(offset);
2658 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2659 unsafe {
2662 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2663 }
2664 Ok(())
2665 }
2666 }
2667
2668 impl fidl::encoding::ValueTypeMarker for ServerMountVmoResponse {
2669 type Borrowed<'a> = &'a Self;
2670 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2671 value
2672 }
2673 }
2674
2675 unsafe impl fidl::encoding::TypeMarker for ServerMountVmoResponse {
2676 type Owned = Self;
2677
2678 #[inline(always)]
2679 fn inline_align(_context: fidl::encoding::Context) -> usize {
2680 8
2681 }
2682
2683 #[inline(always)]
2684 fn inline_size(_context: fidl::encoding::Context) -> usize {
2685 16
2686 }
2687 }
2688
2689 unsafe impl<D: fidl::encoding::ResourceDialect>
2690 fidl::encoding::Encode<ServerMountVmoResponse, D> for &ServerMountVmoResponse
2691 {
2692 #[inline]
2693 unsafe fn encode(
2694 self,
2695 encoder: &mut fidl::encoding::Encoder<'_, D>,
2696 offset: usize,
2697 _depth: fidl::encoding::Depth,
2698 ) -> fidl::Result<()> {
2699 encoder.debug_check_bounds::<ServerMountVmoResponse>(offset);
2700 fidl::encoding::Encode::<ServerMountVmoResponse, D>::encode(
2702 (<MountVmoResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
2703 encoder,
2704 offset,
2705 _depth,
2706 )
2707 }
2708 }
2709 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<MountVmoResult, D>>
2710 fidl::encoding::Encode<ServerMountVmoResponse, D> for (T0,)
2711 {
2712 #[inline]
2713 unsafe fn encode(
2714 self,
2715 encoder: &mut fidl::encoding::Encoder<'_, D>,
2716 offset: usize,
2717 depth: fidl::encoding::Depth,
2718 ) -> fidl::Result<()> {
2719 encoder.debug_check_bounds::<ServerMountVmoResponse>(offset);
2720 self.0.encode(encoder, offset + 0, depth)?;
2724 Ok(())
2725 }
2726 }
2727
2728 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2729 for ServerMountVmoResponse
2730 {
2731 #[inline(always)]
2732 fn new_empty() -> Self {
2733 Self { result: fidl::new_empty!(MountVmoResult, D) }
2734 }
2735
2736 #[inline]
2737 unsafe fn decode(
2738 &mut self,
2739 decoder: &mut fidl::encoding::Decoder<'_, D>,
2740 offset: usize,
2741 _depth: fidl::encoding::Depth,
2742 ) -> fidl::Result<()> {
2743 decoder.debug_check_bounds::<Self>(offset);
2744 fidl::decode!(MountVmoResult, D, &mut self.result, decoder, offset + 0, _depth)?;
2746 Ok(())
2747 }
2748 }
2749
2750 impl fidl::encoding::ValueTypeMarker for Success {
2751 type Borrowed<'a> = &'a Self;
2752 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2753 value
2754 }
2755 }
2756
2757 unsafe impl fidl::encoding::TypeMarker for Success {
2758 type Owned = Self;
2759
2760 #[inline(always)]
2761 fn inline_align(_context: fidl::encoding::Context) -> usize {
2762 1
2763 }
2764
2765 #[inline(always)]
2766 fn inline_size(_context: fidl::encoding::Context) -> usize {
2767 1
2768 }
2769 }
2770
2771 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Success, D> for &Success {
2772 #[inline]
2773 unsafe fn encode(
2774 self,
2775 encoder: &mut fidl::encoding::Encoder<'_, D>,
2776 offset: usize,
2777 _depth: fidl::encoding::Depth,
2778 ) -> fidl::Result<()> {
2779 encoder.debug_check_bounds::<Success>(offset);
2780 encoder.write_num(0u8, offset);
2781 Ok(())
2782 }
2783 }
2784
2785 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Success {
2786 #[inline(always)]
2787 fn new_empty() -> Self {
2788 Self
2789 }
2790
2791 #[inline]
2792 unsafe fn decode(
2793 &mut self,
2794 decoder: &mut fidl::encoding::Decoder<'_, D>,
2795 offset: usize,
2796 _depth: fidl::encoding::Depth,
2797 ) -> fidl::Result<()> {
2798 decoder.debug_check_bounds::<Self>(offset);
2799 match decoder.read_num::<u8>(offset) {
2800 0 => Ok(()),
2801 _ => Err(fidl::Error::Invalid),
2802 }
2803 }
2804 }
2805
2806 impl fidl::encoding::ValueTypeMarker for MountVmoResult {
2807 type Borrowed<'a> = &'a Self;
2808 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2809 value
2810 }
2811 }
2812
2813 unsafe impl fidl::encoding::TypeMarker for MountVmoResult {
2814 type Owned = Self;
2815
2816 #[inline(always)]
2817 fn inline_align(_context: fidl::encoding::Context) -> usize {
2818 8
2819 }
2820
2821 #[inline(always)]
2822 fn inline_size(_context: fidl::encoding::Context) -> usize {
2823 16
2824 }
2825 }
2826
2827 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MountVmoResult, D>
2828 for &MountVmoResult
2829 {
2830 #[inline]
2831 unsafe fn encode(
2832 self,
2833 encoder: &mut fidl::encoding::Encoder<'_, D>,
2834 offset: usize,
2835 _depth: fidl::encoding::Depth,
2836 ) -> fidl::Result<()> {
2837 encoder.debug_check_bounds::<MountVmoResult>(offset);
2838 encoder.write_num::<u64>(self.ordinal(), offset);
2839 match self {
2840 MountVmoResult::Success(ref val) => {
2841 fidl::encoding::encode_in_envelope::<Success, D>(
2842 <Success as fidl::encoding::ValueTypeMarker>::borrow(val),
2843 encoder,
2844 offset + 8,
2845 _depth,
2846 )
2847 }
2848 MountVmoResult::VmoReadFailure(ref val) => {
2849 fidl::encoding::encode_in_envelope::<i32, D>(
2850 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
2851 encoder,
2852 offset + 8,
2853 _depth,
2854 )
2855 }
2856 MountVmoResult::ParseError(ref val) => {
2857 fidl::encoding::encode_in_envelope::<ParseError, D>(
2858 <ParseError as fidl::encoding::ValueTypeMarker>::borrow(val),
2859 encoder,
2860 offset + 8,
2861 _depth,
2862 )
2863 }
2864 MountVmoResult::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
2865 }
2866 }
2867 }
2868
2869 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MountVmoResult {
2870 #[inline(always)]
2871 fn new_empty() -> Self {
2872 Self::__SourceBreaking { unknown_ordinal: 0 }
2873 }
2874
2875 #[inline]
2876 unsafe fn decode(
2877 &mut self,
2878 decoder: &mut fidl::encoding::Decoder<'_, D>,
2879 offset: usize,
2880 mut depth: fidl::encoding::Depth,
2881 ) -> fidl::Result<()> {
2882 decoder.debug_check_bounds::<Self>(offset);
2883 #[allow(unused_variables)]
2884 let next_out_of_line = decoder.next_out_of_line();
2885 let handles_before = decoder.remaining_handles();
2886 let (ordinal, inlined, num_bytes, num_handles) =
2887 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
2888
2889 let member_inline_size = match ordinal {
2890 1 => <Success as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2891 2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2892 3 => <ParseError as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2893 0 => return Err(fidl::Error::UnknownUnionTag),
2894 _ => num_bytes as usize,
2895 };
2896
2897 if inlined != (member_inline_size <= 4) {
2898 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2899 }
2900 let _inner_offset;
2901 if inlined {
2902 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
2903 _inner_offset = offset + 8;
2904 } else {
2905 depth.increment()?;
2906 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2907 }
2908 match ordinal {
2909 1 => {
2910 #[allow(irrefutable_let_patterns)]
2911 if let MountVmoResult::Success(_) = self {
2912 } else {
2914 *self = MountVmoResult::Success(fidl::new_empty!(Success, D));
2916 }
2917 #[allow(irrefutable_let_patterns)]
2918 if let MountVmoResult::Success(ref mut val) = self {
2919 fidl::decode!(Success, D, val, decoder, _inner_offset, depth)?;
2920 } else {
2921 unreachable!()
2922 }
2923 }
2924 2 => {
2925 #[allow(irrefutable_let_patterns)]
2926 if let MountVmoResult::VmoReadFailure(_) = self {
2927 } else {
2929 *self = MountVmoResult::VmoReadFailure(fidl::new_empty!(i32, D));
2931 }
2932 #[allow(irrefutable_let_patterns)]
2933 if let MountVmoResult::VmoReadFailure(ref mut val) = self {
2934 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
2935 } else {
2936 unreachable!()
2937 }
2938 }
2939 3 => {
2940 #[allow(irrefutable_let_patterns)]
2941 if let MountVmoResult::ParseError(_) = self {
2942 } else {
2944 *self = MountVmoResult::ParseError(fidl::new_empty!(ParseError, D));
2946 }
2947 #[allow(irrefutable_let_patterns)]
2948 if let MountVmoResult::ParseError(ref mut val) = self {
2949 fidl::decode!(ParseError, D, val, decoder, _inner_offset, depth)?;
2950 } else {
2951 unreachable!()
2952 }
2953 }
2954 #[allow(deprecated)]
2955 ordinal => {
2956 for _ in 0..num_handles {
2957 decoder.drop_next_handle()?;
2958 }
2959 *self = MountVmoResult::__SourceBreaking { unknown_ordinal: ordinal };
2960 }
2961 }
2962 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
2963 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2964 }
2965 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2966 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2967 }
2968 Ok(())
2969 }
2970 }
2971
2972 impl fidl::encoding::ValueTypeMarker for ParseError {
2973 type Borrowed<'a> = &'a Self;
2974 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2975 value
2976 }
2977 }
2978
2979 unsafe impl fidl::encoding::TypeMarker for ParseError {
2980 type Owned = Self;
2981
2982 #[inline(always)]
2983 fn inline_align(_context: fidl::encoding::Context) -> usize {
2984 8
2985 }
2986
2987 #[inline(always)]
2988 fn inline_size(_context: fidl::encoding::Context) -> usize {
2989 16
2990 }
2991 }
2992
2993 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ParseError, D>
2994 for &ParseError
2995 {
2996 #[inline]
2997 unsafe fn encode(
2998 self,
2999 encoder: &mut fidl::encoding::Encoder<'_, D>,
3000 offset: usize,
3001 _depth: fidl::encoding::Depth,
3002 ) -> fidl::Result<()> {
3003 encoder.debug_check_bounds::<ParseError>(offset);
3004 encoder.write_num::<u64>(self.ordinal(), offset);
3005 match self {
3006 ParseError::InvalidSuperBlock(ref val) => {
3007 fidl::encoding::encode_in_envelope::<InvalidSuperBlock, D>(
3008 <InvalidSuperBlock as fidl::encoding::ValueTypeMarker>::borrow(val),
3009 encoder,
3010 offset + 8,
3011 _depth,
3012 )
3013 }
3014 ParseError::InvalidSuperBlockMagic(ref val) => {
3015 fidl::encoding::encode_in_envelope::<InvalidSuperBlockMagic, D>(
3016 <InvalidSuperBlockMagic as fidl::encoding::ValueTypeMarker>::borrow(val),
3017 encoder,
3018 offset + 8,
3019 _depth,
3020 )
3021 }
3022 ParseError::BlockNumberOutOfBounds(ref val) => {
3023 fidl::encoding::encode_in_envelope::<BlockNumberOutOfBounds, D>(
3024 <BlockNumberOutOfBounds as fidl::encoding::ValueTypeMarker>::borrow(val),
3025 encoder,
3026 offset + 8,
3027 _depth,
3028 )
3029 }
3030 ParseError::BlockSizeInvalid(ref val) => {
3031 fidl::encoding::encode_in_envelope::<BlockSizeInvalid, D>(
3032 <BlockSizeInvalid as fidl::encoding::ValueTypeMarker>::borrow(val),
3033 encoder,
3034 offset + 8,
3035 _depth,
3036 )
3037 }
3038 ParseError::InvalidBlockGroupDesc(ref val) => {
3039 fidl::encoding::encode_in_envelope::<InvalidBlockGroupDesc, D>(
3040 <InvalidBlockGroupDesc as fidl::encoding::ValueTypeMarker>::borrow(val),
3041 encoder,
3042 offset + 8,
3043 _depth,
3044 )
3045 }
3046 ParseError::InvalidInode(ref val) => {
3047 fidl::encoding::encode_in_envelope::<InvalidINode, D>(
3048 <InvalidINode as fidl::encoding::ValueTypeMarker>::borrow(val),
3049 encoder,
3050 offset + 8,
3051 _depth,
3052 )
3053 }
3054 ParseError::InvalidExtentHeader(ref val) => {
3055 fidl::encoding::encode_in_envelope::<InvalidExtentHeader, D>(
3056 <InvalidExtentHeader as fidl::encoding::ValueTypeMarker>::borrow(val),
3057 encoder,
3058 offset + 8,
3059 _depth,
3060 )
3061 }
3062 ParseError::InvalidExtentHeaderMagic(ref val) => {
3063 fidl::encoding::encode_in_envelope::<InvalidExtentHeaderMagic, D>(
3064 <InvalidExtentHeaderMagic as fidl::encoding::ValueTypeMarker>::borrow(val),
3065 encoder,
3066 offset + 8,
3067 _depth,
3068 )
3069 }
3070 ParseError::InvalidExtent(ref val) => {
3071 fidl::encoding::encode_in_envelope::<InvalidExtent, D>(
3072 <InvalidExtent as fidl::encoding::ValueTypeMarker>::borrow(val),
3073 encoder,
3074 offset + 8,
3075 _depth,
3076 )
3077 }
3078 ParseError::ExtentUnexpectedLength(ref val) => {
3079 fidl::encoding::encode_in_envelope::<ExtentUnexpectedLength, D>(
3080 <ExtentUnexpectedLength as fidl::encoding::ValueTypeMarker>::borrow(val),
3081 encoder,
3082 offset + 8,
3083 _depth,
3084 )
3085 }
3086 ParseError::InvalidDirEntry2(ref val) => {
3087 fidl::encoding::encode_in_envelope::<InvalidDirEntry2, D>(
3088 <InvalidDirEntry2 as fidl::encoding::ValueTypeMarker>::borrow(val),
3089 encoder,
3090 offset + 8,
3091 _depth,
3092 )
3093 }
3094 ParseError::DirEntry2NonUtf8(ref val) => {
3095 fidl::encoding::encode_in_envelope::<DirEntry2NonUtf8, D>(
3096 <DirEntry2NonUtf8 as fidl::encoding::ValueTypeMarker>::borrow(val),
3097 encoder,
3098 offset + 8,
3099 _depth,
3100 )
3101 }
3102 ParseError::InvalidInputPath(ref val) => {
3103 fidl::encoding::encode_in_envelope::<InvalidInputPath, D>(
3104 <InvalidInputPath as fidl::encoding::ValueTypeMarker>::borrow(val),
3105 encoder,
3106 offset + 8,
3107 _depth,
3108 )
3109 }
3110 ParseError::PathNotFound(ref val) => {
3111 fidl::encoding::encode_in_envelope::<PathNotFound, D>(
3112 <PathNotFound as fidl::encoding::ValueTypeMarker>::borrow(val),
3113 encoder,
3114 offset + 8,
3115 _depth,
3116 )
3117 }
3118 ParseError::BadEntryType(ref val) => {
3119 fidl::encoding::encode_in_envelope::<BadEntryType, D>(
3120 <BadEntryType as fidl::encoding::ValueTypeMarker>::borrow(val),
3121 encoder,
3122 offset + 8,
3123 _depth,
3124 )
3125 }
3126 ParseError::Incompatible(ref val) => {
3127 fidl::encoding::encode_in_envelope::<Incompatible, D>(
3128 <Incompatible as fidl::encoding::ValueTypeMarker>::borrow(val),
3129 encoder,
3130 offset + 8,
3131 _depth,
3132 )
3133 }
3134 ParseError::BadFile(ref val) => fidl::encoding::encode_in_envelope::<BadFile, D>(
3135 <BadFile as fidl::encoding::ValueTypeMarker>::borrow(val),
3136 encoder,
3137 offset + 8,
3138 _depth,
3139 ),
3140 ParseError::BadDirectory(ref val) => {
3141 fidl::encoding::encode_in_envelope::<BadDirectory, D>(
3142 <BadDirectory as fidl::encoding::ValueTypeMarker>::borrow(val),
3143 encoder,
3144 offset + 8,
3145 _depth,
3146 )
3147 }
3148 ParseError::ReaderReadError(ref val) => {
3149 fidl::encoding::encode_in_envelope::<ReaderReadError, D>(
3150 <ReaderReadError as fidl::encoding::ValueTypeMarker>::borrow(val),
3151 encoder,
3152 offset + 8,
3153 _depth,
3154 )
3155 }
3156 ParseError::ReaderOutOfBounds(ref val) => {
3157 fidl::encoding::encode_in_envelope::<ReaderOutOfBounds, D>(
3158 <ReaderOutOfBounds as fidl::encoding::ValueTypeMarker>::borrow(val),
3159 encoder,
3160 offset + 8,
3161 _depth,
3162 )
3163 }
3164 ParseError::RequiredFeatureIncompat(ref val) => {
3165 fidl::encoding::encode_in_envelope::<RequiredFeatureIncompat, D>(
3166 <RequiredFeatureIncompat as fidl::encoding::ValueTypeMarker>::borrow(val),
3167 encoder,
3168 offset + 8,
3169 _depth,
3170 )
3171 }
3172 ParseError::BannedFeatureIncompat(ref val) => {
3173 fidl::encoding::encode_in_envelope::<BannedFeatureIncompat, D>(
3174 <BannedFeatureIncompat as fidl::encoding::ValueTypeMarker>::borrow(val),
3175 encoder,
3176 offset + 8,
3177 _depth,
3178 )
3179 }
3180 ParseError::InvalidAddress(ref val) => {
3181 fidl::encoding::encode_in_envelope::<InvalidAddress, D>(
3182 <InvalidAddress as fidl::encoding::ValueTypeMarker>::borrow(val),
3183 encoder,
3184 offset + 8,
3185 _depth,
3186 )
3187 }
3188 ParseError::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
3189 }
3190 }
3191 }
3192
3193 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ParseError {
3194 #[inline(always)]
3195 fn new_empty() -> Self {
3196 Self::__SourceBreaking { unknown_ordinal: 0 }
3197 }
3198
3199 #[inline]
3200 unsafe fn decode(
3201 &mut self,
3202 decoder: &mut fidl::encoding::Decoder<'_, D>,
3203 offset: usize,
3204 mut depth: fidl::encoding::Depth,
3205 ) -> fidl::Result<()> {
3206 decoder.debug_check_bounds::<Self>(offset);
3207 #[allow(unused_variables)]
3208 let next_out_of_line = decoder.next_out_of_line();
3209 let handles_before = decoder.remaining_handles();
3210 let (ordinal, inlined, num_bytes, num_handles) =
3211 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
3212
3213 let member_inline_size = match ordinal {
3214 1 => {
3215 <InvalidSuperBlock as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3216 }
3217 2 => <InvalidSuperBlockMagic as fidl::encoding::TypeMarker>::inline_size(
3218 decoder.context,
3219 ),
3220 3 => <BlockNumberOutOfBounds as fidl::encoding::TypeMarker>::inline_size(
3221 decoder.context,
3222 ),
3223 4 => <BlockSizeInvalid as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3224 5 => <InvalidBlockGroupDesc as fidl::encoding::TypeMarker>::inline_size(
3225 decoder.context,
3226 ),
3227 6 => <InvalidINode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3228 7 => <InvalidExtentHeader as fidl::encoding::TypeMarker>::inline_size(
3229 decoder.context,
3230 ),
3231 8 => <InvalidExtentHeaderMagic as fidl::encoding::TypeMarker>::inline_size(
3232 decoder.context,
3233 ),
3234 9 => <InvalidExtent as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3235 10 => <ExtentUnexpectedLength as fidl::encoding::TypeMarker>::inline_size(
3236 decoder.context,
3237 ),
3238 11 => {
3239 <InvalidDirEntry2 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3240 }
3241 12 => {
3242 <DirEntry2NonUtf8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3243 }
3244 13 => {
3245 <InvalidInputPath as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3246 }
3247 14 => <PathNotFound as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3248 15 => <BadEntryType as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3249 16 => <Incompatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3250 17 => <BadFile as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3251 18 => <BadDirectory as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3252 19 => <ReaderReadError as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3253 20 => {
3254 <ReaderOutOfBounds as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3255 }
3256 21 => <RequiredFeatureIncompat as fidl::encoding::TypeMarker>::inline_size(
3257 decoder.context,
3258 ),
3259 22 => <BannedFeatureIncompat as fidl::encoding::TypeMarker>::inline_size(
3260 decoder.context,
3261 ),
3262 23 => <InvalidAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3263 0 => return Err(fidl::Error::UnknownUnionTag),
3264 _ => num_bytes as usize,
3265 };
3266
3267 if inlined != (member_inline_size <= 4) {
3268 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3269 }
3270 let _inner_offset;
3271 if inlined {
3272 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3273 _inner_offset = offset + 8;
3274 } else {
3275 depth.increment()?;
3276 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3277 }
3278 match ordinal {
3279 1 => {
3280 #[allow(irrefutable_let_patterns)]
3281 if let ParseError::InvalidSuperBlock(_) = self {
3282 } else {
3284 *self =
3286 ParseError::InvalidSuperBlock(fidl::new_empty!(InvalidSuperBlock, D));
3287 }
3288 #[allow(irrefutable_let_patterns)]
3289 if let ParseError::InvalidSuperBlock(ref mut val) = self {
3290 fidl::decode!(InvalidSuperBlock, D, val, decoder, _inner_offset, depth)?;
3291 } else {
3292 unreachable!()
3293 }
3294 }
3295 2 => {
3296 #[allow(irrefutable_let_patterns)]
3297 if let ParseError::InvalidSuperBlockMagic(_) = self {
3298 } else {
3300 *self = ParseError::InvalidSuperBlockMagic(fidl::new_empty!(
3302 InvalidSuperBlockMagic,
3303 D
3304 ));
3305 }
3306 #[allow(irrefutable_let_patterns)]
3307 if let ParseError::InvalidSuperBlockMagic(ref mut val) = self {
3308 fidl::decode!(
3309 InvalidSuperBlockMagic,
3310 D,
3311 val,
3312 decoder,
3313 _inner_offset,
3314 depth
3315 )?;
3316 } else {
3317 unreachable!()
3318 }
3319 }
3320 3 => {
3321 #[allow(irrefutable_let_patterns)]
3322 if let ParseError::BlockNumberOutOfBounds(_) = self {
3323 } else {
3325 *self = ParseError::BlockNumberOutOfBounds(fidl::new_empty!(
3327 BlockNumberOutOfBounds,
3328 D
3329 ));
3330 }
3331 #[allow(irrefutable_let_patterns)]
3332 if let ParseError::BlockNumberOutOfBounds(ref mut val) = self {
3333 fidl::decode!(
3334 BlockNumberOutOfBounds,
3335 D,
3336 val,
3337 decoder,
3338 _inner_offset,
3339 depth
3340 )?;
3341 } else {
3342 unreachable!()
3343 }
3344 }
3345 4 => {
3346 #[allow(irrefutable_let_patterns)]
3347 if let ParseError::BlockSizeInvalid(_) = self {
3348 } else {
3350 *self = ParseError::BlockSizeInvalid(fidl::new_empty!(BlockSizeInvalid, D));
3352 }
3353 #[allow(irrefutable_let_patterns)]
3354 if let ParseError::BlockSizeInvalid(ref mut val) = self {
3355 fidl::decode!(BlockSizeInvalid, D, val, decoder, _inner_offset, depth)?;
3356 } else {
3357 unreachable!()
3358 }
3359 }
3360 5 => {
3361 #[allow(irrefutable_let_patterns)]
3362 if let ParseError::InvalidBlockGroupDesc(_) = self {
3363 } else {
3365 *self = ParseError::InvalidBlockGroupDesc(fidl::new_empty!(
3367 InvalidBlockGroupDesc,
3368 D
3369 ));
3370 }
3371 #[allow(irrefutable_let_patterns)]
3372 if let ParseError::InvalidBlockGroupDesc(ref mut val) = self {
3373 fidl::decode!(
3374 InvalidBlockGroupDesc,
3375 D,
3376 val,
3377 decoder,
3378 _inner_offset,
3379 depth
3380 )?;
3381 } else {
3382 unreachable!()
3383 }
3384 }
3385 6 => {
3386 #[allow(irrefutable_let_patterns)]
3387 if let ParseError::InvalidInode(_) = self {
3388 } else {
3390 *self = ParseError::InvalidInode(fidl::new_empty!(InvalidINode, D));
3392 }
3393 #[allow(irrefutable_let_patterns)]
3394 if let ParseError::InvalidInode(ref mut val) = self {
3395 fidl::decode!(InvalidINode, D, val, decoder, _inner_offset, depth)?;
3396 } else {
3397 unreachable!()
3398 }
3399 }
3400 7 => {
3401 #[allow(irrefutable_let_patterns)]
3402 if let ParseError::InvalidExtentHeader(_) = self {
3403 } else {
3405 *self = ParseError::InvalidExtentHeader(fidl::new_empty!(
3407 InvalidExtentHeader,
3408 D
3409 ));
3410 }
3411 #[allow(irrefutable_let_patterns)]
3412 if let ParseError::InvalidExtentHeader(ref mut val) = self {
3413 fidl::decode!(InvalidExtentHeader, D, val, decoder, _inner_offset, depth)?;
3414 } else {
3415 unreachable!()
3416 }
3417 }
3418 8 => {
3419 #[allow(irrefutable_let_patterns)]
3420 if let ParseError::InvalidExtentHeaderMagic(_) = self {
3421 } else {
3423 *self = ParseError::InvalidExtentHeaderMagic(fidl::new_empty!(
3425 InvalidExtentHeaderMagic,
3426 D
3427 ));
3428 }
3429 #[allow(irrefutable_let_patterns)]
3430 if let ParseError::InvalidExtentHeaderMagic(ref mut val) = self {
3431 fidl::decode!(
3432 InvalidExtentHeaderMagic,
3433 D,
3434 val,
3435 decoder,
3436 _inner_offset,
3437 depth
3438 )?;
3439 } else {
3440 unreachable!()
3441 }
3442 }
3443 9 => {
3444 #[allow(irrefutable_let_patterns)]
3445 if let ParseError::InvalidExtent(_) = self {
3446 } else {
3448 *self = ParseError::InvalidExtent(fidl::new_empty!(InvalidExtent, D));
3450 }
3451 #[allow(irrefutable_let_patterns)]
3452 if let ParseError::InvalidExtent(ref mut val) = self {
3453 fidl::decode!(InvalidExtent, D, val, decoder, _inner_offset, depth)?;
3454 } else {
3455 unreachable!()
3456 }
3457 }
3458 10 => {
3459 #[allow(irrefutable_let_patterns)]
3460 if let ParseError::ExtentUnexpectedLength(_) = self {
3461 } else {
3463 *self = ParseError::ExtentUnexpectedLength(fidl::new_empty!(
3465 ExtentUnexpectedLength,
3466 D
3467 ));
3468 }
3469 #[allow(irrefutable_let_patterns)]
3470 if let ParseError::ExtentUnexpectedLength(ref mut val) = self {
3471 fidl::decode!(
3472 ExtentUnexpectedLength,
3473 D,
3474 val,
3475 decoder,
3476 _inner_offset,
3477 depth
3478 )?;
3479 } else {
3480 unreachable!()
3481 }
3482 }
3483 11 => {
3484 #[allow(irrefutable_let_patterns)]
3485 if let ParseError::InvalidDirEntry2(_) = self {
3486 } else {
3488 *self = ParseError::InvalidDirEntry2(fidl::new_empty!(InvalidDirEntry2, D));
3490 }
3491 #[allow(irrefutable_let_patterns)]
3492 if let ParseError::InvalidDirEntry2(ref mut val) = self {
3493 fidl::decode!(InvalidDirEntry2, D, val, decoder, _inner_offset, depth)?;
3494 } else {
3495 unreachable!()
3496 }
3497 }
3498 12 => {
3499 #[allow(irrefutable_let_patterns)]
3500 if let ParseError::DirEntry2NonUtf8(_) = self {
3501 } else {
3503 *self = ParseError::DirEntry2NonUtf8(fidl::new_empty!(DirEntry2NonUtf8, D));
3505 }
3506 #[allow(irrefutable_let_patterns)]
3507 if let ParseError::DirEntry2NonUtf8(ref mut val) = self {
3508 fidl::decode!(DirEntry2NonUtf8, D, val, decoder, _inner_offset, depth)?;
3509 } else {
3510 unreachable!()
3511 }
3512 }
3513 13 => {
3514 #[allow(irrefutable_let_patterns)]
3515 if let ParseError::InvalidInputPath(_) = self {
3516 } else {
3518 *self = ParseError::InvalidInputPath(fidl::new_empty!(InvalidInputPath, D));
3520 }
3521 #[allow(irrefutable_let_patterns)]
3522 if let ParseError::InvalidInputPath(ref mut val) = self {
3523 fidl::decode!(InvalidInputPath, D, val, decoder, _inner_offset, depth)?;
3524 } else {
3525 unreachable!()
3526 }
3527 }
3528 14 => {
3529 #[allow(irrefutable_let_patterns)]
3530 if let ParseError::PathNotFound(_) = self {
3531 } else {
3533 *self = ParseError::PathNotFound(fidl::new_empty!(PathNotFound, D));
3535 }
3536 #[allow(irrefutable_let_patterns)]
3537 if let ParseError::PathNotFound(ref mut val) = self {
3538 fidl::decode!(PathNotFound, D, val, decoder, _inner_offset, depth)?;
3539 } else {
3540 unreachable!()
3541 }
3542 }
3543 15 => {
3544 #[allow(irrefutable_let_patterns)]
3545 if let ParseError::BadEntryType(_) = self {
3546 } else {
3548 *self = ParseError::BadEntryType(fidl::new_empty!(BadEntryType, D));
3550 }
3551 #[allow(irrefutable_let_patterns)]
3552 if let ParseError::BadEntryType(ref mut val) = self {
3553 fidl::decode!(BadEntryType, D, val, decoder, _inner_offset, depth)?;
3554 } else {
3555 unreachable!()
3556 }
3557 }
3558 16 => {
3559 #[allow(irrefutable_let_patterns)]
3560 if let ParseError::Incompatible(_) = self {
3561 } else {
3563 *self = ParseError::Incompatible(fidl::new_empty!(Incompatible, D));
3565 }
3566 #[allow(irrefutable_let_patterns)]
3567 if let ParseError::Incompatible(ref mut val) = self {
3568 fidl::decode!(Incompatible, D, val, decoder, _inner_offset, depth)?;
3569 } else {
3570 unreachable!()
3571 }
3572 }
3573 17 => {
3574 #[allow(irrefutable_let_patterns)]
3575 if let ParseError::BadFile(_) = self {
3576 } else {
3578 *self = ParseError::BadFile(fidl::new_empty!(BadFile, D));
3580 }
3581 #[allow(irrefutable_let_patterns)]
3582 if let ParseError::BadFile(ref mut val) = self {
3583 fidl::decode!(BadFile, D, val, decoder, _inner_offset, depth)?;
3584 } else {
3585 unreachable!()
3586 }
3587 }
3588 18 => {
3589 #[allow(irrefutable_let_patterns)]
3590 if let ParseError::BadDirectory(_) = self {
3591 } else {
3593 *self = ParseError::BadDirectory(fidl::new_empty!(BadDirectory, D));
3595 }
3596 #[allow(irrefutable_let_patterns)]
3597 if let ParseError::BadDirectory(ref mut val) = self {
3598 fidl::decode!(BadDirectory, D, val, decoder, _inner_offset, depth)?;
3599 } else {
3600 unreachable!()
3601 }
3602 }
3603 19 => {
3604 #[allow(irrefutable_let_patterns)]
3605 if let ParseError::ReaderReadError(_) = self {
3606 } else {
3608 *self = ParseError::ReaderReadError(fidl::new_empty!(ReaderReadError, D));
3610 }
3611 #[allow(irrefutable_let_patterns)]
3612 if let ParseError::ReaderReadError(ref mut val) = self {
3613 fidl::decode!(ReaderReadError, D, val, decoder, _inner_offset, depth)?;
3614 } else {
3615 unreachable!()
3616 }
3617 }
3618 20 => {
3619 #[allow(irrefutable_let_patterns)]
3620 if let ParseError::ReaderOutOfBounds(_) = self {
3621 } else {
3623 *self =
3625 ParseError::ReaderOutOfBounds(fidl::new_empty!(ReaderOutOfBounds, D));
3626 }
3627 #[allow(irrefutable_let_patterns)]
3628 if let ParseError::ReaderOutOfBounds(ref mut val) = self {
3629 fidl::decode!(ReaderOutOfBounds, D, val, decoder, _inner_offset, depth)?;
3630 } else {
3631 unreachable!()
3632 }
3633 }
3634 21 => {
3635 #[allow(irrefutable_let_patterns)]
3636 if let ParseError::RequiredFeatureIncompat(_) = self {
3637 } else {
3639 *self = ParseError::RequiredFeatureIncompat(fidl::new_empty!(
3641 RequiredFeatureIncompat,
3642 D
3643 ));
3644 }
3645 #[allow(irrefutable_let_patterns)]
3646 if let ParseError::RequiredFeatureIncompat(ref mut val) = self {
3647 fidl::decode!(
3648 RequiredFeatureIncompat,
3649 D,
3650 val,
3651 decoder,
3652 _inner_offset,
3653 depth
3654 )?;
3655 } else {
3656 unreachable!()
3657 }
3658 }
3659 22 => {
3660 #[allow(irrefutable_let_patterns)]
3661 if let ParseError::BannedFeatureIncompat(_) = self {
3662 } else {
3664 *self = ParseError::BannedFeatureIncompat(fidl::new_empty!(
3666 BannedFeatureIncompat,
3667 D
3668 ));
3669 }
3670 #[allow(irrefutable_let_patterns)]
3671 if let ParseError::BannedFeatureIncompat(ref mut val) = self {
3672 fidl::decode!(
3673 BannedFeatureIncompat,
3674 D,
3675 val,
3676 decoder,
3677 _inner_offset,
3678 depth
3679 )?;
3680 } else {
3681 unreachable!()
3682 }
3683 }
3684 23 => {
3685 #[allow(irrefutable_let_patterns)]
3686 if let ParseError::InvalidAddress(_) = self {
3687 } else {
3689 *self = ParseError::InvalidAddress(fidl::new_empty!(InvalidAddress, D));
3691 }
3692 #[allow(irrefutable_let_patterns)]
3693 if let ParseError::InvalidAddress(ref mut val) = self {
3694 fidl::decode!(InvalidAddress, D, val, decoder, _inner_offset, depth)?;
3695 } else {
3696 unreachable!()
3697 }
3698 }
3699 #[allow(deprecated)]
3700 ordinal => {
3701 for _ in 0..num_handles {
3702 decoder.drop_next_handle()?;
3703 }
3704 *self = ParseError::__SourceBreaking { unknown_ordinal: ordinal };
3705 }
3706 }
3707 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
3708 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3709 }
3710 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3711 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3712 }
3713 Ok(())
3714 }
3715 }
3716}