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
11pub type Boool = bool;
12
13pub type HollowStruct = AnotherEmptyStruct;
14
15pub type Hover64 = f64;
16
17pub type Id = u64;
18
19pub type Rope = String;
20
21pub const DEFAULT_EVENT_RIGHTS: Rights = Rights::from_bits_truncate(53251);
22
23pub const RIGHTS_BASIC: Rights = Rights::from_bits_truncate(49155);
24
25bitflags! {
26 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
27 pub struct BitsUint32: u32 {
28 const MEMBER_LOW_1 = 1;
29 const MEMBER_LOW_2 = 2;
30 const MEMBER_HIG_1 = 268435456;
31 const MEMBER_HIG_2 = 536870912;
32 }
33}
34
35impl BitsUint32 {}
36
37bitflags! {
38 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
39 pub struct BitsUint8: u8 {
40 const MEMBER = 8;
41 }
42}
43
44impl BitsUint8 {}
45
46bitflags! {
47 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
48 pub struct EmptyBits: u32 {
49 }
50}
51
52impl EmptyBits {
53 #[inline(always)]
54 pub fn from_bits_allow_unknown(bits: u32) -> Self {
55 Self::from_bits_retain(bits)
56 }
57
58 #[inline(always)]
59 pub fn has_unknown_bits(&self) -> bool {
60 self.get_unknown_bits() != 0
61 }
62
63 #[inline(always)]
64 pub fn get_unknown_bits(&self) -> u32 {
65 self.bits() & !Self::all().bits()
66 }
67}
68
69bitflags! {
70 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
71 pub struct FidlvizBits: u8 {
72 const A = 1;
73 const B = 2;
74 const C = 4;
75 }
76}
77
78impl FidlvizBits {}
79
80bitflags! {
81 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
82 pub struct FlexibleBitsUint16: u16 {
83 const A = 1;
84 const B = 2;
85 }
86}
87
88impl FlexibleBitsUint16 {
89 #[inline(always)]
90 pub fn from_bits_allow_unknown(bits: u16) -> Self {
91 Self::from_bits_retain(bits)
92 }
93
94 #[inline(always)]
95 pub fn has_unknown_bits(&self) -> bool {
96 self.get_unknown_bits() != 0
97 }
98
99 #[inline(always)]
100 pub fn get_unknown_bits(&self) -> u16 {
101 self.bits() & !Self::all().bits()
102 }
103}
104
105bitflags! {
106 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
107 pub struct FlexibleBitsUint32: u32 {
108 const A = 1;
109 const B = 2;
110 }
111}
112
113impl FlexibleBitsUint32 {
114 #[inline(always)]
115 pub fn from_bits_allow_unknown(bits: u32) -> Self {
116 Self::from_bits_retain(bits)
117 }
118
119 #[inline(always)]
120 pub fn has_unknown_bits(&self) -> bool {
121 self.get_unknown_bits() != 0
122 }
123
124 #[inline(always)]
125 pub fn get_unknown_bits(&self) -> u32 {
126 self.bits() & !Self::all().bits()
127 }
128}
129
130bitflags! {
131 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
132 pub struct FlexibleBitsUint64: u64 {
133 const A = 1;
134 const B = 2;
135 }
136}
137
138impl FlexibleBitsUint64 {
139 #[inline(always)]
140 pub fn from_bits_allow_unknown(bits: u64) -> Self {
141 Self::from_bits_retain(bits)
142 }
143
144 #[inline(always)]
145 pub fn has_unknown_bits(&self) -> bool {
146 self.get_unknown_bits() != 0
147 }
148
149 #[inline(always)]
150 pub fn get_unknown_bits(&self) -> u64 {
151 self.bits() & !Self::all().bits()
152 }
153}
154
155bitflags! {
156 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
157 pub struct FlexibleBitsUint8: u8 {
158 const A = 1;
159 const B = 2;
160 }
161}
162
163impl FlexibleBitsUint8 {
164 #[inline(always)]
165 pub fn from_bits_allow_unknown(bits: u8) -> Self {
166 Self::from_bits_retain(bits)
167 }
168
169 #[inline(always)]
170 pub fn has_unknown_bits(&self) -> bool {
171 self.get_unknown_bits() != 0
172 }
173
174 #[inline(always)]
175 pub fn get_unknown_bits(&self) -> u8 {
176 self.bits() & !Self::all().bits()
177 }
178}
179
180bitflags! {
181 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
182 pub struct GoldenBits: u16 {
183 const A = 1;
184 }
185}
186
187impl GoldenBits {}
188
189bitflags! {
190 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
191 pub struct StrictBitsUint16: u16 {
192 const A = 1;
193 const B = 2;
194 }
195}
196
197impl StrictBitsUint16 {}
198
199bitflags! {
200 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
201 pub struct StrictBitsUint32: u32 {
202 const A = 1;
203 const B = 2;
204 }
205}
206
207impl StrictBitsUint32 {}
208
209bitflags! {
210 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
211 pub struct StrictBitsUint64: u64 {
212 const A = 1;
213 const B = 2;
214 }
215}
216
217impl StrictBitsUint64 {}
218
219bitflags! {
220 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
221 pub struct StrictBitsUint8: u8 {
222 const A = 1;
223 const B = 2;
224 }
225}
226
227impl StrictBitsUint8 {}
228
229bitflags! {
230 #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
231 pub struct Rights: u32 {
232 const DUPLICATE = 1;
233 const TRANSFER = 2;
234 const WAIT = 16384;
235 const INSPECT = 32768;
236 const SIGNAL = 4096;
237 }
238}
239
240impl Rights {}
241
242#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
243pub enum EmptyEnum {
244 #[doc(hidden)]
245 __SourceBreaking { unknown_ordinal: u32 },
246}
247
248#[macro_export]
250macro_rules! EmptyEnumUnknown {
251 () => {
252 _
253 };
254}
255
256impl EmptyEnum {
257 #[inline]
258 pub fn from_primitive(prim: u32) -> Option<Self> {
259 match prim {
260 _ => None,
261 }
262 }
263
264 #[inline]
265 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
266 match prim {
267 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
268 }
269 }
270
271 #[inline]
272 pub fn unknown() -> Self {
273 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
274 }
275
276 #[inline]
277 pub const fn into_primitive(self) -> u32 {
278 match self {
279 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
280 }
281 }
282
283 #[inline]
284 pub fn is_unknown(&self) -> bool {
285 match self {
286 Self::__SourceBreaking { unknown_ordinal: _ } => true,
287 }
288 }
289}
290
291#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
292#[repr(u32)]
293pub enum EnumUint32 {
294 Member = 842084399,
295}
296
297impl EnumUint32 {
298 #[inline]
299 pub fn from_primitive(prim: u32) -> Option<Self> {
300 match prim {
301 842084399 => Some(Self::Member),
302 _ => None,
303 }
304 }
305
306 #[inline]
307 pub const fn into_primitive(self) -> u32 {
308 self as u32
309 }
310}
311
312#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
313#[repr(u8)]
314pub enum EnumUint8 {
315 Member = 8,
316}
317
318impl EnumUint8 {
319 #[inline]
320 pub fn from_primitive(prim: u8) -> Option<Self> {
321 match prim {
322 8 => Some(Self::Member),
323 _ => None,
324 }
325 }
326
327 #[inline]
328 pub const fn into_primitive(self) -> u8 {
329 self as u8
330 }
331}
332
333#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
334#[repr(u8)]
335pub enum FidlvizEnum {
336 A = 42,
337}
338
339impl FidlvizEnum {
340 #[inline]
341 pub fn from_primitive(prim: u8) -> Option<Self> {
342 match prim {
343 42 => Some(Self::A),
344 _ => None,
345 }
346 }
347
348 #[inline]
349 pub const fn into_primitive(self) -> u8 {
350 self as u8
351 }
352}
353
354#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
355pub enum FlexibleEnumInt16 {
356 First,
357 Second,
358 #[doc(hidden)]
359 __SourceBreaking {
360 unknown_ordinal: i16,
361 },
362}
363
364#[macro_export]
366macro_rules! FlexibleEnumInt16Unknown {
367 () => {
368 _
369 };
370}
371
372impl FlexibleEnumInt16 {
373 #[inline]
374 pub fn from_primitive(prim: i16) -> Option<Self> {
375 match prim {
376 258 => Some(Self::First),
377 4370 => Some(Self::Second),
378 _ => None,
379 }
380 }
381
382 #[inline]
383 pub fn from_primitive_allow_unknown(prim: i16) -> Self {
384 match prim {
385 258 => Self::First,
386 4370 => Self::Second,
387 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
388 }
389 }
390
391 #[inline]
392 pub fn unknown() -> Self {
393 Self::__SourceBreaking { unknown_ordinal: 0x7fff }
394 }
395
396 #[inline]
397 pub const fn into_primitive(self) -> i16 {
398 match self {
399 Self::First => 258,
400 Self::Second => 4370,
401 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
402 }
403 }
404
405 #[inline]
406 pub fn is_unknown(&self) -> bool {
407 match self {
408 Self::__SourceBreaking { unknown_ordinal: _ } => true,
409 _ => false,
410 }
411 }
412}
413
414#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
415pub enum FlexibleEnumInt32 {
416 First,
417 Second,
418 #[doc(hidden)]
419 __SourceBreaking {
420 unknown_ordinal: i32,
421 },
422}
423
424#[macro_export]
426macro_rules! FlexibleEnumInt32Unknown {
427 () => {
428 _
429 };
430}
431
432impl FlexibleEnumInt32 {
433 #[inline]
434 pub fn from_primitive(prim: i32) -> Option<Self> {
435 match prim {
436 16909060 => Some(Self::First),
437 286397204 => Some(Self::Second),
438 _ => None,
439 }
440 }
441
442 #[inline]
443 pub fn from_primitive_allow_unknown(prim: i32) -> Self {
444 match prim {
445 16909060 => Self::First,
446 286397204 => Self::Second,
447 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
448 }
449 }
450
451 #[inline]
452 pub fn unknown() -> Self {
453 Self::__SourceBreaking { unknown_ordinal: 0x7fffffff }
454 }
455
456 #[inline]
457 pub const fn into_primitive(self) -> i32 {
458 match self {
459 Self::First => 16909060,
460 Self::Second => 286397204,
461 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
462 }
463 }
464
465 #[inline]
466 pub fn is_unknown(&self) -> bool {
467 match self {
468 Self::__SourceBreaking { unknown_ordinal: _ } => true,
469 _ => false,
470 }
471 }
472}
473
474#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
475pub enum FlexibleEnumInt64 {
476 First,
477 Second,
478 #[doc(hidden)]
479 __SourceBreaking {
480 unknown_ordinal: i64,
481 },
482}
483
484#[macro_export]
486macro_rules! FlexibleEnumInt64Unknown {
487 () => {
488 _
489 };
490}
491
492impl FlexibleEnumInt64 {
493 #[inline]
494 pub fn from_primitive(prim: i64) -> Option<Self> {
495 match prim {
496 72623859790382856 => Some(Self::First),
497 1230066625199609624 => Some(Self::Second),
498 _ => None,
499 }
500 }
501
502 #[inline]
503 pub fn from_primitive_allow_unknown(prim: i64) -> Self {
504 match prim {
505 72623859790382856 => Self::First,
506 1230066625199609624 => Self::Second,
507 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
508 }
509 }
510
511 #[inline]
512 pub fn unknown() -> Self {
513 Self::__SourceBreaking { unknown_ordinal: 0x7fffffffffffffff }
514 }
515
516 #[inline]
517 pub const fn into_primitive(self) -> i64 {
518 match self {
519 Self::First => 72623859790382856,
520 Self::Second => 1230066625199609624,
521 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
522 }
523 }
524
525 #[inline]
526 pub fn is_unknown(&self) -> bool {
527 match self {
528 Self::__SourceBreaking { unknown_ordinal: _ } => true,
529 _ => false,
530 }
531 }
532}
533
534#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
535pub enum FlexibleEnumInt8 {
536 First,
537 Second,
538 #[doc(hidden)]
539 __SourceBreaking {
540 unknown_ordinal: i8,
541 },
542}
543
544#[macro_export]
546macro_rules! FlexibleEnumInt8Unknown {
547 () => {
548 _
549 };
550}
551
552impl FlexibleEnumInt8 {
553 #[inline]
554 pub fn from_primitive(prim: i8) -> Option<Self> {
555 match prim {
556 1 => Some(Self::First),
557 17 => Some(Self::Second),
558 _ => None,
559 }
560 }
561
562 #[inline]
563 pub fn from_primitive_allow_unknown(prim: i8) -> Self {
564 match prim {
565 1 => Self::First,
566 17 => Self::Second,
567 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
568 }
569 }
570
571 #[inline]
572 pub fn unknown() -> Self {
573 Self::__SourceBreaking { unknown_ordinal: 0x7f }
574 }
575
576 #[inline]
577 pub const fn into_primitive(self) -> i8 {
578 match self {
579 Self::First => 1,
580 Self::Second => 17,
581 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
582 }
583 }
584
585 #[inline]
586 pub fn is_unknown(&self) -> bool {
587 match self {
588 Self::__SourceBreaking { unknown_ordinal: _ } => true,
589 _ => false,
590 }
591 }
592}
593
594#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
595pub enum FlexibleEnumUint16 {
596 First,
597 Second,
598 #[doc(hidden)]
599 __SourceBreaking {
600 unknown_ordinal: u16,
601 },
602}
603
604#[macro_export]
606macro_rules! FlexibleEnumUint16Unknown {
607 () => {
608 _
609 };
610}
611
612impl FlexibleEnumUint16 {
613 #[inline]
614 pub fn from_primitive(prim: u16) -> Option<Self> {
615 match prim {
616 258 => Some(Self::First),
617 4370 => Some(Self::Second),
618 _ => None,
619 }
620 }
621
622 #[inline]
623 pub fn from_primitive_allow_unknown(prim: u16) -> Self {
624 match prim {
625 258 => Self::First,
626 4370 => Self::Second,
627 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
628 }
629 }
630
631 #[inline]
632 pub fn unknown() -> Self {
633 Self::__SourceBreaking { unknown_ordinal: 0xffff }
634 }
635
636 #[inline]
637 pub const fn into_primitive(self) -> u16 {
638 match self {
639 Self::First => 258,
640 Self::Second => 4370,
641 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
642 }
643 }
644
645 #[inline]
646 pub fn is_unknown(&self) -> bool {
647 match self {
648 Self::__SourceBreaking { unknown_ordinal: _ } => true,
649 _ => false,
650 }
651 }
652}
653
654#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
655pub enum FlexibleEnumUint32 {
656 First,
657 Second,
658 #[doc(hidden)]
659 __SourceBreaking {
660 unknown_ordinal: u32,
661 },
662}
663
664#[macro_export]
666macro_rules! FlexibleEnumUint32Unknown {
667 () => {
668 _
669 };
670}
671
672impl FlexibleEnumUint32 {
673 #[inline]
674 pub fn from_primitive(prim: u32) -> Option<Self> {
675 match prim {
676 16909060 => Some(Self::First),
677 286397204 => Some(Self::Second),
678 _ => None,
679 }
680 }
681
682 #[inline]
683 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
684 match prim {
685 16909060 => Self::First,
686 286397204 => Self::Second,
687 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
688 }
689 }
690
691 #[inline]
692 pub fn unknown() -> Self {
693 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
694 }
695
696 #[inline]
697 pub const fn into_primitive(self) -> u32 {
698 match self {
699 Self::First => 16909060,
700 Self::Second => 286397204,
701 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
702 }
703 }
704
705 #[inline]
706 pub fn is_unknown(&self) -> bool {
707 match self {
708 Self::__SourceBreaking { unknown_ordinal: _ } => true,
709 _ => false,
710 }
711 }
712}
713
714#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
715pub enum FlexibleEnumUint64 {
716 First,
717 Second,
718 #[doc(hidden)]
719 __SourceBreaking {
720 unknown_ordinal: u64,
721 },
722}
723
724#[macro_export]
726macro_rules! FlexibleEnumUint64Unknown {
727 () => {
728 _
729 };
730}
731
732impl FlexibleEnumUint64 {
733 #[inline]
734 pub fn from_primitive(prim: u64) -> Option<Self> {
735 match prim {
736 72623859790382856 => Some(Self::First),
737 1230066625199609624 => Some(Self::Second),
738 _ => None,
739 }
740 }
741
742 #[inline]
743 pub fn from_primitive_allow_unknown(prim: u64) -> Self {
744 match prim {
745 72623859790382856 => Self::First,
746 1230066625199609624 => Self::Second,
747 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
748 }
749 }
750
751 #[inline]
752 pub fn unknown() -> Self {
753 Self::__SourceBreaking { unknown_ordinal: 0xffffffffffffffff }
754 }
755
756 #[inline]
757 pub const fn into_primitive(self) -> u64 {
758 match self {
759 Self::First => 72623859790382856,
760 Self::Second => 1230066625199609624,
761 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
762 }
763 }
764
765 #[inline]
766 pub fn is_unknown(&self) -> bool {
767 match self {
768 Self::__SourceBreaking { unknown_ordinal: _ } => true,
769 _ => false,
770 }
771 }
772}
773
774#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
775pub enum FlexibleEnumUint8 {
776 First,
777 Second,
778 #[doc(hidden)]
779 __SourceBreaking {
780 unknown_ordinal: u8,
781 },
782}
783
784#[macro_export]
786macro_rules! FlexibleEnumUint8Unknown {
787 () => {
788 _
789 };
790}
791
792impl FlexibleEnumUint8 {
793 #[inline]
794 pub fn from_primitive(prim: u8) -> Option<Self> {
795 match prim {
796 1 => Some(Self::First),
797 2 => Some(Self::Second),
798 _ => None,
799 }
800 }
801
802 #[inline]
803 pub fn from_primitive_allow_unknown(prim: u8) -> Self {
804 match prim {
805 1 => Self::First,
806 2 => Self::Second,
807 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
808 }
809 }
810
811 #[inline]
812 pub fn unknown() -> Self {
813 Self::__SourceBreaking { unknown_ordinal: 0xff }
814 }
815
816 #[inline]
817 pub const fn into_primitive(self) -> u8 {
818 match self {
819 Self::First => 1,
820 Self::Second => 2,
821 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
822 }
823 }
824
825 #[inline]
826 pub fn is_unknown(&self) -> bool {
827 match self {
828 Self::__SourceBreaking { unknown_ordinal: _ } => true,
829 _ => false,
830 }
831 }
832}
833
834#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
835#[repr(u16)]
836pub enum GoldenEnum {
837 A = 1,
838}
839
840impl GoldenEnum {
841 #[inline]
842 pub fn from_primitive(prim: u16) -> Option<Self> {
843 match prim {
844 1 => Some(Self::A),
845 _ => None,
846 }
847 }
848
849 #[inline]
850 pub const fn into_primitive(self) -> u16 {
851 self as u16
852 }
853}
854
855#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
856pub enum SignedEnum {
857 Default,
858 #[doc(hidden)]
859 __SourceBreaking {
860 unknown_ordinal: i32,
861 },
862}
863
864#[macro_export]
866macro_rules! SignedEnumUnknown {
867 () => {
868 _
869 };
870}
871
872impl SignedEnum {
873 #[inline]
874 pub fn from_primitive(prim: i32) -> Option<Self> {
875 match prim {
876 1 => Some(Self::Default),
877 _ => None,
878 }
879 }
880
881 #[inline]
882 pub fn from_primitive_allow_unknown(prim: i32) -> Self {
883 match prim {
884 1 => Self::Default,
885 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
886 }
887 }
888
889 #[inline]
890 pub fn unknown() -> Self {
891 Self::__SourceBreaking { unknown_ordinal: 0x7fffffff }
892 }
893
894 #[inline]
895 pub const fn into_primitive(self) -> i32 {
896 match self {
897 Self::Default => 1,
898 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
899 }
900 }
901
902 #[inline]
903 pub fn is_unknown(&self) -> bool {
904 match self {
905 Self::__SourceBreaking { unknown_ordinal: _ } => true,
906 _ => false,
907 }
908 }
909}
910
911#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
912#[repr(i16)]
913pub enum StrictEnumInt16 {
914 First = 258,
915 Second = 4370,
916}
917
918impl StrictEnumInt16 {
919 #[inline]
920 pub fn from_primitive(prim: i16) -> Option<Self> {
921 match prim {
922 258 => Some(Self::First),
923 4370 => Some(Self::Second),
924 _ => None,
925 }
926 }
927
928 #[inline]
929 pub const fn into_primitive(self) -> i16 {
930 self as i16
931 }
932}
933
934#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
935#[repr(i32)]
936pub enum StrictEnumInt32 {
937 First = 16909060,
938 Second = 286397204,
939}
940
941impl StrictEnumInt32 {
942 #[inline]
943 pub fn from_primitive(prim: i32) -> Option<Self> {
944 match prim {
945 16909060 => Some(Self::First),
946 286397204 => Some(Self::Second),
947 _ => None,
948 }
949 }
950
951 #[inline]
952 pub const fn into_primitive(self) -> i32 {
953 self as i32
954 }
955}
956
957#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
958#[repr(i64)]
959pub enum StrictEnumInt64 {
960 First = 72623859790382856,
961 Second = 1230066625199609624,
962}
963
964impl StrictEnumInt64 {
965 #[inline]
966 pub fn from_primitive(prim: i64) -> Option<Self> {
967 match prim {
968 72623859790382856 => Some(Self::First),
969 1230066625199609624 => Some(Self::Second),
970 _ => None,
971 }
972 }
973
974 #[inline]
975 pub const fn into_primitive(self) -> i64 {
976 self as i64
977 }
978}
979
980#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
981#[repr(i8)]
982pub enum StrictEnumInt8 {
983 First = 1,
984 Second = 17,
985}
986
987impl StrictEnumInt8 {
988 #[inline]
989 pub fn from_primitive(prim: i8) -> Option<Self> {
990 match prim {
991 1 => Some(Self::First),
992 17 => Some(Self::Second),
993 _ => None,
994 }
995 }
996
997 #[inline]
998 pub const fn into_primitive(self) -> i8 {
999 self as i8
1000 }
1001}
1002
1003#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1004#[repr(u16)]
1005pub enum StrictEnumUint16 {
1006 First = 258,
1007 Second = 4370,
1008}
1009
1010impl StrictEnumUint16 {
1011 #[inline]
1012 pub fn from_primitive(prim: u16) -> Option<Self> {
1013 match prim {
1014 258 => Some(Self::First),
1015 4370 => Some(Self::Second),
1016 _ => None,
1017 }
1018 }
1019
1020 #[inline]
1021 pub const fn into_primitive(self) -> u16 {
1022 self as u16
1023 }
1024}
1025
1026#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1027#[repr(u32)]
1028pub enum StrictEnumUint32 {
1029 First = 16909060,
1030 Second = 286397204,
1031}
1032
1033impl StrictEnumUint32 {
1034 #[inline]
1035 pub fn from_primitive(prim: u32) -> Option<Self> {
1036 match prim {
1037 16909060 => Some(Self::First),
1038 286397204 => Some(Self::Second),
1039 _ => None,
1040 }
1041 }
1042
1043 #[inline]
1044 pub const fn into_primitive(self) -> u32 {
1045 self as u32
1046 }
1047}
1048
1049#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1050#[repr(u64)]
1051pub enum StrictEnumUint64 {
1052 First = 72623859790382856,
1053 Second = 1230066625199609624,
1054}
1055
1056impl StrictEnumUint64 {
1057 #[inline]
1058 pub fn from_primitive(prim: u64) -> Option<Self> {
1059 match prim {
1060 72623859790382856 => Some(Self::First),
1061 1230066625199609624 => Some(Self::Second),
1062 _ => None,
1063 }
1064 }
1065
1066 #[inline]
1067 pub const fn into_primitive(self) -> u64 {
1068 self as u64
1069 }
1070}
1071
1072#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1073#[repr(u8)]
1074pub enum StrictEnumUint8 {
1075 First = 1,
1076 Second = 2,
1077}
1078
1079impl StrictEnumUint8 {
1080 #[inline]
1081 pub fn from_primitive(prim: u8) -> Option<Self> {
1082 match prim {
1083 1 => Some(Self::First),
1084 2 => Some(Self::Second),
1085 _ => None,
1086 }
1087 }
1088
1089 #[inline]
1090 pub const fn into_primitive(self) -> u8 {
1091 self as u8
1092 }
1093}
1094
1095#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1096pub enum UnsignedEnum {
1097 Default,
1098 #[doc(hidden)]
1099 __SourceBreaking {
1100 unknown_ordinal: u16,
1101 },
1102}
1103
1104#[macro_export]
1106macro_rules! UnsignedEnumUnknown {
1107 () => {
1108 _
1109 };
1110}
1111
1112impl UnsignedEnum {
1113 #[inline]
1114 pub fn from_primitive(prim: u16) -> Option<Self> {
1115 match prim {
1116 1 => Some(Self::Default),
1117 _ => None,
1118 }
1119 }
1120
1121 #[inline]
1122 pub fn from_primitive_allow_unknown(prim: u16) -> Self {
1123 match prim {
1124 1 => Self::Default,
1125 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1126 }
1127 }
1128
1129 #[inline]
1130 pub fn unknown() -> Self {
1131 Self::__SourceBreaking { unknown_ordinal: 0xffff }
1132 }
1133
1134 #[inline]
1135 pub const fn into_primitive(self) -> u16 {
1136 match self {
1137 Self::Default => 1,
1138 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1139 }
1140 }
1141
1142 #[inline]
1143 pub fn is_unknown(&self) -> bool {
1144 match self {
1145 Self::__SourceBreaking { unknown_ordinal: _ } => true,
1146 _ => false,
1147 }
1148 }
1149}
1150
1151#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1152#[repr(u32)]
1153pub enum ObjType {
1154 None = 0,
1155 Channel = 4,
1156 Event = 5,
1157}
1158
1159impl ObjType {
1160 #[inline]
1161 pub fn from_primitive(prim: u32) -> Option<Self> {
1162 match prim {
1163 0 => Some(Self::None),
1164 4 => Some(Self::Channel),
1165 5 => Some(Self::Event),
1166 _ => None,
1167 }
1168 }
1169
1170 #[inline]
1171 pub const fn into_primitive(self) -> u32 {
1172 self as u32
1173 }
1174}
1175
1176#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1177pub struct AliasedBool {
1178 pub value: bool,
1179}
1180
1181impl fidl::Persistable for AliasedBool {}
1182
1183#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1184pub struct AliasedFloat64 {
1185 pub value: f64,
1186}
1187
1188impl fidl::Persistable for AliasedFloat64 {}
1189
1190#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1191pub struct AliasedString {
1192 pub value: String,
1193}
1194
1195impl fidl::Persistable for AliasedString {}
1196
1197#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1198pub struct AliasedStruct {
1199 pub value: AnotherEmptyStruct,
1200}
1201
1202impl fidl::Persistable for AliasedStruct {}
1203
1204#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1205#[repr(C)]
1206pub struct AliasedUint64 {
1207 pub value: u64,
1208}
1209
1210impl fidl::Persistable for AliasedUint64 {}
1211
1212#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1213pub struct AnEmptyStructInStruct {
1214 pub v: EmptyStruct,
1215}
1216
1217impl fidl::Persistable for AnEmptyStructInStruct {}
1218
1219#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1220pub struct AnotherEmptyStruct;
1221
1222impl fidl::Persistable for AnotherEmptyStruct {}
1223
1224#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1225pub struct ArrayStruct {
1226 pub unions: [StringUnion; 3],
1227 pub optional_unions: [Option<Box<StringUnion>>; 3],
1228}
1229
1230impl fidl::Persistable for ArrayStruct {}
1231
1232#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1233#[repr(C)]
1234pub struct ArrayWithInternalPadding {
1235 pub v: [OneLayerStructWithPaddingAlign4; 2],
1236}
1237
1238impl fidl::Persistable for ArrayWithInternalPadding {}
1239
1240#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1241pub struct Bounded32NonnullableString {
1242 pub s0: String,
1243}
1244
1245impl fidl::Persistable for Bounded32NonnullableString {}
1246
1247#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1248pub struct Bounded32NonnullableVectorOfUint32s {
1249 pub vu0: Vec<u32>,
1250}
1251
1252impl fidl::Persistable for Bounded32NonnullableVectorOfUint32s {}
1253
1254#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1255pub struct Bounded32NullableString {
1256 pub s0: Option<String>,
1257}
1258
1259impl fidl::Persistable for Bounded32NullableString {}
1260
1261#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1262pub struct Bounded32NullableVectorOfUint32s {
1263 pub vu0: Option<Vec<u32>>,
1264}
1265
1266impl fidl::Persistable for Bounded32NullableVectorOfUint32s {}
1267
1268#[derive(Clone, Debug, PartialEq)]
1269pub struct CompatTable {
1270 pub value: CompatTableValue,
1271 pub empty: String,
1272}
1273
1274impl fidl::Persistable for CompatTable {}
1275
1276#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1277pub struct EmptyBitsStruct {
1278 pub b: EmptyBits,
1279}
1280
1281impl fidl::Persistable for EmptyBitsStruct {}
1282
1283#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1284pub struct EmptyEnumStruct {
1285 pub e: EmptyEnum,
1286}
1287
1288impl fidl::Persistable for EmptyEnumStruct {}
1289
1290#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1291pub struct EmptyStruct;
1292
1293impl fidl::Persistable for EmptyStruct {}
1294
1295#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1296pub struct EmptyStructSandwich {
1297 pub before: String,
1298 pub es: EmptyStruct,
1299 pub after: String,
1300}
1301
1302impl fidl::Persistable for EmptyStructSandwich {}
1303
1304#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1305pub struct EmptyStructUnionStruct {
1306 pub u: EmptyStructUnion,
1307}
1308
1309impl fidl::Persistable for EmptyStructUnionStruct {}
1310
1311#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1312pub struct EmptyStructsInArrayInStruct {
1313 pub v: [EmptyStruct; 4],
1314}
1315
1316impl fidl::Persistable for EmptyStructsInArrayInStruct {}
1317
1318#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1319pub struct EmptyStructsInVectorInStruct {
1320 pub v: Vec<EmptyStruct>,
1321}
1322
1323impl fidl::Persistable for EmptyStructsInVectorInStruct {}
1324
1325#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1326pub struct FidlvizStruct1;
1327
1328impl fidl::Persistable for FidlvizStruct1 {}
1329
1330#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1331#[repr(C)]
1332pub struct FidlvizStruct2 {
1333 pub x: u64,
1334}
1335
1336impl fidl::Persistable for FidlvizStruct2 {}
1337
1338#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1339#[repr(C)]
1340pub struct FileGetAttrResponse {
1341 pub s: i32,
1342 pub attributes: NodeAttributes,
1343}
1344
1345impl fidl::Persistable for FileGetAttrResponse {}
1346
1347#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1348#[repr(C)]
1349pub struct FiveByte {
1350 pub elem1: u32,
1351 pub elem2: u8,
1352}
1353
1354impl fidl::Persistable for FiveByte {}
1355
1356#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1357#[repr(C)]
1358pub struct FiveByteInArray {
1359 pub elems: [FiveByte; 3],
1360}
1361
1362impl fidl::Persistable for FiveByteInArray {}
1363
1364#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1365#[repr(C)]
1366pub struct FiveByteInStruct {
1367 pub elem1: FiveByte,
1368 pub elem2: FiveByte,
1369 pub elem3: FiveByte,
1370}
1371
1372impl fidl::Persistable for FiveByteInStruct {}
1373
1374#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1375pub struct FiveByteInVector {
1376 pub elems: Vec<FiveByte>,
1377}
1378
1379impl fidl::Persistable for FiveByteInVector {}
1380
1381#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1382pub struct FlexibleBitsUint16Struct {
1383 pub b: FlexibleBitsUint16,
1384}
1385
1386impl fidl::Persistable for FlexibleBitsUint16Struct {}
1387
1388#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1389pub struct FlexibleBitsUint32Struct {
1390 pub b: FlexibleBitsUint32,
1391}
1392
1393impl fidl::Persistable for FlexibleBitsUint32Struct {}
1394
1395#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1396pub struct FlexibleBitsUint64Struct {
1397 pub b: FlexibleBitsUint64,
1398}
1399
1400impl fidl::Persistable for FlexibleBitsUint64Struct {}
1401
1402#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1403pub struct FlexibleBitsUint8Struct {
1404 pub b: FlexibleBitsUint8,
1405}
1406
1407impl fidl::Persistable for FlexibleBitsUint8Struct {}
1408
1409#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1410pub struct FlexibleEnumInt16Struct {
1411 pub e: FlexibleEnumInt16,
1412}
1413
1414impl fidl::Persistable for FlexibleEnumInt16Struct {}
1415
1416#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1417pub struct FlexibleEnumInt32Struct {
1418 pub e: FlexibleEnumInt32,
1419}
1420
1421impl fidl::Persistable for FlexibleEnumInt32Struct {}
1422
1423#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1424pub struct FlexibleEnumInt64Struct {
1425 pub e: FlexibleEnumInt64,
1426}
1427
1428impl fidl::Persistable for FlexibleEnumInt64Struct {}
1429
1430#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1431pub struct FlexibleEnumInt8Struct {
1432 pub e: FlexibleEnumInt8,
1433}
1434
1435impl fidl::Persistable for FlexibleEnumInt8Struct {}
1436
1437#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1438pub struct FlexibleEnumUint16Struct {
1439 pub e: FlexibleEnumUint16,
1440}
1441
1442impl fidl::Persistable for FlexibleEnumUint16Struct {}
1443
1444#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1445pub struct FlexibleEnumUint32Struct {
1446 pub e: FlexibleEnumUint32,
1447}
1448
1449impl fidl::Persistable for FlexibleEnumUint32Struct {}
1450
1451#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1452pub struct FlexibleEnumUint64Struct {
1453 pub e: FlexibleEnumUint64,
1454}
1455
1456impl fidl::Persistable for FlexibleEnumUint64Struct {}
1457
1458#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1459pub struct FlexibleEnumUint8Struct {
1460 pub e: FlexibleEnumUint8,
1461}
1462
1463impl fidl::Persistable for FlexibleEnumUint8Struct {}
1464
1465#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1466pub struct GoldenBitsStruct {
1467 pub v: GoldenBits,
1468}
1469
1470impl fidl::Persistable for GoldenBitsStruct {}
1471
1472#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1473pub struct GoldenBoolStruct {
1474 pub v: bool,
1475}
1476
1477impl fidl::Persistable for GoldenBoolStruct {}
1478
1479#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1480#[repr(C)]
1481pub struct GoldenByteArrayStruct {
1482 pub v: [u8; 4],
1483}
1484
1485impl fidl::Persistable for GoldenByteArrayStruct {}
1486
1487#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1488pub struct GoldenByteVectorStruct {
1489 pub v: Vec<u8>,
1490}
1491
1492impl fidl::Persistable for GoldenByteVectorStruct {}
1493
1494#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1495pub struct GoldenDoubleStruct {
1496 pub v: f64,
1497}
1498
1499impl fidl::Persistable for GoldenDoubleStruct {}
1500
1501#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1502pub struct GoldenEnumStruct {
1503 pub v: GoldenEnum,
1504}
1505
1506impl fidl::Persistable for GoldenEnumStruct {}
1507
1508#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1509pub struct GoldenFloatStruct {
1510 pub v: f32,
1511}
1512
1513impl fidl::Persistable for GoldenFloatStruct {}
1514
1515#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1516#[repr(C)]
1517pub struct GoldenIntStruct {
1518 pub v: i16,
1519}
1520
1521impl fidl::Persistable for GoldenIntStruct {}
1522
1523#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1524pub struct GoldenNullableByteVectorStruct {
1525 pub v: Option<Vec<u8>>,
1526}
1527
1528impl fidl::Persistable for GoldenNullableByteVectorStruct {}
1529
1530#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1531pub struct GoldenNullableStringStruct {
1532 pub v: Option<String>,
1533}
1534
1535impl fidl::Persistable for GoldenNullableStringStruct {}
1536
1537#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1538pub struct GoldenNullableStruct {
1539 pub v: Option<Box<GoldenBoolStruct>>,
1540}
1541
1542impl fidl::Persistable for GoldenNullableStruct {}
1543
1544#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1545pub struct GoldenNullableUnionStruct {
1546 pub v: Option<Box<GoldenUnion>>,
1547}
1548
1549impl fidl::Persistable for GoldenNullableUnionStruct {}
1550
1551#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1552pub struct GoldenStringStruct {
1553 pub v: String,
1554}
1555
1556impl fidl::Persistable for GoldenStringStruct {}
1557
1558#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1559pub struct GoldenStringWithMaxSize2 {
1560 pub s: String,
1561}
1562
1563impl fidl::Persistable for GoldenStringWithMaxSize2 {}
1564
1565#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1566#[repr(C)]
1567pub struct GoldenStructArrayStruct {
1568 pub v: [GoldenIntStruct; 2],
1569}
1570
1571impl fidl::Persistable for GoldenStructArrayStruct {}
1572
1573#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1574pub struct GoldenStructVectorStruct {
1575 pub v: Vec<GoldenIntStruct>,
1576}
1577
1578impl fidl::Persistable for GoldenStructVectorStruct {}
1579
1580#[derive(Clone, Debug, PartialEq)]
1581pub struct GoldenTableStruct {
1582 pub v: GoldenTable,
1583}
1584
1585impl fidl::Persistable for GoldenTableStruct {}
1586
1587#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1588#[repr(C)]
1589pub struct GoldenUintStruct {
1590 pub v: u16,
1591}
1592
1593impl fidl::Persistable for GoldenUintStruct {}
1594
1595#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1596pub struct GoldenUnionStruct {
1597 pub v: GoldenUnion,
1598}
1599
1600impl fidl::Persistable for GoldenUnionStruct {}
1601
1602#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1603#[repr(C)]
1604pub struct Int64Struct {
1605 pub x: i64,
1606}
1607
1608impl fidl::Persistable for Int64Struct {}
1609
1610#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1611pub struct InterfaceConfig {
1612 pub name: String,
1613 pub ip_address_config: IpAddressConfig,
1614}
1615
1616impl fidl::Persistable for InterfaceConfig {}
1617
1618#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1619pub struct LargeArrays {
1620 pub a33: [Option<String>; 33],
1621 pub a100: [u8; 100],
1622 pub nested: Vec<[[String; 100]; 200]>,
1623}
1624
1625impl fidl::Persistable for LargeArrays {}
1626
1627#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1628pub struct Length2StringWrapper {
1629 pub length_2_string: String,
1630}
1631
1632impl fidl::Persistable for Length2StringWrapper {}
1633
1634#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1635pub struct LotsOfVectors {
1636 pub v1: Vec<u16>,
1637 pub v2: Vec<u32>,
1638 pub v3: Vec<u64>,
1639 pub v4: Vec<String>,
1640 pub v5: Vec<i8>,
1641 pub v6: Vec<i16>,
1642 pub v7: Vec<i32>,
1643 pub v8: Vec<i64>,
1644 pub v9: Vec<bool>,
1645}
1646
1647impl fidl::Persistable for LotsOfVectors {}
1648
1649#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1650pub struct MixedFieldsBody {
1651 pub before: u32,
1652 pub first_union: UnionSize8Align4,
1653 pub middle_start: u16,
1654 pub middle_end: u64,
1655 pub second_union: UnionSize8Align4,
1656 pub after: u32,
1657}
1658
1659impl fidl::Persistable for MixedFieldsBody {}
1660
1661#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1662pub struct MixedFieldsMessage {
1663 pub header: TransactionHeader,
1664 pub body: MixedFieldsBody,
1665}
1666
1667impl fidl::Persistable for MixedFieldsMessage {}
1668
1669#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1670pub struct MultipleBoundedNonnullableVectorsOfUint32s {
1671 pub vu0: Vec<u32>,
1672 pub vu1: Vec<u32>,
1673}
1674
1675impl fidl::Persistable for MultipleBoundedNonnullableVectorsOfUint32s {}
1676
1677#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1678pub struct MultipleBoundedNullableVectorsOfUint32s {
1679 pub vu0: Option<Vec<u32>>,
1680 pub vu1: Option<Vec<u32>>,
1681}
1682
1683impl fidl::Persistable for MultipleBoundedNullableVectorsOfUint32s {}
1684
1685#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1686pub struct MultipleNonnullableStrings {
1687 pub s0: String,
1688 pub s1: String,
1689}
1690
1691impl fidl::Persistable for MultipleNonnullableStrings {}
1692
1693#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1694pub struct MultipleNonnullableVectorsOfUint32s {
1695 pub vu0: Vec<u32>,
1696 pub vu1: Vec<u32>,
1697}
1698
1699impl fidl::Persistable for MultipleNonnullableVectorsOfUint32s {}
1700
1701#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1702pub struct MultipleNullableStrings {
1703 pub s0: Option<String>,
1704 pub s1: Option<String>,
1705}
1706
1707impl fidl::Persistable for MultipleNullableStrings {}
1708
1709#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1710pub struct MultipleShortNonnullableStrings {
1711 pub s0: String,
1712 pub s1: String,
1713}
1714
1715impl fidl::Persistable for MultipleShortNonnullableStrings {}
1716
1717#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1718pub struct MultipleShortNullableStrings {
1719 pub s0: String,
1720 pub s1: String,
1721}
1722
1723impl fidl::Persistable for MultipleShortNullableStrings {}
1724
1725#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1726pub struct MutualRecursionUnionStruct {
1727 pub u: Option<Box<MutualRecursionUnion>>,
1728}
1729
1730impl fidl::Persistable for MutualRecursionUnionStruct {}
1731
1732#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1733pub struct MyBool {
1734 pub value: bool,
1735}
1736
1737impl fidl::Persistable for MyBool {}
1738
1739#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1740#[repr(C)]
1741pub struct MyByte {
1742 pub value: u8,
1743}
1744
1745impl fidl::Persistable for MyByte {}
1746
1747#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1748pub struct MyFloat32 {
1749 pub value: f32,
1750}
1751
1752impl fidl::Persistable for MyFloat32 {}
1753
1754#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1755pub struct MyFloat64 {
1756 pub value: f64,
1757}
1758
1759impl fidl::Persistable for MyFloat64 {}
1760
1761#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1762#[repr(C)]
1763pub struct MyInt16 {
1764 pub value: i16,
1765}
1766
1767impl fidl::Persistable for MyInt16 {}
1768
1769#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1770#[repr(C)]
1771pub struct MyInt32 {
1772 pub value: i32,
1773}
1774
1775impl fidl::Persistable for MyInt32 {}
1776
1777#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1778#[repr(C)]
1779pub struct MyInt64 {
1780 pub value: i64,
1781}
1782
1783impl fidl::Persistable for MyInt64 {}
1784
1785#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1786#[repr(C)]
1787pub struct MyInt8 {
1788 pub value: i8,
1789}
1790
1791impl fidl::Persistable for MyInt8 {}
1792
1793#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1794#[repr(C)]
1795pub struct MyUint16 {
1796 pub value: u16,
1797}
1798
1799impl fidl::Persistable for MyUint16 {}
1800
1801#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1802#[repr(C)]
1803pub struct MyUint32 {
1804 pub value: u32,
1805}
1806
1807impl fidl::Persistable for MyUint32 {}
1808
1809#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1810#[repr(C)]
1811pub struct MyUint64 {
1812 pub value: u64,
1813}
1814
1815impl fidl::Persistable for MyUint64 {}
1816
1817#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1818#[repr(C)]
1819pub struct MyUint8 {
1820 pub value: u8,
1821}
1822
1823impl fidl::Persistable for MyUint8 {}
1824
1825#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1826pub struct NoCodingTablesStressor {
1827 pub f1: u64,
1828 pub f2: u64,
1829 pub u1: UnionSize36Align4,
1830 pub f3: u64,
1831 pub f4: u64,
1832 pub u2: UnionSize36Align4,
1833 pub f5: u64,
1834 pub f6: u64,
1835 pub u3: UnionSize36Align4,
1836 pub f7: u64,
1837 pub p1: Option<Box<Size8Align8>>,
1838 pub f8: u64,
1839 pub p2: Option<Box<Size8Align8>>,
1840 pub f9: u64,
1841}
1842
1843impl fidl::Persistable for NoCodingTablesStressor {}
1844
1845#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1846#[repr(C)]
1847pub struct NodeAttributes {
1848 pub mode: u32,
1849 pub id: u64,
1850 pub content_size: u64,
1851 pub storage_size: u64,
1852 pub link_count: u64,
1853 pub creation_time: u64,
1854 pub modification_time: u64,
1855}
1856
1857impl fidl::Persistable for NodeAttributes {}
1858
1859#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1860#[repr(C)]
1861pub struct OneLayerStructNoPaddingAlign4 {
1862 pub a: u16,
1863 pub b: u8,
1864 pub c: u8,
1865 pub d: u32,
1866}
1867
1868impl fidl::Persistable for OneLayerStructNoPaddingAlign4 {}
1869
1870#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1871#[repr(C)]
1872pub struct OneLayerStructNoPaddingAlign8 {
1873 pub a: u32,
1874 pub b: u16,
1875 pub c: u16,
1876 pub d: u64,
1877}
1878
1879impl fidl::Persistable for OneLayerStructNoPaddingAlign8 {}
1880
1881#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1882pub struct OneLayerStructWithBool {
1883 pub a: bool,
1884 pub b: u8,
1885 pub c: u16,
1886 pub d: u32,
1887}
1888
1889impl fidl::Persistable for OneLayerStructWithBool {}
1890
1891#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1892#[repr(C)]
1893pub struct OneLayerStructWithPaddingAlign4 {
1894 pub a: u16,
1895 pub b: u8,
1896 pub c: u32,
1897}
1898
1899impl fidl::Persistable for OneLayerStructWithPaddingAlign4 {}
1900
1901#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1902#[repr(C)]
1903pub struct OneLayerStructWithPaddingAlign8 {
1904 pub a: u32,
1905 pub b: u16,
1906 pub c: u64,
1907}
1908
1909impl fidl::Persistable for OneLayerStructWithPaddingAlign8 {}
1910
1911#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1912pub struct OptionalEmptyStructWrapper {
1913 pub s: Option<Box<EmptyStruct>>,
1914}
1915
1916impl fidl::Persistable for OptionalEmptyStructWrapper {}
1917
1918#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1919pub struct OptionalStringWrapper {
1920 pub str: Option<String>,
1921}
1922
1923impl fidl::Persistable for OptionalStringWrapper {}
1924
1925#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1926pub struct OptionalVectorWrapper {
1927 pub v: Option<Vec<u8>>,
1928}
1929
1930impl fidl::Persistable for OptionalVectorWrapper {}
1931
1932#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1933pub struct OutOfLinePaddingZeroed4 {
1934 pub a: Option<Box<Uint32Struct>>,
1935 pub b: Option<Box<Uint64Struct>>,
1936}
1937
1938impl fidl::Persistable for OutOfLinePaddingZeroed4 {}
1939
1940#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1941pub struct OutOfLinePaddingZeroed6 {
1942 pub a: Option<Box<Uint16Struct>>,
1943 pub b: Option<Box<Uint64Struct>>,
1944}
1945
1946impl fidl::Persistable for OutOfLinePaddingZeroed6 {}
1947
1948#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1949pub struct OutOfLinePaddingZeroed7 {
1950 pub a: Option<Box<Uint8Struct>>,
1951 pub b: Option<Box<Uint64Struct>>,
1952}
1953
1954impl fidl::Persistable for OutOfLinePaddingZeroed7 {}
1955
1956#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1957pub struct OutOfLineSandwich1 {
1958 pub before: String,
1959 pub v: Vec<Sandwich1>,
1960 pub after: String,
1961}
1962
1963impl fidl::Persistable for OutOfLineSandwich1 {}
1964
1965#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1966pub struct OutOfLineSandwich1WithOptUnion {
1967 pub before: String,
1968 pub v: Vec<Sandwich1WithOptUnion>,
1969 pub after: String,
1970}
1971
1972impl fidl::Persistable for OutOfLineSandwich1WithOptUnion {}
1973
1974#[derive(Clone, Debug, PartialEq)]
1975pub struct PaddedTableStruct {
1976 pub t: PaddedTable,
1977}
1978
1979impl fidl::Persistable for PaddedTableStruct {}
1980
1981#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1982pub struct PaddedUnionStruct {
1983 pub u: PaddedUnion,
1984}
1985
1986impl fidl::Persistable for PaddedUnionStruct {}
1987
1988#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1989#[repr(C)]
1990pub struct PaddingAlignment2MaskMayBe4Bytes {
1991 pub a: u8,
1992 pub b: u16,
1993 pub c: u16,
1994}
1995
1996impl fidl::Persistable for PaddingAlignment2MaskMayBe4Bytes {}
1997
1998#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1999pub struct PaddingAlignment2MaskMayBe4BytesVector {
2000 pub v: Vec<PaddingAlignment2MaskMayBe4Bytes>,
2001}
2002
2003impl fidl::Persistable for PaddingAlignment2MaskMayBe4BytesVector {}
2004
2005#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2006#[repr(C)]
2007pub struct PaddingAlignment4MaskMayBe8Bytes {
2008 pub a: u8,
2009 pub b: u32,
2010 pub c: u32,
2011}
2012
2013impl fidl::Persistable for PaddingAlignment4MaskMayBe8Bytes {}
2014
2015#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2016pub struct PaddingAlignment4MaskMayBe8BytesVector {
2017 pub v: Vec<PaddingAlignment4MaskMayBe8Bytes>,
2018}
2019
2020impl fidl::Persistable for PaddingAlignment4MaskMayBe8BytesVector {}
2021
2022#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2023#[repr(C)]
2024pub struct PaddingBetweenFieldsInt16Int32 {
2025 pub a: i16,
2026 pub b: i32,
2027}
2028
2029impl fidl::Persistable for PaddingBetweenFieldsInt16Int32 {}
2030
2031#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2032#[repr(C)]
2033pub struct PaddingBetweenFieldsInt16Int64 {
2034 pub a: i16,
2035 pub b: i64,
2036}
2037
2038impl fidl::Persistable for PaddingBetweenFieldsInt16Int64 {}
2039
2040#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2041#[repr(C)]
2042pub struct PaddingBetweenFieldsInt32Int64 {
2043 pub a: i32,
2044 pub b: i64,
2045}
2046
2047impl fidl::Persistable for PaddingBetweenFieldsInt32Int64 {}
2048
2049#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2050#[repr(C)]
2051pub struct PaddingBetweenFieldsInt8Int16 {
2052 pub a: i8,
2053 pub b: i16,
2054}
2055
2056impl fidl::Persistable for PaddingBetweenFieldsInt8Int16 {}
2057
2058#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2059#[repr(C)]
2060pub struct PaddingBetweenFieldsInt8Int32 {
2061 pub a: i8,
2062 pub b: i32,
2063}
2064
2065impl fidl::Persistable for PaddingBetweenFieldsInt8Int32 {}
2066
2067#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2068#[repr(C)]
2069pub struct PaddingBetweenFieldsInt8Int64 {
2070 pub a: i8,
2071 pub b: i64,
2072}
2073
2074impl fidl::Persistable for PaddingBetweenFieldsInt8Int64 {}
2075
2076#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2077#[repr(C)]
2078pub struct PaddingEndOfInlineObject1Byte {
2079 pub a: Struct1Byte,
2080}
2081
2082impl fidl::Persistable for PaddingEndOfInlineObject1Byte {}
2083
2084#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2085#[repr(C)]
2086pub struct PaddingEndOfInlineObject2Byte {
2087 pub a: Struct2Byte,
2088}
2089
2090impl fidl::Persistable for PaddingEndOfInlineObject2Byte {}
2091
2092#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2093#[repr(C)]
2094pub struct PaddingEndOfInlineObject3Byte {
2095 pub a: Struct3Byte,
2096}
2097
2098impl fidl::Persistable for PaddingEndOfInlineObject3Byte {}
2099
2100#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2101#[repr(C)]
2102pub struct PaddingEndOfInlineObject4Byte {
2103 pub a: Struct4Byte,
2104}
2105
2106impl fidl::Persistable for PaddingEndOfInlineObject4Byte {}
2107
2108#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2109#[repr(C)]
2110pub struct PaddingEndOfInlineObject5Byte {
2111 pub a: Struct5Byte,
2112}
2113
2114impl fidl::Persistable for PaddingEndOfInlineObject5Byte {}
2115
2116#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2117#[repr(C)]
2118pub struct PaddingEndOfInlineObject6Byte {
2119 pub a: Struct6Byte,
2120}
2121
2122impl fidl::Persistable for PaddingEndOfInlineObject6Byte {}
2123
2124#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2125#[repr(C)]
2126pub struct PaddingEndOfInlineObject7Byte {
2127 pub a: Struct7Byte,
2128}
2129
2130impl fidl::Persistable for PaddingEndOfInlineObject7Byte {}
2131
2132#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2133pub struct PaddingEndOfInlineObjectBeforeNextObject1Byte {
2134 pub out_of_line: Option<Box<Struct8Byte>>,
2135 pub in_line: Struct1Byte,
2136}
2137
2138impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject1Byte {}
2139
2140#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2141pub struct PaddingEndOfInlineObjectBeforeNextObject2Byte {
2142 pub out_of_line: Option<Box<Struct8Byte>>,
2143 pub in_line: Struct2Byte,
2144}
2145
2146impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject2Byte {}
2147
2148#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2149pub struct PaddingEndOfInlineObjectBeforeNextObject3Byte {
2150 pub out_of_line: Option<Box<Struct8Byte>>,
2151 pub in_line: Struct3Byte,
2152}
2153
2154impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject3Byte {}
2155
2156#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2157pub struct PaddingEndOfInlineObjectBeforeNextObject4Byte {
2158 pub out_of_line: Option<Box<Struct8Byte>>,
2159 pub in_line: Struct4Byte,
2160}
2161
2162impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject4Byte {}
2163
2164#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2165pub struct PaddingEndOfInlineObjectBeforeNextObject5Byte {
2166 pub out_of_line: Option<Box<Struct8Byte>>,
2167 pub in_line: Struct5Byte,
2168}
2169
2170impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject5Byte {}
2171
2172#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2173pub struct PaddingEndOfInlineObjectBeforeNextObject6Byte {
2174 pub out_of_line: Option<Box<Struct8Byte>>,
2175 pub in_line: Struct6Byte,
2176}
2177
2178impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject6Byte {}
2179
2180#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2181pub struct PaddingEndOfInlineObjectBeforeNextObject7Byte {
2182 pub out_of_line: Option<Box<Struct8Byte>>,
2183 pub in_line: Struct7Byte,
2184}
2185
2186impl fidl::Persistable for PaddingEndOfInlineObjectBeforeNextObject7Byte {}
2187
2188#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2189pub struct PaddingEndOfOutOfLineObject1Byte {
2190 pub out_of_line: Option<Box<Struct1Byte>>,
2191}
2192
2193impl fidl::Persistable for PaddingEndOfOutOfLineObject1Byte {}
2194
2195#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2196pub struct PaddingEndOfOutOfLineObject2Byte {
2197 pub out_of_line: Option<Box<Struct2Byte>>,
2198}
2199
2200impl fidl::Persistable for PaddingEndOfOutOfLineObject2Byte {}
2201
2202#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2203pub struct PaddingEndOfOutOfLineObject3Byte {
2204 pub out_of_line: Option<Box<Struct3Byte>>,
2205}
2206
2207impl fidl::Persistable for PaddingEndOfOutOfLineObject3Byte {}
2208
2209#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2210pub struct PaddingEndOfOutOfLineObject4Byte {
2211 pub out_of_line: Option<Box<Struct4Byte>>,
2212}
2213
2214impl fidl::Persistable for PaddingEndOfOutOfLineObject4Byte {}
2215
2216#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2217pub struct PaddingEndOfOutOfLineObject5Byte {
2218 pub out_of_line: Option<Box<Struct5Byte>>,
2219}
2220
2221impl fidl::Persistable for PaddingEndOfOutOfLineObject5Byte {}
2222
2223#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2224pub struct PaddingEndOfOutOfLineObject6Byte {
2225 pub out_of_line: Option<Box<Struct6Byte>>,
2226}
2227
2228impl fidl::Persistable for PaddingEndOfOutOfLineObject6Byte {}
2229
2230#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2231pub struct PaddingEndOfOutOfLineObject7Byte {
2232 pub out_of_line: Option<Box<Struct7Byte>>,
2233}
2234
2235impl fidl::Persistable for PaddingEndOfOutOfLineObject7Byte {}
2236
2237#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2238pub struct PaddingInBetweenOutOfLineObjects1Byte {
2239 pub first: Option<Box<Struct1Byte>>,
2240 pub second: Option<Box<Struct8Byte>>,
2241}
2242
2243impl fidl::Persistable for PaddingInBetweenOutOfLineObjects1Byte {}
2244
2245#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2246pub struct PaddingInBetweenOutOfLineObjects2Byte {
2247 pub first: Option<Box<Struct2Byte>>,
2248 pub second: Option<Box<Struct8Byte>>,
2249}
2250
2251impl fidl::Persistable for PaddingInBetweenOutOfLineObjects2Byte {}
2252
2253#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2254pub struct PaddingInBetweenOutOfLineObjects3Byte {
2255 pub first: Option<Box<Struct3Byte>>,
2256 pub second: Option<Box<Struct8Byte>>,
2257}
2258
2259impl fidl::Persistable for PaddingInBetweenOutOfLineObjects3Byte {}
2260
2261#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2262pub struct PaddingInBetweenOutOfLineObjects4Byte {
2263 pub first: Option<Box<Struct4Byte>>,
2264 pub second: Option<Box<Struct8Byte>>,
2265}
2266
2267impl fidl::Persistable for PaddingInBetweenOutOfLineObjects4Byte {}
2268
2269#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2270pub struct PaddingInBetweenOutOfLineObjects5Byte {
2271 pub first: Option<Box<Struct5Byte>>,
2272 pub second: Option<Box<Struct8Byte>>,
2273}
2274
2275impl fidl::Persistable for PaddingInBetweenOutOfLineObjects5Byte {}
2276
2277#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2278pub struct PaddingInBetweenOutOfLineObjects6Byte {
2279 pub first: Option<Box<Struct6Byte>>,
2280 pub second: Option<Box<Struct8Byte>>,
2281}
2282
2283impl fidl::Persistable for PaddingInBetweenOutOfLineObjects6Byte {}
2284
2285#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2286pub struct PaddingInBetweenOutOfLineObjects7Byte {
2287 pub first: Option<Box<Struct7Byte>>,
2288 pub second: Option<Box<Struct8Byte>>,
2289}
2290
2291impl fidl::Persistable for PaddingInBetweenOutOfLineObjects7Byte {}
2292
2293#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2294pub struct RecursiveEmptyStruct {
2295 pub inner: Option<Box<RecursiveEmptyStruct>>,
2296}
2297
2298impl fidl::Persistable for RecursiveEmptyStruct {}
2299
2300#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2301pub struct RecursiveEmptyStructArrayWrapper {
2302 pub arr: [RecursiveEmptyStruct; 1],
2303}
2304
2305impl fidl::Persistable for RecursiveEmptyStructArrayWrapper {}
2306
2307#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2308pub struct RecursiveEmptyStructVectorWrapper {
2309 pub vec: Vec<RecursiveEmptyStruct>,
2310}
2311
2312impl fidl::Persistable for RecursiveEmptyStructVectorWrapper {}
2313
2314#[derive(Clone, Debug, PartialEq)]
2315pub struct RecursiveOptionalAndTableStruct {
2316 pub t: RecursiveOptionalAndTable,
2317}
2318
2319impl fidl::Persistable for RecursiveOptionalAndTableStruct {}
2320
2321#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2322pub struct RecursiveOptionalAndUnionStruct {
2323 pub u: RecursiveOptionalAndUnion,
2324}
2325
2326impl fidl::Persistable for RecursiveOptionalAndUnionStruct {}
2327
2328#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2329pub struct RecursiveOptionalAndVectorStruct {
2330 pub vec: Vec<RecursiveOptionalStruct>,
2331}
2332
2333impl fidl::Persistable for RecursiveOptionalAndVectorStruct {}
2334
2335#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2336pub struct RecursiveOptionalBasicStruct {
2337 pub inner: Option<Box<RecursiveOptionalBasicStruct>>,
2338}
2339
2340impl fidl::Persistable for RecursiveOptionalBasicStruct {}
2341
2342#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2343pub struct RecursiveOptionalStruct {
2344 pub inner: Option<Box<RecursiveOptionalStruct>>,
2345}
2346
2347impl fidl::Persistable for RecursiveOptionalStruct {}
2348
2349#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2350pub struct RecursiveOptionalStructArrayWrapper {
2351 pub arr: [RecursiveOptionalStruct; 1],
2352}
2353
2354impl fidl::Persistable for RecursiveOptionalStructArrayWrapper {}
2355
2356#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2357pub struct RecursiveOptionalStructWithString {
2358 pub inner: Option<Box<RecursiveOptionalStructWithString>>,
2359 pub str: Option<String>,
2360}
2361
2362impl fidl::Persistable for RecursiveOptionalStructWithString {}
2363
2364#[derive(Clone, Debug, PartialEq)]
2365pub struct RecursiveTableHolder {
2366 pub t: RecursiveTable,
2367}
2368
2369impl fidl::Persistable for RecursiveTableHolder {}
2370
2371#[derive(Clone, Debug, PartialEq)]
2372pub struct RecursiveTableOptionalHolder {
2373 pub o: Option<Box<RecursiveTableHolder>>,
2374}
2375
2376impl fidl::Persistable for RecursiveTableOptionalHolder {}
2377
2378#[derive(Clone, Debug, PartialEq)]
2379pub struct RecursiveUnionStruct {
2380 pub u: Option<Box<RecursiveUnion>>,
2381}
2382
2383impl fidl::Persistable for RecursiveUnionStruct {}
2384
2385#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2386pub struct RecursiveVectorStruct {
2387 pub vec: Option<Vec<RecursiveVectorStruct>>,
2388}
2389
2390impl fidl::Persistable for RecursiveVectorStruct {}
2391
2392#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2393pub struct RecursiveVectorUnionStruct {
2394 pub u: RecursiveVectorUnion,
2395}
2396
2397impl fidl::Persistable for RecursiveVectorUnionStruct {}
2398
2399#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2400#[repr(C)]
2401pub struct Regression1 {
2402 pub f1: u8,
2403 pub f2: u32,
2404 pub f3: u8,
2405 pub f4: u16,
2406 pub f5: u64,
2407 pub f6: u8,
2408}
2409
2410impl fidl::Persistable for Regression1 {}
2411
2412#[derive(Clone, Debug, PartialEq)]
2413pub struct Regression10V1 {
2414 pub table: Regression10TableV1,
2415}
2416
2417impl fidl::Persistable for Regression10V1 {}
2418
2419#[derive(Clone, Debug, PartialEq)]
2420pub struct Regression10V2 {
2421 pub table: Regression10TableV2,
2422}
2423
2424impl fidl::Persistable for Regression10V2 {}
2425
2426#[derive(Clone, Debug, PartialEq)]
2427pub struct Regression10V3 {
2428 pub table: Regression10TableV3,
2429}
2430
2431impl fidl::Persistable for Regression10V3 {}
2432
2433#[derive(Clone, Debug, PartialEq)]
2434pub struct Regression11 {
2435 pub table_of_table: UnionWithRegression10Table,
2436}
2437
2438impl fidl::Persistable for Regression11 {}
2439
2440#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2441#[repr(C)]
2442pub struct Regression2 {
2443 pub head: Regression1,
2444 pub f7: u8,
2445}
2446
2447impl fidl::Persistable for Regression2 {}
2448
2449#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2450pub struct Regression3 {
2451 pub opt_value: Option<Box<Regression2>>,
2452}
2453
2454impl fidl::Persistable for Regression3 {}
2455
2456#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2457#[repr(C)]
2458pub struct Regression4 {
2459 pub f1: u8,
2460 pub f2: u32,
2461 pub s1: StructSize3Align1,
2462 pub f3: u8,
2463 pub f4: u16,
2464 pub f5: u64,
2465 pub f6: u8,
2466}
2467
2468impl fidl::Persistable for Regression4 {}
2469
2470#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2471pub struct Regression5 {
2472 pub f1: u8,
2473 pub f2: EnumUint32,
2474 pub f3: EnumUint8,
2475 pub f4: u16,
2476 pub f5: u64,
2477 pub f6: u8,
2478}
2479
2480impl fidl::Persistable for Regression5 {}
2481
2482#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2483pub struct Regression6 {
2484 pub f1: u8,
2485 pub f2: BitsUint32,
2486 pub f3: BitsUint8,
2487 pub f4: u16,
2488 pub f5: u64,
2489 pub f6: u8,
2490}
2491
2492impl fidl::Persistable for Regression6 {}
2493
2494#[derive(Clone, Debug, PartialEq)]
2495pub struct Regression7TableUnionXUnion {
2496 pub value: TableOfUnionThenXUnionThenTableThenXUnionThenUnion,
2497}
2498
2499impl fidl::Persistable for Regression7TableUnionXUnion {}
2500
2501#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2502pub struct Regression8OptUnionSize12Align4 {
2503 pub opt_union1: Option<Box<UnionSize12Align4>>,
2504 pub opt_union2: Option<Box<UnionSize12Align4>>,
2505 pub opt_union3: Option<Box<UnionSize12Align4>>,
2506}
2507
2508impl fidl::Persistable for Regression8OptUnionSize12Align4 {}
2509
2510#[derive(Clone, Debug, PartialEq)]
2511pub struct Regression8TableWithUnionSize12Align4 {
2512 pub value: TableWithUnionSize12Align4,
2513}
2514
2515impl fidl::Persistable for Regression8TableWithUnionSize12Align4 {}
2516
2517#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2518pub struct Regression8VectorOfOptUnionSize12Align4 {
2519 pub value: Vec<Option<Box<UnionSize12Align4>>>,
2520}
2521
2522impl fidl::Persistable for Regression8VectorOfOptUnionSize12Align4 {}
2523
2524#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2525pub struct Regression9Message {
2526 pub header: TransactionHeader,
2527 pub body: Regression9Result,
2528}
2529
2530impl fidl::Persistable for Regression9Message {}
2531
2532#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2533pub struct Regression9Value {
2534 pub u: StringBoolUnion,
2535 pub nullable_u: Option<Box<StringBoolUnion>>,
2536}
2537
2538impl fidl::Persistable for Regression9Value {}
2539
2540#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2541pub struct ReverseOrdinalUnionStruct {
2542 pub u: ReverseOrdinalUnion,
2543}
2544
2545impl fidl::Persistable for ReverseOrdinalUnionStruct {}
2546
2547#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2548pub struct Sandwich1 {
2549 pub before: u32,
2550 pub the_union: UnionSize8Align4,
2551 pub after: u32,
2552}
2553
2554impl fidl::Persistable for Sandwich1 {}
2555
2556#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2557pub struct Sandwich1Message {
2558 pub header: TransactionHeader,
2559 pub body: Sandwich1,
2560}
2561
2562impl fidl::Persistable for Sandwich1Message {}
2563
2564#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2565pub struct Sandwich1WithOptUnion {
2566 pub before: u32,
2567 pub opt_union: Option<Box<UnionSize8Align4>>,
2568 pub after: u32,
2569}
2570
2571impl fidl::Persistable for Sandwich1WithOptUnion {}
2572
2573#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2574pub struct Sandwich2 {
2575 pub before: u32,
2576 pub the_union: UnionSize12Align4,
2577 pub after: u32,
2578}
2579
2580impl fidl::Persistable for Sandwich2 {}
2581
2582#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2583pub struct Sandwich3 {
2584 pub before: u32,
2585 pub the_union: UnionSize24Align8,
2586 pub after: u32,
2587}
2588
2589impl fidl::Persistable for Sandwich3 {}
2590
2591#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2592pub struct Sandwich4 {
2593 pub before: u32,
2594 pub the_union: UnionSize36Align4,
2595 pub after: u32,
2596}
2597
2598impl fidl::Persistable for Sandwich4 {}
2599
2600#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2601pub struct Sandwich4Align8 {
2602 pub sandwich4: Sandwich4,
2603 pub alignment8_enforcement: u64,
2604}
2605
2606impl fidl::Persistable for Sandwich4Align8 {}
2607
2608#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2609pub struct Sandwich4Align8WithPointer {
2610 pub sandwich4: Sandwich4,
2611 pub alignment8_enforcement: Option<Box<Size8Align8>>,
2612}
2613
2614impl fidl::Persistable for Sandwich4Align8WithPointer {}
2615
2616#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2617pub struct Sandwich4Message {
2618 pub header: TransactionHeader,
2619 pub body: Sandwich4,
2620}
2621
2622impl fidl::Persistable for Sandwich4Message {}
2623
2624#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2625pub struct Sandwich5 {
2626 pub before: u32,
2627 pub union_of_union: UnionOfUnion,
2628 pub after: u32,
2629}
2630
2631impl fidl::Persistable for Sandwich5 {}
2632
2633#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2634pub struct Sandwich5Message {
2635 pub header: TransactionHeader,
2636 pub body: Sandwich5,
2637}
2638
2639impl fidl::Persistable for Sandwich5Message {}
2640
2641#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2642pub struct Sandwich7 {
2643 pub before: u32,
2644 pub opt_sandwich1: Option<Box<Sandwich1>>,
2645 pub after: u32,
2646}
2647
2648impl fidl::Persistable for Sandwich7 {}
2649
2650#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2651pub struct Sandwich7Message {
2652 pub header: TransactionHeader,
2653 pub body: Sandwich7,
2654}
2655
2656impl fidl::Persistable for Sandwich7Message {}
2657
2658#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2659pub struct Sandwich8 {
2660 pub before: u64,
2661 pub union_of_union: UnionOfUnion,
2662 pub after: u32,
2663}
2664
2665impl fidl::Persistable for Sandwich8 {}
2666
2667#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2668pub struct Sandwich9 {
2669 pub before: u16,
2670 pub the_union: UnionWithVectorOfVectors,
2671 pub after: u16,
2672}
2673
2674impl fidl::Persistable for Sandwich9 {}
2675
2676#[derive(Clone, Debug, PartialEq)]
2677pub struct SimpleTableArrayStruct {
2678 pub the_array: [TransformerSimpleTable; 2],
2679}
2680
2681impl fidl::Persistable for SimpleTableArrayStruct {}
2682
2683#[derive(Clone, Debug, PartialEq)]
2684pub struct SimpleTableThenUint64 {
2685 pub table: SimpleTable,
2686 pub number: u64,
2687}
2688
2689impl fidl::Persistable for SimpleTableThenUint64 {}
2690
2691#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2692pub struct SingleVariantUnionStruct {
2693 pub u: SingleVariantUnion,
2694}
2695
2696impl fidl::Persistable for SingleVariantUnionStruct {}
2697
2698#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2699#[repr(C)]
2700pub struct Size5Alignment1 {
2701 pub data: [u8; 5],
2702}
2703
2704impl fidl::Persistable for Size5Alignment1 {}
2705
2706#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2707#[repr(C)]
2708pub struct Size5Alignment1Array {
2709 pub a: [Size5Alignment1; 3],
2710}
2711
2712impl fidl::Persistable for Size5Alignment1Array {}
2713
2714#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2715pub struct Size5Alignment1Vector {
2716 pub v: Vec<Size5Alignment1>,
2717}
2718
2719impl fidl::Persistable for Size5Alignment1Vector {}
2720
2721#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2722#[repr(C)]
2723pub struct Size5Alignment4 {
2724 pub four: u32,
2725 pub one: u8,
2726}
2727
2728impl fidl::Persistable for Size5Alignment4 {}
2729
2730#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2731#[repr(C)]
2732pub struct Size5Alignment4Array {
2733 pub a: [Size5Alignment4; 3],
2734}
2735
2736impl fidl::Persistable for Size5Alignment4Array {}
2737
2738#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2739pub struct Size5Alignment4Vector {
2740 pub v: Vec<Size5Alignment4>,
2741}
2742
2743impl fidl::Persistable for Size5Alignment4Vector {}
2744
2745#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2746#[repr(C)]
2747pub struct Size8Align8 {
2748 pub data: u64,
2749}
2750
2751impl fidl::Persistable for Size8Align8 {}
2752
2753#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2754pub struct StrictBitsUint16Struct {
2755 pub b: StrictBitsUint16,
2756}
2757
2758impl fidl::Persistable for StrictBitsUint16Struct {}
2759
2760#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2761pub struct StrictBitsUint32Struct {
2762 pub b: StrictBitsUint32,
2763}
2764
2765impl fidl::Persistable for StrictBitsUint32Struct {}
2766
2767#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2768pub struct StrictBitsUint64Struct {
2769 pub b: StrictBitsUint64,
2770}
2771
2772impl fidl::Persistable for StrictBitsUint64Struct {}
2773
2774#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2775pub struct StrictBitsUint8Struct {
2776 pub b: StrictBitsUint8,
2777}
2778
2779impl fidl::Persistable for StrictBitsUint8Struct {}
2780
2781#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2782pub struct StrictEnumInt16Struct {
2783 pub e: StrictEnumInt16,
2784}
2785
2786impl fidl::Persistable for StrictEnumInt16Struct {}
2787
2788#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2789pub struct StrictEnumInt32Struct {
2790 pub e: StrictEnumInt32,
2791}
2792
2793impl fidl::Persistable for StrictEnumInt32Struct {}
2794
2795#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2796pub struct StrictEnumInt64Struct {
2797 pub e: StrictEnumInt64,
2798}
2799
2800impl fidl::Persistable for StrictEnumInt64Struct {}
2801
2802#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2803pub struct StrictEnumInt8Struct {
2804 pub e: StrictEnumInt8,
2805}
2806
2807impl fidl::Persistable for StrictEnumInt8Struct {}
2808
2809#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2810pub struct StrictEnumUint16Struct {
2811 pub e: StrictEnumUint16,
2812}
2813
2814impl fidl::Persistable for StrictEnumUint16Struct {}
2815
2816#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2817pub struct StrictEnumUint32Struct {
2818 pub e: StrictEnumUint32,
2819}
2820
2821impl fidl::Persistable for StrictEnumUint32Struct {}
2822
2823#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2824pub struct StrictEnumUint64Struct {
2825 pub e: StrictEnumUint64,
2826}
2827
2828impl fidl::Persistable for StrictEnumUint64Struct {}
2829
2830#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2831pub struct StrictEnumUint8Struct {
2832 pub e: StrictEnumUint8,
2833}
2834
2835impl fidl::Persistable for StrictEnumUint8Struct {}
2836
2837#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2838pub struct StringUnionStruct {
2839 pub u: StringBoolUnion,
2840 pub nullable_u: Option<Box<StringBoolUnion>>,
2841}
2842
2843impl fidl::Persistable for StringUnionStruct {}
2844
2845#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2846pub struct StringUnionStructWrapper {
2847 pub sus: StringUnionStruct,
2848}
2849
2850impl fidl::Persistable for StringUnionStructWrapper {}
2851
2852#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2853pub struct StringUnionStructWrapperResponse {
2854 pub header: TransactionHeader,
2855 pub body: StringUnionStructWrapper,
2856}
2857
2858impl fidl::Persistable for StringUnionStructWrapperResponse {}
2859
2860#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2861pub struct StringUnionVector {
2862 pub the_vector: Vec<Option<Box<StringUnion>>>,
2863}
2864
2865impl fidl::Persistable for StringUnionVector {}
2866
2867#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2868pub struct StringWrapper {
2869 pub str: String,
2870}
2871
2872impl fidl::Persistable for StringWrapper {}
2873
2874#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2875#[repr(C)]
2876pub struct Struct1Byte {
2877 pub a: i8,
2878}
2879
2880impl fidl::Persistable for Struct1Byte {}
2881
2882#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2883#[repr(C)]
2884pub struct Struct2Byte {
2885 pub a: i16,
2886}
2887
2888impl fidl::Persistable for Struct2Byte {}
2889
2890#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2891#[repr(C)]
2892pub struct Struct3Byte {
2893 pub a: i16,
2894 pub b: i8,
2895}
2896
2897impl fidl::Persistable for Struct3Byte {}
2898
2899#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2900#[repr(C)]
2901pub struct Struct4Byte {
2902 pub a: i32,
2903}
2904
2905impl fidl::Persistable for Struct4Byte {}
2906
2907#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2908#[repr(C)]
2909pub struct Struct5Byte {
2910 pub a: i32,
2911 pub b: i8,
2912}
2913
2914impl fidl::Persistable for Struct5Byte {}
2915
2916#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2917#[repr(C)]
2918pub struct Struct6Byte {
2919 pub a: i32,
2920 pub b: i16,
2921}
2922
2923impl fidl::Persistable for Struct6Byte {}
2924
2925#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2926#[repr(C)]
2927pub struct Struct7Byte {
2928 pub a: i32,
2929 pub b: i16,
2930 pub c: i8,
2931}
2932
2933impl fidl::Persistable for Struct7Byte {}
2934
2935#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2936#[repr(C)]
2937pub struct Struct8Byte {
2938 pub a: i64,
2939}
2940
2941impl fidl::Persistable for Struct8Byte {}
2942
2943#[derive(Clone, Debug, PartialEq)]
2944pub struct StructOfEmptyFlexibleUnion {
2945 pub empty: EmptyFlexibleUnion,
2946}
2947
2948impl fidl::Persistable for StructOfEmptyFlexibleUnion {}
2949
2950#[derive(Clone, Debug, PartialEq)]
2951pub struct StructOfEmptyTable {
2952 pub table: EmptyTable,
2953}
2954
2955impl fidl::Persistable for StructOfEmptyTable {}
2956
2957#[derive(Clone, Debug, PartialEq)]
2958pub struct StructOfReverseOrdinalTable {
2959 pub table: ReverseOrdinalTable,
2960}
2961
2962impl fidl::Persistable for StructOfReverseOrdinalTable {}
2963
2964#[derive(Clone, Debug, PartialEq)]
2965pub struct StructOfSimpleTable {
2966 pub table: SimpleTable,
2967}
2968
2969impl fidl::Persistable for StructOfSimpleTable {}
2970
2971#[derive(Clone, Debug, PartialEq)]
2972pub struct StructOfTableWithGaps {
2973 pub table: TableWithGaps,
2974}
2975
2976impl fidl::Persistable for StructOfTableWithGaps {}
2977
2978#[derive(Clone, Debug, PartialEq)]
2979pub struct StructOfTableWithStringAndVector {
2980 pub table: TableWithStringAndVector,
2981}
2982
2983impl fidl::Persistable for StructOfTableWithStringAndVector {}
2984
2985#[derive(Clone, Debug, PartialEq)]
2986pub struct StructOfTableWithXUnion {
2987 pub value: TableWithXUnion,
2988}
2989
2990impl fidl::Persistable for StructOfTableWithXUnion {}
2991
2992#[derive(Clone, Debug, PartialEq)]
2993pub struct StructOfUnionOfTable {
2994 pub u: UnionOfTable,
2995}
2996
2997impl fidl::Persistable for StructOfUnionOfTable {}
2998
2999#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3000#[repr(C)]
3001pub struct StructSize16Align8 {
3002 pub f1: u64,
3003 pub f2: u64,
3004}
3005
3006impl fidl::Persistable for StructSize16Align8 {}
3007
3008#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3009#[repr(C)]
3010pub struct StructSize3Align1 {
3011 pub three_bytes: [u8; 3],
3012}
3013
3014impl fidl::Persistable for StructSize3Align1 {}
3015
3016#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3017#[repr(C)]
3018pub struct StructSize3Align2 {
3019 pub f1: u16,
3020 pub f2: u8,
3021}
3022
3023impl fidl::Persistable for StructSize3Align2 {}
3024
3025#[derive(Clone, Debug, PartialEq)]
3026pub struct StructTableNoFields {
3027 pub t: TableNoFields,
3028}
3029
3030impl fidl::Persistable for StructTableNoFields {}
3031
3032#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3033pub struct StructWithArrays {
3034 pub arr_int: [i32; 2],
3035 pub arr_string: [String; 2],
3036 pub arr_nullable_string: [Option<String>; 2],
3037 pub arr_struct: [StructWithInt; 2],
3038 pub arr_nullable_struct: [Option<Box<StructWithInt>>; 2],
3039 pub arr_arr_int: [[i32; 3]; 2],
3040}
3041
3042impl fidl::Persistable for StructWithArrays {}
3043
3044#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3045#[repr(C)]
3046pub struct StructWithInt {
3047 pub x: i32,
3048}
3049
3050impl fidl::Persistable for StructWithInt {}
3051
3052#[derive(Clone, Debug, PartialEq)]
3053pub struct StructWithOptionals {
3054 pub s: EmptyStruct,
3055 pub s2: Option<Box<EmptyStruct>>,
3056 pub t: TableWithEmptyStruct,
3057 pub xu: XUnionWithEmptyStruct,
3058 pub xu2: Option<Box<XUnionWithEmptyStruct>>,
3059 pub u: UnionWithEmptyStruct,
3060 pub u2: Option<Box<UnionWithEmptyStruct>>,
3061}
3062
3063impl fidl::Persistable for StructWithOptionals {}
3064
3065#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3066pub struct StructWithVectors {
3067 pub vec_empty: Vec<i32>,
3068 pub vec_int: Vec<i32>,
3069 pub vec_string: Vec<String>,
3070 pub vec_nullable_string: Vec<Option<String>>,
3071 pub vec_struct: Vec<StructWithInt>,
3072 pub vec_nullable_struct: Vec<Option<Box<StructWithInt>>>,
3073 pub vec_vec_int: Vec<Vec<i32>>,
3074}
3075
3076impl fidl::Persistable for StructWithVectors {}
3077
3078#[derive(Clone, Debug, PartialEq)]
3079pub struct TableFieldInlinedStruct {
3080 pub t: TableFieldInlined,
3081}
3082
3083impl fidl::Persistable for TableFieldInlinedStruct {}
3084
3085#[derive(Clone, Debug, PartialEq)]
3086pub struct TableFieldOutOfLineStruct {
3087 pub t: TableFieldOutOfLine,
3088}
3089
3090impl fidl::Persistable for TableFieldOutOfLineStruct {}
3091
3092#[derive(Clone, Debug, PartialEq)]
3093pub struct TableFieldUnknownStruct {
3094 pub t: TableFieldUnknown,
3095}
3096
3097impl fidl::Persistable for TableFieldUnknownStruct {}
3098
3099#[derive(Clone, Debug, PartialEq)]
3100pub struct TableFieldUnsetFlexibleEnumInlinedStruct {
3101 pub t: TableFieldUnsetFlexibleEnumInlined,
3102}
3103
3104impl fidl::Persistable for TableFieldUnsetFlexibleEnumInlinedStruct {}
3105
3106#[derive(Clone, Debug, PartialEq)]
3107pub struct TableStructWithReservedSandwichStruct {
3108 pub table: TableStructWithReservedSandwich,
3109}
3110
3111impl fidl::Persistable for TableStructWithReservedSandwichStruct {}
3112
3113#[derive(Clone, Debug, PartialEq)]
3114pub struct TableStructWithUint32SandwichStruct {
3115 pub table: TableStructWithUint32Sandwich,
3116}
3117
3118impl fidl::Persistable for TableStructWithUint32SandwichStruct {}
3119
3120#[derive(Clone, Debug, PartialEq)]
3121pub struct TableWithReservedFieldThenUnionStruct {
3122 pub t: TableWithReservedFieldThenUnion,
3123}
3124
3125impl fidl::Persistable for TableWithReservedFieldThenUnionStruct {}
3126
3127#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3128pub struct TestAddEthernetDeviceRequest {
3129 pub topological_path: String,
3130 pub config: InterfaceConfig,
3131 pub this_should_be_a_handle: u32,
3132}
3133
3134impl fidl::Persistable for TestAddEthernetDeviceRequest {}
3135
3136#[derive(Clone, Debug, PartialEq)]
3137pub struct TestFlexibleXUnionInStruct {
3138 pub xu: SampleXUnion,
3139}
3140
3141impl fidl::Persistable for TestFlexibleXUnionInStruct {}
3142
3143#[derive(Clone, Debug, PartialEq)]
3144pub struct TestInlineXUnionInStruct {
3145 pub before: String,
3146 pub xu: SampleXUnion,
3147 pub after: String,
3148}
3149
3150impl fidl::Persistable for TestInlineXUnionInStruct {}
3151
3152#[derive(Clone, Debug, PartialEq)]
3153pub struct TestOptionalFlexibleXUnionInStruct {
3154 pub xu: Option<Box<SampleXUnion>>,
3155}
3156
3157impl fidl::Persistable for TestOptionalFlexibleXUnionInStruct {}
3158
3159#[derive(Clone, Debug, PartialEq)]
3160pub struct TestOptionalStrictXUnionInStruct {
3161 pub xu: Option<Box<SampleStrictXUnion>>,
3162}
3163
3164impl fidl::Persistable for TestOptionalStrictXUnionInStruct {}
3165
3166#[derive(Clone, Debug, PartialEq)]
3167pub struct TestOptionalXUnionInStruct {
3168 pub before: String,
3169 pub xu: Option<Box<SampleXUnion>>,
3170 pub after: String,
3171}
3172
3173impl fidl::Persistable for TestOptionalXUnionInStruct {}
3174
3175#[derive(Clone, Debug, PartialEq)]
3176pub struct TestStrictXUnionInStruct {
3177 pub xu: SampleStrictXUnion,
3178}
3179
3180impl fidl::Persistable for TestStrictXUnionInStruct {}
3181
3182#[derive(Clone, Debug, PartialEq)]
3183pub struct TestXUnionInTable {
3184 pub value: XUnionInTable,
3185}
3186
3187impl fidl::Persistable for TestXUnionInTable {}
3188
3189#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3190#[repr(C)]
3191pub struct ThreeByte {
3192 pub elem1: u8,
3193 pub elem2: u8,
3194 pub elem3: u8,
3195}
3196
3197impl fidl::Persistable for ThreeByte {}
3198
3199#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3200#[repr(C)]
3201pub struct ThreeByteInArray {
3202 pub elems: [ThreeByte; 3],
3203}
3204
3205impl fidl::Persistable for ThreeByteInArray {}
3206
3207#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3208#[repr(C)]
3209pub struct ThreeByteInStruct {
3210 pub elem1: ThreeByte,
3211 pub elem2: ThreeByte,
3212 pub elem3: ThreeByte,
3213}
3214
3215impl fidl::Persistable for ThreeByteInStruct {}
3216
3217#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3218pub struct ThreeByteInVector {
3219 pub elems: Vec<ThreeByte>,
3220}
3221
3222impl fidl::Persistable for ThreeByteInVector {}
3223
3224#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3225#[repr(C)]
3226pub struct TransactionHeader {
3227 pub tx_id: u32,
3228 pub flags: [u8; 3],
3229 pub magic_number: u8,
3230 pub ordinal: u64,
3231}
3232
3233impl fidl::Persistable for TransactionHeader {}
3234
3235#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3236pub struct TransformerEmptyStruct;
3237
3238impl fidl::Persistable for TransformerEmptyStruct {}
3239
3240#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3241pub struct TwoEmptyStructsInStruct {
3242 pub a: EmptyStruct,
3243 pub b: EmptyStruct,
3244}
3245
3246impl fidl::Persistable for TwoEmptyStructsInStruct {}
3247
3248#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3249pub struct TwoEmptyStructsInStructInVectorInStruct {
3250 pub v: Vec<TwoEmptyStructsInStruct>,
3251}
3252
3253impl fidl::Persistable for TwoEmptyStructsInStructInVectorInStruct {}
3254
3255#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3256pub struct TwoLayerStructInnerBool {
3257 pub s: OneLayerStructWithBool,
3258 pub a: u64,
3259}
3260
3261impl fidl::Persistable for TwoLayerStructInnerBool {}
3262
3263#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3264#[repr(C)]
3265pub struct TwoLayerStructInnerPaddingAlign4 {
3266 pub s: OneLayerStructWithPaddingAlign4,
3267 pub a: u32,
3268}
3269
3270impl fidl::Persistable for TwoLayerStructInnerPaddingAlign4 {}
3271
3272#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3273#[repr(C)]
3274pub struct TwoLayerStructInnerPaddingAlign8 {
3275 pub s: OneLayerStructWithPaddingAlign8,
3276 pub a: u64,
3277}
3278
3279impl fidl::Persistable for TwoLayerStructInnerPaddingAlign8 {}
3280
3281#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3282#[repr(C)]
3283pub struct TwoLayerStructNoPaddingAlign4 {
3284 pub s: OneLayerStructNoPaddingAlign4,
3285 pub a: u32,
3286}
3287
3288impl fidl::Persistable for TwoLayerStructNoPaddingAlign4 {}
3289
3290#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3291#[repr(C)]
3292pub struct TwoLayerStructNoPaddingAlign8 {
3293 pub s: OneLayerStructNoPaddingAlign8,
3294 pub a: u64,
3295}
3296
3297impl fidl::Persistable for TwoLayerStructNoPaddingAlign8 {}
3298
3299#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3300#[repr(C)]
3301pub struct Uint16Struct {
3302 pub val: u16,
3303}
3304
3305impl fidl::Persistable for Uint16Struct {}
3306
3307#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3308#[repr(C)]
3309pub struct Uint32Struct {
3310 pub val: u32,
3311}
3312
3313impl fidl::Persistable for Uint32Struct {}
3314
3315#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3316#[repr(C)]
3317pub struct Uint64Struct {
3318 pub val: u64,
3319}
3320
3321impl fidl::Persistable for Uint64Struct {}
3322
3323#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3324#[repr(C)]
3325pub struct Uint64Uint32Uint16Uint8 {
3326 pub f1: u64,
3327 pub f2: u32,
3328 pub f3: u16,
3329 pub f4: u8,
3330}
3331
3332impl fidl::Persistable for Uint64Uint32Uint16Uint8 {}
3333
3334#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3335#[repr(C)]
3336pub struct Uint8Struct {
3337 pub val: u8,
3338}
3339
3340impl fidl::Persistable for Uint8Struct {}
3341
3342#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3343#[repr(C)]
3344pub struct Uint8Uint16Uint32Uint64 {
3345 pub f1: u8,
3346 pub f2: u16,
3347 pub f3: u32,
3348 pub f4: u64,
3349}
3350
3351impl fidl::Persistable for Uint8Uint16Uint32Uint64 {}
3352
3353#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3354pub struct Uint8UnionStruct {
3355 pub u: Uint8Union,
3356}
3357
3358impl fidl::Persistable for Uint8UnionStruct {}
3359
3360#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3361pub struct UnboundedNonnullableString {
3362 pub s0: String,
3363}
3364
3365impl fidl::Persistable for UnboundedNonnullableString {}
3366
3367#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3368pub struct UnboundedNonnullableVectorOfUint32s {
3369 pub vu0: Vec<u32>,
3370}
3371
3372impl fidl::Persistable for UnboundedNonnullableVectorOfUint32s {}
3373
3374#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3375pub struct UnboundedNullableString {
3376 pub s0: Option<String>,
3377}
3378
3379impl fidl::Persistable for UnboundedNullableString {}
3380
3381#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3382pub struct UnboundedNullableVectorOfUint32s {
3383 pub vu0: Option<Vec<u32>>,
3384}
3385
3386impl fidl::Persistable for UnboundedNullableVectorOfUint32s {}
3387
3388#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3389pub struct UnionInlinePaddingStruct {
3390 pub u: UnionInlinePadding,
3391}
3392
3393impl fidl::Persistable for UnionInlinePaddingStruct {}
3394
3395#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3396pub struct UnionWithBoundStringStruct {
3397 pub v: UnionWithBoundString,
3398}
3399
3400impl fidl::Persistable for UnionWithBoundStringStruct {}
3401
3402#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3403pub struct UpdatePolicy {
3404 pub fetch_if_absent: bool,
3405 pub allow_old_versions: bool,
3406}
3407
3408impl fidl::Persistable for UpdatePolicy {}
3409
3410#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3411pub struct VectorOfByteVector {
3412 pub v: Vec<Vec<u8>>,
3413}
3414
3415impl fidl::Persistable for VectorOfByteVector {}
3416
3417#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3418pub struct VectorOfEnumStruct {
3419 pub v: Vec<StrictEnumInt16>,
3420}
3421
3422impl fidl::Persistable for VectorOfEnumStruct {}
3423
3424#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3425pub struct VectorOfStrings {
3426 pub v: Vec<String>,
3427}
3428
3429impl fidl::Persistable for VectorOfStrings {}
3430
3431#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3432pub struct VectorWithLimit {
3433 pub v: Vec<u8>,
3434}
3435
3436impl fidl::Persistable for VectorWithLimit {}
3437
3438#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3439pub struct VectorWrapper {
3440 pub v: Vec<u8>,
3441}
3442
3443impl fidl::Persistable for VectorWrapper {}
3444
3445#[derive(Clone, Debug, PartialEq)]
3446pub struct XUnionWithStructStruct {
3447 pub xu: XUnionWithStruct,
3448}
3449
3450impl fidl::Persistable for XUnionWithStructStruct {}
3451
3452#[derive(Clone, Debug, PartialEq)]
3453pub struct XUnionWithXUnionStruct {
3454 pub xu: XUnionWithXUnion,
3455}
3456
3457impl fidl::Persistable for XUnionWithXUnionStruct {}
3458
3459#[derive(Clone, Debug, Default, PartialEq)]
3460pub struct CompatTableString {
3461 pub s: Option<String>,
3462 #[doc(hidden)]
3463 pub __source_breaking: fidl::marker::SourceBreaking,
3464}
3465
3466impl fidl::Persistable for CompatTableString {}
3467
3468#[derive(Clone, Debug, Default, PartialEq)]
3469pub struct CompatTableValue {
3470 pub union_member: Option<CompatUnion>,
3471 pub array_member: Option<[u32; 3]>,
3472 pub table_member: Option<CompatTableString>,
3473 pub xunion_member: Option<CompatXUnion>,
3474 #[doc(hidden)]
3475 pub __source_breaking: fidl::marker::SourceBreaking,
3476}
3477
3478impl fidl::Persistable for CompatTableValue {}
3479
3480#[derive(Clone, Debug, Default, PartialEq)]
3481pub struct EmptyTable {
3482 #[doc(hidden)]
3483 pub __source_breaking: fidl::marker::SourceBreaking,
3484}
3485
3486impl fidl::Persistable for EmptyTable {}
3487
3488#[derive(Clone, Debug, Default, PartialEq)]
3489pub struct FidlvizTable {
3490 pub f1: Option<bool>,
3491 pub f3: Option<bool>,
3492 #[doc(hidden)]
3493 pub __source_breaking: fidl::marker::SourceBreaking,
3494}
3495
3496impl fidl::Persistable for FidlvizTable {}
3497
3498#[derive(Clone, Debug, Default, PartialEq)]
3499pub struct GoldenTable {
3500 pub v: Option<i16>,
3501 #[doc(hidden)]
3502 pub __source_breaking: fidl::marker::SourceBreaking,
3503}
3504
3505impl fidl::Persistable for GoldenTable {}
3506
3507#[derive(Clone, Debug, Default, PartialEq)]
3508pub struct PaddedTable {
3509 pub field: Option<i8>,
3510 #[doc(hidden)]
3511 pub __source_breaking: fidl::marker::SourceBreaking,
3512}
3513
3514impl fidl::Persistable for PaddedTable {}
3515
3516#[derive(Clone, Debug, Default, PartialEq)]
3517pub struct RecursiveOptionalAndTable {
3518 pub recursive_optional: Option<RecursiveOptionalStruct>,
3519 #[doc(hidden)]
3520 pub __source_breaking: fidl::marker::SourceBreaking,
3521}
3522
3523impl fidl::Persistable for RecursiveOptionalAndTable {}
3524
3525#[derive(Clone, Debug, Default, PartialEq)]
3526pub struct RecursiveTable {
3527 pub s: Option<RecursiveTableOptionalHolder>,
3528 #[doc(hidden)]
3529 pub __source_breaking: fidl::marker::SourceBreaking,
3530}
3531
3532impl fidl::Persistable for RecursiveTable {}
3533
3534#[derive(Clone, Debug, Default, PartialEq)]
3535pub struct Regression10TableV1 {
3536 pub member1: Option<u64>,
3537 #[doc(hidden)]
3538 pub __source_breaking: fidl::marker::SourceBreaking,
3539}
3540
3541impl fidl::Persistable for Regression10TableV1 {}
3542
3543#[derive(Clone, Debug, Default, PartialEq)]
3544pub struct Regression10TableV2 {
3545 pub member1: Option<u64>,
3546 pub member2: Option<u64>,
3547 #[doc(hidden)]
3548 pub __source_breaking: fidl::marker::SourceBreaking,
3549}
3550
3551impl fidl::Persistable for Regression10TableV2 {}
3552
3553#[derive(Clone, Debug, Default, PartialEq)]
3554pub struct Regression10TableV3 {
3555 pub x: Option<i64>,
3556 pub y: Option<i64>,
3557 pub z: Option<i64>,
3558 #[doc(hidden)]
3559 pub __source_breaking: fidl::marker::SourceBreaking,
3560}
3561
3562impl fidl::Persistable for Regression10TableV3 {}
3563
3564#[derive(Clone, Debug, Default, PartialEq)]
3565pub struct ReverseOrdinalTable {
3566 pub z: Option<i64>,
3567 pub y: Option<i64>,
3568 pub x: Option<i64>,
3569 #[doc(hidden)]
3570 pub __source_breaking: fidl::marker::SourceBreaking,
3571}
3572
3573impl fidl::Persistable for ReverseOrdinalTable {}
3574
3575#[derive(Clone, Debug, Default, PartialEq)]
3576pub struct SimpleTable {
3577 pub x: Option<i64>,
3578 pub y: Option<i64>,
3579 #[doc(hidden)]
3580 pub __source_breaking: fidl::marker::SourceBreaking,
3581}
3582
3583impl fidl::Persistable for SimpleTable {}
3584
3585#[derive(Clone, Debug, Default, PartialEq)]
3586pub struct TableFieldInlined {
3587 pub f: Option<i32>,
3588 #[doc(hidden)]
3589 pub __source_breaking: fidl::marker::SourceBreaking,
3590}
3591
3592impl fidl::Persistable for TableFieldInlined {}
3593
3594#[derive(Clone, Debug, Default, PartialEq)]
3595pub struct TableFieldOutOfLine {
3596 pub f: Option<i64>,
3597 #[doc(hidden)]
3598 pub __source_breaking: fidl::marker::SourceBreaking,
3599}
3600
3601impl fidl::Persistable for TableFieldOutOfLine {}
3602
3603#[derive(Clone, Debug, Default, PartialEq)]
3604pub struct TableFieldUnknown {
3605 #[doc(hidden)]
3606 pub __source_breaking: fidl::marker::SourceBreaking,
3607}
3608
3609impl fidl::Persistable for TableFieldUnknown {}
3610
3611#[derive(Clone, Debug, Default, PartialEq)]
3612pub struct TableFieldUnsetFlexibleEnumInlined {
3613 pub signed_enum: Option<SignedEnum>,
3614 pub unsigned_enum: Option<UnsignedEnum>,
3615 pub always_set: Option<bool>,
3616 #[doc(hidden)]
3617 pub __source_breaking: fidl::marker::SourceBreaking,
3618}
3619
3620impl fidl::Persistable for TableFieldUnsetFlexibleEnumInlined {}
3621
3622#[derive(Clone, Debug, Default, PartialEq)]
3623pub struct TableNoFields {
3624 #[doc(hidden)]
3625 pub __source_breaking: fidl::marker::SourceBreaking,
3626}
3627
3628impl fidl::Persistable for TableNoFields {}
3629
3630#[derive(Clone, Debug, Default, PartialEq)]
3631pub struct TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
3632 pub member: Option<UnionOfXUnionThenTableThenXUnionThenUnion>,
3633 #[doc(hidden)]
3634 pub __source_breaking: fidl::marker::SourceBreaking,
3635}
3636
3637impl fidl::Persistable for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {}
3638
3639#[derive(Clone, Debug, Default, PartialEq)]
3640pub struct TableOfXUnionThenUnion {
3641 pub member: Option<XUnionOfUnion>,
3642 #[doc(hidden)]
3643 pub __source_breaking: fidl::marker::SourceBreaking,
3644}
3645
3646impl fidl::Persistable for TableOfXUnionThenUnion {}
3647
3648#[derive(Clone, Debug, Default, PartialEq)]
3649pub struct TableStructWithReservedSandwich {
3650 pub s1: Option<StructSize3Align1>,
3651 pub s2: Option<StructSize3Align1>,
3652 #[doc(hidden)]
3653 pub __source_breaking: fidl::marker::SourceBreaking,
3654}
3655
3656impl fidl::Persistable for TableStructWithReservedSandwich {}
3657
3658#[derive(Clone, Debug, Default, PartialEq)]
3659pub struct TableStructWithUint32Sandwich {
3660 pub i: Option<u32>,
3661 pub s1: Option<StructSize3Align1>,
3662 pub s2: Option<StructSize3Align1>,
3663 pub i2: Option<u32>,
3664 #[doc(hidden)]
3665 pub __source_breaking: fidl::marker::SourceBreaking,
3666}
3667
3668impl fidl::Persistable for TableStructWithUint32Sandwich {}
3669
3670#[derive(Clone, Debug, Default, PartialEq)]
3671pub struct TableWithEmptyStruct {
3672 pub s: Option<EmptyStruct>,
3673 #[doc(hidden)]
3674 pub __source_breaking: fidl::marker::SourceBreaking,
3675}
3676
3677impl fidl::Persistable for TableWithEmptyStruct {}
3678
3679#[derive(Clone, Debug, Default, PartialEq)]
3680pub struct TableWithGaps {
3681 pub second: Option<i32>,
3682 pub fourth: Option<i32>,
3683 #[doc(hidden)]
3684 pub __source_breaking: fidl::marker::SourceBreaking,
3685}
3686
3687impl fidl::Persistable for TableWithGaps {}
3688
3689#[derive(Clone, Debug, Default, PartialEq)]
3690pub struct TableWithReservedFieldThenUnion {
3691 pub uv: Option<UnionSize8Align4>,
3692 #[doc(hidden)]
3693 pub __source_breaking: fidl::marker::SourceBreaking,
3694}
3695
3696impl fidl::Persistable for TableWithReservedFieldThenUnion {}
3697
3698#[derive(Clone, Debug, Default, PartialEq)]
3699pub struct TableWithStringAndVector {
3700 pub foo: Option<String>,
3701 pub bar: Option<i32>,
3702 pub baz: Option<Vec<u8>>,
3703 #[doc(hidden)]
3704 pub __source_breaking: fidl::marker::SourceBreaking,
3705}
3706
3707impl fidl::Persistable for TableWithStringAndVector {}
3708
3709#[derive(Clone, Debug, Default, PartialEq)]
3710pub struct TableWithUnionSize12Align4 {
3711 pub before: Option<u8>,
3712 pub member: Option<UnionSize12Align4>,
3713 pub after: Option<u8>,
3714 #[doc(hidden)]
3715 pub __source_breaking: fidl::marker::SourceBreaking,
3716}
3717
3718impl fidl::Persistable for TableWithUnionSize12Align4 {}
3719
3720#[derive(Clone, Debug, Default, PartialEq)]
3721pub struct TableWithXUnion {
3722 pub member: Option<CompatXUnion>,
3723 #[doc(hidden)]
3724 pub __source_breaking: fidl::marker::SourceBreaking,
3725}
3726
3727impl fidl::Persistable for TableWithXUnion {}
3728
3729#[derive(Clone, Debug, Default, PartialEq)]
3730pub struct TransformerSimpleTable {
3731 pub value: Option<u32>,
3732 #[doc(hidden)]
3733 pub __source_breaking: fidl::marker::SourceBreaking,
3734}
3735
3736impl fidl::Persistable for TransformerSimpleTable {}
3737
3738#[derive(Clone, Debug, Default, PartialEq)]
3739pub struct XUnionInTable {
3740 pub before: Option<String>,
3741 pub xu: Option<SampleXUnion>,
3742 pub after: Option<String>,
3743 #[doc(hidden)]
3744 pub __source_breaking: fidl::marker::SourceBreaking,
3745}
3746
3747impl fidl::Persistable for XUnionInTable {}
3748
3749#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3750pub enum CompatUnion {
3751 S(String),
3752 B(bool),
3753}
3754
3755impl CompatUnion {
3756 #[inline]
3757 pub fn ordinal(&self) -> u64 {
3758 match *self {
3759 Self::S(_) => 1,
3760 Self::B(_) => 2,
3761 }
3762 }
3763}
3764
3765impl fidl::Persistable for CompatUnion {}
3766
3767#[derive(Clone, Debug)]
3768pub enum CompatXUnion {
3769 S(String),
3770 B(bool),
3771 #[doc(hidden)]
3772 __SourceBreaking {
3773 unknown_ordinal: u64,
3774 },
3775}
3776
3777#[macro_export]
3779macro_rules! CompatXUnionUnknown {
3780 () => {
3781 _
3782 };
3783}
3784
3785impl PartialEq for CompatXUnion {
3787 fn eq(&self, other: &Self) -> bool {
3788 match (self, other) {
3789 (Self::S(x), Self::S(y)) => *x == *y,
3790 (Self::B(x), Self::B(y)) => *x == *y,
3791 _ => false,
3792 }
3793 }
3794}
3795
3796impl CompatXUnion {
3797 #[inline]
3798 pub fn ordinal(&self) -> u64 {
3799 match *self {
3800 Self::S(_) => 1,
3801 Self::B(_) => 2,
3802 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
3803 }
3804 }
3805
3806 #[inline]
3807 pub fn unknown_variant_for_testing() -> Self {
3808 Self::__SourceBreaking { unknown_ordinal: 0 }
3809 }
3810
3811 #[inline]
3812 pub fn is_unknown(&self) -> bool {
3813 match self {
3814 Self::__SourceBreaking { .. } => true,
3815 _ => false,
3816 }
3817 }
3818}
3819
3820impl fidl::Persistable for CompatXUnion {}
3821
3822#[derive(Clone, Debug)]
3823pub enum EmptyFlexibleUnion {
3824 #[doc(hidden)]
3825 __SourceBreaking { unknown_ordinal: u64 },
3826}
3827
3828#[macro_export]
3830macro_rules! EmptyFlexibleUnionUnknown {
3831 () => {
3832 _
3833 };
3834}
3835
3836impl PartialEq for EmptyFlexibleUnion {
3838 fn eq(&self, other: &Self) -> bool {
3839 match (self, other) {
3840 _ => false,
3841 }
3842 }
3843}
3844
3845impl EmptyFlexibleUnion {
3846 #[inline]
3847 pub fn ordinal(&self) -> u64 {
3848 match *self {
3849 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
3850 }
3851 }
3852
3853 #[inline]
3854 pub fn unknown_variant_for_testing() -> Self {
3855 Self::__SourceBreaking { unknown_ordinal: 0 }
3856 }
3857
3858 #[inline]
3859 pub fn is_unknown(&self) -> bool {
3860 match self {
3861 Self::__SourceBreaking { .. } => true,
3862 }
3863 }
3864}
3865
3866impl fidl::Persistable for EmptyFlexibleUnion {}
3867
3868#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3869pub enum EmptyStructUnion {
3870 Unused(u8),
3871 Es(TransformerEmptyStruct),
3872}
3873
3874impl EmptyStructUnion {
3875 #[inline]
3876 pub fn ordinal(&self) -> u64 {
3877 match *self {
3878 Self::Unused(_) => 1,
3879 Self::Es(_) => 2,
3880 }
3881 }
3882}
3883
3884impl fidl::Persistable for EmptyStructUnion {}
3885
3886#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3887pub enum FidlvizUnion {
3888 F7(String),
3889}
3890
3891impl FidlvizUnion {
3892 #[inline]
3893 pub fn ordinal(&self) -> u64 {
3894 match *self {
3895 Self::F7(_) => 7,
3896 }
3897 }
3898}
3899
3900impl fidl::Persistable for FidlvizUnion {}
3901
3902#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3903pub enum GoldenUnion {
3904 V(i16),
3905}
3906
3907impl GoldenUnion {
3908 #[inline]
3909 pub fn ordinal(&self) -> u64 {
3910 match *self {
3911 Self::V(_) => 1,
3912 }
3913 }
3914}
3915
3916impl fidl::Persistable for GoldenUnion {}
3917
3918#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3919pub enum IpAddressConfig {
3920 PaddingSize24Align4([u32; 6]),
3921 Dhcp(bool),
3922}
3923
3924impl IpAddressConfig {
3925 #[inline]
3926 pub fn ordinal(&self) -> u64 {
3927 match *self {
3928 Self::PaddingSize24Align4(_) => 1,
3929 Self::Dhcp(_) => 2,
3930 }
3931 }
3932}
3933
3934impl fidl::Persistable for IpAddressConfig {}
3935
3936#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3937pub enum MutualRecursionUnion {
3938 S(MutualRecursionUnionStruct),
3939}
3940
3941impl MutualRecursionUnion {
3942 #[inline]
3943 pub fn ordinal(&self) -> u64 {
3944 match *self {
3945 Self::S(_) => 1,
3946 }
3947 }
3948}
3949
3950impl fidl::Persistable for MutualRecursionUnion {}
3951
3952#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3953pub enum PaddedUnion {
3954 Field(i8),
3955}
3956
3957impl PaddedUnion {
3958 #[inline]
3959 pub fn ordinal(&self) -> u64 {
3960 match *self {
3961 Self::Field(_) => 1,
3962 }
3963 }
3964}
3965
3966impl fidl::Persistable for PaddedUnion {}
3967
3968#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
3969pub enum RecursiveOptionalAndUnion {
3970 RecursiveOptional(RecursiveOptionalStruct),
3971}
3972
3973impl RecursiveOptionalAndUnion {
3974 #[inline]
3975 pub fn ordinal(&self) -> u64 {
3976 match *self {
3977 Self::RecursiveOptional(_) => 1,
3978 }
3979 }
3980}
3981
3982impl fidl::Persistable for RecursiveOptionalAndUnion {}
3983
3984#[derive(Clone, Debug)]
3985pub enum RecursiveUnion {
3986 S(RecursiveUnionStruct),
3987 #[doc(hidden)]
3988 __SourceBreaking {
3989 unknown_ordinal: u64,
3990 },
3991}
3992
3993#[macro_export]
3995macro_rules! RecursiveUnionUnknown {
3996 () => {
3997 _
3998 };
3999}
4000
4001impl PartialEq for RecursiveUnion {
4003 fn eq(&self, other: &Self) -> bool {
4004 match (self, other) {
4005 (Self::S(x), Self::S(y)) => *x == *y,
4006 _ => false,
4007 }
4008 }
4009}
4010
4011impl RecursiveUnion {
4012 #[inline]
4013 pub fn ordinal(&self) -> u64 {
4014 match *self {
4015 Self::S(_) => 1,
4016 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4017 }
4018 }
4019
4020 #[inline]
4021 pub fn unknown_variant_for_testing() -> Self {
4022 Self::__SourceBreaking { unknown_ordinal: 0 }
4023 }
4024
4025 #[inline]
4026 pub fn is_unknown(&self) -> bool {
4027 match self {
4028 Self::__SourceBreaking { .. } => true,
4029 _ => false,
4030 }
4031 }
4032}
4033
4034impl fidl::Persistable for RecursiveUnion {}
4035
4036#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4037pub enum RecursiveVectorUnion {
4038 Vec(Vec<Option<Box<RecursiveVectorUnion>>>),
4039}
4040
4041impl RecursiveVectorUnion {
4042 #[inline]
4043 pub fn ordinal(&self) -> u64 {
4044 match *self {
4045 Self::Vec(_) => 1,
4046 }
4047 }
4048}
4049
4050impl fidl::Persistable for RecursiveVectorUnion {}
4051
4052#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4053pub enum Regression9Result {
4054 Ok(Regression9Value),
4055 Error(u32),
4056}
4057
4058impl Regression9Result {
4059 #[inline]
4060 pub fn ordinal(&self) -> u64 {
4061 match *self {
4062 Self::Ok(_) => 1,
4063 Self::Error(_) => 2,
4064 }
4065 }
4066}
4067
4068impl fidl::Persistable for Regression9Result {}
4069
4070#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4071pub enum ReverseOrdinalUnion {
4072 Z(u32),
4073 Y(bool),
4074 X(i64),
4075}
4076
4077impl ReverseOrdinalUnion {
4078 #[inline]
4079 pub fn ordinal(&self) -> u64 {
4080 match *self {
4081 Self::Z(_) => 1,
4082 Self::Y(_) => 2,
4083 Self::X(_) => 4,
4084 }
4085 }
4086}
4087
4088impl fidl::Persistable for ReverseOrdinalUnion {}
4089
4090#[derive(Clone, Debug, PartialEq)]
4091pub enum SampleStrictXUnion {
4092 U(u32),
4093 Su(SimpleUnion),
4094 St(SimpleTable),
4095}
4096
4097impl SampleStrictXUnion {
4098 #[inline]
4099 pub fn ordinal(&self) -> u64 {
4100 match *self {
4101 Self::U(_) => 1,
4102 Self::Su(_) => 2,
4103 Self::St(_) => 3,
4104 }
4105 }
4106}
4107
4108impl fidl::Persistable for SampleStrictXUnion {}
4109
4110#[derive(Clone, Debug)]
4111pub enum SampleXUnion {
4112 U(u32),
4113 Su(SimpleUnion),
4114 St(SimpleTable),
4115 #[doc(hidden)]
4116 __SourceBreaking {
4117 unknown_ordinal: u64,
4118 },
4119}
4120
4121#[macro_export]
4123macro_rules! SampleXUnionUnknown {
4124 () => {
4125 _
4126 };
4127}
4128
4129impl PartialEq for SampleXUnion {
4131 fn eq(&self, other: &Self) -> bool {
4132 match (self, other) {
4133 (Self::U(x), Self::U(y)) => *x == *y,
4134 (Self::Su(x), Self::Su(y)) => *x == *y,
4135 (Self::St(x), Self::St(y)) => *x == *y,
4136 _ => false,
4137 }
4138 }
4139}
4140
4141impl SampleXUnion {
4142 #[inline]
4143 pub fn ordinal(&self) -> u64 {
4144 match *self {
4145 Self::U(_) => 1,
4146 Self::Su(_) => 2,
4147 Self::St(_) => 3,
4148 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4149 }
4150 }
4151
4152 #[inline]
4153 pub fn unknown_variant_for_testing() -> Self {
4154 Self::__SourceBreaking { unknown_ordinal: 0 }
4155 }
4156
4157 #[inline]
4158 pub fn is_unknown(&self) -> bool {
4159 match self {
4160 Self::__SourceBreaking { .. } => true,
4161 _ => false,
4162 }
4163 }
4164}
4165
4166impl fidl::Persistable for SampleXUnion {}
4167
4168#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4169pub enum SimpleUnion {
4170 I32(i32),
4171 I64(i64),
4172 S(Int64Struct),
4173 Str(String),
4174}
4175
4176impl SimpleUnion {
4177 #[inline]
4178 pub fn ordinal(&self) -> u64 {
4179 match *self {
4180 Self::I32(_) => 1,
4181 Self::I64(_) => 2,
4182 Self::S(_) => 3,
4183 Self::Str(_) => 4,
4184 }
4185 }
4186}
4187
4188impl fidl::Persistable for SimpleUnion {}
4189
4190#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4191pub enum SingleVariantUnion {
4192 X(u32),
4193}
4194
4195impl SingleVariantUnion {
4196 #[inline]
4197 pub fn ordinal(&self) -> u64 {
4198 match *self {
4199 Self::X(_) => 1,
4200 }
4201 }
4202}
4203
4204impl fidl::Persistable for SingleVariantUnion {}
4205
4206#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4207pub enum StringBoolUnion {
4208 S(String),
4209 B(bool),
4210}
4211
4212impl StringBoolUnion {
4213 #[inline]
4214 pub fn ordinal(&self) -> u64 {
4215 match *self {
4216 Self::S(_) => 1,
4217 Self::B(_) => 2,
4218 }
4219 }
4220}
4221
4222impl fidl::Persistable for StringBoolUnion {}
4223
4224#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4225pub enum StringUnion {
4226 Unused(u8),
4227 S(String),
4228 U8(u8),
4229}
4230
4231impl StringUnion {
4232 #[inline]
4233 pub fn ordinal(&self) -> u64 {
4234 match *self {
4235 Self::Unused(_) => 1,
4236 Self::S(_) => 2,
4237 Self::U8(_) => 3,
4238 }
4239 }
4240}
4241
4242impl fidl::Persistable for StringUnion {}
4243
4244#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4245pub enum Uint8Union {
4246 Uint8Value(u8),
4247 EmptyStruct(EmptyStruct),
4248}
4249
4250impl Uint8Union {
4251 #[inline]
4252 pub fn ordinal(&self) -> u64 {
4253 match *self {
4254 Self::Uint8Value(_) => 1,
4255 Self::EmptyStruct(_) => 2,
4256 }
4257 }
4258}
4259
4260impl fidl::Persistable for Uint8Union {}
4261
4262#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4263pub enum UnionAtTheBottom {
4264 Unused1(u8),
4265 Unused2(u8),
4266 Tiny(u8),
4267}
4268
4269impl UnionAtTheBottom {
4270 #[inline]
4271 pub fn ordinal(&self) -> u64 {
4272 match *self {
4273 Self::Unused1(_) => 1,
4274 Self::Unused2(_) => 2,
4275 Self::Tiny(_) => 3,
4276 }
4277 }
4278}
4279
4280impl fidl::Persistable for UnionAtTheBottom {}
4281
4282#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4283pub enum UnionInlinePadding {
4284 ThreePaddingBytes(u8),
4285 TwoPaddingBytes(u16),
4286 OnePaddingByte([u8; 3]),
4287}
4288
4289impl UnionInlinePadding {
4290 #[inline]
4291 pub fn ordinal(&self) -> u64 {
4292 match *self {
4293 Self::ThreePaddingBytes(_) => 1,
4294 Self::TwoPaddingBytes(_) => 2,
4295 Self::OnePaddingByte(_) => 3,
4296 }
4297 }
4298}
4299
4300impl fidl::Persistable for UnionInlinePadding {}
4301
4302#[derive(Clone, Debug, PartialEq)]
4303pub enum UnionOfTable {
4304 T(SimpleTable),
4305}
4306
4307impl UnionOfTable {
4308 #[inline]
4309 pub fn ordinal(&self) -> u64 {
4310 match *self {
4311 Self::T(_) => 1,
4312 }
4313 }
4314}
4315
4316impl fidl::Persistable for UnionOfTable {}
4317
4318#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4319pub enum UnionOfUnion {
4320 Unused1(u8),
4321 Size8align4(UnionSize8Align4),
4322 Size12align4(UnionSize12Align4),
4323 Unused2(u8),
4324 Size24align8(UnionSize24Align8),
4325}
4326
4327impl UnionOfUnion {
4328 #[inline]
4329 pub fn ordinal(&self) -> u64 {
4330 match *self {
4331 Self::Unused1(_) => 1,
4332 Self::Size8align4(_) => 2,
4333 Self::Size12align4(_) => 3,
4334 Self::Unused2(_) => 4,
4335 Self::Size24align8(_) => 5,
4336 }
4337 }
4338}
4339
4340impl fidl::Persistable for UnionOfUnion {}
4341
4342#[derive(Clone, Debug, PartialEq)]
4343pub enum UnionOfXUnionThenTableThenXUnionThenUnion {
4344 Unused1(u8),
4345 Variant(XUnionOfTableThenXUnionThenUnion),
4346}
4347
4348impl UnionOfXUnionThenTableThenXUnionThenUnion {
4349 #[inline]
4350 pub fn ordinal(&self) -> u64 {
4351 match *self {
4352 Self::Unused1(_) => 1,
4353 Self::Variant(_) => 3,
4354 }
4355 }
4356}
4357
4358impl fidl::Persistable for UnionOfXUnionThenTableThenXUnionThenUnion {}
4359
4360#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4361pub enum UnionSize12Align4 {
4362 Unused1(u8),
4363 Unused2(u8),
4364 Unused3(u8),
4365 Variant([u8; 6]),
4366}
4367
4368impl UnionSize12Align4 {
4369 #[inline]
4370 pub fn ordinal(&self) -> u64 {
4371 match *self {
4372 Self::Unused1(_) => 1,
4373 Self::Unused2(_) => 2,
4374 Self::Unused3(_) => 3,
4375 Self::Variant(_) => 4,
4376 }
4377 }
4378}
4379
4380impl fidl::Persistable for UnionSize12Align4 {}
4381
4382#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4383pub enum UnionSize24Align8 {
4384 Unused1(u8),
4385 Unused2(u8),
4386 Unused3(u8),
4387 Variant(StructSize16Align8),
4388}
4389
4390impl UnionSize24Align8 {
4391 #[inline]
4392 pub fn ordinal(&self) -> u64 {
4393 match *self {
4394 Self::Unused1(_) => 1,
4395 Self::Unused2(_) => 2,
4396 Self::Unused3(_) => 3,
4397 Self::Variant(_) => 4,
4398 }
4399 }
4400}
4401
4402impl fidl::Persistable for UnionSize24Align8 {}
4403
4404#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4405pub enum UnionSize36Align4 {
4406 Unused1(u8),
4407 Unused2(u8),
4408 Unused3(u8),
4409 Variant([u8; 32]),
4410}
4411
4412impl UnionSize36Align4 {
4413 #[inline]
4414 pub fn ordinal(&self) -> u64 {
4415 match *self {
4416 Self::Unused1(_) => 1,
4417 Self::Unused2(_) => 2,
4418 Self::Unused3(_) => 3,
4419 Self::Variant(_) => 4,
4420 }
4421 }
4422}
4423
4424impl fidl::Persistable for UnionSize36Align4 {}
4425
4426#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4427pub enum UnionSize8Align4 {
4428 Unused1(u8),
4429 Unused2(u8),
4430 Variant(u32),
4431}
4432
4433impl UnionSize8Align4 {
4434 #[inline]
4435 pub fn ordinal(&self) -> u64 {
4436 match *self {
4437 Self::Unused1(_) => 1,
4438 Self::Unused2(_) => 2,
4439 Self::Variant(_) => 3,
4440 }
4441 }
4442}
4443
4444impl fidl::Persistable for UnionSize8Align4 {}
4445
4446#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4447pub enum UnionWithBoundString {
4448 BoundFiveStr(String),
4449}
4450
4451impl UnionWithBoundString {
4452 #[inline]
4453 pub fn ordinal(&self) -> u64 {
4454 match *self {
4455 Self::BoundFiveStr(_) => 1,
4456 }
4457 }
4458}
4459
4460impl fidl::Persistable for UnionWithBoundString {}
4461
4462#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4463pub enum UnionWithEmptyStruct {
4464 S(EmptyStruct),
4465 ForceAlignmentOf8(u64),
4466}
4467
4468impl UnionWithEmptyStruct {
4469 #[inline]
4470 pub fn ordinal(&self) -> u64 {
4471 match *self {
4472 Self::S(_) => 1,
4473 Self::ForceAlignmentOf8(_) => 2,
4474 }
4475 }
4476}
4477
4478impl fidl::Persistable for UnionWithEmptyStruct {}
4479
4480#[derive(Clone, Debug, PartialEq)]
4481pub enum UnionWithRegression10Table {
4482 Unused(u8),
4483 AtV2(Regression10TableV2),
4484}
4485
4486impl UnionWithRegression10Table {
4487 #[inline]
4488 pub fn ordinal(&self) -> u64 {
4489 match *self {
4490 Self::Unused(_) => 1,
4491 Self::AtV2(_) => 3,
4492 }
4493 }
4494}
4495
4496impl fidl::Persistable for UnionWithRegression10Table {}
4497
4498#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
4499pub enum UnionWithVectorOfVectors {
4500 V(Vec<Vec<Option<Box<StructSize3Align1>>>>),
4501}
4502
4503impl UnionWithVectorOfVectors {
4504 #[inline]
4505 pub fn ordinal(&self) -> u64 {
4506 match *self {
4507 Self::V(_) => 1,
4508 }
4509 }
4510}
4511
4512impl fidl::Persistable for UnionWithVectorOfVectors {}
4513
4514#[derive(Clone, Debug)]
4515pub enum XUnionOfTableThenXUnionThenUnion {
4516 Variant(TableOfXUnionThenUnion),
4517 #[doc(hidden)]
4518 __SourceBreaking {
4519 unknown_ordinal: u64,
4520 },
4521}
4522
4523#[macro_export]
4525macro_rules! XUnionOfTableThenXUnionThenUnionUnknown {
4526 () => {
4527 _
4528 };
4529}
4530
4531impl PartialEq for XUnionOfTableThenXUnionThenUnion {
4533 fn eq(&self, other: &Self) -> bool {
4534 match (self, other) {
4535 (Self::Variant(x), Self::Variant(y)) => *x == *y,
4536 _ => false,
4537 }
4538 }
4539}
4540
4541impl XUnionOfTableThenXUnionThenUnion {
4542 #[inline]
4543 pub fn ordinal(&self) -> u64 {
4544 match *self {
4545 Self::Variant(_) => 1,
4546 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4547 }
4548 }
4549
4550 #[inline]
4551 pub fn unknown_variant_for_testing() -> Self {
4552 Self::__SourceBreaking { unknown_ordinal: 0 }
4553 }
4554
4555 #[inline]
4556 pub fn is_unknown(&self) -> bool {
4557 match self {
4558 Self::__SourceBreaking { .. } => true,
4559 _ => false,
4560 }
4561 }
4562}
4563
4564impl fidl::Persistable for XUnionOfTableThenXUnionThenUnion {}
4565
4566#[derive(Clone, Debug)]
4567pub enum XUnionOfUnion {
4568 Variant(UnionAtTheBottom),
4569 #[doc(hidden)]
4570 __SourceBreaking {
4571 unknown_ordinal: u64,
4572 },
4573}
4574
4575#[macro_export]
4577macro_rules! XUnionOfUnionUnknown {
4578 () => {
4579 _
4580 };
4581}
4582
4583impl PartialEq for XUnionOfUnion {
4585 fn eq(&self, other: &Self) -> bool {
4586 match (self, other) {
4587 (Self::Variant(x), Self::Variant(y)) => *x == *y,
4588 _ => false,
4589 }
4590 }
4591}
4592
4593impl XUnionOfUnion {
4594 #[inline]
4595 pub fn ordinal(&self) -> u64 {
4596 match *self {
4597 Self::Variant(_) => 1,
4598 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4599 }
4600 }
4601
4602 #[inline]
4603 pub fn unknown_variant_for_testing() -> Self {
4604 Self::__SourceBreaking { unknown_ordinal: 0 }
4605 }
4606
4607 #[inline]
4608 pub fn is_unknown(&self) -> bool {
4609 match self {
4610 Self::__SourceBreaking { .. } => true,
4611 _ => false,
4612 }
4613 }
4614}
4615
4616impl fidl::Persistable for XUnionOfUnion {}
4617
4618#[derive(Clone, Debug)]
4619pub enum XUnionWithEmptyStruct {
4620 S(EmptyStruct),
4621 #[doc(hidden)]
4622 __SourceBreaking {
4623 unknown_ordinal: u64,
4624 },
4625}
4626
4627#[macro_export]
4629macro_rules! XUnionWithEmptyStructUnknown {
4630 () => {
4631 _
4632 };
4633}
4634
4635impl PartialEq for XUnionWithEmptyStruct {
4637 fn eq(&self, other: &Self) -> bool {
4638 match (self, other) {
4639 (Self::S(x), Self::S(y)) => *x == *y,
4640 _ => false,
4641 }
4642 }
4643}
4644
4645impl XUnionWithEmptyStruct {
4646 #[inline]
4647 pub fn ordinal(&self) -> u64 {
4648 match *self {
4649 Self::S(_) => 1,
4650 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4651 }
4652 }
4653
4654 #[inline]
4655 pub fn unknown_variant_for_testing() -> Self {
4656 Self::__SourceBreaking { unknown_ordinal: 0 }
4657 }
4658
4659 #[inline]
4660 pub fn is_unknown(&self) -> bool {
4661 match self {
4662 Self::__SourceBreaking { .. } => true,
4663 _ => false,
4664 }
4665 }
4666}
4667
4668impl fidl::Persistable for XUnionWithEmptyStruct {}
4669
4670#[derive(Clone, Debug)]
4671pub enum XUnionWithStruct {
4672 S(StructSize3Align1),
4673 #[doc(hidden)]
4674 __SourceBreaking {
4675 unknown_ordinal: u64,
4676 },
4677}
4678
4679#[macro_export]
4681macro_rules! XUnionWithStructUnknown {
4682 () => {
4683 _
4684 };
4685}
4686
4687impl PartialEq for XUnionWithStruct {
4689 fn eq(&self, other: &Self) -> bool {
4690 match (self, other) {
4691 (Self::S(x), Self::S(y)) => *x == *y,
4692 _ => false,
4693 }
4694 }
4695}
4696
4697impl XUnionWithStruct {
4698 #[inline]
4699 pub fn ordinal(&self) -> u64 {
4700 match *self {
4701 Self::S(_) => 1,
4702 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4703 }
4704 }
4705
4706 #[inline]
4707 pub fn unknown_variant_for_testing() -> Self {
4708 Self::__SourceBreaking { unknown_ordinal: 0 }
4709 }
4710
4711 #[inline]
4712 pub fn is_unknown(&self) -> bool {
4713 match self {
4714 Self::__SourceBreaking { .. } => true,
4715 _ => false,
4716 }
4717 }
4718}
4719
4720impl fidl::Persistable for XUnionWithStruct {}
4721
4722#[derive(Clone, Debug)]
4723pub enum XUnionWithUnions {
4724 U1(UnionSize8Align4),
4725 U2(UnionSize12Align4),
4726 #[doc(hidden)]
4727 __SourceBreaking {
4728 unknown_ordinal: u64,
4729 },
4730}
4731
4732#[macro_export]
4734macro_rules! XUnionWithUnionsUnknown {
4735 () => {
4736 _
4737 };
4738}
4739
4740impl PartialEq for XUnionWithUnions {
4742 fn eq(&self, other: &Self) -> bool {
4743 match (self, other) {
4744 (Self::U1(x), Self::U1(y)) => *x == *y,
4745 (Self::U2(x), Self::U2(y)) => *x == *y,
4746 _ => false,
4747 }
4748 }
4749}
4750
4751impl XUnionWithUnions {
4752 #[inline]
4753 pub fn ordinal(&self) -> u64 {
4754 match *self {
4755 Self::U1(_) => 1,
4756 Self::U2(_) => 2,
4757 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4758 }
4759 }
4760
4761 #[inline]
4762 pub fn unknown_variant_for_testing() -> Self {
4763 Self::__SourceBreaking { unknown_ordinal: 0 }
4764 }
4765
4766 #[inline]
4767 pub fn is_unknown(&self) -> bool {
4768 match self {
4769 Self::__SourceBreaking { .. } => true,
4770 _ => false,
4771 }
4772 }
4773}
4774
4775impl fidl::Persistable for XUnionWithUnions {}
4776
4777#[derive(Clone, Debug)]
4778pub enum XUnionWithXUnion {
4779 Xu(XUnionWithStruct),
4780 #[doc(hidden)]
4781 __SourceBreaking {
4782 unknown_ordinal: u64,
4783 },
4784}
4785
4786#[macro_export]
4788macro_rules! XUnionWithXUnionUnknown {
4789 () => {
4790 _
4791 };
4792}
4793
4794impl PartialEq for XUnionWithXUnion {
4796 fn eq(&self, other: &Self) -> bool {
4797 match (self, other) {
4798 (Self::Xu(x), Self::Xu(y)) => *x == *y,
4799 _ => false,
4800 }
4801 }
4802}
4803
4804impl XUnionWithXUnion {
4805 #[inline]
4806 pub fn ordinal(&self) -> u64 {
4807 match *self {
4808 Self::Xu(_) => 1,
4809 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
4810 }
4811 }
4812
4813 #[inline]
4814 pub fn unknown_variant_for_testing() -> Self {
4815 Self::__SourceBreaking { unknown_ordinal: 0 }
4816 }
4817
4818 #[inline]
4819 pub fn is_unknown(&self) -> bool {
4820 match self {
4821 Self::__SourceBreaking { .. } => true,
4822 _ => false,
4823 }
4824 }
4825}
4826
4827impl fidl::Persistable for XUnionWithXUnion {}
4828
4829mod internal {
4830 use super::*;
4831 unsafe impl fidl::encoding::TypeMarker for BitsUint32 {
4832 type Owned = Self;
4833
4834 #[inline(always)]
4835 fn inline_align(_context: fidl::encoding::Context) -> usize {
4836 4
4837 }
4838
4839 #[inline(always)]
4840 fn inline_size(_context: fidl::encoding::Context) -> usize {
4841 4
4842 }
4843 }
4844
4845 impl fidl::encoding::ValueTypeMarker for BitsUint32 {
4846 type Borrowed<'a> = Self;
4847 #[inline(always)]
4848 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4849 *value
4850 }
4851 }
4852
4853 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BitsUint32 {
4854 #[inline]
4855 unsafe fn encode(
4856 self,
4857 encoder: &mut fidl::encoding::Encoder<'_, D>,
4858 offset: usize,
4859 _depth: fidl::encoding::Depth,
4860 ) -> fidl::Result<()> {
4861 encoder.debug_check_bounds::<Self>(offset);
4862 if self.bits() & Self::all().bits() != self.bits() {
4863 return Err(fidl::Error::InvalidBitsValue);
4864 }
4865 encoder.write_num(self.bits(), offset);
4866 Ok(())
4867 }
4868 }
4869
4870 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BitsUint32 {
4871 #[inline(always)]
4872 fn new_empty() -> Self {
4873 Self::empty()
4874 }
4875
4876 #[inline]
4877 unsafe fn decode(
4878 &mut self,
4879 decoder: &mut fidl::encoding::Decoder<'_, D>,
4880 offset: usize,
4881 _depth: fidl::encoding::Depth,
4882 ) -> fidl::Result<()> {
4883 decoder.debug_check_bounds::<Self>(offset);
4884 let prim = decoder.read_num::<u32>(offset);
4885 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
4886 Ok(())
4887 }
4888 }
4889 unsafe impl fidl::encoding::TypeMarker for BitsUint8 {
4890 type Owned = Self;
4891
4892 #[inline(always)]
4893 fn inline_align(_context: fidl::encoding::Context) -> usize {
4894 1
4895 }
4896
4897 #[inline(always)]
4898 fn inline_size(_context: fidl::encoding::Context) -> usize {
4899 1
4900 }
4901 }
4902
4903 impl fidl::encoding::ValueTypeMarker for BitsUint8 {
4904 type Borrowed<'a> = Self;
4905 #[inline(always)]
4906 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4907 *value
4908 }
4909 }
4910
4911 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BitsUint8 {
4912 #[inline]
4913 unsafe fn encode(
4914 self,
4915 encoder: &mut fidl::encoding::Encoder<'_, D>,
4916 offset: usize,
4917 _depth: fidl::encoding::Depth,
4918 ) -> fidl::Result<()> {
4919 encoder.debug_check_bounds::<Self>(offset);
4920 if self.bits() & Self::all().bits() != self.bits() {
4921 return Err(fidl::Error::InvalidBitsValue);
4922 }
4923 encoder.write_num(self.bits(), offset);
4924 Ok(())
4925 }
4926 }
4927
4928 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BitsUint8 {
4929 #[inline(always)]
4930 fn new_empty() -> Self {
4931 Self::empty()
4932 }
4933
4934 #[inline]
4935 unsafe fn decode(
4936 &mut self,
4937 decoder: &mut fidl::encoding::Decoder<'_, D>,
4938 offset: usize,
4939 _depth: fidl::encoding::Depth,
4940 ) -> fidl::Result<()> {
4941 decoder.debug_check_bounds::<Self>(offset);
4942 let prim = decoder.read_num::<u8>(offset);
4943 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
4944 Ok(())
4945 }
4946 }
4947 unsafe impl fidl::encoding::TypeMarker for EmptyBits {
4948 type Owned = Self;
4949
4950 #[inline(always)]
4951 fn inline_align(_context: fidl::encoding::Context) -> usize {
4952 4
4953 }
4954
4955 #[inline(always)]
4956 fn inline_size(_context: fidl::encoding::Context) -> usize {
4957 4
4958 }
4959 }
4960
4961 impl fidl::encoding::ValueTypeMarker for EmptyBits {
4962 type Borrowed<'a> = Self;
4963 #[inline(always)]
4964 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4965 *value
4966 }
4967 }
4968
4969 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EmptyBits {
4970 #[inline]
4971 unsafe fn encode(
4972 self,
4973 encoder: &mut fidl::encoding::Encoder<'_, D>,
4974 offset: usize,
4975 _depth: fidl::encoding::Depth,
4976 ) -> fidl::Result<()> {
4977 encoder.debug_check_bounds::<Self>(offset);
4978 encoder.write_num(self.bits(), offset);
4979 Ok(())
4980 }
4981 }
4982
4983 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyBits {
4984 #[inline(always)]
4985 fn new_empty() -> Self {
4986 Self::empty()
4987 }
4988
4989 #[inline]
4990 unsafe fn decode(
4991 &mut self,
4992 decoder: &mut fidl::encoding::Decoder<'_, D>,
4993 offset: usize,
4994 _depth: fidl::encoding::Depth,
4995 ) -> fidl::Result<()> {
4996 decoder.debug_check_bounds::<Self>(offset);
4997 let prim = decoder.read_num::<u32>(offset);
4998 *self = Self::from_bits_allow_unknown(prim);
4999 Ok(())
5000 }
5001 }
5002 unsafe impl fidl::encoding::TypeMarker for FidlvizBits {
5003 type Owned = Self;
5004
5005 #[inline(always)]
5006 fn inline_align(_context: fidl::encoding::Context) -> usize {
5007 1
5008 }
5009
5010 #[inline(always)]
5011 fn inline_size(_context: fidl::encoding::Context) -> usize {
5012 1
5013 }
5014 }
5015
5016 impl fidl::encoding::ValueTypeMarker for FidlvizBits {
5017 type Borrowed<'a> = Self;
5018 #[inline(always)]
5019 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5020 *value
5021 }
5022 }
5023
5024 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FidlvizBits {
5025 #[inline]
5026 unsafe fn encode(
5027 self,
5028 encoder: &mut fidl::encoding::Encoder<'_, D>,
5029 offset: usize,
5030 _depth: fidl::encoding::Depth,
5031 ) -> fidl::Result<()> {
5032 encoder.debug_check_bounds::<Self>(offset);
5033 if self.bits() & Self::all().bits() != self.bits() {
5034 return Err(fidl::Error::InvalidBitsValue);
5035 }
5036 encoder.write_num(self.bits(), offset);
5037 Ok(())
5038 }
5039 }
5040
5041 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizBits {
5042 #[inline(always)]
5043 fn new_empty() -> Self {
5044 Self::empty()
5045 }
5046
5047 #[inline]
5048 unsafe fn decode(
5049 &mut self,
5050 decoder: &mut fidl::encoding::Decoder<'_, D>,
5051 offset: usize,
5052 _depth: fidl::encoding::Depth,
5053 ) -> fidl::Result<()> {
5054 decoder.debug_check_bounds::<Self>(offset);
5055 let prim = decoder.read_num::<u8>(offset);
5056 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5057 Ok(())
5058 }
5059 }
5060 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint16 {
5061 type Owned = Self;
5062
5063 #[inline(always)]
5064 fn inline_align(_context: fidl::encoding::Context) -> usize {
5065 2
5066 }
5067
5068 #[inline(always)]
5069 fn inline_size(_context: fidl::encoding::Context) -> usize {
5070 2
5071 }
5072 }
5073
5074 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint16 {
5075 type Borrowed<'a> = Self;
5076 #[inline(always)]
5077 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5078 *value
5079 }
5080 }
5081
5082 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5083 for FlexibleBitsUint16
5084 {
5085 #[inline]
5086 unsafe fn encode(
5087 self,
5088 encoder: &mut fidl::encoding::Encoder<'_, D>,
5089 offset: usize,
5090 _depth: fidl::encoding::Depth,
5091 ) -> fidl::Result<()> {
5092 encoder.debug_check_bounds::<Self>(offset);
5093 encoder.write_num(self.bits(), offset);
5094 Ok(())
5095 }
5096 }
5097
5098 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint16 {
5099 #[inline(always)]
5100 fn new_empty() -> Self {
5101 Self::empty()
5102 }
5103
5104 #[inline]
5105 unsafe fn decode(
5106 &mut self,
5107 decoder: &mut fidl::encoding::Decoder<'_, D>,
5108 offset: usize,
5109 _depth: fidl::encoding::Depth,
5110 ) -> fidl::Result<()> {
5111 decoder.debug_check_bounds::<Self>(offset);
5112 let prim = decoder.read_num::<u16>(offset);
5113 *self = Self::from_bits_allow_unknown(prim);
5114 Ok(())
5115 }
5116 }
5117 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint32 {
5118 type Owned = Self;
5119
5120 #[inline(always)]
5121 fn inline_align(_context: fidl::encoding::Context) -> usize {
5122 4
5123 }
5124
5125 #[inline(always)]
5126 fn inline_size(_context: fidl::encoding::Context) -> usize {
5127 4
5128 }
5129 }
5130
5131 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint32 {
5132 type Borrowed<'a> = Self;
5133 #[inline(always)]
5134 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5135 *value
5136 }
5137 }
5138
5139 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5140 for FlexibleBitsUint32
5141 {
5142 #[inline]
5143 unsafe fn encode(
5144 self,
5145 encoder: &mut fidl::encoding::Encoder<'_, D>,
5146 offset: usize,
5147 _depth: fidl::encoding::Depth,
5148 ) -> fidl::Result<()> {
5149 encoder.debug_check_bounds::<Self>(offset);
5150 encoder.write_num(self.bits(), offset);
5151 Ok(())
5152 }
5153 }
5154
5155 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint32 {
5156 #[inline(always)]
5157 fn new_empty() -> Self {
5158 Self::empty()
5159 }
5160
5161 #[inline]
5162 unsafe fn decode(
5163 &mut self,
5164 decoder: &mut fidl::encoding::Decoder<'_, D>,
5165 offset: usize,
5166 _depth: fidl::encoding::Depth,
5167 ) -> fidl::Result<()> {
5168 decoder.debug_check_bounds::<Self>(offset);
5169 let prim = decoder.read_num::<u32>(offset);
5170 *self = Self::from_bits_allow_unknown(prim);
5171 Ok(())
5172 }
5173 }
5174 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint64 {
5175 type Owned = Self;
5176
5177 #[inline(always)]
5178 fn inline_align(_context: fidl::encoding::Context) -> usize {
5179 8
5180 }
5181
5182 #[inline(always)]
5183 fn inline_size(_context: fidl::encoding::Context) -> usize {
5184 8
5185 }
5186 }
5187
5188 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint64 {
5189 type Borrowed<'a> = Self;
5190 #[inline(always)]
5191 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5192 *value
5193 }
5194 }
5195
5196 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5197 for FlexibleBitsUint64
5198 {
5199 #[inline]
5200 unsafe fn encode(
5201 self,
5202 encoder: &mut fidl::encoding::Encoder<'_, D>,
5203 offset: usize,
5204 _depth: fidl::encoding::Depth,
5205 ) -> fidl::Result<()> {
5206 encoder.debug_check_bounds::<Self>(offset);
5207 encoder.write_num(self.bits(), offset);
5208 Ok(())
5209 }
5210 }
5211
5212 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint64 {
5213 #[inline(always)]
5214 fn new_empty() -> Self {
5215 Self::empty()
5216 }
5217
5218 #[inline]
5219 unsafe fn decode(
5220 &mut self,
5221 decoder: &mut fidl::encoding::Decoder<'_, D>,
5222 offset: usize,
5223 _depth: fidl::encoding::Depth,
5224 ) -> fidl::Result<()> {
5225 decoder.debug_check_bounds::<Self>(offset);
5226 let prim = decoder.read_num::<u64>(offset);
5227 *self = Self::from_bits_allow_unknown(prim);
5228 Ok(())
5229 }
5230 }
5231 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint8 {
5232 type Owned = Self;
5233
5234 #[inline(always)]
5235 fn inline_align(_context: fidl::encoding::Context) -> usize {
5236 1
5237 }
5238
5239 #[inline(always)]
5240 fn inline_size(_context: fidl::encoding::Context) -> usize {
5241 1
5242 }
5243 }
5244
5245 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint8 {
5246 type Borrowed<'a> = Self;
5247 #[inline(always)]
5248 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5249 *value
5250 }
5251 }
5252
5253 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5254 for FlexibleBitsUint8
5255 {
5256 #[inline]
5257 unsafe fn encode(
5258 self,
5259 encoder: &mut fidl::encoding::Encoder<'_, D>,
5260 offset: usize,
5261 _depth: fidl::encoding::Depth,
5262 ) -> fidl::Result<()> {
5263 encoder.debug_check_bounds::<Self>(offset);
5264 encoder.write_num(self.bits(), offset);
5265 Ok(())
5266 }
5267 }
5268
5269 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleBitsUint8 {
5270 #[inline(always)]
5271 fn new_empty() -> Self {
5272 Self::empty()
5273 }
5274
5275 #[inline]
5276 unsafe fn decode(
5277 &mut self,
5278 decoder: &mut fidl::encoding::Decoder<'_, D>,
5279 offset: usize,
5280 _depth: fidl::encoding::Depth,
5281 ) -> fidl::Result<()> {
5282 decoder.debug_check_bounds::<Self>(offset);
5283 let prim = decoder.read_num::<u8>(offset);
5284 *self = Self::from_bits_allow_unknown(prim);
5285 Ok(())
5286 }
5287 }
5288 unsafe impl fidl::encoding::TypeMarker for GoldenBits {
5289 type Owned = Self;
5290
5291 #[inline(always)]
5292 fn inline_align(_context: fidl::encoding::Context) -> usize {
5293 2
5294 }
5295
5296 #[inline(always)]
5297 fn inline_size(_context: fidl::encoding::Context) -> usize {
5298 2
5299 }
5300 }
5301
5302 impl fidl::encoding::ValueTypeMarker for GoldenBits {
5303 type Borrowed<'a> = Self;
5304 #[inline(always)]
5305 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5306 *value
5307 }
5308 }
5309
5310 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GoldenBits {
5311 #[inline]
5312 unsafe fn encode(
5313 self,
5314 encoder: &mut fidl::encoding::Encoder<'_, D>,
5315 offset: usize,
5316 _depth: fidl::encoding::Depth,
5317 ) -> fidl::Result<()> {
5318 encoder.debug_check_bounds::<Self>(offset);
5319 if self.bits() & Self::all().bits() != self.bits() {
5320 return Err(fidl::Error::InvalidBitsValue);
5321 }
5322 encoder.write_num(self.bits(), offset);
5323 Ok(())
5324 }
5325 }
5326
5327 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBits {
5328 #[inline(always)]
5329 fn new_empty() -> Self {
5330 Self::empty()
5331 }
5332
5333 #[inline]
5334 unsafe fn decode(
5335 &mut self,
5336 decoder: &mut fidl::encoding::Decoder<'_, D>,
5337 offset: usize,
5338 _depth: fidl::encoding::Depth,
5339 ) -> fidl::Result<()> {
5340 decoder.debug_check_bounds::<Self>(offset);
5341 let prim = decoder.read_num::<u16>(offset);
5342 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5343 Ok(())
5344 }
5345 }
5346 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint16 {
5347 type Owned = Self;
5348
5349 #[inline(always)]
5350 fn inline_align(_context: fidl::encoding::Context) -> usize {
5351 2
5352 }
5353
5354 #[inline(always)]
5355 fn inline_size(_context: fidl::encoding::Context) -> usize {
5356 2
5357 }
5358 }
5359
5360 impl fidl::encoding::ValueTypeMarker for StrictBitsUint16 {
5361 type Borrowed<'a> = Self;
5362 #[inline(always)]
5363 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5364 *value
5365 }
5366 }
5367
5368 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5369 for StrictBitsUint16
5370 {
5371 #[inline]
5372 unsafe fn encode(
5373 self,
5374 encoder: &mut fidl::encoding::Encoder<'_, D>,
5375 offset: usize,
5376 _depth: fidl::encoding::Depth,
5377 ) -> fidl::Result<()> {
5378 encoder.debug_check_bounds::<Self>(offset);
5379 if self.bits() & Self::all().bits() != self.bits() {
5380 return Err(fidl::Error::InvalidBitsValue);
5381 }
5382 encoder.write_num(self.bits(), offset);
5383 Ok(())
5384 }
5385 }
5386
5387 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint16 {
5388 #[inline(always)]
5389 fn new_empty() -> Self {
5390 Self::empty()
5391 }
5392
5393 #[inline]
5394 unsafe fn decode(
5395 &mut self,
5396 decoder: &mut fidl::encoding::Decoder<'_, D>,
5397 offset: usize,
5398 _depth: fidl::encoding::Depth,
5399 ) -> fidl::Result<()> {
5400 decoder.debug_check_bounds::<Self>(offset);
5401 let prim = decoder.read_num::<u16>(offset);
5402 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5403 Ok(())
5404 }
5405 }
5406 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint32 {
5407 type Owned = Self;
5408
5409 #[inline(always)]
5410 fn inline_align(_context: fidl::encoding::Context) -> usize {
5411 4
5412 }
5413
5414 #[inline(always)]
5415 fn inline_size(_context: fidl::encoding::Context) -> usize {
5416 4
5417 }
5418 }
5419
5420 impl fidl::encoding::ValueTypeMarker for StrictBitsUint32 {
5421 type Borrowed<'a> = Self;
5422 #[inline(always)]
5423 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5424 *value
5425 }
5426 }
5427
5428 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5429 for StrictBitsUint32
5430 {
5431 #[inline]
5432 unsafe fn encode(
5433 self,
5434 encoder: &mut fidl::encoding::Encoder<'_, D>,
5435 offset: usize,
5436 _depth: fidl::encoding::Depth,
5437 ) -> fidl::Result<()> {
5438 encoder.debug_check_bounds::<Self>(offset);
5439 if self.bits() & Self::all().bits() != self.bits() {
5440 return Err(fidl::Error::InvalidBitsValue);
5441 }
5442 encoder.write_num(self.bits(), offset);
5443 Ok(())
5444 }
5445 }
5446
5447 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint32 {
5448 #[inline(always)]
5449 fn new_empty() -> Self {
5450 Self::empty()
5451 }
5452
5453 #[inline]
5454 unsafe fn decode(
5455 &mut self,
5456 decoder: &mut fidl::encoding::Decoder<'_, D>,
5457 offset: usize,
5458 _depth: fidl::encoding::Depth,
5459 ) -> fidl::Result<()> {
5460 decoder.debug_check_bounds::<Self>(offset);
5461 let prim = decoder.read_num::<u32>(offset);
5462 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5463 Ok(())
5464 }
5465 }
5466 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint64 {
5467 type Owned = Self;
5468
5469 #[inline(always)]
5470 fn inline_align(_context: fidl::encoding::Context) -> usize {
5471 8
5472 }
5473
5474 #[inline(always)]
5475 fn inline_size(_context: fidl::encoding::Context) -> usize {
5476 8
5477 }
5478 }
5479
5480 impl fidl::encoding::ValueTypeMarker for StrictBitsUint64 {
5481 type Borrowed<'a> = Self;
5482 #[inline(always)]
5483 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5484 *value
5485 }
5486 }
5487
5488 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5489 for StrictBitsUint64
5490 {
5491 #[inline]
5492 unsafe fn encode(
5493 self,
5494 encoder: &mut fidl::encoding::Encoder<'_, D>,
5495 offset: usize,
5496 _depth: fidl::encoding::Depth,
5497 ) -> fidl::Result<()> {
5498 encoder.debug_check_bounds::<Self>(offset);
5499 if self.bits() & Self::all().bits() != self.bits() {
5500 return Err(fidl::Error::InvalidBitsValue);
5501 }
5502 encoder.write_num(self.bits(), offset);
5503 Ok(())
5504 }
5505 }
5506
5507 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint64 {
5508 #[inline(always)]
5509 fn new_empty() -> Self {
5510 Self::empty()
5511 }
5512
5513 #[inline]
5514 unsafe fn decode(
5515 &mut self,
5516 decoder: &mut fidl::encoding::Decoder<'_, D>,
5517 offset: usize,
5518 _depth: fidl::encoding::Depth,
5519 ) -> fidl::Result<()> {
5520 decoder.debug_check_bounds::<Self>(offset);
5521 let prim = decoder.read_num::<u64>(offset);
5522 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5523 Ok(())
5524 }
5525 }
5526 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint8 {
5527 type Owned = Self;
5528
5529 #[inline(always)]
5530 fn inline_align(_context: fidl::encoding::Context) -> usize {
5531 1
5532 }
5533
5534 #[inline(always)]
5535 fn inline_size(_context: fidl::encoding::Context) -> usize {
5536 1
5537 }
5538 }
5539
5540 impl fidl::encoding::ValueTypeMarker for StrictBitsUint8 {
5541 type Borrowed<'a> = Self;
5542 #[inline(always)]
5543 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5544 *value
5545 }
5546 }
5547
5548 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5549 for StrictBitsUint8
5550 {
5551 #[inline]
5552 unsafe fn encode(
5553 self,
5554 encoder: &mut fidl::encoding::Encoder<'_, D>,
5555 offset: usize,
5556 _depth: fidl::encoding::Depth,
5557 ) -> fidl::Result<()> {
5558 encoder.debug_check_bounds::<Self>(offset);
5559 if self.bits() & Self::all().bits() != self.bits() {
5560 return Err(fidl::Error::InvalidBitsValue);
5561 }
5562 encoder.write_num(self.bits(), offset);
5563 Ok(())
5564 }
5565 }
5566
5567 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint8 {
5568 #[inline(always)]
5569 fn new_empty() -> Self {
5570 Self::empty()
5571 }
5572
5573 #[inline]
5574 unsafe fn decode(
5575 &mut self,
5576 decoder: &mut fidl::encoding::Decoder<'_, D>,
5577 offset: usize,
5578 _depth: fidl::encoding::Depth,
5579 ) -> fidl::Result<()> {
5580 decoder.debug_check_bounds::<Self>(offset);
5581 let prim = decoder.read_num::<u8>(offset);
5582 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5583 Ok(())
5584 }
5585 }
5586 unsafe impl fidl::encoding::TypeMarker for Rights {
5587 type Owned = Self;
5588
5589 #[inline(always)]
5590 fn inline_align(_context: fidl::encoding::Context) -> usize {
5591 4
5592 }
5593
5594 #[inline(always)]
5595 fn inline_size(_context: fidl::encoding::Context) -> usize {
5596 4
5597 }
5598 }
5599
5600 impl fidl::encoding::ValueTypeMarker for Rights {
5601 type Borrowed<'a> = Self;
5602 #[inline(always)]
5603 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5604 *value
5605 }
5606 }
5607
5608 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Rights {
5609 #[inline]
5610 unsafe fn encode(
5611 self,
5612 encoder: &mut fidl::encoding::Encoder<'_, D>,
5613 offset: usize,
5614 _depth: fidl::encoding::Depth,
5615 ) -> fidl::Result<()> {
5616 encoder.debug_check_bounds::<Self>(offset);
5617 if self.bits() & Self::all().bits() != self.bits() {
5618 return Err(fidl::Error::InvalidBitsValue);
5619 }
5620 encoder.write_num(self.bits(), offset);
5621 Ok(())
5622 }
5623 }
5624
5625 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Rights {
5626 #[inline(always)]
5627 fn new_empty() -> Self {
5628 Self::empty()
5629 }
5630
5631 #[inline]
5632 unsafe fn decode(
5633 &mut self,
5634 decoder: &mut fidl::encoding::Decoder<'_, D>,
5635 offset: usize,
5636 _depth: fidl::encoding::Depth,
5637 ) -> fidl::Result<()> {
5638 decoder.debug_check_bounds::<Self>(offset);
5639 let prim = decoder.read_num::<u32>(offset);
5640 *self = Self::from_bits(prim).ok_or(fidl::Error::InvalidBitsValue)?;
5641 Ok(())
5642 }
5643 }
5644 unsafe impl fidl::encoding::TypeMarker for EmptyEnum {
5645 type Owned = Self;
5646
5647 #[inline(always)]
5648 fn inline_align(_context: fidl::encoding::Context) -> usize {
5649 std::mem::align_of::<u32>()
5650 }
5651
5652 #[inline(always)]
5653 fn inline_size(_context: fidl::encoding::Context) -> usize {
5654 std::mem::size_of::<u32>()
5655 }
5656
5657 #[inline(always)]
5658 fn encode_is_copy() -> bool {
5659 false
5660 }
5661
5662 #[inline(always)]
5663 fn decode_is_copy() -> bool {
5664 false
5665 }
5666 }
5667
5668 impl fidl::encoding::ValueTypeMarker for EmptyEnum {
5669 type Borrowed<'a> = Self;
5670 #[inline(always)]
5671 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5672 *value
5673 }
5674 }
5675
5676 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EmptyEnum {
5677 #[inline]
5678 unsafe fn encode(
5679 self,
5680 encoder: &mut fidl::encoding::Encoder<'_, D>,
5681 offset: usize,
5682 _depth: fidl::encoding::Depth,
5683 ) -> fidl::Result<()> {
5684 encoder.debug_check_bounds::<Self>(offset);
5685 encoder.write_num(self.into_primitive(), offset);
5686 Ok(())
5687 }
5688 }
5689
5690 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyEnum {
5691 #[inline(always)]
5692 fn new_empty() -> Self {
5693 Self::unknown()
5694 }
5695
5696 #[inline]
5697 unsafe fn decode(
5698 &mut self,
5699 decoder: &mut fidl::encoding::Decoder<'_, D>,
5700 offset: usize,
5701 _depth: fidl::encoding::Depth,
5702 ) -> fidl::Result<()> {
5703 decoder.debug_check_bounds::<Self>(offset);
5704 let prim = decoder.read_num::<u32>(offset);
5705
5706 *self = Self::from_primitive_allow_unknown(prim);
5707 Ok(())
5708 }
5709 }
5710 unsafe impl fidl::encoding::TypeMarker for EnumUint32 {
5711 type Owned = Self;
5712
5713 #[inline(always)]
5714 fn inline_align(_context: fidl::encoding::Context) -> usize {
5715 std::mem::align_of::<u32>()
5716 }
5717
5718 #[inline(always)]
5719 fn inline_size(_context: fidl::encoding::Context) -> usize {
5720 std::mem::size_of::<u32>()
5721 }
5722
5723 #[inline(always)]
5724 fn encode_is_copy() -> bool {
5725 true
5726 }
5727
5728 #[inline(always)]
5729 fn decode_is_copy() -> bool {
5730 false
5731 }
5732 }
5733
5734 impl fidl::encoding::ValueTypeMarker for EnumUint32 {
5735 type Borrowed<'a> = Self;
5736 #[inline(always)]
5737 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5738 *value
5739 }
5740 }
5741
5742 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EnumUint32 {
5743 #[inline]
5744 unsafe fn encode(
5745 self,
5746 encoder: &mut fidl::encoding::Encoder<'_, D>,
5747 offset: usize,
5748 _depth: fidl::encoding::Depth,
5749 ) -> fidl::Result<()> {
5750 encoder.debug_check_bounds::<Self>(offset);
5751 encoder.write_num(self.into_primitive(), offset);
5752 Ok(())
5753 }
5754 }
5755
5756 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnumUint32 {
5757 #[inline(always)]
5758 fn new_empty() -> Self {
5759 Self::Member
5760 }
5761
5762 #[inline]
5763 unsafe fn decode(
5764 &mut self,
5765 decoder: &mut fidl::encoding::Decoder<'_, D>,
5766 offset: usize,
5767 _depth: fidl::encoding::Depth,
5768 ) -> fidl::Result<()> {
5769 decoder.debug_check_bounds::<Self>(offset);
5770 let prim = decoder.read_num::<u32>(offset);
5771
5772 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
5773 Ok(())
5774 }
5775 }
5776 unsafe impl fidl::encoding::TypeMarker for EnumUint8 {
5777 type Owned = Self;
5778
5779 #[inline(always)]
5780 fn inline_align(_context: fidl::encoding::Context) -> usize {
5781 std::mem::align_of::<u8>()
5782 }
5783
5784 #[inline(always)]
5785 fn inline_size(_context: fidl::encoding::Context) -> usize {
5786 std::mem::size_of::<u8>()
5787 }
5788
5789 #[inline(always)]
5790 fn encode_is_copy() -> bool {
5791 true
5792 }
5793
5794 #[inline(always)]
5795 fn decode_is_copy() -> bool {
5796 false
5797 }
5798 }
5799
5800 impl fidl::encoding::ValueTypeMarker for EnumUint8 {
5801 type Borrowed<'a> = Self;
5802 #[inline(always)]
5803 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5804 *value
5805 }
5806 }
5807
5808 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for EnumUint8 {
5809 #[inline]
5810 unsafe fn encode(
5811 self,
5812 encoder: &mut fidl::encoding::Encoder<'_, D>,
5813 offset: usize,
5814 _depth: fidl::encoding::Depth,
5815 ) -> fidl::Result<()> {
5816 encoder.debug_check_bounds::<Self>(offset);
5817 encoder.write_num(self.into_primitive(), offset);
5818 Ok(())
5819 }
5820 }
5821
5822 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EnumUint8 {
5823 #[inline(always)]
5824 fn new_empty() -> Self {
5825 Self::Member
5826 }
5827
5828 #[inline]
5829 unsafe fn decode(
5830 &mut self,
5831 decoder: &mut fidl::encoding::Decoder<'_, D>,
5832 offset: usize,
5833 _depth: fidl::encoding::Depth,
5834 ) -> fidl::Result<()> {
5835 decoder.debug_check_bounds::<Self>(offset);
5836 let prim = decoder.read_num::<u8>(offset);
5837
5838 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
5839 Ok(())
5840 }
5841 }
5842 unsafe impl fidl::encoding::TypeMarker for FidlvizEnum {
5843 type Owned = Self;
5844
5845 #[inline(always)]
5846 fn inline_align(_context: fidl::encoding::Context) -> usize {
5847 std::mem::align_of::<u8>()
5848 }
5849
5850 #[inline(always)]
5851 fn inline_size(_context: fidl::encoding::Context) -> usize {
5852 std::mem::size_of::<u8>()
5853 }
5854
5855 #[inline(always)]
5856 fn encode_is_copy() -> bool {
5857 true
5858 }
5859
5860 #[inline(always)]
5861 fn decode_is_copy() -> bool {
5862 false
5863 }
5864 }
5865
5866 impl fidl::encoding::ValueTypeMarker for FidlvizEnum {
5867 type Borrowed<'a> = Self;
5868 #[inline(always)]
5869 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5870 *value
5871 }
5872 }
5873
5874 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FidlvizEnum {
5875 #[inline]
5876 unsafe fn encode(
5877 self,
5878 encoder: &mut fidl::encoding::Encoder<'_, D>,
5879 offset: usize,
5880 _depth: fidl::encoding::Depth,
5881 ) -> fidl::Result<()> {
5882 encoder.debug_check_bounds::<Self>(offset);
5883 encoder.write_num(self.into_primitive(), offset);
5884 Ok(())
5885 }
5886 }
5887
5888 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizEnum {
5889 #[inline(always)]
5890 fn new_empty() -> Self {
5891 Self::A
5892 }
5893
5894 #[inline]
5895 unsafe fn decode(
5896 &mut self,
5897 decoder: &mut fidl::encoding::Decoder<'_, D>,
5898 offset: usize,
5899 _depth: fidl::encoding::Depth,
5900 ) -> fidl::Result<()> {
5901 decoder.debug_check_bounds::<Self>(offset);
5902 let prim = decoder.read_num::<u8>(offset);
5903
5904 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
5905 Ok(())
5906 }
5907 }
5908 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt16 {
5909 type Owned = Self;
5910
5911 #[inline(always)]
5912 fn inline_align(_context: fidl::encoding::Context) -> usize {
5913 std::mem::align_of::<i16>()
5914 }
5915
5916 #[inline(always)]
5917 fn inline_size(_context: fidl::encoding::Context) -> usize {
5918 std::mem::size_of::<i16>()
5919 }
5920
5921 #[inline(always)]
5922 fn encode_is_copy() -> bool {
5923 false
5924 }
5925
5926 #[inline(always)]
5927 fn decode_is_copy() -> bool {
5928 false
5929 }
5930 }
5931
5932 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt16 {
5933 type Borrowed<'a> = Self;
5934 #[inline(always)]
5935 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5936 *value
5937 }
5938 }
5939
5940 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
5941 for FlexibleEnumInt16
5942 {
5943 #[inline]
5944 unsafe fn encode(
5945 self,
5946 encoder: &mut fidl::encoding::Encoder<'_, D>,
5947 offset: usize,
5948 _depth: fidl::encoding::Depth,
5949 ) -> fidl::Result<()> {
5950 encoder.debug_check_bounds::<Self>(offset);
5951 encoder.write_num(self.into_primitive(), offset);
5952 Ok(())
5953 }
5954 }
5955
5956 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt16 {
5957 #[inline(always)]
5958 fn new_empty() -> Self {
5959 Self::unknown()
5960 }
5961
5962 #[inline]
5963 unsafe fn decode(
5964 &mut self,
5965 decoder: &mut fidl::encoding::Decoder<'_, D>,
5966 offset: usize,
5967 _depth: fidl::encoding::Depth,
5968 ) -> fidl::Result<()> {
5969 decoder.debug_check_bounds::<Self>(offset);
5970 let prim = decoder.read_num::<i16>(offset);
5971
5972 *self = Self::from_primitive_allow_unknown(prim);
5973 Ok(())
5974 }
5975 }
5976 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt32 {
5977 type Owned = Self;
5978
5979 #[inline(always)]
5980 fn inline_align(_context: fidl::encoding::Context) -> usize {
5981 std::mem::align_of::<i32>()
5982 }
5983
5984 #[inline(always)]
5985 fn inline_size(_context: fidl::encoding::Context) -> usize {
5986 std::mem::size_of::<i32>()
5987 }
5988
5989 #[inline(always)]
5990 fn encode_is_copy() -> bool {
5991 false
5992 }
5993
5994 #[inline(always)]
5995 fn decode_is_copy() -> bool {
5996 false
5997 }
5998 }
5999
6000 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt32 {
6001 type Borrowed<'a> = Self;
6002 #[inline(always)]
6003 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6004 *value
6005 }
6006 }
6007
6008 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6009 for FlexibleEnumInt32
6010 {
6011 #[inline]
6012 unsafe fn encode(
6013 self,
6014 encoder: &mut fidl::encoding::Encoder<'_, D>,
6015 offset: usize,
6016 _depth: fidl::encoding::Depth,
6017 ) -> fidl::Result<()> {
6018 encoder.debug_check_bounds::<Self>(offset);
6019 encoder.write_num(self.into_primitive(), offset);
6020 Ok(())
6021 }
6022 }
6023
6024 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt32 {
6025 #[inline(always)]
6026 fn new_empty() -> Self {
6027 Self::unknown()
6028 }
6029
6030 #[inline]
6031 unsafe fn decode(
6032 &mut self,
6033 decoder: &mut fidl::encoding::Decoder<'_, D>,
6034 offset: usize,
6035 _depth: fidl::encoding::Depth,
6036 ) -> fidl::Result<()> {
6037 decoder.debug_check_bounds::<Self>(offset);
6038 let prim = decoder.read_num::<i32>(offset);
6039
6040 *self = Self::from_primitive_allow_unknown(prim);
6041 Ok(())
6042 }
6043 }
6044 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt64 {
6045 type Owned = Self;
6046
6047 #[inline(always)]
6048 fn inline_align(_context: fidl::encoding::Context) -> usize {
6049 std::mem::align_of::<i64>()
6050 }
6051
6052 #[inline(always)]
6053 fn inline_size(_context: fidl::encoding::Context) -> usize {
6054 std::mem::size_of::<i64>()
6055 }
6056
6057 #[inline(always)]
6058 fn encode_is_copy() -> bool {
6059 false
6060 }
6061
6062 #[inline(always)]
6063 fn decode_is_copy() -> bool {
6064 false
6065 }
6066 }
6067
6068 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt64 {
6069 type Borrowed<'a> = Self;
6070 #[inline(always)]
6071 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6072 *value
6073 }
6074 }
6075
6076 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6077 for FlexibleEnumInt64
6078 {
6079 #[inline]
6080 unsafe fn encode(
6081 self,
6082 encoder: &mut fidl::encoding::Encoder<'_, D>,
6083 offset: usize,
6084 _depth: fidl::encoding::Depth,
6085 ) -> fidl::Result<()> {
6086 encoder.debug_check_bounds::<Self>(offset);
6087 encoder.write_num(self.into_primitive(), offset);
6088 Ok(())
6089 }
6090 }
6091
6092 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt64 {
6093 #[inline(always)]
6094 fn new_empty() -> Self {
6095 Self::unknown()
6096 }
6097
6098 #[inline]
6099 unsafe fn decode(
6100 &mut self,
6101 decoder: &mut fidl::encoding::Decoder<'_, D>,
6102 offset: usize,
6103 _depth: fidl::encoding::Depth,
6104 ) -> fidl::Result<()> {
6105 decoder.debug_check_bounds::<Self>(offset);
6106 let prim = decoder.read_num::<i64>(offset);
6107
6108 *self = Self::from_primitive_allow_unknown(prim);
6109 Ok(())
6110 }
6111 }
6112 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt8 {
6113 type Owned = Self;
6114
6115 #[inline(always)]
6116 fn inline_align(_context: fidl::encoding::Context) -> usize {
6117 std::mem::align_of::<i8>()
6118 }
6119
6120 #[inline(always)]
6121 fn inline_size(_context: fidl::encoding::Context) -> usize {
6122 std::mem::size_of::<i8>()
6123 }
6124
6125 #[inline(always)]
6126 fn encode_is_copy() -> bool {
6127 false
6128 }
6129
6130 #[inline(always)]
6131 fn decode_is_copy() -> bool {
6132 false
6133 }
6134 }
6135
6136 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt8 {
6137 type Borrowed<'a> = Self;
6138 #[inline(always)]
6139 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6140 *value
6141 }
6142 }
6143
6144 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6145 for FlexibleEnumInt8
6146 {
6147 #[inline]
6148 unsafe fn encode(
6149 self,
6150 encoder: &mut fidl::encoding::Encoder<'_, D>,
6151 offset: usize,
6152 _depth: fidl::encoding::Depth,
6153 ) -> fidl::Result<()> {
6154 encoder.debug_check_bounds::<Self>(offset);
6155 encoder.write_num(self.into_primitive(), offset);
6156 Ok(())
6157 }
6158 }
6159
6160 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumInt8 {
6161 #[inline(always)]
6162 fn new_empty() -> Self {
6163 Self::unknown()
6164 }
6165
6166 #[inline]
6167 unsafe fn decode(
6168 &mut self,
6169 decoder: &mut fidl::encoding::Decoder<'_, D>,
6170 offset: usize,
6171 _depth: fidl::encoding::Depth,
6172 ) -> fidl::Result<()> {
6173 decoder.debug_check_bounds::<Self>(offset);
6174 let prim = decoder.read_num::<i8>(offset);
6175
6176 *self = Self::from_primitive_allow_unknown(prim);
6177 Ok(())
6178 }
6179 }
6180 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint16 {
6181 type Owned = Self;
6182
6183 #[inline(always)]
6184 fn inline_align(_context: fidl::encoding::Context) -> usize {
6185 std::mem::align_of::<u16>()
6186 }
6187
6188 #[inline(always)]
6189 fn inline_size(_context: fidl::encoding::Context) -> usize {
6190 std::mem::size_of::<u16>()
6191 }
6192
6193 #[inline(always)]
6194 fn encode_is_copy() -> bool {
6195 false
6196 }
6197
6198 #[inline(always)]
6199 fn decode_is_copy() -> bool {
6200 false
6201 }
6202 }
6203
6204 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint16 {
6205 type Borrowed<'a> = Self;
6206 #[inline(always)]
6207 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6208 *value
6209 }
6210 }
6211
6212 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6213 for FlexibleEnumUint16
6214 {
6215 #[inline]
6216 unsafe fn encode(
6217 self,
6218 encoder: &mut fidl::encoding::Encoder<'_, D>,
6219 offset: usize,
6220 _depth: fidl::encoding::Depth,
6221 ) -> fidl::Result<()> {
6222 encoder.debug_check_bounds::<Self>(offset);
6223 encoder.write_num(self.into_primitive(), offset);
6224 Ok(())
6225 }
6226 }
6227
6228 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint16 {
6229 #[inline(always)]
6230 fn new_empty() -> Self {
6231 Self::unknown()
6232 }
6233
6234 #[inline]
6235 unsafe fn decode(
6236 &mut self,
6237 decoder: &mut fidl::encoding::Decoder<'_, D>,
6238 offset: usize,
6239 _depth: fidl::encoding::Depth,
6240 ) -> fidl::Result<()> {
6241 decoder.debug_check_bounds::<Self>(offset);
6242 let prim = decoder.read_num::<u16>(offset);
6243
6244 *self = Self::from_primitive_allow_unknown(prim);
6245 Ok(())
6246 }
6247 }
6248 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint32 {
6249 type Owned = Self;
6250
6251 #[inline(always)]
6252 fn inline_align(_context: fidl::encoding::Context) -> usize {
6253 std::mem::align_of::<u32>()
6254 }
6255
6256 #[inline(always)]
6257 fn inline_size(_context: fidl::encoding::Context) -> usize {
6258 std::mem::size_of::<u32>()
6259 }
6260
6261 #[inline(always)]
6262 fn encode_is_copy() -> bool {
6263 false
6264 }
6265
6266 #[inline(always)]
6267 fn decode_is_copy() -> bool {
6268 false
6269 }
6270 }
6271
6272 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint32 {
6273 type Borrowed<'a> = Self;
6274 #[inline(always)]
6275 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6276 *value
6277 }
6278 }
6279
6280 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6281 for FlexibleEnumUint32
6282 {
6283 #[inline]
6284 unsafe fn encode(
6285 self,
6286 encoder: &mut fidl::encoding::Encoder<'_, D>,
6287 offset: usize,
6288 _depth: fidl::encoding::Depth,
6289 ) -> fidl::Result<()> {
6290 encoder.debug_check_bounds::<Self>(offset);
6291 encoder.write_num(self.into_primitive(), offset);
6292 Ok(())
6293 }
6294 }
6295
6296 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint32 {
6297 #[inline(always)]
6298 fn new_empty() -> Self {
6299 Self::unknown()
6300 }
6301
6302 #[inline]
6303 unsafe fn decode(
6304 &mut self,
6305 decoder: &mut fidl::encoding::Decoder<'_, D>,
6306 offset: usize,
6307 _depth: fidl::encoding::Depth,
6308 ) -> fidl::Result<()> {
6309 decoder.debug_check_bounds::<Self>(offset);
6310 let prim = decoder.read_num::<u32>(offset);
6311
6312 *self = Self::from_primitive_allow_unknown(prim);
6313 Ok(())
6314 }
6315 }
6316 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint64 {
6317 type Owned = Self;
6318
6319 #[inline(always)]
6320 fn inline_align(_context: fidl::encoding::Context) -> usize {
6321 std::mem::align_of::<u64>()
6322 }
6323
6324 #[inline(always)]
6325 fn inline_size(_context: fidl::encoding::Context) -> usize {
6326 std::mem::size_of::<u64>()
6327 }
6328
6329 #[inline(always)]
6330 fn encode_is_copy() -> bool {
6331 false
6332 }
6333
6334 #[inline(always)]
6335 fn decode_is_copy() -> bool {
6336 false
6337 }
6338 }
6339
6340 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint64 {
6341 type Borrowed<'a> = Self;
6342 #[inline(always)]
6343 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6344 *value
6345 }
6346 }
6347
6348 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6349 for FlexibleEnumUint64
6350 {
6351 #[inline]
6352 unsafe fn encode(
6353 self,
6354 encoder: &mut fidl::encoding::Encoder<'_, D>,
6355 offset: usize,
6356 _depth: fidl::encoding::Depth,
6357 ) -> fidl::Result<()> {
6358 encoder.debug_check_bounds::<Self>(offset);
6359 encoder.write_num(self.into_primitive(), offset);
6360 Ok(())
6361 }
6362 }
6363
6364 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint64 {
6365 #[inline(always)]
6366 fn new_empty() -> Self {
6367 Self::unknown()
6368 }
6369
6370 #[inline]
6371 unsafe fn decode(
6372 &mut self,
6373 decoder: &mut fidl::encoding::Decoder<'_, D>,
6374 offset: usize,
6375 _depth: fidl::encoding::Depth,
6376 ) -> fidl::Result<()> {
6377 decoder.debug_check_bounds::<Self>(offset);
6378 let prim = decoder.read_num::<u64>(offset);
6379
6380 *self = Self::from_primitive_allow_unknown(prim);
6381 Ok(())
6382 }
6383 }
6384 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint8 {
6385 type Owned = Self;
6386
6387 #[inline(always)]
6388 fn inline_align(_context: fidl::encoding::Context) -> usize {
6389 std::mem::align_of::<u8>()
6390 }
6391
6392 #[inline(always)]
6393 fn inline_size(_context: fidl::encoding::Context) -> usize {
6394 std::mem::size_of::<u8>()
6395 }
6396
6397 #[inline(always)]
6398 fn encode_is_copy() -> bool {
6399 false
6400 }
6401
6402 #[inline(always)]
6403 fn decode_is_copy() -> bool {
6404 false
6405 }
6406 }
6407
6408 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint8 {
6409 type Borrowed<'a> = Self;
6410 #[inline(always)]
6411 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6412 *value
6413 }
6414 }
6415
6416 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6417 for FlexibleEnumUint8
6418 {
6419 #[inline]
6420 unsafe fn encode(
6421 self,
6422 encoder: &mut fidl::encoding::Encoder<'_, D>,
6423 offset: usize,
6424 _depth: fidl::encoding::Depth,
6425 ) -> fidl::Result<()> {
6426 encoder.debug_check_bounds::<Self>(offset);
6427 encoder.write_num(self.into_primitive(), offset);
6428 Ok(())
6429 }
6430 }
6431
6432 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlexibleEnumUint8 {
6433 #[inline(always)]
6434 fn new_empty() -> Self {
6435 Self::unknown()
6436 }
6437
6438 #[inline]
6439 unsafe fn decode(
6440 &mut self,
6441 decoder: &mut fidl::encoding::Decoder<'_, D>,
6442 offset: usize,
6443 _depth: fidl::encoding::Depth,
6444 ) -> fidl::Result<()> {
6445 decoder.debug_check_bounds::<Self>(offset);
6446 let prim = decoder.read_num::<u8>(offset);
6447
6448 *self = Self::from_primitive_allow_unknown(prim);
6449 Ok(())
6450 }
6451 }
6452 unsafe impl fidl::encoding::TypeMarker for GoldenEnum {
6453 type Owned = Self;
6454
6455 #[inline(always)]
6456 fn inline_align(_context: fidl::encoding::Context) -> usize {
6457 std::mem::align_of::<u16>()
6458 }
6459
6460 #[inline(always)]
6461 fn inline_size(_context: fidl::encoding::Context) -> usize {
6462 std::mem::size_of::<u16>()
6463 }
6464
6465 #[inline(always)]
6466 fn encode_is_copy() -> bool {
6467 true
6468 }
6469
6470 #[inline(always)]
6471 fn decode_is_copy() -> bool {
6472 false
6473 }
6474 }
6475
6476 impl fidl::encoding::ValueTypeMarker for GoldenEnum {
6477 type Borrowed<'a> = Self;
6478 #[inline(always)]
6479 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6480 *value
6481 }
6482 }
6483
6484 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GoldenEnum {
6485 #[inline]
6486 unsafe fn encode(
6487 self,
6488 encoder: &mut fidl::encoding::Encoder<'_, D>,
6489 offset: usize,
6490 _depth: fidl::encoding::Depth,
6491 ) -> fidl::Result<()> {
6492 encoder.debug_check_bounds::<Self>(offset);
6493 encoder.write_num(self.into_primitive(), offset);
6494 Ok(())
6495 }
6496 }
6497
6498 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenEnum {
6499 #[inline(always)]
6500 fn new_empty() -> Self {
6501 Self::A
6502 }
6503
6504 #[inline]
6505 unsafe fn decode(
6506 &mut self,
6507 decoder: &mut fidl::encoding::Decoder<'_, D>,
6508 offset: usize,
6509 _depth: fidl::encoding::Depth,
6510 ) -> fidl::Result<()> {
6511 decoder.debug_check_bounds::<Self>(offset);
6512 let prim = decoder.read_num::<u16>(offset);
6513
6514 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6515 Ok(())
6516 }
6517 }
6518 unsafe impl fidl::encoding::TypeMarker for SignedEnum {
6519 type Owned = Self;
6520
6521 #[inline(always)]
6522 fn inline_align(_context: fidl::encoding::Context) -> usize {
6523 std::mem::align_of::<i32>()
6524 }
6525
6526 #[inline(always)]
6527 fn inline_size(_context: fidl::encoding::Context) -> usize {
6528 std::mem::size_of::<i32>()
6529 }
6530
6531 #[inline(always)]
6532 fn encode_is_copy() -> bool {
6533 false
6534 }
6535
6536 #[inline(always)]
6537 fn decode_is_copy() -> bool {
6538 false
6539 }
6540 }
6541
6542 impl fidl::encoding::ValueTypeMarker for SignedEnum {
6543 type Borrowed<'a> = Self;
6544 #[inline(always)]
6545 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6546 *value
6547 }
6548 }
6549
6550 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SignedEnum {
6551 #[inline]
6552 unsafe fn encode(
6553 self,
6554 encoder: &mut fidl::encoding::Encoder<'_, D>,
6555 offset: usize,
6556 _depth: fidl::encoding::Depth,
6557 ) -> fidl::Result<()> {
6558 encoder.debug_check_bounds::<Self>(offset);
6559 encoder.write_num(self.into_primitive(), offset);
6560 Ok(())
6561 }
6562 }
6563
6564 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SignedEnum {
6565 #[inline(always)]
6566 fn new_empty() -> Self {
6567 Self::unknown()
6568 }
6569
6570 #[inline]
6571 unsafe fn decode(
6572 &mut self,
6573 decoder: &mut fidl::encoding::Decoder<'_, D>,
6574 offset: usize,
6575 _depth: fidl::encoding::Depth,
6576 ) -> fidl::Result<()> {
6577 decoder.debug_check_bounds::<Self>(offset);
6578 let prim = decoder.read_num::<i32>(offset);
6579
6580 *self = Self::from_primitive_allow_unknown(prim);
6581 Ok(())
6582 }
6583 }
6584 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt16 {
6585 type Owned = Self;
6586
6587 #[inline(always)]
6588 fn inline_align(_context: fidl::encoding::Context) -> usize {
6589 std::mem::align_of::<i16>()
6590 }
6591
6592 #[inline(always)]
6593 fn inline_size(_context: fidl::encoding::Context) -> usize {
6594 std::mem::size_of::<i16>()
6595 }
6596
6597 #[inline(always)]
6598 fn encode_is_copy() -> bool {
6599 true
6600 }
6601
6602 #[inline(always)]
6603 fn decode_is_copy() -> bool {
6604 false
6605 }
6606 }
6607
6608 impl fidl::encoding::ValueTypeMarker for StrictEnumInt16 {
6609 type Borrowed<'a> = Self;
6610 #[inline(always)]
6611 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6612 *value
6613 }
6614 }
6615
6616 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6617 for StrictEnumInt16
6618 {
6619 #[inline]
6620 unsafe fn encode(
6621 self,
6622 encoder: &mut fidl::encoding::Encoder<'_, D>,
6623 offset: usize,
6624 _depth: fidl::encoding::Depth,
6625 ) -> fidl::Result<()> {
6626 encoder.debug_check_bounds::<Self>(offset);
6627 encoder.write_num(self.into_primitive(), offset);
6628 Ok(())
6629 }
6630 }
6631
6632 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt16 {
6633 #[inline(always)]
6634 fn new_empty() -> Self {
6635 Self::First
6636 }
6637
6638 #[inline]
6639 unsafe fn decode(
6640 &mut self,
6641 decoder: &mut fidl::encoding::Decoder<'_, D>,
6642 offset: usize,
6643 _depth: fidl::encoding::Depth,
6644 ) -> fidl::Result<()> {
6645 decoder.debug_check_bounds::<Self>(offset);
6646 let prim = decoder.read_num::<i16>(offset);
6647
6648 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6649 Ok(())
6650 }
6651 }
6652 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt32 {
6653 type Owned = Self;
6654
6655 #[inline(always)]
6656 fn inline_align(_context: fidl::encoding::Context) -> usize {
6657 std::mem::align_of::<i32>()
6658 }
6659
6660 #[inline(always)]
6661 fn inline_size(_context: fidl::encoding::Context) -> usize {
6662 std::mem::size_of::<i32>()
6663 }
6664
6665 #[inline(always)]
6666 fn encode_is_copy() -> bool {
6667 true
6668 }
6669
6670 #[inline(always)]
6671 fn decode_is_copy() -> bool {
6672 false
6673 }
6674 }
6675
6676 impl fidl::encoding::ValueTypeMarker for StrictEnumInt32 {
6677 type Borrowed<'a> = Self;
6678 #[inline(always)]
6679 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6680 *value
6681 }
6682 }
6683
6684 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6685 for StrictEnumInt32
6686 {
6687 #[inline]
6688 unsafe fn encode(
6689 self,
6690 encoder: &mut fidl::encoding::Encoder<'_, D>,
6691 offset: usize,
6692 _depth: fidl::encoding::Depth,
6693 ) -> fidl::Result<()> {
6694 encoder.debug_check_bounds::<Self>(offset);
6695 encoder.write_num(self.into_primitive(), offset);
6696 Ok(())
6697 }
6698 }
6699
6700 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt32 {
6701 #[inline(always)]
6702 fn new_empty() -> Self {
6703 Self::First
6704 }
6705
6706 #[inline]
6707 unsafe fn decode(
6708 &mut self,
6709 decoder: &mut fidl::encoding::Decoder<'_, D>,
6710 offset: usize,
6711 _depth: fidl::encoding::Depth,
6712 ) -> fidl::Result<()> {
6713 decoder.debug_check_bounds::<Self>(offset);
6714 let prim = decoder.read_num::<i32>(offset);
6715
6716 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6717 Ok(())
6718 }
6719 }
6720 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt64 {
6721 type Owned = Self;
6722
6723 #[inline(always)]
6724 fn inline_align(_context: fidl::encoding::Context) -> usize {
6725 std::mem::align_of::<i64>()
6726 }
6727
6728 #[inline(always)]
6729 fn inline_size(_context: fidl::encoding::Context) -> usize {
6730 std::mem::size_of::<i64>()
6731 }
6732
6733 #[inline(always)]
6734 fn encode_is_copy() -> bool {
6735 true
6736 }
6737
6738 #[inline(always)]
6739 fn decode_is_copy() -> bool {
6740 false
6741 }
6742 }
6743
6744 impl fidl::encoding::ValueTypeMarker for StrictEnumInt64 {
6745 type Borrowed<'a> = Self;
6746 #[inline(always)]
6747 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6748 *value
6749 }
6750 }
6751
6752 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6753 for StrictEnumInt64
6754 {
6755 #[inline]
6756 unsafe fn encode(
6757 self,
6758 encoder: &mut fidl::encoding::Encoder<'_, D>,
6759 offset: usize,
6760 _depth: fidl::encoding::Depth,
6761 ) -> fidl::Result<()> {
6762 encoder.debug_check_bounds::<Self>(offset);
6763 encoder.write_num(self.into_primitive(), offset);
6764 Ok(())
6765 }
6766 }
6767
6768 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt64 {
6769 #[inline(always)]
6770 fn new_empty() -> Self {
6771 Self::First
6772 }
6773
6774 #[inline]
6775 unsafe fn decode(
6776 &mut self,
6777 decoder: &mut fidl::encoding::Decoder<'_, D>,
6778 offset: usize,
6779 _depth: fidl::encoding::Depth,
6780 ) -> fidl::Result<()> {
6781 decoder.debug_check_bounds::<Self>(offset);
6782 let prim = decoder.read_num::<i64>(offset);
6783
6784 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6785 Ok(())
6786 }
6787 }
6788 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt8 {
6789 type Owned = Self;
6790
6791 #[inline(always)]
6792 fn inline_align(_context: fidl::encoding::Context) -> usize {
6793 std::mem::align_of::<i8>()
6794 }
6795
6796 #[inline(always)]
6797 fn inline_size(_context: fidl::encoding::Context) -> usize {
6798 std::mem::size_of::<i8>()
6799 }
6800
6801 #[inline(always)]
6802 fn encode_is_copy() -> bool {
6803 true
6804 }
6805
6806 #[inline(always)]
6807 fn decode_is_copy() -> bool {
6808 false
6809 }
6810 }
6811
6812 impl fidl::encoding::ValueTypeMarker for StrictEnumInt8 {
6813 type Borrowed<'a> = Self;
6814 #[inline(always)]
6815 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6816 *value
6817 }
6818 }
6819
6820 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StrictEnumInt8 {
6821 #[inline]
6822 unsafe fn encode(
6823 self,
6824 encoder: &mut fidl::encoding::Encoder<'_, D>,
6825 offset: usize,
6826 _depth: fidl::encoding::Depth,
6827 ) -> fidl::Result<()> {
6828 encoder.debug_check_bounds::<Self>(offset);
6829 encoder.write_num(self.into_primitive(), offset);
6830 Ok(())
6831 }
6832 }
6833
6834 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt8 {
6835 #[inline(always)]
6836 fn new_empty() -> Self {
6837 Self::First
6838 }
6839
6840 #[inline]
6841 unsafe fn decode(
6842 &mut self,
6843 decoder: &mut fidl::encoding::Decoder<'_, D>,
6844 offset: usize,
6845 _depth: fidl::encoding::Depth,
6846 ) -> fidl::Result<()> {
6847 decoder.debug_check_bounds::<Self>(offset);
6848 let prim = decoder.read_num::<i8>(offset);
6849
6850 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6851 Ok(())
6852 }
6853 }
6854 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint16 {
6855 type Owned = Self;
6856
6857 #[inline(always)]
6858 fn inline_align(_context: fidl::encoding::Context) -> usize {
6859 std::mem::align_of::<u16>()
6860 }
6861
6862 #[inline(always)]
6863 fn inline_size(_context: fidl::encoding::Context) -> usize {
6864 std::mem::size_of::<u16>()
6865 }
6866
6867 #[inline(always)]
6868 fn encode_is_copy() -> bool {
6869 true
6870 }
6871
6872 #[inline(always)]
6873 fn decode_is_copy() -> bool {
6874 false
6875 }
6876 }
6877
6878 impl fidl::encoding::ValueTypeMarker for StrictEnumUint16 {
6879 type Borrowed<'a> = Self;
6880 #[inline(always)]
6881 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6882 *value
6883 }
6884 }
6885
6886 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6887 for StrictEnumUint16
6888 {
6889 #[inline]
6890 unsafe fn encode(
6891 self,
6892 encoder: &mut fidl::encoding::Encoder<'_, D>,
6893 offset: usize,
6894 _depth: fidl::encoding::Depth,
6895 ) -> fidl::Result<()> {
6896 encoder.debug_check_bounds::<Self>(offset);
6897 encoder.write_num(self.into_primitive(), offset);
6898 Ok(())
6899 }
6900 }
6901
6902 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint16 {
6903 #[inline(always)]
6904 fn new_empty() -> Self {
6905 Self::First
6906 }
6907
6908 #[inline]
6909 unsafe fn decode(
6910 &mut self,
6911 decoder: &mut fidl::encoding::Decoder<'_, D>,
6912 offset: usize,
6913 _depth: fidl::encoding::Depth,
6914 ) -> fidl::Result<()> {
6915 decoder.debug_check_bounds::<Self>(offset);
6916 let prim = decoder.read_num::<u16>(offset);
6917
6918 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6919 Ok(())
6920 }
6921 }
6922 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint32 {
6923 type Owned = Self;
6924
6925 #[inline(always)]
6926 fn inline_align(_context: fidl::encoding::Context) -> usize {
6927 std::mem::align_of::<u32>()
6928 }
6929
6930 #[inline(always)]
6931 fn inline_size(_context: fidl::encoding::Context) -> usize {
6932 std::mem::size_of::<u32>()
6933 }
6934
6935 #[inline(always)]
6936 fn encode_is_copy() -> bool {
6937 true
6938 }
6939
6940 #[inline(always)]
6941 fn decode_is_copy() -> bool {
6942 false
6943 }
6944 }
6945
6946 impl fidl::encoding::ValueTypeMarker for StrictEnumUint32 {
6947 type Borrowed<'a> = Self;
6948 #[inline(always)]
6949 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6950 *value
6951 }
6952 }
6953
6954 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
6955 for StrictEnumUint32
6956 {
6957 #[inline]
6958 unsafe fn encode(
6959 self,
6960 encoder: &mut fidl::encoding::Encoder<'_, D>,
6961 offset: usize,
6962 _depth: fidl::encoding::Depth,
6963 ) -> fidl::Result<()> {
6964 encoder.debug_check_bounds::<Self>(offset);
6965 encoder.write_num(self.into_primitive(), offset);
6966 Ok(())
6967 }
6968 }
6969
6970 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint32 {
6971 #[inline(always)]
6972 fn new_empty() -> Self {
6973 Self::First
6974 }
6975
6976 #[inline]
6977 unsafe fn decode(
6978 &mut self,
6979 decoder: &mut fidl::encoding::Decoder<'_, D>,
6980 offset: usize,
6981 _depth: fidl::encoding::Depth,
6982 ) -> fidl::Result<()> {
6983 decoder.debug_check_bounds::<Self>(offset);
6984 let prim = decoder.read_num::<u32>(offset);
6985
6986 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
6987 Ok(())
6988 }
6989 }
6990 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint64 {
6991 type Owned = Self;
6992
6993 #[inline(always)]
6994 fn inline_align(_context: fidl::encoding::Context) -> usize {
6995 std::mem::align_of::<u64>()
6996 }
6997
6998 #[inline(always)]
6999 fn inline_size(_context: fidl::encoding::Context) -> usize {
7000 std::mem::size_of::<u64>()
7001 }
7002
7003 #[inline(always)]
7004 fn encode_is_copy() -> bool {
7005 true
7006 }
7007
7008 #[inline(always)]
7009 fn decode_is_copy() -> bool {
7010 false
7011 }
7012 }
7013
7014 impl fidl::encoding::ValueTypeMarker for StrictEnumUint64 {
7015 type Borrowed<'a> = Self;
7016 #[inline(always)]
7017 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7018 *value
7019 }
7020 }
7021
7022 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7023 for StrictEnumUint64
7024 {
7025 #[inline]
7026 unsafe fn encode(
7027 self,
7028 encoder: &mut fidl::encoding::Encoder<'_, D>,
7029 offset: usize,
7030 _depth: fidl::encoding::Depth,
7031 ) -> fidl::Result<()> {
7032 encoder.debug_check_bounds::<Self>(offset);
7033 encoder.write_num(self.into_primitive(), offset);
7034 Ok(())
7035 }
7036 }
7037
7038 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint64 {
7039 #[inline(always)]
7040 fn new_empty() -> Self {
7041 Self::First
7042 }
7043
7044 #[inline]
7045 unsafe fn decode(
7046 &mut self,
7047 decoder: &mut fidl::encoding::Decoder<'_, D>,
7048 offset: usize,
7049 _depth: fidl::encoding::Depth,
7050 ) -> fidl::Result<()> {
7051 decoder.debug_check_bounds::<Self>(offset);
7052 let prim = decoder.read_num::<u64>(offset);
7053
7054 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7055 Ok(())
7056 }
7057 }
7058 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint8 {
7059 type Owned = Self;
7060
7061 #[inline(always)]
7062 fn inline_align(_context: fidl::encoding::Context) -> usize {
7063 std::mem::align_of::<u8>()
7064 }
7065
7066 #[inline(always)]
7067 fn inline_size(_context: fidl::encoding::Context) -> usize {
7068 std::mem::size_of::<u8>()
7069 }
7070
7071 #[inline(always)]
7072 fn encode_is_copy() -> bool {
7073 true
7074 }
7075
7076 #[inline(always)]
7077 fn decode_is_copy() -> bool {
7078 false
7079 }
7080 }
7081
7082 impl fidl::encoding::ValueTypeMarker for StrictEnumUint8 {
7083 type Borrowed<'a> = Self;
7084 #[inline(always)]
7085 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7086 *value
7087 }
7088 }
7089
7090 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7091 for StrictEnumUint8
7092 {
7093 #[inline]
7094 unsafe fn encode(
7095 self,
7096 encoder: &mut fidl::encoding::Encoder<'_, D>,
7097 offset: usize,
7098 _depth: fidl::encoding::Depth,
7099 ) -> fidl::Result<()> {
7100 encoder.debug_check_bounds::<Self>(offset);
7101 encoder.write_num(self.into_primitive(), offset);
7102 Ok(())
7103 }
7104 }
7105
7106 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint8 {
7107 #[inline(always)]
7108 fn new_empty() -> Self {
7109 Self::First
7110 }
7111
7112 #[inline]
7113 unsafe fn decode(
7114 &mut self,
7115 decoder: &mut fidl::encoding::Decoder<'_, D>,
7116 offset: usize,
7117 _depth: fidl::encoding::Depth,
7118 ) -> fidl::Result<()> {
7119 decoder.debug_check_bounds::<Self>(offset);
7120 let prim = decoder.read_num::<u8>(offset);
7121
7122 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7123 Ok(())
7124 }
7125 }
7126 unsafe impl fidl::encoding::TypeMarker for UnsignedEnum {
7127 type Owned = Self;
7128
7129 #[inline(always)]
7130 fn inline_align(_context: fidl::encoding::Context) -> usize {
7131 std::mem::align_of::<u16>()
7132 }
7133
7134 #[inline(always)]
7135 fn inline_size(_context: fidl::encoding::Context) -> usize {
7136 std::mem::size_of::<u16>()
7137 }
7138
7139 #[inline(always)]
7140 fn encode_is_copy() -> bool {
7141 false
7142 }
7143
7144 #[inline(always)]
7145 fn decode_is_copy() -> bool {
7146 false
7147 }
7148 }
7149
7150 impl fidl::encoding::ValueTypeMarker for UnsignedEnum {
7151 type Borrowed<'a> = Self;
7152 #[inline(always)]
7153 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7154 *value
7155 }
7156 }
7157
7158 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnsignedEnum {
7159 #[inline]
7160 unsafe fn encode(
7161 self,
7162 encoder: &mut fidl::encoding::Encoder<'_, D>,
7163 offset: usize,
7164 _depth: fidl::encoding::Depth,
7165 ) -> fidl::Result<()> {
7166 encoder.debug_check_bounds::<Self>(offset);
7167 encoder.write_num(self.into_primitive(), offset);
7168 Ok(())
7169 }
7170 }
7171
7172 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsignedEnum {
7173 #[inline(always)]
7174 fn new_empty() -> Self {
7175 Self::unknown()
7176 }
7177
7178 #[inline]
7179 unsafe fn decode(
7180 &mut self,
7181 decoder: &mut fidl::encoding::Decoder<'_, D>,
7182 offset: usize,
7183 _depth: fidl::encoding::Depth,
7184 ) -> fidl::Result<()> {
7185 decoder.debug_check_bounds::<Self>(offset);
7186 let prim = decoder.read_num::<u16>(offset);
7187
7188 *self = Self::from_primitive_allow_unknown(prim);
7189 Ok(())
7190 }
7191 }
7192 unsafe impl fidl::encoding::TypeMarker for ObjType {
7193 type Owned = Self;
7194
7195 #[inline(always)]
7196 fn inline_align(_context: fidl::encoding::Context) -> usize {
7197 std::mem::align_of::<u32>()
7198 }
7199
7200 #[inline(always)]
7201 fn inline_size(_context: fidl::encoding::Context) -> usize {
7202 std::mem::size_of::<u32>()
7203 }
7204
7205 #[inline(always)]
7206 fn encode_is_copy() -> bool {
7207 true
7208 }
7209
7210 #[inline(always)]
7211 fn decode_is_copy() -> bool {
7212 false
7213 }
7214 }
7215
7216 impl fidl::encoding::ValueTypeMarker for ObjType {
7217 type Borrowed<'a> = Self;
7218 #[inline(always)]
7219 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7220 *value
7221 }
7222 }
7223
7224 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ObjType {
7225 #[inline]
7226 unsafe fn encode(
7227 self,
7228 encoder: &mut fidl::encoding::Encoder<'_, D>,
7229 offset: usize,
7230 _depth: fidl::encoding::Depth,
7231 ) -> fidl::Result<()> {
7232 encoder.debug_check_bounds::<Self>(offset);
7233 encoder.write_num(self.into_primitive(), offset);
7234 Ok(())
7235 }
7236 }
7237
7238 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ObjType {
7239 #[inline(always)]
7240 fn new_empty() -> Self {
7241 Self::None
7242 }
7243
7244 #[inline]
7245 unsafe fn decode(
7246 &mut self,
7247 decoder: &mut fidl::encoding::Decoder<'_, D>,
7248 offset: usize,
7249 _depth: fidl::encoding::Depth,
7250 ) -> fidl::Result<()> {
7251 decoder.debug_check_bounds::<Self>(offset);
7252 let prim = decoder.read_num::<u32>(offset);
7253
7254 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
7255 Ok(())
7256 }
7257 }
7258
7259 impl fidl::encoding::ValueTypeMarker for AliasedBool {
7260 type Borrowed<'a> = &'a Self;
7261 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7262 value
7263 }
7264 }
7265
7266 unsafe impl fidl::encoding::TypeMarker for AliasedBool {
7267 type Owned = Self;
7268
7269 #[inline(always)]
7270 fn inline_align(_context: fidl::encoding::Context) -> usize {
7271 1
7272 }
7273
7274 #[inline(always)]
7275 fn inline_size(_context: fidl::encoding::Context) -> usize {
7276 1
7277 }
7278 }
7279
7280 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedBool, D>
7281 for &AliasedBool
7282 {
7283 #[inline]
7284 unsafe fn encode(
7285 self,
7286 encoder: &mut fidl::encoding::Encoder<'_, D>,
7287 offset: usize,
7288 _depth: fidl::encoding::Depth,
7289 ) -> fidl::Result<()> {
7290 encoder.debug_check_bounds::<AliasedBool>(offset);
7291 fidl::encoding::Encode::<AliasedBool, D>::encode(
7293 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7294 encoder,
7295 offset,
7296 _depth,
7297 )
7298 }
7299 }
7300 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
7301 fidl::encoding::Encode<AliasedBool, D> for (T0,)
7302 {
7303 #[inline]
7304 unsafe fn encode(
7305 self,
7306 encoder: &mut fidl::encoding::Encoder<'_, D>,
7307 offset: usize,
7308 depth: fidl::encoding::Depth,
7309 ) -> fidl::Result<()> {
7310 encoder.debug_check_bounds::<AliasedBool>(offset);
7311 self.0.encode(encoder, offset + 0, depth)?;
7315 Ok(())
7316 }
7317 }
7318
7319 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedBool {
7320 #[inline(always)]
7321 fn new_empty() -> Self {
7322 Self { value: fidl::new_empty!(bool, D) }
7323 }
7324
7325 #[inline]
7326 unsafe fn decode(
7327 &mut self,
7328 decoder: &mut fidl::encoding::Decoder<'_, D>,
7329 offset: usize,
7330 _depth: fidl::encoding::Depth,
7331 ) -> fidl::Result<()> {
7332 decoder.debug_check_bounds::<Self>(offset);
7333 fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
7335 Ok(())
7336 }
7337 }
7338
7339 impl fidl::encoding::ValueTypeMarker for AliasedFloat64 {
7340 type Borrowed<'a> = &'a Self;
7341 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7342 value
7343 }
7344 }
7345
7346 unsafe impl fidl::encoding::TypeMarker for AliasedFloat64 {
7347 type Owned = Self;
7348
7349 #[inline(always)]
7350 fn inline_align(_context: fidl::encoding::Context) -> usize {
7351 8
7352 }
7353
7354 #[inline(always)]
7355 fn inline_size(_context: fidl::encoding::Context) -> usize {
7356 8
7357 }
7358 }
7359
7360 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedFloat64, D>
7361 for &AliasedFloat64
7362 {
7363 #[inline]
7364 unsafe fn encode(
7365 self,
7366 encoder: &mut fidl::encoding::Encoder<'_, D>,
7367 offset: usize,
7368 _depth: fidl::encoding::Depth,
7369 ) -> fidl::Result<()> {
7370 encoder.debug_check_bounds::<AliasedFloat64>(offset);
7371 fidl::encoding::Encode::<AliasedFloat64, D>::encode(
7373 (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7374 encoder,
7375 offset,
7376 _depth,
7377 )
7378 }
7379 }
7380 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
7381 fidl::encoding::Encode<AliasedFloat64, D> for (T0,)
7382 {
7383 #[inline]
7384 unsafe fn encode(
7385 self,
7386 encoder: &mut fidl::encoding::Encoder<'_, D>,
7387 offset: usize,
7388 depth: fidl::encoding::Depth,
7389 ) -> fidl::Result<()> {
7390 encoder.debug_check_bounds::<AliasedFloat64>(offset);
7391 self.0.encode(encoder, offset + 0, depth)?;
7395 Ok(())
7396 }
7397 }
7398
7399 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedFloat64 {
7400 #[inline(always)]
7401 fn new_empty() -> Self {
7402 Self { value: fidl::new_empty!(f64, D) }
7403 }
7404
7405 #[inline]
7406 unsafe fn decode(
7407 &mut self,
7408 decoder: &mut fidl::encoding::Decoder<'_, D>,
7409 offset: usize,
7410 _depth: fidl::encoding::Depth,
7411 ) -> fidl::Result<()> {
7412 decoder.debug_check_bounds::<Self>(offset);
7413 fidl::decode!(f64, D, &mut self.value, decoder, offset + 0, _depth)?;
7415 Ok(())
7416 }
7417 }
7418
7419 impl fidl::encoding::ValueTypeMarker for AliasedString {
7420 type Borrowed<'a> = &'a Self;
7421 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7422 value
7423 }
7424 }
7425
7426 unsafe impl fidl::encoding::TypeMarker for AliasedString {
7427 type Owned = Self;
7428
7429 #[inline(always)]
7430 fn inline_align(_context: fidl::encoding::Context) -> usize {
7431 8
7432 }
7433
7434 #[inline(always)]
7435 fn inline_size(_context: fidl::encoding::Context) -> usize {
7436 16
7437 }
7438 }
7439
7440 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedString, D>
7441 for &AliasedString
7442 {
7443 #[inline]
7444 unsafe fn encode(
7445 self,
7446 encoder: &mut fidl::encoding::Encoder<'_, D>,
7447 offset: usize,
7448 _depth: fidl::encoding::Depth,
7449 ) -> fidl::Result<()> {
7450 encoder.debug_check_bounds::<AliasedString>(offset);
7451 fidl::encoding::Encode::<AliasedString, D>::encode(
7453 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
7454 &self.value,
7455 ),),
7456 encoder,
7457 offset,
7458 _depth,
7459 )
7460 }
7461 }
7462 unsafe impl<
7463 D: fidl::encoding::ResourceDialect,
7464 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
7465 > fidl::encoding::Encode<AliasedString, D> for (T0,)
7466 {
7467 #[inline]
7468 unsafe fn encode(
7469 self,
7470 encoder: &mut fidl::encoding::Encoder<'_, D>,
7471 offset: usize,
7472 depth: fidl::encoding::Depth,
7473 ) -> fidl::Result<()> {
7474 encoder.debug_check_bounds::<AliasedString>(offset);
7475 self.0.encode(encoder, offset + 0, depth)?;
7479 Ok(())
7480 }
7481 }
7482
7483 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedString {
7484 #[inline(always)]
7485 fn new_empty() -> Self {
7486 Self { value: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
7487 }
7488
7489 #[inline]
7490 unsafe fn decode(
7491 &mut self,
7492 decoder: &mut fidl::encoding::Decoder<'_, D>,
7493 offset: usize,
7494 _depth: fidl::encoding::Depth,
7495 ) -> fidl::Result<()> {
7496 decoder.debug_check_bounds::<Self>(offset);
7497 fidl::decode!(
7499 fidl::encoding::UnboundedString,
7500 D,
7501 &mut self.value,
7502 decoder,
7503 offset + 0,
7504 _depth
7505 )?;
7506 Ok(())
7507 }
7508 }
7509
7510 impl fidl::encoding::ValueTypeMarker for AliasedStruct {
7511 type Borrowed<'a> = &'a Self;
7512 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7513 value
7514 }
7515 }
7516
7517 unsafe impl fidl::encoding::TypeMarker for AliasedStruct {
7518 type Owned = Self;
7519
7520 #[inline(always)]
7521 fn inline_align(_context: fidl::encoding::Context) -> usize {
7522 1
7523 }
7524
7525 #[inline(always)]
7526 fn inline_size(_context: fidl::encoding::Context) -> usize {
7527 1
7528 }
7529 }
7530
7531 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedStruct, D>
7532 for &AliasedStruct
7533 {
7534 #[inline]
7535 unsafe fn encode(
7536 self,
7537 encoder: &mut fidl::encoding::Encoder<'_, D>,
7538 offset: usize,
7539 _depth: fidl::encoding::Depth,
7540 ) -> fidl::Result<()> {
7541 encoder.debug_check_bounds::<AliasedStruct>(offset);
7542 fidl::encoding::Encode::<AliasedStruct, D>::encode(
7544 (<AnotherEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
7545 encoder,
7546 offset,
7547 _depth,
7548 )
7549 }
7550 }
7551 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<AnotherEmptyStruct, D>>
7552 fidl::encoding::Encode<AliasedStruct, D> for (T0,)
7553 {
7554 #[inline]
7555 unsafe fn encode(
7556 self,
7557 encoder: &mut fidl::encoding::Encoder<'_, D>,
7558 offset: usize,
7559 depth: fidl::encoding::Depth,
7560 ) -> fidl::Result<()> {
7561 encoder.debug_check_bounds::<AliasedStruct>(offset);
7562 self.0.encode(encoder, offset + 0, depth)?;
7566 Ok(())
7567 }
7568 }
7569
7570 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedStruct {
7571 #[inline(always)]
7572 fn new_empty() -> Self {
7573 Self { value: fidl::new_empty!(AnotherEmptyStruct, D) }
7574 }
7575
7576 #[inline]
7577 unsafe fn decode(
7578 &mut self,
7579 decoder: &mut fidl::encoding::Decoder<'_, D>,
7580 offset: usize,
7581 _depth: fidl::encoding::Depth,
7582 ) -> fidl::Result<()> {
7583 decoder.debug_check_bounds::<Self>(offset);
7584 fidl::decode!(AnotherEmptyStruct, D, &mut self.value, decoder, offset + 0, _depth)?;
7586 Ok(())
7587 }
7588 }
7589
7590 impl fidl::encoding::ValueTypeMarker for AliasedUint64 {
7591 type Borrowed<'a> = &'a Self;
7592 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7593 value
7594 }
7595 }
7596
7597 unsafe impl fidl::encoding::TypeMarker for AliasedUint64 {
7598 type Owned = Self;
7599
7600 #[inline(always)]
7601 fn inline_align(_context: fidl::encoding::Context) -> usize {
7602 8
7603 }
7604
7605 #[inline(always)]
7606 fn inline_size(_context: fidl::encoding::Context) -> usize {
7607 8
7608 }
7609 #[inline(always)]
7610 fn encode_is_copy() -> bool {
7611 true
7612 }
7613
7614 #[inline(always)]
7615 fn decode_is_copy() -> bool {
7616 true
7617 }
7618 }
7619
7620 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AliasedUint64, D>
7621 for &AliasedUint64
7622 {
7623 #[inline]
7624 unsafe fn encode(
7625 self,
7626 encoder: &mut fidl::encoding::Encoder<'_, D>,
7627 offset: usize,
7628 _depth: fidl::encoding::Depth,
7629 ) -> fidl::Result<()> {
7630 encoder.debug_check_bounds::<AliasedUint64>(offset);
7631 unsafe {
7632 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7634 (buf_ptr as *mut AliasedUint64)
7635 .write_unaligned((self as *const AliasedUint64).read());
7636 }
7639 Ok(())
7640 }
7641 }
7642 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
7643 fidl::encoding::Encode<AliasedUint64, D> for (T0,)
7644 {
7645 #[inline]
7646 unsafe fn encode(
7647 self,
7648 encoder: &mut fidl::encoding::Encoder<'_, D>,
7649 offset: usize,
7650 depth: fidl::encoding::Depth,
7651 ) -> fidl::Result<()> {
7652 encoder.debug_check_bounds::<AliasedUint64>(offset);
7653 self.0.encode(encoder, offset + 0, depth)?;
7657 Ok(())
7658 }
7659 }
7660
7661 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AliasedUint64 {
7662 #[inline(always)]
7663 fn new_empty() -> Self {
7664 Self { value: fidl::new_empty!(u64, D) }
7665 }
7666
7667 #[inline]
7668 unsafe fn decode(
7669 &mut self,
7670 decoder: &mut fidl::encoding::Decoder<'_, D>,
7671 offset: usize,
7672 _depth: fidl::encoding::Depth,
7673 ) -> fidl::Result<()> {
7674 decoder.debug_check_bounds::<Self>(offset);
7675 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7676 unsafe {
7679 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7680 }
7681 Ok(())
7682 }
7683 }
7684
7685 impl fidl::encoding::ValueTypeMarker for AnEmptyStructInStruct {
7686 type Borrowed<'a> = &'a Self;
7687 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7688 value
7689 }
7690 }
7691
7692 unsafe impl fidl::encoding::TypeMarker for AnEmptyStructInStruct {
7693 type Owned = Self;
7694
7695 #[inline(always)]
7696 fn inline_align(_context: fidl::encoding::Context) -> usize {
7697 1
7698 }
7699
7700 #[inline(always)]
7701 fn inline_size(_context: fidl::encoding::Context) -> usize {
7702 1
7703 }
7704 }
7705
7706 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnEmptyStructInStruct, D>
7707 for &AnEmptyStructInStruct
7708 {
7709 #[inline]
7710 unsafe fn encode(
7711 self,
7712 encoder: &mut fidl::encoding::Encoder<'_, D>,
7713 offset: usize,
7714 _depth: fidl::encoding::Depth,
7715 ) -> fidl::Result<()> {
7716 encoder.debug_check_bounds::<AnEmptyStructInStruct>(offset);
7717 fidl::encoding::Encode::<AnEmptyStructInStruct, D>::encode(
7719 (<EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
7720 encoder,
7721 offset,
7722 _depth,
7723 )
7724 }
7725 }
7726 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyStruct, D>>
7727 fidl::encoding::Encode<AnEmptyStructInStruct, D> for (T0,)
7728 {
7729 #[inline]
7730 unsafe fn encode(
7731 self,
7732 encoder: &mut fidl::encoding::Encoder<'_, D>,
7733 offset: usize,
7734 depth: fidl::encoding::Depth,
7735 ) -> fidl::Result<()> {
7736 encoder.debug_check_bounds::<AnEmptyStructInStruct>(offset);
7737 self.0.encode(encoder, offset + 0, depth)?;
7741 Ok(())
7742 }
7743 }
7744
7745 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnEmptyStructInStruct {
7746 #[inline(always)]
7747 fn new_empty() -> Self {
7748 Self { v: fidl::new_empty!(EmptyStruct, D) }
7749 }
7750
7751 #[inline]
7752 unsafe fn decode(
7753 &mut self,
7754 decoder: &mut fidl::encoding::Decoder<'_, D>,
7755 offset: usize,
7756 _depth: fidl::encoding::Depth,
7757 ) -> fidl::Result<()> {
7758 decoder.debug_check_bounds::<Self>(offset);
7759 fidl::decode!(EmptyStruct, D, &mut self.v, decoder, offset + 0, _depth)?;
7761 Ok(())
7762 }
7763 }
7764
7765 impl fidl::encoding::ValueTypeMarker for AnotherEmptyStruct {
7766 type Borrowed<'a> = &'a Self;
7767 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7768 value
7769 }
7770 }
7771
7772 unsafe impl fidl::encoding::TypeMarker for AnotherEmptyStruct {
7773 type Owned = Self;
7774
7775 #[inline(always)]
7776 fn inline_align(_context: fidl::encoding::Context) -> usize {
7777 1
7778 }
7779
7780 #[inline(always)]
7781 fn inline_size(_context: fidl::encoding::Context) -> usize {
7782 1
7783 }
7784 }
7785
7786 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AnotherEmptyStruct, D>
7787 for &AnotherEmptyStruct
7788 {
7789 #[inline]
7790 unsafe fn encode(
7791 self,
7792 encoder: &mut fidl::encoding::Encoder<'_, D>,
7793 offset: usize,
7794 _depth: fidl::encoding::Depth,
7795 ) -> fidl::Result<()> {
7796 encoder.debug_check_bounds::<AnotherEmptyStruct>(offset);
7797 encoder.write_num(0u8, offset);
7798 Ok(())
7799 }
7800 }
7801
7802 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AnotherEmptyStruct {
7803 #[inline(always)]
7804 fn new_empty() -> Self {
7805 Self
7806 }
7807
7808 #[inline]
7809 unsafe fn decode(
7810 &mut self,
7811 decoder: &mut fidl::encoding::Decoder<'_, D>,
7812 offset: usize,
7813 _depth: fidl::encoding::Depth,
7814 ) -> fidl::Result<()> {
7815 decoder.debug_check_bounds::<Self>(offset);
7816 match decoder.read_num::<u8>(offset) {
7817 0 => Ok(()),
7818 _ => Err(fidl::Error::Invalid),
7819 }
7820 }
7821 }
7822
7823 impl fidl::encoding::ValueTypeMarker for ArrayStruct {
7824 type Borrowed<'a> = &'a Self;
7825 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7826 value
7827 }
7828 }
7829
7830 unsafe impl fidl::encoding::TypeMarker for ArrayStruct {
7831 type Owned = Self;
7832
7833 #[inline(always)]
7834 fn inline_align(_context: fidl::encoding::Context) -> usize {
7835 8
7836 }
7837
7838 #[inline(always)]
7839 fn inline_size(_context: fidl::encoding::Context) -> usize {
7840 96
7841 }
7842 }
7843
7844 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArrayStruct, D>
7845 for &ArrayStruct
7846 {
7847 #[inline]
7848 unsafe fn encode(
7849 self,
7850 encoder: &mut fidl::encoding::Encoder<'_, D>,
7851 offset: usize,
7852 _depth: fidl::encoding::Depth,
7853 ) -> fidl::Result<()> {
7854 encoder.debug_check_bounds::<ArrayStruct>(offset);
7855 fidl::encoding::Encode::<ArrayStruct, D>::encode(
7857 (
7858 <fidl::encoding::Array<StringUnion, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.unions),
7859 <fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.optional_unions),
7860 ),
7861 encoder, offset, _depth
7862 )
7863 }
7864 }
7865 unsafe impl<
7866 D: fidl::encoding::ResourceDialect,
7867 T0: fidl::encoding::Encode<fidl::encoding::Array<StringUnion, 3>, D>,
7868 T1: fidl::encoding::Encode<
7869 fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
7870 D,
7871 >,
7872 > fidl::encoding::Encode<ArrayStruct, D> for (T0, T1)
7873 {
7874 #[inline]
7875 unsafe fn encode(
7876 self,
7877 encoder: &mut fidl::encoding::Encoder<'_, D>,
7878 offset: usize,
7879 depth: fidl::encoding::Depth,
7880 ) -> fidl::Result<()> {
7881 encoder.debug_check_bounds::<ArrayStruct>(offset);
7882 self.0.encode(encoder, offset + 0, depth)?;
7886 self.1.encode(encoder, offset + 48, depth)?;
7887 Ok(())
7888 }
7889 }
7890
7891 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArrayStruct {
7892 #[inline(always)]
7893 fn new_empty() -> Self {
7894 Self {
7895 unions: fidl::new_empty!(fidl::encoding::Array<StringUnion, 3>, D),
7896 optional_unions: fidl::new_empty!(
7897 fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
7898 D
7899 ),
7900 }
7901 }
7902
7903 #[inline]
7904 unsafe fn decode(
7905 &mut self,
7906 decoder: &mut fidl::encoding::Decoder<'_, D>,
7907 offset: usize,
7908 _depth: fidl::encoding::Depth,
7909 ) -> fidl::Result<()> {
7910 decoder.debug_check_bounds::<Self>(offset);
7911 fidl::decode!(fidl::encoding::Array<StringUnion, 3>, D, &mut self.unions, decoder, offset + 0, _depth)?;
7913 fidl::decode!(
7914 fidl::encoding::Array<fidl::encoding::OptionalUnion<StringUnion>, 3>,
7915 D,
7916 &mut self.optional_unions,
7917 decoder,
7918 offset + 48,
7919 _depth
7920 )?;
7921 Ok(())
7922 }
7923 }
7924
7925 impl fidl::encoding::ValueTypeMarker for ArrayWithInternalPadding {
7926 type Borrowed<'a> = &'a Self;
7927 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7928 value
7929 }
7930 }
7931
7932 unsafe impl fidl::encoding::TypeMarker for ArrayWithInternalPadding {
7933 type Owned = Self;
7934
7935 #[inline(always)]
7936 fn inline_align(_context: fidl::encoding::Context) -> usize {
7937 4
7938 }
7939
7940 #[inline(always)]
7941 fn inline_size(_context: fidl::encoding::Context) -> usize {
7942 16
7943 }
7944 }
7945
7946 unsafe impl<D: fidl::encoding::ResourceDialect>
7947 fidl::encoding::Encode<ArrayWithInternalPadding, D> for &ArrayWithInternalPadding
7948 {
7949 #[inline]
7950 unsafe fn encode(
7951 self,
7952 encoder: &mut fidl::encoding::Encoder<'_, D>,
7953 offset: usize,
7954 _depth: fidl::encoding::Depth,
7955 ) -> fidl::Result<()> {
7956 encoder.debug_check_bounds::<ArrayWithInternalPadding>(offset);
7957 unsafe {
7958 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7960 (buf_ptr as *mut ArrayWithInternalPadding)
7961 .write_unaligned((self as *const ArrayWithInternalPadding).read());
7962 let padding_ptr = buf_ptr.offset(0) as *mut u32;
7965 let padding_mask = 0xff000000u32;
7966 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
7967 let padding_ptr = buf_ptr.offset(8) as *mut u32;
7968 let padding_mask = 0xff000000u32;
7969 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
7970 }
7971 Ok(())
7972 }
7973 }
7974 unsafe impl<
7975 D: fidl::encoding::ResourceDialect,
7976 T0: fidl::encoding::Encode<fidl::encoding::Array<OneLayerStructWithPaddingAlign4, 2>, D>,
7977 > fidl::encoding::Encode<ArrayWithInternalPadding, D> for (T0,)
7978 {
7979 #[inline]
7980 unsafe fn encode(
7981 self,
7982 encoder: &mut fidl::encoding::Encoder<'_, D>,
7983 offset: usize,
7984 depth: fidl::encoding::Depth,
7985 ) -> fidl::Result<()> {
7986 encoder.debug_check_bounds::<ArrayWithInternalPadding>(offset);
7987 self.0.encode(encoder, offset + 0, depth)?;
7991 Ok(())
7992 }
7993 }
7994
7995 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7996 for ArrayWithInternalPadding
7997 {
7998 #[inline(always)]
7999 fn new_empty() -> Self {
8000 Self {
8001 v: fidl::new_empty!(fidl::encoding::Array<OneLayerStructWithPaddingAlign4, 2>, D),
8002 }
8003 }
8004
8005 #[inline]
8006 unsafe fn decode(
8007 &mut self,
8008 decoder: &mut fidl::encoding::Decoder<'_, D>,
8009 offset: usize,
8010 _depth: fidl::encoding::Depth,
8011 ) -> fidl::Result<()> {
8012 decoder.debug_check_bounds::<Self>(offset);
8013 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8014 let ptr = unsafe { buf_ptr.offset(0) };
8016 let padval = unsafe { (ptr as *const u32).read_unaligned() };
8017 let mask = 0xff000000u32;
8018 let maskedval = padval & mask;
8019 if maskedval != 0 {
8020 return Err(fidl::Error::NonZeroPadding {
8021 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8022 });
8023 }
8024 let ptr = unsafe { buf_ptr.offset(8) };
8025 let padval = unsafe { (ptr as *const u32).read_unaligned() };
8026 let mask = 0xff000000u32;
8027 let maskedval = padval & mask;
8028 if maskedval != 0 {
8029 return Err(fidl::Error::NonZeroPadding {
8030 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8031 });
8032 }
8033 unsafe {
8035 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
8036 }
8037 Ok(())
8038 }
8039 }
8040
8041 impl fidl::encoding::ValueTypeMarker for Bounded32NonnullableString {
8042 type Borrowed<'a> = &'a Self;
8043 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8044 value
8045 }
8046 }
8047
8048 unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableString {
8049 type Owned = Self;
8050
8051 #[inline(always)]
8052 fn inline_align(_context: fidl::encoding::Context) -> usize {
8053 8
8054 }
8055
8056 #[inline(always)]
8057 fn inline_size(_context: fidl::encoding::Context) -> usize {
8058 16
8059 }
8060 }
8061
8062 unsafe impl<D: fidl::encoding::ResourceDialect>
8063 fidl::encoding::Encode<Bounded32NonnullableString, D> for &Bounded32NonnullableString
8064 {
8065 #[inline]
8066 unsafe fn encode(
8067 self,
8068 encoder: &mut fidl::encoding::Encoder<'_, D>,
8069 offset: usize,
8070 _depth: fidl::encoding::Depth,
8071 ) -> fidl::Result<()> {
8072 encoder.debug_check_bounds::<Bounded32NonnullableString>(offset);
8073 fidl::encoding::Encode::<Bounded32NonnullableString, D>::encode(
8075 (<fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
8076 &self.s0,
8077 ),),
8078 encoder,
8079 offset,
8080 _depth,
8081 )
8082 }
8083 }
8084 unsafe impl<
8085 D: fidl::encoding::ResourceDialect,
8086 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
8087 > fidl::encoding::Encode<Bounded32NonnullableString, D> for (T0,)
8088 {
8089 #[inline]
8090 unsafe fn encode(
8091 self,
8092 encoder: &mut fidl::encoding::Encoder<'_, D>,
8093 offset: usize,
8094 depth: fidl::encoding::Depth,
8095 ) -> fidl::Result<()> {
8096 encoder.debug_check_bounds::<Bounded32NonnullableString>(offset);
8097 self.0.encode(encoder, offset + 0, depth)?;
8101 Ok(())
8102 }
8103 }
8104
8105 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8106 for Bounded32NonnullableString
8107 {
8108 #[inline(always)]
8109 fn new_empty() -> Self {
8110 Self { s0: fidl::new_empty!(fidl::encoding::BoundedString<32>, D) }
8111 }
8112
8113 #[inline]
8114 unsafe fn decode(
8115 &mut self,
8116 decoder: &mut fidl::encoding::Decoder<'_, D>,
8117 offset: usize,
8118 _depth: fidl::encoding::Depth,
8119 ) -> fidl::Result<()> {
8120 decoder.debug_check_bounds::<Self>(offset);
8121 fidl::decode!(
8123 fidl::encoding::BoundedString<32>,
8124 D,
8125 &mut self.s0,
8126 decoder,
8127 offset + 0,
8128 _depth
8129 )?;
8130 Ok(())
8131 }
8132 }
8133
8134 impl fidl::encoding::ValueTypeMarker for Bounded32NonnullableVectorOfUint32s {
8135 type Borrowed<'a> = &'a Self;
8136 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8137 value
8138 }
8139 }
8140
8141 unsafe impl fidl::encoding::TypeMarker for Bounded32NonnullableVectorOfUint32s {
8142 type Owned = Self;
8143
8144 #[inline(always)]
8145 fn inline_align(_context: fidl::encoding::Context) -> usize {
8146 8
8147 }
8148
8149 #[inline(always)]
8150 fn inline_size(_context: fidl::encoding::Context) -> usize {
8151 16
8152 }
8153 }
8154
8155 unsafe impl<D: fidl::encoding::ResourceDialect>
8156 fidl::encoding::Encode<Bounded32NonnullableVectorOfUint32s, D>
8157 for &Bounded32NonnullableVectorOfUint32s
8158 {
8159 #[inline]
8160 unsafe fn encode(
8161 self,
8162 encoder: &mut fidl::encoding::Encoder<'_, D>,
8163 offset: usize,
8164 _depth: fidl::encoding::Depth,
8165 ) -> fidl::Result<()> {
8166 encoder.debug_check_bounds::<Bounded32NonnullableVectorOfUint32s>(offset);
8167 fidl::encoding::Encode::<Bounded32NonnullableVectorOfUint32s, D>::encode(
8169 (<fidl::encoding::Vector<u32, 32> as fidl::encoding::ValueTypeMarker>::borrow(
8170 &self.vu0,
8171 ),),
8172 encoder,
8173 offset,
8174 _depth,
8175 )
8176 }
8177 }
8178 unsafe impl<
8179 D: fidl::encoding::ResourceDialect,
8180 T0: fidl::encoding::Encode<fidl::encoding::Vector<u32, 32>, D>,
8181 > fidl::encoding::Encode<Bounded32NonnullableVectorOfUint32s, D> for (T0,)
8182 {
8183 #[inline]
8184 unsafe fn encode(
8185 self,
8186 encoder: &mut fidl::encoding::Encoder<'_, D>,
8187 offset: usize,
8188 depth: fidl::encoding::Depth,
8189 ) -> fidl::Result<()> {
8190 encoder.debug_check_bounds::<Bounded32NonnullableVectorOfUint32s>(offset);
8191 self.0.encode(encoder, offset + 0, depth)?;
8195 Ok(())
8196 }
8197 }
8198
8199 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8200 for Bounded32NonnullableVectorOfUint32s
8201 {
8202 #[inline(always)]
8203 fn new_empty() -> Self {
8204 Self { vu0: fidl::new_empty!(fidl::encoding::Vector<u32, 32>, D) }
8205 }
8206
8207 #[inline]
8208 unsafe fn decode(
8209 &mut self,
8210 decoder: &mut fidl::encoding::Decoder<'_, D>,
8211 offset: usize,
8212 _depth: fidl::encoding::Depth,
8213 ) -> fidl::Result<()> {
8214 decoder.debug_check_bounds::<Self>(offset);
8215 fidl::decode!(fidl::encoding::Vector<u32, 32>, D, &mut self.vu0, decoder, offset + 0, _depth)?;
8217 Ok(())
8218 }
8219 }
8220
8221 impl fidl::encoding::ValueTypeMarker for Bounded32NullableString {
8222 type Borrowed<'a> = &'a Self;
8223 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8224 value
8225 }
8226 }
8227
8228 unsafe impl fidl::encoding::TypeMarker for Bounded32NullableString {
8229 type Owned = Self;
8230
8231 #[inline(always)]
8232 fn inline_align(_context: fidl::encoding::Context) -> usize {
8233 8
8234 }
8235
8236 #[inline(always)]
8237 fn inline_size(_context: fidl::encoding::Context) -> usize {
8238 16
8239 }
8240 }
8241
8242 unsafe impl<D: fidl::encoding::ResourceDialect>
8243 fidl::encoding::Encode<Bounded32NullableString, D> for &Bounded32NullableString
8244 {
8245 #[inline]
8246 unsafe fn encode(
8247 self,
8248 encoder: &mut fidl::encoding::Encoder<'_, D>,
8249 offset: usize,
8250 _depth: fidl::encoding::Depth,
8251 ) -> fidl::Result<()> {
8252 encoder.debug_check_bounds::<Bounded32NullableString>(offset);
8253 fidl::encoding::Encode::<Bounded32NullableString, D>::encode(
8255 (
8256 <fidl::encoding::Optional<fidl::encoding::BoundedString<32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
8257 ),
8258 encoder, offset, _depth
8259 )
8260 }
8261 }
8262 unsafe impl<
8263 D: fidl::encoding::ResourceDialect,
8264 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<32>>, D>,
8265 > fidl::encoding::Encode<Bounded32NullableString, D> for (T0,)
8266 {
8267 #[inline]
8268 unsafe fn encode(
8269 self,
8270 encoder: &mut fidl::encoding::Encoder<'_, D>,
8271 offset: usize,
8272 depth: fidl::encoding::Depth,
8273 ) -> fidl::Result<()> {
8274 encoder.debug_check_bounds::<Bounded32NullableString>(offset);
8275 self.0.encode(encoder, offset + 0, depth)?;
8279 Ok(())
8280 }
8281 }
8282
8283 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8284 for Bounded32NullableString
8285 {
8286 #[inline(always)]
8287 fn new_empty() -> Self {
8288 Self {
8289 s0: fidl::new_empty!(
8290 fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
8291 D
8292 ),
8293 }
8294 }
8295
8296 #[inline]
8297 unsafe fn decode(
8298 &mut self,
8299 decoder: &mut fidl::encoding::Decoder<'_, D>,
8300 offset: usize,
8301 _depth: fidl::encoding::Depth,
8302 ) -> fidl::Result<()> {
8303 decoder.debug_check_bounds::<Self>(offset);
8304 fidl::decode!(
8306 fidl::encoding::Optional<fidl::encoding::BoundedString<32>>,
8307 D,
8308 &mut self.s0,
8309 decoder,
8310 offset + 0,
8311 _depth
8312 )?;
8313 Ok(())
8314 }
8315 }
8316
8317 impl fidl::encoding::ValueTypeMarker for Bounded32NullableVectorOfUint32s {
8318 type Borrowed<'a> = &'a Self;
8319 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8320 value
8321 }
8322 }
8323
8324 unsafe impl fidl::encoding::TypeMarker for Bounded32NullableVectorOfUint32s {
8325 type Owned = Self;
8326
8327 #[inline(always)]
8328 fn inline_align(_context: fidl::encoding::Context) -> usize {
8329 8
8330 }
8331
8332 #[inline(always)]
8333 fn inline_size(_context: fidl::encoding::Context) -> usize {
8334 16
8335 }
8336 }
8337
8338 unsafe impl<D: fidl::encoding::ResourceDialect>
8339 fidl::encoding::Encode<Bounded32NullableVectorOfUint32s, D>
8340 for &Bounded32NullableVectorOfUint32s
8341 {
8342 #[inline]
8343 unsafe fn encode(
8344 self,
8345 encoder: &mut fidl::encoding::Encoder<'_, D>,
8346 offset: usize,
8347 _depth: fidl::encoding::Depth,
8348 ) -> fidl::Result<()> {
8349 encoder.debug_check_bounds::<Bounded32NullableVectorOfUint32s>(offset);
8350 fidl::encoding::Encode::<Bounded32NullableVectorOfUint32s, D>::encode(
8352 (
8353 <fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
8354 ),
8355 encoder, offset, _depth
8356 )
8357 }
8358 }
8359 unsafe impl<
8360 D: fidl::encoding::ResourceDialect,
8361 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D>,
8362 > fidl::encoding::Encode<Bounded32NullableVectorOfUint32s, D> for (T0,)
8363 {
8364 #[inline]
8365 unsafe fn encode(
8366 self,
8367 encoder: &mut fidl::encoding::Encoder<'_, D>,
8368 offset: usize,
8369 depth: fidl::encoding::Depth,
8370 ) -> fidl::Result<()> {
8371 encoder.debug_check_bounds::<Bounded32NullableVectorOfUint32s>(offset);
8372 self.0.encode(encoder, offset + 0, depth)?;
8376 Ok(())
8377 }
8378 }
8379
8380 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8381 for Bounded32NullableVectorOfUint32s
8382 {
8383 #[inline(always)]
8384 fn new_empty() -> Self {
8385 Self {
8386 vu0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D),
8387 }
8388 }
8389
8390 #[inline]
8391 unsafe fn decode(
8392 &mut self,
8393 decoder: &mut fidl::encoding::Decoder<'_, D>,
8394 offset: usize,
8395 _depth: fidl::encoding::Depth,
8396 ) -> fidl::Result<()> {
8397 decoder.debug_check_bounds::<Self>(offset);
8398 fidl::decode!(
8400 fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>,
8401 D,
8402 &mut self.vu0,
8403 decoder,
8404 offset + 0,
8405 _depth
8406 )?;
8407 Ok(())
8408 }
8409 }
8410
8411 impl fidl::encoding::ValueTypeMarker for CompatTable {
8412 type Borrowed<'a> = &'a Self;
8413 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8414 value
8415 }
8416 }
8417
8418 unsafe impl fidl::encoding::TypeMarker for CompatTable {
8419 type Owned = Self;
8420
8421 #[inline(always)]
8422 fn inline_align(_context: fidl::encoding::Context) -> usize {
8423 8
8424 }
8425
8426 #[inline(always)]
8427 fn inline_size(_context: fidl::encoding::Context) -> usize {
8428 32
8429 }
8430 }
8431
8432 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTable, D>
8433 for &CompatTable
8434 {
8435 #[inline]
8436 unsafe fn encode(
8437 self,
8438 encoder: &mut fidl::encoding::Encoder<'_, D>,
8439 offset: usize,
8440 _depth: fidl::encoding::Depth,
8441 ) -> fidl::Result<()> {
8442 encoder.debug_check_bounds::<CompatTable>(offset);
8443 fidl::encoding::Encode::<CompatTable, D>::encode(
8445 (
8446 <CompatTableValue as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
8447 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8448 &self.empty,
8449 ),
8450 ),
8451 encoder,
8452 offset,
8453 _depth,
8454 )
8455 }
8456 }
8457 unsafe impl<
8458 D: fidl::encoding::ResourceDialect,
8459 T0: fidl::encoding::Encode<CompatTableValue, D>,
8460 T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8461 > fidl::encoding::Encode<CompatTable, D> for (T0, T1)
8462 {
8463 #[inline]
8464 unsafe fn encode(
8465 self,
8466 encoder: &mut fidl::encoding::Encoder<'_, D>,
8467 offset: usize,
8468 depth: fidl::encoding::Depth,
8469 ) -> fidl::Result<()> {
8470 encoder.debug_check_bounds::<CompatTable>(offset);
8471 self.0.encode(encoder, offset + 0, depth)?;
8475 self.1.encode(encoder, offset + 16, depth)?;
8476 Ok(())
8477 }
8478 }
8479
8480 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTable {
8481 #[inline(always)]
8482 fn new_empty() -> Self {
8483 Self {
8484 value: fidl::new_empty!(CompatTableValue, D),
8485 empty: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8486 }
8487 }
8488
8489 #[inline]
8490 unsafe fn decode(
8491 &mut self,
8492 decoder: &mut fidl::encoding::Decoder<'_, D>,
8493 offset: usize,
8494 _depth: fidl::encoding::Depth,
8495 ) -> fidl::Result<()> {
8496 decoder.debug_check_bounds::<Self>(offset);
8497 fidl::decode!(CompatTableValue, D, &mut self.value, decoder, offset + 0, _depth)?;
8499 fidl::decode!(
8500 fidl::encoding::UnboundedString,
8501 D,
8502 &mut self.empty,
8503 decoder,
8504 offset + 16,
8505 _depth
8506 )?;
8507 Ok(())
8508 }
8509 }
8510
8511 impl fidl::encoding::ValueTypeMarker for EmptyBitsStruct {
8512 type Borrowed<'a> = &'a Self;
8513 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8514 value
8515 }
8516 }
8517
8518 unsafe impl fidl::encoding::TypeMarker for EmptyBitsStruct {
8519 type Owned = Self;
8520
8521 #[inline(always)]
8522 fn inline_align(_context: fidl::encoding::Context) -> usize {
8523 4
8524 }
8525
8526 #[inline(always)]
8527 fn inline_size(_context: fidl::encoding::Context) -> usize {
8528 4
8529 }
8530 }
8531
8532 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyBitsStruct, D>
8533 for &EmptyBitsStruct
8534 {
8535 #[inline]
8536 unsafe fn encode(
8537 self,
8538 encoder: &mut fidl::encoding::Encoder<'_, D>,
8539 offset: usize,
8540 _depth: fidl::encoding::Depth,
8541 ) -> fidl::Result<()> {
8542 encoder.debug_check_bounds::<EmptyBitsStruct>(offset);
8543 fidl::encoding::Encode::<EmptyBitsStruct, D>::encode(
8545 (<EmptyBits as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
8546 encoder,
8547 offset,
8548 _depth,
8549 )
8550 }
8551 }
8552 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyBits, D>>
8553 fidl::encoding::Encode<EmptyBitsStruct, D> for (T0,)
8554 {
8555 #[inline]
8556 unsafe fn encode(
8557 self,
8558 encoder: &mut fidl::encoding::Encoder<'_, D>,
8559 offset: usize,
8560 depth: fidl::encoding::Depth,
8561 ) -> fidl::Result<()> {
8562 encoder.debug_check_bounds::<EmptyBitsStruct>(offset);
8563 self.0.encode(encoder, offset + 0, depth)?;
8567 Ok(())
8568 }
8569 }
8570
8571 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyBitsStruct {
8572 #[inline(always)]
8573 fn new_empty() -> Self {
8574 Self { b: fidl::new_empty!(EmptyBits, D) }
8575 }
8576
8577 #[inline]
8578 unsafe fn decode(
8579 &mut self,
8580 decoder: &mut fidl::encoding::Decoder<'_, D>,
8581 offset: usize,
8582 _depth: fidl::encoding::Depth,
8583 ) -> fidl::Result<()> {
8584 decoder.debug_check_bounds::<Self>(offset);
8585 fidl::decode!(EmptyBits, D, &mut self.b, decoder, offset + 0, _depth)?;
8587 Ok(())
8588 }
8589 }
8590
8591 impl fidl::encoding::ValueTypeMarker for EmptyEnumStruct {
8592 type Borrowed<'a> = &'a Self;
8593 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8594 value
8595 }
8596 }
8597
8598 unsafe impl fidl::encoding::TypeMarker for EmptyEnumStruct {
8599 type Owned = Self;
8600
8601 #[inline(always)]
8602 fn inline_align(_context: fidl::encoding::Context) -> usize {
8603 4
8604 }
8605
8606 #[inline(always)]
8607 fn inline_size(_context: fidl::encoding::Context) -> usize {
8608 4
8609 }
8610 }
8611
8612 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyEnumStruct, D>
8613 for &EmptyEnumStruct
8614 {
8615 #[inline]
8616 unsafe fn encode(
8617 self,
8618 encoder: &mut fidl::encoding::Encoder<'_, D>,
8619 offset: usize,
8620 _depth: fidl::encoding::Depth,
8621 ) -> fidl::Result<()> {
8622 encoder.debug_check_bounds::<EmptyEnumStruct>(offset);
8623 fidl::encoding::Encode::<EmptyEnumStruct, D>::encode(
8625 (<EmptyEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
8626 encoder,
8627 offset,
8628 _depth,
8629 )
8630 }
8631 }
8632 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyEnum, D>>
8633 fidl::encoding::Encode<EmptyEnumStruct, D> for (T0,)
8634 {
8635 #[inline]
8636 unsafe fn encode(
8637 self,
8638 encoder: &mut fidl::encoding::Encoder<'_, D>,
8639 offset: usize,
8640 depth: fidl::encoding::Depth,
8641 ) -> fidl::Result<()> {
8642 encoder.debug_check_bounds::<EmptyEnumStruct>(offset);
8643 self.0.encode(encoder, offset + 0, depth)?;
8647 Ok(())
8648 }
8649 }
8650
8651 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyEnumStruct {
8652 #[inline(always)]
8653 fn new_empty() -> Self {
8654 Self { e: fidl::new_empty!(EmptyEnum, D) }
8655 }
8656
8657 #[inline]
8658 unsafe fn decode(
8659 &mut self,
8660 decoder: &mut fidl::encoding::Decoder<'_, D>,
8661 offset: usize,
8662 _depth: fidl::encoding::Depth,
8663 ) -> fidl::Result<()> {
8664 decoder.debug_check_bounds::<Self>(offset);
8665 fidl::decode!(EmptyEnum, D, &mut self.e, decoder, offset + 0, _depth)?;
8667 Ok(())
8668 }
8669 }
8670
8671 impl fidl::encoding::ValueTypeMarker for EmptyStruct {
8672 type Borrowed<'a> = &'a Self;
8673 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8674 value
8675 }
8676 }
8677
8678 unsafe impl fidl::encoding::TypeMarker for EmptyStruct {
8679 type Owned = Self;
8680
8681 #[inline(always)]
8682 fn inline_align(_context: fidl::encoding::Context) -> usize {
8683 1
8684 }
8685
8686 #[inline(always)]
8687 fn inline_size(_context: fidl::encoding::Context) -> usize {
8688 1
8689 }
8690 }
8691
8692 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStruct, D>
8693 for &EmptyStruct
8694 {
8695 #[inline]
8696 unsafe fn encode(
8697 self,
8698 encoder: &mut fidl::encoding::Encoder<'_, D>,
8699 offset: usize,
8700 _depth: fidl::encoding::Depth,
8701 ) -> fidl::Result<()> {
8702 encoder.debug_check_bounds::<EmptyStruct>(offset);
8703 encoder.write_num(0u8, offset);
8704 Ok(())
8705 }
8706 }
8707
8708 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStruct {
8709 #[inline(always)]
8710 fn new_empty() -> Self {
8711 Self
8712 }
8713
8714 #[inline]
8715 unsafe fn decode(
8716 &mut self,
8717 decoder: &mut fidl::encoding::Decoder<'_, D>,
8718 offset: usize,
8719 _depth: fidl::encoding::Depth,
8720 ) -> fidl::Result<()> {
8721 decoder.debug_check_bounds::<Self>(offset);
8722 match decoder.read_num::<u8>(offset) {
8723 0 => Ok(()),
8724 _ => Err(fidl::Error::Invalid),
8725 }
8726 }
8727 }
8728
8729 impl fidl::encoding::ValueTypeMarker for EmptyStructSandwich {
8730 type Borrowed<'a> = &'a Self;
8731 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8732 value
8733 }
8734 }
8735
8736 unsafe impl fidl::encoding::TypeMarker for EmptyStructSandwich {
8737 type Owned = Self;
8738
8739 #[inline(always)]
8740 fn inline_align(_context: fidl::encoding::Context) -> usize {
8741 8
8742 }
8743
8744 #[inline(always)]
8745 fn inline_size(_context: fidl::encoding::Context) -> usize {
8746 40
8747 }
8748 }
8749
8750 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStructSandwich, D>
8751 for &EmptyStructSandwich
8752 {
8753 #[inline]
8754 unsafe fn encode(
8755 self,
8756 encoder: &mut fidl::encoding::Encoder<'_, D>,
8757 offset: usize,
8758 _depth: fidl::encoding::Depth,
8759 ) -> fidl::Result<()> {
8760 encoder.debug_check_bounds::<EmptyStructSandwich>(offset);
8761 fidl::encoding::Encode::<EmptyStructSandwich, D>::encode(
8763 (
8764 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8765 &self.before,
8766 ),
8767 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.es),
8768 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
8769 &self.after,
8770 ),
8771 ),
8772 encoder,
8773 offset,
8774 _depth,
8775 )
8776 }
8777 }
8778 unsafe impl<
8779 D: fidl::encoding::ResourceDialect,
8780 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8781 T1: fidl::encoding::Encode<EmptyStruct, D>,
8782 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
8783 > fidl::encoding::Encode<EmptyStructSandwich, D> for (T0, T1, T2)
8784 {
8785 #[inline]
8786 unsafe fn encode(
8787 self,
8788 encoder: &mut fidl::encoding::Encoder<'_, D>,
8789 offset: usize,
8790 depth: fidl::encoding::Depth,
8791 ) -> fidl::Result<()> {
8792 encoder.debug_check_bounds::<EmptyStructSandwich>(offset);
8793 unsafe {
8796 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8797 (ptr as *mut u64).write_unaligned(0);
8798 }
8799 self.0.encode(encoder, offset + 0, depth)?;
8801 self.1.encode(encoder, offset + 16, depth)?;
8802 self.2.encode(encoder, offset + 24, depth)?;
8803 Ok(())
8804 }
8805 }
8806
8807 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStructSandwich {
8808 #[inline(always)]
8809 fn new_empty() -> Self {
8810 Self {
8811 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8812 es: fidl::new_empty!(EmptyStruct, D),
8813 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
8814 }
8815 }
8816
8817 #[inline]
8818 unsafe fn decode(
8819 &mut self,
8820 decoder: &mut fidl::encoding::Decoder<'_, D>,
8821 offset: usize,
8822 _depth: fidl::encoding::Depth,
8823 ) -> fidl::Result<()> {
8824 decoder.debug_check_bounds::<Self>(offset);
8825 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
8827 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8828 let mask = 0xffffffffffffff00u64;
8829 let maskedval = padval & mask;
8830 if maskedval != 0 {
8831 return Err(fidl::Error::NonZeroPadding {
8832 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
8833 });
8834 }
8835 fidl::decode!(
8836 fidl::encoding::UnboundedString,
8837 D,
8838 &mut self.before,
8839 decoder,
8840 offset + 0,
8841 _depth
8842 )?;
8843 fidl::decode!(EmptyStruct, D, &mut self.es, decoder, offset + 16, _depth)?;
8844 fidl::decode!(
8845 fidl::encoding::UnboundedString,
8846 D,
8847 &mut self.after,
8848 decoder,
8849 offset + 24,
8850 _depth
8851 )?;
8852 Ok(())
8853 }
8854 }
8855
8856 impl fidl::encoding::ValueTypeMarker for EmptyStructUnionStruct {
8857 type Borrowed<'a> = &'a Self;
8858 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8859 value
8860 }
8861 }
8862
8863 unsafe impl fidl::encoding::TypeMarker for EmptyStructUnionStruct {
8864 type Owned = Self;
8865
8866 #[inline(always)]
8867 fn inline_align(_context: fidl::encoding::Context) -> usize {
8868 8
8869 }
8870
8871 #[inline(always)]
8872 fn inline_size(_context: fidl::encoding::Context) -> usize {
8873 16
8874 }
8875 }
8876
8877 unsafe impl<D: fidl::encoding::ResourceDialect>
8878 fidl::encoding::Encode<EmptyStructUnionStruct, D> for &EmptyStructUnionStruct
8879 {
8880 #[inline]
8881 unsafe fn encode(
8882 self,
8883 encoder: &mut fidl::encoding::Encoder<'_, D>,
8884 offset: usize,
8885 _depth: fidl::encoding::Depth,
8886 ) -> fidl::Result<()> {
8887 encoder.debug_check_bounds::<EmptyStructUnionStruct>(offset);
8888 fidl::encoding::Encode::<EmptyStructUnionStruct, D>::encode(
8890 (<EmptyStructUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
8891 encoder,
8892 offset,
8893 _depth,
8894 )
8895 }
8896 }
8897 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyStructUnion, D>>
8898 fidl::encoding::Encode<EmptyStructUnionStruct, D> for (T0,)
8899 {
8900 #[inline]
8901 unsafe fn encode(
8902 self,
8903 encoder: &mut fidl::encoding::Encoder<'_, D>,
8904 offset: usize,
8905 depth: fidl::encoding::Depth,
8906 ) -> fidl::Result<()> {
8907 encoder.debug_check_bounds::<EmptyStructUnionStruct>(offset);
8908 self.0.encode(encoder, offset + 0, depth)?;
8912 Ok(())
8913 }
8914 }
8915
8916 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8917 for EmptyStructUnionStruct
8918 {
8919 #[inline(always)]
8920 fn new_empty() -> Self {
8921 Self { u: fidl::new_empty!(EmptyStructUnion, D) }
8922 }
8923
8924 #[inline]
8925 unsafe fn decode(
8926 &mut self,
8927 decoder: &mut fidl::encoding::Decoder<'_, D>,
8928 offset: usize,
8929 _depth: fidl::encoding::Depth,
8930 ) -> fidl::Result<()> {
8931 decoder.debug_check_bounds::<Self>(offset);
8932 fidl::decode!(EmptyStructUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
8934 Ok(())
8935 }
8936 }
8937
8938 impl fidl::encoding::ValueTypeMarker for EmptyStructsInArrayInStruct {
8939 type Borrowed<'a> = &'a Self;
8940 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8941 value
8942 }
8943 }
8944
8945 unsafe impl fidl::encoding::TypeMarker for EmptyStructsInArrayInStruct {
8946 type Owned = Self;
8947
8948 #[inline(always)]
8949 fn inline_align(_context: fidl::encoding::Context) -> usize {
8950 1
8951 }
8952
8953 #[inline(always)]
8954 fn inline_size(_context: fidl::encoding::Context) -> usize {
8955 4
8956 }
8957 }
8958
8959 unsafe impl<D: fidl::encoding::ResourceDialect>
8960 fidl::encoding::Encode<EmptyStructsInArrayInStruct, D> for &EmptyStructsInArrayInStruct
8961 {
8962 #[inline]
8963 unsafe fn encode(
8964 self,
8965 encoder: &mut fidl::encoding::Encoder<'_, D>,
8966 offset: usize,
8967 _depth: fidl::encoding::Depth,
8968 ) -> fidl::Result<()> {
8969 encoder.debug_check_bounds::<EmptyStructsInArrayInStruct>(offset);
8970 fidl::encoding::Encode::<EmptyStructsInArrayInStruct, D>::encode(
8972 (
8973 <fidl::encoding::Array<EmptyStruct, 4> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
8974 ),
8975 encoder, offset, _depth
8976 )
8977 }
8978 }
8979 unsafe impl<
8980 D: fidl::encoding::ResourceDialect,
8981 T0: fidl::encoding::Encode<fidl::encoding::Array<EmptyStruct, 4>, D>,
8982 > fidl::encoding::Encode<EmptyStructsInArrayInStruct, D> for (T0,)
8983 {
8984 #[inline]
8985 unsafe fn encode(
8986 self,
8987 encoder: &mut fidl::encoding::Encoder<'_, D>,
8988 offset: usize,
8989 depth: fidl::encoding::Depth,
8990 ) -> fidl::Result<()> {
8991 encoder.debug_check_bounds::<EmptyStructsInArrayInStruct>(offset);
8992 self.0.encode(encoder, offset + 0, depth)?;
8996 Ok(())
8997 }
8998 }
8999
9000 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9001 for EmptyStructsInArrayInStruct
9002 {
9003 #[inline(always)]
9004 fn new_empty() -> Self {
9005 Self { v: fidl::new_empty!(fidl::encoding::Array<EmptyStruct, 4>, D) }
9006 }
9007
9008 #[inline]
9009 unsafe fn decode(
9010 &mut self,
9011 decoder: &mut fidl::encoding::Decoder<'_, D>,
9012 offset: usize,
9013 _depth: fidl::encoding::Depth,
9014 ) -> fidl::Result<()> {
9015 decoder.debug_check_bounds::<Self>(offset);
9016 fidl::decode!(fidl::encoding::Array<EmptyStruct, 4>, D, &mut self.v, decoder, offset + 0, _depth)?;
9018 Ok(())
9019 }
9020 }
9021
9022 impl fidl::encoding::ValueTypeMarker for EmptyStructsInVectorInStruct {
9023 type Borrowed<'a> = &'a Self;
9024 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9025 value
9026 }
9027 }
9028
9029 unsafe impl fidl::encoding::TypeMarker for EmptyStructsInVectorInStruct {
9030 type Owned = Self;
9031
9032 #[inline(always)]
9033 fn inline_align(_context: fidl::encoding::Context) -> usize {
9034 8
9035 }
9036
9037 #[inline(always)]
9038 fn inline_size(_context: fidl::encoding::Context) -> usize {
9039 16
9040 }
9041 }
9042
9043 unsafe impl<D: fidl::encoding::ResourceDialect>
9044 fidl::encoding::Encode<EmptyStructsInVectorInStruct, D> for &EmptyStructsInVectorInStruct
9045 {
9046 #[inline]
9047 unsafe fn encode(
9048 self,
9049 encoder: &mut fidl::encoding::Encoder<'_, D>,
9050 offset: usize,
9051 _depth: fidl::encoding::Depth,
9052 ) -> fidl::Result<()> {
9053 encoder.debug_check_bounds::<EmptyStructsInVectorInStruct>(offset);
9054 fidl::encoding::Encode::<EmptyStructsInVectorInStruct, D>::encode(
9056 (
9057 <fidl::encoding::UnboundedVector<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
9058 ),
9059 encoder, offset, _depth
9060 )
9061 }
9062 }
9063 unsafe impl<
9064 D: fidl::encoding::ResourceDialect,
9065 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<EmptyStruct>, D>,
9066 > fidl::encoding::Encode<EmptyStructsInVectorInStruct, D> for (T0,)
9067 {
9068 #[inline]
9069 unsafe fn encode(
9070 self,
9071 encoder: &mut fidl::encoding::Encoder<'_, D>,
9072 offset: usize,
9073 depth: fidl::encoding::Depth,
9074 ) -> fidl::Result<()> {
9075 encoder.debug_check_bounds::<EmptyStructsInVectorInStruct>(offset);
9076 self.0.encode(encoder, offset + 0, depth)?;
9080 Ok(())
9081 }
9082 }
9083
9084 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9085 for EmptyStructsInVectorInStruct
9086 {
9087 #[inline(always)]
9088 fn new_empty() -> Self {
9089 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<EmptyStruct>, D) }
9090 }
9091
9092 #[inline]
9093 unsafe fn decode(
9094 &mut self,
9095 decoder: &mut fidl::encoding::Decoder<'_, D>,
9096 offset: usize,
9097 _depth: fidl::encoding::Depth,
9098 ) -> fidl::Result<()> {
9099 decoder.debug_check_bounds::<Self>(offset);
9100 fidl::decode!(
9102 fidl::encoding::UnboundedVector<EmptyStruct>,
9103 D,
9104 &mut self.v,
9105 decoder,
9106 offset + 0,
9107 _depth
9108 )?;
9109 Ok(())
9110 }
9111 }
9112
9113 impl fidl::encoding::ValueTypeMarker for FidlvizStruct1 {
9114 type Borrowed<'a> = &'a Self;
9115 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9116 value
9117 }
9118 }
9119
9120 unsafe impl fidl::encoding::TypeMarker for FidlvizStruct1 {
9121 type Owned = Self;
9122
9123 #[inline(always)]
9124 fn inline_align(_context: fidl::encoding::Context) -> usize {
9125 1
9126 }
9127
9128 #[inline(always)]
9129 fn inline_size(_context: fidl::encoding::Context) -> usize {
9130 1
9131 }
9132 }
9133
9134 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizStruct1, D>
9135 for &FidlvizStruct1
9136 {
9137 #[inline]
9138 unsafe fn encode(
9139 self,
9140 encoder: &mut fidl::encoding::Encoder<'_, D>,
9141 offset: usize,
9142 _depth: fidl::encoding::Depth,
9143 ) -> fidl::Result<()> {
9144 encoder.debug_check_bounds::<FidlvizStruct1>(offset);
9145 encoder.write_num(0u8, offset);
9146 Ok(())
9147 }
9148 }
9149
9150 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizStruct1 {
9151 #[inline(always)]
9152 fn new_empty() -> Self {
9153 Self
9154 }
9155
9156 #[inline]
9157 unsafe fn decode(
9158 &mut self,
9159 decoder: &mut fidl::encoding::Decoder<'_, D>,
9160 offset: usize,
9161 _depth: fidl::encoding::Depth,
9162 ) -> fidl::Result<()> {
9163 decoder.debug_check_bounds::<Self>(offset);
9164 match decoder.read_num::<u8>(offset) {
9165 0 => Ok(()),
9166 _ => Err(fidl::Error::Invalid),
9167 }
9168 }
9169 }
9170
9171 impl fidl::encoding::ValueTypeMarker for FidlvizStruct2 {
9172 type Borrowed<'a> = &'a Self;
9173 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9174 value
9175 }
9176 }
9177
9178 unsafe impl fidl::encoding::TypeMarker for FidlvizStruct2 {
9179 type Owned = Self;
9180
9181 #[inline(always)]
9182 fn inline_align(_context: fidl::encoding::Context) -> usize {
9183 8
9184 }
9185
9186 #[inline(always)]
9187 fn inline_size(_context: fidl::encoding::Context) -> usize {
9188 8
9189 }
9190 #[inline(always)]
9191 fn encode_is_copy() -> bool {
9192 true
9193 }
9194
9195 #[inline(always)]
9196 fn decode_is_copy() -> bool {
9197 true
9198 }
9199 }
9200
9201 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizStruct2, D>
9202 for &FidlvizStruct2
9203 {
9204 #[inline]
9205 unsafe fn encode(
9206 self,
9207 encoder: &mut fidl::encoding::Encoder<'_, D>,
9208 offset: usize,
9209 _depth: fidl::encoding::Depth,
9210 ) -> fidl::Result<()> {
9211 encoder.debug_check_bounds::<FidlvizStruct2>(offset);
9212 unsafe {
9213 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9215 (buf_ptr as *mut FidlvizStruct2)
9216 .write_unaligned((self as *const FidlvizStruct2).read());
9217 }
9220 Ok(())
9221 }
9222 }
9223 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
9224 fidl::encoding::Encode<FidlvizStruct2, D> for (T0,)
9225 {
9226 #[inline]
9227 unsafe fn encode(
9228 self,
9229 encoder: &mut fidl::encoding::Encoder<'_, D>,
9230 offset: usize,
9231 depth: fidl::encoding::Depth,
9232 ) -> fidl::Result<()> {
9233 encoder.debug_check_bounds::<FidlvizStruct2>(offset);
9234 self.0.encode(encoder, offset + 0, depth)?;
9238 Ok(())
9239 }
9240 }
9241
9242 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizStruct2 {
9243 #[inline(always)]
9244 fn new_empty() -> Self {
9245 Self { x: fidl::new_empty!(u64, D) }
9246 }
9247
9248 #[inline]
9249 unsafe fn decode(
9250 &mut self,
9251 decoder: &mut fidl::encoding::Decoder<'_, D>,
9252 offset: usize,
9253 _depth: fidl::encoding::Depth,
9254 ) -> fidl::Result<()> {
9255 decoder.debug_check_bounds::<Self>(offset);
9256 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9257 unsafe {
9260 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9261 }
9262 Ok(())
9263 }
9264 }
9265
9266 impl fidl::encoding::ValueTypeMarker for FileGetAttrResponse {
9267 type Borrowed<'a> = &'a Self;
9268 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9269 value
9270 }
9271 }
9272
9273 unsafe impl fidl::encoding::TypeMarker for FileGetAttrResponse {
9274 type Owned = Self;
9275
9276 #[inline(always)]
9277 fn inline_align(_context: fidl::encoding::Context) -> usize {
9278 8
9279 }
9280
9281 #[inline(always)]
9282 fn inline_size(_context: fidl::encoding::Context) -> usize {
9283 64
9284 }
9285 }
9286
9287 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FileGetAttrResponse, D>
9288 for &FileGetAttrResponse
9289 {
9290 #[inline]
9291 unsafe fn encode(
9292 self,
9293 encoder: &mut fidl::encoding::Encoder<'_, D>,
9294 offset: usize,
9295 _depth: fidl::encoding::Depth,
9296 ) -> fidl::Result<()> {
9297 encoder.debug_check_bounds::<FileGetAttrResponse>(offset);
9298 unsafe {
9299 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9301 (buf_ptr as *mut FileGetAttrResponse)
9302 .write_unaligned((self as *const FileGetAttrResponse).read());
9303 let padding_ptr = buf_ptr.offset(0) as *mut u64;
9306 let padding_mask = 0xffffffff00000000u64;
9307 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9308 let padding_ptr = buf_ptr.offset(8) as *mut u64;
9309 let padding_mask = 0xffffffff00000000u64;
9310 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9311 }
9312 Ok(())
9313 }
9314 }
9315 unsafe impl<
9316 D: fidl::encoding::ResourceDialect,
9317 T0: fidl::encoding::Encode<i32, D>,
9318 T1: fidl::encoding::Encode<NodeAttributes, D>,
9319 > fidl::encoding::Encode<FileGetAttrResponse, D> for (T0, T1)
9320 {
9321 #[inline]
9322 unsafe fn encode(
9323 self,
9324 encoder: &mut fidl::encoding::Encoder<'_, D>,
9325 offset: usize,
9326 depth: fidl::encoding::Depth,
9327 ) -> fidl::Result<()> {
9328 encoder.debug_check_bounds::<FileGetAttrResponse>(offset);
9329 unsafe {
9332 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9333 (ptr as *mut u64).write_unaligned(0);
9334 }
9335 self.0.encode(encoder, offset + 0, depth)?;
9337 self.1.encode(encoder, offset + 8, depth)?;
9338 Ok(())
9339 }
9340 }
9341
9342 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FileGetAttrResponse {
9343 #[inline(always)]
9344 fn new_empty() -> Self {
9345 Self { s: fidl::new_empty!(i32, D), attributes: fidl::new_empty!(NodeAttributes, D) }
9346 }
9347
9348 #[inline]
9349 unsafe fn decode(
9350 &mut self,
9351 decoder: &mut fidl::encoding::Decoder<'_, D>,
9352 offset: usize,
9353 _depth: fidl::encoding::Depth,
9354 ) -> fidl::Result<()> {
9355 decoder.debug_check_bounds::<Self>(offset);
9356 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9357 let ptr = unsafe { buf_ptr.offset(0) };
9359 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9360 let mask = 0xffffffff00000000u64;
9361 let maskedval = padval & mask;
9362 if maskedval != 0 {
9363 return Err(fidl::Error::NonZeroPadding {
9364 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9365 });
9366 }
9367 let ptr = unsafe { buf_ptr.offset(8) };
9368 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9369 let mask = 0xffffffff00000000u64;
9370 let maskedval = padval & mask;
9371 if maskedval != 0 {
9372 return Err(fidl::Error::NonZeroPadding {
9373 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9374 });
9375 }
9376 unsafe {
9378 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 64);
9379 }
9380 Ok(())
9381 }
9382 }
9383
9384 impl fidl::encoding::ValueTypeMarker for FiveByte {
9385 type Borrowed<'a> = &'a Self;
9386 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9387 value
9388 }
9389 }
9390
9391 unsafe impl fidl::encoding::TypeMarker for FiveByte {
9392 type Owned = Self;
9393
9394 #[inline(always)]
9395 fn inline_align(_context: fidl::encoding::Context) -> usize {
9396 4
9397 }
9398
9399 #[inline(always)]
9400 fn inline_size(_context: fidl::encoding::Context) -> usize {
9401 8
9402 }
9403 }
9404
9405 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByte, D> for &FiveByte {
9406 #[inline]
9407 unsafe fn encode(
9408 self,
9409 encoder: &mut fidl::encoding::Encoder<'_, D>,
9410 offset: usize,
9411 _depth: fidl::encoding::Depth,
9412 ) -> fidl::Result<()> {
9413 encoder.debug_check_bounds::<FiveByte>(offset);
9414 unsafe {
9415 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9417 (buf_ptr as *mut FiveByte).write_unaligned((self as *const FiveByte).read());
9418 let padding_ptr = buf_ptr.offset(4) as *mut u32;
9421 let padding_mask = 0xffffff00u32;
9422 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9423 }
9424 Ok(())
9425 }
9426 }
9427 unsafe impl<
9428 D: fidl::encoding::ResourceDialect,
9429 T0: fidl::encoding::Encode<u32, D>,
9430 T1: fidl::encoding::Encode<u8, D>,
9431 > fidl::encoding::Encode<FiveByte, D> for (T0, T1)
9432 {
9433 #[inline]
9434 unsafe fn encode(
9435 self,
9436 encoder: &mut fidl::encoding::Encoder<'_, D>,
9437 offset: usize,
9438 depth: fidl::encoding::Depth,
9439 ) -> fidl::Result<()> {
9440 encoder.debug_check_bounds::<FiveByte>(offset);
9441 unsafe {
9444 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
9445 (ptr as *mut u32).write_unaligned(0);
9446 }
9447 self.0.encode(encoder, offset + 0, depth)?;
9449 self.1.encode(encoder, offset + 4, depth)?;
9450 Ok(())
9451 }
9452 }
9453
9454 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByte {
9455 #[inline(always)]
9456 fn new_empty() -> Self {
9457 Self { elem1: fidl::new_empty!(u32, D), elem2: fidl::new_empty!(u8, D) }
9458 }
9459
9460 #[inline]
9461 unsafe fn decode(
9462 &mut self,
9463 decoder: &mut fidl::encoding::Decoder<'_, D>,
9464 offset: usize,
9465 _depth: fidl::encoding::Depth,
9466 ) -> fidl::Result<()> {
9467 decoder.debug_check_bounds::<Self>(offset);
9468 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9469 let ptr = unsafe { buf_ptr.offset(4) };
9471 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9472 let mask = 0xffffff00u32;
9473 let maskedval = padval & mask;
9474 if maskedval != 0 {
9475 return Err(fidl::Error::NonZeroPadding {
9476 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9477 });
9478 }
9479 unsafe {
9481 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9482 }
9483 Ok(())
9484 }
9485 }
9486
9487 impl fidl::encoding::ValueTypeMarker for FiveByteInArray {
9488 type Borrowed<'a> = &'a Self;
9489 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9490 value
9491 }
9492 }
9493
9494 unsafe impl fidl::encoding::TypeMarker for FiveByteInArray {
9495 type Owned = Self;
9496
9497 #[inline(always)]
9498 fn inline_align(_context: fidl::encoding::Context) -> usize {
9499 4
9500 }
9501
9502 #[inline(always)]
9503 fn inline_size(_context: fidl::encoding::Context) -> usize {
9504 24
9505 }
9506 }
9507
9508 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInArray, D>
9509 for &FiveByteInArray
9510 {
9511 #[inline]
9512 unsafe fn encode(
9513 self,
9514 encoder: &mut fidl::encoding::Encoder<'_, D>,
9515 offset: usize,
9516 _depth: fidl::encoding::Depth,
9517 ) -> fidl::Result<()> {
9518 encoder.debug_check_bounds::<FiveByteInArray>(offset);
9519 unsafe {
9520 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9522 (buf_ptr as *mut FiveByteInArray)
9523 .write_unaligned((self as *const FiveByteInArray).read());
9524 let padding_ptr = buf_ptr.offset(4) as *mut u32;
9527 let padding_mask = 0xffffff00u32;
9528 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9529 let padding_ptr = buf_ptr.offset(12) as *mut u32;
9530 let padding_mask = 0xffffff00u32;
9531 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9532 let padding_ptr = buf_ptr.offset(20) as *mut u32;
9533 let padding_mask = 0xffffff00u32;
9534 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9535 }
9536 Ok(())
9537 }
9538 }
9539 unsafe impl<
9540 D: fidl::encoding::ResourceDialect,
9541 T0: fidl::encoding::Encode<fidl::encoding::Array<FiveByte, 3>, D>,
9542 > fidl::encoding::Encode<FiveByteInArray, D> for (T0,)
9543 {
9544 #[inline]
9545 unsafe fn encode(
9546 self,
9547 encoder: &mut fidl::encoding::Encoder<'_, D>,
9548 offset: usize,
9549 depth: fidl::encoding::Depth,
9550 ) -> fidl::Result<()> {
9551 encoder.debug_check_bounds::<FiveByteInArray>(offset);
9552 self.0.encode(encoder, offset + 0, depth)?;
9556 Ok(())
9557 }
9558 }
9559
9560 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInArray {
9561 #[inline(always)]
9562 fn new_empty() -> Self {
9563 Self { elems: fidl::new_empty!(fidl::encoding::Array<FiveByte, 3>, D) }
9564 }
9565
9566 #[inline]
9567 unsafe fn decode(
9568 &mut self,
9569 decoder: &mut fidl::encoding::Decoder<'_, D>,
9570 offset: usize,
9571 _depth: fidl::encoding::Depth,
9572 ) -> fidl::Result<()> {
9573 decoder.debug_check_bounds::<Self>(offset);
9574 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9575 let ptr = unsafe { buf_ptr.offset(4) };
9577 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9578 let mask = 0xffffff00u32;
9579 let maskedval = padval & mask;
9580 if maskedval != 0 {
9581 return Err(fidl::Error::NonZeroPadding {
9582 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9583 });
9584 }
9585 let ptr = unsafe { buf_ptr.offset(12) };
9586 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9587 let mask = 0xffffff00u32;
9588 let maskedval = padval & mask;
9589 if maskedval != 0 {
9590 return Err(fidl::Error::NonZeroPadding {
9591 padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
9592 });
9593 }
9594 let ptr = unsafe { buf_ptr.offset(20) };
9595 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9596 let mask = 0xffffff00u32;
9597 let maskedval = padval & mask;
9598 if maskedval != 0 {
9599 return Err(fidl::Error::NonZeroPadding {
9600 padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
9601 });
9602 }
9603 unsafe {
9605 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
9606 }
9607 Ok(())
9608 }
9609 }
9610
9611 impl fidl::encoding::ValueTypeMarker for FiveByteInStruct {
9612 type Borrowed<'a> = &'a Self;
9613 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9614 value
9615 }
9616 }
9617
9618 unsafe impl fidl::encoding::TypeMarker for FiveByteInStruct {
9619 type Owned = Self;
9620
9621 #[inline(always)]
9622 fn inline_align(_context: fidl::encoding::Context) -> usize {
9623 4
9624 }
9625
9626 #[inline(always)]
9627 fn inline_size(_context: fidl::encoding::Context) -> usize {
9628 24
9629 }
9630 }
9631
9632 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInStruct, D>
9633 for &FiveByteInStruct
9634 {
9635 #[inline]
9636 unsafe fn encode(
9637 self,
9638 encoder: &mut fidl::encoding::Encoder<'_, D>,
9639 offset: usize,
9640 _depth: fidl::encoding::Depth,
9641 ) -> fidl::Result<()> {
9642 encoder.debug_check_bounds::<FiveByteInStruct>(offset);
9643 unsafe {
9644 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9646 (buf_ptr as *mut FiveByteInStruct)
9647 .write_unaligned((self as *const FiveByteInStruct).read());
9648 let padding_ptr = buf_ptr.offset(4) as *mut u32;
9651 let padding_mask = 0xffffff00u32;
9652 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9653 let padding_ptr = buf_ptr.offset(12) as *mut u32;
9654 let padding_mask = 0xffffff00u32;
9655 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9656 let padding_ptr = buf_ptr.offset(20) as *mut u32;
9657 let padding_mask = 0xffffff00u32;
9658 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9659 }
9660 Ok(())
9661 }
9662 }
9663 unsafe impl<
9664 D: fidl::encoding::ResourceDialect,
9665 T0: fidl::encoding::Encode<FiveByte, D>,
9666 T1: fidl::encoding::Encode<FiveByte, D>,
9667 T2: fidl::encoding::Encode<FiveByte, D>,
9668 > fidl::encoding::Encode<FiveByteInStruct, D> for (T0, T1, T2)
9669 {
9670 #[inline]
9671 unsafe fn encode(
9672 self,
9673 encoder: &mut fidl::encoding::Encoder<'_, D>,
9674 offset: usize,
9675 depth: fidl::encoding::Depth,
9676 ) -> fidl::Result<()> {
9677 encoder.debug_check_bounds::<FiveByteInStruct>(offset);
9678 self.0.encode(encoder, offset + 0, depth)?;
9682 self.1.encode(encoder, offset + 8, depth)?;
9683 self.2.encode(encoder, offset + 16, depth)?;
9684 Ok(())
9685 }
9686 }
9687
9688 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInStruct {
9689 #[inline(always)]
9690 fn new_empty() -> Self {
9691 Self {
9692 elem1: fidl::new_empty!(FiveByte, D),
9693 elem2: fidl::new_empty!(FiveByte, D),
9694 elem3: fidl::new_empty!(FiveByte, D),
9695 }
9696 }
9697
9698 #[inline]
9699 unsafe fn decode(
9700 &mut self,
9701 decoder: &mut fidl::encoding::Decoder<'_, D>,
9702 offset: usize,
9703 _depth: fidl::encoding::Depth,
9704 ) -> fidl::Result<()> {
9705 decoder.debug_check_bounds::<Self>(offset);
9706 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9707 let ptr = unsafe { buf_ptr.offset(4) };
9709 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9710 let mask = 0xffffff00u32;
9711 let maskedval = padval & mask;
9712 if maskedval != 0 {
9713 return Err(fidl::Error::NonZeroPadding {
9714 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
9715 });
9716 }
9717 let ptr = unsafe { buf_ptr.offset(12) };
9718 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9719 let mask = 0xffffff00u32;
9720 let maskedval = padval & mask;
9721 if maskedval != 0 {
9722 return Err(fidl::Error::NonZeroPadding {
9723 padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
9724 });
9725 }
9726 let ptr = unsafe { buf_ptr.offset(20) };
9727 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9728 let mask = 0xffffff00u32;
9729 let maskedval = padval & mask;
9730 if maskedval != 0 {
9731 return Err(fidl::Error::NonZeroPadding {
9732 padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
9733 });
9734 }
9735 unsafe {
9737 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
9738 }
9739 Ok(())
9740 }
9741 }
9742
9743 impl fidl::encoding::ValueTypeMarker for FiveByteInVector {
9744 type Borrowed<'a> = &'a Self;
9745 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9746 value
9747 }
9748 }
9749
9750 unsafe impl fidl::encoding::TypeMarker for FiveByteInVector {
9751 type Owned = Self;
9752
9753 #[inline(always)]
9754 fn inline_align(_context: fidl::encoding::Context) -> usize {
9755 8
9756 }
9757
9758 #[inline(always)]
9759 fn inline_size(_context: fidl::encoding::Context) -> usize {
9760 16
9761 }
9762 }
9763
9764 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FiveByteInVector, D>
9765 for &FiveByteInVector
9766 {
9767 #[inline]
9768 unsafe fn encode(
9769 self,
9770 encoder: &mut fidl::encoding::Encoder<'_, D>,
9771 offset: usize,
9772 _depth: fidl::encoding::Depth,
9773 ) -> fidl::Result<()> {
9774 encoder.debug_check_bounds::<FiveByteInVector>(offset);
9775 fidl::encoding::Encode::<FiveByteInVector, D>::encode(
9777 (
9778 <fidl::encoding::UnboundedVector<FiveByte> as fidl::encoding::ValueTypeMarker>::borrow(&self.elems),
9779 ),
9780 encoder, offset, _depth
9781 )
9782 }
9783 }
9784 unsafe impl<
9785 D: fidl::encoding::ResourceDialect,
9786 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<FiveByte>, D>,
9787 > fidl::encoding::Encode<FiveByteInVector, D> for (T0,)
9788 {
9789 #[inline]
9790 unsafe fn encode(
9791 self,
9792 encoder: &mut fidl::encoding::Encoder<'_, D>,
9793 offset: usize,
9794 depth: fidl::encoding::Depth,
9795 ) -> fidl::Result<()> {
9796 encoder.debug_check_bounds::<FiveByteInVector>(offset);
9797 self.0.encode(encoder, offset + 0, depth)?;
9801 Ok(())
9802 }
9803 }
9804
9805 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FiveByteInVector {
9806 #[inline(always)]
9807 fn new_empty() -> Self {
9808 Self { elems: fidl::new_empty!(fidl::encoding::UnboundedVector<FiveByte>, D) }
9809 }
9810
9811 #[inline]
9812 unsafe fn decode(
9813 &mut self,
9814 decoder: &mut fidl::encoding::Decoder<'_, D>,
9815 offset: usize,
9816 _depth: fidl::encoding::Depth,
9817 ) -> fidl::Result<()> {
9818 decoder.debug_check_bounds::<Self>(offset);
9819 fidl::decode!(
9821 fidl::encoding::UnboundedVector<FiveByte>,
9822 D,
9823 &mut self.elems,
9824 decoder,
9825 offset + 0,
9826 _depth
9827 )?;
9828 Ok(())
9829 }
9830 }
9831
9832 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint16Struct {
9833 type Borrowed<'a> = &'a Self;
9834 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9835 value
9836 }
9837 }
9838
9839 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint16Struct {
9840 type Owned = Self;
9841
9842 #[inline(always)]
9843 fn inline_align(_context: fidl::encoding::Context) -> usize {
9844 2
9845 }
9846
9847 #[inline(always)]
9848 fn inline_size(_context: fidl::encoding::Context) -> usize {
9849 2
9850 }
9851 }
9852
9853 unsafe impl<D: fidl::encoding::ResourceDialect>
9854 fidl::encoding::Encode<FlexibleBitsUint16Struct, D> for &FlexibleBitsUint16Struct
9855 {
9856 #[inline]
9857 unsafe fn encode(
9858 self,
9859 encoder: &mut fidl::encoding::Encoder<'_, D>,
9860 offset: usize,
9861 _depth: fidl::encoding::Depth,
9862 ) -> fidl::Result<()> {
9863 encoder.debug_check_bounds::<FlexibleBitsUint16Struct>(offset);
9864 fidl::encoding::Encode::<FlexibleBitsUint16Struct, D>::encode(
9866 (<FlexibleBitsUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
9867 encoder,
9868 offset,
9869 _depth,
9870 )
9871 }
9872 }
9873 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleBitsUint16, D>>
9874 fidl::encoding::Encode<FlexibleBitsUint16Struct, D> for (T0,)
9875 {
9876 #[inline]
9877 unsafe fn encode(
9878 self,
9879 encoder: &mut fidl::encoding::Encoder<'_, D>,
9880 offset: usize,
9881 depth: fidl::encoding::Depth,
9882 ) -> fidl::Result<()> {
9883 encoder.debug_check_bounds::<FlexibleBitsUint16Struct>(offset);
9884 self.0.encode(encoder, offset + 0, depth)?;
9888 Ok(())
9889 }
9890 }
9891
9892 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9893 for FlexibleBitsUint16Struct
9894 {
9895 #[inline(always)]
9896 fn new_empty() -> Self {
9897 Self { b: fidl::new_empty!(FlexibleBitsUint16, D) }
9898 }
9899
9900 #[inline]
9901 unsafe fn decode(
9902 &mut self,
9903 decoder: &mut fidl::encoding::Decoder<'_, D>,
9904 offset: usize,
9905 _depth: fidl::encoding::Depth,
9906 ) -> fidl::Result<()> {
9907 decoder.debug_check_bounds::<Self>(offset);
9908 fidl::decode!(FlexibleBitsUint16, D, &mut self.b, decoder, offset + 0, _depth)?;
9910 Ok(())
9911 }
9912 }
9913
9914 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint32Struct {
9915 type Borrowed<'a> = &'a Self;
9916 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9917 value
9918 }
9919 }
9920
9921 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint32Struct {
9922 type Owned = Self;
9923
9924 #[inline(always)]
9925 fn inline_align(_context: fidl::encoding::Context) -> usize {
9926 4
9927 }
9928
9929 #[inline(always)]
9930 fn inline_size(_context: fidl::encoding::Context) -> usize {
9931 4
9932 }
9933 }
9934
9935 unsafe impl<D: fidl::encoding::ResourceDialect>
9936 fidl::encoding::Encode<FlexibleBitsUint32Struct, D> for &FlexibleBitsUint32Struct
9937 {
9938 #[inline]
9939 unsafe fn encode(
9940 self,
9941 encoder: &mut fidl::encoding::Encoder<'_, D>,
9942 offset: usize,
9943 _depth: fidl::encoding::Depth,
9944 ) -> fidl::Result<()> {
9945 encoder.debug_check_bounds::<FlexibleBitsUint32Struct>(offset);
9946 fidl::encoding::Encode::<FlexibleBitsUint32Struct, D>::encode(
9948 (<FlexibleBitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
9949 encoder,
9950 offset,
9951 _depth,
9952 )
9953 }
9954 }
9955 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleBitsUint32, D>>
9956 fidl::encoding::Encode<FlexibleBitsUint32Struct, D> for (T0,)
9957 {
9958 #[inline]
9959 unsafe fn encode(
9960 self,
9961 encoder: &mut fidl::encoding::Encoder<'_, D>,
9962 offset: usize,
9963 depth: fidl::encoding::Depth,
9964 ) -> fidl::Result<()> {
9965 encoder.debug_check_bounds::<FlexibleBitsUint32Struct>(offset);
9966 self.0.encode(encoder, offset + 0, depth)?;
9970 Ok(())
9971 }
9972 }
9973
9974 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9975 for FlexibleBitsUint32Struct
9976 {
9977 #[inline(always)]
9978 fn new_empty() -> Self {
9979 Self { b: fidl::new_empty!(FlexibleBitsUint32, D) }
9980 }
9981
9982 #[inline]
9983 unsafe fn decode(
9984 &mut self,
9985 decoder: &mut fidl::encoding::Decoder<'_, D>,
9986 offset: usize,
9987 _depth: fidl::encoding::Depth,
9988 ) -> fidl::Result<()> {
9989 decoder.debug_check_bounds::<Self>(offset);
9990 fidl::decode!(FlexibleBitsUint32, D, &mut self.b, decoder, offset + 0, _depth)?;
9992 Ok(())
9993 }
9994 }
9995
9996 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint64Struct {
9997 type Borrowed<'a> = &'a Self;
9998 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9999 value
10000 }
10001 }
10002
10003 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint64Struct {
10004 type Owned = Self;
10005
10006 #[inline(always)]
10007 fn inline_align(_context: fidl::encoding::Context) -> usize {
10008 8
10009 }
10010
10011 #[inline(always)]
10012 fn inline_size(_context: fidl::encoding::Context) -> usize {
10013 8
10014 }
10015 }
10016
10017 unsafe impl<D: fidl::encoding::ResourceDialect>
10018 fidl::encoding::Encode<FlexibleBitsUint64Struct, D> for &FlexibleBitsUint64Struct
10019 {
10020 #[inline]
10021 unsafe fn encode(
10022 self,
10023 encoder: &mut fidl::encoding::Encoder<'_, D>,
10024 offset: usize,
10025 _depth: fidl::encoding::Depth,
10026 ) -> fidl::Result<()> {
10027 encoder.debug_check_bounds::<FlexibleBitsUint64Struct>(offset);
10028 fidl::encoding::Encode::<FlexibleBitsUint64Struct, D>::encode(
10030 (<FlexibleBitsUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10031 encoder,
10032 offset,
10033 _depth,
10034 )
10035 }
10036 }
10037 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleBitsUint64, D>>
10038 fidl::encoding::Encode<FlexibleBitsUint64Struct, D> for (T0,)
10039 {
10040 #[inline]
10041 unsafe fn encode(
10042 self,
10043 encoder: &mut fidl::encoding::Encoder<'_, D>,
10044 offset: usize,
10045 depth: fidl::encoding::Depth,
10046 ) -> fidl::Result<()> {
10047 encoder.debug_check_bounds::<FlexibleBitsUint64Struct>(offset);
10048 self.0.encode(encoder, offset + 0, depth)?;
10052 Ok(())
10053 }
10054 }
10055
10056 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10057 for FlexibleBitsUint64Struct
10058 {
10059 #[inline(always)]
10060 fn new_empty() -> Self {
10061 Self { b: fidl::new_empty!(FlexibleBitsUint64, D) }
10062 }
10063
10064 #[inline]
10065 unsafe fn decode(
10066 &mut self,
10067 decoder: &mut fidl::encoding::Decoder<'_, D>,
10068 offset: usize,
10069 _depth: fidl::encoding::Depth,
10070 ) -> fidl::Result<()> {
10071 decoder.debug_check_bounds::<Self>(offset);
10072 fidl::decode!(FlexibleBitsUint64, D, &mut self.b, decoder, offset + 0, _depth)?;
10074 Ok(())
10075 }
10076 }
10077
10078 impl fidl::encoding::ValueTypeMarker for FlexibleBitsUint8Struct {
10079 type Borrowed<'a> = &'a Self;
10080 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10081 value
10082 }
10083 }
10084
10085 unsafe impl fidl::encoding::TypeMarker for FlexibleBitsUint8Struct {
10086 type Owned = Self;
10087
10088 #[inline(always)]
10089 fn inline_align(_context: fidl::encoding::Context) -> usize {
10090 1
10091 }
10092
10093 #[inline(always)]
10094 fn inline_size(_context: fidl::encoding::Context) -> usize {
10095 1
10096 }
10097 }
10098
10099 unsafe impl<D: fidl::encoding::ResourceDialect>
10100 fidl::encoding::Encode<FlexibleBitsUint8Struct, D> for &FlexibleBitsUint8Struct
10101 {
10102 #[inline]
10103 unsafe fn encode(
10104 self,
10105 encoder: &mut fidl::encoding::Encoder<'_, D>,
10106 offset: usize,
10107 _depth: fidl::encoding::Depth,
10108 ) -> fidl::Result<()> {
10109 encoder.debug_check_bounds::<FlexibleBitsUint8Struct>(offset);
10110 fidl::encoding::Encode::<FlexibleBitsUint8Struct, D>::encode(
10112 (<FlexibleBitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
10113 encoder,
10114 offset,
10115 _depth,
10116 )
10117 }
10118 }
10119 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleBitsUint8, D>>
10120 fidl::encoding::Encode<FlexibleBitsUint8Struct, D> for (T0,)
10121 {
10122 #[inline]
10123 unsafe fn encode(
10124 self,
10125 encoder: &mut fidl::encoding::Encoder<'_, D>,
10126 offset: usize,
10127 depth: fidl::encoding::Depth,
10128 ) -> fidl::Result<()> {
10129 encoder.debug_check_bounds::<FlexibleBitsUint8Struct>(offset);
10130 self.0.encode(encoder, offset + 0, depth)?;
10134 Ok(())
10135 }
10136 }
10137
10138 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10139 for FlexibleBitsUint8Struct
10140 {
10141 #[inline(always)]
10142 fn new_empty() -> Self {
10143 Self { b: fidl::new_empty!(FlexibleBitsUint8, D) }
10144 }
10145
10146 #[inline]
10147 unsafe fn decode(
10148 &mut self,
10149 decoder: &mut fidl::encoding::Decoder<'_, D>,
10150 offset: usize,
10151 _depth: fidl::encoding::Depth,
10152 ) -> fidl::Result<()> {
10153 decoder.debug_check_bounds::<Self>(offset);
10154 fidl::decode!(FlexibleBitsUint8, D, &mut self.b, decoder, offset + 0, _depth)?;
10156 Ok(())
10157 }
10158 }
10159
10160 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt16Struct {
10161 type Borrowed<'a> = &'a Self;
10162 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10163 value
10164 }
10165 }
10166
10167 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt16Struct {
10168 type Owned = Self;
10169
10170 #[inline(always)]
10171 fn inline_align(_context: fidl::encoding::Context) -> usize {
10172 2
10173 }
10174
10175 #[inline(always)]
10176 fn inline_size(_context: fidl::encoding::Context) -> usize {
10177 2
10178 }
10179 }
10180
10181 unsafe impl<D: fidl::encoding::ResourceDialect>
10182 fidl::encoding::Encode<FlexibleEnumInt16Struct, D> for &FlexibleEnumInt16Struct
10183 {
10184 #[inline]
10185 unsafe fn encode(
10186 self,
10187 encoder: &mut fidl::encoding::Encoder<'_, D>,
10188 offset: usize,
10189 _depth: fidl::encoding::Depth,
10190 ) -> fidl::Result<()> {
10191 encoder.debug_check_bounds::<FlexibleEnumInt16Struct>(offset);
10192 fidl::encoding::Encode::<FlexibleEnumInt16Struct, D>::encode(
10194 (<FlexibleEnumInt16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10195 encoder,
10196 offset,
10197 _depth,
10198 )
10199 }
10200 }
10201 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt16, D>>
10202 fidl::encoding::Encode<FlexibleEnumInt16Struct, D> for (T0,)
10203 {
10204 #[inline]
10205 unsafe fn encode(
10206 self,
10207 encoder: &mut fidl::encoding::Encoder<'_, D>,
10208 offset: usize,
10209 depth: fidl::encoding::Depth,
10210 ) -> fidl::Result<()> {
10211 encoder.debug_check_bounds::<FlexibleEnumInt16Struct>(offset);
10212 self.0.encode(encoder, offset + 0, depth)?;
10216 Ok(())
10217 }
10218 }
10219
10220 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10221 for FlexibleEnumInt16Struct
10222 {
10223 #[inline(always)]
10224 fn new_empty() -> Self {
10225 Self { e: fidl::new_empty!(FlexibleEnumInt16, D) }
10226 }
10227
10228 #[inline]
10229 unsafe fn decode(
10230 &mut self,
10231 decoder: &mut fidl::encoding::Decoder<'_, D>,
10232 offset: usize,
10233 _depth: fidl::encoding::Depth,
10234 ) -> fidl::Result<()> {
10235 decoder.debug_check_bounds::<Self>(offset);
10236 fidl::decode!(FlexibleEnumInt16, D, &mut self.e, decoder, offset + 0, _depth)?;
10238 Ok(())
10239 }
10240 }
10241
10242 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt32Struct {
10243 type Borrowed<'a> = &'a Self;
10244 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10245 value
10246 }
10247 }
10248
10249 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt32Struct {
10250 type Owned = Self;
10251
10252 #[inline(always)]
10253 fn inline_align(_context: fidl::encoding::Context) -> usize {
10254 4
10255 }
10256
10257 #[inline(always)]
10258 fn inline_size(_context: fidl::encoding::Context) -> usize {
10259 4
10260 }
10261 }
10262
10263 unsafe impl<D: fidl::encoding::ResourceDialect>
10264 fidl::encoding::Encode<FlexibleEnumInt32Struct, D> for &FlexibleEnumInt32Struct
10265 {
10266 #[inline]
10267 unsafe fn encode(
10268 self,
10269 encoder: &mut fidl::encoding::Encoder<'_, D>,
10270 offset: usize,
10271 _depth: fidl::encoding::Depth,
10272 ) -> fidl::Result<()> {
10273 encoder.debug_check_bounds::<FlexibleEnumInt32Struct>(offset);
10274 fidl::encoding::Encode::<FlexibleEnumInt32Struct, D>::encode(
10276 (<FlexibleEnumInt32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10277 encoder,
10278 offset,
10279 _depth,
10280 )
10281 }
10282 }
10283 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt32, D>>
10284 fidl::encoding::Encode<FlexibleEnumInt32Struct, D> for (T0,)
10285 {
10286 #[inline]
10287 unsafe fn encode(
10288 self,
10289 encoder: &mut fidl::encoding::Encoder<'_, D>,
10290 offset: usize,
10291 depth: fidl::encoding::Depth,
10292 ) -> fidl::Result<()> {
10293 encoder.debug_check_bounds::<FlexibleEnumInt32Struct>(offset);
10294 self.0.encode(encoder, offset + 0, depth)?;
10298 Ok(())
10299 }
10300 }
10301
10302 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10303 for FlexibleEnumInt32Struct
10304 {
10305 #[inline(always)]
10306 fn new_empty() -> Self {
10307 Self { e: fidl::new_empty!(FlexibleEnumInt32, D) }
10308 }
10309
10310 #[inline]
10311 unsafe fn decode(
10312 &mut self,
10313 decoder: &mut fidl::encoding::Decoder<'_, D>,
10314 offset: usize,
10315 _depth: fidl::encoding::Depth,
10316 ) -> fidl::Result<()> {
10317 decoder.debug_check_bounds::<Self>(offset);
10318 fidl::decode!(FlexibleEnumInt32, D, &mut self.e, decoder, offset + 0, _depth)?;
10320 Ok(())
10321 }
10322 }
10323
10324 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt64Struct {
10325 type Borrowed<'a> = &'a Self;
10326 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10327 value
10328 }
10329 }
10330
10331 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt64Struct {
10332 type Owned = Self;
10333
10334 #[inline(always)]
10335 fn inline_align(_context: fidl::encoding::Context) -> usize {
10336 8
10337 }
10338
10339 #[inline(always)]
10340 fn inline_size(_context: fidl::encoding::Context) -> usize {
10341 8
10342 }
10343 }
10344
10345 unsafe impl<D: fidl::encoding::ResourceDialect>
10346 fidl::encoding::Encode<FlexibleEnumInt64Struct, D> for &FlexibleEnumInt64Struct
10347 {
10348 #[inline]
10349 unsafe fn encode(
10350 self,
10351 encoder: &mut fidl::encoding::Encoder<'_, D>,
10352 offset: usize,
10353 _depth: fidl::encoding::Depth,
10354 ) -> fidl::Result<()> {
10355 encoder.debug_check_bounds::<FlexibleEnumInt64Struct>(offset);
10356 fidl::encoding::Encode::<FlexibleEnumInt64Struct, D>::encode(
10358 (<FlexibleEnumInt64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10359 encoder,
10360 offset,
10361 _depth,
10362 )
10363 }
10364 }
10365 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt64, D>>
10366 fidl::encoding::Encode<FlexibleEnumInt64Struct, D> for (T0,)
10367 {
10368 #[inline]
10369 unsafe fn encode(
10370 self,
10371 encoder: &mut fidl::encoding::Encoder<'_, D>,
10372 offset: usize,
10373 depth: fidl::encoding::Depth,
10374 ) -> fidl::Result<()> {
10375 encoder.debug_check_bounds::<FlexibleEnumInt64Struct>(offset);
10376 self.0.encode(encoder, offset + 0, depth)?;
10380 Ok(())
10381 }
10382 }
10383
10384 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10385 for FlexibleEnumInt64Struct
10386 {
10387 #[inline(always)]
10388 fn new_empty() -> Self {
10389 Self { e: fidl::new_empty!(FlexibleEnumInt64, D) }
10390 }
10391
10392 #[inline]
10393 unsafe fn decode(
10394 &mut self,
10395 decoder: &mut fidl::encoding::Decoder<'_, D>,
10396 offset: usize,
10397 _depth: fidl::encoding::Depth,
10398 ) -> fidl::Result<()> {
10399 decoder.debug_check_bounds::<Self>(offset);
10400 fidl::decode!(FlexibleEnumInt64, D, &mut self.e, decoder, offset + 0, _depth)?;
10402 Ok(())
10403 }
10404 }
10405
10406 impl fidl::encoding::ValueTypeMarker for FlexibleEnumInt8Struct {
10407 type Borrowed<'a> = &'a Self;
10408 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10409 value
10410 }
10411 }
10412
10413 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumInt8Struct {
10414 type Owned = Self;
10415
10416 #[inline(always)]
10417 fn inline_align(_context: fidl::encoding::Context) -> usize {
10418 1
10419 }
10420
10421 #[inline(always)]
10422 fn inline_size(_context: fidl::encoding::Context) -> usize {
10423 1
10424 }
10425 }
10426
10427 unsafe impl<D: fidl::encoding::ResourceDialect>
10428 fidl::encoding::Encode<FlexibleEnumInt8Struct, D> for &FlexibleEnumInt8Struct
10429 {
10430 #[inline]
10431 unsafe fn encode(
10432 self,
10433 encoder: &mut fidl::encoding::Encoder<'_, D>,
10434 offset: usize,
10435 _depth: fidl::encoding::Depth,
10436 ) -> fidl::Result<()> {
10437 encoder.debug_check_bounds::<FlexibleEnumInt8Struct>(offset);
10438 fidl::encoding::Encode::<FlexibleEnumInt8Struct, D>::encode(
10440 (<FlexibleEnumInt8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10441 encoder,
10442 offset,
10443 _depth,
10444 )
10445 }
10446 }
10447 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumInt8, D>>
10448 fidl::encoding::Encode<FlexibleEnumInt8Struct, D> for (T0,)
10449 {
10450 #[inline]
10451 unsafe fn encode(
10452 self,
10453 encoder: &mut fidl::encoding::Encoder<'_, D>,
10454 offset: usize,
10455 depth: fidl::encoding::Depth,
10456 ) -> fidl::Result<()> {
10457 encoder.debug_check_bounds::<FlexibleEnumInt8Struct>(offset);
10458 self.0.encode(encoder, offset + 0, depth)?;
10462 Ok(())
10463 }
10464 }
10465
10466 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10467 for FlexibleEnumInt8Struct
10468 {
10469 #[inline(always)]
10470 fn new_empty() -> Self {
10471 Self { e: fidl::new_empty!(FlexibleEnumInt8, D) }
10472 }
10473
10474 #[inline]
10475 unsafe fn decode(
10476 &mut self,
10477 decoder: &mut fidl::encoding::Decoder<'_, D>,
10478 offset: usize,
10479 _depth: fidl::encoding::Depth,
10480 ) -> fidl::Result<()> {
10481 decoder.debug_check_bounds::<Self>(offset);
10482 fidl::decode!(FlexibleEnumInt8, D, &mut self.e, decoder, offset + 0, _depth)?;
10484 Ok(())
10485 }
10486 }
10487
10488 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint16Struct {
10489 type Borrowed<'a> = &'a Self;
10490 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10491 value
10492 }
10493 }
10494
10495 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint16Struct {
10496 type Owned = Self;
10497
10498 #[inline(always)]
10499 fn inline_align(_context: fidl::encoding::Context) -> usize {
10500 2
10501 }
10502
10503 #[inline(always)]
10504 fn inline_size(_context: fidl::encoding::Context) -> usize {
10505 2
10506 }
10507 }
10508
10509 unsafe impl<D: fidl::encoding::ResourceDialect>
10510 fidl::encoding::Encode<FlexibleEnumUint16Struct, D> for &FlexibleEnumUint16Struct
10511 {
10512 #[inline]
10513 unsafe fn encode(
10514 self,
10515 encoder: &mut fidl::encoding::Encoder<'_, D>,
10516 offset: usize,
10517 _depth: fidl::encoding::Depth,
10518 ) -> fidl::Result<()> {
10519 encoder.debug_check_bounds::<FlexibleEnumUint16Struct>(offset);
10520 fidl::encoding::Encode::<FlexibleEnumUint16Struct, D>::encode(
10522 (<FlexibleEnumUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10523 encoder,
10524 offset,
10525 _depth,
10526 )
10527 }
10528 }
10529 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumUint16, D>>
10530 fidl::encoding::Encode<FlexibleEnumUint16Struct, D> for (T0,)
10531 {
10532 #[inline]
10533 unsafe fn encode(
10534 self,
10535 encoder: &mut fidl::encoding::Encoder<'_, D>,
10536 offset: usize,
10537 depth: fidl::encoding::Depth,
10538 ) -> fidl::Result<()> {
10539 encoder.debug_check_bounds::<FlexibleEnumUint16Struct>(offset);
10540 self.0.encode(encoder, offset + 0, depth)?;
10544 Ok(())
10545 }
10546 }
10547
10548 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10549 for FlexibleEnumUint16Struct
10550 {
10551 #[inline(always)]
10552 fn new_empty() -> Self {
10553 Self { e: fidl::new_empty!(FlexibleEnumUint16, D) }
10554 }
10555
10556 #[inline]
10557 unsafe fn decode(
10558 &mut self,
10559 decoder: &mut fidl::encoding::Decoder<'_, D>,
10560 offset: usize,
10561 _depth: fidl::encoding::Depth,
10562 ) -> fidl::Result<()> {
10563 decoder.debug_check_bounds::<Self>(offset);
10564 fidl::decode!(FlexibleEnumUint16, D, &mut self.e, decoder, offset + 0, _depth)?;
10566 Ok(())
10567 }
10568 }
10569
10570 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint32Struct {
10571 type Borrowed<'a> = &'a Self;
10572 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10573 value
10574 }
10575 }
10576
10577 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint32Struct {
10578 type Owned = Self;
10579
10580 #[inline(always)]
10581 fn inline_align(_context: fidl::encoding::Context) -> usize {
10582 4
10583 }
10584
10585 #[inline(always)]
10586 fn inline_size(_context: fidl::encoding::Context) -> usize {
10587 4
10588 }
10589 }
10590
10591 unsafe impl<D: fidl::encoding::ResourceDialect>
10592 fidl::encoding::Encode<FlexibleEnumUint32Struct, D> for &FlexibleEnumUint32Struct
10593 {
10594 #[inline]
10595 unsafe fn encode(
10596 self,
10597 encoder: &mut fidl::encoding::Encoder<'_, D>,
10598 offset: usize,
10599 _depth: fidl::encoding::Depth,
10600 ) -> fidl::Result<()> {
10601 encoder.debug_check_bounds::<FlexibleEnumUint32Struct>(offset);
10602 fidl::encoding::Encode::<FlexibleEnumUint32Struct, D>::encode(
10604 (<FlexibleEnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10605 encoder,
10606 offset,
10607 _depth,
10608 )
10609 }
10610 }
10611 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumUint32, D>>
10612 fidl::encoding::Encode<FlexibleEnumUint32Struct, D> for (T0,)
10613 {
10614 #[inline]
10615 unsafe fn encode(
10616 self,
10617 encoder: &mut fidl::encoding::Encoder<'_, D>,
10618 offset: usize,
10619 depth: fidl::encoding::Depth,
10620 ) -> fidl::Result<()> {
10621 encoder.debug_check_bounds::<FlexibleEnumUint32Struct>(offset);
10622 self.0.encode(encoder, offset + 0, depth)?;
10626 Ok(())
10627 }
10628 }
10629
10630 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10631 for FlexibleEnumUint32Struct
10632 {
10633 #[inline(always)]
10634 fn new_empty() -> Self {
10635 Self { e: fidl::new_empty!(FlexibleEnumUint32, D) }
10636 }
10637
10638 #[inline]
10639 unsafe fn decode(
10640 &mut self,
10641 decoder: &mut fidl::encoding::Decoder<'_, D>,
10642 offset: usize,
10643 _depth: fidl::encoding::Depth,
10644 ) -> fidl::Result<()> {
10645 decoder.debug_check_bounds::<Self>(offset);
10646 fidl::decode!(FlexibleEnumUint32, D, &mut self.e, decoder, offset + 0, _depth)?;
10648 Ok(())
10649 }
10650 }
10651
10652 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint64Struct {
10653 type Borrowed<'a> = &'a Self;
10654 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10655 value
10656 }
10657 }
10658
10659 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint64Struct {
10660 type Owned = Self;
10661
10662 #[inline(always)]
10663 fn inline_align(_context: fidl::encoding::Context) -> usize {
10664 8
10665 }
10666
10667 #[inline(always)]
10668 fn inline_size(_context: fidl::encoding::Context) -> usize {
10669 8
10670 }
10671 }
10672
10673 unsafe impl<D: fidl::encoding::ResourceDialect>
10674 fidl::encoding::Encode<FlexibleEnumUint64Struct, D> for &FlexibleEnumUint64Struct
10675 {
10676 #[inline]
10677 unsafe fn encode(
10678 self,
10679 encoder: &mut fidl::encoding::Encoder<'_, D>,
10680 offset: usize,
10681 _depth: fidl::encoding::Depth,
10682 ) -> fidl::Result<()> {
10683 encoder.debug_check_bounds::<FlexibleEnumUint64Struct>(offset);
10684 fidl::encoding::Encode::<FlexibleEnumUint64Struct, D>::encode(
10686 (<FlexibleEnumUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10687 encoder,
10688 offset,
10689 _depth,
10690 )
10691 }
10692 }
10693 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumUint64, D>>
10694 fidl::encoding::Encode<FlexibleEnumUint64Struct, D> for (T0,)
10695 {
10696 #[inline]
10697 unsafe fn encode(
10698 self,
10699 encoder: &mut fidl::encoding::Encoder<'_, D>,
10700 offset: usize,
10701 depth: fidl::encoding::Depth,
10702 ) -> fidl::Result<()> {
10703 encoder.debug_check_bounds::<FlexibleEnumUint64Struct>(offset);
10704 self.0.encode(encoder, offset + 0, depth)?;
10708 Ok(())
10709 }
10710 }
10711
10712 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10713 for FlexibleEnumUint64Struct
10714 {
10715 #[inline(always)]
10716 fn new_empty() -> Self {
10717 Self { e: fidl::new_empty!(FlexibleEnumUint64, D) }
10718 }
10719
10720 #[inline]
10721 unsafe fn decode(
10722 &mut self,
10723 decoder: &mut fidl::encoding::Decoder<'_, D>,
10724 offset: usize,
10725 _depth: fidl::encoding::Depth,
10726 ) -> fidl::Result<()> {
10727 decoder.debug_check_bounds::<Self>(offset);
10728 fidl::decode!(FlexibleEnumUint64, D, &mut self.e, decoder, offset + 0, _depth)?;
10730 Ok(())
10731 }
10732 }
10733
10734 impl fidl::encoding::ValueTypeMarker for FlexibleEnumUint8Struct {
10735 type Borrowed<'a> = &'a Self;
10736 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10737 value
10738 }
10739 }
10740
10741 unsafe impl fidl::encoding::TypeMarker for FlexibleEnumUint8Struct {
10742 type Owned = Self;
10743
10744 #[inline(always)]
10745 fn inline_align(_context: fidl::encoding::Context) -> usize {
10746 1
10747 }
10748
10749 #[inline(always)]
10750 fn inline_size(_context: fidl::encoding::Context) -> usize {
10751 1
10752 }
10753 }
10754
10755 unsafe impl<D: fidl::encoding::ResourceDialect>
10756 fidl::encoding::Encode<FlexibleEnumUint8Struct, D> for &FlexibleEnumUint8Struct
10757 {
10758 #[inline]
10759 unsafe fn encode(
10760 self,
10761 encoder: &mut fidl::encoding::Encoder<'_, D>,
10762 offset: usize,
10763 _depth: fidl::encoding::Depth,
10764 ) -> fidl::Result<()> {
10765 encoder.debug_check_bounds::<FlexibleEnumUint8Struct>(offset);
10766 fidl::encoding::Encode::<FlexibleEnumUint8Struct, D>::encode(
10768 (<FlexibleEnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
10769 encoder,
10770 offset,
10771 _depth,
10772 )
10773 }
10774 }
10775 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlexibleEnumUint8, D>>
10776 fidl::encoding::Encode<FlexibleEnumUint8Struct, D> for (T0,)
10777 {
10778 #[inline]
10779 unsafe fn encode(
10780 self,
10781 encoder: &mut fidl::encoding::Encoder<'_, D>,
10782 offset: usize,
10783 depth: fidl::encoding::Depth,
10784 ) -> fidl::Result<()> {
10785 encoder.debug_check_bounds::<FlexibleEnumUint8Struct>(offset);
10786 self.0.encode(encoder, offset + 0, depth)?;
10790 Ok(())
10791 }
10792 }
10793
10794 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10795 for FlexibleEnumUint8Struct
10796 {
10797 #[inline(always)]
10798 fn new_empty() -> Self {
10799 Self { e: fidl::new_empty!(FlexibleEnumUint8, D) }
10800 }
10801
10802 #[inline]
10803 unsafe fn decode(
10804 &mut self,
10805 decoder: &mut fidl::encoding::Decoder<'_, D>,
10806 offset: usize,
10807 _depth: fidl::encoding::Depth,
10808 ) -> fidl::Result<()> {
10809 decoder.debug_check_bounds::<Self>(offset);
10810 fidl::decode!(FlexibleEnumUint8, D, &mut self.e, decoder, offset + 0, _depth)?;
10812 Ok(())
10813 }
10814 }
10815
10816 impl fidl::encoding::ValueTypeMarker for GoldenBitsStruct {
10817 type Borrowed<'a> = &'a Self;
10818 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10819 value
10820 }
10821 }
10822
10823 unsafe impl fidl::encoding::TypeMarker for GoldenBitsStruct {
10824 type Owned = Self;
10825
10826 #[inline(always)]
10827 fn inline_align(_context: fidl::encoding::Context) -> usize {
10828 2
10829 }
10830
10831 #[inline(always)]
10832 fn inline_size(_context: fidl::encoding::Context) -> usize {
10833 2
10834 }
10835 }
10836
10837 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenBitsStruct, D>
10838 for &GoldenBitsStruct
10839 {
10840 #[inline]
10841 unsafe fn encode(
10842 self,
10843 encoder: &mut fidl::encoding::Encoder<'_, D>,
10844 offset: usize,
10845 _depth: fidl::encoding::Depth,
10846 ) -> fidl::Result<()> {
10847 encoder.debug_check_bounds::<GoldenBitsStruct>(offset);
10848 fidl::encoding::Encode::<GoldenBitsStruct, D>::encode(
10850 (<GoldenBits as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
10851 encoder,
10852 offset,
10853 _depth,
10854 )
10855 }
10856 }
10857 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenBits, D>>
10858 fidl::encoding::Encode<GoldenBitsStruct, D> for (T0,)
10859 {
10860 #[inline]
10861 unsafe fn encode(
10862 self,
10863 encoder: &mut fidl::encoding::Encoder<'_, D>,
10864 offset: usize,
10865 depth: fidl::encoding::Depth,
10866 ) -> fidl::Result<()> {
10867 encoder.debug_check_bounds::<GoldenBitsStruct>(offset);
10868 self.0.encode(encoder, offset + 0, depth)?;
10872 Ok(())
10873 }
10874 }
10875
10876 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBitsStruct {
10877 #[inline(always)]
10878 fn new_empty() -> Self {
10879 Self { v: fidl::new_empty!(GoldenBits, D) }
10880 }
10881
10882 #[inline]
10883 unsafe fn decode(
10884 &mut self,
10885 decoder: &mut fidl::encoding::Decoder<'_, D>,
10886 offset: usize,
10887 _depth: fidl::encoding::Depth,
10888 ) -> fidl::Result<()> {
10889 decoder.debug_check_bounds::<Self>(offset);
10890 fidl::decode!(GoldenBits, D, &mut self.v, decoder, offset + 0, _depth)?;
10892 Ok(())
10893 }
10894 }
10895
10896 impl fidl::encoding::ValueTypeMarker for GoldenBoolStruct {
10897 type Borrowed<'a> = &'a Self;
10898 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10899 value
10900 }
10901 }
10902
10903 unsafe impl fidl::encoding::TypeMarker for GoldenBoolStruct {
10904 type Owned = Self;
10905
10906 #[inline(always)]
10907 fn inline_align(_context: fidl::encoding::Context) -> usize {
10908 1
10909 }
10910
10911 #[inline(always)]
10912 fn inline_size(_context: fidl::encoding::Context) -> usize {
10913 1
10914 }
10915 }
10916
10917 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenBoolStruct, D>
10918 for &GoldenBoolStruct
10919 {
10920 #[inline]
10921 unsafe fn encode(
10922 self,
10923 encoder: &mut fidl::encoding::Encoder<'_, D>,
10924 offset: usize,
10925 _depth: fidl::encoding::Depth,
10926 ) -> fidl::Result<()> {
10927 encoder.debug_check_bounds::<GoldenBoolStruct>(offset);
10928 fidl::encoding::Encode::<GoldenBoolStruct, D>::encode(
10930 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
10931 encoder,
10932 offset,
10933 _depth,
10934 )
10935 }
10936 }
10937 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
10938 fidl::encoding::Encode<GoldenBoolStruct, D> for (T0,)
10939 {
10940 #[inline]
10941 unsafe fn encode(
10942 self,
10943 encoder: &mut fidl::encoding::Encoder<'_, D>,
10944 offset: usize,
10945 depth: fidl::encoding::Depth,
10946 ) -> fidl::Result<()> {
10947 encoder.debug_check_bounds::<GoldenBoolStruct>(offset);
10948 self.0.encode(encoder, offset + 0, depth)?;
10952 Ok(())
10953 }
10954 }
10955
10956 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenBoolStruct {
10957 #[inline(always)]
10958 fn new_empty() -> Self {
10959 Self { v: fidl::new_empty!(bool, D) }
10960 }
10961
10962 #[inline]
10963 unsafe fn decode(
10964 &mut self,
10965 decoder: &mut fidl::encoding::Decoder<'_, D>,
10966 offset: usize,
10967 _depth: fidl::encoding::Depth,
10968 ) -> fidl::Result<()> {
10969 decoder.debug_check_bounds::<Self>(offset);
10970 fidl::decode!(bool, D, &mut self.v, decoder, offset + 0, _depth)?;
10972 Ok(())
10973 }
10974 }
10975
10976 impl fidl::encoding::ValueTypeMarker for GoldenByteArrayStruct {
10977 type Borrowed<'a> = &'a Self;
10978 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10979 value
10980 }
10981 }
10982
10983 unsafe impl fidl::encoding::TypeMarker for GoldenByteArrayStruct {
10984 type Owned = Self;
10985
10986 #[inline(always)]
10987 fn inline_align(_context: fidl::encoding::Context) -> usize {
10988 1
10989 }
10990
10991 #[inline(always)]
10992 fn inline_size(_context: fidl::encoding::Context) -> usize {
10993 4
10994 }
10995 #[inline(always)]
10996 fn encode_is_copy() -> bool {
10997 true
10998 }
10999
11000 #[inline(always)]
11001 fn decode_is_copy() -> bool {
11002 true
11003 }
11004 }
11005
11006 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenByteArrayStruct, D>
11007 for &GoldenByteArrayStruct
11008 {
11009 #[inline]
11010 unsafe fn encode(
11011 self,
11012 encoder: &mut fidl::encoding::Encoder<'_, D>,
11013 offset: usize,
11014 _depth: fidl::encoding::Depth,
11015 ) -> fidl::Result<()> {
11016 encoder.debug_check_bounds::<GoldenByteArrayStruct>(offset);
11017 unsafe {
11018 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11020 (buf_ptr as *mut GoldenByteArrayStruct)
11021 .write_unaligned((self as *const GoldenByteArrayStruct).read());
11022 }
11025 Ok(())
11026 }
11027 }
11028 unsafe impl<
11029 D: fidl::encoding::ResourceDialect,
11030 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 4>, D>,
11031 > fidl::encoding::Encode<GoldenByteArrayStruct, D> for (T0,)
11032 {
11033 #[inline]
11034 unsafe fn encode(
11035 self,
11036 encoder: &mut fidl::encoding::Encoder<'_, D>,
11037 offset: usize,
11038 depth: fidl::encoding::Depth,
11039 ) -> fidl::Result<()> {
11040 encoder.debug_check_bounds::<GoldenByteArrayStruct>(offset);
11041 self.0.encode(encoder, offset + 0, depth)?;
11045 Ok(())
11046 }
11047 }
11048
11049 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenByteArrayStruct {
11050 #[inline(always)]
11051 fn new_empty() -> Self {
11052 Self { v: fidl::new_empty!(fidl::encoding::Array<u8, 4>, D) }
11053 }
11054
11055 #[inline]
11056 unsafe fn decode(
11057 &mut self,
11058 decoder: &mut fidl::encoding::Decoder<'_, D>,
11059 offset: usize,
11060 _depth: fidl::encoding::Depth,
11061 ) -> fidl::Result<()> {
11062 decoder.debug_check_bounds::<Self>(offset);
11063 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11064 unsafe {
11067 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11068 }
11069 Ok(())
11070 }
11071 }
11072
11073 impl fidl::encoding::ValueTypeMarker for GoldenByteVectorStruct {
11074 type Borrowed<'a> = &'a Self;
11075 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11076 value
11077 }
11078 }
11079
11080 unsafe impl fidl::encoding::TypeMarker for GoldenByteVectorStruct {
11081 type Owned = Self;
11082
11083 #[inline(always)]
11084 fn inline_align(_context: fidl::encoding::Context) -> usize {
11085 8
11086 }
11087
11088 #[inline(always)]
11089 fn inline_size(_context: fidl::encoding::Context) -> usize {
11090 16
11091 }
11092 }
11093
11094 unsafe impl<D: fidl::encoding::ResourceDialect>
11095 fidl::encoding::Encode<GoldenByteVectorStruct, D> for &GoldenByteVectorStruct
11096 {
11097 #[inline]
11098 unsafe fn encode(
11099 self,
11100 encoder: &mut fidl::encoding::Encoder<'_, D>,
11101 offset: usize,
11102 _depth: fidl::encoding::Depth,
11103 ) -> fidl::Result<()> {
11104 encoder.debug_check_bounds::<GoldenByteVectorStruct>(offset);
11105 fidl::encoding::Encode::<GoldenByteVectorStruct, D>::encode(
11107 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
11108 &self.v,
11109 ),),
11110 encoder,
11111 offset,
11112 _depth,
11113 )
11114 }
11115 }
11116 unsafe impl<
11117 D: fidl::encoding::ResourceDialect,
11118 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
11119 > fidl::encoding::Encode<GoldenByteVectorStruct, D> for (T0,)
11120 {
11121 #[inline]
11122 unsafe fn encode(
11123 self,
11124 encoder: &mut fidl::encoding::Encoder<'_, D>,
11125 offset: usize,
11126 depth: fidl::encoding::Depth,
11127 ) -> fidl::Result<()> {
11128 encoder.debug_check_bounds::<GoldenByteVectorStruct>(offset);
11129 self.0.encode(encoder, offset + 0, depth)?;
11133 Ok(())
11134 }
11135 }
11136
11137 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11138 for GoldenByteVectorStruct
11139 {
11140 #[inline(always)]
11141 fn new_empty() -> Self {
11142 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
11143 }
11144
11145 #[inline]
11146 unsafe fn decode(
11147 &mut self,
11148 decoder: &mut fidl::encoding::Decoder<'_, D>,
11149 offset: usize,
11150 _depth: fidl::encoding::Depth,
11151 ) -> fidl::Result<()> {
11152 decoder.debug_check_bounds::<Self>(offset);
11153 fidl::decode!(
11155 fidl::encoding::UnboundedVector<u8>,
11156 D,
11157 &mut self.v,
11158 decoder,
11159 offset + 0,
11160 _depth
11161 )?;
11162 Ok(())
11163 }
11164 }
11165
11166 impl fidl::encoding::ValueTypeMarker for GoldenDoubleStruct {
11167 type Borrowed<'a> = &'a Self;
11168 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11169 value
11170 }
11171 }
11172
11173 unsafe impl fidl::encoding::TypeMarker for GoldenDoubleStruct {
11174 type Owned = Self;
11175
11176 #[inline(always)]
11177 fn inline_align(_context: fidl::encoding::Context) -> usize {
11178 8
11179 }
11180
11181 #[inline(always)]
11182 fn inline_size(_context: fidl::encoding::Context) -> usize {
11183 8
11184 }
11185 }
11186
11187 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenDoubleStruct, D>
11188 for &GoldenDoubleStruct
11189 {
11190 #[inline]
11191 unsafe fn encode(
11192 self,
11193 encoder: &mut fidl::encoding::Encoder<'_, D>,
11194 offset: usize,
11195 _depth: fidl::encoding::Depth,
11196 ) -> fidl::Result<()> {
11197 encoder.debug_check_bounds::<GoldenDoubleStruct>(offset);
11198 fidl::encoding::Encode::<GoldenDoubleStruct, D>::encode(
11200 (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11201 encoder,
11202 offset,
11203 _depth,
11204 )
11205 }
11206 }
11207 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
11208 fidl::encoding::Encode<GoldenDoubleStruct, D> for (T0,)
11209 {
11210 #[inline]
11211 unsafe fn encode(
11212 self,
11213 encoder: &mut fidl::encoding::Encoder<'_, D>,
11214 offset: usize,
11215 depth: fidl::encoding::Depth,
11216 ) -> fidl::Result<()> {
11217 encoder.debug_check_bounds::<GoldenDoubleStruct>(offset);
11218 self.0.encode(encoder, offset + 0, depth)?;
11222 Ok(())
11223 }
11224 }
11225
11226 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenDoubleStruct {
11227 #[inline(always)]
11228 fn new_empty() -> Self {
11229 Self { v: fidl::new_empty!(f64, D) }
11230 }
11231
11232 #[inline]
11233 unsafe fn decode(
11234 &mut self,
11235 decoder: &mut fidl::encoding::Decoder<'_, D>,
11236 offset: usize,
11237 _depth: fidl::encoding::Depth,
11238 ) -> fidl::Result<()> {
11239 decoder.debug_check_bounds::<Self>(offset);
11240 fidl::decode!(f64, D, &mut self.v, decoder, offset + 0, _depth)?;
11242 Ok(())
11243 }
11244 }
11245
11246 impl fidl::encoding::ValueTypeMarker for GoldenEnumStruct {
11247 type Borrowed<'a> = &'a Self;
11248 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11249 value
11250 }
11251 }
11252
11253 unsafe impl fidl::encoding::TypeMarker for GoldenEnumStruct {
11254 type Owned = Self;
11255
11256 #[inline(always)]
11257 fn inline_align(_context: fidl::encoding::Context) -> usize {
11258 2
11259 }
11260
11261 #[inline(always)]
11262 fn inline_size(_context: fidl::encoding::Context) -> usize {
11263 2
11264 }
11265 }
11266
11267 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenEnumStruct, D>
11268 for &GoldenEnumStruct
11269 {
11270 #[inline]
11271 unsafe fn encode(
11272 self,
11273 encoder: &mut fidl::encoding::Encoder<'_, D>,
11274 offset: usize,
11275 _depth: fidl::encoding::Depth,
11276 ) -> fidl::Result<()> {
11277 encoder.debug_check_bounds::<GoldenEnumStruct>(offset);
11278 fidl::encoding::Encode::<GoldenEnumStruct, D>::encode(
11280 (<GoldenEnum as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11281 encoder,
11282 offset,
11283 _depth,
11284 )
11285 }
11286 }
11287 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenEnum, D>>
11288 fidl::encoding::Encode<GoldenEnumStruct, D> for (T0,)
11289 {
11290 #[inline]
11291 unsafe fn encode(
11292 self,
11293 encoder: &mut fidl::encoding::Encoder<'_, D>,
11294 offset: usize,
11295 depth: fidl::encoding::Depth,
11296 ) -> fidl::Result<()> {
11297 encoder.debug_check_bounds::<GoldenEnumStruct>(offset);
11298 self.0.encode(encoder, offset + 0, depth)?;
11302 Ok(())
11303 }
11304 }
11305
11306 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenEnumStruct {
11307 #[inline(always)]
11308 fn new_empty() -> Self {
11309 Self { v: fidl::new_empty!(GoldenEnum, D) }
11310 }
11311
11312 #[inline]
11313 unsafe fn decode(
11314 &mut self,
11315 decoder: &mut fidl::encoding::Decoder<'_, D>,
11316 offset: usize,
11317 _depth: fidl::encoding::Depth,
11318 ) -> fidl::Result<()> {
11319 decoder.debug_check_bounds::<Self>(offset);
11320 fidl::decode!(GoldenEnum, D, &mut self.v, decoder, offset + 0, _depth)?;
11322 Ok(())
11323 }
11324 }
11325
11326 impl fidl::encoding::ValueTypeMarker for GoldenFloatStruct {
11327 type Borrowed<'a> = &'a Self;
11328 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11329 value
11330 }
11331 }
11332
11333 unsafe impl fidl::encoding::TypeMarker for GoldenFloatStruct {
11334 type Owned = Self;
11335
11336 #[inline(always)]
11337 fn inline_align(_context: fidl::encoding::Context) -> usize {
11338 4
11339 }
11340
11341 #[inline(always)]
11342 fn inline_size(_context: fidl::encoding::Context) -> usize {
11343 4
11344 }
11345 }
11346
11347 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenFloatStruct, D>
11348 for &GoldenFloatStruct
11349 {
11350 #[inline]
11351 unsafe fn encode(
11352 self,
11353 encoder: &mut fidl::encoding::Encoder<'_, D>,
11354 offset: usize,
11355 _depth: fidl::encoding::Depth,
11356 ) -> fidl::Result<()> {
11357 encoder.debug_check_bounds::<GoldenFloatStruct>(offset);
11358 fidl::encoding::Encode::<GoldenFloatStruct, D>::encode(
11360 (<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
11361 encoder,
11362 offset,
11363 _depth,
11364 )
11365 }
11366 }
11367 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f32, D>>
11368 fidl::encoding::Encode<GoldenFloatStruct, D> for (T0,)
11369 {
11370 #[inline]
11371 unsafe fn encode(
11372 self,
11373 encoder: &mut fidl::encoding::Encoder<'_, D>,
11374 offset: usize,
11375 depth: fidl::encoding::Depth,
11376 ) -> fidl::Result<()> {
11377 encoder.debug_check_bounds::<GoldenFloatStruct>(offset);
11378 self.0.encode(encoder, offset + 0, depth)?;
11382 Ok(())
11383 }
11384 }
11385
11386 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenFloatStruct {
11387 #[inline(always)]
11388 fn new_empty() -> Self {
11389 Self { v: fidl::new_empty!(f32, D) }
11390 }
11391
11392 #[inline]
11393 unsafe fn decode(
11394 &mut self,
11395 decoder: &mut fidl::encoding::Decoder<'_, D>,
11396 offset: usize,
11397 _depth: fidl::encoding::Depth,
11398 ) -> fidl::Result<()> {
11399 decoder.debug_check_bounds::<Self>(offset);
11400 fidl::decode!(f32, D, &mut self.v, decoder, offset + 0, _depth)?;
11402 Ok(())
11403 }
11404 }
11405
11406 impl fidl::encoding::ValueTypeMarker for GoldenIntStruct {
11407 type Borrowed<'a> = &'a Self;
11408 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11409 value
11410 }
11411 }
11412
11413 unsafe impl fidl::encoding::TypeMarker for GoldenIntStruct {
11414 type Owned = Self;
11415
11416 #[inline(always)]
11417 fn inline_align(_context: fidl::encoding::Context) -> usize {
11418 2
11419 }
11420
11421 #[inline(always)]
11422 fn inline_size(_context: fidl::encoding::Context) -> usize {
11423 2
11424 }
11425 #[inline(always)]
11426 fn encode_is_copy() -> bool {
11427 true
11428 }
11429
11430 #[inline(always)]
11431 fn decode_is_copy() -> bool {
11432 true
11433 }
11434 }
11435
11436 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenIntStruct, D>
11437 for &GoldenIntStruct
11438 {
11439 #[inline]
11440 unsafe fn encode(
11441 self,
11442 encoder: &mut fidl::encoding::Encoder<'_, D>,
11443 offset: usize,
11444 _depth: fidl::encoding::Depth,
11445 ) -> fidl::Result<()> {
11446 encoder.debug_check_bounds::<GoldenIntStruct>(offset);
11447 unsafe {
11448 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11450 (buf_ptr as *mut GoldenIntStruct)
11451 .write_unaligned((self as *const GoldenIntStruct).read());
11452 }
11455 Ok(())
11456 }
11457 }
11458 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
11459 fidl::encoding::Encode<GoldenIntStruct, D> for (T0,)
11460 {
11461 #[inline]
11462 unsafe fn encode(
11463 self,
11464 encoder: &mut fidl::encoding::Encoder<'_, D>,
11465 offset: usize,
11466 depth: fidl::encoding::Depth,
11467 ) -> fidl::Result<()> {
11468 encoder.debug_check_bounds::<GoldenIntStruct>(offset);
11469 self.0.encode(encoder, offset + 0, depth)?;
11473 Ok(())
11474 }
11475 }
11476
11477 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenIntStruct {
11478 #[inline(always)]
11479 fn new_empty() -> Self {
11480 Self { v: fidl::new_empty!(i16, D) }
11481 }
11482
11483 #[inline]
11484 unsafe fn decode(
11485 &mut self,
11486 decoder: &mut fidl::encoding::Decoder<'_, D>,
11487 offset: usize,
11488 _depth: fidl::encoding::Depth,
11489 ) -> fidl::Result<()> {
11490 decoder.debug_check_bounds::<Self>(offset);
11491 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11492 unsafe {
11495 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
11496 }
11497 Ok(())
11498 }
11499 }
11500
11501 impl fidl::encoding::ValueTypeMarker for GoldenNullableByteVectorStruct {
11502 type Borrowed<'a> = &'a Self;
11503 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11504 value
11505 }
11506 }
11507
11508 unsafe impl fidl::encoding::TypeMarker for GoldenNullableByteVectorStruct {
11509 type Owned = Self;
11510
11511 #[inline(always)]
11512 fn inline_align(_context: fidl::encoding::Context) -> usize {
11513 8
11514 }
11515
11516 #[inline(always)]
11517 fn inline_size(_context: fidl::encoding::Context) -> usize {
11518 16
11519 }
11520 }
11521
11522 unsafe impl<D: fidl::encoding::ResourceDialect>
11523 fidl::encoding::Encode<GoldenNullableByteVectorStruct, D>
11524 for &GoldenNullableByteVectorStruct
11525 {
11526 #[inline]
11527 unsafe fn encode(
11528 self,
11529 encoder: &mut fidl::encoding::Encoder<'_, D>,
11530 offset: usize,
11531 _depth: fidl::encoding::Depth,
11532 ) -> fidl::Result<()> {
11533 encoder.debug_check_bounds::<GoldenNullableByteVectorStruct>(offset);
11534 fidl::encoding::Encode::<GoldenNullableByteVectorStruct, D>::encode(
11536 (
11537 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11538 ),
11539 encoder, offset, _depth
11540 )
11541 }
11542 }
11543 unsafe impl<
11544 D: fidl::encoding::ResourceDialect,
11545 T0: fidl::encoding::Encode<
11546 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11547 D,
11548 >,
11549 > fidl::encoding::Encode<GoldenNullableByteVectorStruct, D> for (T0,)
11550 {
11551 #[inline]
11552 unsafe fn encode(
11553 self,
11554 encoder: &mut fidl::encoding::Encoder<'_, D>,
11555 offset: usize,
11556 depth: fidl::encoding::Depth,
11557 ) -> fidl::Result<()> {
11558 encoder.debug_check_bounds::<GoldenNullableByteVectorStruct>(offset);
11559 self.0.encode(encoder, offset + 0, depth)?;
11563 Ok(())
11564 }
11565 }
11566
11567 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11568 for GoldenNullableByteVectorStruct
11569 {
11570 #[inline(always)]
11571 fn new_empty() -> Self {
11572 Self {
11573 v: fidl::new_empty!(
11574 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11575 D
11576 ),
11577 }
11578 }
11579
11580 #[inline]
11581 unsafe fn decode(
11582 &mut self,
11583 decoder: &mut fidl::encoding::Decoder<'_, D>,
11584 offset: usize,
11585 _depth: fidl::encoding::Depth,
11586 ) -> fidl::Result<()> {
11587 decoder.debug_check_bounds::<Self>(offset);
11588 fidl::decode!(
11590 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
11591 D,
11592 &mut self.v,
11593 decoder,
11594 offset + 0,
11595 _depth
11596 )?;
11597 Ok(())
11598 }
11599 }
11600
11601 impl fidl::encoding::ValueTypeMarker for GoldenNullableStringStruct {
11602 type Borrowed<'a> = &'a Self;
11603 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11604 value
11605 }
11606 }
11607
11608 unsafe impl fidl::encoding::TypeMarker for GoldenNullableStringStruct {
11609 type Owned = Self;
11610
11611 #[inline(always)]
11612 fn inline_align(_context: fidl::encoding::Context) -> usize {
11613 8
11614 }
11615
11616 #[inline(always)]
11617 fn inline_size(_context: fidl::encoding::Context) -> usize {
11618 16
11619 }
11620 }
11621
11622 unsafe impl<D: fidl::encoding::ResourceDialect>
11623 fidl::encoding::Encode<GoldenNullableStringStruct, D> for &GoldenNullableStringStruct
11624 {
11625 #[inline]
11626 unsafe fn encode(
11627 self,
11628 encoder: &mut fidl::encoding::Encoder<'_, D>,
11629 offset: usize,
11630 _depth: fidl::encoding::Depth,
11631 ) -> fidl::Result<()> {
11632 encoder.debug_check_bounds::<GoldenNullableStringStruct>(offset);
11633 fidl::encoding::Encode::<GoldenNullableStringStruct, D>::encode(
11635 (
11636 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11637 ),
11638 encoder, offset, _depth
11639 )
11640 }
11641 }
11642 unsafe impl<
11643 D: fidl::encoding::ResourceDialect,
11644 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
11645 > fidl::encoding::Encode<GoldenNullableStringStruct, D> for (T0,)
11646 {
11647 #[inline]
11648 unsafe fn encode(
11649 self,
11650 encoder: &mut fidl::encoding::Encoder<'_, D>,
11651 offset: usize,
11652 depth: fidl::encoding::Depth,
11653 ) -> fidl::Result<()> {
11654 encoder.debug_check_bounds::<GoldenNullableStringStruct>(offset);
11655 self.0.encode(encoder, offset + 0, depth)?;
11659 Ok(())
11660 }
11661 }
11662
11663 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11664 for GoldenNullableStringStruct
11665 {
11666 #[inline(always)]
11667 fn new_empty() -> Self {
11668 Self {
11669 v: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
11670 }
11671 }
11672
11673 #[inline]
11674 unsafe fn decode(
11675 &mut self,
11676 decoder: &mut fidl::encoding::Decoder<'_, D>,
11677 offset: usize,
11678 _depth: fidl::encoding::Depth,
11679 ) -> fidl::Result<()> {
11680 decoder.debug_check_bounds::<Self>(offset);
11681 fidl::decode!(
11683 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
11684 D,
11685 &mut self.v,
11686 decoder,
11687 offset + 0,
11688 _depth
11689 )?;
11690 Ok(())
11691 }
11692 }
11693
11694 impl fidl::encoding::ValueTypeMarker for GoldenNullableStruct {
11695 type Borrowed<'a> = &'a Self;
11696 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11697 value
11698 }
11699 }
11700
11701 unsafe impl fidl::encoding::TypeMarker for GoldenNullableStruct {
11702 type Owned = Self;
11703
11704 #[inline(always)]
11705 fn inline_align(_context: fidl::encoding::Context) -> usize {
11706 8
11707 }
11708
11709 #[inline(always)]
11710 fn inline_size(_context: fidl::encoding::Context) -> usize {
11711 8
11712 }
11713 }
11714
11715 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenNullableStruct, D>
11716 for &GoldenNullableStruct
11717 {
11718 #[inline]
11719 unsafe fn encode(
11720 self,
11721 encoder: &mut fidl::encoding::Encoder<'_, D>,
11722 offset: usize,
11723 _depth: fidl::encoding::Depth,
11724 ) -> fidl::Result<()> {
11725 encoder.debug_check_bounds::<GoldenNullableStruct>(offset);
11726 fidl::encoding::Encode::<GoldenNullableStruct, D>::encode(
11728 (
11729 <fidl::encoding::Boxed<GoldenBoolStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11730 ),
11731 encoder, offset, _depth
11732 )
11733 }
11734 }
11735 unsafe impl<
11736 D: fidl::encoding::ResourceDialect,
11737 T0: fidl::encoding::Encode<fidl::encoding::Boxed<GoldenBoolStruct>, D>,
11738 > fidl::encoding::Encode<GoldenNullableStruct, D> for (T0,)
11739 {
11740 #[inline]
11741 unsafe fn encode(
11742 self,
11743 encoder: &mut fidl::encoding::Encoder<'_, D>,
11744 offset: usize,
11745 depth: fidl::encoding::Depth,
11746 ) -> fidl::Result<()> {
11747 encoder.debug_check_bounds::<GoldenNullableStruct>(offset);
11748 self.0.encode(encoder, offset + 0, depth)?;
11752 Ok(())
11753 }
11754 }
11755
11756 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenNullableStruct {
11757 #[inline(always)]
11758 fn new_empty() -> Self {
11759 Self { v: fidl::new_empty!(fidl::encoding::Boxed<GoldenBoolStruct>, D) }
11760 }
11761
11762 #[inline]
11763 unsafe fn decode(
11764 &mut self,
11765 decoder: &mut fidl::encoding::Decoder<'_, D>,
11766 offset: usize,
11767 _depth: fidl::encoding::Depth,
11768 ) -> fidl::Result<()> {
11769 decoder.debug_check_bounds::<Self>(offset);
11770 fidl::decode!(
11772 fidl::encoding::Boxed<GoldenBoolStruct>,
11773 D,
11774 &mut self.v,
11775 decoder,
11776 offset + 0,
11777 _depth
11778 )?;
11779 Ok(())
11780 }
11781 }
11782
11783 impl fidl::encoding::ValueTypeMarker for GoldenNullableUnionStruct {
11784 type Borrowed<'a> = &'a Self;
11785 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11786 value
11787 }
11788 }
11789
11790 unsafe impl fidl::encoding::TypeMarker for GoldenNullableUnionStruct {
11791 type Owned = Self;
11792
11793 #[inline(always)]
11794 fn inline_align(_context: fidl::encoding::Context) -> usize {
11795 8
11796 }
11797
11798 #[inline(always)]
11799 fn inline_size(_context: fidl::encoding::Context) -> usize {
11800 16
11801 }
11802 }
11803
11804 unsafe impl<D: fidl::encoding::ResourceDialect>
11805 fidl::encoding::Encode<GoldenNullableUnionStruct, D> for &GoldenNullableUnionStruct
11806 {
11807 #[inline]
11808 unsafe fn encode(
11809 self,
11810 encoder: &mut fidl::encoding::Encoder<'_, D>,
11811 offset: usize,
11812 _depth: fidl::encoding::Depth,
11813 ) -> fidl::Result<()> {
11814 encoder.debug_check_bounds::<GoldenNullableUnionStruct>(offset);
11815 fidl::encoding::Encode::<GoldenNullableUnionStruct, D>::encode(
11817 (
11818 <fidl::encoding::OptionalUnion<GoldenUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
11819 ),
11820 encoder, offset, _depth
11821 )
11822 }
11823 }
11824 unsafe impl<
11825 D: fidl::encoding::ResourceDialect,
11826 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<GoldenUnion>, D>,
11827 > fidl::encoding::Encode<GoldenNullableUnionStruct, D> for (T0,)
11828 {
11829 #[inline]
11830 unsafe fn encode(
11831 self,
11832 encoder: &mut fidl::encoding::Encoder<'_, D>,
11833 offset: usize,
11834 depth: fidl::encoding::Depth,
11835 ) -> fidl::Result<()> {
11836 encoder.debug_check_bounds::<GoldenNullableUnionStruct>(offset);
11837 self.0.encode(encoder, offset + 0, depth)?;
11841 Ok(())
11842 }
11843 }
11844
11845 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11846 for GoldenNullableUnionStruct
11847 {
11848 #[inline(always)]
11849 fn new_empty() -> Self {
11850 Self { v: fidl::new_empty!(fidl::encoding::OptionalUnion<GoldenUnion>, D) }
11851 }
11852
11853 #[inline]
11854 unsafe fn decode(
11855 &mut self,
11856 decoder: &mut fidl::encoding::Decoder<'_, D>,
11857 offset: usize,
11858 _depth: fidl::encoding::Depth,
11859 ) -> fidl::Result<()> {
11860 decoder.debug_check_bounds::<Self>(offset);
11861 fidl::decode!(
11863 fidl::encoding::OptionalUnion<GoldenUnion>,
11864 D,
11865 &mut self.v,
11866 decoder,
11867 offset + 0,
11868 _depth
11869 )?;
11870 Ok(())
11871 }
11872 }
11873
11874 impl fidl::encoding::ValueTypeMarker for GoldenStringStruct {
11875 type Borrowed<'a> = &'a Self;
11876 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11877 value
11878 }
11879 }
11880
11881 unsafe impl fidl::encoding::TypeMarker for GoldenStringStruct {
11882 type Owned = Self;
11883
11884 #[inline(always)]
11885 fn inline_align(_context: fidl::encoding::Context) -> usize {
11886 8
11887 }
11888
11889 #[inline(always)]
11890 fn inline_size(_context: fidl::encoding::Context) -> usize {
11891 16
11892 }
11893 }
11894
11895 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenStringStruct, D>
11896 for &GoldenStringStruct
11897 {
11898 #[inline]
11899 unsafe fn encode(
11900 self,
11901 encoder: &mut fidl::encoding::Encoder<'_, D>,
11902 offset: usize,
11903 _depth: fidl::encoding::Depth,
11904 ) -> fidl::Result<()> {
11905 encoder.debug_check_bounds::<GoldenStringStruct>(offset);
11906 fidl::encoding::Encode::<GoldenStringStruct, D>::encode(
11908 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
11909 &self.v,
11910 ),),
11911 encoder,
11912 offset,
11913 _depth,
11914 )
11915 }
11916 }
11917 unsafe impl<
11918 D: fidl::encoding::ResourceDialect,
11919 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
11920 > fidl::encoding::Encode<GoldenStringStruct, D> for (T0,)
11921 {
11922 #[inline]
11923 unsafe fn encode(
11924 self,
11925 encoder: &mut fidl::encoding::Encoder<'_, D>,
11926 offset: usize,
11927 depth: fidl::encoding::Depth,
11928 ) -> fidl::Result<()> {
11929 encoder.debug_check_bounds::<GoldenStringStruct>(offset);
11930 self.0.encode(encoder, offset + 0, depth)?;
11934 Ok(())
11935 }
11936 }
11937
11938 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenStringStruct {
11939 #[inline(always)]
11940 fn new_empty() -> Self {
11941 Self { v: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
11942 }
11943
11944 #[inline]
11945 unsafe fn decode(
11946 &mut self,
11947 decoder: &mut fidl::encoding::Decoder<'_, D>,
11948 offset: usize,
11949 _depth: fidl::encoding::Depth,
11950 ) -> fidl::Result<()> {
11951 decoder.debug_check_bounds::<Self>(offset);
11952 fidl::decode!(
11954 fidl::encoding::UnboundedString,
11955 D,
11956 &mut self.v,
11957 decoder,
11958 offset + 0,
11959 _depth
11960 )?;
11961 Ok(())
11962 }
11963 }
11964
11965 impl fidl::encoding::ValueTypeMarker for GoldenStringWithMaxSize2 {
11966 type Borrowed<'a> = &'a Self;
11967 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11968 value
11969 }
11970 }
11971
11972 unsafe impl fidl::encoding::TypeMarker for GoldenStringWithMaxSize2 {
11973 type Owned = Self;
11974
11975 #[inline(always)]
11976 fn inline_align(_context: fidl::encoding::Context) -> usize {
11977 8
11978 }
11979
11980 #[inline(always)]
11981 fn inline_size(_context: fidl::encoding::Context) -> usize {
11982 16
11983 }
11984 }
11985
11986 unsafe impl<D: fidl::encoding::ResourceDialect>
11987 fidl::encoding::Encode<GoldenStringWithMaxSize2, D> for &GoldenStringWithMaxSize2
11988 {
11989 #[inline]
11990 unsafe fn encode(
11991 self,
11992 encoder: &mut fidl::encoding::Encoder<'_, D>,
11993 offset: usize,
11994 _depth: fidl::encoding::Depth,
11995 ) -> fidl::Result<()> {
11996 encoder.debug_check_bounds::<GoldenStringWithMaxSize2>(offset);
11997 fidl::encoding::Encode::<GoldenStringWithMaxSize2, D>::encode(
11999 (<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
12000 &self.s,
12001 ),),
12002 encoder,
12003 offset,
12004 _depth,
12005 )
12006 }
12007 }
12008 unsafe impl<
12009 D: fidl::encoding::ResourceDialect,
12010 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
12011 > fidl::encoding::Encode<GoldenStringWithMaxSize2, D> for (T0,)
12012 {
12013 #[inline]
12014 unsafe fn encode(
12015 self,
12016 encoder: &mut fidl::encoding::Encoder<'_, D>,
12017 offset: usize,
12018 depth: fidl::encoding::Depth,
12019 ) -> fidl::Result<()> {
12020 encoder.debug_check_bounds::<GoldenStringWithMaxSize2>(offset);
12021 self.0.encode(encoder, offset + 0, depth)?;
12025 Ok(())
12026 }
12027 }
12028
12029 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12030 for GoldenStringWithMaxSize2
12031 {
12032 #[inline(always)]
12033 fn new_empty() -> Self {
12034 Self { s: fidl::new_empty!(fidl::encoding::BoundedString<2>, D) }
12035 }
12036
12037 #[inline]
12038 unsafe fn decode(
12039 &mut self,
12040 decoder: &mut fidl::encoding::Decoder<'_, D>,
12041 offset: usize,
12042 _depth: fidl::encoding::Depth,
12043 ) -> fidl::Result<()> {
12044 decoder.debug_check_bounds::<Self>(offset);
12045 fidl::decode!(
12047 fidl::encoding::BoundedString<2>,
12048 D,
12049 &mut self.s,
12050 decoder,
12051 offset + 0,
12052 _depth
12053 )?;
12054 Ok(())
12055 }
12056 }
12057
12058 impl fidl::encoding::ValueTypeMarker for GoldenStructArrayStruct {
12059 type Borrowed<'a> = &'a Self;
12060 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12061 value
12062 }
12063 }
12064
12065 unsafe impl fidl::encoding::TypeMarker for GoldenStructArrayStruct {
12066 type Owned = Self;
12067
12068 #[inline(always)]
12069 fn inline_align(_context: fidl::encoding::Context) -> usize {
12070 2
12071 }
12072
12073 #[inline(always)]
12074 fn inline_size(_context: fidl::encoding::Context) -> usize {
12075 4
12076 }
12077 #[inline(always)]
12078 fn encode_is_copy() -> bool {
12079 true
12080 }
12081
12082 #[inline(always)]
12083 fn decode_is_copy() -> bool {
12084 true
12085 }
12086 }
12087
12088 unsafe impl<D: fidl::encoding::ResourceDialect>
12089 fidl::encoding::Encode<GoldenStructArrayStruct, D> for &GoldenStructArrayStruct
12090 {
12091 #[inline]
12092 unsafe fn encode(
12093 self,
12094 encoder: &mut fidl::encoding::Encoder<'_, D>,
12095 offset: usize,
12096 _depth: fidl::encoding::Depth,
12097 ) -> fidl::Result<()> {
12098 encoder.debug_check_bounds::<GoldenStructArrayStruct>(offset);
12099 unsafe {
12100 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12102 (buf_ptr as *mut GoldenStructArrayStruct)
12103 .write_unaligned((self as *const GoldenStructArrayStruct).read());
12104 }
12107 Ok(())
12108 }
12109 }
12110 unsafe impl<
12111 D: fidl::encoding::ResourceDialect,
12112 T0: fidl::encoding::Encode<fidl::encoding::Array<GoldenIntStruct, 2>, D>,
12113 > fidl::encoding::Encode<GoldenStructArrayStruct, D> for (T0,)
12114 {
12115 #[inline]
12116 unsafe fn encode(
12117 self,
12118 encoder: &mut fidl::encoding::Encoder<'_, D>,
12119 offset: usize,
12120 depth: fidl::encoding::Depth,
12121 ) -> fidl::Result<()> {
12122 encoder.debug_check_bounds::<GoldenStructArrayStruct>(offset);
12123 self.0.encode(encoder, offset + 0, depth)?;
12127 Ok(())
12128 }
12129 }
12130
12131 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12132 for GoldenStructArrayStruct
12133 {
12134 #[inline(always)]
12135 fn new_empty() -> Self {
12136 Self { v: fidl::new_empty!(fidl::encoding::Array<GoldenIntStruct, 2>, D) }
12137 }
12138
12139 #[inline]
12140 unsafe fn decode(
12141 &mut self,
12142 decoder: &mut fidl::encoding::Decoder<'_, D>,
12143 offset: usize,
12144 _depth: fidl::encoding::Depth,
12145 ) -> fidl::Result<()> {
12146 decoder.debug_check_bounds::<Self>(offset);
12147 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12148 unsafe {
12151 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12152 }
12153 Ok(())
12154 }
12155 }
12156
12157 impl fidl::encoding::ValueTypeMarker for GoldenStructVectorStruct {
12158 type Borrowed<'a> = &'a Self;
12159 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12160 value
12161 }
12162 }
12163
12164 unsafe impl fidl::encoding::TypeMarker for GoldenStructVectorStruct {
12165 type Owned = Self;
12166
12167 #[inline(always)]
12168 fn inline_align(_context: fidl::encoding::Context) -> usize {
12169 8
12170 }
12171
12172 #[inline(always)]
12173 fn inline_size(_context: fidl::encoding::Context) -> usize {
12174 16
12175 }
12176 }
12177
12178 unsafe impl<D: fidl::encoding::ResourceDialect>
12179 fidl::encoding::Encode<GoldenStructVectorStruct, D> for &GoldenStructVectorStruct
12180 {
12181 #[inline]
12182 unsafe fn encode(
12183 self,
12184 encoder: &mut fidl::encoding::Encoder<'_, D>,
12185 offset: usize,
12186 _depth: fidl::encoding::Depth,
12187 ) -> fidl::Result<()> {
12188 encoder.debug_check_bounds::<GoldenStructVectorStruct>(offset);
12189 fidl::encoding::Encode::<GoldenStructVectorStruct, D>::encode(
12191 (
12192 <fidl::encoding::UnboundedVector<GoldenIntStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
12193 ),
12194 encoder, offset, _depth
12195 )
12196 }
12197 }
12198 unsafe impl<
12199 D: fidl::encoding::ResourceDialect,
12200 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<GoldenIntStruct>, D>,
12201 > fidl::encoding::Encode<GoldenStructVectorStruct, D> for (T0,)
12202 {
12203 #[inline]
12204 unsafe fn encode(
12205 self,
12206 encoder: &mut fidl::encoding::Encoder<'_, D>,
12207 offset: usize,
12208 depth: fidl::encoding::Depth,
12209 ) -> fidl::Result<()> {
12210 encoder.debug_check_bounds::<GoldenStructVectorStruct>(offset);
12211 self.0.encode(encoder, offset + 0, depth)?;
12215 Ok(())
12216 }
12217 }
12218
12219 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12220 for GoldenStructVectorStruct
12221 {
12222 #[inline(always)]
12223 fn new_empty() -> Self {
12224 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<GoldenIntStruct>, D) }
12225 }
12226
12227 #[inline]
12228 unsafe fn decode(
12229 &mut self,
12230 decoder: &mut fidl::encoding::Decoder<'_, D>,
12231 offset: usize,
12232 _depth: fidl::encoding::Depth,
12233 ) -> fidl::Result<()> {
12234 decoder.debug_check_bounds::<Self>(offset);
12235 fidl::decode!(
12237 fidl::encoding::UnboundedVector<GoldenIntStruct>,
12238 D,
12239 &mut self.v,
12240 decoder,
12241 offset + 0,
12242 _depth
12243 )?;
12244 Ok(())
12245 }
12246 }
12247
12248 impl fidl::encoding::ValueTypeMarker for GoldenTableStruct {
12249 type Borrowed<'a> = &'a Self;
12250 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12251 value
12252 }
12253 }
12254
12255 unsafe impl fidl::encoding::TypeMarker for GoldenTableStruct {
12256 type Owned = Self;
12257
12258 #[inline(always)]
12259 fn inline_align(_context: fidl::encoding::Context) -> usize {
12260 8
12261 }
12262
12263 #[inline(always)]
12264 fn inline_size(_context: fidl::encoding::Context) -> usize {
12265 16
12266 }
12267 }
12268
12269 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenTableStruct, D>
12270 for &GoldenTableStruct
12271 {
12272 #[inline]
12273 unsafe fn encode(
12274 self,
12275 encoder: &mut fidl::encoding::Encoder<'_, D>,
12276 offset: usize,
12277 _depth: fidl::encoding::Depth,
12278 ) -> fidl::Result<()> {
12279 encoder.debug_check_bounds::<GoldenTableStruct>(offset);
12280 fidl::encoding::Encode::<GoldenTableStruct, D>::encode(
12282 (<GoldenTable as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
12283 encoder,
12284 offset,
12285 _depth,
12286 )
12287 }
12288 }
12289 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenTable, D>>
12290 fidl::encoding::Encode<GoldenTableStruct, D> for (T0,)
12291 {
12292 #[inline]
12293 unsafe fn encode(
12294 self,
12295 encoder: &mut fidl::encoding::Encoder<'_, D>,
12296 offset: usize,
12297 depth: fidl::encoding::Depth,
12298 ) -> fidl::Result<()> {
12299 encoder.debug_check_bounds::<GoldenTableStruct>(offset);
12300 self.0.encode(encoder, offset + 0, depth)?;
12304 Ok(())
12305 }
12306 }
12307
12308 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenTableStruct {
12309 #[inline(always)]
12310 fn new_empty() -> Self {
12311 Self { v: fidl::new_empty!(GoldenTable, D) }
12312 }
12313
12314 #[inline]
12315 unsafe fn decode(
12316 &mut self,
12317 decoder: &mut fidl::encoding::Decoder<'_, D>,
12318 offset: usize,
12319 _depth: fidl::encoding::Depth,
12320 ) -> fidl::Result<()> {
12321 decoder.debug_check_bounds::<Self>(offset);
12322 fidl::decode!(GoldenTable, D, &mut self.v, decoder, offset + 0, _depth)?;
12324 Ok(())
12325 }
12326 }
12327
12328 impl fidl::encoding::ValueTypeMarker for GoldenUintStruct {
12329 type Borrowed<'a> = &'a Self;
12330 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12331 value
12332 }
12333 }
12334
12335 unsafe impl fidl::encoding::TypeMarker for GoldenUintStruct {
12336 type Owned = Self;
12337
12338 #[inline(always)]
12339 fn inline_align(_context: fidl::encoding::Context) -> usize {
12340 2
12341 }
12342
12343 #[inline(always)]
12344 fn inline_size(_context: fidl::encoding::Context) -> usize {
12345 2
12346 }
12347 #[inline(always)]
12348 fn encode_is_copy() -> bool {
12349 true
12350 }
12351
12352 #[inline(always)]
12353 fn decode_is_copy() -> bool {
12354 true
12355 }
12356 }
12357
12358 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUintStruct, D>
12359 for &GoldenUintStruct
12360 {
12361 #[inline]
12362 unsafe fn encode(
12363 self,
12364 encoder: &mut fidl::encoding::Encoder<'_, D>,
12365 offset: usize,
12366 _depth: fidl::encoding::Depth,
12367 ) -> fidl::Result<()> {
12368 encoder.debug_check_bounds::<GoldenUintStruct>(offset);
12369 unsafe {
12370 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12372 (buf_ptr as *mut GoldenUintStruct)
12373 .write_unaligned((self as *const GoldenUintStruct).read());
12374 }
12377 Ok(())
12378 }
12379 }
12380 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
12381 fidl::encoding::Encode<GoldenUintStruct, D> for (T0,)
12382 {
12383 #[inline]
12384 unsafe fn encode(
12385 self,
12386 encoder: &mut fidl::encoding::Encoder<'_, D>,
12387 offset: usize,
12388 depth: fidl::encoding::Depth,
12389 ) -> fidl::Result<()> {
12390 encoder.debug_check_bounds::<GoldenUintStruct>(offset);
12391 self.0.encode(encoder, offset + 0, depth)?;
12395 Ok(())
12396 }
12397 }
12398
12399 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUintStruct {
12400 #[inline(always)]
12401 fn new_empty() -> Self {
12402 Self { v: fidl::new_empty!(u16, D) }
12403 }
12404
12405 #[inline]
12406 unsafe fn decode(
12407 &mut self,
12408 decoder: &mut fidl::encoding::Decoder<'_, D>,
12409 offset: usize,
12410 _depth: fidl::encoding::Depth,
12411 ) -> fidl::Result<()> {
12412 decoder.debug_check_bounds::<Self>(offset);
12413 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12414 unsafe {
12417 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
12418 }
12419 Ok(())
12420 }
12421 }
12422
12423 impl fidl::encoding::ValueTypeMarker for GoldenUnionStruct {
12424 type Borrowed<'a> = &'a Self;
12425 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12426 value
12427 }
12428 }
12429
12430 unsafe impl fidl::encoding::TypeMarker for GoldenUnionStruct {
12431 type Owned = Self;
12432
12433 #[inline(always)]
12434 fn inline_align(_context: fidl::encoding::Context) -> usize {
12435 8
12436 }
12437
12438 #[inline(always)]
12439 fn inline_size(_context: fidl::encoding::Context) -> usize {
12440 16
12441 }
12442 }
12443
12444 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUnionStruct, D>
12445 for &GoldenUnionStruct
12446 {
12447 #[inline]
12448 unsafe fn encode(
12449 self,
12450 encoder: &mut fidl::encoding::Encoder<'_, D>,
12451 offset: usize,
12452 _depth: fidl::encoding::Depth,
12453 ) -> fidl::Result<()> {
12454 encoder.debug_check_bounds::<GoldenUnionStruct>(offset);
12455 fidl::encoding::Encode::<GoldenUnionStruct, D>::encode(
12457 (<GoldenUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
12458 encoder,
12459 offset,
12460 _depth,
12461 )
12462 }
12463 }
12464 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<GoldenUnion, D>>
12465 fidl::encoding::Encode<GoldenUnionStruct, D> for (T0,)
12466 {
12467 #[inline]
12468 unsafe fn encode(
12469 self,
12470 encoder: &mut fidl::encoding::Encoder<'_, D>,
12471 offset: usize,
12472 depth: fidl::encoding::Depth,
12473 ) -> fidl::Result<()> {
12474 encoder.debug_check_bounds::<GoldenUnionStruct>(offset);
12475 self.0.encode(encoder, offset + 0, depth)?;
12479 Ok(())
12480 }
12481 }
12482
12483 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUnionStruct {
12484 #[inline(always)]
12485 fn new_empty() -> Self {
12486 Self { v: fidl::new_empty!(GoldenUnion, D) }
12487 }
12488
12489 #[inline]
12490 unsafe fn decode(
12491 &mut self,
12492 decoder: &mut fidl::encoding::Decoder<'_, D>,
12493 offset: usize,
12494 _depth: fidl::encoding::Depth,
12495 ) -> fidl::Result<()> {
12496 decoder.debug_check_bounds::<Self>(offset);
12497 fidl::decode!(GoldenUnion, D, &mut self.v, decoder, offset + 0, _depth)?;
12499 Ok(())
12500 }
12501 }
12502
12503 impl fidl::encoding::ValueTypeMarker for Int64Struct {
12504 type Borrowed<'a> = &'a Self;
12505 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12506 value
12507 }
12508 }
12509
12510 unsafe impl fidl::encoding::TypeMarker for Int64Struct {
12511 type Owned = Self;
12512
12513 #[inline(always)]
12514 fn inline_align(_context: fidl::encoding::Context) -> usize {
12515 8
12516 }
12517
12518 #[inline(always)]
12519 fn inline_size(_context: fidl::encoding::Context) -> usize {
12520 8
12521 }
12522 #[inline(always)]
12523 fn encode_is_copy() -> bool {
12524 true
12525 }
12526
12527 #[inline(always)]
12528 fn decode_is_copy() -> bool {
12529 true
12530 }
12531 }
12532
12533 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Int64Struct, D>
12534 for &Int64Struct
12535 {
12536 #[inline]
12537 unsafe fn encode(
12538 self,
12539 encoder: &mut fidl::encoding::Encoder<'_, D>,
12540 offset: usize,
12541 _depth: fidl::encoding::Depth,
12542 ) -> fidl::Result<()> {
12543 encoder.debug_check_bounds::<Int64Struct>(offset);
12544 unsafe {
12545 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12547 (buf_ptr as *mut Int64Struct).write_unaligned((self as *const Int64Struct).read());
12548 }
12551 Ok(())
12552 }
12553 }
12554 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
12555 fidl::encoding::Encode<Int64Struct, D> for (T0,)
12556 {
12557 #[inline]
12558 unsafe fn encode(
12559 self,
12560 encoder: &mut fidl::encoding::Encoder<'_, D>,
12561 offset: usize,
12562 depth: fidl::encoding::Depth,
12563 ) -> fidl::Result<()> {
12564 encoder.debug_check_bounds::<Int64Struct>(offset);
12565 self.0.encode(encoder, offset + 0, depth)?;
12569 Ok(())
12570 }
12571 }
12572
12573 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Int64Struct {
12574 #[inline(always)]
12575 fn new_empty() -> Self {
12576 Self { x: fidl::new_empty!(i64, D) }
12577 }
12578
12579 #[inline]
12580 unsafe fn decode(
12581 &mut self,
12582 decoder: &mut fidl::encoding::Decoder<'_, D>,
12583 offset: usize,
12584 _depth: fidl::encoding::Depth,
12585 ) -> fidl::Result<()> {
12586 decoder.debug_check_bounds::<Self>(offset);
12587 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12588 unsafe {
12591 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
12592 }
12593 Ok(())
12594 }
12595 }
12596
12597 impl fidl::encoding::ValueTypeMarker for InterfaceConfig {
12598 type Borrowed<'a> = &'a Self;
12599 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12600 value
12601 }
12602 }
12603
12604 unsafe impl fidl::encoding::TypeMarker for InterfaceConfig {
12605 type Owned = Self;
12606
12607 #[inline(always)]
12608 fn inline_align(_context: fidl::encoding::Context) -> usize {
12609 8
12610 }
12611
12612 #[inline(always)]
12613 fn inline_size(_context: fidl::encoding::Context) -> usize {
12614 32
12615 }
12616 }
12617
12618 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InterfaceConfig, D>
12619 for &InterfaceConfig
12620 {
12621 #[inline]
12622 unsafe fn encode(
12623 self,
12624 encoder: &mut fidl::encoding::Encoder<'_, D>,
12625 offset: usize,
12626 _depth: fidl::encoding::Depth,
12627 ) -> fidl::Result<()> {
12628 encoder.debug_check_bounds::<InterfaceConfig>(offset);
12629 fidl::encoding::Encode::<InterfaceConfig, D>::encode(
12631 (
12632 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
12633 &self.name,
12634 ),
12635 <IpAddressConfig as fidl::encoding::ValueTypeMarker>::borrow(
12636 &self.ip_address_config,
12637 ),
12638 ),
12639 encoder,
12640 offset,
12641 _depth,
12642 )
12643 }
12644 }
12645 unsafe impl<
12646 D: fidl::encoding::ResourceDialect,
12647 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
12648 T1: fidl::encoding::Encode<IpAddressConfig, D>,
12649 > fidl::encoding::Encode<InterfaceConfig, D> for (T0, T1)
12650 {
12651 #[inline]
12652 unsafe fn encode(
12653 self,
12654 encoder: &mut fidl::encoding::Encoder<'_, D>,
12655 offset: usize,
12656 depth: fidl::encoding::Depth,
12657 ) -> fidl::Result<()> {
12658 encoder.debug_check_bounds::<InterfaceConfig>(offset);
12659 self.0.encode(encoder, offset + 0, depth)?;
12663 self.1.encode(encoder, offset + 16, depth)?;
12664 Ok(())
12665 }
12666 }
12667
12668 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InterfaceConfig {
12669 #[inline(always)]
12670 fn new_empty() -> Self {
12671 Self {
12672 name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
12673 ip_address_config: fidl::new_empty!(IpAddressConfig, D),
12674 }
12675 }
12676
12677 #[inline]
12678 unsafe fn decode(
12679 &mut self,
12680 decoder: &mut fidl::encoding::Decoder<'_, D>,
12681 offset: usize,
12682 _depth: fidl::encoding::Depth,
12683 ) -> fidl::Result<()> {
12684 decoder.debug_check_bounds::<Self>(offset);
12685 fidl::decode!(
12687 fidl::encoding::UnboundedString,
12688 D,
12689 &mut self.name,
12690 decoder,
12691 offset + 0,
12692 _depth
12693 )?;
12694 fidl::decode!(
12695 IpAddressConfig,
12696 D,
12697 &mut self.ip_address_config,
12698 decoder,
12699 offset + 16,
12700 _depth
12701 )?;
12702 Ok(())
12703 }
12704 }
12705
12706 impl fidl::encoding::ValueTypeMarker for LargeArrays {
12707 type Borrowed<'a> = &'a Self;
12708 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12709 value
12710 }
12711 }
12712
12713 unsafe impl fidl::encoding::TypeMarker for LargeArrays {
12714 type Owned = Self;
12715
12716 #[inline(always)]
12717 fn inline_align(_context: fidl::encoding::Context) -> usize {
12718 8
12719 }
12720
12721 #[inline(always)]
12722 fn inline_size(_context: fidl::encoding::Context) -> usize {
12723 648
12724 }
12725 }
12726
12727 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LargeArrays, D>
12728 for &LargeArrays
12729 {
12730 #[inline]
12731 unsafe fn encode(
12732 self,
12733 encoder: &mut fidl::encoding::Encoder<'_, D>,
12734 offset: usize,
12735 _depth: fidl::encoding::Depth,
12736 ) -> fidl::Result<()> {
12737 encoder.debug_check_bounds::<LargeArrays>(offset);
12738 fidl::encoding::Encode::<LargeArrays, D>::encode(
12740 (
12741 <fidl::encoding::Array<
12742 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12743 33,
12744 > as fidl::encoding::ValueTypeMarker>::borrow(&self.a33),
12745 <fidl::encoding::Array<u8, 100> as fidl::encoding::ValueTypeMarker>::borrow(
12746 &self.a100,
12747 ),
12748 <fidl::encoding::UnboundedVector<
12749 fidl::encoding::Array<
12750 fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12751 200,
12752 >,
12753 > as fidl::encoding::ValueTypeMarker>::borrow(&self.nested),
12754 ),
12755 encoder,
12756 offset,
12757 _depth,
12758 )
12759 }
12760 }
12761 unsafe impl<
12762 D: fidl::encoding::ResourceDialect,
12763 T0: fidl::encoding::Encode<
12764 fidl::encoding::Array<
12765 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12766 33,
12767 >,
12768 D,
12769 >,
12770 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 100>, D>,
12771 T2: fidl::encoding::Encode<
12772 fidl::encoding::UnboundedVector<
12773 fidl::encoding::Array<
12774 fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12775 200,
12776 >,
12777 >,
12778 D,
12779 >,
12780 > fidl::encoding::Encode<LargeArrays, D> for (T0, T1, T2)
12781 {
12782 #[inline]
12783 unsafe fn encode(
12784 self,
12785 encoder: &mut fidl::encoding::Encoder<'_, D>,
12786 offset: usize,
12787 depth: fidl::encoding::Depth,
12788 ) -> fidl::Result<()> {
12789 encoder.debug_check_bounds::<LargeArrays>(offset);
12790 unsafe {
12793 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(624);
12794 (ptr as *mut u64).write_unaligned(0);
12795 }
12796 self.0.encode(encoder, offset + 0, depth)?;
12798 self.1.encode(encoder, offset + 528, depth)?;
12799 self.2.encode(encoder, offset + 632, depth)?;
12800 Ok(())
12801 }
12802 }
12803
12804 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LargeArrays {
12805 #[inline(always)]
12806 fn new_empty() -> Self {
12807 Self {
12808 a33: fidl::new_empty!(
12809 fidl::encoding::Array<
12810 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12811 33,
12812 >,
12813 D
12814 ),
12815 a100: fidl::new_empty!(fidl::encoding::Array<u8, 100>, D),
12816 nested: fidl::new_empty!(
12817 fidl::encoding::UnboundedVector<
12818 fidl::encoding::Array<
12819 fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12820 200,
12821 >,
12822 >,
12823 D
12824 ),
12825 }
12826 }
12827
12828 #[inline]
12829 unsafe fn decode(
12830 &mut self,
12831 decoder: &mut fidl::encoding::Decoder<'_, D>,
12832 offset: usize,
12833 _depth: fidl::encoding::Depth,
12834 ) -> fidl::Result<()> {
12835 decoder.debug_check_bounds::<Self>(offset);
12836 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(624) };
12838 let padval = unsafe { (ptr as *const u64).read_unaligned() };
12839 let mask = 0xffffffff00000000u64;
12840 let maskedval = padval & mask;
12841 if maskedval != 0 {
12842 return Err(fidl::Error::NonZeroPadding {
12843 padding_start: offset + 624 + ((mask as u64).trailing_zeros() / 8) as usize,
12844 });
12845 }
12846 fidl::decode!(
12847 fidl::encoding::Array<
12848 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
12849 33,
12850 >,
12851 D,
12852 &mut self.a33,
12853 decoder,
12854 offset + 0,
12855 _depth
12856 )?;
12857 fidl::decode!(fidl::encoding::Array<u8, 100>, D, &mut self.a100, decoder, offset + 528, _depth)?;
12858 fidl::decode!(
12859 fidl::encoding::UnboundedVector<
12860 fidl::encoding::Array<
12861 fidl::encoding::Array<fidl::encoding::UnboundedString, 100>,
12862 200,
12863 >,
12864 >,
12865 D,
12866 &mut self.nested,
12867 decoder,
12868 offset + 632,
12869 _depth
12870 )?;
12871 Ok(())
12872 }
12873 }
12874
12875 impl fidl::encoding::ValueTypeMarker for Length2StringWrapper {
12876 type Borrowed<'a> = &'a Self;
12877 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12878 value
12879 }
12880 }
12881
12882 unsafe impl fidl::encoding::TypeMarker for Length2StringWrapper {
12883 type Owned = Self;
12884
12885 #[inline(always)]
12886 fn inline_align(_context: fidl::encoding::Context) -> usize {
12887 8
12888 }
12889
12890 #[inline(always)]
12891 fn inline_size(_context: fidl::encoding::Context) -> usize {
12892 16
12893 }
12894 }
12895
12896 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Length2StringWrapper, D>
12897 for &Length2StringWrapper
12898 {
12899 #[inline]
12900 unsafe fn encode(
12901 self,
12902 encoder: &mut fidl::encoding::Encoder<'_, D>,
12903 offset: usize,
12904 _depth: fidl::encoding::Depth,
12905 ) -> fidl::Result<()> {
12906 encoder.debug_check_bounds::<Length2StringWrapper>(offset);
12907 fidl::encoding::Encode::<Length2StringWrapper, D>::encode(
12909 (<fidl::encoding::BoundedString<2> as fidl::encoding::ValueTypeMarker>::borrow(
12910 &self.length_2_string,
12911 ),),
12912 encoder,
12913 offset,
12914 _depth,
12915 )
12916 }
12917 }
12918 unsafe impl<
12919 D: fidl::encoding::ResourceDialect,
12920 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2>, D>,
12921 > fidl::encoding::Encode<Length2StringWrapper, D> for (T0,)
12922 {
12923 #[inline]
12924 unsafe fn encode(
12925 self,
12926 encoder: &mut fidl::encoding::Encoder<'_, D>,
12927 offset: usize,
12928 depth: fidl::encoding::Depth,
12929 ) -> fidl::Result<()> {
12930 encoder.debug_check_bounds::<Length2StringWrapper>(offset);
12931 self.0.encode(encoder, offset + 0, depth)?;
12935 Ok(())
12936 }
12937 }
12938
12939 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Length2StringWrapper {
12940 #[inline(always)]
12941 fn new_empty() -> Self {
12942 Self { length_2_string: fidl::new_empty!(fidl::encoding::BoundedString<2>, D) }
12943 }
12944
12945 #[inline]
12946 unsafe fn decode(
12947 &mut self,
12948 decoder: &mut fidl::encoding::Decoder<'_, D>,
12949 offset: usize,
12950 _depth: fidl::encoding::Depth,
12951 ) -> fidl::Result<()> {
12952 decoder.debug_check_bounds::<Self>(offset);
12953 fidl::decode!(
12955 fidl::encoding::BoundedString<2>,
12956 D,
12957 &mut self.length_2_string,
12958 decoder,
12959 offset + 0,
12960 _depth
12961 )?;
12962 Ok(())
12963 }
12964 }
12965
12966 impl fidl::encoding::ValueTypeMarker for LotsOfVectors {
12967 type Borrowed<'a> = &'a Self;
12968 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12969 value
12970 }
12971 }
12972
12973 unsafe impl fidl::encoding::TypeMarker for LotsOfVectors {
12974 type Owned = Self;
12975
12976 #[inline(always)]
12977 fn inline_align(_context: fidl::encoding::Context) -> usize {
12978 8
12979 }
12980
12981 #[inline(always)]
12982 fn inline_size(_context: fidl::encoding::Context) -> usize {
12983 144
12984 }
12985 }
12986
12987 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LotsOfVectors, D>
12988 for &LotsOfVectors
12989 {
12990 #[inline]
12991 unsafe fn encode(
12992 self,
12993 encoder: &mut fidl::encoding::Encoder<'_, D>,
12994 offset: usize,
12995 _depth: fidl::encoding::Depth,
12996 ) -> fidl::Result<()> {
12997 encoder.debug_check_bounds::<LotsOfVectors>(offset);
12998 fidl::encoding::Encode::<LotsOfVectors, D>::encode(
13000 (
13001 <fidl::encoding::UnboundedVector<u16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v1),
13002 <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.v2),
13003 <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v3),
13004 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v4),
13005 <fidl::encoding::UnboundedVector<i8> as fidl::encoding::ValueTypeMarker>::borrow(&self.v5),
13006 <fidl::encoding::UnboundedVector<i16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v6),
13007 <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.v7),
13008 <fidl::encoding::UnboundedVector<i64> as fidl::encoding::ValueTypeMarker>::borrow(&self.v8),
13009 <fidl::encoding::UnboundedVector<bool> as fidl::encoding::ValueTypeMarker>::borrow(&self.v9),
13010 ),
13011 encoder, offset, _depth
13012 )
13013 }
13014 }
13015 unsafe impl<
13016 D: fidl::encoding::ResourceDialect,
13017 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u16>, D>,
13018 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13019 T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
13020 T3: fidl::encoding::Encode<
13021 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13022 D,
13023 >,
13024 T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i8>, D>,
13025 T5: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i16>, D>,
13026 T6: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
13027 T7: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i64>, D>,
13028 T8: fidl::encoding::Encode<fidl::encoding::UnboundedVector<bool>, D>,
13029 > fidl::encoding::Encode<LotsOfVectors, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
13030 {
13031 #[inline]
13032 unsafe fn encode(
13033 self,
13034 encoder: &mut fidl::encoding::Encoder<'_, D>,
13035 offset: usize,
13036 depth: fidl::encoding::Depth,
13037 ) -> fidl::Result<()> {
13038 encoder.debug_check_bounds::<LotsOfVectors>(offset);
13039 self.0.encode(encoder, offset + 0, depth)?;
13043 self.1.encode(encoder, offset + 16, depth)?;
13044 self.2.encode(encoder, offset + 32, depth)?;
13045 self.3.encode(encoder, offset + 48, depth)?;
13046 self.4.encode(encoder, offset + 64, depth)?;
13047 self.5.encode(encoder, offset + 80, depth)?;
13048 self.6.encode(encoder, offset + 96, depth)?;
13049 self.7.encode(encoder, offset + 112, depth)?;
13050 self.8.encode(encoder, offset + 128, depth)?;
13051 Ok(())
13052 }
13053 }
13054
13055 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LotsOfVectors {
13056 #[inline(always)]
13057 fn new_empty() -> Self {
13058 Self {
13059 v1: fidl::new_empty!(fidl::encoding::UnboundedVector<u16>, D),
13060 v2: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13061 v3: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D),
13062 v4: fidl::new_empty!(
13063 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13064 D
13065 ),
13066 v5: fidl::new_empty!(fidl::encoding::UnboundedVector<i8>, D),
13067 v6: fidl::new_empty!(fidl::encoding::UnboundedVector<i16>, D),
13068 v7: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
13069 v8: fidl::new_empty!(fidl::encoding::UnboundedVector<i64>, D),
13070 v9: fidl::new_empty!(fidl::encoding::UnboundedVector<bool>, D),
13071 }
13072 }
13073
13074 #[inline]
13075 unsafe fn decode(
13076 &mut self,
13077 decoder: &mut fidl::encoding::Decoder<'_, D>,
13078 offset: usize,
13079 _depth: fidl::encoding::Depth,
13080 ) -> fidl::Result<()> {
13081 decoder.debug_check_bounds::<Self>(offset);
13082 fidl::decode!(
13084 fidl::encoding::UnboundedVector<u16>,
13085 D,
13086 &mut self.v1,
13087 decoder,
13088 offset + 0,
13089 _depth
13090 )?;
13091 fidl::decode!(
13092 fidl::encoding::UnboundedVector<u32>,
13093 D,
13094 &mut self.v2,
13095 decoder,
13096 offset + 16,
13097 _depth
13098 )?;
13099 fidl::decode!(
13100 fidl::encoding::UnboundedVector<u64>,
13101 D,
13102 &mut self.v3,
13103 decoder,
13104 offset + 32,
13105 _depth
13106 )?;
13107 fidl::decode!(
13108 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13109 D,
13110 &mut self.v4,
13111 decoder,
13112 offset + 48,
13113 _depth
13114 )?;
13115 fidl::decode!(
13116 fidl::encoding::UnboundedVector<i8>,
13117 D,
13118 &mut self.v5,
13119 decoder,
13120 offset + 64,
13121 _depth
13122 )?;
13123 fidl::decode!(
13124 fidl::encoding::UnboundedVector<i16>,
13125 D,
13126 &mut self.v6,
13127 decoder,
13128 offset + 80,
13129 _depth
13130 )?;
13131 fidl::decode!(
13132 fidl::encoding::UnboundedVector<i32>,
13133 D,
13134 &mut self.v7,
13135 decoder,
13136 offset + 96,
13137 _depth
13138 )?;
13139 fidl::decode!(
13140 fidl::encoding::UnboundedVector<i64>,
13141 D,
13142 &mut self.v8,
13143 decoder,
13144 offset + 112,
13145 _depth
13146 )?;
13147 fidl::decode!(
13148 fidl::encoding::UnboundedVector<bool>,
13149 D,
13150 &mut self.v9,
13151 decoder,
13152 offset + 128,
13153 _depth
13154 )?;
13155 Ok(())
13156 }
13157 }
13158
13159 impl fidl::encoding::ValueTypeMarker for MixedFieldsBody {
13160 type Borrowed<'a> = &'a Self;
13161 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13162 value
13163 }
13164 }
13165
13166 unsafe impl fidl::encoding::TypeMarker for MixedFieldsBody {
13167 type Owned = Self;
13168
13169 #[inline(always)]
13170 fn inline_align(_context: fidl::encoding::Context) -> usize {
13171 8
13172 }
13173
13174 #[inline(always)]
13175 fn inline_size(_context: fidl::encoding::Context) -> usize {
13176 64
13177 }
13178 }
13179
13180 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MixedFieldsBody, D>
13181 for &MixedFieldsBody
13182 {
13183 #[inline]
13184 unsafe fn encode(
13185 self,
13186 encoder: &mut fidl::encoding::Encoder<'_, D>,
13187 offset: usize,
13188 _depth: fidl::encoding::Depth,
13189 ) -> fidl::Result<()> {
13190 encoder.debug_check_bounds::<MixedFieldsBody>(offset);
13191 fidl::encoding::Encode::<MixedFieldsBody, D>::encode(
13193 (
13194 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
13195 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(
13196 &self.first_union,
13197 ),
13198 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.middle_start),
13199 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.middle_end),
13200 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(
13201 &self.second_union,
13202 ),
13203 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
13204 ),
13205 encoder,
13206 offset,
13207 _depth,
13208 )
13209 }
13210 }
13211 unsafe impl<
13212 D: fidl::encoding::ResourceDialect,
13213 T0: fidl::encoding::Encode<u32, D>,
13214 T1: fidl::encoding::Encode<UnionSize8Align4, D>,
13215 T2: fidl::encoding::Encode<u16, D>,
13216 T3: fidl::encoding::Encode<u64, D>,
13217 T4: fidl::encoding::Encode<UnionSize8Align4, D>,
13218 T5: fidl::encoding::Encode<u32, D>,
13219 > fidl::encoding::Encode<MixedFieldsBody, D> for (T0, T1, T2, T3, T4, T5)
13220 {
13221 #[inline]
13222 unsafe fn encode(
13223 self,
13224 encoder: &mut fidl::encoding::Encoder<'_, D>,
13225 offset: usize,
13226 depth: fidl::encoding::Depth,
13227 ) -> fidl::Result<()> {
13228 encoder.debug_check_bounds::<MixedFieldsBody>(offset);
13229 unsafe {
13232 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
13233 (ptr as *mut u64).write_unaligned(0);
13234 }
13235 unsafe {
13236 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
13237 (ptr as *mut u64).write_unaligned(0);
13238 }
13239 unsafe {
13240 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
13241 (ptr as *mut u64).write_unaligned(0);
13242 }
13243 self.0.encode(encoder, offset + 0, depth)?;
13245 self.1.encode(encoder, offset + 8, depth)?;
13246 self.2.encode(encoder, offset + 24, depth)?;
13247 self.3.encode(encoder, offset + 32, depth)?;
13248 self.4.encode(encoder, offset + 40, depth)?;
13249 self.5.encode(encoder, offset + 56, depth)?;
13250 Ok(())
13251 }
13252 }
13253
13254 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MixedFieldsBody {
13255 #[inline(always)]
13256 fn new_empty() -> Self {
13257 Self {
13258 before: fidl::new_empty!(u32, D),
13259 first_union: fidl::new_empty!(UnionSize8Align4, D),
13260 middle_start: fidl::new_empty!(u16, D),
13261 middle_end: fidl::new_empty!(u64, D),
13262 second_union: fidl::new_empty!(UnionSize8Align4, D),
13263 after: fidl::new_empty!(u32, D),
13264 }
13265 }
13266
13267 #[inline]
13268 unsafe fn decode(
13269 &mut self,
13270 decoder: &mut fidl::encoding::Decoder<'_, D>,
13271 offset: usize,
13272 _depth: fidl::encoding::Depth,
13273 ) -> fidl::Result<()> {
13274 decoder.debug_check_bounds::<Self>(offset);
13275 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
13277 let padval = unsafe { (ptr as *const u64).read_unaligned() };
13278 let mask = 0xffffffff00000000u64;
13279 let maskedval = padval & mask;
13280 if maskedval != 0 {
13281 return Err(fidl::Error::NonZeroPadding {
13282 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
13283 });
13284 }
13285 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
13286 let padval = unsafe { (ptr as *const u64).read_unaligned() };
13287 let mask = 0xffffffffffff0000u64;
13288 let maskedval = padval & mask;
13289 if maskedval != 0 {
13290 return Err(fidl::Error::NonZeroPadding {
13291 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
13292 });
13293 }
13294 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
13295 let padval = unsafe { (ptr as *const u64).read_unaligned() };
13296 let mask = 0xffffffff00000000u64;
13297 let maskedval = padval & mask;
13298 if maskedval != 0 {
13299 return Err(fidl::Error::NonZeroPadding {
13300 padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
13301 });
13302 }
13303 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
13304 fidl::decode!(UnionSize8Align4, D, &mut self.first_union, decoder, offset + 8, _depth)?;
13305 fidl::decode!(u16, D, &mut self.middle_start, decoder, offset + 24, _depth)?;
13306 fidl::decode!(u64, D, &mut self.middle_end, decoder, offset + 32, _depth)?;
13307 fidl::decode!(
13308 UnionSize8Align4,
13309 D,
13310 &mut self.second_union,
13311 decoder,
13312 offset + 40,
13313 _depth
13314 )?;
13315 fidl::decode!(u32, D, &mut self.after, decoder, offset + 56, _depth)?;
13316 Ok(())
13317 }
13318 }
13319
13320 impl fidl::encoding::ValueTypeMarker for MixedFieldsMessage {
13321 type Borrowed<'a> = &'a Self;
13322 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13323 value
13324 }
13325 }
13326
13327 unsafe impl fidl::encoding::TypeMarker for MixedFieldsMessage {
13328 type Owned = Self;
13329
13330 #[inline(always)]
13331 fn inline_align(_context: fidl::encoding::Context) -> usize {
13332 8
13333 }
13334
13335 #[inline(always)]
13336 fn inline_size(_context: fidl::encoding::Context) -> usize {
13337 80
13338 }
13339 }
13340
13341 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MixedFieldsMessage, D>
13342 for &MixedFieldsMessage
13343 {
13344 #[inline]
13345 unsafe fn encode(
13346 self,
13347 encoder: &mut fidl::encoding::Encoder<'_, D>,
13348 offset: usize,
13349 _depth: fidl::encoding::Depth,
13350 ) -> fidl::Result<()> {
13351 encoder.debug_check_bounds::<MixedFieldsMessage>(offset);
13352 fidl::encoding::Encode::<MixedFieldsMessage, D>::encode(
13354 (
13355 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
13356 <MixedFieldsBody as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
13357 ),
13358 encoder,
13359 offset,
13360 _depth,
13361 )
13362 }
13363 }
13364 unsafe impl<
13365 D: fidl::encoding::ResourceDialect,
13366 T0: fidl::encoding::Encode<TransactionHeader, D>,
13367 T1: fidl::encoding::Encode<MixedFieldsBody, D>,
13368 > fidl::encoding::Encode<MixedFieldsMessage, D> for (T0, T1)
13369 {
13370 #[inline]
13371 unsafe fn encode(
13372 self,
13373 encoder: &mut fidl::encoding::Encoder<'_, D>,
13374 offset: usize,
13375 depth: fidl::encoding::Depth,
13376 ) -> fidl::Result<()> {
13377 encoder.debug_check_bounds::<MixedFieldsMessage>(offset);
13378 self.0.encode(encoder, offset + 0, depth)?;
13382 self.1.encode(encoder, offset + 16, depth)?;
13383 Ok(())
13384 }
13385 }
13386
13387 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MixedFieldsMessage {
13388 #[inline(always)]
13389 fn new_empty() -> Self {
13390 Self {
13391 header: fidl::new_empty!(TransactionHeader, D),
13392 body: fidl::new_empty!(MixedFieldsBody, D),
13393 }
13394 }
13395
13396 #[inline]
13397 unsafe fn decode(
13398 &mut self,
13399 decoder: &mut fidl::encoding::Decoder<'_, D>,
13400 offset: usize,
13401 _depth: fidl::encoding::Depth,
13402 ) -> fidl::Result<()> {
13403 decoder.debug_check_bounds::<Self>(offset);
13404 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
13406 fidl::decode!(MixedFieldsBody, D, &mut self.body, decoder, offset + 16, _depth)?;
13407 Ok(())
13408 }
13409 }
13410
13411 impl fidl::encoding::ValueTypeMarker for MultipleBoundedNonnullableVectorsOfUint32s {
13412 type Borrowed<'a> = &'a Self;
13413 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13414 value
13415 }
13416 }
13417
13418 unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNonnullableVectorsOfUint32s {
13419 type Owned = Self;
13420
13421 #[inline(always)]
13422 fn inline_align(_context: fidl::encoding::Context) -> usize {
13423 8
13424 }
13425
13426 #[inline(always)]
13427 fn inline_size(_context: fidl::encoding::Context) -> usize {
13428 32
13429 }
13430 }
13431
13432 unsafe impl<D: fidl::encoding::ResourceDialect>
13433 fidl::encoding::Encode<MultipleBoundedNonnullableVectorsOfUint32s, D>
13434 for &MultipleBoundedNonnullableVectorsOfUint32s
13435 {
13436 #[inline]
13437 unsafe fn encode(
13438 self,
13439 encoder: &mut fidl::encoding::Encoder<'_, D>,
13440 offset: usize,
13441 _depth: fidl::encoding::Depth,
13442 ) -> fidl::Result<()> {
13443 encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfUint32s>(offset);
13444 fidl::encoding::Encode::<MultipleBoundedNonnullableVectorsOfUint32s, D>::encode(
13446 (
13447 <fidl::encoding::Vector<u32, 2> as fidl::encoding::ValueTypeMarker>::borrow(
13448 &self.vu0,
13449 ),
13450 <fidl::encoding::Vector<u32, 32> as fidl::encoding::ValueTypeMarker>::borrow(
13451 &self.vu1,
13452 ),
13453 ),
13454 encoder,
13455 offset,
13456 _depth,
13457 )
13458 }
13459 }
13460 unsafe impl<
13461 D: fidl::encoding::ResourceDialect,
13462 T0: fidl::encoding::Encode<fidl::encoding::Vector<u32, 2>, D>,
13463 T1: fidl::encoding::Encode<fidl::encoding::Vector<u32, 32>, D>,
13464 > fidl::encoding::Encode<MultipleBoundedNonnullableVectorsOfUint32s, D> for (T0, T1)
13465 {
13466 #[inline]
13467 unsafe fn encode(
13468 self,
13469 encoder: &mut fidl::encoding::Encoder<'_, D>,
13470 offset: usize,
13471 depth: fidl::encoding::Depth,
13472 ) -> fidl::Result<()> {
13473 encoder.debug_check_bounds::<MultipleBoundedNonnullableVectorsOfUint32s>(offset);
13474 self.0.encode(encoder, offset + 0, depth)?;
13478 self.1.encode(encoder, offset + 16, depth)?;
13479 Ok(())
13480 }
13481 }
13482
13483 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13484 for MultipleBoundedNonnullableVectorsOfUint32s
13485 {
13486 #[inline(always)]
13487 fn new_empty() -> Self {
13488 Self {
13489 vu0: fidl::new_empty!(fidl::encoding::Vector<u32, 2>, D),
13490 vu1: fidl::new_empty!(fidl::encoding::Vector<u32, 32>, D),
13491 }
13492 }
13493
13494 #[inline]
13495 unsafe fn decode(
13496 &mut self,
13497 decoder: &mut fidl::encoding::Decoder<'_, D>,
13498 offset: usize,
13499 _depth: fidl::encoding::Depth,
13500 ) -> fidl::Result<()> {
13501 decoder.debug_check_bounds::<Self>(offset);
13502 fidl::decode!(fidl::encoding::Vector<u32, 2>, D, &mut self.vu0, decoder, offset + 0, _depth)?;
13504 fidl::decode!(fidl::encoding::Vector<u32, 32>, D, &mut self.vu1, decoder, offset + 16, _depth)?;
13505 Ok(())
13506 }
13507 }
13508
13509 impl fidl::encoding::ValueTypeMarker for MultipleBoundedNullableVectorsOfUint32s {
13510 type Borrowed<'a> = &'a Self;
13511 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13512 value
13513 }
13514 }
13515
13516 unsafe impl fidl::encoding::TypeMarker for MultipleBoundedNullableVectorsOfUint32s {
13517 type Owned = Self;
13518
13519 #[inline(always)]
13520 fn inline_align(_context: fidl::encoding::Context) -> usize {
13521 8
13522 }
13523
13524 #[inline(always)]
13525 fn inline_size(_context: fidl::encoding::Context) -> usize {
13526 32
13527 }
13528 }
13529
13530 unsafe impl<D: fidl::encoding::ResourceDialect>
13531 fidl::encoding::Encode<MultipleBoundedNullableVectorsOfUint32s, D>
13532 for &MultipleBoundedNullableVectorsOfUint32s
13533 {
13534 #[inline]
13535 unsafe fn encode(
13536 self,
13537 encoder: &mut fidl::encoding::Encoder<'_, D>,
13538 offset: usize,
13539 _depth: fidl::encoding::Depth,
13540 ) -> fidl::Result<()> {
13541 encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfUint32s>(offset);
13542 fidl::encoding::Encode::<MultipleBoundedNullableVectorsOfUint32s, D>::encode(
13544 (
13545 <fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
13546 <fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu1),
13547 ),
13548 encoder, offset, _depth
13549 )
13550 }
13551 }
13552 unsafe impl<
13553 D: fidl::encoding::ResourceDialect,
13554 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>, D>,
13555 T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D>,
13556 > fidl::encoding::Encode<MultipleBoundedNullableVectorsOfUint32s, D> for (T0, T1)
13557 {
13558 #[inline]
13559 unsafe fn encode(
13560 self,
13561 encoder: &mut fidl::encoding::Encoder<'_, D>,
13562 offset: usize,
13563 depth: fidl::encoding::Depth,
13564 ) -> fidl::Result<()> {
13565 encoder.debug_check_bounds::<MultipleBoundedNullableVectorsOfUint32s>(offset);
13566 self.0.encode(encoder, offset + 0, depth)?;
13570 self.1.encode(encoder, offset + 16, depth)?;
13571 Ok(())
13572 }
13573 }
13574
13575 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13576 for MultipleBoundedNullableVectorsOfUint32s
13577 {
13578 #[inline(always)]
13579 fn new_empty() -> Self {
13580 Self {
13581 vu0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>, D),
13582 vu1: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>, D),
13583 }
13584 }
13585
13586 #[inline]
13587 unsafe fn decode(
13588 &mut self,
13589 decoder: &mut fidl::encoding::Decoder<'_, D>,
13590 offset: usize,
13591 _depth: fidl::encoding::Depth,
13592 ) -> fidl::Result<()> {
13593 decoder.debug_check_bounds::<Self>(offset);
13594 fidl::decode!(
13596 fidl::encoding::Optional<fidl::encoding::Vector<u32, 2>>,
13597 D,
13598 &mut self.vu0,
13599 decoder,
13600 offset + 0,
13601 _depth
13602 )?;
13603 fidl::decode!(
13604 fidl::encoding::Optional<fidl::encoding::Vector<u32, 32>>,
13605 D,
13606 &mut self.vu1,
13607 decoder,
13608 offset + 16,
13609 _depth
13610 )?;
13611 Ok(())
13612 }
13613 }
13614
13615 impl fidl::encoding::ValueTypeMarker for MultipleNonnullableStrings {
13616 type Borrowed<'a> = &'a Self;
13617 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13618 value
13619 }
13620 }
13621
13622 unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableStrings {
13623 type Owned = Self;
13624
13625 #[inline(always)]
13626 fn inline_align(_context: fidl::encoding::Context) -> usize {
13627 8
13628 }
13629
13630 #[inline(always)]
13631 fn inline_size(_context: fidl::encoding::Context) -> usize {
13632 32
13633 }
13634 }
13635
13636 unsafe impl<D: fidl::encoding::ResourceDialect>
13637 fidl::encoding::Encode<MultipleNonnullableStrings, D> for &MultipleNonnullableStrings
13638 {
13639 #[inline]
13640 unsafe fn encode(
13641 self,
13642 encoder: &mut fidl::encoding::Encoder<'_, D>,
13643 offset: usize,
13644 _depth: fidl::encoding::Depth,
13645 ) -> fidl::Result<()> {
13646 encoder.debug_check_bounds::<MultipleNonnullableStrings>(offset);
13647 fidl::encoding::Encode::<MultipleNonnullableStrings, D>::encode(
13649 (
13650 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
13651 &self.s0,
13652 ),
13653 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
13654 &self.s1,
13655 ),
13656 ),
13657 encoder,
13658 offset,
13659 _depth,
13660 )
13661 }
13662 }
13663 unsafe impl<
13664 D: fidl::encoding::ResourceDialect,
13665 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
13666 T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
13667 > fidl::encoding::Encode<MultipleNonnullableStrings, D> for (T0, T1)
13668 {
13669 #[inline]
13670 unsafe fn encode(
13671 self,
13672 encoder: &mut fidl::encoding::Encoder<'_, D>,
13673 offset: usize,
13674 depth: fidl::encoding::Depth,
13675 ) -> fidl::Result<()> {
13676 encoder.debug_check_bounds::<MultipleNonnullableStrings>(offset);
13677 self.0.encode(encoder, offset + 0, depth)?;
13681 self.1.encode(encoder, offset + 16, depth)?;
13682 Ok(())
13683 }
13684 }
13685
13686 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13687 for MultipleNonnullableStrings
13688 {
13689 #[inline(always)]
13690 fn new_empty() -> Self {
13691 Self {
13692 s0: fidl::new_empty!(fidl::encoding::UnboundedString, D),
13693 s1: fidl::new_empty!(fidl::encoding::UnboundedString, D),
13694 }
13695 }
13696
13697 #[inline]
13698 unsafe fn decode(
13699 &mut self,
13700 decoder: &mut fidl::encoding::Decoder<'_, D>,
13701 offset: usize,
13702 _depth: fidl::encoding::Depth,
13703 ) -> fidl::Result<()> {
13704 decoder.debug_check_bounds::<Self>(offset);
13705 fidl::decode!(
13707 fidl::encoding::UnboundedString,
13708 D,
13709 &mut self.s0,
13710 decoder,
13711 offset + 0,
13712 _depth
13713 )?;
13714 fidl::decode!(
13715 fidl::encoding::UnboundedString,
13716 D,
13717 &mut self.s1,
13718 decoder,
13719 offset + 16,
13720 _depth
13721 )?;
13722 Ok(())
13723 }
13724 }
13725
13726 impl fidl::encoding::ValueTypeMarker for MultipleNonnullableVectorsOfUint32s {
13727 type Borrowed<'a> = &'a Self;
13728 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13729 value
13730 }
13731 }
13732
13733 unsafe impl fidl::encoding::TypeMarker for MultipleNonnullableVectorsOfUint32s {
13734 type Owned = Self;
13735
13736 #[inline(always)]
13737 fn inline_align(_context: fidl::encoding::Context) -> usize {
13738 8
13739 }
13740
13741 #[inline(always)]
13742 fn inline_size(_context: fidl::encoding::Context) -> usize {
13743 32
13744 }
13745 }
13746
13747 unsafe impl<D: fidl::encoding::ResourceDialect>
13748 fidl::encoding::Encode<MultipleNonnullableVectorsOfUint32s, D>
13749 for &MultipleNonnullableVectorsOfUint32s
13750 {
13751 #[inline]
13752 unsafe fn encode(
13753 self,
13754 encoder: &mut fidl::encoding::Encoder<'_, D>,
13755 offset: usize,
13756 _depth: fidl::encoding::Depth,
13757 ) -> fidl::Result<()> {
13758 encoder.debug_check_bounds::<MultipleNonnullableVectorsOfUint32s>(offset);
13759 fidl::encoding::Encode::<MultipleNonnullableVectorsOfUint32s, D>::encode(
13761 (
13762 <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
13763 <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu1),
13764 ),
13765 encoder, offset, _depth
13766 )
13767 }
13768 }
13769 unsafe impl<
13770 D: fidl::encoding::ResourceDialect,
13771 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13772 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
13773 > fidl::encoding::Encode<MultipleNonnullableVectorsOfUint32s, D> for (T0, T1)
13774 {
13775 #[inline]
13776 unsafe fn encode(
13777 self,
13778 encoder: &mut fidl::encoding::Encoder<'_, D>,
13779 offset: usize,
13780 depth: fidl::encoding::Depth,
13781 ) -> fidl::Result<()> {
13782 encoder.debug_check_bounds::<MultipleNonnullableVectorsOfUint32s>(offset);
13783 self.0.encode(encoder, offset + 0, depth)?;
13787 self.1.encode(encoder, offset + 16, depth)?;
13788 Ok(())
13789 }
13790 }
13791
13792 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13793 for MultipleNonnullableVectorsOfUint32s
13794 {
13795 #[inline(always)]
13796 fn new_empty() -> Self {
13797 Self {
13798 vu0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13799 vu1: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D),
13800 }
13801 }
13802
13803 #[inline]
13804 unsafe fn decode(
13805 &mut self,
13806 decoder: &mut fidl::encoding::Decoder<'_, D>,
13807 offset: usize,
13808 _depth: fidl::encoding::Depth,
13809 ) -> fidl::Result<()> {
13810 decoder.debug_check_bounds::<Self>(offset);
13811 fidl::decode!(
13813 fidl::encoding::UnboundedVector<u32>,
13814 D,
13815 &mut self.vu0,
13816 decoder,
13817 offset + 0,
13818 _depth
13819 )?;
13820 fidl::decode!(
13821 fidl::encoding::UnboundedVector<u32>,
13822 D,
13823 &mut self.vu1,
13824 decoder,
13825 offset + 16,
13826 _depth
13827 )?;
13828 Ok(())
13829 }
13830 }
13831
13832 impl fidl::encoding::ValueTypeMarker for MultipleNullableStrings {
13833 type Borrowed<'a> = &'a Self;
13834 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13835 value
13836 }
13837 }
13838
13839 unsafe impl fidl::encoding::TypeMarker for MultipleNullableStrings {
13840 type Owned = Self;
13841
13842 #[inline(always)]
13843 fn inline_align(_context: fidl::encoding::Context) -> usize {
13844 8
13845 }
13846
13847 #[inline(always)]
13848 fn inline_size(_context: fidl::encoding::Context) -> usize {
13849 32
13850 }
13851 }
13852
13853 unsafe impl<D: fidl::encoding::ResourceDialect>
13854 fidl::encoding::Encode<MultipleNullableStrings, D> for &MultipleNullableStrings
13855 {
13856 #[inline]
13857 unsafe fn encode(
13858 self,
13859 encoder: &mut fidl::encoding::Encoder<'_, D>,
13860 offset: usize,
13861 _depth: fidl::encoding::Depth,
13862 ) -> fidl::Result<()> {
13863 encoder.debug_check_bounds::<MultipleNullableStrings>(offset);
13864 fidl::encoding::Encode::<MultipleNullableStrings, D>::encode(
13866 (
13867 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
13868 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s1),
13869 ),
13870 encoder, offset, _depth
13871 )
13872 }
13873 }
13874 unsafe impl<
13875 D: fidl::encoding::ResourceDialect,
13876 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
13877 T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
13878 > fidl::encoding::Encode<MultipleNullableStrings, D> for (T0, T1)
13879 {
13880 #[inline]
13881 unsafe fn encode(
13882 self,
13883 encoder: &mut fidl::encoding::Encoder<'_, D>,
13884 offset: usize,
13885 depth: fidl::encoding::Depth,
13886 ) -> fidl::Result<()> {
13887 encoder.debug_check_bounds::<MultipleNullableStrings>(offset);
13888 self.0.encode(encoder, offset + 0, depth)?;
13892 self.1.encode(encoder, offset + 16, depth)?;
13893 Ok(())
13894 }
13895 }
13896
13897 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
13898 for MultipleNullableStrings
13899 {
13900 #[inline(always)]
13901 fn new_empty() -> Self {
13902 Self {
13903 s0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
13904 s1: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
13905 }
13906 }
13907
13908 #[inline]
13909 unsafe fn decode(
13910 &mut self,
13911 decoder: &mut fidl::encoding::Decoder<'_, D>,
13912 offset: usize,
13913 _depth: fidl::encoding::Depth,
13914 ) -> fidl::Result<()> {
13915 decoder.debug_check_bounds::<Self>(offset);
13916 fidl::decode!(
13918 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13919 D,
13920 &mut self.s0,
13921 decoder,
13922 offset + 0,
13923 _depth
13924 )?;
13925 fidl::decode!(
13926 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13927 D,
13928 &mut self.s1,
13929 decoder,
13930 offset + 16,
13931 _depth
13932 )?;
13933 Ok(())
13934 }
13935 }
13936
13937 impl fidl::encoding::ValueTypeMarker for MultipleShortNonnullableStrings {
13938 type Borrowed<'a> = &'a Self;
13939 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13940 value
13941 }
13942 }
13943
13944 unsafe impl fidl::encoding::TypeMarker for MultipleShortNonnullableStrings {
13945 type Owned = Self;
13946
13947 #[inline(always)]
13948 fn inline_align(_context: fidl::encoding::Context) -> usize {
13949 8
13950 }
13951
13952 #[inline(always)]
13953 fn inline_size(_context: fidl::encoding::Context) -> usize {
13954 32
13955 }
13956 }
13957
13958 unsafe impl<D: fidl::encoding::ResourceDialect>
13959 fidl::encoding::Encode<MultipleShortNonnullableStrings, D>
13960 for &MultipleShortNonnullableStrings
13961 {
13962 #[inline]
13963 unsafe fn encode(
13964 self,
13965 encoder: &mut fidl::encoding::Encoder<'_, D>,
13966 offset: usize,
13967 _depth: fidl::encoding::Depth,
13968 ) -> fidl::Result<()> {
13969 encoder.debug_check_bounds::<MultipleShortNonnullableStrings>(offset);
13970 fidl::encoding::Encode::<MultipleShortNonnullableStrings, D>::encode(
13972 (
13973 <fidl::encoding::BoundedString<4> as fidl::encoding::ValueTypeMarker>::borrow(
13974 &self.s0,
13975 ),
13976 <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
13977 &self.s1,
13978 ),
13979 ),
13980 encoder,
13981 offset,
13982 _depth,
13983 )
13984 }
13985 }
13986 unsafe impl<
13987 D: fidl::encoding::ResourceDialect,
13988 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4>, D>,
13989 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
13990 > fidl::encoding::Encode<MultipleShortNonnullableStrings, D> for (T0, T1)
13991 {
13992 #[inline]
13993 unsafe fn encode(
13994 self,
13995 encoder: &mut fidl::encoding::Encoder<'_, D>,
13996 offset: usize,
13997 depth: fidl::encoding::Depth,
13998 ) -> fidl::Result<()> {
13999 encoder.debug_check_bounds::<MultipleShortNonnullableStrings>(offset);
14000 self.0.encode(encoder, offset + 0, depth)?;
14004 self.1.encode(encoder, offset + 16, depth)?;
14005 Ok(())
14006 }
14007 }
14008
14009 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14010 for MultipleShortNonnullableStrings
14011 {
14012 #[inline(always)]
14013 fn new_empty() -> Self {
14014 Self {
14015 s0: fidl::new_empty!(fidl::encoding::BoundedString<4>, D),
14016 s1: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
14017 }
14018 }
14019
14020 #[inline]
14021 unsafe fn decode(
14022 &mut self,
14023 decoder: &mut fidl::encoding::Decoder<'_, D>,
14024 offset: usize,
14025 _depth: fidl::encoding::Depth,
14026 ) -> fidl::Result<()> {
14027 decoder.debug_check_bounds::<Self>(offset);
14028 fidl::decode!(
14030 fidl::encoding::BoundedString<4>,
14031 D,
14032 &mut self.s0,
14033 decoder,
14034 offset + 0,
14035 _depth
14036 )?;
14037 fidl::decode!(
14038 fidl::encoding::BoundedString<32>,
14039 D,
14040 &mut self.s1,
14041 decoder,
14042 offset + 16,
14043 _depth
14044 )?;
14045 Ok(())
14046 }
14047 }
14048
14049 impl fidl::encoding::ValueTypeMarker for MultipleShortNullableStrings {
14050 type Borrowed<'a> = &'a Self;
14051 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14052 value
14053 }
14054 }
14055
14056 unsafe impl fidl::encoding::TypeMarker for MultipleShortNullableStrings {
14057 type Owned = Self;
14058
14059 #[inline(always)]
14060 fn inline_align(_context: fidl::encoding::Context) -> usize {
14061 8
14062 }
14063
14064 #[inline(always)]
14065 fn inline_size(_context: fidl::encoding::Context) -> usize {
14066 32
14067 }
14068 }
14069
14070 unsafe impl<D: fidl::encoding::ResourceDialect>
14071 fidl::encoding::Encode<MultipleShortNullableStrings, D> for &MultipleShortNullableStrings
14072 {
14073 #[inline]
14074 unsafe fn encode(
14075 self,
14076 encoder: &mut fidl::encoding::Encoder<'_, D>,
14077 offset: usize,
14078 _depth: fidl::encoding::Depth,
14079 ) -> fidl::Result<()> {
14080 encoder.debug_check_bounds::<MultipleShortNullableStrings>(offset);
14081 fidl::encoding::Encode::<MultipleShortNullableStrings, D>::encode(
14083 (
14084 <fidl::encoding::BoundedString<4> as fidl::encoding::ValueTypeMarker>::borrow(
14085 &self.s0,
14086 ),
14087 <fidl::encoding::BoundedString<32> as fidl::encoding::ValueTypeMarker>::borrow(
14088 &self.s1,
14089 ),
14090 ),
14091 encoder,
14092 offset,
14093 _depth,
14094 )
14095 }
14096 }
14097 unsafe impl<
14098 D: fidl::encoding::ResourceDialect,
14099 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4>, D>,
14100 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<32>, D>,
14101 > fidl::encoding::Encode<MultipleShortNullableStrings, D> for (T0, T1)
14102 {
14103 #[inline]
14104 unsafe fn encode(
14105 self,
14106 encoder: &mut fidl::encoding::Encoder<'_, D>,
14107 offset: usize,
14108 depth: fidl::encoding::Depth,
14109 ) -> fidl::Result<()> {
14110 encoder.debug_check_bounds::<MultipleShortNullableStrings>(offset);
14111 self.0.encode(encoder, offset + 0, depth)?;
14115 self.1.encode(encoder, offset + 16, depth)?;
14116 Ok(())
14117 }
14118 }
14119
14120 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14121 for MultipleShortNullableStrings
14122 {
14123 #[inline(always)]
14124 fn new_empty() -> Self {
14125 Self {
14126 s0: fidl::new_empty!(fidl::encoding::BoundedString<4>, D),
14127 s1: fidl::new_empty!(fidl::encoding::BoundedString<32>, D),
14128 }
14129 }
14130
14131 #[inline]
14132 unsafe fn decode(
14133 &mut self,
14134 decoder: &mut fidl::encoding::Decoder<'_, D>,
14135 offset: usize,
14136 _depth: fidl::encoding::Depth,
14137 ) -> fidl::Result<()> {
14138 decoder.debug_check_bounds::<Self>(offset);
14139 fidl::decode!(
14141 fidl::encoding::BoundedString<4>,
14142 D,
14143 &mut self.s0,
14144 decoder,
14145 offset + 0,
14146 _depth
14147 )?;
14148 fidl::decode!(
14149 fidl::encoding::BoundedString<32>,
14150 D,
14151 &mut self.s1,
14152 decoder,
14153 offset + 16,
14154 _depth
14155 )?;
14156 Ok(())
14157 }
14158 }
14159
14160 impl fidl::encoding::ValueTypeMarker for MutualRecursionUnionStruct {
14161 type Borrowed<'a> = &'a Self;
14162 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14163 value
14164 }
14165 }
14166
14167 unsafe impl fidl::encoding::TypeMarker for MutualRecursionUnionStruct {
14168 type Owned = Self;
14169
14170 #[inline(always)]
14171 fn inline_align(_context: fidl::encoding::Context) -> usize {
14172 8
14173 }
14174
14175 #[inline(always)]
14176 fn inline_size(_context: fidl::encoding::Context) -> usize {
14177 16
14178 }
14179 }
14180
14181 unsafe impl<D: fidl::encoding::ResourceDialect>
14182 fidl::encoding::Encode<MutualRecursionUnionStruct, D> for &MutualRecursionUnionStruct
14183 {
14184 #[inline]
14185 unsafe fn encode(
14186 self,
14187 encoder: &mut fidl::encoding::Encoder<'_, D>,
14188 offset: usize,
14189 _depth: fidl::encoding::Depth,
14190 ) -> fidl::Result<()> {
14191 encoder.debug_check_bounds::<MutualRecursionUnionStruct>(offset);
14192 fidl::encoding::Encode::<MutualRecursionUnionStruct, D>::encode(
14194 (
14195 <fidl::encoding::OptionalUnion<MutualRecursionUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
14196 ),
14197 encoder, offset, _depth
14198 )
14199 }
14200 }
14201 unsafe impl<
14202 D: fidl::encoding::ResourceDialect,
14203 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<MutualRecursionUnion>, D>,
14204 > fidl::encoding::Encode<MutualRecursionUnionStruct, D> for (T0,)
14205 {
14206 #[inline]
14207 unsafe fn encode(
14208 self,
14209 encoder: &mut fidl::encoding::Encoder<'_, D>,
14210 offset: usize,
14211 depth: fidl::encoding::Depth,
14212 ) -> fidl::Result<()> {
14213 encoder.debug_check_bounds::<MutualRecursionUnionStruct>(offset);
14214 self.0.encode(encoder, offset + 0, depth)?;
14218 Ok(())
14219 }
14220 }
14221
14222 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14223 for MutualRecursionUnionStruct
14224 {
14225 #[inline(always)]
14226 fn new_empty() -> Self {
14227 Self { u: fidl::new_empty!(fidl::encoding::OptionalUnion<MutualRecursionUnion>, D) }
14228 }
14229
14230 #[inline]
14231 unsafe fn decode(
14232 &mut self,
14233 decoder: &mut fidl::encoding::Decoder<'_, D>,
14234 offset: usize,
14235 _depth: fidl::encoding::Depth,
14236 ) -> fidl::Result<()> {
14237 decoder.debug_check_bounds::<Self>(offset);
14238 fidl::decode!(
14240 fidl::encoding::OptionalUnion<MutualRecursionUnion>,
14241 D,
14242 &mut self.u,
14243 decoder,
14244 offset + 0,
14245 _depth
14246 )?;
14247 Ok(())
14248 }
14249 }
14250
14251 impl fidl::encoding::ValueTypeMarker for MyBool {
14252 type Borrowed<'a> = &'a Self;
14253 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14254 value
14255 }
14256 }
14257
14258 unsafe impl fidl::encoding::TypeMarker for MyBool {
14259 type Owned = Self;
14260
14261 #[inline(always)]
14262 fn inline_align(_context: fidl::encoding::Context) -> usize {
14263 1
14264 }
14265
14266 #[inline(always)]
14267 fn inline_size(_context: fidl::encoding::Context) -> usize {
14268 1
14269 }
14270 }
14271
14272 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyBool, D> for &MyBool {
14273 #[inline]
14274 unsafe fn encode(
14275 self,
14276 encoder: &mut fidl::encoding::Encoder<'_, D>,
14277 offset: usize,
14278 _depth: fidl::encoding::Depth,
14279 ) -> fidl::Result<()> {
14280 encoder.debug_check_bounds::<MyBool>(offset);
14281 fidl::encoding::Encode::<MyBool, D>::encode(
14283 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14284 encoder,
14285 offset,
14286 _depth,
14287 )
14288 }
14289 }
14290 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
14291 fidl::encoding::Encode<MyBool, D> for (T0,)
14292 {
14293 #[inline]
14294 unsafe fn encode(
14295 self,
14296 encoder: &mut fidl::encoding::Encoder<'_, D>,
14297 offset: usize,
14298 depth: fidl::encoding::Depth,
14299 ) -> fidl::Result<()> {
14300 encoder.debug_check_bounds::<MyBool>(offset);
14301 self.0.encode(encoder, offset + 0, depth)?;
14305 Ok(())
14306 }
14307 }
14308
14309 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyBool {
14310 #[inline(always)]
14311 fn new_empty() -> Self {
14312 Self { value: fidl::new_empty!(bool, D) }
14313 }
14314
14315 #[inline]
14316 unsafe fn decode(
14317 &mut self,
14318 decoder: &mut fidl::encoding::Decoder<'_, D>,
14319 offset: usize,
14320 _depth: fidl::encoding::Depth,
14321 ) -> fidl::Result<()> {
14322 decoder.debug_check_bounds::<Self>(offset);
14323 fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
14325 Ok(())
14326 }
14327 }
14328
14329 impl fidl::encoding::ValueTypeMarker for MyByte {
14330 type Borrowed<'a> = &'a Self;
14331 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14332 value
14333 }
14334 }
14335
14336 unsafe impl fidl::encoding::TypeMarker for MyByte {
14337 type Owned = Self;
14338
14339 #[inline(always)]
14340 fn inline_align(_context: fidl::encoding::Context) -> usize {
14341 1
14342 }
14343
14344 #[inline(always)]
14345 fn inline_size(_context: fidl::encoding::Context) -> usize {
14346 1
14347 }
14348 #[inline(always)]
14349 fn encode_is_copy() -> bool {
14350 true
14351 }
14352
14353 #[inline(always)]
14354 fn decode_is_copy() -> bool {
14355 true
14356 }
14357 }
14358
14359 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyByte, D> for &MyByte {
14360 #[inline]
14361 unsafe fn encode(
14362 self,
14363 encoder: &mut fidl::encoding::Encoder<'_, D>,
14364 offset: usize,
14365 _depth: fidl::encoding::Depth,
14366 ) -> fidl::Result<()> {
14367 encoder.debug_check_bounds::<MyByte>(offset);
14368 unsafe {
14369 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14371 (buf_ptr as *mut MyByte).write_unaligned((self as *const MyByte).read());
14372 }
14375 Ok(())
14376 }
14377 }
14378 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
14379 fidl::encoding::Encode<MyByte, D> for (T0,)
14380 {
14381 #[inline]
14382 unsafe fn encode(
14383 self,
14384 encoder: &mut fidl::encoding::Encoder<'_, D>,
14385 offset: usize,
14386 depth: fidl::encoding::Depth,
14387 ) -> fidl::Result<()> {
14388 encoder.debug_check_bounds::<MyByte>(offset);
14389 self.0.encode(encoder, offset + 0, depth)?;
14393 Ok(())
14394 }
14395 }
14396
14397 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyByte {
14398 #[inline(always)]
14399 fn new_empty() -> Self {
14400 Self { value: fidl::new_empty!(u8, D) }
14401 }
14402
14403 #[inline]
14404 unsafe fn decode(
14405 &mut self,
14406 decoder: &mut fidl::encoding::Decoder<'_, D>,
14407 offset: usize,
14408 _depth: fidl::encoding::Depth,
14409 ) -> fidl::Result<()> {
14410 decoder.debug_check_bounds::<Self>(offset);
14411 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14412 unsafe {
14415 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
14416 }
14417 Ok(())
14418 }
14419 }
14420
14421 impl fidl::encoding::ValueTypeMarker for MyFloat32 {
14422 type Borrowed<'a> = &'a Self;
14423 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14424 value
14425 }
14426 }
14427
14428 unsafe impl fidl::encoding::TypeMarker for MyFloat32 {
14429 type Owned = Self;
14430
14431 #[inline(always)]
14432 fn inline_align(_context: fidl::encoding::Context) -> usize {
14433 4
14434 }
14435
14436 #[inline(always)]
14437 fn inline_size(_context: fidl::encoding::Context) -> usize {
14438 4
14439 }
14440 }
14441
14442 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyFloat32, D>
14443 for &MyFloat32
14444 {
14445 #[inline]
14446 unsafe fn encode(
14447 self,
14448 encoder: &mut fidl::encoding::Encoder<'_, D>,
14449 offset: usize,
14450 _depth: fidl::encoding::Depth,
14451 ) -> fidl::Result<()> {
14452 encoder.debug_check_bounds::<MyFloat32>(offset);
14453 fidl::encoding::Encode::<MyFloat32, D>::encode(
14455 (<f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14456 encoder,
14457 offset,
14458 _depth,
14459 )
14460 }
14461 }
14462 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f32, D>>
14463 fidl::encoding::Encode<MyFloat32, D> for (T0,)
14464 {
14465 #[inline]
14466 unsafe fn encode(
14467 self,
14468 encoder: &mut fidl::encoding::Encoder<'_, D>,
14469 offset: usize,
14470 depth: fidl::encoding::Depth,
14471 ) -> fidl::Result<()> {
14472 encoder.debug_check_bounds::<MyFloat32>(offset);
14473 self.0.encode(encoder, offset + 0, depth)?;
14477 Ok(())
14478 }
14479 }
14480
14481 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyFloat32 {
14482 #[inline(always)]
14483 fn new_empty() -> Self {
14484 Self { value: fidl::new_empty!(f32, D) }
14485 }
14486
14487 #[inline]
14488 unsafe fn decode(
14489 &mut self,
14490 decoder: &mut fidl::encoding::Decoder<'_, D>,
14491 offset: usize,
14492 _depth: fidl::encoding::Depth,
14493 ) -> fidl::Result<()> {
14494 decoder.debug_check_bounds::<Self>(offset);
14495 fidl::decode!(f32, D, &mut self.value, decoder, offset + 0, _depth)?;
14497 Ok(())
14498 }
14499 }
14500
14501 impl fidl::encoding::ValueTypeMarker for MyFloat64 {
14502 type Borrowed<'a> = &'a Self;
14503 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14504 value
14505 }
14506 }
14507
14508 unsafe impl fidl::encoding::TypeMarker for MyFloat64 {
14509 type Owned = Self;
14510
14511 #[inline(always)]
14512 fn inline_align(_context: fidl::encoding::Context) -> usize {
14513 8
14514 }
14515
14516 #[inline(always)]
14517 fn inline_size(_context: fidl::encoding::Context) -> usize {
14518 8
14519 }
14520 }
14521
14522 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyFloat64, D>
14523 for &MyFloat64
14524 {
14525 #[inline]
14526 unsafe fn encode(
14527 self,
14528 encoder: &mut fidl::encoding::Encoder<'_, D>,
14529 offset: usize,
14530 _depth: fidl::encoding::Depth,
14531 ) -> fidl::Result<()> {
14532 encoder.debug_check_bounds::<MyFloat64>(offset);
14533 fidl::encoding::Encode::<MyFloat64, D>::encode(
14535 (<f64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
14536 encoder,
14537 offset,
14538 _depth,
14539 )
14540 }
14541 }
14542 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<f64, D>>
14543 fidl::encoding::Encode<MyFloat64, D> for (T0,)
14544 {
14545 #[inline]
14546 unsafe fn encode(
14547 self,
14548 encoder: &mut fidl::encoding::Encoder<'_, D>,
14549 offset: usize,
14550 depth: fidl::encoding::Depth,
14551 ) -> fidl::Result<()> {
14552 encoder.debug_check_bounds::<MyFloat64>(offset);
14553 self.0.encode(encoder, offset + 0, depth)?;
14557 Ok(())
14558 }
14559 }
14560
14561 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyFloat64 {
14562 #[inline(always)]
14563 fn new_empty() -> Self {
14564 Self { value: fidl::new_empty!(f64, D) }
14565 }
14566
14567 #[inline]
14568 unsafe fn decode(
14569 &mut self,
14570 decoder: &mut fidl::encoding::Decoder<'_, D>,
14571 offset: usize,
14572 _depth: fidl::encoding::Depth,
14573 ) -> fidl::Result<()> {
14574 decoder.debug_check_bounds::<Self>(offset);
14575 fidl::decode!(f64, D, &mut self.value, decoder, offset + 0, _depth)?;
14577 Ok(())
14578 }
14579 }
14580
14581 impl fidl::encoding::ValueTypeMarker for MyInt16 {
14582 type Borrowed<'a> = &'a Self;
14583 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14584 value
14585 }
14586 }
14587
14588 unsafe impl fidl::encoding::TypeMarker for MyInt16 {
14589 type Owned = Self;
14590
14591 #[inline(always)]
14592 fn inline_align(_context: fidl::encoding::Context) -> usize {
14593 2
14594 }
14595
14596 #[inline(always)]
14597 fn inline_size(_context: fidl::encoding::Context) -> usize {
14598 2
14599 }
14600 #[inline(always)]
14601 fn encode_is_copy() -> bool {
14602 true
14603 }
14604
14605 #[inline(always)]
14606 fn decode_is_copy() -> bool {
14607 true
14608 }
14609 }
14610
14611 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt16, D> for &MyInt16 {
14612 #[inline]
14613 unsafe fn encode(
14614 self,
14615 encoder: &mut fidl::encoding::Encoder<'_, D>,
14616 offset: usize,
14617 _depth: fidl::encoding::Depth,
14618 ) -> fidl::Result<()> {
14619 encoder.debug_check_bounds::<MyInt16>(offset);
14620 unsafe {
14621 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14623 (buf_ptr as *mut MyInt16).write_unaligned((self as *const MyInt16).read());
14624 }
14627 Ok(())
14628 }
14629 }
14630 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
14631 fidl::encoding::Encode<MyInt16, D> for (T0,)
14632 {
14633 #[inline]
14634 unsafe fn encode(
14635 self,
14636 encoder: &mut fidl::encoding::Encoder<'_, D>,
14637 offset: usize,
14638 depth: fidl::encoding::Depth,
14639 ) -> fidl::Result<()> {
14640 encoder.debug_check_bounds::<MyInt16>(offset);
14641 self.0.encode(encoder, offset + 0, depth)?;
14645 Ok(())
14646 }
14647 }
14648
14649 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt16 {
14650 #[inline(always)]
14651 fn new_empty() -> Self {
14652 Self { value: fidl::new_empty!(i16, D) }
14653 }
14654
14655 #[inline]
14656 unsafe fn decode(
14657 &mut self,
14658 decoder: &mut fidl::encoding::Decoder<'_, D>,
14659 offset: usize,
14660 _depth: fidl::encoding::Depth,
14661 ) -> fidl::Result<()> {
14662 decoder.debug_check_bounds::<Self>(offset);
14663 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14664 unsafe {
14667 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
14668 }
14669 Ok(())
14670 }
14671 }
14672
14673 impl fidl::encoding::ValueTypeMarker for MyInt32 {
14674 type Borrowed<'a> = &'a Self;
14675 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14676 value
14677 }
14678 }
14679
14680 unsafe impl fidl::encoding::TypeMarker for MyInt32 {
14681 type Owned = Self;
14682
14683 #[inline(always)]
14684 fn inline_align(_context: fidl::encoding::Context) -> usize {
14685 4
14686 }
14687
14688 #[inline(always)]
14689 fn inline_size(_context: fidl::encoding::Context) -> usize {
14690 4
14691 }
14692 #[inline(always)]
14693 fn encode_is_copy() -> bool {
14694 true
14695 }
14696
14697 #[inline(always)]
14698 fn decode_is_copy() -> bool {
14699 true
14700 }
14701 }
14702
14703 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt32, D> for &MyInt32 {
14704 #[inline]
14705 unsafe fn encode(
14706 self,
14707 encoder: &mut fidl::encoding::Encoder<'_, D>,
14708 offset: usize,
14709 _depth: fidl::encoding::Depth,
14710 ) -> fidl::Result<()> {
14711 encoder.debug_check_bounds::<MyInt32>(offset);
14712 unsafe {
14713 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14715 (buf_ptr as *mut MyInt32).write_unaligned((self as *const MyInt32).read());
14716 }
14719 Ok(())
14720 }
14721 }
14722 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
14723 fidl::encoding::Encode<MyInt32, D> for (T0,)
14724 {
14725 #[inline]
14726 unsafe fn encode(
14727 self,
14728 encoder: &mut fidl::encoding::Encoder<'_, D>,
14729 offset: usize,
14730 depth: fidl::encoding::Depth,
14731 ) -> fidl::Result<()> {
14732 encoder.debug_check_bounds::<MyInt32>(offset);
14733 self.0.encode(encoder, offset + 0, depth)?;
14737 Ok(())
14738 }
14739 }
14740
14741 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt32 {
14742 #[inline(always)]
14743 fn new_empty() -> Self {
14744 Self { value: fidl::new_empty!(i32, D) }
14745 }
14746
14747 #[inline]
14748 unsafe fn decode(
14749 &mut self,
14750 decoder: &mut fidl::encoding::Decoder<'_, D>,
14751 offset: usize,
14752 _depth: fidl::encoding::Depth,
14753 ) -> fidl::Result<()> {
14754 decoder.debug_check_bounds::<Self>(offset);
14755 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14756 unsafe {
14759 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14760 }
14761 Ok(())
14762 }
14763 }
14764
14765 impl fidl::encoding::ValueTypeMarker for MyInt64 {
14766 type Borrowed<'a> = &'a Self;
14767 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14768 value
14769 }
14770 }
14771
14772 unsafe impl fidl::encoding::TypeMarker for MyInt64 {
14773 type Owned = Self;
14774
14775 #[inline(always)]
14776 fn inline_align(_context: fidl::encoding::Context) -> usize {
14777 8
14778 }
14779
14780 #[inline(always)]
14781 fn inline_size(_context: fidl::encoding::Context) -> usize {
14782 8
14783 }
14784 #[inline(always)]
14785 fn encode_is_copy() -> bool {
14786 true
14787 }
14788
14789 #[inline(always)]
14790 fn decode_is_copy() -> bool {
14791 true
14792 }
14793 }
14794
14795 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt64, D> for &MyInt64 {
14796 #[inline]
14797 unsafe fn encode(
14798 self,
14799 encoder: &mut fidl::encoding::Encoder<'_, D>,
14800 offset: usize,
14801 _depth: fidl::encoding::Depth,
14802 ) -> fidl::Result<()> {
14803 encoder.debug_check_bounds::<MyInt64>(offset);
14804 unsafe {
14805 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14807 (buf_ptr as *mut MyInt64).write_unaligned((self as *const MyInt64).read());
14808 }
14811 Ok(())
14812 }
14813 }
14814 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
14815 fidl::encoding::Encode<MyInt64, D> for (T0,)
14816 {
14817 #[inline]
14818 unsafe fn encode(
14819 self,
14820 encoder: &mut fidl::encoding::Encoder<'_, D>,
14821 offset: usize,
14822 depth: fidl::encoding::Depth,
14823 ) -> fidl::Result<()> {
14824 encoder.debug_check_bounds::<MyInt64>(offset);
14825 self.0.encode(encoder, offset + 0, depth)?;
14829 Ok(())
14830 }
14831 }
14832
14833 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt64 {
14834 #[inline(always)]
14835 fn new_empty() -> Self {
14836 Self { value: fidl::new_empty!(i64, D) }
14837 }
14838
14839 #[inline]
14840 unsafe fn decode(
14841 &mut self,
14842 decoder: &mut fidl::encoding::Decoder<'_, D>,
14843 offset: usize,
14844 _depth: fidl::encoding::Depth,
14845 ) -> fidl::Result<()> {
14846 decoder.debug_check_bounds::<Self>(offset);
14847 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14848 unsafe {
14851 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
14852 }
14853 Ok(())
14854 }
14855 }
14856
14857 impl fidl::encoding::ValueTypeMarker for MyInt8 {
14858 type Borrowed<'a> = &'a Self;
14859 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14860 value
14861 }
14862 }
14863
14864 unsafe impl fidl::encoding::TypeMarker for MyInt8 {
14865 type Owned = Self;
14866
14867 #[inline(always)]
14868 fn inline_align(_context: fidl::encoding::Context) -> usize {
14869 1
14870 }
14871
14872 #[inline(always)]
14873 fn inline_size(_context: fidl::encoding::Context) -> usize {
14874 1
14875 }
14876 #[inline(always)]
14877 fn encode_is_copy() -> bool {
14878 true
14879 }
14880
14881 #[inline(always)]
14882 fn decode_is_copy() -> bool {
14883 true
14884 }
14885 }
14886
14887 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyInt8, D> for &MyInt8 {
14888 #[inline]
14889 unsafe fn encode(
14890 self,
14891 encoder: &mut fidl::encoding::Encoder<'_, D>,
14892 offset: usize,
14893 _depth: fidl::encoding::Depth,
14894 ) -> fidl::Result<()> {
14895 encoder.debug_check_bounds::<MyInt8>(offset);
14896 unsafe {
14897 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14899 (buf_ptr as *mut MyInt8).write_unaligned((self as *const MyInt8).read());
14900 }
14903 Ok(())
14904 }
14905 }
14906 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
14907 fidl::encoding::Encode<MyInt8, D> for (T0,)
14908 {
14909 #[inline]
14910 unsafe fn encode(
14911 self,
14912 encoder: &mut fidl::encoding::Encoder<'_, D>,
14913 offset: usize,
14914 depth: fidl::encoding::Depth,
14915 ) -> fidl::Result<()> {
14916 encoder.debug_check_bounds::<MyInt8>(offset);
14917 self.0.encode(encoder, offset + 0, depth)?;
14921 Ok(())
14922 }
14923 }
14924
14925 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyInt8 {
14926 #[inline(always)]
14927 fn new_empty() -> Self {
14928 Self { value: fidl::new_empty!(i8, D) }
14929 }
14930
14931 #[inline]
14932 unsafe fn decode(
14933 &mut self,
14934 decoder: &mut fidl::encoding::Decoder<'_, D>,
14935 offset: usize,
14936 _depth: fidl::encoding::Depth,
14937 ) -> fidl::Result<()> {
14938 decoder.debug_check_bounds::<Self>(offset);
14939 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14940 unsafe {
14943 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
14944 }
14945 Ok(())
14946 }
14947 }
14948
14949 impl fidl::encoding::ValueTypeMarker for MyUint16 {
14950 type Borrowed<'a> = &'a Self;
14951 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14952 value
14953 }
14954 }
14955
14956 unsafe impl fidl::encoding::TypeMarker for MyUint16 {
14957 type Owned = Self;
14958
14959 #[inline(always)]
14960 fn inline_align(_context: fidl::encoding::Context) -> usize {
14961 2
14962 }
14963
14964 #[inline(always)]
14965 fn inline_size(_context: fidl::encoding::Context) -> usize {
14966 2
14967 }
14968 #[inline(always)]
14969 fn encode_is_copy() -> bool {
14970 true
14971 }
14972
14973 #[inline(always)]
14974 fn decode_is_copy() -> bool {
14975 true
14976 }
14977 }
14978
14979 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint16, D> for &MyUint16 {
14980 #[inline]
14981 unsafe fn encode(
14982 self,
14983 encoder: &mut fidl::encoding::Encoder<'_, D>,
14984 offset: usize,
14985 _depth: fidl::encoding::Depth,
14986 ) -> fidl::Result<()> {
14987 encoder.debug_check_bounds::<MyUint16>(offset);
14988 unsafe {
14989 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14991 (buf_ptr as *mut MyUint16).write_unaligned((self as *const MyUint16).read());
14992 }
14995 Ok(())
14996 }
14997 }
14998 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
14999 fidl::encoding::Encode<MyUint16, D> for (T0,)
15000 {
15001 #[inline]
15002 unsafe fn encode(
15003 self,
15004 encoder: &mut fidl::encoding::Encoder<'_, D>,
15005 offset: usize,
15006 depth: fidl::encoding::Depth,
15007 ) -> fidl::Result<()> {
15008 encoder.debug_check_bounds::<MyUint16>(offset);
15009 self.0.encode(encoder, offset + 0, depth)?;
15013 Ok(())
15014 }
15015 }
15016
15017 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint16 {
15018 #[inline(always)]
15019 fn new_empty() -> Self {
15020 Self { value: fidl::new_empty!(u16, D) }
15021 }
15022
15023 #[inline]
15024 unsafe fn decode(
15025 &mut self,
15026 decoder: &mut fidl::encoding::Decoder<'_, D>,
15027 offset: usize,
15028 _depth: fidl::encoding::Depth,
15029 ) -> fidl::Result<()> {
15030 decoder.debug_check_bounds::<Self>(offset);
15031 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15032 unsafe {
15035 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
15036 }
15037 Ok(())
15038 }
15039 }
15040
15041 impl fidl::encoding::ValueTypeMarker for MyUint32 {
15042 type Borrowed<'a> = &'a Self;
15043 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15044 value
15045 }
15046 }
15047
15048 unsafe impl fidl::encoding::TypeMarker for MyUint32 {
15049 type Owned = Self;
15050
15051 #[inline(always)]
15052 fn inline_align(_context: fidl::encoding::Context) -> usize {
15053 4
15054 }
15055
15056 #[inline(always)]
15057 fn inline_size(_context: fidl::encoding::Context) -> usize {
15058 4
15059 }
15060 #[inline(always)]
15061 fn encode_is_copy() -> bool {
15062 true
15063 }
15064
15065 #[inline(always)]
15066 fn decode_is_copy() -> bool {
15067 true
15068 }
15069 }
15070
15071 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint32, D> for &MyUint32 {
15072 #[inline]
15073 unsafe fn encode(
15074 self,
15075 encoder: &mut fidl::encoding::Encoder<'_, D>,
15076 offset: usize,
15077 _depth: fidl::encoding::Depth,
15078 ) -> fidl::Result<()> {
15079 encoder.debug_check_bounds::<MyUint32>(offset);
15080 unsafe {
15081 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15083 (buf_ptr as *mut MyUint32).write_unaligned((self as *const MyUint32).read());
15084 }
15087 Ok(())
15088 }
15089 }
15090 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
15091 fidl::encoding::Encode<MyUint32, D> for (T0,)
15092 {
15093 #[inline]
15094 unsafe fn encode(
15095 self,
15096 encoder: &mut fidl::encoding::Encoder<'_, D>,
15097 offset: usize,
15098 depth: fidl::encoding::Depth,
15099 ) -> fidl::Result<()> {
15100 encoder.debug_check_bounds::<MyUint32>(offset);
15101 self.0.encode(encoder, offset + 0, depth)?;
15105 Ok(())
15106 }
15107 }
15108
15109 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint32 {
15110 #[inline(always)]
15111 fn new_empty() -> Self {
15112 Self { value: fidl::new_empty!(u32, D) }
15113 }
15114
15115 #[inline]
15116 unsafe fn decode(
15117 &mut self,
15118 decoder: &mut fidl::encoding::Decoder<'_, D>,
15119 offset: usize,
15120 _depth: fidl::encoding::Depth,
15121 ) -> fidl::Result<()> {
15122 decoder.debug_check_bounds::<Self>(offset);
15123 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15124 unsafe {
15127 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
15128 }
15129 Ok(())
15130 }
15131 }
15132
15133 impl fidl::encoding::ValueTypeMarker for MyUint64 {
15134 type Borrowed<'a> = &'a Self;
15135 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15136 value
15137 }
15138 }
15139
15140 unsafe impl fidl::encoding::TypeMarker for MyUint64 {
15141 type Owned = Self;
15142
15143 #[inline(always)]
15144 fn inline_align(_context: fidl::encoding::Context) -> usize {
15145 8
15146 }
15147
15148 #[inline(always)]
15149 fn inline_size(_context: fidl::encoding::Context) -> usize {
15150 8
15151 }
15152 #[inline(always)]
15153 fn encode_is_copy() -> bool {
15154 true
15155 }
15156
15157 #[inline(always)]
15158 fn decode_is_copy() -> bool {
15159 true
15160 }
15161 }
15162
15163 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint64, D> for &MyUint64 {
15164 #[inline]
15165 unsafe fn encode(
15166 self,
15167 encoder: &mut fidl::encoding::Encoder<'_, D>,
15168 offset: usize,
15169 _depth: fidl::encoding::Depth,
15170 ) -> fidl::Result<()> {
15171 encoder.debug_check_bounds::<MyUint64>(offset);
15172 unsafe {
15173 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15175 (buf_ptr as *mut MyUint64).write_unaligned((self as *const MyUint64).read());
15176 }
15179 Ok(())
15180 }
15181 }
15182 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
15183 fidl::encoding::Encode<MyUint64, D> for (T0,)
15184 {
15185 #[inline]
15186 unsafe fn encode(
15187 self,
15188 encoder: &mut fidl::encoding::Encoder<'_, D>,
15189 offset: usize,
15190 depth: fidl::encoding::Depth,
15191 ) -> fidl::Result<()> {
15192 encoder.debug_check_bounds::<MyUint64>(offset);
15193 self.0.encode(encoder, offset + 0, depth)?;
15197 Ok(())
15198 }
15199 }
15200
15201 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint64 {
15202 #[inline(always)]
15203 fn new_empty() -> Self {
15204 Self { value: fidl::new_empty!(u64, D) }
15205 }
15206
15207 #[inline]
15208 unsafe fn decode(
15209 &mut self,
15210 decoder: &mut fidl::encoding::Decoder<'_, D>,
15211 offset: usize,
15212 _depth: fidl::encoding::Depth,
15213 ) -> fidl::Result<()> {
15214 decoder.debug_check_bounds::<Self>(offset);
15215 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15216 unsafe {
15219 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15220 }
15221 Ok(())
15222 }
15223 }
15224
15225 impl fidl::encoding::ValueTypeMarker for MyUint8 {
15226 type Borrowed<'a> = &'a Self;
15227 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15228 value
15229 }
15230 }
15231
15232 unsafe impl fidl::encoding::TypeMarker for MyUint8 {
15233 type Owned = Self;
15234
15235 #[inline(always)]
15236 fn inline_align(_context: fidl::encoding::Context) -> usize {
15237 1
15238 }
15239
15240 #[inline(always)]
15241 fn inline_size(_context: fidl::encoding::Context) -> usize {
15242 1
15243 }
15244 #[inline(always)]
15245 fn encode_is_copy() -> bool {
15246 true
15247 }
15248
15249 #[inline(always)]
15250 fn decode_is_copy() -> bool {
15251 true
15252 }
15253 }
15254
15255 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MyUint8, D> for &MyUint8 {
15256 #[inline]
15257 unsafe fn encode(
15258 self,
15259 encoder: &mut fidl::encoding::Encoder<'_, D>,
15260 offset: usize,
15261 _depth: fidl::encoding::Depth,
15262 ) -> fidl::Result<()> {
15263 encoder.debug_check_bounds::<MyUint8>(offset);
15264 unsafe {
15265 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15267 (buf_ptr as *mut MyUint8).write_unaligned((self as *const MyUint8).read());
15268 }
15271 Ok(())
15272 }
15273 }
15274 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
15275 fidl::encoding::Encode<MyUint8, D> for (T0,)
15276 {
15277 #[inline]
15278 unsafe fn encode(
15279 self,
15280 encoder: &mut fidl::encoding::Encoder<'_, D>,
15281 offset: usize,
15282 depth: fidl::encoding::Depth,
15283 ) -> fidl::Result<()> {
15284 encoder.debug_check_bounds::<MyUint8>(offset);
15285 self.0.encode(encoder, offset + 0, depth)?;
15289 Ok(())
15290 }
15291 }
15292
15293 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MyUint8 {
15294 #[inline(always)]
15295 fn new_empty() -> Self {
15296 Self { value: fidl::new_empty!(u8, D) }
15297 }
15298
15299 #[inline]
15300 unsafe fn decode(
15301 &mut self,
15302 decoder: &mut fidl::encoding::Decoder<'_, D>,
15303 offset: usize,
15304 _depth: fidl::encoding::Depth,
15305 ) -> fidl::Result<()> {
15306 decoder.debug_check_bounds::<Self>(offset);
15307 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15308 unsafe {
15311 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
15312 }
15313 Ok(())
15314 }
15315 }
15316
15317 impl fidl::encoding::ValueTypeMarker for NoCodingTablesStressor {
15318 type Borrowed<'a> = &'a Self;
15319 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15320 value
15321 }
15322 }
15323
15324 unsafe impl fidl::encoding::TypeMarker for NoCodingTablesStressor {
15325 type Owned = Self;
15326
15327 #[inline(always)]
15328 fn inline_align(_context: fidl::encoding::Context) -> usize {
15329 8
15330 }
15331
15332 #[inline(always)]
15333 fn inline_size(_context: fidl::encoding::Context) -> usize {
15334 136
15335 }
15336 }
15337
15338 unsafe impl<D: fidl::encoding::ResourceDialect>
15339 fidl::encoding::Encode<NoCodingTablesStressor, D> for &NoCodingTablesStressor
15340 {
15341 #[inline]
15342 unsafe fn encode(
15343 self,
15344 encoder: &mut fidl::encoding::Encoder<'_, D>,
15345 offset: usize,
15346 _depth: fidl::encoding::Depth,
15347 ) -> fidl::Result<()> {
15348 encoder.debug_check_bounds::<NoCodingTablesStressor>(offset);
15349 fidl::encoding::Encode::<NoCodingTablesStressor, D>::encode(
15351 (
15352 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
15353 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
15354 <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u1),
15355 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
15356 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
15357 <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u2),
15358 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
15359 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
15360 <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.u3),
15361 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f7),
15362 <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
15363 &self.p1,
15364 ),
15365 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f8),
15366 <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
15367 &self.p2,
15368 ),
15369 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f9),
15370 ),
15371 encoder,
15372 offset,
15373 _depth,
15374 )
15375 }
15376 }
15377 unsafe impl<
15378 D: fidl::encoding::ResourceDialect,
15379 T0: fidl::encoding::Encode<u64, D>,
15380 T1: fidl::encoding::Encode<u64, D>,
15381 T2: fidl::encoding::Encode<UnionSize36Align4, D>,
15382 T3: fidl::encoding::Encode<u64, D>,
15383 T4: fidl::encoding::Encode<u64, D>,
15384 T5: fidl::encoding::Encode<UnionSize36Align4, D>,
15385 T6: fidl::encoding::Encode<u64, D>,
15386 T7: fidl::encoding::Encode<u64, D>,
15387 T8: fidl::encoding::Encode<UnionSize36Align4, D>,
15388 T9: fidl::encoding::Encode<u64, D>,
15389 T10: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
15390 T11: fidl::encoding::Encode<u64, D>,
15391 T12: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
15392 T13: fidl::encoding::Encode<u64, D>,
15393 > fidl::encoding::Encode<NoCodingTablesStressor, D>
15394 for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
15395 {
15396 #[inline]
15397 unsafe fn encode(
15398 self,
15399 encoder: &mut fidl::encoding::Encoder<'_, D>,
15400 offset: usize,
15401 depth: fidl::encoding::Depth,
15402 ) -> fidl::Result<()> {
15403 encoder.debug_check_bounds::<NoCodingTablesStressor>(offset);
15404 self.0.encode(encoder, offset + 0, depth)?;
15408 self.1.encode(encoder, offset + 8, depth)?;
15409 self.2.encode(encoder, offset + 16, depth)?;
15410 self.3.encode(encoder, offset + 32, depth)?;
15411 self.4.encode(encoder, offset + 40, depth)?;
15412 self.5.encode(encoder, offset + 48, depth)?;
15413 self.6.encode(encoder, offset + 64, depth)?;
15414 self.7.encode(encoder, offset + 72, depth)?;
15415 self.8.encode(encoder, offset + 80, depth)?;
15416 self.9.encode(encoder, offset + 96, depth)?;
15417 self.10.encode(encoder, offset + 104, depth)?;
15418 self.11.encode(encoder, offset + 112, depth)?;
15419 self.12.encode(encoder, offset + 120, depth)?;
15420 self.13.encode(encoder, offset + 128, depth)?;
15421 Ok(())
15422 }
15423 }
15424
15425 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15426 for NoCodingTablesStressor
15427 {
15428 #[inline(always)]
15429 fn new_empty() -> Self {
15430 Self {
15431 f1: fidl::new_empty!(u64, D),
15432 f2: fidl::new_empty!(u64, D),
15433 u1: fidl::new_empty!(UnionSize36Align4, D),
15434 f3: fidl::new_empty!(u64, D),
15435 f4: fidl::new_empty!(u64, D),
15436 u2: fidl::new_empty!(UnionSize36Align4, D),
15437 f5: fidl::new_empty!(u64, D),
15438 f6: fidl::new_empty!(u64, D),
15439 u3: fidl::new_empty!(UnionSize36Align4, D),
15440 f7: fidl::new_empty!(u64, D),
15441 p1: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
15442 f8: fidl::new_empty!(u64, D),
15443 p2: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
15444 f9: fidl::new_empty!(u64, D),
15445 }
15446 }
15447
15448 #[inline]
15449 unsafe fn decode(
15450 &mut self,
15451 decoder: &mut fidl::encoding::Decoder<'_, D>,
15452 offset: usize,
15453 _depth: fidl::encoding::Depth,
15454 ) -> fidl::Result<()> {
15455 decoder.debug_check_bounds::<Self>(offset);
15456 fidl::decode!(u64, D, &mut self.f1, decoder, offset + 0, _depth)?;
15458 fidl::decode!(u64, D, &mut self.f2, decoder, offset + 8, _depth)?;
15459 fidl::decode!(UnionSize36Align4, D, &mut self.u1, decoder, offset + 16, _depth)?;
15460 fidl::decode!(u64, D, &mut self.f3, decoder, offset + 32, _depth)?;
15461 fidl::decode!(u64, D, &mut self.f4, decoder, offset + 40, _depth)?;
15462 fidl::decode!(UnionSize36Align4, D, &mut self.u2, decoder, offset + 48, _depth)?;
15463 fidl::decode!(u64, D, &mut self.f5, decoder, offset + 64, _depth)?;
15464 fidl::decode!(u64, D, &mut self.f6, decoder, offset + 72, _depth)?;
15465 fidl::decode!(UnionSize36Align4, D, &mut self.u3, decoder, offset + 80, _depth)?;
15466 fidl::decode!(u64, D, &mut self.f7, decoder, offset + 96, _depth)?;
15467 fidl::decode!(
15468 fidl::encoding::Boxed<Size8Align8>,
15469 D,
15470 &mut self.p1,
15471 decoder,
15472 offset + 104,
15473 _depth
15474 )?;
15475 fidl::decode!(u64, D, &mut self.f8, decoder, offset + 112, _depth)?;
15476 fidl::decode!(
15477 fidl::encoding::Boxed<Size8Align8>,
15478 D,
15479 &mut self.p2,
15480 decoder,
15481 offset + 120,
15482 _depth
15483 )?;
15484 fidl::decode!(u64, D, &mut self.f9, decoder, offset + 128, _depth)?;
15485 Ok(())
15486 }
15487 }
15488
15489 impl fidl::encoding::ValueTypeMarker for NodeAttributes {
15490 type Borrowed<'a> = &'a Self;
15491 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15492 value
15493 }
15494 }
15495
15496 unsafe impl fidl::encoding::TypeMarker for NodeAttributes {
15497 type Owned = Self;
15498
15499 #[inline(always)]
15500 fn inline_align(_context: fidl::encoding::Context) -> usize {
15501 8
15502 }
15503
15504 #[inline(always)]
15505 fn inline_size(_context: fidl::encoding::Context) -> usize {
15506 56
15507 }
15508 }
15509
15510 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<NodeAttributes, D>
15511 for &NodeAttributes
15512 {
15513 #[inline]
15514 unsafe fn encode(
15515 self,
15516 encoder: &mut fidl::encoding::Encoder<'_, D>,
15517 offset: usize,
15518 _depth: fidl::encoding::Depth,
15519 ) -> fidl::Result<()> {
15520 encoder.debug_check_bounds::<NodeAttributes>(offset);
15521 unsafe {
15522 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15524 (buf_ptr as *mut NodeAttributes)
15525 .write_unaligned((self as *const NodeAttributes).read());
15526 let padding_ptr = buf_ptr.offset(0) as *mut u64;
15529 let padding_mask = 0xffffffff00000000u64;
15530 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
15531 }
15532 Ok(())
15533 }
15534 }
15535 unsafe impl<
15536 D: fidl::encoding::ResourceDialect,
15537 T0: fidl::encoding::Encode<u32, D>,
15538 T1: fidl::encoding::Encode<u64, D>,
15539 T2: fidl::encoding::Encode<u64, D>,
15540 T3: fidl::encoding::Encode<u64, D>,
15541 T4: fidl::encoding::Encode<u64, D>,
15542 T5: fidl::encoding::Encode<u64, D>,
15543 T6: fidl::encoding::Encode<u64, D>,
15544 > fidl::encoding::Encode<NodeAttributes, D> for (T0, T1, T2, T3, T4, T5, T6)
15545 {
15546 #[inline]
15547 unsafe fn encode(
15548 self,
15549 encoder: &mut fidl::encoding::Encoder<'_, D>,
15550 offset: usize,
15551 depth: fidl::encoding::Depth,
15552 ) -> fidl::Result<()> {
15553 encoder.debug_check_bounds::<NodeAttributes>(offset);
15554 unsafe {
15557 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
15558 (ptr as *mut u64).write_unaligned(0);
15559 }
15560 self.0.encode(encoder, offset + 0, depth)?;
15562 self.1.encode(encoder, offset + 8, depth)?;
15563 self.2.encode(encoder, offset + 16, depth)?;
15564 self.3.encode(encoder, offset + 24, depth)?;
15565 self.4.encode(encoder, offset + 32, depth)?;
15566 self.5.encode(encoder, offset + 40, depth)?;
15567 self.6.encode(encoder, offset + 48, depth)?;
15568 Ok(())
15569 }
15570 }
15571
15572 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for NodeAttributes {
15573 #[inline(always)]
15574 fn new_empty() -> Self {
15575 Self {
15576 mode: fidl::new_empty!(u32, D),
15577 id: fidl::new_empty!(u64, D),
15578 content_size: fidl::new_empty!(u64, D),
15579 storage_size: fidl::new_empty!(u64, D),
15580 link_count: fidl::new_empty!(u64, D),
15581 creation_time: fidl::new_empty!(u64, D),
15582 modification_time: fidl::new_empty!(u64, D),
15583 }
15584 }
15585
15586 #[inline]
15587 unsafe fn decode(
15588 &mut self,
15589 decoder: &mut fidl::encoding::Decoder<'_, D>,
15590 offset: usize,
15591 _depth: fidl::encoding::Depth,
15592 ) -> fidl::Result<()> {
15593 decoder.debug_check_bounds::<Self>(offset);
15594 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15595 let ptr = unsafe { buf_ptr.offset(0) };
15597 let padval = unsafe { (ptr as *const u64).read_unaligned() };
15598 let mask = 0xffffffff00000000u64;
15599 let maskedval = padval & mask;
15600 if maskedval != 0 {
15601 return Err(fidl::Error::NonZeroPadding {
15602 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
15603 });
15604 }
15605 unsafe {
15607 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 56);
15608 }
15609 Ok(())
15610 }
15611 }
15612
15613 impl fidl::encoding::ValueTypeMarker for OneLayerStructNoPaddingAlign4 {
15614 type Borrowed<'a> = &'a Self;
15615 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15616 value
15617 }
15618 }
15619
15620 unsafe impl fidl::encoding::TypeMarker for OneLayerStructNoPaddingAlign4 {
15621 type Owned = Self;
15622
15623 #[inline(always)]
15624 fn inline_align(_context: fidl::encoding::Context) -> usize {
15625 4
15626 }
15627
15628 #[inline(always)]
15629 fn inline_size(_context: fidl::encoding::Context) -> usize {
15630 8
15631 }
15632 #[inline(always)]
15633 fn encode_is_copy() -> bool {
15634 true
15635 }
15636
15637 #[inline(always)]
15638 fn decode_is_copy() -> bool {
15639 true
15640 }
15641 }
15642
15643 unsafe impl<D: fidl::encoding::ResourceDialect>
15644 fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D>
15645 for &OneLayerStructNoPaddingAlign4
15646 {
15647 #[inline]
15648 unsafe fn encode(
15649 self,
15650 encoder: &mut fidl::encoding::Encoder<'_, D>,
15651 offset: usize,
15652 _depth: fidl::encoding::Depth,
15653 ) -> fidl::Result<()> {
15654 encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign4>(offset);
15655 unsafe {
15656 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15658 (buf_ptr as *mut OneLayerStructNoPaddingAlign4)
15659 .write_unaligned((self as *const OneLayerStructNoPaddingAlign4).read());
15660 }
15663 Ok(())
15664 }
15665 }
15666 unsafe impl<
15667 D: fidl::encoding::ResourceDialect,
15668 T0: fidl::encoding::Encode<u16, D>,
15669 T1: fidl::encoding::Encode<u8, D>,
15670 T2: fidl::encoding::Encode<u8, D>,
15671 T3: fidl::encoding::Encode<u32, D>,
15672 > fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D> for (T0, T1, T2, T3)
15673 {
15674 #[inline]
15675 unsafe fn encode(
15676 self,
15677 encoder: &mut fidl::encoding::Encoder<'_, D>,
15678 offset: usize,
15679 depth: fidl::encoding::Depth,
15680 ) -> fidl::Result<()> {
15681 encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign4>(offset);
15682 self.0.encode(encoder, offset + 0, depth)?;
15686 self.1.encode(encoder, offset + 2, depth)?;
15687 self.2.encode(encoder, offset + 3, depth)?;
15688 self.3.encode(encoder, offset + 4, depth)?;
15689 Ok(())
15690 }
15691 }
15692
15693 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15694 for OneLayerStructNoPaddingAlign4
15695 {
15696 #[inline(always)]
15697 fn new_empty() -> Self {
15698 Self {
15699 a: fidl::new_empty!(u16, D),
15700 b: fidl::new_empty!(u8, D),
15701 c: fidl::new_empty!(u8, D),
15702 d: fidl::new_empty!(u32, D),
15703 }
15704 }
15705
15706 #[inline]
15707 unsafe fn decode(
15708 &mut self,
15709 decoder: &mut fidl::encoding::Decoder<'_, D>,
15710 offset: usize,
15711 _depth: fidl::encoding::Depth,
15712 ) -> fidl::Result<()> {
15713 decoder.debug_check_bounds::<Self>(offset);
15714 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15715 unsafe {
15718 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
15719 }
15720 Ok(())
15721 }
15722 }
15723
15724 impl fidl::encoding::ValueTypeMarker for OneLayerStructNoPaddingAlign8 {
15725 type Borrowed<'a> = &'a Self;
15726 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15727 value
15728 }
15729 }
15730
15731 unsafe impl fidl::encoding::TypeMarker for OneLayerStructNoPaddingAlign8 {
15732 type Owned = Self;
15733
15734 #[inline(always)]
15735 fn inline_align(_context: fidl::encoding::Context) -> usize {
15736 8
15737 }
15738
15739 #[inline(always)]
15740 fn inline_size(_context: fidl::encoding::Context) -> usize {
15741 16
15742 }
15743 #[inline(always)]
15744 fn encode_is_copy() -> bool {
15745 true
15746 }
15747
15748 #[inline(always)]
15749 fn decode_is_copy() -> bool {
15750 true
15751 }
15752 }
15753
15754 unsafe impl<D: fidl::encoding::ResourceDialect>
15755 fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D>
15756 for &OneLayerStructNoPaddingAlign8
15757 {
15758 #[inline]
15759 unsafe fn encode(
15760 self,
15761 encoder: &mut fidl::encoding::Encoder<'_, D>,
15762 offset: usize,
15763 _depth: fidl::encoding::Depth,
15764 ) -> fidl::Result<()> {
15765 encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign8>(offset);
15766 unsafe {
15767 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15769 (buf_ptr as *mut OneLayerStructNoPaddingAlign8)
15770 .write_unaligned((self as *const OneLayerStructNoPaddingAlign8).read());
15771 }
15774 Ok(())
15775 }
15776 }
15777 unsafe impl<
15778 D: fidl::encoding::ResourceDialect,
15779 T0: fidl::encoding::Encode<u32, D>,
15780 T1: fidl::encoding::Encode<u16, D>,
15781 T2: fidl::encoding::Encode<u16, D>,
15782 T3: fidl::encoding::Encode<u64, D>,
15783 > fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D> for (T0, T1, T2, T3)
15784 {
15785 #[inline]
15786 unsafe fn encode(
15787 self,
15788 encoder: &mut fidl::encoding::Encoder<'_, D>,
15789 offset: usize,
15790 depth: fidl::encoding::Depth,
15791 ) -> fidl::Result<()> {
15792 encoder.debug_check_bounds::<OneLayerStructNoPaddingAlign8>(offset);
15793 self.0.encode(encoder, offset + 0, depth)?;
15797 self.1.encode(encoder, offset + 4, depth)?;
15798 self.2.encode(encoder, offset + 6, depth)?;
15799 self.3.encode(encoder, offset + 8, depth)?;
15800 Ok(())
15801 }
15802 }
15803
15804 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15805 for OneLayerStructNoPaddingAlign8
15806 {
15807 #[inline(always)]
15808 fn new_empty() -> Self {
15809 Self {
15810 a: fidl::new_empty!(u32, D),
15811 b: fidl::new_empty!(u16, D),
15812 c: fidl::new_empty!(u16, D),
15813 d: fidl::new_empty!(u64, D),
15814 }
15815 }
15816
15817 #[inline]
15818 unsafe fn decode(
15819 &mut self,
15820 decoder: &mut fidl::encoding::Decoder<'_, D>,
15821 offset: usize,
15822 _depth: fidl::encoding::Depth,
15823 ) -> fidl::Result<()> {
15824 decoder.debug_check_bounds::<Self>(offset);
15825 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
15826 unsafe {
15829 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
15830 }
15831 Ok(())
15832 }
15833 }
15834
15835 impl fidl::encoding::ValueTypeMarker for OneLayerStructWithBool {
15836 type Borrowed<'a> = &'a Self;
15837 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15838 value
15839 }
15840 }
15841
15842 unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithBool {
15843 type Owned = Self;
15844
15845 #[inline(always)]
15846 fn inline_align(_context: fidl::encoding::Context) -> usize {
15847 4
15848 }
15849
15850 #[inline(always)]
15851 fn inline_size(_context: fidl::encoding::Context) -> usize {
15852 8
15853 }
15854 }
15855
15856 unsafe impl<D: fidl::encoding::ResourceDialect>
15857 fidl::encoding::Encode<OneLayerStructWithBool, D> for &OneLayerStructWithBool
15858 {
15859 #[inline]
15860 unsafe fn encode(
15861 self,
15862 encoder: &mut fidl::encoding::Encoder<'_, D>,
15863 offset: usize,
15864 _depth: fidl::encoding::Depth,
15865 ) -> fidl::Result<()> {
15866 encoder.debug_check_bounds::<OneLayerStructWithBool>(offset);
15867 fidl::encoding::Encode::<OneLayerStructWithBool, D>::encode(
15869 (
15870 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
15871 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
15872 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.c),
15873 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.d),
15874 ),
15875 encoder,
15876 offset,
15877 _depth,
15878 )
15879 }
15880 }
15881 unsafe impl<
15882 D: fidl::encoding::ResourceDialect,
15883 T0: fidl::encoding::Encode<bool, D>,
15884 T1: fidl::encoding::Encode<u8, D>,
15885 T2: fidl::encoding::Encode<u16, D>,
15886 T3: fidl::encoding::Encode<u32, D>,
15887 > fidl::encoding::Encode<OneLayerStructWithBool, D> for (T0, T1, T2, T3)
15888 {
15889 #[inline]
15890 unsafe fn encode(
15891 self,
15892 encoder: &mut fidl::encoding::Encoder<'_, D>,
15893 offset: usize,
15894 depth: fidl::encoding::Depth,
15895 ) -> fidl::Result<()> {
15896 encoder.debug_check_bounds::<OneLayerStructWithBool>(offset);
15897 self.0.encode(encoder, offset + 0, depth)?;
15901 self.1.encode(encoder, offset + 1, depth)?;
15902 self.2.encode(encoder, offset + 2, depth)?;
15903 self.3.encode(encoder, offset + 4, depth)?;
15904 Ok(())
15905 }
15906 }
15907
15908 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15909 for OneLayerStructWithBool
15910 {
15911 #[inline(always)]
15912 fn new_empty() -> Self {
15913 Self {
15914 a: fidl::new_empty!(bool, D),
15915 b: fidl::new_empty!(u8, D),
15916 c: fidl::new_empty!(u16, D),
15917 d: fidl::new_empty!(u32, D),
15918 }
15919 }
15920
15921 #[inline]
15922 unsafe fn decode(
15923 &mut self,
15924 decoder: &mut fidl::encoding::Decoder<'_, D>,
15925 offset: usize,
15926 _depth: fidl::encoding::Depth,
15927 ) -> fidl::Result<()> {
15928 decoder.debug_check_bounds::<Self>(offset);
15929 fidl::decode!(bool, D, &mut self.a, decoder, offset + 0, _depth)?;
15931 fidl::decode!(u8, D, &mut self.b, decoder, offset + 1, _depth)?;
15932 fidl::decode!(u16, D, &mut self.c, decoder, offset + 2, _depth)?;
15933 fidl::decode!(u32, D, &mut self.d, decoder, offset + 4, _depth)?;
15934 Ok(())
15935 }
15936 }
15937
15938 impl fidl::encoding::ValueTypeMarker for OneLayerStructWithPaddingAlign4 {
15939 type Borrowed<'a> = &'a Self;
15940 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15941 value
15942 }
15943 }
15944
15945 unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithPaddingAlign4 {
15946 type Owned = Self;
15947
15948 #[inline(always)]
15949 fn inline_align(_context: fidl::encoding::Context) -> usize {
15950 4
15951 }
15952
15953 #[inline(always)]
15954 fn inline_size(_context: fidl::encoding::Context) -> usize {
15955 8
15956 }
15957 }
15958
15959 unsafe impl<D: fidl::encoding::ResourceDialect>
15960 fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D>
15961 for &OneLayerStructWithPaddingAlign4
15962 {
15963 #[inline]
15964 unsafe fn encode(
15965 self,
15966 encoder: &mut fidl::encoding::Encoder<'_, D>,
15967 offset: usize,
15968 _depth: fidl::encoding::Depth,
15969 ) -> fidl::Result<()> {
15970 encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign4>(offset);
15971 unsafe {
15972 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
15974 (buf_ptr as *mut OneLayerStructWithPaddingAlign4)
15975 .write_unaligned((self as *const OneLayerStructWithPaddingAlign4).read());
15976 let padding_ptr = buf_ptr.offset(0) as *mut u32;
15979 let padding_mask = 0xff000000u32;
15980 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
15981 }
15982 Ok(())
15983 }
15984 }
15985 unsafe impl<
15986 D: fidl::encoding::ResourceDialect,
15987 T0: fidl::encoding::Encode<u16, D>,
15988 T1: fidl::encoding::Encode<u8, D>,
15989 T2: fidl::encoding::Encode<u32, D>,
15990 > fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D> for (T0, T1, T2)
15991 {
15992 #[inline]
15993 unsafe fn encode(
15994 self,
15995 encoder: &mut fidl::encoding::Encoder<'_, D>,
15996 offset: usize,
15997 depth: fidl::encoding::Depth,
15998 ) -> fidl::Result<()> {
15999 encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign4>(offset);
16000 unsafe {
16003 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
16004 (ptr as *mut u32).write_unaligned(0);
16005 }
16006 self.0.encode(encoder, offset + 0, depth)?;
16008 self.1.encode(encoder, offset + 2, depth)?;
16009 self.2.encode(encoder, offset + 4, depth)?;
16010 Ok(())
16011 }
16012 }
16013
16014 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16015 for OneLayerStructWithPaddingAlign4
16016 {
16017 #[inline(always)]
16018 fn new_empty() -> Self {
16019 Self {
16020 a: fidl::new_empty!(u16, D),
16021 b: fidl::new_empty!(u8, D),
16022 c: fidl::new_empty!(u32, D),
16023 }
16024 }
16025
16026 #[inline]
16027 unsafe fn decode(
16028 &mut self,
16029 decoder: &mut fidl::encoding::Decoder<'_, D>,
16030 offset: usize,
16031 _depth: fidl::encoding::Depth,
16032 ) -> fidl::Result<()> {
16033 decoder.debug_check_bounds::<Self>(offset);
16034 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16035 let ptr = unsafe { buf_ptr.offset(0) };
16037 let padval = unsafe { (ptr as *const u32).read_unaligned() };
16038 let mask = 0xff000000u32;
16039 let maskedval = padval & mask;
16040 if maskedval != 0 {
16041 return Err(fidl::Error::NonZeroPadding {
16042 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
16043 });
16044 }
16045 unsafe {
16047 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
16048 }
16049 Ok(())
16050 }
16051 }
16052
16053 impl fidl::encoding::ValueTypeMarker for OneLayerStructWithPaddingAlign8 {
16054 type Borrowed<'a> = &'a Self;
16055 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16056 value
16057 }
16058 }
16059
16060 unsafe impl fidl::encoding::TypeMarker for OneLayerStructWithPaddingAlign8 {
16061 type Owned = Self;
16062
16063 #[inline(always)]
16064 fn inline_align(_context: fidl::encoding::Context) -> usize {
16065 8
16066 }
16067
16068 #[inline(always)]
16069 fn inline_size(_context: fidl::encoding::Context) -> usize {
16070 16
16071 }
16072 }
16073
16074 unsafe impl<D: fidl::encoding::ResourceDialect>
16075 fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D>
16076 for &OneLayerStructWithPaddingAlign8
16077 {
16078 #[inline]
16079 unsafe fn encode(
16080 self,
16081 encoder: &mut fidl::encoding::Encoder<'_, D>,
16082 offset: usize,
16083 _depth: fidl::encoding::Depth,
16084 ) -> fidl::Result<()> {
16085 encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign8>(offset);
16086 unsafe {
16087 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
16089 (buf_ptr as *mut OneLayerStructWithPaddingAlign8)
16090 .write_unaligned((self as *const OneLayerStructWithPaddingAlign8).read());
16091 let padding_ptr = buf_ptr.offset(0) as *mut u64;
16094 let padding_mask = 0xffff000000000000u64;
16095 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
16096 }
16097 Ok(())
16098 }
16099 }
16100 unsafe impl<
16101 D: fidl::encoding::ResourceDialect,
16102 T0: fidl::encoding::Encode<u32, D>,
16103 T1: fidl::encoding::Encode<u16, D>,
16104 T2: fidl::encoding::Encode<u64, D>,
16105 > fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D> for (T0, T1, T2)
16106 {
16107 #[inline]
16108 unsafe fn encode(
16109 self,
16110 encoder: &mut fidl::encoding::Encoder<'_, D>,
16111 offset: usize,
16112 depth: fidl::encoding::Depth,
16113 ) -> fidl::Result<()> {
16114 encoder.debug_check_bounds::<OneLayerStructWithPaddingAlign8>(offset);
16115 unsafe {
16118 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
16119 (ptr as *mut u64).write_unaligned(0);
16120 }
16121 self.0.encode(encoder, offset + 0, depth)?;
16123 self.1.encode(encoder, offset + 4, depth)?;
16124 self.2.encode(encoder, offset + 8, depth)?;
16125 Ok(())
16126 }
16127 }
16128
16129 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16130 for OneLayerStructWithPaddingAlign8
16131 {
16132 #[inline(always)]
16133 fn new_empty() -> Self {
16134 Self {
16135 a: fidl::new_empty!(u32, D),
16136 b: fidl::new_empty!(u16, D),
16137 c: fidl::new_empty!(u64, D),
16138 }
16139 }
16140
16141 #[inline]
16142 unsafe fn decode(
16143 &mut self,
16144 decoder: &mut fidl::encoding::Decoder<'_, D>,
16145 offset: usize,
16146 _depth: fidl::encoding::Depth,
16147 ) -> fidl::Result<()> {
16148 decoder.debug_check_bounds::<Self>(offset);
16149 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
16150 let ptr = unsafe { buf_ptr.offset(0) };
16152 let padval = unsafe { (ptr as *const u64).read_unaligned() };
16153 let mask = 0xffff000000000000u64;
16154 let maskedval = padval & mask;
16155 if maskedval != 0 {
16156 return Err(fidl::Error::NonZeroPadding {
16157 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
16158 });
16159 }
16160 unsafe {
16162 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
16163 }
16164 Ok(())
16165 }
16166 }
16167
16168 impl fidl::encoding::ValueTypeMarker for OptionalEmptyStructWrapper {
16169 type Borrowed<'a> = &'a Self;
16170 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16171 value
16172 }
16173 }
16174
16175 unsafe impl fidl::encoding::TypeMarker for OptionalEmptyStructWrapper {
16176 type Owned = Self;
16177
16178 #[inline(always)]
16179 fn inline_align(_context: fidl::encoding::Context) -> usize {
16180 8
16181 }
16182
16183 #[inline(always)]
16184 fn inline_size(_context: fidl::encoding::Context) -> usize {
16185 8
16186 }
16187 }
16188
16189 unsafe impl<D: fidl::encoding::ResourceDialect>
16190 fidl::encoding::Encode<OptionalEmptyStructWrapper, D> for &OptionalEmptyStructWrapper
16191 {
16192 #[inline]
16193 unsafe fn encode(
16194 self,
16195 encoder: &mut fidl::encoding::Encoder<'_, D>,
16196 offset: usize,
16197 _depth: fidl::encoding::Depth,
16198 ) -> fidl::Result<()> {
16199 encoder.debug_check_bounds::<OptionalEmptyStructWrapper>(offset);
16200 fidl::encoding::Encode::<OptionalEmptyStructWrapper, D>::encode(
16202 (<fidl::encoding::Boxed<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(
16203 &self.s,
16204 ),),
16205 encoder,
16206 offset,
16207 _depth,
16208 )
16209 }
16210 }
16211 unsafe impl<
16212 D: fidl::encoding::ResourceDialect,
16213 T0: fidl::encoding::Encode<fidl::encoding::Boxed<EmptyStruct>, D>,
16214 > fidl::encoding::Encode<OptionalEmptyStructWrapper, D> for (T0,)
16215 {
16216 #[inline]
16217 unsafe fn encode(
16218 self,
16219 encoder: &mut fidl::encoding::Encoder<'_, D>,
16220 offset: usize,
16221 depth: fidl::encoding::Depth,
16222 ) -> fidl::Result<()> {
16223 encoder.debug_check_bounds::<OptionalEmptyStructWrapper>(offset);
16224 self.0.encode(encoder, offset + 0, depth)?;
16228 Ok(())
16229 }
16230 }
16231
16232 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16233 for OptionalEmptyStructWrapper
16234 {
16235 #[inline(always)]
16236 fn new_empty() -> Self {
16237 Self { s: fidl::new_empty!(fidl::encoding::Boxed<EmptyStruct>, D) }
16238 }
16239
16240 #[inline]
16241 unsafe fn decode(
16242 &mut self,
16243 decoder: &mut fidl::encoding::Decoder<'_, D>,
16244 offset: usize,
16245 _depth: fidl::encoding::Depth,
16246 ) -> fidl::Result<()> {
16247 decoder.debug_check_bounds::<Self>(offset);
16248 fidl::decode!(
16250 fidl::encoding::Boxed<EmptyStruct>,
16251 D,
16252 &mut self.s,
16253 decoder,
16254 offset + 0,
16255 _depth
16256 )?;
16257 Ok(())
16258 }
16259 }
16260
16261 impl fidl::encoding::ValueTypeMarker for OptionalStringWrapper {
16262 type Borrowed<'a> = &'a Self;
16263 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16264 value
16265 }
16266 }
16267
16268 unsafe impl fidl::encoding::TypeMarker for OptionalStringWrapper {
16269 type Owned = Self;
16270
16271 #[inline(always)]
16272 fn inline_align(_context: fidl::encoding::Context) -> usize {
16273 8
16274 }
16275
16276 #[inline(always)]
16277 fn inline_size(_context: fidl::encoding::Context) -> usize {
16278 16
16279 }
16280 }
16281
16282 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalStringWrapper, D>
16283 for &OptionalStringWrapper
16284 {
16285 #[inline]
16286 unsafe fn encode(
16287 self,
16288 encoder: &mut fidl::encoding::Encoder<'_, D>,
16289 offset: usize,
16290 _depth: fidl::encoding::Depth,
16291 ) -> fidl::Result<()> {
16292 encoder.debug_check_bounds::<OptionalStringWrapper>(offset);
16293 fidl::encoding::Encode::<OptionalStringWrapper, D>::encode(
16295 (
16296 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.str),
16297 ),
16298 encoder, offset, _depth
16299 )
16300 }
16301 }
16302 unsafe impl<
16303 D: fidl::encoding::ResourceDialect,
16304 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
16305 > fidl::encoding::Encode<OptionalStringWrapper, D> for (T0,)
16306 {
16307 #[inline]
16308 unsafe fn encode(
16309 self,
16310 encoder: &mut fidl::encoding::Encoder<'_, D>,
16311 offset: usize,
16312 depth: fidl::encoding::Depth,
16313 ) -> fidl::Result<()> {
16314 encoder.debug_check_bounds::<OptionalStringWrapper>(offset);
16315 self.0.encode(encoder, offset + 0, depth)?;
16319 Ok(())
16320 }
16321 }
16322
16323 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalStringWrapper {
16324 #[inline(always)]
16325 fn new_empty() -> Self {
16326 Self {
16327 str: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
16328 }
16329 }
16330
16331 #[inline]
16332 unsafe fn decode(
16333 &mut self,
16334 decoder: &mut fidl::encoding::Decoder<'_, D>,
16335 offset: usize,
16336 _depth: fidl::encoding::Depth,
16337 ) -> fidl::Result<()> {
16338 decoder.debug_check_bounds::<Self>(offset);
16339 fidl::decode!(
16341 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
16342 D,
16343 &mut self.str,
16344 decoder,
16345 offset + 0,
16346 _depth
16347 )?;
16348 Ok(())
16349 }
16350 }
16351
16352 impl fidl::encoding::ValueTypeMarker for OptionalVectorWrapper {
16353 type Borrowed<'a> = &'a Self;
16354 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16355 value
16356 }
16357 }
16358
16359 unsafe impl fidl::encoding::TypeMarker for OptionalVectorWrapper {
16360 type Owned = Self;
16361
16362 #[inline(always)]
16363 fn inline_align(_context: fidl::encoding::Context) -> usize {
16364 8
16365 }
16366
16367 #[inline(always)]
16368 fn inline_size(_context: fidl::encoding::Context) -> usize {
16369 16
16370 }
16371 }
16372
16373 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OptionalVectorWrapper, D>
16374 for &OptionalVectorWrapper
16375 {
16376 #[inline]
16377 unsafe fn encode(
16378 self,
16379 encoder: &mut fidl::encoding::Encoder<'_, D>,
16380 offset: usize,
16381 _depth: fidl::encoding::Depth,
16382 ) -> fidl::Result<()> {
16383 encoder.debug_check_bounds::<OptionalVectorWrapper>(offset);
16384 fidl::encoding::Encode::<OptionalVectorWrapper, D>::encode(
16386 (
16387 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16388 ),
16389 encoder, offset, _depth
16390 )
16391 }
16392 }
16393 unsafe impl<
16394 D: fidl::encoding::ResourceDialect,
16395 T0: fidl::encoding::Encode<
16396 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16397 D,
16398 >,
16399 > fidl::encoding::Encode<OptionalVectorWrapper, D> for (T0,)
16400 {
16401 #[inline]
16402 unsafe fn encode(
16403 self,
16404 encoder: &mut fidl::encoding::Encoder<'_, D>,
16405 offset: usize,
16406 depth: fidl::encoding::Depth,
16407 ) -> fidl::Result<()> {
16408 encoder.debug_check_bounds::<OptionalVectorWrapper>(offset);
16409 self.0.encode(encoder, offset + 0, depth)?;
16413 Ok(())
16414 }
16415 }
16416
16417 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OptionalVectorWrapper {
16418 #[inline(always)]
16419 fn new_empty() -> Self {
16420 Self {
16421 v: fidl::new_empty!(
16422 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16423 D
16424 ),
16425 }
16426 }
16427
16428 #[inline]
16429 unsafe fn decode(
16430 &mut self,
16431 decoder: &mut fidl::encoding::Decoder<'_, D>,
16432 offset: usize,
16433 _depth: fidl::encoding::Depth,
16434 ) -> fidl::Result<()> {
16435 decoder.debug_check_bounds::<Self>(offset);
16436 fidl::decode!(
16438 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u8>>,
16439 D,
16440 &mut self.v,
16441 decoder,
16442 offset + 0,
16443 _depth
16444 )?;
16445 Ok(())
16446 }
16447 }
16448
16449 impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed4 {
16450 type Borrowed<'a> = &'a Self;
16451 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16452 value
16453 }
16454 }
16455
16456 unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed4 {
16457 type Owned = Self;
16458
16459 #[inline(always)]
16460 fn inline_align(_context: fidl::encoding::Context) -> usize {
16461 8
16462 }
16463
16464 #[inline(always)]
16465 fn inline_size(_context: fidl::encoding::Context) -> usize {
16466 16
16467 }
16468 }
16469
16470 unsafe impl<D: fidl::encoding::ResourceDialect>
16471 fidl::encoding::Encode<OutOfLinePaddingZeroed4, D> for &OutOfLinePaddingZeroed4
16472 {
16473 #[inline]
16474 unsafe fn encode(
16475 self,
16476 encoder: &mut fidl::encoding::Encoder<'_, D>,
16477 offset: usize,
16478 _depth: fidl::encoding::Depth,
16479 ) -> fidl::Result<()> {
16480 encoder.debug_check_bounds::<OutOfLinePaddingZeroed4>(offset);
16481 fidl::encoding::Encode::<OutOfLinePaddingZeroed4, D>::encode(
16483 (
16484 <fidl::encoding::Boxed<Uint32Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16485 <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16486 ),
16487 encoder, offset, _depth
16488 )
16489 }
16490 }
16491 unsafe impl<
16492 D: fidl::encoding::ResourceDialect,
16493 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint32Struct>, D>,
16494 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16495 > fidl::encoding::Encode<OutOfLinePaddingZeroed4, D> for (T0, T1)
16496 {
16497 #[inline]
16498 unsafe fn encode(
16499 self,
16500 encoder: &mut fidl::encoding::Encoder<'_, D>,
16501 offset: usize,
16502 depth: fidl::encoding::Depth,
16503 ) -> fidl::Result<()> {
16504 encoder.debug_check_bounds::<OutOfLinePaddingZeroed4>(offset);
16505 self.0.encode(encoder, offset + 0, depth)?;
16509 self.1.encode(encoder, offset + 8, depth)?;
16510 Ok(())
16511 }
16512 }
16513
16514 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16515 for OutOfLinePaddingZeroed4
16516 {
16517 #[inline(always)]
16518 fn new_empty() -> Self {
16519 Self {
16520 a: fidl::new_empty!(fidl::encoding::Boxed<Uint32Struct>, D),
16521 b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16522 }
16523 }
16524
16525 #[inline]
16526 unsafe fn decode(
16527 &mut self,
16528 decoder: &mut fidl::encoding::Decoder<'_, D>,
16529 offset: usize,
16530 _depth: fidl::encoding::Depth,
16531 ) -> fidl::Result<()> {
16532 decoder.debug_check_bounds::<Self>(offset);
16533 fidl::decode!(
16535 fidl::encoding::Boxed<Uint32Struct>,
16536 D,
16537 &mut self.a,
16538 decoder,
16539 offset + 0,
16540 _depth
16541 )?;
16542 fidl::decode!(
16543 fidl::encoding::Boxed<Uint64Struct>,
16544 D,
16545 &mut self.b,
16546 decoder,
16547 offset + 8,
16548 _depth
16549 )?;
16550 Ok(())
16551 }
16552 }
16553
16554 impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed6 {
16555 type Borrowed<'a> = &'a Self;
16556 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16557 value
16558 }
16559 }
16560
16561 unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed6 {
16562 type Owned = Self;
16563
16564 #[inline(always)]
16565 fn inline_align(_context: fidl::encoding::Context) -> usize {
16566 8
16567 }
16568
16569 #[inline(always)]
16570 fn inline_size(_context: fidl::encoding::Context) -> usize {
16571 16
16572 }
16573 }
16574
16575 unsafe impl<D: fidl::encoding::ResourceDialect>
16576 fidl::encoding::Encode<OutOfLinePaddingZeroed6, D> for &OutOfLinePaddingZeroed6
16577 {
16578 #[inline]
16579 unsafe fn encode(
16580 self,
16581 encoder: &mut fidl::encoding::Encoder<'_, D>,
16582 offset: usize,
16583 _depth: fidl::encoding::Depth,
16584 ) -> fidl::Result<()> {
16585 encoder.debug_check_bounds::<OutOfLinePaddingZeroed6>(offset);
16586 fidl::encoding::Encode::<OutOfLinePaddingZeroed6, D>::encode(
16588 (
16589 <fidl::encoding::Boxed<Uint16Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16590 <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16591 ),
16592 encoder, offset, _depth
16593 )
16594 }
16595 }
16596 unsafe impl<
16597 D: fidl::encoding::ResourceDialect,
16598 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint16Struct>, D>,
16599 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16600 > fidl::encoding::Encode<OutOfLinePaddingZeroed6, D> for (T0, T1)
16601 {
16602 #[inline]
16603 unsafe fn encode(
16604 self,
16605 encoder: &mut fidl::encoding::Encoder<'_, D>,
16606 offset: usize,
16607 depth: fidl::encoding::Depth,
16608 ) -> fidl::Result<()> {
16609 encoder.debug_check_bounds::<OutOfLinePaddingZeroed6>(offset);
16610 self.0.encode(encoder, offset + 0, depth)?;
16614 self.1.encode(encoder, offset + 8, depth)?;
16615 Ok(())
16616 }
16617 }
16618
16619 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16620 for OutOfLinePaddingZeroed6
16621 {
16622 #[inline(always)]
16623 fn new_empty() -> Self {
16624 Self {
16625 a: fidl::new_empty!(fidl::encoding::Boxed<Uint16Struct>, D),
16626 b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16627 }
16628 }
16629
16630 #[inline]
16631 unsafe fn decode(
16632 &mut self,
16633 decoder: &mut fidl::encoding::Decoder<'_, D>,
16634 offset: usize,
16635 _depth: fidl::encoding::Depth,
16636 ) -> fidl::Result<()> {
16637 decoder.debug_check_bounds::<Self>(offset);
16638 fidl::decode!(
16640 fidl::encoding::Boxed<Uint16Struct>,
16641 D,
16642 &mut self.a,
16643 decoder,
16644 offset + 0,
16645 _depth
16646 )?;
16647 fidl::decode!(
16648 fidl::encoding::Boxed<Uint64Struct>,
16649 D,
16650 &mut self.b,
16651 decoder,
16652 offset + 8,
16653 _depth
16654 )?;
16655 Ok(())
16656 }
16657 }
16658
16659 impl fidl::encoding::ValueTypeMarker for OutOfLinePaddingZeroed7 {
16660 type Borrowed<'a> = &'a Self;
16661 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16662 value
16663 }
16664 }
16665
16666 unsafe impl fidl::encoding::TypeMarker for OutOfLinePaddingZeroed7 {
16667 type Owned = Self;
16668
16669 #[inline(always)]
16670 fn inline_align(_context: fidl::encoding::Context) -> usize {
16671 8
16672 }
16673
16674 #[inline(always)]
16675 fn inline_size(_context: fidl::encoding::Context) -> usize {
16676 16
16677 }
16678 }
16679
16680 unsafe impl<D: fidl::encoding::ResourceDialect>
16681 fidl::encoding::Encode<OutOfLinePaddingZeroed7, D> for &OutOfLinePaddingZeroed7
16682 {
16683 #[inline]
16684 unsafe fn encode(
16685 self,
16686 encoder: &mut fidl::encoding::Encoder<'_, D>,
16687 offset: usize,
16688 _depth: fidl::encoding::Depth,
16689 ) -> fidl::Result<()> {
16690 encoder.debug_check_bounds::<OutOfLinePaddingZeroed7>(offset);
16691 fidl::encoding::Encode::<OutOfLinePaddingZeroed7, D>::encode(
16693 (
16694 <fidl::encoding::Boxed<Uint8Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
16695 <fidl::encoding::Boxed<Uint64Struct> as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
16696 ),
16697 encoder, offset, _depth
16698 )
16699 }
16700 }
16701 unsafe impl<
16702 D: fidl::encoding::ResourceDialect,
16703 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Uint8Struct>, D>,
16704 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Uint64Struct>, D>,
16705 > fidl::encoding::Encode<OutOfLinePaddingZeroed7, D> for (T0, T1)
16706 {
16707 #[inline]
16708 unsafe fn encode(
16709 self,
16710 encoder: &mut fidl::encoding::Encoder<'_, D>,
16711 offset: usize,
16712 depth: fidl::encoding::Depth,
16713 ) -> fidl::Result<()> {
16714 encoder.debug_check_bounds::<OutOfLinePaddingZeroed7>(offset);
16715 self.0.encode(encoder, offset + 0, depth)?;
16719 self.1.encode(encoder, offset + 8, depth)?;
16720 Ok(())
16721 }
16722 }
16723
16724 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16725 for OutOfLinePaddingZeroed7
16726 {
16727 #[inline(always)]
16728 fn new_empty() -> Self {
16729 Self {
16730 a: fidl::new_empty!(fidl::encoding::Boxed<Uint8Struct>, D),
16731 b: fidl::new_empty!(fidl::encoding::Boxed<Uint64Struct>, D),
16732 }
16733 }
16734
16735 #[inline]
16736 unsafe fn decode(
16737 &mut self,
16738 decoder: &mut fidl::encoding::Decoder<'_, D>,
16739 offset: usize,
16740 _depth: fidl::encoding::Depth,
16741 ) -> fidl::Result<()> {
16742 decoder.debug_check_bounds::<Self>(offset);
16743 fidl::decode!(
16745 fidl::encoding::Boxed<Uint8Struct>,
16746 D,
16747 &mut self.a,
16748 decoder,
16749 offset + 0,
16750 _depth
16751 )?;
16752 fidl::decode!(
16753 fidl::encoding::Boxed<Uint64Struct>,
16754 D,
16755 &mut self.b,
16756 decoder,
16757 offset + 8,
16758 _depth
16759 )?;
16760 Ok(())
16761 }
16762 }
16763
16764 impl fidl::encoding::ValueTypeMarker for OutOfLineSandwich1 {
16765 type Borrowed<'a> = &'a Self;
16766 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16767 value
16768 }
16769 }
16770
16771 unsafe impl fidl::encoding::TypeMarker for OutOfLineSandwich1 {
16772 type Owned = Self;
16773
16774 #[inline(always)]
16775 fn inline_align(_context: fidl::encoding::Context) -> usize {
16776 8
16777 }
16778
16779 #[inline(always)]
16780 fn inline_size(_context: fidl::encoding::Context) -> usize {
16781 48
16782 }
16783 }
16784
16785 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OutOfLineSandwich1, D>
16786 for &OutOfLineSandwich1
16787 {
16788 #[inline]
16789 unsafe fn encode(
16790 self,
16791 encoder: &mut fidl::encoding::Encoder<'_, D>,
16792 offset: usize,
16793 _depth: fidl::encoding::Depth,
16794 ) -> fidl::Result<()> {
16795 encoder.debug_check_bounds::<OutOfLineSandwich1>(offset);
16796 fidl::encoding::Encode::<OutOfLineSandwich1, D>::encode(
16798 (
16799 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
16800 <fidl::encoding::Vector<Sandwich1, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16801 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
16802 ),
16803 encoder, offset, _depth
16804 )
16805 }
16806 }
16807 unsafe impl<
16808 D: fidl::encoding::ResourceDialect,
16809 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
16810 T1: fidl::encoding::Encode<fidl::encoding::Vector<Sandwich1, 1>, D>,
16811 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
16812 > fidl::encoding::Encode<OutOfLineSandwich1, D> for (T0, T1, T2)
16813 {
16814 #[inline]
16815 unsafe fn encode(
16816 self,
16817 encoder: &mut fidl::encoding::Encoder<'_, D>,
16818 offset: usize,
16819 depth: fidl::encoding::Depth,
16820 ) -> fidl::Result<()> {
16821 encoder.debug_check_bounds::<OutOfLineSandwich1>(offset);
16822 self.0.encode(encoder, offset + 0, depth)?;
16826 self.1.encode(encoder, offset + 16, depth)?;
16827 self.2.encode(encoder, offset + 32, depth)?;
16828 Ok(())
16829 }
16830 }
16831
16832 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OutOfLineSandwich1 {
16833 #[inline(always)]
16834 fn new_empty() -> Self {
16835 Self {
16836 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
16837 v: fidl::new_empty!(fidl::encoding::Vector<Sandwich1, 1>, D),
16838 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
16839 }
16840 }
16841
16842 #[inline]
16843 unsafe fn decode(
16844 &mut self,
16845 decoder: &mut fidl::encoding::Decoder<'_, D>,
16846 offset: usize,
16847 _depth: fidl::encoding::Depth,
16848 ) -> fidl::Result<()> {
16849 decoder.debug_check_bounds::<Self>(offset);
16850 fidl::decode!(
16852 fidl::encoding::UnboundedString,
16853 D,
16854 &mut self.before,
16855 decoder,
16856 offset + 0,
16857 _depth
16858 )?;
16859 fidl::decode!(fidl::encoding::Vector<Sandwich1, 1>, D, &mut self.v, decoder, offset + 16, _depth)?;
16860 fidl::decode!(
16861 fidl::encoding::UnboundedString,
16862 D,
16863 &mut self.after,
16864 decoder,
16865 offset + 32,
16866 _depth
16867 )?;
16868 Ok(())
16869 }
16870 }
16871
16872 impl fidl::encoding::ValueTypeMarker for OutOfLineSandwich1WithOptUnion {
16873 type Borrowed<'a> = &'a Self;
16874 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16875 value
16876 }
16877 }
16878
16879 unsafe impl fidl::encoding::TypeMarker for OutOfLineSandwich1WithOptUnion {
16880 type Owned = Self;
16881
16882 #[inline(always)]
16883 fn inline_align(_context: fidl::encoding::Context) -> usize {
16884 8
16885 }
16886
16887 #[inline(always)]
16888 fn inline_size(_context: fidl::encoding::Context) -> usize {
16889 48
16890 }
16891 }
16892
16893 unsafe impl<D: fidl::encoding::ResourceDialect>
16894 fidl::encoding::Encode<OutOfLineSandwich1WithOptUnion, D>
16895 for &OutOfLineSandwich1WithOptUnion
16896 {
16897 #[inline]
16898 unsafe fn encode(
16899 self,
16900 encoder: &mut fidl::encoding::Encoder<'_, D>,
16901 offset: usize,
16902 _depth: fidl::encoding::Depth,
16903 ) -> fidl::Result<()> {
16904 encoder.debug_check_bounds::<OutOfLineSandwich1WithOptUnion>(offset);
16905 fidl::encoding::Encode::<OutOfLineSandwich1WithOptUnion, D>::encode(
16907 (
16908 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
16909 <fidl::encoding::Vector<Sandwich1WithOptUnion, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
16910 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
16911 ),
16912 encoder, offset, _depth
16913 )
16914 }
16915 }
16916 unsafe impl<
16917 D: fidl::encoding::ResourceDialect,
16918 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
16919 T1: fidl::encoding::Encode<fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D>,
16920 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
16921 > fidl::encoding::Encode<OutOfLineSandwich1WithOptUnion, D> for (T0, T1, T2)
16922 {
16923 #[inline]
16924 unsafe fn encode(
16925 self,
16926 encoder: &mut fidl::encoding::Encoder<'_, D>,
16927 offset: usize,
16928 depth: fidl::encoding::Depth,
16929 ) -> fidl::Result<()> {
16930 encoder.debug_check_bounds::<OutOfLineSandwich1WithOptUnion>(offset);
16931 self.0.encode(encoder, offset + 0, depth)?;
16935 self.1.encode(encoder, offset + 16, depth)?;
16936 self.2.encode(encoder, offset + 32, depth)?;
16937 Ok(())
16938 }
16939 }
16940
16941 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16942 for OutOfLineSandwich1WithOptUnion
16943 {
16944 #[inline(always)]
16945 fn new_empty() -> Self {
16946 Self {
16947 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
16948 v: fidl::new_empty!(fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D),
16949 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
16950 }
16951 }
16952
16953 #[inline]
16954 unsafe fn decode(
16955 &mut self,
16956 decoder: &mut fidl::encoding::Decoder<'_, D>,
16957 offset: usize,
16958 _depth: fidl::encoding::Depth,
16959 ) -> fidl::Result<()> {
16960 decoder.debug_check_bounds::<Self>(offset);
16961 fidl::decode!(
16963 fidl::encoding::UnboundedString,
16964 D,
16965 &mut self.before,
16966 decoder,
16967 offset + 0,
16968 _depth
16969 )?;
16970 fidl::decode!(fidl::encoding::Vector<Sandwich1WithOptUnion, 1>, D, &mut self.v, decoder, offset + 16, _depth)?;
16971 fidl::decode!(
16972 fidl::encoding::UnboundedString,
16973 D,
16974 &mut self.after,
16975 decoder,
16976 offset + 32,
16977 _depth
16978 )?;
16979 Ok(())
16980 }
16981 }
16982
16983 impl fidl::encoding::ValueTypeMarker for PaddedTableStruct {
16984 type Borrowed<'a> = &'a Self;
16985 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16986 value
16987 }
16988 }
16989
16990 unsafe impl fidl::encoding::TypeMarker for PaddedTableStruct {
16991 type Owned = Self;
16992
16993 #[inline(always)]
16994 fn inline_align(_context: fidl::encoding::Context) -> usize {
16995 8
16996 }
16997
16998 #[inline(always)]
16999 fn inline_size(_context: fidl::encoding::Context) -> usize {
17000 16
17001 }
17002 }
17003
17004 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedTableStruct, D>
17005 for &PaddedTableStruct
17006 {
17007 #[inline]
17008 unsafe fn encode(
17009 self,
17010 encoder: &mut fidl::encoding::Encoder<'_, D>,
17011 offset: usize,
17012 _depth: fidl::encoding::Depth,
17013 ) -> fidl::Result<()> {
17014 encoder.debug_check_bounds::<PaddedTableStruct>(offset);
17015 fidl::encoding::Encode::<PaddedTableStruct, D>::encode(
17017 (<PaddedTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
17018 encoder,
17019 offset,
17020 _depth,
17021 )
17022 }
17023 }
17024 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PaddedTable, D>>
17025 fidl::encoding::Encode<PaddedTableStruct, D> for (T0,)
17026 {
17027 #[inline]
17028 unsafe fn encode(
17029 self,
17030 encoder: &mut fidl::encoding::Encoder<'_, D>,
17031 offset: usize,
17032 depth: fidl::encoding::Depth,
17033 ) -> fidl::Result<()> {
17034 encoder.debug_check_bounds::<PaddedTableStruct>(offset);
17035 self.0.encode(encoder, offset + 0, depth)?;
17039 Ok(())
17040 }
17041 }
17042
17043 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedTableStruct {
17044 #[inline(always)]
17045 fn new_empty() -> Self {
17046 Self { t: fidl::new_empty!(PaddedTable, D) }
17047 }
17048
17049 #[inline]
17050 unsafe fn decode(
17051 &mut self,
17052 decoder: &mut fidl::encoding::Decoder<'_, D>,
17053 offset: usize,
17054 _depth: fidl::encoding::Depth,
17055 ) -> fidl::Result<()> {
17056 decoder.debug_check_bounds::<Self>(offset);
17057 fidl::decode!(PaddedTable, D, &mut self.t, decoder, offset + 0, _depth)?;
17059 Ok(())
17060 }
17061 }
17062
17063 impl fidl::encoding::ValueTypeMarker for PaddedUnionStruct {
17064 type Borrowed<'a> = &'a Self;
17065 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17066 value
17067 }
17068 }
17069
17070 unsafe impl fidl::encoding::TypeMarker for PaddedUnionStruct {
17071 type Owned = Self;
17072
17073 #[inline(always)]
17074 fn inline_align(_context: fidl::encoding::Context) -> usize {
17075 8
17076 }
17077
17078 #[inline(always)]
17079 fn inline_size(_context: fidl::encoding::Context) -> usize {
17080 16
17081 }
17082 }
17083
17084 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedUnionStruct, D>
17085 for &PaddedUnionStruct
17086 {
17087 #[inline]
17088 unsafe fn encode(
17089 self,
17090 encoder: &mut fidl::encoding::Encoder<'_, D>,
17091 offset: usize,
17092 _depth: fidl::encoding::Depth,
17093 ) -> fidl::Result<()> {
17094 encoder.debug_check_bounds::<PaddedUnionStruct>(offset);
17095 fidl::encoding::Encode::<PaddedUnionStruct, D>::encode(
17097 (<PaddedUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
17098 encoder,
17099 offset,
17100 _depth,
17101 )
17102 }
17103 }
17104 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PaddedUnion, D>>
17105 fidl::encoding::Encode<PaddedUnionStruct, D> for (T0,)
17106 {
17107 #[inline]
17108 unsafe fn encode(
17109 self,
17110 encoder: &mut fidl::encoding::Encoder<'_, D>,
17111 offset: usize,
17112 depth: fidl::encoding::Depth,
17113 ) -> fidl::Result<()> {
17114 encoder.debug_check_bounds::<PaddedUnionStruct>(offset);
17115 self.0.encode(encoder, offset + 0, depth)?;
17119 Ok(())
17120 }
17121 }
17122
17123 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedUnionStruct {
17124 #[inline(always)]
17125 fn new_empty() -> Self {
17126 Self { u: fidl::new_empty!(PaddedUnion, D) }
17127 }
17128
17129 #[inline]
17130 unsafe fn decode(
17131 &mut self,
17132 decoder: &mut fidl::encoding::Decoder<'_, D>,
17133 offset: usize,
17134 _depth: fidl::encoding::Depth,
17135 ) -> fidl::Result<()> {
17136 decoder.debug_check_bounds::<Self>(offset);
17137 fidl::decode!(PaddedUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
17139 Ok(())
17140 }
17141 }
17142
17143 impl fidl::encoding::ValueTypeMarker for PaddingAlignment2MaskMayBe4Bytes {
17144 type Borrowed<'a> = &'a Self;
17145 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17146 value
17147 }
17148 }
17149
17150 unsafe impl fidl::encoding::TypeMarker for PaddingAlignment2MaskMayBe4Bytes {
17151 type Owned = Self;
17152
17153 #[inline(always)]
17154 fn inline_align(_context: fidl::encoding::Context) -> usize {
17155 2
17156 }
17157
17158 #[inline(always)]
17159 fn inline_size(_context: fidl::encoding::Context) -> usize {
17160 6
17161 }
17162 }
17163
17164 unsafe impl<D: fidl::encoding::ResourceDialect>
17165 fidl::encoding::Encode<PaddingAlignment2MaskMayBe4Bytes, D>
17166 for &PaddingAlignment2MaskMayBe4Bytes
17167 {
17168 #[inline]
17169 unsafe fn encode(
17170 self,
17171 encoder: &mut fidl::encoding::Encoder<'_, D>,
17172 offset: usize,
17173 _depth: fidl::encoding::Depth,
17174 ) -> fidl::Result<()> {
17175 encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4Bytes>(offset);
17176 unsafe {
17177 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17179 (buf_ptr as *mut PaddingAlignment2MaskMayBe4Bytes)
17180 .write_unaligned((self as *const PaddingAlignment2MaskMayBe4Bytes).read());
17181 let padding_ptr = buf_ptr.offset(0) as *mut u16;
17184 let padding_mask = 0xff00u16;
17185 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17186 }
17187 Ok(())
17188 }
17189 }
17190 unsafe impl<
17191 D: fidl::encoding::ResourceDialect,
17192 T0: fidl::encoding::Encode<u8, D>,
17193 T1: fidl::encoding::Encode<u16, D>,
17194 T2: fidl::encoding::Encode<u16, D>,
17195 > fidl::encoding::Encode<PaddingAlignment2MaskMayBe4Bytes, D> for (T0, T1, T2)
17196 {
17197 #[inline]
17198 unsafe fn encode(
17199 self,
17200 encoder: &mut fidl::encoding::Encoder<'_, D>,
17201 offset: usize,
17202 depth: fidl::encoding::Depth,
17203 ) -> fidl::Result<()> {
17204 encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4Bytes>(offset);
17205 unsafe {
17208 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17209 (ptr as *mut u16).write_unaligned(0);
17210 }
17211 self.0.encode(encoder, offset + 0, depth)?;
17213 self.1.encode(encoder, offset + 2, depth)?;
17214 self.2.encode(encoder, offset + 4, depth)?;
17215 Ok(())
17216 }
17217 }
17218
17219 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17220 for PaddingAlignment2MaskMayBe4Bytes
17221 {
17222 #[inline(always)]
17223 fn new_empty() -> Self {
17224 Self {
17225 a: fidl::new_empty!(u8, D),
17226 b: fidl::new_empty!(u16, D),
17227 c: fidl::new_empty!(u16, D),
17228 }
17229 }
17230
17231 #[inline]
17232 unsafe fn decode(
17233 &mut self,
17234 decoder: &mut fidl::encoding::Decoder<'_, D>,
17235 offset: usize,
17236 _depth: fidl::encoding::Depth,
17237 ) -> fidl::Result<()> {
17238 decoder.debug_check_bounds::<Self>(offset);
17239 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17240 let ptr = unsafe { buf_ptr.offset(0) };
17242 let padval = unsafe { (ptr as *const u16).read_unaligned() };
17243 let mask = 0xff00u16;
17244 let maskedval = padval & mask;
17245 if maskedval != 0 {
17246 return Err(fidl::Error::NonZeroPadding {
17247 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17248 });
17249 }
17250 unsafe {
17252 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 6);
17253 }
17254 Ok(())
17255 }
17256 }
17257
17258 impl fidl::encoding::ValueTypeMarker for PaddingAlignment2MaskMayBe4BytesVector {
17259 type Borrowed<'a> = &'a Self;
17260 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17261 value
17262 }
17263 }
17264
17265 unsafe impl fidl::encoding::TypeMarker for PaddingAlignment2MaskMayBe4BytesVector {
17266 type Owned = Self;
17267
17268 #[inline(always)]
17269 fn inline_align(_context: fidl::encoding::Context) -> usize {
17270 8
17271 }
17272
17273 #[inline(always)]
17274 fn inline_size(_context: fidl::encoding::Context) -> usize {
17275 16
17276 }
17277 }
17278
17279 unsafe impl<D: fidl::encoding::ResourceDialect>
17280 fidl::encoding::Encode<PaddingAlignment2MaskMayBe4BytesVector, D>
17281 for &PaddingAlignment2MaskMayBe4BytesVector
17282 {
17283 #[inline]
17284 unsafe fn encode(
17285 self,
17286 encoder: &mut fidl::encoding::Encoder<'_, D>,
17287 offset: usize,
17288 _depth: fidl::encoding::Depth,
17289 ) -> fidl::Result<()> {
17290 encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4BytesVector>(offset);
17291 fidl::encoding::Encode::<PaddingAlignment2MaskMayBe4BytesVector, D>::encode(
17293 (
17294 <fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17295 ),
17296 encoder, offset, _depth
17297 )
17298 }
17299 }
17300 unsafe impl<
17301 D: fidl::encoding::ResourceDialect,
17302 T0: fidl::encoding::Encode<
17303 fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17304 D,
17305 >,
17306 > fidl::encoding::Encode<PaddingAlignment2MaskMayBe4BytesVector, D> for (T0,)
17307 {
17308 #[inline]
17309 unsafe fn encode(
17310 self,
17311 encoder: &mut fidl::encoding::Encoder<'_, D>,
17312 offset: usize,
17313 depth: fidl::encoding::Depth,
17314 ) -> fidl::Result<()> {
17315 encoder.debug_check_bounds::<PaddingAlignment2MaskMayBe4BytesVector>(offset);
17316 self.0.encode(encoder, offset + 0, depth)?;
17320 Ok(())
17321 }
17322 }
17323
17324 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17325 for PaddingAlignment2MaskMayBe4BytesVector
17326 {
17327 #[inline(always)]
17328 fn new_empty() -> Self {
17329 Self {
17330 v: fidl::new_empty!(
17331 fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17332 D
17333 ),
17334 }
17335 }
17336
17337 #[inline]
17338 unsafe fn decode(
17339 &mut self,
17340 decoder: &mut fidl::encoding::Decoder<'_, D>,
17341 offset: usize,
17342 _depth: fidl::encoding::Depth,
17343 ) -> fidl::Result<()> {
17344 decoder.debug_check_bounds::<Self>(offset);
17345 fidl::decode!(
17347 fidl::encoding::UnboundedVector<PaddingAlignment2MaskMayBe4Bytes>,
17348 D,
17349 &mut self.v,
17350 decoder,
17351 offset + 0,
17352 _depth
17353 )?;
17354 Ok(())
17355 }
17356 }
17357
17358 impl fidl::encoding::ValueTypeMarker for PaddingAlignment4MaskMayBe8Bytes {
17359 type Borrowed<'a> = &'a Self;
17360 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17361 value
17362 }
17363 }
17364
17365 unsafe impl fidl::encoding::TypeMarker for PaddingAlignment4MaskMayBe8Bytes {
17366 type Owned = Self;
17367
17368 #[inline(always)]
17369 fn inline_align(_context: fidl::encoding::Context) -> usize {
17370 4
17371 }
17372
17373 #[inline(always)]
17374 fn inline_size(_context: fidl::encoding::Context) -> usize {
17375 12
17376 }
17377 }
17378
17379 unsafe impl<D: fidl::encoding::ResourceDialect>
17380 fidl::encoding::Encode<PaddingAlignment4MaskMayBe8Bytes, D>
17381 for &PaddingAlignment4MaskMayBe8Bytes
17382 {
17383 #[inline]
17384 unsafe fn encode(
17385 self,
17386 encoder: &mut fidl::encoding::Encoder<'_, D>,
17387 offset: usize,
17388 _depth: fidl::encoding::Depth,
17389 ) -> fidl::Result<()> {
17390 encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8Bytes>(offset);
17391 unsafe {
17392 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17394 (buf_ptr as *mut PaddingAlignment4MaskMayBe8Bytes)
17395 .write_unaligned((self as *const PaddingAlignment4MaskMayBe8Bytes).read());
17396 let padding_ptr = buf_ptr.offset(0) as *mut u32;
17399 let padding_mask = 0xffffff00u32;
17400 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17401 }
17402 Ok(())
17403 }
17404 }
17405 unsafe impl<
17406 D: fidl::encoding::ResourceDialect,
17407 T0: fidl::encoding::Encode<u8, D>,
17408 T1: fidl::encoding::Encode<u32, D>,
17409 T2: fidl::encoding::Encode<u32, D>,
17410 > fidl::encoding::Encode<PaddingAlignment4MaskMayBe8Bytes, D> for (T0, T1, T2)
17411 {
17412 #[inline]
17413 unsafe fn encode(
17414 self,
17415 encoder: &mut fidl::encoding::Encoder<'_, D>,
17416 offset: usize,
17417 depth: fidl::encoding::Depth,
17418 ) -> fidl::Result<()> {
17419 encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8Bytes>(offset);
17420 unsafe {
17423 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17424 (ptr as *mut u32).write_unaligned(0);
17425 }
17426 self.0.encode(encoder, offset + 0, depth)?;
17428 self.1.encode(encoder, offset + 4, depth)?;
17429 self.2.encode(encoder, offset + 8, depth)?;
17430 Ok(())
17431 }
17432 }
17433
17434 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17435 for PaddingAlignment4MaskMayBe8Bytes
17436 {
17437 #[inline(always)]
17438 fn new_empty() -> Self {
17439 Self {
17440 a: fidl::new_empty!(u8, D),
17441 b: fidl::new_empty!(u32, D),
17442 c: fidl::new_empty!(u32, D),
17443 }
17444 }
17445
17446 #[inline]
17447 unsafe fn decode(
17448 &mut self,
17449 decoder: &mut fidl::encoding::Decoder<'_, D>,
17450 offset: usize,
17451 _depth: fidl::encoding::Depth,
17452 ) -> fidl::Result<()> {
17453 decoder.debug_check_bounds::<Self>(offset);
17454 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17455 let ptr = unsafe { buf_ptr.offset(0) };
17457 let padval = unsafe { (ptr as *const u32).read_unaligned() };
17458 let mask = 0xffffff00u32;
17459 let maskedval = padval & mask;
17460 if maskedval != 0 {
17461 return Err(fidl::Error::NonZeroPadding {
17462 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17463 });
17464 }
17465 unsafe {
17467 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
17468 }
17469 Ok(())
17470 }
17471 }
17472
17473 impl fidl::encoding::ValueTypeMarker for PaddingAlignment4MaskMayBe8BytesVector {
17474 type Borrowed<'a> = &'a Self;
17475 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17476 value
17477 }
17478 }
17479
17480 unsafe impl fidl::encoding::TypeMarker for PaddingAlignment4MaskMayBe8BytesVector {
17481 type Owned = Self;
17482
17483 #[inline(always)]
17484 fn inline_align(_context: fidl::encoding::Context) -> usize {
17485 8
17486 }
17487
17488 #[inline(always)]
17489 fn inline_size(_context: fidl::encoding::Context) -> usize {
17490 16
17491 }
17492 }
17493
17494 unsafe impl<D: fidl::encoding::ResourceDialect>
17495 fidl::encoding::Encode<PaddingAlignment4MaskMayBe8BytesVector, D>
17496 for &PaddingAlignment4MaskMayBe8BytesVector
17497 {
17498 #[inline]
17499 unsafe fn encode(
17500 self,
17501 encoder: &mut fidl::encoding::Encoder<'_, D>,
17502 offset: usize,
17503 _depth: fidl::encoding::Depth,
17504 ) -> fidl::Result<()> {
17505 encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8BytesVector>(offset);
17506 fidl::encoding::Encode::<PaddingAlignment4MaskMayBe8BytesVector, D>::encode(
17508 (
17509 <fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
17510 ),
17511 encoder, offset, _depth
17512 )
17513 }
17514 }
17515 unsafe impl<
17516 D: fidl::encoding::ResourceDialect,
17517 T0: fidl::encoding::Encode<
17518 fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17519 D,
17520 >,
17521 > fidl::encoding::Encode<PaddingAlignment4MaskMayBe8BytesVector, D> for (T0,)
17522 {
17523 #[inline]
17524 unsafe fn encode(
17525 self,
17526 encoder: &mut fidl::encoding::Encoder<'_, D>,
17527 offset: usize,
17528 depth: fidl::encoding::Depth,
17529 ) -> fidl::Result<()> {
17530 encoder.debug_check_bounds::<PaddingAlignment4MaskMayBe8BytesVector>(offset);
17531 self.0.encode(encoder, offset + 0, depth)?;
17535 Ok(())
17536 }
17537 }
17538
17539 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17540 for PaddingAlignment4MaskMayBe8BytesVector
17541 {
17542 #[inline(always)]
17543 fn new_empty() -> Self {
17544 Self {
17545 v: fidl::new_empty!(
17546 fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17547 D
17548 ),
17549 }
17550 }
17551
17552 #[inline]
17553 unsafe fn decode(
17554 &mut self,
17555 decoder: &mut fidl::encoding::Decoder<'_, D>,
17556 offset: usize,
17557 _depth: fidl::encoding::Depth,
17558 ) -> fidl::Result<()> {
17559 decoder.debug_check_bounds::<Self>(offset);
17560 fidl::decode!(
17562 fidl::encoding::UnboundedVector<PaddingAlignment4MaskMayBe8Bytes>,
17563 D,
17564 &mut self.v,
17565 decoder,
17566 offset + 0,
17567 _depth
17568 )?;
17569 Ok(())
17570 }
17571 }
17572
17573 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt16Int32 {
17574 type Borrowed<'a> = &'a Self;
17575 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17576 value
17577 }
17578 }
17579
17580 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt16Int32 {
17581 type Owned = Self;
17582
17583 #[inline(always)]
17584 fn inline_align(_context: fidl::encoding::Context) -> usize {
17585 4
17586 }
17587
17588 #[inline(always)]
17589 fn inline_size(_context: fidl::encoding::Context) -> usize {
17590 8
17591 }
17592 }
17593
17594 unsafe impl<D: fidl::encoding::ResourceDialect>
17595 fidl::encoding::Encode<PaddingBetweenFieldsInt16Int32, D>
17596 for &PaddingBetweenFieldsInt16Int32
17597 {
17598 #[inline]
17599 unsafe fn encode(
17600 self,
17601 encoder: &mut fidl::encoding::Encoder<'_, D>,
17602 offset: usize,
17603 _depth: fidl::encoding::Depth,
17604 ) -> fidl::Result<()> {
17605 encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int32>(offset);
17606 unsafe {
17607 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17609 (buf_ptr as *mut PaddingBetweenFieldsInt16Int32)
17610 .write_unaligned((self as *const PaddingBetweenFieldsInt16Int32).read());
17611 let padding_ptr = buf_ptr.offset(0) as *mut u32;
17614 let padding_mask = 0xffff0000u32;
17615 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17616 }
17617 Ok(())
17618 }
17619 }
17620 unsafe impl<
17621 D: fidl::encoding::ResourceDialect,
17622 T0: fidl::encoding::Encode<i16, D>,
17623 T1: fidl::encoding::Encode<i32, D>,
17624 > fidl::encoding::Encode<PaddingBetweenFieldsInt16Int32, D> for (T0, T1)
17625 {
17626 #[inline]
17627 unsafe fn encode(
17628 self,
17629 encoder: &mut fidl::encoding::Encoder<'_, D>,
17630 offset: usize,
17631 depth: fidl::encoding::Depth,
17632 ) -> fidl::Result<()> {
17633 encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int32>(offset);
17634 unsafe {
17637 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17638 (ptr as *mut u32).write_unaligned(0);
17639 }
17640 self.0.encode(encoder, offset + 0, depth)?;
17642 self.1.encode(encoder, offset + 4, depth)?;
17643 Ok(())
17644 }
17645 }
17646
17647 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17648 for PaddingBetweenFieldsInt16Int32
17649 {
17650 #[inline(always)]
17651 fn new_empty() -> Self {
17652 Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i32, D) }
17653 }
17654
17655 #[inline]
17656 unsafe fn decode(
17657 &mut self,
17658 decoder: &mut fidl::encoding::Decoder<'_, D>,
17659 offset: usize,
17660 _depth: fidl::encoding::Depth,
17661 ) -> fidl::Result<()> {
17662 decoder.debug_check_bounds::<Self>(offset);
17663 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17664 let ptr = unsafe { buf_ptr.offset(0) };
17666 let padval = unsafe { (ptr as *const u32).read_unaligned() };
17667 let mask = 0xffff0000u32;
17668 let maskedval = padval & mask;
17669 if maskedval != 0 {
17670 return Err(fidl::Error::NonZeroPadding {
17671 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17672 });
17673 }
17674 unsafe {
17676 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
17677 }
17678 Ok(())
17679 }
17680 }
17681
17682 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt16Int64 {
17683 type Borrowed<'a> = &'a Self;
17684 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17685 value
17686 }
17687 }
17688
17689 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt16Int64 {
17690 type Owned = Self;
17691
17692 #[inline(always)]
17693 fn inline_align(_context: fidl::encoding::Context) -> usize {
17694 8
17695 }
17696
17697 #[inline(always)]
17698 fn inline_size(_context: fidl::encoding::Context) -> usize {
17699 16
17700 }
17701 }
17702
17703 unsafe impl<D: fidl::encoding::ResourceDialect>
17704 fidl::encoding::Encode<PaddingBetweenFieldsInt16Int64, D>
17705 for &PaddingBetweenFieldsInt16Int64
17706 {
17707 #[inline]
17708 unsafe fn encode(
17709 self,
17710 encoder: &mut fidl::encoding::Encoder<'_, D>,
17711 offset: usize,
17712 _depth: fidl::encoding::Depth,
17713 ) -> fidl::Result<()> {
17714 encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int64>(offset);
17715 unsafe {
17716 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17718 (buf_ptr as *mut PaddingBetweenFieldsInt16Int64)
17719 .write_unaligned((self as *const PaddingBetweenFieldsInt16Int64).read());
17720 let padding_ptr = buf_ptr.offset(0) as *mut u64;
17723 let padding_mask = 0xffffffffffff0000u64;
17724 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17725 }
17726 Ok(())
17727 }
17728 }
17729 unsafe impl<
17730 D: fidl::encoding::ResourceDialect,
17731 T0: fidl::encoding::Encode<i16, D>,
17732 T1: fidl::encoding::Encode<i64, D>,
17733 > fidl::encoding::Encode<PaddingBetweenFieldsInt16Int64, D> for (T0, T1)
17734 {
17735 #[inline]
17736 unsafe fn encode(
17737 self,
17738 encoder: &mut fidl::encoding::Encoder<'_, D>,
17739 offset: usize,
17740 depth: fidl::encoding::Depth,
17741 ) -> fidl::Result<()> {
17742 encoder.debug_check_bounds::<PaddingBetweenFieldsInt16Int64>(offset);
17743 unsafe {
17746 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17747 (ptr as *mut u64).write_unaligned(0);
17748 }
17749 self.0.encode(encoder, offset + 0, depth)?;
17751 self.1.encode(encoder, offset + 8, depth)?;
17752 Ok(())
17753 }
17754 }
17755
17756 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17757 for PaddingBetweenFieldsInt16Int64
17758 {
17759 #[inline(always)]
17760 fn new_empty() -> Self {
17761 Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i64, D) }
17762 }
17763
17764 #[inline]
17765 unsafe fn decode(
17766 &mut self,
17767 decoder: &mut fidl::encoding::Decoder<'_, D>,
17768 offset: usize,
17769 _depth: fidl::encoding::Depth,
17770 ) -> fidl::Result<()> {
17771 decoder.debug_check_bounds::<Self>(offset);
17772 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17773 let ptr = unsafe { buf_ptr.offset(0) };
17775 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17776 let mask = 0xffffffffffff0000u64;
17777 let maskedval = padval & mask;
17778 if maskedval != 0 {
17779 return Err(fidl::Error::NonZeroPadding {
17780 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17781 });
17782 }
17783 unsafe {
17785 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
17786 }
17787 Ok(())
17788 }
17789 }
17790
17791 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt32Int64 {
17792 type Borrowed<'a> = &'a Self;
17793 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17794 value
17795 }
17796 }
17797
17798 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt32Int64 {
17799 type Owned = Self;
17800
17801 #[inline(always)]
17802 fn inline_align(_context: fidl::encoding::Context) -> usize {
17803 8
17804 }
17805
17806 #[inline(always)]
17807 fn inline_size(_context: fidl::encoding::Context) -> usize {
17808 16
17809 }
17810 }
17811
17812 unsafe impl<D: fidl::encoding::ResourceDialect>
17813 fidl::encoding::Encode<PaddingBetweenFieldsInt32Int64, D>
17814 for &PaddingBetweenFieldsInt32Int64
17815 {
17816 #[inline]
17817 unsafe fn encode(
17818 self,
17819 encoder: &mut fidl::encoding::Encoder<'_, D>,
17820 offset: usize,
17821 _depth: fidl::encoding::Depth,
17822 ) -> fidl::Result<()> {
17823 encoder.debug_check_bounds::<PaddingBetweenFieldsInt32Int64>(offset);
17824 unsafe {
17825 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17827 (buf_ptr as *mut PaddingBetweenFieldsInt32Int64)
17828 .write_unaligned((self as *const PaddingBetweenFieldsInt32Int64).read());
17829 let padding_ptr = buf_ptr.offset(0) as *mut u64;
17832 let padding_mask = 0xffffffff00000000u64;
17833 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17834 }
17835 Ok(())
17836 }
17837 }
17838 unsafe impl<
17839 D: fidl::encoding::ResourceDialect,
17840 T0: fidl::encoding::Encode<i32, D>,
17841 T1: fidl::encoding::Encode<i64, D>,
17842 > fidl::encoding::Encode<PaddingBetweenFieldsInt32Int64, D> for (T0, T1)
17843 {
17844 #[inline]
17845 unsafe fn encode(
17846 self,
17847 encoder: &mut fidl::encoding::Encoder<'_, D>,
17848 offset: usize,
17849 depth: fidl::encoding::Depth,
17850 ) -> fidl::Result<()> {
17851 encoder.debug_check_bounds::<PaddingBetweenFieldsInt32Int64>(offset);
17852 unsafe {
17855 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17856 (ptr as *mut u64).write_unaligned(0);
17857 }
17858 self.0.encode(encoder, offset + 0, depth)?;
17860 self.1.encode(encoder, offset + 8, depth)?;
17861 Ok(())
17862 }
17863 }
17864
17865 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17866 for PaddingBetweenFieldsInt32Int64
17867 {
17868 #[inline(always)]
17869 fn new_empty() -> Self {
17870 Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i64, D) }
17871 }
17872
17873 #[inline]
17874 unsafe fn decode(
17875 &mut self,
17876 decoder: &mut fidl::encoding::Decoder<'_, D>,
17877 offset: usize,
17878 _depth: fidl::encoding::Depth,
17879 ) -> fidl::Result<()> {
17880 decoder.debug_check_bounds::<Self>(offset);
17881 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17882 let ptr = unsafe { buf_ptr.offset(0) };
17884 let padval = unsafe { (ptr as *const u64).read_unaligned() };
17885 let mask = 0xffffffff00000000u64;
17886 let maskedval = padval & mask;
17887 if maskedval != 0 {
17888 return Err(fidl::Error::NonZeroPadding {
17889 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17890 });
17891 }
17892 unsafe {
17894 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
17895 }
17896 Ok(())
17897 }
17898 }
17899
17900 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int16 {
17901 type Borrowed<'a> = &'a Self;
17902 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17903 value
17904 }
17905 }
17906
17907 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int16 {
17908 type Owned = Self;
17909
17910 #[inline(always)]
17911 fn inline_align(_context: fidl::encoding::Context) -> usize {
17912 2
17913 }
17914
17915 #[inline(always)]
17916 fn inline_size(_context: fidl::encoding::Context) -> usize {
17917 4
17918 }
17919 }
17920
17921 unsafe impl<D: fidl::encoding::ResourceDialect>
17922 fidl::encoding::Encode<PaddingBetweenFieldsInt8Int16, D>
17923 for &PaddingBetweenFieldsInt8Int16
17924 {
17925 #[inline]
17926 unsafe fn encode(
17927 self,
17928 encoder: &mut fidl::encoding::Encoder<'_, D>,
17929 offset: usize,
17930 _depth: fidl::encoding::Depth,
17931 ) -> fidl::Result<()> {
17932 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int16>(offset);
17933 unsafe {
17934 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
17936 (buf_ptr as *mut PaddingBetweenFieldsInt8Int16)
17937 .write_unaligned((self as *const PaddingBetweenFieldsInt8Int16).read());
17938 let padding_ptr = buf_ptr.offset(0) as *mut u16;
17941 let padding_mask = 0xff00u16;
17942 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
17943 }
17944 Ok(())
17945 }
17946 }
17947 unsafe impl<
17948 D: fidl::encoding::ResourceDialect,
17949 T0: fidl::encoding::Encode<i8, D>,
17950 T1: fidl::encoding::Encode<i16, D>,
17951 > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int16, D> for (T0, T1)
17952 {
17953 #[inline]
17954 unsafe fn encode(
17955 self,
17956 encoder: &mut fidl::encoding::Encoder<'_, D>,
17957 offset: usize,
17958 depth: fidl::encoding::Depth,
17959 ) -> fidl::Result<()> {
17960 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int16>(offset);
17961 unsafe {
17964 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
17965 (ptr as *mut u16).write_unaligned(0);
17966 }
17967 self.0.encode(encoder, offset + 0, depth)?;
17969 self.1.encode(encoder, offset + 2, depth)?;
17970 Ok(())
17971 }
17972 }
17973
17974 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
17975 for PaddingBetweenFieldsInt8Int16
17976 {
17977 #[inline(always)]
17978 fn new_empty() -> Self {
17979 Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i16, D) }
17980 }
17981
17982 #[inline]
17983 unsafe fn decode(
17984 &mut self,
17985 decoder: &mut fidl::encoding::Decoder<'_, D>,
17986 offset: usize,
17987 _depth: fidl::encoding::Depth,
17988 ) -> fidl::Result<()> {
17989 decoder.debug_check_bounds::<Self>(offset);
17990 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
17991 let ptr = unsafe { buf_ptr.offset(0) };
17993 let padval = unsafe { (ptr as *const u16).read_unaligned() };
17994 let mask = 0xff00u16;
17995 let maskedval = padval & mask;
17996 if maskedval != 0 {
17997 return Err(fidl::Error::NonZeroPadding {
17998 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
17999 });
18000 }
18001 unsafe {
18003 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18004 }
18005 Ok(())
18006 }
18007 }
18008
18009 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int32 {
18010 type Borrowed<'a> = &'a Self;
18011 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18012 value
18013 }
18014 }
18015
18016 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int32 {
18017 type Owned = Self;
18018
18019 #[inline(always)]
18020 fn inline_align(_context: fidl::encoding::Context) -> usize {
18021 4
18022 }
18023
18024 #[inline(always)]
18025 fn inline_size(_context: fidl::encoding::Context) -> usize {
18026 8
18027 }
18028 }
18029
18030 unsafe impl<D: fidl::encoding::ResourceDialect>
18031 fidl::encoding::Encode<PaddingBetweenFieldsInt8Int32, D>
18032 for &PaddingBetweenFieldsInt8Int32
18033 {
18034 #[inline]
18035 unsafe fn encode(
18036 self,
18037 encoder: &mut fidl::encoding::Encoder<'_, D>,
18038 offset: usize,
18039 _depth: fidl::encoding::Depth,
18040 ) -> fidl::Result<()> {
18041 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int32>(offset);
18042 unsafe {
18043 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18045 (buf_ptr as *mut PaddingBetweenFieldsInt8Int32)
18046 .write_unaligned((self as *const PaddingBetweenFieldsInt8Int32).read());
18047 let padding_ptr = buf_ptr.offset(0) as *mut u32;
18050 let padding_mask = 0xffffff00u32;
18051 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18052 }
18053 Ok(())
18054 }
18055 }
18056 unsafe impl<
18057 D: fidl::encoding::ResourceDialect,
18058 T0: fidl::encoding::Encode<i8, D>,
18059 T1: fidl::encoding::Encode<i32, D>,
18060 > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int32, D> for (T0, T1)
18061 {
18062 #[inline]
18063 unsafe fn encode(
18064 self,
18065 encoder: &mut fidl::encoding::Encoder<'_, D>,
18066 offset: usize,
18067 depth: fidl::encoding::Depth,
18068 ) -> fidl::Result<()> {
18069 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int32>(offset);
18070 unsafe {
18073 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18074 (ptr as *mut u32).write_unaligned(0);
18075 }
18076 self.0.encode(encoder, offset + 0, depth)?;
18078 self.1.encode(encoder, offset + 4, depth)?;
18079 Ok(())
18080 }
18081 }
18082
18083 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18084 for PaddingBetweenFieldsInt8Int32
18085 {
18086 #[inline(always)]
18087 fn new_empty() -> Self {
18088 Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i32, D) }
18089 }
18090
18091 #[inline]
18092 unsafe fn decode(
18093 &mut self,
18094 decoder: &mut fidl::encoding::Decoder<'_, D>,
18095 offset: usize,
18096 _depth: fidl::encoding::Depth,
18097 ) -> fidl::Result<()> {
18098 decoder.debug_check_bounds::<Self>(offset);
18099 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18100 let ptr = unsafe { buf_ptr.offset(0) };
18102 let padval = unsafe { (ptr as *const u32).read_unaligned() };
18103 let mask = 0xffffff00u32;
18104 let maskedval = padval & mask;
18105 if maskedval != 0 {
18106 return Err(fidl::Error::NonZeroPadding {
18107 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18108 });
18109 }
18110 unsafe {
18112 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18113 }
18114 Ok(())
18115 }
18116 }
18117
18118 impl fidl::encoding::ValueTypeMarker for PaddingBetweenFieldsInt8Int64 {
18119 type Borrowed<'a> = &'a Self;
18120 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18121 value
18122 }
18123 }
18124
18125 unsafe impl fidl::encoding::TypeMarker for PaddingBetweenFieldsInt8Int64 {
18126 type Owned = Self;
18127
18128 #[inline(always)]
18129 fn inline_align(_context: fidl::encoding::Context) -> usize {
18130 8
18131 }
18132
18133 #[inline(always)]
18134 fn inline_size(_context: fidl::encoding::Context) -> usize {
18135 16
18136 }
18137 }
18138
18139 unsafe impl<D: fidl::encoding::ResourceDialect>
18140 fidl::encoding::Encode<PaddingBetweenFieldsInt8Int64, D>
18141 for &PaddingBetweenFieldsInt8Int64
18142 {
18143 #[inline]
18144 unsafe fn encode(
18145 self,
18146 encoder: &mut fidl::encoding::Encoder<'_, D>,
18147 offset: usize,
18148 _depth: fidl::encoding::Depth,
18149 ) -> fidl::Result<()> {
18150 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int64>(offset);
18151 unsafe {
18152 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18154 (buf_ptr as *mut PaddingBetweenFieldsInt8Int64)
18155 .write_unaligned((self as *const PaddingBetweenFieldsInt8Int64).read());
18156 let padding_ptr = buf_ptr.offset(0) as *mut u64;
18159 let padding_mask = 0xffffffffffffff00u64;
18160 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18161 }
18162 Ok(())
18163 }
18164 }
18165 unsafe impl<
18166 D: fidl::encoding::ResourceDialect,
18167 T0: fidl::encoding::Encode<i8, D>,
18168 T1: fidl::encoding::Encode<i64, D>,
18169 > fidl::encoding::Encode<PaddingBetweenFieldsInt8Int64, D> for (T0, T1)
18170 {
18171 #[inline]
18172 unsafe fn encode(
18173 self,
18174 encoder: &mut fidl::encoding::Encoder<'_, D>,
18175 offset: usize,
18176 depth: fidl::encoding::Depth,
18177 ) -> fidl::Result<()> {
18178 encoder.debug_check_bounds::<PaddingBetweenFieldsInt8Int64>(offset);
18179 unsafe {
18182 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
18183 (ptr as *mut u64).write_unaligned(0);
18184 }
18185 self.0.encode(encoder, offset + 0, depth)?;
18187 self.1.encode(encoder, offset + 8, depth)?;
18188 Ok(())
18189 }
18190 }
18191
18192 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18193 for PaddingBetweenFieldsInt8Int64
18194 {
18195 #[inline(always)]
18196 fn new_empty() -> Self {
18197 Self { a: fidl::new_empty!(i8, D), b: fidl::new_empty!(i64, D) }
18198 }
18199
18200 #[inline]
18201 unsafe fn decode(
18202 &mut self,
18203 decoder: &mut fidl::encoding::Decoder<'_, D>,
18204 offset: usize,
18205 _depth: fidl::encoding::Depth,
18206 ) -> fidl::Result<()> {
18207 decoder.debug_check_bounds::<Self>(offset);
18208 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18209 let ptr = unsafe { buf_ptr.offset(0) };
18211 let padval = unsafe { (ptr as *const u64).read_unaligned() };
18212 let mask = 0xffffffffffffff00u64;
18213 let maskedval = padval & mask;
18214 if maskedval != 0 {
18215 return Err(fidl::Error::NonZeroPadding {
18216 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
18217 });
18218 }
18219 unsafe {
18221 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
18222 }
18223 Ok(())
18224 }
18225 }
18226
18227 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject1Byte {
18228 type Borrowed<'a> = &'a Self;
18229 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18230 value
18231 }
18232 }
18233
18234 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject1Byte {
18235 type Owned = Self;
18236
18237 #[inline(always)]
18238 fn inline_align(_context: fidl::encoding::Context) -> usize {
18239 1
18240 }
18241
18242 #[inline(always)]
18243 fn inline_size(_context: fidl::encoding::Context) -> usize {
18244 1
18245 }
18246 #[inline(always)]
18247 fn encode_is_copy() -> bool {
18248 true
18249 }
18250
18251 #[inline(always)]
18252 fn decode_is_copy() -> bool {
18253 true
18254 }
18255 }
18256
18257 unsafe impl<D: fidl::encoding::ResourceDialect>
18258 fidl::encoding::Encode<PaddingEndOfInlineObject1Byte, D>
18259 for &PaddingEndOfInlineObject1Byte
18260 {
18261 #[inline]
18262 unsafe fn encode(
18263 self,
18264 encoder: &mut fidl::encoding::Encoder<'_, D>,
18265 offset: usize,
18266 _depth: fidl::encoding::Depth,
18267 ) -> fidl::Result<()> {
18268 encoder.debug_check_bounds::<PaddingEndOfInlineObject1Byte>(offset);
18269 unsafe {
18270 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18272 (buf_ptr as *mut PaddingEndOfInlineObject1Byte)
18273 .write_unaligned((self as *const PaddingEndOfInlineObject1Byte).read());
18274 }
18277 Ok(())
18278 }
18279 }
18280 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct1Byte, D>>
18281 fidl::encoding::Encode<PaddingEndOfInlineObject1Byte, D> for (T0,)
18282 {
18283 #[inline]
18284 unsafe fn encode(
18285 self,
18286 encoder: &mut fidl::encoding::Encoder<'_, D>,
18287 offset: usize,
18288 depth: fidl::encoding::Depth,
18289 ) -> fidl::Result<()> {
18290 encoder.debug_check_bounds::<PaddingEndOfInlineObject1Byte>(offset);
18291 self.0.encode(encoder, offset + 0, depth)?;
18295 Ok(())
18296 }
18297 }
18298
18299 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18300 for PaddingEndOfInlineObject1Byte
18301 {
18302 #[inline(always)]
18303 fn new_empty() -> Self {
18304 Self { a: fidl::new_empty!(Struct1Byte, D) }
18305 }
18306
18307 #[inline]
18308 unsafe fn decode(
18309 &mut self,
18310 decoder: &mut fidl::encoding::Decoder<'_, D>,
18311 offset: usize,
18312 _depth: fidl::encoding::Depth,
18313 ) -> fidl::Result<()> {
18314 decoder.debug_check_bounds::<Self>(offset);
18315 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18316 unsafe {
18319 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
18320 }
18321 Ok(())
18322 }
18323 }
18324
18325 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject2Byte {
18326 type Borrowed<'a> = &'a Self;
18327 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18328 value
18329 }
18330 }
18331
18332 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject2Byte {
18333 type Owned = Self;
18334
18335 #[inline(always)]
18336 fn inline_align(_context: fidl::encoding::Context) -> usize {
18337 2
18338 }
18339
18340 #[inline(always)]
18341 fn inline_size(_context: fidl::encoding::Context) -> usize {
18342 2
18343 }
18344 #[inline(always)]
18345 fn encode_is_copy() -> bool {
18346 true
18347 }
18348
18349 #[inline(always)]
18350 fn decode_is_copy() -> bool {
18351 true
18352 }
18353 }
18354
18355 unsafe impl<D: fidl::encoding::ResourceDialect>
18356 fidl::encoding::Encode<PaddingEndOfInlineObject2Byte, D>
18357 for &PaddingEndOfInlineObject2Byte
18358 {
18359 #[inline]
18360 unsafe fn encode(
18361 self,
18362 encoder: &mut fidl::encoding::Encoder<'_, D>,
18363 offset: usize,
18364 _depth: fidl::encoding::Depth,
18365 ) -> fidl::Result<()> {
18366 encoder.debug_check_bounds::<PaddingEndOfInlineObject2Byte>(offset);
18367 unsafe {
18368 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18370 (buf_ptr as *mut PaddingEndOfInlineObject2Byte)
18371 .write_unaligned((self as *const PaddingEndOfInlineObject2Byte).read());
18372 }
18375 Ok(())
18376 }
18377 }
18378 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct2Byte, D>>
18379 fidl::encoding::Encode<PaddingEndOfInlineObject2Byte, D> for (T0,)
18380 {
18381 #[inline]
18382 unsafe fn encode(
18383 self,
18384 encoder: &mut fidl::encoding::Encoder<'_, D>,
18385 offset: usize,
18386 depth: fidl::encoding::Depth,
18387 ) -> fidl::Result<()> {
18388 encoder.debug_check_bounds::<PaddingEndOfInlineObject2Byte>(offset);
18389 self.0.encode(encoder, offset + 0, depth)?;
18393 Ok(())
18394 }
18395 }
18396
18397 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18398 for PaddingEndOfInlineObject2Byte
18399 {
18400 #[inline(always)]
18401 fn new_empty() -> Self {
18402 Self { a: fidl::new_empty!(Struct2Byte, D) }
18403 }
18404
18405 #[inline]
18406 unsafe fn decode(
18407 &mut self,
18408 decoder: &mut fidl::encoding::Decoder<'_, D>,
18409 offset: usize,
18410 _depth: fidl::encoding::Depth,
18411 ) -> fidl::Result<()> {
18412 decoder.debug_check_bounds::<Self>(offset);
18413 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18414 unsafe {
18417 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
18418 }
18419 Ok(())
18420 }
18421 }
18422
18423 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject3Byte {
18424 type Borrowed<'a> = &'a Self;
18425 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18426 value
18427 }
18428 }
18429
18430 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject3Byte {
18431 type Owned = Self;
18432
18433 #[inline(always)]
18434 fn inline_align(_context: fidl::encoding::Context) -> usize {
18435 2
18436 }
18437
18438 #[inline(always)]
18439 fn inline_size(_context: fidl::encoding::Context) -> usize {
18440 4
18441 }
18442 }
18443
18444 unsafe impl<D: fidl::encoding::ResourceDialect>
18445 fidl::encoding::Encode<PaddingEndOfInlineObject3Byte, D>
18446 for &PaddingEndOfInlineObject3Byte
18447 {
18448 #[inline]
18449 unsafe fn encode(
18450 self,
18451 encoder: &mut fidl::encoding::Encoder<'_, D>,
18452 offset: usize,
18453 _depth: fidl::encoding::Depth,
18454 ) -> fidl::Result<()> {
18455 encoder.debug_check_bounds::<PaddingEndOfInlineObject3Byte>(offset);
18456 unsafe {
18457 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18459 (buf_ptr as *mut PaddingEndOfInlineObject3Byte)
18460 .write_unaligned((self as *const PaddingEndOfInlineObject3Byte).read());
18461 let padding_ptr = buf_ptr.offset(2) as *mut u16;
18464 let padding_mask = 0xff00u16;
18465 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18466 }
18467 Ok(())
18468 }
18469 }
18470 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct3Byte, D>>
18471 fidl::encoding::Encode<PaddingEndOfInlineObject3Byte, D> for (T0,)
18472 {
18473 #[inline]
18474 unsafe fn encode(
18475 self,
18476 encoder: &mut fidl::encoding::Encoder<'_, D>,
18477 offset: usize,
18478 depth: fidl::encoding::Depth,
18479 ) -> fidl::Result<()> {
18480 encoder.debug_check_bounds::<PaddingEndOfInlineObject3Byte>(offset);
18481 self.0.encode(encoder, offset + 0, depth)?;
18485 Ok(())
18486 }
18487 }
18488
18489 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18490 for PaddingEndOfInlineObject3Byte
18491 {
18492 #[inline(always)]
18493 fn new_empty() -> Self {
18494 Self { a: fidl::new_empty!(Struct3Byte, D) }
18495 }
18496
18497 #[inline]
18498 unsafe fn decode(
18499 &mut self,
18500 decoder: &mut fidl::encoding::Decoder<'_, D>,
18501 offset: usize,
18502 _depth: fidl::encoding::Depth,
18503 ) -> fidl::Result<()> {
18504 decoder.debug_check_bounds::<Self>(offset);
18505 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18506 let ptr = unsafe { buf_ptr.offset(2) };
18508 let padval = unsafe { (ptr as *const u16).read_unaligned() };
18509 let mask = 0xff00u16;
18510 let maskedval = padval & mask;
18511 if maskedval != 0 {
18512 return Err(fidl::Error::NonZeroPadding {
18513 padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
18514 });
18515 }
18516 unsafe {
18518 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18519 }
18520 Ok(())
18521 }
18522 }
18523
18524 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject4Byte {
18525 type Borrowed<'a> = &'a Self;
18526 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18527 value
18528 }
18529 }
18530
18531 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject4Byte {
18532 type Owned = Self;
18533
18534 #[inline(always)]
18535 fn inline_align(_context: fidl::encoding::Context) -> usize {
18536 4
18537 }
18538
18539 #[inline(always)]
18540 fn inline_size(_context: fidl::encoding::Context) -> usize {
18541 4
18542 }
18543 #[inline(always)]
18544 fn encode_is_copy() -> bool {
18545 true
18546 }
18547
18548 #[inline(always)]
18549 fn decode_is_copy() -> bool {
18550 true
18551 }
18552 }
18553
18554 unsafe impl<D: fidl::encoding::ResourceDialect>
18555 fidl::encoding::Encode<PaddingEndOfInlineObject4Byte, D>
18556 for &PaddingEndOfInlineObject4Byte
18557 {
18558 #[inline]
18559 unsafe fn encode(
18560 self,
18561 encoder: &mut fidl::encoding::Encoder<'_, D>,
18562 offset: usize,
18563 _depth: fidl::encoding::Depth,
18564 ) -> fidl::Result<()> {
18565 encoder.debug_check_bounds::<PaddingEndOfInlineObject4Byte>(offset);
18566 unsafe {
18567 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18569 (buf_ptr as *mut PaddingEndOfInlineObject4Byte)
18570 .write_unaligned((self as *const PaddingEndOfInlineObject4Byte).read());
18571 }
18574 Ok(())
18575 }
18576 }
18577 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct4Byte, D>>
18578 fidl::encoding::Encode<PaddingEndOfInlineObject4Byte, D> for (T0,)
18579 {
18580 #[inline]
18581 unsafe fn encode(
18582 self,
18583 encoder: &mut fidl::encoding::Encoder<'_, D>,
18584 offset: usize,
18585 depth: fidl::encoding::Depth,
18586 ) -> fidl::Result<()> {
18587 encoder.debug_check_bounds::<PaddingEndOfInlineObject4Byte>(offset);
18588 self.0.encode(encoder, offset + 0, depth)?;
18592 Ok(())
18593 }
18594 }
18595
18596 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18597 for PaddingEndOfInlineObject4Byte
18598 {
18599 #[inline(always)]
18600 fn new_empty() -> Self {
18601 Self { a: fidl::new_empty!(Struct4Byte, D) }
18602 }
18603
18604 #[inline]
18605 unsafe fn decode(
18606 &mut self,
18607 decoder: &mut fidl::encoding::Decoder<'_, D>,
18608 offset: usize,
18609 _depth: fidl::encoding::Depth,
18610 ) -> fidl::Result<()> {
18611 decoder.debug_check_bounds::<Self>(offset);
18612 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18613 unsafe {
18616 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
18617 }
18618 Ok(())
18619 }
18620 }
18621
18622 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject5Byte {
18623 type Borrowed<'a> = &'a Self;
18624 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18625 value
18626 }
18627 }
18628
18629 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject5Byte {
18630 type Owned = Self;
18631
18632 #[inline(always)]
18633 fn inline_align(_context: fidl::encoding::Context) -> usize {
18634 4
18635 }
18636
18637 #[inline(always)]
18638 fn inline_size(_context: fidl::encoding::Context) -> usize {
18639 8
18640 }
18641 }
18642
18643 unsafe impl<D: fidl::encoding::ResourceDialect>
18644 fidl::encoding::Encode<PaddingEndOfInlineObject5Byte, D>
18645 for &PaddingEndOfInlineObject5Byte
18646 {
18647 #[inline]
18648 unsafe fn encode(
18649 self,
18650 encoder: &mut fidl::encoding::Encoder<'_, D>,
18651 offset: usize,
18652 _depth: fidl::encoding::Depth,
18653 ) -> fidl::Result<()> {
18654 encoder.debug_check_bounds::<PaddingEndOfInlineObject5Byte>(offset);
18655 unsafe {
18656 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18658 (buf_ptr as *mut PaddingEndOfInlineObject5Byte)
18659 .write_unaligned((self as *const PaddingEndOfInlineObject5Byte).read());
18660 let padding_ptr = buf_ptr.offset(4) as *mut u32;
18663 let padding_mask = 0xffffff00u32;
18664 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18665 }
18666 Ok(())
18667 }
18668 }
18669 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct5Byte, D>>
18670 fidl::encoding::Encode<PaddingEndOfInlineObject5Byte, D> for (T0,)
18671 {
18672 #[inline]
18673 unsafe fn encode(
18674 self,
18675 encoder: &mut fidl::encoding::Encoder<'_, D>,
18676 offset: usize,
18677 depth: fidl::encoding::Depth,
18678 ) -> fidl::Result<()> {
18679 encoder.debug_check_bounds::<PaddingEndOfInlineObject5Byte>(offset);
18680 self.0.encode(encoder, offset + 0, depth)?;
18684 Ok(())
18685 }
18686 }
18687
18688 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18689 for PaddingEndOfInlineObject5Byte
18690 {
18691 #[inline(always)]
18692 fn new_empty() -> Self {
18693 Self { a: fidl::new_empty!(Struct5Byte, D) }
18694 }
18695
18696 #[inline]
18697 unsafe fn decode(
18698 &mut self,
18699 decoder: &mut fidl::encoding::Decoder<'_, D>,
18700 offset: usize,
18701 _depth: fidl::encoding::Depth,
18702 ) -> fidl::Result<()> {
18703 decoder.debug_check_bounds::<Self>(offset);
18704 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18705 let ptr = unsafe { buf_ptr.offset(4) };
18707 let padval = unsafe { (ptr as *const u32).read_unaligned() };
18708 let mask = 0xffffff00u32;
18709 let maskedval = padval & mask;
18710 if maskedval != 0 {
18711 return Err(fidl::Error::NonZeroPadding {
18712 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
18713 });
18714 }
18715 unsafe {
18717 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18718 }
18719 Ok(())
18720 }
18721 }
18722
18723 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject6Byte {
18724 type Borrowed<'a> = &'a Self;
18725 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18726 value
18727 }
18728 }
18729
18730 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject6Byte {
18731 type Owned = Self;
18732
18733 #[inline(always)]
18734 fn inline_align(_context: fidl::encoding::Context) -> usize {
18735 4
18736 }
18737
18738 #[inline(always)]
18739 fn inline_size(_context: fidl::encoding::Context) -> usize {
18740 8
18741 }
18742 }
18743
18744 unsafe impl<D: fidl::encoding::ResourceDialect>
18745 fidl::encoding::Encode<PaddingEndOfInlineObject6Byte, D>
18746 for &PaddingEndOfInlineObject6Byte
18747 {
18748 #[inline]
18749 unsafe fn encode(
18750 self,
18751 encoder: &mut fidl::encoding::Encoder<'_, D>,
18752 offset: usize,
18753 _depth: fidl::encoding::Depth,
18754 ) -> fidl::Result<()> {
18755 encoder.debug_check_bounds::<PaddingEndOfInlineObject6Byte>(offset);
18756 unsafe {
18757 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18759 (buf_ptr as *mut PaddingEndOfInlineObject6Byte)
18760 .write_unaligned((self as *const PaddingEndOfInlineObject6Byte).read());
18761 let padding_ptr = buf_ptr.offset(4) as *mut u32;
18764 let padding_mask = 0xffff0000u32;
18765 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18766 }
18767 Ok(())
18768 }
18769 }
18770 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct6Byte, D>>
18771 fidl::encoding::Encode<PaddingEndOfInlineObject6Byte, D> for (T0,)
18772 {
18773 #[inline]
18774 unsafe fn encode(
18775 self,
18776 encoder: &mut fidl::encoding::Encoder<'_, D>,
18777 offset: usize,
18778 depth: fidl::encoding::Depth,
18779 ) -> fidl::Result<()> {
18780 encoder.debug_check_bounds::<PaddingEndOfInlineObject6Byte>(offset);
18781 self.0.encode(encoder, offset + 0, depth)?;
18785 Ok(())
18786 }
18787 }
18788
18789 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18790 for PaddingEndOfInlineObject6Byte
18791 {
18792 #[inline(always)]
18793 fn new_empty() -> Self {
18794 Self { a: fidl::new_empty!(Struct6Byte, D) }
18795 }
18796
18797 #[inline]
18798 unsafe fn decode(
18799 &mut self,
18800 decoder: &mut fidl::encoding::Decoder<'_, D>,
18801 offset: usize,
18802 _depth: fidl::encoding::Depth,
18803 ) -> fidl::Result<()> {
18804 decoder.debug_check_bounds::<Self>(offset);
18805 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18806 let ptr = unsafe { buf_ptr.offset(4) };
18808 let padval = unsafe { (ptr as *const u32).read_unaligned() };
18809 let mask = 0xffff0000u32;
18810 let maskedval = padval & mask;
18811 if maskedval != 0 {
18812 return Err(fidl::Error::NonZeroPadding {
18813 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
18814 });
18815 }
18816 unsafe {
18818 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18819 }
18820 Ok(())
18821 }
18822 }
18823
18824 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObject7Byte {
18825 type Borrowed<'a> = &'a Self;
18826 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18827 value
18828 }
18829 }
18830
18831 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObject7Byte {
18832 type Owned = Self;
18833
18834 #[inline(always)]
18835 fn inline_align(_context: fidl::encoding::Context) -> usize {
18836 4
18837 }
18838
18839 #[inline(always)]
18840 fn inline_size(_context: fidl::encoding::Context) -> usize {
18841 8
18842 }
18843 }
18844
18845 unsafe impl<D: fidl::encoding::ResourceDialect>
18846 fidl::encoding::Encode<PaddingEndOfInlineObject7Byte, D>
18847 for &PaddingEndOfInlineObject7Byte
18848 {
18849 #[inline]
18850 unsafe fn encode(
18851 self,
18852 encoder: &mut fidl::encoding::Encoder<'_, D>,
18853 offset: usize,
18854 _depth: fidl::encoding::Depth,
18855 ) -> fidl::Result<()> {
18856 encoder.debug_check_bounds::<PaddingEndOfInlineObject7Byte>(offset);
18857 unsafe {
18858 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
18860 (buf_ptr as *mut PaddingEndOfInlineObject7Byte)
18861 .write_unaligned((self as *const PaddingEndOfInlineObject7Byte).read());
18862 let padding_ptr = buf_ptr.offset(4) as *mut u32;
18865 let padding_mask = 0xff000000u32;
18866 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
18867 }
18868 Ok(())
18869 }
18870 }
18871 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Struct7Byte, D>>
18872 fidl::encoding::Encode<PaddingEndOfInlineObject7Byte, D> for (T0,)
18873 {
18874 #[inline]
18875 unsafe fn encode(
18876 self,
18877 encoder: &mut fidl::encoding::Encoder<'_, D>,
18878 offset: usize,
18879 depth: fidl::encoding::Depth,
18880 ) -> fidl::Result<()> {
18881 encoder.debug_check_bounds::<PaddingEndOfInlineObject7Byte>(offset);
18882 self.0.encode(encoder, offset + 0, depth)?;
18886 Ok(())
18887 }
18888 }
18889
18890 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
18891 for PaddingEndOfInlineObject7Byte
18892 {
18893 #[inline(always)]
18894 fn new_empty() -> Self {
18895 Self { a: fidl::new_empty!(Struct7Byte, D) }
18896 }
18897
18898 #[inline]
18899 unsafe fn decode(
18900 &mut self,
18901 decoder: &mut fidl::encoding::Decoder<'_, D>,
18902 offset: usize,
18903 _depth: fidl::encoding::Depth,
18904 ) -> fidl::Result<()> {
18905 decoder.debug_check_bounds::<Self>(offset);
18906 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
18907 let ptr = unsafe { buf_ptr.offset(4) };
18909 let padval = unsafe { (ptr as *const u32).read_unaligned() };
18910 let mask = 0xff000000u32;
18911 let maskedval = padval & mask;
18912 if maskedval != 0 {
18913 return Err(fidl::Error::NonZeroPadding {
18914 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
18915 });
18916 }
18917 unsafe {
18919 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
18920 }
18921 Ok(())
18922 }
18923 }
18924
18925 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject1Byte {
18926 type Borrowed<'a> = &'a Self;
18927 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18928 value
18929 }
18930 }
18931
18932 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject1Byte {
18933 type Owned = Self;
18934
18935 #[inline(always)]
18936 fn inline_align(_context: fidl::encoding::Context) -> usize {
18937 8
18938 }
18939
18940 #[inline(always)]
18941 fn inline_size(_context: fidl::encoding::Context) -> usize {
18942 16
18943 }
18944 }
18945
18946 unsafe impl<D: fidl::encoding::ResourceDialect>
18947 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject1Byte, D>
18948 for &PaddingEndOfInlineObjectBeforeNextObject1Byte
18949 {
18950 #[inline]
18951 unsafe fn encode(
18952 self,
18953 encoder: &mut fidl::encoding::Encoder<'_, D>,
18954 offset: usize,
18955 _depth: fidl::encoding::Depth,
18956 ) -> fidl::Result<()> {
18957 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject1Byte>(offset);
18958 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject1Byte, D>::encode(
18960 (
18961 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
18962 &self.out_of_line,
18963 ),
18964 <Struct1Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
18965 ),
18966 encoder,
18967 offset,
18968 _depth,
18969 )
18970 }
18971 }
18972 unsafe impl<
18973 D: fidl::encoding::ResourceDialect,
18974 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
18975 T1: fidl::encoding::Encode<Struct1Byte, D>,
18976 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject1Byte, D> for (T0, T1)
18977 {
18978 #[inline]
18979 unsafe fn encode(
18980 self,
18981 encoder: &mut fidl::encoding::Encoder<'_, D>,
18982 offset: usize,
18983 depth: fidl::encoding::Depth,
18984 ) -> fidl::Result<()> {
18985 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject1Byte>(offset);
18986 unsafe {
18989 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
18990 (ptr as *mut u64).write_unaligned(0);
18991 }
18992 self.0.encode(encoder, offset + 0, depth)?;
18994 self.1.encode(encoder, offset + 8, depth)?;
18995 Ok(())
18996 }
18997 }
18998
18999 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19000 for PaddingEndOfInlineObjectBeforeNextObject1Byte
19001 {
19002 #[inline(always)]
19003 fn new_empty() -> Self {
19004 Self {
19005 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19006 in_line: fidl::new_empty!(Struct1Byte, D),
19007 }
19008 }
19009
19010 #[inline]
19011 unsafe fn decode(
19012 &mut self,
19013 decoder: &mut fidl::encoding::Decoder<'_, D>,
19014 offset: usize,
19015 _depth: fidl::encoding::Depth,
19016 ) -> fidl::Result<()> {
19017 decoder.debug_check_bounds::<Self>(offset);
19018 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19020 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19021 let mask = 0xffffffffffffff00u64;
19022 let maskedval = padval & mask;
19023 if maskedval != 0 {
19024 return Err(fidl::Error::NonZeroPadding {
19025 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19026 });
19027 }
19028 fidl::decode!(
19029 fidl::encoding::Boxed<Struct8Byte>,
19030 D,
19031 &mut self.out_of_line,
19032 decoder,
19033 offset + 0,
19034 _depth
19035 )?;
19036 fidl::decode!(Struct1Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19037 Ok(())
19038 }
19039 }
19040
19041 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject2Byte {
19042 type Borrowed<'a> = &'a Self;
19043 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19044 value
19045 }
19046 }
19047
19048 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject2Byte {
19049 type Owned = Self;
19050
19051 #[inline(always)]
19052 fn inline_align(_context: fidl::encoding::Context) -> usize {
19053 8
19054 }
19055
19056 #[inline(always)]
19057 fn inline_size(_context: fidl::encoding::Context) -> usize {
19058 16
19059 }
19060 }
19061
19062 unsafe impl<D: fidl::encoding::ResourceDialect>
19063 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject2Byte, D>
19064 for &PaddingEndOfInlineObjectBeforeNextObject2Byte
19065 {
19066 #[inline]
19067 unsafe fn encode(
19068 self,
19069 encoder: &mut fidl::encoding::Encoder<'_, D>,
19070 offset: usize,
19071 _depth: fidl::encoding::Depth,
19072 ) -> fidl::Result<()> {
19073 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject2Byte>(offset);
19074 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject2Byte, D>::encode(
19076 (
19077 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19078 &self.out_of_line,
19079 ),
19080 <Struct2Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19081 ),
19082 encoder,
19083 offset,
19084 _depth,
19085 )
19086 }
19087 }
19088 unsafe impl<
19089 D: fidl::encoding::ResourceDialect,
19090 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19091 T1: fidl::encoding::Encode<Struct2Byte, D>,
19092 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject2Byte, D> for (T0, T1)
19093 {
19094 #[inline]
19095 unsafe fn encode(
19096 self,
19097 encoder: &mut fidl::encoding::Encoder<'_, D>,
19098 offset: usize,
19099 depth: fidl::encoding::Depth,
19100 ) -> fidl::Result<()> {
19101 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject2Byte>(offset);
19102 unsafe {
19105 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19106 (ptr as *mut u64).write_unaligned(0);
19107 }
19108 self.0.encode(encoder, offset + 0, depth)?;
19110 self.1.encode(encoder, offset + 8, depth)?;
19111 Ok(())
19112 }
19113 }
19114
19115 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19116 for PaddingEndOfInlineObjectBeforeNextObject2Byte
19117 {
19118 #[inline(always)]
19119 fn new_empty() -> Self {
19120 Self {
19121 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19122 in_line: fidl::new_empty!(Struct2Byte, D),
19123 }
19124 }
19125
19126 #[inline]
19127 unsafe fn decode(
19128 &mut self,
19129 decoder: &mut fidl::encoding::Decoder<'_, D>,
19130 offset: usize,
19131 _depth: fidl::encoding::Depth,
19132 ) -> fidl::Result<()> {
19133 decoder.debug_check_bounds::<Self>(offset);
19134 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19136 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19137 let mask = 0xffffffffffff0000u64;
19138 let maskedval = padval & mask;
19139 if maskedval != 0 {
19140 return Err(fidl::Error::NonZeroPadding {
19141 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19142 });
19143 }
19144 fidl::decode!(
19145 fidl::encoding::Boxed<Struct8Byte>,
19146 D,
19147 &mut self.out_of_line,
19148 decoder,
19149 offset + 0,
19150 _depth
19151 )?;
19152 fidl::decode!(Struct2Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19153 Ok(())
19154 }
19155 }
19156
19157 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject3Byte {
19158 type Borrowed<'a> = &'a Self;
19159 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19160 value
19161 }
19162 }
19163
19164 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject3Byte {
19165 type Owned = Self;
19166
19167 #[inline(always)]
19168 fn inline_align(_context: fidl::encoding::Context) -> usize {
19169 8
19170 }
19171
19172 #[inline(always)]
19173 fn inline_size(_context: fidl::encoding::Context) -> usize {
19174 16
19175 }
19176 }
19177
19178 unsafe impl<D: fidl::encoding::ResourceDialect>
19179 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject3Byte, D>
19180 for &PaddingEndOfInlineObjectBeforeNextObject3Byte
19181 {
19182 #[inline]
19183 unsafe fn encode(
19184 self,
19185 encoder: &mut fidl::encoding::Encoder<'_, D>,
19186 offset: usize,
19187 _depth: fidl::encoding::Depth,
19188 ) -> fidl::Result<()> {
19189 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject3Byte>(offset);
19190 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject3Byte, D>::encode(
19192 (
19193 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19194 &self.out_of_line,
19195 ),
19196 <Struct3Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19197 ),
19198 encoder,
19199 offset,
19200 _depth,
19201 )
19202 }
19203 }
19204 unsafe impl<
19205 D: fidl::encoding::ResourceDialect,
19206 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19207 T1: fidl::encoding::Encode<Struct3Byte, D>,
19208 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject3Byte, D> for (T0, T1)
19209 {
19210 #[inline]
19211 unsafe fn encode(
19212 self,
19213 encoder: &mut fidl::encoding::Encoder<'_, D>,
19214 offset: usize,
19215 depth: fidl::encoding::Depth,
19216 ) -> fidl::Result<()> {
19217 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject3Byte>(offset);
19218 unsafe {
19221 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19222 (ptr as *mut u64).write_unaligned(0);
19223 }
19224 self.0.encode(encoder, offset + 0, depth)?;
19226 self.1.encode(encoder, offset + 8, depth)?;
19227 Ok(())
19228 }
19229 }
19230
19231 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19232 for PaddingEndOfInlineObjectBeforeNextObject3Byte
19233 {
19234 #[inline(always)]
19235 fn new_empty() -> Self {
19236 Self {
19237 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19238 in_line: fidl::new_empty!(Struct3Byte, D),
19239 }
19240 }
19241
19242 #[inline]
19243 unsafe fn decode(
19244 &mut self,
19245 decoder: &mut fidl::encoding::Decoder<'_, D>,
19246 offset: usize,
19247 _depth: fidl::encoding::Depth,
19248 ) -> fidl::Result<()> {
19249 decoder.debug_check_bounds::<Self>(offset);
19250 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19252 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19253 let mask = 0xffffffff00000000u64;
19254 let maskedval = padval & mask;
19255 if maskedval != 0 {
19256 return Err(fidl::Error::NonZeroPadding {
19257 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19258 });
19259 }
19260 fidl::decode!(
19261 fidl::encoding::Boxed<Struct8Byte>,
19262 D,
19263 &mut self.out_of_line,
19264 decoder,
19265 offset + 0,
19266 _depth
19267 )?;
19268 fidl::decode!(Struct3Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19269 Ok(())
19270 }
19271 }
19272
19273 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject4Byte {
19274 type Borrowed<'a> = &'a Self;
19275 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19276 value
19277 }
19278 }
19279
19280 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject4Byte {
19281 type Owned = Self;
19282
19283 #[inline(always)]
19284 fn inline_align(_context: fidl::encoding::Context) -> usize {
19285 8
19286 }
19287
19288 #[inline(always)]
19289 fn inline_size(_context: fidl::encoding::Context) -> usize {
19290 16
19291 }
19292 }
19293
19294 unsafe impl<D: fidl::encoding::ResourceDialect>
19295 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject4Byte, D>
19296 for &PaddingEndOfInlineObjectBeforeNextObject4Byte
19297 {
19298 #[inline]
19299 unsafe fn encode(
19300 self,
19301 encoder: &mut fidl::encoding::Encoder<'_, D>,
19302 offset: usize,
19303 _depth: fidl::encoding::Depth,
19304 ) -> fidl::Result<()> {
19305 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject4Byte>(offset);
19306 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject4Byte, D>::encode(
19308 (
19309 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19310 &self.out_of_line,
19311 ),
19312 <Struct4Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19313 ),
19314 encoder,
19315 offset,
19316 _depth,
19317 )
19318 }
19319 }
19320 unsafe impl<
19321 D: fidl::encoding::ResourceDialect,
19322 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19323 T1: fidl::encoding::Encode<Struct4Byte, D>,
19324 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject4Byte, D> for (T0, T1)
19325 {
19326 #[inline]
19327 unsafe fn encode(
19328 self,
19329 encoder: &mut fidl::encoding::Encoder<'_, D>,
19330 offset: usize,
19331 depth: fidl::encoding::Depth,
19332 ) -> fidl::Result<()> {
19333 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject4Byte>(offset);
19334 unsafe {
19337 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
19338 (ptr as *mut u64).write_unaligned(0);
19339 }
19340 self.0.encode(encoder, offset + 0, depth)?;
19342 self.1.encode(encoder, offset + 8, depth)?;
19343 Ok(())
19344 }
19345 }
19346
19347 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19348 for PaddingEndOfInlineObjectBeforeNextObject4Byte
19349 {
19350 #[inline(always)]
19351 fn new_empty() -> Self {
19352 Self {
19353 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19354 in_line: fidl::new_empty!(Struct4Byte, D),
19355 }
19356 }
19357
19358 #[inline]
19359 unsafe fn decode(
19360 &mut self,
19361 decoder: &mut fidl::encoding::Decoder<'_, D>,
19362 offset: usize,
19363 _depth: fidl::encoding::Depth,
19364 ) -> fidl::Result<()> {
19365 decoder.debug_check_bounds::<Self>(offset);
19366 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
19368 let padval = unsafe { (ptr as *const u64).read_unaligned() };
19369 let mask = 0xffffffff00000000u64;
19370 let maskedval = padval & mask;
19371 if maskedval != 0 {
19372 return Err(fidl::Error::NonZeroPadding {
19373 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
19374 });
19375 }
19376 fidl::decode!(
19377 fidl::encoding::Boxed<Struct8Byte>,
19378 D,
19379 &mut self.out_of_line,
19380 decoder,
19381 offset + 0,
19382 _depth
19383 )?;
19384 fidl::decode!(Struct4Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19385 Ok(())
19386 }
19387 }
19388
19389 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject5Byte {
19390 type Borrowed<'a> = &'a Self;
19391 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19392 value
19393 }
19394 }
19395
19396 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject5Byte {
19397 type Owned = Self;
19398
19399 #[inline(always)]
19400 fn inline_align(_context: fidl::encoding::Context) -> usize {
19401 8
19402 }
19403
19404 #[inline(always)]
19405 fn inline_size(_context: fidl::encoding::Context) -> usize {
19406 16
19407 }
19408 }
19409
19410 unsafe impl<D: fidl::encoding::ResourceDialect>
19411 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject5Byte, D>
19412 for &PaddingEndOfInlineObjectBeforeNextObject5Byte
19413 {
19414 #[inline]
19415 unsafe fn encode(
19416 self,
19417 encoder: &mut fidl::encoding::Encoder<'_, D>,
19418 offset: usize,
19419 _depth: fidl::encoding::Depth,
19420 ) -> fidl::Result<()> {
19421 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject5Byte>(offset);
19422 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject5Byte, D>::encode(
19424 (
19425 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19426 &self.out_of_line,
19427 ),
19428 <Struct5Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19429 ),
19430 encoder,
19431 offset,
19432 _depth,
19433 )
19434 }
19435 }
19436 unsafe impl<
19437 D: fidl::encoding::ResourceDialect,
19438 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19439 T1: fidl::encoding::Encode<Struct5Byte, D>,
19440 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject5Byte, D> for (T0, T1)
19441 {
19442 #[inline]
19443 unsafe fn encode(
19444 self,
19445 encoder: &mut fidl::encoding::Encoder<'_, D>,
19446 offset: usize,
19447 depth: fidl::encoding::Depth,
19448 ) -> fidl::Result<()> {
19449 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject5Byte>(offset);
19450 self.0.encode(encoder, offset + 0, depth)?;
19454 self.1.encode(encoder, offset + 8, depth)?;
19455 Ok(())
19456 }
19457 }
19458
19459 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19460 for PaddingEndOfInlineObjectBeforeNextObject5Byte
19461 {
19462 #[inline(always)]
19463 fn new_empty() -> Self {
19464 Self {
19465 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19466 in_line: fidl::new_empty!(Struct5Byte, D),
19467 }
19468 }
19469
19470 #[inline]
19471 unsafe fn decode(
19472 &mut self,
19473 decoder: &mut fidl::encoding::Decoder<'_, D>,
19474 offset: usize,
19475 _depth: fidl::encoding::Depth,
19476 ) -> fidl::Result<()> {
19477 decoder.debug_check_bounds::<Self>(offset);
19478 fidl::decode!(
19480 fidl::encoding::Boxed<Struct8Byte>,
19481 D,
19482 &mut self.out_of_line,
19483 decoder,
19484 offset + 0,
19485 _depth
19486 )?;
19487 fidl::decode!(Struct5Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19488 Ok(())
19489 }
19490 }
19491
19492 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject6Byte {
19493 type Borrowed<'a> = &'a Self;
19494 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19495 value
19496 }
19497 }
19498
19499 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject6Byte {
19500 type Owned = Self;
19501
19502 #[inline(always)]
19503 fn inline_align(_context: fidl::encoding::Context) -> usize {
19504 8
19505 }
19506
19507 #[inline(always)]
19508 fn inline_size(_context: fidl::encoding::Context) -> usize {
19509 16
19510 }
19511 }
19512
19513 unsafe impl<D: fidl::encoding::ResourceDialect>
19514 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject6Byte, D>
19515 for &PaddingEndOfInlineObjectBeforeNextObject6Byte
19516 {
19517 #[inline]
19518 unsafe fn encode(
19519 self,
19520 encoder: &mut fidl::encoding::Encoder<'_, D>,
19521 offset: usize,
19522 _depth: fidl::encoding::Depth,
19523 ) -> fidl::Result<()> {
19524 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject6Byte>(offset);
19525 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject6Byte, D>::encode(
19527 (
19528 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19529 &self.out_of_line,
19530 ),
19531 <Struct6Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19532 ),
19533 encoder,
19534 offset,
19535 _depth,
19536 )
19537 }
19538 }
19539 unsafe impl<
19540 D: fidl::encoding::ResourceDialect,
19541 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19542 T1: fidl::encoding::Encode<Struct6Byte, D>,
19543 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject6Byte, D> for (T0, T1)
19544 {
19545 #[inline]
19546 unsafe fn encode(
19547 self,
19548 encoder: &mut fidl::encoding::Encoder<'_, D>,
19549 offset: usize,
19550 depth: fidl::encoding::Depth,
19551 ) -> fidl::Result<()> {
19552 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject6Byte>(offset);
19553 self.0.encode(encoder, offset + 0, depth)?;
19557 self.1.encode(encoder, offset + 8, depth)?;
19558 Ok(())
19559 }
19560 }
19561
19562 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19563 for PaddingEndOfInlineObjectBeforeNextObject6Byte
19564 {
19565 #[inline(always)]
19566 fn new_empty() -> Self {
19567 Self {
19568 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19569 in_line: fidl::new_empty!(Struct6Byte, D),
19570 }
19571 }
19572
19573 #[inline]
19574 unsafe fn decode(
19575 &mut self,
19576 decoder: &mut fidl::encoding::Decoder<'_, D>,
19577 offset: usize,
19578 _depth: fidl::encoding::Depth,
19579 ) -> fidl::Result<()> {
19580 decoder.debug_check_bounds::<Self>(offset);
19581 fidl::decode!(
19583 fidl::encoding::Boxed<Struct8Byte>,
19584 D,
19585 &mut self.out_of_line,
19586 decoder,
19587 offset + 0,
19588 _depth
19589 )?;
19590 fidl::decode!(Struct6Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19591 Ok(())
19592 }
19593 }
19594
19595 impl fidl::encoding::ValueTypeMarker for PaddingEndOfInlineObjectBeforeNextObject7Byte {
19596 type Borrowed<'a> = &'a Self;
19597 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19598 value
19599 }
19600 }
19601
19602 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfInlineObjectBeforeNextObject7Byte {
19603 type Owned = Self;
19604
19605 #[inline(always)]
19606 fn inline_align(_context: fidl::encoding::Context) -> usize {
19607 8
19608 }
19609
19610 #[inline(always)]
19611 fn inline_size(_context: fidl::encoding::Context) -> usize {
19612 16
19613 }
19614 }
19615
19616 unsafe impl<D: fidl::encoding::ResourceDialect>
19617 fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject7Byte, D>
19618 for &PaddingEndOfInlineObjectBeforeNextObject7Byte
19619 {
19620 #[inline]
19621 unsafe fn encode(
19622 self,
19623 encoder: &mut fidl::encoding::Encoder<'_, D>,
19624 offset: usize,
19625 _depth: fidl::encoding::Depth,
19626 ) -> fidl::Result<()> {
19627 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject7Byte>(offset);
19628 fidl::encoding::Encode::<PaddingEndOfInlineObjectBeforeNextObject7Byte, D>::encode(
19630 (
19631 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19632 &self.out_of_line,
19633 ),
19634 <Struct7Byte as fidl::encoding::ValueTypeMarker>::borrow(&self.in_line),
19635 ),
19636 encoder,
19637 offset,
19638 _depth,
19639 )
19640 }
19641 }
19642 unsafe impl<
19643 D: fidl::encoding::ResourceDialect,
19644 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
19645 T1: fidl::encoding::Encode<Struct7Byte, D>,
19646 > fidl::encoding::Encode<PaddingEndOfInlineObjectBeforeNextObject7Byte, D> for (T0, T1)
19647 {
19648 #[inline]
19649 unsafe fn encode(
19650 self,
19651 encoder: &mut fidl::encoding::Encoder<'_, D>,
19652 offset: usize,
19653 depth: fidl::encoding::Depth,
19654 ) -> fidl::Result<()> {
19655 encoder.debug_check_bounds::<PaddingEndOfInlineObjectBeforeNextObject7Byte>(offset);
19656 self.0.encode(encoder, offset + 0, depth)?;
19660 self.1.encode(encoder, offset + 8, depth)?;
19661 Ok(())
19662 }
19663 }
19664
19665 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19666 for PaddingEndOfInlineObjectBeforeNextObject7Byte
19667 {
19668 #[inline(always)]
19669 fn new_empty() -> Self {
19670 Self {
19671 out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
19672 in_line: fidl::new_empty!(Struct7Byte, D),
19673 }
19674 }
19675
19676 #[inline]
19677 unsafe fn decode(
19678 &mut self,
19679 decoder: &mut fidl::encoding::Decoder<'_, D>,
19680 offset: usize,
19681 _depth: fidl::encoding::Depth,
19682 ) -> fidl::Result<()> {
19683 decoder.debug_check_bounds::<Self>(offset);
19684 fidl::decode!(
19686 fidl::encoding::Boxed<Struct8Byte>,
19687 D,
19688 &mut self.out_of_line,
19689 decoder,
19690 offset + 0,
19691 _depth
19692 )?;
19693 fidl::decode!(Struct7Byte, D, &mut self.in_line, decoder, offset + 8, _depth)?;
19694 Ok(())
19695 }
19696 }
19697
19698 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject1Byte {
19699 type Borrowed<'a> = &'a Self;
19700 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19701 value
19702 }
19703 }
19704
19705 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject1Byte {
19706 type Owned = Self;
19707
19708 #[inline(always)]
19709 fn inline_align(_context: fidl::encoding::Context) -> usize {
19710 8
19711 }
19712
19713 #[inline(always)]
19714 fn inline_size(_context: fidl::encoding::Context) -> usize {
19715 8
19716 }
19717 }
19718
19719 unsafe impl<D: fidl::encoding::ResourceDialect>
19720 fidl::encoding::Encode<PaddingEndOfOutOfLineObject1Byte, D>
19721 for &PaddingEndOfOutOfLineObject1Byte
19722 {
19723 #[inline]
19724 unsafe fn encode(
19725 self,
19726 encoder: &mut fidl::encoding::Encoder<'_, D>,
19727 offset: usize,
19728 _depth: fidl::encoding::Depth,
19729 ) -> fidl::Result<()> {
19730 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject1Byte>(offset);
19731 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject1Byte, D>::encode(
19733 (<fidl::encoding::Boxed<Struct1Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19734 &self.out_of_line,
19735 ),),
19736 encoder,
19737 offset,
19738 _depth,
19739 )
19740 }
19741 }
19742 unsafe impl<
19743 D: fidl::encoding::ResourceDialect,
19744 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct1Byte>, D>,
19745 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject1Byte, D> for (T0,)
19746 {
19747 #[inline]
19748 unsafe fn encode(
19749 self,
19750 encoder: &mut fidl::encoding::Encoder<'_, D>,
19751 offset: usize,
19752 depth: fidl::encoding::Depth,
19753 ) -> fidl::Result<()> {
19754 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject1Byte>(offset);
19755 self.0.encode(encoder, offset + 0, depth)?;
19759 Ok(())
19760 }
19761 }
19762
19763 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19764 for PaddingEndOfOutOfLineObject1Byte
19765 {
19766 #[inline(always)]
19767 fn new_empty() -> Self {
19768 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct1Byte>, D) }
19769 }
19770
19771 #[inline]
19772 unsafe fn decode(
19773 &mut self,
19774 decoder: &mut fidl::encoding::Decoder<'_, D>,
19775 offset: usize,
19776 _depth: fidl::encoding::Depth,
19777 ) -> fidl::Result<()> {
19778 decoder.debug_check_bounds::<Self>(offset);
19779 fidl::decode!(
19781 fidl::encoding::Boxed<Struct1Byte>,
19782 D,
19783 &mut self.out_of_line,
19784 decoder,
19785 offset + 0,
19786 _depth
19787 )?;
19788 Ok(())
19789 }
19790 }
19791
19792 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject2Byte {
19793 type Borrowed<'a> = &'a Self;
19794 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19795 value
19796 }
19797 }
19798
19799 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject2Byte {
19800 type Owned = Self;
19801
19802 #[inline(always)]
19803 fn inline_align(_context: fidl::encoding::Context) -> usize {
19804 8
19805 }
19806
19807 #[inline(always)]
19808 fn inline_size(_context: fidl::encoding::Context) -> usize {
19809 8
19810 }
19811 }
19812
19813 unsafe impl<D: fidl::encoding::ResourceDialect>
19814 fidl::encoding::Encode<PaddingEndOfOutOfLineObject2Byte, D>
19815 for &PaddingEndOfOutOfLineObject2Byte
19816 {
19817 #[inline]
19818 unsafe fn encode(
19819 self,
19820 encoder: &mut fidl::encoding::Encoder<'_, D>,
19821 offset: usize,
19822 _depth: fidl::encoding::Depth,
19823 ) -> fidl::Result<()> {
19824 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject2Byte>(offset);
19825 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject2Byte, D>::encode(
19827 (<fidl::encoding::Boxed<Struct2Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19828 &self.out_of_line,
19829 ),),
19830 encoder,
19831 offset,
19832 _depth,
19833 )
19834 }
19835 }
19836 unsafe impl<
19837 D: fidl::encoding::ResourceDialect,
19838 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct2Byte>, D>,
19839 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject2Byte, D> for (T0,)
19840 {
19841 #[inline]
19842 unsafe fn encode(
19843 self,
19844 encoder: &mut fidl::encoding::Encoder<'_, D>,
19845 offset: usize,
19846 depth: fidl::encoding::Depth,
19847 ) -> fidl::Result<()> {
19848 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject2Byte>(offset);
19849 self.0.encode(encoder, offset + 0, depth)?;
19853 Ok(())
19854 }
19855 }
19856
19857 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19858 for PaddingEndOfOutOfLineObject2Byte
19859 {
19860 #[inline(always)]
19861 fn new_empty() -> Self {
19862 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct2Byte>, D) }
19863 }
19864
19865 #[inline]
19866 unsafe fn decode(
19867 &mut self,
19868 decoder: &mut fidl::encoding::Decoder<'_, D>,
19869 offset: usize,
19870 _depth: fidl::encoding::Depth,
19871 ) -> fidl::Result<()> {
19872 decoder.debug_check_bounds::<Self>(offset);
19873 fidl::decode!(
19875 fidl::encoding::Boxed<Struct2Byte>,
19876 D,
19877 &mut self.out_of_line,
19878 decoder,
19879 offset + 0,
19880 _depth
19881 )?;
19882 Ok(())
19883 }
19884 }
19885
19886 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject3Byte {
19887 type Borrowed<'a> = &'a Self;
19888 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19889 value
19890 }
19891 }
19892
19893 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject3Byte {
19894 type Owned = Self;
19895
19896 #[inline(always)]
19897 fn inline_align(_context: fidl::encoding::Context) -> usize {
19898 8
19899 }
19900
19901 #[inline(always)]
19902 fn inline_size(_context: fidl::encoding::Context) -> usize {
19903 8
19904 }
19905 }
19906
19907 unsafe impl<D: fidl::encoding::ResourceDialect>
19908 fidl::encoding::Encode<PaddingEndOfOutOfLineObject3Byte, D>
19909 for &PaddingEndOfOutOfLineObject3Byte
19910 {
19911 #[inline]
19912 unsafe fn encode(
19913 self,
19914 encoder: &mut fidl::encoding::Encoder<'_, D>,
19915 offset: usize,
19916 _depth: fidl::encoding::Depth,
19917 ) -> fidl::Result<()> {
19918 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject3Byte>(offset);
19919 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject3Byte, D>::encode(
19921 (<fidl::encoding::Boxed<Struct3Byte> as fidl::encoding::ValueTypeMarker>::borrow(
19922 &self.out_of_line,
19923 ),),
19924 encoder,
19925 offset,
19926 _depth,
19927 )
19928 }
19929 }
19930 unsafe impl<
19931 D: fidl::encoding::ResourceDialect,
19932 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct3Byte>, D>,
19933 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject3Byte, D> for (T0,)
19934 {
19935 #[inline]
19936 unsafe fn encode(
19937 self,
19938 encoder: &mut fidl::encoding::Encoder<'_, D>,
19939 offset: usize,
19940 depth: fidl::encoding::Depth,
19941 ) -> fidl::Result<()> {
19942 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject3Byte>(offset);
19943 self.0.encode(encoder, offset + 0, depth)?;
19947 Ok(())
19948 }
19949 }
19950
19951 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
19952 for PaddingEndOfOutOfLineObject3Byte
19953 {
19954 #[inline(always)]
19955 fn new_empty() -> Self {
19956 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct3Byte>, D) }
19957 }
19958
19959 #[inline]
19960 unsafe fn decode(
19961 &mut self,
19962 decoder: &mut fidl::encoding::Decoder<'_, D>,
19963 offset: usize,
19964 _depth: fidl::encoding::Depth,
19965 ) -> fidl::Result<()> {
19966 decoder.debug_check_bounds::<Self>(offset);
19967 fidl::decode!(
19969 fidl::encoding::Boxed<Struct3Byte>,
19970 D,
19971 &mut self.out_of_line,
19972 decoder,
19973 offset + 0,
19974 _depth
19975 )?;
19976 Ok(())
19977 }
19978 }
19979
19980 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject4Byte {
19981 type Borrowed<'a> = &'a Self;
19982 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19983 value
19984 }
19985 }
19986
19987 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject4Byte {
19988 type Owned = Self;
19989
19990 #[inline(always)]
19991 fn inline_align(_context: fidl::encoding::Context) -> usize {
19992 8
19993 }
19994
19995 #[inline(always)]
19996 fn inline_size(_context: fidl::encoding::Context) -> usize {
19997 8
19998 }
19999 }
20000
20001 unsafe impl<D: fidl::encoding::ResourceDialect>
20002 fidl::encoding::Encode<PaddingEndOfOutOfLineObject4Byte, D>
20003 for &PaddingEndOfOutOfLineObject4Byte
20004 {
20005 #[inline]
20006 unsafe fn encode(
20007 self,
20008 encoder: &mut fidl::encoding::Encoder<'_, D>,
20009 offset: usize,
20010 _depth: fidl::encoding::Depth,
20011 ) -> fidl::Result<()> {
20012 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject4Byte>(offset);
20013 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject4Byte, D>::encode(
20015 (<fidl::encoding::Boxed<Struct4Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20016 &self.out_of_line,
20017 ),),
20018 encoder,
20019 offset,
20020 _depth,
20021 )
20022 }
20023 }
20024 unsafe impl<
20025 D: fidl::encoding::ResourceDialect,
20026 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct4Byte>, D>,
20027 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject4Byte, D> for (T0,)
20028 {
20029 #[inline]
20030 unsafe fn encode(
20031 self,
20032 encoder: &mut fidl::encoding::Encoder<'_, D>,
20033 offset: usize,
20034 depth: fidl::encoding::Depth,
20035 ) -> fidl::Result<()> {
20036 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject4Byte>(offset);
20037 self.0.encode(encoder, offset + 0, depth)?;
20041 Ok(())
20042 }
20043 }
20044
20045 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20046 for PaddingEndOfOutOfLineObject4Byte
20047 {
20048 #[inline(always)]
20049 fn new_empty() -> Self {
20050 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct4Byte>, D) }
20051 }
20052
20053 #[inline]
20054 unsafe fn decode(
20055 &mut self,
20056 decoder: &mut fidl::encoding::Decoder<'_, D>,
20057 offset: usize,
20058 _depth: fidl::encoding::Depth,
20059 ) -> fidl::Result<()> {
20060 decoder.debug_check_bounds::<Self>(offset);
20061 fidl::decode!(
20063 fidl::encoding::Boxed<Struct4Byte>,
20064 D,
20065 &mut self.out_of_line,
20066 decoder,
20067 offset + 0,
20068 _depth
20069 )?;
20070 Ok(())
20071 }
20072 }
20073
20074 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject5Byte {
20075 type Borrowed<'a> = &'a Self;
20076 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20077 value
20078 }
20079 }
20080
20081 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject5Byte {
20082 type Owned = Self;
20083
20084 #[inline(always)]
20085 fn inline_align(_context: fidl::encoding::Context) -> usize {
20086 8
20087 }
20088
20089 #[inline(always)]
20090 fn inline_size(_context: fidl::encoding::Context) -> usize {
20091 8
20092 }
20093 }
20094
20095 unsafe impl<D: fidl::encoding::ResourceDialect>
20096 fidl::encoding::Encode<PaddingEndOfOutOfLineObject5Byte, D>
20097 for &PaddingEndOfOutOfLineObject5Byte
20098 {
20099 #[inline]
20100 unsafe fn encode(
20101 self,
20102 encoder: &mut fidl::encoding::Encoder<'_, D>,
20103 offset: usize,
20104 _depth: fidl::encoding::Depth,
20105 ) -> fidl::Result<()> {
20106 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject5Byte>(offset);
20107 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject5Byte, D>::encode(
20109 (<fidl::encoding::Boxed<Struct5Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20110 &self.out_of_line,
20111 ),),
20112 encoder,
20113 offset,
20114 _depth,
20115 )
20116 }
20117 }
20118 unsafe impl<
20119 D: fidl::encoding::ResourceDialect,
20120 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct5Byte>, D>,
20121 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject5Byte, D> for (T0,)
20122 {
20123 #[inline]
20124 unsafe fn encode(
20125 self,
20126 encoder: &mut fidl::encoding::Encoder<'_, D>,
20127 offset: usize,
20128 depth: fidl::encoding::Depth,
20129 ) -> fidl::Result<()> {
20130 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject5Byte>(offset);
20131 self.0.encode(encoder, offset + 0, depth)?;
20135 Ok(())
20136 }
20137 }
20138
20139 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20140 for PaddingEndOfOutOfLineObject5Byte
20141 {
20142 #[inline(always)]
20143 fn new_empty() -> Self {
20144 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct5Byte>, D) }
20145 }
20146
20147 #[inline]
20148 unsafe fn decode(
20149 &mut self,
20150 decoder: &mut fidl::encoding::Decoder<'_, D>,
20151 offset: usize,
20152 _depth: fidl::encoding::Depth,
20153 ) -> fidl::Result<()> {
20154 decoder.debug_check_bounds::<Self>(offset);
20155 fidl::decode!(
20157 fidl::encoding::Boxed<Struct5Byte>,
20158 D,
20159 &mut self.out_of_line,
20160 decoder,
20161 offset + 0,
20162 _depth
20163 )?;
20164 Ok(())
20165 }
20166 }
20167
20168 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject6Byte {
20169 type Borrowed<'a> = &'a Self;
20170 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20171 value
20172 }
20173 }
20174
20175 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject6Byte {
20176 type Owned = Self;
20177
20178 #[inline(always)]
20179 fn inline_align(_context: fidl::encoding::Context) -> usize {
20180 8
20181 }
20182
20183 #[inline(always)]
20184 fn inline_size(_context: fidl::encoding::Context) -> usize {
20185 8
20186 }
20187 }
20188
20189 unsafe impl<D: fidl::encoding::ResourceDialect>
20190 fidl::encoding::Encode<PaddingEndOfOutOfLineObject6Byte, D>
20191 for &PaddingEndOfOutOfLineObject6Byte
20192 {
20193 #[inline]
20194 unsafe fn encode(
20195 self,
20196 encoder: &mut fidl::encoding::Encoder<'_, D>,
20197 offset: usize,
20198 _depth: fidl::encoding::Depth,
20199 ) -> fidl::Result<()> {
20200 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject6Byte>(offset);
20201 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject6Byte, D>::encode(
20203 (<fidl::encoding::Boxed<Struct6Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20204 &self.out_of_line,
20205 ),),
20206 encoder,
20207 offset,
20208 _depth,
20209 )
20210 }
20211 }
20212 unsafe impl<
20213 D: fidl::encoding::ResourceDialect,
20214 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct6Byte>, D>,
20215 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject6Byte, D> for (T0,)
20216 {
20217 #[inline]
20218 unsafe fn encode(
20219 self,
20220 encoder: &mut fidl::encoding::Encoder<'_, D>,
20221 offset: usize,
20222 depth: fidl::encoding::Depth,
20223 ) -> fidl::Result<()> {
20224 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject6Byte>(offset);
20225 self.0.encode(encoder, offset + 0, depth)?;
20229 Ok(())
20230 }
20231 }
20232
20233 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20234 for PaddingEndOfOutOfLineObject6Byte
20235 {
20236 #[inline(always)]
20237 fn new_empty() -> Self {
20238 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct6Byte>, D) }
20239 }
20240
20241 #[inline]
20242 unsafe fn decode(
20243 &mut self,
20244 decoder: &mut fidl::encoding::Decoder<'_, D>,
20245 offset: usize,
20246 _depth: fidl::encoding::Depth,
20247 ) -> fidl::Result<()> {
20248 decoder.debug_check_bounds::<Self>(offset);
20249 fidl::decode!(
20251 fidl::encoding::Boxed<Struct6Byte>,
20252 D,
20253 &mut self.out_of_line,
20254 decoder,
20255 offset + 0,
20256 _depth
20257 )?;
20258 Ok(())
20259 }
20260 }
20261
20262 impl fidl::encoding::ValueTypeMarker for PaddingEndOfOutOfLineObject7Byte {
20263 type Borrowed<'a> = &'a Self;
20264 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20265 value
20266 }
20267 }
20268
20269 unsafe impl fidl::encoding::TypeMarker for PaddingEndOfOutOfLineObject7Byte {
20270 type Owned = Self;
20271
20272 #[inline(always)]
20273 fn inline_align(_context: fidl::encoding::Context) -> usize {
20274 8
20275 }
20276
20277 #[inline(always)]
20278 fn inline_size(_context: fidl::encoding::Context) -> usize {
20279 8
20280 }
20281 }
20282
20283 unsafe impl<D: fidl::encoding::ResourceDialect>
20284 fidl::encoding::Encode<PaddingEndOfOutOfLineObject7Byte, D>
20285 for &PaddingEndOfOutOfLineObject7Byte
20286 {
20287 #[inline]
20288 unsafe fn encode(
20289 self,
20290 encoder: &mut fidl::encoding::Encoder<'_, D>,
20291 offset: usize,
20292 _depth: fidl::encoding::Depth,
20293 ) -> fidl::Result<()> {
20294 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject7Byte>(offset);
20295 fidl::encoding::Encode::<PaddingEndOfOutOfLineObject7Byte, D>::encode(
20297 (<fidl::encoding::Boxed<Struct7Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20298 &self.out_of_line,
20299 ),),
20300 encoder,
20301 offset,
20302 _depth,
20303 )
20304 }
20305 }
20306 unsafe impl<
20307 D: fidl::encoding::ResourceDialect,
20308 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct7Byte>, D>,
20309 > fidl::encoding::Encode<PaddingEndOfOutOfLineObject7Byte, D> for (T0,)
20310 {
20311 #[inline]
20312 unsafe fn encode(
20313 self,
20314 encoder: &mut fidl::encoding::Encoder<'_, D>,
20315 offset: usize,
20316 depth: fidl::encoding::Depth,
20317 ) -> fidl::Result<()> {
20318 encoder.debug_check_bounds::<PaddingEndOfOutOfLineObject7Byte>(offset);
20319 self.0.encode(encoder, offset + 0, depth)?;
20323 Ok(())
20324 }
20325 }
20326
20327 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20328 for PaddingEndOfOutOfLineObject7Byte
20329 {
20330 #[inline(always)]
20331 fn new_empty() -> Self {
20332 Self { out_of_line: fidl::new_empty!(fidl::encoding::Boxed<Struct7Byte>, D) }
20333 }
20334
20335 #[inline]
20336 unsafe fn decode(
20337 &mut self,
20338 decoder: &mut fidl::encoding::Decoder<'_, D>,
20339 offset: usize,
20340 _depth: fidl::encoding::Depth,
20341 ) -> fidl::Result<()> {
20342 decoder.debug_check_bounds::<Self>(offset);
20343 fidl::decode!(
20345 fidl::encoding::Boxed<Struct7Byte>,
20346 D,
20347 &mut self.out_of_line,
20348 decoder,
20349 offset + 0,
20350 _depth
20351 )?;
20352 Ok(())
20353 }
20354 }
20355
20356 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects1Byte {
20357 type Borrowed<'a> = &'a Self;
20358 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20359 value
20360 }
20361 }
20362
20363 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects1Byte {
20364 type Owned = Self;
20365
20366 #[inline(always)]
20367 fn inline_align(_context: fidl::encoding::Context) -> usize {
20368 8
20369 }
20370
20371 #[inline(always)]
20372 fn inline_size(_context: fidl::encoding::Context) -> usize {
20373 16
20374 }
20375 }
20376
20377 unsafe impl<D: fidl::encoding::ResourceDialect>
20378 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects1Byte, D>
20379 for &PaddingInBetweenOutOfLineObjects1Byte
20380 {
20381 #[inline]
20382 unsafe fn encode(
20383 self,
20384 encoder: &mut fidl::encoding::Encoder<'_, D>,
20385 offset: usize,
20386 _depth: fidl::encoding::Depth,
20387 ) -> fidl::Result<()> {
20388 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects1Byte>(offset);
20389 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects1Byte, D>::encode(
20391 (
20392 <fidl::encoding::Boxed<Struct1Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20393 &self.first,
20394 ),
20395 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20396 &self.second,
20397 ),
20398 ),
20399 encoder,
20400 offset,
20401 _depth,
20402 )
20403 }
20404 }
20405 unsafe impl<
20406 D: fidl::encoding::ResourceDialect,
20407 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct1Byte>, D>,
20408 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20409 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects1Byte, D> for (T0, T1)
20410 {
20411 #[inline]
20412 unsafe fn encode(
20413 self,
20414 encoder: &mut fidl::encoding::Encoder<'_, D>,
20415 offset: usize,
20416 depth: fidl::encoding::Depth,
20417 ) -> fidl::Result<()> {
20418 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects1Byte>(offset);
20419 self.0.encode(encoder, offset + 0, depth)?;
20423 self.1.encode(encoder, offset + 8, depth)?;
20424 Ok(())
20425 }
20426 }
20427
20428 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20429 for PaddingInBetweenOutOfLineObjects1Byte
20430 {
20431 #[inline(always)]
20432 fn new_empty() -> Self {
20433 Self {
20434 first: fidl::new_empty!(fidl::encoding::Boxed<Struct1Byte>, D),
20435 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20436 }
20437 }
20438
20439 #[inline]
20440 unsafe fn decode(
20441 &mut self,
20442 decoder: &mut fidl::encoding::Decoder<'_, D>,
20443 offset: usize,
20444 _depth: fidl::encoding::Depth,
20445 ) -> fidl::Result<()> {
20446 decoder.debug_check_bounds::<Self>(offset);
20447 fidl::decode!(
20449 fidl::encoding::Boxed<Struct1Byte>,
20450 D,
20451 &mut self.first,
20452 decoder,
20453 offset + 0,
20454 _depth
20455 )?;
20456 fidl::decode!(
20457 fidl::encoding::Boxed<Struct8Byte>,
20458 D,
20459 &mut self.second,
20460 decoder,
20461 offset + 8,
20462 _depth
20463 )?;
20464 Ok(())
20465 }
20466 }
20467
20468 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects2Byte {
20469 type Borrowed<'a> = &'a Self;
20470 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20471 value
20472 }
20473 }
20474
20475 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects2Byte {
20476 type Owned = Self;
20477
20478 #[inline(always)]
20479 fn inline_align(_context: fidl::encoding::Context) -> usize {
20480 8
20481 }
20482
20483 #[inline(always)]
20484 fn inline_size(_context: fidl::encoding::Context) -> usize {
20485 16
20486 }
20487 }
20488
20489 unsafe impl<D: fidl::encoding::ResourceDialect>
20490 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects2Byte, D>
20491 for &PaddingInBetweenOutOfLineObjects2Byte
20492 {
20493 #[inline]
20494 unsafe fn encode(
20495 self,
20496 encoder: &mut fidl::encoding::Encoder<'_, D>,
20497 offset: usize,
20498 _depth: fidl::encoding::Depth,
20499 ) -> fidl::Result<()> {
20500 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects2Byte>(offset);
20501 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects2Byte, D>::encode(
20503 (
20504 <fidl::encoding::Boxed<Struct2Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20505 &self.first,
20506 ),
20507 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20508 &self.second,
20509 ),
20510 ),
20511 encoder,
20512 offset,
20513 _depth,
20514 )
20515 }
20516 }
20517 unsafe impl<
20518 D: fidl::encoding::ResourceDialect,
20519 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct2Byte>, D>,
20520 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20521 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects2Byte, D> for (T0, T1)
20522 {
20523 #[inline]
20524 unsafe fn encode(
20525 self,
20526 encoder: &mut fidl::encoding::Encoder<'_, D>,
20527 offset: usize,
20528 depth: fidl::encoding::Depth,
20529 ) -> fidl::Result<()> {
20530 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects2Byte>(offset);
20531 self.0.encode(encoder, offset + 0, depth)?;
20535 self.1.encode(encoder, offset + 8, depth)?;
20536 Ok(())
20537 }
20538 }
20539
20540 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20541 for PaddingInBetweenOutOfLineObjects2Byte
20542 {
20543 #[inline(always)]
20544 fn new_empty() -> Self {
20545 Self {
20546 first: fidl::new_empty!(fidl::encoding::Boxed<Struct2Byte>, D),
20547 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20548 }
20549 }
20550
20551 #[inline]
20552 unsafe fn decode(
20553 &mut self,
20554 decoder: &mut fidl::encoding::Decoder<'_, D>,
20555 offset: usize,
20556 _depth: fidl::encoding::Depth,
20557 ) -> fidl::Result<()> {
20558 decoder.debug_check_bounds::<Self>(offset);
20559 fidl::decode!(
20561 fidl::encoding::Boxed<Struct2Byte>,
20562 D,
20563 &mut self.first,
20564 decoder,
20565 offset + 0,
20566 _depth
20567 )?;
20568 fidl::decode!(
20569 fidl::encoding::Boxed<Struct8Byte>,
20570 D,
20571 &mut self.second,
20572 decoder,
20573 offset + 8,
20574 _depth
20575 )?;
20576 Ok(())
20577 }
20578 }
20579
20580 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects3Byte {
20581 type Borrowed<'a> = &'a Self;
20582 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20583 value
20584 }
20585 }
20586
20587 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects3Byte {
20588 type Owned = Self;
20589
20590 #[inline(always)]
20591 fn inline_align(_context: fidl::encoding::Context) -> usize {
20592 8
20593 }
20594
20595 #[inline(always)]
20596 fn inline_size(_context: fidl::encoding::Context) -> usize {
20597 16
20598 }
20599 }
20600
20601 unsafe impl<D: fidl::encoding::ResourceDialect>
20602 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects3Byte, D>
20603 for &PaddingInBetweenOutOfLineObjects3Byte
20604 {
20605 #[inline]
20606 unsafe fn encode(
20607 self,
20608 encoder: &mut fidl::encoding::Encoder<'_, D>,
20609 offset: usize,
20610 _depth: fidl::encoding::Depth,
20611 ) -> fidl::Result<()> {
20612 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects3Byte>(offset);
20613 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects3Byte, D>::encode(
20615 (
20616 <fidl::encoding::Boxed<Struct3Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20617 &self.first,
20618 ),
20619 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20620 &self.second,
20621 ),
20622 ),
20623 encoder,
20624 offset,
20625 _depth,
20626 )
20627 }
20628 }
20629 unsafe impl<
20630 D: fidl::encoding::ResourceDialect,
20631 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct3Byte>, D>,
20632 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20633 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects3Byte, D> for (T0, T1)
20634 {
20635 #[inline]
20636 unsafe fn encode(
20637 self,
20638 encoder: &mut fidl::encoding::Encoder<'_, D>,
20639 offset: usize,
20640 depth: fidl::encoding::Depth,
20641 ) -> fidl::Result<()> {
20642 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects3Byte>(offset);
20643 self.0.encode(encoder, offset + 0, depth)?;
20647 self.1.encode(encoder, offset + 8, depth)?;
20648 Ok(())
20649 }
20650 }
20651
20652 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20653 for PaddingInBetweenOutOfLineObjects3Byte
20654 {
20655 #[inline(always)]
20656 fn new_empty() -> Self {
20657 Self {
20658 first: fidl::new_empty!(fidl::encoding::Boxed<Struct3Byte>, D),
20659 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20660 }
20661 }
20662
20663 #[inline]
20664 unsafe fn decode(
20665 &mut self,
20666 decoder: &mut fidl::encoding::Decoder<'_, D>,
20667 offset: usize,
20668 _depth: fidl::encoding::Depth,
20669 ) -> fidl::Result<()> {
20670 decoder.debug_check_bounds::<Self>(offset);
20671 fidl::decode!(
20673 fidl::encoding::Boxed<Struct3Byte>,
20674 D,
20675 &mut self.first,
20676 decoder,
20677 offset + 0,
20678 _depth
20679 )?;
20680 fidl::decode!(
20681 fidl::encoding::Boxed<Struct8Byte>,
20682 D,
20683 &mut self.second,
20684 decoder,
20685 offset + 8,
20686 _depth
20687 )?;
20688 Ok(())
20689 }
20690 }
20691
20692 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects4Byte {
20693 type Borrowed<'a> = &'a Self;
20694 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20695 value
20696 }
20697 }
20698
20699 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects4Byte {
20700 type Owned = Self;
20701
20702 #[inline(always)]
20703 fn inline_align(_context: fidl::encoding::Context) -> usize {
20704 8
20705 }
20706
20707 #[inline(always)]
20708 fn inline_size(_context: fidl::encoding::Context) -> usize {
20709 16
20710 }
20711 }
20712
20713 unsafe impl<D: fidl::encoding::ResourceDialect>
20714 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects4Byte, D>
20715 for &PaddingInBetweenOutOfLineObjects4Byte
20716 {
20717 #[inline]
20718 unsafe fn encode(
20719 self,
20720 encoder: &mut fidl::encoding::Encoder<'_, D>,
20721 offset: usize,
20722 _depth: fidl::encoding::Depth,
20723 ) -> fidl::Result<()> {
20724 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects4Byte>(offset);
20725 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects4Byte, D>::encode(
20727 (
20728 <fidl::encoding::Boxed<Struct4Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20729 &self.first,
20730 ),
20731 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20732 &self.second,
20733 ),
20734 ),
20735 encoder,
20736 offset,
20737 _depth,
20738 )
20739 }
20740 }
20741 unsafe impl<
20742 D: fidl::encoding::ResourceDialect,
20743 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct4Byte>, D>,
20744 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20745 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects4Byte, D> for (T0, T1)
20746 {
20747 #[inline]
20748 unsafe fn encode(
20749 self,
20750 encoder: &mut fidl::encoding::Encoder<'_, D>,
20751 offset: usize,
20752 depth: fidl::encoding::Depth,
20753 ) -> fidl::Result<()> {
20754 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects4Byte>(offset);
20755 self.0.encode(encoder, offset + 0, depth)?;
20759 self.1.encode(encoder, offset + 8, depth)?;
20760 Ok(())
20761 }
20762 }
20763
20764 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20765 for PaddingInBetweenOutOfLineObjects4Byte
20766 {
20767 #[inline(always)]
20768 fn new_empty() -> Self {
20769 Self {
20770 first: fidl::new_empty!(fidl::encoding::Boxed<Struct4Byte>, D),
20771 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20772 }
20773 }
20774
20775 #[inline]
20776 unsafe fn decode(
20777 &mut self,
20778 decoder: &mut fidl::encoding::Decoder<'_, D>,
20779 offset: usize,
20780 _depth: fidl::encoding::Depth,
20781 ) -> fidl::Result<()> {
20782 decoder.debug_check_bounds::<Self>(offset);
20783 fidl::decode!(
20785 fidl::encoding::Boxed<Struct4Byte>,
20786 D,
20787 &mut self.first,
20788 decoder,
20789 offset + 0,
20790 _depth
20791 )?;
20792 fidl::decode!(
20793 fidl::encoding::Boxed<Struct8Byte>,
20794 D,
20795 &mut self.second,
20796 decoder,
20797 offset + 8,
20798 _depth
20799 )?;
20800 Ok(())
20801 }
20802 }
20803
20804 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects5Byte {
20805 type Borrowed<'a> = &'a Self;
20806 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20807 value
20808 }
20809 }
20810
20811 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects5Byte {
20812 type Owned = Self;
20813
20814 #[inline(always)]
20815 fn inline_align(_context: fidl::encoding::Context) -> usize {
20816 8
20817 }
20818
20819 #[inline(always)]
20820 fn inline_size(_context: fidl::encoding::Context) -> usize {
20821 16
20822 }
20823 }
20824
20825 unsafe impl<D: fidl::encoding::ResourceDialect>
20826 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects5Byte, D>
20827 for &PaddingInBetweenOutOfLineObjects5Byte
20828 {
20829 #[inline]
20830 unsafe fn encode(
20831 self,
20832 encoder: &mut fidl::encoding::Encoder<'_, D>,
20833 offset: usize,
20834 _depth: fidl::encoding::Depth,
20835 ) -> fidl::Result<()> {
20836 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects5Byte>(offset);
20837 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects5Byte, D>::encode(
20839 (
20840 <fidl::encoding::Boxed<Struct5Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20841 &self.first,
20842 ),
20843 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20844 &self.second,
20845 ),
20846 ),
20847 encoder,
20848 offset,
20849 _depth,
20850 )
20851 }
20852 }
20853 unsafe impl<
20854 D: fidl::encoding::ResourceDialect,
20855 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct5Byte>, D>,
20856 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20857 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects5Byte, D> for (T0, T1)
20858 {
20859 #[inline]
20860 unsafe fn encode(
20861 self,
20862 encoder: &mut fidl::encoding::Encoder<'_, D>,
20863 offset: usize,
20864 depth: fidl::encoding::Depth,
20865 ) -> fidl::Result<()> {
20866 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects5Byte>(offset);
20867 self.0.encode(encoder, offset + 0, depth)?;
20871 self.1.encode(encoder, offset + 8, depth)?;
20872 Ok(())
20873 }
20874 }
20875
20876 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20877 for PaddingInBetweenOutOfLineObjects5Byte
20878 {
20879 #[inline(always)]
20880 fn new_empty() -> Self {
20881 Self {
20882 first: fidl::new_empty!(fidl::encoding::Boxed<Struct5Byte>, D),
20883 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20884 }
20885 }
20886
20887 #[inline]
20888 unsafe fn decode(
20889 &mut self,
20890 decoder: &mut fidl::encoding::Decoder<'_, D>,
20891 offset: usize,
20892 _depth: fidl::encoding::Depth,
20893 ) -> fidl::Result<()> {
20894 decoder.debug_check_bounds::<Self>(offset);
20895 fidl::decode!(
20897 fidl::encoding::Boxed<Struct5Byte>,
20898 D,
20899 &mut self.first,
20900 decoder,
20901 offset + 0,
20902 _depth
20903 )?;
20904 fidl::decode!(
20905 fidl::encoding::Boxed<Struct8Byte>,
20906 D,
20907 &mut self.second,
20908 decoder,
20909 offset + 8,
20910 _depth
20911 )?;
20912 Ok(())
20913 }
20914 }
20915
20916 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects6Byte {
20917 type Borrowed<'a> = &'a Self;
20918 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
20919 value
20920 }
20921 }
20922
20923 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects6Byte {
20924 type Owned = Self;
20925
20926 #[inline(always)]
20927 fn inline_align(_context: fidl::encoding::Context) -> usize {
20928 8
20929 }
20930
20931 #[inline(always)]
20932 fn inline_size(_context: fidl::encoding::Context) -> usize {
20933 16
20934 }
20935 }
20936
20937 unsafe impl<D: fidl::encoding::ResourceDialect>
20938 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects6Byte, D>
20939 for &PaddingInBetweenOutOfLineObjects6Byte
20940 {
20941 #[inline]
20942 unsafe fn encode(
20943 self,
20944 encoder: &mut fidl::encoding::Encoder<'_, D>,
20945 offset: usize,
20946 _depth: fidl::encoding::Depth,
20947 ) -> fidl::Result<()> {
20948 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects6Byte>(offset);
20949 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects6Byte, D>::encode(
20951 (
20952 <fidl::encoding::Boxed<Struct6Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20953 &self.first,
20954 ),
20955 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
20956 &self.second,
20957 ),
20958 ),
20959 encoder,
20960 offset,
20961 _depth,
20962 )
20963 }
20964 }
20965 unsafe impl<
20966 D: fidl::encoding::ResourceDialect,
20967 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct6Byte>, D>,
20968 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
20969 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects6Byte, D> for (T0, T1)
20970 {
20971 #[inline]
20972 unsafe fn encode(
20973 self,
20974 encoder: &mut fidl::encoding::Encoder<'_, D>,
20975 offset: usize,
20976 depth: fidl::encoding::Depth,
20977 ) -> fidl::Result<()> {
20978 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects6Byte>(offset);
20979 self.0.encode(encoder, offset + 0, depth)?;
20983 self.1.encode(encoder, offset + 8, depth)?;
20984 Ok(())
20985 }
20986 }
20987
20988 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
20989 for PaddingInBetweenOutOfLineObjects6Byte
20990 {
20991 #[inline(always)]
20992 fn new_empty() -> Self {
20993 Self {
20994 first: fidl::new_empty!(fidl::encoding::Boxed<Struct6Byte>, D),
20995 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
20996 }
20997 }
20998
20999 #[inline]
21000 unsafe fn decode(
21001 &mut self,
21002 decoder: &mut fidl::encoding::Decoder<'_, D>,
21003 offset: usize,
21004 _depth: fidl::encoding::Depth,
21005 ) -> fidl::Result<()> {
21006 decoder.debug_check_bounds::<Self>(offset);
21007 fidl::decode!(
21009 fidl::encoding::Boxed<Struct6Byte>,
21010 D,
21011 &mut self.first,
21012 decoder,
21013 offset + 0,
21014 _depth
21015 )?;
21016 fidl::decode!(
21017 fidl::encoding::Boxed<Struct8Byte>,
21018 D,
21019 &mut self.second,
21020 decoder,
21021 offset + 8,
21022 _depth
21023 )?;
21024 Ok(())
21025 }
21026 }
21027
21028 impl fidl::encoding::ValueTypeMarker for PaddingInBetweenOutOfLineObjects7Byte {
21029 type Borrowed<'a> = &'a Self;
21030 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21031 value
21032 }
21033 }
21034
21035 unsafe impl fidl::encoding::TypeMarker for PaddingInBetweenOutOfLineObjects7Byte {
21036 type Owned = Self;
21037
21038 #[inline(always)]
21039 fn inline_align(_context: fidl::encoding::Context) -> usize {
21040 8
21041 }
21042
21043 #[inline(always)]
21044 fn inline_size(_context: fidl::encoding::Context) -> usize {
21045 16
21046 }
21047 }
21048
21049 unsafe impl<D: fidl::encoding::ResourceDialect>
21050 fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects7Byte, D>
21051 for &PaddingInBetweenOutOfLineObjects7Byte
21052 {
21053 #[inline]
21054 unsafe fn encode(
21055 self,
21056 encoder: &mut fidl::encoding::Encoder<'_, D>,
21057 offset: usize,
21058 _depth: fidl::encoding::Depth,
21059 ) -> fidl::Result<()> {
21060 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects7Byte>(offset);
21061 fidl::encoding::Encode::<PaddingInBetweenOutOfLineObjects7Byte, D>::encode(
21063 (
21064 <fidl::encoding::Boxed<Struct7Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21065 &self.first,
21066 ),
21067 <fidl::encoding::Boxed<Struct8Byte> as fidl::encoding::ValueTypeMarker>::borrow(
21068 &self.second,
21069 ),
21070 ),
21071 encoder,
21072 offset,
21073 _depth,
21074 )
21075 }
21076 }
21077 unsafe impl<
21078 D: fidl::encoding::ResourceDialect,
21079 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Struct7Byte>, D>,
21080 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Struct8Byte>, D>,
21081 > fidl::encoding::Encode<PaddingInBetweenOutOfLineObjects7Byte, D> for (T0, T1)
21082 {
21083 #[inline]
21084 unsafe fn encode(
21085 self,
21086 encoder: &mut fidl::encoding::Encoder<'_, D>,
21087 offset: usize,
21088 depth: fidl::encoding::Depth,
21089 ) -> fidl::Result<()> {
21090 encoder.debug_check_bounds::<PaddingInBetweenOutOfLineObjects7Byte>(offset);
21091 self.0.encode(encoder, offset + 0, depth)?;
21095 self.1.encode(encoder, offset + 8, depth)?;
21096 Ok(())
21097 }
21098 }
21099
21100 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21101 for PaddingInBetweenOutOfLineObjects7Byte
21102 {
21103 #[inline(always)]
21104 fn new_empty() -> Self {
21105 Self {
21106 first: fidl::new_empty!(fidl::encoding::Boxed<Struct7Byte>, D),
21107 second: fidl::new_empty!(fidl::encoding::Boxed<Struct8Byte>, D),
21108 }
21109 }
21110
21111 #[inline]
21112 unsafe fn decode(
21113 &mut self,
21114 decoder: &mut fidl::encoding::Decoder<'_, D>,
21115 offset: usize,
21116 _depth: fidl::encoding::Depth,
21117 ) -> fidl::Result<()> {
21118 decoder.debug_check_bounds::<Self>(offset);
21119 fidl::decode!(
21121 fidl::encoding::Boxed<Struct7Byte>,
21122 D,
21123 &mut self.first,
21124 decoder,
21125 offset + 0,
21126 _depth
21127 )?;
21128 fidl::decode!(
21129 fidl::encoding::Boxed<Struct8Byte>,
21130 D,
21131 &mut self.second,
21132 decoder,
21133 offset + 8,
21134 _depth
21135 )?;
21136 Ok(())
21137 }
21138 }
21139
21140 impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStruct {
21141 type Borrowed<'a> = &'a Self;
21142 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21143 value
21144 }
21145 }
21146
21147 unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStruct {
21148 type Owned = Self;
21149
21150 #[inline(always)]
21151 fn inline_align(_context: fidl::encoding::Context) -> usize {
21152 8
21153 }
21154
21155 #[inline(always)]
21156 fn inline_size(_context: fidl::encoding::Context) -> usize {
21157 8
21158 }
21159 }
21160
21161 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveEmptyStruct, D>
21162 for &RecursiveEmptyStruct
21163 {
21164 #[inline]
21165 unsafe fn encode(
21166 self,
21167 encoder: &mut fidl::encoding::Encoder<'_, D>,
21168 offset: usize,
21169 _depth: fidl::encoding::Depth,
21170 ) -> fidl::Result<()> {
21171 encoder.debug_check_bounds::<RecursiveEmptyStruct>(offset);
21172 fidl::encoding::Encode::<RecursiveEmptyStruct, D>::encode(
21174 (
21175 <fidl::encoding::Boxed<RecursiveEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21176 ),
21177 encoder, offset, _depth
21178 )
21179 }
21180 }
21181 unsafe impl<
21182 D: fidl::encoding::ResourceDialect,
21183 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveEmptyStruct>, D>,
21184 > fidl::encoding::Encode<RecursiveEmptyStruct, D> for (T0,)
21185 {
21186 #[inline]
21187 unsafe fn encode(
21188 self,
21189 encoder: &mut fidl::encoding::Encoder<'_, D>,
21190 offset: usize,
21191 depth: fidl::encoding::Depth,
21192 ) -> fidl::Result<()> {
21193 encoder.debug_check_bounds::<RecursiveEmptyStruct>(offset);
21194 self.0.encode(encoder, offset + 0, depth)?;
21198 Ok(())
21199 }
21200 }
21201
21202 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveEmptyStruct {
21203 #[inline(always)]
21204 fn new_empty() -> Self {
21205 Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveEmptyStruct>, D) }
21206 }
21207
21208 #[inline]
21209 unsafe fn decode(
21210 &mut self,
21211 decoder: &mut fidl::encoding::Decoder<'_, D>,
21212 offset: usize,
21213 _depth: fidl::encoding::Depth,
21214 ) -> fidl::Result<()> {
21215 decoder.debug_check_bounds::<Self>(offset);
21216 fidl::decode!(
21218 fidl::encoding::Boxed<RecursiveEmptyStruct>,
21219 D,
21220 &mut self.inner,
21221 decoder,
21222 offset + 0,
21223 _depth
21224 )?;
21225 Ok(())
21226 }
21227 }
21228
21229 impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStructArrayWrapper {
21230 type Borrowed<'a> = &'a Self;
21231 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21232 value
21233 }
21234 }
21235
21236 unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStructArrayWrapper {
21237 type Owned = Self;
21238
21239 #[inline(always)]
21240 fn inline_align(_context: fidl::encoding::Context) -> usize {
21241 8
21242 }
21243
21244 #[inline(always)]
21245 fn inline_size(_context: fidl::encoding::Context) -> usize {
21246 8
21247 }
21248 }
21249
21250 unsafe impl<D: fidl::encoding::ResourceDialect>
21251 fidl::encoding::Encode<RecursiveEmptyStructArrayWrapper, D>
21252 for &RecursiveEmptyStructArrayWrapper
21253 {
21254 #[inline]
21255 unsafe fn encode(
21256 self,
21257 encoder: &mut fidl::encoding::Encoder<'_, D>,
21258 offset: usize,
21259 _depth: fidl::encoding::Depth,
21260 ) -> fidl::Result<()> {
21261 encoder.debug_check_bounds::<RecursiveEmptyStructArrayWrapper>(offset);
21262 fidl::encoding::Encode::<RecursiveEmptyStructArrayWrapper, D>::encode(
21264 (
21265 <fidl::encoding::Array<RecursiveEmptyStruct, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr),
21266 ),
21267 encoder, offset, _depth
21268 )
21269 }
21270 }
21271 unsafe impl<
21272 D: fidl::encoding::ResourceDialect,
21273 T0: fidl::encoding::Encode<fidl::encoding::Array<RecursiveEmptyStruct, 1>, D>,
21274 > fidl::encoding::Encode<RecursiveEmptyStructArrayWrapper, D> for (T0,)
21275 {
21276 #[inline]
21277 unsafe fn encode(
21278 self,
21279 encoder: &mut fidl::encoding::Encoder<'_, D>,
21280 offset: usize,
21281 depth: fidl::encoding::Depth,
21282 ) -> fidl::Result<()> {
21283 encoder.debug_check_bounds::<RecursiveEmptyStructArrayWrapper>(offset);
21284 self.0.encode(encoder, offset + 0, depth)?;
21288 Ok(())
21289 }
21290 }
21291
21292 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21293 for RecursiveEmptyStructArrayWrapper
21294 {
21295 #[inline(always)]
21296 fn new_empty() -> Self {
21297 Self { arr: fidl::new_empty!(fidl::encoding::Array<RecursiveEmptyStruct, 1>, D) }
21298 }
21299
21300 #[inline]
21301 unsafe fn decode(
21302 &mut self,
21303 decoder: &mut fidl::encoding::Decoder<'_, D>,
21304 offset: usize,
21305 _depth: fidl::encoding::Depth,
21306 ) -> fidl::Result<()> {
21307 decoder.debug_check_bounds::<Self>(offset);
21308 fidl::decode!(fidl::encoding::Array<RecursiveEmptyStruct, 1>, D, &mut self.arr, decoder, offset + 0, _depth)?;
21310 Ok(())
21311 }
21312 }
21313
21314 impl fidl::encoding::ValueTypeMarker for RecursiveEmptyStructVectorWrapper {
21315 type Borrowed<'a> = &'a Self;
21316 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21317 value
21318 }
21319 }
21320
21321 unsafe impl fidl::encoding::TypeMarker for RecursiveEmptyStructVectorWrapper {
21322 type Owned = Self;
21323
21324 #[inline(always)]
21325 fn inline_align(_context: fidl::encoding::Context) -> usize {
21326 8
21327 }
21328
21329 #[inline(always)]
21330 fn inline_size(_context: fidl::encoding::Context) -> usize {
21331 16
21332 }
21333 }
21334
21335 unsafe impl<D: fidl::encoding::ResourceDialect>
21336 fidl::encoding::Encode<RecursiveEmptyStructVectorWrapper, D>
21337 for &RecursiveEmptyStructVectorWrapper
21338 {
21339 #[inline]
21340 unsafe fn encode(
21341 self,
21342 encoder: &mut fidl::encoding::Encoder<'_, D>,
21343 offset: usize,
21344 _depth: fidl::encoding::Depth,
21345 ) -> fidl::Result<()> {
21346 encoder.debug_check_bounds::<RecursiveEmptyStructVectorWrapper>(offset);
21347 fidl::encoding::Encode::<RecursiveEmptyStructVectorWrapper, D>::encode(
21349 (
21350 <fidl::encoding::UnboundedVector<RecursiveEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
21351 ),
21352 encoder, offset, _depth
21353 )
21354 }
21355 }
21356 unsafe impl<
21357 D: fidl::encoding::ResourceDialect,
21358 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RecursiveEmptyStruct>, D>,
21359 > fidl::encoding::Encode<RecursiveEmptyStructVectorWrapper, D> for (T0,)
21360 {
21361 #[inline]
21362 unsafe fn encode(
21363 self,
21364 encoder: &mut fidl::encoding::Encoder<'_, D>,
21365 offset: usize,
21366 depth: fidl::encoding::Depth,
21367 ) -> fidl::Result<()> {
21368 encoder.debug_check_bounds::<RecursiveEmptyStructVectorWrapper>(offset);
21369 self.0.encode(encoder, offset + 0, depth)?;
21373 Ok(())
21374 }
21375 }
21376
21377 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21378 for RecursiveEmptyStructVectorWrapper
21379 {
21380 #[inline(always)]
21381 fn new_empty() -> Self {
21382 Self { vec: fidl::new_empty!(fidl::encoding::UnboundedVector<RecursiveEmptyStruct>, D) }
21383 }
21384
21385 #[inline]
21386 unsafe fn decode(
21387 &mut self,
21388 decoder: &mut fidl::encoding::Decoder<'_, D>,
21389 offset: usize,
21390 _depth: fidl::encoding::Depth,
21391 ) -> fidl::Result<()> {
21392 decoder.debug_check_bounds::<Self>(offset);
21393 fidl::decode!(
21395 fidl::encoding::UnboundedVector<RecursiveEmptyStruct>,
21396 D,
21397 &mut self.vec,
21398 decoder,
21399 offset + 0,
21400 _depth
21401 )?;
21402 Ok(())
21403 }
21404 }
21405
21406 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndTableStruct {
21407 type Borrowed<'a> = &'a Self;
21408 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21409 value
21410 }
21411 }
21412
21413 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndTableStruct {
21414 type Owned = Self;
21415
21416 #[inline(always)]
21417 fn inline_align(_context: fidl::encoding::Context) -> usize {
21418 8
21419 }
21420
21421 #[inline(always)]
21422 fn inline_size(_context: fidl::encoding::Context) -> usize {
21423 16
21424 }
21425 }
21426
21427 unsafe impl<D: fidl::encoding::ResourceDialect>
21428 fidl::encoding::Encode<RecursiveOptionalAndTableStruct, D>
21429 for &RecursiveOptionalAndTableStruct
21430 {
21431 #[inline]
21432 unsafe fn encode(
21433 self,
21434 encoder: &mut fidl::encoding::Encoder<'_, D>,
21435 offset: usize,
21436 _depth: fidl::encoding::Depth,
21437 ) -> fidl::Result<()> {
21438 encoder.debug_check_bounds::<RecursiveOptionalAndTableStruct>(offset);
21439 fidl::encoding::Encode::<RecursiveOptionalAndTableStruct, D>::encode(
21441 (<RecursiveOptionalAndTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
21442 encoder,
21443 offset,
21444 _depth,
21445 )
21446 }
21447 }
21448 unsafe impl<
21449 D: fidl::encoding::ResourceDialect,
21450 T0: fidl::encoding::Encode<RecursiveOptionalAndTable, D>,
21451 > fidl::encoding::Encode<RecursiveOptionalAndTableStruct, D> for (T0,)
21452 {
21453 #[inline]
21454 unsafe fn encode(
21455 self,
21456 encoder: &mut fidl::encoding::Encoder<'_, D>,
21457 offset: usize,
21458 depth: fidl::encoding::Depth,
21459 ) -> fidl::Result<()> {
21460 encoder.debug_check_bounds::<RecursiveOptionalAndTableStruct>(offset);
21461 self.0.encode(encoder, offset + 0, depth)?;
21465 Ok(())
21466 }
21467 }
21468
21469 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21470 for RecursiveOptionalAndTableStruct
21471 {
21472 #[inline(always)]
21473 fn new_empty() -> Self {
21474 Self { t: fidl::new_empty!(RecursiveOptionalAndTable, D) }
21475 }
21476
21477 #[inline]
21478 unsafe fn decode(
21479 &mut self,
21480 decoder: &mut fidl::encoding::Decoder<'_, D>,
21481 offset: usize,
21482 _depth: fidl::encoding::Depth,
21483 ) -> fidl::Result<()> {
21484 decoder.debug_check_bounds::<Self>(offset);
21485 fidl::decode!(RecursiveOptionalAndTable, D, &mut self.t, decoder, offset + 0, _depth)?;
21487 Ok(())
21488 }
21489 }
21490
21491 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndUnionStruct {
21492 type Borrowed<'a> = &'a Self;
21493 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21494 value
21495 }
21496 }
21497
21498 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndUnionStruct {
21499 type Owned = Self;
21500
21501 #[inline(always)]
21502 fn inline_align(_context: fidl::encoding::Context) -> usize {
21503 8
21504 }
21505
21506 #[inline(always)]
21507 fn inline_size(_context: fidl::encoding::Context) -> usize {
21508 16
21509 }
21510 }
21511
21512 unsafe impl<D: fidl::encoding::ResourceDialect>
21513 fidl::encoding::Encode<RecursiveOptionalAndUnionStruct, D>
21514 for &RecursiveOptionalAndUnionStruct
21515 {
21516 #[inline]
21517 unsafe fn encode(
21518 self,
21519 encoder: &mut fidl::encoding::Encoder<'_, D>,
21520 offset: usize,
21521 _depth: fidl::encoding::Depth,
21522 ) -> fidl::Result<()> {
21523 encoder.debug_check_bounds::<RecursiveOptionalAndUnionStruct>(offset);
21524 fidl::encoding::Encode::<RecursiveOptionalAndUnionStruct, D>::encode(
21526 (<RecursiveOptionalAndUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
21527 encoder,
21528 offset,
21529 _depth,
21530 )
21531 }
21532 }
21533 unsafe impl<
21534 D: fidl::encoding::ResourceDialect,
21535 T0: fidl::encoding::Encode<RecursiveOptionalAndUnion, D>,
21536 > fidl::encoding::Encode<RecursiveOptionalAndUnionStruct, D> for (T0,)
21537 {
21538 #[inline]
21539 unsafe fn encode(
21540 self,
21541 encoder: &mut fidl::encoding::Encoder<'_, D>,
21542 offset: usize,
21543 depth: fidl::encoding::Depth,
21544 ) -> fidl::Result<()> {
21545 encoder.debug_check_bounds::<RecursiveOptionalAndUnionStruct>(offset);
21546 self.0.encode(encoder, offset + 0, depth)?;
21550 Ok(())
21551 }
21552 }
21553
21554 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21555 for RecursiveOptionalAndUnionStruct
21556 {
21557 #[inline(always)]
21558 fn new_empty() -> Self {
21559 Self { u: fidl::new_empty!(RecursiveOptionalAndUnion, D) }
21560 }
21561
21562 #[inline]
21563 unsafe fn decode(
21564 &mut self,
21565 decoder: &mut fidl::encoding::Decoder<'_, D>,
21566 offset: usize,
21567 _depth: fidl::encoding::Depth,
21568 ) -> fidl::Result<()> {
21569 decoder.debug_check_bounds::<Self>(offset);
21570 fidl::decode!(RecursiveOptionalAndUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
21572 Ok(())
21573 }
21574 }
21575
21576 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndVectorStruct {
21577 type Borrowed<'a> = &'a Self;
21578 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21579 value
21580 }
21581 }
21582
21583 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndVectorStruct {
21584 type Owned = Self;
21585
21586 #[inline(always)]
21587 fn inline_align(_context: fidl::encoding::Context) -> usize {
21588 8
21589 }
21590
21591 #[inline(always)]
21592 fn inline_size(_context: fidl::encoding::Context) -> usize {
21593 16
21594 }
21595 }
21596
21597 unsafe impl<D: fidl::encoding::ResourceDialect>
21598 fidl::encoding::Encode<RecursiveOptionalAndVectorStruct, D>
21599 for &RecursiveOptionalAndVectorStruct
21600 {
21601 #[inline]
21602 unsafe fn encode(
21603 self,
21604 encoder: &mut fidl::encoding::Encoder<'_, D>,
21605 offset: usize,
21606 _depth: fidl::encoding::Depth,
21607 ) -> fidl::Result<()> {
21608 encoder.debug_check_bounds::<RecursiveOptionalAndVectorStruct>(offset);
21609 fidl::encoding::Encode::<RecursiveOptionalAndVectorStruct, D>::encode(
21611 (
21612 <fidl::encoding::UnboundedVector<RecursiveOptionalStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
21613 ),
21614 encoder, offset, _depth
21615 )
21616 }
21617 }
21618 unsafe impl<
21619 D: fidl::encoding::ResourceDialect,
21620 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RecursiveOptionalStruct>, D>,
21621 > fidl::encoding::Encode<RecursiveOptionalAndVectorStruct, D> for (T0,)
21622 {
21623 #[inline]
21624 unsafe fn encode(
21625 self,
21626 encoder: &mut fidl::encoding::Encoder<'_, D>,
21627 offset: usize,
21628 depth: fidl::encoding::Depth,
21629 ) -> fidl::Result<()> {
21630 encoder.debug_check_bounds::<RecursiveOptionalAndVectorStruct>(offset);
21631 self.0.encode(encoder, offset + 0, depth)?;
21635 Ok(())
21636 }
21637 }
21638
21639 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21640 for RecursiveOptionalAndVectorStruct
21641 {
21642 #[inline(always)]
21643 fn new_empty() -> Self {
21644 Self {
21645 vec: fidl::new_empty!(fidl::encoding::UnboundedVector<RecursiveOptionalStruct>, D),
21646 }
21647 }
21648
21649 #[inline]
21650 unsafe fn decode(
21651 &mut self,
21652 decoder: &mut fidl::encoding::Decoder<'_, D>,
21653 offset: usize,
21654 _depth: fidl::encoding::Depth,
21655 ) -> fidl::Result<()> {
21656 decoder.debug_check_bounds::<Self>(offset);
21657 fidl::decode!(
21659 fidl::encoding::UnboundedVector<RecursiveOptionalStruct>,
21660 D,
21661 &mut self.vec,
21662 decoder,
21663 offset + 0,
21664 _depth
21665 )?;
21666 Ok(())
21667 }
21668 }
21669
21670 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalBasicStruct {
21671 type Borrowed<'a> = &'a Self;
21672 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21673 value
21674 }
21675 }
21676
21677 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalBasicStruct {
21678 type Owned = Self;
21679
21680 #[inline(always)]
21681 fn inline_align(_context: fidl::encoding::Context) -> usize {
21682 8
21683 }
21684
21685 #[inline(always)]
21686 fn inline_size(_context: fidl::encoding::Context) -> usize {
21687 8
21688 }
21689 }
21690
21691 unsafe impl<D: fidl::encoding::ResourceDialect>
21692 fidl::encoding::Encode<RecursiveOptionalBasicStruct, D> for &RecursiveOptionalBasicStruct
21693 {
21694 #[inline]
21695 unsafe fn encode(
21696 self,
21697 encoder: &mut fidl::encoding::Encoder<'_, D>,
21698 offset: usize,
21699 _depth: fidl::encoding::Depth,
21700 ) -> fidl::Result<()> {
21701 encoder.debug_check_bounds::<RecursiveOptionalBasicStruct>(offset);
21702 fidl::encoding::Encode::<RecursiveOptionalBasicStruct, D>::encode(
21704 (
21705 <fidl::encoding::Boxed<RecursiveOptionalBasicStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21706 ),
21707 encoder, offset, _depth
21708 )
21709 }
21710 }
21711 unsafe impl<
21712 D: fidl::encoding::ResourceDialect,
21713 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalBasicStruct>, D>,
21714 > fidl::encoding::Encode<RecursiveOptionalBasicStruct, D> for (T0,)
21715 {
21716 #[inline]
21717 unsafe fn encode(
21718 self,
21719 encoder: &mut fidl::encoding::Encoder<'_, D>,
21720 offset: usize,
21721 depth: fidl::encoding::Depth,
21722 ) -> fidl::Result<()> {
21723 encoder.debug_check_bounds::<RecursiveOptionalBasicStruct>(offset);
21724 self.0.encode(encoder, offset + 0, depth)?;
21728 Ok(())
21729 }
21730 }
21731
21732 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21733 for RecursiveOptionalBasicStruct
21734 {
21735 #[inline(always)]
21736 fn new_empty() -> Self {
21737 Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveOptionalBasicStruct>, D) }
21738 }
21739
21740 #[inline]
21741 unsafe fn decode(
21742 &mut self,
21743 decoder: &mut fidl::encoding::Decoder<'_, D>,
21744 offset: usize,
21745 _depth: fidl::encoding::Depth,
21746 ) -> fidl::Result<()> {
21747 decoder.debug_check_bounds::<Self>(offset);
21748 fidl::decode!(
21750 fidl::encoding::Boxed<RecursiveOptionalBasicStruct>,
21751 D,
21752 &mut self.inner,
21753 decoder,
21754 offset + 0,
21755 _depth
21756 )?;
21757 Ok(())
21758 }
21759 }
21760
21761 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStruct {
21762 type Borrowed<'a> = &'a Self;
21763 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21764 value
21765 }
21766 }
21767
21768 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStruct {
21769 type Owned = Self;
21770
21771 #[inline(always)]
21772 fn inline_align(_context: fidl::encoding::Context) -> usize {
21773 8
21774 }
21775
21776 #[inline(always)]
21777 fn inline_size(_context: fidl::encoding::Context) -> usize {
21778 8
21779 }
21780 }
21781
21782 unsafe impl<D: fidl::encoding::ResourceDialect>
21783 fidl::encoding::Encode<RecursiveOptionalStruct, D> for &RecursiveOptionalStruct
21784 {
21785 #[inline]
21786 unsafe fn encode(
21787 self,
21788 encoder: &mut fidl::encoding::Encoder<'_, D>,
21789 offset: usize,
21790 _depth: fidl::encoding::Depth,
21791 ) -> fidl::Result<()> {
21792 encoder.debug_check_bounds::<RecursiveOptionalStruct>(offset);
21793 fidl::encoding::Encode::<RecursiveOptionalStruct, D>::encode(
21795 (
21796 <fidl::encoding::Boxed<RecursiveOptionalStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21797 ),
21798 encoder, offset, _depth
21799 )
21800 }
21801 }
21802 unsafe impl<
21803 D: fidl::encoding::ResourceDialect,
21804 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalStruct>, D>,
21805 > fidl::encoding::Encode<RecursiveOptionalStruct, D> for (T0,)
21806 {
21807 #[inline]
21808 unsafe fn encode(
21809 self,
21810 encoder: &mut fidl::encoding::Encoder<'_, D>,
21811 offset: usize,
21812 depth: fidl::encoding::Depth,
21813 ) -> fidl::Result<()> {
21814 encoder.debug_check_bounds::<RecursiveOptionalStruct>(offset);
21815 self.0.encode(encoder, offset + 0, depth)?;
21819 Ok(())
21820 }
21821 }
21822
21823 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21824 for RecursiveOptionalStruct
21825 {
21826 #[inline(always)]
21827 fn new_empty() -> Self {
21828 Self { inner: fidl::new_empty!(fidl::encoding::Boxed<RecursiveOptionalStruct>, D) }
21829 }
21830
21831 #[inline]
21832 unsafe fn decode(
21833 &mut self,
21834 decoder: &mut fidl::encoding::Decoder<'_, D>,
21835 offset: usize,
21836 _depth: fidl::encoding::Depth,
21837 ) -> fidl::Result<()> {
21838 decoder.debug_check_bounds::<Self>(offset);
21839 fidl::decode!(
21841 fidl::encoding::Boxed<RecursiveOptionalStruct>,
21842 D,
21843 &mut self.inner,
21844 decoder,
21845 offset + 0,
21846 _depth
21847 )?;
21848 Ok(())
21849 }
21850 }
21851
21852 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStructArrayWrapper {
21853 type Borrowed<'a> = &'a Self;
21854 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21855 value
21856 }
21857 }
21858
21859 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStructArrayWrapper {
21860 type Owned = Self;
21861
21862 #[inline(always)]
21863 fn inline_align(_context: fidl::encoding::Context) -> usize {
21864 8
21865 }
21866
21867 #[inline(always)]
21868 fn inline_size(_context: fidl::encoding::Context) -> usize {
21869 8
21870 }
21871 }
21872
21873 unsafe impl<D: fidl::encoding::ResourceDialect>
21874 fidl::encoding::Encode<RecursiveOptionalStructArrayWrapper, D>
21875 for &RecursiveOptionalStructArrayWrapper
21876 {
21877 #[inline]
21878 unsafe fn encode(
21879 self,
21880 encoder: &mut fidl::encoding::Encoder<'_, D>,
21881 offset: usize,
21882 _depth: fidl::encoding::Depth,
21883 ) -> fidl::Result<()> {
21884 encoder.debug_check_bounds::<RecursiveOptionalStructArrayWrapper>(offset);
21885 fidl::encoding::Encode::<RecursiveOptionalStructArrayWrapper, D>::encode(
21887 (
21888 <fidl::encoding::Array<RecursiveOptionalStruct, 1> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr),
21889 ),
21890 encoder, offset, _depth
21891 )
21892 }
21893 }
21894 unsafe impl<
21895 D: fidl::encoding::ResourceDialect,
21896 T0: fidl::encoding::Encode<fidl::encoding::Array<RecursiveOptionalStruct, 1>, D>,
21897 > fidl::encoding::Encode<RecursiveOptionalStructArrayWrapper, D> for (T0,)
21898 {
21899 #[inline]
21900 unsafe fn encode(
21901 self,
21902 encoder: &mut fidl::encoding::Encoder<'_, D>,
21903 offset: usize,
21904 depth: fidl::encoding::Depth,
21905 ) -> fidl::Result<()> {
21906 encoder.debug_check_bounds::<RecursiveOptionalStructArrayWrapper>(offset);
21907 self.0.encode(encoder, offset + 0, depth)?;
21911 Ok(())
21912 }
21913 }
21914
21915 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
21916 for RecursiveOptionalStructArrayWrapper
21917 {
21918 #[inline(always)]
21919 fn new_empty() -> Self {
21920 Self { arr: fidl::new_empty!(fidl::encoding::Array<RecursiveOptionalStruct, 1>, D) }
21921 }
21922
21923 #[inline]
21924 unsafe fn decode(
21925 &mut self,
21926 decoder: &mut fidl::encoding::Decoder<'_, D>,
21927 offset: usize,
21928 _depth: fidl::encoding::Depth,
21929 ) -> fidl::Result<()> {
21930 decoder.debug_check_bounds::<Self>(offset);
21931 fidl::decode!(fidl::encoding::Array<RecursiveOptionalStruct, 1>, D, &mut self.arr, decoder, offset + 0, _depth)?;
21933 Ok(())
21934 }
21935 }
21936
21937 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalStructWithString {
21938 type Borrowed<'a> = &'a Self;
21939 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
21940 value
21941 }
21942 }
21943
21944 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalStructWithString {
21945 type Owned = Self;
21946
21947 #[inline(always)]
21948 fn inline_align(_context: fidl::encoding::Context) -> usize {
21949 8
21950 }
21951
21952 #[inline(always)]
21953 fn inline_size(_context: fidl::encoding::Context) -> usize {
21954 24
21955 }
21956 }
21957
21958 unsafe impl<D: fidl::encoding::ResourceDialect>
21959 fidl::encoding::Encode<RecursiveOptionalStructWithString, D>
21960 for &RecursiveOptionalStructWithString
21961 {
21962 #[inline]
21963 unsafe fn encode(
21964 self,
21965 encoder: &mut fidl::encoding::Encoder<'_, D>,
21966 offset: usize,
21967 _depth: fidl::encoding::Depth,
21968 ) -> fidl::Result<()> {
21969 encoder.debug_check_bounds::<RecursiveOptionalStructWithString>(offset);
21970 fidl::encoding::Encode::<RecursiveOptionalStructWithString, D>::encode(
21972 (
21973 <fidl::encoding::Boxed<RecursiveOptionalStructWithString> as fidl::encoding::ValueTypeMarker>::borrow(&self.inner),
21974 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.str),
21975 ),
21976 encoder, offset, _depth
21977 )
21978 }
21979 }
21980 unsafe impl<
21981 D: fidl::encoding::ResourceDialect,
21982 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveOptionalStructWithString>, D>,
21983 T1: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
21984 > fidl::encoding::Encode<RecursiveOptionalStructWithString, D> for (T0, T1)
21985 {
21986 #[inline]
21987 unsafe fn encode(
21988 self,
21989 encoder: &mut fidl::encoding::Encoder<'_, D>,
21990 offset: usize,
21991 depth: fidl::encoding::Depth,
21992 ) -> fidl::Result<()> {
21993 encoder.debug_check_bounds::<RecursiveOptionalStructWithString>(offset);
21994 self.0.encode(encoder, offset + 0, depth)?;
21998 self.1.encode(encoder, offset + 8, depth)?;
21999 Ok(())
22000 }
22001 }
22002
22003 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22004 for RecursiveOptionalStructWithString
22005 {
22006 #[inline(always)]
22007 fn new_empty() -> Self {
22008 Self {
22009 inner: fidl::new_empty!(
22010 fidl::encoding::Boxed<RecursiveOptionalStructWithString>,
22011 D
22012 ),
22013 str: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
22014 }
22015 }
22016
22017 #[inline]
22018 unsafe fn decode(
22019 &mut self,
22020 decoder: &mut fidl::encoding::Decoder<'_, D>,
22021 offset: usize,
22022 _depth: fidl::encoding::Depth,
22023 ) -> fidl::Result<()> {
22024 decoder.debug_check_bounds::<Self>(offset);
22025 fidl::decode!(
22027 fidl::encoding::Boxed<RecursiveOptionalStructWithString>,
22028 D,
22029 &mut self.inner,
22030 decoder,
22031 offset + 0,
22032 _depth
22033 )?;
22034 fidl::decode!(
22035 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
22036 D,
22037 &mut self.str,
22038 decoder,
22039 offset + 8,
22040 _depth
22041 )?;
22042 Ok(())
22043 }
22044 }
22045
22046 impl fidl::encoding::ValueTypeMarker for RecursiveTableHolder {
22047 type Borrowed<'a> = &'a Self;
22048 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22049 value
22050 }
22051 }
22052
22053 unsafe impl fidl::encoding::TypeMarker for RecursiveTableHolder {
22054 type Owned = Self;
22055
22056 #[inline(always)]
22057 fn inline_align(_context: fidl::encoding::Context) -> usize {
22058 8
22059 }
22060
22061 #[inline(always)]
22062 fn inline_size(_context: fidl::encoding::Context) -> usize {
22063 16
22064 }
22065 }
22066
22067 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveTableHolder, D>
22068 for &RecursiveTableHolder
22069 {
22070 #[inline]
22071 unsafe fn encode(
22072 self,
22073 encoder: &mut fidl::encoding::Encoder<'_, D>,
22074 offset: usize,
22075 _depth: fidl::encoding::Depth,
22076 ) -> fidl::Result<()> {
22077 encoder.debug_check_bounds::<RecursiveTableHolder>(offset);
22078 fidl::encoding::Encode::<RecursiveTableHolder, D>::encode(
22080 (<RecursiveTable as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
22081 encoder,
22082 offset,
22083 _depth,
22084 )
22085 }
22086 }
22087 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RecursiveTable, D>>
22088 fidl::encoding::Encode<RecursiveTableHolder, D> for (T0,)
22089 {
22090 #[inline]
22091 unsafe fn encode(
22092 self,
22093 encoder: &mut fidl::encoding::Encoder<'_, D>,
22094 offset: usize,
22095 depth: fidl::encoding::Depth,
22096 ) -> fidl::Result<()> {
22097 encoder.debug_check_bounds::<RecursiveTableHolder>(offset);
22098 self.0.encode(encoder, offset + 0, depth)?;
22102 Ok(())
22103 }
22104 }
22105
22106 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveTableHolder {
22107 #[inline(always)]
22108 fn new_empty() -> Self {
22109 Self { t: fidl::new_empty!(RecursiveTable, D) }
22110 }
22111
22112 #[inline]
22113 unsafe fn decode(
22114 &mut self,
22115 decoder: &mut fidl::encoding::Decoder<'_, D>,
22116 offset: usize,
22117 _depth: fidl::encoding::Depth,
22118 ) -> fidl::Result<()> {
22119 decoder.debug_check_bounds::<Self>(offset);
22120 fidl::decode!(RecursiveTable, D, &mut self.t, decoder, offset + 0, _depth)?;
22122 Ok(())
22123 }
22124 }
22125
22126 impl fidl::encoding::ValueTypeMarker for RecursiveTableOptionalHolder {
22127 type Borrowed<'a> = &'a Self;
22128 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22129 value
22130 }
22131 }
22132
22133 unsafe impl fidl::encoding::TypeMarker for RecursiveTableOptionalHolder {
22134 type Owned = Self;
22135
22136 #[inline(always)]
22137 fn inline_align(_context: fidl::encoding::Context) -> usize {
22138 8
22139 }
22140
22141 #[inline(always)]
22142 fn inline_size(_context: fidl::encoding::Context) -> usize {
22143 8
22144 }
22145 }
22146
22147 unsafe impl<D: fidl::encoding::ResourceDialect>
22148 fidl::encoding::Encode<RecursiveTableOptionalHolder, D> for &RecursiveTableOptionalHolder
22149 {
22150 #[inline]
22151 unsafe fn encode(
22152 self,
22153 encoder: &mut fidl::encoding::Encoder<'_, D>,
22154 offset: usize,
22155 _depth: fidl::encoding::Depth,
22156 ) -> fidl::Result<()> {
22157 encoder.debug_check_bounds::<RecursiveTableOptionalHolder>(offset);
22158 fidl::encoding::Encode::<RecursiveTableOptionalHolder, D>::encode(
22160 (
22161 <fidl::encoding::Boxed<RecursiveTableHolder> as fidl::encoding::ValueTypeMarker>::borrow(&self.o),
22162 ),
22163 encoder, offset, _depth
22164 )
22165 }
22166 }
22167 unsafe impl<
22168 D: fidl::encoding::ResourceDialect,
22169 T0: fidl::encoding::Encode<fidl::encoding::Boxed<RecursiveTableHolder>, D>,
22170 > fidl::encoding::Encode<RecursiveTableOptionalHolder, D> for (T0,)
22171 {
22172 #[inline]
22173 unsafe fn encode(
22174 self,
22175 encoder: &mut fidl::encoding::Encoder<'_, D>,
22176 offset: usize,
22177 depth: fidl::encoding::Depth,
22178 ) -> fidl::Result<()> {
22179 encoder.debug_check_bounds::<RecursiveTableOptionalHolder>(offset);
22180 self.0.encode(encoder, offset + 0, depth)?;
22184 Ok(())
22185 }
22186 }
22187
22188 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22189 for RecursiveTableOptionalHolder
22190 {
22191 #[inline(always)]
22192 fn new_empty() -> Self {
22193 Self { o: fidl::new_empty!(fidl::encoding::Boxed<RecursiveTableHolder>, D) }
22194 }
22195
22196 #[inline]
22197 unsafe fn decode(
22198 &mut self,
22199 decoder: &mut fidl::encoding::Decoder<'_, D>,
22200 offset: usize,
22201 _depth: fidl::encoding::Depth,
22202 ) -> fidl::Result<()> {
22203 decoder.debug_check_bounds::<Self>(offset);
22204 fidl::decode!(
22206 fidl::encoding::Boxed<RecursiveTableHolder>,
22207 D,
22208 &mut self.o,
22209 decoder,
22210 offset + 0,
22211 _depth
22212 )?;
22213 Ok(())
22214 }
22215 }
22216
22217 impl fidl::encoding::ValueTypeMarker for RecursiveUnionStruct {
22218 type Borrowed<'a> = &'a Self;
22219 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22220 value
22221 }
22222 }
22223
22224 unsafe impl fidl::encoding::TypeMarker for RecursiveUnionStruct {
22225 type Owned = Self;
22226
22227 #[inline(always)]
22228 fn inline_align(_context: fidl::encoding::Context) -> usize {
22229 8
22230 }
22231
22232 #[inline(always)]
22233 fn inline_size(_context: fidl::encoding::Context) -> usize {
22234 16
22235 }
22236 }
22237
22238 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveUnionStruct, D>
22239 for &RecursiveUnionStruct
22240 {
22241 #[inline]
22242 unsafe fn encode(
22243 self,
22244 encoder: &mut fidl::encoding::Encoder<'_, D>,
22245 offset: usize,
22246 _depth: fidl::encoding::Depth,
22247 ) -> fidl::Result<()> {
22248 encoder.debug_check_bounds::<RecursiveUnionStruct>(offset);
22249 fidl::encoding::Encode::<RecursiveUnionStruct, D>::encode(
22251 (
22252 <fidl::encoding::OptionalUnion<RecursiveUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
22253 ),
22254 encoder, offset, _depth
22255 )
22256 }
22257 }
22258 unsafe impl<
22259 D: fidl::encoding::ResourceDialect,
22260 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<RecursiveUnion>, D>,
22261 > fidl::encoding::Encode<RecursiveUnionStruct, D> for (T0,)
22262 {
22263 #[inline]
22264 unsafe fn encode(
22265 self,
22266 encoder: &mut fidl::encoding::Encoder<'_, D>,
22267 offset: usize,
22268 depth: fidl::encoding::Depth,
22269 ) -> fidl::Result<()> {
22270 encoder.debug_check_bounds::<RecursiveUnionStruct>(offset);
22271 self.0.encode(encoder, offset + 0, depth)?;
22275 Ok(())
22276 }
22277 }
22278
22279 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveUnionStruct {
22280 #[inline(always)]
22281 fn new_empty() -> Self {
22282 Self { u: fidl::new_empty!(fidl::encoding::OptionalUnion<RecursiveUnion>, D) }
22283 }
22284
22285 #[inline]
22286 unsafe fn decode(
22287 &mut self,
22288 decoder: &mut fidl::encoding::Decoder<'_, D>,
22289 offset: usize,
22290 _depth: fidl::encoding::Depth,
22291 ) -> fidl::Result<()> {
22292 decoder.debug_check_bounds::<Self>(offset);
22293 fidl::decode!(
22295 fidl::encoding::OptionalUnion<RecursiveUnion>,
22296 D,
22297 &mut self.u,
22298 decoder,
22299 offset + 0,
22300 _depth
22301 )?;
22302 Ok(())
22303 }
22304 }
22305
22306 impl fidl::encoding::ValueTypeMarker for RecursiveVectorStruct {
22307 type Borrowed<'a> = &'a Self;
22308 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22309 value
22310 }
22311 }
22312
22313 unsafe impl fidl::encoding::TypeMarker for RecursiveVectorStruct {
22314 type Owned = Self;
22315
22316 #[inline(always)]
22317 fn inline_align(_context: fidl::encoding::Context) -> usize {
22318 8
22319 }
22320
22321 #[inline(always)]
22322 fn inline_size(_context: fidl::encoding::Context) -> usize {
22323 16
22324 }
22325 }
22326
22327 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveVectorStruct, D>
22328 for &RecursiveVectorStruct
22329 {
22330 #[inline]
22331 unsafe fn encode(
22332 self,
22333 encoder: &mut fidl::encoding::Encoder<'_, D>,
22334 offset: usize,
22335 _depth: fidl::encoding::Depth,
22336 ) -> fidl::Result<()> {
22337 encoder.debug_check_bounds::<RecursiveVectorStruct>(offset);
22338 fidl::encoding::Encode::<RecursiveVectorStruct, D>::encode(
22340 (
22341 <fidl::encoding::Optional<
22342 fidl::encoding::UnboundedVector<RecursiveVectorStruct>,
22343 > as fidl::encoding::ValueTypeMarker>::borrow(&self.vec),
22344 ),
22345 encoder,
22346 offset,
22347 _depth,
22348 )
22349 }
22350 }
22351 unsafe impl<
22352 D: fidl::encoding::ResourceDialect,
22353 T0: fidl::encoding::Encode<
22354 fidl::encoding::Optional<fidl::encoding::UnboundedVector<RecursiveVectorStruct>>,
22355 D,
22356 >,
22357 > fidl::encoding::Encode<RecursiveVectorStruct, D> for (T0,)
22358 {
22359 #[inline]
22360 unsafe fn encode(
22361 self,
22362 encoder: &mut fidl::encoding::Encoder<'_, D>,
22363 offset: usize,
22364 depth: fidl::encoding::Depth,
22365 ) -> fidl::Result<()> {
22366 encoder.debug_check_bounds::<RecursiveVectorStruct>(offset);
22367 self.0.encode(encoder, offset + 0, depth)?;
22371 Ok(())
22372 }
22373 }
22374
22375 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveVectorStruct {
22376 #[inline(always)]
22377 fn new_empty() -> Self {
22378 Self {
22379 vec: fidl::new_empty!(
22380 fidl::encoding::Optional<
22381 fidl::encoding::UnboundedVector<RecursiveVectorStruct>,
22382 >,
22383 D
22384 ),
22385 }
22386 }
22387
22388 #[inline]
22389 unsafe fn decode(
22390 &mut self,
22391 decoder: &mut fidl::encoding::Decoder<'_, D>,
22392 offset: usize,
22393 _depth: fidl::encoding::Depth,
22394 ) -> fidl::Result<()> {
22395 decoder.debug_check_bounds::<Self>(offset);
22396 fidl::decode!(
22398 fidl::encoding::Optional<fidl::encoding::UnboundedVector<RecursiveVectorStruct>>,
22399 D,
22400 &mut self.vec,
22401 decoder,
22402 offset + 0,
22403 _depth
22404 )?;
22405 Ok(())
22406 }
22407 }
22408
22409 impl fidl::encoding::ValueTypeMarker for RecursiveVectorUnionStruct {
22410 type Borrowed<'a> = &'a Self;
22411 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22412 value
22413 }
22414 }
22415
22416 unsafe impl fidl::encoding::TypeMarker for RecursiveVectorUnionStruct {
22417 type Owned = Self;
22418
22419 #[inline(always)]
22420 fn inline_align(_context: fidl::encoding::Context) -> usize {
22421 8
22422 }
22423
22424 #[inline(always)]
22425 fn inline_size(_context: fidl::encoding::Context) -> usize {
22426 16
22427 }
22428 }
22429
22430 unsafe impl<D: fidl::encoding::ResourceDialect>
22431 fidl::encoding::Encode<RecursiveVectorUnionStruct, D> for &RecursiveVectorUnionStruct
22432 {
22433 #[inline]
22434 unsafe fn encode(
22435 self,
22436 encoder: &mut fidl::encoding::Encoder<'_, D>,
22437 offset: usize,
22438 _depth: fidl::encoding::Depth,
22439 ) -> fidl::Result<()> {
22440 encoder.debug_check_bounds::<RecursiveVectorUnionStruct>(offset);
22441 fidl::encoding::Encode::<RecursiveVectorUnionStruct, D>::encode(
22443 (<RecursiveVectorUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
22444 encoder,
22445 offset,
22446 _depth,
22447 )
22448 }
22449 }
22450 unsafe impl<
22451 D: fidl::encoding::ResourceDialect,
22452 T0: fidl::encoding::Encode<RecursiveVectorUnion, D>,
22453 > fidl::encoding::Encode<RecursiveVectorUnionStruct, D> for (T0,)
22454 {
22455 #[inline]
22456 unsafe fn encode(
22457 self,
22458 encoder: &mut fidl::encoding::Encoder<'_, D>,
22459 offset: usize,
22460 depth: fidl::encoding::Depth,
22461 ) -> fidl::Result<()> {
22462 encoder.debug_check_bounds::<RecursiveVectorUnionStruct>(offset);
22463 self.0.encode(encoder, offset + 0, depth)?;
22467 Ok(())
22468 }
22469 }
22470
22471 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
22472 for RecursiveVectorUnionStruct
22473 {
22474 #[inline(always)]
22475 fn new_empty() -> Self {
22476 Self { u: fidl::new_empty!(RecursiveVectorUnion, D) }
22477 }
22478
22479 #[inline]
22480 unsafe fn decode(
22481 &mut self,
22482 decoder: &mut fidl::encoding::Decoder<'_, D>,
22483 offset: usize,
22484 _depth: fidl::encoding::Depth,
22485 ) -> fidl::Result<()> {
22486 decoder.debug_check_bounds::<Self>(offset);
22487 fidl::decode!(RecursiveVectorUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
22489 Ok(())
22490 }
22491 }
22492
22493 impl fidl::encoding::ValueTypeMarker for Regression1 {
22494 type Borrowed<'a> = &'a Self;
22495 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22496 value
22497 }
22498 }
22499
22500 unsafe impl fidl::encoding::TypeMarker for Regression1 {
22501 type Owned = Self;
22502
22503 #[inline(always)]
22504 fn inline_align(_context: fidl::encoding::Context) -> usize {
22505 8
22506 }
22507
22508 #[inline(always)]
22509 fn inline_size(_context: fidl::encoding::Context) -> usize {
22510 32
22511 }
22512 }
22513
22514 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression1, D>
22515 for &Regression1
22516 {
22517 #[inline]
22518 unsafe fn encode(
22519 self,
22520 encoder: &mut fidl::encoding::Encoder<'_, D>,
22521 offset: usize,
22522 _depth: fidl::encoding::Depth,
22523 ) -> fidl::Result<()> {
22524 encoder.debug_check_bounds::<Regression1>(offset);
22525 unsafe {
22526 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
22528 (buf_ptr as *mut Regression1).write_unaligned((self as *const Regression1).read());
22529 let padding_ptr = buf_ptr.offset(0) as *mut u64;
22532 let padding_mask = 0xffffff00u64;
22533 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22534 let padding_ptr = buf_ptr.offset(8) as *mut u64;
22535 let padding_mask = 0xffffffff0000ff00u64;
22536 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22537 let padding_ptr = buf_ptr.offset(24) as *mut u64;
22538 let padding_mask = 0xffffffffffffff00u64;
22539 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
22540 }
22541 Ok(())
22542 }
22543 }
22544 unsafe impl<
22545 D: fidl::encoding::ResourceDialect,
22546 T0: fidl::encoding::Encode<u8, D>,
22547 T1: fidl::encoding::Encode<u32, D>,
22548 T2: fidl::encoding::Encode<u8, D>,
22549 T3: fidl::encoding::Encode<u16, D>,
22550 T4: fidl::encoding::Encode<u64, D>,
22551 T5: fidl::encoding::Encode<u8, D>,
22552 > fidl::encoding::Encode<Regression1, D> for (T0, T1, T2, T3, T4, T5)
22553 {
22554 #[inline]
22555 unsafe fn encode(
22556 self,
22557 encoder: &mut fidl::encoding::Encoder<'_, D>,
22558 offset: usize,
22559 depth: fidl::encoding::Depth,
22560 ) -> fidl::Result<()> {
22561 encoder.debug_check_bounds::<Regression1>(offset);
22562 unsafe {
22565 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22566 (ptr as *mut u64).write_unaligned(0);
22567 }
22568 unsafe {
22569 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
22570 (ptr as *mut u64).write_unaligned(0);
22571 }
22572 unsafe {
22573 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
22574 (ptr as *mut u64).write_unaligned(0);
22575 }
22576 self.0.encode(encoder, offset + 0, depth)?;
22578 self.1.encode(encoder, offset + 4, depth)?;
22579 self.2.encode(encoder, offset + 8, depth)?;
22580 self.3.encode(encoder, offset + 10, depth)?;
22581 self.4.encode(encoder, offset + 16, depth)?;
22582 self.5.encode(encoder, offset + 24, depth)?;
22583 Ok(())
22584 }
22585 }
22586
22587 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression1 {
22588 #[inline(always)]
22589 fn new_empty() -> Self {
22590 Self {
22591 f1: fidl::new_empty!(u8, D),
22592 f2: fidl::new_empty!(u32, D),
22593 f3: fidl::new_empty!(u8, D),
22594 f4: fidl::new_empty!(u16, D),
22595 f5: fidl::new_empty!(u64, D),
22596 f6: fidl::new_empty!(u8, D),
22597 }
22598 }
22599
22600 #[inline]
22601 unsafe fn decode(
22602 &mut self,
22603 decoder: &mut fidl::encoding::Decoder<'_, D>,
22604 offset: usize,
22605 _depth: fidl::encoding::Depth,
22606 ) -> fidl::Result<()> {
22607 decoder.debug_check_bounds::<Self>(offset);
22608 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
22609 let ptr = unsafe { buf_ptr.offset(0) };
22611 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22612 let mask = 0xffffff00u64;
22613 let maskedval = padval & mask;
22614 if maskedval != 0 {
22615 return Err(fidl::Error::NonZeroPadding {
22616 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22617 });
22618 }
22619 let ptr = unsafe { buf_ptr.offset(8) };
22620 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22621 let mask = 0xffffffff0000ff00u64;
22622 let maskedval = padval & mask;
22623 if maskedval != 0 {
22624 return Err(fidl::Error::NonZeroPadding {
22625 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
22626 });
22627 }
22628 let ptr = unsafe { buf_ptr.offset(24) };
22629 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22630 let mask = 0xffffffffffffff00u64;
22631 let maskedval = padval & mask;
22632 if maskedval != 0 {
22633 return Err(fidl::Error::NonZeroPadding {
22634 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
22635 });
22636 }
22637 unsafe {
22639 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
22640 }
22641 Ok(())
22642 }
22643 }
22644
22645 impl fidl::encoding::ValueTypeMarker for Regression10V1 {
22646 type Borrowed<'a> = &'a Self;
22647 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22648 value
22649 }
22650 }
22651
22652 unsafe impl fidl::encoding::TypeMarker for Regression10V1 {
22653 type Owned = Self;
22654
22655 #[inline(always)]
22656 fn inline_align(_context: fidl::encoding::Context) -> usize {
22657 8
22658 }
22659
22660 #[inline(always)]
22661 fn inline_size(_context: fidl::encoding::Context) -> usize {
22662 16
22663 }
22664 }
22665
22666 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V1, D>
22667 for &Regression10V1
22668 {
22669 #[inline]
22670 unsafe fn encode(
22671 self,
22672 encoder: &mut fidl::encoding::Encoder<'_, D>,
22673 offset: usize,
22674 _depth: fidl::encoding::Depth,
22675 ) -> fidl::Result<()> {
22676 encoder.debug_check_bounds::<Regression10V1>(offset);
22677 fidl::encoding::Encode::<Regression10V1, D>::encode(
22679 (<Regression10TableV1 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22680 encoder,
22681 offset,
22682 _depth,
22683 )
22684 }
22685 }
22686 unsafe impl<
22687 D: fidl::encoding::ResourceDialect,
22688 T0: fidl::encoding::Encode<Regression10TableV1, D>,
22689 > fidl::encoding::Encode<Regression10V1, D> for (T0,)
22690 {
22691 #[inline]
22692 unsafe fn encode(
22693 self,
22694 encoder: &mut fidl::encoding::Encoder<'_, D>,
22695 offset: usize,
22696 depth: fidl::encoding::Depth,
22697 ) -> fidl::Result<()> {
22698 encoder.debug_check_bounds::<Regression10V1>(offset);
22699 self.0.encode(encoder, offset + 0, depth)?;
22703 Ok(())
22704 }
22705 }
22706
22707 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V1 {
22708 #[inline(always)]
22709 fn new_empty() -> Self {
22710 Self { table: fidl::new_empty!(Regression10TableV1, D) }
22711 }
22712
22713 #[inline]
22714 unsafe fn decode(
22715 &mut self,
22716 decoder: &mut fidl::encoding::Decoder<'_, D>,
22717 offset: usize,
22718 _depth: fidl::encoding::Depth,
22719 ) -> fidl::Result<()> {
22720 decoder.debug_check_bounds::<Self>(offset);
22721 fidl::decode!(Regression10TableV1, D, &mut self.table, decoder, offset + 0, _depth)?;
22723 Ok(())
22724 }
22725 }
22726
22727 impl fidl::encoding::ValueTypeMarker for Regression10V2 {
22728 type Borrowed<'a> = &'a Self;
22729 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22730 value
22731 }
22732 }
22733
22734 unsafe impl fidl::encoding::TypeMarker for Regression10V2 {
22735 type Owned = Self;
22736
22737 #[inline(always)]
22738 fn inline_align(_context: fidl::encoding::Context) -> usize {
22739 8
22740 }
22741
22742 #[inline(always)]
22743 fn inline_size(_context: fidl::encoding::Context) -> usize {
22744 16
22745 }
22746 }
22747
22748 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V2, D>
22749 for &Regression10V2
22750 {
22751 #[inline]
22752 unsafe fn encode(
22753 self,
22754 encoder: &mut fidl::encoding::Encoder<'_, D>,
22755 offset: usize,
22756 _depth: fidl::encoding::Depth,
22757 ) -> fidl::Result<()> {
22758 encoder.debug_check_bounds::<Regression10V2>(offset);
22759 fidl::encoding::Encode::<Regression10V2, D>::encode(
22761 (<Regression10TableV2 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22762 encoder,
22763 offset,
22764 _depth,
22765 )
22766 }
22767 }
22768 unsafe impl<
22769 D: fidl::encoding::ResourceDialect,
22770 T0: fidl::encoding::Encode<Regression10TableV2, D>,
22771 > fidl::encoding::Encode<Regression10V2, D> for (T0,)
22772 {
22773 #[inline]
22774 unsafe fn encode(
22775 self,
22776 encoder: &mut fidl::encoding::Encoder<'_, D>,
22777 offset: usize,
22778 depth: fidl::encoding::Depth,
22779 ) -> fidl::Result<()> {
22780 encoder.debug_check_bounds::<Regression10V2>(offset);
22781 self.0.encode(encoder, offset + 0, depth)?;
22785 Ok(())
22786 }
22787 }
22788
22789 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V2 {
22790 #[inline(always)]
22791 fn new_empty() -> Self {
22792 Self { table: fidl::new_empty!(Regression10TableV2, D) }
22793 }
22794
22795 #[inline]
22796 unsafe fn decode(
22797 &mut self,
22798 decoder: &mut fidl::encoding::Decoder<'_, D>,
22799 offset: usize,
22800 _depth: fidl::encoding::Depth,
22801 ) -> fidl::Result<()> {
22802 decoder.debug_check_bounds::<Self>(offset);
22803 fidl::decode!(Regression10TableV2, D, &mut self.table, decoder, offset + 0, _depth)?;
22805 Ok(())
22806 }
22807 }
22808
22809 impl fidl::encoding::ValueTypeMarker for Regression10V3 {
22810 type Borrowed<'a> = &'a Self;
22811 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22812 value
22813 }
22814 }
22815
22816 unsafe impl fidl::encoding::TypeMarker for Regression10V3 {
22817 type Owned = Self;
22818
22819 #[inline(always)]
22820 fn inline_align(_context: fidl::encoding::Context) -> usize {
22821 8
22822 }
22823
22824 #[inline(always)]
22825 fn inline_size(_context: fidl::encoding::Context) -> usize {
22826 16
22827 }
22828 }
22829
22830 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10V3, D>
22831 for &Regression10V3
22832 {
22833 #[inline]
22834 unsafe fn encode(
22835 self,
22836 encoder: &mut fidl::encoding::Encoder<'_, D>,
22837 offset: usize,
22838 _depth: fidl::encoding::Depth,
22839 ) -> fidl::Result<()> {
22840 encoder.debug_check_bounds::<Regression10V3>(offset);
22841 fidl::encoding::Encode::<Regression10V3, D>::encode(
22843 (<Regression10TableV3 as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
22844 encoder,
22845 offset,
22846 _depth,
22847 )
22848 }
22849 }
22850 unsafe impl<
22851 D: fidl::encoding::ResourceDialect,
22852 T0: fidl::encoding::Encode<Regression10TableV3, D>,
22853 > fidl::encoding::Encode<Regression10V3, D> for (T0,)
22854 {
22855 #[inline]
22856 unsafe fn encode(
22857 self,
22858 encoder: &mut fidl::encoding::Encoder<'_, D>,
22859 offset: usize,
22860 depth: fidl::encoding::Depth,
22861 ) -> fidl::Result<()> {
22862 encoder.debug_check_bounds::<Regression10V3>(offset);
22863 self.0.encode(encoder, offset + 0, depth)?;
22867 Ok(())
22868 }
22869 }
22870
22871 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10V3 {
22872 #[inline(always)]
22873 fn new_empty() -> Self {
22874 Self { table: fidl::new_empty!(Regression10TableV3, D) }
22875 }
22876
22877 #[inline]
22878 unsafe fn decode(
22879 &mut self,
22880 decoder: &mut fidl::encoding::Decoder<'_, D>,
22881 offset: usize,
22882 _depth: fidl::encoding::Depth,
22883 ) -> fidl::Result<()> {
22884 decoder.debug_check_bounds::<Self>(offset);
22885 fidl::decode!(Regression10TableV3, D, &mut self.table, decoder, offset + 0, _depth)?;
22887 Ok(())
22888 }
22889 }
22890
22891 impl fidl::encoding::ValueTypeMarker for Regression11 {
22892 type Borrowed<'a> = &'a Self;
22893 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22894 value
22895 }
22896 }
22897
22898 unsafe impl fidl::encoding::TypeMarker for Regression11 {
22899 type Owned = Self;
22900
22901 #[inline(always)]
22902 fn inline_align(_context: fidl::encoding::Context) -> usize {
22903 8
22904 }
22905
22906 #[inline(always)]
22907 fn inline_size(_context: fidl::encoding::Context) -> usize {
22908 16
22909 }
22910 }
22911
22912 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression11, D>
22913 for &Regression11
22914 {
22915 #[inline]
22916 unsafe fn encode(
22917 self,
22918 encoder: &mut fidl::encoding::Encoder<'_, D>,
22919 offset: usize,
22920 _depth: fidl::encoding::Depth,
22921 ) -> fidl::Result<()> {
22922 encoder.debug_check_bounds::<Regression11>(offset);
22923 fidl::encoding::Encode::<Regression11, D>::encode(
22925 (<UnionWithRegression10Table as fidl::encoding::ValueTypeMarker>::borrow(
22926 &self.table_of_table,
22927 ),),
22928 encoder,
22929 offset,
22930 _depth,
22931 )
22932 }
22933 }
22934 unsafe impl<
22935 D: fidl::encoding::ResourceDialect,
22936 T0: fidl::encoding::Encode<UnionWithRegression10Table, D>,
22937 > fidl::encoding::Encode<Regression11, D> for (T0,)
22938 {
22939 #[inline]
22940 unsafe fn encode(
22941 self,
22942 encoder: &mut fidl::encoding::Encoder<'_, D>,
22943 offset: usize,
22944 depth: fidl::encoding::Depth,
22945 ) -> fidl::Result<()> {
22946 encoder.debug_check_bounds::<Regression11>(offset);
22947 self.0.encode(encoder, offset + 0, depth)?;
22951 Ok(())
22952 }
22953 }
22954
22955 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression11 {
22956 #[inline(always)]
22957 fn new_empty() -> Self {
22958 Self { table_of_table: fidl::new_empty!(UnionWithRegression10Table, D) }
22959 }
22960
22961 #[inline]
22962 unsafe fn decode(
22963 &mut self,
22964 decoder: &mut fidl::encoding::Decoder<'_, D>,
22965 offset: usize,
22966 _depth: fidl::encoding::Depth,
22967 ) -> fidl::Result<()> {
22968 decoder.debug_check_bounds::<Self>(offset);
22969 fidl::decode!(
22971 UnionWithRegression10Table,
22972 D,
22973 &mut self.table_of_table,
22974 decoder,
22975 offset + 0,
22976 _depth
22977 )?;
22978 Ok(())
22979 }
22980 }
22981
22982 impl fidl::encoding::ValueTypeMarker for Regression2 {
22983 type Borrowed<'a> = &'a Self;
22984 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
22985 value
22986 }
22987 }
22988
22989 unsafe impl fidl::encoding::TypeMarker for Regression2 {
22990 type Owned = Self;
22991
22992 #[inline(always)]
22993 fn inline_align(_context: fidl::encoding::Context) -> usize {
22994 8
22995 }
22996
22997 #[inline(always)]
22998 fn inline_size(_context: fidl::encoding::Context) -> usize {
22999 40
23000 }
23001 }
23002
23003 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression2, D>
23004 for &Regression2
23005 {
23006 #[inline]
23007 unsafe fn encode(
23008 self,
23009 encoder: &mut fidl::encoding::Encoder<'_, D>,
23010 offset: usize,
23011 _depth: fidl::encoding::Depth,
23012 ) -> fidl::Result<()> {
23013 encoder.debug_check_bounds::<Regression2>(offset);
23014 unsafe {
23015 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
23017 (buf_ptr as *mut Regression2).write_unaligned((self as *const Regression2).read());
23018 let padding_ptr = buf_ptr.offset(0) as *mut u64;
23021 let padding_mask = 0xffffff00u64;
23022 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23023 let padding_ptr = buf_ptr.offset(8) as *mut u64;
23024 let padding_mask = 0xffffffff0000ff00u64;
23025 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23026 let padding_ptr = buf_ptr.offset(24) as *mut u64;
23027 let padding_mask = 0xffffffffffffff00u64;
23028 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23029 let padding_ptr = buf_ptr.offset(32) as *mut u64;
23030 let padding_mask = 0xffffffffffffff00u64;
23031 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23032 }
23033 Ok(())
23034 }
23035 }
23036 unsafe impl<
23037 D: fidl::encoding::ResourceDialect,
23038 T0: fidl::encoding::Encode<Regression1, D>,
23039 T1: fidl::encoding::Encode<u8, D>,
23040 > fidl::encoding::Encode<Regression2, D> for (T0, T1)
23041 {
23042 #[inline]
23043 unsafe fn encode(
23044 self,
23045 encoder: &mut fidl::encoding::Encoder<'_, D>,
23046 offset: usize,
23047 depth: fidl::encoding::Depth,
23048 ) -> fidl::Result<()> {
23049 encoder.debug_check_bounds::<Regression2>(offset);
23050 unsafe {
23053 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
23054 (ptr as *mut u64).write_unaligned(0);
23055 }
23056 self.0.encode(encoder, offset + 0, depth)?;
23058 self.1.encode(encoder, offset + 32, depth)?;
23059 Ok(())
23060 }
23061 }
23062
23063 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression2 {
23064 #[inline(always)]
23065 fn new_empty() -> Self {
23066 Self { head: fidl::new_empty!(Regression1, D), f7: fidl::new_empty!(u8, D) }
23067 }
23068
23069 #[inline]
23070 unsafe fn decode(
23071 &mut self,
23072 decoder: &mut fidl::encoding::Decoder<'_, D>,
23073 offset: usize,
23074 _depth: fidl::encoding::Depth,
23075 ) -> fidl::Result<()> {
23076 decoder.debug_check_bounds::<Self>(offset);
23077 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
23078 let ptr = unsafe { buf_ptr.offset(0) };
23080 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23081 let mask = 0xffffff00u64;
23082 let maskedval = padval & mask;
23083 if maskedval != 0 {
23084 return Err(fidl::Error::NonZeroPadding {
23085 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23086 });
23087 }
23088 let ptr = unsafe { buf_ptr.offset(8) };
23089 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23090 let mask = 0xffffffff0000ff00u64;
23091 let maskedval = padval & mask;
23092 if maskedval != 0 {
23093 return Err(fidl::Error::NonZeroPadding {
23094 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23095 });
23096 }
23097 let ptr = unsafe { buf_ptr.offset(24) };
23098 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23099 let mask = 0xffffffffffffff00u64;
23100 let maskedval = padval & mask;
23101 if maskedval != 0 {
23102 return Err(fidl::Error::NonZeroPadding {
23103 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23104 });
23105 }
23106 let ptr = unsafe { buf_ptr.offset(32) };
23107 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23108 let mask = 0xffffffffffffff00u64;
23109 let maskedval = padval & mask;
23110 if maskedval != 0 {
23111 return Err(fidl::Error::NonZeroPadding {
23112 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
23113 });
23114 }
23115 unsafe {
23117 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 40);
23118 }
23119 Ok(())
23120 }
23121 }
23122
23123 impl fidl::encoding::ValueTypeMarker for Regression3 {
23124 type Borrowed<'a> = &'a Self;
23125 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23126 value
23127 }
23128 }
23129
23130 unsafe impl fidl::encoding::TypeMarker for Regression3 {
23131 type Owned = Self;
23132
23133 #[inline(always)]
23134 fn inline_align(_context: fidl::encoding::Context) -> usize {
23135 8
23136 }
23137
23138 #[inline(always)]
23139 fn inline_size(_context: fidl::encoding::Context) -> usize {
23140 8
23141 }
23142 }
23143
23144 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression3, D>
23145 for &Regression3
23146 {
23147 #[inline]
23148 unsafe fn encode(
23149 self,
23150 encoder: &mut fidl::encoding::Encoder<'_, D>,
23151 offset: usize,
23152 _depth: fidl::encoding::Depth,
23153 ) -> fidl::Result<()> {
23154 encoder.debug_check_bounds::<Regression3>(offset);
23155 fidl::encoding::Encode::<Regression3, D>::encode(
23157 (<fidl::encoding::Boxed<Regression2> as fidl::encoding::ValueTypeMarker>::borrow(
23158 &self.opt_value,
23159 ),),
23160 encoder,
23161 offset,
23162 _depth,
23163 )
23164 }
23165 }
23166 unsafe impl<
23167 D: fidl::encoding::ResourceDialect,
23168 T0: fidl::encoding::Encode<fidl::encoding::Boxed<Regression2>, D>,
23169 > fidl::encoding::Encode<Regression3, D> for (T0,)
23170 {
23171 #[inline]
23172 unsafe fn encode(
23173 self,
23174 encoder: &mut fidl::encoding::Encoder<'_, D>,
23175 offset: usize,
23176 depth: fidl::encoding::Depth,
23177 ) -> fidl::Result<()> {
23178 encoder.debug_check_bounds::<Regression3>(offset);
23179 self.0.encode(encoder, offset + 0, depth)?;
23183 Ok(())
23184 }
23185 }
23186
23187 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression3 {
23188 #[inline(always)]
23189 fn new_empty() -> Self {
23190 Self { opt_value: fidl::new_empty!(fidl::encoding::Boxed<Regression2>, D) }
23191 }
23192
23193 #[inline]
23194 unsafe fn decode(
23195 &mut self,
23196 decoder: &mut fidl::encoding::Decoder<'_, D>,
23197 offset: usize,
23198 _depth: fidl::encoding::Depth,
23199 ) -> fidl::Result<()> {
23200 decoder.debug_check_bounds::<Self>(offset);
23201 fidl::decode!(
23203 fidl::encoding::Boxed<Regression2>,
23204 D,
23205 &mut self.opt_value,
23206 decoder,
23207 offset + 0,
23208 _depth
23209 )?;
23210 Ok(())
23211 }
23212 }
23213
23214 impl fidl::encoding::ValueTypeMarker for Regression4 {
23215 type Borrowed<'a> = &'a Self;
23216 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23217 value
23218 }
23219 }
23220
23221 unsafe impl fidl::encoding::TypeMarker for Regression4 {
23222 type Owned = Self;
23223
23224 #[inline(always)]
23225 fn inline_align(_context: fidl::encoding::Context) -> usize {
23226 8
23227 }
23228
23229 #[inline(always)]
23230 fn inline_size(_context: fidl::encoding::Context) -> usize {
23231 32
23232 }
23233 }
23234
23235 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression4, D>
23236 for &Regression4
23237 {
23238 #[inline]
23239 unsafe fn encode(
23240 self,
23241 encoder: &mut fidl::encoding::Encoder<'_, D>,
23242 offset: usize,
23243 _depth: fidl::encoding::Depth,
23244 ) -> fidl::Result<()> {
23245 encoder.debug_check_bounds::<Regression4>(offset);
23246 unsafe {
23247 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
23249 (buf_ptr as *mut Regression4).write_unaligned((self as *const Regression4).read());
23250 let padding_ptr = buf_ptr.offset(0) as *mut u64;
23253 let padding_mask = 0xffffff00u64;
23254 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23255 let padding_ptr = buf_ptr.offset(8) as *mut u64;
23256 let padding_mask = 0xffff000000000000u64;
23257 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23258 let padding_ptr = buf_ptr.offset(24) as *mut u64;
23259 let padding_mask = 0xffffffffffffff00u64;
23260 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
23261 }
23262 Ok(())
23263 }
23264 }
23265 unsafe impl<
23266 D: fidl::encoding::ResourceDialect,
23267 T0: fidl::encoding::Encode<u8, D>,
23268 T1: fidl::encoding::Encode<u32, D>,
23269 T2: fidl::encoding::Encode<StructSize3Align1, D>,
23270 T3: fidl::encoding::Encode<u8, D>,
23271 T4: fidl::encoding::Encode<u16, D>,
23272 T5: fidl::encoding::Encode<u64, D>,
23273 T6: fidl::encoding::Encode<u8, D>,
23274 > fidl::encoding::Encode<Regression4, D> for (T0, T1, T2, T3, T4, T5, T6)
23275 {
23276 #[inline]
23277 unsafe fn encode(
23278 self,
23279 encoder: &mut fidl::encoding::Encoder<'_, D>,
23280 offset: usize,
23281 depth: fidl::encoding::Depth,
23282 ) -> fidl::Result<()> {
23283 encoder.debug_check_bounds::<Regression4>(offset);
23284 unsafe {
23287 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23288 (ptr as *mut u64).write_unaligned(0);
23289 }
23290 unsafe {
23291 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23292 (ptr as *mut u64).write_unaligned(0);
23293 }
23294 unsafe {
23295 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23296 (ptr as *mut u64).write_unaligned(0);
23297 }
23298 self.0.encode(encoder, offset + 0, depth)?;
23300 self.1.encode(encoder, offset + 4, depth)?;
23301 self.2.encode(encoder, offset + 8, depth)?;
23302 self.3.encode(encoder, offset + 11, depth)?;
23303 self.4.encode(encoder, offset + 12, depth)?;
23304 self.5.encode(encoder, offset + 16, depth)?;
23305 self.6.encode(encoder, offset + 24, depth)?;
23306 Ok(())
23307 }
23308 }
23309
23310 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression4 {
23311 #[inline(always)]
23312 fn new_empty() -> Self {
23313 Self {
23314 f1: fidl::new_empty!(u8, D),
23315 f2: fidl::new_empty!(u32, D),
23316 s1: fidl::new_empty!(StructSize3Align1, D),
23317 f3: fidl::new_empty!(u8, D),
23318 f4: fidl::new_empty!(u16, D),
23319 f5: fidl::new_empty!(u64, D),
23320 f6: fidl::new_empty!(u8, D),
23321 }
23322 }
23323
23324 #[inline]
23325 unsafe fn decode(
23326 &mut self,
23327 decoder: &mut fidl::encoding::Decoder<'_, D>,
23328 offset: usize,
23329 _depth: fidl::encoding::Depth,
23330 ) -> fidl::Result<()> {
23331 decoder.debug_check_bounds::<Self>(offset);
23332 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
23333 let ptr = unsafe { buf_ptr.offset(0) };
23335 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23336 let mask = 0xffffff00u64;
23337 let maskedval = padval & mask;
23338 if maskedval != 0 {
23339 return Err(fidl::Error::NonZeroPadding {
23340 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23341 });
23342 }
23343 let ptr = unsafe { buf_ptr.offset(8) };
23344 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23345 let mask = 0xffff000000000000u64;
23346 let maskedval = padval & mask;
23347 if maskedval != 0 {
23348 return Err(fidl::Error::NonZeroPadding {
23349 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23350 });
23351 }
23352 let ptr = unsafe { buf_ptr.offset(24) };
23353 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23354 let mask = 0xffffffffffffff00u64;
23355 let maskedval = padval & mask;
23356 if maskedval != 0 {
23357 return Err(fidl::Error::NonZeroPadding {
23358 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23359 });
23360 }
23361 unsafe {
23363 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
23364 }
23365 Ok(())
23366 }
23367 }
23368
23369 impl fidl::encoding::ValueTypeMarker for Regression5 {
23370 type Borrowed<'a> = &'a Self;
23371 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23372 value
23373 }
23374 }
23375
23376 unsafe impl fidl::encoding::TypeMarker for Regression5 {
23377 type Owned = Self;
23378
23379 #[inline(always)]
23380 fn inline_align(_context: fidl::encoding::Context) -> usize {
23381 8
23382 }
23383
23384 #[inline(always)]
23385 fn inline_size(_context: fidl::encoding::Context) -> usize {
23386 32
23387 }
23388 }
23389
23390 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression5, D>
23391 for &Regression5
23392 {
23393 #[inline]
23394 unsafe fn encode(
23395 self,
23396 encoder: &mut fidl::encoding::Encoder<'_, D>,
23397 offset: usize,
23398 _depth: fidl::encoding::Depth,
23399 ) -> fidl::Result<()> {
23400 encoder.debug_check_bounds::<Regression5>(offset);
23401 fidl::encoding::Encode::<Regression5, D>::encode(
23403 (
23404 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
23405 <EnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
23406 <EnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
23407 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
23408 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
23409 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
23410 ),
23411 encoder,
23412 offset,
23413 _depth,
23414 )
23415 }
23416 }
23417 unsafe impl<
23418 D: fidl::encoding::ResourceDialect,
23419 T0: fidl::encoding::Encode<u8, D>,
23420 T1: fidl::encoding::Encode<EnumUint32, D>,
23421 T2: fidl::encoding::Encode<EnumUint8, D>,
23422 T3: fidl::encoding::Encode<u16, D>,
23423 T4: fidl::encoding::Encode<u64, D>,
23424 T5: fidl::encoding::Encode<u8, D>,
23425 > fidl::encoding::Encode<Regression5, D> for (T0, T1, T2, T3, T4, T5)
23426 {
23427 #[inline]
23428 unsafe fn encode(
23429 self,
23430 encoder: &mut fidl::encoding::Encoder<'_, D>,
23431 offset: usize,
23432 depth: fidl::encoding::Depth,
23433 ) -> fidl::Result<()> {
23434 encoder.debug_check_bounds::<Regression5>(offset);
23435 unsafe {
23438 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23439 (ptr as *mut u64).write_unaligned(0);
23440 }
23441 unsafe {
23442 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23443 (ptr as *mut u64).write_unaligned(0);
23444 }
23445 unsafe {
23446 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23447 (ptr as *mut u64).write_unaligned(0);
23448 }
23449 self.0.encode(encoder, offset + 0, depth)?;
23451 self.1.encode(encoder, offset + 4, depth)?;
23452 self.2.encode(encoder, offset + 8, depth)?;
23453 self.3.encode(encoder, offset + 10, depth)?;
23454 self.4.encode(encoder, offset + 16, depth)?;
23455 self.5.encode(encoder, offset + 24, depth)?;
23456 Ok(())
23457 }
23458 }
23459
23460 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression5 {
23461 #[inline(always)]
23462 fn new_empty() -> Self {
23463 Self {
23464 f1: fidl::new_empty!(u8, D),
23465 f2: fidl::new_empty!(EnumUint32, D),
23466 f3: fidl::new_empty!(EnumUint8, D),
23467 f4: fidl::new_empty!(u16, D),
23468 f5: fidl::new_empty!(u64, D),
23469 f6: fidl::new_empty!(u8, D),
23470 }
23471 }
23472
23473 #[inline]
23474 unsafe fn decode(
23475 &mut self,
23476 decoder: &mut fidl::encoding::Decoder<'_, D>,
23477 offset: usize,
23478 _depth: fidl::encoding::Depth,
23479 ) -> fidl::Result<()> {
23480 decoder.debug_check_bounds::<Self>(offset);
23481 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23483 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23484 let mask = 0xffffff00u64;
23485 let maskedval = padval & mask;
23486 if maskedval != 0 {
23487 return Err(fidl::Error::NonZeroPadding {
23488 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23489 });
23490 }
23491 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
23492 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23493 let mask = 0xffffffff0000ff00u64;
23494 let maskedval = padval & mask;
23495 if maskedval != 0 {
23496 return Err(fidl::Error::NonZeroPadding {
23497 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23498 });
23499 }
23500 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
23501 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23502 let mask = 0xffffffffffffff00u64;
23503 let maskedval = padval & mask;
23504 if maskedval != 0 {
23505 return Err(fidl::Error::NonZeroPadding {
23506 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23507 });
23508 }
23509 fidl::decode!(u8, D, &mut self.f1, decoder, offset + 0, _depth)?;
23510 fidl::decode!(EnumUint32, D, &mut self.f2, decoder, offset + 4, _depth)?;
23511 fidl::decode!(EnumUint8, D, &mut self.f3, decoder, offset + 8, _depth)?;
23512 fidl::decode!(u16, D, &mut self.f4, decoder, offset + 10, _depth)?;
23513 fidl::decode!(u64, D, &mut self.f5, decoder, offset + 16, _depth)?;
23514 fidl::decode!(u8, D, &mut self.f6, decoder, offset + 24, _depth)?;
23515 Ok(())
23516 }
23517 }
23518
23519 impl fidl::encoding::ValueTypeMarker for Regression6 {
23520 type Borrowed<'a> = &'a Self;
23521 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23522 value
23523 }
23524 }
23525
23526 unsafe impl fidl::encoding::TypeMarker for Regression6 {
23527 type Owned = Self;
23528
23529 #[inline(always)]
23530 fn inline_align(_context: fidl::encoding::Context) -> usize {
23531 8
23532 }
23533
23534 #[inline(always)]
23535 fn inline_size(_context: fidl::encoding::Context) -> usize {
23536 32
23537 }
23538 }
23539
23540 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression6, D>
23541 for &Regression6
23542 {
23543 #[inline]
23544 unsafe fn encode(
23545 self,
23546 encoder: &mut fidl::encoding::Encoder<'_, D>,
23547 offset: usize,
23548 _depth: fidl::encoding::Depth,
23549 ) -> fidl::Result<()> {
23550 encoder.debug_check_bounds::<Regression6>(offset);
23551 fidl::encoding::Encode::<Regression6, D>::encode(
23553 (
23554 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f1),
23555 <BitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.f2),
23556 <BitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f3),
23557 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.f4),
23558 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.f5),
23559 <u8 as fidl::encoding::ValueTypeMarker>::borrow(&self.f6),
23560 ),
23561 encoder,
23562 offset,
23563 _depth,
23564 )
23565 }
23566 }
23567 unsafe impl<
23568 D: fidl::encoding::ResourceDialect,
23569 T0: fidl::encoding::Encode<u8, D>,
23570 T1: fidl::encoding::Encode<BitsUint32, D>,
23571 T2: fidl::encoding::Encode<BitsUint8, D>,
23572 T3: fidl::encoding::Encode<u16, D>,
23573 T4: fidl::encoding::Encode<u64, D>,
23574 T5: fidl::encoding::Encode<u8, D>,
23575 > fidl::encoding::Encode<Regression6, D> for (T0, T1, T2, T3, T4, T5)
23576 {
23577 #[inline]
23578 unsafe fn encode(
23579 self,
23580 encoder: &mut fidl::encoding::Encoder<'_, D>,
23581 offset: usize,
23582 depth: fidl::encoding::Depth,
23583 ) -> fidl::Result<()> {
23584 encoder.debug_check_bounds::<Regression6>(offset);
23585 unsafe {
23588 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23589 (ptr as *mut u64).write_unaligned(0);
23590 }
23591 unsafe {
23592 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
23593 (ptr as *mut u64).write_unaligned(0);
23594 }
23595 unsafe {
23596 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
23597 (ptr as *mut u64).write_unaligned(0);
23598 }
23599 self.0.encode(encoder, offset + 0, depth)?;
23601 self.1.encode(encoder, offset + 4, depth)?;
23602 self.2.encode(encoder, offset + 8, depth)?;
23603 self.3.encode(encoder, offset + 10, depth)?;
23604 self.4.encode(encoder, offset + 16, depth)?;
23605 self.5.encode(encoder, offset + 24, depth)?;
23606 Ok(())
23607 }
23608 }
23609
23610 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression6 {
23611 #[inline(always)]
23612 fn new_empty() -> Self {
23613 Self {
23614 f1: fidl::new_empty!(u8, D),
23615 f2: fidl::new_empty!(BitsUint32, D),
23616 f3: fidl::new_empty!(BitsUint8, D),
23617 f4: fidl::new_empty!(u16, D),
23618 f5: fidl::new_empty!(u64, D),
23619 f6: fidl::new_empty!(u8, D),
23620 }
23621 }
23622
23623 #[inline]
23624 unsafe fn decode(
23625 &mut self,
23626 decoder: &mut fidl::encoding::Decoder<'_, D>,
23627 offset: usize,
23628 _depth: fidl::encoding::Depth,
23629 ) -> fidl::Result<()> {
23630 decoder.debug_check_bounds::<Self>(offset);
23631 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23633 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23634 let mask = 0xffffff00u64;
23635 let maskedval = padval & mask;
23636 if maskedval != 0 {
23637 return Err(fidl::Error::NonZeroPadding {
23638 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23639 });
23640 }
23641 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
23642 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23643 let mask = 0xffffffff0000ff00u64;
23644 let maskedval = padval & mask;
23645 if maskedval != 0 {
23646 return Err(fidl::Error::NonZeroPadding {
23647 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
23648 });
23649 }
23650 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
23651 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23652 let mask = 0xffffffffffffff00u64;
23653 let maskedval = padval & mask;
23654 if maskedval != 0 {
23655 return Err(fidl::Error::NonZeroPadding {
23656 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
23657 });
23658 }
23659 fidl::decode!(u8, D, &mut self.f1, decoder, offset + 0, _depth)?;
23660 fidl::decode!(BitsUint32, D, &mut self.f2, decoder, offset + 4, _depth)?;
23661 fidl::decode!(BitsUint8, D, &mut self.f3, decoder, offset + 8, _depth)?;
23662 fidl::decode!(u16, D, &mut self.f4, decoder, offset + 10, _depth)?;
23663 fidl::decode!(u64, D, &mut self.f5, decoder, offset + 16, _depth)?;
23664 fidl::decode!(u8, D, &mut self.f6, decoder, offset + 24, _depth)?;
23665 Ok(())
23666 }
23667 }
23668
23669 impl fidl::encoding::ValueTypeMarker for Regression7TableUnionXUnion {
23670 type Borrowed<'a> = &'a Self;
23671 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23672 value
23673 }
23674 }
23675
23676 unsafe impl fidl::encoding::TypeMarker for Regression7TableUnionXUnion {
23677 type Owned = Self;
23678
23679 #[inline(always)]
23680 fn inline_align(_context: fidl::encoding::Context) -> usize {
23681 8
23682 }
23683
23684 #[inline(always)]
23685 fn inline_size(_context: fidl::encoding::Context) -> usize {
23686 16
23687 }
23688 }
23689
23690 unsafe impl<D: fidl::encoding::ResourceDialect>
23691 fidl::encoding::Encode<Regression7TableUnionXUnion, D> for &Regression7TableUnionXUnion
23692 {
23693 #[inline]
23694 unsafe fn encode(
23695 self,
23696 encoder: &mut fidl::encoding::Encoder<'_, D>,
23697 offset: usize,
23698 _depth: fidl::encoding::Depth,
23699 ) -> fidl::Result<()> {
23700 encoder.debug_check_bounds::<Regression7TableUnionXUnion>(offset);
23701 fidl::encoding::Encode::<Regression7TableUnionXUnion, D>::encode(
23703 (
23704 <TableOfUnionThenXUnionThenTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
23705 ),
23706 encoder, offset, _depth
23707 )
23708 }
23709 }
23710 unsafe impl<
23711 D: fidl::encoding::ResourceDialect,
23712 T0: fidl::encoding::Encode<TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D>,
23713 > fidl::encoding::Encode<Regression7TableUnionXUnion, D> for (T0,)
23714 {
23715 #[inline]
23716 unsafe fn encode(
23717 self,
23718 encoder: &mut fidl::encoding::Encoder<'_, D>,
23719 offset: usize,
23720 depth: fidl::encoding::Depth,
23721 ) -> fidl::Result<()> {
23722 encoder.debug_check_bounds::<Regression7TableUnionXUnion>(offset);
23723 self.0.encode(encoder, offset + 0, depth)?;
23727 Ok(())
23728 }
23729 }
23730
23731 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
23732 for Regression7TableUnionXUnion
23733 {
23734 #[inline(always)]
23735 fn new_empty() -> Self {
23736 Self { value: fidl::new_empty!(TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D) }
23737 }
23738
23739 #[inline]
23740 unsafe fn decode(
23741 &mut self,
23742 decoder: &mut fidl::encoding::Decoder<'_, D>,
23743 offset: usize,
23744 _depth: fidl::encoding::Depth,
23745 ) -> fidl::Result<()> {
23746 decoder.debug_check_bounds::<Self>(offset);
23747 fidl::decode!(
23749 TableOfUnionThenXUnionThenTableThenXUnionThenUnion,
23750 D,
23751 &mut self.value,
23752 decoder,
23753 offset + 0,
23754 _depth
23755 )?;
23756 Ok(())
23757 }
23758 }
23759
23760 impl fidl::encoding::ValueTypeMarker for Regression8OptUnionSize12Align4 {
23761 type Borrowed<'a> = &'a Self;
23762 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23763 value
23764 }
23765 }
23766
23767 unsafe impl fidl::encoding::TypeMarker for Regression8OptUnionSize12Align4 {
23768 type Owned = Self;
23769
23770 #[inline(always)]
23771 fn inline_align(_context: fidl::encoding::Context) -> usize {
23772 8
23773 }
23774
23775 #[inline(always)]
23776 fn inline_size(_context: fidl::encoding::Context) -> usize {
23777 48
23778 }
23779 }
23780
23781 unsafe impl<D: fidl::encoding::ResourceDialect>
23782 fidl::encoding::Encode<Regression8OptUnionSize12Align4, D>
23783 for &Regression8OptUnionSize12Align4
23784 {
23785 #[inline]
23786 unsafe fn encode(
23787 self,
23788 encoder: &mut fidl::encoding::Encoder<'_, D>,
23789 offset: usize,
23790 _depth: fidl::encoding::Depth,
23791 ) -> fidl::Result<()> {
23792 encoder.debug_check_bounds::<Regression8OptUnionSize12Align4>(offset);
23793 fidl::encoding::Encode::<Regression8OptUnionSize12Align4, D>::encode(
23795 (
23796 <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union1),
23797 <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union2),
23798 <fidl::encoding::OptionalUnion<UnionSize12Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union3),
23799 ),
23800 encoder, offset, _depth
23801 )
23802 }
23803 }
23804 unsafe impl<
23805 D: fidl::encoding::ResourceDialect,
23806 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
23807 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
23808 T2: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize12Align4>, D>,
23809 > fidl::encoding::Encode<Regression8OptUnionSize12Align4, D> for (T0, T1, T2)
23810 {
23811 #[inline]
23812 unsafe fn encode(
23813 self,
23814 encoder: &mut fidl::encoding::Encoder<'_, D>,
23815 offset: usize,
23816 depth: fidl::encoding::Depth,
23817 ) -> fidl::Result<()> {
23818 encoder.debug_check_bounds::<Regression8OptUnionSize12Align4>(offset);
23819 self.0.encode(encoder, offset + 0, depth)?;
23823 self.1.encode(encoder, offset + 16, depth)?;
23824 self.2.encode(encoder, offset + 32, depth)?;
23825 Ok(())
23826 }
23827 }
23828
23829 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
23830 for Regression8OptUnionSize12Align4
23831 {
23832 #[inline(always)]
23833 fn new_empty() -> Self {
23834 Self {
23835 opt_union1: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
23836 opt_union2: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
23837 opt_union3: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize12Align4>, D),
23838 }
23839 }
23840
23841 #[inline]
23842 unsafe fn decode(
23843 &mut self,
23844 decoder: &mut fidl::encoding::Decoder<'_, D>,
23845 offset: usize,
23846 _depth: fidl::encoding::Depth,
23847 ) -> fidl::Result<()> {
23848 decoder.debug_check_bounds::<Self>(offset);
23849 fidl::decode!(
23851 fidl::encoding::OptionalUnion<UnionSize12Align4>,
23852 D,
23853 &mut self.opt_union1,
23854 decoder,
23855 offset + 0,
23856 _depth
23857 )?;
23858 fidl::decode!(
23859 fidl::encoding::OptionalUnion<UnionSize12Align4>,
23860 D,
23861 &mut self.opt_union2,
23862 decoder,
23863 offset + 16,
23864 _depth
23865 )?;
23866 fidl::decode!(
23867 fidl::encoding::OptionalUnion<UnionSize12Align4>,
23868 D,
23869 &mut self.opt_union3,
23870 decoder,
23871 offset + 32,
23872 _depth
23873 )?;
23874 Ok(())
23875 }
23876 }
23877
23878 impl fidl::encoding::ValueTypeMarker for Regression8TableWithUnionSize12Align4 {
23879 type Borrowed<'a> = &'a Self;
23880 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23881 value
23882 }
23883 }
23884
23885 unsafe impl fidl::encoding::TypeMarker for Regression8TableWithUnionSize12Align4 {
23886 type Owned = Self;
23887
23888 #[inline(always)]
23889 fn inline_align(_context: fidl::encoding::Context) -> usize {
23890 8
23891 }
23892
23893 #[inline(always)]
23894 fn inline_size(_context: fidl::encoding::Context) -> usize {
23895 16
23896 }
23897 }
23898
23899 unsafe impl<D: fidl::encoding::ResourceDialect>
23900 fidl::encoding::Encode<Regression8TableWithUnionSize12Align4, D>
23901 for &Regression8TableWithUnionSize12Align4
23902 {
23903 #[inline]
23904 unsafe fn encode(
23905 self,
23906 encoder: &mut fidl::encoding::Encoder<'_, D>,
23907 offset: usize,
23908 _depth: fidl::encoding::Depth,
23909 ) -> fidl::Result<()> {
23910 encoder.debug_check_bounds::<Regression8TableWithUnionSize12Align4>(offset);
23911 fidl::encoding::Encode::<Regression8TableWithUnionSize12Align4, D>::encode(
23913 (<TableWithUnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(
23914 &self.value,
23915 ),),
23916 encoder,
23917 offset,
23918 _depth,
23919 )
23920 }
23921 }
23922 unsafe impl<
23923 D: fidl::encoding::ResourceDialect,
23924 T0: fidl::encoding::Encode<TableWithUnionSize12Align4, D>,
23925 > fidl::encoding::Encode<Regression8TableWithUnionSize12Align4, D> for (T0,)
23926 {
23927 #[inline]
23928 unsafe fn encode(
23929 self,
23930 encoder: &mut fidl::encoding::Encoder<'_, D>,
23931 offset: usize,
23932 depth: fidl::encoding::Depth,
23933 ) -> fidl::Result<()> {
23934 encoder.debug_check_bounds::<Regression8TableWithUnionSize12Align4>(offset);
23935 self.0.encode(encoder, offset + 0, depth)?;
23939 Ok(())
23940 }
23941 }
23942
23943 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
23944 for Regression8TableWithUnionSize12Align4
23945 {
23946 #[inline(always)]
23947 fn new_empty() -> Self {
23948 Self { value: fidl::new_empty!(TableWithUnionSize12Align4, D) }
23949 }
23950
23951 #[inline]
23952 unsafe fn decode(
23953 &mut self,
23954 decoder: &mut fidl::encoding::Decoder<'_, D>,
23955 offset: usize,
23956 _depth: fidl::encoding::Depth,
23957 ) -> fidl::Result<()> {
23958 decoder.debug_check_bounds::<Self>(offset);
23959 fidl::decode!(
23961 TableWithUnionSize12Align4,
23962 D,
23963 &mut self.value,
23964 decoder,
23965 offset + 0,
23966 _depth
23967 )?;
23968 Ok(())
23969 }
23970 }
23971
23972 impl fidl::encoding::ValueTypeMarker for Regression8VectorOfOptUnionSize12Align4 {
23973 type Borrowed<'a> = &'a Self;
23974 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
23975 value
23976 }
23977 }
23978
23979 unsafe impl fidl::encoding::TypeMarker for Regression8VectorOfOptUnionSize12Align4 {
23980 type Owned = Self;
23981
23982 #[inline(always)]
23983 fn inline_align(_context: fidl::encoding::Context) -> usize {
23984 8
23985 }
23986
23987 #[inline(always)]
23988 fn inline_size(_context: fidl::encoding::Context) -> usize {
23989 16
23990 }
23991 }
23992
23993 unsafe impl<D: fidl::encoding::ResourceDialect>
23994 fidl::encoding::Encode<Regression8VectorOfOptUnionSize12Align4, D>
23995 for &Regression8VectorOfOptUnionSize12Align4
23996 {
23997 #[inline]
23998 unsafe fn encode(
23999 self,
24000 encoder: &mut fidl::encoding::Encoder<'_, D>,
24001 offset: usize,
24002 _depth: fidl::encoding::Depth,
24003 ) -> fidl::Result<()> {
24004 encoder.debug_check_bounds::<Regression8VectorOfOptUnionSize12Align4>(offset);
24005 fidl::encoding::Encode::<Regression8VectorOfOptUnionSize12Align4, D>::encode(
24007 (
24008 <fidl::encoding::UnboundedVector<
24009 fidl::encoding::OptionalUnion<UnionSize12Align4>,
24010 > as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
24011 ),
24012 encoder,
24013 offset,
24014 _depth,
24015 )
24016 }
24017 }
24018 unsafe impl<
24019 D: fidl::encoding::ResourceDialect,
24020 T0: fidl::encoding::Encode<
24021 fidl::encoding::UnboundedVector<fidl::encoding::OptionalUnion<UnionSize12Align4>>,
24022 D,
24023 >,
24024 > fidl::encoding::Encode<Regression8VectorOfOptUnionSize12Align4, D> for (T0,)
24025 {
24026 #[inline]
24027 unsafe fn encode(
24028 self,
24029 encoder: &mut fidl::encoding::Encoder<'_, D>,
24030 offset: usize,
24031 depth: fidl::encoding::Depth,
24032 ) -> fidl::Result<()> {
24033 encoder.debug_check_bounds::<Regression8VectorOfOptUnionSize12Align4>(offset);
24034 self.0.encode(encoder, offset + 0, depth)?;
24038 Ok(())
24039 }
24040 }
24041
24042 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24043 for Regression8VectorOfOptUnionSize12Align4
24044 {
24045 #[inline(always)]
24046 fn new_empty() -> Self {
24047 Self {
24048 value: fidl::new_empty!(
24049 fidl::encoding::UnboundedVector<
24050 fidl::encoding::OptionalUnion<UnionSize12Align4>,
24051 >,
24052 D
24053 ),
24054 }
24055 }
24056
24057 #[inline]
24058 unsafe fn decode(
24059 &mut self,
24060 decoder: &mut fidl::encoding::Decoder<'_, D>,
24061 offset: usize,
24062 _depth: fidl::encoding::Depth,
24063 ) -> fidl::Result<()> {
24064 decoder.debug_check_bounds::<Self>(offset);
24065 fidl::decode!(
24067 fidl::encoding::UnboundedVector<fidl::encoding::OptionalUnion<UnionSize12Align4>>,
24068 D,
24069 &mut self.value,
24070 decoder,
24071 offset + 0,
24072 _depth
24073 )?;
24074 Ok(())
24075 }
24076 }
24077
24078 impl fidl::encoding::ValueTypeMarker for Regression9Message {
24079 type Borrowed<'a> = &'a Self;
24080 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24081 value
24082 }
24083 }
24084
24085 unsafe impl fidl::encoding::TypeMarker for Regression9Message {
24086 type Owned = Self;
24087
24088 #[inline(always)]
24089 fn inline_align(_context: fidl::encoding::Context) -> usize {
24090 8
24091 }
24092
24093 #[inline(always)]
24094 fn inline_size(_context: fidl::encoding::Context) -> usize {
24095 32
24096 }
24097 }
24098
24099 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Message, D>
24100 for &Regression9Message
24101 {
24102 #[inline]
24103 unsafe fn encode(
24104 self,
24105 encoder: &mut fidl::encoding::Encoder<'_, D>,
24106 offset: usize,
24107 _depth: fidl::encoding::Depth,
24108 ) -> fidl::Result<()> {
24109 encoder.debug_check_bounds::<Regression9Message>(offset);
24110 fidl::encoding::Encode::<Regression9Message, D>::encode(
24112 (
24113 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
24114 <Regression9Result as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
24115 ),
24116 encoder,
24117 offset,
24118 _depth,
24119 )
24120 }
24121 }
24122 unsafe impl<
24123 D: fidl::encoding::ResourceDialect,
24124 T0: fidl::encoding::Encode<TransactionHeader, D>,
24125 T1: fidl::encoding::Encode<Regression9Result, D>,
24126 > fidl::encoding::Encode<Regression9Message, D> for (T0, T1)
24127 {
24128 #[inline]
24129 unsafe fn encode(
24130 self,
24131 encoder: &mut fidl::encoding::Encoder<'_, D>,
24132 offset: usize,
24133 depth: fidl::encoding::Depth,
24134 ) -> fidl::Result<()> {
24135 encoder.debug_check_bounds::<Regression9Message>(offset);
24136 self.0.encode(encoder, offset + 0, depth)?;
24140 self.1.encode(encoder, offset + 16, depth)?;
24141 Ok(())
24142 }
24143 }
24144
24145 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Message {
24146 #[inline(always)]
24147 fn new_empty() -> Self {
24148 Self {
24149 header: fidl::new_empty!(TransactionHeader, D),
24150 body: fidl::new_empty!(Regression9Result, D),
24151 }
24152 }
24153
24154 #[inline]
24155 unsafe fn decode(
24156 &mut self,
24157 decoder: &mut fidl::encoding::Decoder<'_, D>,
24158 offset: usize,
24159 _depth: fidl::encoding::Depth,
24160 ) -> fidl::Result<()> {
24161 decoder.debug_check_bounds::<Self>(offset);
24162 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
24164 fidl::decode!(Regression9Result, D, &mut self.body, decoder, offset + 16, _depth)?;
24165 Ok(())
24166 }
24167 }
24168
24169 impl fidl::encoding::ValueTypeMarker for Regression9Value {
24170 type Borrowed<'a> = &'a Self;
24171 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24172 value
24173 }
24174 }
24175
24176 unsafe impl fidl::encoding::TypeMarker for Regression9Value {
24177 type Owned = Self;
24178
24179 #[inline(always)]
24180 fn inline_align(_context: fidl::encoding::Context) -> usize {
24181 8
24182 }
24183
24184 #[inline(always)]
24185 fn inline_size(_context: fidl::encoding::Context) -> usize {
24186 32
24187 }
24188 }
24189
24190 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Value, D>
24191 for &Regression9Value
24192 {
24193 #[inline]
24194 unsafe fn encode(
24195 self,
24196 encoder: &mut fidl::encoding::Encoder<'_, D>,
24197 offset: usize,
24198 _depth: fidl::encoding::Depth,
24199 ) -> fidl::Result<()> {
24200 encoder.debug_check_bounds::<Regression9Value>(offset);
24201 fidl::encoding::Encode::<Regression9Value, D>::encode(
24203 (
24204 <StringBoolUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
24205 <fidl::encoding::OptionalUnion<StringBoolUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
24206 ),
24207 encoder, offset, _depth
24208 )
24209 }
24210 }
24211 unsafe impl<
24212 D: fidl::encoding::ResourceDialect,
24213 T0: fidl::encoding::Encode<StringBoolUnion, D>,
24214 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<StringBoolUnion>, D>,
24215 > fidl::encoding::Encode<Regression9Value, D> for (T0, T1)
24216 {
24217 #[inline]
24218 unsafe fn encode(
24219 self,
24220 encoder: &mut fidl::encoding::Encoder<'_, D>,
24221 offset: usize,
24222 depth: fidl::encoding::Depth,
24223 ) -> fidl::Result<()> {
24224 encoder.debug_check_bounds::<Regression9Value>(offset);
24225 self.0.encode(encoder, offset + 0, depth)?;
24229 self.1.encode(encoder, offset + 16, depth)?;
24230 Ok(())
24231 }
24232 }
24233
24234 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Value {
24235 #[inline(always)]
24236 fn new_empty() -> Self {
24237 Self {
24238 u: fidl::new_empty!(StringBoolUnion, D),
24239 nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<StringBoolUnion>, D),
24240 }
24241 }
24242
24243 #[inline]
24244 unsafe fn decode(
24245 &mut self,
24246 decoder: &mut fidl::encoding::Decoder<'_, D>,
24247 offset: usize,
24248 _depth: fidl::encoding::Depth,
24249 ) -> fidl::Result<()> {
24250 decoder.debug_check_bounds::<Self>(offset);
24251 fidl::decode!(StringBoolUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
24253 fidl::decode!(
24254 fidl::encoding::OptionalUnion<StringBoolUnion>,
24255 D,
24256 &mut self.nullable_u,
24257 decoder,
24258 offset + 16,
24259 _depth
24260 )?;
24261 Ok(())
24262 }
24263 }
24264
24265 impl fidl::encoding::ValueTypeMarker for ReverseOrdinalUnionStruct {
24266 type Borrowed<'a> = &'a Self;
24267 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24268 value
24269 }
24270 }
24271
24272 unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalUnionStruct {
24273 type Owned = Self;
24274
24275 #[inline(always)]
24276 fn inline_align(_context: fidl::encoding::Context) -> usize {
24277 8
24278 }
24279
24280 #[inline(always)]
24281 fn inline_size(_context: fidl::encoding::Context) -> usize {
24282 16
24283 }
24284 }
24285
24286 unsafe impl<D: fidl::encoding::ResourceDialect>
24287 fidl::encoding::Encode<ReverseOrdinalUnionStruct, D> for &ReverseOrdinalUnionStruct
24288 {
24289 #[inline]
24290 unsafe fn encode(
24291 self,
24292 encoder: &mut fidl::encoding::Encoder<'_, D>,
24293 offset: usize,
24294 _depth: fidl::encoding::Depth,
24295 ) -> fidl::Result<()> {
24296 encoder.debug_check_bounds::<ReverseOrdinalUnionStruct>(offset);
24297 fidl::encoding::Encode::<ReverseOrdinalUnionStruct, D>::encode(
24299 (<ReverseOrdinalUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
24300 encoder,
24301 offset,
24302 _depth,
24303 )
24304 }
24305 }
24306 unsafe impl<
24307 D: fidl::encoding::ResourceDialect,
24308 T0: fidl::encoding::Encode<ReverseOrdinalUnion, D>,
24309 > fidl::encoding::Encode<ReverseOrdinalUnionStruct, D> for (T0,)
24310 {
24311 #[inline]
24312 unsafe fn encode(
24313 self,
24314 encoder: &mut fidl::encoding::Encoder<'_, D>,
24315 offset: usize,
24316 depth: fidl::encoding::Depth,
24317 ) -> fidl::Result<()> {
24318 encoder.debug_check_bounds::<ReverseOrdinalUnionStruct>(offset);
24319 self.0.encode(encoder, offset + 0, depth)?;
24323 Ok(())
24324 }
24325 }
24326
24327 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
24328 for ReverseOrdinalUnionStruct
24329 {
24330 #[inline(always)]
24331 fn new_empty() -> Self {
24332 Self { u: fidl::new_empty!(ReverseOrdinalUnion, D) }
24333 }
24334
24335 #[inline]
24336 unsafe fn decode(
24337 &mut self,
24338 decoder: &mut fidl::encoding::Decoder<'_, D>,
24339 offset: usize,
24340 _depth: fidl::encoding::Depth,
24341 ) -> fidl::Result<()> {
24342 decoder.debug_check_bounds::<Self>(offset);
24343 fidl::decode!(ReverseOrdinalUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
24345 Ok(())
24346 }
24347 }
24348
24349 impl fidl::encoding::ValueTypeMarker for Sandwich1 {
24350 type Borrowed<'a> = &'a Self;
24351 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24352 value
24353 }
24354 }
24355
24356 unsafe impl fidl::encoding::TypeMarker for Sandwich1 {
24357 type Owned = Self;
24358
24359 #[inline(always)]
24360 fn inline_align(_context: fidl::encoding::Context) -> usize {
24361 8
24362 }
24363
24364 #[inline(always)]
24365 fn inline_size(_context: fidl::encoding::Context) -> usize {
24366 32
24367 }
24368 }
24369
24370 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1, D>
24371 for &Sandwich1
24372 {
24373 #[inline]
24374 unsafe fn encode(
24375 self,
24376 encoder: &mut fidl::encoding::Encoder<'_, D>,
24377 offset: usize,
24378 _depth: fidl::encoding::Depth,
24379 ) -> fidl::Result<()> {
24380 encoder.debug_check_bounds::<Sandwich1>(offset);
24381 fidl::encoding::Encode::<Sandwich1, D>::encode(
24383 (
24384 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24385 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24386 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24387 ),
24388 encoder,
24389 offset,
24390 _depth,
24391 )
24392 }
24393 }
24394 unsafe impl<
24395 D: fidl::encoding::ResourceDialect,
24396 T0: fidl::encoding::Encode<u32, D>,
24397 T1: fidl::encoding::Encode<UnionSize8Align4, D>,
24398 T2: fidl::encoding::Encode<u32, D>,
24399 > fidl::encoding::Encode<Sandwich1, D> for (T0, T1, T2)
24400 {
24401 #[inline]
24402 unsafe fn encode(
24403 self,
24404 encoder: &mut fidl::encoding::Encoder<'_, D>,
24405 offset: usize,
24406 depth: fidl::encoding::Depth,
24407 ) -> fidl::Result<()> {
24408 encoder.debug_check_bounds::<Sandwich1>(offset);
24409 unsafe {
24412 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24413 (ptr as *mut u64).write_unaligned(0);
24414 }
24415 unsafe {
24416 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24417 (ptr as *mut u64).write_unaligned(0);
24418 }
24419 self.0.encode(encoder, offset + 0, depth)?;
24421 self.1.encode(encoder, offset + 8, depth)?;
24422 self.2.encode(encoder, offset + 24, depth)?;
24423 Ok(())
24424 }
24425 }
24426
24427 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1 {
24428 #[inline(always)]
24429 fn new_empty() -> Self {
24430 Self {
24431 before: fidl::new_empty!(u32, D),
24432 the_union: fidl::new_empty!(UnionSize8Align4, D),
24433 after: fidl::new_empty!(u32, D),
24434 }
24435 }
24436
24437 #[inline]
24438 unsafe fn decode(
24439 &mut self,
24440 decoder: &mut fidl::encoding::Decoder<'_, D>,
24441 offset: usize,
24442 _depth: fidl::encoding::Depth,
24443 ) -> fidl::Result<()> {
24444 decoder.debug_check_bounds::<Self>(offset);
24445 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24447 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24448 let mask = 0xffffffff00000000u64;
24449 let maskedval = padval & mask;
24450 if maskedval != 0 {
24451 return Err(fidl::Error::NonZeroPadding {
24452 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24453 });
24454 }
24455 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24456 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24457 let mask = 0xffffffff00000000u64;
24458 let maskedval = padval & mask;
24459 if maskedval != 0 {
24460 return Err(fidl::Error::NonZeroPadding {
24461 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24462 });
24463 }
24464 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24465 fidl::decode!(UnionSize8Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
24466 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24467 Ok(())
24468 }
24469 }
24470
24471 impl fidl::encoding::ValueTypeMarker for Sandwich1Message {
24472 type Borrowed<'a> = &'a Self;
24473 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24474 value
24475 }
24476 }
24477
24478 unsafe impl fidl::encoding::TypeMarker for Sandwich1Message {
24479 type Owned = Self;
24480
24481 #[inline(always)]
24482 fn inline_align(_context: fidl::encoding::Context) -> usize {
24483 8
24484 }
24485
24486 #[inline(always)]
24487 fn inline_size(_context: fidl::encoding::Context) -> usize {
24488 48
24489 }
24490 }
24491
24492 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1Message, D>
24493 for &Sandwich1Message
24494 {
24495 #[inline]
24496 unsafe fn encode(
24497 self,
24498 encoder: &mut fidl::encoding::Encoder<'_, D>,
24499 offset: usize,
24500 _depth: fidl::encoding::Depth,
24501 ) -> fidl::Result<()> {
24502 encoder.debug_check_bounds::<Sandwich1Message>(offset);
24503 fidl::encoding::Encode::<Sandwich1Message, D>::encode(
24505 (
24506 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
24507 <Sandwich1 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
24508 ),
24509 encoder,
24510 offset,
24511 _depth,
24512 )
24513 }
24514 }
24515 unsafe impl<
24516 D: fidl::encoding::ResourceDialect,
24517 T0: fidl::encoding::Encode<TransactionHeader, D>,
24518 T1: fidl::encoding::Encode<Sandwich1, D>,
24519 > fidl::encoding::Encode<Sandwich1Message, D> for (T0, T1)
24520 {
24521 #[inline]
24522 unsafe fn encode(
24523 self,
24524 encoder: &mut fidl::encoding::Encoder<'_, D>,
24525 offset: usize,
24526 depth: fidl::encoding::Depth,
24527 ) -> fidl::Result<()> {
24528 encoder.debug_check_bounds::<Sandwich1Message>(offset);
24529 self.0.encode(encoder, offset + 0, depth)?;
24533 self.1.encode(encoder, offset + 16, depth)?;
24534 Ok(())
24535 }
24536 }
24537
24538 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1Message {
24539 #[inline(always)]
24540 fn new_empty() -> Self {
24541 Self {
24542 header: fidl::new_empty!(TransactionHeader, D),
24543 body: fidl::new_empty!(Sandwich1, D),
24544 }
24545 }
24546
24547 #[inline]
24548 unsafe fn decode(
24549 &mut self,
24550 decoder: &mut fidl::encoding::Decoder<'_, D>,
24551 offset: usize,
24552 _depth: fidl::encoding::Depth,
24553 ) -> fidl::Result<()> {
24554 decoder.debug_check_bounds::<Self>(offset);
24555 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
24557 fidl::decode!(Sandwich1, D, &mut self.body, decoder, offset + 16, _depth)?;
24558 Ok(())
24559 }
24560 }
24561
24562 impl fidl::encoding::ValueTypeMarker for Sandwich1WithOptUnion {
24563 type Borrowed<'a> = &'a Self;
24564 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24565 value
24566 }
24567 }
24568
24569 unsafe impl fidl::encoding::TypeMarker for Sandwich1WithOptUnion {
24570 type Owned = Self;
24571
24572 #[inline(always)]
24573 fn inline_align(_context: fidl::encoding::Context) -> usize {
24574 8
24575 }
24576
24577 #[inline(always)]
24578 fn inline_size(_context: fidl::encoding::Context) -> usize {
24579 32
24580 }
24581 }
24582
24583 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich1WithOptUnion, D>
24584 for &Sandwich1WithOptUnion
24585 {
24586 #[inline]
24587 unsafe fn encode(
24588 self,
24589 encoder: &mut fidl::encoding::Encoder<'_, D>,
24590 offset: usize,
24591 _depth: fidl::encoding::Depth,
24592 ) -> fidl::Result<()> {
24593 encoder.debug_check_bounds::<Sandwich1WithOptUnion>(offset);
24594 fidl::encoding::Encode::<Sandwich1WithOptUnion, D>::encode(
24596 (
24597 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24598 <fidl::encoding::OptionalUnion<UnionSize8Align4> as fidl::encoding::ValueTypeMarker>::borrow(&self.opt_union),
24599 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24600 ),
24601 encoder, offset, _depth
24602 )
24603 }
24604 }
24605 unsafe impl<
24606 D: fidl::encoding::ResourceDialect,
24607 T0: fidl::encoding::Encode<u32, D>,
24608 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionSize8Align4>, D>,
24609 T2: fidl::encoding::Encode<u32, D>,
24610 > fidl::encoding::Encode<Sandwich1WithOptUnion, D> for (T0, T1, T2)
24611 {
24612 #[inline]
24613 unsafe fn encode(
24614 self,
24615 encoder: &mut fidl::encoding::Encoder<'_, D>,
24616 offset: usize,
24617 depth: fidl::encoding::Depth,
24618 ) -> fidl::Result<()> {
24619 encoder.debug_check_bounds::<Sandwich1WithOptUnion>(offset);
24620 unsafe {
24623 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24624 (ptr as *mut u64).write_unaligned(0);
24625 }
24626 unsafe {
24627 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24628 (ptr as *mut u64).write_unaligned(0);
24629 }
24630 self.0.encode(encoder, offset + 0, depth)?;
24632 self.1.encode(encoder, offset + 8, depth)?;
24633 self.2.encode(encoder, offset + 24, depth)?;
24634 Ok(())
24635 }
24636 }
24637
24638 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich1WithOptUnion {
24639 #[inline(always)]
24640 fn new_empty() -> Self {
24641 Self {
24642 before: fidl::new_empty!(u32, D),
24643 opt_union: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionSize8Align4>, D),
24644 after: fidl::new_empty!(u32, D),
24645 }
24646 }
24647
24648 #[inline]
24649 unsafe fn decode(
24650 &mut self,
24651 decoder: &mut fidl::encoding::Decoder<'_, D>,
24652 offset: usize,
24653 _depth: fidl::encoding::Depth,
24654 ) -> fidl::Result<()> {
24655 decoder.debug_check_bounds::<Self>(offset);
24656 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24658 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24659 let mask = 0xffffffff00000000u64;
24660 let maskedval = padval & mask;
24661 if maskedval != 0 {
24662 return Err(fidl::Error::NonZeroPadding {
24663 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24664 });
24665 }
24666 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24667 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24668 let mask = 0xffffffff00000000u64;
24669 let maskedval = padval & mask;
24670 if maskedval != 0 {
24671 return Err(fidl::Error::NonZeroPadding {
24672 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24673 });
24674 }
24675 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24676 fidl::decode!(
24677 fidl::encoding::OptionalUnion<UnionSize8Align4>,
24678 D,
24679 &mut self.opt_union,
24680 decoder,
24681 offset + 8,
24682 _depth
24683 )?;
24684 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24685 Ok(())
24686 }
24687 }
24688
24689 impl fidl::encoding::ValueTypeMarker for Sandwich2 {
24690 type Borrowed<'a> = &'a Self;
24691 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24692 value
24693 }
24694 }
24695
24696 unsafe impl fidl::encoding::TypeMarker for Sandwich2 {
24697 type Owned = Self;
24698
24699 #[inline(always)]
24700 fn inline_align(_context: fidl::encoding::Context) -> usize {
24701 8
24702 }
24703
24704 #[inline(always)]
24705 fn inline_size(_context: fidl::encoding::Context) -> usize {
24706 32
24707 }
24708 }
24709
24710 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich2, D>
24711 for &Sandwich2
24712 {
24713 #[inline]
24714 unsafe fn encode(
24715 self,
24716 encoder: &mut fidl::encoding::Encoder<'_, D>,
24717 offset: usize,
24718 _depth: fidl::encoding::Depth,
24719 ) -> fidl::Result<()> {
24720 encoder.debug_check_bounds::<Sandwich2>(offset);
24721 fidl::encoding::Encode::<Sandwich2, D>::encode(
24723 (
24724 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24725 <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24726 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24727 ),
24728 encoder,
24729 offset,
24730 _depth,
24731 )
24732 }
24733 }
24734 unsafe impl<
24735 D: fidl::encoding::ResourceDialect,
24736 T0: fidl::encoding::Encode<u32, D>,
24737 T1: fidl::encoding::Encode<UnionSize12Align4, D>,
24738 T2: fidl::encoding::Encode<u32, D>,
24739 > fidl::encoding::Encode<Sandwich2, D> for (T0, T1, T2)
24740 {
24741 #[inline]
24742 unsafe fn encode(
24743 self,
24744 encoder: &mut fidl::encoding::Encoder<'_, D>,
24745 offset: usize,
24746 depth: fidl::encoding::Depth,
24747 ) -> fidl::Result<()> {
24748 encoder.debug_check_bounds::<Sandwich2>(offset);
24749 unsafe {
24752 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24753 (ptr as *mut u64).write_unaligned(0);
24754 }
24755 unsafe {
24756 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24757 (ptr as *mut u64).write_unaligned(0);
24758 }
24759 self.0.encode(encoder, offset + 0, depth)?;
24761 self.1.encode(encoder, offset + 8, depth)?;
24762 self.2.encode(encoder, offset + 24, depth)?;
24763 Ok(())
24764 }
24765 }
24766
24767 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich2 {
24768 #[inline(always)]
24769 fn new_empty() -> Self {
24770 Self {
24771 before: fidl::new_empty!(u32, D),
24772 the_union: fidl::new_empty!(UnionSize12Align4, D),
24773 after: fidl::new_empty!(u32, D),
24774 }
24775 }
24776
24777 #[inline]
24778 unsafe fn decode(
24779 &mut self,
24780 decoder: &mut fidl::encoding::Decoder<'_, D>,
24781 offset: usize,
24782 _depth: fidl::encoding::Depth,
24783 ) -> fidl::Result<()> {
24784 decoder.debug_check_bounds::<Self>(offset);
24785 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24787 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24788 let mask = 0xffffffff00000000u64;
24789 let maskedval = padval & mask;
24790 if maskedval != 0 {
24791 return Err(fidl::Error::NonZeroPadding {
24792 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24793 });
24794 }
24795 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24796 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24797 let mask = 0xffffffff00000000u64;
24798 let maskedval = padval & mask;
24799 if maskedval != 0 {
24800 return Err(fidl::Error::NonZeroPadding {
24801 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24802 });
24803 }
24804 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24805 fidl::decode!(UnionSize12Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
24806 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24807 Ok(())
24808 }
24809 }
24810
24811 impl fidl::encoding::ValueTypeMarker for Sandwich3 {
24812 type Borrowed<'a> = &'a Self;
24813 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24814 value
24815 }
24816 }
24817
24818 unsafe impl fidl::encoding::TypeMarker for Sandwich3 {
24819 type Owned = Self;
24820
24821 #[inline(always)]
24822 fn inline_align(_context: fidl::encoding::Context) -> usize {
24823 8
24824 }
24825
24826 #[inline(always)]
24827 fn inline_size(_context: fidl::encoding::Context) -> usize {
24828 32
24829 }
24830 }
24831
24832 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich3, D>
24833 for &Sandwich3
24834 {
24835 #[inline]
24836 unsafe fn encode(
24837 self,
24838 encoder: &mut fidl::encoding::Encoder<'_, D>,
24839 offset: usize,
24840 _depth: fidl::encoding::Depth,
24841 ) -> fidl::Result<()> {
24842 encoder.debug_check_bounds::<Sandwich3>(offset);
24843 fidl::encoding::Encode::<Sandwich3, D>::encode(
24845 (
24846 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24847 <UnionSize24Align8 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24848 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24849 ),
24850 encoder,
24851 offset,
24852 _depth,
24853 )
24854 }
24855 }
24856 unsafe impl<
24857 D: fidl::encoding::ResourceDialect,
24858 T0: fidl::encoding::Encode<u32, D>,
24859 T1: fidl::encoding::Encode<UnionSize24Align8, D>,
24860 T2: fidl::encoding::Encode<u32, D>,
24861 > fidl::encoding::Encode<Sandwich3, D> for (T0, T1, T2)
24862 {
24863 #[inline]
24864 unsafe fn encode(
24865 self,
24866 encoder: &mut fidl::encoding::Encoder<'_, D>,
24867 offset: usize,
24868 depth: fidl::encoding::Depth,
24869 ) -> fidl::Result<()> {
24870 encoder.debug_check_bounds::<Sandwich3>(offset);
24871 unsafe {
24874 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24875 (ptr as *mut u64).write_unaligned(0);
24876 }
24877 unsafe {
24878 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
24879 (ptr as *mut u64).write_unaligned(0);
24880 }
24881 self.0.encode(encoder, offset + 0, depth)?;
24883 self.1.encode(encoder, offset + 8, depth)?;
24884 self.2.encode(encoder, offset + 24, depth)?;
24885 Ok(())
24886 }
24887 }
24888
24889 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich3 {
24890 #[inline(always)]
24891 fn new_empty() -> Self {
24892 Self {
24893 before: fidl::new_empty!(u32, D),
24894 the_union: fidl::new_empty!(UnionSize24Align8, D),
24895 after: fidl::new_empty!(u32, D),
24896 }
24897 }
24898
24899 #[inline]
24900 unsafe fn decode(
24901 &mut self,
24902 decoder: &mut fidl::encoding::Decoder<'_, D>,
24903 offset: usize,
24904 _depth: fidl::encoding::Depth,
24905 ) -> fidl::Result<()> {
24906 decoder.debug_check_bounds::<Self>(offset);
24907 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
24909 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24910 let mask = 0xffffffff00000000u64;
24911 let maskedval = padval & mask;
24912 if maskedval != 0 {
24913 return Err(fidl::Error::NonZeroPadding {
24914 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
24915 });
24916 }
24917 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
24918 let padval = unsafe { (ptr as *const u64).read_unaligned() };
24919 let mask = 0xffffffff00000000u64;
24920 let maskedval = padval & mask;
24921 if maskedval != 0 {
24922 return Err(fidl::Error::NonZeroPadding {
24923 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
24924 });
24925 }
24926 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
24927 fidl::decode!(UnionSize24Align8, D, &mut self.the_union, decoder, offset + 8, _depth)?;
24928 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
24929 Ok(())
24930 }
24931 }
24932
24933 impl fidl::encoding::ValueTypeMarker for Sandwich4 {
24934 type Borrowed<'a> = &'a Self;
24935 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24936 value
24937 }
24938 }
24939
24940 unsafe impl fidl::encoding::TypeMarker for Sandwich4 {
24941 type Owned = Self;
24942
24943 #[inline(always)]
24944 fn inline_align(_context: fidl::encoding::Context) -> usize {
24945 8
24946 }
24947
24948 #[inline(always)]
24949 fn inline_size(_context: fidl::encoding::Context) -> usize {
24950 32
24951 }
24952 }
24953
24954 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4, D>
24955 for &Sandwich4
24956 {
24957 #[inline]
24958 unsafe fn encode(
24959 self,
24960 encoder: &mut fidl::encoding::Encoder<'_, D>,
24961 offset: usize,
24962 _depth: fidl::encoding::Depth,
24963 ) -> fidl::Result<()> {
24964 encoder.debug_check_bounds::<Sandwich4>(offset);
24965 fidl::encoding::Encode::<Sandwich4, D>::encode(
24967 (
24968 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
24969 <UnionSize36Align4 as fidl::encoding::ValueTypeMarker>::borrow(&self.the_union),
24970 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
24971 ),
24972 encoder,
24973 offset,
24974 _depth,
24975 )
24976 }
24977 }
24978 unsafe impl<
24979 D: fidl::encoding::ResourceDialect,
24980 T0: fidl::encoding::Encode<u32, D>,
24981 T1: fidl::encoding::Encode<UnionSize36Align4, D>,
24982 T2: fidl::encoding::Encode<u32, D>,
24983 > fidl::encoding::Encode<Sandwich4, D> for (T0, T1, T2)
24984 {
24985 #[inline]
24986 unsafe fn encode(
24987 self,
24988 encoder: &mut fidl::encoding::Encoder<'_, D>,
24989 offset: usize,
24990 depth: fidl::encoding::Depth,
24991 ) -> fidl::Result<()> {
24992 encoder.debug_check_bounds::<Sandwich4>(offset);
24993 unsafe {
24996 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
24997 (ptr as *mut u64).write_unaligned(0);
24998 }
24999 unsafe {
25000 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25001 (ptr as *mut u64).write_unaligned(0);
25002 }
25003 self.0.encode(encoder, offset + 0, depth)?;
25005 self.1.encode(encoder, offset + 8, depth)?;
25006 self.2.encode(encoder, offset + 24, depth)?;
25007 Ok(())
25008 }
25009 }
25010
25011 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4 {
25012 #[inline(always)]
25013 fn new_empty() -> Self {
25014 Self {
25015 before: fidl::new_empty!(u32, D),
25016 the_union: fidl::new_empty!(UnionSize36Align4, D),
25017 after: fidl::new_empty!(u32, D),
25018 }
25019 }
25020
25021 #[inline]
25022 unsafe fn decode(
25023 &mut self,
25024 decoder: &mut fidl::encoding::Decoder<'_, D>,
25025 offset: usize,
25026 _depth: fidl::encoding::Depth,
25027 ) -> fidl::Result<()> {
25028 decoder.debug_check_bounds::<Self>(offset);
25029 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25031 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25032 let mask = 0xffffffff00000000u64;
25033 let maskedval = padval & mask;
25034 if maskedval != 0 {
25035 return Err(fidl::Error::NonZeroPadding {
25036 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25037 });
25038 }
25039 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25040 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25041 let mask = 0xffffffff00000000u64;
25042 let maskedval = padval & mask;
25043 if maskedval != 0 {
25044 return Err(fidl::Error::NonZeroPadding {
25045 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25046 });
25047 }
25048 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25049 fidl::decode!(UnionSize36Align4, D, &mut self.the_union, decoder, offset + 8, _depth)?;
25050 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25051 Ok(())
25052 }
25053 }
25054
25055 impl fidl::encoding::ValueTypeMarker for Sandwich4Align8 {
25056 type Borrowed<'a> = &'a Self;
25057 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25058 value
25059 }
25060 }
25061
25062 unsafe impl fidl::encoding::TypeMarker for Sandwich4Align8 {
25063 type Owned = Self;
25064
25065 #[inline(always)]
25066 fn inline_align(_context: fidl::encoding::Context) -> usize {
25067 8
25068 }
25069
25070 #[inline(always)]
25071 fn inline_size(_context: fidl::encoding::Context) -> usize {
25072 40
25073 }
25074 }
25075
25076 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4Align8, D>
25077 for &Sandwich4Align8
25078 {
25079 #[inline]
25080 unsafe fn encode(
25081 self,
25082 encoder: &mut fidl::encoding::Encoder<'_, D>,
25083 offset: usize,
25084 _depth: fidl::encoding::Depth,
25085 ) -> fidl::Result<()> {
25086 encoder.debug_check_bounds::<Sandwich4Align8>(offset);
25087 fidl::encoding::Encode::<Sandwich4Align8, D>::encode(
25089 (
25090 <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.sandwich4),
25091 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.alignment8_enforcement),
25092 ),
25093 encoder,
25094 offset,
25095 _depth,
25096 )
25097 }
25098 }
25099 unsafe impl<
25100 D: fidl::encoding::ResourceDialect,
25101 T0: fidl::encoding::Encode<Sandwich4, D>,
25102 T1: fidl::encoding::Encode<u64, D>,
25103 > fidl::encoding::Encode<Sandwich4Align8, D> for (T0, T1)
25104 {
25105 #[inline]
25106 unsafe fn encode(
25107 self,
25108 encoder: &mut fidl::encoding::Encoder<'_, D>,
25109 offset: usize,
25110 depth: fidl::encoding::Depth,
25111 ) -> fidl::Result<()> {
25112 encoder.debug_check_bounds::<Sandwich4Align8>(offset);
25113 self.0.encode(encoder, offset + 0, depth)?;
25117 self.1.encode(encoder, offset + 32, depth)?;
25118 Ok(())
25119 }
25120 }
25121
25122 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4Align8 {
25123 #[inline(always)]
25124 fn new_empty() -> Self {
25125 Self {
25126 sandwich4: fidl::new_empty!(Sandwich4, D),
25127 alignment8_enforcement: fidl::new_empty!(u64, D),
25128 }
25129 }
25130
25131 #[inline]
25132 unsafe fn decode(
25133 &mut self,
25134 decoder: &mut fidl::encoding::Decoder<'_, D>,
25135 offset: usize,
25136 _depth: fidl::encoding::Depth,
25137 ) -> fidl::Result<()> {
25138 decoder.debug_check_bounds::<Self>(offset);
25139 fidl::decode!(Sandwich4, D, &mut self.sandwich4, decoder, offset + 0, _depth)?;
25141 fidl::decode!(u64, D, &mut self.alignment8_enforcement, decoder, offset + 32, _depth)?;
25142 Ok(())
25143 }
25144 }
25145
25146 impl fidl::encoding::ValueTypeMarker for Sandwich4Align8WithPointer {
25147 type Borrowed<'a> = &'a Self;
25148 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25149 value
25150 }
25151 }
25152
25153 unsafe impl fidl::encoding::TypeMarker for Sandwich4Align8WithPointer {
25154 type Owned = Self;
25155
25156 #[inline(always)]
25157 fn inline_align(_context: fidl::encoding::Context) -> usize {
25158 8
25159 }
25160
25161 #[inline(always)]
25162 fn inline_size(_context: fidl::encoding::Context) -> usize {
25163 40
25164 }
25165 }
25166
25167 unsafe impl<D: fidl::encoding::ResourceDialect>
25168 fidl::encoding::Encode<Sandwich4Align8WithPointer, D> for &Sandwich4Align8WithPointer
25169 {
25170 #[inline]
25171 unsafe fn encode(
25172 self,
25173 encoder: &mut fidl::encoding::Encoder<'_, D>,
25174 offset: usize,
25175 _depth: fidl::encoding::Depth,
25176 ) -> fidl::Result<()> {
25177 encoder.debug_check_bounds::<Sandwich4Align8WithPointer>(offset);
25178 fidl::encoding::Encode::<Sandwich4Align8WithPointer, D>::encode(
25180 (
25181 <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.sandwich4),
25182 <fidl::encoding::Boxed<Size8Align8> as fidl::encoding::ValueTypeMarker>::borrow(
25183 &self.alignment8_enforcement,
25184 ),
25185 ),
25186 encoder,
25187 offset,
25188 _depth,
25189 )
25190 }
25191 }
25192 unsafe impl<
25193 D: fidl::encoding::ResourceDialect,
25194 T0: fidl::encoding::Encode<Sandwich4, D>,
25195 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Size8Align8>, D>,
25196 > fidl::encoding::Encode<Sandwich4Align8WithPointer, D> for (T0, T1)
25197 {
25198 #[inline]
25199 unsafe fn encode(
25200 self,
25201 encoder: &mut fidl::encoding::Encoder<'_, D>,
25202 offset: usize,
25203 depth: fidl::encoding::Depth,
25204 ) -> fidl::Result<()> {
25205 encoder.debug_check_bounds::<Sandwich4Align8WithPointer>(offset);
25206 self.0.encode(encoder, offset + 0, depth)?;
25210 self.1.encode(encoder, offset + 32, depth)?;
25211 Ok(())
25212 }
25213 }
25214
25215 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
25216 for Sandwich4Align8WithPointer
25217 {
25218 #[inline(always)]
25219 fn new_empty() -> Self {
25220 Self {
25221 sandwich4: fidl::new_empty!(Sandwich4, D),
25222 alignment8_enforcement: fidl::new_empty!(fidl::encoding::Boxed<Size8Align8>, D),
25223 }
25224 }
25225
25226 #[inline]
25227 unsafe fn decode(
25228 &mut self,
25229 decoder: &mut fidl::encoding::Decoder<'_, D>,
25230 offset: usize,
25231 _depth: fidl::encoding::Depth,
25232 ) -> fidl::Result<()> {
25233 decoder.debug_check_bounds::<Self>(offset);
25234 fidl::decode!(Sandwich4, D, &mut self.sandwich4, decoder, offset + 0, _depth)?;
25236 fidl::decode!(
25237 fidl::encoding::Boxed<Size8Align8>,
25238 D,
25239 &mut self.alignment8_enforcement,
25240 decoder,
25241 offset + 32,
25242 _depth
25243 )?;
25244 Ok(())
25245 }
25246 }
25247
25248 impl fidl::encoding::ValueTypeMarker for Sandwich4Message {
25249 type Borrowed<'a> = &'a Self;
25250 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25251 value
25252 }
25253 }
25254
25255 unsafe impl fidl::encoding::TypeMarker for Sandwich4Message {
25256 type Owned = Self;
25257
25258 #[inline(always)]
25259 fn inline_align(_context: fidl::encoding::Context) -> usize {
25260 8
25261 }
25262
25263 #[inline(always)]
25264 fn inline_size(_context: fidl::encoding::Context) -> usize {
25265 48
25266 }
25267 }
25268
25269 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich4Message, D>
25270 for &Sandwich4Message
25271 {
25272 #[inline]
25273 unsafe fn encode(
25274 self,
25275 encoder: &mut fidl::encoding::Encoder<'_, D>,
25276 offset: usize,
25277 _depth: fidl::encoding::Depth,
25278 ) -> fidl::Result<()> {
25279 encoder.debug_check_bounds::<Sandwich4Message>(offset);
25280 fidl::encoding::Encode::<Sandwich4Message, D>::encode(
25282 (
25283 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25284 <Sandwich4 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25285 ),
25286 encoder,
25287 offset,
25288 _depth,
25289 )
25290 }
25291 }
25292 unsafe impl<
25293 D: fidl::encoding::ResourceDialect,
25294 T0: fidl::encoding::Encode<TransactionHeader, D>,
25295 T1: fidl::encoding::Encode<Sandwich4, D>,
25296 > fidl::encoding::Encode<Sandwich4Message, D> for (T0, T1)
25297 {
25298 #[inline]
25299 unsafe fn encode(
25300 self,
25301 encoder: &mut fidl::encoding::Encoder<'_, D>,
25302 offset: usize,
25303 depth: fidl::encoding::Depth,
25304 ) -> fidl::Result<()> {
25305 encoder.debug_check_bounds::<Sandwich4Message>(offset);
25306 self.0.encode(encoder, offset + 0, depth)?;
25310 self.1.encode(encoder, offset + 16, depth)?;
25311 Ok(())
25312 }
25313 }
25314
25315 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich4Message {
25316 #[inline(always)]
25317 fn new_empty() -> Self {
25318 Self {
25319 header: fidl::new_empty!(TransactionHeader, D),
25320 body: fidl::new_empty!(Sandwich4, D),
25321 }
25322 }
25323
25324 #[inline]
25325 unsafe fn decode(
25326 &mut self,
25327 decoder: &mut fidl::encoding::Decoder<'_, D>,
25328 offset: usize,
25329 _depth: fidl::encoding::Depth,
25330 ) -> fidl::Result<()> {
25331 decoder.debug_check_bounds::<Self>(offset);
25332 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25334 fidl::decode!(Sandwich4, D, &mut self.body, decoder, offset + 16, _depth)?;
25335 Ok(())
25336 }
25337 }
25338
25339 impl fidl::encoding::ValueTypeMarker for Sandwich5 {
25340 type Borrowed<'a> = &'a Self;
25341 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25342 value
25343 }
25344 }
25345
25346 unsafe impl fidl::encoding::TypeMarker for Sandwich5 {
25347 type Owned = Self;
25348
25349 #[inline(always)]
25350 fn inline_align(_context: fidl::encoding::Context) -> usize {
25351 8
25352 }
25353
25354 #[inline(always)]
25355 fn inline_size(_context: fidl::encoding::Context) -> usize {
25356 32
25357 }
25358 }
25359
25360 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich5, D>
25361 for &Sandwich5
25362 {
25363 #[inline]
25364 unsafe fn encode(
25365 self,
25366 encoder: &mut fidl::encoding::Encoder<'_, D>,
25367 offset: usize,
25368 _depth: fidl::encoding::Depth,
25369 ) -> fidl::Result<()> {
25370 encoder.debug_check_bounds::<Sandwich5>(offset);
25371 fidl::encoding::Encode::<Sandwich5, D>::encode(
25373 (
25374 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25375 <UnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.union_of_union),
25376 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25377 ),
25378 encoder,
25379 offset,
25380 _depth,
25381 )
25382 }
25383 }
25384 unsafe impl<
25385 D: fidl::encoding::ResourceDialect,
25386 T0: fidl::encoding::Encode<u32, D>,
25387 T1: fidl::encoding::Encode<UnionOfUnion, D>,
25388 T2: fidl::encoding::Encode<u32, D>,
25389 > fidl::encoding::Encode<Sandwich5, D> for (T0, T1, T2)
25390 {
25391 #[inline]
25392 unsafe fn encode(
25393 self,
25394 encoder: &mut fidl::encoding::Encoder<'_, D>,
25395 offset: usize,
25396 depth: fidl::encoding::Depth,
25397 ) -> fidl::Result<()> {
25398 encoder.debug_check_bounds::<Sandwich5>(offset);
25399 unsafe {
25402 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25403 (ptr as *mut u64).write_unaligned(0);
25404 }
25405 unsafe {
25406 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25407 (ptr as *mut u64).write_unaligned(0);
25408 }
25409 self.0.encode(encoder, offset + 0, depth)?;
25411 self.1.encode(encoder, offset + 8, depth)?;
25412 self.2.encode(encoder, offset + 24, depth)?;
25413 Ok(())
25414 }
25415 }
25416
25417 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich5 {
25418 #[inline(always)]
25419 fn new_empty() -> Self {
25420 Self {
25421 before: fidl::new_empty!(u32, D),
25422 union_of_union: fidl::new_empty!(UnionOfUnion, D),
25423 after: fidl::new_empty!(u32, D),
25424 }
25425 }
25426
25427 #[inline]
25428 unsafe fn decode(
25429 &mut self,
25430 decoder: &mut fidl::encoding::Decoder<'_, D>,
25431 offset: usize,
25432 _depth: fidl::encoding::Depth,
25433 ) -> fidl::Result<()> {
25434 decoder.debug_check_bounds::<Self>(offset);
25435 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25437 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25438 let mask = 0xffffffff00000000u64;
25439 let maskedval = padval & mask;
25440 if maskedval != 0 {
25441 return Err(fidl::Error::NonZeroPadding {
25442 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25443 });
25444 }
25445 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25446 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25447 let mask = 0xffffffff00000000u64;
25448 let maskedval = padval & mask;
25449 if maskedval != 0 {
25450 return Err(fidl::Error::NonZeroPadding {
25451 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25452 });
25453 }
25454 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25455 fidl::decode!(UnionOfUnion, D, &mut self.union_of_union, decoder, offset + 8, _depth)?;
25456 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25457 Ok(())
25458 }
25459 }
25460
25461 impl fidl::encoding::ValueTypeMarker for Sandwich5Message {
25462 type Borrowed<'a> = &'a Self;
25463 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25464 value
25465 }
25466 }
25467
25468 unsafe impl fidl::encoding::TypeMarker for Sandwich5Message {
25469 type Owned = Self;
25470
25471 #[inline(always)]
25472 fn inline_align(_context: fidl::encoding::Context) -> usize {
25473 8
25474 }
25475
25476 #[inline(always)]
25477 fn inline_size(_context: fidl::encoding::Context) -> usize {
25478 48
25479 }
25480 }
25481
25482 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich5Message, D>
25483 for &Sandwich5Message
25484 {
25485 #[inline]
25486 unsafe fn encode(
25487 self,
25488 encoder: &mut fidl::encoding::Encoder<'_, D>,
25489 offset: usize,
25490 _depth: fidl::encoding::Depth,
25491 ) -> fidl::Result<()> {
25492 encoder.debug_check_bounds::<Sandwich5Message>(offset);
25493 fidl::encoding::Encode::<Sandwich5Message, D>::encode(
25495 (
25496 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25497 <Sandwich5 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25498 ),
25499 encoder,
25500 offset,
25501 _depth,
25502 )
25503 }
25504 }
25505 unsafe impl<
25506 D: fidl::encoding::ResourceDialect,
25507 T0: fidl::encoding::Encode<TransactionHeader, D>,
25508 T1: fidl::encoding::Encode<Sandwich5, D>,
25509 > fidl::encoding::Encode<Sandwich5Message, D> for (T0, T1)
25510 {
25511 #[inline]
25512 unsafe fn encode(
25513 self,
25514 encoder: &mut fidl::encoding::Encoder<'_, D>,
25515 offset: usize,
25516 depth: fidl::encoding::Depth,
25517 ) -> fidl::Result<()> {
25518 encoder.debug_check_bounds::<Sandwich5Message>(offset);
25519 self.0.encode(encoder, offset + 0, depth)?;
25523 self.1.encode(encoder, offset + 16, depth)?;
25524 Ok(())
25525 }
25526 }
25527
25528 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich5Message {
25529 #[inline(always)]
25530 fn new_empty() -> Self {
25531 Self {
25532 header: fidl::new_empty!(TransactionHeader, D),
25533 body: fidl::new_empty!(Sandwich5, D),
25534 }
25535 }
25536
25537 #[inline]
25538 unsafe fn decode(
25539 &mut self,
25540 decoder: &mut fidl::encoding::Decoder<'_, D>,
25541 offset: usize,
25542 _depth: fidl::encoding::Depth,
25543 ) -> fidl::Result<()> {
25544 decoder.debug_check_bounds::<Self>(offset);
25545 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25547 fidl::decode!(Sandwich5, D, &mut self.body, decoder, offset + 16, _depth)?;
25548 Ok(())
25549 }
25550 }
25551
25552 impl fidl::encoding::ValueTypeMarker for Sandwich7 {
25553 type Borrowed<'a> = &'a Self;
25554 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25555 value
25556 }
25557 }
25558
25559 unsafe impl fidl::encoding::TypeMarker for Sandwich7 {
25560 type Owned = Self;
25561
25562 #[inline(always)]
25563 fn inline_align(_context: fidl::encoding::Context) -> usize {
25564 8
25565 }
25566
25567 #[inline(always)]
25568 fn inline_size(_context: fidl::encoding::Context) -> usize {
25569 24
25570 }
25571 }
25572
25573 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich7, D>
25574 for &Sandwich7
25575 {
25576 #[inline]
25577 unsafe fn encode(
25578 self,
25579 encoder: &mut fidl::encoding::Encoder<'_, D>,
25580 offset: usize,
25581 _depth: fidl::encoding::Depth,
25582 ) -> fidl::Result<()> {
25583 encoder.debug_check_bounds::<Sandwich7>(offset);
25584 fidl::encoding::Encode::<Sandwich7, D>::encode(
25586 (
25587 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25588 <fidl::encoding::Boxed<Sandwich1> as fidl::encoding::ValueTypeMarker>::borrow(
25589 &self.opt_sandwich1,
25590 ),
25591 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25592 ),
25593 encoder,
25594 offset,
25595 _depth,
25596 )
25597 }
25598 }
25599 unsafe impl<
25600 D: fidl::encoding::ResourceDialect,
25601 T0: fidl::encoding::Encode<u32, D>,
25602 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Sandwich1>, D>,
25603 T2: fidl::encoding::Encode<u32, D>,
25604 > fidl::encoding::Encode<Sandwich7, D> for (T0, T1, T2)
25605 {
25606 #[inline]
25607 unsafe fn encode(
25608 self,
25609 encoder: &mut fidl::encoding::Encoder<'_, D>,
25610 offset: usize,
25611 depth: fidl::encoding::Depth,
25612 ) -> fidl::Result<()> {
25613 encoder.debug_check_bounds::<Sandwich7>(offset);
25614 unsafe {
25617 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25618 (ptr as *mut u64).write_unaligned(0);
25619 }
25620 unsafe {
25621 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
25622 (ptr as *mut u64).write_unaligned(0);
25623 }
25624 self.0.encode(encoder, offset + 0, depth)?;
25626 self.1.encode(encoder, offset + 8, depth)?;
25627 self.2.encode(encoder, offset + 16, depth)?;
25628 Ok(())
25629 }
25630 }
25631
25632 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich7 {
25633 #[inline(always)]
25634 fn new_empty() -> Self {
25635 Self {
25636 before: fidl::new_empty!(u32, D),
25637 opt_sandwich1: fidl::new_empty!(fidl::encoding::Boxed<Sandwich1>, D),
25638 after: fidl::new_empty!(u32, D),
25639 }
25640 }
25641
25642 #[inline]
25643 unsafe fn decode(
25644 &mut self,
25645 decoder: &mut fidl::encoding::Decoder<'_, D>,
25646 offset: usize,
25647 _depth: fidl::encoding::Depth,
25648 ) -> fidl::Result<()> {
25649 decoder.debug_check_bounds::<Self>(offset);
25650 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25652 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25653 let mask = 0xffffffff00000000u64;
25654 let maskedval = padval & mask;
25655 if maskedval != 0 {
25656 return Err(fidl::Error::NonZeroPadding {
25657 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25658 });
25659 }
25660 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
25661 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25662 let mask = 0xffffffff00000000u64;
25663 let maskedval = padval & mask;
25664 if maskedval != 0 {
25665 return Err(fidl::Error::NonZeroPadding {
25666 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
25667 });
25668 }
25669 fidl::decode!(u32, D, &mut self.before, decoder, offset + 0, _depth)?;
25670 fidl::decode!(
25671 fidl::encoding::Boxed<Sandwich1>,
25672 D,
25673 &mut self.opt_sandwich1,
25674 decoder,
25675 offset + 8,
25676 _depth
25677 )?;
25678 fidl::decode!(u32, D, &mut self.after, decoder, offset + 16, _depth)?;
25679 Ok(())
25680 }
25681 }
25682
25683 impl fidl::encoding::ValueTypeMarker for Sandwich7Message {
25684 type Borrowed<'a> = &'a Self;
25685 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25686 value
25687 }
25688 }
25689
25690 unsafe impl fidl::encoding::TypeMarker for Sandwich7Message {
25691 type Owned = Self;
25692
25693 #[inline(always)]
25694 fn inline_align(_context: fidl::encoding::Context) -> usize {
25695 8
25696 }
25697
25698 #[inline(always)]
25699 fn inline_size(_context: fidl::encoding::Context) -> usize {
25700 40
25701 }
25702 }
25703
25704 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich7Message, D>
25705 for &Sandwich7Message
25706 {
25707 #[inline]
25708 unsafe fn encode(
25709 self,
25710 encoder: &mut fidl::encoding::Encoder<'_, D>,
25711 offset: usize,
25712 _depth: fidl::encoding::Depth,
25713 ) -> fidl::Result<()> {
25714 encoder.debug_check_bounds::<Sandwich7Message>(offset);
25715 fidl::encoding::Encode::<Sandwich7Message, D>::encode(
25717 (
25718 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
25719 <Sandwich7 as fidl::encoding::ValueTypeMarker>::borrow(&self.body),
25720 ),
25721 encoder,
25722 offset,
25723 _depth,
25724 )
25725 }
25726 }
25727 unsafe impl<
25728 D: fidl::encoding::ResourceDialect,
25729 T0: fidl::encoding::Encode<TransactionHeader, D>,
25730 T1: fidl::encoding::Encode<Sandwich7, D>,
25731 > fidl::encoding::Encode<Sandwich7Message, D> for (T0, T1)
25732 {
25733 #[inline]
25734 unsafe fn encode(
25735 self,
25736 encoder: &mut fidl::encoding::Encoder<'_, D>,
25737 offset: usize,
25738 depth: fidl::encoding::Depth,
25739 ) -> fidl::Result<()> {
25740 encoder.debug_check_bounds::<Sandwich7Message>(offset);
25741 self.0.encode(encoder, offset + 0, depth)?;
25745 self.1.encode(encoder, offset + 16, depth)?;
25746 Ok(())
25747 }
25748 }
25749
25750 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich7Message {
25751 #[inline(always)]
25752 fn new_empty() -> Self {
25753 Self {
25754 header: fidl::new_empty!(TransactionHeader, D),
25755 body: fidl::new_empty!(Sandwich7, D),
25756 }
25757 }
25758
25759 #[inline]
25760 unsafe fn decode(
25761 &mut self,
25762 decoder: &mut fidl::encoding::Decoder<'_, D>,
25763 offset: usize,
25764 _depth: fidl::encoding::Depth,
25765 ) -> fidl::Result<()> {
25766 decoder.debug_check_bounds::<Self>(offset);
25767 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
25769 fidl::decode!(Sandwich7, D, &mut self.body, decoder, offset + 16, _depth)?;
25770 Ok(())
25771 }
25772 }
25773
25774 impl fidl::encoding::ValueTypeMarker for Sandwich8 {
25775 type Borrowed<'a> = &'a Self;
25776 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25777 value
25778 }
25779 }
25780
25781 unsafe impl fidl::encoding::TypeMarker for Sandwich8 {
25782 type Owned = Self;
25783
25784 #[inline(always)]
25785 fn inline_align(_context: fidl::encoding::Context) -> usize {
25786 8
25787 }
25788
25789 #[inline(always)]
25790 fn inline_size(_context: fidl::encoding::Context) -> usize {
25791 32
25792 }
25793 }
25794
25795 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich8, D>
25796 for &Sandwich8
25797 {
25798 #[inline]
25799 unsafe fn encode(
25800 self,
25801 encoder: &mut fidl::encoding::Encoder<'_, D>,
25802 offset: usize,
25803 _depth: fidl::encoding::Depth,
25804 ) -> fidl::Result<()> {
25805 encoder.debug_check_bounds::<Sandwich8>(offset);
25806 fidl::encoding::Encode::<Sandwich8, D>::encode(
25808 (
25809 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25810 <UnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.union_of_union),
25811 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25812 ),
25813 encoder,
25814 offset,
25815 _depth,
25816 )
25817 }
25818 }
25819 unsafe impl<
25820 D: fidl::encoding::ResourceDialect,
25821 T0: fidl::encoding::Encode<u64, D>,
25822 T1: fidl::encoding::Encode<UnionOfUnion, D>,
25823 T2: fidl::encoding::Encode<u32, D>,
25824 > fidl::encoding::Encode<Sandwich8, D> for (T0, T1, T2)
25825 {
25826 #[inline]
25827 unsafe fn encode(
25828 self,
25829 encoder: &mut fidl::encoding::Encoder<'_, D>,
25830 offset: usize,
25831 depth: fidl::encoding::Depth,
25832 ) -> fidl::Result<()> {
25833 encoder.debug_check_bounds::<Sandwich8>(offset);
25834 unsafe {
25837 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25838 (ptr as *mut u64).write_unaligned(0);
25839 }
25840 self.0.encode(encoder, offset + 0, depth)?;
25842 self.1.encode(encoder, offset + 8, depth)?;
25843 self.2.encode(encoder, offset + 24, depth)?;
25844 Ok(())
25845 }
25846 }
25847
25848 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich8 {
25849 #[inline(always)]
25850 fn new_empty() -> Self {
25851 Self {
25852 before: fidl::new_empty!(u64, D),
25853 union_of_union: fidl::new_empty!(UnionOfUnion, D),
25854 after: fidl::new_empty!(u32, D),
25855 }
25856 }
25857
25858 #[inline]
25859 unsafe fn decode(
25860 &mut self,
25861 decoder: &mut fidl::encoding::Decoder<'_, D>,
25862 offset: usize,
25863 _depth: fidl::encoding::Depth,
25864 ) -> fidl::Result<()> {
25865 decoder.debug_check_bounds::<Self>(offset);
25866 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25868 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25869 let mask = 0xffffffff00000000u64;
25870 let maskedval = padval & mask;
25871 if maskedval != 0 {
25872 return Err(fidl::Error::NonZeroPadding {
25873 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25874 });
25875 }
25876 fidl::decode!(u64, D, &mut self.before, decoder, offset + 0, _depth)?;
25877 fidl::decode!(UnionOfUnion, D, &mut self.union_of_union, decoder, offset + 8, _depth)?;
25878 fidl::decode!(u32, D, &mut self.after, decoder, offset + 24, _depth)?;
25879 Ok(())
25880 }
25881 }
25882
25883 impl fidl::encoding::ValueTypeMarker for Sandwich9 {
25884 type Borrowed<'a> = &'a Self;
25885 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25886 value
25887 }
25888 }
25889
25890 unsafe impl fidl::encoding::TypeMarker for Sandwich9 {
25891 type Owned = Self;
25892
25893 #[inline(always)]
25894 fn inline_align(_context: fidl::encoding::Context) -> usize {
25895 8
25896 }
25897
25898 #[inline(always)]
25899 fn inline_size(_context: fidl::encoding::Context) -> usize {
25900 32
25901 }
25902 }
25903
25904 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Sandwich9, D>
25905 for &Sandwich9
25906 {
25907 #[inline]
25908 unsafe fn encode(
25909 self,
25910 encoder: &mut fidl::encoding::Encoder<'_, D>,
25911 offset: usize,
25912 _depth: fidl::encoding::Depth,
25913 ) -> fidl::Result<()> {
25914 encoder.debug_check_bounds::<Sandwich9>(offset);
25915 fidl::encoding::Encode::<Sandwich9, D>::encode(
25917 (
25918 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
25919 <UnionWithVectorOfVectors as fidl::encoding::ValueTypeMarker>::borrow(
25920 &self.the_union,
25921 ),
25922 <u16 as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
25923 ),
25924 encoder,
25925 offset,
25926 _depth,
25927 )
25928 }
25929 }
25930 unsafe impl<
25931 D: fidl::encoding::ResourceDialect,
25932 T0: fidl::encoding::Encode<u16, D>,
25933 T1: fidl::encoding::Encode<UnionWithVectorOfVectors, D>,
25934 T2: fidl::encoding::Encode<u16, D>,
25935 > fidl::encoding::Encode<Sandwich9, D> for (T0, T1, T2)
25936 {
25937 #[inline]
25938 unsafe fn encode(
25939 self,
25940 encoder: &mut fidl::encoding::Encoder<'_, D>,
25941 offset: usize,
25942 depth: fidl::encoding::Depth,
25943 ) -> fidl::Result<()> {
25944 encoder.debug_check_bounds::<Sandwich9>(offset);
25945 unsafe {
25948 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
25949 (ptr as *mut u64).write_unaligned(0);
25950 }
25951 unsafe {
25952 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
25953 (ptr as *mut u64).write_unaligned(0);
25954 }
25955 self.0.encode(encoder, offset + 0, depth)?;
25957 self.1.encode(encoder, offset + 8, depth)?;
25958 self.2.encode(encoder, offset + 24, depth)?;
25959 Ok(())
25960 }
25961 }
25962
25963 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Sandwich9 {
25964 #[inline(always)]
25965 fn new_empty() -> Self {
25966 Self {
25967 before: fidl::new_empty!(u16, D),
25968 the_union: fidl::new_empty!(UnionWithVectorOfVectors, D),
25969 after: fidl::new_empty!(u16, D),
25970 }
25971 }
25972
25973 #[inline]
25974 unsafe fn decode(
25975 &mut self,
25976 decoder: &mut fidl::encoding::Decoder<'_, D>,
25977 offset: usize,
25978 _depth: fidl::encoding::Depth,
25979 ) -> fidl::Result<()> {
25980 decoder.debug_check_bounds::<Self>(offset);
25981 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
25983 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25984 let mask = 0xffffffffffff0000u64;
25985 let maskedval = padval & mask;
25986 if maskedval != 0 {
25987 return Err(fidl::Error::NonZeroPadding {
25988 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
25989 });
25990 }
25991 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
25992 let padval = unsafe { (ptr as *const u64).read_unaligned() };
25993 let mask = 0xffffffffffff0000u64;
25994 let maskedval = padval & mask;
25995 if maskedval != 0 {
25996 return Err(fidl::Error::NonZeroPadding {
25997 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
25998 });
25999 }
26000 fidl::decode!(u16, D, &mut self.before, decoder, offset + 0, _depth)?;
26001 fidl::decode!(
26002 UnionWithVectorOfVectors,
26003 D,
26004 &mut self.the_union,
26005 decoder,
26006 offset + 8,
26007 _depth
26008 )?;
26009 fidl::decode!(u16, D, &mut self.after, decoder, offset + 24, _depth)?;
26010 Ok(())
26011 }
26012 }
26013
26014 impl fidl::encoding::ValueTypeMarker for SimpleTableArrayStruct {
26015 type Borrowed<'a> = &'a Self;
26016 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26017 value
26018 }
26019 }
26020
26021 unsafe impl fidl::encoding::TypeMarker for SimpleTableArrayStruct {
26022 type Owned = Self;
26023
26024 #[inline(always)]
26025 fn inline_align(_context: fidl::encoding::Context) -> usize {
26026 8
26027 }
26028
26029 #[inline(always)]
26030 fn inline_size(_context: fidl::encoding::Context) -> usize {
26031 32
26032 }
26033 }
26034
26035 unsafe impl<D: fidl::encoding::ResourceDialect>
26036 fidl::encoding::Encode<SimpleTableArrayStruct, D> for &SimpleTableArrayStruct
26037 {
26038 #[inline]
26039 unsafe fn encode(
26040 self,
26041 encoder: &mut fidl::encoding::Encoder<'_, D>,
26042 offset: usize,
26043 _depth: fidl::encoding::Depth,
26044 ) -> fidl::Result<()> {
26045 encoder.debug_check_bounds::<SimpleTableArrayStruct>(offset);
26046 fidl::encoding::Encode::<SimpleTableArrayStruct, D>::encode(
26048 (
26049 <fidl::encoding::Array<TransformerSimpleTable, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.the_array),
26050 ),
26051 encoder, offset, _depth
26052 )
26053 }
26054 }
26055 unsafe impl<
26056 D: fidl::encoding::ResourceDialect,
26057 T0: fidl::encoding::Encode<fidl::encoding::Array<TransformerSimpleTable, 2>, D>,
26058 > fidl::encoding::Encode<SimpleTableArrayStruct, D> for (T0,)
26059 {
26060 #[inline]
26061 unsafe fn encode(
26062 self,
26063 encoder: &mut fidl::encoding::Encoder<'_, D>,
26064 offset: usize,
26065 depth: fidl::encoding::Depth,
26066 ) -> fidl::Result<()> {
26067 encoder.debug_check_bounds::<SimpleTableArrayStruct>(offset);
26068 self.0.encode(encoder, offset + 0, depth)?;
26072 Ok(())
26073 }
26074 }
26075
26076 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
26077 for SimpleTableArrayStruct
26078 {
26079 #[inline(always)]
26080 fn new_empty() -> Self {
26081 Self {
26082 the_array: fidl::new_empty!(fidl::encoding::Array<TransformerSimpleTable, 2>, D),
26083 }
26084 }
26085
26086 #[inline]
26087 unsafe fn decode(
26088 &mut self,
26089 decoder: &mut fidl::encoding::Decoder<'_, D>,
26090 offset: usize,
26091 _depth: fidl::encoding::Depth,
26092 ) -> fidl::Result<()> {
26093 decoder.debug_check_bounds::<Self>(offset);
26094 fidl::decode!(fidl::encoding::Array<TransformerSimpleTable, 2>, D, &mut self.the_array, decoder, offset + 0, _depth)?;
26096 Ok(())
26097 }
26098 }
26099
26100 impl fidl::encoding::ValueTypeMarker for SimpleTableThenUint64 {
26101 type Borrowed<'a> = &'a Self;
26102 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26103 value
26104 }
26105 }
26106
26107 unsafe impl fidl::encoding::TypeMarker for SimpleTableThenUint64 {
26108 type Owned = Self;
26109
26110 #[inline(always)]
26111 fn inline_align(_context: fidl::encoding::Context) -> usize {
26112 8
26113 }
26114
26115 #[inline(always)]
26116 fn inline_size(_context: fidl::encoding::Context) -> usize {
26117 24
26118 }
26119 }
26120
26121 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleTableThenUint64, D>
26122 for &SimpleTableThenUint64
26123 {
26124 #[inline]
26125 unsafe fn encode(
26126 self,
26127 encoder: &mut fidl::encoding::Encoder<'_, D>,
26128 offset: usize,
26129 _depth: fidl::encoding::Depth,
26130 ) -> fidl::Result<()> {
26131 encoder.debug_check_bounds::<SimpleTableThenUint64>(offset);
26132 fidl::encoding::Encode::<SimpleTableThenUint64, D>::encode(
26134 (
26135 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),
26136 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.number),
26137 ),
26138 encoder,
26139 offset,
26140 _depth,
26141 )
26142 }
26143 }
26144 unsafe impl<
26145 D: fidl::encoding::ResourceDialect,
26146 T0: fidl::encoding::Encode<SimpleTable, D>,
26147 T1: fidl::encoding::Encode<u64, D>,
26148 > fidl::encoding::Encode<SimpleTableThenUint64, D> for (T0, T1)
26149 {
26150 #[inline]
26151 unsafe fn encode(
26152 self,
26153 encoder: &mut fidl::encoding::Encoder<'_, D>,
26154 offset: usize,
26155 depth: fidl::encoding::Depth,
26156 ) -> fidl::Result<()> {
26157 encoder.debug_check_bounds::<SimpleTableThenUint64>(offset);
26158 self.0.encode(encoder, offset + 0, depth)?;
26162 self.1.encode(encoder, offset + 16, depth)?;
26163 Ok(())
26164 }
26165 }
26166
26167 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleTableThenUint64 {
26168 #[inline(always)]
26169 fn new_empty() -> Self {
26170 Self { table: fidl::new_empty!(SimpleTable, D), number: fidl::new_empty!(u64, D) }
26171 }
26172
26173 #[inline]
26174 unsafe fn decode(
26175 &mut self,
26176 decoder: &mut fidl::encoding::Decoder<'_, D>,
26177 offset: usize,
26178 _depth: fidl::encoding::Depth,
26179 ) -> fidl::Result<()> {
26180 decoder.debug_check_bounds::<Self>(offset);
26181 fidl::decode!(SimpleTable, D, &mut self.table, decoder, offset + 0, _depth)?;
26183 fidl::decode!(u64, D, &mut self.number, decoder, offset + 16, _depth)?;
26184 Ok(())
26185 }
26186 }
26187
26188 impl fidl::encoding::ValueTypeMarker for SingleVariantUnionStruct {
26189 type Borrowed<'a> = &'a Self;
26190 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26191 value
26192 }
26193 }
26194
26195 unsafe impl fidl::encoding::TypeMarker for SingleVariantUnionStruct {
26196 type Owned = Self;
26197
26198 #[inline(always)]
26199 fn inline_align(_context: fidl::encoding::Context) -> usize {
26200 8
26201 }
26202
26203 #[inline(always)]
26204 fn inline_size(_context: fidl::encoding::Context) -> usize {
26205 16
26206 }
26207 }
26208
26209 unsafe impl<D: fidl::encoding::ResourceDialect>
26210 fidl::encoding::Encode<SingleVariantUnionStruct, D> for &SingleVariantUnionStruct
26211 {
26212 #[inline]
26213 unsafe fn encode(
26214 self,
26215 encoder: &mut fidl::encoding::Encoder<'_, D>,
26216 offset: usize,
26217 _depth: fidl::encoding::Depth,
26218 ) -> fidl::Result<()> {
26219 encoder.debug_check_bounds::<SingleVariantUnionStruct>(offset);
26220 fidl::encoding::Encode::<SingleVariantUnionStruct, D>::encode(
26222 (<SingleVariantUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
26223 encoder,
26224 offset,
26225 _depth,
26226 )
26227 }
26228 }
26229 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SingleVariantUnion, D>>
26230 fidl::encoding::Encode<SingleVariantUnionStruct, D> for (T0,)
26231 {
26232 #[inline]
26233 unsafe fn encode(
26234 self,
26235 encoder: &mut fidl::encoding::Encoder<'_, D>,
26236 offset: usize,
26237 depth: fidl::encoding::Depth,
26238 ) -> fidl::Result<()> {
26239 encoder.debug_check_bounds::<SingleVariantUnionStruct>(offset);
26240 self.0.encode(encoder, offset + 0, depth)?;
26244 Ok(())
26245 }
26246 }
26247
26248 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
26249 for SingleVariantUnionStruct
26250 {
26251 #[inline(always)]
26252 fn new_empty() -> Self {
26253 Self { u: fidl::new_empty!(SingleVariantUnion, D) }
26254 }
26255
26256 #[inline]
26257 unsafe fn decode(
26258 &mut self,
26259 decoder: &mut fidl::encoding::Decoder<'_, D>,
26260 offset: usize,
26261 _depth: fidl::encoding::Depth,
26262 ) -> fidl::Result<()> {
26263 decoder.debug_check_bounds::<Self>(offset);
26264 fidl::decode!(SingleVariantUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
26266 Ok(())
26267 }
26268 }
26269
26270 impl fidl::encoding::ValueTypeMarker for Size5Alignment1 {
26271 type Borrowed<'a> = &'a Self;
26272 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26273 value
26274 }
26275 }
26276
26277 unsafe impl fidl::encoding::TypeMarker for Size5Alignment1 {
26278 type Owned = Self;
26279
26280 #[inline(always)]
26281 fn inline_align(_context: fidl::encoding::Context) -> usize {
26282 1
26283 }
26284
26285 #[inline(always)]
26286 fn inline_size(_context: fidl::encoding::Context) -> usize {
26287 5
26288 }
26289 #[inline(always)]
26290 fn encode_is_copy() -> bool {
26291 true
26292 }
26293
26294 #[inline(always)]
26295 fn decode_is_copy() -> bool {
26296 true
26297 }
26298 }
26299
26300 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1, D>
26301 for &Size5Alignment1
26302 {
26303 #[inline]
26304 unsafe fn encode(
26305 self,
26306 encoder: &mut fidl::encoding::Encoder<'_, D>,
26307 offset: usize,
26308 _depth: fidl::encoding::Depth,
26309 ) -> fidl::Result<()> {
26310 encoder.debug_check_bounds::<Size5Alignment1>(offset);
26311 unsafe {
26312 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26314 (buf_ptr as *mut Size5Alignment1)
26315 .write_unaligned((self as *const Size5Alignment1).read());
26316 }
26319 Ok(())
26320 }
26321 }
26322 unsafe impl<
26323 D: fidl::encoding::ResourceDialect,
26324 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 5>, D>,
26325 > fidl::encoding::Encode<Size5Alignment1, D> for (T0,)
26326 {
26327 #[inline]
26328 unsafe fn encode(
26329 self,
26330 encoder: &mut fidl::encoding::Encoder<'_, D>,
26331 offset: usize,
26332 depth: fidl::encoding::Depth,
26333 ) -> fidl::Result<()> {
26334 encoder.debug_check_bounds::<Size5Alignment1>(offset);
26335 self.0.encode(encoder, offset + 0, depth)?;
26339 Ok(())
26340 }
26341 }
26342
26343 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1 {
26344 #[inline(always)]
26345 fn new_empty() -> Self {
26346 Self { data: fidl::new_empty!(fidl::encoding::Array<u8, 5>, D) }
26347 }
26348
26349 #[inline]
26350 unsafe fn decode(
26351 &mut self,
26352 decoder: &mut fidl::encoding::Decoder<'_, D>,
26353 offset: usize,
26354 _depth: fidl::encoding::Depth,
26355 ) -> fidl::Result<()> {
26356 decoder.debug_check_bounds::<Self>(offset);
26357 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26358 unsafe {
26361 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 5);
26362 }
26363 Ok(())
26364 }
26365 }
26366
26367 impl fidl::encoding::ValueTypeMarker for Size5Alignment1Array {
26368 type Borrowed<'a> = &'a Self;
26369 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26370 value
26371 }
26372 }
26373
26374 unsafe impl fidl::encoding::TypeMarker for Size5Alignment1Array {
26375 type Owned = Self;
26376
26377 #[inline(always)]
26378 fn inline_align(_context: fidl::encoding::Context) -> usize {
26379 1
26380 }
26381
26382 #[inline(always)]
26383 fn inline_size(_context: fidl::encoding::Context) -> usize {
26384 15
26385 }
26386 #[inline(always)]
26387 fn encode_is_copy() -> bool {
26388 true
26389 }
26390
26391 #[inline(always)]
26392 fn decode_is_copy() -> bool {
26393 true
26394 }
26395 }
26396
26397 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1Array, D>
26398 for &Size5Alignment1Array
26399 {
26400 #[inline]
26401 unsafe fn encode(
26402 self,
26403 encoder: &mut fidl::encoding::Encoder<'_, D>,
26404 offset: usize,
26405 _depth: fidl::encoding::Depth,
26406 ) -> fidl::Result<()> {
26407 encoder.debug_check_bounds::<Size5Alignment1Array>(offset);
26408 unsafe {
26409 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26411 (buf_ptr as *mut Size5Alignment1Array)
26412 .write_unaligned((self as *const Size5Alignment1Array).read());
26413 }
26416 Ok(())
26417 }
26418 }
26419 unsafe impl<
26420 D: fidl::encoding::ResourceDialect,
26421 T0: fidl::encoding::Encode<fidl::encoding::Array<Size5Alignment1, 3>, D>,
26422 > fidl::encoding::Encode<Size5Alignment1Array, D> for (T0,)
26423 {
26424 #[inline]
26425 unsafe fn encode(
26426 self,
26427 encoder: &mut fidl::encoding::Encoder<'_, D>,
26428 offset: usize,
26429 depth: fidl::encoding::Depth,
26430 ) -> fidl::Result<()> {
26431 encoder.debug_check_bounds::<Size5Alignment1Array>(offset);
26432 self.0.encode(encoder, offset + 0, depth)?;
26436 Ok(())
26437 }
26438 }
26439
26440 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1Array {
26441 #[inline(always)]
26442 fn new_empty() -> Self {
26443 Self { a: fidl::new_empty!(fidl::encoding::Array<Size5Alignment1, 3>, D) }
26444 }
26445
26446 #[inline]
26447 unsafe fn decode(
26448 &mut self,
26449 decoder: &mut fidl::encoding::Decoder<'_, D>,
26450 offset: usize,
26451 _depth: fidl::encoding::Depth,
26452 ) -> fidl::Result<()> {
26453 decoder.debug_check_bounds::<Self>(offset);
26454 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26455 unsafe {
26458 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 15);
26459 }
26460 Ok(())
26461 }
26462 }
26463
26464 impl fidl::encoding::ValueTypeMarker for Size5Alignment1Vector {
26465 type Borrowed<'a> = &'a Self;
26466 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26467 value
26468 }
26469 }
26470
26471 unsafe impl fidl::encoding::TypeMarker for Size5Alignment1Vector {
26472 type Owned = Self;
26473
26474 #[inline(always)]
26475 fn inline_align(_context: fidl::encoding::Context) -> usize {
26476 8
26477 }
26478
26479 #[inline(always)]
26480 fn inline_size(_context: fidl::encoding::Context) -> usize {
26481 16
26482 }
26483 }
26484
26485 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment1Vector, D>
26486 for &Size5Alignment1Vector
26487 {
26488 #[inline]
26489 unsafe fn encode(
26490 self,
26491 encoder: &mut fidl::encoding::Encoder<'_, D>,
26492 offset: usize,
26493 _depth: fidl::encoding::Depth,
26494 ) -> fidl::Result<()> {
26495 encoder.debug_check_bounds::<Size5Alignment1Vector>(offset);
26496 fidl::encoding::Encode::<Size5Alignment1Vector, D>::encode(
26498 (
26499 <fidl::encoding::UnboundedVector<Size5Alignment1> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
26500 ),
26501 encoder, offset, _depth
26502 )
26503 }
26504 }
26505 unsafe impl<
26506 D: fidl::encoding::ResourceDialect,
26507 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Size5Alignment1>, D>,
26508 > fidl::encoding::Encode<Size5Alignment1Vector, D> for (T0,)
26509 {
26510 #[inline]
26511 unsafe fn encode(
26512 self,
26513 encoder: &mut fidl::encoding::Encoder<'_, D>,
26514 offset: usize,
26515 depth: fidl::encoding::Depth,
26516 ) -> fidl::Result<()> {
26517 encoder.debug_check_bounds::<Size5Alignment1Vector>(offset);
26518 self.0.encode(encoder, offset + 0, depth)?;
26522 Ok(())
26523 }
26524 }
26525
26526 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment1Vector {
26527 #[inline(always)]
26528 fn new_empty() -> Self {
26529 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<Size5Alignment1>, D) }
26530 }
26531
26532 #[inline]
26533 unsafe fn decode(
26534 &mut self,
26535 decoder: &mut fidl::encoding::Decoder<'_, D>,
26536 offset: usize,
26537 _depth: fidl::encoding::Depth,
26538 ) -> fidl::Result<()> {
26539 decoder.debug_check_bounds::<Self>(offset);
26540 fidl::decode!(
26542 fidl::encoding::UnboundedVector<Size5Alignment1>,
26543 D,
26544 &mut self.v,
26545 decoder,
26546 offset + 0,
26547 _depth
26548 )?;
26549 Ok(())
26550 }
26551 }
26552
26553 impl fidl::encoding::ValueTypeMarker for Size5Alignment4 {
26554 type Borrowed<'a> = &'a Self;
26555 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26556 value
26557 }
26558 }
26559
26560 unsafe impl fidl::encoding::TypeMarker for Size5Alignment4 {
26561 type Owned = Self;
26562
26563 #[inline(always)]
26564 fn inline_align(_context: fidl::encoding::Context) -> usize {
26565 4
26566 }
26567
26568 #[inline(always)]
26569 fn inline_size(_context: fidl::encoding::Context) -> usize {
26570 8
26571 }
26572 }
26573
26574 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4, D>
26575 for &Size5Alignment4
26576 {
26577 #[inline]
26578 unsafe fn encode(
26579 self,
26580 encoder: &mut fidl::encoding::Encoder<'_, D>,
26581 offset: usize,
26582 _depth: fidl::encoding::Depth,
26583 ) -> fidl::Result<()> {
26584 encoder.debug_check_bounds::<Size5Alignment4>(offset);
26585 unsafe {
26586 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26588 (buf_ptr as *mut Size5Alignment4)
26589 .write_unaligned((self as *const Size5Alignment4).read());
26590 let padding_ptr = buf_ptr.offset(4) as *mut u32;
26593 let padding_mask = 0xffffff00u32;
26594 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26595 }
26596 Ok(())
26597 }
26598 }
26599 unsafe impl<
26600 D: fidl::encoding::ResourceDialect,
26601 T0: fidl::encoding::Encode<u32, D>,
26602 T1: fidl::encoding::Encode<u8, D>,
26603 > fidl::encoding::Encode<Size5Alignment4, D> for (T0, T1)
26604 {
26605 #[inline]
26606 unsafe fn encode(
26607 self,
26608 encoder: &mut fidl::encoding::Encoder<'_, D>,
26609 offset: usize,
26610 depth: fidl::encoding::Depth,
26611 ) -> fidl::Result<()> {
26612 encoder.debug_check_bounds::<Size5Alignment4>(offset);
26613 unsafe {
26616 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
26617 (ptr as *mut u32).write_unaligned(0);
26618 }
26619 self.0.encode(encoder, offset + 0, depth)?;
26621 self.1.encode(encoder, offset + 4, depth)?;
26622 Ok(())
26623 }
26624 }
26625
26626 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4 {
26627 #[inline(always)]
26628 fn new_empty() -> Self {
26629 Self { four: fidl::new_empty!(u32, D), one: fidl::new_empty!(u8, D) }
26630 }
26631
26632 #[inline]
26633 unsafe fn decode(
26634 &mut self,
26635 decoder: &mut fidl::encoding::Decoder<'_, D>,
26636 offset: usize,
26637 _depth: fidl::encoding::Depth,
26638 ) -> fidl::Result<()> {
26639 decoder.debug_check_bounds::<Self>(offset);
26640 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26641 let ptr = unsafe { buf_ptr.offset(4) };
26643 let padval = unsafe { (ptr as *const u32).read_unaligned() };
26644 let mask = 0xffffff00u32;
26645 let maskedval = padval & mask;
26646 if maskedval != 0 {
26647 return Err(fidl::Error::NonZeroPadding {
26648 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
26649 });
26650 }
26651 unsafe {
26653 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
26654 }
26655 Ok(())
26656 }
26657 }
26658
26659 impl fidl::encoding::ValueTypeMarker for Size5Alignment4Array {
26660 type Borrowed<'a> = &'a Self;
26661 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26662 value
26663 }
26664 }
26665
26666 unsafe impl fidl::encoding::TypeMarker for Size5Alignment4Array {
26667 type Owned = Self;
26668
26669 #[inline(always)]
26670 fn inline_align(_context: fidl::encoding::Context) -> usize {
26671 4
26672 }
26673
26674 #[inline(always)]
26675 fn inline_size(_context: fidl::encoding::Context) -> usize {
26676 24
26677 }
26678 }
26679
26680 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4Array, D>
26681 for &Size5Alignment4Array
26682 {
26683 #[inline]
26684 unsafe fn encode(
26685 self,
26686 encoder: &mut fidl::encoding::Encoder<'_, D>,
26687 offset: usize,
26688 _depth: fidl::encoding::Depth,
26689 ) -> fidl::Result<()> {
26690 encoder.debug_check_bounds::<Size5Alignment4Array>(offset);
26691 unsafe {
26692 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26694 (buf_ptr as *mut Size5Alignment4Array)
26695 .write_unaligned((self as *const Size5Alignment4Array).read());
26696 let padding_ptr = buf_ptr.offset(4) as *mut u32;
26699 let padding_mask = 0xffffff00u32;
26700 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26701 let padding_ptr = buf_ptr.offset(12) as *mut u32;
26702 let padding_mask = 0xffffff00u32;
26703 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26704 let padding_ptr = buf_ptr.offset(20) as *mut u32;
26705 let padding_mask = 0xffffff00u32;
26706 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
26707 }
26708 Ok(())
26709 }
26710 }
26711 unsafe impl<
26712 D: fidl::encoding::ResourceDialect,
26713 T0: fidl::encoding::Encode<fidl::encoding::Array<Size5Alignment4, 3>, D>,
26714 > fidl::encoding::Encode<Size5Alignment4Array, D> for (T0,)
26715 {
26716 #[inline]
26717 unsafe fn encode(
26718 self,
26719 encoder: &mut fidl::encoding::Encoder<'_, D>,
26720 offset: usize,
26721 depth: fidl::encoding::Depth,
26722 ) -> fidl::Result<()> {
26723 encoder.debug_check_bounds::<Size5Alignment4Array>(offset);
26724 self.0.encode(encoder, offset + 0, depth)?;
26728 Ok(())
26729 }
26730 }
26731
26732 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4Array {
26733 #[inline(always)]
26734 fn new_empty() -> Self {
26735 Self { a: fidl::new_empty!(fidl::encoding::Array<Size5Alignment4, 3>, D) }
26736 }
26737
26738 #[inline]
26739 unsafe fn decode(
26740 &mut self,
26741 decoder: &mut fidl::encoding::Decoder<'_, D>,
26742 offset: usize,
26743 _depth: fidl::encoding::Depth,
26744 ) -> fidl::Result<()> {
26745 decoder.debug_check_bounds::<Self>(offset);
26746 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26747 let ptr = unsafe { buf_ptr.offset(4) };
26749 let padval = unsafe { (ptr as *const u32).read_unaligned() };
26750 let mask = 0xffffff00u32;
26751 let maskedval = padval & mask;
26752 if maskedval != 0 {
26753 return Err(fidl::Error::NonZeroPadding {
26754 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
26755 });
26756 }
26757 let ptr = unsafe { buf_ptr.offset(12) };
26758 let padval = unsafe { (ptr as *const u32).read_unaligned() };
26759 let mask = 0xffffff00u32;
26760 let maskedval = padval & mask;
26761 if maskedval != 0 {
26762 return Err(fidl::Error::NonZeroPadding {
26763 padding_start: offset + 12 + ((mask as u64).trailing_zeros() / 8) as usize,
26764 });
26765 }
26766 let ptr = unsafe { buf_ptr.offset(20) };
26767 let padval = unsafe { (ptr as *const u32).read_unaligned() };
26768 let mask = 0xffffff00u32;
26769 let maskedval = padval & mask;
26770 if maskedval != 0 {
26771 return Err(fidl::Error::NonZeroPadding {
26772 padding_start: offset + 20 + ((mask as u64).trailing_zeros() / 8) as usize,
26773 });
26774 }
26775 unsafe {
26777 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
26778 }
26779 Ok(())
26780 }
26781 }
26782
26783 impl fidl::encoding::ValueTypeMarker for Size5Alignment4Vector {
26784 type Borrowed<'a> = &'a Self;
26785 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26786 value
26787 }
26788 }
26789
26790 unsafe impl fidl::encoding::TypeMarker for Size5Alignment4Vector {
26791 type Owned = Self;
26792
26793 #[inline(always)]
26794 fn inline_align(_context: fidl::encoding::Context) -> usize {
26795 8
26796 }
26797
26798 #[inline(always)]
26799 fn inline_size(_context: fidl::encoding::Context) -> usize {
26800 16
26801 }
26802 }
26803
26804 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size5Alignment4Vector, D>
26805 for &Size5Alignment4Vector
26806 {
26807 #[inline]
26808 unsafe fn encode(
26809 self,
26810 encoder: &mut fidl::encoding::Encoder<'_, D>,
26811 offset: usize,
26812 _depth: fidl::encoding::Depth,
26813 ) -> fidl::Result<()> {
26814 encoder.debug_check_bounds::<Size5Alignment4Vector>(offset);
26815 fidl::encoding::Encode::<Size5Alignment4Vector, D>::encode(
26817 (
26818 <fidl::encoding::UnboundedVector<Size5Alignment4> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
26819 ),
26820 encoder, offset, _depth
26821 )
26822 }
26823 }
26824 unsafe impl<
26825 D: fidl::encoding::ResourceDialect,
26826 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Size5Alignment4>, D>,
26827 > fidl::encoding::Encode<Size5Alignment4Vector, D> for (T0,)
26828 {
26829 #[inline]
26830 unsafe fn encode(
26831 self,
26832 encoder: &mut fidl::encoding::Encoder<'_, D>,
26833 offset: usize,
26834 depth: fidl::encoding::Depth,
26835 ) -> fidl::Result<()> {
26836 encoder.debug_check_bounds::<Size5Alignment4Vector>(offset);
26837 self.0.encode(encoder, offset + 0, depth)?;
26841 Ok(())
26842 }
26843 }
26844
26845 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size5Alignment4Vector {
26846 #[inline(always)]
26847 fn new_empty() -> Self {
26848 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<Size5Alignment4>, D) }
26849 }
26850
26851 #[inline]
26852 unsafe fn decode(
26853 &mut self,
26854 decoder: &mut fidl::encoding::Decoder<'_, D>,
26855 offset: usize,
26856 _depth: fidl::encoding::Depth,
26857 ) -> fidl::Result<()> {
26858 decoder.debug_check_bounds::<Self>(offset);
26859 fidl::decode!(
26861 fidl::encoding::UnboundedVector<Size5Alignment4>,
26862 D,
26863 &mut self.v,
26864 decoder,
26865 offset + 0,
26866 _depth
26867 )?;
26868 Ok(())
26869 }
26870 }
26871
26872 impl fidl::encoding::ValueTypeMarker for Size8Align8 {
26873 type Borrowed<'a> = &'a Self;
26874 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26875 value
26876 }
26877 }
26878
26879 unsafe impl fidl::encoding::TypeMarker for Size8Align8 {
26880 type Owned = Self;
26881
26882 #[inline(always)]
26883 fn inline_align(_context: fidl::encoding::Context) -> usize {
26884 8
26885 }
26886
26887 #[inline(always)]
26888 fn inline_size(_context: fidl::encoding::Context) -> usize {
26889 8
26890 }
26891 #[inline(always)]
26892 fn encode_is_copy() -> bool {
26893 true
26894 }
26895
26896 #[inline(always)]
26897 fn decode_is_copy() -> bool {
26898 true
26899 }
26900 }
26901
26902 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Size8Align8, D>
26903 for &Size8Align8
26904 {
26905 #[inline]
26906 unsafe fn encode(
26907 self,
26908 encoder: &mut fidl::encoding::Encoder<'_, D>,
26909 offset: usize,
26910 _depth: fidl::encoding::Depth,
26911 ) -> fidl::Result<()> {
26912 encoder.debug_check_bounds::<Size8Align8>(offset);
26913 unsafe {
26914 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
26916 (buf_ptr as *mut Size8Align8).write_unaligned((self as *const Size8Align8).read());
26917 }
26920 Ok(())
26921 }
26922 }
26923 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
26924 fidl::encoding::Encode<Size8Align8, D> for (T0,)
26925 {
26926 #[inline]
26927 unsafe fn encode(
26928 self,
26929 encoder: &mut fidl::encoding::Encoder<'_, D>,
26930 offset: usize,
26931 depth: fidl::encoding::Depth,
26932 ) -> fidl::Result<()> {
26933 encoder.debug_check_bounds::<Size8Align8>(offset);
26934 self.0.encode(encoder, offset + 0, depth)?;
26938 Ok(())
26939 }
26940 }
26941
26942 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Size8Align8 {
26943 #[inline(always)]
26944 fn new_empty() -> Self {
26945 Self { data: fidl::new_empty!(u64, D) }
26946 }
26947
26948 #[inline]
26949 unsafe fn decode(
26950 &mut self,
26951 decoder: &mut fidl::encoding::Decoder<'_, D>,
26952 offset: usize,
26953 _depth: fidl::encoding::Depth,
26954 ) -> fidl::Result<()> {
26955 decoder.debug_check_bounds::<Self>(offset);
26956 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
26957 unsafe {
26960 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
26961 }
26962 Ok(())
26963 }
26964 }
26965
26966 impl fidl::encoding::ValueTypeMarker for StrictBitsUint16Struct {
26967 type Borrowed<'a> = &'a Self;
26968 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26969 value
26970 }
26971 }
26972
26973 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint16Struct {
26974 type Owned = Self;
26975
26976 #[inline(always)]
26977 fn inline_align(_context: fidl::encoding::Context) -> usize {
26978 2
26979 }
26980
26981 #[inline(always)]
26982 fn inline_size(_context: fidl::encoding::Context) -> usize {
26983 2
26984 }
26985 }
26986
26987 unsafe impl<D: fidl::encoding::ResourceDialect>
26988 fidl::encoding::Encode<StrictBitsUint16Struct, D> for &StrictBitsUint16Struct
26989 {
26990 #[inline]
26991 unsafe fn encode(
26992 self,
26993 encoder: &mut fidl::encoding::Encoder<'_, D>,
26994 offset: usize,
26995 _depth: fidl::encoding::Depth,
26996 ) -> fidl::Result<()> {
26997 encoder.debug_check_bounds::<StrictBitsUint16Struct>(offset);
26998 fidl::encoding::Encode::<StrictBitsUint16Struct, D>::encode(
27000 (<StrictBitsUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27001 encoder,
27002 offset,
27003 _depth,
27004 )
27005 }
27006 }
27007 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint16, D>>
27008 fidl::encoding::Encode<StrictBitsUint16Struct, D> for (T0,)
27009 {
27010 #[inline]
27011 unsafe fn encode(
27012 self,
27013 encoder: &mut fidl::encoding::Encoder<'_, D>,
27014 offset: usize,
27015 depth: fidl::encoding::Depth,
27016 ) -> fidl::Result<()> {
27017 encoder.debug_check_bounds::<StrictBitsUint16Struct>(offset);
27018 self.0.encode(encoder, offset + 0, depth)?;
27022 Ok(())
27023 }
27024 }
27025
27026 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27027 for StrictBitsUint16Struct
27028 {
27029 #[inline(always)]
27030 fn new_empty() -> Self {
27031 Self { b: fidl::new_empty!(StrictBitsUint16, D) }
27032 }
27033
27034 #[inline]
27035 unsafe fn decode(
27036 &mut self,
27037 decoder: &mut fidl::encoding::Decoder<'_, D>,
27038 offset: usize,
27039 _depth: fidl::encoding::Depth,
27040 ) -> fidl::Result<()> {
27041 decoder.debug_check_bounds::<Self>(offset);
27042 fidl::decode!(StrictBitsUint16, D, &mut self.b, decoder, offset + 0, _depth)?;
27044 Ok(())
27045 }
27046 }
27047
27048 impl fidl::encoding::ValueTypeMarker for StrictBitsUint32Struct {
27049 type Borrowed<'a> = &'a Self;
27050 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27051 value
27052 }
27053 }
27054
27055 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint32Struct {
27056 type Owned = Self;
27057
27058 #[inline(always)]
27059 fn inline_align(_context: fidl::encoding::Context) -> usize {
27060 4
27061 }
27062
27063 #[inline(always)]
27064 fn inline_size(_context: fidl::encoding::Context) -> usize {
27065 4
27066 }
27067 }
27068
27069 unsafe impl<D: fidl::encoding::ResourceDialect>
27070 fidl::encoding::Encode<StrictBitsUint32Struct, D> for &StrictBitsUint32Struct
27071 {
27072 #[inline]
27073 unsafe fn encode(
27074 self,
27075 encoder: &mut fidl::encoding::Encoder<'_, D>,
27076 offset: usize,
27077 _depth: fidl::encoding::Depth,
27078 ) -> fidl::Result<()> {
27079 encoder.debug_check_bounds::<StrictBitsUint32Struct>(offset);
27080 fidl::encoding::Encode::<StrictBitsUint32Struct, D>::encode(
27082 (<StrictBitsUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27083 encoder,
27084 offset,
27085 _depth,
27086 )
27087 }
27088 }
27089 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint32, D>>
27090 fidl::encoding::Encode<StrictBitsUint32Struct, D> for (T0,)
27091 {
27092 #[inline]
27093 unsafe fn encode(
27094 self,
27095 encoder: &mut fidl::encoding::Encoder<'_, D>,
27096 offset: usize,
27097 depth: fidl::encoding::Depth,
27098 ) -> fidl::Result<()> {
27099 encoder.debug_check_bounds::<StrictBitsUint32Struct>(offset);
27100 self.0.encode(encoder, offset + 0, depth)?;
27104 Ok(())
27105 }
27106 }
27107
27108 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27109 for StrictBitsUint32Struct
27110 {
27111 #[inline(always)]
27112 fn new_empty() -> Self {
27113 Self { b: fidl::new_empty!(StrictBitsUint32, D) }
27114 }
27115
27116 #[inline]
27117 unsafe fn decode(
27118 &mut self,
27119 decoder: &mut fidl::encoding::Decoder<'_, D>,
27120 offset: usize,
27121 _depth: fidl::encoding::Depth,
27122 ) -> fidl::Result<()> {
27123 decoder.debug_check_bounds::<Self>(offset);
27124 fidl::decode!(StrictBitsUint32, D, &mut self.b, decoder, offset + 0, _depth)?;
27126 Ok(())
27127 }
27128 }
27129
27130 impl fidl::encoding::ValueTypeMarker for StrictBitsUint64Struct {
27131 type Borrowed<'a> = &'a Self;
27132 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27133 value
27134 }
27135 }
27136
27137 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint64Struct {
27138 type Owned = Self;
27139
27140 #[inline(always)]
27141 fn inline_align(_context: fidl::encoding::Context) -> usize {
27142 8
27143 }
27144
27145 #[inline(always)]
27146 fn inline_size(_context: fidl::encoding::Context) -> usize {
27147 8
27148 }
27149 }
27150
27151 unsafe impl<D: fidl::encoding::ResourceDialect>
27152 fidl::encoding::Encode<StrictBitsUint64Struct, D> for &StrictBitsUint64Struct
27153 {
27154 #[inline]
27155 unsafe fn encode(
27156 self,
27157 encoder: &mut fidl::encoding::Encoder<'_, D>,
27158 offset: usize,
27159 _depth: fidl::encoding::Depth,
27160 ) -> fidl::Result<()> {
27161 encoder.debug_check_bounds::<StrictBitsUint64Struct>(offset);
27162 fidl::encoding::Encode::<StrictBitsUint64Struct, D>::encode(
27164 (<StrictBitsUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27165 encoder,
27166 offset,
27167 _depth,
27168 )
27169 }
27170 }
27171 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint64, D>>
27172 fidl::encoding::Encode<StrictBitsUint64Struct, D> for (T0,)
27173 {
27174 #[inline]
27175 unsafe fn encode(
27176 self,
27177 encoder: &mut fidl::encoding::Encoder<'_, D>,
27178 offset: usize,
27179 depth: fidl::encoding::Depth,
27180 ) -> fidl::Result<()> {
27181 encoder.debug_check_bounds::<StrictBitsUint64Struct>(offset);
27182 self.0.encode(encoder, offset + 0, depth)?;
27186 Ok(())
27187 }
27188 }
27189
27190 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27191 for StrictBitsUint64Struct
27192 {
27193 #[inline(always)]
27194 fn new_empty() -> Self {
27195 Self { b: fidl::new_empty!(StrictBitsUint64, D) }
27196 }
27197
27198 #[inline]
27199 unsafe fn decode(
27200 &mut self,
27201 decoder: &mut fidl::encoding::Decoder<'_, D>,
27202 offset: usize,
27203 _depth: fidl::encoding::Depth,
27204 ) -> fidl::Result<()> {
27205 decoder.debug_check_bounds::<Self>(offset);
27206 fidl::decode!(StrictBitsUint64, D, &mut self.b, decoder, offset + 0, _depth)?;
27208 Ok(())
27209 }
27210 }
27211
27212 impl fidl::encoding::ValueTypeMarker for StrictBitsUint8Struct {
27213 type Borrowed<'a> = &'a Self;
27214 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27215 value
27216 }
27217 }
27218
27219 unsafe impl fidl::encoding::TypeMarker for StrictBitsUint8Struct {
27220 type Owned = Self;
27221
27222 #[inline(always)]
27223 fn inline_align(_context: fidl::encoding::Context) -> usize {
27224 1
27225 }
27226
27227 #[inline(always)]
27228 fn inline_size(_context: fidl::encoding::Context) -> usize {
27229 1
27230 }
27231 }
27232
27233 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictBitsUint8Struct, D>
27234 for &StrictBitsUint8Struct
27235 {
27236 #[inline]
27237 unsafe fn encode(
27238 self,
27239 encoder: &mut fidl::encoding::Encoder<'_, D>,
27240 offset: usize,
27241 _depth: fidl::encoding::Depth,
27242 ) -> fidl::Result<()> {
27243 encoder.debug_check_bounds::<StrictBitsUint8Struct>(offset);
27244 fidl::encoding::Encode::<StrictBitsUint8Struct, D>::encode(
27246 (<StrictBitsUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.b),),
27247 encoder,
27248 offset,
27249 _depth,
27250 )
27251 }
27252 }
27253 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictBitsUint8, D>>
27254 fidl::encoding::Encode<StrictBitsUint8Struct, D> for (T0,)
27255 {
27256 #[inline]
27257 unsafe fn encode(
27258 self,
27259 encoder: &mut fidl::encoding::Encoder<'_, D>,
27260 offset: usize,
27261 depth: fidl::encoding::Depth,
27262 ) -> fidl::Result<()> {
27263 encoder.debug_check_bounds::<StrictBitsUint8Struct>(offset);
27264 self.0.encode(encoder, offset + 0, depth)?;
27268 Ok(())
27269 }
27270 }
27271
27272 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictBitsUint8Struct {
27273 #[inline(always)]
27274 fn new_empty() -> Self {
27275 Self { b: fidl::new_empty!(StrictBitsUint8, D) }
27276 }
27277
27278 #[inline]
27279 unsafe fn decode(
27280 &mut self,
27281 decoder: &mut fidl::encoding::Decoder<'_, D>,
27282 offset: usize,
27283 _depth: fidl::encoding::Depth,
27284 ) -> fidl::Result<()> {
27285 decoder.debug_check_bounds::<Self>(offset);
27286 fidl::decode!(StrictBitsUint8, D, &mut self.b, decoder, offset + 0, _depth)?;
27288 Ok(())
27289 }
27290 }
27291
27292 impl fidl::encoding::ValueTypeMarker for StrictEnumInt16Struct {
27293 type Borrowed<'a> = &'a Self;
27294 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27295 value
27296 }
27297 }
27298
27299 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt16Struct {
27300 type Owned = Self;
27301
27302 #[inline(always)]
27303 fn inline_align(_context: fidl::encoding::Context) -> usize {
27304 2
27305 }
27306
27307 #[inline(always)]
27308 fn inline_size(_context: fidl::encoding::Context) -> usize {
27309 2
27310 }
27311 }
27312
27313 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt16Struct, D>
27314 for &StrictEnumInt16Struct
27315 {
27316 #[inline]
27317 unsafe fn encode(
27318 self,
27319 encoder: &mut fidl::encoding::Encoder<'_, D>,
27320 offset: usize,
27321 _depth: fidl::encoding::Depth,
27322 ) -> fidl::Result<()> {
27323 encoder.debug_check_bounds::<StrictEnumInt16Struct>(offset);
27324 fidl::encoding::Encode::<StrictEnumInt16Struct, D>::encode(
27326 (<StrictEnumInt16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27327 encoder,
27328 offset,
27329 _depth,
27330 )
27331 }
27332 }
27333 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt16, D>>
27334 fidl::encoding::Encode<StrictEnumInt16Struct, D> for (T0,)
27335 {
27336 #[inline]
27337 unsafe fn encode(
27338 self,
27339 encoder: &mut fidl::encoding::Encoder<'_, D>,
27340 offset: usize,
27341 depth: fidl::encoding::Depth,
27342 ) -> fidl::Result<()> {
27343 encoder.debug_check_bounds::<StrictEnumInt16Struct>(offset);
27344 self.0.encode(encoder, offset + 0, depth)?;
27348 Ok(())
27349 }
27350 }
27351
27352 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt16Struct {
27353 #[inline(always)]
27354 fn new_empty() -> Self {
27355 Self { e: fidl::new_empty!(StrictEnumInt16, D) }
27356 }
27357
27358 #[inline]
27359 unsafe fn decode(
27360 &mut self,
27361 decoder: &mut fidl::encoding::Decoder<'_, D>,
27362 offset: usize,
27363 _depth: fidl::encoding::Depth,
27364 ) -> fidl::Result<()> {
27365 decoder.debug_check_bounds::<Self>(offset);
27366 fidl::decode!(StrictEnumInt16, D, &mut self.e, decoder, offset + 0, _depth)?;
27368 Ok(())
27369 }
27370 }
27371
27372 impl fidl::encoding::ValueTypeMarker for StrictEnumInt32Struct {
27373 type Borrowed<'a> = &'a Self;
27374 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27375 value
27376 }
27377 }
27378
27379 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt32Struct {
27380 type Owned = Self;
27381
27382 #[inline(always)]
27383 fn inline_align(_context: fidl::encoding::Context) -> usize {
27384 4
27385 }
27386
27387 #[inline(always)]
27388 fn inline_size(_context: fidl::encoding::Context) -> usize {
27389 4
27390 }
27391 }
27392
27393 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt32Struct, D>
27394 for &StrictEnumInt32Struct
27395 {
27396 #[inline]
27397 unsafe fn encode(
27398 self,
27399 encoder: &mut fidl::encoding::Encoder<'_, D>,
27400 offset: usize,
27401 _depth: fidl::encoding::Depth,
27402 ) -> fidl::Result<()> {
27403 encoder.debug_check_bounds::<StrictEnumInt32Struct>(offset);
27404 fidl::encoding::Encode::<StrictEnumInt32Struct, D>::encode(
27406 (<StrictEnumInt32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27407 encoder,
27408 offset,
27409 _depth,
27410 )
27411 }
27412 }
27413 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt32, D>>
27414 fidl::encoding::Encode<StrictEnumInt32Struct, D> for (T0,)
27415 {
27416 #[inline]
27417 unsafe fn encode(
27418 self,
27419 encoder: &mut fidl::encoding::Encoder<'_, D>,
27420 offset: usize,
27421 depth: fidl::encoding::Depth,
27422 ) -> fidl::Result<()> {
27423 encoder.debug_check_bounds::<StrictEnumInt32Struct>(offset);
27424 self.0.encode(encoder, offset + 0, depth)?;
27428 Ok(())
27429 }
27430 }
27431
27432 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt32Struct {
27433 #[inline(always)]
27434 fn new_empty() -> Self {
27435 Self { e: fidl::new_empty!(StrictEnumInt32, D) }
27436 }
27437
27438 #[inline]
27439 unsafe fn decode(
27440 &mut self,
27441 decoder: &mut fidl::encoding::Decoder<'_, D>,
27442 offset: usize,
27443 _depth: fidl::encoding::Depth,
27444 ) -> fidl::Result<()> {
27445 decoder.debug_check_bounds::<Self>(offset);
27446 fidl::decode!(StrictEnumInt32, D, &mut self.e, decoder, offset + 0, _depth)?;
27448 Ok(())
27449 }
27450 }
27451
27452 impl fidl::encoding::ValueTypeMarker for StrictEnumInt64Struct {
27453 type Borrowed<'a> = &'a Self;
27454 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27455 value
27456 }
27457 }
27458
27459 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt64Struct {
27460 type Owned = Self;
27461
27462 #[inline(always)]
27463 fn inline_align(_context: fidl::encoding::Context) -> usize {
27464 8
27465 }
27466
27467 #[inline(always)]
27468 fn inline_size(_context: fidl::encoding::Context) -> usize {
27469 8
27470 }
27471 }
27472
27473 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt64Struct, D>
27474 for &StrictEnumInt64Struct
27475 {
27476 #[inline]
27477 unsafe fn encode(
27478 self,
27479 encoder: &mut fidl::encoding::Encoder<'_, D>,
27480 offset: usize,
27481 _depth: fidl::encoding::Depth,
27482 ) -> fidl::Result<()> {
27483 encoder.debug_check_bounds::<StrictEnumInt64Struct>(offset);
27484 fidl::encoding::Encode::<StrictEnumInt64Struct, D>::encode(
27486 (<StrictEnumInt64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27487 encoder,
27488 offset,
27489 _depth,
27490 )
27491 }
27492 }
27493 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt64, D>>
27494 fidl::encoding::Encode<StrictEnumInt64Struct, D> for (T0,)
27495 {
27496 #[inline]
27497 unsafe fn encode(
27498 self,
27499 encoder: &mut fidl::encoding::Encoder<'_, D>,
27500 offset: usize,
27501 depth: fidl::encoding::Depth,
27502 ) -> fidl::Result<()> {
27503 encoder.debug_check_bounds::<StrictEnumInt64Struct>(offset);
27504 self.0.encode(encoder, offset + 0, depth)?;
27508 Ok(())
27509 }
27510 }
27511
27512 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt64Struct {
27513 #[inline(always)]
27514 fn new_empty() -> Self {
27515 Self { e: fidl::new_empty!(StrictEnumInt64, D) }
27516 }
27517
27518 #[inline]
27519 unsafe fn decode(
27520 &mut self,
27521 decoder: &mut fidl::encoding::Decoder<'_, D>,
27522 offset: usize,
27523 _depth: fidl::encoding::Depth,
27524 ) -> fidl::Result<()> {
27525 decoder.debug_check_bounds::<Self>(offset);
27526 fidl::decode!(StrictEnumInt64, D, &mut self.e, decoder, offset + 0, _depth)?;
27528 Ok(())
27529 }
27530 }
27531
27532 impl fidl::encoding::ValueTypeMarker for StrictEnumInt8Struct {
27533 type Borrowed<'a> = &'a Self;
27534 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27535 value
27536 }
27537 }
27538
27539 unsafe impl fidl::encoding::TypeMarker for StrictEnumInt8Struct {
27540 type Owned = Self;
27541
27542 #[inline(always)]
27543 fn inline_align(_context: fidl::encoding::Context) -> usize {
27544 1
27545 }
27546
27547 #[inline(always)]
27548 fn inline_size(_context: fidl::encoding::Context) -> usize {
27549 1
27550 }
27551 }
27552
27553 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumInt8Struct, D>
27554 for &StrictEnumInt8Struct
27555 {
27556 #[inline]
27557 unsafe fn encode(
27558 self,
27559 encoder: &mut fidl::encoding::Encoder<'_, D>,
27560 offset: usize,
27561 _depth: fidl::encoding::Depth,
27562 ) -> fidl::Result<()> {
27563 encoder.debug_check_bounds::<StrictEnumInt8Struct>(offset);
27564 fidl::encoding::Encode::<StrictEnumInt8Struct, D>::encode(
27566 (<StrictEnumInt8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27567 encoder,
27568 offset,
27569 _depth,
27570 )
27571 }
27572 }
27573 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumInt8, D>>
27574 fidl::encoding::Encode<StrictEnumInt8Struct, D> for (T0,)
27575 {
27576 #[inline]
27577 unsafe fn encode(
27578 self,
27579 encoder: &mut fidl::encoding::Encoder<'_, D>,
27580 offset: usize,
27581 depth: fidl::encoding::Depth,
27582 ) -> fidl::Result<()> {
27583 encoder.debug_check_bounds::<StrictEnumInt8Struct>(offset);
27584 self.0.encode(encoder, offset + 0, depth)?;
27588 Ok(())
27589 }
27590 }
27591
27592 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumInt8Struct {
27593 #[inline(always)]
27594 fn new_empty() -> Self {
27595 Self { e: fidl::new_empty!(StrictEnumInt8, D) }
27596 }
27597
27598 #[inline]
27599 unsafe fn decode(
27600 &mut self,
27601 decoder: &mut fidl::encoding::Decoder<'_, D>,
27602 offset: usize,
27603 _depth: fidl::encoding::Depth,
27604 ) -> fidl::Result<()> {
27605 decoder.debug_check_bounds::<Self>(offset);
27606 fidl::decode!(StrictEnumInt8, D, &mut self.e, decoder, offset + 0, _depth)?;
27608 Ok(())
27609 }
27610 }
27611
27612 impl fidl::encoding::ValueTypeMarker for StrictEnumUint16Struct {
27613 type Borrowed<'a> = &'a Self;
27614 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27615 value
27616 }
27617 }
27618
27619 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint16Struct {
27620 type Owned = Self;
27621
27622 #[inline(always)]
27623 fn inline_align(_context: fidl::encoding::Context) -> usize {
27624 2
27625 }
27626
27627 #[inline(always)]
27628 fn inline_size(_context: fidl::encoding::Context) -> usize {
27629 2
27630 }
27631 }
27632
27633 unsafe impl<D: fidl::encoding::ResourceDialect>
27634 fidl::encoding::Encode<StrictEnumUint16Struct, D> for &StrictEnumUint16Struct
27635 {
27636 #[inline]
27637 unsafe fn encode(
27638 self,
27639 encoder: &mut fidl::encoding::Encoder<'_, D>,
27640 offset: usize,
27641 _depth: fidl::encoding::Depth,
27642 ) -> fidl::Result<()> {
27643 encoder.debug_check_bounds::<StrictEnumUint16Struct>(offset);
27644 fidl::encoding::Encode::<StrictEnumUint16Struct, D>::encode(
27646 (<StrictEnumUint16 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27647 encoder,
27648 offset,
27649 _depth,
27650 )
27651 }
27652 }
27653 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint16, D>>
27654 fidl::encoding::Encode<StrictEnumUint16Struct, D> for (T0,)
27655 {
27656 #[inline]
27657 unsafe fn encode(
27658 self,
27659 encoder: &mut fidl::encoding::Encoder<'_, D>,
27660 offset: usize,
27661 depth: fidl::encoding::Depth,
27662 ) -> fidl::Result<()> {
27663 encoder.debug_check_bounds::<StrictEnumUint16Struct>(offset);
27664 self.0.encode(encoder, offset + 0, depth)?;
27668 Ok(())
27669 }
27670 }
27671
27672 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27673 for StrictEnumUint16Struct
27674 {
27675 #[inline(always)]
27676 fn new_empty() -> Self {
27677 Self { e: fidl::new_empty!(StrictEnumUint16, D) }
27678 }
27679
27680 #[inline]
27681 unsafe fn decode(
27682 &mut self,
27683 decoder: &mut fidl::encoding::Decoder<'_, D>,
27684 offset: usize,
27685 _depth: fidl::encoding::Depth,
27686 ) -> fidl::Result<()> {
27687 decoder.debug_check_bounds::<Self>(offset);
27688 fidl::decode!(StrictEnumUint16, D, &mut self.e, decoder, offset + 0, _depth)?;
27690 Ok(())
27691 }
27692 }
27693
27694 impl fidl::encoding::ValueTypeMarker for StrictEnumUint32Struct {
27695 type Borrowed<'a> = &'a Self;
27696 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27697 value
27698 }
27699 }
27700
27701 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint32Struct {
27702 type Owned = Self;
27703
27704 #[inline(always)]
27705 fn inline_align(_context: fidl::encoding::Context) -> usize {
27706 4
27707 }
27708
27709 #[inline(always)]
27710 fn inline_size(_context: fidl::encoding::Context) -> usize {
27711 4
27712 }
27713 }
27714
27715 unsafe impl<D: fidl::encoding::ResourceDialect>
27716 fidl::encoding::Encode<StrictEnumUint32Struct, D> for &StrictEnumUint32Struct
27717 {
27718 #[inline]
27719 unsafe fn encode(
27720 self,
27721 encoder: &mut fidl::encoding::Encoder<'_, D>,
27722 offset: usize,
27723 _depth: fidl::encoding::Depth,
27724 ) -> fidl::Result<()> {
27725 encoder.debug_check_bounds::<StrictEnumUint32Struct>(offset);
27726 fidl::encoding::Encode::<StrictEnumUint32Struct, D>::encode(
27728 (<StrictEnumUint32 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27729 encoder,
27730 offset,
27731 _depth,
27732 )
27733 }
27734 }
27735 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint32, D>>
27736 fidl::encoding::Encode<StrictEnumUint32Struct, D> for (T0,)
27737 {
27738 #[inline]
27739 unsafe fn encode(
27740 self,
27741 encoder: &mut fidl::encoding::Encoder<'_, D>,
27742 offset: usize,
27743 depth: fidl::encoding::Depth,
27744 ) -> fidl::Result<()> {
27745 encoder.debug_check_bounds::<StrictEnumUint32Struct>(offset);
27746 self.0.encode(encoder, offset + 0, depth)?;
27750 Ok(())
27751 }
27752 }
27753
27754 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27755 for StrictEnumUint32Struct
27756 {
27757 #[inline(always)]
27758 fn new_empty() -> Self {
27759 Self { e: fidl::new_empty!(StrictEnumUint32, D) }
27760 }
27761
27762 #[inline]
27763 unsafe fn decode(
27764 &mut self,
27765 decoder: &mut fidl::encoding::Decoder<'_, D>,
27766 offset: usize,
27767 _depth: fidl::encoding::Depth,
27768 ) -> fidl::Result<()> {
27769 decoder.debug_check_bounds::<Self>(offset);
27770 fidl::decode!(StrictEnumUint32, D, &mut self.e, decoder, offset + 0, _depth)?;
27772 Ok(())
27773 }
27774 }
27775
27776 impl fidl::encoding::ValueTypeMarker for StrictEnumUint64Struct {
27777 type Borrowed<'a> = &'a Self;
27778 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27779 value
27780 }
27781 }
27782
27783 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint64Struct {
27784 type Owned = Self;
27785
27786 #[inline(always)]
27787 fn inline_align(_context: fidl::encoding::Context) -> usize {
27788 8
27789 }
27790
27791 #[inline(always)]
27792 fn inline_size(_context: fidl::encoding::Context) -> usize {
27793 8
27794 }
27795 }
27796
27797 unsafe impl<D: fidl::encoding::ResourceDialect>
27798 fidl::encoding::Encode<StrictEnumUint64Struct, D> for &StrictEnumUint64Struct
27799 {
27800 #[inline]
27801 unsafe fn encode(
27802 self,
27803 encoder: &mut fidl::encoding::Encoder<'_, D>,
27804 offset: usize,
27805 _depth: fidl::encoding::Depth,
27806 ) -> fidl::Result<()> {
27807 encoder.debug_check_bounds::<StrictEnumUint64Struct>(offset);
27808 fidl::encoding::Encode::<StrictEnumUint64Struct, D>::encode(
27810 (<StrictEnumUint64 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27811 encoder,
27812 offset,
27813 _depth,
27814 )
27815 }
27816 }
27817 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint64, D>>
27818 fidl::encoding::Encode<StrictEnumUint64Struct, D> for (T0,)
27819 {
27820 #[inline]
27821 unsafe fn encode(
27822 self,
27823 encoder: &mut fidl::encoding::Encoder<'_, D>,
27824 offset: usize,
27825 depth: fidl::encoding::Depth,
27826 ) -> fidl::Result<()> {
27827 encoder.debug_check_bounds::<StrictEnumUint64Struct>(offset);
27828 self.0.encode(encoder, offset + 0, depth)?;
27832 Ok(())
27833 }
27834 }
27835
27836 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
27837 for StrictEnumUint64Struct
27838 {
27839 #[inline(always)]
27840 fn new_empty() -> Self {
27841 Self { e: fidl::new_empty!(StrictEnumUint64, D) }
27842 }
27843
27844 #[inline]
27845 unsafe fn decode(
27846 &mut self,
27847 decoder: &mut fidl::encoding::Decoder<'_, D>,
27848 offset: usize,
27849 _depth: fidl::encoding::Depth,
27850 ) -> fidl::Result<()> {
27851 decoder.debug_check_bounds::<Self>(offset);
27852 fidl::decode!(StrictEnumUint64, D, &mut self.e, decoder, offset + 0, _depth)?;
27854 Ok(())
27855 }
27856 }
27857
27858 impl fidl::encoding::ValueTypeMarker for StrictEnumUint8Struct {
27859 type Borrowed<'a> = &'a Self;
27860 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27861 value
27862 }
27863 }
27864
27865 unsafe impl fidl::encoding::TypeMarker for StrictEnumUint8Struct {
27866 type Owned = Self;
27867
27868 #[inline(always)]
27869 fn inline_align(_context: fidl::encoding::Context) -> usize {
27870 1
27871 }
27872
27873 #[inline(always)]
27874 fn inline_size(_context: fidl::encoding::Context) -> usize {
27875 1
27876 }
27877 }
27878
27879 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StrictEnumUint8Struct, D>
27880 for &StrictEnumUint8Struct
27881 {
27882 #[inline]
27883 unsafe fn encode(
27884 self,
27885 encoder: &mut fidl::encoding::Encoder<'_, D>,
27886 offset: usize,
27887 _depth: fidl::encoding::Depth,
27888 ) -> fidl::Result<()> {
27889 encoder.debug_check_bounds::<StrictEnumUint8Struct>(offset);
27890 fidl::encoding::Encode::<StrictEnumUint8Struct, D>::encode(
27892 (<StrictEnumUint8 as fidl::encoding::ValueTypeMarker>::borrow(&self.e),),
27893 encoder,
27894 offset,
27895 _depth,
27896 )
27897 }
27898 }
27899 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StrictEnumUint8, D>>
27900 fidl::encoding::Encode<StrictEnumUint8Struct, D> for (T0,)
27901 {
27902 #[inline]
27903 unsafe fn encode(
27904 self,
27905 encoder: &mut fidl::encoding::Encoder<'_, D>,
27906 offset: usize,
27907 depth: fidl::encoding::Depth,
27908 ) -> fidl::Result<()> {
27909 encoder.debug_check_bounds::<StrictEnumUint8Struct>(offset);
27910 self.0.encode(encoder, offset + 0, depth)?;
27914 Ok(())
27915 }
27916 }
27917
27918 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StrictEnumUint8Struct {
27919 #[inline(always)]
27920 fn new_empty() -> Self {
27921 Self { e: fidl::new_empty!(StrictEnumUint8, D) }
27922 }
27923
27924 #[inline]
27925 unsafe fn decode(
27926 &mut self,
27927 decoder: &mut fidl::encoding::Decoder<'_, D>,
27928 offset: usize,
27929 _depth: fidl::encoding::Depth,
27930 ) -> fidl::Result<()> {
27931 decoder.debug_check_bounds::<Self>(offset);
27932 fidl::decode!(StrictEnumUint8, D, &mut self.e, decoder, offset + 0, _depth)?;
27934 Ok(())
27935 }
27936 }
27937
27938 impl fidl::encoding::ValueTypeMarker for StringUnionStruct {
27939 type Borrowed<'a> = &'a Self;
27940 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
27941 value
27942 }
27943 }
27944
27945 unsafe impl fidl::encoding::TypeMarker for StringUnionStruct {
27946 type Owned = Self;
27947
27948 #[inline(always)]
27949 fn inline_align(_context: fidl::encoding::Context) -> usize {
27950 8
27951 }
27952
27953 #[inline(always)]
27954 fn inline_size(_context: fidl::encoding::Context) -> usize {
27955 32
27956 }
27957 }
27958
27959 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnionStruct, D>
27960 for &StringUnionStruct
27961 {
27962 #[inline]
27963 unsafe fn encode(
27964 self,
27965 encoder: &mut fidl::encoding::Encoder<'_, D>,
27966 offset: usize,
27967 _depth: fidl::encoding::Depth,
27968 ) -> fidl::Result<()> {
27969 encoder.debug_check_bounds::<StringUnionStruct>(offset);
27970 fidl::encoding::Encode::<StringUnionStruct, D>::encode(
27972 (
27973 <StringBoolUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
27974 <fidl::encoding::OptionalUnion<StringBoolUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.nullable_u),
27975 ),
27976 encoder, offset, _depth
27977 )
27978 }
27979 }
27980 unsafe impl<
27981 D: fidl::encoding::ResourceDialect,
27982 T0: fidl::encoding::Encode<StringBoolUnion, D>,
27983 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<StringBoolUnion>, D>,
27984 > fidl::encoding::Encode<StringUnionStruct, D> for (T0, T1)
27985 {
27986 #[inline]
27987 unsafe fn encode(
27988 self,
27989 encoder: &mut fidl::encoding::Encoder<'_, D>,
27990 offset: usize,
27991 depth: fidl::encoding::Depth,
27992 ) -> fidl::Result<()> {
27993 encoder.debug_check_bounds::<StringUnionStruct>(offset);
27994 self.0.encode(encoder, offset + 0, depth)?;
27998 self.1.encode(encoder, offset + 16, depth)?;
27999 Ok(())
28000 }
28001 }
28002
28003 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnionStruct {
28004 #[inline(always)]
28005 fn new_empty() -> Self {
28006 Self {
28007 u: fidl::new_empty!(StringBoolUnion, D),
28008 nullable_u: fidl::new_empty!(fidl::encoding::OptionalUnion<StringBoolUnion>, D),
28009 }
28010 }
28011
28012 #[inline]
28013 unsafe fn decode(
28014 &mut self,
28015 decoder: &mut fidl::encoding::Decoder<'_, D>,
28016 offset: usize,
28017 _depth: fidl::encoding::Depth,
28018 ) -> fidl::Result<()> {
28019 decoder.debug_check_bounds::<Self>(offset);
28020 fidl::decode!(StringBoolUnion, D, &mut self.u, decoder, offset + 0, _depth)?;
28022 fidl::decode!(
28023 fidl::encoding::OptionalUnion<StringBoolUnion>,
28024 D,
28025 &mut self.nullable_u,
28026 decoder,
28027 offset + 16,
28028 _depth
28029 )?;
28030 Ok(())
28031 }
28032 }
28033
28034 impl fidl::encoding::ValueTypeMarker for StringUnionStructWrapper {
28035 type Borrowed<'a> = &'a Self;
28036 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28037 value
28038 }
28039 }
28040
28041 unsafe impl fidl::encoding::TypeMarker for StringUnionStructWrapper {
28042 type Owned = Self;
28043
28044 #[inline(always)]
28045 fn inline_align(_context: fidl::encoding::Context) -> usize {
28046 8
28047 }
28048
28049 #[inline(always)]
28050 fn inline_size(_context: fidl::encoding::Context) -> usize {
28051 32
28052 }
28053 }
28054
28055 unsafe impl<D: fidl::encoding::ResourceDialect>
28056 fidl::encoding::Encode<StringUnionStructWrapper, D> for &StringUnionStructWrapper
28057 {
28058 #[inline]
28059 unsafe fn encode(
28060 self,
28061 encoder: &mut fidl::encoding::Encoder<'_, D>,
28062 offset: usize,
28063 _depth: fidl::encoding::Depth,
28064 ) -> fidl::Result<()> {
28065 encoder.debug_check_bounds::<StringUnionStructWrapper>(offset);
28066 fidl::encoding::Encode::<StringUnionStructWrapper, D>::encode(
28068 (<StringUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.sus),),
28069 encoder,
28070 offset,
28071 _depth,
28072 )
28073 }
28074 }
28075 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<StringUnionStruct, D>>
28076 fidl::encoding::Encode<StringUnionStructWrapper, D> for (T0,)
28077 {
28078 #[inline]
28079 unsafe fn encode(
28080 self,
28081 encoder: &mut fidl::encoding::Encoder<'_, D>,
28082 offset: usize,
28083 depth: fidl::encoding::Depth,
28084 ) -> fidl::Result<()> {
28085 encoder.debug_check_bounds::<StringUnionStructWrapper>(offset);
28086 self.0.encode(encoder, offset + 0, depth)?;
28090 Ok(())
28091 }
28092 }
28093
28094 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28095 for StringUnionStructWrapper
28096 {
28097 #[inline(always)]
28098 fn new_empty() -> Self {
28099 Self { sus: fidl::new_empty!(StringUnionStruct, D) }
28100 }
28101
28102 #[inline]
28103 unsafe fn decode(
28104 &mut self,
28105 decoder: &mut fidl::encoding::Decoder<'_, D>,
28106 offset: usize,
28107 _depth: fidl::encoding::Depth,
28108 ) -> fidl::Result<()> {
28109 decoder.debug_check_bounds::<Self>(offset);
28110 fidl::decode!(StringUnionStruct, D, &mut self.sus, decoder, offset + 0, _depth)?;
28112 Ok(())
28113 }
28114 }
28115
28116 impl fidl::encoding::ValueTypeMarker for StringUnionStructWrapperResponse {
28117 type Borrowed<'a> = &'a Self;
28118 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28119 value
28120 }
28121 }
28122
28123 unsafe impl fidl::encoding::TypeMarker for StringUnionStructWrapperResponse {
28124 type Owned = Self;
28125
28126 #[inline(always)]
28127 fn inline_align(_context: fidl::encoding::Context) -> usize {
28128 8
28129 }
28130
28131 #[inline(always)]
28132 fn inline_size(_context: fidl::encoding::Context) -> usize {
28133 48
28134 }
28135 }
28136
28137 unsafe impl<D: fidl::encoding::ResourceDialect>
28138 fidl::encoding::Encode<StringUnionStructWrapperResponse, D>
28139 for &StringUnionStructWrapperResponse
28140 {
28141 #[inline]
28142 unsafe fn encode(
28143 self,
28144 encoder: &mut fidl::encoding::Encoder<'_, D>,
28145 offset: usize,
28146 _depth: fidl::encoding::Depth,
28147 ) -> fidl::Result<()> {
28148 encoder.debug_check_bounds::<StringUnionStructWrapperResponse>(offset);
28149 fidl::encoding::Encode::<StringUnionStructWrapperResponse, D>::encode(
28151 (
28152 <TransactionHeader as fidl::encoding::ValueTypeMarker>::borrow(&self.header),
28153 <StringUnionStructWrapper as fidl::encoding::ValueTypeMarker>::borrow(
28154 &self.body,
28155 ),
28156 ),
28157 encoder,
28158 offset,
28159 _depth,
28160 )
28161 }
28162 }
28163 unsafe impl<
28164 D: fidl::encoding::ResourceDialect,
28165 T0: fidl::encoding::Encode<TransactionHeader, D>,
28166 T1: fidl::encoding::Encode<StringUnionStructWrapper, D>,
28167 > fidl::encoding::Encode<StringUnionStructWrapperResponse, D> for (T0, T1)
28168 {
28169 #[inline]
28170 unsafe fn encode(
28171 self,
28172 encoder: &mut fidl::encoding::Encoder<'_, D>,
28173 offset: usize,
28174 depth: fidl::encoding::Depth,
28175 ) -> fidl::Result<()> {
28176 encoder.debug_check_bounds::<StringUnionStructWrapperResponse>(offset);
28177 self.0.encode(encoder, offset + 0, depth)?;
28181 self.1.encode(encoder, offset + 16, depth)?;
28182 Ok(())
28183 }
28184 }
28185
28186 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
28187 for StringUnionStructWrapperResponse
28188 {
28189 #[inline(always)]
28190 fn new_empty() -> Self {
28191 Self {
28192 header: fidl::new_empty!(TransactionHeader, D),
28193 body: fidl::new_empty!(StringUnionStructWrapper, D),
28194 }
28195 }
28196
28197 #[inline]
28198 unsafe fn decode(
28199 &mut self,
28200 decoder: &mut fidl::encoding::Decoder<'_, D>,
28201 offset: usize,
28202 _depth: fidl::encoding::Depth,
28203 ) -> fidl::Result<()> {
28204 decoder.debug_check_bounds::<Self>(offset);
28205 fidl::decode!(TransactionHeader, D, &mut self.header, decoder, offset + 0, _depth)?;
28207 fidl::decode!(
28208 StringUnionStructWrapper,
28209 D,
28210 &mut self.body,
28211 decoder,
28212 offset + 16,
28213 _depth
28214 )?;
28215 Ok(())
28216 }
28217 }
28218
28219 impl fidl::encoding::ValueTypeMarker for StringUnionVector {
28220 type Borrowed<'a> = &'a Self;
28221 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28222 value
28223 }
28224 }
28225
28226 unsafe impl fidl::encoding::TypeMarker for StringUnionVector {
28227 type Owned = Self;
28228
28229 #[inline(always)]
28230 fn inline_align(_context: fidl::encoding::Context) -> usize {
28231 8
28232 }
28233
28234 #[inline(always)]
28235 fn inline_size(_context: fidl::encoding::Context) -> usize {
28236 16
28237 }
28238 }
28239
28240 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnionVector, D>
28241 for &StringUnionVector
28242 {
28243 #[inline]
28244 unsafe fn encode(
28245 self,
28246 encoder: &mut fidl::encoding::Encoder<'_, D>,
28247 offset: usize,
28248 _depth: fidl::encoding::Depth,
28249 ) -> fidl::Result<()> {
28250 encoder.debug_check_bounds::<StringUnionVector>(offset);
28251 fidl::encoding::Encode::<StringUnionVector, D>::encode(
28253 (
28254 <fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.the_vector),
28255 ),
28256 encoder, offset, _depth
28257 )
28258 }
28259 }
28260 unsafe impl<
28261 D: fidl::encoding::ResourceDialect,
28262 T0: fidl::encoding::Encode<
28263 fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28264 D,
28265 >,
28266 > fidl::encoding::Encode<StringUnionVector, D> for (T0,)
28267 {
28268 #[inline]
28269 unsafe fn encode(
28270 self,
28271 encoder: &mut fidl::encoding::Encoder<'_, D>,
28272 offset: usize,
28273 depth: fidl::encoding::Depth,
28274 ) -> fidl::Result<()> {
28275 encoder.debug_check_bounds::<StringUnionVector>(offset);
28276 self.0.encode(encoder, offset + 0, depth)?;
28280 Ok(())
28281 }
28282 }
28283
28284 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnionVector {
28285 #[inline(always)]
28286 fn new_empty() -> Self {
28287 Self {
28288 the_vector: fidl::new_empty!(
28289 fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28290 D
28291 ),
28292 }
28293 }
28294
28295 #[inline]
28296 unsafe fn decode(
28297 &mut self,
28298 decoder: &mut fidl::encoding::Decoder<'_, D>,
28299 offset: usize,
28300 _depth: fidl::encoding::Depth,
28301 ) -> fidl::Result<()> {
28302 decoder.debug_check_bounds::<Self>(offset);
28303 fidl::decode!(
28305 fidl::encoding::Vector<fidl::encoding::OptionalUnion<StringUnion>, 3>,
28306 D,
28307 &mut self.the_vector,
28308 decoder,
28309 offset + 0,
28310 _depth
28311 )?;
28312 Ok(())
28313 }
28314 }
28315
28316 impl fidl::encoding::ValueTypeMarker for StringWrapper {
28317 type Borrowed<'a> = &'a Self;
28318 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28319 value
28320 }
28321 }
28322
28323 unsafe impl fidl::encoding::TypeMarker for StringWrapper {
28324 type Owned = Self;
28325
28326 #[inline(always)]
28327 fn inline_align(_context: fidl::encoding::Context) -> usize {
28328 8
28329 }
28330
28331 #[inline(always)]
28332 fn inline_size(_context: fidl::encoding::Context) -> usize {
28333 16
28334 }
28335 }
28336
28337 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringWrapper, D>
28338 for &StringWrapper
28339 {
28340 #[inline]
28341 unsafe fn encode(
28342 self,
28343 encoder: &mut fidl::encoding::Encoder<'_, D>,
28344 offset: usize,
28345 _depth: fidl::encoding::Depth,
28346 ) -> fidl::Result<()> {
28347 encoder.debug_check_bounds::<StringWrapper>(offset);
28348 fidl::encoding::Encode::<StringWrapper, D>::encode(
28350 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
28351 &self.str,
28352 ),),
28353 encoder,
28354 offset,
28355 _depth,
28356 )
28357 }
28358 }
28359 unsafe impl<
28360 D: fidl::encoding::ResourceDialect,
28361 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
28362 > fidl::encoding::Encode<StringWrapper, D> for (T0,)
28363 {
28364 #[inline]
28365 unsafe fn encode(
28366 self,
28367 encoder: &mut fidl::encoding::Encoder<'_, D>,
28368 offset: usize,
28369 depth: fidl::encoding::Depth,
28370 ) -> fidl::Result<()> {
28371 encoder.debug_check_bounds::<StringWrapper>(offset);
28372 self.0.encode(encoder, offset + 0, depth)?;
28376 Ok(())
28377 }
28378 }
28379
28380 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringWrapper {
28381 #[inline(always)]
28382 fn new_empty() -> Self {
28383 Self { str: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
28384 }
28385
28386 #[inline]
28387 unsafe fn decode(
28388 &mut self,
28389 decoder: &mut fidl::encoding::Decoder<'_, D>,
28390 offset: usize,
28391 _depth: fidl::encoding::Depth,
28392 ) -> fidl::Result<()> {
28393 decoder.debug_check_bounds::<Self>(offset);
28394 fidl::decode!(
28396 fidl::encoding::UnboundedString,
28397 D,
28398 &mut self.str,
28399 decoder,
28400 offset + 0,
28401 _depth
28402 )?;
28403 Ok(())
28404 }
28405 }
28406
28407 impl fidl::encoding::ValueTypeMarker for Struct1Byte {
28408 type Borrowed<'a> = &'a Self;
28409 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28410 value
28411 }
28412 }
28413
28414 unsafe impl fidl::encoding::TypeMarker for Struct1Byte {
28415 type Owned = Self;
28416
28417 #[inline(always)]
28418 fn inline_align(_context: fidl::encoding::Context) -> usize {
28419 1
28420 }
28421
28422 #[inline(always)]
28423 fn inline_size(_context: fidl::encoding::Context) -> usize {
28424 1
28425 }
28426 #[inline(always)]
28427 fn encode_is_copy() -> bool {
28428 true
28429 }
28430
28431 #[inline(always)]
28432 fn decode_is_copy() -> bool {
28433 true
28434 }
28435 }
28436
28437 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct1Byte, D>
28438 for &Struct1Byte
28439 {
28440 #[inline]
28441 unsafe fn encode(
28442 self,
28443 encoder: &mut fidl::encoding::Encoder<'_, D>,
28444 offset: usize,
28445 _depth: fidl::encoding::Depth,
28446 ) -> fidl::Result<()> {
28447 encoder.debug_check_bounds::<Struct1Byte>(offset);
28448 unsafe {
28449 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28451 (buf_ptr as *mut Struct1Byte).write_unaligned((self as *const Struct1Byte).read());
28452 }
28455 Ok(())
28456 }
28457 }
28458 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i8, D>>
28459 fidl::encoding::Encode<Struct1Byte, D> for (T0,)
28460 {
28461 #[inline]
28462 unsafe fn encode(
28463 self,
28464 encoder: &mut fidl::encoding::Encoder<'_, D>,
28465 offset: usize,
28466 depth: fidl::encoding::Depth,
28467 ) -> fidl::Result<()> {
28468 encoder.debug_check_bounds::<Struct1Byte>(offset);
28469 self.0.encode(encoder, offset + 0, depth)?;
28473 Ok(())
28474 }
28475 }
28476
28477 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct1Byte {
28478 #[inline(always)]
28479 fn new_empty() -> Self {
28480 Self { a: fidl::new_empty!(i8, D) }
28481 }
28482
28483 #[inline]
28484 unsafe fn decode(
28485 &mut self,
28486 decoder: &mut fidl::encoding::Decoder<'_, D>,
28487 offset: usize,
28488 _depth: fidl::encoding::Depth,
28489 ) -> fidl::Result<()> {
28490 decoder.debug_check_bounds::<Self>(offset);
28491 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28492 unsafe {
28495 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
28496 }
28497 Ok(())
28498 }
28499 }
28500
28501 impl fidl::encoding::ValueTypeMarker for Struct2Byte {
28502 type Borrowed<'a> = &'a Self;
28503 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28504 value
28505 }
28506 }
28507
28508 unsafe impl fidl::encoding::TypeMarker for Struct2Byte {
28509 type Owned = Self;
28510
28511 #[inline(always)]
28512 fn inline_align(_context: fidl::encoding::Context) -> usize {
28513 2
28514 }
28515
28516 #[inline(always)]
28517 fn inline_size(_context: fidl::encoding::Context) -> usize {
28518 2
28519 }
28520 #[inline(always)]
28521 fn encode_is_copy() -> bool {
28522 true
28523 }
28524
28525 #[inline(always)]
28526 fn decode_is_copy() -> bool {
28527 true
28528 }
28529 }
28530
28531 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct2Byte, D>
28532 for &Struct2Byte
28533 {
28534 #[inline]
28535 unsafe fn encode(
28536 self,
28537 encoder: &mut fidl::encoding::Encoder<'_, D>,
28538 offset: usize,
28539 _depth: fidl::encoding::Depth,
28540 ) -> fidl::Result<()> {
28541 encoder.debug_check_bounds::<Struct2Byte>(offset);
28542 unsafe {
28543 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28545 (buf_ptr as *mut Struct2Byte).write_unaligned((self as *const Struct2Byte).read());
28546 }
28549 Ok(())
28550 }
28551 }
28552 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i16, D>>
28553 fidl::encoding::Encode<Struct2Byte, D> for (T0,)
28554 {
28555 #[inline]
28556 unsafe fn encode(
28557 self,
28558 encoder: &mut fidl::encoding::Encoder<'_, D>,
28559 offset: usize,
28560 depth: fidl::encoding::Depth,
28561 ) -> fidl::Result<()> {
28562 encoder.debug_check_bounds::<Struct2Byte>(offset);
28563 self.0.encode(encoder, offset + 0, depth)?;
28567 Ok(())
28568 }
28569 }
28570
28571 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct2Byte {
28572 #[inline(always)]
28573 fn new_empty() -> Self {
28574 Self { a: fidl::new_empty!(i16, D) }
28575 }
28576
28577 #[inline]
28578 unsafe fn decode(
28579 &mut self,
28580 decoder: &mut fidl::encoding::Decoder<'_, D>,
28581 offset: usize,
28582 _depth: fidl::encoding::Depth,
28583 ) -> fidl::Result<()> {
28584 decoder.debug_check_bounds::<Self>(offset);
28585 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28586 unsafe {
28589 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
28590 }
28591 Ok(())
28592 }
28593 }
28594
28595 impl fidl::encoding::ValueTypeMarker for Struct3Byte {
28596 type Borrowed<'a> = &'a Self;
28597 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28598 value
28599 }
28600 }
28601
28602 unsafe impl fidl::encoding::TypeMarker for Struct3Byte {
28603 type Owned = Self;
28604
28605 #[inline(always)]
28606 fn inline_align(_context: fidl::encoding::Context) -> usize {
28607 2
28608 }
28609
28610 #[inline(always)]
28611 fn inline_size(_context: fidl::encoding::Context) -> usize {
28612 4
28613 }
28614 }
28615
28616 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct3Byte, D>
28617 for &Struct3Byte
28618 {
28619 #[inline]
28620 unsafe fn encode(
28621 self,
28622 encoder: &mut fidl::encoding::Encoder<'_, D>,
28623 offset: usize,
28624 _depth: fidl::encoding::Depth,
28625 ) -> fidl::Result<()> {
28626 encoder.debug_check_bounds::<Struct3Byte>(offset);
28627 unsafe {
28628 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28630 (buf_ptr as *mut Struct3Byte).write_unaligned((self as *const Struct3Byte).read());
28631 let padding_ptr = buf_ptr.offset(2) as *mut u16;
28634 let padding_mask = 0xff00u16;
28635 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
28636 }
28637 Ok(())
28638 }
28639 }
28640 unsafe impl<
28641 D: fidl::encoding::ResourceDialect,
28642 T0: fidl::encoding::Encode<i16, D>,
28643 T1: fidl::encoding::Encode<i8, D>,
28644 > fidl::encoding::Encode<Struct3Byte, D> for (T0, T1)
28645 {
28646 #[inline]
28647 unsafe fn encode(
28648 self,
28649 encoder: &mut fidl::encoding::Encoder<'_, D>,
28650 offset: usize,
28651 depth: fidl::encoding::Depth,
28652 ) -> fidl::Result<()> {
28653 encoder.debug_check_bounds::<Struct3Byte>(offset);
28654 unsafe {
28657 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
28658 (ptr as *mut u16).write_unaligned(0);
28659 }
28660 self.0.encode(encoder, offset + 0, depth)?;
28662 self.1.encode(encoder, offset + 2, depth)?;
28663 Ok(())
28664 }
28665 }
28666
28667 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct3Byte {
28668 #[inline(always)]
28669 fn new_empty() -> Self {
28670 Self { a: fidl::new_empty!(i16, D), b: fidl::new_empty!(i8, D) }
28671 }
28672
28673 #[inline]
28674 unsafe fn decode(
28675 &mut self,
28676 decoder: &mut fidl::encoding::Decoder<'_, D>,
28677 offset: usize,
28678 _depth: fidl::encoding::Depth,
28679 ) -> fidl::Result<()> {
28680 decoder.debug_check_bounds::<Self>(offset);
28681 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28682 let ptr = unsafe { buf_ptr.offset(2) };
28684 let padval = unsafe { (ptr as *const u16).read_unaligned() };
28685 let mask = 0xff00u16;
28686 let maskedval = padval & mask;
28687 if maskedval != 0 {
28688 return Err(fidl::Error::NonZeroPadding {
28689 padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
28690 });
28691 }
28692 unsafe {
28694 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
28695 }
28696 Ok(())
28697 }
28698 }
28699
28700 impl fidl::encoding::ValueTypeMarker for Struct4Byte {
28701 type Borrowed<'a> = &'a Self;
28702 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28703 value
28704 }
28705 }
28706
28707 unsafe impl fidl::encoding::TypeMarker for Struct4Byte {
28708 type Owned = Self;
28709
28710 #[inline(always)]
28711 fn inline_align(_context: fidl::encoding::Context) -> usize {
28712 4
28713 }
28714
28715 #[inline(always)]
28716 fn inline_size(_context: fidl::encoding::Context) -> usize {
28717 4
28718 }
28719 #[inline(always)]
28720 fn encode_is_copy() -> bool {
28721 true
28722 }
28723
28724 #[inline(always)]
28725 fn decode_is_copy() -> bool {
28726 true
28727 }
28728 }
28729
28730 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct4Byte, D>
28731 for &Struct4Byte
28732 {
28733 #[inline]
28734 unsafe fn encode(
28735 self,
28736 encoder: &mut fidl::encoding::Encoder<'_, D>,
28737 offset: usize,
28738 _depth: fidl::encoding::Depth,
28739 ) -> fidl::Result<()> {
28740 encoder.debug_check_bounds::<Struct4Byte>(offset);
28741 unsafe {
28742 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28744 (buf_ptr as *mut Struct4Byte).write_unaligned((self as *const Struct4Byte).read());
28745 }
28748 Ok(())
28749 }
28750 }
28751 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
28752 fidl::encoding::Encode<Struct4Byte, D> for (T0,)
28753 {
28754 #[inline]
28755 unsafe fn encode(
28756 self,
28757 encoder: &mut fidl::encoding::Encoder<'_, D>,
28758 offset: usize,
28759 depth: fidl::encoding::Depth,
28760 ) -> fidl::Result<()> {
28761 encoder.debug_check_bounds::<Struct4Byte>(offset);
28762 self.0.encode(encoder, offset + 0, depth)?;
28766 Ok(())
28767 }
28768 }
28769
28770 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct4Byte {
28771 #[inline(always)]
28772 fn new_empty() -> Self {
28773 Self { a: fidl::new_empty!(i32, D) }
28774 }
28775
28776 #[inline]
28777 unsafe fn decode(
28778 &mut self,
28779 decoder: &mut fidl::encoding::Decoder<'_, D>,
28780 offset: usize,
28781 _depth: fidl::encoding::Depth,
28782 ) -> fidl::Result<()> {
28783 decoder.debug_check_bounds::<Self>(offset);
28784 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28785 unsafe {
28788 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
28789 }
28790 Ok(())
28791 }
28792 }
28793
28794 impl fidl::encoding::ValueTypeMarker for Struct5Byte {
28795 type Borrowed<'a> = &'a Self;
28796 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28797 value
28798 }
28799 }
28800
28801 unsafe impl fidl::encoding::TypeMarker for Struct5Byte {
28802 type Owned = Self;
28803
28804 #[inline(always)]
28805 fn inline_align(_context: fidl::encoding::Context) -> usize {
28806 4
28807 }
28808
28809 #[inline(always)]
28810 fn inline_size(_context: fidl::encoding::Context) -> usize {
28811 8
28812 }
28813 }
28814
28815 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct5Byte, D>
28816 for &Struct5Byte
28817 {
28818 #[inline]
28819 unsafe fn encode(
28820 self,
28821 encoder: &mut fidl::encoding::Encoder<'_, D>,
28822 offset: usize,
28823 _depth: fidl::encoding::Depth,
28824 ) -> fidl::Result<()> {
28825 encoder.debug_check_bounds::<Struct5Byte>(offset);
28826 unsafe {
28827 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28829 (buf_ptr as *mut Struct5Byte).write_unaligned((self as *const Struct5Byte).read());
28830 let padding_ptr = buf_ptr.offset(4) as *mut u32;
28833 let padding_mask = 0xffffff00u32;
28834 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
28835 }
28836 Ok(())
28837 }
28838 }
28839 unsafe impl<
28840 D: fidl::encoding::ResourceDialect,
28841 T0: fidl::encoding::Encode<i32, D>,
28842 T1: fidl::encoding::Encode<i8, D>,
28843 > fidl::encoding::Encode<Struct5Byte, D> for (T0, T1)
28844 {
28845 #[inline]
28846 unsafe fn encode(
28847 self,
28848 encoder: &mut fidl::encoding::Encoder<'_, D>,
28849 offset: usize,
28850 depth: fidl::encoding::Depth,
28851 ) -> fidl::Result<()> {
28852 encoder.debug_check_bounds::<Struct5Byte>(offset);
28853 unsafe {
28856 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
28857 (ptr as *mut u32).write_unaligned(0);
28858 }
28859 self.0.encode(encoder, offset + 0, depth)?;
28861 self.1.encode(encoder, offset + 4, depth)?;
28862 Ok(())
28863 }
28864 }
28865
28866 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct5Byte {
28867 #[inline(always)]
28868 fn new_empty() -> Self {
28869 Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i8, D) }
28870 }
28871
28872 #[inline]
28873 unsafe fn decode(
28874 &mut self,
28875 decoder: &mut fidl::encoding::Decoder<'_, D>,
28876 offset: usize,
28877 _depth: fidl::encoding::Depth,
28878 ) -> fidl::Result<()> {
28879 decoder.debug_check_bounds::<Self>(offset);
28880 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28881 let ptr = unsafe { buf_ptr.offset(4) };
28883 let padval = unsafe { (ptr as *const u32).read_unaligned() };
28884 let mask = 0xffffff00u32;
28885 let maskedval = padval & mask;
28886 if maskedval != 0 {
28887 return Err(fidl::Error::NonZeroPadding {
28888 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
28889 });
28890 }
28891 unsafe {
28893 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
28894 }
28895 Ok(())
28896 }
28897 }
28898
28899 impl fidl::encoding::ValueTypeMarker for Struct6Byte {
28900 type Borrowed<'a> = &'a Self;
28901 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28902 value
28903 }
28904 }
28905
28906 unsafe impl fidl::encoding::TypeMarker for Struct6Byte {
28907 type Owned = Self;
28908
28909 #[inline(always)]
28910 fn inline_align(_context: fidl::encoding::Context) -> usize {
28911 4
28912 }
28913
28914 #[inline(always)]
28915 fn inline_size(_context: fidl::encoding::Context) -> usize {
28916 8
28917 }
28918 }
28919
28920 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct6Byte, D>
28921 for &Struct6Byte
28922 {
28923 #[inline]
28924 unsafe fn encode(
28925 self,
28926 encoder: &mut fidl::encoding::Encoder<'_, D>,
28927 offset: usize,
28928 _depth: fidl::encoding::Depth,
28929 ) -> fidl::Result<()> {
28930 encoder.debug_check_bounds::<Struct6Byte>(offset);
28931 unsafe {
28932 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
28934 (buf_ptr as *mut Struct6Byte).write_unaligned((self as *const Struct6Byte).read());
28935 let padding_ptr = buf_ptr.offset(4) as *mut u32;
28938 let padding_mask = 0xffff0000u32;
28939 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
28940 }
28941 Ok(())
28942 }
28943 }
28944 unsafe impl<
28945 D: fidl::encoding::ResourceDialect,
28946 T0: fidl::encoding::Encode<i32, D>,
28947 T1: fidl::encoding::Encode<i16, D>,
28948 > fidl::encoding::Encode<Struct6Byte, D> for (T0, T1)
28949 {
28950 #[inline]
28951 unsafe fn encode(
28952 self,
28953 encoder: &mut fidl::encoding::Encoder<'_, D>,
28954 offset: usize,
28955 depth: fidl::encoding::Depth,
28956 ) -> fidl::Result<()> {
28957 encoder.debug_check_bounds::<Struct6Byte>(offset);
28958 unsafe {
28961 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
28962 (ptr as *mut u32).write_unaligned(0);
28963 }
28964 self.0.encode(encoder, offset + 0, depth)?;
28966 self.1.encode(encoder, offset + 4, depth)?;
28967 Ok(())
28968 }
28969 }
28970
28971 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct6Byte {
28972 #[inline(always)]
28973 fn new_empty() -> Self {
28974 Self { a: fidl::new_empty!(i32, D), b: fidl::new_empty!(i16, D) }
28975 }
28976
28977 #[inline]
28978 unsafe fn decode(
28979 &mut self,
28980 decoder: &mut fidl::encoding::Decoder<'_, D>,
28981 offset: usize,
28982 _depth: fidl::encoding::Depth,
28983 ) -> fidl::Result<()> {
28984 decoder.debug_check_bounds::<Self>(offset);
28985 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
28986 let ptr = unsafe { buf_ptr.offset(4) };
28988 let padval = unsafe { (ptr as *const u32).read_unaligned() };
28989 let mask = 0xffff0000u32;
28990 let maskedval = padval & mask;
28991 if maskedval != 0 {
28992 return Err(fidl::Error::NonZeroPadding {
28993 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
28994 });
28995 }
28996 unsafe {
28998 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
28999 }
29000 Ok(())
29001 }
29002 }
29003
29004 impl fidl::encoding::ValueTypeMarker for Struct7Byte {
29005 type Borrowed<'a> = &'a Self;
29006 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29007 value
29008 }
29009 }
29010
29011 unsafe impl fidl::encoding::TypeMarker for Struct7Byte {
29012 type Owned = Self;
29013
29014 #[inline(always)]
29015 fn inline_align(_context: fidl::encoding::Context) -> usize {
29016 4
29017 }
29018
29019 #[inline(always)]
29020 fn inline_size(_context: fidl::encoding::Context) -> usize {
29021 8
29022 }
29023 }
29024
29025 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct7Byte, D>
29026 for &Struct7Byte
29027 {
29028 #[inline]
29029 unsafe fn encode(
29030 self,
29031 encoder: &mut fidl::encoding::Encoder<'_, D>,
29032 offset: usize,
29033 _depth: fidl::encoding::Depth,
29034 ) -> fidl::Result<()> {
29035 encoder.debug_check_bounds::<Struct7Byte>(offset);
29036 unsafe {
29037 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29039 (buf_ptr as *mut Struct7Byte).write_unaligned((self as *const Struct7Byte).read());
29040 let padding_ptr = buf_ptr.offset(4) as *mut u32;
29043 let padding_mask = 0xff000000u32;
29044 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
29045 }
29046 Ok(())
29047 }
29048 }
29049 unsafe impl<
29050 D: fidl::encoding::ResourceDialect,
29051 T0: fidl::encoding::Encode<i32, D>,
29052 T1: fidl::encoding::Encode<i16, D>,
29053 T2: fidl::encoding::Encode<i8, D>,
29054 > fidl::encoding::Encode<Struct7Byte, D> for (T0, T1, T2)
29055 {
29056 #[inline]
29057 unsafe fn encode(
29058 self,
29059 encoder: &mut fidl::encoding::Encoder<'_, D>,
29060 offset: usize,
29061 depth: fidl::encoding::Depth,
29062 ) -> fidl::Result<()> {
29063 encoder.debug_check_bounds::<Struct7Byte>(offset);
29064 unsafe {
29067 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
29068 (ptr as *mut u32).write_unaligned(0);
29069 }
29070 self.0.encode(encoder, offset + 0, depth)?;
29072 self.1.encode(encoder, offset + 4, depth)?;
29073 self.2.encode(encoder, offset + 6, depth)?;
29074 Ok(())
29075 }
29076 }
29077
29078 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct7Byte {
29079 #[inline(always)]
29080 fn new_empty() -> Self {
29081 Self {
29082 a: fidl::new_empty!(i32, D),
29083 b: fidl::new_empty!(i16, D),
29084 c: fidl::new_empty!(i8, D),
29085 }
29086 }
29087
29088 #[inline]
29089 unsafe fn decode(
29090 &mut self,
29091 decoder: &mut fidl::encoding::Decoder<'_, D>,
29092 offset: usize,
29093 _depth: fidl::encoding::Depth,
29094 ) -> fidl::Result<()> {
29095 decoder.debug_check_bounds::<Self>(offset);
29096 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29097 let ptr = unsafe { buf_ptr.offset(4) };
29099 let padval = unsafe { (ptr as *const u32).read_unaligned() };
29100 let mask = 0xff000000u32;
29101 let maskedval = padval & mask;
29102 if maskedval != 0 {
29103 return Err(fidl::Error::NonZeroPadding {
29104 padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
29105 });
29106 }
29107 unsafe {
29109 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29110 }
29111 Ok(())
29112 }
29113 }
29114
29115 impl fidl::encoding::ValueTypeMarker for Struct8Byte {
29116 type Borrowed<'a> = &'a Self;
29117 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29118 value
29119 }
29120 }
29121
29122 unsafe impl fidl::encoding::TypeMarker for Struct8Byte {
29123 type Owned = Self;
29124
29125 #[inline(always)]
29126 fn inline_align(_context: fidl::encoding::Context) -> usize {
29127 8
29128 }
29129
29130 #[inline(always)]
29131 fn inline_size(_context: fidl::encoding::Context) -> usize {
29132 8
29133 }
29134 #[inline(always)]
29135 fn encode_is_copy() -> bool {
29136 true
29137 }
29138
29139 #[inline(always)]
29140 fn decode_is_copy() -> bool {
29141 true
29142 }
29143 }
29144
29145 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Struct8Byte, D>
29146 for &Struct8Byte
29147 {
29148 #[inline]
29149 unsafe fn encode(
29150 self,
29151 encoder: &mut fidl::encoding::Encoder<'_, D>,
29152 offset: usize,
29153 _depth: fidl::encoding::Depth,
29154 ) -> fidl::Result<()> {
29155 encoder.debug_check_bounds::<Struct8Byte>(offset);
29156 unsafe {
29157 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29159 (buf_ptr as *mut Struct8Byte).write_unaligned((self as *const Struct8Byte).read());
29160 }
29163 Ok(())
29164 }
29165 }
29166 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
29167 fidl::encoding::Encode<Struct8Byte, D> for (T0,)
29168 {
29169 #[inline]
29170 unsafe fn encode(
29171 self,
29172 encoder: &mut fidl::encoding::Encoder<'_, D>,
29173 offset: usize,
29174 depth: fidl::encoding::Depth,
29175 ) -> fidl::Result<()> {
29176 encoder.debug_check_bounds::<Struct8Byte>(offset);
29177 self.0.encode(encoder, offset + 0, depth)?;
29181 Ok(())
29182 }
29183 }
29184
29185 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Struct8Byte {
29186 #[inline(always)]
29187 fn new_empty() -> Self {
29188 Self { a: fidl::new_empty!(i64, D) }
29189 }
29190
29191 #[inline]
29192 unsafe fn decode(
29193 &mut self,
29194 decoder: &mut fidl::encoding::Decoder<'_, D>,
29195 offset: usize,
29196 _depth: fidl::encoding::Depth,
29197 ) -> fidl::Result<()> {
29198 decoder.debug_check_bounds::<Self>(offset);
29199 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29200 unsafe {
29203 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
29204 }
29205 Ok(())
29206 }
29207 }
29208
29209 impl fidl::encoding::ValueTypeMarker for StructOfEmptyFlexibleUnion {
29210 type Borrowed<'a> = &'a Self;
29211 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29212 value
29213 }
29214 }
29215
29216 unsafe impl fidl::encoding::TypeMarker for StructOfEmptyFlexibleUnion {
29217 type Owned = Self;
29218
29219 #[inline(always)]
29220 fn inline_align(_context: fidl::encoding::Context) -> usize {
29221 8
29222 }
29223
29224 #[inline(always)]
29225 fn inline_size(_context: fidl::encoding::Context) -> usize {
29226 16
29227 }
29228 }
29229
29230 unsafe impl<D: fidl::encoding::ResourceDialect>
29231 fidl::encoding::Encode<StructOfEmptyFlexibleUnion, D> for &StructOfEmptyFlexibleUnion
29232 {
29233 #[inline]
29234 unsafe fn encode(
29235 self,
29236 encoder: &mut fidl::encoding::Encoder<'_, D>,
29237 offset: usize,
29238 _depth: fidl::encoding::Depth,
29239 ) -> fidl::Result<()> {
29240 encoder.debug_check_bounds::<StructOfEmptyFlexibleUnion>(offset);
29241 fidl::encoding::Encode::<StructOfEmptyFlexibleUnion, D>::encode(
29243 (<EmptyFlexibleUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.empty),),
29244 encoder,
29245 offset,
29246 _depth,
29247 )
29248 }
29249 }
29250 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyFlexibleUnion, D>>
29251 fidl::encoding::Encode<StructOfEmptyFlexibleUnion, D> for (T0,)
29252 {
29253 #[inline]
29254 unsafe fn encode(
29255 self,
29256 encoder: &mut fidl::encoding::Encoder<'_, D>,
29257 offset: usize,
29258 depth: fidl::encoding::Depth,
29259 ) -> fidl::Result<()> {
29260 encoder.debug_check_bounds::<StructOfEmptyFlexibleUnion>(offset);
29261 self.0.encode(encoder, offset + 0, depth)?;
29265 Ok(())
29266 }
29267 }
29268
29269 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29270 for StructOfEmptyFlexibleUnion
29271 {
29272 #[inline(always)]
29273 fn new_empty() -> Self {
29274 Self { empty: fidl::new_empty!(EmptyFlexibleUnion, D) }
29275 }
29276
29277 #[inline]
29278 unsafe fn decode(
29279 &mut self,
29280 decoder: &mut fidl::encoding::Decoder<'_, D>,
29281 offset: usize,
29282 _depth: fidl::encoding::Depth,
29283 ) -> fidl::Result<()> {
29284 decoder.debug_check_bounds::<Self>(offset);
29285 fidl::decode!(EmptyFlexibleUnion, D, &mut self.empty, decoder, offset + 0, _depth)?;
29287 Ok(())
29288 }
29289 }
29290
29291 impl fidl::encoding::ValueTypeMarker for StructOfEmptyTable {
29292 type Borrowed<'a> = &'a Self;
29293 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29294 value
29295 }
29296 }
29297
29298 unsafe impl fidl::encoding::TypeMarker for StructOfEmptyTable {
29299 type Owned = Self;
29300
29301 #[inline(always)]
29302 fn inline_align(_context: fidl::encoding::Context) -> usize {
29303 8
29304 }
29305
29306 #[inline(always)]
29307 fn inline_size(_context: fidl::encoding::Context) -> usize {
29308 16
29309 }
29310 }
29311
29312 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfEmptyTable, D>
29313 for &StructOfEmptyTable
29314 {
29315 #[inline]
29316 unsafe fn encode(
29317 self,
29318 encoder: &mut fidl::encoding::Encoder<'_, D>,
29319 offset: usize,
29320 _depth: fidl::encoding::Depth,
29321 ) -> fidl::Result<()> {
29322 encoder.debug_check_bounds::<StructOfEmptyTable>(offset);
29323 fidl::encoding::Encode::<StructOfEmptyTable, D>::encode(
29325 (<EmptyTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29326 encoder,
29327 offset,
29328 _depth,
29329 )
29330 }
29331 }
29332 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EmptyTable, D>>
29333 fidl::encoding::Encode<StructOfEmptyTable, D> for (T0,)
29334 {
29335 #[inline]
29336 unsafe fn encode(
29337 self,
29338 encoder: &mut fidl::encoding::Encoder<'_, D>,
29339 offset: usize,
29340 depth: fidl::encoding::Depth,
29341 ) -> fidl::Result<()> {
29342 encoder.debug_check_bounds::<StructOfEmptyTable>(offset);
29343 self.0.encode(encoder, offset + 0, depth)?;
29347 Ok(())
29348 }
29349 }
29350
29351 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfEmptyTable {
29352 #[inline(always)]
29353 fn new_empty() -> Self {
29354 Self { table: fidl::new_empty!(EmptyTable, D) }
29355 }
29356
29357 #[inline]
29358 unsafe fn decode(
29359 &mut self,
29360 decoder: &mut fidl::encoding::Decoder<'_, D>,
29361 offset: usize,
29362 _depth: fidl::encoding::Depth,
29363 ) -> fidl::Result<()> {
29364 decoder.debug_check_bounds::<Self>(offset);
29365 fidl::decode!(EmptyTable, D, &mut self.table, decoder, offset + 0, _depth)?;
29367 Ok(())
29368 }
29369 }
29370
29371 impl fidl::encoding::ValueTypeMarker for StructOfReverseOrdinalTable {
29372 type Borrowed<'a> = &'a Self;
29373 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29374 value
29375 }
29376 }
29377
29378 unsafe impl fidl::encoding::TypeMarker for StructOfReverseOrdinalTable {
29379 type Owned = Self;
29380
29381 #[inline(always)]
29382 fn inline_align(_context: fidl::encoding::Context) -> usize {
29383 8
29384 }
29385
29386 #[inline(always)]
29387 fn inline_size(_context: fidl::encoding::Context) -> usize {
29388 16
29389 }
29390 }
29391
29392 unsafe impl<D: fidl::encoding::ResourceDialect>
29393 fidl::encoding::Encode<StructOfReverseOrdinalTable, D> for &StructOfReverseOrdinalTable
29394 {
29395 #[inline]
29396 unsafe fn encode(
29397 self,
29398 encoder: &mut fidl::encoding::Encoder<'_, D>,
29399 offset: usize,
29400 _depth: fidl::encoding::Depth,
29401 ) -> fidl::Result<()> {
29402 encoder.debug_check_bounds::<StructOfReverseOrdinalTable>(offset);
29403 fidl::encoding::Encode::<StructOfReverseOrdinalTable, D>::encode(
29405 (<ReverseOrdinalTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29406 encoder,
29407 offset,
29408 _depth,
29409 )
29410 }
29411 }
29412 unsafe impl<
29413 D: fidl::encoding::ResourceDialect,
29414 T0: fidl::encoding::Encode<ReverseOrdinalTable, D>,
29415 > fidl::encoding::Encode<StructOfReverseOrdinalTable, D> for (T0,)
29416 {
29417 #[inline]
29418 unsafe fn encode(
29419 self,
29420 encoder: &mut fidl::encoding::Encoder<'_, D>,
29421 offset: usize,
29422 depth: fidl::encoding::Depth,
29423 ) -> fidl::Result<()> {
29424 encoder.debug_check_bounds::<StructOfReverseOrdinalTable>(offset);
29425 self.0.encode(encoder, offset + 0, depth)?;
29429 Ok(())
29430 }
29431 }
29432
29433 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29434 for StructOfReverseOrdinalTable
29435 {
29436 #[inline(always)]
29437 fn new_empty() -> Self {
29438 Self { table: fidl::new_empty!(ReverseOrdinalTable, D) }
29439 }
29440
29441 #[inline]
29442 unsafe fn decode(
29443 &mut self,
29444 decoder: &mut fidl::encoding::Decoder<'_, D>,
29445 offset: usize,
29446 _depth: fidl::encoding::Depth,
29447 ) -> fidl::Result<()> {
29448 decoder.debug_check_bounds::<Self>(offset);
29449 fidl::decode!(ReverseOrdinalTable, D, &mut self.table, decoder, offset + 0, _depth)?;
29451 Ok(())
29452 }
29453 }
29454
29455 impl fidl::encoding::ValueTypeMarker for StructOfSimpleTable {
29456 type Borrowed<'a> = &'a Self;
29457 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29458 value
29459 }
29460 }
29461
29462 unsafe impl fidl::encoding::TypeMarker for StructOfSimpleTable {
29463 type Owned = Self;
29464
29465 #[inline(always)]
29466 fn inline_align(_context: fidl::encoding::Context) -> usize {
29467 8
29468 }
29469
29470 #[inline(always)]
29471 fn inline_size(_context: fidl::encoding::Context) -> usize {
29472 16
29473 }
29474 }
29475
29476 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfSimpleTable, D>
29477 for &StructOfSimpleTable
29478 {
29479 #[inline]
29480 unsafe fn encode(
29481 self,
29482 encoder: &mut fidl::encoding::Encoder<'_, D>,
29483 offset: usize,
29484 _depth: fidl::encoding::Depth,
29485 ) -> fidl::Result<()> {
29486 encoder.debug_check_bounds::<StructOfSimpleTable>(offset);
29487 fidl::encoding::Encode::<StructOfSimpleTable, D>::encode(
29489 (<SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29490 encoder,
29491 offset,
29492 _depth,
29493 )
29494 }
29495 }
29496 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SimpleTable, D>>
29497 fidl::encoding::Encode<StructOfSimpleTable, D> for (T0,)
29498 {
29499 #[inline]
29500 unsafe fn encode(
29501 self,
29502 encoder: &mut fidl::encoding::Encoder<'_, D>,
29503 offset: usize,
29504 depth: fidl::encoding::Depth,
29505 ) -> fidl::Result<()> {
29506 encoder.debug_check_bounds::<StructOfSimpleTable>(offset);
29507 self.0.encode(encoder, offset + 0, depth)?;
29511 Ok(())
29512 }
29513 }
29514
29515 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfSimpleTable {
29516 #[inline(always)]
29517 fn new_empty() -> Self {
29518 Self { table: fidl::new_empty!(SimpleTable, D) }
29519 }
29520
29521 #[inline]
29522 unsafe fn decode(
29523 &mut self,
29524 decoder: &mut fidl::encoding::Decoder<'_, D>,
29525 offset: usize,
29526 _depth: fidl::encoding::Depth,
29527 ) -> fidl::Result<()> {
29528 decoder.debug_check_bounds::<Self>(offset);
29529 fidl::decode!(SimpleTable, D, &mut self.table, decoder, offset + 0, _depth)?;
29531 Ok(())
29532 }
29533 }
29534
29535 impl fidl::encoding::ValueTypeMarker for StructOfTableWithGaps {
29536 type Borrowed<'a> = &'a Self;
29537 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29538 value
29539 }
29540 }
29541
29542 unsafe impl fidl::encoding::TypeMarker for StructOfTableWithGaps {
29543 type Owned = Self;
29544
29545 #[inline(always)]
29546 fn inline_align(_context: fidl::encoding::Context) -> usize {
29547 8
29548 }
29549
29550 #[inline(always)]
29551 fn inline_size(_context: fidl::encoding::Context) -> usize {
29552 16
29553 }
29554 }
29555
29556 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfTableWithGaps, D>
29557 for &StructOfTableWithGaps
29558 {
29559 #[inline]
29560 unsafe fn encode(
29561 self,
29562 encoder: &mut fidl::encoding::Encoder<'_, D>,
29563 offset: usize,
29564 _depth: fidl::encoding::Depth,
29565 ) -> fidl::Result<()> {
29566 encoder.debug_check_bounds::<StructOfTableWithGaps>(offset);
29567 fidl::encoding::Encode::<StructOfTableWithGaps, D>::encode(
29569 (<TableWithGaps as fidl::encoding::ValueTypeMarker>::borrow(&self.table),),
29570 encoder,
29571 offset,
29572 _depth,
29573 )
29574 }
29575 }
29576 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableWithGaps, D>>
29577 fidl::encoding::Encode<StructOfTableWithGaps, D> for (T0,)
29578 {
29579 #[inline]
29580 unsafe fn encode(
29581 self,
29582 encoder: &mut fidl::encoding::Encoder<'_, D>,
29583 offset: usize,
29584 depth: fidl::encoding::Depth,
29585 ) -> fidl::Result<()> {
29586 encoder.debug_check_bounds::<StructOfTableWithGaps>(offset);
29587 self.0.encode(encoder, offset + 0, depth)?;
29591 Ok(())
29592 }
29593 }
29594
29595 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfTableWithGaps {
29596 #[inline(always)]
29597 fn new_empty() -> Self {
29598 Self { table: fidl::new_empty!(TableWithGaps, D) }
29599 }
29600
29601 #[inline]
29602 unsafe fn decode(
29603 &mut self,
29604 decoder: &mut fidl::encoding::Decoder<'_, D>,
29605 offset: usize,
29606 _depth: fidl::encoding::Depth,
29607 ) -> fidl::Result<()> {
29608 decoder.debug_check_bounds::<Self>(offset);
29609 fidl::decode!(TableWithGaps, D, &mut self.table, decoder, offset + 0, _depth)?;
29611 Ok(())
29612 }
29613 }
29614
29615 impl fidl::encoding::ValueTypeMarker for StructOfTableWithStringAndVector {
29616 type Borrowed<'a> = &'a Self;
29617 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29618 value
29619 }
29620 }
29621
29622 unsafe impl fidl::encoding::TypeMarker for StructOfTableWithStringAndVector {
29623 type Owned = Self;
29624
29625 #[inline(always)]
29626 fn inline_align(_context: fidl::encoding::Context) -> usize {
29627 8
29628 }
29629
29630 #[inline(always)]
29631 fn inline_size(_context: fidl::encoding::Context) -> usize {
29632 16
29633 }
29634 }
29635
29636 unsafe impl<D: fidl::encoding::ResourceDialect>
29637 fidl::encoding::Encode<StructOfTableWithStringAndVector, D>
29638 for &StructOfTableWithStringAndVector
29639 {
29640 #[inline]
29641 unsafe fn encode(
29642 self,
29643 encoder: &mut fidl::encoding::Encoder<'_, D>,
29644 offset: usize,
29645 _depth: fidl::encoding::Depth,
29646 ) -> fidl::Result<()> {
29647 encoder.debug_check_bounds::<StructOfTableWithStringAndVector>(offset);
29648 fidl::encoding::Encode::<StructOfTableWithStringAndVector, D>::encode(
29650 (<TableWithStringAndVector as fidl::encoding::ValueTypeMarker>::borrow(
29651 &self.table,
29652 ),),
29653 encoder,
29654 offset,
29655 _depth,
29656 )
29657 }
29658 }
29659 unsafe impl<
29660 D: fidl::encoding::ResourceDialect,
29661 T0: fidl::encoding::Encode<TableWithStringAndVector, D>,
29662 > fidl::encoding::Encode<StructOfTableWithStringAndVector, D> for (T0,)
29663 {
29664 #[inline]
29665 unsafe fn encode(
29666 self,
29667 encoder: &mut fidl::encoding::Encoder<'_, D>,
29668 offset: usize,
29669 depth: fidl::encoding::Depth,
29670 ) -> fidl::Result<()> {
29671 encoder.debug_check_bounds::<StructOfTableWithStringAndVector>(offset);
29672 self.0.encode(encoder, offset + 0, depth)?;
29676 Ok(())
29677 }
29678 }
29679
29680 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29681 for StructOfTableWithStringAndVector
29682 {
29683 #[inline(always)]
29684 fn new_empty() -> Self {
29685 Self { table: fidl::new_empty!(TableWithStringAndVector, D) }
29686 }
29687
29688 #[inline]
29689 unsafe fn decode(
29690 &mut self,
29691 decoder: &mut fidl::encoding::Decoder<'_, D>,
29692 offset: usize,
29693 _depth: fidl::encoding::Depth,
29694 ) -> fidl::Result<()> {
29695 decoder.debug_check_bounds::<Self>(offset);
29696 fidl::decode!(
29698 TableWithStringAndVector,
29699 D,
29700 &mut self.table,
29701 decoder,
29702 offset + 0,
29703 _depth
29704 )?;
29705 Ok(())
29706 }
29707 }
29708
29709 impl fidl::encoding::ValueTypeMarker for StructOfTableWithXUnion {
29710 type Borrowed<'a> = &'a Self;
29711 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29712 value
29713 }
29714 }
29715
29716 unsafe impl fidl::encoding::TypeMarker for StructOfTableWithXUnion {
29717 type Owned = Self;
29718
29719 #[inline(always)]
29720 fn inline_align(_context: fidl::encoding::Context) -> usize {
29721 8
29722 }
29723
29724 #[inline(always)]
29725 fn inline_size(_context: fidl::encoding::Context) -> usize {
29726 16
29727 }
29728 }
29729
29730 unsafe impl<D: fidl::encoding::ResourceDialect>
29731 fidl::encoding::Encode<StructOfTableWithXUnion, D> for &StructOfTableWithXUnion
29732 {
29733 #[inline]
29734 unsafe fn encode(
29735 self,
29736 encoder: &mut fidl::encoding::Encoder<'_, D>,
29737 offset: usize,
29738 _depth: fidl::encoding::Depth,
29739 ) -> fidl::Result<()> {
29740 encoder.debug_check_bounds::<StructOfTableWithXUnion>(offset);
29741 fidl::encoding::Encode::<StructOfTableWithXUnion, D>::encode(
29743 (<TableWithXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
29744 encoder,
29745 offset,
29746 _depth,
29747 )
29748 }
29749 }
29750 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableWithXUnion, D>>
29751 fidl::encoding::Encode<StructOfTableWithXUnion, D> for (T0,)
29752 {
29753 #[inline]
29754 unsafe fn encode(
29755 self,
29756 encoder: &mut fidl::encoding::Encoder<'_, D>,
29757 offset: usize,
29758 depth: fidl::encoding::Depth,
29759 ) -> fidl::Result<()> {
29760 encoder.debug_check_bounds::<StructOfTableWithXUnion>(offset);
29761 self.0.encode(encoder, offset + 0, depth)?;
29765 Ok(())
29766 }
29767 }
29768
29769 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
29770 for StructOfTableWithXUnion
29771 {
29772 #[inline(always)]
29773 fn new_empty() -> Self {
29774 Self { value: fidl::new_empty!(TableWithXUnion, D) }
29775 }
29776
29777 #[inline]
29778 unsafe fn decode(
29779 &mut self,
29780 decoder: &mut fidl::encoding::Decoder<'_, D>,
29781 offset: usize,
29782 _depth: fidl::encoding::Depth,
29783 ) -> fidl::Result<()> {
29784 decoder.debug_check_bounds::<Self>(offset);
29785 fidl::decode!(TableWithXUnion, D, &mut self.value, decoder, offset + 0, _depth)?;
29787 Ok(())
29788 }
29789 }
29790
29791 impl fidl::encoding::ValueTypeMarker for StructOfUnionOfTable {
29792 type Borrowed<'a> = &'a Self;
29793 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29794 value
29795 }
29796 }
29797
29798 unsafe impl fidl::encoding::TypeMarker for StructOfUnionOfTable {
29799 type Owned = Self;
29800
29801 #[inline(always)]
29802 fn inline_align(_context: fidl::encoding::Context) -> usize {
29803 8
29804 }
29805
29806 #[inline(always)]
29807 fn inline_size(_context: fidl::encoding::Context) -> usize {
29808 16
29809 }
29810 }
29811
29812 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructOfUnionOfTable, D>
29813 for &StructOfUnionOfTable
29814 {
29815 #[inline]
29816 unsafe fn encode(
29817 self,
29818 encoder: &mut fidl::encoding::Encoder<'_, D>,
29819 offset: usize,
29820 _depth: fidl::encoding::Depth,
29821 ) -> fidl::Result<()> {
29822 encoder.debug_check_bounds::<StructOfUnionOfTable>(offset);
29823 fidl::encoding::Encode::<StructOfUnionOfTable, D>::encode(
29825 (<UnionOfTable as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
29826 encoder,
29827 offset,
29828 _depth,
29829 )
29830 }
29831 }
29832 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<UnionOfTable, D>>
29833 fidl::encoding::Encode<StructOfUnionOfTable, D> for (T0,)
29834 {
29835 #[inline]
29836 unsafe fn encode(
29837 self,
29838 encoder: &mut fidl::encoding::Encoder<'_, D>,
29839 offset: usize,
29840 depth: fidl::encoding::Depth,
29841 ) -> fidl::Result<()> {
29842 encoder.debug_check_bounds::<StructOfUnionOfTable>(offset);
29843 self.0.encode(encoder, offset + 0, depth)?;
29847 Ok(())
29848 }
29849 }
29850
29851 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructOfUnionOfTable {
29852 #[inline(always)]
29853 fn new_empty() -> Self {
29854 Self { u: fidl::new_empty!(UnionOfTable, D) }
29855 }
29856
29857 #[inline]
29858 unsafe fn decode(
29859 &mut self,
29860 decoder: &mut fidl::encoding::Decoder<'_, D>,
29861 offset: usize,
29862 _depth: fidl::encoding::Depth,
29863 ) -> fidl::Result<()> {
29864 decoder.debug_check_bounds::<Self>(offset);
29865 fidl::decode!(UnionOfTable, D, &mut self.u, decoder, offset + 0, _depth)?;
29867 Ok(())
29868 }
29869 }
29870
29871 impl fidl::encoding::ValueTypeMarker for StructSize16Align8 {
29872 type Borrowed<'a> = &'a Self;
29873 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29874 value
29875 }
29876 }
29877
29878 unsafe impl fidl::encoding::TypeMarker for StructSize16Align8 {
29879 type Owned = Self;
29880
29881 #[inline(always)]
29882 fn inline_align(_context: fidl::encoding::Context) -> usize {
29883 8
29884 }
29885
29886 #[inline(always)]
29887 fn inline_size(_context: fidl::encoding::Context) -> usize {
29888 16
29889 }
29890 #[inline(always)]
29891 fn encode_is_copy() -> bool {
29892 true
29893 }
29894
29895 #[inline(always)]
29896 fn decode_is_copy() -> bool {
29897 true
29898 }
29899 }
29900
29901 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize16Align8, D>
29902 for &StructSize16Align8
29903 {
29904 #[inline]
29905 unsafe fn encode(
29906 self,
29907 encoder: &mut fidl::encoding::Encoder<'_, D>,
29908 offset: usize,
29909 _depth: fidl::encoding::Depth,
29910 ) -> fidl::Result<()> {
29911 encoder.debug_check_bounds::<StructSize16Align8>(offset);
29912 unsafe {
29913 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
29915 (buf_ptr as *mut StructSize16Align8)
29916 .write_unaligned((self as *const StructSize16Align8).read());
29917 }
29920 Ok(())
29921 }
29922 }
29923 unsafe impl<
29924 D: fidl::encoding::ResourceDialect,
29925 T0: fidl::encoding::Encode<u64, D>,
29926 T1: fidl::encoding::Encode<u64, D>,
29927 > fidl::encoding::Encode<StructSize16Align8, D> for (T0, T1)
29928 {
29929 #[inline]
29930 unsafe fn encode(
29931 self,
29932 encoder: &mut fidl::encoding::Encoder<'_, D>,
29933 offset: usize,
29934 depth: fidl::encoding::Depth,
29935 ) -> fidl::Result<()> {
29936 encoder.debug_check_bounds::<StructSize16Align8>(offset);
29937 self.0.encode(encoder, offset + 0, depth)?;
29941 self.1.encode(encoder, offset + 8, depth)?;
29942 Ok(())
29943 }
29944 }
29945
29946 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize16Align8 {
29947 #[inline(always)]
29948 fn new_empty() -> Self {
29949 Self { f1: fidl::new_empty!(u64, D), f2: fidl::new_empty!(u64, D) }
29950 }
29951
29952 #[inline]
29953 unsafe fn decode(
29954 &mut self,
29955 decoder: &mut fidl::encoding::Decoder<'_, D>,
29956 offset: usize,
29957 _depth: fidl::encoding::Depth,
29958 ) -> fidl::Result<()> {
29959 decoder.debug_check_bounds::<Self>(offset);
29960 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
29961 unsafe {
29964 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
29965 }
29966 Ok(())
29967 }
29968 }
29969
29970 impl fidl::encoding::ValueTypeMarker for StructSize3Align1 {
29971 type Borrowed<'a> = &'a Self;
29972 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29973 value
29974 }
29975 }
29976
29977 unsafe impl fidl::encoding::TypeMarker for StructSize3Align1 {
29978 type Owned = Self;
29979
29980 #[inline(always)]
29981 fn inline_align(_context: fidl::encoding::Context) -> usize {
29982 1
29983 }
29984
29985 #[inline(always)]
29986 fn inline_size(_context: fidl::encoding::Context) -> usize {
29987 3
29988 }
29989 #[inline(always)]
29990 fn encode_is_copy() -> bool {
29991 true
29992 }
29993
29994 #[inline(always)]
29995 fn decode_is_copy() -> bool {
29996 true
29997 }
29998 }
29999
30000 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize3Align1, D>
30001 for &StructSize3Align1
30002 {
30003 #[inline]
30004 unsafe fn encode(
30005 self,
30006 encoder: &mut fidl::encoding::Encoder<'_, D>,
30007 offset: usize,
30008 _depth: fidl::encoding::Depth,
30009 ) -> fidl::Result<()> {
30010 encoder.debug_check_bounds::<StructSize3Align1>(offset);
30011 unsafe {
30012 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30014 (buf_ptr as *mut StructSize3Align1)
30015 .write_unaligned((self as *const StructSize3Align1).read());
30016 }
30019 Ok(())
30020 }
30021 }
30022 unsafe impl<
30023 D: fidl::encoding::ResourceDialect,
30024 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
30025 > fidl::encoding::Encode<StructSize3Align1, D> for (T0,)
30026 {
30027 #[inline]
30028 unsafe fn encode(
30029 self,
30030 encoder: &mut fidl::encoding::Encoder<'_, D>,
30031 offset: usize,
30032 depth: fidl::encoding::Depth,
30033 ) -> fidl::Result<()> {
30034 encoder.debug_check_bounds::<StructSize3Align1>(offset);
30035 self.0.encode(encoder, offset + 0, depth)?;
30039 Ok(())
30040 }
30041 }
30042
30043 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize3Align1 {
30044 #[inline(always)]
30045 fn new_empty() -> Self {
30046 Self { three_bytes: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D) }
30047 }
30048
30049 #[inline]
30050 unsafe fn decode(
30051 &mut self,
30052 decoder: &mut fidl::encoding::Decoder<'_, D>,
30053 offset: usize,
30054 _depth: fidl::encoding::Depth,
30055 ) -> fidl::Result<()> {
30056 decoder.debug_check_bounds::<Self>(offset);
30057 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30058 unsafe {
30061 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
30062 }
30063 Ok(())
30064 }
30065 }
30066
30067 impl fidl::encoding::ValueTypeMarker for StructSize3Align2 {
30068 type Borrowed<'a> = &'a Self;
30069 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30070 value
30071 }
30072 }
30073
30074 unsafe impl fidl::encoding::TypeMarker for StructSize3Align2 {
30075 type Owned = Self;
30076
30077 #[inline(always)]
30078 fn inline_align(_context: fidl::encoding::Context) -> usize {
30079 2
30080 }
30081
30082 #[inline(always)]
30083 fn inline_size(_context: fidl::encoding::Context) -> usize {
30084 4
30085 }
30086 }
30087
30088 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructSize3Align2, D>
30089 for &StructSize3Align2
30090 {
30091 #[inline]
30092 unsafe fn encode(
30093 self,
30094 encoder: &mut fidl::encoding::Encoder<'_, D>,
30095 offset: usize,
30096 _depth: fidl::encoding::Depth,
30097 ) -> fidl::Result<()> {
30098 encoder.debug_check_bounds::<StructSize3Align2>(offset);
30099 unsafe {
30100 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30102 (buf_ptr as *mut StructSize3Align2)
30103 .write_unaligned((self as *const StructSize3Align2).read());
30104 let padding_ptr = buf_ptr.offset(2) as *mut u16;
30107 let padding_mask = 0xff00u16;
30108 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
30109 }
30110 Ok(())
30111 }
30112 }
30113 unsafe impl<
30114 D: fidl::encoding::ResourceDialect,
30115 T0: fidl::encoding::Encode<u16, D>,
30116 T1: fidl::encoding::Encode<u8, D>,
30117 > fidl::encoding::Encode<StructSize3Align2, D> for (T0, T1)
30118 {
30119 #[inline]
30120 unsafe fn encode(
30121 self,
30122 encoder: &mut fidl::encoding::Encoder<'_, D>,
30123 offset: usize,
30124 depth: fidl::encoding::Depth,
30125 ) -> fidl::Result<()> {
30126 encoder.debug_check_bounds::<StructSize3Align2>(offset);
30127 unsafe {
30130 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(2);
30131 (ptr as *mut u16).write_unaligned(0);
30132 }
30133 self.0.encode(encoder, offset + 0, depth)?;
30135 self.1.encode(encoder, offset + 2, depth)?;
30136 Ok(())
30137 }
30138 }
30139
30140 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructSize3Align2 {
30141 #[inline(always)]
30142 fn new_empty() -> Self {
30143 Self { f1: fidl::new_empty!(u16, D), f2: fidl::new_empty!(u8, D) }
30144 }
30145
30146 #[inline]
30147 unsafe fn decode(
30148 &mut self,
30149 decoder: &mut fidl::encoding::Decoder<'_, D>,
30150 offset: usize,
30151 _depth: fidl::encoding::Depth,
30152 ) -> fidl::Result<()> {
30153 decoder.debug_check_bounds::<Self>(offset);
30154 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30155 let ptr = unsafe { buf_ptr.offset(2) };
30157 let padval = unsafe { (ptr as *const u16).read_unaligned() };
30158 let mask = 0xff00u16;
30159 let maskedval = padval & mask;
30160 if maskedval != 0 {
30161 return Err(fidl::Error::NonZeroPadding {
30162 padding_start: offset + 2 + ((mask as u64).trailing_zeros() / 8) as usize,
30163 });
30164 }
30165 unsafe {
30167 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
30168 }
30169 Ok(())
30170 }
30171 }
30172
30173 impl fidl::encoding::ValueTypeMarker for StructTableNoFields {
30174 type Borrowed<'a> = &'a Self;
30175 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30176 value
30177 }
30178 }
30179
30180 unsafe impl fidl::encoding::TypeMarker for StructTableNoFields {
30181 type Owned = Self;
30182
30183 #[inline(always)]
30184 fn inline_align(_context: fidl::encoding::Context) -> usize {
30185 8
30186 }
30187
30188 #[inline(always)]
30189 fn inline_size(_context: fidl::encoding::Context) -> usize {
30190 16
30191 }
30192 }
30193
30194 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructTableNoFields, D>
30195 for &StructTableNoFields
30196 {
30197 #[inline]
30198 unsafe fn encode(
30199 self,
30200 encoder: &mut fidl::encoding::Encoder<'_, D>,
30201 offset: usize,
30202 _depth: fidl::encoding::Depth,
30203 ) -> fidl::Result<()> {
30204 encoder.debug_check_bounds::<StructTableNoFields>(offset);
30205 fidl::encoding::Encode::<StructTableNoFields, D>::encode(
30207 (<TableNoFields as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
30208 encoder,
30209 offset,
30210 _depth,
30211 )
30212 }
30213 }
30214 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableNoFields, D>>
30215 fidl::encoding::Encode<StructTableNoFields, D> for (T0,)
30216 {
30217 #[inline]
30218 unsafe fn encode(
30219 self,
30220 encoder: &mut fidl::encoding::Encoder<'_, D>,
30221 offset: usize,
30222 depth: fidl::encoding::Depth,
30223 ) -> fidl::Result<()> {
30224 encoder.debug_check_bounds::<StructTableNoFields>(offset);
30225 self.0.encode(encoder, offset + 0, depth)?;
30229 Ok(())
30230 }
30231 }
30232
30233 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructTableNoFields {
30234 #[inline(always)]
30235 fn new_empty() -> Self {
30236 Self { t: fidl::new_empty!(TableNoFields, D) }
30237 }
30238
30239 #[inline]
30240 unsafe fn decode(
30241 &mut self,
30242 decoder: &mut fidl::encoding::Decoder<'_, D>,
30243 offset: usize,
30244 _depth: fidl::encoding::Depth,
30245 ) -> fidl::Result<()> {
30246 decoder.debug_check_bounds::<Self>(offset);
30247 fidl::decode!(TableNoFields, D, &mut self.t, decoder, offset + 0, _depth)?;
30249 Ok(())
30250 }
30251 }
30252
30253 impl fidl::encoding::ValueTypeMarker for StructWithArrays {
30254 type Borrowed<'a> = &'a Self;
30255 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30256 value
30257 }
30258 }
30259
30260 unsafe impl fidl::encoding::TypeMarker for StructWithArrays {
30261 type Owned = Self;
30262
30263 #[inline(always)]
30264 fn inline_align(_context: fidl::encoding::Context) -> usize {
30265 8
30266 }
30267
30268 #[inline(always)]
30269 fn inline_size(_context: fidl::encoding::Context) -> usize {
30270 120
30271 }
30272 }
30273
30274 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithArrays, D>
30275 for &StructWithArrays
30276 {
30277 #[inline]
30278 unsafe fn encode(
30279 self,
30280 encoder: &mut fidl::encoding::Encoder<'_, D>,
30281 offset: usize,
30282 _depth: fidl::encoding::Depth,
30283 ) -> fidl::Result<()> {
30284 encoder.debug_check_bounds::<StructWithArrays>(offset);
30285 fidl::encoding::Encode::<StructWithArrays, D>::encode(
30287 (
30288 <fidl::encoding::Array<i32, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_int),
30289 <fidl::encoding::Array<fidl::encoding::UnboundedString, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_string),
30290 <fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_nullable_string),
30291 <fidl::encoding::Array<StructWithInt, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_struct),
30292 <fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_nullable_struct),
30293 <fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2> as fidl::encoding::ValueTypeMarker>::borrow(&self.arr_arr_int),
30294 ),
30295 encoder, offset, _depth
30296 )
30297 }
30298 }
30299 unsafe impl<
30300 D: fidl::encoding::ResourceDialect,
30301 T0: fidl::encoding::Encode<fidl::encoding::Array<i32, 2>, D>,
30302 T1: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D>,
30303 T2: fidl::encoding::Encode<
30304 fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2>,
30305 D,
30306 >,
30307 T3: fidl::encoding::Encode<fidl::encoding::Array<StructWithInt, 2>, D>,
30308 T4: fidl::encoding::Encode<
30309 fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30310 D,
30311 >,
30312 T5: fidl::encoding::Encode<fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>, D>,
30313 > fidl::encoding::Encode<StructWithArrays, D> for (T0, T1, T2, T3, T4, T5)
30314 {
30315 #[inline]
30316 unsafe fn encode(
30317 self,
30318 encoder: &mut fidl::encoding::Encoder<'_, D>,
30319 offset: usize,
30320 depth: fidl::encoding::Depth,
30321 ) -> fidl::Result<()> {
30322 encoder.debug_check_bounds::<StructWithArrays>(offset);
30323 self.0.encode(encoder, offset + 0, depth)?;
30327 self.1.encode(encoder, offset + 8, depth)?;
30328 self.2.encode(encoder, offset + 40, depth)?;
30329 self.3.encode(encoder, offset + 72, depth)?;
30330 self.4.encode(encoder, offset + 80, depth)?;
30331 self.5.encode(encoder, offset + 96, depth)?;
30332 Ok(())
30333 }
30334 }
30335
30336 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithArrays {
30337 #[inline(always)]
30338 fn new_empty() -> Self {
30339 Self {
30340 arr_int: fidl::new_empty!(fidl::encoding::Array<i32, 2>, D),
30341 arr_string: fidl::new_empty!(fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D),
30342 arr_nullable_string: fidl::new_empty!(
30343 fidl::encoding::Array<
30344 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30345 2,
30346 >,
30347 D
30348 ),
30349 arr_struct: fidl::new_empty!(fidl::encoding::Array<StructWithInt, 2>, D),
30350 arr_nullable_struct: fidl::new_empty!(
30351 fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30352 D
30353 ),
30354 arr_arr_int: fidl::new_empty!(
30355 fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>,
30356 D
30357 ),
30358 }
30359 }
30360
30361 #[inline]
30362 unsafe fn decode(
30363 &mut self,
30364 decoder: &mut fidl::encoding::Decoder<'_, D>,
30365 offset: usize,
30366 _depth: fidl::encoding::Depth,
30367 ) -> fidl::Result<()> {
30368 decoder.debug_check_bounds::<Self>(offset);
30369 fidl::decode!(fidl::encoding::Array<i32, 2>, D, &mut self.arr_int, decoder, offset + 0, _depth)?;
30371 fidl::decode!(fidl::encoding::Array<fidl::encoding::UnboundedString, 2>, D, &mut self.arr_string, decoder, offset + 8, _depth)?;
30372 fidl::decode!(
30373 fidl::encoding::Array<fidl::encoding::Optional<fidl::encoding::UnboundedString>, 2>,
30374 D,
30375 &mut self.arr_nullable_string,
30376 decoder,
30377 offset + 40,
30378 _depth
30379 )?;
30380 fidl::decode!(fidl::encoding::Array<StructWithInt, 2>, D, &mut self.arr_struct, decoder, offset + 72, _depth)?;
30381 fidl::decode!(
30382 fidl::encoding::Array<fidl::encoding::Boxed<StructWithInt>, 2>,
30383 D,
30384 &mut self.arr_nullable_struct,
30385 decoder,
30386 offset + 80,
30387 _depth
30388 )?;
30389 fidl::decode!(
30390 fidl::encoding::Array<fidl::encoding::Array<i32, 3>, 2>,
30391 D,
30392 &mut self.arr_arr_int,
30393 decoder,
30394 offset + 96,
30395 _depth
30396 )?;
30397 Ok(())
30398 }
30399 }
30400
30401 impl fidl::encoding::ValueTypeMarker for StructWithInt {
30402 type Borrowed<'a> = &'a Self;
30403 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30404 value
30405 }
30406 }
30407
30408 unsafe impl fidl::encoding::TypeMarker for StructWithInt {
30409 type Owned = Self;
30410
30411 #[inline(always)]
30412 fn inline_align(_context: fidl::encoding::Context) -> usize {
30413 4
30414 }
30415
30416 #[inline(always)]
30417 fn inline_size(_context: fidl::encoding::Context) -> usize {
30418 4
30419 }
30420 #[inline(always)]
30421 fn encode_is_copy() -> bool {
30422 true
30423 }
30424
30425 #[inline(always)]
30426 fn decode_is_copy() -> bool {
30427 true
30428 }
30429 }
30430
30431 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithInt, D>
30432 for &StructWithInt
30433 {
30434 #[inline]
30435 unsafe fn encode(
30436 self,
30437 encoder: &mut fidl::encoding::Encoder<'_, D>,
30438 offset: usize,
30439 _depth: fidl::encoding::Depth,
30440 ) -> fidl::Result<()> {
30441 encoder.debug_check_bounds::<StructWithInt>(offset);
30442 unsafe {
30443 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
30445 (buf_ptr as *mut StructWithInt)
30446 .write_unaligned((self as *const StructWithInt).read());
30447 }
30450 Ok(())
30451 }
30452 }
30453 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
30454 fidl::encoding::Encode<StructWithInt, D> for (T0,)
30455 {
30456 #[inline]
30457 unsafe fn encode(
30458 self,
30459 encoder: &mut fidl::encoding::Encoder<'_, D>,
30460 offset: usize,
30461 depth: fidl::encoding::Depth,
30462 ) -> fidl::Result<()> {
30463 encoder.debug_check_bounds::<StructWithInt>(offset);
30464 self.0.encode(encoder, offset + 0, depth)?;
30468 Ok(())
30469 }
30470 }
30471
30472 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithInt {
30473 #[inline(always)]
30474 fn new_empty() -> Self {
30475 Self { x: fidl::new_empty!(i32, D) }
30476 }
30477
30478 #[inline]
30479 unsafe fn decode(
30480 &mut self,
30481 decoder: &mut fidl::encoding::Decoder<'_, D>,
30482 offset: usize,
30483 _depth: fidl::encoding::Depth,
30484 ) -> fidl::Result<()> {
30485 decoder.debug_check_bounds::<Self>(offset);
30486 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
30487 unsafe {
30490 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
30491 }
30492 Ok(())
30493 }
30494 }
30495
30496 impl fidl::encoding::ValueTypeMarker for StructWithOptionals {
30497 type Borrowed<'a> = &'a Self;
30498 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30499 value
30500 }
30501 }
30502
30503 unsafe impl fidl::encoding::TypeMarker for StructWithOptionals {
30504 type Owned = Self;
30505
30506 #[inline(always)]
30507 fn inline_align(_context: fidl::encoding::Context) -> usize {
30508 8
30509 }
30510
30511 #[inline(always)]
30512 fn inline_size(_context: fidl::encoding::Context) -> usize {
30513 96
30514 }
30515 }
30516
30517 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithOptionals, D>
30518 for &StructWithOptionals
30519 {
30520 #[inline]
30521 unsafe fn encode(
30522 self,
30523 encoder: &mut fidl::encoding::Encoder<'_, D>,
30524 offset: usize,
30525 _depth: fidl::encoding::Depth,
30526 ) -> fidl::Result<()> {
30527 encoder.debug_check_bounds::<StructWithOptionals>(offset);
30528 fidl::encoding::Encode::<StructWithOptionals, D>::encode(
30530 (
30531 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
30532 <fidl::encoding::Boxed<EmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.s2),
30533 <TableWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.t),
30534 <XUnionWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
30535 <fidl::encoding::OptionalUnion<XUnionWithEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu2),
30536 <UnionWithEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.u),
30537 <fidl::encoding::OptionalUnion<UnionWithEmptyStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.u2),
30538 ),
30539 encoder, offset, _depth
30540 )
30541 }
30542 }
30543 unsafe impl<
30544 D: fidl::encoding::ResourceDialect,
30545 T0: fidl::encoding::Encode<EmptyStruct, D>,
30546 T1: fidl::encoding::Encode<fidl::encoding::Boxed<EmptyStruct>, D>,
30547 T2: fidl::encoding::Encode<TableWithEmptyStruct, D>,
30548 T3: fidl::encoding::Encode<XUnionWithEmptyStruct, D>,
30549 T4: fidl::encoding::Encode<fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>, D>,
30550 T5: fidl::encoding::Encode<UnionWithEmptyStruct, D>,
30551 T6: fidl::encoding::Encode<fidl::encoding::OptionalUnion<UnionWithEmptyStruct>, D>,
30552 > fidl::encoding::Encode<StructWithOptionals, D> for (T0, T1, T2, T3, T4, T5, T6)
30553 {
30554 #[inline]
30555 unsafe fn encode(
30556 self,
30557 encoder: &mut fidl::encoding::Encoder<'_, D>,
30558 offset: usize,
30559 depth: fidl::encoding::Depth,
30560 ) -> fidl::Result<()> {
30561 encoder.debug_check_bounds::<StructWithOptionals>(offset);
30562 unsafe {
30565 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
30566 (ptr as *mut u64).write_unaligned(0);
30567 }
30568 self.0.encode(encoder, offset + 0, depth)?;
30570 self.1.encode(encoder, offset + 8, depth)?;
30571 self.2.encode(encoder, offset + 16, depth)?;
30572 self.3.encode(encoder, offset + 32, depth)?;
30573 self.4.encode(encoder, offset + 48, depth)?;
30574 self.5.encode(encoder, offset + 64, depth)?;
30575 self.6.encode(encoder, offset + 80, depth)?;
30576 Ok(())
30577 }
30578 }
30579
30580 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithOptionals {
30581 #[inline(always)]
30582 fn new_empty() -> Self {
30583 Self {
30584 s: fidl::new_empty!(EmptyStruct, D),
30585 s2: fidl::new_empty!(fidl::encoding::Boxed<EmptyStruct>, D),
30586 t: fidl::new_empty!(TableWithEmptyStruct, D),
30587 xu: fidl::new_empty!(XUnionWithEmptyStruct, D),
30588 xu2: fidl::new_empty!(fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>, D),
30589 u: fidl::new_empty!(UnionWithEmptyStruct, D),
30590 u2: fidl::new_empty!(fidl::encoding::OptionalUnion<UnionWithEmptyStruct>, D),
30591 }
30592 }
30593
30594 #[inline]
30595 unsafe fn decode(
30596 &mut self,
30597 decoder: &mut fidl::encoding::Decoder<'_, D>,
30598 offset: usize,
30599 _depth: fidl::encoding::Depth,
30600 ) -> fidl::Result<()> {
30601 decoder.debug_check_bounds::<Self>(offset);
30602 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
30604 let padval = unsafe { (ptr as *const u64).read_unaligned() };
30605 let mask = 0xffffffffffffff00u64;
30606 let maskedval = padval & mask;
30607 if maskedval != 0 {
30608 return Err(fidl::Error::NonZeroPadding {
30609 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
30610 });
30611 }
30612 fidl::decode!(EmptyStruct, D, &mut self.s, decoder, offset + 0, _depth)?;
30613 fidl::decode!(
30614 fidl::encoding::Boxed<EmptyStruct>,
30615 D,
30616 &mut self.s2,
30617 decoder,
30618 offset + 8,
30619 _depth
30620 )?;
30621 fidl::decode!(TableWithEmptyStruct, D, &mut self.t, decoder, offset + 16, _depth)?;
30622 fidl::decode!(XUnionWithEmptyStruct, D, &mut self.xu, decoder, offset + 32, _depth)?;
30623 fidl::decode!(
30624 fidl::encoding::OptionalUnion<XUnionWithEmptyStruct>,
30625 D,
30626 &mut self.xu2,
30627 decoder,
30628 offset + 48,
30629 _depth
30630 )?;
30631 fidl::decode!(UnionWithEmptyStruct, D, &mut self.u, decoder, offset + 64, _depth)?;
30632 fidl::decode!(
30633 fidl::encoding::OptionalUnion<UnionWithEmptyStruct>,
30634 D,
30635 &mut self.u2,
30636 decoder,
30637 offset + 80,
30638 _depth
30639 )?;
30640 Ok(())
30641 }
30642 }
30643
30644 impl fidl::encoding::ValueTypeMarker for StructWithVectors {
30645 type Borrowed<'a> = &'a Self;
30646 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30647 value
30648 }
30649 }
30650
30651 unsafe impl fidl::encoding::TypeMarker for StructWithVectors {
30652 type Owned = Self;
30653
30654 #[inline(always)]
30655 fn inline_align(_context: fidl::encoding::Context) -> usize {
30656 8
30657 }
30658
30659 #[inline(always)]
30660 fn inline_size(_context: fidl::encoding::Context) -> usize {
30661 112
30662 }
30663 }
30664
30665 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StructWithVectors, D>
30666 for &StructWithVectors
30667 {
30668 #[inline]
30669 unsafe fn encode(
30670 self,
30671 encoder: &mut fidl::encoding::Encoder<'_, D>,
30672 offset: usize,
30673 _depth: fidl::encoding::Depth,
30674 ) -> fidl::Result<()> {
30675 encoder.debug_check_bounds::<StructWithVectors>(offset);
30676 fidl::encoding::Encode::<StructWithVectors, D>::encode(
30678 (
30679 <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_empty),
30680 <fidl::encoding::UnboundedVector<i32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_int),
30681 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_string),
30682 <fidl::encoding::UnboundedVector<fidl::encoding::Optional<fidl::encoding::UnboundedString>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_nullable_string),
30683 <fidl::encoding::UnboundedVector<StructWithInt> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_struct),
30684 <fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_nullable_struct),
30685 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vec_vec_int),
30686 ),
30687 encoder, offset, _depth
30688 )
30689 }
30690 }
30691 unsafe impl<
30692 D: fidl::encoding::ResourceDialect,
30693 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
30694 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<i32>, D>,
30695 T2: fidl::encoding::Encode<
30696 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
30697 D,
30698 >,
30699 T3: fidl::encoding::Encode<
30700 fidl::encoding::UnboundedVector<
30701 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30702 >,
30703 D,
30704 >,
30705 T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<StructWithInt>, D>,
30706 T5: fidl::encoding::Encode<
30707 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
30708 D,
30709 >,
30710 T6: fidl::encoding::Encode<
30711 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
30712 D,
30713 >,
30714 > fidl::encoding::Encode<StructWithVectors, D> for (T0, T1, T2, T3, T4, T5, T6)
30715 {
30716 #[inline]
30717 unsafe fn encode(
30718 self,
30719 encoder: &mut fidl::encoding::Encoder<'_, D>,
30720 offset: usize,
30721 depth: fidl::encoding::Depth,
30722 ) -> fidl::Result<()> {
30723 encoder.debug_check_bounds::<StructWithVectors>(offset);
30724 self.0.encode(encoder, offset + 0, depth)?;
30728 self.1.encode(encoder, offset + 16, depth)?;
30729 self.2.encode(encoder, offset + 32, depth)?;
30730 self.3.encode(encoder, offset + 48, depth)?;
30731 self.4.encode(encoder, offset + 64, depth)?;
30732 self.5.encode(encoder, offset + 80, depth)?;
30733 self.6.encode(encoder, offset + 96, depth)?;
30734 Ok(())
30735 }
30736 }
30737
30738 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StructWithVectors {
30739 #[inline(always)]
30740 fn new_empty() -> Self {
30741 Self {
30742 vec_empty: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
30743 vec_int: fidl::new_empty!(fidl::encoding::UnboundedVector<i32>, D),
30744 vec_string: fidl::new_empty!(
30745 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
30746 D
30747 ),
30748 vec_nullable_string: fidl::new_empty!(
30749 fidl::encoding::UnboundedVector<
30750 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30751 >,
30752 D
30753 ),
30754 vec_struct: fidl::new_empty!(fidl::encoding::UnboundedVector<StructWithInt>, D),
30755 vec_nullable_struct: fidl::new_empty!(
30756 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
30757 D
30758 ),
30759 vec_vec_int: fidl::new_empty!(
30760 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
30761 D
30762 ),
30763 }
30764 }
30765
30766 #[inline]
30767 unsafe fn decode(
30768 &mut self,
30769 decoder: &mut fidl::encoding::Decoder<'_, D>,
30770 offset: usize,
30771 _depth: fidl::encoding::Depth,
30772 ) -> fidl::Result<()> {
30773 decoder.debug_check_bounds::<Self>(offset);
30774 fidl::decode!(
30776 fidl::encoding::UnboundedVector<i32>,
30777 D,
30778 &mut self.vec_empty,
30779 decoder,
30780 offset + 0,
30781 _depth
30782 )?;
30783 fidl::decode!(
30784 fidl::encoding::UnboundedVector<i32>,
30785 D,
30786 &mut self.vec_int,
30787 decoder,
30788 offset + 16,
30789 _depth
30790 )?;
30791 fidl::decode!(
30792 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
30793 D,
30794 &mut self.vec_string,
30795 decoder,
30796 offset + 32,
30797 _depth
30798 )?;
30799 fidl::decode!(
30800 fidl::encoding::UnboundedVector<
30801 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
30802 >,
30803 D,
30804 &mut self.vec_nullable_string,
30805 decoder,
30806 offset + 48,
30807 _depth
30808 )?;
30809 fidl::decode!(
30810 fidl::encoding::UnboundedVector<StructWithInt>,
30811 D,
30812 &mut self.vec_struct,
30813 decoder,
30814 offset + 64,
30815 _depth
30816 )?;
30817 fidl::decode!(
30818 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructWithInt>>,
30819 D,
30820 &mut self.vec_nullable_struct,
30821 decoder,
30822 offset + 80,
30823 _depth
30824 )?;
30825 fidl::decode!(
30826 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<i32>>,
30827 D,
30828 &mut self.vec_vec_int,
30829 decoder,
30830 offset + 96,
30831 _depth
30832 )?;
30833 Ok(())
30834 }
30835 }
30836
30837 impl fidl::encoding::ValueTypeMarker for TableFieldInlinedStruct {
30838 type Borrowed<'a> = &'a Self;
30839 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30840 value
30841 }
30842 }
30843
30844 unsafe impl fidl::encoding::TypeMarker for TableFieldInlinedStruct {
30845 type Owned = Self;
30846
30847 #[inline(always)]
30848 fn inline_align(_context: fidl::encoding::Context) -> usize {
30849 8
30850 }
30851
30852 #[inline(always)]
30853 fn inline_size(_context: fidl::encoding::Context) -> usize {
30854 16
30855 }
30856 }
30857
30858 unsafe impl<D: fidl::encoding::ResourceDialect>
30859 fidl::encoding::Encode<TableFieldInlinedStruct, D> for &TableFieldInlinedStruct
30860 {
30861 #[inline]
30862 unsafe fn encode(
30863 self,
30864 encoder: &mut fidl::encoding::Encoder<'_, D>,
30865 offset: usize,
30866 _depth: fidl::encoding::Depth,
30867 ) -> fidl::Result<()> {
30868 encoder.debug_check_bounds::<TableFieldInlinedStruct>(offset);
30869 fidl::encoding::Encode::<TableFieldInlinedStruct, D>::encode(
30871 (<TableFieldInlined as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
30872 encoder,
30873 offset,
30874 _depth,
30875 )
30876 }
30877 }
30878 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableFieldInlined, D>>
30879 fidl::encoding::Encode<TableFieldInlinedStruct, D> for (T0,)
30880 {
30881 #[inline]
30882 unsafe fn encode(
30883 self,
30884 encoder: &mut fidl::encoding::Encoder<'_, D>,
30885 offset: usize,
30886 depth: fidl::encoding::Depth,
30887 ) -> fidl::Result<()> {
30888 encoder.debug_check_bounds::<TableFieldInlinedStruct>(offset);
30889 self.0.encode(encoder, offset + 0, depth)?;
30893 Ok(())
30894 }
30895 }
30896
30897 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30898 for TableFieldInlinedStruct
30899 {
30900 #[inline(always)]
30901 fn new_empty() -> Self {
30902 Self { t: fidl::new_empty!(TableFieldInlined, D) }
30903 }
30904
30905 #[inline]
30906 unsafe fn decode(
30907 &mut self,
30908 decoder: &mut fidl::encoding::Decoder<'_, D>,
30909 offset: usize,
30910 _depth: fidl::encoding::Depth,
30911 ) -> fidl::Result<()> {
30912 decoder.debug_check_bounds::<Self>(offset);
30913 fidl::decode!(TableFieldInlined, D, &mut self.t, decoder, offset + 0, _depth)?;
30915 Ok(())
30916 }
30917 }
30918
30919 impl fidl::encoding::ValueTypeMarker for TableFieldOutOfLineStruct {
30920 type Borrowed<'a> = &'a Self;
30921 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
30922 value
30923 }
30924 }
30925
30926 unsafe impl fidl::encoding::TypeMarker for TableFieldOutOfLineStruct {
30927 type Owned = Self;
30928
30929 #[inline(always)]
30930 fn inline_align(_context: fidl::encoding::Context) -> usize {
30931 8
30932 }
30933
30934 #[inline(always)]
30935 fn inline_size(_context: fidl::encoding::Context) -> usize {
30936 16
30937 }
30938 }
30939
30940 unsafe impl<D: fidl::encoding::ResourceDialect>
30941 fidl::encoding::Encode<TableFieldOutOfLineStruct, D> for &TableFieldOutOfLineStruct
30942 {
30943 #[inline]
30944 unsafe fn encode(
30945 self,
30946 encoder: &mut fidl::encoding::Encoder<'_, D>,
30947 offset: usize,
30948 _depth: fidl::encoding::Depth,
30949 ) -> fidl::Result<()> {
30950 encoder.debug_check_bounds::<TableFieldOutOfLineStruct>(offset);
30951 fidl::encoding::Encode::<TableFieldOutOfLineStruct, D>::encode(
30953 (<TableFieldOutOfLine as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
30954 encoder,
30955 offset,
30956 _depth,
30957 )
30958 }
30959 }
30960 unsafe impl<
30961 D: fidl::encoding::ResourceDialect,
30962 T0: fidl::encoding::Encode<TableFieldOutOfLine, D>,
30963 > fidl::encoding::Encode<TableFieldOutOfLineStruct, D> for (T0,)
30964 {
30965 #[inline]
30966 unsafe fn encode(
30967 self,
30968 encoder: &mut fidl::encoding::Encoder<'_, D>,
30969 offset: usize,
30970 depth: fidl::encoding::Depth,
30971 ) -> fidl::Result<()> {
30972 encoder.debug_check_bounds::<TableFieldOutOfLineStruct>(offset);
30973 self.0.encode(encoder, offset + 0, depth)?;
30977 Ok(())
30978 }
30979 }
30980
30981 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
30982 for TableFieldOutOfLineStruct
30983 {
30984 #[inline(always)]
30985 fn new_empty() -> Self {
30986 Self { t: fidl::new_empty!(TableFieldOutOfLine, D) }
30987 }
30988
30989 #[inline]
30990 unsafe fn decode(
30991 &mut self,
30992 decoder: &mut fidl::encoding::Decoder<'_, D>,
30993 offset: usize,
30994 _depth: fidl::encoding::Depth,
30995 ) -> fidl::Result<()> {
30996 decoder.debug_check_bounds::<Self>(offset);
30997 fidl::decode!(TableFieldOutOfLine, D, &mut self.t, decoder, offset + 0, _depth)?;
30999 Ok(())
31000 }
31001 }
31002
31003 impl fidl::encoding::ValueTypeMarker for TableFieldUnknownStruct {
31004 type Borrowed<'a> = &'a Self;
31005 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31006 value
31007 }
31008 }
31009
31010 unsafe impl fidl::encoding::TypeMarker for TableFieldUnknownStruct {
31011 type Owned = Self;
31012
31013 #[inline(always)]
31014 fn inline_align(_context: fidl::encoding::Context) -> usize {
31015 8
31016 }
31017
31018 #[inline(always)]
31019 fn inline_size(_context: fidl::encoding::Context) -> usize {
31020 16
31021 }
31022 }
31023
31024 unsafe impl<D: fidl::encoding::ResourceDialect>
31025 fidl::encoding::Encode<TableFieldUnknownStruct, D> for &TableFieldUnknownStruct
31026 {
31027 #[inline]
31028 unsafe fn encode(
31029 self,
31030 encoder: &mut fidl::encoding::Encoder<'_, D>,
31031 offset: usize,
31032 _depth: fidl::encoding::Depth,
31033 ) -> fidl::Result<()> {
31034 encoder.debug_check_bounds::<TableFieldUnknownStruct>(offset);
31035 fidl::encoding::Encode::<TableFieldUnknownStruct, D>::encode(
31037 (<TableFieldUnknown as fidl::encoding::ValueTypeMarker>::borrow(&self.t),),
31038 encoder,
31039 offset,
31040 _depth,
31041 )
31042 }
31043 }
31044 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TableFieldUnknown, D>>
31045 fidl::encoding::Encode<TableFieldUnknownStruct, D> for (T0,)
31046 {
31047 #[inline]
31048 unsafe fn encode(
31049 self,
31050 encoder: &mut fidl::encoding::Encoder<'_, D>,
31051 offset: usize,
31052 depth: fidl::encoding::Depth,
31053 ) -> fidl::Result<()> {
31054 encoder.debug_check_bounds::<TableFieldUnknownStruct>(offset);
31055 self.0.encode(encoder, offset + 0, depth)?;
31059 Ok(())
31060 }
31061 }
31062
31063 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31064 for TableFieldUnknownStruct
31065 {
31066 #[inline(always)]
31067 fn new_empty() -> Self {
31068 Self { t: fidl::new_empty!(TableFieldUnknown, D) }
31069 }
31070
31071 #[inline]
31072 unsafe fn decode(
31073 &mut self,
31074 decoder: &mut fidl::encoding::Decoder<'_, D>,
31075 offset: usize,
31076 _depth: fidl::encoding::Depth,
31077 ) -> fidl::Result<()> {
31078 decoder.debug_check_bounds::<Self>(offset);
31079 fidl::decode!(TableFieldUnknown, D, &mut self.t, decoder, offset + 0, _depth)?;
31081 Ok(())
31082 }
31083 }
31084
31085 impl fidl::encoding::ValueTypeMarker for TableFieldUnsetFlexibleEnumInlinedStruct {
31086 type Borrowed<'a> = &'a Self;
31087 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31088 value
31089 }
31090 }
31091
31092 unsafe impl fidl::encoding::TypeMarker for TableFieldUnsetFlexibleEnumInlinedStruct {
31093 type Owned = Self;
31094
31095 #[inline(always)]
31096 fn inline_align(_context: fidl::encoding::Context) -> usize {
31097 8
31098 }
31099
31100 #[inline(always)]
31101 fn inline_size(_context: fidl::encoding::Context) -> usize {
31102 16
31103 }
31104 }
31105
31106 unsafe impl<D: fidl::encoding::ResourceDialect>
31107 fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlinedStruct, D>
31108 for &TableFieldUnsetFlexibleEnumInlinedStruct
31109 {
31110 #[inline]
31111 unsafe fn encode(
31112 self,
31113 encoder: &mut fidl::encoding::Encoder<'_, D>,
31114 offset: usize,
31115 _depth: fidl::encoding::Depth,
31116 ) -> fidl::Result<()> {
31117 encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlinedStruct>(offset);
31118 fidl::encoding::Encode::<TableFieldUnsetFlexibleEnumInlinedStruct, D>::encode(
31120 (<TableFieldUnsetFlexibleEnumInlined as fidl::encoding::ValueTypeMarker>::borrow(
31121 &self.t,
31122 ),),
31123 encoder,
31124 offset,
31125 _depth,
31126 )
31127 }
31128 }
31129 unsafe impl<
31130 D: fidl::encoding::ResourceDialect,
31131 T0: fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlined, D>,
31132 > fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlinedStruct, D> for (T0,)
31133 {
31134 #[inline]
31135 unsafe fn encode(
31136 self,
31137 encoder: &mut fidl::encoding::Encoder<'_, D>,
31138 offset: usize,
31139 depth: fidl::encoding::Depth,
31140 ) -> fidl::Result<()> {
31141 encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlinedStruct>(offset);
31142 self.0.encode(encoder, offset + 0, depth)?;
31146 Ok(())
31147 }
31148 }
31149
31150 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31151 for TableFieldUnsetFlexibleEnumInlinedStruct
31152 {
31153 #[inline(always)]
31154 fn new_empty() -> Self {
31155 Self { t: fidl::new_empty!(TableFieldUnsetFlexibleEnumInlined, D) }
31156 }
31157
31158 #[inline]
31159 unsafe fn decode(
31160 &mut self,
31161 decoder: &mut fidl::encoding::Decoder<'_, D>,
31162 offset: usize,
31163 _depth: fidl::encoding::Depth,
31164 ) -> fidl::Result<()> {
31165 decoder.debug_check_bounds::<Self>(offset);
31166 fidl::decode!(
31168 TableFieldUnsetFlexibleEnumInlined,
31169 D,
31170 &mut self.t,
31171 decoder,
31172 offset + 0,
31173 _depth
31174 )?;
31175 Ok(())
31176 }
31177 }
31178
31179 impl fidl::encoding::ValueTypeMarker for TableStructWithReservedSandwichStruct {
31180 type Borrowed<'a> = &'a Self;
31181 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31182 value
31183 }
31184 }
31185
31186 unsafe impl fidl::encoding::TypeMarker for TableStructWithReservedSandwichStruct {
31187 type Owned = Self;
31188
31189 #[inline(always)]
31190 fn inline_align(_context: fidl::encoding::Context) -> usize {
31191 8
31192 }
31193
31194 #[inline(always)]
31195 fn inline_size(_context: fidl::encoding::Context) -> usize {
31196 16
31197 }
31198 }
31199
31200 unsafe impl<D: fidl::encoding::ResourceDialect>
31201 fidl::encoding::Encode<TableStructWithReservedSandwichStruct, D>
31202 for &TableStructWithReservedSandwichStruct
31203 {
31204 #[inline]
31205 unsafe fn encode(
31206 self,
31207 encoder: &mut fidl::encoding::Encoder<'_, D>,
31208 offset: usize,
31209 _depth: fidl::encoding::Depth,
31210 ) -> fidl::Result<()> {
31211 encoder.debug_check_bounds::<TableStructWithReservedSandwichStruct>(offset);
31212 fidl::encoding::Encode::<TableStructWithReservedSandwichStruct, D>::encode(
31214 (<TableStructWithReservedSandwich as fidl::encoding::ValueTypeMarker>::borrow(
31215 &self.table,
31216 ),),
31217 encoder,
31218 offset,
31219 _depth,
31220 )
31221 }
31222 }
31223 unsafe impl<
31224 D: fidl::encoding::ResourceDialect,
31225 T0: fidl::encoding::Encode<TableStructWithReservedSandwich, D>,
31226 > fidl::encoding::Encode<TableStructWithReservedSandwichStruct, D> for (T0,)
31227 {
31228 #[inline]
31229 unsafe fn encode(
31230 self,
31231 encoder: &mut fidl::encoding::Encoder<'_, D>,
31232 offset: usize,
31233 depth: fidl::encoding::Depth,
31234 ) -> fidl::Result<()> {
31235 encoder.debug_check_bounds::<TableStructWithReservedSandwichStruct>(offset);
31236 self.0.encode(encoder, offset + 0, depth)?;
31240 Ok(())
31241 }
31242 }
31243
31244 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31245 for TableStructWithReservedSandwichStruct
31246 {
31247 #[inline(always)]
31248 fn new_empty() -> Self {
31249 Self { table: fidl::new_empty!(TableStructWithReservedSandwich, D) }
31250 }
31251
31252 #[inline]
31253 unsafe fn decode(
31254 &mut self,
31255 decoder: &mut fidl::encoding::Decoder<'_, D>,
31256 offset: usize,
31257 _depth: fidl::encoding::Depth,
31258 ) -> fidl::Result<()> {
31259 decoder.debug_check_bounds::<Self>(offset);
31260 fidl::decode!(
31262 TableStructWithReservedSandwich,
31263 D,
31264 &mut self.table,
31265 decoder,
31266 offset + 0,
31267 _depth
31268 )?;
31269 Ok(())
31270 }
31271 }
31272
31273 impl fidl::encoding::ValueTypeMarker for TableStructWithUint32SandwichStruct {
31274 type Borrowed<'a> = &'a Self;
31275 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31276 value
31277 }
31278 }
31279
31280 unsafe impl fidl::encoding::TypeMarker for TableStructWithUint32SandwichStruct {
31281 type Owned = Self;
31282
31283 #[inline(always)]
31284 fn inline_align(_context: fidl::encoding::Context) -> usize {
31285 8
31286 }
31287
31288 #[inline(always)]
31289 fn inline_size(_context: fidl::encoding::Context) -> usize {
31290 16
31291 }
31292 }
31293
31294 unsafe impl<D: fidl::encoding::ResourceDialect>
31295 fidl::encoding::Encode<TableStructWithUint32SandwichStruct, D>
31296 for &TableStructWithUint32SandwichStruct
31297 {
31298 #[inline]
31299 unsafe fn encode(
31300 self,
31301 encoder: &mut fidl::encoding::Encoder<'_, D>,
31302 offset: usize,
31303 _depth: fidl::encoding::Depth,
31304 ) -> fidl::Result<()> {
31305 encoder.debug_check_bounds::<TableStructWithUint32SandwichStruct>(offset);
31306 fidl::encoding::Encode::<TableStructWithUint32SandwichStruct, D>::encode(
31308 (<TableStructWithUint32Sandwich as fidl::encoding::ValueTypeMarker>::borrow(
31309 &self.table,
31310 ),),
31311 encoder,
31312 offset,
31313 _depth,
31314 )
31315 }
31316 }
31317 unsafe impl<
31318 D: fidl::encoding::ResourceDialect,
31319 T0: fidl::encoding::Encode<TableStructWithUint32Sandwich, D>,
31320 > fidl::encoding::Encode<TableStructWithUint32SandwichStruct, D> for (T0,)
31321 {
31322 #[inline]
31323 unsafe fn encode(
31324 self,
31325 encoder: &mut fidl::encoding::Encoder<'_, D>,
31326 offset: usize,
31327 depth: fidl::encoding::Depth,
31328 ) -> fidl::Result<()> {
31329 encoder.debug_check_bounds::<TableStructWithUint32SandwichStruct>(offset);
31330 self.0.encode(encoder, offset + 0, depth)?;
31334 Ok(())
31335 }
31336 }
31337
31338 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31339 for TableStructWithUint32SandwichStruct
31340 {
31341 #[inline(always)]
31342 fn new_empty() -> Self {
31343 Self { table: fidl::new_empty!(TableStructWithUint32Sandwich, D) }
31344 }
31345
31346 #[inline]
31347 unsafe fn decode(
31348 &mut self,
31349 decoder: &mut fidl::encoding::Decoder<'_, D>,
31350 offset: usize,
31351 _depth: fidl::encoding::Depth,
31352 ) -> fidl::Result<()> {
31353 decoder.debug_check_bounds::<Self>(offset);
31354 fidl::decode!(
31356 TableStructWithUint32Sandwich,
31357 D,
31358 &mut self.table,
31359 decoder,
31360 offset + 0,
31361 _depth
31362 )?;
31363 Ok(())
31364 }
31365 }
31366
31367 impl fidl::encoding::ValueTypeMarker for TableWithReservedFieldThenUnionStruct {
31368 type Borrowed<'a> = &'a Self;
31369 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31370 value
31371 }
31372 }
31373
31374 unsafe impl fidl::encoding::TypeMarker for TableWithReservedFieldThenUnionStruct {
31375 type Owned = Self;
31376
31377 #[inline(always)]
31378 fn inline_align(_context: fidl::encoding::Context) -> usize {
31379 8
31380 }
31381
31382 #[inline(always)]
31383 fn inline_size(_context: fidl::encoding::Context) -> usize {
31384 16
31385 }
31386 }
31387
31388 unsafe impl<D: fidl::encoding::ResourceDialect>
31389 fidl::encoding::Encode<TableWithReservedFieldThenUnionStruct, D>
31390 for &TableWithReservedFieldThenUnionStruct
31391 {
31392 #[inline]
31393 unsafe fn encode(
31394 self,
31395 encoder: &mut fidl::encoding::Encoder<'_, D>,
31396 offset: usize,
31397 _depth: fidl::encoding::Depth,
31398 ) -> fidl::Result<()> {
31399 encoder.debug_check_bounds::<TableWithReservedFieldThenUnionStruct>(offset);
31400 fidl::encoding::Encode::<TableWithReservedFieldThenUnionStruct, D>::encode(
31402 (<TableWithReservedFieldThenUnion as fidl::encoding::ValueTypeMarker>::borrow(
31403 &self.t,
31404 ),),
31405 encoder,
31406 offset,
31407 _depth,
31408 )
31409 }
31410 }
31411 unsafe impl<
31412 D: fidl::encoding::ResourceDialect,
31413 T0: fidl::encoding::Encode<TableWithReservedFieldThenUnion, D>,
31414 > fidl::encoding::Encode<TableWithReservedFieldThenUnionStruct, D> for (T0,)
31415 {
31416 #[inline]
31417 unsafe fn encode(
31418 self,
31419 encoder: &mut fidl::encoding::Encoder<'_, D>,
31420 offset: usize,
31421 depth: fidl::encoding::Depth,
31422 ) -> fidl::Result<()> {
31423 encoder.debug_check_bounds::<TableWithReservedFieldThenUnionStruct>(offset);
31424 self.0.encode(encoder, offset + 0, depth)?;
31428 Ok(())
31429 }
31430 }
31431
31432 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31433 for TableWithReservedFieldThenUnionStruct
31434 {
31435 #[inline(always)]
31436 fn new_empty() -> Self {
31437 Self { t: fidl::new_empty!(TableWithReservedFieldThenUnion, D) }
31438 }
31439
31440 #[inline]
31441 unsafe fn decode(
31442 &mut self,
31443 decoder: &mut fidl::encoding::Decoder<'_, D>,
31444 offset: usize,
31445 _depth: fidl::encoding::Depth,
31446 ) -> fidl::Result<()> {
31447 decoder.debug_check_bounds::<Self>(offset);
31448 fidl::decode!(
31450 TableWithReservedFieldThenUnion,
31451 D,
31452 &mut self.t,
31453 decoder,
31454 offset + 0,
31455 _depth
31456 )?;
31457 Ok(())
31458 }
31459 }
31460
31461 impl fidl::encoding::ValueTypeMarker for TestAddEthernetDeviceRequest {
31462 type Borrowed<'a> = &'a Self;
31463 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31464 value
31465 }
31466 }
31467
31468 unsafe impl fidl::encoding::TypeMarker for TestAddEthernetDeviceRequest {
31469 type Owned = Self;
31470
31471 #[inline(always)]
31472 fn inline_align(_context: fidl::encoding::Context) -> usize {
31473 8
31474 }
31475
31476 #[inline(always)]
31477 fn inline_size(_context: fidl::encoding::Context) -> usize {
31478 56
31479 }
31480 }
31481
31482 unsafe impl<D: fidl::encoding::ResourceDialect>
31483 fidl::encoding::Encode<TestAddEthernetDeviceRequest, D> for &TestAddEthernetDeviceRequest
31484 {
31485 #[inline]
31486 unsafe fn encode(
31487 self,
31488 encoder: &mut fidl::encoding::Encoder<'_, D>,
31489 offset: usize,
31490 _depth: fidl::encoding::Depth,
31491 ) -> fidl::Result<()> {
31492 encoder.debug_check_bounds::<TestAddEthernetDeviceRequest>(offset);
31493 fidl::encoding::Encode::<TestAddEthernetDeviceRequest, D>::encode(
31495 (
31496 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
31497 &self.topological_path,
31498 ),
31499 <InterfaceConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),
31500 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.this_should_be_a_handle),
31501 ),
31502 encoder,
31503 offset,
31504 _depth,
31505 )
31506 }
31507 }
31508 unsafe impl<
31509 D: fidl::encoding::ResourceDialect,
31510 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
31511 T1: fidl::encoding::Encode<InterfaceConfig, D>,
31512 T2: fidl::encoding::Encode<u32, D>,
31513 > fidl::encoding::Encode<TestAddEthernetDeviceRequest, D> for (T0, T1, T2)
31514 {
31515 #[inline]
31516 unsafe fn encode(
31517 self,
31518 encoder: &mut fidl::encoding::Encoder<'_, D>,
31519 offset: usize,
31520 depth: fidl::encoding::Depth,
31521 ) -> fidl::Result<()> {
31522 encoder.debug_check_bounds::<TestAddEthernetDeviceRequest>(offset);
31523 unsafe {
31526 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
31527 (ptr as *mut u64).write_unaligned(0);
31528 }
31529 self.0.encode(encoder, offset + 0, depth)?;
31531 self.1.encode(encoder, offset + 16, depth)?;
31532 self.2.encode(encoder, offset + 48, depth)?;
31533 Ok(())
31534 }
31535 }
31536
31537 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31538 for TestAddEthernetDeviceRequest
31539 {
31540 #[inline(always)]
31541 fn new_empty() -> Self {
31542 Self {
31543 topological_path: fidl::new_empty!(fidl::encoding::UnboundedString, D),
31544 config: fidl::new_empty!(InterfaceConfig, D),
31545 this_should_be_a_handle: fidl::new_empty!(u32, D),
31546 }
31547 }
31548
31549 #[inline]
31550 unsafe fn decode(
31551 &mut self,
31552 decoder: &mut fidl::encoding::Decoder<'_, D>,
31553 offset: usize,
31554 _depth: fidl::encoding::Depth,
31555 ) -> fidl::Result<()> {
31556 decoder.debug_check_bounds::<Self>(offset);
31557 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
31559 let padval = unsafe { (ptr as *const u64).read_unaligned() };
31560 let mask = 0xffffffff00000000u64;
31561 let maskedval = padval & mask;
31562 if maskedval != 0 {
31563 return Err(fidl::Error::NonZeroPadding {
31564 padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
31565 });
31566 }
31567 fidl::decode!(
31568 fidl::encoding::UnboundedString,
31569 D,
31570 &mut self.topological_path,
31571 decoder,
31572 offset + 0,
31573 _depth
31574 )?;
31575 fidl::decode!(InterfaceConfig, D, &mut self.config, decoder, offset + 16, _depth)?;
31576 fidl::decode!(u32, D, &mut self.this_should_be_a_handle, decoder, offset + 48, _depth)?;
31577 Ok(())
31578 }
31579 }
31580
31581 impl fidl::encoding::ValueTypeMarker for TestFlexibleXUnionInStruct {
31582 type Borrowed<'a> = &'a Self;
31583 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31584 value
31585 }
31586 }
31587
31588 unsafe impl fidl::encoding::TypeMarker for TestFlexibleXUnionInStruct {
31589 type Owned = Self;
31590
31591 #[inline(always)]
31592 fn inline_align(_context: fidl::encoding::Context) -> usize {
31593 8
31594 }
31595
31596 #[inline(always)]
31597 fn inline_size(_context: fidl::encoding::Context) -> usize {
31598 16
31599 }
31600 }
31601
31602 unsafe impl<D: fidl::encoding::ResourceDialect>
31603 fidl::encoding::Encode<TestFlexibleXUnionInStruct, D> for &TestFlexibleXUnionInStruct
31604 {
31605 #[inline]
31606 unsafe fn encode(
31607 self,
31608 encoder: &mut fidl::encoding::Encoder<'_, D>,
31609 offset: usize,
31610 _depth: fidl::encoding::Depth,
31611 ) -> fidl::Result<()> {
31612 encoder.debug_check_bounds::<TestFlexibleXUnionInStruct>(offset);
31613 fidl::encoding::Encode::<TestFlexibleXUnionInStruct, D>::encode(
31615 (<SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
31616 encoder,
31617 offset,
31618 _depth,
31619 )
31620 }
31621 }
31622 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SampleXUnion, D>>
31623 fidl::encoding::Encode<TestFlexibleXUnionInStruct, D> for (T0,)
31624 {
31625 #[inline]
31626 unsafe fn encode(
31627 self,
31628 encoder: &mut fidl::encoding::Encoder<'_, D>,
31629 offset: usize,
31630 depth: fidl::encoding::Depth,
31631 ) -> fidl::Result<()> {
31632 encoder.debug_check_bounds::<TestFlexibleXUnionInStruct>(offset);
31633 self.0.encode(encoder, offset + 0, depth)?;
31637 Ok(())
31638 }
31639 }
31640
31641 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31642 for TestFlexibleXUnionInStruct
31643 {
31644 #[inline(always)]
31645 fn new_empty() -> Self {
31646 Self { xu: fidl::new_empty!(SampleXUnion, D) }
31647 }
31648
31649 #[inline]
31650 unsafe fn decode(
31651 &mut self,
31652 decoder: &mut fidl::encoding::Decoder<'_, D>,
31653 offset: usize,
31654 _depth: fidl::encoding::Depth,
31655 ) -> fidl::Result<()> {
31656 decoder.debug_check_bounds::<Self>(offset);
31657 fidl::decode!(SampleXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
31659 Ok(())
31660 }
31661 }
31662
31663 impl fidl::encoding::ValueTypeMarker for TestInlineXUnionInStruct {
31664 type Borrowed<'a> = &'a Self;
31665 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31666 value
31667 }
31668 }
31669
31670 unsafe impl fidl::encoding::TypeMarker for TestInlineXUnionInStruct {
31671 type Owned = Self;
31672
31673 #[inline(always)]
31674 fn inline_align(_context: fidl::encoding::Context) -> usize {
31675 8
31676 }
31677
31678 #[inline(always)]
31679 fn inline_size(_context: fidl::encoding::Context) -> usize {
31680 48
31681 }
31682 }
31683
31684 unsafe impl<D: fidl::encoding::ResourceDialect>
31685 fidl::encoding::Encode<TestInlineXUnionInStruct, D> for &TestInlineXUnionInStruct
31686 {
31687 #[inline]
31688 unsafe fn encode(
31689 self,
31690 encoder: &mut fidl::encoding::Encoder<'_, D>,
31691 offset: usize,
31692 _depth: fidl::encoding::Depth,
31693 ) -> fidl::Result<()> {
31694 encoder.debug_check_bounds::<TestInlineXUnionInStruct>(offset);
31695 fidl::encoding::Encode::<TestInlineXUnionInStruct, D>::encode(
31697 (
31698 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
31699 &self.before,
31700 ),
31701 <SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
31702 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
31703 &self.after,
31704 ),
31705 ),
31706 encoder,
31707 offset,
31708 _depth,
31709 )
31710 }
31711 }
31712 unsafe impl<
31713 D: fidl::encoding::ResourceDialect,
31714 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
31715 T1: fidl::encoding::Encode<SampleXUnion, D>,
31716 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
31717 > fidl::encoding::Encode<TestInlineXUnionInStruct, D> for (T0, T1, T2)
31718 {
31719 #[inline]
31720 unsafe fn encode(
31721 self,
31722 encoder: &mut fidl::encoding::Encoder<'_, D>,
31723 offset: usize,
31724 depth: fidl::encoding::Depth,
31725 ) -> fidl::Result<()> {
31726 encoder.debug_check_bounds::<TestInlineXUnionInStruct>(offset);
31727 self.0.encode(encoder, offset + 0, depth)?;
31731 self.1.encode(encoder, offset + 16, depth)?;
31732 self.2.encode(encoder, offset + 32, depth)?;
31733 Ok(())
31734 }
31735 }
31736
31737 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31738 for TestInlineXUnionInStruct
31739 {
31740 #[inline(always)]
31741 fn new_empty() -> Self {
31742 Self {
31743 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
31744 xu: fidl::new_empty!(SampleXUnion, D),
31745 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
31746 }
31747 }
31748
31749 #[inline]
31750 unsafe fn decode(
31751 &mut self,
31752 decoder: &mut fidl::encoding::Decoder<'_, D>,
31753 offset: usize,
31754 _depth: fidl::encoding::Depth,
31755 ) -> fidl::Result<()> {
31756 decoder.debug_check_bounds::<Self>(offset);
31757 fidl::decode!(
31759 fidl::encoding::UnboundedString,
31760 D,
31761 &mut self.before,
31762 decoder,
31763 offset + 0,
31764 _depth
31765 )?;
31766 fidl::decode!(SampleXUnion, D, &mut self.xu, decoder, offset + 16, _depth)?;
31767 fidl::decode!(
31768 fidl::encoding::UnboundedString,
31769 D,
31770 &mut self.after,
31771 decoder,
31772 offset + 32,
31773 _depth
31774 )?;
31775 Ok(())
31776 }
31777 }
31778
31779 impl fidl::encoding::ValueTypeMarker for TestOptionalFlexibleXUnionInStruct {
31780 type Borrowed<'a> = &'a Self;
31781 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31782 value
31783 }
31784 }
31785
31786 unsafe impl fidl::encoding::TypeMarker for TestOptionalFlexibleXUnionInStruct {
31787 type Owned = Self;
31788
31789 #[inline(always)]
31790 fn inline_align(_context: fidl::encoding::Context) -> usize {
31791 8
31792 }
31793
31794 #[inline(always)]
31795 fn inline_size(_context: fidl::encoding::Context) -> usize {
31796 16
31797 }
31798 }
31799
31800 unsafe impl<D: fidl::encoding::ResourceDialect>
31801 fidl::encoding::Encode<TestOptionalFlexibleXUnionInStruct, D>
31802 for &TestOptionalFlexibleXUnionInStruct
31803 {
31804 #[inline]
31805 unsafe fn encode(
31806 self,
31807 encoder: &mut fidl::encoding::Encoder<'_, D>,
31808 offset: usize,
31809 _depth: fidl::encoding::Depth,
31810 ) -> fidl::Result<()> {
31811 encoder.debug_check_bounds::<TestOptionalFlexibleXUnionInStruct>(offset);
31812 fidl::encoding::Encode::<TestOptionalFlexibleXUnionInStruct, D>::encode(
31814 (
31815 <fidl::encoding::OptionalUnion<SampleXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
31816 ),
31817 encoder, offset, _depth
31818 )
31819 }
31820 }
31821 unsafe impl<
31822 D: fidl::encoding::ResourceDialect,
31823 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleXUnion>, D>,
31824 > fidl::encoding::Encode<TestOptionalFlexibleXUnionInStruct, D> for (T0,)
31825 {
31826 #[inline]
31827 unsafe fn encode(
31828 self,
31829 encoder: &mut fidl::encoding::Encoder<'_, D>,
31830 offset: usize,
31831 depth: fidl::encoding::Depth,
31832 ) -> fidl::Result<()> {
31833 encoder.debug_check_bounds::<TestOptionalFlexibleXUnionInStruct>(offset);
31834 self.0.encode(encoder, offset + 0, depth)?;
31838 Ok(())
31839 }
31840 }
31841
31842 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31843 for TestOptionalFlexibleXUnionInStruct
31844 {
31845 #[inline(always)]
31846 fn new_empty() -> Self {
31847 Self { xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleXUnion>, D) }
31848 }
31849
31850 #[inline]
31851 unsafe fn decode(
31852 &mut self,
31853 decoder: &mut fidl::encoding::Decoder<'_, D>,
31854 offset: usize,
31855 _depth: fidl::encoding::Depth,
31856 ) -> fidl::Result<()> {
31857 decoder.debug_check_bounds::<Self>(offset);
31858 fidl::decode!(
31860 fidl::encoding::OptionalUnion<SampleXUnion>,
31861 D,
31862 &mut self.xu,
31863 decoder,
31864 offset + 0,
31865 _depth
31866 )?;
31867 Ok(())
31868 }
31869 }
31870
31871 impl fidl::encoding::ValueTypeMarker for TestOptionalStrictXUnionInStruct {
31872 type Borrowed<'a> = &'a Self;
31873 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31874 value
31875 }
31876 }
31877
31878 unsafe impl fidl::encoding::TypeMarker for TestOptionalStrictXUnionInStruct {
31879 type Owned = Self;
31880
31881 #[inline(always)]
31882 fn inline_align(_context: fidl::encoding::Context) -> usize {
31883 8
31884 }
31885
31886 #[inline(always)]
31887 fn inline_size(_context: fidl::encoding::Context) -> usize {
31888 16
31889 }
31890 }
31891
31892 unsafe impl<D: fidl::encoding::ResourceDialect>
31893 fidl::encoding::Encode<TestOptionalStrictXUnionInStruct, D>
31894 for &TestOptionalStrictXUnionInStruct
31895 {
31896 #[inline]
31897 unsafe fn encode(
31898 self,
31899 encoder: &mut fidl::encoding::Encoder<'_, D>,
31900 offset: usize,
31901 _depth: fidl::encoding::Depth,
31902 ) -> fidl::Result<()> {
31903 encoder.debug_check_bounds::<TestOptionalStrictXUnionInStruct>(offset);
31904 fidl::encoding::Encode::<TestOptionalStrictXUnionInStruct, D>::encode(
31906 (
31907 <fidl::encoding::OptionalUnion<SampleStrictXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
31908 ),
31909 encoder, offset, _depth
31910 )
31911 }
31912 }
31913 unsafe impl<
31914 D: fidl::encoding::ResourceDialect,
31915 T0: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleStrictXUnion>, D>,
31916 > fidl::encoding::Encode<TestOptionalStrictXUnionInStruct, D> for (T0,)
31917 {
31918 #[inline]
31919 unsafe fn encode(
31920 self,
31921 encoder: &mut fidl::encoding::Encoder<'_, D>,
31922 offset: usize,
31923 depth: fidl::encoding::Depth,
31924 ) -> fidl::Result<()> {
31925 encoder.debug_check_bounds::<TestOptionalStrictXUnionInStruct>(offset);
31926 self.0.encode(encoder, offset + 0, depth)?;
31930 Ok(())
31931 }
31932 }
31933
31934 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
31935 for TestOptionalStrictXUnionInStruct
31936 {
31937 #[inline(always)]
31938 fn new_empty() -> Self {
31939 Self { xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleStrictXUnion>, D) }
31940 }
31941
31942 #[inline]
31943 unsafe fn decode(
31944 &mut self,
31945 decoder: &mut fidl::encoding::Decoder<'_, D>,
31946 offset: usize,
31947 _depth: fidl::encoding::Depth,
31948 ) -> fidl::Result<()> {
31949 decoder.debug_check_bounds::<Self>(offset);
31950 fidl::decode!(
31952 fidl::encoding::OptionalUnion<SampleStrictXUnion>,
31953 D,
31954 &mut self.xu,
31955 decoder,
31956 offset + 0,
31957 _depth
31958 )?;
31959 Ok(())
31960 }
31961 }
31962
31963 impl fidl::encoding::ValueTypeMarker for TestOptionalXUnionInStruct {
31964 type Borrowed<'a> = &'a Self;
31965 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31966 value
31967 }
31968 }
31969
31970 unsafe impl fidl::encoding::TypeMarker for TestOptionalXUnionInStruct {
31971 type Owned = Self;
31972
31973 #[inline(always)]
31974 fn inline_align(_context: fidl::encoding::Context) -> usize {
31975 8
31976 }
31977
31978 #[inline(always)]
31979 fn inline_size(_context: fidl::encoding::Context) -> usize {
31980 48
31981 }
31982 }
31983
31984 unsafe impl<D: fidl::encoding::ResourceDialect>
31985 fidl::encoding::Encode<TestOptionalXUnionInStruct, D> for &TestOptionalXUnionInStruct
31986 {
31987 #[inline]
31988 unsafe fn encode(
31989 self,
31990 encoder: &mut fidl::encoding::Encoder<'_, D>,
31991 offset: usize,
31992 _depth: fidl::encoding::Depth,
31993 ) -> fidl::Result<()> {
31994 encoder.debug_check_bounds::<TestOptionalXUnionInStruct>(offset);
31995 fidl::encoding::Encode::<TestOptionalXUnionInStruct, D>::encode(
31997 (
31998 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.before),
31999 <fidl::encoding::OptionalUnion<SampleXUnion> as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),
32000 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.after),
32001 ),
32002 encoder, offset, _depth
32003 )
32004 }
32005 }
32006 unsafe impl<
32007 D: fidl::encoding::ResourceDialect,
32008 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32009 T1: fidl::encoding::Encode<fidl::encoding::OptionalUnion<SampleXUnion>, D>,
32010 T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
32011 > fidl::encoding::Encode<TestOptionalXUnionInStruct, D> for (T0, T1, T2)
32012 {
32013 #[inline]
32014 unsafe fn encode(
32015 self,
32016 encoder: &mut fidl::encoding::Encoder<'_, D>,
32017 offset: usize,
32018 depth: fidl::encoding::Depth,
32019 ) -> fidl::Result<()> {
32020 encoder.debug_check_bounds::<TestOptionalXUnionInStruct>(offset);
32021 self.0.encode(encoder, offset + 0, depth)?;
32025 self.1.encode(encoder, offset + 16, depth)?;
32026 self.2.encode(encoder, offset + 32, depth)?;
32027 Ok(())
32028 }
32029 }
32030
32031 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32032 for TestOptionalXUnionInStruct
32033 {
32034 #[inline(always)]
32035 fn new_empty() -> Self {
32036 Self {
32037 before: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32038 xu: fidl::new_empty!(fidl::encoding::OptionalUnion<SampleXUnion>, D),
32039 after: fidl::new_empty!(fidl::encoding::UnboundedString, D),
32040 }
32041 }
32042
32043 #[inline]
32044 unsafe fn decode(
32045 &mut self,
32046 decoder: &mut fidl::encoding::Decoder<'_, D>,
32047 offset: usize,
32048 _depth: fidl::encoding::Depth,
32049 ) -> fidl::Result<()> {
32050 decoder.debug_check_bounds::<Self>(offset);
32051 fidl::decode!(
32053 fidl::encoding::UnboundedString,
32054 D,
32055 &mut self.before,
32056 decoder,
32057 offset + 0,
32058 _depth
32059 )?;
32060 fidl::decode!(
32061 fidl::encoding::OptionalUnion<SampleXUnion>,
32062 D,
32063 &mut self.xu,
32064 decoder,
32065 offset + 16,
32066 _depth
32067 )?;
32068 fidl::decode!(
32069 fidl::encoding::UnboundedString,
32070 D,
32071 &mut self.after,
32072 decoder,
32073 offset + 32,
32074 _depth
32075 )?;
32076 Ok(())
32077 }
32078 }
32079
32080 impl fidl::encoding::ValueTypeMarker for TestStrictXUnionInStruct {
32081 type Borrowed<'a> = &'a Self;
32082 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32083 value
32084 }
32085 }
32086
32087 unsafe impl fidl::encoding::TypeMarker for TestStrictXUnionInStruct {
32088 type Owned = Self;
32089
32090 #[inline(always)]
32091 fn inline_align(_context: fidl::encoding::Context) -> usize {
32092 8
32093 }
32094
32095 #[inline(always)]
32096 fn inline_size(_context: fidl::encoding::Context) -> usize {
32097 16
32098 }
32099 }
32100
32101 unsafe impl<D: fidl::encoding::ResourceDialect>
32102 fidl::encoding::Encode<TestStrictXUnionInStruct, D> for &TestStrictXUnionInStruct
32103 {
32104 #[inline]
32105 unsafe fn encode(
32106 self,
32107 encoder: &mut fidl::encoding::Encoder<'_, D>,
32108 offset: usize,
32109 _depth: fidl::encoding::Depth,
32110 ) -> fidl::Result<()> {
32111 encoder.debug_check_bounds::<TestStrictXUnionInStruct>(offset);
32112 fidl::encoding::Encode::<TestStrictXUnionInStruct, D>::encode(
32114 (<SampleStrictXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
32115 encoder,
32116 offset,
32117 _depth,
32118 )
32119 }
32120 }
32121 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SampleStrictXUnion, D>>
32122 fidl::encoding::Encode<TestStrictXUnionInStruct, D> for (T0,)
32123 {
32124 #[inline]
32125 unsafe fn encode(
32126 self,
32127 encoder: &mut fidl::encoding::Encoder<'_, D>,
32128 offset: usize,
32129 depth: fidl::encoding::Depth,
32130 ) -> fidl::Result<()> {
32131 encoder.debug_check_bounds::<TestStrictXUnionInStruct>(offset);
32132 self.0.encode(encoder, offset + 0, depth)?;
32136 Ok(())
32137 }
32138 }
32139
32140 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32141 for TestStrictXUnionInStruct
32142 {
32143 #[inline(always)]
32144 fn new_empty() -> Self {
32145 Self { xu: fidl::new_empty!(SampleStrictXUnion, D) }
32146 }
32147
32148 #[inline]
32149 unsafe fn decode(
32150 &mut self,
32151 decoder: &mut fidl::encoding::Decoder<'_, D>,
32152 offset: usize,
32153 _depth: fidl::encoding::Depth,
32154 ) -> fidl::Result<()> {
32155 decoder.debug_check_bounds::<Self>(offset);
32156 fidl::decode!(SampleStrictXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
32158 Ok(())
32159 }
32160 }
32161
32162 impl fidl::encoding::ValueTypeMarker for TestXUnionInTable {
32163 type Borrowed<'a> = &'a Self;
32164 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32165 value
32166 }
32167 }
32168
32169 unsafe impl fidl::encoding::TypeMarker for TestXUnionInTable {
32170 type Owned = Self;
32171
32172 #[inline(always)]
32173 fn inline_align(_context: fidl::encoding::Context) -> usize {
32174 8
32175 }
32176
32177 #[inline(always)]
32178 fn inline_size(_context: fidl::encoding::Context) -> usize {
32179 16
32180 }
32181 }
32182
32183 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestXUnionInTable, D>
32184 for &TestXUnionInTable
32185 {
32186 #[inline]
32187 unsafe fn encode(
32188 self,
32189 encoder: &mut fidl::encoding::Encoder<'_, D>,
32190 offset: usize,
32191 _depth: fidl::encoding::Depth,
32192 ) -> fidl::Result<()> {
32193 encoder.debug_check_bounds::<TestXUnionInTable>(offset);
32194 fidl::encoding::Encode::<TestXUnionInTable, D>::encode(
32196 (<XUnionInTable as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
32197 encoder,
32198 offset,
32199 _depth,
32200 )
32201 }
32202 }
32203 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionInTable, D>>
32204 fidl::encoding::Encode<TestXUnionInTable, D> for (T0,)
32205 {
32206 #[inline]
32207 unsafe fn encode(
32208 self,
32209 encoder: &mut fidl::encoding::Encoder<'_, D>,
32210 offset: usize,
32211 depth: fidl::encoding::Depth,
32212 ) -> fidl::Result<()> {
32213 encoder.debug_check_bounds::<TestXUnionInTable>(offset);
32214 self.0.encode(encoder, offset + 0, depth)?;
32218 Ok(())
32219 }
32220 }
32221
32222 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestXUnionInTable {
32223 #[inline(always)]
32224 fn new_empty() -> Self {
32225 Self { value: fidl::new_empty!(XUnionInTable, D) }
32226 }
32227
32228 #[inline]
32229 unsafe fn decode(
32230 &mut self,
32231 decoder: &mut fidl::encoding::Decoder<'_, D>,
32232 offset: usize,
32233 _depth: fidl::encoding::Depth,
32234 ) -> fidl::Result<()> {
32235 decoder.debug_check_bounds::<Self>(offset);
32236 fidl::decode!(XUnionInTable, D, &mut self.value, decoder, offset + 0, _depth)?;
32238 Ok(())
32239 }
32240 }
32241
32242 impl fidl::encoding::ValueTypeMarker for ThreeByte {
32243 type Borrowed<'a> = &'a Self;
32244 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32245 value
32246 }
32247 }
32248
32249 unsafe impl fidl::encoding::TypeMarker for ThreeByte {
32250 type Owned = Self;
32251
32252 #[inline(always)]
32253 fn inline_align(_context: fidl::encoding::Context) -> usize {
32254 1
32255 }
32256
32257 #[inline(always)]
32258 fn inline_size(_context: fidl::encoding::Context) -> usize {
32259 3
32260 }
32261 #[inline(always)]
32262 fn encode_is_copy() -> bool {
32263 true
32264 }
32265
32266 #[inline(always)]
32267 fn decode_is_copy() -> bool {
32268 true
32269 }
32270 }
32271
32272 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByte, D>
32273 for &ThreeByte
32274 {
32275 #[inline]
32276 unsafe fn encode(
32277 self,
32278 encoder: &mut fidl::encoding::Encoder<'_, D>,
32279 offset: usize,
32280 _depth: fidl::encoding::Depth,
32281 ) -> fidl::Result<()> {
32282 encoder.debug_check_bounds::<ThreeByte>(offset);
32283 unsafe {
32284 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32286 (buf_ptr as *mut ThreeByte).write_unaligned((self as *const ThreeByte).read());
32287 }
32290 Ok(())
32291 }
32292 }
32293 unsafe impl<
32294 D: fidl::encoding::ResourceDialect,
32295 T0: fidl::encoding::Encode<u8, D>,
32296 T1: fidl::encoding::Encode<u8, D>,
32297 T2: fidl::encoding::Encode<u8, D>,
32298 > fidl::encoding::Encode<ThreeByte, D> for (T0, T1, T2)
32299 {
32300 #[inline]
32301 unsafe fn encode(
32302 self,
32303 encoder: &mut fidl::encoding::Encoder<'_, D>,
32304 offset: usize,
32305 depth: fidl::encoding::Depth,
32306 ) -> fidl::Result<()> {
32307 encoder.debug_check_bounds::<ThreeByte>(offset);
32308 self.0.encode(encoder, offset + 0, depth)?;
32312 self.1.encode(encoder, offset + 1, depth)?;
32313 self.2.encode(encoder, offset + 2, depth)?;
32314 Ok(())
32315 }
32316 }
32317
32318 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByte {
32319 #[inline(always)]
32320 fn new_empty() -> Self {
32321 Self {
32322 elem1: fidl::new_empty!(u8, D),
32323 elem2: fidl::new_empty!(u8, D),
32324 elem3: fidl::new_empty!(u8, D),
32325 }
32326 }
32327
32328 #[inline]
32329 unsafe fn decode(
32330 &mut self,
32331 decoder: &mut fidl::encoding::Decoder<'_, D>,
32332 offset: usize,
32333 _depth: fidl::encoding::Depth,
32334 ) -> fidl::Result<()> {
32335 decoder.debug_check_bounds::<Self>(offset);
32336 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32337 unsafe {
32340 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 3);
32341 }
32342 Ok(())
32343 }
32344 }
32345
32346 impl fidl::encoding::ValueTypeMarker for ThreeByteInArray {
32347 type Borrowed<'a> = &'a Self;
32348 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32349 value
32350 }
32351 }
32352
32353 unsafe impl fidl::encoding::TypeMarker for ThreeByteInArray {
32354 type Owned = Self;
32355
32356 #[inline(always)]
32357 fn inline_align(_context: fidl::encoding::Context) -> usize {
32358 1
32359 }
32360
32361 #[inline(always)]
32362 fn inline_size(_context: fidl::encoding::Context) -> usize {
32363 9
32364 }
32365 #[inline(always)]
32366 fn encode_is_copy() -> bool {
32367 true
32368 }
32369
32370 #[inline(always)]
32371 fn decode_is_copy() -> bool {
32372 true
32373 }
32374 }
32375
32376 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInArray, D>
32377 for &ThreeByteInArray
32378 {
32379 #[inline]
32380 unsafe fn encode(
32381 self,
32382 encoder: &mut fidl::encoding::Encoder<'_, D>,
32383 offset: usize,
32384 _depth: fidl::encoding::Depth,
32385 ) -> fidl::Result<()> {
32386 encoder.debug_check_bounds::<ThreeByteInArray>(offset);
32387 unsafe {
32388 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32390 (buf_ptr as *mut ThreeByteInArray)
32391 .write_unaligned((self as *const ThreeByteInArray).read());
32392 }
32395 Ok(())
32396 }
32397 }
32398 unsafe impl<
32399 D: fidl::encoding::ResourceDialect,
32400 T0: fidl::encoding::Encode<fidl::encoding::Array<ThreeByte, 3>, D>,
32401 > fidl::encoding::Encode<ThreeByteInArray, D> for (T0,)
32402 {
32403 #[inline]
32404 unsafe fn encode(
32405 self,
32406 encoder: &mut fidl::encoding::Encoder<'_, D>,
32407 offset: usize,
32408 depth: fidl::encoding::Depth,
32409 ) -> fidl::Result<()> {
32410 encoder.debug_check_bounds::<ThreeByteInArray>(offset);
32411 self.0.encode(encoder, offset + 0, depth)?;
32415 Ok(())
32416 }
32417 }
32418
32419 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInArray {
32420 #[inline(always)]
32421 fn new_empty() -> Self {
32422 Self { elems: fidl::new_empty!(fidl::encoding::Array<ThreeByte, 3>, D) }
32423 }
32424
32425 #[inline]
32426 unsafe fn decode(
32427 &mut self,
32428 decoder: &mut fidl::encoding::Decoder<'_, D>,
32429 offset: usize,
32430 _depth: fidl::encoding::Depth,
32431 ) -> fidl::Result<()> {
32432 decoder.debug_check_bounds::<Self>(offset);
32433 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32434 unsafe {
32437 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 9);
32438 }
32439 Ok(())
32440 }
32441 }
32442
32443 impl fidl::encoding::ValueTypeMarker for ThreeByteInStruct {
32444 type Borrowed<'a> = &'a Self;
32445 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32446 value
32447 }
32448 }
32449
32450 unsafe impl fidl::encoding::TypeMarker for ThreeByteInStruct {
32451 type Owned = Self;
32452
32453 #[inline(always)]
32454 fn inline_align(_context: fidl::encoding::Context) -> usize {
32455 1
32456 }
32457
32458 #[inline(always)]
32459 fn inline_size(_context: fidl::encoding::Context) -> usize {
32460 9
32461 }
32462 #[inline(always)]
32463 fn encode_is_copy() -> bool {
32464 true
32465 }
32466
32467 #[inline(always)]
32468 fn decode_is_copy() -> bool {
32469 true
32470 }
32471 }
32472
32473 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInStruct, D>
32474 for &ThreeByteInStruct
32475 {
32476 #[inline]
32477 unsafe fn encode(
32478 self,
32479 encoder: &mut fidl::encoding::Encoder<'_, D>,
32480 offset: usize,
32481 _depth: fidl::encoding::Depth,
32482 ) -> fidl::Result<()> {
32483 encoder.debug_check_bounds::<ThreeByteInStruct>(offset);
32484 unsafe {
32485 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32487 (buf_ptr as *mut ThreeByteInStruct)
32488 .write_unaligned((self as *const ThreeByteInStruct).read());
32489 }
32492 Ok(())
32493 }
32494 }
32495 unsafe impl<
32496 D: fidl::encoding::ResourceDialect,
32497 T0: fidl::encoding::Encode<ThreeByte, D>,
32498 T1: fidl::encoding::Encode<ThreeByte, D>,
32499 T2: fidl::encoding::Encode<ThreeByte, D>,
32500 > fidl::encoding::Encode<ThreeByteInStruct, D> for (T0, T1, T2)
32501 {
32502 #[inline]
32503 unsafe fn encode(
32504 self,
32505 encoder: &mut fidl::encoding::Encoder<'_, D>,
32506 offset: usize,
32507 depth: fidl::encoding::Depth,
32508 ) -> fidl::Result<()> {
32509 encoder.debug_check_bounds::<ThreeByteInStruct>(offset);
32510 self.0.encode(encoder, offset + 0, depth)?;
32514 self.1.encode(encoder, offset + 3, depth)?;
32515 self.2.encode(encoder, offset + 6, depth)?;
32516 Ok(())
32517 }
32518 }
32519
32520 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInStruct {
32521 #[inline(always)]
32522 fn new_empty() -> Self {
32523 Self {
32524 elem1: fidl::new_empty!(ThreeByte, D),
32525 elem2: fidl::new_empty!(ThreeByte, D),
32526 elem3: fidl::new_empty!(ThreeByte, D),
32527 }
32528 }
32529
32530 #[inline]
32531 unsafe fn decode(
32532 &mut self,
32533 decoder: &mut fidl::encoding::Decoder<'_, D>,
32534 offset: usize,
32535 _depth: fidl::encoding::Depth,
32536 ) -> fidl::Result<()> {
32537 decoder.debug_check_bounds::<Self>(offset);
32538 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32539 unsafe {
32542 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 9);
32543 }
32544 Ok(())
32545 }
32546 }
32547
32548 impl fidl::encoding::ValueTypeMarker for ThreeByteInVector {
32549 type Borrowed<'a> = &'a Self;
32550 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32551 value
32552 }
32553 }
32554
32555 unsafe impl fidl::encoding::TypeMarker for ThreeByteInVector {
32556 type Owned = Self;
32557
32558 #[inline(always)]
32559 fn inline_align(_context: fidl::encoding::Context) -> usize {
32560 8
32561 }
32562
32563 #[inline(always)]
32564 fn inline_size(_context: fidl::encoding::Context) -> usize {
32565 16
32566 }
32567 }
32568
32569 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ThreeByteInVector, D>
32570 for &ThreeByteInVector
32571 {
32572 #[inline]
32573 unsafe fn encode(
32574 self,
32575 encoder: &mut fidl::encoding::Encoder<'_, D>,
32576 offset: usize,
32577 _depth: fidl::encoding::Depth,
32578 ) -> fidl::Result<()> {
32579 encoder.debug_check_bounds::<ThreeByteInVector>(offset);
32580 fidl::encoding::Encode::<ThreeByteInVector, D>::encode(
32582 (
32583 <fidl::encoding::UnboundedVector<ThreeByte> as fidl::encoding::ValueTypeMarker>::borrow(&self.elems),
32584 ),
32585 encoder, offset, _depth
32586 )
32587 }
32588 }
32589 unsafe impl<
32590 D: fidl::encoding::ResourceDialect,
32591 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<ThreeByte>, D>,
32592 > fidl::encoding::Encode<ThreeByteInVector, D> for (T0,)
32593 {
32594 #[inline]
32595 unsafe fn encode(
32596 self,
32597 encoder: &mut fidl::encoding::Encoder<'_, D>,
32598 offset: usize,
32599 depth: fidl::encoding::Depth,
32600 ) -> fidl::Result<()> {
32601 encoder.debug_check_bounds::<ThreeByteInVector>(offset);
32602 self.0.encode(encoder, offset + 0, depth)?;
32606 Ok(())
32607 }
32608 }
32609
32610 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ThreeByteInVector {
32611 #[inline(always)]
32612 fn new_empty() -> Self {
32613 Self { elems: fidl::new_empty!(fidl::encoding::UnboundedVector<ThreeByte>, D) }
32614 }
32615
32616 #[inline]
32617 unsafe fn decode(
32618 &mut self,
32619 decoder: &mut fidl::encoding::Decoder<'_, D>,
32620 offset: usize,
32621 _depth: fidl::encoding::Depth,
32622 ) -> fidl::Result<()> {
32623 decoder.debug_check_bounds::<Self>(offset);
32624 fidl::decode!(
32626 fidl::encoding::UnboundedVector<ThreeByte>,
32627 D,
32628 &mut self.elems,
32629 decoder,
32630 offset + 0,
32631 _depth
32632 )?;
32633 Ok(())
32634 }
32635 }
32636
32637 impl fidl::encoding::ValueTypeMarker for TransactionHeader {
32638 type Borrowed<'a> = &'a Self;
32639 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32640 value
32641 }
32642 }
32643
32644 unsafe impl fidl::encoding::TypeMarker for TransactionHeader {
32645 type Owned = Self;
32646
32647 #[inline(always)]
32648 fn inline_align(_context: fidl::encoding::Context) -> usize {
32649 8
32650 }
32651
32652 #[inline(always)]
32653 fn inline_size(_context: fidl::encoding::Context) -> usize {
32654 16
32655 }
32656 #[inline(always)]
32657 fn encode_is_copy() -> bool {
32658 true
32659 }
32660
32661 #[inline(always)]
32662 fn decode_is_copy() -> bool {
32663 true
32664 }
32665 }
32666
32667 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TransactionHeader, D>
32668 for &TransactionHeader
32669 {
32670 #[inline]
32671 unsafe fn encode(
32672 self,
32673 encoder: &mut fidl::encoding::Encoder<'_, D>,
32674 offset: usize,
32675 _depth: fidl::encoding::Depth,
32676 ) -> fidl::Result<()> {
32677 encoder.debug_check_bounds::<TransactionHeader>(offset);
32678 unsafe {
32679 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
32681 (buf_ptr as *mut TransactionHeader)
32682 .write_unaligned((self as *const TransactionHeader).read());
32683 }
32686 Ok(())
32687 }
32688 }
32689 unsafe impl<
32690 D: fidl::encoding::ResourceDialect,
32691 T0: fidl::encoding::Encode<u32, D>,
32692 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 3>, D>,
32693 T2: fidl::encoding::Encode<u8, D>,
32694 T3: fidl::encoding::Encode<u64, D>,
32695 > fidl::encoding::Encode<TransactionHeader, D> for (T0, T1, T2, T3)
32696 {
32697 #[inline]
32698 unsafe fn encode(
32699 self,
32700 encoder: &mut fidl::encoding::Encoder<'_, D>,
32701 offset: usize,
32702 depth: fidl::encoding::Depth,
32703 ) -> fidl::Result<()> {
32704 encoder.debug_check_bounds::<TransactionHeader>(offset);
32705 self.0.encode(encoder, offset + 0, depth)?;
32709 self.1.encode(encoder, offset + 4, depth)?;
32710 self.2.encode(encoder, offset + 7, depth)?;
32711 self.3.encode(encoder, offset + 8, depth)?;
32712 Ok(())
32713 }
32714 }
32715
32716 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TransactionHeader {
32717 #[inline(always)]
32718 fn new_empty() -> Self {
32719 Self {
32720 tx_id: fidl::new_empty!(u32, D),
32721 flags: fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
32722 magic_number: fidl::new_empty!(u8, D),
32723 ordinal: fidl::new_empty!(u64, D),
32724 }
32725 }
32726
32727 #[inline]
32728 unsafe fn decode(
32729 &mut self,
32730 decoder: &mut fidl::encoding::Decoder<'_, D>,
32731 offset: usize,
32732 _depth: fidl::encoding::Depth,
32733 ) -> fidl::Result<()> {
32734 decoder.debug_check_bounds::<Self>(offset);
32735 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
32736 unsafe {
32739 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
32740 }
32741 Ok(())
32742 }
32743 }
32744
32745 impl fidl::encoding::ValueTypeMarker for TransformerEmptyStruct {
32746 type Borrowed<'a> = &'a Self;
32747 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32748 value
32749 }
32750 }
32751
32752 unsafe impl fidl::encoding::TypeMarker for TransformerEmptyStruct {
32753 type Owned = Self;
32754
32755 #[inline(always)]
32756 fn inline_align(_context: fidl::encoding::Context) -> usize {
32757 1
32758 }
32759
32760 #[inline(always)]
32761 fn inline_size(_context: fidl::encoding::Context) -> usize {
32762 1
32763 }
32764 }
32765
32766 unsafe impl<D: fidl::encoding::ResourceDialect>
32767 fidl::encoding::Encode<TransformerEmptyStruct, D> for &TransformerEmptyStruct
32768 {
32769 #[inline]
32770 unsafe fn encode(
32771 self,
32772 encoder: &mut fidl::encoding::Encoder<'_, D>,
32773 offset: usize,
32774 _depth: fidl::encoding::Depth,
32775 ) -> fidl::Result<()> {
32776 encoder.debug_check_bounds::<TransformerEmptyStruct>(offset);
32777 encoder.write_num(0u8, offset);
32778 Ok(())
32779 }
32780 }
32781
32782 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32783 for TransformerEmptyStruct
32784 {
32785 #[inline(always)]
32786 fn new_empty() -> Self {
32787 Self
32788 }
32789
32790 #[inline]
32791 unsafe fn decode(
32792 &mut self,
32793 decoder: &mut fidl::encoding::Decoder<'_, D>,
32794 offset: usize,
32795 _depth: fidl::encoding::Depth,
32796 ) -> fidl::Result<()> {
32797 decoder.debug_check_bounds::<Self>(offset);
32798 match decoder.read_num::<u8>(offset) {
32799 0 => Ok(()),
32800 _ => Err(fidl::Error::Invalid),
32801 }
32802 }
32803 }
32804
32805 impl fidl::encoding::ValueTypeMarker for TwoEmptyStructsInStruct {
32806 type Borrowed<'a> = &'a Self;
32807 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32808 value
32809 }
32810 }
32811
32812 unsafe impl fidl::encoding::TypeMarker for TwoEmptyStructsInStruct {
32813 type Owned = Self;
32814
32815 #[inline(always)]
32816 fn inline_align(_context: fidl::encoding::Context) -> usize {
32817 1
32818 }
32819
32820 #[inline(always)]
32821 fn inline_size(_context: fidl::encoding::Context) -> usize {
32822 2
32823 }
32824 }
32825
32826 unsafe impl<D: fidl::encoding::ResourceDialect>
32827 fidl::encoding::Encode<TwoEmptyStructsInStruct, D> for &TwoEmptyStructsInStruct
32828 {
32829 #[inline]
32830 unsafe fn encode(
32831 self,
32832 encoder: &mut fidl::encoding::Encoder<'_, D>,
32833 offset: usize,
32834 _depth: fidl::encoding::Depth,
32835 ) -> fidl::Result<()> {
32836 encoder.debug_check_bounds::<TwoEmptyStructsInStruct>(offset);
32837 fidl::encoding::Encode::<TwoEmptyStructsInStruct, D>::encode(
32839 (
32840 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
32841 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.b),
32842 ),
32843 encoder,
32844 offset,
32845 _depth,
32846 )
32847 }
32848 }
32849 unsafe impl<
32850 D: fidl::encoding::ResourceDialect,
32851 T0: fidl::encoding::Encode<EmptyStruct, D>,
32852 T1: fidl::encoding::Encode<EmptyStruct, D>,
32853 > fidl::encoding::Encode<TwoEmptyStructsInStruct, D> for (T0, T1)
32854 {
32855 #[inline]
32856 unsafe fn encode(
32857 self,
32858 encoder: &mut fidl::encoding::Encoder<'_, D>,
32859 offset: usize,
32860 depth: fidl::encoding::Depth,
32861 ) -> fidl::Result<()> {
32862 encoder.debug_check_bounds::<TwoEmptyStructsInStruct>(offset);
32863 self.0.encode(encoder, offset + 0, depth)?;
32867 self.1.encode(encoder, offset + 1, depth)?;
32868 Ok(())
32869 }
32870 }
32871
32872 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32873 for TwoEmptyStructsInStruct
32874 {
32875 #[inline(always)]
32876 fn new_empty() -> Self {
32877 Self { a: fidl::new_empty!(EmptyStruct, D), b: fidl::new_empty!(EmptyStruct, D) }
32878 }
32879
32880 #[inline]
32881 unsafe fn decode(
32882 &mut self,
32883 decoder: &mut fidl::encoding::Decoder<'_, D>,
32884 offset: usize,
32885 _depth: fidl::encoding::Depth,
32886 ) -> fidl::Result<()> {
32887 decoder.debug_check_bounds::<Self>(offset);
32888 fidl::decode!(EmptyStruct, D, &mut self.a, decoder, offset + 0, _depth)?;
32890 fidl::decode!(EmptyStruct, D, &mut self.b, decoder, offset + 1, _depth)?;
32891 Ok(())
32892 }
32893 }
32894
32895 impl fidl::encoding::ValueTypeMarker for TwoEmptyStructsInStructInVectorInStruct {
32896 type Borrowed<'a> = &'a Self;
32897 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32898 value
32899 }
32900 }
32901
32902 unsafe impl fidl::encoding::TypeMarker for TwoEmptyStructsInStructInVectorInStruct {
32903 type Owned = Self;
32904
32905 #[inline(always)]
32906 fn inline_align(_context: fidl::encoding::Context) -> usize {
32907 8
32908 }
32909
32910 #[inline(always)]
32911 fn inline_size(_context: fidl::encoding::Context) -> usize {
32912 16
32913 }
32914 }
32915
32916 unsafe impl<D: fidl::encoding::ResourceDialect>
32917 fidl::encoding::Encode<TwoEmptyStructsInStructInVectorInStruct, D>
32918 for &TwoEmptyStructsInStructInVectorInStruct
32919 {
32920 #[inline]
32921 unsafe fn encode(
32922 self,
32923 encoder: &mut fidl::encoding::Encoder<'_, D>,
32924 offset: usize,
32925 _depth: fidl::encoding::Depth,
32926 ) -> fidl::Result<()> {
32927 encoder.debug_check_bounds::<TwoEmptyStructsInStructInVectorInStruct>(offset);
32928 fidl::encoding::Encode::<TwoEmptyStructsInStructInVectorInStruct, D>::encode(
32930 (
32931 <fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
32932 ),
32933 encoder, offset, _depth
32934 )
32935 }
32936 }
32937 unsafe impl<
32938 D: fidl::encoding::ResourceDialect,
32939 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>, D>,
32940 > fidl::encoding::Encode<TwoEmptyStructsInStructInVectorInStruct, D> for (T0,)
32941 {
32942 #[inline]
32943 unsafe fn encode(
32944 self,
32945 encoder: &mut fidl::encoding::Encoder<'_, D>,
32946 offset: usize,
32947 depth: fidl::encoding::Depth,
32948 ) -> fidl::Result<()> {
32949 encoder.debug_check_bounds::<TwoEmptyStructsInStructInVectorInStruct>(offset);
32950 self.0.encode(encoder, offset + 0, depth)?;
32954 Ok(())
32955 }
32956 }
32957
32958 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
32959 for TwoEmptyStructsInStructInVectorInStruct
32960 {
32961 #[inline(always)]
32962 fn new_empty() -> Self {
32963 Self {
32964 v: fidl::new_empty!(fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>, D),
32965 }
32966 }
32967
32968 #[inline]
32969 unsafe fn decode(
32970 &mut self,
32971 decoder: &mut fidl::encoding::Decoder<'_, D>,
32972 offset: usize,
32973 _depth: fidl::encoding::Depth,
32974 ) -> fidl::Result<()> {
32975 decoder.debug_check_bounds::<Self>(offset);
32976 fidl::decode!(
32978 fidl::encoding::UnboundedVector<TwoEmptyStructsInStruct>,
32979 D,
32980 &mut self.v,
32981 decoder,
32982 offset + 0,
32983 _depth
32984 )?;
32985 Ok(())
32986 }
32987 }
32988
32989 impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerBool {
32990 type Borrowed<'a> = &'a Self;
32991 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
32992 value
32993 }
32994 }
32995
32996 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerBool {
32997 type Owned = Self;
32998
32999 #[inline(always)]
33000 fn inline_align(_context: fidl::encoding::Context) -> usize {
33001 8
33002 }
33003
33004 #[inline(always)]
33005 fn inline_size(_context: fidl::encoding::Context) -> usize {
33006 16
33007 }
33008 }
33009
33010 unsafe impl<D: fidl::encoding::ResourceDialect>
33011 fidl::encoding::Encode<TwoLayerStructInnerBool, D> for &TwoLayerStructInnerBool
33012 {
33013 #[inline]
33014 unsafe fn encode(
33015 self,
33016 encoder: &mut fidl::encoding::Encoder<'_, D>,
33017 offset: usize,
33018 _depth: fidl::encoding::Depth,
33019 ) -> fidl::Result<()> {
33020 encoder.debug_check_bounds::<TwoLayerStructInnerBool>(offset);
33021 fidl::encoding::Encode::<TwoLayerStructInnerBool, D>::encode(
33023 (
33024 <OneLayerStructWithBool as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
33025 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.a),
33026 ),
33027 encoder,
33028 offset,
33029 _depth,
33030 )
33031 }
33032 }
33033 unsafe impl<
33034 D: fidl::encoding::ResourceDialect,
33035 T0: fidl::encoding::Encode<OneLayerStructWithBool, D>,
33036 T1: fidl::encoding::Encode<u64, D>,
33037 > fidl::encoding::Encode<TwoLayerStructInnerBool, D> for (T0, T1)
33038 {
33039 #[inline]
33040 unsafe fn encode(
33041 self,
33042 encoder: &mut fidl::encoding::Encoder<'_, D>,
33043 offset: usize,
33044 depth: fidl::encoding::Depth,
33045 ) -> fidl::Result<()> {
33046 encoder.debug_check_bounds::<TwoLayerStructInnerBool>(offset);
33047 self.0.encode(encoder, offset + 0, depth)?;
33051 self.1.encode(encoder, offset + 8, depth)?;
33052 Ok(())
33053 }
33054 }
33055
33056 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33057 for TwoLayerStructInnerBool
33058 {
33059 #[inline(always)]
33060 fn new_empty() -> Self {
33061 Self { s: fidl::new_empty!(OneLayerStructWithBool, D), a: fidl::new_empty!(u64, D) }
33062 }
33063
33064 #[inline]
33065 unsafe fn decode(
33066 &mut self,
33067 decoder: &mut fidl::encoding::Decoder<'_, D>,
33068 offset: usize,
33069 _depth: fidl::encoding::Depth,
33070 ) -> fidl::Result<()> {
33071 decoder.debug_check_bounds::<Self>(offset);
33072 fidl::decode!(OneLayerStructWithBool, D, &mut self.s, decoder, offset + 0, _depth)?;
33074 fidl::decode!(u64, D, &mut self.a, decoder, offset + 8, _depth)?;
33075 Ok(())
33076 }
33077 }
33078
33079 impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerPaddingAlign4 {
33080 type Borrowed<'a> = &'a Self;
33081 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33082 value
33083 }
33084 }
33085
33086 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerPaddingAlign4 {
33087 type Owned = Self;
33088
33089 #[inline(always)]
33090 fn inline_align(_context: fidl::encoding::Context) -> usize {
33091 4
33092 }
33093
33094 #[inline(always)]
33095 fn inline_size(_context: fidl::encoding::Context) -> usize {
33096 12
33097 }
33098 }
33099
33100 unsafe impl<D: fidl::encoding::ResourceDialect>
33101 fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign4, D>
33102 for &TwoLayerStructInnerPaddingAlign4
33103 {
33104 #[inline]
33105 unsafe fn encode(
33106 self,
33107 encoder: &mut fidl::encoding::Encoder<'_, D>,
33108 offset: usize,
33109 _depth: fidl::encoding::Depth,
33110 ) -> fidl::Result<()> {
33111 encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign4>(offset);
33112 unsafe {
33113 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33115 (buf_ptr as *mut TwoLayerStructInnerPaddingAlign4)
33116 .write_unaligned((self as *const TwoLayerStructInnerPaddingAlign4).read());
33117 let padding_ptr = buf_ptr.offset(0) as *mut u32;
33120 let padding_mask = 0xff000000u32;
33121 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33122 }
33123 Ok(())
33124 }
33125 }
33126 unsafe impl<
33127 D: fidl::encoding::ResourceDialect,
33128 T0: fidl::encoding::Encode<OneLayerStructWithPaddingAlign4, D>,
33129 T1: fidl::encoding::Encode<u32, D>,
33130 > fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign4, D> for (T0, T1)
33131 {
33132 #[inline]
33133 unsafe fn encode(
33134 self,
33135 encoder: &mut fidl::encoding::Encoder<'_, D>,
33136 offset: usize,
33137 depth: fidl::encoding::Depth,
33138 ) -> fidl::Result<()> {
33139 encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign4>(offset);
33140 self.0.encode(encoder, offset + 0, depth)?;
33144 self.1.encode(encoder, offset + 8, depth)?;
33145 Ok(())
33146 }
33147 }
33148
33149 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33150 for TwoLayerStructInnerPaddingAlign4
33151 {
33152 #[inline(always)]
33153 fn new_empty() -> Self {
33154 Self {
33155 s: fidl::new_empty!(OneLayerStructWithPaddingAlign4, D),
33156 a: fidl::new_empty!(u32, D),
33157 }
33158 }
33159
33160 #[inline]
33161 unsafe fn decode(
33162 &mut self,
33163 decoder: &mut fidl::encoding::Decoder<'_, D>,
33164 offset: usize,
33165 _depth: fidl::encoding::Depth,
33166 ) -> fidl::Result<()> {
33167 decoder.debug_check_bounds::<Self>(offset);
33168 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33169 let ptr = unsafe { buf_ptr.offset(0) };
33171 let padval = unsafe { (ptr as *const u32).read_unaligned() };
33172 let mask = 0xff000000u32;
33173 let maskedval = padval & mask;
33174 if maskedval != 0 {
33175 return Err(fidl::Error::NonZeroPadding {
33176 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
33177 });
33178 }
33179 unsafe {
33181 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
33182 }
33183 Ok(())
33184 }
33185 }
33186
33187 impl fidl::encoding::ValueTypeMarker for TwoLayerStructInnerPaddingAlign8 {
33188 type Borrowed<'a> = &'a Self;
33189 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33190 value
33191 }
33192 }
33193
33194 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructInnerPaddingAlign8 {
33195 type Owned = Self;
33196
33197 #[inline(always)]
33198 fn inline_align(_context: fidl::encoding::Context) -> usize {
33199 8
33200 }
33201
33202 #[inline(always)]
33203 fn inline_size(_context: fidl::encoding::Context) -> usize {
33204 24
33205 }
33206 }
33207
33208 unsafe impl<D: fidl::encoding::ResourceDialect>
33209 fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign8, D>
33210 for &TwoLayerStructInnerPaddingAlign8
33211 {
33212 #[inline]
33213 unsafe fn encode(
33214 self,
33215 encoder: &mut fidl::encoding::Encoder<'_, D>,
33216 offset: usize,
33217 _depth: fidl::encoding::Depth,
33218 ) -> fidl::Result<()> {
33219 encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign8>(offset);
33220 unsafe {
33221 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33223 (buf_ptr as *mut TwoLayerStructInnerPaddingAlign8)
33224 .write_unaligned((self as *const TwoLayerStructInnerPaddingAlign8).read());
33225 let padding_ptr = buf_ptr.offset(0) as *mut u64;
33228 let padding_mask = 0xffff000000000000u64;
33229 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33230 }
33231 Ok(())
33232 }
33233 }
33234 unsafe impl<
33235 D: fidl::encoding::ResourceDialect,
33236 T0: fidl::encoding::Encode<OneLayerStructWithPaddingAlign8, D>,
33237 T1: fidl::encoding::Encode<u64, D>,
33238 > fidl::encoding::Encode<TwoLayerStructInnerPaddingAlign8, D> for (T0, T1)
33239 {
33240 #[inline]
33241 unsafe fn encode(
33242 self,
33243 encoder: &mut fidl::encoding::Encoder<'_, D>,
33244 offset: usize,
33245 depth: fidl::encoding::Depth,
33246 ) -> fidl::Result<()> {
33247 encoder.debug_check_bounds::<TwoLayerStructInnerPaddingAlign8>(offset);
33248 self.0.encode(encoder, offset + 0, depth)?;
33252 self.1.encode(encoder, offset + 16, depth)?;
33253 Ok(())
33254 }
33255 }
33256
33257 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33258 for TwoLayerStructInnerPaddingAlign8
33259 {
33260 #[inline(always)]
33261 fn new_empty() -> Self {
33262 Self {
33263 s: fidl::new_empty!(OneLayerStructWithPaddingAlign8, D),
33264 a: fidl::new_empty!(u64, D),
33265 }
33266 }
33267
33268 #[inline]
33269 unsafe fn decode(
33270 &mut self,
33271 decoder: &mut fidl::encoding::Decoder<'_, D>,
33272 offset: usize,
33273 _depth: fidl::encoding::Depth,
33274 ) -> fidl::Result<()> {
33275 decoder.debug_check_bounds::<Self>(offset);
33276 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33277 let ptr = unsafe { buf_ptr.offset(0) };
33279 let padval = unsafe { (ptr as *const u64).read_unaligned() };
33280 let mask = 0xffff000000000000u64;
33281 let maskedval = padval & mask;
33282 if maskedval != 0 {
33283 return Err(fidl::Error::NonZeroPadding {
33284 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
33285 });
33286 }
33287 unsafe {
33289 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
33290 }
33291 Ok(())
33292 }
33293 }
33294
33295 impl fidl::encoding::ValueTypeMarker for TwoLayerStructNoPaddingAlign4 {
33296 type Borrowed<'a> = &'a Self;
33297 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33298 value
33299 }
33300 }
33301
33302 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructNoPaddingAlign4 {
33303 type Owned = Self;
33304
33305 #[inline(always)]
33306 fn inline_align(_context: fidl::encoding::Context) -> usize {
33307 4
33308 }
33309
33310 #[inline(always)]
33311 fn inline_size(_context: fidl::encoding::Context) -> usize {
33312 12
33313 }
33314 #[inline(always)]
33315 fn encode_is_copy() -> bool {
33316 true
33317 }
33318
33319 #[inline(always)]
33320 fn decode_is_copy() -> bool {
33321 true
33322 }
33323 }
33324
33325 unsafe impl<D: fidl::encoding::ResourceDialect>
33326 fidl::encoding::Encode<TwoLayerStructNoPaddingAlign4, D>
33327 for &TwoLayerStructNoPaddingAlign4
33328 {
33329 #[inline]
33330 unsafe fn encode(
33331 self,
33332 encoder: &mut fidl::encoding::Encoder<'_, D>,
33333 offset: usize,
33334 _depth: fidl::encoding::Depth,
33335 ) -> fidl::Result<()> {
33336 encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign4>(offset);
33337 unsafe {
33338 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33340 (buf_ptr as *mut TwoLayerStructNoPaddingAlign4)
33341 .write_unaligned((self as *const TwoLayerStructNoPaddingAlign4).read());
33342 }
33345 Ok(())
33346 }
33347 }
33348 unsafe impl<
33349 D: fidl::encoding::ResourceDialect,
33350 T0: fidl::encoding::Encode<OneLayerStructNoPaddingAlign4, D>,
33351 T1: fidl::encoding::Encode<u32, D>,
33352 > fidl::encoding::Encode<TwoLayerStructNoPaddingAlign4, D> for (T0, T1)
33353 {
33354 #[inline]
33355 unsafe fn encode(
33356 self,
33357 encoder: &mut fidl::encoding::Encoder<'_, D>,
33358 offset: usize,
33359 depth: fidl::encoding::Depth,
33360 ) -> fidl::Result<()> {
33361 encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign4>(offset);
33362 self.0.encode(encoder, offset + 0, depth)?;
33366 self.1.encode(encoder, offset + 8, depth)?;
33367 Ok(())
33368 }
33369 }
33370
33371 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33372 for TwoLayerStructNoPaddingAlign4
33373 {
33374 #[inline(always)]
33375 fn new_empty() -> Self {
33376 Self {
33377 s: fidl::new_empty!(OneLayerStructNoPaddingAlign4, D),
33378 a: fidl::new_empty!(u32, D),
33379 }
33380 }
33381
33382 #[inline]
33383 unsafe fn decode(
33384 &mut self,
33385 decoder: &mut fidl::encoding::Decoder<'_, D>,
33386 offset: usize,
33387 _depth: fidl::encoding::Depth,
33388 ) -> fidl::Result<()> {
33389 decoder.debug_check_bounds::<Self>(offset);
33390 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33391 unsafe {
33394 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
33395 }
33396 Ok(())
33397 }
33398 }
33399
33400 impl fidl::encoding::ValueTypeMarker for TwoLayerStructNoPaddingAlign8 {
33401 type Borrowed<'a> = &'a Self;
33402 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33403 value
33404 }
33405 }
33406
33407 unsafe impl fidl::encoding::TypeMarker for TwoLayerStructNoPaddingAlign8 {
33408 type Owned = Self;
33409
33410 #[inline(always)]
33411 fn inline_align(_context: fidl::encoding::Context) -> usize {
33412 8
33413 }
33414
33415 #[inline(always)]
33416 fn inline_size(_context: fidl::encoding::Context) -> usize {
33417 24
33418 }
33419 #[inline(always)]
33420 fn encode_is_copy() -> bool {
33421 true
33422 }
33423
33424 #[inline(always)]
33425 fn decode_is_copy() -> bool {
33426 true
33427 }
33428 }
33429
33430 unsafe impl<D: fidl::encoding::ResourceDialect>
33431 fidl::encoding::Encode<TwoLayerStructNoPaddingAlign8, D>
33432 for &TwoLayerStructNoPaddingAlign8
33433 {
33434 #[inline]
33435 unsafe fn encode(
33436 self,
33437 encoder: &mut fidl::encoding::Encoder<'_, D>,
33438 offset: usize,
33439 _depth: fidl::encoding::Depth,
33440 ) -> fidl::Result<()> {
33441 encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign8>(offset);
33442 unsafe {
33443 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33445 (buf_ptr as *mut TwoLayerStructNoPaddingAlign8)
33446 .write_unaligned((self as *const TwoLayerStructNoPaddingAlign8).read());
33447 }
33450 Ok(())
33451 }
33452 }
33453 unsafe impl<
33454 D: fidl::encoding::ResourceDialect,
33455 T0: fidl::encoding::Encode<OneLayerStructNoPaddingAlign8, D>,
33456 T1: fidl::encoding::Encode<u64, D>,
33457 > fidl::encoding::Encode<TwoLayerStructNoPaddingAlign8, D> for (T0, T1)
33458 {
33459 #[inline]
33460 unsafe fn encode(
33461 self,
33462 encoder: &mut fidl::encoding::Encoder<'_, D>,
33463 offset: usize,
33464 depth: fidl::encoding::Depth,
33465 ) -> fidl::Result<()> {
33466 encoder.debug_check_bounds::<TwoLayerStructNoPaddingAlign8>(offset);
33467 self.0.encode(encoder, offset + 0, depth)?;
33471 self.1.encode(encoder, offset + 16, depth)?;
33472 Ok(())
33473 }
33474 }
33475
33476 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33477 for TwoLayerStructNoPaddingAlign8
33478 {
33479 #[inline(always)]
33480 fn new_empty() -> Self {
33481 Self {
33482 s: fidl::new_empty!(OneLayerStructNoPaddingAlign8, D),
33483 a: fidl::new_empty!(u64, D),
33484 }
33485 }
33486
33487 #[inline]
33488 unsafe fn decode(
33489 &mut self,
33490 decoder: &mut fidl::encoding::Decoder<'_, D>,
33491 offset: usize,
33492 _depth: fidl::encoding::Depth,
33493 ) -> fidl::Result<()> {
33494 decoder.debug_check_bounds::<Self>(offset);
33495 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33496 unsafe {
33499 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
33500 }
33501 Ok(())
33502 }
33503 }
33504
33505 impl fidl::encoding::ValueTypeMarker for Uint16Struct {
33506 type Borrowed<'a> = &'a Self;
33507 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33508 value
33509 }
33510 }
33511
33512 unsafe impl fidl::encoding::TypeMarker for Uint16Struct {
33513 type Owned = Self;
33514
33515 #[inline(always)]
33516 fn inline_align(_context: fidl::encoding::Context) -> usize {
33517 2
33518 }
33519
33520 #[inline(always)]
33521 fn inline_size(_context: fidl::encoding::Context) -> usize {
33522 2
33523 }
33524 #[inline(always)]
33525 fn encode_is_copy() -> bool {
33526 true
33527 }
33528
33529 #[inline(always)]
33530 fn decode_is_copy() -> bool {
33531 true
33532 }
33533 }
33534
33535 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint16Struct, D>
33536 for &Uint16Struct
33537 {
33538 #[inline]
33539 unsafe fn encode(
33540 self,
33541 encoder: &mut fidl::encoding::Encoder<'_, D>,
33542 offset: usize,
33543 _depth: fidl::encoding::Depth,
33544 ) -> fidl::Result<()> {
33545 encoder.debug_check_bounds::<Uint16Struct>(offset);
33546 unsafe {
33547 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33549 (buf_ptr as *mut Uint16Struct)
33550 .write_unaligned((self as *const Uint16Struct).read());
33551 }
33554 Ok(())
33555 }
33556 }
33557 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
33558 fidl::encoding::Encode<Uint16Struct, D> for (T0,)
33559 {
33560 #[inline]
33561 unsafe fn encode(
33562 self,
33563 encoder: &mut fidl::encoding::Encoder<'_, D>,
33564 offset: usize,
33565 depth: fidl::encoding::Depth,
33566 ) -> fidl::Result<()> {
33567 encoder.debug_check_bounds::<Uint16Struct>(offset);
33568 self.0.encode(encoder, offset + 0, depth)?;
33572 Ok(())
33573 }
33574 }
33575
33576 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint16Struct {
33577 #[inline(always)]
33578 fn new_empty() -> Self {
33579 Self { val: fidl::new_empty!(u16, D) }
33580 }
33581
33582 #[inline]
33583 unsafe fn decode(
33584 &mut self,
33585 decoder: &mut fidl::encoding::Decoder<'_, D>,
33586 offset: usize,
33587 _depth: fidl::encoding::Depth,
33588 ) -> fidl::Result<()> {
33589 decoder.debug_check_bounds::<Self>(offset);
33590 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33591 unsafe {
33594 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
33595 }
33596 Ok(())
33597 }
33598 }
33599
33600 impl fidl::encoding::ValueTypeMarker for Uint32Struct {
33601 type Borrowed<'a> = &'a Self;
33602 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33603 value
33604 }
33605 }
33606
33607 unsafe impl fidl::encoding::TypeMarker for Uint32Struct {
33608 type Owned = Self;
33609
33610 #[inline(always)]
33611 fn inline_align(_context: fidl::encoding::Context) -> usize {
33612 4
33613 }
33614
33615 #[inline(always)]
33616 fn inline_size(_context: fidl::encoding::Context) -> usize {
33617 4
33618 }
33619 #[inline(always)]
33620 fn encode_is_copy() -> bool {
33621 true
33622 }
33623
33624 #[inline(always)]
33625 fn decode_is_copy() -> bool {
33626 true
33627 }
33628 }
33629
33630 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint32Struct, D>
33631 for &Uint32Struct
33632 {
33633 #[inline]
33634 unsafe fn encode(
33635 self,
33636 encoder: &mut fidl::encoding::Encoder<'_, D>,
33637 offset: usize,
33638 _depth: fidl::encoding::Depth,
33639 ) -> fidl::Result<()> {
33640 encoder.debug_check_bounds::<Uint32Struct>(offset);
33641 unsafe {
33642 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33644 (buf_ptr as *mut Uint32Struct)
33645 .write_unaligned((self as *const Uint32Struct).read());
33646 }
33649 Ok(())
33650 }
33651 }
33652 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
33653 fidl::encoding::Encode<Uint32Struct, D> for (T0,)
33654 {
33655 #[inline]
33656 unsafe fn encode(
33657 self,
33658 encoder: &mut fidl::encoding::Encoder<'_, D>,
33659 offset: usize,
33660 depth: fidl::encoding::Depth,
33661 ) -> fidl::Result<()> {
33662 encoder.debug_check_bounds::<Uint32Struct>(offset);
33663 self.0.encode(encoder, offset + 0, depth)?;
33667 Ok(())
33668 }
33669 }
33670
33671 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint32Struct {
33672 #[inline(always)]
33673 fn new_empty() -> Self {
33674 Self { val: fidl::new_empty!(u32, D) }
33675 }
33676
33677 #[inline]
33678 unsafe fn decode(
33679 &mut self,
33680 decoder: &mut fidl::encoding::Decoder<'_, D>,
33681 offset: usize,
33682 _depth: fidl::encoding::Depth,
33683 ) -> fidl::Result<()> {
33684 decoder.debug_check_bounds::<Self>(offset);
33685 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33686 unsafe {
33689 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
33690 }
33691 Ok(())
33692 }
33693 }
33694
33695 impl fidl::encoding::ValueTypeMarker for Uint64Struct {
33696 type Borrowed<'a> = &'a Self;
33697 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33698 value
33699 }
33700 }
33701
33702 unsafe impl fidl::encoding::TypeMarker for Uint64Struct {
33703 type Owned = Self;
33704
33705 #[inline(always)]
33706 fn inline_align(_context: fidl::encoding::Context) -> usize {
33707 8
33708 }
33709
33710 #[inline(always)]
33711 fn inline_size(_context: fidl::encoding::Context) -> usize {
33712 8
33713 }
33714 #[inline(always)]
33715 fn encode_is_copy() -> bool {
33716 true
33717 }
33718
33719 #[inline(always)]
33720 fn decode_is_copy() -> bool {
33721 true
33722 }
33723 }
33724
33725 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint64Struct, D>
33726 for &Uint64Struct
33727 {
33728 #[inline]
33729 unsafe fn encode(
33730 self,
33731 encoder: &mut fidl::encoding::Encoder<'_, D>,
33732 offset: usize,
33733 _depth: fidl::encoding::Depth,
33734 ) -> fidl::Result<()> {
33735 encoder.debug_check_bounds::<Uint64Struct>(offset);
33736 unsafe {
33737 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33739 (buf_ptr as *mut Uint64Struct)
33740 .write_unaligned((self as *const Uint64Struct).read());
33741 }
33744 Ok(())
33745 }
33746 }
33747 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
33748 fidl::encoding::Encode<Uint64Struct, D> for (T0,)
33749 {
33750 #[inline]
33751 unsafe fn encode(
33752 self,
33753 encoder: &mut fidl::encoding::Encoder<'_, D>,
33754 offset: usize,
33755 depth: fidl::encoding::Depth,
33756 ) -> fidl::Result<()> {
33757 encoder.debug_check_bounds::<Uint64Struct>(offset);
33758 self.0.encode(encoder, offset + 0, depth)?;
33762 Ok(())
33763 }
33764 }
33765
33766 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint64Struct {
33767 #[inline(always)]
33768 fn new_empty() -> Self {
33769 Self { val: fidl::new_empty!(u64, D) }
33770 }
33771
33772 #[inline]
33773 unsafe fn decode(
33774 &mut self,
33775 decoder: &mut fidl::encoding::Decoder<'_, D>,
33776 offset: usize,
33777 _depth: fidl::encoding::Depth,
33778 ) -> fidl::Result<()> {
33779 decoder.debug_check_bounds::<Self>(offset);
33780 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33781 unsafe {
33784 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
33785 }
33786 Ok(())
33787 }
33788 }
33789
33790 impl fidl::encoding::ValueTypeMarker for Uint64Uint32Uint16Uint8 {
33791 type Borrowed<'a> = &'a Self;
33792 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33793 value
33794 }
33795 }
33796
33797 unsafe impl fidl::encoding::TypeMarker for Uint64Uint32Uint16Uint8 {
33798 type Owned = Self;
33799
33800 #[inline(always)]
33801 fn inline_align(_context: fidl::encoding::Context) -> usize {
33802 8
33803 }
33804
33805 #[inline(always)]
33806 fn inline_size(_context: fidl::encoding::Context) -> usize {
33807 16
33808 }
33809 }
33810
33811 unsafe impl<D: fidl::encoding::ResourceDialect>
33812 fidl::encoding::Encode<Uint64Uint32Uint16Uint8, D> for &Uint64Uint32Uint16Uint8
33813 {
33814 #[inline]
33815 unsafe fn encode(
33816 self,
33817 encoder: &mut fidl::encoding::Encoder<'_, D>,
33818 offset: usize,
33819 _depth: fidl::encoding::Depth,
33820 ) -> fidl::Result<()> {
33821 encoder.debug_check_bounds::<Uint64Uint32Uint16Uint8>(offset);
33822 unsafe {
33823 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33825 (buf_ptr as *mut Uint64Uint32Uint16Uint8)
33826 .write_unaligned((self as *const Uint64Uint32Uint16Uint8).read());
33827 let padding_ptr = buf_ptr.offset(8) as *mut u64;
33830 let padding_mask = 0xff00000000000000u64;
33831 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
33832 }
33833 Ok(())
33834 }
33835 }
33836 unsafe impl<
33837 D: fidl::encoding::ResourceDialect,
33838 T0: fidl::encoding::Encode<u64, D>,
33839 T1: fidl::encoding::Encode<u32, D>,
33840 T2: fidl::encoding::Encode<u16, D>,
33841 T3: fidl::encoding::Encode<u8, D>,
33842 > fidl::encoding::Encode<Uint64Uint32Uint16Uint8, D> for (T0, T1, T2, T3)
33843 {
33844 #[inline]
33845 unsafe fn encode(
33846 self,
33847 encoder: &mut fidl::encoding::Encoder<'_, D>,
33848 offset: usize,
33849 depth: fidl::encoding::Depth,
33850 ) -> fidl::Result<()> {
33851 encoder.debug_check_bounds::<Uint64Uint32Uint16Uint8>(offset);
33852 unsafe {
33855 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
33856 (ptr as *mut u64).write_unaligned(0);
33857 }
33858 self.0.encode(encoder, offset + 0, depth)?;
33860 self.1.encode(encoder, offset + 8, depth)?;
33861 self.2.encode(encoder, offset + 12, depth)?;
33862 self.3.encode(encoder, offset + 14, depth)?;
33863 Ok(())
33864 }
33865 }
33866
33867 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
33868 for Uint64Uint32Uint16Uint8
33869 {
33870 #[inline(always)]
33871 fn new_empty() -> Self {
33872 Self {
33873 f1: fidl::new_empty!(u64, D),
33874 f2: fidl::new_empty!(u32, D),
33875 f3: fidl::new_empty!(u16, D),
33876 f4: fidl::new_empty!(u8, D),
33877 }
33878 }
33879
33880 #[inline]
33881 unsafe fn decode(
33882 &mut self,
33883 decoder: &mut fidl::encoding::Decoder<'_, D>,
33884 offset: usize,
33885 _depth: fidl::encoding::Depth,
33886 ) -> fidl::Result<()> {
33887 decoder.debug_check_bounds::<Self>(offset);
33888 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33889 let ptr = unsafe { buf_ptr.offset(8) };
33891 let padval = unsafe { (ptr as *const u64).read_unaligned() };
33892 let mask = 0xff00000000000000u64;
33893 let maskedval = padval & mask;
33894 if maskedval != 0 {
33895 return Err(fidl::Error::NonZeroPadding {
33896 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
33897 });
33898 }
33899 unsafe {
33901 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
33902 }
33903 Ok(())
33904 }
33905 }
33906
33907 impl fidl::encoding::ValueTypeMarker for Uint8Struct {
33908 type Borrowed<'a> = &'a Self;
33909 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
33910 value
33911 }
33912 }
33913
33914 unsafe impl fidl::encoding::TypeMarker for Uint8Struct {
33915 type Owned = Self;
33916
33917 #[inline(always)]
33918 fn inline_align(_context: fidl::encoding::Context) -> usize {
33919 1
33920 }
33921
33922 #[inline(always)]
33923 fn inline_size(_context: fidl::encoding::Context) -> usize {
33924 1
33925 }
33926 #[inline(always)]
33927 fn encode_is_copy() -> bool {
33928 true
33929 }
33930
33931 #[inline(always)]
33932 fn decode_is_copy() -> bool {
33933 true
33934 }
33935 }
33936
33937 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8Struct, D>
33938 for &Uint8Struct
33939 {
33940 #[inline]
33941 unsafe fn encode(
33942 self,
33943 encoder: &mut fidl::encoding::Encoder<'_, D>,
33944 offset: usize,
33945 _depth: fidl::encoding::Depth,
33946 ) -> fidl::Result<()> {
33947 encoder.debug_check_bounds::<Uint8Struct>(offset);
33948 unsafe {
33949 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
33951 (buf_ptr as *mut Uint8Struct).write_unaligned((self as *const Uint8Struct).read());
33952 }
33955 Ok(())
33956 }
33957 }
33958 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
33959 fidl::encoding::Encode<Uint8Struct, D> for (T0,)
33960 {
33961 #[inline]
33962 unsafe fn encode(
33963 self,
33964 encoder: &mut fidl::encoding::Encoder<'_, D>,
33965 offset: usize,
33966 depth: fidl::encoding::Depth,
33967 ) -> fidl::Result<()> {
33968 encoder.debug_check_bounds::<Uint8Struct>(offset);
33969 self.0.encode(encoder, offset + 0, depth)?;
33973 Ok(())
33974 }
33975 }
33976
33977 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8Struct {
33978 #[inline(always)]
33979 fn new_empty() -> Self {
33980 Self { val: fidl::new_empty!(u8, D) }
33981 }
33982
33983 #[inline]
33984 unsafe fn decode(
33985 &mut self,
33986 decoder: &mut fidl::encoding::Decoder<'_, D>,
33987 offset: usize,
33988 _depth: fidl::encoding::Depth,
33989 ) -> fidl::Result<()> {
33990 decoder.debug_check_bounds::<Self>(offset);
33991 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
33992 unsafe {
33995 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
33996 }
33997 Ok(())
33998 }
33999 }
34000
34001 impl fidl::encoding::ValueTypeMarker for Uint8Uint16Uint32Uint64 {
34002 type Borrowed<'a> = &'a Self;
34003 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34004 value
34005 }
34006 }
34007
34008 unsafe impl fidl::encoding::TypeMarker for Uint8Uint16Uint32Uint64 {
34009 type Owned = Self;
34010
34011 #[inline(always)]
34012 fn inline_align(_context: fidl::encoding::Context) -> usize {
34013 8
34014 }
34015
34016 #[inline(always)]
34017 fn inline_size(_context: fidl::encoding::Context) -> usize {
34018 16
34019 }
34020 }
34021
34022 unsafe impl<D: fidl::encoding::ResourceDialect>
34023 fidl::encoding::Encode<Uint8Uint16Uint32Uint64, D> for &Uint8Uint16Uint32Uint64
34024 {
34025 #[inline]
34026 unsafe fn encode(
34027 self,
34028 encoder: &mut fidl::encoding::Encoder<'_, D>,
34029 offset: usize,
34030 _depth: fidl::encoding::Depth,
34031 ) -> fidl::Result<()> {
34032 encoder.debug_check_bounds::<Uint8Uint16Uint32Uint64>(offset);
34033 unsafe {
34034 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
34036 (buf_ptr as *mut Uint8Uint16Uint32Uint64)
34037 .write_unaligned((self as *const Uint8Uint16Uint32Uint64).read());
34038 let padding_ptr = buf_ptr.offset(0) as *mut u64;
34041 let padding_mask = 0xff00u64;
34042 padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
34043 }
34044 Ok(())
34045 }
34046 }
34047 unsafe impl<
34048 D: fidl::encoding::ResourceDialect,
34049 T0: fidl::encoding::Encode<u8, D>,
34050 T1: fidl::encoding::Encode<u16, D>,
34051 T2: fidl::encoding::Encode<u32, D>,
34052 T3: fidl::encoding::Encode<u64, D>,
34053 > fidl::encoding::Encode<Uint8Uint16Uint32Uint64, D> for (T0, T1, T2, T3)
34054 {
34055 #[inline]
34056 unsafe fn encode(
34057 self,
34058 encoder: &mut fidl::encoding::Encoder<'_, D>,
34059 offset: usize,
34060 depth: fidl::encoding::Depth,
34061 ) -> fidl::Result<()> {
34062 encoder.debug_check_bounds::<Uint8Uint16Uint32Uint64>(offset);
34063 unsafe {
34066 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
34067 (ptr as *mut u64).write_unaligned(0);
34068 }
34069 self.0.encode(encoder, offset + 0, depth)?;
34071 self.1.encode(encoder, offset + 2, depth)?;
34072 self.2.encode(encoder, offset + 4, depth)?;
34073 self.3.encode(encoder, offset + 8, depth)?;
34074 Ok(())
34075 }
34076 }
34077
34078 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34079 for Uint8Uint16Uint32Uint64
34080 {
34081 #[inline(always)]
34082 fn new_empty() -> Self {
34083 Self {
34084 f1: fidl::new_empty!(u8, D),
34085 f2: fidl::new_empty!(u16, D),
34086 f3: fidl::new_empty!(u32, D),
34087 f4: fidl::new_empty!(u64, D),
34088 }
34089 }
34090
34091 #[inline]
34092 unsafe fn decode(
34093 &mut self,
34094 decoder: &mut fidl::encoding::Decoder<'_, D>,
34095 offset: usize,
34096 _depth: fidl::encoding::Depth,
34097 ) -> fidl::Result<()> {
34098 decoder.debug_check_bounds::<Self>(offset);
34099 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
34100 let ptr = unsafe { buf_ptr.offset(0) };
34102 let padval = unsafe { (ptr as *const u64).read_unaligned() };
34103 let mask = 0xff00u64;
34104 let maskedval = padval & mask;
34105 if maskedval != 0 {
34106 return Err(fidl::Error::NonZeroPadding {
34107 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
34108 });
34109 }
34110 unsafe {
34112 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
34113 }
34114 Ok(())
34115 }
34116 }
34117
34118 impl fidl::encoding::ValueTypeMarker for Uint8UnionStruct {
34119 type Borrowed<'a> = &'a Self;
34120 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34121 value
34122 }
34123 }
34124
34125 unsafe impl fidl::encoding::TypeMarker for Uint8UnionStruct {
34126 type Owned = Self;
34127
34128 #[inline(always)]
34129 fn inline_align(_context: fidl::encoding::Context) -> usize {
34130 8
34131 }
34132
34133 #[inline(always)]
34134 fn inline_size(_context: fidl::encoding::Context) -> usize {
34135 16
34136 }
34137 }
34138
34139 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8UnionStruct, D>
34140 for &Uint8UnionStruct
34141 {
34142 #[inline]
34143 unsafe fn encode(
34144 self,
34145 encoder: &mut fidl::encoding::Encoder<'_, D>,
34146 offset: usize,
34147 _depth: fidl::encoding::Depth,
34148 ) -> fidl::Result<()> {
34149 encoder.debug_check_bounds::<Uint8UnionStruct>(offset);
34150 fidl::encoding::Encode::<Uint8UnionStruct, D>::encode(
34152 (<Uint8Union as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
34153 encoder,
34154 offset,
34155 _depth,
34156 )
34157 }
34158 }
34159 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Uint8Union, D>>
34160 fidl::encoding::Encode<Uint8UnionStruct, D> for (T0,)
34161 {
34162 #[inline]
34163 unsafe fn encode(
34164 self,
34165 encoder: &mut fidl::encoding::Encoder<'_, D>,
34166 offset: usize,
34167 depth: fidl::encoding::Depth,
34168 ) -> fidl::Result<()> {
34169 encoder.debug_check_bounds::<Uint8UnionStruct>(offset);
34170 self.0.encode(encoder, offset + 0, depth)?;
34174 Ok(())
34175 }
34176 }
34177
34178 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8UnionStruct {
34179 #[inline(always)]
34180 fn new_empty() -> Self {
34181 Self { u: fidl::new_empty!(Uint8Union, D) }
34182 }
34183
34184 #[inline]
34185 unsafe fn decode(
34186 &mut self,
34187 decoder: &mut fidl::encoding::Decoder<'_, D>,
34188 offset: usize,
34189 _depth: fidl::encoding::Depth,
34190 ) -> fidl::Result<()> {
34191 decoder.debug_check_bounds::<Self>(offset);
34192 fidl::decode!(Uint8Union, D, &mut self.u, decoder, offset + 0, _depth)?;
34194 Ok(())
34195 }
34196 }
34197
34198 impl fidl::encoding::ValueTypeMarker for UnboundedNonnullableString {
34199 type Borrowed<'a> = &'a Self;
34200 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34201 value
34202 }
34203 }
34204
34205 unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableString {
34206 type Owned = Self;
34207
34208 #[inline(always)]
34209 fn inline_align(_context: fidl::encoding::Context) -> usize {
34210 8
34211 }
34212
34213 #[inline(always)]
34214 fn inline_size(_context: fidl::encoding::Context) -> usize {
34215 16
34216 }
34217 }
34218
34219 unsafe impl<D: fidl::encoding::ResourceDialect>
34220 fidl::encoding::Encode<UnboundedNonnullableString, D> for &UnboundedNonnullableString
34221 {
34222 #[inline]
34223 unsafe fn encode(
34224 self,
34225 encoder: &mut fidl::encoding::Encoder<'_, D>,
34226 offset: usize,
34227 _depth: fidl::encoding::Depth,
34228 ) -> fidl::Result<()> {
34229 encoder.debug_check_bounds::<UnboundedNonnullableString>(offset);
34230 fidl::encoding::Encode::<UnboundedNonnullableString, D>::encode(
34232 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
34233 &self.s0,
34234 ),),
34235 encoder,
34236 offset,
34237 _depth,
34238 )
34239 }
34240 }
34241 unsafe impl<
34242 D: fidl::encoding::ResourceDialect,
34243 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
34244 > fidl::encoding::Encode<UnboundedNonnullableString, D> for (T0,)
34245 {
34246 #[inline]
34247 unsafe fn encode(
34248 self,
34249 encoder: &mut fidl::encoding::Encoder<'_, D>,
34250 offset: usize,
34251 depth: fidl::encoding::Depth,
34252 ) -> fidl::Result<()> {
34253 encoder.debug_check_bounds::<UnboundedNonnullableString>(offset);
34254 self.0.encode(encoder, offset + 0, depth)?;
34258 Ok(())
34259 }
34260 }
34261
34262 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34263 for UnboundedNonnullableString
34264 {
34265 #[inline(always)]
34266 fn new_empty() -> Self {
34267 Self { s0: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
34268 }
34269
34270 #[inline]
34271 unsafe fn decode(
34272 &mut self,
34273 decoder: &mut fidl::encoding::Decoder<'_, D>,
34274 offset: usize,
34275 _depth: fidl::encoding::Depth,
34276 ) -> fidl::Result<()> {
34277 decoder.debug_check_bounds::<Self>(offset);
34278 fidl::decode!(
34280 fidl::encoding::UnboundedString,
34281 D,
34282 &mut self.s0,
34283 decoder,
34284 offset + 0,
34285 _depth
34286 )?;
34287 Ok(())
34288 }
34289 }
34290
34291 impl fidl::encoding::ValueTypeMarker for UnboundedNonnullableVectorOfUint32s {
34292 type Borrowed<'a> = &'a Self;
34293 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34294 value
34295 }
34296 }
34297
34298 unsafe impl fidl::encoding::TypeMarker for UnboundedNonnullableVectorOfUint32s {
34299 type Owned = Self;
34300
34301 #[inline(always)]
34302 fn inline_align(_context: fidl::encoding::Context) -> usize {
34303 8
34304 }
34305
34306 #[inline(always)]
34307 fn inline_size(_context: fidl::encoding::Context) -> usize {
34308 16
34309 }
34310 }
34311
34312 unsafe impl<D: fidl::encoding::ResourceDialect>
34313 fidl::encoding::Encode<UnboundedNonnullableVectorOfUint32s, D>
34314 for &UnboundedNonnullableVectorOfUint32s
34315 {
34316 #[inline]
34317 unsafe fn encode(
34318 self,
34319 encoder: &mut fidl::encoding::Encoder<'_, D>,
34320 offset: usize,
34321 _depth: fidl::encoding::Depth,
34322 ) -> fidl::Result<()> {
34323 encoder.debug_check_bounds::<UnboundedNonnullableVectorOfUint32s>(offset);
34324 fidl::encoding::Encode::<UnboundedNonnullableVectorOfUint32s, D>::encode(
34326 (
34327 <fidl::encoding::UnboundedVector<u32> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
34328 ),
34329 encoder, offset, _depth
34330 )
34331 }
34332 }
34333 unsafe impl<
34334 D: fidl::encoding::ResourceDialect,
34335 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u32>, D>,
34336 > fidl::encoding::Encode<UnboundedNonnullableVectorOfUint32s, D> for (T0,)
34337 {
34338 #[inline]
34339 unsafe fn encode(
34340 self,
34341 encoder: &mut fidl::encoding::Encoder<'_, D>,
34342 offset: usize,
34343 depth: fidl::encoding::Depth,
34344 ) -> fidl::Result<()> {
34345 encoder.debug_check_bounds::<UnboundedNonnullableVectorOfUint32s>(offset);
34346 self.0.encode(encoder, offset + 0, depth)?;
34350 Ok(())
34351 }
34352 }
34353
34354 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34355 for UnboundedNonnullableVectorOfUint32s
34356 {
34357 #[inline(always)]
34358 fn new_empty() -> Self {
34359 Self { vu0: fidl::new_empty!(fidl::encoding::UnboundedVector<u32>, D) }
34360 }
34361
34362 #[inline]
34363 unsafe fn decode(
34364 &mut self,
34365 decoder: &mut fidl::encoding::Decoder<'_, D>,
34366 offset: usize,
34367 _depth: fidl::encoding::Depth,
34368 ) -> fidl::Result<()> {
34369 decoder.debug_check_bounds::<Self>(offset);
34370 fidl::decode!(
34372 fidl::encoding::UnboundedVector<u32>,
34373 D,
34374 &mut self.vu0,
34375 decoder,
34376 offset + 0,
34377 _depth
34378 )?;
34379 Ok(())
34380 }
34381 }
34382
34383 impl fidl::encoding::ValueTypeMarker for UnboundedNullableString {
34384 type Borrowed<'a> = &'a Self;
34385 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34386 value
34387 }
34388 }
34389
34390 unsafe impl fidl::encoding::TypeMarker for UnboundedNullableString {
34391 type Owned = Self;
34392
34393 #[inline(always)]
34394 fn inline_align(_context: fidl::encoding::Context) -> usize {
34395 8
34396 }
34397
34398 #[inline(always)]
34399 fn inline_size(_context: fidl::encoding::Context) -> usize {
34400 16
34401 }
34402 }
34403
34404 unsafe impl<D: fidl::encoding::ResourceDialect>
34405 fidl::encoding::Encode<UnboundedNullableString, D> for &UnboundedNullableString
34406 {
34407 #[inline]
34408 unsafe fn encode(
34409 self,
34410 encoder: &mut fidl::encoding::Encoder<'_, D>,
34411 offset: usize,
34412 _depth: fidl::encoding::Depth,
34413 ) -> fidl::Result<()> {
34414 encoder.debug_check_bounds::<UnboundedNullableString>(offset);
34415 fidl::encoding::Encode::<UnboundedNullableString, D>::encode(
34417 (
34418 <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.s0),
34419 ),
34420 encoder, offset, _depth
34421 )
34422 }
34423 }
34424 unsafe impl<
34425 D: fidl::encoding::ResourceDialect,
34426 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::UnboundedString>, D>,
34427 > fidl::encoding::Encode<UnboundedNullableString, D> for (T0,)
34428 {
34429 #[inline]
34430 unsafe fn encode(
34431 self,
34432 encoder: &mut fidl::encoding::Encoder<'_, D>,
34433 offset: usize,
34434 depth: fidl::encoding::Depth,
34435 ) -> fidl::Result<()> {
34436 encoder.debug_check_bounds::<UnboundedNullableString>(offset);
34437 self.0.encode(encoder, offset + 0, depth)?;
34441 Ok(())
34442 }
34443 }
34444
34445 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34446 for UnboundedNullableString
34447 {
34448 #[inline(always)]
34449 fn new_empty() -> Self {
34450 Self {
34451 s0: fidl::new_empty!(fidl::encoding::Optional<fidl::encoding::UnboundedString>, D),
34452 }
34453 }
34454
34455 #[inline]
34456 unsafe fn decode(
34457 &mut self,
34458 decoder: &mut fidl::encoding::Decoder<'_, D>,
34459 offset: usize,
34460 _depth: fidl::encoding::Depth,
34461 ) -> fidl::Result<()> {
34462 decoder.debug_check_bounds::<Self>(offset);
34463 fidl::decode!(
34465 fidl::encoding::Optional<fidl::encoding::UnboundedString>,
34466 D,
34467 &mut self.s0,
34468 decoder,
34469 offset + 0,
34470 _depth
34471 )?;
34472 Ok(())
34473 }
34474 }
34475
34476 impl fidl::encoding::ValueTypeMarker for UnboundedNullableVectorOfUint32s {
34477 type Borrowed<'a> = &'a Self;
34478 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34479 value
34480 }
34481 }
34482
34483 unsafe impl fidl::encoding::TypeMarker for UnboundedNullableVectorOfUint32s {
34484 type Owned = Self;
34485
34486 #[inline(always)]
34487 fn inline_align(_context: fidl::encoding::Context) -> usize {
34488 8
34489 }
34490
34491 #[inline(always)]
34492 fn inline_size(_context: fidl::encoding::Context) -> usize {
34493 16
34494 }
34495 }
34496
34497 unsafe impl<D: fidl::encoding::ResourceDialect>
34498 fidl::encoding::Encode<UnboundedNullableVectorOfUint32s, D>
34499 for &UnboundedNullableVectorOfUint32s
34500 {
34501 #[inline]
34502 unsafe fn encode(
34503 self,
34504 encoder: &mut fidl::encoding::Encoder<'_, D>,
34505 offset: usize,
34506 _depth: fidl::encoding::Depth,
34507 ) -> fidl::Result<()> {
34508 encoder.debug_check_bounds::<UnboundedNullableVectorOfUint32s>(offset);
34509 fidl::encoding::Encode::<UnboundedNullableVectorOfUint32s, D>::encode(
34511 (
34512 <fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>> as fidl::encoding::ValueTypeMarker>::borrow(&self.vu0),
34513 ),
34514 encoder, offset, _depth
34515 )
34516 }
34517 }
34518 unsafe impl<
34519 D: fidl::encoding::ResourceDialect,
34520 T0: fidl::encoding::Encode<
34521 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
34522 D,
34523 >,
34524 > fidl::encoding::Encode<UnboundedNullableVectorOfUint32s, D> for (T0,)
34525 {
34526 #[inline]
34527 unsafe fn encode(
34528 self,
34529 encoder: &mut fidl::encoding::Encoder<'_, D>,
34530 offset: usize,
34531 depth: fidl::encoding::Depth,
34532 ) -> fidl::Result<()> {
34533 encoder.debug_check_bounds::<UnboundedNullableVectorOfUint32s>(offset);
34534 self.0.encode(encoder, offset + 0, depth)?;
34538 Ok(())
34539 }
34540 }
34541
34542 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34543 for UnboundedNullableVectorOfUint32s
34544 {
34545 #[inline(always)]
34546 fn new_empty() -> Self {
34547 Self {
34548 vu0: fidl::new_empty!(
34549 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
34550 D
34551 ),
34552 }
34553 }
34554
34555 #[inline]
34556 unsafe fn decode(
34557 &mut self,
34558 decoder: &mut fidl::encoding::Decoder<'_, D>,
34559 offset: usize,
34560 _depth: fidl::encoding::Depth,
34561 ) -> fidl::Result<()> {
34562 decoder.debug_check_bounds::<Self>(offset);
34563 fidl::decode!(
34565 fidl::encoding::Optional<fidl::encoding::UnboundedVector<u32>>,
34566 D,
34567 &mut self.vu0,
34568 decoder,
34569 offset + 0,
34570 _depth
34571 )?;
34572 Ok(())
34573 }
34574 }
34575
34576 impl fidl::encoding::ValueTypeMarker for UnionInlinePaddingStruct {
34577 type Borrowed<'a> = &'a Self;
34578 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34579 value
34580 }
34581 }
34582
34583 unsafe impl fidl::encoding::TypeMarker for UnionInlinePaddingStruct {
34584 type Owned = Self;
34585
34586 #[inline(always)]
34587 fn inline_align(_context: fidl::encoding::Context) -> usize {
34588 8
34589 }
34590
34591 #[inline(always)]
34592 fn inline_size(_context: fidl::encoding::Context) -> usize {
34593 16
34594 }
34595 }
34596
34597 unsafe impl<D: fidl::encoding::ResourceDialect>
34598 fidl::encoding::Encode<UnionInlinePaddingStruct, D> for &UnionInlinePaddingStruct
34599 {
34600 #[inline]
34601 unsafe fn encode(
34602 self,
34603 encoder: &mut fidl::encoding::Encoder<'_, D>,
34604 offset: usize,
34605 _depth: fidl::encoding::Depth,
34606 ) -> fidl::Result<()> {
34607 encoder.debug_check_bounds::<UnionInlinePaddingStruct>(offset);
34608 fidl::encoding::Encode::<UnionInlinePaddingStruct, D>::encode(
34610 (<UnionInlinePadding as fidl::encoding::ValueTypeMarker>::borrow(&self.u),),
34611 encoder,
34612 offset,
34613 _depth,
34614 )
34615 }
34616 }
34617 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<UnionInlinePadding, D>>
34618 fidl::encoding::Encode<UnionInlinePaddingStruct, D> for (T0,)
34619 {
34620 #[inline]
34621 unsafe fn encode(
34622 self,
34623 encoder: &mut fidl::encoding::Encoder<'_, D>,
34624 offset: usize,
34625 depth: fidl::encoding::Depth,
34626 ) -> fidl::Result<()> {
34627 encoder.debug_check_bounds::<UnionInlinePaddingStruct>(offset);
34628 self.0.encode(encoder, offset + 0, depth)?;
34632 Ok(())
34633 }
34634 }
34635
34636 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34637 for UnionInlinePaddingStruct
34638 {
34639 #[inline(always)]
34640 fn new_empty() -> Self {
34641 Self { u: fidl::new_empty!(UnionInlinePadding, D) }
34642 }
34643
34644 #[inline]
34645 unsafe fn decode(
34646 &mut self,
34647 decoder: &mut fidl::encoding::Decoder<'_, D>,
34648 offset: usize,
34649 _depth: fidl::encoding::Depth,
34650 ) -> fidl::Result<()> {
34651 decoder.debug_check_bounds::<Self>(offset);
34652 fidl::decode!(UnionInlinePadding, D, &mut self.u, decoder, offset + 0, _depth)?;
34654 Ok(())
34655 }
34656 }
34657
34658 impl fidl::encoding::ValueTypeMarker for UnionWithBoundStringStruct {
34659 type Borrowed<'a> = &'a Self;
34660 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34661 value
34662 }
34663 }
34664
34665 unsafe impl fidl::encoding::TypeMarker for UnionWithBoundStringStruct {
34666 type Owned = Self;
34667
34668 #[inline(always)]
34669 fn inline_align(_context: fidl::encoding::Context) -> usize {
34670 8
34671 }
34672
34673 #[inline(always)]
34674 fn inline_size(_context: fidl::encoding::Context) -> usize {
34675 16
34676 }
34677 }
34678
34679 unsafe impl<D: fidl::encoding::ResourceDialect>
34680 fidl::encoding::Encode<UnionWithBoundStringStruct, D> for &UnionWithBoundStringStruct
34681 {
34682 #[inline]
34683 unsafe fn encode(
34684 self,
34685 encoder: &mut fidl::encoding::Encoder<'_, D>,
34686 offset: usize,
34687 _depth: fidl::encoding::Depth,
34688 ) -> fidl::Result<()> {
34689 encoder.debug_check_bounds::<UnionWithBoundStringStruct>(offset);
34690 fidl::encoding::Encode::<UnionWithBoundStringStruct, D>::encode(
34692 (<UnionWithBoundString as fidl::encoding::ValueTypeMarker>::borrow(&self.v),),
34693 encoder,
34694 offset,
34695 _depth,
34696 )
34697 }
34698 }
34699 unsafe impl<
34700 D: fidl::encoding::ResourceDialect,
34701 T0: fidl::encoding::Encode<UnionWithBoundString, D>,
34702 > fidl::encoding::Encode<UnionWithBoundStringStruct, D> for (T0,)
34703 {
34704 #[inline]
34705 unsafe fn encode(
34706 self,
34707 encoder: &mut fidl::encoding::Encoder<'_, D>,
34708 offset: usize,
34709 depth: fidl::encoding::Depth,
34710 ) -> fidl::Result<()> {
34711 encoder.debug_check_bounds::<UnionWithBoundStringStruct>(offset);
34712 self.0.encode(encoder, offset + 0, depth)?;
34716 Ok(())
34717 }
34718 }
34719
34720 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
34721 for UnionWithBoundStringStruct
34722 {
34723 #[inline(always)]
34724 fn new_empty() -> Self {
34725 Self { v: fidl::new_empty!(UnionWithBoundString, D) }
34726 }
34727
34728 #[inline]
34729 unsafe fn decode(
34730 &mut self,
34731 decoder: &mut fidl::encoding::Decoder<'_, D>,
34732 offset: usize,
34733 _depth: fidl::encoding::Depth,
34734 ) -> fidl::Result<()> {
34735 decoder.debug_check_bounds::<Self>(offset);
34736 fidl::decode!(UnionWithBoundString, D, &mut self.v, decoder, offset + 0, _depth)?;
34738 Ok(())
34739 }
34740 }
34741
34742 impl fidl::encoding::ValueTypeMarker for UpdatePolicy {
34743 type Borrowed<'a> = &'a Self;
34744 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34745 value
34746 }
34747 }
34748
34749 unsafe impl fidl::encoding::TypeMarker for UpdatePolicy {
34750 type Owned = Self;
34751
34752 #[inline(always)]
34753 fn inline_align(_context: fidl::encoding::Context) -> usize {
34754 1
34755 }
34756
34757 #[inline(always)]
34758 fn inline_size(_context: fidl::encoding::Context) -> usize {
34759 2
34760 }
34761 }
34762
34763 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UpdatePolicy, D>
34764 for &UpdatePolicy
34765 {
34766 #[inline]
34767 unsafe fn encode(
34768 self,
34769 encoder: &mut fidl::encoding::Encoder<'_, D>,
34770 offset: usize,
34771 _depth: fidl::encoding::Depth,
34772 ) -> fidl::Result<()> {
34773 encoder.debug_check_bounds::<UpdatePolicy>(offset);
34774 fidl::encoding::Encode::<UpdatePolicy, D>::encode(
34776 (
34777 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.fetch_if_absent),
34778 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.allow_old_versions),
34779 ),
34780 encoder,
34781 offset,
34782 _depth,
34783 )
34784 }
34785 }
34786 unsafe impl<
34787 D: fidl::encoding::ResourceDialect,
34788 T0: fidl::encoding::Encode<bool, D>,
34789 T1: fidl::encoding::Encode<bool, D>,
34790 > fidl::encoding::Encode<UpdatePolicy, D> for (T0, T1)
34791 {
34792 #[inline]
34793 unsafe fn encode(
34794 self,
34795 encoder: &mut fidl::encoding::Encoder<'_, D>,
34796 offset: usize,
34797 depth: fidl::encoding::Depth,
34798 ) -> fidl::Result<()> {
34799 encoder.debug_check_bounds::<UpdatePolicy>(offset);
34800 self.0.encode(encoder, offset + 0, depth)?;
34804 self.1.encode(encoder, offset + 1, depth)?;
34805 Ok(())
34806 }
34807 }
34808
34809 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UpdatePolicy {
34810 #[inline(always)]
34811 fn new_empty() -> Self {
34812 Self {
34813 fetch_if_absent: fidl::new_empty!(bool, D),
34814 allow_old_versions: fidl::new_empty!(bool, D),
34815 }
34816 }
34817
34818 #[inline]
34819 unsafe fn decode(
34820 &mut self,
34821 decoder: &mut fidl::encoding::Decoder<'_, D>,
34822 offset: usize,
34823 _depth: fidl::encoding::Depth,
34824 ) -> fidl::Result<()> {
34825 decoder.debug_check_bounds::<Self>(offset);
34826 fidl::decode!(bool, D, &mut self.fetch_if_absent, decoder, offset + 0, _depth)?;
34828 fidl::decode!(bool, D, &mut self.allow_old_versions, decoder, offset + 1, _depth)?;
34829 Ok(())
34830 }
34831 }
34832
34833 impl fidl::encoding::ValueTypeMarker for VectorOfByteVector {
34834 type Borrowed<'a> = &'a Self;
34835 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34836 value
34837 }
34838 }
34839
34840 unsafe impl fidl::encoding::TypeMarker for VectorOfByteVector {
34841 type Owned = Self;
34842
34843 #[inline(always)]
34844 fn inline_align(_context: fidl::encoding::Context) -> usize {
34845 8
34846 }
34847
34848 #[inline(always)]
34849 fn inline_size(_context: fidl::encoding::Context) -> usize {
34850 16
34851 }
34852 }
34853
34854 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfByteVector, D>
34855 for &VectorOfByteVector
34856 {
34857 #[inline]
34858 unsafe fn encode(
34859 self,
34860 encoder: &mut fidl::encoding::Encoder<'_, D>,
34861 offset: usize,
34862 _depth: fidl::encoding::Depth,
34863 ) -> fidl::Result<()> {
34864 encoder.debug_check_bounds::<VectorOfByteVector>(offset);
34865 fidl::encoding::Encode::<VectorOfByteVector, D>::encode(
34867 (
34868 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
34869 ),
34870 encoder, offset, _depth
34871 )
34872 }
34873 }
34874 unsafe impl<
34875 D: fidl::encoding::ResourceDialect,
34876 T0: fidl::encoding::Encode<
34877 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
34878 D,
34879 >,
34880 > fidl::encoding::Encode<VectorOfByteVector, D> for (T0,)
34881 {
34882 #[inline]
34883 unsafe fn encode(
34884 self,
34885 encoder: &mut fidl::encoding::Encoder<'_, D>,
34886 offset: usize,
34887 depth: fidl::encoding::Depth,
34888 ) -> fidl::Result<()> {
34889 encoder.debug_check_bounds::<VectorOfByteVector>(offset);
34890 self.0.encode(encoder, offset + 0, depth)?;
34894 Ok(())
34895 }
34896 }
34897
34898 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfByteVector {
34899 #[inline(always)]
34900 fn new_empty() -> Self {
34901 Self {
34902 v: fidl::new_empty!(
34903 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
34904 D
34905 ),
34906 }
34907 }
34908
34909 #[inline]
34910 unsafe fn decode(
34911 &mut self,
34912 decoder: &mut fidl::encoding::Decoder<'_, D>,
34913 offset: usize,
34914 _depth: fidl::encoding::Depth,
34915 ) -> fidl::Result<()> {
34916 decoder.debug_check_bounds::<Self>(offset);
34917 fidl::decode!(
34919 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedVector<u8>>,
34920 D,
34921 &mut self.v,
34922 decoder,
34923 offset + 0,
34924 _depth
34925 )?;
34926 Ok(())
34927 }
34928 }
34929
34930 impl fidl::encoding::ValueTypeMarker for VectorOfEnumStruct {
34931 type Borrowed<'a> = &'a Self;
34932 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
34933 value
34934 }
34935 }
34936
34937 unsafe impl fidl::encoding::TypeMarker for VectorOfEnumStruct {
34938 type Owned = Self;
34939
34940 #[inline(always)]
34941 fn inline_align(_context: fidl::encoding::Context) -> usize {
34942 8
34943 }
34944
34945 #[inline(always)]
34946 fn inline_size(_context: fidl::encoding::Context) -> usize {
34947 16
34948 }
34949 }
34950
34951 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfEnumStruct, D>
34952 for &VectorOfEnumStruct
34953 {
34954 #[inline]
34955 unsafe fn encode(
34956 self,
34957 encoder: &mut fidl::encoding::Encoder<'_, D>,
34958 offset: usize,
34959 _depth: fidl::encoding::Depth,
34960 ) -> fidl::Result<()> {
34961 encoder.debug_check_bounds::<VectorOfEnumStruct>(offset);
34962 fidl::encoding::Encode::<VectorOfEnumStruct, D>::encode(
34964 (
34965 <fidl::encoding::UnboundedVector<StrictEnumInt16> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
34966 ),
34967 encoder, offset, _depth
34968 )
34969 }
34970 }
34971 unsafe impl<
34972 D: fidl::encoding::ResourceDialect,
34973 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<StrictEnumInt16>, D>,
34974 > fidl::encoding::Encode<VectorOfEnumStruct, D> for (T0,)
34975 {
34976 #[inline]
34977 unsafe fn encode(
34978 self,
34979 encoder: &mut fidl::encoding::Encoder<'_, D>,
34980 offset: usize,
34981 depth: fidl::encoding::Depth,
34982 ) -> fidl::Result<()> {
34983 encoder.debug_check_bounds::<VectorOfEnumStruct>(offset);
34984 self.0.encode(encoder, offset + 0, depth)?;
34988 Ok(())
34989 }
34990 }
34991
34992 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfEnumStruct {
34993 #[inline(always)]
34994 fn new_empty() -> Self {
34995 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<StrictEnumInt16>, D) }
34996 }
34997
34998 #[inline]
34999 unsafe fn decode(
35000 &mut self,
35001 decoder: &mut fidl::encoding::Decoder<'_, D>,
35002 offset: usize,
35003 _depth: fidl::encoding::Depth,
35004 ) -> fidl::Result<()> {
35005 decoder.debug_check_bounds::<Self>(offset);
35006 fidl::decode!(
35008 fidl::encoding::UnboundedVector<StrictEnumInt16>,
35009 D,
35010 &mut self.v,
35011 decoder,
35012 offset + 0,
35013 _depth
35014 )?;
35015 Ok(())
35016 }
35017 }
35018
35019 impl fidl::encoding::ValueTypeMarker for VectorOfStrings {
35020 type Borrowed<'a> = &'a Self;
35021 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35022 value
35023 }
35024 }
35025
35026 unsafe impl fidl::encoding::TypeMarker for VectorOfStrings {
35027 type Owned = Self;
35028
35029 #[inline(always)]
35030 fn inline_align(_context: fidl::encoding::Context) -> usize {
35031 8
35032 }
35033
35034 #[inline(always)]
35035 fn inline_size(_context: fidl::encoding::Context) -> usize {
35036 16
35037 }
35038 }
35039
35040 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorOfStrings, D>
35041 for &VectorOfStrings
35042 {
35043 #[inline]
35044 unsafe fn encode(
35045 self,
35046 encoder: &mut fidl::encoding::Encoder<'_, D>,
35047 offset: usize,
35048 _depth: fidl::encoding::Depth,
35049 ) -> fidl::Result<()> {
35050 encoder.debug_check_bounds::<VectorOfStrings>(offset);
35051 fidl::encoding::Encode::<VectorOfStrings, D>::encode(
35053 (
35054 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.v),
35055 ),
35056 encoder, offset, _depth
35057 )
35058 }
35059 }
35060 unsafe impl<
35061 D: fidl::encoding::ResourceDialect,
35062 T0: fidl::encoding::Encode<
35063 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35064 D,
35065 >,
35066 > fidl::encoding::Encode<VectorOfStrings, D> for (T0,)
35067 {
35068 #[inline]
35069 unsafe fn encode(
35070 self,
35071 encoder: &mut fidl::encoding::Encoder<'_, D>,
35072 offset: usize,
35073 depth: fidl::encoding::Depth,
35074 ) -> fidl::Result<()> {
35075 encoder.debug_check_bounds::<VectorOfStrings>(offset);
35076 self.0.encode(encoder, offset + 0, depth)?;
35080 Ok(())
35081 }
35082 }
35083
35084 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorOfStrings {
35085 #[inline(always)]
35086 fn new_empty() -> Self {
35087 Self {
35088 v: fidl::new_empty!(
35089 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35090 D
35091 ),
35092 }
35093 }
35094
35095 #[inline]
35096 unsafe fn decode(
35097 &mut self,
35098 decoder: &mut fidl::encoding::Decoder<'_, D>,
35099 offset: usize,
35100 _depth: fidl::encoding::Depth,
35101 ) -> fidl::Result<()> {
35102 decoder.debug_check_bounds::<Self>(offset);
35103 fidl::decode!(
35105 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
35106 D,
35107 &mut self.v,
35108 decoder,
35109 offset + 0,
35110 _depth
35111 )?;
35112 Ok(())
35113 }
35114 }
35115
35116 impl fidl::encoding::ValueTypeMarker for VectorWithLimit {
35117 type Borrowed<'a> = &'a Self;
35118 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35119 value
35120 }
35121 }
35122
35123 unsafe impl fidl::encoding::TypeMarker for VectorWithLimit {
35124 type Owned = Self;
35125
35126 #[inline(always)]
35127 fn inline_align(_context: fidl::encoding::Context) -> usize {
35128 8
35129 }
35130
35131 #[inline(always)]
35132 fn inline_size(_context: fidl::encoding::Context) -> usize {
35133 16
35134 }
35135 }
35136
35137 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorWithLimit, D>
35138 for &VectorWithLimit
35139 {
35140 #[inline]
35141 unsafe fn encode(
35142 self,
35143 encoder: &mut fidl::encoding::Encoder<'_, D>,
35144 offset: usize,
35145 _depth: fidl::encoding::Depth,
35146 ) -> fidl::Result<()> {
35147 encoder.debug_check_bounds::<VectorWithLimit>(offset);
35148 fidl::encoding::Encode::<VectorWithLimit, D>::encode(
35150 (<fidl::encoding::Vector<u8, 2> as fidl::encoding::ValueTypeMarker>::borrow(
35151 &self.v,
35152 ),),
35153 encoder,
35154 offset,
35155 _depth,
35156 )
35157 }
35158 }
35159 unsafe impl<
35160 D: fidl::encoding::ResourceDialect,
35161 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 2>, D>,
35162 > fidl::encoding::Encode<VectorWithLimit, D> for (T0,)
35163 {
35164 #[inline]
35165 unsafe fn encode(
35166 self,
35167 encoder: &mut fidl::encoding::Encoder<'_, D>,
35168 offset: usize,
35169 depth: fidl::encoding::Depth,
35170 ) -> fidl::Result<()> {
35171 encoder.debug_check_bounds::<VectorWithLimit>(offset);
35172 self.0.encode(encoder, offset + 0, depth)?;
35176 Ok(())
35177 }
35178 }
35179
35180 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorWithLimit {
35181 #[inline(always)]
35182 fn new_empty() -> Self {
35183 Self { v: fidl::new_empty!(fidl::encoding::Vector<u8, 2>, D) }
35184 }
35185
35186 #[inline]
35187 unsafe fn decode(
35188 &mut self,
35189 decoder: &mut fidl::encoding::Decoder<'_, D>,
35190 offset: usize,
35191 _depth: fidl::encoding::Depth,
35192 ) -> fidl::Result<()> {
35193 decoder.debug_check_bounds::<Self>(offset);
35194 fidl::decode!(fidl::encoding::Vector<u8, 2>, D, &mut self.v, decoder, offset + 0, _depth)?;
35196 Ok(())
35197 }
35198 }
35199
35200 impl fidl::encoding::ValueTypeMarker for VectorWrapper {
35201 type Borrowed<'a> = &'a Self;
35202 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35203 value
35204 }
35205 }
35206
35207 unsafe impl fidl::encoding::TypeMarker for VectorWrapper {
35208 type Owned = Self;
35209
35210 #[inline(always)]
35211 fn inline_align(_context: fidl::encoding::Context) -> usize {
35212 8
35213 }
35214
35215 #[inline(always)]
35216 fn inline_size(_context: fidl::encoding::Context) -> usize {
35217 16
35218 }
35219 }
35220
35221 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VectorWrapper, D>
35222 for &VectorWrapper
35223 {
35224 #[inline]
35225 unsafe fn encode(
35226 self,
35227 encoder: &mut fidl::encoding::Encoder<'_, D>,
35228 offset: usize,
35229 _depth: fidl::encoding::Depth,
35230 ) -> fidl::Result<()> {
35231 encoder.debug_check_bounds::<VectorWrapper>(offset);
35232 fidl::encoding::Encode::<VectorWrapper, D>::encode(
35234 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
35235 &self.v,
35236 ),),
35237 encoder,
35238 offset,
35239 _depth,
35240 )
35241 }
35242 }
35243 unsafe impl<
35244 D: fidl::encoding::ResourceDialect,
35245 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
35246 > fidl::encoding::Encode<VectorWrapper, D> for (T0,)
35247 {
35248 #[inline]
35249 unsafe fn encode(
35250 self,
35251 encoder: &mut fidl::encoding::Encoder<'_, D>,
35252 offset: usize,
35253 depth: fidl::encoding::Depth,
35254 ) -> fidl::Result<()> {
35255 encoder.debug_check_bounds::<VectorWrapper>(offset);
35256 self.0.encode(encoder, offset + 0, depth)?;
35260 Ok(())
35261 }
35262 }
35263
35264 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VectorWrapper {
35265 #[inline(always)]
35266 fn new_empty() -> Self {
35267 Self { v: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
35268 }
35269
35270 #[inline]
35271 unsafe fn decode(
35272 &mut self,
35273 decoder: &mut fidl::encoding::Decoder<'_, D>,
35274 offset: usize,
35275 _depth: fidl::encoding::Depth,
35276 ) -> fidl::Result<()> {
35277 decoder.debug_check_bounds::<Self>(offset);
35278 fidl::decode!(
35280 fidl::encoding::UnboundedVector<u8>,
35281 D,
35282 &mut self.v,
35283 decoder,
35284 offset + 0,
35285 _depth
35286 )?;
35287 Ok(())
35288 }
35289 }
35290
35291 impl fidl::encoding::ValueTypeMarker for XUnionWithStructStruct {
35292 type Borrowed<'a> = &'a Self;
35293 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35294 value
35295 }
35296 }
35297
35298 unsafe impl fidl::encoding::TypeMarker for XUnionWithStructStruct {
35299 type Owned = Self;
35300
35301 #[inline(always)]
35302 fn inline_align(_context: fidl::encoding::Context) -> usize {
35303 8
35304 }
35305
35306 #[inline(always)]
35307 fn inline_size(_context: fidl::encoding::Context) -> usize {
35308 16
35309 }
35310 }
35311
35312 unsafe impl<D: fidl::encoding::ResourceDialect>
35313 fidl::encoding::Encode<XUnionWithStructStruct, D> for &XUnionWithStructStruct
35314 {
35315 #[inline]
35316 unsafe fn encode(
35317 self,
35318 encoder: &mut fidl::encoding::Encoder<'_, D>,
35319 offset: usize,
35320 _depth: fidl::encoding::Depth,
35321 ) -> fidl::Result<()> {
35322 encoder.debug_check_bounds::<XUnionWithStructStruct>(offset);
35323 fidl::encoding::Encode::<XUnionWithStructStruct, D>::encode(
35325 (<XUnionWithStruct as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
35326 encoder,
35327 offset,
35328 _depth,
35329 )
35330 }
35331 }
35332 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionWithStruct, D>>
35333 fidl::encoding::Encode<XUnionWithStructStruct, D> for (T0,)
35334 {
35335 #[inline]
35336 unsafe fn encode(
35337 self,
35338 encoder: &mut fidl::encoding::Encoder<'_, D>,
35339 offset: usize,
35340 depth: fidl::encoding::Depth,
35341 ) -> fidl::Result<()> {
35342 encoder.debug_check_bounds::<XUnionWithStructStruct>(offset);
35343 self.0.encode(encoder, offset + 0, depth)?;
35347 Ok(())
35348 }
35349 }
35350
35351 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35352 for XUnionWithStructStruct
35353 {
35354 #[inline(always)]
35355 fn new_empty() -> Self {
35356 Self { xu: fidl::new_empty!(XUnionWithStruct, D) }
35357 }
35358
35359 #[inline]
35360 unsafe fn decode(
35361 &mut self,
35362 decoder: &mut fidl::encoding::Decoder<'_, D>,
35363 offset: usize,
35364 _depth: fidl::encoding::Depth,
35365 ) -> fidl::Result<()> {
35366 decoder.debug_check_bounds::<Self>(offset);
35367 fidl::decode!(XUnionWithStruct, D, &mut self.xu, decoder, offset + 0, _depth)?;
35369 Ok(())
35370 }
35371 }
35372
35373 impl fidl::encoding::ValueTypeMarker for XUnionWithXUnionStruct {
35374 type Borrowed<'a> = &'a Self;
35375 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35376 value
35377 }
35378 }
35379
35380 unsafe impl fidl::encoding::TypeMarker for XUnionWithXUnionStruct {
35381 type Owned = Self;
35382
35383 #[inline(always)]
35384 fn inline_align(_context: fidl::encoding::Context) -> usize {
35385 8
35386 }
35387
35388 #[inline(always)]
35389 fn inline_size(_context: fidl::encoding::Context) -> usize {
35390 16
35391 }
35392 }
35393
35394 unsafe impl<D: fidl::encoding::ResourceDialect>
35395 fidl::encoding::Encode<XUnionWithXUnionStruct, D> for &XUnionWithXUnionStruct
35396 {
35397 #[inline]
35398 unsafe fn encode(
35399 self,
35400 encoder: &mut fidl::encoding::Encoder<'_, D>,
35401 offset: usize,
35402 _depth: fidl::encoding::Depth,
35403 ) -> fidl::Result<()> {
35404 encoder.debug_check_bounds::<XUnionWithXUnionStruct>(offset);
35405 fidl::encoding::Encode::<XUnionWithXUnionStruct, D>::encode(
35407 (<XUnionWithXUnion as fidl::encoding::ValueTypeMarker>::borrow(&self.xu),),
35408 encoder,
35409 offset,
35410 _depth,
35411 )
35412 }
35413 }
35414 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<XUnionWithXUnion, D>>
35415 fidl::encoding::Encode<XUnionWithXUnionStruct, D> for (T0,)
35416 {
35417 #[inline]
35418 unsafe fn encode(
35419 self,
35420 encoder: &mut fidl::encoding::Encoder<'_, D>,
35421 offset: usize,
35422 depth: fidl::encoding::Depth,
35423 ) -> fidl::Result<()> {
35424 encoder.debug_check_bounds::<XUnionWithXUnionStruct>(offset);
35425 self.0.encode(encoder, offset + 0, depth)?;
35429 Ok(())
35430 }
35431 }
35432
35433 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
35434 for XUnionWithXUnionStruct
35435 {
35436 #[inline(always)]
35437 fn new_empty() -> Self {
35438 Self { xu: fidl::new_empty!(XUnionWithXUnion, D) }
35439 }
35440
35441 #[inline]
35442 unsafe fn decode(
35443 &mut self,
35444 decoder: &mut fidl::encoding::Decoder<'_, D>,
35445 offset: usize,
35446 _depth: fidl::encoding::Depth,
35447 ) -> fidl::Result<()> {
35448 decoder.debug_check_bounds::<Self>(offset);
35449 fidl::decode!(XUnionWithXUnion, D, &mut self.xu, decoder, offset + 0, _depth)?;
35451 Ok(())
35452 }
35453 }
35454
35455 impl CompatTableString {
35456 #[inline(always)]
35457 fn max_ordinal_present(&self) -> u64 {
35458 if let Some(_) = self.s {
35459 return 1;
35460 }
35461 0
35462 }
35463 }
35464
35465 impl fidl::encoding::ValueTypeMarker for CompatTableString {
35466 type Borrowed<'a> = &'a Self;
35467 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35468 value
35469 }
35470 }
35471
35472 unsafe impl fidl::encoding::TypeMarker for CompatTableString {
35473 type Owned = Self;
35474
35475 #[inline(always)]
35476 fn inline_align(_context: fidl::encoding::Context) -> usize {
35477 8
35478 }
35479
35480 #[inline(always)]
35481 fn inline_size(_context: fidl::encoding::Context) -> usize {
35482 16
35483 }
35484 }
35485
35486 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTableString, D>
35487 for &CompatTableString
35488 {
35489 unsafe fn encode(
35490 self,
35491 encoder: &mut fidl::encoding::Encoder<'_, D>,
35492 offset: usize,
35493 mut depth: fidl::encoding::Depth,
35494 ) -> fidl::Result<()> {
35495 encoder.debug_check_bounds::<CompatTableString>(offset);
35496 let max_ordinal: u64 = self.max_ordinal_present();
35498 encoder.write_num(max_ordinal, offset);
35499 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
35500 if max_ordinal == 0 {
35502 return Ok(());
35503 }
35504 depth.increment()?;
35505 let envelope_size = 8;
35506 let bytes_len = max_ordinal as usize * envelope_size;
35507 #[allow(unused_variables)]
35508 let offset = encoder.out_of_line_offset(bytes_len);
35509 let mut _prev_end_offset: usize = 0;
35510 if 1 > max_ordinal {
35511 return Ok(());
35512 }
35513
35514 let cur_offset: usize = (1 - 1) * envelope_size;
35517
35518 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35520
35521 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
35526 self.s.as_ref().map(
35527 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
35528 ),
35529 encoder,
35530 offset + cur_offset,
35531 depth,
35532 )?;
35533
35534 _prev_end_offset = cur_offset + envelope_size;
35535
35536 Ok(())
35537 }
35538 }
35539
35540 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTableString {
35541 #[inline(always)]
35542 fn new_empty() -> Self {
35543 Self::default()
35544 }
35545
35546 unsafe fn decode(
35547 &mut self,
35548 decoder: &mut fidl::encoding::Decoder<'_, D>,
35549 offset: usize,
35550 mut depth: fidl::encoding::Depth,
35551 ) -> fidl::Result<()> {
35552 decoder.debug_check_bounds::<Self>(offset);
35553 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
35554 None => return Err(fidl::Error::NotNullable),
35555 Some(len) => len,
35556 };
35557 if len == 0 {
35559 return Ok(());
35560 };
35561 depth.increment()?;
35562 let envelope_size = 8;
35563 let bytes_len = len * envelope_size;
35564 let offset = decoder.out_of_line_offset(bytes_len)?;
35565 let mut _next_ordinal_to_read = 0;
35567 let mut next_offset = offset;
35568 let end_offset = offset + bytes_len;
35569 _next_ordinal_to_read += 1;
35570 if next_offset >= end_offset {
35571 return Ok(());
35572 }
35573
35574 while _next_ordinal_to_read < 1 {
35576 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35577 _next_ordinal_to_read += 1;
35578 next_offset += envelope_size;
35579 }
35580
35581 let next_out_of_line = decoder.next_out_of_line();
35582 let handles_before = decoder.remaining_handles();
35583 if let Some((inlined, num_bytes, num_handles)) =
35584 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35585 {
35586 let member_inline_size =
35587 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
35588 decoder.context,
35589 );
35590 if inlined != (member_inline_size <= 4) {
35591 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35592 }
35593 let inner_offset;
35594 let mut inner_depth = depth.clone();
35595 if inlined {
35596 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35597 inner_offset = next_offset;
35598 } else {
35599 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35600 inner_depth.increment()?;
35601 }
35602 let val_ref = self
35603 .s
35604 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
35605 fidl::decode!(
35606 fidl::encoding::UnboundedString,
35607 D,
35608 val_ref,
35609 decoder,
35610 inner_offset,
35611 inner_depth
35612 )?;
35613 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
35614 {
35615 return Err(fidl::Error::InvalidNumBytesInEnvelope);
35616 }
35617 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
35618 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
35619 }
35620 }
35621
35622 next_offset += envelope_size;
35623
35624 while next_offset < end_offset {
35626 _next_ordinal_to_read += 1;
35627 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35628 next_offset += envelope_size;
35629 }
35630
35631 Ok(())
35632 }
35633 }
35634
35635 impl CompatTableValue {
35636 #[inline(always)]
35637 fn max_ordinal_present(&self) -> u64 {
35638 if let Some(_) = self.xunion_member {
35639 return 4;
35640 }
35641 if let Some(_) = self.table_member {
35642 return 3;
35643 }
35644 if let Some(_) = self.array_member {
35645 return 2;
35646 }
35647 if let Some(_) = self.union_member {
35648 return 1;
35649 }
35650 0
35651 }
35652 }
35653
35654 impl fidl::encoding::ValueTypeMarker for CompatTableValue {
35655 type Borrowed<'a> = &'a Self;
35656 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35657 value
35658 }
35659 }
35660
35661 unsafe impl fidl::encoding::TypeMarker for CompatTableValue {
35662 type Owned = Self;
35663
35664 #[inline(always)]
35665 fn inline_align(_context: fidl::encoding::Context) -> usize {
35666 8
35667 }
35668
35669 #[inline(always)]
35670 fn inline_size(_context: fidl::encoding::Context) -> usize {
35671 16
35672 }
35673 }
35674
35675 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatTableValue, D>
35676 for &CompatTableValue
35677 {
35678 unsafe fn encode(
35679 self,
35680 encoder: &mut fidl::encoding::Encoder<'_, D>,
35681 offset: usize,
35682 mut depth: fidl::encoding::Depth,
35683 ) -> fidl::Result<()> {
35684 encoder.debug_check_bounds::<CompatTableValue>(offset);
35685 let max_ordinal: u64 = self.max_ordinal_present();
35687 encoder.write_num(max_ordinal, offset);
35688 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
35689 if max_ordinal == 0 {
35691 return Ok(());
35692 }
35693 depth.increment()?;
35694 let envelope_size = 8;
35695 let bytes_len = max_ordinal as usize * envelope_size;
35696 #[allow(unused_variables)]
35697 let offset = encoder.out_of_line_offset(bytes_len);
35698 let mut _prev_end_offset: usize = 0;
35699 if 1 > max_ordinal {
35700 return Ok(());
35701 }
35702
35703 let cur_offset: usize = (1 - 1) * envelope_size;
35706
35707 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35709
35710 fidl::encoding::encode_in_envelope_optional::<CompatUnion, D>(
35715 self.union_member
35716 .as_ref()
35717 .map(<CompatUnion as fidl::encoding::ValueTypeMarker>::borrow),
35718 encoder,
35719 offset + cur_offset,
35720 depth,
35721 )?;
35722
35723 _prev_end_offset = cur_offset + envelope_size;
35724 if 2 > max_ordinal {
35725 return Ok(());
35726 }
35727
35728 let cur_offset: usize = (2 - 1) * envelope_size;
35731
35732 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35734
35735 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u32, 3>, D>(
35740 self.array_member.as_ref().map(
35741 <fidl::encoding::Array<u32, 3> as fidl::encoding::ValueTypeMarker>::borrow,
35742 ),
35743 encoder,
35744 offset + cur_offset,
35745 depth,
35746 )?;
35747
35748 _prev_end_offset = cur_offset + envelope_size;
35749 if 3 > max_ordinal {
35750 return Ok(());
35751 }
35752
35753 let cur_offset: usize = (3 - 1) * envelope_size;
35756
35757 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35759
35760 fidl::encoding::encode_in_envelope_optional::<CompatTableString, D>(
35765 self.table_member
35766 .as_ref()
35767 .map(<CompatTableString as fidl::encoding::ValueTypeMarker>::borrow),
35768 encoder,
35769 offset + cur_offset,
35770 depth,
35771 )?;
35772
35773 _prev_end_offset = cur_offset + envelope_size;
35774 if 4 > max_ordinal {
35775 return Ok(());
35776 }
35777
35778 let cur_offset: usize = (4 - 1) * envelope_size;
35781
35782 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
35784
35785 fidl::encoding::encode_in_envelope_optional::<CompatXUnion, D>(
35790 self.xunion_member
35791 .as_ref()
35792 .map(<CompatXUnion as fidl::encoding::ValueTypeMarker>::borrow),
35793 encoder,
35794 offset + cur_offset,
35795 depth,
35796 )?;
35797
35798 _prev_end_offset = cur_offset + envelope_size;
35799
35800 Ok(())
35801 }
35802 }
35803
35804 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatTableValue {
35805 #[inline(always)]
35806 fn new_empty() -> Self {
35807 Self::default()
35808 }
35809
35810 unsafe fn decode(
35811 &mut self,
35812 decoder: &mut fidl::encoding::Decoder<'_, D>,
35813 offset: usize,
35814 mut depth: fidl::encoding::Depth,
35815 ) -> fidl::Result<()> {
35816 decoder.debug_check_bounds::<Self>(offset);
35817 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
35818 None => return Err(fidl::Error::NotNullable),
35819 Some(len) => len,
35820 };
35821 if len == 0 {
35823 return Ok(());
35824 };
35825 depth.increment()?;
35826 let envelope_size = 8;
35827 let bytes_len = len * envelope_size;
35828 let offset = decoder.out_of_line_offset(bytes_len)?;
35829 let mut _next_ordinal_to_read = 0;
35831 let mut next_offset = offset;
35832 let end_offset = offset + bytes_len;
35833 _next_ordinal_to_read += 1;
35834 if next_offset >= end_offset {
35835 return Ok(());
35836 }
35837
35838 while _next_ordinal_to_read < 1 {
35840 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35841 _next_ordinal_to_read += 1;
35842 next_offset += envelope_size;
35843 }
35844
35845 let next_out_of_line = decoder.next_out_of_line();
35846 let handles_before = decoder.remaining_handles();
35847 if let Some((inlined, num_bytes, num_handles)) =
35848 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35849 {
35850 let member_inline_size =
35851 <CompatUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
35852 if inlined != (member_inline_size <= 4) {
35853 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35854 }
35855 let inner_offset;
35856 let mut inner_depth = depth.clone();
35857 if inlined {
35858 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35859 inner_offset = next_offset;
35860 } else {
35861 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35862 inner_depth.increment()?;
35863 }
35864 let val_ref =
35865 self.union_member.get_or_insert_with(|| fidl::new_empty!(CompatUnion, D));
35866 fidl::decode!(CompatUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
35867 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
35868 {
35869 return Err(fidl::Error::InvalidNumBytesInEnvelope);
35870 }
35871 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
35872 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
35873 }
35874 }
35875
35876 next_offset += envelope_size;
35877 _next_ordinal_to_read += 1;
35878 if next_offset >= end_offset {
35879 return Ok(());
35880 }
35881
35882 while _next_ordinal_to_read < 2 {
35884 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35885 _next_ordinal_to_read += 1;
35886 next_offset += envelope_size;
35887 }
35888
35889 let next_out_of_line = decoder.next_out_of_line();
35890 let handles_before = decoder.remaining_handles();
35891 if let Some((inlined, num_bytes, num_handles)) =
35892 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35893 {
35894 let member_inline_size =
35895 <fidl::encoding::Array<u32, 3> as fidl::encoding::TypeMarker>::inline_size(
35896 decoder.context,
35897 );
35898 if inlined != (member_inline_size <= 4) {
35899 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35900 }
35901 let inner_offset;
35902 let mut inner_depth = depth.clone();
35903 if inlined {
35904 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35905 inner_offset = next_offset;
35906 } else {
35907 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35908 inner_depth.increment()?;
35909 }
35910 let val_ref = self
35911 .array_member
35912 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u32, 3>, D));
35913 fidl::decode!(fidl::encoding::Array<u32, 3>, D, val_ref, decoder, inner_offset, inner_depth)?;
35914 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
35915 {
35916 return Err(fidl::Error::InvalidNumBytesInEnvelope);
35917 }
35918 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
35919 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
35920 }
35921 }
35922
35923 next_offset += envelope_size;
35924 _next_ordinal_to_read += 1;
35925 if next_offset >= end_offset {
35926 return Ok(());
35927 }
35928
35929 while _next_ordinal_to_read < 3 {
35931 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35932 _next_ordinal_to_read += 1;
35933 next_offset += envelope_size;
35934 }
35935
35936 let next_out_of_line = decoder.next_out_of_line();
35937 let handles_before = decoder.remaining_handles();
35938 if let Some((inlined, num_bytes, num_handles)) =
35939 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35940 {
35941 let member_inline_size =
35942 <CompatTableString as fidl::encoding::TypeMarker>::inline_size(decoder.context);
35943 if inlined != (member_inline_size <= 4) {
35944 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35945 }
35946 let inner_offset;
35947 let mut inner_depth = depth.clone();
35948 if inlined {
35949 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35950 inner_offset = next_offset;
35951 } else {
35952 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35953 inner_depth.increment()?;
35954 }
35955 let val_ref =
35956 self.table_member.get_or_insert_with(|| fidl::new_empty!(CompatTableString, D));
35957 fidl::decode!(CompatTableString, D, val_ref, decoder, inner_offset, inner_depth)?;
35958 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
35959 {
35960 return Err(fidl::Error::InvalidNumBytesInEnvelope);
35961 }
35962 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
35963 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
35964 }
35965 }
35966
35967 next_offset += envelope_size;
35968 _next_ordinal_to_read += 1;
35969 if next_offset >= end_offset {
35970 return Ok(());
35971 }
35972
35973 while _next_ordinal_to_read < 4 {
35975 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
35976 _next_ordinal_to_read += 1;
35977 next_offset += envelope_size;
35978 }
35979
35980 let next_out_of_line = decoder.next_out_of_line();
35981 let handles_before = decoder.remaining_handles();
35982 if let Some((inlined, num_bytes, num_handles)) =
35983 fidl::encoding::decode_envelope_header(decoder, next_offset)?
35984 {
35985 let member_inline_size =
35986 <CompatXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
35987 if inlined != (member_inline_size <= 4) {
35988 return Err(fidl::Error::InvalidInlineBitInEnvelope);
35989 }
35990 let inner_offset;
35991 let mut inner_depth = depth.clone();
35992 if inlined {
35993 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
35994 inner_offset = next_offset;
35995 } else {
35996 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
35997 inner_depth.increment()?;
35998 }
35999 let val_ref =
36000 self.xunion_member.get_or_insert_with(|| fidl::new_empty!(CompatXUnion, D));
36001 fidl::decode!(CompatXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
36002 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36003 {
36004 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36005 }
36006 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36007 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36008 }
36009 }
36010
36011 next_offset += envelope_size;
36012
36013 while next_offset < end_offset {
36015 _next_ordinal_to_read += 1;
36016 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36017 next_offset += envelope_size;
36018 }
36019
36020 Ok(())
36021 }
36022 }
36023
36024 impl EmptyTable {
36025 #[inline(always)]
36026 fn max_ordinal_present(&self) -> u64 {
36027 0
36028 }
36029 }
36030
36031 impl fidl::encoding::ValueTypeMarker for EmptyTable {
36032 type Borrowed<'a> = &'a Self;
36033 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36034 value
36035 }
36036 }
36037
36038 unsafe impl fidl::encoding::TypeMarker for EmptyTable {
36039 type Owned = Self;
36040
36041 #[inline(always)]
36042 fn inline_align(_context: fidl::encoding::Context) -> usize {
36043 8
36044 }
36045
36046 #[inline(always)]
36047 fn inline_size(_context: fidl::encoding::Context) -> usize {
36048 16
36049 }
36050 }
36051
36052 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyTable, D>
36053 for &EmptyTable
36054 {
36055 unsafe fn encode(
36056 self,
36057 encoder: &mut fidl::encoding::Encoder<'_, D>,
36058 offset: usize,
36059 mut depth: fidl::encoding::Depth,
36060 ) -> fidl::Result<()> {
36061 encoder.debug_check_bounds::<EmptyTable>(offset);
36062 let max_ordinal: u64 = self.max_ordinal_present();
36064 encoder.write_num(max_ordinal, offset);
36065 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36066 if max_ordinal == 0 {
36068 return Ok(());
36069 }
36070 depth.increment()?;
36071 let envelope_size = 8;
36072 let bytes_len = max_ordinal as usize * envelope_size;
36073 #[allow(unused_variables)]
36074 let offset = encoder.out_of_line_offset(bytes_len);
36075 let mut _prev_end_offset: usize = 0;
36076
36077 Ok(())
36078 }
36079 }
36080
36081 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyTable {
36082 #[inline(always)]
36083 fn new_empty() -> Self {
36084 Self::default()
36085 }
36086
36087 unsafe fn decode(
36088 &mut self,
36089 decoder: &mut fidl::encoding::Decoder<'_, D>,
36090 offset: usize,
36091 mut depth: fidl::encoding::Depth,
36092 ) -> fidl::Result<()> {
36093 decoder.debug_check_bounds::<Self>(offset);
36094 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36095 None => return Err(fidl::Error::NotNullable),
36096 Some(len) => len,
36097 };
36098 if len == 0 {
36100 return Ok(());
36101 };
36102 depth.increment()?;
36103 let envelope_size = 8;
36104 let bytes_len = len * envelope_size;
36105 let offset = decoder.out_of_line_offset(bytes_len)?;
36106 let mut _next_ordinal_to_read = 0;
36108 let mut next_offset = offset;
36109 let end_offset = offset + bytes_len;
36110
36111 while next_offset < end_offset {
36113 _next_ordinal_to_read += 1;
36114 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36115 next_offset += envelope_size;
36116 }
36117
36118 Ok(())
36119 }
36120 }
36121
36122 impl FidlvizTable {
36123 #[inline(always)]
36124 fn max_ordinal_present(&self) -> u64 {
36125 if let Some(_) = self.f3 {
36126 return 3;
36127 }
36128 if let Some(_) = self.f1 {
36129 return 1;
36130 }
36131 0
36132 }
36133 }
36134
36135 impl fidl::encoding::ValueTypeMarker for FidlvizTable {
36136 type Borrowed<'a> = &'a Self;
36137 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36138 value
36139 }
36140 }
36141
36142 unsafe impl fidl::encoding::TypeMarker for FidlvizTable {
36143 type Owned = Self;
36144
36145 #[inline(always)]
36146 fn inline_align(_context: fidl::encoding::Context) -> usize {
36147 8
36148 }
36149
36150 #[inline(always)]
36151 fn inline_size(_context: fidl::encoding::Context) -> usize {
36152 16
36153 }
36154 }
36155
36156 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizTable, D>
36157 for &FidlvizTable
36158 {
36159 unsafe fn encode(
36160 self,
36161 encoder: &mut fidl::encoding::Encoder<'_, D>,
36162 offset: usize,
36163 mut depth: fidl::encoding::Depth,
36164 ) -> fidl::Result<()> {
36165 encoder.debug_check_bounds::<FidlvizTable>(offset);
36166 let max_ordinal: u64 = self.max_ordinal_present();
36168 encoder.write_num(max_ordinal, offset);
36169 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36170 if max_ordinal == 0 {
36172 return Ok(());
36173 }
36174 depth.increment()?;
36175 let envelope_size = 8;
36176 let bytes_len = max_ordinal as usize * envelope_size;
36177 #[allow(unused_variables)]
36178 let offset = encoder.out_of_line_offset(bytes_len);
36179 let mut _prev_end_offset: usize = 0;
36180 if 1 > max_ordinal {
36181 return Ok(());
36182 }
36183
36184 let cur_offset: usize = (1 - 1) * envelope_size;
36187
36188 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36190
36191 fidl::encoding::encode_in_envelope_optional::<bool, D>(
36196 self.f1.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
36197 encoder,
36198 offset + cur_offset,
36199 depth,
36200 )?;
36201
36202 _prev_end_offset = cur_offset + envelope_size;
36203 if 3 > max_ordinal {
36204 return Ok(());
36205 }
36206
36207 let cur_offset: usize = (3 - 1) * envelope_size;
36210
36211 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36213
36214 fidl::encoding::encode_in_envelope_optional::<bool, D>(
36219 self.f3.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
36220 encoder,
36221 offset + cur_offset,
36222 depth,
36223 )?;
36224
36225 _prev_end_offset = cur_offset + envelope_size;
36226
36227 Ok(())
36228 }
36229 }
36230
36231 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizTable {
36232 #[inline(always)]
36233 fn new_empty() -> Self {
36234 Self::default()
36235 }
36236
36237 unsafe fn decode(
36238 &mut self,
36239 decoder: &mut fidl::encoding::Decoder<'_, D>,
36240 offset: usize,
36241 mut depth: fidl::encoding::Depth,
36242 ) -> fidl::Result<()> {
36243 decoder.debug_check_bounds::<Self>(offset);
36244 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36245 None => return Err(fidl::Error::NotNullable),
36246 Some(len) => len,
36247 };
36248 if len == 0 {
36250 return Ok(());
36251 };
36252 depth.increment()?;
36253 let envelope_size = 8;
36254 let bytes_len = len * envelope_size;
36255 let offset = decoder.out_of_line_offset(bytes_len)?;
36256 let mut _next_ordinal_to_read = 0;
36258 let mut next_offset = offset;
36259 let end_offset = offset + bytes_len;
36260 _next_ordinal_to_read += 1;
36261 if next_offset >= end_offset {
36262 return Ok(());
36263 }
36264
36265 while _next_ordinal_to_read < 1 {
36267 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36268 _next_ordinal_to_read += 1;
36269 next_offset += envelope_size;
36270 }
36271
36272 let next_out_of_line = decoder.next_out_of_line();
36273 let handles_before = decoder.remaining_handles();
36274 if let Some((inlined, num_bytes, num_handles)) =
36275 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36276 {
36277 let member_inline_size =
36278 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36279 if inlined != (member_inline_size <= 4) {
36280 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36281 }
36282 let inner_offset;
36283 let mut inner_depth = depth.clone();
36284 if inlined {
36285 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36286 inner_offset = next_offset;
36287 } else {
36288 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36289 inner_depth.increment()?;
36290 }
36291 let val_ref = self.f1.get_or_insert_with(|| fidl::new_empty!(bool, D));
36292 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
36293 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36294 {
36295 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36296 }
36297 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36298 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36299 }
36300 }
36301
36302 next_offset += envelope_size;
36303 _next_ordinal_to_read += 1;
36304 if next_offset >= end_offset {
36305 return Ok(());
36306 }
36307
36308 while _next_ordinal_to_read < 3 {
36310 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36311 _next_ordinal_to_read += 1;
36312 next_offset += envelope_size;
36313 }
36314
36315 let next_out_of_line = decoder.next_out_of_line();
36316 let handles_before = decoder.remaining_handles();
36317 if let Some((inlined, num_bytes, num_handles)) =
36318 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36319 {
36320 let member_inline_size =
36321 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36322 if inlined != (member_inline_size <= 4) {
36323 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36324 }
36325 let inner_offset;
36326 let mut inner_depth = depth.clone();
36327 if inlined {
36328 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36329 inner_offset = next_offset;
36330 } else {
36331 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36332 inner_depth.increment()?;
36333 }
36334 let val_ref = self.f3.get_or_insert_with(|| fidl::new_empty!(bool, D));
36335 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
36336 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36337 {
36338 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36339 }
36340 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36341 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36342 }
36343 }
36344
36345 next_offset += envelope_size;
36346
36347 while next_offset < end_offset {
36349 _next_ordinal_to_read += 1;
36350 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36351 next_offset += envelope_size;
36352 }
36353
36354 Ok(())
36355 }
36356 }
36357
36358 impl GoldenTable {
36359 #[inline(always)]
36360 fn max_ordinal_present(&self) -> u64 {
36361 if let Some(_) = self.v {
36362 return 1;
36363 }
36364 0
36365 }
36366 }
36367
36368 impl fidl::encoding::ValueTypeMarker for GoldenTable {
36369 type Borrowed<'a> = &'a Self;
36370 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36371 value
36372 }
36373 }
36374
36375 unsafe impl fidl::encoding::TypeMarker for GoldenTable {
36376 type Owned = Self;
36377
36378 #[inline(always)]
36379 fn inline_align(_context: fidl::encoding::Context) -> usize {
36380 8
36381 }
36382
36383 #[inline(always)]
36384 fn inline_size(_context: fidl::encoding::Context) -> usize {
36385 16
36386 }
36387 }
36388
36389 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenTable, D>
36390 for &GoldenTable
36391 {
36392 unsafe fn encode(
36393 self,
36394 encoder: &mut fidl::encoding::Encoder<'_, D>,
36395 offset: usize,
36396 mut depth: fidl::encoding::Depth,
36397 ) -> fidl::Result<()> {
36398 encoder.debug_check_bounds::<GoldenTable>(offset);
36399 let max_ordinal: u64 = self.max_ordinal_present();
36401 encoder.write_num(max_ordinal, offset);
36402 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36403 if max_ordinal == 0 {
36405 return Ok(());
36406 }
36407 depth.increment()?;
36408 let envelope_size = 8;
36409 let bytes_len = max_ordinal as usize * envelope_size;
36410 #[allow(unused_variables)]
36411 let offset = encoder.out_of_line_offset(bytes_len);
36412 let mut _prev_end_offset: usize = 0;
36413 if 1 > max_ordinal {
36414 return Ok(());
36415 }
36416
36417 let cur_offset: usize = (1 - 1) * envelope_size;
36420
36421 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36423
36424 fidl::encoding::encode_in_envelope_optional::<i16, D>(
36429 self.v.as_ref().map(<i16 as fidl::encoding::ValueTypeMarker>::borrow),
36430 encoder,
36431 offset + cur_offset,
36432 depth,
36433 )?;
36434
36435 _prev_end_offset = cur_offset + envelope_size;
36436
36437 Ok(())
36438 }
36439 }
36440
36441 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenTable {
36442 #[inline(always)]
36443 fn new_empty() -> Self {
36444 Self::default()
36445 }
36446
36447 unsafe fn decode(
36448 &mut self,
36449 decoder: &mut fidl::encoding::Decoder<'_, D>,
36450 offset: usize,
36451 mut depth: fidl::encoding::Depth,
36452 ) -> fidl::Result<()> {
36453 decoder.debug_check_bounds::<Self>(offset);
36454 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36455 None => return Err(fidl::Error::NotNullable),
36456 Some(len) => len,
36457 };
36458 if len == 0 {
36460 return Ok(());
36461 };
36462 depth.increment()?;
36463 let envelope_size = 8;
36464 let bytes_len = len * envelope_size;
36465 let offset = decoder.out_of_line_offset(bytes_len)?;
36466 let mut _next_ordinal_to_read = 0;
36468 let mut next_offset = offset;
36469 let end_offset = offset + bytes_len;
36470 _next_ordinal_to_read += 1;
36471 if next_offset >= end_offset {
36472 return Ok(());
36473 }
36474
36475 while _next_ordinal_to_read < 1 {
36477 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36478 _next_ordinal_to_read += 1;
36479 next_offset += envelope_size;
36480 }
36481
36482 let next_out_of_line = decoder.next_out_of_line();
36483 let handles_before = decoder.remaining_handles();
36484 if let Some((inlined, num_bytes, num_handles)) =
36485 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36486 {
36487 let member_inline_size =
36488 <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36489 if inlined != (member_inline_size <= 4) {
36490 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36491 }
36492 let inner_offset;
36493 let mut inner_depth = depth.clone();
36494 if inlined {
36495 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36496 inner_offset = next_offset;
36497 } else {
36498 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36499 inner_depth.increment()?;
36500 }
36501 let val_ref = self.v.get_or_insert_with(|| fidl::new_empty!(i16, D));
36502 fidl::decode!(i16, D, val_ref, decoder, inner_offset, inner_depth)?;
36503 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36504 {
36505 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36506 }
36507 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36508 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36509 }
36510 }
36511
36512 next_offset += envelope_size;
36513
36514 while next_offset < end_offset {
36516 _next_ordinal_to_read += 1;
36517 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36518 next_offset += envelope_size;
36519 }
36520
36521 Ok(())
36522 }
36523 }
36524
36525 impl PaddedTable {
36526 #[inline(always)]
36527 fn max_ordinal_present(&self) -> u64 {
36528 if let Some(_) = self.field {
36529 return 1;
36530 }
36531 0
36532 }
36533 }
36534
36535 impl fidl::encoding::ValueTypeMarker for PaddedTable {
36536 type Borrowed<'a> = &'a Self;
36537 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36538 value
36539 }
36540 }
36541
36542 unsafe impl fidl::encoding::TypeMarker for PaddedTable {
36543 type Owned = Self;
36544
36545 #[inline(always)]
36546 fn inline_align(_context: fidl::encoding::Context) -> usize {
36547 8
36548 }
36549
36550 #[inline(always)]
36551 fn inline_size(_context: fidl::encoding::Context) -> usize {
36552 16
36553 }
36554 }
36555
36556 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedTable, D>
36557 for &PaddedTable
36558 {
36559 unsafe fn encode(
36560 self,
36561 encoder: &mut fidl::encoding::Encoder<'_, D>,
36562 offset: usize,
36563 mut depth: fidl::encoding::Depth,
36564 ) -> fidl::Result<()> {
36565 encoder.debug_check_bounds::<PaddedTable>(offset);
36566 let max_ordinal: u64 = self.max_ordinal_present();
36568 encoder.write_num(max_ordinal, offset);
36569 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36570 if max_ordinal == 0 {
36572 return Ok(());
36573 }
36574 depth.increment()?;
36575 let envelope_size = 8;
36576 let bytes_len = max_ordinal as usize * envelope_size;
36577 #[allow(unused_variables)]
36578 let offset = encoder.out_of_line_offset(bytes_len);
36579 let mut _prev_end_offset: usize = 0;
36580 if 1 > max_ordinal {
36581 return Ok(());
36582 }
36583
36584 let cur_offset: usize = (1 - 1) * envelope_size;
36587
36588 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36590
36591 fidl::encoding::encode_in_envelope_optional::<i8, D>(
36596 self.field.as_ref().map(<i8 as fidl::encoding::ValueTypeMarker>::borrow),
36597 encoder,
36598 offset + cur_offset,
36599 depth,
36600 )?;
36601
36602 _prev_end_offset = cur_offset + envelope_size;
36603
36604 Ok(())
36605 }
36606 }
36607
36608 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedTable {
36609 #[inline(always)]
36610 fn new_empty() -> Self {
36611 Self::default()
36612 }
36613
36614 unsafe fn decode(
36615 &mut self,
36616 decoder: &mut fidl::encoding::Decoder<'_, D>,
36617 offset: usize,
36618 mut depth: fidl::encoding::Depth,
36619 ) -> fidl::Result<()> {
36620 decoder.debug_check_bounds::<Self>(offset);
36621 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36622 None => return Err(fidl::Error::NotNullable),
36623 Some(len) => len,
36624 };
36625 if len == 0 {
36627 return Ok(());
36628 };
36629 depth.increment()?;
36630 let envelope_size = 8;
36631 let bytes_len = len * envelope_size;
36632 let offset = decoder.out_of_line_offset(bytes_len)?;
36633 let mut _next_ordinal_to_read = 0;
36635 let mut next_offset = offset;
36636 let end_offset = offset + bytes_len;
36637 _next_ordinal_to_read += 1;
36638 if next_offset >= end_offset {
36639 return Ok(());
36640 }
36641
36642 while _next_ordinal_to_read < 1 {
36644 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36645 _next_ordinal_to_read += 1;
36646 next_offset += envelope_size;
36647 }
36648
36649 let next_out_of_line = decoder.next_out_of_line();
36650 let handles_before = decoder.remaining_handles();
36651 if let Some((inlined, num_bytes, num_handles)) =
36652 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36653 {
36654 let member_inline_size =
36655 <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
36656 if inlined != (member_inline_size <= 4) {
36657 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36658 }
36659 let inner_offset;
36660 let mut inner_depth = depth.clone();
36661 if inlined {
36662 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36663 inner_offset = next_offset;
36664 } else {
36665 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36666 inner_depth.increment()?;
36667 }
36668 let val_ref = self.field.get_or_insert_with(|| fidl::new_empty!(i8, D));
36669 fidl::decode!(i8, D, val_ref, decoder, inner_offset, inner_depth)?;
36670 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36671 {
36672 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36673 }
36674 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36675 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36676 }
36677 }
36678
36679 next_offset += envelope_size;
36680
36681 while next_offset < end_offset {
36683 _next_ordinal_to_read += 1;
36684 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36685 next_offset += envelope_size;
36686 }
36687
36688 Ok(())
36689 }
36690 }
36691
36692 impl RecursiveOptionalAndTable {
36693 #[inline(always)]
36694 fn max_ordinal_present(&self) -> u64 {
36695 if let Some(_) = self.recursive_optional {
36696 return 1;
36697 }
36698 0
36699 }
36700 }
36701
36702 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndTable {
36703 type Borrowed<'a> = &'a Self;
36704 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36705 value
36706 }
36707 }
36708
36709 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndTable {
36710 type Owned = Self;
36711
36712 #[inline(always)]
36713 fn inline_align(_context: fidl::encoding::Context) -> usize {
36714 8
36715 }
36716
36717 #[inline(always)]
36718 fn inline_size(_context: fidl::encoding::Context) -> usize {
36719 16
36720 }
36721 }
36722
36723 unsafe impl<D: fidl::encoding::ResourceDialect>
36724 fidl::encoding::Encode<RecursiveOptionalAndTable, D> for &RecursiveOptionalAndTable
36725 {
36726 unsafe fn encode(
36727 self,
36728 encoder: &mut fidl::encoding::Encoder<'_, D>,
36729 offset: usize,
36730 mut depth: fidl::encoding::Depth,
36731 ) -> fidl::Result<()> {
36732 encoder.debug_check_bounds::<RecursiveOptionalAndTable>(offset);
36733 let max_ordinal: u64 = self.max_ordinal_present();
36735 encoder.write_num(max_ordinal, offset);
36736 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36737 if max_ordinal == 0 {
36739 return Ok(());
36740 }
36741 depth.increment()?;
36742 let envelope_size = 8;
36743 let bytes_len = max_ordinal as usize * envelope_size;
36744 #[allow(unused_variables)]
36745 let offset = encoder.out_of_line_offset(bytes_len);
36746 let mut _prev_end_offset: usize = 0;
36747 if 1 > max_ordinal {
36748 return Ok(());
36749 }
36750
36751 let cur_offset: usize = (1 - 1) * envelope_size;
36754
36755 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36757
36758 fidl::encoding::encode_in_envelope_optional::<RecursiveOptionalStruct, D>(
36763 self.recursive_optional
36764 .as_ref()
36765 .map(<RecursiveOptionalStruct as fidl::encoding::ValueTypeMarker>::borrow),
36766 encoder,
36767 offset + cur_offset,
36768 depth,
36769 )?;
36770
36771 _prev_end_offset = cur_offset + envelope_size;
36772
36773 Ok(())
36774 }
36775 }
36776
36777 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
36778 for RecursiveOptionalAndTable
36779 {
36780 #[inline(always)]
36781 fn new_empty() -> Self {
36782 Self::default()
36783 }
36784
36785 unsafe fn decode(
36786 &mut self,
36787 decoder: &mut fidl::encoding::Decoder<'_, D>,
36788 offset: usize,
36789 mut depth: fidl::encoding::Depth,
36790 ) -> fidl::Result<()> {
36791 decoder.debug_check_bounds::<Self>(offset);
36792 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36793 None => return Err(fidl::Error::NotNullable),
36794 Some(len) => len,
36795 };
36796 if len == 0 {
36798 return Ok(());
36799 };
36800 depth.increment()?;
36801 let envelope_size = 8;
36802 let bytes_len = len * envelope_size;
36803 let offset = decoder.out_of_line_offset(bytes_len)?;
36804 let mut _next_ordinal_to_read = 0;
36806 let mut next_offset = offset;
36807 let end_offset = offset + bytes_len;
36808 _next_ordinal_to_read += 1;
36809 if next_offset >= end_offset {
36810 return Ok(());
36811 }
36812
36813 while _next_ordinal_to_read < 1 {
36815 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36816 _next_ordinal_to_read += 1;
36817 next_offset += envelope_size;
36818 }
36819
36820 let next_out_of_line = decoder.next_out_of_line();
36821 let handles_before = decoder.remaining_handles();
36822 if let Some((inlined, num_bytes, num_handles)) =
36823 fidl::encoding::decode_envelope_header(decoder, next_offset)?
36824 {
36825 let member_inline_size =
36826 <RecursiveOptionalStruct as fidl::encoding::TypeMarker>::inline_size(
36827 decoder.context,
36828 );
36829 if inlined != (member_inline_size <= 4) {
36830 return Err(fidl::Error::InvalidInlineBitInEnvelope);
36831 }
36832 let inner_offset;
36833 let mut inner_depth = depth.clone();
36834 if inlined {
36835 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
36836 inner_offset = next_offset;
36837 } else {
36838 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
36839 inner_depth.increment()?;
36840 }
36841 let val_ref = self
36842 .recursive_optional
36843 .get_or_insert_with(|| fidl::new_empty!(RecursiveOptionalStruct, D));
36844 fidl::decode!(
36845 RecursiveOptionalStruct,
36846 D,
36847 val_ref,
36848 decoder,
36849 inner_offset,
36850 inner_depth
36851 )?;
36852 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
36853 {
36854 return Err(fidl::Error::InvalidNumBytesInEnvelope);
36855 }
36856 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
36857 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
36858 }
36859 }
36860
36861 next_offset += envelope_size;
36862
36863 while next_offset < end_offset {
36865 _next_ordinal_to_read += 1;
36866 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36867 next_offset += envelope_size;
36868 }
36869
36870 Ok(())
36871 }
36872 }
36873
36874 impl RecursiveTable {
36875 #[inline(always)]
36876 fn max_ordinal_present(&self) -> u64 {
36877 if let Some(_) = self.s {
36878 return 1;
36879 }
36880 0
36881 }
36882 }
36883
36884 impl fidl::encoding::ValueTypeMarker for RecursiveTable {
36885 type Borrowed<'a> = &'a Self;
36886 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
36887 value
36888 }
36889 }
36890
36891 unsafe impl fidl::encoding::TypeMarker for RecursiveTable {
36892 type Owned = Self;
36893
36894 #[inline(always)]
36895 fn inline_align(_context: fidl::encoding::Context) -> usize {
36896 8
36897 }
36898
36899 #[inline(always)]
36900 fn inline_size(_context: fidl::encoding::Context) -> usize {
36901 16
36902 }
36903 }
36904
36905 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveTable, D>
36906 for &RecursiveTable
36907 {
36908 unsafe fn encode(
36909 self,
36910 encoder: &mut fidl::encoding::Encoder<'_, D>,
36911 offset: usize,
36912 mut depth: fidl::encoding::Depth,
36913 ) -> fidl::Result<()> {
36914 encoder.debug_check_bounds::<RecursiveTable>(offset);
36915 let max_ordinal: u64 = self.max_ordinal_present();
36917 encoder.write_num(max_ordinal, offset);
36918 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
36919 if max_ordinal == 0 {
36921 return Ok(());
36922 }
36923 depth.increment()?;
36924 let envelope_size = 8;
36925 let bytes_len = max_ordinal as usize * envelope_size;
36926 #[allow(unused_variables)]
36927 let offset = encoder.out_of_line_offset(bytes_len);
36928 let mut _prev_end_offset: usize = 0;
36929 if 1 > max_ordinal {
36930 return Ok(());
36931 }
36932
36933 let cur_offset: usize = (1 - 1) * envelope_size;
36936
36937 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
36939
36940 fidl::encoding::encode_in_envelope_optional::<RecursiveTableOptionalHolder, D>(
36945 self.s
36946 .as_ref()
36947 .map(<RecursiveTableOptionalHolder as fidl::encoding::ValueTypeMarker>::borrow),
36948 encoder,
36949 offset + cur_offset,
36950 depth,
36951 )?;
36952
36953 _prev_end_offset = cur_offset + envelope_size;
36954
36955 Ok(())
36956 }
36957 }
36958
36959 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveTable {
36960 #[inline(always)]
36961 fn new_empty() -> Self {
36962 Self::default()
36963 }
36964
36965 unsafe fn decode(
36966 &mut self,
36967 decoder: &mut fidl::encoding::Decoder<'_, D>,
36968 offset: usize,
36969 mut depth: fidl::encoding::Depth,
36970 ) -> fidl::Result<()> {
36971 decoder.debug_check_bounds::<Self>(offset);
36972 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
36973 None => return Err(fidl::Error::NotNullable),
36974 Some(len) => len,
36975 };
36976 if len == 0 {
36978 return Ok(());
36979 };
36980 depth.increment()?;
36981 let envelope_size = 8;
36982 let bytes_len = len * envelope_size;
36983 let offset = decoder.out_of_line_offset(bytes_len)?;
36984 let mut _next_ordinal_to_read = 0;
36986 let mut next_offset = offset;
36987 let end_offset = offset + bytes_len;
36988 _next_ordinal_to_read += 1;
36989 if next_offset >= end_offset {
36990 return Ok(());
36991 }
36992
36993 while _next_ordinal_to_read < 1 {
36995 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
36996 _next_ordinal_to_read += 1;
36997 next_offset += envelope_size;
36998 }
36999
37000 let next_out_of_line = decoder.next_out_of_line();
37001 let handles_before = decoder.remaining_handles();
37002 if let Some((inlined, num_bytes, num_handles)) =
37003 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37004 {
37005 let member_inline_size =
37006 <RecursiveTableOptionalHolder as fidl::encoding::TypeMarker>::inline_size(
37007 decoder.context,
37008 );
37009 if inlined != (member_inline_size <= 4) {
37010 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37011 }
37012 let inner_offset;
37013 let mut inner_depth = depth.clone();
37014 if inlined {
37015 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37016 inner_offset = next_offset;
37017 } else {
37018 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37019 inner_depth.increment()?;
37020 }
37021 let val_ref =
37022 self.s.get_or_insert_with(|| fidl::new_empty!(RecursiveTableOptionalHolder, D));
37023 fidl::decode!(
37024 RecursiveTableOptionalHolder,
37025 D,
37026 val_ref,
37027 decoder,
37028 inner_offset,
37029 inner_depth
37030 )?;
37031 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37032 {
37033 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37034 }
37035 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37036 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37037 }
37038 }
37039
37040 next_offset += envelope_size;
37041
37042 while next_offset < end_offset {
37044 _next_ordinal_to_read += 1;
37045 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37046 next_offset += envelope_size;
37047 }
37048
37049 Ok(())
37050 }
37051 }
37052
37053 impl Regression10TableV1 {
37054 #[inline(always)]
37055 fn max_ordinal_present(&self) -> u64 {
37056 if let Some(_) = self.member1 {
37057 return 1;
37058 }
37059 0
37060 }
37061 }
37062
37063 impl fidl::encoding::ValueTypeMarker for Regression10TableV1 {
37064 type Borrowed<'a> = &'a Self;
37065 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37066 value
37067 }
37068 }
37069
37070 unsafe impl fidl::encoding::TypeMarker for Regression10TableV1 {
37071 type Owned = Self;
37072
37073 #[inline(always)]
37074 fn inline_align(_context: fidl::encoding::Context) -> usize {
37075 8
37076 }
37077
37078 #[inline(always)]
37079 fn inline_size(_context: fidl::encoding::Context) -> usize {
37080 16
37081 }
37082 }
37083
37084 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV1, D>
37085 for &Regression10TableV1
37086 {
37087 unsafe fn encode(
37088 self,
37089 encoder: &mut fidl::encoding::Encoder<'_, D>,
37090 offset: usize,
37091 mut depth: fidl::encoding::Depth,
37092 ) -> fidl::Result<()> {
37093 encoder.debug_check_bounds::<Regression10TableV1>(offset);
37094 let max_ordinal: u64 = self.max_ordinal_present();
37096 encoder.write_num(max_ordinal, offset);
37097 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37098 if max_ordinal == 0 {
37100 return Ok(());
37101 }
37102 depth.increment()?;
37103 let envelope_size = 8;
37104 let bytes_len = max_ordinal as usize * envelope_size;
37105 #[allow(unused_variables)]
37106 let offset = encoder.out_of_line_offset(bytes_len);
37107 let mut _prev_end_offset: usize = 0;
37108 if 1 > max_ordinal {
37109 return Ok(());
37110 }
37111
37112 let cur_offset: usize = (1 - 1) * envelope_size;
37115
37116 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37118
37119 fidl::encoding::encode_in_envelope_optional::<u64, D>(
37124 self.member1.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
37125 encoder,
37126 offset + cur_offset,
37127 depth,
37128 )?;
37129
37130 _prev_end_offset = cur_offset + envelope_size;
37131
37132 Ok(())
37133 }
37134 }
37135
37136 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV1 {
37137 #[inline(always)]
37138 fn new_empty() -> Self {
37139 Self::default()
37140 }
37141
37142 unsafe fn decode(
37143 &mut self,
37144 decoder: &mut fidl::encoding::Decoder<'_, D>,
37145 offset: usize,
37146 mut depth: fidl::encoding::Depth,
37147 ) -> fidl::Result<()> {
37148 decoder.debug_check_bounds::<Self>(offset);
37149 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37150 None => return Err(fidl::Error::NotNullable),
37151 Some(len) => len,
37152 };
37153 if len == 0 {
37155 return Ok(());
37156 };
37157 depth.increment()?;
37158 let envelope_size = 8;
37159 let bytes_len = len * envelope_size;
37160 let offset = decoder.out_of_line_offset(bytes_len)?;
37161 let mut _next_ordinal_to_read = 0;
37163 let mut next_offset = offset;
37164 let end_offset = offset + bytes_len;
37165 _next_ordinal_to_read += 1;
37166 if next_offset >= end_offset {
37167 return Ok(());
37168 }
37169
37170 while _next_ordinal_to_read < 1 {
37172 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37173 _next_ordinal_to_read += 1;
37174 next_offset += envelope_size;
37175 }
37176
37177 let next_out_of_line = decoder.next_out_of_line();
37178 let handles_before = decoder.remaining_handles();
37179 if let Some((inlined, num_bytes, num_handles)) =
37180 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37181 {
37182 let member_inline_size =
37183 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37184 if inlined != (member_inline_size <= 4) {
37185 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37186 }
37187 let inner_offset;
37188 let mut inner_depth = depth.clone();
37189 if inlined {
37190 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37191 inner_offset = next_offset;
37192 } else {
37193 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37194 inner_depth.increment()?;
37195 }
37196 let val_ref = self.member1.get_or_insert_with(|| fidl::new_empty!(u64, D));
37197 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
37198 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37199 {
37200 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37201 }
37202 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37203 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37204 }
37205 }
37206
37207 next_offset += envelope_size;
37208
37209 while next_offset < end_offset {
37211 _next_ordinal_to_read += 1;
37212 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37213 next_offset += envelope_size;
37214 }
37215
37216 Ok(())
37217 }
37218 }
37219
37220 impl Regression10TableV2 {
37221 #[inline(always)]
37222 fn max_ordinal_present(&self) -> u64 {
37223 if let Some(_) = self.member2 {
37224 return 5;
37225 }
37226 if let Some(_) = self.member1 {
37227 return 1;
37228 }
37229 0
37230 }
37231 }
37232
37233 impl fidl::encoding::ValueTypeMarker for Regression10TableV2 {
37234 type Borrowed<'a> = &'a Self;
37235 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37236 value
37237 }
37238 }
37239
37240 unsafe impl fidl::encoding::TypeMarker for Regression10TableV2 {
37241 type Owned = Self;
37242
37243 #[inline(always)]
37244 fn inline_align(_context: fidl::encoding::Context) -> usize {
37245 8
37246 }
37247
37248 #[inline(always)]
37249 fn inline_size(_context: fidl::encoding::Context) -> usize {
37250 16
37251 }
37252 }
37253
37254 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV2, D>
37255 for &Regression10TableV2
37256 {
37257 unsafe fn encode(
37258 self,
37259 encoder: &mut fidl::encoding::Encoder<'_, D>,
37260 offset: usize,
37261 mut depth: fidl::encoding::Depth,
37262 ) -> fidl::Result<()> {
37263 encoder.debug_check_bounds::<Regression10TableV2>(offset);
37264 let max_ordinal: u64 = self.max_ordinal_present();
37266 encoder.write_num(max_ordinal, offset);
37267 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37268 if max_ordinal == 0 {
37270 return Ok(());
37271 }
37272 depth.increment()?;
37273 let envelope_size = 8;
37274 let bytes_len = max_ordinal as usize * envelope_size;
37275 #[allow(unused_variables)]
37276 let offset = encoder.out_of_line_offset(bytes_len);
37277 let mut _prev_end_offset: usize = 0;
37278 if 1 > max_ordinal {
37279 return Ok(());
37280 }
37281
37282 let cur_offset: usize = (1 - 1) * envelope_size;
37285
37286 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37288
37289 fidl::encoding::encode_in_envelope_optional::<u64, D>(
37294 self.member1.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
37295 encoder,
37296 offset + cur_offset,
37297 depth,
37298 )?;
37299
37300 _prev_end_offset = cur_offset + envelope_size;
37301 if 5 > max_ordinal {
37302 return Ok(());
37303 }
37304
37305 let cur_offset: usize = (5 - 1) * envelope_size;
37308
37309 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37311
37312 fidl::encoding::encode_in_envelope_optional::<u64, D>(
37317 self.member2.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
37318 encoder,
37319 offset + cur_offset,
37320 depth,
37321 )?;
37322
37323 _prev_end_offset = cur_offset + envelope_size;
37324
37325 Ok(())
37326 }
37327 }
37328
37329 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV2 {
37330 #[inline(always)]
37331 fn new_empty() -> Self {
37332 Self::default()
37333 }
37334
37335 unsafe fn decode(
37336 &mut self,
37337 decoder: &mut fidl::encoding::Decoder<'_, D>,
37338 offset: usize,
37339 mut depth: fidl::encoding::Depth,
37340 ) -> fidl::Result<()> {
37341 decoder.debug_check_bounds::<Self>(offset);
37342 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37343 None => return Err(fidl::Error::NotNullable),
37344 Some(len) => len,
37345 };
37346 if len == 0 {
37348 return Ok(());
37349 };
37350 depth.increment()?;
37351 let envelope_size = 8;
37352 let bytes_len = len * envelope_size;
37353 let offset = decoder.out_of_line_offset(bytes_len)?;
37354 let mut _next_ordinal_to_read = 0;
37356 let mut next_offset = offset;
37357 let end_offset = offset + bytes_len;
37358 _next_ordinal_to_read += 1;
37359 if next_offset >= end_offset {
37360 return Ok(());
37361 }
37362
37363 while _next_ordinal_to_read < 1 {
37365 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37366 _next_ordinal_to_read += 1;
37367 next_offset += envelope_size;
37368 }
37369
37370 let next_out_of_line = decoder.next_out_of_line();
37371 let handles_before = decoder.remaining_handles();
37372 if let Some((inlined, num_bytes, num_handles)) =
37373 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37374 {
37375 let member_inline_size =
37376 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37377 if inlined != (member_inline_size <= 4) {
37378 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37379 }
37380 let inner_offset;
37381 let mut inner_depth = depth.clone();
37382 if inlined {
37383 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37384 inner_offset = next_offset;
37385 } else {
37386 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37387 inner_depth.increment()?;
37388 }
37389 let val_ref = self.member1.get_or_insert_with(|| fidl::new_empty!(u64, D));
37390 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
37391 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37392 {
37393 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37394 }
37395 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37396 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37397 }
37398 }
37399
37400 next_offset += envelope_size;
37401 _next_ordinal_to_read += 1;
37402 if next_offset >= end_offset {
37403 return Ok(());
37404 }
37405
37406 while _next_ordinal_to_read < 5 {
37408 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37409 _next_ordinal_to_read += 1;
37410 next_offset += envelope_size;
37411 }
37412
37413 let next_out_of_line = decoder.next_out_of_line();
37414 let handles_before = decoder.remaining_handles();
37415 if let Some((inlined, num_bytes, num_handles)) =
37416 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37417 {
37418 let member_inline_size =
37419 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37420 if inlined != (member_inline_size <= 4) {
37421 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37422 }
37423 let inner_offset;
37424 let mut inner_depth = depth.clone();
37425 if inlined {
37426 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37427 inner_offset = next_offset;
37428 } else {
37429 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37430 inner_depth.increment()?;
37431 }
37432 let val_ref = self.member2.get_or_insert_with(|| fidl::new_empty!(u64, D));
37433 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
37434 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37435 {
37436 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37437 }
37438 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37439 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37440 }
37441 }
37442
37443 next_offset += envelope_size;
37444
37445 while next_offset < end_offset {
37447 _next_ordinal_to_read += 1;
37448 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37449 next_offset += envelope_size;
37450 }
37451
37452 Ok(())
37453 }
37454 }
37455
37456 impl Regression10TableV3 {
37457 #[inline(always)]
37458 fn max_ordinal_present(&self) -> u64 {
37459 if let Some(_) = self.z {
37460 return 6;
37461 }
37462 if let Some(_) = self.y {
37463 return 5;
37464 }
37465 if let Some(_) = self.x {
37466 return 1;
37467 }
37468 0
37469 }
37470 }
37471
37472 impl fidl::encoding::ValueTypeMarker for Regression10TableV3 {
37473 type Borrowed<'a> = &'a Self;
37474 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37475 value
37476 }
37477 }
37478
37479 unsafe impl fidl::encoding::TypeMarker for Regression10TableV3 {
37480 type Owned = Self;
37481
37482 #[inline(always)]
37483 fn inline_align(_context: fidl::encoding::Context) -> usize {
37484 8
37485 }
37486
37487 #[inline(always)]
37488 fn inline_size(_context: fidl::encoding::Context) -> usize {
37489 16
37490 }
37491 }
37492
37493 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression10TableV3, D>
37494 for &Regression10TableV3
37495 {
37496 unsafe fn encode(
37497 self,
37498 encoder: &mut fidl::encoding::Encoder<'_, D>,
37499 offset: usize,
37500 mut depth: fidl::encoding::Depth,
37501 ) -> fidl::Result<()> {
37502 encoder.debug_check_bounds::<Regression10TableV3>(offset);
37503 let max_ordinal: u64 = self.max_ordinal_present();
37505 encoder.write_num(max_ordinal, offset);
37506 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37507 if max_ordinal == 0 {
37509 return Ok(());
37510 }
37511 depth.increment()?;
37512 let envelope_size = 8;
37513 let bytes_len = max_ordinal as usize * envelope_size;
37514 #[allow(unused_variables)]
37515 let offset = encoder.out_of_line_offset(bytes_len);
37516 let mut _prev_end_offset: usize = 0;
37517 if 1 > max_ordinal {
37518 return Ok(());
37519 }
37520
37521 let cur_offset: usize = (1 - 1) * envelope_size;
37524
37525 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37527
37528 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37533 self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37534 encoder,
37535 offset + cur_offset,
37536 depth,
37537 )?;
37538
37539 _prev_end_offset = cur_offset + envelope_size;
37540 if 5 > max_ordinal {
37541 return Ok(());
37542 }
37543
37544 let cur_offset: usize = (5 - 1) * envelope_size;
37547
37548 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37550
37551 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37556 self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37557 encoder,
37558 offset + cur_offset,
37559 depth,
37560 )?;
37561
37562 _prev_end_offset = cur_offset + envelope_size;
37563 if 6 > max_ordinal {
37564 return Ok(());
37565 }
37566
37567 let cur_offset: usize = (6 - 1) * envelope_size;
37570
37571 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37573
37574 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37579 self.z.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37580 encoder,
37581 offset + cur_offset,
37582 depth,
37583 )?;
37584
37585 _prev_end_offset = cur_offset + envelope_size;
37586
37587 Ok(())
37588 }
37589 }
37590
37591 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression10TableV3 {
37592 #[inline(always)]
37593 fn new_empty() -> Self {
37594 Self::default()
37595 }
37596
37597 unsafe fn decode(
37598 &mut self,
37599 decoder: &mut fidl::encoding::Decoder<'_, D>,
37600 offset: usize,
37601 mut depth: fidl::encoding::Depth,
37602 ) -> fidl::Result<()> {
37603 decoder.debug_check_bounds::<Self>(offset);
37604 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37605 None => return Err(fidl::Error::NotNullable),
37606 Some(len) => len,
37607 };
37608 if len == 0 {
37610 return Ok(());
37611 };
37612 depth.increment()?;
37613 let envelope_size = 8;
37614 let bytes_len = len * envelope_size;
37615 let offset = decoder.out_of_line_offset(bytes_len)?;
37616 let mut _next_ordinal_to_read = 0;
37618 let mut next_offset = offset;
37619 let end_offset = offset + bytes_len;
37620 _next_ordinal_to_read += 1;
37621 if next_offset >= end_offset {
37622 return Ok(());
37623 }
37624
37625 while _next_ordinal_to_read < 1 {
37627 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37628 _next_ordinal_to_read += 1;
37629 next_offset += envelope_size;
37630 }
37631
37632 let next_out_of_line = decoder.next_out_of_line();
37633 let handles_before = decoder.remaining_handles();
37634 if let Some((inlined, num_bytes, num_handles)) =
37635 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37636 {
37637 let member_inline_size =
37638 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37639 if inlined != (member_inline_size <= 4) {
37640 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37641 }
37642 let inner_offset;
37643 let mut inner_depth = depth.clone();
37644 if inlined {
37645 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37646 inner_offset = next_offset;
37647 } else {
37648 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37649 inner_depth.increment()?;
37650 }
37651 let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
37652 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
37653 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37654 {
37655 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37656 }
37657 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37658 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37659 }
37660 }
37661
37662 next_offset += envelope_size;
37663 _next_ordinal_to_read += 1;
37664 if next_offset >= end_offset {
37665 return Ok(());
37666 }
37667
37668 while _next_ordinal_to_read < 5 {
37670 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37671 _next_ordinal_to_read += 1;
37672 next_offset += envelope_size;
37673 }
37674
37675 let next_out_of_line = decoder.next_out_of_line();
37676 let handles_before = decoder.remaining_handles();
37677 if let Some((inlined, num_bytes, num_handles)) =
37678 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37679 {
37680 let member_inline_size =
37681 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37682 if inlined != (member_inline_size <= 4) {
37683 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37684 }
37685 let inner_offset;
37686 let mut inner_depth = depth.clone();
37687 if inlined {
37688 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37689 inner_offset = next_offset;
37690 } else {
37691 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37692 inner_depth.increment()?;
37693 }
37694 let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
37695 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
37696 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37697 {
37698 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37699 }
37700 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37701 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37702 }
37703 }
37704
37705 next_offset += envelope_size;
37706 _next_ordinal_to_read += 1;
37707 if next_offset >= end_offset {
37708 return Ok(());
37709 }
37710
37711 while _next_ordinal_to_read < 6 {
37713 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37714 _next_ordinal_to_read += 1;
37715 next_offset += envelope_size;
37716 }
37717
37718 let next_out_of_line = decoder.next_out_of_line();
37719 let handles_before = decoder.remaining_handles();
37720 if let Some((inlined, num_bytes, num_handles)) =
37721 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37722 {
37723 let member_inline_size =
37724 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37725 if inlined != (member_inline_size <= 4) {
37726 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37727 }
37728 let inner_offset;
37729 let mut inner_depth = depth.clone();
37730 if inlined {
37731 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37732 inner_offset = next_offset;
37733 } else {
37734 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37735 inner_depth.increment()?;
37736 }
37737 let val_ref = self.z.get_or_insert_with(|| fidl::new_empty!(i64, D));
37738 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
37739 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37740 {
37741 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37742 }
37743 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37744 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37745 }
37746 }
37747
37748 next_offset += envelope_size;
37749
37750 while next_offset < end_offset {
37752 _next_ordinal_to_read += 1;
37753 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37754 next_offset += envelope_size;
37755 }
37756
37757 Ok(())
37758 }
37759 }
37760
37761 impl ReverseOrdinalTable {
37762 #[inline(always)]
37763 fn max_ordinal_present(&self) -> u64 {
37764 if let Some(_) = self.x {
37765 return 4;
37766 }
37767 if let Some(_) = self.y {
37768 return 2;
37769 }
37770 if let Some(_) = self.z {
37771 return 1;
37772 }
37773 0
37774 }
37775 }
37776
37777 impl fidl::encoding::ValueTypeMarker for ReverseOrdinalTable {
37778 type Borrowed<'a> = &'a Self;
37779 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
37780 value
37781 }
37782 }
37783
37784 unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalTable {
37785 type Owned = Self;
37786
37787 #[inline(always)]
37788 fn inline_align(_context: fidl::encoding::Context) -> usize {
37789 8
37790 }
37791
37792 #[inline(always)]
37793 fn inline_size(_context: fidl::encoding::Context) -> usize {
37794 16
37795 }
37796 }
37797
37798 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReverseOrdinalTable, D>
37799 for &ReverseOrdinalTable
37800 {
37801 unsafe fn encode(
37802 self,
37803 encoder: &mut fidl::encoding::Encoder<'_, D>,
37804 offset: usize,
37805 mut depth: fidl::encoding::Depth,
37806 ) -> fidl::Result<()> {
37807 encoder.debug_check_bounds::<ReverseOrdinalTable>(offset);
37808 let max_ordinal: u64 = self.max_ordinal_present();
37810 encoder.write_num(max_ordinal, offset);
37811 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
37812 if max_ordinal == 0 {
37814 return Ok(());
37815 }
37816 depth.increment()?;
37817 let envelope_size = 8;
37818 let bytes_len = max_ordinal as usize * envelope_size;
37819 #[allow(unused_variables)]
37820 let offset = encoder.out_of_line_offset(bytes_len);
37821 let mut _prev_end_offset: usize = 0;
37822 if 1 > max_ordinal {
37823 return Ok(());
37824 }
37825
37826 let cur_offset: usize = (1 - 1) * envelope_size;
37829
37830 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37832
37833 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37838 self.z.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37839 encoder,
37840 offset + cur_offset,
37841 depth,
37842 )?;
37843
37844 _prev_end_offset = cur_offset + envelope_size;
37845 if 2 > max_ordinal {
37846 return Ok(());
37847 }
37848
37849 let cur_offset: usize = (2 - 1) * envelope_size;
37852
37853 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37855
37856 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37861 self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37862 encoder,
37863 offset + cur_offset,
37864 depth,
37865 )?;
37866
37867 _prev_end_offset = cur_offset + envelope_size;
37868 if 4 > max_ordinal {
37869 return Ok(());
37870 }
37871
37872 let cur_offset: usize = (4 - 1) * envelope_size;
37875
37876 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
37878
37879 fidl::encoding::encode_in_envelope_optional::<i64, D>(
37884 self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
37885 encoder,
37886 offset + cur_offset,
37887 depth,
37888 )?;
37889
37890 _prev_end_offset = cur_offset + envelope_size;
37891
37892 Ok(())
37893 }
37894 }
37895
37896 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReverseOrdinalTable {
37897 #[inline(always)]
37898 fn new_empty() -> Self {
37899 Self::default()
37900 }
37901
37902 unsafe fn decode(
37903 &mut self,
37904 decoder: &mut fidl::encoding::Decoder<'_, D>,
37905 offset: usize,
37906 mut depth: fidl::encoding::Depth,
37907 ) -> fidl::Result<()> {
37908 decoder.debug_check_bounds::<Self>(offset);
37909 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
37910 None => return Err(fidl::Error::NotNullable),
37911 Some(len) => len,
37912 };
37913 if len == 0 {
37915 return Ok(());
37916 };
37917 depth.increment()?;
37918 let envelope_size = 8;
37919 let bytes_len = len * envelope_size;
37920 let offset = decoder.out_of_line_offset(bytes_len)?;
37921 let mut _next_ordinal_to_read = 0;
37923 let mut next_offset = offset;
37924 let end_offset = offset + bytes_len;
37925 _next_ordinal_to_read += 1;
37926 if next_offset >= end_offset {
37927 return Ok(());
37928 }
37929
37930 while _next_ordinal_to_read < 1 {
37932 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37933 _next_ordinal_to_read += 1;
37934 next_offset += envelope_size;
37935 }
37936
37937 let next_out_of_line = decoder.next_out_of_line();
37938 let handles_before = decoder.remaining_handles();
37939 if let Some((inlined, num_bytes, num_handles)) =
37940 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37941 {
37942 let member_inline_size =
37943 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37944 if inlined != (member_inline_size <= 4) {
37945 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37946 }
37947 let inner_offset;
37948 let mut inner_depth = depth.clone();
37949 if inlined {
37950 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37951 inner_offset = next_offset;
37952 } else {
37953 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37954 inner_depth.increment()?;
37955 }
37956 let val_ref = self.z.get_or_insert_with(|| fidl::new_empty!(i64, D));
37957 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
37958 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
37959 {
37960 return Err(fidl::Error::InvalidNumBytesInEnvelope);
37961 }
37962 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
37963 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
37964 }
37965 }
37966
37967 next_offset += envelope_size;
37968 _next_ordinal_to_read += 1;
37969 if next_offset >= end_offset {
37970 return Ok(());
37971 }
37972
37973 while _next_ordinal_to_read < 2 {
37975 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
37976 _next_ordinal_to_read += 1;
37977 next_offset += envelope_size;
37978 }
37979
37980 let next_out_of_line = decoder.next_out_of_line();
37981 let handles_before = decoder.remaining_handles();
37982 if let Some((inlined, num_bytes, num_handles)) =
37983 fidl::encoding::decode_envelope_header(decoder, next_offset)?
37984 {
37985 let member_inline_size =
37986 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
37987 if inlined != (member_inline_size <= 4) {
37988 return Err(fidl::Error::InvalidInlineBitInEnvelope);
37989 }
37990 let inner_offset;
37991 let mut inner_depth = depth.clone();
37992 if inlined {
37993 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
37994 inner_offset = next_offset;
37995 } else {
37996 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
37997 inner_depth.increment()?;
37998 }
37999 let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
38000 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38001 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38002 {
38003 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38004 }
38005 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38006 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38007 }
38008 }
38009
38010 next_offset += envelope_size;
38011 _next_ordinal_to_read += 1;
38012 if next_offset >= end_offset {
38013 return Ok(());
38014 }
38015
38016 while _next_ordinal_to_read < 4 {
38018 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38019 _next_ordinal_to_read += 1;
38020 next_offset += envelope_size;
38021 }
38022
38023 let next_out_of_line = decoder.next_out_of_line();
38024 let handles_before = decoder.remaining_handles();
38025 if let Some((inlined, num_bytes, num_handles)) =
38026 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38027 {
38028 let member_inline_size =
38029 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38030 if inlined != (member_inline_size <= 4) {
38031 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38032 }
38033 let inner_offset;
38034 let mut inner_depth = depth.clone();
38035 if inlined {
38036 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38037 inner_offset = next_offset;
38038 } else {
38039 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38040 inner_depth.increment()?;
38041 }
38042 let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
38043 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38044 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38045 {
38046 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38047 }
38048 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38049 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38050 }
38051 }
38052
38053 next_offset += envelope_size;
38054
38055 while next_offset < end_offset {
38057 _next_ordinal_to_read += 1;
38058 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38059 next_offset += envelope_size;
38060 }
38061
38062 Ok(())
38063 }
38064 }
38065
38066 impl SimpleTable {
38067 #[inline(always)]
38068 fn max_ordinal_present(&self) -> u64 {
38069 if let Some(_) = self.y {
38070 return 5;
38071 }
38072 if let Some(_) = self.x {
38073 return 1;
38074 }
38075 0
38076 }
38077 }
38078
38079 impl fidl::encoding::ValueTypeMarker for SimpleTable {
38080 type Borrowed<'a> = &'a Self;
38081 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38082 value
38083 }
38084 }
38085
38086 unsafe impl fidl::encoding::TypeMarker for SimpleTable {
38087 type Owned = Self;
38088
38089 #[inline(always)]
38090 fn inline_align(_context: fidl::encoding::Context) -> usize {
38091 8
38092 }
38093
38094 #[inline(always)]
38095 fn inline_size(_context: fidl::encoding::Context) -> usize {
38096 16
38097 }
38098 }
38099
38100 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleTable, D>
38101 for &SimpleTable
38102 {
38103 unsafe fn encode(
38104 self,
38105 encoder: &mut fidl::encoding::Encoder<'_, D>,
38106 offset: usize,
38107 mut depth: fidl::encoding::Depth,
38108 ) -> fidl::Result<()> {
38109 encoder.debug_check_bounds::<SimpleTable>(offset);
38110 let max_ordinal: u64 = self.max_ordinal_present();
38112 encoder.write_num(max_ordinal, offset);
38113 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38114 if max_ordinal == 0 {
38116 return Ok(());
38117 }
38118 depth.increment()?;
38119 let envelope_size = 8;
38120 let bytes_len = max_ordinal as usize * envelope_size;
38121 #[allow(unused_variables)]
38122 let offset = encoder.out_of_line_offset(bytes_len);
38123 let mut _prev_end_offset: usize = 0;
38124 if 1 > max_ordinal {
38125 return Ok(());
38126 }
38127
38128 let cur_offset: usize = (1 - 1) * envelope_size;
38131
38132 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38134
38135 fidl::encoding::encode_in_envelope_optional::<i64, D>(
38140 self.x.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38141 encoder,
38142 offset + cur_offset,
38143 depth,
38144 )?;
38145
38146 _prev_end_offset = cur_offset + envelope_size;
38147 if 5 > max_ordinal {
38148 return Ok(());
38149 }
38150
38151 let cur_offset: usize = (5 - 1) * envelope_size;
38154
38155 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38157
38158 fidl::encoding::encode_in_envelope_optional::<i64, D>(
38163 self.y.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38164 encoder,
38165 offset + cur_offset,
38166 depth,
38167 )?;
38168
38169 _prev_end_offset = cur_offset + envelope_size;
38170
38171 Ok(())
38172 }
38173 }
38174
38175 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleTable {
38176 #[inline(always)]
38177 fn new_empty() -> Self {
38178 Self::default()
38179 }
38180
38181 unsafe fn decode(
38182 &mut self,
38183 decoder: &mut fidl::encoding::Decoder<'_, D>,
38184 offset: usize,
38185 mut depth: fidl::encoding::Depth,
38186 ) -> fidl::Result<()> {
38187 decoder.debug_check_bounds::<Self>(offset);
38188 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38189 None => return Err(fidl::Error::NotNullable),
38190 Some(len) => len,
38191 };
38192 if len == 0 {
38194 return Ok(());
38195 };
38196 depth.increment()?;
38197 let envelope_size = 8;
38198 let bytes_len = len * envelope_size;
38199 let offset = decoder.out_of_line_offset(bytes_len)?;
38200 let mut _next_ordinal_to_read = 0;
38202 let mut next_offset = offset;
38203 let end_offset = offset + bytes_len;
38204 _next_ordinal_to_read += 1;
38205 if next_offset >= end_offset {
38206 return Ok(());
38207 }
38208
38209 while _next_ordinal_to_read < 1 {
38211 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38212 _next_ordinal_to_read += 1;
38213 next_offset += envelope_size;
38214 }
38215
38216 let next_out_of_line = decoder.next_out_of_line();
38217 let handles_before = decoder.remaining_handles();
38218 if let Some((inlined, num_bytes, num_handles)) =
38219 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38220 {
38221 let member_inline_size =
38222 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38223 if inlined != (member_inline_size <= 4) {
38224 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38225 }
38226 let inner_offset;
38227 let mut inner_depth = depth.clone();
38228 if inlined {
38229 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38230 inner_offset = next_offset;
38231 } else {
38232 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38233 inner_depth.increment()?;
38234 }
38235 let val_ref = self.x.get_or_insert_with(|| fidl::new_empty!(i64, D));
38236 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38237 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38238 {
38239 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38240 }
38241 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38242 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38243 }
38244 }
38245
38246 next_offset += envelope_size;
38247 _next_ordinal_to_read += 1;
38248 if next_offset >= end_offset {
38249 return Ok(());
38250 }
38251
38252 while _next_ordinal_to_read < 5 {
38254 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38255 _next_ordinal_to_read += 1;
38256 next_offset += envelope_size;
38257 }
38258
38259 let next_out_of_line = decoder.next_out_of_line();
38260 let handles_before = decoder.remaining_handles();
38261 if let Some((inlined, num_bytes, num_handles)) =
38262 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38263 {
38264 let member_inline_size =
38265 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38266 if inlined != (member_inline_size <= 4) {
38267 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38268 }
38269 let inner_offset;
38270 let mut inner_depth = depth.clone();
38271 if inlined {
38272 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38273 inner_offset = next_offset;
38274 } else {
38275 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38276 inner_depth.increment()?;
38277 }
38278 let val_ref = self.y.get_or_insert_with(|| fidl::new_empty!(i64, D));
38279 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38280 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38281 {
38282 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38283 }
38284 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38285 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38286 }
38287 }
38288
38289 next_offset += envelope_size;
38290
38291 while next_offset < end_offset {
38293 _next_ordinal_to_read += 1;
38294 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38295 next_offset += envelope_size;
38296 }
38297
38298 Ok(())
38299 }
38300 }
38301
38302 impl TableFieldInlined {
38303 #[inline(always)]
38304 fn max_ordinal_present(&self) -> u64 {
38305 if let Some(_) = self.f {
38306 return 1;
38307 }
38308 0
38309 }
38310 }
38311
38312 impl fidl::encoding::ValueTypeMarker for TableFieldInlined {
38313 type Borrowed<'a> = &'a Self;
38314 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38315 value
38316 }
38317 }
38318
38319 unsafe impl fidl::encoding::TypeMarker for TableFieldInlined {
38320 type Owned = Self;
38321
38322 #[inline(always)]
38323 fn inline_align(_context: fidl::encoding::Context) -> usize {
38324 8
38325 }
38326
38327 #[inline(always)]
38328 fn inline_size(_context: fidl::encoding::Context) -> usize {
38329 16
38330 }
38331 }
38332
38333 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldInlined, D>
38334 for &TableFieldInlined
38335 {
38336 unsafe fn encode(
38337 self,
38338 encoder: &mut fidl::encoding::Encoder<'_, D>,
38339 offset: usize,
38340 mut depth: fidl::encoding::Depth,
38341 ) -> fidl::Result<()> {
38342 encoder.debug_check_bounds::<TableFieldInlined>(offset);
38343 let max_ordinal: u64 = self.max_ordinal_present();
38345 encoder.write_num(max_ordinal, offset);
38346 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38347 if max_ordinal == 0 {
38349 return Ok(());
38350 }
38351 depth.increment()?;
38352 let envelope_size = 8;
38353 let bytes_len = max_ordinal as usize * envelope_size;
38354 #[allow(unused_variables)]
38355 let offset = encoder.out_of_line_offset(bytes_len);
38356 let mut _prev_end_offset: usize = 0;
38357 if 1 > max_ordinal {
38358 return Ok(());
38359 }
38360
38361 let cur_offset: usize = (1 - 1) * envelope_size;
38364
38365 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38367
38368 fidl::encoding::encode_in_envelope_optional::<i32, D>(
38373 self.f.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
38374 encoder,
38375 offset + cur_offset,
38376 depth,
38377 )?;
38378
38379 _prev_end_offset = cur_offset + envelope_size;
38380
38381 Ok(())
38382 }
38383 }
38384
38385 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldInlined {
38386 #[inline(always)]
38387 fn new_empty() -> Self {
38388 Self::default()
38389 }
38390
38391 unsafe fn decode(
38392 &mut self,
38393 decoder: &mut fidl::encoding::Decoder<'_, D>,
38394 offset: usize,
38395 mut depth: fidl::encoding::Depth,
38396 ) -> fidl::Result<()> {
38397 decoder.debug_check_bounds::<Self>(offset);
38398 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38399 None => return Err(fidl::Error::NotNullable),
38400 Some(len) => len,
38401 };
38402 if len == 0 {
38404 return Ok(());
38405 };
38406 depth.increment()?;
38407 let envelope_size = 8;
38408 let bytes_len = len * envelope_size;
38409 let offset = decoder.out_of_line_offset(bytes_len)?;
38410 let mut _next_ordinal_to_read = 0;
38412 let mut next_offset = offset;
38413 let end_offset = offset + bytes_len;
38414 _next_ordinal_to_read += 1;
38415 if next_offset >= end_offset {
38416 return Ok(());
38417 }
38418
38419 while _next_ordinal_to_read < 1 {
38421 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38422 _next_ordinal_to_read += 1;
38423 next_offset += envelope_size;
38424 }
38425
38426 let next_out_of_line = decoder.next_out_of_line();
38427 let handles_before = decoder.remaining_handles();
38428 if let Some((inlined, num_bytes, num_handles)) =
38429 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38430 {
38431 let member_inline_size =
38432 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38433 if inlined != (member_inline_size <= 4) {
38434 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38435 }
38436 let inner_offset;
38437 let mut inner_depth = depth.clone();
38438 if inlined {
38439 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38440 inner_offset = next_offset;
38441 } else {
38442 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38443 inner_depth.increment()?;
38444 }
38445 let val_ref = self.f.get_or_insert_with(|| fidl::new_empty!(i32, D));
38446 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
38447 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38448 {
38449 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38450 }
38451 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38452 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38453 }
38454 }
38455
38456 next_offset += envelope_size;
38457
38458 while next_offset < end_offset {
38460 _next_ordinal_to_read += 1;
38461 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38462 next_offset += envelope_size;
38463 }
38464
38465 Ok(())
38466 }
38467 }
38468
38469 impl TableFieldOutOfLine {
38470 #[inline(always)]
38471 fn max_ordinal_present(&self) -> u64 {
38472 if let Some(_) = self.f {
38473 return 1;
38474 }
38475 0
38476 }
38477 }
38478
38479 impl fidl::encoding::ValueTypeMarker for TableFieldOutOfLine {
38480 type Borrowed<'a> = &'a Self;
38481 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38482 value
38483 }
38484 }
38485
38486 unsafe impl fidl::encoding::TypeMarker for TableFieldOutOfLine {
38487 type Owned = Self;
38488
38489 #[inline(always)]
38490 fn inline_align(_context: fidl::encoding::Context) -> usize {
38491 8
38492 }
38493
38494 #[inline(always)]
38495 fn inline_size(_context: fidl::encoding::Context) -> usize {
38496 16
38497 }
38498 }
38499
38500 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldOutOfLine, D>
38501 for &TableFieldOutOfLine
38502 {
38503 unsafe fn encode(
38504 self,
38505 encoder: &mut fidl::encoding::Encoder<'_, D>,
38506 offset: usize,
38507 mut depth: fidl::encoding::Depth,
38508 ) -> fidl::Result<()> {
38509 encoder.debug_check_bounds::<TableFieldOutOfLine>(offset);
38510 let max_ordinal: u64 = self.max_ordinal_present();
38512 encoder.write_num(max_ordinal, offset);
38513 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38514 if max_ordinal == 0 {
38516 return Ok(());
38517 }
38518 depth.increment()?;
38519 let envelope_size = 8;
38520 let bytes_len = max_ordinal as usize * envelope_size;
38521 #[allow(unused_variables)]
38522 let offset = encoder.out_of_line_offset(bytes_len);
38523 let mut _prev_end_offset: usize = 0;
38524 if 1 > max_ordinal {
38525 return Ok(());
38526 }
38527
38528 let cur_offset: usize = (1 - 1) * envelope_size;
38531
38532 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38534
38535 fidl::encoding::encode_in_envelope_optional::<i64, D>(
38540 self.f.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
38541 encoder,
38542 offset + cur_offset,
38543 depth,
38544 )?;
38545
38546 _prev_end_offset = cur_offset + envelope_size;
38547
38548 Ok(())
38549 }
38550 }
38551
38552 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldOutOfLine {
38553 #[inline(always)]
38554 fn new_empty() -> Self {
38555 Self::default()
38556 }
38557
38558 unsafe fn decode(
38559 &mut self,
38560 decoder: &mut fidl::encoding::Decoder<'_, D>,
38561 offset: usize,
38562 mut depth: fidl::encoding::Depth,
38563 ) -> fidl::Result<()> {
38564 decoder.debug_check_bounds::<Self>(offset);
38565 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38566 None => return Err(fidl::Error::NotNullable),
38567 Some(len) => len,
38568 };
38569 if len == 0 {
38571 return Ok(());
38572 };
38573 depth.increment()?;
38574 let envelope_size = 8;
38575 let bytes_len = len * envelope_size;
38576 let offset = decoder.out_of_line_offset(bytes_len)?;
38577 let mut _next_ordinal_to_read = 0;
38579 let mut next_offset = offset;
38580 let end_offset = offset + bytes_len;
38581 _next_ordinal_to_read += 1;
38582 if next_offset >= end_offset {
38583 return Ok(());
38584 }
38585
38586 while _next_ordinal_to_read < 1 {
38588 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38589 _next_ordinal_to_read += 1;
38590 next_offset += envelope_size;
38591 }
38592
38593 let next_out_of_line = decoder.next_out_of_line();
38594 let handles_before = decoder.remaining_handles();
38595 if let Some((inlined, num_bytes, num_handles)) =
38596 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38597 {
38598 let member_inline_size =
38599 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38600 if inlined != (member_inline_size <= 4) {
38601 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38602 }
38603 let inner_offset;
38604 let mut inner_depth = depth.clone();
38605 if inlined {
38606 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38607 inner_offset = next_offset;
38608 } else {
38609 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38610 inner_depth.increment()?;
38611 }
38612 let val_ref = self.f.get_or_insert_with(|| fidl::new_empty!(i64, D));
38613 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
38614 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38615 {
38616 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38617 }
38618 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38619 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38620 }
38621 }
38622
38623 next_offset += envelope_size;
38624
38625 while next_offset < end_offset {
38627 _next_ordinal_to_read += 1;
38628 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38629 next_offset += envelope_size;
38630 }
38631
38632 Ok(())
38633 }
38634 }
38635
38636 impl TableFieldUnknown {
38637 #[inline(always)]
38638 fn max_ordinal_present(&self) -> u64 {
38639 0
38640 }
38641 }
38642
38643 impl fidl::encoding::ValueTypeMarker for TableFieldUnknown {
38644 type Borrowed<'a> = &'a Self;
38645 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38646 value
38647 }
38648 }
38649
38650 unsafe impl fidl::encoding::TypeMarker for TableFieldUnknown {
38651 type Owned = Self;
38652
38653 #[inline(always)]
38654 fn inline_align(_context: fidl::encoding::Context) -> usize {
38655 8
38656 }
38657
38658 #[inline(always)]
38659 fn inline_size(_context: fidl::encoding::Context) -> usize {
38660 16
38661 }
38662 }
38663
38664 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableFieldUnknown, D>
38665 for &TableFieldUnknown
38666 {
38667 unsafe fn encode(
38668 self,
38669 encoder: &mut fidl::encoding::Encoder<'_, D>,
38670 offset: usize,
38671 mut depth: fidl::encoding::Depth,
38672 ) -> fidl::Result<()> {
38673 encoder.debug_check_bounds::<TableFieldUnknown>(offset);
38674 let max_ordinal: u64 = self.max_ordinal_present();
38676 encoder.write_num(max_ordinal, offset);
38677 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38678 if max_ordinal == 0 {
38680 return Ok(());
38681 }
38682 depth.increment()?;
38683 let envelope_size = 8;
38684 let bytes_len = max_ordinal as usize * envelope_size;
38685 #[allow(unused_variables)]
38686 let offset = encoder.out_of_line_offset(bytes_len);
38687 let mut _prev_end_offset: usize = 0;
38688
38689 Ok(())
38690 }
38691 }
38692
38693 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableFieldUnknown {
38694 #[inline(always)]
38695 fn new_empty() -> Self {
38696 Self::default()
38697 }
38698
38699 unsafe fn decode(
38700 &mut self,
38701 decoder: &mut fidl::encoding::Decoder<'_, D>,
38702 offset: usize,
38703 mut depth: fidl::encoding::Depth,
38704 ) -> fidl::Result<()> {
38705 decoder.debug_check_bounds::<Self>(offset);
38706 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38707 None => return Err(fidl::Error::NotNullable),
38708 Some(len) => len,
38709 };
38710 if len == 0 {
38712 return Ok(());
38713 };
38714 depth.increment()?;
38715 let envelope_size = 8;
38716 let bytes_len = len * envelope_size;
38717 let offset = decoder.out_of_line_offset(bytes_len)?;
38718 let mut _next_ordinal_to_read = 0;
38720 let mut next_offset = offset;
38721 let end_offset = offset + bytes_len;
38722
38723 while next_offset < end_offset {
38725 _next_ordinal_to_read += 1;
38726 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38727 next_offset += envelope_size;
38728 }
38729
38730 Ok(())
38731 }
38732 }
38733
38734 impl TableFieldUnsetFlexibleEnumInlined {
38735 #[inline(always)]
38736 fn max_ordinal_present(&self) -> u64 {
38737 if let Some(_) = self.always_set {
38738 return 3;
38739 }
38740 if let Some(_) = self.unsigned_enum {
38741 return 2;
38742 }
38743 if let Some(_) = self.signed_enum {
38744 return 1;
38745 }
38746 0
38747 }
38748 }
38749
38750 impl fidl::encoding::ValueTypeMarker for TableFieldUnsetFlexibleEnumInlined {
38751 type Borrowed<'a> = &'a Self;
38752 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
38753 value
38754 }
38755 }
38756
38757 unsafe impl fidl::encoding::TypeMarker for TableFieldUnsetFlexibleEnumInlined {
38758 type Owned = Self;
38759
38760 #[inline(always)]
38761 fn inline_align(_context: fidl::encoding::Context) -> usize {
38762 8
38763 }
38764
38765 #[inline(always)]
38766 fn inline_size(_context: fidl::encoding::Context) -> usize {
38767 16
38768 }
38769 }
38770
38771 unsafe impl<D: fidl::encoding::ResourceDialect>
38772 fidl::encoding::Encode<TableFieldUnsetFlexibleEnumInlined, D>
38773 for &TableFieldUnsetFlexibleEnumInlined
38774 {
38775 unsafe fn encode(
38776 self,
38777 encoder: &mut fidl::encoding::Encoder<'_, D>,
38778 offset: usize,
38779 mut depth: fidl::encoding::Depth,
38780 ) -> fidl::Result<()> {
38781 encoder.debug_check_bounds::<TableFieldUnsetFlexibleEnumInlined>(offset);
38782 let max_ordinal: u64 = self.max_ordinal_present();
38784 encoder.write_num(max_ordinal, offset);
38785 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
38786 if max_ordinal == 0 {
38788 return Ok(());
38789 }
38790 depth.increment()?;
38791 let envelope_size = 8;
38792 let bytes_len = max_ordinal as usize * envelope_size;
38793 #[allow(unused_variables)]
38794 let offset = encoder.out_of_line_offset(bytes_len);
38795 let mut _prev_end_offset: usize = 0;
38796 if 1 > max_ordinal {
38797 return Ok(());
38798 }
38799
38800 let cur_offset: usize = (1 - 1) * envelope_size;
38803
38804 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38806
38807 fidl::encoding::encode_in_envelope_optional::<SignedEnum, D>(
38812 self.signed_enum
38813 .as_ref()
38814 .map(<SignedEnum as fidl::encoding::ValueTypeMarker>::borrow),
38815 encoder,
38816 offset + cur_offset,
38817 depth,
38818 )?;
38819
38820 _prev_end_offset = cur_offset + envelope_size;
38821 if 2 > max_ordinal {
38822 return Ok(());
38823 }
38824
38825 let cur_offset: usize = (2 - 1) * envelope_size;
38828
38829 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38831
38832 fidl::encoding::encode_in_envelope_optional::<UnsignedEnum, D>(
38837 self.unsigned_enum
38838 .as_ref()
38839 .map(<UnsignedEnum as fidl::encoding::ValueTypeMarker>::borrow),
38840 encoder,
38841 offset + cur_offset,
38842 depth,
38843 )?;
38844
38845 _prev_end_offset = cur_offset + envelope_size;
38846 if 3 > max_ordinal {
38847 return Ok(());
38848 }
38849
38850 let cur_offset: usize = (3 - 1) * envelope_size;
38853
38854 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
38856
38857 fidl::encoding::encode_in_envelope_optional::<bool, D>(
38862 self.always_set.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
38863 encoder,
38864 offset + cur_offset,
38865 depth,
38866 )?;
38867
38868 _prev_end_offset = cur_offset + envelope_size;
38869
38870 Ok(())
38871 }
38872 }
38873
38874 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
38875 for TableFieldUnsetFlexibleEnumInlined
38876 {
38877 #[inline(always)]
38878 fn new_empty() -> Self {
38879 Self::default()
38880 }
38881
38882 unsafe fn decode(
38883 &mut self,
38884 decoder: &mut fidl::encoding::Decoder<'_, D>,
38885 offset: usize,
38886 mut depth: fidl::encoding::Depth,
38887 ) -> fidl::Result<()> {
38888 decoder.debug_check_bounds::<Self>(offset);
38889 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
38890 None => return Err(fidl::Error::NotNullable),
38891 Some(len) => len,
38892 };
38893 if len == 0 {
38895 return Ok(());
38896 };
38897 depth.increment()?;
38898 let envelope_size = 8;
38899 let bytes_len = len * envelope_size;
38900 let offset = decoder.out_of_line_offset(bytes_len)?;
38901 let mut _next_ordinal_to_read = 0;
38903 let mut next_offset = offset;
38904 let end_offset = offset + bytes_len;
38905 _next_ordinal_to_read += 1;
38906 if next_offset >= end_offset {
38907 return Ok(());
38908 }
38909
38910 while _next_ordinal_to_read < 1 {
38912 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38913 _next_ordinal_to_read += 1;
38914 next_offset += envelope_size;
38915 }
38916
38917 let next_out_of_line = decoder.next_out_of_line();
38918 let handles_before = decoder.remaining_handles();
38919 if let Some((inlined, num_bytes, num_handles)) =
38920 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38921 {
38922 let member_inline_size =
38923 <SignedEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38924 if inlined != (member_inline_size <= 4) {
38925 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38926 }
38927 let inner_offset;
38928 let mut inner_depth = depth.clone();
38929 if inlined {
38930 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38931 inner_offset = next_offset;
38932 } else {
38933 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38934 inner_depth.increment()?;
38935 }
38936 let val_ref =
38937 self.signed_enum.get_or_insert_with(|| fidl::new_empty!(SignedEnum, D));
38938 fidl::decode!(SignedEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
38939 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38940 {
38941 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38942 }
38943 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38944 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38945 }
38946 }
38947
38948 next_offset += envelope_size;
38949 _next_ordinal_to_read += 1;
38950 if next_offset >= end_offset {
38951 return Ok(());
38952 }
38953
38954 while _next_ordinal_to_read < 2 {
38956 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
38957 _next_ordinal_to_read += 1;
38958 next_offset += envelope_size;
38959 }
38960
38961 let next_out_of_line = decoder.next_out_of_line();
38962 let handles_before = decoder.remaining_handles();
38963 if let Some((inlined, num_bytes, num_handles)) =
38964 fidl::encoding::decode_envelope_header(decoder, next_offset)?
38965 {
38966 let member_inline_size =
38967 <UnsignedEnum as fidl::encoding::TypeMarker>::inline_size(decoder.context);
38968 if inlined != (member_inline_size <= 4) {
38969 return Err(fidl::Error::InvalidInlineBitInEnvelope);
38970 }
38971 let inner_offset;
38972 let mut inner_depth = depth.clone();
38973 if inlined {
38974 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
38975 inner_offset = next_offset;
38976 } else {
38977 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
38978 inner_depth.increment()?;
38979 }
38980 let val_ref =
38981 self.unsigned_enum.get_or_insert_with(|| fidl::new_empty!(UnsignedEnum, D));
38982 fidl::decode!(UnsignedEnum, D, val_ref, decoder, inner_offset, inner_depth)?;
38983 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
38984 {
38985 return Err(fidl::Error::InvalidNumBytesInEnvelope);
38986 }
38987 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
38988 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
38989 }
38990 }
38991
38992 next_offset += envelope_size;
38993 _next_ordinal_to_read += 1;
38994 if next_offset >= end_offset {
38995 return Ok(());
38996 }
38997
38998 while _next_ordinal_to_read < 3 {
39000 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39001 _next_ordinal_to_read += 1;
39002 next_offset += envelope_size;
39003 }
39004
39005 let next_out_of_line = decoder.next_out_of_line();
39006 let handles_before = decoder.remaining_handles();
39007 if let Some((inlined, num_bytes, num_handles)) =
39008 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39009 {
39010 let member_inline_size =
39011 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39012 if inlined != (member_inline_size <= 4) {
39013 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39014 }
39015 let inner_offset;
39016 let mut inner_depth = depth.clone();
39017 if inlined {
39018 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39019 inner_offset = next_offset;
39020 } else {
39021 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39022 inner_depth.increment()?;
39023 }
39024 let val_ref = self.always_set.get_or_insert_with(|| fidl::new_empty!(bool, D));
39025 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
39026 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39027 {
39028 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39029 }
39030 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39031 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39032 }
39033 }
39034
39035 next_offset += envelope_size;
39036
39037 while next_offset < end_offset {
39039 _next_ordinal_to_read += 1;
39040 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39041 next_offset += envelope_size;
39042 }
39043
39044 Ok(())
39045 }
39046 }
39047
39048 impl TableNoFields {
39049 #[inline(always)]
39050 fn max_ordinal_present(&self) -> u64 {
39051 0
39052 }
39053 }
39054
39055 impl fidl::encoding::ValueTypeMarker for TableNoFields {
39056 type Borrowed<'a> = &'a Self;
39057 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39058 value
39059 }
39060 }
39061
39062 unsafe impl fidl::encoding::TypeMarker for TableNoFields {
39063 type Owned = Self;
39064
39065 #[inline(always)]
39066 fn inline_align(_context: fidl::encoding::Context) -> usize {
39067 8
39068 }
39069
39070 #[inline(always)]
39071 fn inline_size(_context: fidl::encoding::Context) -> usize {
39072 16
39073 }
39074 }
39075
39076 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableNoFields, D>
39077 for &TableNoFields
39078 {
39079 unsafe fn encode(
39080 self,
39081 encoder: &mut fidl::encoding::Encoder<'_, D>,
39082 offset: usize,
39083 mut depth: fidl::encoding::Depth,
39084 ) -> fidl::Result<()> {
39085 encoder.debug_check_bounds::<TableNoFields>(offset);
39086 let max_ordinal: u64 = self.max_ordinal_present();
39088 encoder.write_num(max_ordinal, offset);
39089 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39090 if max_ordinal == 0 {
39092 return Ok(());
39093 }
39094 depth.increment()?;
39095 let envelope_size = 8;
39096 let bytes_len = max_ordinal as usize * envelope_size;
39097 #[allow(unused_variables)]
39098 let offset = encoder.out_of_line_offset(bytes_len);
39099 let mut _prev_end_offset: usize = 0;
39100
39101 Ok(())
39102 }
39103 }
39104
39105 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableNoFields {
39106 #[inline(always)]
39107 fn new_empty() -> Self {
39108 Self::default()
39109 }
39110
39111 unsafe fn decode(
39112 &mut self,
39113 decoder: &mut fidl::encoding::Decoder<'_, D>,
39114 offset: usize,
39115 mut depth: fidl::encoding::Depth,
39116 ) -> fidl::Result<()> {
39117 decoder.debug_check_bounds::<Self>(offset);
39118 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39119 None => return Err(fidl::Error::NotNullable),
39120 Some(len) => len,
39121 };
39122 if len == 0 {
39124 return Ok(());
39125 };
39126 depth.increment()?;
39127 let envelope_size = 8;
39128 let bytes_len = len * envelope_size;
39129 let offset = decoder.out_of_line_offset(bytes_len)?;
39130 let mut _next_ordinal_to_read = 0;
39132 let mut next_offset = offset;
39133 let end_offset = offset + bytes_len;
39134
39135 while next_offset < end_offset {
39137 _next_ordinal_to_read += 1;
39138 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39139 next_offset += envelope_size;
39140 }
39141
39142 Ok(())
39143 }
39144 }
39145
39146 impl TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
39147 #[inline(always)]
39148 fn max_ordinal_present(&self) -> u64 {
39149 if let Some(_) = self.member {
39150 return 3;
39151 }
39152 0
39153 }
39154 }
39155
39156 impl fidl::encoding::ValueTypeMarker for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
39157 type Borrowed<'a> = &'a Self;
39158 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39159 value
39160 }
39161 }
39162
39163 unsafe impl fidl::encoding::TypeMarker for TableOfUnionThenXUnionThenTableThenXUnionThenUnion {
39164 type Owned = Self;
39165
39166 #[inline(always)]
39167 fn inline_align(_context: fidl::encoding::Context) -> usize {
39168 8
39169 }
39170
39171 #[inline(always)]
39172 fn inline_size(_context: fidl::encoding::Context) -> usize {
39173 16
39174 }
39175 }
39176
39177 unsafe impl<D: fidl::encoding::ResourceDialect>
39178 fidl::encoding::Encode<TableOfUnionThenXUnionThenTableThenXUnionThenUnion, D>
39179 for &TableOfUnionThenXUnionThenTableThenXUnionThenUnion
39180 {
39181 unsafe fn encode(
39182 self,
39183 encoder: &mut fidl::encoding::Encoder<'_, D>,
39184 offset: usize,
39185 mut depth: fidl::encoding::Depth,
39186 ) -> fidl::Result<()> {
39187 encoder
39188 .debug_check_bounds::<TableOfUnionThenXUnionThenTableThenXUnionThenUnion>(offset);
39189 let max_ordinal: u64 = self.max_ordinal_present();
39191 encoder.write_num(max_ordinal, offset);
39192 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39193 if max_ordinal == 0 {
39195 return Ok(());
39196 }
39197 depth.increment()?;
39198 let envelope_size = 8;
39199 let bytes_len = max_ordinal as usize * envelope_size;
39200 #[allow(unused_variables)]
39201 let offset = encoder.out_of_line_offset(bytes_len);
39202 let mut _prev_end_offset: usize = 0;
39203 if 3 > max_ordinal {
39204 return Ok(());
39205 }
39206
39207 let cur_offset: usize = (3 - 1) * envelope_size;
39210
39211 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39213
39214 fidl::encoding::encode_in_envelope_optional::<UnionOfXUnionThenTableThenXUnionThenUnion, D>(
39219 self.member.as_ref().map(<UnionOfXUnionThenTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow),
39220 encoder, offset + cur_offset, depth
39221 )?;
39222
39223 _prev_end_offset = cur_offset + envelope_size;
39224
39225 Ok(())
39226 }
39227 }
39228
39229 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39230 for TableOfUnionThenXUnionThenTableThenXUnionThenUnion
39231 {
39232 #[inline(always)]
39233 fn new_empty() -> Self {
39234 Self::default()
39235 }
39236
39237 unsafe fn decode(
39238 &mut self,
39239 decoder: &mut fidl::encoding::Decoder<'_, D>,
39240 offset: usize,
39241 mut depth: fidl::encoding::Depth,
39242 ) -> fidl::Result<()> {
39243 decoder.debug_check_bounds::<Self>(offset);
39244 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39245 None => return Err(fidl::Error::NotNullable),
39246 Some(len) => len,
39247 };
39248 if len == 0 {
39250 return Ok(());
39251 };
39252 depth.increment()?;
39253 let envelope_size = 8;
39254 let bytes_len = len * envelope_size;
39255 let offset = decoder.out_of_line_offset(bytes_len)?;
39256 let mut _next_ordinal_to_read = 0;
39258 let mut next_offset = offset;
39259 let end_offset = offset + bytes_len;
39260 _next_ordinal_to_read += 1;
39261 if next_offset >= end_offset {
39262 return Ok(());
39263 }
39264
39265 while _next_ordinal_to_read < 3 {
39267 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39268 _next_ordinal_to_read += 1;
39269 next_offset += envelope_size;
39270 }
39271
39272 let next_out_of_line = decoder.next_out_of_line();
39273 let handles_before = decoder.remaining_handles();
39274 if let Some((inlined, num_bytes, num_handles)) =
39275 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39276 {
39277 let member_inline_size = <UnionOfXUnionThenTableThenXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39278 if inlined != (member_inline_size <= 4) {
39279 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39280 }
39281 let inner_offset;
39282 let mut inner_depth = depth.clone();
39283 if inlined {
39284 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39285 inner_offset = next_offset;
39286 } else {
39287 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39288 inner_depth.increment()?;
39289 }
39290 let val_ref = self.member.get_or_insert_with(|| {
39291 fidl::new_empty!(UnionOfXUnionThenTableThenXUnionThenUnion, D)
39292 });
39293 fidl::decode!(
39294 UnionOfXUnionThenTableThenXUnionThenUnion,
39295 D,
39296 val_ref,
39297 decoder,
39298 inner_offset,
39299 inner_depth
39300 )?;
39301 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39302 {
39303 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39304 }
39305 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39306 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39307 }
39308 }
39309
39310 next_offset += envelope_size;
39311
39312 while next_offset < end_offset {
39314 _next_ordinal_to_read += 1;
39315 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39316 next_offset += envelope_size;
39317 }
39318
39319 Ok(())
39320 }
39321 }
39322
39323 impl TableOfXUnionThenUnion {
39324 #[inline(always)]
39325 fn max_ordinal_present(&self) -> u64 {
39326 if let Some(_) = self.member {
39327 return 2;
39328 }
39329 0
39330 }
39331 }
39332
39333 impl fidl::encoding::ValueTypeMarker for TableOfXUnionThenUnion {
39334 type Borrowed<'a> = &'a Self;
39335 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39336 value
39337 }
39338 }
39339
39340 unsafe impl fidl::encoding::TypeMarker for TableOfXUnionThenUnion {
39341 type Owned = Self;
39342
39343 #[inline(always)]
39344 fn inline_align(_context: fidl::encoding::Context) -> usize {
39345 8
39346 }
39347
39348 #[inline(always)]
39349 fn inline_size(_context: fidl::encoding::Context) -> usize {
39350 16
39351 }
39352 }
39353
39354 unsafe impl<D: fidl::encoding::ResourceDialect>
39355 fidl::encoding::Encode<TableOfXUnionThenUnion, D> for &TableOfXUnionThenUnion
39356 {
39357 unsafe fn encode(
39358 self,
39359 encoder: &mut fidl::encoding::Encoder<'_, D>,
39360 offset: usize,
39361 mut depth: fidl::encoding::Depth,
39362 ) -> fidl::Result<()> {
39363 encoder.debug_check_bounds::<TableOfXUnionThenUnion>(offset);
39364 let max_ordinal: u64 = self.max_ordinal_present();
39366 encoder.write_num(max_ordinal, offset);
39367 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39368 if max_ordinal == 0 {
39370 return Ok(());
39371 }
39372 depth.increment()?;
39373 let envelope_size = 8;
39374 let bytes_len = max_ordinal as usize * envelope_size;
39375 #[allow(unused_variables)]
39376 let offset = encoder.out_of_line_offset(bytes_len);
39377 let mut _prev_end_offset: usize = 0;
39378 if 2 > max_ordinal {
39379 return Ok(());
39380 }
39381
39382 let cur_offset: usize = (2 - 1) * envelope_size;
39385
39386 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39388
39389 fidl::encoding::encode_in_envelope_optional::<XUnionOfUnion, D>(
39394 self.member
39395 .as_ref()
39396 .map(<XUnionOfUnion as fidl::encoding::ValueTypeMarker>::borrow),
39397 encoder,
39398 offset + cur_offset,
39399 depth,
39400 )?;
39401
39402 _prev_end_offset = cur_offset + envelope_size;
39403
39404 Ok(())
39405 }
39406 }
39407
39408 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39409 for TableOfXUnionThenUnion
39410 {
39411 #[inline(always)]
39412 fn new_empty() -> Self {
39413 Self::default()
39414 }
39415
39416 unsafe fn decode(
39417 &mut self,
39418 decoder: &mut fidl::encoding::Decoder<'_, D>,
39419 offset: usize,
39420 mut depth: fidl::encoding::Depth,
39421 ) -> fidl::Result<()> {
39422 decoder.debug_check_bounds::<Self>(offset);
39423 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39424 None => return Err(fidl::Error::NotNullable),
39425 Some(len) => len,
39426 };
39427 if len == 0 {
39429 return Ok(());
39430 };
39431 depth.increment()?;
39432 let envelope_size = 8;
39433 let bytes_len = len * envelope_size;
39434 let offset = decoder.out_of_line_offset(bytes_len)?;
39435 let mut _next_ordinal_to_read = 0;
39437 let mut next_offset = offset;
39438 let end_offset = offset + bytes_len;
39439 _next_ordinal_to_read += 1;
39440 if next_offset >= end_offset {
39441 return Ok(());
39442 }
39443
39444 while _next_ordinal_to_read < 2 {
39446 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39447 _next_ordinal_to_read += 1;
39448 next_offset += envelope_size;
39449 }
39450
39451 let next_out_of_line = decoder.next_out_of_line();
39452 let handles_before = decoder.remaining_handles();
39453 if let Some((inlined, num_bytes, num_handles)) =
39454 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39455 {
39456 let member_inline_size =
39457 <XUnionOfUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39458 if inlined != (member_inline_size <= 4) {
39459 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39460 }
39461 let inner_offset;
39462 let mut inner_depth = depth.clone();
39463 if inlined {
39464 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39465 inner_offset = next_offset;
39466 } else {
39467 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39468 inner_depth.increment()?;
39469 }
39470 let val_ref = self.member.get_or_insert_with(|| fidl::new_empty!(XUnionOfUnion, D));
39471 fidl::decode!(XUnionOfUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
39472 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39473 {
39474 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39475 }
39476 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39477 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39478 }
39479 }
39480
39481 next_offset += envelope_size;
39482
39483 while next_offset < end_offset {
39485 _next_ordinal_to_read += 1;
39486 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39487 next_offset += envelope_size;
39488 }
39489
39490 Ok(())
39491 }
39492 }
39493
39494 impl TableStructWithReservedSandwich {
39495 #[inline(always)]
39496 fn max_ordinal_present(&self) -> u64 {
39497 if let Some(_) = self.s2 {
39498 return 3;
39499 }
39500 if let Some(_) = self.s1 {
39501 return 2;
39502 }
39503 0
39504 }
39505 }
39506
39507 impl fidl::encoding::ValueTypeMarker for TableStructWithReservedSandwich {
39508 type Borrowed<'a> = &'a Self;
39509 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39510 value
39511 }
39512 }
39513
39514 unsafe impl fidl::encoding::TypeMarker for TableStructWithReservedSandwich {
39515 type Owned = Self;
39516
39517 #[inline(always)]
39518 fn inline_align(_context: fidl::encoding::Context) -> usize {
39519 8
39520 }
39521
39522 #[inline(always)]
39523 fn inline_size(_context: fidl::encoding::Context) -> usize {
39524 16
39525 }
39526 }
39527
39528 unsafe impl<D: fidl::encoding::ResourceDialect>
39529 fidl::encoding::Encode<TableStructWithReservedSandwich, D>
39530 for &TableStructWithReservedSandwich
39531 {
39532 unsafe fn encode(
39533 self,
39534 encoder: &mut fidl::encoding::Encoder<'_, D>,
39535 offset: usize,
39536 mut depth: fidl::encoding::Depth,
39537 ) -> fidl::Result<()> {
39538 encoder.debug_check_bounds::<TableStructWithReservedSandwich>(offset);
39539 let max_ordinal: u64 = self.max_ordinal_present();
39541 encoder.write_num(max_ordinal, offset);
39542 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39543 if max_ordinal == 0 {
39545 return Ok(());
39546 }
39547 depth.increment()?;
39548 let envelope_size = 8;
39549 let bytes_len = max_ordinal as usize * envelope_size;
39550 #[allow(unused_variables)]
39551 let offset = encoder.out_of_line_offset(bytes_len);
39552 let mut _prev_end_offset: usize = 0;
39553 if 2 > max_ordinal {
39554 return Ok(());
39555 }
39556
39557 let cur_offset: usize = (2 - 1) * envelope_size;
39560
39561 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39563
39564 fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
39569 self.s1
39570 .as_ref()
39571 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
39572 encoder,
39573 offset + cur_offset,
39574 depth,
39575 )?;
39576
39577 _prev_end_offset = cur_offset + envelope_size;
39578 if 3 > max_ordinal {
39579 return Ok(());
39580 }
39581
39582 let cur_offset: usize = (3 - 1) * envelope_size;
39585
39586 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39588
39589 fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
39594 self.s2
39595 .as_ref()
39596 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
39597 encoder,
39598 offset + cur_offset,
39599 depth,
39600 )?;
39601
39602 _prev_end_offset = cur_offset + envelope_size;
39603
39604 Ok(())
39605 }
39606 }
39607
39608 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39609 for TableStructWithReservedSandwich
39610 {
39611 #[inline(always)]
39612 fn new_empty() -> Self {
39613 Self::default()
39614 }
39615
39616 unsafe fn decode(
39617 &mut self,
39618 decoder: &mut fidl::encoding::Decoder<'_, D>,
39619 offset: usize,
39620 mut depth: fidl::encoding::Depth,
39621 ) -> fidl::Result<()> {
39622 decoder.debug_check_bounds::<Self>(offset);
39623 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39624 None => return Err(fidl::Error::NotNullable),
39625 Some(len) => len,
39626 };
39627 if len == 0 {
39629 return Ok(());
39630 };
39631 depth.increment()?;
39632 let envelope_size = 8;
39633 let bytes_len = len * envelope_size;
39634 let offset = decoder.out_of_line_offset(bytes_len)?;
39635 let mut _next_ordinal_to_read = 0;
39637 let mut next_offset = offset;
39638 let end_offset = offset + bytes_len;
39639 _next_ordinal_to_read += 1;
39640 if next_offset >= end_offset {
39641 return Ok(());
39642 }
39643
39644 while _next_ordinal_to_read < 2 {
39646 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39647 _next_ordinal_to_read += 1;
39648 next_offset += envelope_size;
39649 }
39650
39651 let next_out_of_line = decoder.next_out_of_line();
39652 let handles_before = decoder.remaining_handles();
39653 if let Some((inlined, num_bytes, num_handles)) =
39654 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39655 {
39656 let member_inline_size =
39657 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39658 if inlined != (member_inline_size <= 4) {
39659 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39660 }
39661 let inner_offset;
39662 let mut inner_depth = depth.clone();
39663 if inlined {
39664 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39665 inner_offset = next_offset;
39666 } else {
39667 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39668 inner_depth.increment()?;
39669 }
39670 let val_ref = self.s1.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
39671 fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
39672 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39673 {
39674 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39675 }
39676 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39677 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39678 }
39679 }
39680
39681 next_offset += envelope_size;
39682 _next_ordinal_to_read += 1;
39683 if next_offset >= end_offset {
39684 return Ok(());
39685 }
39686
39687 while _next_ordinal_to_read < 3 {
39689 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39690 _next_ordinal_to_read += 1;
39691 next_offset += envelope_size;
39692 }
39693
39694 let next_out_of_line = decoder.next_out_of_line();
39695 let handles_before = decoder.remaining_handles();
39696 if let Some((inlined, num_bytes, num_handles)) =
39697 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39698 {
39699 let member_inline_size =
39700 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39701 if inlined != (member_inline_size <= 4) {
39702 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39703 }
39704 let inner_offset;
39705 let mut inner_depth = depth.clone();
39706 if inlined {
39707 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39708 inner_offset = next_offset;
39709 } else {
39710 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39711 inner_depth.increment()?;
39712 }
39713 let val_ref = self.s2.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
39714 fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
39715 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39716 {
39717 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39718 }
39719 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39720 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39721 }
39722 }
39723
39724 next_offset += envelope_size;
39725
39726 while next_offset < end_offset {
39728 _next_ordinal_to_read += 1;
39729 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39730 next_offset += envelope_size;
39731 }
39732
39733 Ok(())
39734 }
39735 }
39736
39737 impl TableStructWithUint32Sandwich {
39738 #[inline(always)]
39739 fn max_ordinal_present(&self) -> u64 {
39740 if let Some(_) = self.i2 {
39741 return 4;
39742 }
39743 if let Some(_) = self.s2 {
39744 return 3;
39745 }
39746 if let Some(_) = self.s1 {
39747 return 2;
39748 }
39749 if let Some(_) = self.i {
39750 return 1;
39751 }
39752 0
39753 }
39754 }
39755
39756 impl fidl::encoding::ValueTypeMarker for TableStructWithUint32Sandwich {
39757 type Borrowed<'a> = &'a Self;
39758 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
39759 value
39760 }
39761 }
39762
39763 unsafe impl fidl::encoding::TypeMarker for TableStructWithUint32Sandwich {
39764 type Owned = Self;
39765
39766 #[inline(always)]
39767 fn inline_align(_context: fidl::encoding::Context) -> usize {
39768 8
39769 }
39770
39771 #[inline(always)]
39772 fn inline_size(_context: fidl::encoding::Context) -> usize {
39773 16
39774 }
39775 }
39776
39777 unsafe impl<D: fidl::encoding::ResourceDialect>
39778 fidl::encoding::Encode<TableStructWithUint32Sandwich, D>
39779 for &TableStructWithUint32Sandwich
39780 {
39781 unsafe fn encode(
39782 self,
39783 encoder: &mut fidl::encoding::Encoder<'_, D>,
39784 offset: usize,
39785 mut depth: fidl::encoding::Depth,
39786 ) -> fidl::Result<()> {
39787 encoder.debug_check_bounds::<TableStructWithUint32Sandwich>(offset);
39788 let max_ordinal: u64 = self.max_ordinal_present();
39790 encoder.write_num(max_ordinal, offset);
39791 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
39792 if max_ordinal == 0 {
39794 return Ok(());
39795 }
39796 depth.increment()?;
39797 let envelope_size = 8;
39798 let bytes_len = max_ordinal as usize * envelope_size;
39799 #[allow(unused_variables)]
39800 let offset = encoder.out_of_line_offset(bytes_len);
39801 let mut _prev_end_offset: usize = 0;
39802 if 1 > max_ordinal {
39803 return Ok(());
39804 }
39805
39806 let cur_offset: usize = (1 - 1) * envelope_size;
39809
39810 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39812
39813 fidl::encoding::encode_in_envelope_optional::<u32, D>(
39818 self.i.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
39819 encoder,
39820 offset + cur_offset,
39821 depth,
39822 )?;
39823
39824 _prev_end_offset = cur_offset + envelope_size;
39825 if 2 > max_ordinal {
39826 return Ok(());
39827 }
39828
39829 let cur_offset: usize = (2 - 1) * envelope_size;
39832
39833 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39835
39836 fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
39841 self.s1
39842 .as_ref()
39843 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
39844 encoder,
39845 offset + cur_offset,
39846 depth,
39847 )?;
39848
39849 _prev_end_offset = cur_offset + envelope_size;
39850 if 3 > max_ordinal {
39851 return Ok(());
39852 }
39853
39854 let cur_offset: usize = (3 - 1) * envelope_size;
39857
39858 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39860
39861 fidl::encoding::encode_in_envelope_optional::<StructSize3Align1, D>(
39866 self.s2
39867 .as_ref()
39868 .map(<StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow),
39869 encoder,
39870 offset + cur_offset,
39871 depth,
39872 )?;
39873
39874 _prev_end_offset = cur_offset + envelope_size;
39875 if 4 > max_ordinal {
39876 return Ok(());
39877 }
39878
39879 let cur_offset: usize = (4 - 1) * envelope_size;
39882
39883 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
39885
39886 fidl::encoding::encode_in_envelope_optional::<u32, D>(
39891 self.i2.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
39892 encoder,
39893 offset + cur_offset,
39894 depth,
39895 )?;
39896
39897 _prev_end_offset = cur_offset + envelope_size;
39898
39899 Ok(())
39900 }
39901 }
39902
39903 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
39904 for TableStructWithUint32Sandwich
39905 {
39906 #[inline(always)]
39907 fn new_empty() -> Self {
39908 Self::default()
39909 }
39910
39911 unsafe fn decode(
39912 &mut self,
39913 decoder: &mut fidl::encoding::Decoder<'_, D>,
39914 offset: usize,
39915 mut depth: fidl::encoding::Depth,
39916 ) -> fidl::Result<()> {
39917 decoder.debug_check_bounds::<Self>(offset);
39918 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
39919 None => return Err(fidl::Error::NotNullable),
39920 Some(len) => len,
39921 };
39922 if len == 0 {
39924 return Ok(());
39925 };
39926 depth.increment()?;
39927 let envelope_size = 8;
39928 let bytes_len = len * envelope_size;
39929 let offset = decoder.out_of_line_offset(bytes_len)?;
39930 let mut _next_ordinal_to_read = 0;
39932 let mut next_offset = offset;
39933 let end_offset = offset + bytes_len;
39934 _next_ordinal_to_read += 1;
39935 if next_offset >= end_offset {
39936 return Ok(());
39937 }
39938
39939 while _next_ordinal_to_read < 1 {
39941 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39942 _next_ordinal_to_read += 1;
39943 next_offset += envelope_size;
39944 }
39945
39946 let next_out_of_line = decoder.next_out_of_line();
39947 let handles_before = decoder.remaining_handles();
39948 if let Some((inlined, num_bytes, num_handles)) =
39949 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39950 {
39951 let member_inline_size =
39952 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39953 if inlined != (member_inline_size <= 4) {
39954 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39955 }
39956 let inner_offset;
39957 let mut inner_depth = depth.clone();
39958 if inlined {
39959 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
39960 inner_offset = next_offset;
39961 } else {
39962 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
39963 inner_depth.increment()?;
39964 }
39965 let val_ref = self.i.get_or_insert_with(|| fidl::new_empty!(u32, D));
39966 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
39967 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
39968 {
39969 return Err(fidl::Error::InvalidNumBytesInEnvelope);
39970 }
39971 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
39972 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
39973 }
39974 }
39975
39976 next_offset += envelope_size;
39977 _next_ordinal_to_read += 1;
39978 if next_offset >= end_offset {
39979 return Ok(());
39980 }
39981
39982 while _next_ordinal_to_read < 2 {
39984 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
39985 _next_ordinal_to_read += 1;
39986 next_offset += envelope_size;
39987 }
39988
39989 let next_out_of_line = decoder.next_out_of_line();
39990 let handles_before = decoder.remaining_handles();
39991 if let Some((inlined, num_bytes, num_handles)) =
39992 fidl::encoding::decode_envelope_header(decoder, next_offset)?
39993 {
39994 let member_inline_size =
39995 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
39996 if inlined != (member_inline_size <= 4) {
39997 return Err(fidl::Error::InvalidInlineBitInEnvelope);
39998 }
39999 let inner_offset;
40000 let mut inner_depth = depth.clone();
40001 if inlined {
40002 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40003 inner_offset = next_offset;
40004 } else {
40005 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40006 inner_depth.increment()?;
40007 }
40008 let val_ref = self.s1.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40009 fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40010 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40011 {
40012 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40013 }
40014 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40015 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40016 }
40017 }
40018
40019 next_offset += envelope_size;
40020 _next_ordinal_to_read += 1;
40021 if next_offset >= end_offset {
40022 return Ok(());
40023 }
40024
40025 while _next_ordinal_to_read < 3 {
40027 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40028 _next_ordinal_to_read += 1;
40029 next_offset += envelope_size;
40030 }
40031
40032 let next_out_of_line = decoder.next_out_of_line();
40033 let handles_before = decoder.remaining_handles();
40034 if let Some((inlined, num_bytes, num_handles)) =
40035 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40036 {
40037 let member_inline_size =
40038 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40039 if inlined != (member_inline_size <= 4) {
40040 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40041 }
40042 let inner_offset;
40043 let mut inner_depth = depth.clone();
40044 if inlined {
40045 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40046 inner_offset = next_offset;
40047 } else {
40048 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40049 inner_depth.increment()?;
40050 }
40051 let val_ref = self.s2.get_or_insert_with(|| fidl::new_empty!(StructSize3Align1, D));
40052 fidl::decode!(StructSize3Align1, D, val_ref, decoder, inner_offset, inner_depth)?;
40053 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40054 {
40055 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40056 }
40057 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40058 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40059 }
40060 }
40061
40062 next_offset += envelope_size;
40063 _next_ordinal_to_read += 1;
40064 if next_offset >= end_offset {
40065 return Ok(());
40066 }
40067
40068 while _next_ordinal_to_read < 4 {
40070 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40071 _next_ordinal_to_read += 1;
40072 next_offset += envelope_size;
40073 }
40074
40075 let next_out_of_line = decoder.next_out_of_line();
40076 let handles_before = decoder.remaining_handles();
40077 if let Some((inlined, num_bytes, num_handles)) =
40078 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40079 {
40080 let member_inline_size =
40081 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40082 if inlined != (member_inline_size <= 4) {
40083 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40084 }
40085 let inner_offset;
40086 let mut inner_depth = depth.clone();
40087 if inlined {
40088 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40089 inner_offset = next_offset;
40090 } else {
40091 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40092 inner_depth.increment()?;
40093 }
40094 let val_ref = self.i2.get_or_insert_with(|| fidl::new_empty!(u32, D));
40095 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
40096 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40097 {
40098 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40099 }
40100 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40101 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40102 }
40103 }
40104
40105 next_offset += envelope_size;
40106
40107 while next_offset < end_offset {
40109 _next_ordinal_to_read += 1;
40110 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40111 next_offset += envelope_size;
40112 }
40113
40114 Ok(())
40115 }
40116 }
40117
40118 impl TableWithEmptyStruct {
40119 #[inline(always)]
40120 fn max_ordinal_present(&self) -> u64 {
40121 if let Some(_) = self.s {
40122 return 1;
40123 }
40124 0
40125 }
40126 }
40127
40128 impl fidl::encoding::ValueTypeMarker for TableWithEmptyStruct {
40129 type Borrowed<'a> = &'a Self;
40130 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40131 value
40132 }
40133 }
40134
40135 unsafe impl fidl::encoding::TypeMarker for TableWithEmptyStruct {
40136 type Owned = Self;
40137
40138 #[inline(always)]
40139 fn inline_align(_context: fidl::encoding::Context) -> usize {
40140 8
40141 }
40142
40143 #[inline(always)]
40144 fn inline_size(_context: fidl::encoding::Context) -> usize {
40145 16
40146 }
40147 }
40148
40149 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithEmptyStruct, D>
40150 for &TableWithEmptyStruct
40151 {
40152 unsafe fn encode(
40153 self,
40154 encoder: &mut fidl::encoding::Encoder<'_, D>,
40155 offset: usize,
40156 mut depth: fidl::encoding::Depth,
40157 ) -> fidl::Result<()> {
40158 encoder.debug_check_bounds::<TableWithEmptyStruct>(offset);
40159 let max_ordinal: u64 = self.max_ordinal_present();
40161 encoder.write_num(max_ordinal, offset);
40162 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40163 if max_ordinal == 0 {
40165 return Ok(());
40166 }
40167 depth.increment()?;
40168 let envelope_size = 8;
40169 let bytes_len = max_ordinal as usize * envelope_size;
40170 #[allow(unused_variables)]
40171 let offset = encoder.out_of_line_offset(bytes_len);
40172 let mut _prev_end_offset: usize = 0;
40173 if 1 > max_ordinal {
40174 return Ok(());
40175 }
40176
40177 let cur_offset: usize = (1 - 1) * envelope_size;
40180
40181 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40183
40184 fidl::encoding::encode_in_envelope_optional::<EmptyStruct, D>(
40189 self.s.as_ref().map(<EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow),
40190 encoder,
40191 offset + cur_offset,
40192 depth,
40193 )?;
40194
40195 _prev_end_offset = cur_offset + envelope_size;
40196
40197 Ok(())
40198 }
40199 }
40200
40201 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithEmptyStruct {
40202 #[inline(always)]
40203 fn new_empty() -> Self {
40204 Self::default()
40205 }
40206
40207 unsafe fn decode(
40208 &mut self,
40209 decoder: &mut fidl::encoding::Decoder<'_, D>,
40210 offset: usize,
40211 mut depth: fidl::encoding::Depth,
40212 ) -> fidl::Result<()> {
40213 decoder.debug_check_bounds::<Self>(offset);
40214 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40215 None => return Err(fidl::Error::NotNullable),
40216 Some(len) => len,
40217 };
40218 if len == 0 {
40220 return Ok(());
40221 };
40222 depth.increment()?;
40223 let envelope_size = 8;
40224 let bytes_len = len * envelope_size;
40225 let offset = decoder.out_of_line_offset(bytes_len)?;
40226 let mut _next_ordinal_to_read = 0;
40228 let mut next_offset = offset;
40229 let end_offset = offset + bytes_len;
40230 _next_ordinal_to_read += 1;
40231 if next_offset >= end_offset {
40232 return Ok(());
40233 }
40234
40235 while _next_ordinal_to_read < 1 {
40237 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40238 _next_ordinal_to_read += 1;
40239 next_offset += envelope_size;
40240 }
40241
40242 let next_out_of_line = decoder.next_out_of_line();
40243 let handles_before = decoder.remaining_handles();
40244 if let Some((inlined, num_bytes, num_handles)) =
40245 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40246 {
40247 let member_inline_size =
40248 <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40249 if inlined != (member_inline_size <= 4) {
40250 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40251 }
40252 let inner_offset;
40253 let mut inner_depth = depth.clone();
40254 if inlined {
40255 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40256 inner_offset = next_offset;
40257 } else {
40258 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40259 inner_depth.increment()?;
40260 }
40261 let val_ref = self.s.get_or_insert_with(|| fidl::new_empty!(EmptyStruct, D));
40262 fidl::decode!(EmptyStruct, D, val_ref, decoder, inner_offset, inner_depth)?;
40263 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40264 {
40265 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40266 }
40267 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40268 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40269 }
40270 }
40271
40272 next_offset += envelope_size;
40273
40274 while next_offset < end_offset {
40276 _next_ordinal_to_read += 1;
40277 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40278 next_offset += envelope_size;
40279 }
40280
40281 Ok(())
40282 }
40283 }
40284
40285 impl TableWithGaps {
40286 #[inline(always)]
40287 fn max_ordinal_present(&self) -> u64 {
40288 if let Some(_) = self.fourth {
40289 return 4;
40290 }
40291 if let Some(_) = self.second {
40292 return 2;
40293 }
40294 0
40295 }
40296 }
40297
40298 impl fidl::encoding::ValueTypeMarker for TableWithGaps {
40299 type Borrowed<'a> = &'a Self;
40300 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40301 value
40302 }
40303 }
40304
40305 unsafe impl fidl::encoding::TypeMarker for TableWithGaps {
40306 type Owned = Self;
40307
40308 #[inline(always)]
40309 fn inline_align(_context: fidl::encoding::Context) -> usize {
40310 8
40311 }
40312
40313 #[inline(always)]
40314 fn inline_size(_context: fidl::encoding::Context) -> usize {
40315 16
40316 }
40317 }
40318
40319 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithGaps, D>
40320 for &TableWithGaps
40321 {
40322 unsafe fn encode(
40323 self,
40324 encoder: &mut fidl::encoding::Encoder<'_, D>,
40325 offset: usize,
40326 mut depth: fidl::encoding::Depth,
40327 ) -> fidl::Result<()> {
40328 encoder.debug_check_bounds::<TableWithGaps>(offset);
40329 let max_ordinal: u64 = self.max_ordinal_present();
40331 encoder.write_num(max_ordinal, offset);
40332 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40333 if max_ordinal == 0 {
40335 return Ok(());
40336 }
40337 depth.increment()?;
40338 let envelope_size = 8;
40339 let bytes_len = max_ordinal as usize * envelope_size;
40340 #[allow(unused_variables)]
40341 let offset = encoder.out_of_line_offset(bytes_len);
40342 let mut _prev_end_offset: usize = 0;
40343 if 2 > max_ordinal {
40344 return Ok(());
40345 }
40346
40347 let cur_offset: usize = (2 - 1) * envelope_size;
40350
40351 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40353
40354 fidl::encoding::encode_in_envelope_optional::<i32, D>(
40359 self.second.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
40360 encoder,
40361 offset + cur_offset,
40362 depth,
40363 )?;
40364
40365 _prev_end_offset = cur_offset + envelope_size;
40366 if 4 > max_ordinal {
40367 return Ok(());
40368 }
40369
40370 let cur_offset: usize = (4 - 1) * envelope_size;
40373
40374 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40376
40377 fidl::encoding::encode_in_envelope_optional::<i32, D>(
40382 self.fourth.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
40383 encoder,
40384 offset + cur_offset,
40385 depth,
40386 )?;
40387
40388 _prev_end_offset = cur_offset + envelope_size;
40389
40390 Ok(())
40391 }
40392 }
40393
40394 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithGaps {
40395 #[inline(always)]
40396 fn new_empty() -> Self {
40397 Self::default()
40398 }
40399
40400 unsafe fn decode(
40401 &mut self,
40402 decoder: &mut fidl::encoding::Decoder<'_, D>,
40403 offset: usize,
40404 mut depth: fidl::encoding::Depth,
40405 ) -> fidl::Result<()> {
40406 decoder.debug_check_bounds::<Self>(offset);
40407 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40408 None => return Err(fidl::Error::NotNullable),
40409 Some(len) => len,
40410 };
40411 if len == 0 {
40413 return Ok(());
40414 };
40415 depth.increment()?;
40416 let envelope_size = 8;
40417 let bytes_len = len * envelope_size;
40418 let offset = decoder.out_of_line_offset(bytes_len)?;
40419 let mut _next_ordinal_to_read = 0;
40421 let mut next_offset = offset;
40422 let end_offset = offset + bytes_len;
40423 _next_ordinal_to_read += 1;
40424 if next_offset >= end_offset {
40425 return Ok(());
40426 }
40427
40428 while _next_ordinal_to_read < 2 {
40430 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40431 _next_ordinal_to_read += 1;
40432 next_offset += envelope_size;
40433 }
40434
40435 let next_out_of_line = decoder.next_out_of_line();
40436 let handles_before = decoder.remaining_handles();
40437 if let Some((inlined, num_bytes, num_handles)) =
40438 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40439 {
40440 let member_inline_size =
40441 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40442 if inlined != (member_inline_size <= 4) {
40443 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40444 }
40445 let inner_offset;
40446 let mut inner_depth = depth.clone();
40447 if inlined {
40448 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40449 inner_offset = next_offset;
40450 } else {
40451 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40452 inner_depth.increment()?;
40453 }
40454 let val_ref = self.second.get_or_insert_with(|| fidl::new_empty!(i32, D));
40455 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
40456 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40457 {
40458 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40459 }
40460 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40461 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40462 }
40463 }
40464
40465 next_offset += envelope_size;
40466 _next_ordinal_to_read += 1;
40467 if next_offset >= end_offset {
40468 return Ok(());
40469 }
40470
40471 while _next_ordinal_to_read < 4 {
40473 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40474 _next_ordinal_to_read += 1;
40475 next_offset += envelope_size;
40476 }
40477
40478 let next_out_of_line = decoder.next_out_of_line();
40479 let handles_before = decoder.remaining_handles();
40480 if let Some((inlined, num_bytes, num_handles)) =
40481 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40482 {
40483 let member_inline_size =
40484 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40485 if inlined != (member_inline_size <= 4) {
40486 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40487 }
40488 let inner_offset;
40489 let mut inner_depth = depth.clone();
40490 if inlined {
40491 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40492 inner_offset = next_offset;
40493 } else {
40494 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40495 inner_depth.increment()?;
40496 }
40497 let val_ref = self.fourth.get_or_insert_with(|| fidl::new_empty!(i32, D));
40498 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
40499 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40500 {
40501 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40502 }
40503 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40504 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40505 }
40506 }
40507
40508 next_offset += envelope_size;
40509
40510 while next_offset < end_offset {
40512 _next_ordinal_to_read += 1;
40513 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40514 next_offset += envelope_size;
40515 }
40516
40517 Ok(())
40518 }
40519 }
40520
40521 impl TableWithReservedFieldThenUnion {
40522 #[inline(always)]
40523 fn max_ordinal_present(&self) -> u64 {
40524 if let Some(_) = self.uv {
40525 return 2;
40526 }
40527 0
40528 }
40529 }
40530
40531 impl fidl::encoding::ValueTypeMarker for TableWithReservedFieldThenUnion {
40532 type Borrowed<'a> = &'a Self;
40533 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40534 value
40535 }
40536 }
40537
40538 unsafe impl fidl::encoding::TypeMarker for TableWithReservedFieldThenUnion {
40539 type Owned = Self;
40540
40541 #[inline(always)]
40542 fn inline_align(_context: fidl::encoding::Context) -> usize {
40543 8
40544 }
40545
40546 #[inline(always)]
40547 fn inline_size(_context: fidl::encoding::Context) -> usize {
40548 16
40549 }
40550 }
40551
40552 unsafe impl<D: fidl::encoding::ResourceDialect>
40553 fidl::encoding::Encode<TableWithReservedFieldThenUnion, D>
40554 for &TableWithReservedFieldThenUnion
40555 {
40556 unsafe fn encode(
40557 self,
40558 encoder: &mut fidl::encoding::Encoder<'_, D>,
40559 offset: usize,
40560 mut depth: fidl::encoding::Depth,
40561 ) -> fidl::Result<()> {
40562 encoder.debug_check_bounds::<TableWithReservedFieldThenUnion>(offset);
40563 let max_ordinal: u64 = self.max_ordinal_present();
40565 encoder.write_num(max_ordinal, offset);
40566 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40567 if max_ordinal == 0 {
40569 return Ok(());
40570 }
40571 depth.increment()?;
40572 let envelope_size = 8;
40573 let bytes_len = max_ordinal as usize * envelope_size;
40574 #[allow(unused_variables)]
40575 let offset = encoder.out_of_line_offset(bytes_len);
40576 let mut _prev_end_offset: usize = 0;
40577 if 2 > max_ordinal {
40578 return Ok(());
40579 }
40580
40581 let cur_offset: usize = (2 - 1) * envelope_size;
40584
40585 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40587
40588 fidl::encoding::encode_in_envelope_optional::<UnionSize8Align4, D>(
40593 self.uv.as_ref().map(<UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow),
40594 encoder,
40595 offset + cur_offset,
40596 depth,
40597 )?;
40598
40599 _prev_end_offset = cur_offset + envelope_size;
40600
40601 Ok(())
40602 }
40603 }
40604
40605 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40606 for TableWithReservedFieldThenUnion
40607 {
40608 #[inline(always)]
40609 fn new_empty() -> Self {
40610 Self::default()
40611 }
40612
40613 unsafe fn decode(
40614 &mut self,
40615 decoder: &mut fidl::encoding::Decoder<'_, D>,
40616 offset: usize,
40617 mut depth: fidl::encoding::Depth,
40618 ) -> fidl::Result<()> {
40619 decoder.debug_check_bounds::<Self>(offset);
40620 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40621 None => return Err(fidl::Error::NotNullable),
40622 Some(len) => len,
40623 };
40624 if len == 0 {
40626 return Ok(());
40627 };
40628 depth.increment()?;
40629 let envelope_size = 8;
40630 let bytes_len = len * envelope_size;
40631 let offset = decoder.out_of_line_offset(bytes_len)?;
40632 let mut _next_ordinal_to_read = 0;
40634 let mut next_offset = offset;
40635 let end_offset = offset + bytes_len;
40636 _next_ordinal_to_read += 1;
40637 if next_offset >= end_offset {
40638 return Ok(());
40639 }
40640
40641 while _next_ordinal_to_read < 2 {
40643 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40644 _next_ordinal_to_read += 1;
40645 next_offset += envelope_size;
40646 }
40647
40648 let next_out_of_line = decoder.next_out_of_line();
40649 let handles_before = decoder.remaining_handles();
40650 if let Some((inlined, num_bytes, num_handles)) =
40651 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40652 {
40653 let member_inline_size =
40654 <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40655 if inlined != (member_inline_size <= 4) {
40656 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40657 }
40658 let inner_offset;
40659 let mut inner_depth = depth.clone();
40660 if inlined {
40661 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40662 inner_offset = next_offset;
40663 } else {
40664 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40665 inner_depth.increment()?;
40666 }
40667 let val_ref = self.uv.get_or_insert_with(|| fidl::new_empty!(UnionSize8Align4, D));
40668 fidl::decode!(UnionSize8Align4, D, val_ref, decoder, inner_offset, inner_depth)?;
40669 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40670 {
40671 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40672 }
40673 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40674 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40675 }
40676 }
40677
40678 next_offset += envelope_size;
40679
40680 while next_offset < end_offset {
40682 _next_ordinal_to_read += 1;
40683 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40684 next_offset += envelope_size;
40685 }
40686
40687 Ok(())
40688 }
40689 }
40690
40691 impl TableWithStringAndVector {
40692 #[inline(always)]
40693 fn max_ordinal_present(&self) -> u64 {
40694 if let Some(_) = self.baz {
40695 return 3;
40696 }
40697 if let Some(_) = self.bar {
40698 return 2;
40699 }
40700 if let Some(_) = self.foo {
40701 return 1;
40702 }
40703 0
40704 }
40705 }
40706
40707 impl fidl::encoding::ValueTypeMarker for TableWithStringAndVector {
40708 type Borrowed<'a> = &'a Self;
40709 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
40710 value
40711 }
40712 }
40713
40714 unsafe impl fidl::encoding::TypeMarker for TableWithStringAndVector {
40715 type Owned = Self;
40716
40717 #[inline(always)]
40718 fn inline_align(_context: fidl::encoding::Context) -> usize {
40719 8
40720 }
40721
40722 #[inline(always)]
40723 fn inline_size(_context: fidl::encoding::Context) -> usize {
40724 16
40725 }
40726 }
40727
40728 unsafe impl<D: fidl::encoding::ResourceDialect>
40729 fidl::encoding::Encode<TableWithStringAndVector, D> for &TableWithStringAndVector
40730 {
40731 unsafe fn encode(
40732 self,
40733 encoder: &mut fidl::encoding::Encoder<'_, D>,
40734 offset: usize,
40735 mut depth: fidl::encoding::Depth,
40736 ) -> fidl::Result<()> {
40737 encoder.debug_check_bounds::<TableWithStringAndVector>(offset);
40738 let max_ordinal: u64 = self.max_ordinal_present();
40740 encoder.write_num(max_ordinal, offset);
40741 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
40742 if max_ordinal == 0 {
40744 return Ok(());
40745 }
40746 depth.increment()?;
40747 let envelope_size = 8;
40748 let bytes_len = max_ordinal as usize * envelope_size;
40749 #[allow(unused_variables)]
40750 let offset = encoder.out_of_line_offset(bytes_len);
40751 let mut _prev_end_offset: usize = 0;
40752 if 1 > max_ordinal {
40753 return Ok(());
40754 }
40755
40756 let cur_offset: usize = (1 - 1) * envelope_size;
40759
40760 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40762
40763 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
40768 self.foo.as_ref().map(
40769 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
40770 ),
40771 encoder,
40772 offset + cur_offset,
40773 depth,
40774 )?;
40775
40776 _prev_end_offset = cur_offset + envelope_size;
40777 if 2 > max_ordinal {
40778 return Ok(());
40779 }
40780
40781 let cur_offset: usize = (2 - 1) * envelope_size;
40784
40785 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40787
40788 fidl::encoding::encode_in_envelope_optional::<i32, D>(
40793 self.bar.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
40794 encoder,
40795 offset + cur_offset,
40796 depth,
40797 )?;
40798
40799 _prev_end_offset = cur_offset + envelope_size;
40800 if 3 > max_ordinal {
40801 return Ok(());
40802 }
40803
40804 let cur_offset: usize = (3 - 1) * envelope_size;
40807
40808 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
40810
40811 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u8>, D>(
40816 self.baz.as_ref().map(<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow),
40817 encoder, offset + cur_offset, depth
40818 )?;
40819
40820 _prev_end_offset = cur_offset + envelope_size;
40821
40822 Ok(())
40823 }
40824 }
40825
40826 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
40827 for TableWithStringAndVector
40828 {
40829 #[inline(always)]
40830 fn new_empty() -> Self {
40831 Self::default()
40832 }
40833
40834 unsafe fn decode(
40835 &mut self,
40836 decoder: &mut fidl::encoding::Decoder<'_, D>,
40837 offset: usize,
40838 mut depth: fidl::encoding::Depth,
40839 ) -> fidl::Result<()> {
40840 decoder.debug_check_bounds::<Self>(offset);
40841 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
40842 None => return Err(fidl::Error::NotNullable),
40843 Some(len) => len,
40844 };
40845 if len == 0 {
40847 return Ok(());
40848 };
40849 depth.increment()?;
40850 let envelope_size = 8;
40851 let bytes_len = len * envelope_size;
40852 let offset = decoder.out_of_line_offset(bytes_len)?;
40853 let mut _next_ordinal_to_read = 0;
40855 let mut next_offset = offset;
40856 let end_offset = offset + bytes_len;
40857 _next_ordinal_to_read += 1;
40858 if next_offset >= end_offset {
40859 return Ok(());
40860 }
40861
40862 while _next_ordinal_to_read < 1 {
40864 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40865 _next_ordinal_to_read += 1;
40866 next_offset += envelope_size;
40867 }
40868
40869 let next_out_of_line = decoder.next_out_of_line();
40870 let handles_before = decoder.remaining_handles();
40871 if let Some((inlined, num_bytes, num_handles)) =
40872 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40873 {
40874 let member_inline_size =
40875 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
40876 decoder.context,
40877 );
40878 if inlined != (member_inline_size <= 4) {
40879 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40880 }
40881 let inner_offset;
40882 let mut inner_depth = depth.clone();
40883 if inlined {
40884 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40885 inner_offset = next_offset;
40886 } else {
40887 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40888 inner_depth.increment()?;
40889 }
40890 let val_ref = self
40891 .foo
40892 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
40893 fidl::decode!(
40894 fidl::encoding::UnboundedString,
40895 D,
40896 val_ref,
40897 decoder,
40898 inner_offset,
40899 inner_depth
40900 )?;
40901 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40902 {
40903 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40904 }
40905 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40906 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40907 }
40908 }
40909
40910 next_offset += envelope_size;
40911 _next_ordinal_to_read += 1;
40912 if next_offset >= end_offset {
40913 return Ok(());
40914 }
40915
40916 while _next_ordinal_to_read < 2 {
40918 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40919 _next_ordinal_to_read += 1;
40920 next_offset += envelope_size;
40921 }
40922
40923 let next_out_of_line = decoder.next_out_of_line();
40924 let handles_before = decoder.remaining_handles();
40925 if let Some((inlined, num_bytes, num_handles)) =
40926 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40927 {
40928 let member_inline_size =
40929 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40930 if inlined != (member_inline_size <= 4) {
40931 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40932 }
40933 let inner_offset;
40934 let mut inner_depth = depth.clone();
40935 if inlined {
40936 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40937 inner_offset = next_offset;
40938 } else {
40939 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40940 inner_depth.increment()?;
40941 }
40942 let val_ref = self.bar.get_or_insert_with(|| fidl::new_empty!(i32, D));
40943 fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
40944 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40945 {
40946 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40947 }
40948 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
40949 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
40950 }
40951 }
40952
40953 next_offset += envelope_size;
40954 _next_ordinal_to_read += 1;
40955 if next_offset >= end_offset {
40956 return Ok(());
40957 }
40958
40959 while _next_ordinal_to_read < 3 {
40961 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
40962 _next_ordinal_to_read += 1;
40963 next_offset += envelope_size;
40964 }
40965
40966 let next_out_of_line = decoder.next_out_of_line();
40967 let handles_before = decoder.remaining_handles();
40968 if let Some((inlined, num_bytes, num_handles)) =
40969 fidl::encoding::decode_envelope_header(decoder, next_offset)?
40970 {
40971 let member_inline_size = <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
40972 if inlined != (member_inline_size <= 4) {
40973 return Err(fidl::Error::InvalidInlineBitInEnvelope);
40974 }
40975 let inner_offset;
40976 let mut inner_depth = depth.clone();
40977 if inlined {
40978 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
40979 inner_offset = next_offset;
40980 } else {
40981 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
40982 inner_depth.increment()?;
40983 }
40984 let val_ref = self.baz.get_or_insert_with(|| {
40985 fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D)
40986 });
40987 fidl::decode!(
40988 fidl::encoding::UnboundedVector<u8>,
40989 D,
40990 val_ref,
40991 decoder,
40992 inner_offset,
40993 inner_depth
40994 )?;
40995 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
40996 {
40997 return Err(fidl::Error::InvalidNumBytesInEnvelope);
40998 }
40999 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41000 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41001 }
41002 }
41003
41004 next_offset += envelope_size;
41005
41006 while next_offset < end_offset {
41008 _next_ordinal_to_read += 1;
41009 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41010 next_offset += envelope_size;
41011 }
41012
41013 Ok(())
41014 }
41015 }
41016
41017 impl TableWithUnionSize12Align4 {
41018 #[inline(always)]
41019 fn max_ordinal_present(&self) -> u64 {
41020 if let Some(_) = self.after {
41021 return 5;
41022 }
41023 if let Some(_) = self.member {
41024 return 3;
41025 }
41026 if let Some(_) = self.before {
41027 return 1;
41028 }
41029 0
41030 }
41031 }
41032
41033 impl fidl::encoding::ValueTypeMarker for TableWithUnionSize12Align4 {
41034 type Borrowed<'a> = &'a Self;
41035 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41036 value
41037 }
41038 }
41039
41040 unsafe impl fidl::encoding::TypeMarker for TableWithUnionSize12Align4 {
41041 type Owned = Self;
41042
41043 #[inline(always)]
41044 fn inline_align(_context: fidl::encoding::Context) -> usize {
41045 8
41046 }
41047
41048 #[inline(always)]
41049 fn inline_size(_context: fidl::encoding::Context) -> usize {
41050 16
41051 }
41052 }
41053
41054 unsafe impl<D: fidl::encoding::ResourceDialect>
41055 fidl::encoding::Encode<TableWithUnionSize12Align4, D> for &TableWithUnionSize12Align4
41056 {
41057 unsafe fn encode(
41058 self,
41059 encoder: &mut fidl::encoding::Encoder<'_, D>,
41060 offset: usize,
41061 mut depth: fidl::encoding::Depth,
41062 ) -> fidl::Result<()> {
41063 encoder.debug_check_bounds::<TableWithUnionSize12Align4>(offset);
41064 let max_ordinal: u64 = self.max_ordinal_present();
41066 encoder.write_num(max_ordinal, offset);
41067 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41068 if max_ordinal == 0 {
41070 return Ok(());
41071 }
41072 depth.increment()?;
41073 let envelope_size = 8;
41074 let bytes_len = max_ordinal as usize * envelope_size;
41075 #[allow(unused_variables)]
41076 let offset = encoder.out_of_line_offset(bytes_len);
41077 let mut _prev_end_offset: usize = 0;
41078 if 1 > max_ordinal {
41079 return Ok(());
41080 }
41081
41082 let cur_offset: usize = (1 - 1) * envelope_size;
41085
41086 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41088
41089 fidl::encoding::encode_in_envelope_optional::<u8, D>(
41094 self.before.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
41095 encoder,
41096 offset + cur_offset,
41097 depth,
41098 )?;
41099
41100 _prev_end_offset = cur_offset + envelope_size;
41101 if 3 > max_ordinal {
41102 return Ok(());
41103 }
41104
41105 let cur_offset: usize = (3 - 1) * envelope_size;
41108
41109 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41111
41112 fidl::encoding::encode_in_envelope_optional::<UnionSize12Align4, D>(
41117 self.member
41118 .as_ref()
41119 .map(<UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow),
41120 encoder,
41121 offset + cur_offset,
41122 depth,
41123 )?;
41124
41125 _prev_end_offset = cur_offset + envelope_size;
41126 if 5 > max_ordinal {
41127 return Ok(());
41128 }
41129
41130 let cur_offset: usize = (5 - 1) * envelope_size;
41133
41134 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41136
41137 fidl::encoding::encode_in_envelope_optional::<u8, D>(
41142 self.after.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
41143 encoder,
41144 offset + cur_offset,
41145 depth,
41146 )?;
41147
41148 _prev_end_offset = cur_offset + envelope_size;
41149
41150 Ok(())
41151 }
41152 }
41153
41154 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
41155 for TableWithUnionSize12Align4
41156 {
41157 #[inline(always)]
41158 fn new_empty() -> Self {
41159 Self::default()
41160 }
41161
41162 unsafe fn decode(
41163 &mut self,
41164 decoder: &mut fidl::encoding::Decoder<'_, D>,
41165 offset: usize,
41166 mut depth: fidl::encoding::Depth,
41167 ) -> fidl::Result<()> {
41168 decoder.debug_check_bounds::<Self>(offset);
41169 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41170 None => return Err(fidl::Error::NotNullable),
41171 Some(len) => len,
41172 };
41173 if len == 0 {
41175 return Ok(());
41176 };
41177 depth.increment()?;
41178 let envelope_size = 8;
41179 let bytes_len = len * envelope_size;
41180 let offset = decoder.out_of_line_offset(bytes_len)?;
41181 let mut _next_ordinal_to_read = 0;
41183 let mut next_offset = offset;
41184 let end_offset = offset + bytes_len;
41185 _next_ordinal_to_read += 1;
41186 if next_offset >= end_offset {
41187 return Ok(());
41188 }
41189
41190 while _next_ordinal_to_read < 1 {
41192 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41193 _next_ordinal_to_read += 1;
41194 next_offset += envelope_size;
41195 }
41196
41197 let next_out_of_line = decoder.next_out_of_line();
41198 let handles_before = decoder.remaining_handles();
41199 if let Some((inlined, num_bytes, num_handles)) =
41200 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41201 {
41202 let member_inline_size =
41203 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41204 if inlined != (member_inline_size <= 4) {
41205 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41206 }
41207 let inner_offset;
41208 let mut inner_depth = depth.clone();
41209 if inlined {
41210 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41211 inner_offset = next_offset;
41212 } else {
41213 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41214 inner_depth.increment()?;
41215 }
41216 let val_ref = self.before.get_or_insert_with(|| fidl::new_empty!(u8, D));
41217 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
41218 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41219 {
41220 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41221 }
41222 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41223 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41224 }
41225 }
41226
41227 next_offset += envelope_size;
41228 _next_ordinal_to_read += 1;
41229 if next_offset >= end_offset {
41230 return Ok(());
41231 }
41232
41233 while _next_ordinal_to_read < 3 {
41235 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41236 _next_ordinal_to_read += 1;
41237 next_offset += envelope_size;
41238 }
41239
41240 let next_out_of_line = decoder.next_out_of_line();
41241 let handles_before = decoder.remaining_handles();
41242 if let Some((inlined, num_bytes, num_handles)) =
41243 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41244 {
41245 let member_inline_size =
41246 <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41247 if inlined != (member_inline_size <= 4) {
41248 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41249 }
41250 let inner_offset;
41251 let mut inner_depth = depth.clone();
41252 if inlined {
41253 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41254 inner_offset = next_offset;
41255 } else {
41256 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41257 inner_depth.increment()?;
41258 }
41259 let val_ref =
41260 self.member.get_or_insert_with(|| fidl::new_empty!(UnionSize12Align4, D));
41261 fidl::decode!(UnionSize12Align4, D, val_ref, decoder, inner_offset, inner_depth)?;
41262 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41263 {
41264 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41265 }
41266 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41267 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41268 }
41269 }
41270
41271 next_offset += envelope_size;
41272 _next_ordinal_to_read += 1;
41273 if next_offset >= end_offset {
41274 return Ok(());
41275 }
41276
41277 while _next_ordinal_to_read < 5 {
41279 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41280 _next_ordinal_to_read += 1;
41281 next_offset += envelope_size;
41282 }
41283
41284 let next_out_of_line = decoder.next_out_of_line();
41285 let handles_before = decoder.remaining_handles();
41286 if let Some((inlined, num_bytes, num_handles)) =
41287 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41288 {
41289 let member_inline_size =
41290 <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41291 if inlined != (member_inline_size <= 4) {
41292 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41293 }
41294 let inner_offset;
41295 let mut inner_depth = depth.clone();
41296 if inlined {
41297 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41298 inner_offset = next_offset;
41299 } else {
41300 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41301 inner_depth.increment()?;
41302 }
41303 let val_ref = self.after.get_or_insert_with(|| fidl::new_empty!(u8, D));
41304 fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
41305 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41306 {
41307 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41308 }
41309 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41310 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41311 }
41312 }
41313
41314 next_offset += envelope_size;
41315
41316 while next_offset < end_offset {
41318 _next_ordinal_to_read += 1;
41319 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41320 next_offset += envelope_size;
41321 }
41322
41323 Ok(())
41324 }
41325 }
41326
41327 impl TableWithXUnion {
41328 #[inline(always)]
41329 fn max_ordinal_present(&self) -> u64 {
41330 if let Some(_) = self.member {
41331 return 1;
41332 }
41333 0
41334 }
41335 }
41336
41337 impl fidl::encoding::ValueTypeMarker for TableWithXUnion {
41338 type Borrowed<'a> = &'a Self;
41339 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41340 value
41341 }
41342 }
41343
41344 unsafe impl fidl::encoding::TypeMarker for TableWithXUnion {
41345 type Owned = Self;
41346
41347 #[inline(always)]
41348 fn inline_align(_context: fidl::encoding::Context) -> usize {
41349 8
41350 }
41351
41352 #[inline(always)]
41353 fn inline_size(_context: fidl::encoding::Context) -> usize {
41354 16
41355 }
41356 }
41357
41358 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TableWithXUnion, D>
41359 for &TableWithXUnion
41360 {
41361 unsafe fn encode(
41362 self,
41363 encoder: &mut fidl::encoding::Encoder<'_, D>,
41364 offset: usize,
41365 mut depth: fidl::encoding::Depth,
41366 ) -> fidl::Result<()> {
41367 encoder.debug_check_bounds::<TableWithXUnion>(offset);
41368 let max_ordinal: u64 = self.max_ordinal_present();
41370 encoder.write_num(max_ordinal, offset);
41371 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41372 if max_ordinal == 0 {
41374 return Ok(());
41375 }
41376 depth.increment()?;
41377 let envelope_size = 8;
41378 let bytes_len = max_ordinal as usize * envelope_size;
41379 #[allow(unused_variables)]
41380 let offset = encoder.out_of_line_offset(bytes_len);
41381 let mut _prev_end_offset: usize = 0;
41382 if 1 > max_ordinal {
41383 return Ok(());
41384 }
41385
41386 let cur_offset: usize = (1 - 1) * envelope_size;
41389
41390 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41392
41393 fidl::encoding::encode_in_envelope_optional::<CompatXUnion, D>(
41398 self.member.as_ref().map(<CompatXUnion as fidl::encoding::ValueTypeMarker>::borrow),
41399 encoder,
41400 offset + cur_offset,
41401 depth,
41402 )?;
41403
41404 _prev_end_offset = cur_offset + envelope_size;
41405
41406 Ok(())
41407 }
41408 }
41409
41410 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TableWithXUnion {
41411 #[inline(always)]
41412 fn new_empty() -> Self {
41413 Self::default()
41414 }
41415
41416 unsafe fn decode(
41417 &mut self,
41418 decoder: &mut fidl::encoding::Decoder<'_, D>,
41419 offset: usize,
41420 mut depth: fidl::encoding::Depth,
41421 ) -> fidl::Result<()> {
41422 decoder.debug_check_bounds::<Self>(offset);
41423 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41424 None => return Err(fidl::Error::NotNullable),
41425 Some(len) => len,
41426 };
41427 if len == 0 {
41429 return Ok(());
41430 };
41431 depth.increment()?;
41432 let envelope_size = 8;
41433 let bytes_len = len * envelope_size;
41434 let offset = decoder.out_of_line_offset(bytes_len)?;
41435 let mut _next_ordinal_to_read = 0;
41437 let mut next_offset = offset;
41438 let end_offset = offset + bytes_len;
41439 _next_ordinal_to_read += 1;
41440 if next_offset >= end_offset {
41441 return Ok(());
41442 }
41443
41444 while _next_ordinal_to_read < 1 {
41446 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41447 _next_ordinal_to_read += 1;
41448 next_offset += envelope_size;
41449 }
41450
41451 let next_out_of_line = decoder.next_out_of_line();
41452 let handles_before = decoder.remaining_handles();
41453 if let Some((inlined, num_bytes, num_handles)) =
41454 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41455 {
41456 let member_inline_size =
41457 <CompatXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41458 if inlined != (member_inline_size <= 4) {
41459 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41460 }
41461 let inner_offset;
41462 let mut inner_depth = depth.clone();
41463 if inlined {
41464 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41465 inner_offset = next_offset;
41466 } else {
41467 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41468 inner_depth.increment()?;
41469 }
41470 let val_ref = self.member.get_or_insert_with(|| fidl::new_empty!(CompatXUnion, D));
41471 fidl::decode!(CompatXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
41472 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41473 {
41474 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41475 }
41476 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41477 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41478 }
41479 }
41480
41481 next_offset += envelope_size;
41482
41483 while next_offset < end_offset {
41485 _next_ordinal_to_read += 1;
41486 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41487 next_offset += envelope_size;
41488 }
41489
41490 Ok(())
41491 }
41492 }
41493
41494 impl TransformerSimpleTable {
41495 #[inline(always)]
41496 fn max_ordinal_present(&self) -> u64 {
41497 if let Some(_) = self.value {
41498 return 1;
41499 }
41500 0
41501 }
41502 }
41503
41504 impl fidl::encoding::ValueTypeMarker for TransformerSimpleTable {
41505 type Borrowed<'a> = &'a Self;
41506 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41507 value
41508 }
41509 }
41510
41511 unsafe impl fidl::encoding::TypeMarker for TransformerSimpleTable {
41512 type Owned = Self;
41513
41514 #[inline(always)]
41515 fn inline_align(_context: fidl::encoding::Context) -> usize {
41516 8
41517 }
41518
41519 #[inline(always)]
41520 fn inline_size(_context: fidl::encoding::Context) -> usize {
41521 16
41522 }
41523 }
41524
41525 unsafe impl<D: fidl::encoding::ResourceDialect>
41526 fidl::encoding::Encode<TransformerSimpleTable, D> for &TransformerSimpleTable
41527 {
41528 unsafe fn encode(
41529 self,
41530 encoder: &mut fidl::encoding::Encoder<'_, D>,
41531 offset: usize,
41532 mut depth: fidl::encoding::Depth,
41533 ) -> fidl::Result<()> {
41534 encoder.debug_check_bounds::<TransformerSimpleTable>(offset);
41535 let max_ordinal: u64 = self.max_ordinal_present();
41537 encoder.write_num(max_ordinal, offset);
41538 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41539 if max_ordinal == 0 {
41541 return Ok(());
41542 }
41543 depth.increment()?;
41544 let envelope_size = 8;
41545 let bytes_len = max_ordinal as usize * envelope_size;
41546 #[allow(unused_variables)]
41547 let offset = encoder.out_of_line_offset(bytes_len);
41548 let mut _prev_end_offset: usize = 0;
41549 if 1 > max_ordinal {
41550 return Ok(());
41551 }
41552
41553 let cur_offset: usize = (1 - 1) * envelope_size;
41556
41557 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41559
41560 fidl::encoding::encode_in_envelope_optional::<u32, D>(
41565 self.value.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
41566 encoder,
41567 offset + cur_offset,
41568 depth,
41569 )?;
41570
41571 _prev_end_offset = cur_offset + envelope_size;
41572
41573 Ok(())
41574 }
41575 }
41576
41577 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
41578 for TransformerSimpleTable
41579 {
41580 #[inline(always)]
41581 fn new_empty() -> Self {
41582 Self::default()
41583 }
41584
41585 unsafe fn decode(
41586 &mut self,
41587 decoder: &mut fidl::encoding::Decoder<'_, D>,
41588 offset: usize,
41589 mut depth: fidl::encoding::Depth,
41590 ) -> fidl::Result<()> {
41591 decoder.debug_check_bounds::<Self>(offset);
41592 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41593 None => return Err(fidl::Error::NotNullable),
41594 Some(len) => len,
41595 };
41596 if len == 0 {
41598 return Ok(());
41599 };
41600 depth.increment()?;
41601 let envelope_size = 8;
41602 let bytes_len = len * envelope_size;
41603 let offset = decoder.out_of_line_offset(bytes_len)?;
41604 let mut _next_ordinal_to_read = 0;
41606 let mut next_offset = offset;
41607 let end_offset = offset + bytes_len;
41608 _next_ordinal_to_read += 1;
41609 if next_offset >= end_offset {
41610 return Ok(());
41611 }
41612
41613 while _next_ordinal_to_read < 1 {
41615 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41616 _next_ordinal_to_read += 1;
41617 next_offset += envelope_size;
41618 }
41619
41620 let next_out_of_line = decoder.next_out_of_line();
41621 let handles_before = decoder.remaining_handles();
41622 if let Some((inlined, num_bytes, num_handles)) =
41623 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41624 {
41625 let member_inline_size =
41626 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41627 if inlined != (member_inline_size <= 4) {
41628 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41629 }
41630 let inner_offset;
41631 let mut inner_depth = depth.clone();
41632 if inlined {
41633 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41634 inner_offset = next_offset;
41635 } else {
41636 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41637 inner_depth.increment()?;
41638 }
41639 let val_ref = self.value.get_or_insert_with(|| fidl::new_empty!(u32, D));
41640 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
41641 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41642 {
41643 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41644 }
41645 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41646 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41647 }
41648 }
41649
41650 next_offset += envelope_size;
41651
41652 while next_offset < end_offset {
41654 _next_ordinal_to_read += 1;
41655 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41656 next_offset += envelope_size;
41657 }
41658
41659 Ok(())
41660 }
41661 }
41662
41663 impl XUnionInTable {
41664 #[inline(always)]
41665 fn max_ordinal_present(&self) -> u64 {
41666 if let Some(_) = self.after {
41667 return 3;
41668 }
41669 if let Some(_) = self.xu {
41670 return 2;
41671 }
41672 if let Some(_) = self.before {
41673 return 1;
41674 }
41675 0
41676 }
41677 }
41678
41679 impl fidl::encoding::ValueTypeMarker for XUnionInTable {
41680 type Borrowed<'a> = &'a Self;
41681 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41682 value
41683 }
41684 }
41685
41686 unsafe impl fidl::encoding::TypeMarker for XUnionInTable {
41687 type Owned = Self;
41688
41689 #[inline(always)]
41690 fn inline_align(_context: fidl::encoding::Context) -> usize {
41691 8
41692 }
41693
41694 #[inline(always)]
41695 fn inline_size(_context: fidl::encoding::Context) -> usize {
41696 16
41697 }
41698 }
41699
41700 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionInTable, D>
41701 for &XUnionInTable
41702 {
41703 unsafe fn encode(
41704 self,
41705 encoder: &mut fidl::encoding::Encoder<'_, D>,
41706 offset: usize,
41707 mut depth: fidl::encoding::Depth,
41708 ) -> fidl::Result<()> {
41709 encoder.debug_check_bounds::<XUnionInTable>(offset);
41710 let max_ordinal: u64 = self.max_ordinal_present();
41712 encoder.write_num(max_ordinal, offset);
41713 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
41714 if max_ordinal == 0 {
41716 return Ok(());
41717 }
41718 depth.increment()?;
41719 let envelope_size = 8;
41720 let bytes_len = max_ordinal as usize * envelope_size;
41721 #[allow(unused_variables)]
41722 let offset = encoder.out_of_line_offset(bytes_len);
41723 let mut _prev_end_offset: usize = 0;
41724 if 1 > max_ordinal {
41725 return Ok(());
41726 }
41727
41728 let cur_offset: usize = (1 - 1) * envelope_size;
41731
41732 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41734
41735 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
41740 self.before.as_ref().map(
41741 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
41742 ),
41743 encoder,
41744 offset + cur_offset,
41745 depth,
41746 )?;
41747
41748 _prev_end_offset = cur_offset + envelope_size;
41749 if 2 > max_ordinal {
41750 return Ok(());
41751 }
41752
41753 let cur_offset: usize = (2 - 1) * envelope_size;
41756
41757 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41759
41760 fidl::encoding::encode_in_envelope_optional::<SampleXUnion, D>(
41765 self.xu.as_ref().map(<SampleXUnion as fidl::encoding::ValueTypeMarker>::borrow),
41766 encoder,
41767 offset + cur_offset,
41768 depth,
41769 )?;
41770
41771 _prev_end_offset = cur_offset + envelope_size;
41772 if 3 > max_ordinal {
41773 return Ok(());
41774 }
41775
41776 let cur_offset: usize = (3 - 1) * envelope_size;
41779
41780 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
41782
41783 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
41788 self.after.as_ref().map(
41789 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
41790 ),
41791 encoder,
41792 offset + cur_offset,
41793 depth,
41794 )?;
41795
41796 _prev_end_offset = cur_offset + envelope_size;
41797
41798 Ok(())
41799 }
41800 }
41801
41802 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionInTable {
41803 #[inline(always)]
41804 fn new_empty() -> Self {
41805 Self::default()
41806 }
41807
41808 unsafe fn decode(
41809 &mut self,
41810 decoder: &mut fidl::encoding::Decoder<'_, D>,
41811 offset: usize,
41812 mut depth: fidl::encoding::Depth,
41813 ) -> fidl::Result<()> {
41814 decoder.debug_check_bounds::<Self>(offset);
41815 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
41816 None => return Err(fidl::Error::NotNullable),
41817 Some(len) => len,
41818 };
41819 if len == 0 {
41821 return Ok(());
41822 };
41823 depth.increment()?;
41824 let envelope_size = 8;
41825 let bytes_len = len * envelope_size;
41826 let offset = decoder.out_of_line_offset(bytes_len)?;
41827 let mut _next_ordinal_to_read = 0;
41829 let mut next_offset = offset;
41830 let end_offset = offset + bytes_len;
41831 _next_ordinal_to_read += 1;
41832 if next_offset >= end_offset {
41833 return Ok(());
41834 }
41835
41836 while _next_ordinal_to_read < 1 {
41838 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41839 _next_ordinal_to_read += 1;
41840 next_offset += envelope_size;
41841 }
41842
41843 let next_out_of_line = decoder.next_out_of_line();
41844 let handles_before = decoder.remaining_handles();
41845 if let Some((inlined, num_bytes, num_handles)) =
41846 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41847 {
41848 let member_inline_size =
41849 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
41850 decoder.context,
41851 );
41852 if inlined != (member_inline_size <= 4) {
41853 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41854 }
41855 let inner_offset;
41856 let mut inner_depth = depth.clone();
41857 if inlined {
41858 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41859 inner_offset = next_offset;
41860 } else {
41861 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41862 inner_depth.increment()?;
41863 }
41864 let val_ref = self
41865 .before
41866 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
41867 fidl::decode!(
41868 fidl::encoding::UnboundedString,
41869 D,
41870 val_ref,
41871 decoder,
41872 inner_offset,
41873 inner_depth
41874 )?;
41875 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41876 {
41877 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41878 }
41879 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41880 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41881 }
41882 }
41883
41884 next_offset += envelope_size;
41885 _next_ordinal_to_read += 1;
41886 if next_offset >= end_offset {
41887 return Ok(());
41888 }
41889
41890 while _next_ordinal_to_read < 2 {
41892 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41893 _next_ordinal_to_read += 1;
41894 next_offset += envelope_size;
41895 }
41896
41897 let next_out_of_line = decoder.next_out_of_line();
41898 let handles_before = decoder.remaining_handles();
41899 if let Some((inlined, num_bytes, num_handles)) =
41900 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41901 {
41902 let member_inline_size =
41903 <SampleXUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context);
41904 if inlined != (member_inline_size <= 4) {
41905 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41906 }
41907 let inner_offset;
41908 let mut inner_depth = depth.clone();
41909 if inlined {
41910 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41911 inner_offset = next_offset;
41912 } else {
41913 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41914 inner_depth.increment()?;
41915 }
41916 let val_ref = self.xu.get_or_insert_with(|| fidl::new_empty!(SampleXUnion, D));
41917 fidl::decode!(SampleXUnion, D, val_ref, decoder, inner_offset, inner_depth)?;
41918 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41919 {
41920 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41921 }
41922 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41923 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41924 }
41925 }
41926
41927 next_offset += envelope_size;
41928 _next_ordinal_to_read += 1;
41929 if next_offset >= end_offset {
41930 return Ok(());
41931 }
41932
41933 while _next_ordinal_to_read < 3 {
41935 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41936 _next_ordinal_to_read += 1;
41937 next_offset += envelope_size;
41938 }
41939
41940 let next_out_of_line = decoder.next_out_of_line();
41941 let handles_before = decoder.remaining_handles();
41942 if let Some((inlined, num_bytes, num_handles)) =
41943 fidl::encoding::decode_envelope_header(decoder, next_offset)?
41944 {
41945 let member_inline_size =
41946 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
41947 decoder.context,
41948 );
41949 if inlined != (member_inline_size <= 4) {
41950 return Err(fidl::Error::InvalidInlineBitInEnvelope);
41951 }
41952 let inner_offset;
41953 let mut inner_depth = depth.clone();
41954 if inlined {
41955 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
41956 inner_offset = next_offset;
41957 } else {
41958 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
41959 inner_depth.increment()?;
41960 }
41961 let val_ref = self
41962 .after
41963 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
41964 fidl::decode!(
41965 fidl::encoding::UnboundedString,
41966 D,
41967 val_ref,
41968 decoder,
41969 inner_offset,
41970 inner_depth
41971 )?;
41972 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
41973 {
41974 return Err(fidl::Error::InvalidNumBytesInEnvelope);
41975 }
41976 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
41977 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
41978 }
41979 }
41980
41981 next_offset += envelope_size;
41982
41983 while next_offset < end_offset {
41985 _next_ordinal_to_read += 1;
41986 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
41987 next_offset += envelope_size;
41988 }
41989
41990 Ok(())
41991 }
41992 }
41993
41994 impl fidl::encoding::ValueTypeMarker for CompatUnion {
41995 type Borrowed<'a> = &'a Self;
41996 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
41997 value
41998 }
41999 }
42000
42001 unsafe impl fidl::encoding::TypeMarker for CompatUnion {
42002 type Owned = Self;
42003
42004 #[inline(always)]
42005 fn inline_align(_context: fidl::encoding::Context) -> usize {
42006 8
42007 }
42008
42009 #[inline(always)]
42010 fn inline_size(_context: fidl::encoding::Context) -> usize {
42011 16
42012 }
42013 }
42014
42015 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatUnion, D>
42016 for &CompatUnion
42017 {
42018 #[inline]
42019 unsafe fn encode(
42020 self,
42021 encoder: &mut fidl::encoding::Encoder<'_, D>,
42022 offset: usize,
42023 _depth: fidl::encoding::Depth,
42024 ) -> fidl::Result<()> {
42025 encoder.debug_check_bounds::<CompatUnion>(offset);
42026 encoder.write_num::<u64>(self.ordinal(), offset);
42027 match self {
42028 CompatUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
42029 fidl::encoding::UnboundedString,
42030 D,
42031 >(
42032 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
42033 val,
42034 ),
42035 encoder,
42036 offset + 8,
42037 _depth,
42038 ),
42039 CompatUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
42040 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
42041 encoder,
42042 offset + 8,
42043 _depth,
42044 ),
42045 }
42046 }
42047 }
42048
42049 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatUnion {
42050 #[inline(always)]
42051 fn new_empty() -> Self {
42052 Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
42053 }
42054
42055 #[inline]
42056 unsafe fn decode(
42057 &mut self,
42058 decoder: &mut fidl::encoding::Decoder<'_, D>,
42059 offset: usize,
42060 mut depth: fidl::encoding::Depth,
42061 ) -> fidl::Result<()> {
42062 decoder.debug_check_bounds::<Self>(offset);
42063 #[allow(unused_variables)]
42064 let next_out_of_line = decoder.next_out_of_line();
42065 let handles_before = decoder.remaining_handles();
42066 let (ordinal, inlined, num_bytes, num_handles) =
42067 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42068
42069 let member_inline_size = match ordinal {
42070 1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
42071 decoder.context,
42072 ),
42073 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42074 _ => return Err(fidl::Error::UnknownUnionTag),
42075 };
42076
42077 if inlined != (member_inline_size <= 4) {
42078 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42079 }
42080 let _inner_offset;
42081 if inlined {
42082 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42083 _inner_offset = offset + 8;
42084 } else {
42085 depth.increment()?;
42086 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42087 }
42088 match ordinal {
42089 1 => {
42090 #[allow(irrefutable_let_patterns)]
42091 if let CompatUnion::S(_) = self {
42092 } else {
42094 *self =
42096 CompatUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
42097 }
42098 #[allow(irrefutable_let_patterns)]
42099 if let CompatUnion::S(ref mut val) = self {
42100 fidl::decode!(
42101 fidl::encoding::UnboundedString,
42102 D,
42103 val,
42104 decoder,
42105 _inner_offset,
42106 depth
42107 )?;
42108 } else {
42109 unreachable!()
42110 }
42111 }
42112 2 => {
42113 #[allow(irrefutable_let_patterns)]
42114 if let CompatUnion::B(_) = self {
42115 } else {
42117 *self = CompatUnion::B(fidl::new_empty!(bool, D));
42119 }
42120 #[allow(irrefutable_let_patterns)]
42121 if let CompatUnion::B(ref mut val) = self {
42122 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
42123 } else {
42124 unreachable!()
42125 }
42126 }
42127 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42128 }
42129 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42130 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42131 }
42132 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42133 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42134 }
42135 Ok(())
42136 }
42137 }
42138
42139 impl fidl::encoding::ValueTypeMarker for CompatXUnion {
42140 type Borrowed<'a> = &'a Self;
42141 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42142 value
42143 }
42144 }
42145
42146 unsafe impl fidl::encoding::TypeMarker for CompatXUnion {
42147 type Owned = Self;
42148
42149 #[inline(always)]
42150 fn inline_align(_context: fidl::encoding::Context) -> usize {
42151 8
42152 }
42153
42154 #[inline(always)]
42155 fn inline_size(_context: fidl::encoding::Context) -> usize {
42156 16
42157 }
42158 }
42159
42160 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompatXUnion, D>
42161 for &CompatXUnion
42162 {
42163 #[inline]
42164 unsafe fn encode(
42165 self,
42166 encoder: &mut fidl::encoding::Encoder<'_, D>,
42167 offset: usize,
42168 _depth: fidl::encoding::Depth,
42169 ) -> fidl::Result<()> {
42170 encoder.debug_check_bounds::<CompatXUnion>(offset);
42171 encoder.write_num::<u64>(self.ordinal(), offset);
42172 match self {
42173 CompatXUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
42174 fidl::encoding::UnboundedString,
42175 D,
42176 >(
42177 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
42178 val,
42179 ),
42180 encoder,
42181 offset + 8,
42182 _depth,
42183 ),
42184 CompatXUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
42185 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
42186 encoder,
42187 offset + 8,
42188 _depth,
42189 ),
42190 CompatXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
42191 }
42192 }
42193 }
42194
42195 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompatXUnion {
42196 #[inline(always)]
42197 fn new_empty() -> Self {
42198 Self::__SourceBreaking { unknown_ordinal: 0 }
42199 }
42200
42201 #[inline]
42202 unsafe fn decode(
42203 &mut self,
42204 decoder: &mut fidl::encoding::Decoder<'_, D>,
42205 offset: usize,
42206 mut depth: fidl::encoding::Depth,
42207 ) -> fidl::Result<()> {
42208 decoder.debug_check_bounds::<Self>(offset);
42209 #[allow(unused_variables)]
42210 let next_out_of_line = decoder.next_out_of_line();
42211 let handles_before = decoder.remaining_handles();
42212 let (ordinal, inlined, num_bytes, num_handles) =
42213 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42214
42215 let member_inline_size = match ordinal {
42216 1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
42217 decoder.context,
42218 ),
42219 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42220 0 => return Err(fidl::Error::UnknownUnionTag),
42221 _ => num_bytes as usize,
42222 };
42223
42224 if inlined != (member_inline_size <= 4) {
42225 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42226 }
42227 let _inner_offset;
42228 if inlined {
42229 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42230 _inner_offset = offset + 8;
42231 } else {
42232 depth.increment()?;
42233 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42234 }
42235 match ordinal {
42236 1 => {
42237 #[allow(irrefutable_let_patterns)]
42238 if let CompatXUnion::S(_) = self {
42239 } else {
42241 *self =
42243 CompatXUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
42244 }
42245 #[allow(irrefutable_let_patterns)]
42246 if let CompatXUnion::S(ref mut val) = self {
42247 fidl::decode!(
42248 fidl::encoding::UnboundedString,
42249 D,
42250 val,
42251 decoder,
42252 _inner_offset,
42253 depth
42254 )?;
42255 } else {
42256 unreachable!()
42257 }
42258 }
42259 2 => {
42260 #[allow(irrefutable_let_patterns)]
42261 if let CompatXUnion::B(_) = self {
42262 } else {
42264 *self = CompatXUnion::B(fidl::new_empty!(bool, D));
42266 }
42267 #[allow(irrefutable_let_patterns)]
42268 if let CompatXUnion::B(ref mut val) = self {
42269 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
42270 } else {
42271 unreachable!()
42272 }
42273 }
42274 #[allow(deprecated)]
42275 ordinal => {
42276 for _ in 0..num_handles {
42277 decoder.drop_next_handle()?;
42278 }
42279 *self = CompatXUnion::__SourceBreaking { unknown_ordinal: ordinal };
42280 }
42281 }
42282 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42283 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42284 }
42285 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42286 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42287 }
42288 Ok(())
42289 }
42290 }
42291
42292 impl fidl::encoding::ValueTypeMarker for EmptyFlexibleUnion {
42293 type Borrowed<'a> = &'a Self;
42294 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42295 value
42296 }
42297 }
42298
42299 unsafe impl fidl::encoding::TypeMarker for EmptyFlexibleUnion {
42300 type Owned = Self;
42301
42302 #[inline(always)]
42303 fn inline_align(_context: fidl::encoding::Context) -> usize {
42304 8
42305 }
42306
42307 #[inline(always)]
42308 fn inline_size(_context: fidl::encoding::Context) -> usize {
42309 16
42310 }
42311 }
42312
42313 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyFlexibleUnion, D>
42314 for &EmptyFlexibleUnion
42315 {
42316 #[inline]
42317 unsafe fn encode(
42318 self,
42319 encoder: &mut fidl::encoding::Encoder<'_, D>,
42320 offset: usize,
42321 _depth: fidl::encoding::Depth,
42322 ) -> fidl::Result<()> {
42323 encoder.debug_check_bounds::<EmptyFlexibleUnion>(offset);
42324 encoder.write_num::<u64>(self.ordinal(), offset);
42325 match self {
42326 EmptyFlexibleUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
42327 }
42328 }
42329 }
42330
42331 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyFlexibleUnion {
42332 #[inline(always)]
42333 fn new_empty() -> Self {
42334 Self::__SourceBreaking { unknown_ordinal: 0 }
42335 }
42336
42337 #[inline]
42338 unsafe fn decode(
42339 &mut self,
42340 decoder: &mut fidl::encoding::Decoder<'_, D>,
42341 offset: usize,
42342 mut depth: fidl::encoding::Depth,
42343 ) -> fidl::Result<()> {
42344 decoder.debug_check_bounds::<Self>(offset);
42345 #[allow(unused_variables)]
42346 let next_out_of_line = decoder.next_out_of_line();
42347 let handles_before = decoder.remaining_handles();
42348 let (ordinal, inlined, num_bytes, num_handles) =
42349 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42350
42351 let member_inline_size = match ordinal {
42352 0 => return Err(fidl::Error::UnknownUnionTag),
42353 _ => num_bytes as usize,
42354 };
42355
42356 if inlined != (member_inline_size <= 4) {
42357 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42358 }
42359 let _inner_offset;
42360 if inlined {
42361 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42362 _inner_offset = offset + 8;
42363 } else {
42364 depth.increment()?;
42365 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42366 }
42367 match ordinal {
42368 #[allow(deprecated)]
42369 ordinal => {
42370 for _ in 0..num_handles {
42371 decoder.drop_next_handle()?;
42372 }
42373 *self = EmptyFlexibleUnion::__SourceBreaking { unknown_ordinal: ordinal };
42374 }
42375 }
42376 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42377 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42378 }
42379 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42380 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42381 }
42382 Ok(())
42383 }
42384 }
42385
42386 impl fidl::encoding::ValueTypeMarker for EmptyStructUnion {
42387 type Borrowed<'a> = &'a Self;
42388 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42389 value
42390 }
42391 }
42392
42393 unsafe impl fidl::encoding::TypeMarker for EmptyStructUnion {
42394 type Owned = Self;
42395
42396 #[inline(always)]
42397 fn inline_align(_context: fidl::encoding::Context) -> usize {
42398 8
42399 }
42400
42401 #[inline(always)]
42402 fn inline_size(_context: fidl::encoding::Context) -> usize {
42403 16
42404 }
42405 }
42406
42407 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStructUnion, D>
42408 for &EmptyStructUnion
42409 {
42410 #[inline]
42411 unsafe fn encode(
42412 self,
42413 encoder: &mut fidl::encoding::Encoder<'_, D>,
42414 offset: usize,
42415 _depth: fidl::encoding::Depth,
42416 ) -> fidl::Result<()> {
42417 encoder.debug_check_bounds::<EmptyStructUnion>(offset);
42418 encoder.write_num::<u64>(self.ordinal(), offset);
42419 match self {
42420 EmptyStructUnion::Unused(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
42421 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
42422 encoder,
42423 offset + 8,
42424 _depth,
42425 ),
42426 EmptyStructUnion::Es(ref val) => {
42427 fidl::encoding::encode_in_envelope::<TransformerEmptyStruct, D>(
42428 <TransformerEmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
42429 encoder,
42430 offset + 8,
42431 _depth,
42432 )
42433 }
42434 }
42435 }
42436 }
42437
42438 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStructUnion {
42439 #[inline(always)]
42440 fn new_empty() -> Self {
42441 Self::Unused(fidl::new_empty!(u8, D))
42442 }
42443
42444 #[inline]
42445 unsafe fn decode(
42446 &mut self,
42447 decoder: &mut fidl::encoding::Decoder<'_, D>,
42448 offset: usize,
42449 mut depth: fidl::encoding::Depth,
42450 ) -> fidl::Result<()> {
42451 decoder.debug_check_bounds::<Self>(offset);
42452 #[allow(unused_variables)]
42453 let next_out_of_line = decoder.next_out_of_line();
42454 let handles_before = decoder.remaining_handles();
42455 let (ordinal, inlined, num_bytes, num_handles) =
42456 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42457
42458 let member_inline_size = match ordinal {
42459 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42460 2 => <TransformerEmptyStruct as fidl::encoding::TypeMarker>::inline_size(
42461 decoder.context,
42462 ),
42463 _ => return Err(fidl::Error::UnknownUnionTag),
42464 };
42465
42466 if inlined != (member_inline_size <= 4) {
42467 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42468 }
42469 let _inner_offset;
42470 if inlined {
42471 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42472 _inner_offset = offset + 8;
42473 } else {
42474 depth.increment()?;
42475 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42476 }
42477 match ordinal {
42478 1 => {
42479 #[allow(irrefutable_let_patterns)]
42480 if let EmptyStructUnion::Unused(_) = self {
42481 } else {
42483 *self = EmptyStructUnion::Unused(fidl::new_empty!(u8, D));
42485 }
42486 #[allow(irrefutable_let_patterns)]
42487 if let EmptyStructUnion::Unused(ref mut val) = self {
42488 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
42489 } else {
42490 unreachable!()
42491 }
42492 }
42493 2 => {
42494 #[allow(irrefutable_let_patterns)]
42495 if let EmptyStructUnion::Es(_) = self {
42496 } else {
42498 *self = EmptyStructUnion::Es(fidl::new_empty!(TransformerEmptyStruct, D));
42500 }
42501 #[allow(irrefutable_let_patterns)]
42502 if let EmptyStructUnion::Es(ref mut val) = self {
42503 fidl::decode!(
42504 TransformerEmptyStruct,
42505 D,
42506 val,
42507 decoder,
42508 _inner_offset,
42509 depth
42510 )?;
42511 } else {
42512 unreachable!()
42513 }
42514 }
42515 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42516 }
42517 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42518 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42519 }
42520 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42521 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42522 }
42523 Ok(())
42524 }
42525 }
42526
42527 impl fidl::encoding::ValueTypeMarker for FidlvizUnion {
42528 type Borrowed<'a> = &'a Self;
42529 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42530 value
42531 }
42532 }
42533
42534 unsafe impl fidl::encoding::TypeMarker for FidlvizUnion {
42535 type Owned = Self;
42536
42537 #[inline(always)]
42538 fn inline_align(_context: fidl::encoding::Context) -> usize {
42539 8
42540 }
42541
42542 #[inline(always)]
42543 fn inline_size(_context: fidl::encoding::Context) -> usize {
42544 16
42545 }
42546 }
42547
42548 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FidlvizUnion, D>
42549 for &FidlvizUnion
42550 {
42551 #[inline]
42552 unsafe fn encode(
42553 self,
42554 encoder: &mut fidl::encoding::Encoder<'_, D>,
42555 offset: usize,
42556 _depth: fidl::encoding::Depth,
42557 ) -> fidl::Result<()> {
42558 encoder.debug_check_bounds::<FidlvizUnion>(offset);
42559 encoder.write_num::<u64>(self.ordinal(), offset);
42560 match self {
42561 FidlvizUnion::F7(ref val) => fidl::encoding::encode_in_envelope::<
42562 fidl::encoding::UnboundedString,
42563 D,
42564 >(
42565 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
42566 val,
42567 ),
42568 encoder,
42569 offset + 8,
42570 _depth,
42571 ),
42572 }
42573 }
42574 }
42575
42576 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FidlvizUnion {
42577 #[inline(always)]
42578 fn new_empty() -> Self {
42579 Self::F7(fidl::new_empty!(fidl::encoding::UnboundedString, D))
42580 }
42581
42582 #[inline]
42583 unsafe fn decode(
42584 &mut self,
42585 decoder: &mut fidl::encoding::Decoder<'_, D>,
42586 offset: usize,
42587 mut depth: fidl::encoding::Depth,
42588 ) -> fidl::Result<()> {
42589 decoder.debug_check_bounds::<Self>(offset);
42590 #[allow(unused_variables)]
42591 let next_out_of_line = decoder.next_out_of_line();
42592 let handles_before = decoder.remaining_handles();
42593 let (ordinal, inlined, num_bytes, num_handles) =
42594 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42595
42596 let member_inline_size = match ordinal {
42597 7 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
42598 decoder.context,
42599 ),
42600 _ => return Err(fidl::Error::UnknownUnionTag),
42601 };
42602
42603 if inlined != (member_inline_size <= 4) {
42604 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42605 }
42606 let _inner_offset;
42607 if inlined {
42608 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42609 _inner_offset = offset + 8;
42610 } else {
42611 depth.increment()?;
42612 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42613 }
42614 match ordinal {
42615 7 => {
42616 #[allow(irrefutable_let_patterns)]
42617 if let FidlvizUnion::F7(_) = self {
42618 } else {
42620 *self =
42622 FidlvizUnion::F7(fidl::new_empty!(fidl::encoding::UnboundedString, D));
42623 }
42624 #[allow(irrefutable_let_patterns)]
42625 if let FidlvizUnion::F7(ref mut val) = self {
42626 fidl::decode!(
42627 fidl::encoding::UnboundedString,
42628 D,
42629 val,
42630 decoder,
42631 _inner_offset,
42632 depth
42633 )?;
42634 } else {
42635 unreachable!()
42636 }
42637 }
42638 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42639 }
42640 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42641 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42642 }
42643 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42644 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42645 }
42646 Ok(())
42647 }
42648 }
42649
42650 impl fidl::encoding::ValueTypeMarker for GoldenUnion {
42651 type Borrowed<'a> = &'a Self;
42652 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42653 value
42654 }
42655 }
42656
42657 unsafe impl fidl::encoding::TypeMarker for GoldenUnion {
42658 type Owned = Self;
42659
42660 #[inline(always)]
42661 fn inline_align(_context: fidl::encoding::Context) -> usize {
42662 8
42663 }
42664
42665 #[inline(always)]
42666 fn inline_size(_context: fidl::encoding::Context) -> usize {
42667 16
42668 }
42669 }
42670
42671 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<GoldenUnion, D>
42672 for &GoldenUnion
42673 {
42674 #[inline]
42675 unsafe fn encode(
42676 self,
42677 encoder: &mut fidl::encoding::Encoder<'_, D>,
42678 offset: usize,
42679 _depth: fidl::encoding::Depth,
42680 ) -> fidl::Result<()> {
42681 encoder.debug_check_bounds::<GoldenUnion>(offset);
42682 encoder.write_num::<u64>(self.ordinal(), offset);
42683 match self {
42684 GoldenUnion::V(ref val) => fidl::encoding::encode_in_envelope::<i16, D>(
42685 <i16 as fidl::encoding::ValueTypeMarker>::borrow(val),
42686 encoder,
42687 offset + 8,
42688 _depth,
42689 ),
42690 }
42691 }
42692 }
42693
42694 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GoldenUnion {
42695 #[inline(always)]
42696 fn new_empty() -> Self {
42697 Self::V(fidl::new_empty!(i16, D))
42698 }
42699
42700 #[inline]
42701 unsafe fn decode(
42702 &mut self,
42703 decoder: &mut fidl::encoding::Decoder<'_, D>,
42704 offset: usize,
42705 mut depth: fidl::encoding::Depth,
42706 ) -> fidl::Result<()> {
42707 decoder.debug_check_bounds::<Self>(offset);
42708 #[allow(unused_variables)]
42709 let next_out_of_line = decoder.next_out_of_line();
42710 let handles_before = decoder.remaining_handles();
42711 let (ordinal, inlined, num_bytes, num_handles) =
42712 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42713
42714 let member_inline_size = match ordinal {
42715 1 => <i16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42716 _ => return Err(fidl::Error::UnknownUnionTag),
42717 };
42718
42719 if inlined != (member_inline_size <= 4) {
42720 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42721 }
42722 let _inner_offset;
42723 if inlined {
42724 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42725 _inner_offset = offset + 8;
42726 } else {
42727 depth.increment()?;
42728 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42729 }
42730 match ordinal {
42731 1 => {
42732 #[allow(irrefutable_let_patterns)]
42733 if let GoldenUnion::V(_) = self {
42734 } else {
42736 *self = GoldenUnion::V(fidl::new_empty!(i16, D));
42738 }
42739 #[allow(irrefutable_let_patterns)]
42740 if let GoldenUnion::V(ref mut val) = self {
42741 fidl::decode!(i16, D, val, decoder, _inner_offset, depth)?;
42742 } else {
42743 unreachable!()
42744 }
42745 }
42746 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42747 }
42748 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42749 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42750 }
42751 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42752 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42753 }
42754 Ok(())
42755 }
42756 }
42757
42758 impl fidl::encoding::ValueTypeMarker for IpAddressConfig {
42759 type Borrowed<'a> = &'a Self;
42760 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42761 value
42762 }
42763 }
42764
42765 unsafe impl fidl::encoding::TypeMarker for IpAddressConfig {
42766 type Owned = Self;
42767
42768 #[inline(always)]
42769 fn inline_align(_context: fidl::encoding::Context) -> usize {
42770 8
42771 }
42772
42773 #[inline(always)]
42774 fn inline_size(_context: fidl::encoding::Context) -> usize {
42775 16
42776 }
42777 }
42778
42779 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<IpAddressConfig, D>
42780 for &IpAddressConfig
42781 {
42782 #[inline]
42783 unsafe fn encode(
42784 self,
42785 encoder: &mut fidl::encoding::Encoder<'_, D>,
42786 offset: usize,
42787 _depth: fidl::encoding::Depth,
42788 ) -> fidl::Result<()> {
42789 encoder.debug_check_bounds::<IpAddressConfig>(offset);
42790 encoder.write_num::<u64>(self.ordinal(), offset);
42791 match self {
42792 IpAddressConfig::PaddingSize24Align4(ref val) => {
42793 fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u32, 6>, D>(
42794 <fidl::encoding::Array<u32, 6> as fidl::encoding::ValueTypeMarker>::borrow(
42795 val,
42796 ),
42797 encoder,
42798 offset + 8,
42799 _depth,
42800 )
42801 }
42802 IpAddressConfig::Dhcp(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
42803 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
42804 encoder,
42805 offset + 8,
42806 _depth,
42807 ),
42808 }
42809 }
42810 }
42811
42812 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for IpAddressConfig {
42813 #[inline(always)]
42814 fn new_empty() -> Self {
42815 Self::PaddingSize24Align4(fidl::new_empty!(fidl::encoding::Array<u32, 6>, D))
42816 }
42817
42818 #[inline]
42819 unsafe fn decode(
42820 &mut self,
42821 decoder: &mut fidl::encoding::Decoder<'_, D>,
42822 offset: usize,
42823 mut depth: fidl::encoding::Depth,
42824 ) -> fidl::Result<()> {
42825 decoder.debug_check_bounds::<Self>(offset);
42826 #[allow(unused_variables)]
42827 let next_out_of_line = decoder.next_out_of_line();
42828 let handles_before = decoder.remaining_handles();
42829 let (ordinal, inlined, num_bytes, num_handles) =
42830 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42831
42832 let member_inline_size = match ordinal {
42833 1 => <fidl::encoding::Array<u32, 6> as fidl::encoding::TypeMarker>::inline_size(
42834 decoder.context,
42835 ),
42836 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
42837 _ => return Err(fidl::Error::UnknownUnionTag),
42838 };
42839
42840 if inlined != (member_inline_size <= 4) {
42841 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42842 }
42843 let _inner_offset;
42844 if inlined {
42845 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42846 _inner_offset = offset + 8;
42847 } else {
42848 depth.increment()?;
42849 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42850 }
42851 match ordinal {
42852 1 => {
42853 #[allow(irrefutable_let_patterns)]
42854 if let IpAddressConfig::PaddingSize24Align4(_) = self {
42855 } else {
42857 *self = IpAddressConfig::PaddingSize24Align4(
42859 fidl::new_empty!(fidl::encoding::Array<u32, 6>, D),
42860 );
42861 }
42862 #[allow(irrefutable_let_patterns)]
42863 if let IpAddressConfig::PaddingSize24Align4(ref mut val) = self {
42864 fidl::decode!(fidl::encoding::Array<u32, 6>, D, val, decoder, _inner_offset, depth)?;
42865 } else {
42866 unreachable!()
42867 }
42868 }
42869 2 => {
42870 #[allow(irrefutable_let_patterns)]
42871 if let IpAddressConfig::Dhcp(_) = self {
42872 } else {
42874 *self = IpAddressConfig::Dhcp(fidl::new_empty!(bool, D));
42876 }
42877 #[allow(irrefutable_let_patterns)]
42878 if let IpAddressConfig::Dhcp(ref mut val) = self {
42879 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
42880 } else {
42881 unreachable!()
42882 }
42883 }
42884 ordinal => panic!("unexpected ordinal {:?}", ordinal),
42885 }
42886 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
42887 return Err(fidl::Error::InvalidNumBytesInEnvelope);
42888 }
42889 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
42890 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
42891 }
42892 Ok(())
42893 }
42894 }
42895
42896 impl fidl::encoding::ValueTypeMarker for MutualRecursionUnion {
42897 type Borrowed<'a> = &'a Self;
42898 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
42899 value
42900 }
42901 }
42902
42903 unsafe impl fidl::encoding::TypeMarker for MutualRecursionUnion {
42904 type Owned = Self;
42905
42906 #[inline(always)]
42907 fn inline_align(_context: fidl::encoding::Context) -> usize {
42908 8
42909 }
42910
42911 #[inline(always)]
42912 fn inline_size(_context: fidl::encoding::Context) -> usize {
42913 16
42914 }
42915 }
42916
42917 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MutualRecursionUnion, D>
42918 for &MutualRecursionUnion
42919 {
42920 #[inline]
42921 unsafe fn encode(
42922 self,
42923 encoder: &mut fidl::encoding::Encoder<'_, D>,
42924 offset: usize,
42925 _depth: fidl::encoding::Depth,
42926 ) -> fidl::Result<()> {
42927 encoder.debug_check_bounds::<MutualRecursionUnion>(offset);
42928 encoder.write_num::<u64>(self.ordinal(), offset);
42929 match self {
42930 MutualRecursionUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
42931 MutualRecursionUnionStruct,
42932 D,
42933 >(
42934 <MutualRecursionUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
42935 encoder,
42936 offset + 8,
42937 _depth,
42938 ),
42939 }
42940 }
42941 }
42942
42943 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MutualRecursionUnion {
42944 #[inline(always)]
42945 fn new_empty() -> Self {
42946 Self::S(fidl::new_empty!(MutualRecursionUnionStruct, D))
42947 }
42948
42949 #[inline]
42950 unsafe fn decode(
42951 &mut self,
42952 decoder: &mut fidl::encoding::Decoder<'_, D>,
42953 offset: usize,
42954 mut depth: fidl::encoding::Depth,
42955 ) -> fidl::Result<()> {
42956 decoder.debug_check_bounds::<Self>(offset);
42957 #[allow(unused_variables)]
42958 let next_out_of_line = decoder.next_out_of_line();
42959 let handles_before = decoder.remaining_handles();
42960 let (ordinal, inlined, num_bytes, num_handles) =
42961 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
42962
42963 let member_inline_size = match ordinal {
42964 1 => <MutualRecursionUnionStruct as fidl::encoding::TypeMarker>::inline_size(
42965 decoder.context,
42966 ),
42967 _ => return Err(fidl::Error::UnknownUnionTag),
42968 };
42969
42970 if inlined != (member_inline_size <= 4) {
42971 return Err(fidl::Error::InvalidInlineBitInEnvelope);
42972 }
42973 let _inner_offset;
42974 if inlined {
42975 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
42976 _inner_offset = offset + 8;
42977 } else {
42978 depth.increment()?;
42979 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
42980 }
42981 match ordinal {
42982 1 => {
42983 #[allow(irrefutable_let_patterns)]
42984 if let MutualRecursionUnion::S(_) = self {
42985 } else {
42987 *self = MutualRecursionUnion::S(fidl::new_empty!(
42989 MutualRecursionUnionStruct,
42990 D
42991 ));
42992 }
42993 #[allow(irrefutable_let_patterns)]
42994 if let MutualRecursionUnion::S(ref mut val) = self {
42995 fidl::decode!(
42996 MutualRecursionUnionStruct,
42997 D,
42998 val,
42999 decoder,
43000 _inner_offset,
43001 depth
43002 )?;
43003 } else {
43004 unreachable!()
43005 }
43006 }
43007 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43008 }
43009 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43010 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43011 }
43012 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43013 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43014 }
43015 Ok(())
43016 }
43017 }
43018
43019 impl fidl::encoding::ValueTypeMarker for PaddedUnion {
43020 type Borrowed<'a> = &'a Self;
43021 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43022 value
43023 }
43024 }
43025
43026 unsafe impl fidl::encoding::TypeMarker for PaddedUnion {
43027 type Owned = Self;
43028
43029 #[inline(always)]
43030 fn inline_align(_context: fidl::encoding::Context) -> usize {
43031 8
43032 }
43033
43034 #[inline(always)]
43035 fn inline_size(_context: fidl::encoding::Context) -> usize {
43036 16
43037 }
43038 }
43039
43040 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PaddedUnion, D>
43041 for &PaddedUnion
43042 {
43043 #[inline]
43044 unsafe fn encode(
43045 self,
43046 encoder: &mut fidl::encoding::Encoder<'_, D>,
43047 offset: usize,
43048 _depth: fidl::encoding::Depth,
43049 ) -> fidl::Result<()> {
43050 encoder.debug_check_bounds::<PaddedUnion>(offset);
43051 encoder.write_num::<u64>(self.ordinal(), offset);
43052 match self {
43053 PaddedUnion::Field(ref val) => fidl::encoding::encode_in_envelope::<i8, D>(
43054 <i8 as fidl::encoding::ValueTypeMarker>::borrow(val),
43055 encoder,
43056 offset + 8,
43057 _depth,
43058 ),
43059 }
43060 }
43061 }
43062
43063 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PaddedUnion {
43064 #[inline(always)]
43065 fn new_empty() -> Self {
43066 Self::Field(fidl::new_empty!(i8, D))
43067 }
43068
43069 #[inline]
43070 unsafe fn decode(
43071 &mut self,
43072 decoder: &mut fidl::encoding::Decoder<'_, D>,
43073 offset: usize,
43074 mut depth: fidl::encoding::Depth,
43075 ) -> fidl::Result<()> {
43076 decoder.debug_check_bounds::<Self>(offset);
43077 #[allow(unused_variables)]
43078 let next_out_of_line = decoder.next_out_of_line();
43079 let handles_before = decoder.remaining_handles();
43080 let (ordinal, inlined, num_bytes, num_handles) =
43081 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43082
43083 let member_inline_size = match ordinal {
43084 1 => <i8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43085 _ => return Err(fidl::Error::UnknownUnionTag),
43086 };
43087
43088 if inlined != (member_inline_size <= 4) {
43089 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43090 }
43091 let _inner_offset;
43092 if inlined {
43093 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43094 _inner_offset = offset + 8;
43095 } else {
43096 depth.increment()?;
43097 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43098 }
43099 match ordinal {
43100 1 => {
43101 #[allow(irrefutable_let_patterns)]
43102 if let PaddedUnion::Field(_) = self {
43103 } else {
43105 *self = PaddedUnion::Field(fidl::new_empty!(i8, D));
43107 }
43108 #[allow(irrefutable_let_patterns)]
43109 if let PaddedUnion::Field(ref mut val) = self {
43110 fidl::decode!(i8, D, val, decoder, _inner_offset, depth)?;
43111 } else {
43112 unreachable!()
43113 }
43114 }
43115 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43116 }
43117 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43118 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43119 }
43120 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43121 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43122 }
43123 Ok(())
43124 }
43125 }
43126
43127 impl fidl::encoding::ValueTypeMarker for RecursiveOptionalAndUnion {
43128 type Borrowed<'a> = &'a Self;
43129 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43130 value
43131 }
43132 }
43133
43134 unsafe impl fidl::encoding::TypeMarker for RecursiveOptionalAndUnion {
43135 type Owned = Self;
43136
43137 #[inline(always)]
43138 fn inline_align(_context: fidl::encoding::Context) -> usize {
43139 8
43140 }
43141
43142 #[inline(always)]
43143 fn inline_size(_context: fidl::encoding::Context) -> usize {
43144 16
43145 }
43146 }
43147
43148 unsafe impl<D: fidl::encoding::ResourceDialect>
43149 fidl::encoding::Encode<RecursiveOptionalAndUnion, D> for &RecursiveOptionalAndUnion
43150 {
43151 #[inline]
43152 unsafe fn encode(
43153 self,
43154 encoder: &mut fidl::encoding::Encoder<'_, D>,
43155 offset: usize,
43156 _depth: fidl::encoding::Depth,
43157 ) -> fidl::Result<()> {
43158 encoder.debug_check_bounds::<RecursiveOptionalAndUnion>(offset);
43159 encoder.write_num::<u64>(self.ordinal(), offset);
43160 match self {
43161 RecursiveOptionalAndUnion::RecursiveOptional(ref val) => {
43162 fidl::encoding::encode_in_envelope::<RecursiveOptionalStruct, D>(
43163 <RecursiveOptionalStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
43164 encoder,
43165 offset + 8,
43166 _depth,
43167 )
43168 }
43169 }
43170 }
43171 }
43172
43173 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
43174 for RecursiveOptionalAndUnion
43175 {
43176 #[inline(always)]
43177 fn new_empty() -> Self {
43178 Self::RecursiveOptional(fidl::new_empty!(RecursiveOptionalStruct, D))
43179 }
43180
43181 #[inline]
43182 unsafe fn decode(
43183 &mut self,
43184 decoder: &mut fidl::encoding::Decoder<'_, D>,
43185 offset: usize,
43186 mut depth: fidl::encoding::Depth,
43187 ) -> fidl::Result<()> {
43188 decoder.debug_check_bounds::<Self>(offset);
43189 #[allow(unused_variables)]
43190 let next_out_of_line = decoder.next_out_of_line();
43191 let handles_before = decoder.remaining_handles();
43192 let (ordinal, inlined, num_bytes, num_handles) =
43193 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43194
43195 let member_inline_size = match ordinal {
43196 1 => <RecursiveOptionalStruct as fidl::encoding::TypeMarker>::inline_size(
43197 decoder.context,
43198 ),
43199 _ => return Err(fidl::Error::UnknownUnionTag),
43200 };
43201
43202 if inlined != (member_inline_size <= 4) {
43203 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43204 }
43205 let _inner_offset;
43206 if inlined {
43207 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43208 _inner_offset = offset + 8;
43209 } else {
43210 depth.increment()?;
43211 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43212 }
43213 match ordinal {
43214 1 => {
43215 #[allow(irrefutable_let_patterns)]
43216 if let RecursiveOptionalAndUnion::RecursiveOptional(_) = self {
43217 } else {
43219 *self = RecursiveOptionalAndUnion::RecursiveOptional(fidl::new_empty!(
43221 RecursiveOptionalStruct,
43222 D
43223 ));
43224 }
43225 #[allow(irrefutable_let_patterns)]
43226 if let RecursiveOptionalAndUnion::RecursiveOptional(ref mut val) = self {
43227 fidl::decode!(
43228 RecursiveOptionalStruct,
43229 D,
43230 val,
43231 decoder,
43232 _inner_offset,
43233 depth
43234 )?;
43235 } else {
43236 unreachable!()
43237 }
43238 }
43239 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43240 }
43241 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43242 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43243 }
43244 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43245 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43246 }
43247 Ok(())
43248 }
43249 }
43250
43251 impl fidl::encoding::ValueTypeMarker for RecursiveUnion {
43252 type Borrowed<'a> = &'a Self;
43253 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43254 value
43255 }
43256 }
43257
43258 unsafe impl fidl::encoding::TypeMarker for RecursiveUnion {
43259 type Owned = Self;
43260
43261 #[inline(always)]
43262 fn inline_align(_context: fidl::encoding::Context) -> usize {
43263 8
43264 }
43265
43266 #[inline(always)]
43267 fn inline_size(_context: fidl::encoding::Context) -> usize {
43268 16
43269 }
43270 }
43271
43272 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveUnion, D>
43273 for &RecursiveUnion
43274 {
43275 #[inline]
43276 unsafe fn encode(
43277 self,
43278 encoder: &mut fidl::encoding::Encoder<'_, D>,
43279 offset: usize,
43280 _depth: fidl::encoding::Depth,
43281 ) -> fidl::Result<()> {
43282 encoder.debug_check_bounds::<RecursiveUnion>(offset);
43283 encoder.write_num::<u64>(self.ordinal(), offset);
43284 match self {
43285 RecursiveUnion::S(ref val) => {
43286 fidl::encoding::encode_in_envelope::<RecursiveUnionStruct, D>(
43287 <RecursiveUnionStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
43288 encoder,
43289 offset + 8,
43290 _depth,
43291 )
43292 }
43293 RecursiveUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
43294 }
43295 }
43296 }
43297
43298 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveUnion {
43299 #[inline(always)]
43300 fn new_empty() -> Self {
43301 Self::__SourceBreaking { unknown_ordinal: 0 }
43302 }
43303
43304 #[inline]
43305 unsafe fn decode(
43306 &mut self,
43307 decoder: &mut fidl::encoding::Decoder<'_, D>,
43308 offset: usize,
43309 mut depth: fidl::encoding::Depth,
43310 ) -> fidl::Result<()> {
43311 decoder.debug_check_bounds::<Self>(offset);
43312 #[allow(unused_variables)]
43313 let next_out_of_line = decoder.next_out_of_line();
43314 let handles_before = decoder.remaining_handles();
43315 let (ordinal, inlined, num_bytes, num_handles) =
43316 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43317
43318 let member_inline_size = match ordinal {
43319 1 => <RecursiveUnionStruct as fidl::encoding::TypeMarker>::inline_size(
43320 decoder.context,
43321 ),
43322 0 => return Err(fidl::Error::UnknownUnionTag),
43323 _ => num_bytes as usize,
43324 };
43325
43326 if inlined != (member_inline_size <= 4) {
43327 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43328 }
43329 let _inner_offset;
43330 if inlined {
43331 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43332 _inner_offset = offset + 8;
43333 } else {
43334 depth.increment()?;
43335 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43336 }
43337 match ordinal {
43338 1 => {
43339 #[allow(irrefutable_let_patterns)]
43340 if let RecursiveUnion::S(_) = self {
43341 } else {
43343 *self = RecursiveUnion::S(fidl::new_empty!(RecursiveUnionStruct, D));
43345 }
43346 #[allow(irrefutable_let_patterns)]
43347 if let RecursiveUnion::S(ref mut val) = self {
43348 fidl::decode!(RecursiveUnionStruct, D, val, decoder, _inner_offset, depth)?;
43349 } else {
43350 unreachable!()
43351 }
43352 }
43353 #[allow(deprecated)]
43354 ordinal => {
43355 for _ in 0..num_handles {
43356 decoder.drop_next_handle()?;
43357 }
43358 *self = RecursiveUnion::__SourceBreaking { unknown_ordinal: ordinal };
43359 }
43360 }
43361 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43362 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43363 }
43364 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43365 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43366 }
43367 Ok(())
43368 }
43369 }
43370
43371 impl fidl::encoding::ValueTypeMarker for RecursiveVectorUnion {
43372 type Borrowed<'a> = &'a Self;
43373 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43374 value
43375 }
43376 }
43377
43378 unsafe impl fidl::encoding::TypeMarker for RecursiveVectorUnion {
43379 type Owned = Self;
43380
43381 #[inline(always)]
43382 fn inline_align(_context: fidl::encoding::Context) -> usize {
43383 8
43384 }
43385
43386 #[inline(always)]
43387 fn inline_size(_context: fidl::encoding::Context) -> usize {
43388 16
43389 }
43390 }
43391
43392 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RecursiveVectorUnion, D>
43393 for &RecursiveVectorUnion
43394 {
43395 #[inline]
43396 unsafe fn encode(
43397 self,
43398 encoder: &mut fidl::encoding::Encoder<'_, D>,
43399 offset: usize,
43400 _depth: fidl::encoding::Depth,
43401 ) -> fidl::Result<()> {
43402 encoder.debug_check_bounds::<RecursiveVectorUnion>(offset);
43403 encoder.write_num::<u64>(self.ordinal(), offset);
43404 match self {
43405 RecursiveVectorUnion::Vec(ref val) => fidl::encoding::encode_in_envelope::<
43406 fidl::encoding::UnboundedVector<
43407 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43408 >,
43409 D,
43410 >(
43411 <fidl::encoding::UnboundedVector<
43412 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43413 > as fidl::encoding::ValueTypeMarker>::borrow(val),
43414 encoder,
43415 offset + 8,
43416 _depth,
43417 ),
43418 }
43419 }
43420 }
43421
43422 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RecursiveVectorUnion {
43423 #[inline(always)]
43424 fn new_empty() -> Self {
43425 Self::Vec(fidl::new_empty!(
43426 fidl::encoding::UnboundedVector<
43427 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43428 >,
43429 D
43430 ))
43431 }
43432
43433 #[inline]
43434 unsafe fn decode(
43435 &mut self,
43436 decoder: &mut fidl::encoding::Decoder<'_, D>,
43437 offset: usize,
43438 mut depth: fidl::encoding::Depth,
43439 ) -> fidl::Result<()> {
43440 decoder.debug_check_bounds::<Self>(offset);
43441 #[allow(unused_variables)]
43442 let next_out_of_line = decoder.next_out_of_line();
43443 let handles_before = decoder.remaining_handles();
43444 let (ordinal, inlined, num_bytes, num_handles) =
43445 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43446
43447 let member_inline_size = match ordinal {
43448 1 => <fidl::encoding::UnboundedVector<
43449 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43450 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43451 _ => return Err(fidl::Error::UnknownUnionTag),
43452 };
43453
43454 if inlined != (member_inline_size <= 4) {
43455 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43456 }
43457 let _inner_offset;
43458 if inlined {
43459 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43460 _inner_offset = offset + 8;
43461 } else {
43462 depth.increment()?;
43463 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43464 }
43465 match ordinal {
43466 1 => {
43467 #[allow(irrefutable_let_patterns)]
43468 if let RecursiveVectorUnion::Vec(_) = self {
43469 } else {
43471 *self = RecursiveVectorUnion::Vec(fidl::new_empty!(
43473 fidl::encoding::UnboundedVector<
43474 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43475 >,
43476 D
43477 ));
43478 }
43479 #[allow(irrefutable_let_patterns)]
43480 if let RecursiveVectorUnion::Vec(ref mut val) = self {
43481 fidl::decode!(
43482 fidl::encoding::UnboundedVector<
43483 fidl::encoding::OptionalUnion<RecursiveVectorUnion>,
43484 >,
43485 D,
43486 val,
43487 decoder,
43488 _inner_offset,
43489 depth
43490 )?;
43491 } else {
43492 unreachable!()
43493 }
43494 }
43495 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43496 }
43497 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43498 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43499 }
43500 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43501 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43502 }
43503 Ok(())
43504 }
43505 }
43506
43507 impl fidl::encoding::ValueTypeMarker for Regression9Result {
43508 type Borrowed<'a> = &'a Self;
43509 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43510 value
43511 }
43512 }
43513
43514 unsafe impl fidl::encoding::TypeMarker for Regression9Result {
43515 type Owned = Self;
43516
43517 #[inline(always)]
43518 fn inline_align(_context: fidl::encoding::Context) -> usize {
43519 8
43520 }
43521
43522 #[inline(always)]
43523 fn inline_size(_context: fidl::encoding::Context) -> usize {
43524 16
43525 }
43526 }
43527
43528 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Regression9Result, D>
43529 for &Regression9Result
43530 {
43531 #[inline]
43532 unsafe fn encode(
43533 self,
43534 encoder: &mut fidl::encoding::Encoder<'_, D>,
43535 offset: usize,
43536 _depth: fidl::encoding::Depth,
43537 ) -> fidl::Result<()> {
43538 encoder.debug_check_bounds::<Regression9Result>(offset);
43539 encoder.write_num::<u64>(self.ordinal(), offset);
43540 match self {
43541 Regression9Result::Ok(ref val) => {
43542 fidl::encoding::encode_in_envelope::<Regression9Value, D>(
43543 <Regression9Value as fidl::encoding::ValueTypeMarker>::borrow(val),
43544 encoder,
43545 offset + 8,
43546 _depth,
43547 )
43548 }
43549 Regression9Result::Error(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
43550 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
43551 encoder,
43552 offset + 8,
43553 _depth,
43554 ),
43555 }
43556 }
43557 }
43558
43559 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Regression9Result {
43560 #[inline(always)]
43561 fn new_empty() -> Self {
43562 Self::Ok(fidl::new_empty!(Regression9Value, D))
43563 }
43564
43565 #[inline]
43566 unsafe fn decode(
43567 &mut self,
43568 decoder: &mut fidl::encoding::Decoder<'_, D>,
43569 offset: usize,
43570 mut depth: fidl::encoding::Depth,
43571 ) -> fidl::Result<()> {
43572 decoder.debug_check_bounds::<Self>(offset);
43573 #[allow(unused_variables)]
43574 let next_out_of_line = decoder.next_out_of_line();
43575 let handles_before = decoder.remaining_handles();
43576 let (ordinal, inlined, num_bytes, num_handles) =
43577 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43578
43579 let member_inline_size = match ordinal {
43580 1 => <Regression9Value as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43581 2 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43582 _ => return Err(fidl::Error::UnknownUnionTag),
43583 };
43584
43585 if inlined != (member_inline_size <= 4) {
43586 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43587 }
43588 let _inner_offset;
43589 if inlined {
43590 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43591 _inner_offset = offset + 8;
43592 } else {
43593 depth.increment()?;
43594 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43595 }
43596 match ordinal {
43597 1 => {
43598 #[allow(irrefutable_let_patterns)]
43599 if let Regression9Result::Ok(_) = self {
43600 } else {
43602 *self = Regression9Result::Ok(fidl::new_empty!(Regression9Value, D));
43604 }
43605 #[allow(irrefutable_let_patterns)]
43606 if let Regression9Result::Ok(ref mut val) = self {
43607 fidl::decode!(Regression9Value, D, val, decoder, _inner_offset, depth)?;
43608 } else {
43609 unreachable!()
43610 }
43611 }
43612 2 => {
43613 #[allow(irrefutable_let_patterns)]
43614 if let Regression9Result::Error(_) = self {
43615 } else {
43617 *self = Regression9Result::Error(fidl::new_empty!(u32, D));
43619 }
43620 #[allow(irrefutable_let_patterns)]
43621 if let Regression9Result::Error(ref mut val) = self {
43622 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
43623 } else {
43624 unreachable!()
43625 }
43626 }
43627 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43628 }
43629 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43630 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43631 }
43632 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43633 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43634 }
43635 Ok(())
43636 }
43637 }
43638
43639 impl fidl::encoding::ValueTypeMarker for ReverseOrdinalUnion {
43640 type Borrowed<'a> = &'a Self;
43641 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43642 value
43643 }
43644 }
43645
43646 unsafe impl fidl::encoding::TypeMarker for ReverseOrdinalUnion {
43647 type Owned = Self;
43648
43649 #[inline(always)]
43650 fn inline_align(_context: fidl::encoding::Context) -> usize {
43651 8
43652 }
43653
43654 #[inline(always)]
43655 fn inline_size(_context: fidl::encoding::Context) -> usize {
43656 16
43657 }
43658 }
43659
43660 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReverseOrdinalUnion, D>
43661 for &ReverseOrdinalUnion
43662 {
43663 #[inline]
43664 unsafe fn encode(
43665 self,
43666 encoder: &mut fidl::encoding::Encoder<'_, D>,
43667 offset: usize,
43668 _depth: fidl::encoding::Depth,
43669 ) -> fidl::Result<()> {
43670 encoder.debug_check_bounds::<ReverseOrdinalUnion>(offset);
43671 encoder.write_num::<u64>(self.ordinal(), offset);
43672 match self {
43673 ReverseOrdinalUnion::Z(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
43674 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
43675 encoder,
43676 offset + 8,
43677 _depth,
43678 ),
43679 ReverseOrdinalUnion::Y(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
43680 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
43681 encoder,
43682 offset + 8,
43683 _depth,
43684 ),
43685 ReverseOrdinalUnion::X(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
43686 <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
43687 encoder,
43688 offset + 8,
43689 _depth,
43690 ),
43691 }
43692 }
43693 }
43694
43695 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReverseOrdinalUnion {
43696 #[inline(always)]
43697 fn new_empty() -> Self {
43698 Self::Z(fidl::new_empty!(u32, D))
43699 }
43700
43701 #[inline]
43702 unsafe fn decode(
43703 &mut self,
43704 decoder: &mut fidl::encoding::Decoder<'_, D>,
43705 offset: usize,
43706 mut depth: fidl::encoding::Depth,
43707 ) -> fidl::Result<()> {
43708 decoder.debug_check_bounds::<Self>(offset);
43709 #[allow(unused_variables)]
43710 let next_out_of_line = decoder.next_out_of_line();
43711 let handles_before = decoder.remaining_handles();
43712 let (ordinal, inlined, num_bytes, num_handles) =
43713 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43714
43715 let member_inline_size = match ordinal {
43716 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43717 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43718 4 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43719 _ => return Err(fidl::Error::UnknownUnionTag),
43720 };
43721
43722 if inlined != (member_inline_size <= 4) {
43723 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43724 }
43725 let _inner_offset;
43726 if inlined {
43727 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43728 _inner_offset = offset + 8;
43729 } else {
43730 depth.increment()?;
43731 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43732 }
43733 match ordinal {
43734 1 => {
43735 #[allow(irrefutable_let_patterns)]
43736 if let ReverseOrdinalUnion::Z(_) = self {
43737 } else {
43739 *self = ReverseOrdinalUnion::Z(fidl::new_empty!(u32, D));
43741 }
43742 #[allow(irrefutable_let_patterns)]
43743 if let ReverseOrdinalUnion::Z(ref mut val) = self {
43744 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
43745 } else {
43746 unreachable!()
43747 }
43748 }
43749 2 => {
43750 #[allow(irrefutable_let_patterns)]
43751 if let ReverseOrdinalUnion::Y(_) = self {
43752 } else {
43754 *self = ReverseOrdinalUnion::Y(fidl::new_empty!(bool, D));
43756 }
43757 #[allow(irrefutable_let_patterns)]
43758 if let ReverseOrdinalUnion::Y(ref mut val) = self {
43759 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
43760 } else {
43761 unreachable!()
43762 }
43763 }
43764 4 => {
43765 #[allow(irrefutable_let_patterns)]
43766 if let ReverseOrdinalUnion::X(_) = self {
43767 } else {
43769 *self = ReverseOrdinalUnion::X(fidl::new_empty!(i64, D));
43771 }
43772 #[allow(irrefutable_let_patterns)]
43773 if let ReverseOrdinalUnion::X(ref mut val) = self {
43774 fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
43775 } else {
43776 unreachable!()
43777 }
43778 }
43779 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43780 }
43781 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43782 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43783 }
43784 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43785 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43786 }
43787 Ok(())
43788 }
43789 }
43790
43791 impl fidl::encoding::ValueTypeMarker for SampleStrictXUnion {
43792 type Borrowed<'a> = &'a Self;
43793 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43794 value
43795 }
43796 }
43797
43798 unsafe impl fidl::encoding::TypeMarker for SampleStrictXUnion {
43799 type Owned = Self;
43800
43801 #[inline(always)]
43802 fn inline_align(_context: fidl::encoding::Context) -> usize {
43803 8
43804 }
43805
43806 #[inline(always)]
43807 fn inline_size(_context: fidl::encoding::Context) -> usize {
43808 16
43809 }
43810 }
43811
43812 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SampleStrictXUnion, D>
43813 for &SampleStrictXUnion
43814 {
43815 #[inline]
43816 unsafe fn encode(
43817 self,
43818 encoder: &mut fidl::encoding::Encoder<'_, D>,
43819 offset: usize,
43820 _depth: fidl::encoding::Depth,
43821 ) -> fidl::Result<()> {
43822 encoder.debug_check_bounds::<SampleStrictXUnion>(offset);
43823 encoder.write_num::<u64>(self.ordinal(), offset);
43824 match self {
43825 SampleStrictXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
43826 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
43827 encoder,
43828 offset + 8,
43829 _depth,
43830 ),
43831 SampleStrictXUnion::Su(ref val) => {
43832 fidl::encoding::encode_in_envelope::<SimpleUnion, D>(
43833 <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
43834 encoder,
43835 offset + 8,
43836 _depth,
43837 )
43838 }
43839 SampleStrictXUnion::St(ref val) => {
43840 fidl::encoding::encode_in_envelope::<SimpleTable, D>(
43841 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
43842 encoder,
43843 offset + 8,
43844 _depth,
43845 )
43846 }
43847 }
43848 }
43849 }
43850
43851 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SampleStrictXUnion {
43852 #[inline(always)]
43853 fn new_empty() -> Self {
43854 Self::U(fidl::new_empty!(u32, D))
43855 }
43856
43857 #[inline]
43858 unsafe fn decode(
43859 &mut self,
43860 decoder: &mut fidl::encoding::Decoder<'_, D>,
43861 offset: usize,
43862 mut depth: fidl::encoding::Depth,
43863 ) -> fidl::Result<()> {
43864 decoder.debug_check_bounds::<Self>(offset);
43865 #[allow(unused_variables)]
43866 let next_out_of_line = decoder.next_out_of_line();
43867 let handles_before = decoder.remaining_handles();
43868 let (ordinal, inlined, num_bytes, num_handles) =
43869 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
43870
43871 let member_inline_size = match ordinal {
43872 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43873 2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43874 3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
43875 _ => return Err(fidl::Error::UnknownUnionTag),
43876 };
43877
43878 if inlined != (member_inline_size <= 4) {
43879 return Err(fidl::Error::InvalidInlineBitInEnvelope);
43880 }
43881 let _inner_offset;
43882 if inlined {
43883 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
43884 _inner_offset = offset + 8;
43885 } else {
43886 depth.increment()?;
43887 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
43888 }
43889 match ordinal {
43890 1 => {
43891 #[allow(irrefutable_let_patterns)]
43892 if let SampleStrictXUnion::U(_) = self {
43893 } else {
43895 *self = SampleStrictXUnion::U(fidl::new_empty!(u32, D));
43897 }
43898 #[allow(irrefutable_let_patterns)]
43899 if let SampleStrictXUnion::U(ref mut val) = self {
43900 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
43901 } else {
43902 unreachable!()
43903 }
43904 }
43905 2 => {
43906 #[allow(irrefutable_let_patterns)]
43907 if let SampleStrictXUnion::Su(_) = self {
43908 } else {
43910 *self = SampleStrictXUnion::Su(fidl::new_empty!(SimpleUnion, D));
43912 }
43913 #[allow(irrefutable_let_patterns)]
43914 if let SampleStrictXUnion::Su(ref mut val) = self {
43915 fidl::decode!(SimpleUnion, D, val, decoder, _inner_offset, depth)?;
43916 } else {
43917 unreachable!()
43918 }
43919 }
43920 3 => {
43921 #[allow(irrefutable_let_patterns)]
43922 if let SampleStrictXUnion::St(_) = self {
43923 } else {
43925 *self = SampleStrictXUnion::St(fidl::new_empty!(SimpleTable, D));
43927 }
43928 #[allow(irrefutable_let_patterns)]
43929 if let SampleStrictXUnion::St(ref mut val) = self {
43930 fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
43931 } else {
43932 unreachable!()
43933 }
43934 }
43935 ordinal => panic!("unexpected ordinal {:?}", ordinal),
43936 }
43937 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
43938 return Err(fidl::Error::InvalidNumBytesInEnvelope);
43939 }
43940 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
43941 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
43942 }
43943 Ok(())
43944 }
43945 }
43946
43947 impl fidl::encoding::ValueTypeMarker for SampleXUnion {
43948 type Borrowed<'a> = &'a Self;
43949 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
43950 value
43951 }
43952 }
43953
43954 unsafe impl fidl::encoding::TypeMarker for SampleXUnion {
43955 type Owned = Self;
43956
43957 #[inline(always)]
43958 fn inline_align(_context: fidl::encoding::Context) -> usize {
43959 8
43960 }
43961
43962 #[inline(always)]
43963 fn inline_size(_context: fidl::encoding::Context) -> usize {
43964 16
43965 }
43966 }
43967
43968 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SampleXUnion, D>
43969 for &SampleXUnion
43970 {
43971 #[inline]
43972 unsafe fn encode(
43973 self,
43974 encoder: &mut fidl::encoding::Encoder<'_, D>,
43975 offset: usize,
43976 _depth: fidl::encoding::Depth,
43977 ) -> fidl::Result<()> {
43978 encoder.debug_check_bounds::<SampleXUnion>(offset);
43979 encoder.write_num::<u64>(self.ordinal(), offset);
43980 match self {
43981 SampleXUnion::U(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
43982 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
43983 encoder,
43984 offset + 8,
43985 _depth,
43986 ),
43987 SampleXUnion::Su(ref val) => fidl::encoding::encode_in_envelope::<SimpleUnion, D>(
43988 <SimpleUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
43989 encoder,
43990 offset + 8,
43991 _depth,
43992 ),
43993 SampleXUnion::St(ref val) => fidl::encoding::encode_in_envelope::<SimpleTable, D>(
43994 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
43995 encoder,
43996 offset + 8,
43997 _depth,
43998 ),
43999 SampleXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
44000 }
44001 }
44002 }
44003
44004 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SampleXUnion {
44005 #[inline(always)]
44006 fn new_empty() -> Self {
44007 Self::__SourceBreaking { unknown_ordinal: 0 }
44008 }
44009
44010 #[inline]
44011 unsafe fn decode(
44012 &mut self,
44013 decoder: &mut fidl::encoding::Decoder<'_, D>,
44014 offset: usize,
44015 mut depth: fidl::encoding::Depth,
44016 ) -> fidl::Result<()> {
44017 decoder.debug_check_bounds::<Self>(offset);
44018 #[allow(unused_variables)]
44019 let next_out_of_line = decoder.next_out_of_line();
44020 let handles_before = decoder.remaining_handles();
44021 let (ordinal, inlined, num_bytes, num_handles) =
44022 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44023
44024 let member_inline_size = match ordinal {
44025 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44026 2 => <SimpleUnion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44027 3 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44028 0 => return Err(fidl::Error::UnknownUnionTag),
44029 _ => num_bytes as usize,
44030 };
44031
44032 if inlined != (member_inline_size <= 4) {
44033 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44034 }
44035 let _inner_offset;
44036 if inlined {
44037 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44038 _inner_offset = offset + 8;
44039 } else {
44040 depth.increment()?;
44041 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44042 }
44043 match ordinal {
44044 1 => {
44045 #[allow(irrefutable_let_patterns)]
44046 if let SampleXUnion::U(_) = self {
44047 } else {
44049 *self = SampleXUnion::U(fidl::new_empty!(u32, D));
44051 }
44052 #[allow(irrefutable_let_patterns)]
44053 if let SampleXUnion::U(ref mut val) = self {
44054 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
44055 } else {
44056 unreachable!()
44057 }
44058 }
44059 2 => {
44060 #[allow(irrefutable_let_patterns)]
44061 if let SampleXUnion::Su(_) = self {
44062 } else {
44064 *self = SampleXUnion::Su(fidl::new_empty!(SimpleUnion, D));
44066 }
44067 #[allow(irrefutable_let_patterns)]
44068 if let SampleXUnion::Su(ref mut val) = self {
44069 fidl::decode!(SimpleUnion, D, val, decoder, _inner_offset, depth)?;
44070 } else {
44071 unreachable!()
44072 }
44073 }
44074 3 => {
44075 #[allow(irrefutable_let_patterns)]
44076 if let SampleXUnion::St(_) = self {
44077 } else {
44079 *self = SampleXUnion::St(fidl::new_empty!(SimpleTable, D));
44081 }
44082 #[allow(irrefutable_let_patterns)]
44083 if let SampleXUnion::St(ref mut val) = self {
44084 fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
44085 } else {
44086 unreachable!()
44087 }
44088 }
44089 #[allow(deprecated)]
44090 ordinal => {
44091 for _ in 0..num_handles {
44092 decoder.drop_next_handle()?;
44093 }
44094 *self = SampleXUnion::__SourceBreaking { unknown_ordinal: ordinal };
44095 }
44096 }
44097 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44098 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44099 }
44100 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44101 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44102 }
44103 Ok(())
44104 }
44105 }
44106
44107 impl fidl::encoding::ValueTypeMarker for SimpleUnion {
44108 type Borrowed<'a> = &'a Self;
44109 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44110 value
44111 }
44112 }
44113
44114 unsafe impl fidl::encoding::TypeMarker for SimpleUnion {
44115 type Owned = Self;
44116
44117 #[inline(always)]
44118 fn inline_align(_context: fidl::encoding::Context) -> usize {
44119 8
44120 }
44121
44122 #[inline(always)]
44123 fn inline_size(_context: fidl::encoding::Context) -> usize {
44124 16
44125 }
44126 }
44127
44128 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SimpleUnion, D>
44129 for &SimpleUnion
44130 {
44131 #[inline]
44132 unsafe fn encode(
44133 self,
44134 encoder: &mut fidl::encoding::Encoder<'_, D>,
44135 offset: usize,
44136 _depth: fidl::encoding::Depth,
44137 ) -> fidl::Result<()> {
44138 encoder.debug_check_bounds::<SimpleUnion>(offset);
44139 encoder.write_num::<u64>(self.ordinal(), offset);
44140 match self {
44141 SimpleUnion::I32(ref val) => fidl::encoding::encode_in_envelope::<i32, D>(
44142 <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
44143 encoder,
44144 offset + 8,
44145 _depth,
44146 ),
44147 SimpleUnion::I64(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
44148 <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
44149 encoder,
44150 offset + 8,
44151 _depth,
44152 ),
44153 SimpleUnion::S(ref val) => fidl::encoding::encode_in_envelope::<Int64Struct, D>(
44154 <Int64Struct as fidl::encoding::ValueTypeMarker>::borrow(val),
44155 encoder,
44156 offset + 8,
44157 _depth,
44158 ),
44159 SimpleUnion::Str(ref val) => fidl::encoding::encode_in_envelope::<
44160 fidl::encoding::UnboundedString,
44161 D,
44162 >(
44163 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
44164 val,
44165 ),
44166 encoder,
44167 offset + 8,
44168 _depth,
44169 ),
44170 }
44171 }
44172 }
44173
44174 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SimpleUnion {
44175 #[inline(always)]
44176 fn new_empty() -> Self {
44177 Self::I32(fidl::new_empty!(i32, D))
44178 }
44179
44180 #[inline]
44181 unsafe fn decode(
44182 &mut self,
44183 decoder: &mut fidl::encoding::Decoder<'_, D>,
44184 offset: usize,
44185 mut depth: fidl::encoding::Depth,
44186 ) -> fidl::Result<()> {
44187 decoder.debug_check_bounds::<Self>(offset);
44188 #[allow(unused_variables)]
44189 let next_out_of_line = decoder.next_out_of_line();
44190 let handles_before = decoder.remaining_handles();
44191 let (ordinal, inlined, num_bytes, num_handles) =
44192 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44193
44194 let member_inline_size = match ordinal {
44195 1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44196 2 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44197 3 => <Int64Struct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44198 4 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
44199 decoder.context,
44200 ),
44201 _ => return Err(fidl::Error::UnknownUnionTag),
44202 };
44203
44204 if inlined != (member_inline_size <= 4) {
44205 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44206 }
44207 let _inner_offset;
44208 if inlined {
44209 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44210 _inner_offset = offset + 8;
44211 } else {
44212 depth.increment()?;
44213 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44214 }
44215 match ordinal {
44216 1 => {
44217 #[allow(irrefutable_let_patterns)]
44218 if let SimpleUnion::I32(_) = self {
44219 } else {
44221 *self = SimpleUnion::I32(fidl::new_empty!(i32, D));
44223 }
44224 #[allow(irrefutable_let_patterns)]
44225 if let SimpleUnion::I32(ref mut val) = self {
44226 fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
44227 } else {
44228 unreachable!()
44229 }
44230 }
44231 2 => {
44232 #[allow(irrefutable_let_patterns)]
44233 if let SimpleUnion::I64(_) = self {
44234 } else {
44236 *self = SimpleUnion::I64(fidl::new_empty!(i64, D));
44238 }
44239 #[allow(irrefutable_let_patterns)]
44240 if let SimpleUnion::I64(ref mut val) = self {
44241 fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
44242 } else {
44243 unreachable!()
44244 }
44245 }
44246 3 => {
44247 #[allow(irrefutable_let_patterns)]
44248 if let SimpleUnion::S(_) = self {
44249 } else {
44251 *self = SimpleUnion::S(fidl::new_empty!(Int64Struct, D));
44253 }
44254 #[allow(irrefutable_let_patterns)]
44255 if let SimpleUnion::S(ref mut val) = self {
44256 fidl::decode!(Int64Struct, D, val, decoder, _inner_offset, depth)?;
44257 } else {
44258 unreachable!()
44259 }
44260 }
44261 4 => {
44262 #[allow(irrefutable_let_patterns)]
44263 if let SimpleUnion::Str(_) = self {
44264 } else {
44266 *self =
44268 SimpleUnion::Str(fidl::new_empty!(fidl::encoding::UnboundedString, D));
44269 }
44270 #[allow(irrefutable_let_patterns)]
44271 if let SimpleUnion::Str(ref mut val) = self {
44272 fidl::decode!(
44273 fidl::encoding::UnboundedString,
44274 D,
44275 val,
44276 decoder,
44277 _inner_offset,
44278 depth
44279 )?;
44280 } else {
44281 unreachable!()
44282 }
44283 }
44284 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44285 }
44286 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44287 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44288 }
44289 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44290 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44291 }
44292 Ok(())
44293 }
44294 }
44295
44296 impl fidl::encoding::ValueTypeMarker for SingleVariantUnion {
44297 type Borrowed<'a> = &'a Self;
44298 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44299 value
44300 }
44301 }
44302
44303 unsafe impl fidl::encoding::TypeMarker for SingleVariantUnion {
44304 type Owned = Self;
44305
44306 #[inline(always)]
44307 fn inline_align(_context: fidl::encoding::Context) -> usize {
44308 8
44309 }
44310
44311 #[inline(always)]
44312 fn inline_size(_context: fidl::encoding::Context) -> usize {
44313 16
44314 }
44315 }
44316
44317 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SingleVariantUnion, D>
44318 for &SingleVariantUnion
44319 {
44320 #[inline]
44321 unsafe fn encode(
44322 self,
44323 encoder: &mut fidl::encoding::Encoder<'_, D>,
44324 offset: usize,
44325 _depth: fidl::encoding::Depth,
44326 ) -> fidl::Result<()> {
44327 encoder.debug_check_bounds::<SingleVariantUnion>(offset);
44328 encoder.write_num::<u64>(self.ordinal(), offset);
44329 match self {
44330 SingleVariantUnion::X(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
44331 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
44332 encoder,
44333 offset + 8,
44334 _depth,
44335 ),
44336 }
44337 }
44338 }
44339
44340 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SingleVariantUnion {
44341 #[inline(always)]
44342 fn new_empty() -> Self {
44343 Self::X(fidl::new_empty!(u32, D))
44344 }
44345
44346 #[inline]
44347 unsafe fn decode(
44348 &mut self,
44349 decoder: &mut fidl::encoding::Decoder<'_, D>,
44350 offset: usize,
44351 mut depth: fidl::encoding::Depth,
44352 ) -> fidl::Result<()> {
44353 decoder.debug_check_bounds::<Self>(offset);
44354 #[allow(unused_variables)]
44355 let next_out_of_line = decoder.next_out_of_line();
44356 let handles_before = decoder.remaining_handles();
44357 let (ordinal, inlined, num_bytes, num_handles) =
44358 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44359
44360 let member_inline_size = match ordinal {
44361 1 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44362 _ => return Err(fidl::Error::UnknownUnionTag),
44363 };
44364
44365 if inlined != (member_inline_size <= 4) {
44366 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44367 }
44368 let _inner_offset;
44369 if inlined {
44370 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44371 _inner_offset = offset + 8;
44372 } else {
44373 depth.increment()?;
44374 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44375 }
44376 match ordinal {
44377 1 => {
44378 #[allow(irrefutable_let_patterns)]
44379 if let SingleVariantUnion::X(_) = self {
44380 } else {
44382 *self = SingleVariantUnion::X(fidl::new_empty!(u32, D));
44384 }
44385 #[allow(irrefutable_let_patterns)]
44386 if let SingleVariantUnion::X(ref mut val) = self {
44387 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
44388 } else {
44389 unreachable!()
44390 }
44391 }
44392 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44393 }
44394 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44395 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44396 }
44397 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44398 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44399 }
44400 Ok(())
44401 }
44402 }
44403
44404 impl fidl::encoding::ValueTypeMarker for StringBoolUnion {
44405 type Borrowed<'a> = &'a Self;
44406 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44407 value
44408 }
44409 }
44410
44411 unsafe impl fidl::encoding::TypeMarker for StringBoolUnion {
44412 type Owned = Self;
44413
44414 #[inline(always)]
44415 fn inline_align(_context: fidl::encoding::Context) -> usize {
44416 8
44417 }
44418
44419 #[inline(always)]
44420 fn inline_size(_context: fidl::encoding::Context) -> usize {
44421 16
44422 }
44423 }
44424
44425 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringBoolUnion, D>
44426 for &StringBoolUnion
44427 {
44428 #[inline]
44429 unsafe fn encode(
44430 self,
44431 encoder: &mut fidl::encoding::Encoder<'_, D>,
44432 offset: usize,
44433 _depth: fidl::encoding::Depth,
44434 ) -> fidl::Result<()> {
44435 encoder.debug_check_bounds::<StringBoolUnion>(offset);
44436 encoder.write_num::<u64>(self.ordinal(), offset);
44437 match self {
44438 StringBoolUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
44439 fidl::encoding::UnboundedString,
44440 D,
44441 >(
44442 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
44443 val,
44444 ),
44445 encoder,
44446 offset + 8,
44447 _depth,
44448 ),
44449 StringBoolUnion::B(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
44450 <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
44451 encoder,
44452 offset + 8,
44453 _depth,
44454 ),
44455 }
44456 }
44457 }
44458
44459 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringBoolUnion {
44460 #[inline(always)]
44461 fn new_empty() -> Self {
44462 Self::S(fidl::new_empty!(fidl::encoding::UnboundedString, D))
44463 }
44464
44465 #[inline]
44466 unsafe fn decode(
44467 &mut self,
44468 decoder: &mut fidl::encoding::Decoder<'_, D>,
44469 offset: usize,
44470 mut depth: fidl::encoding::Depth,
44471 ) -> fidl::Result<()> {
44472 decoder.debug_check_bounds::<Self>(offset);
44473 #[allow(unused_variables)]
44474 let next_out_of_line = decoder.next_out_of_line();
44475 let handles_before = decoder.remaining_handles();
44476 let (ordinal, inlined, num_bytes, num_handles) =
44477 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44478
44479 let member_inline_size = match ordinal {
44480 1 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
44481 decoder.context,
44482 ),
44483 2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44484 _ => return Err(fidl::Error::UnknownUnionTag),
44485 };
44486
44487 if inlined != (member_inline_size <= 4) {
44488 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44489 }
44490 let _inner_offset;
44491 if inlined {
44492 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44493 _inner_offset = offset + 8;
44494 } else {
44495 depth.increment()?;
44496 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44497 }
44498 match ordinal {
44499 1 => {
44500 #[allow(irrefutable_let_patterns)]
44501 if let StringBoolUnion::S(_) = self {
44502 } else {
44504 *self = StringBoolUnion::S(fidl::new_empty!(
44506 fidl::encoding::UnboundedString,
44507 D
44508 ));
44509 }
44510 #[allow(irrefutable_let_patterns)]
44511 if let StringBoolUnion::S(ref mut val) = self {
44512 fidl::decode!(
44513 fidl::encoding::UnboundedString,
44514 D,
44515 val,
44516 decoder,
44517 _inner_offset,
44518 depth
44519 )?;
44520 } else {
44521 unreachable!()
44522 }
44523 }
44524 2 => {
44525 #[allow(irrefutable_let_patterns)]
44526 if let StringBoolUnion::B(_) = self {
44527 } else {
44529 *self = StringBoolUnion::B(fidl::new_empty!(bool, D));
44531 }
44532 #[allow(irrefutable_let_patterns)]
44533 if let StringBoolUnion::B(ref mut val) = self {
44534 fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
44535 } else {
44536 unreachable!()
44537 }
44538 }
44539 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44540 }
44541 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44542 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44543 }
44544 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44545 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44546 }
44547 Ok(())
44548 }
44549 }
44550
44551 impl fidl::encoding::ValueTypeMarker for StringUnion {
44552 type Borrowed<'a> = &'a Self;
44553 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44554 value
44555 }
44556 }
44557
44558 unsafe impl fidl::encoding::TypeMarker for StringUnion {
44559 type Owned = Self;
44560
44561 #[inline(always)]
44562 fn inline_align(_context: fidl::encoding::Context) -> usize {
44563 8
44564 }
44565
44566 #[inline(always)]
44567 fn inline_size(_context: fidl::encoding::Context) -> usize {
44568 16
44569 }
44570 }
44571
44572 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StringUnion, D>
44573 for &StringUnion
44574 {
44575 #[inline]
44576 unsafe fn encode(
44577 self,
44578 encoder: &mut fidl::encoding::Encoder<'_, D>,
44579 offset: usize,
44580 _depth: fidl::encoding::Depth,
44581 ) -> fidl::Result<()> {
44582 encoder.debug_check_bounds::<StringUnion>(offset);
44583 encoder.write_num::<u64>(self.ordinal(), offset);
44584 match self {
44585 StringUnion::Unused(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44586 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44587 encoder,
44588 offset + 8,
44589 _depth,
44590 ),
44591 StringUnion::S(ref val) => fidl::encoding::encode_in_envelope::<
44592 fidl::encoding::UnboundedString,
44593 D,
44594 >(
44595 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
44596 val,
44597 ),
44598 encoder,
44599 offset + 8,
44600 _depth,
44601 ),
44602 StringUnion::U8(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44603 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44604 encoder,
44605 offset + 8,
44606 _depth,
44607 ),
44608 }
44609 }
44610 }
44611
44612 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StringUnion {
44613 #[inline(always)]
44614 fn new_empty() -> Self {
44615 Self::Unused(fidl::new_empty!(u8, D))
44616 }
44617
44618 #[inline]
44619 unsafe fn decode(
44620 &mut self,
44621 decoder: &mut fidl::encoding::Decoder<'_, D>,
44622 offset: usize,
44623 mut depth: fidl::encoding::Depth,
44624 ) -> fidl::Result<()> {
44625 decoder.debug_check_bounds::<Self>(offset);
44626 #[allow(unused_variables)]
44627 let next_out_of_line = decoder.next_out_of_line();
44628 let handles_before = decoder.remaining_handles();
44629 let (ordinal, inlined, num_bytes, num_handles) =
44630 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44631
44632 let member_inline_size = match ordinal {
44633 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44634 2 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
44635 decoder.context,
44636 ),
44637 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44638 _ => return Err(fidl::Error::UnknownUnionTag),
44639 };
44640
44641 if inlined != (member_inline_size <= 4) {
44642 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44643 }
44644 let _inner_offset;
44645 if inlined {
44646 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44647 _inner_offset = offset + 8;
44648 } else {
44649 depth.increment()?;
44650 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44651 }
44652 match ordinal {
44653 1 => {
44654 #[allow(irrefutable_let_patterns)]
44655 if let StringUnion::Unused(_) = self {
44656 } else {
44658 *self = StringUnion::Unused(fidl::new_empty!(u8, D));
44660 }
44661 #[allow(irrefutable_let_patterns)]
44662 if let StringUnion::Unused(ref mut val) = self {
44663 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44664 } else {
44665 unreachable!()
44666 }
44667 }
44668 2 => {
44669 #[allow(irrefutable_let_patterns)]
44670 if let StringUnion::S(_) = self {
44671 } else {
44673 *self =
44675 StringUnion::S(fidl::new_empty!(fidl::encoding::UnboundedString, D));
44676 }
44677 #[allow(irrefutable_let_patterns)]
44678 if let StringUnion::S(ref mut val) = self {
44679 fidl::decode!(
44680 fidl::encoding::UnboundedString,
44681 D,
44682 val,
44683 decoder,
44684 _inner_offset,
44685 depth
44686 )?;
44687 } else {
44688 unreachable!()
44689 }
44690 }
44691 3 => {
44692 #[allow(irrefutable_let_patterns)]
44693 if let StringUnion::U8(_) = self {
44694 } else {
44696 *self = StringUnion::U8(fidl::new_empty!(u8, D));
44698 }
44699 #[allow(irrefutable_let_patterns)]
44700 if let StringUnion::U8(ref mut val) = self {
44701 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44702 } else {
44703 unreachable!()
44704 }
44705 }
44706 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44707 }
44708 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44709 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44710 }
44711 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44712 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44713 }
44714 Ok(())
44715 }
44716 }
44717
44718 impl fidl::encoding::ValueTypeMarker for Uint8Union {
44719 type Borrowed<'a> = &'a Self;
44720 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44721 value
44722 }
44723 }
44724
44725 unsafe impl fidl::encoding::TypeMarker for Uint8Union {
44726 type Owned = Self;
44727
44728 #[inline(always)]
44729 fn inline_align(_context: fidl::encoding::Context) -> usize {
44730 8
44731 }
44732
44733 #[inline(always)]
44734 fn inline_size(_context: fidl::encoding::Context) -> usize {
44735 16
44736 }
44737 }
44738
44739 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Uint8Union, D>
44740 for &Uint8Union
44741 {
44742 #[inline]
44743 unsafe fn encode(
44744 self,
44745 encoder: &mut fidl::encoding::Encoder<'_, D>,
44746 offset: usize,
44747 _depth: fidl::encoding::Depth,
44748 ) -> fidl::Result<()> {
44749 encoder.debug_check_bounds::<Uint8Union>(offset);
44750 encoder.write_num::<u64>(self.ordinal(), offset);
44751 match self {
44752 Uint8Union::Uint8Value(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44753 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44754 encoder,
44755 offset + 8,
44756 _depth,
44757 ),
44758 Uint8Union::EmptyStruct(ref val) => {
44759 fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
44760 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
44761 encoder,
44762 offset + 8,
44763 _depth,
44764 )
44765 }
44766 }
44767 }
44768 }
44769
44770 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Uint8Union {
44771 #[inline(always)]
44772 fn new_empty() -> Self {
44773 Self::Uint8Value(fidl::new_empty!(u8, D))
44774 }
44775
44776 #[inline]
44777 unsafe fn decode(
44778 &mut self,
44779 decoder: &mut fidl::encoding::Decoder<'_, D>,
44780 offset: usize,
44781 mut depth: fidl::encoding::Depth,
44782 ) -> fidl::Result<()> {
44783 decoder.debug_check_bounds::<Self>(offset);
44784 #[allow(unused_variables)]
44785 let next_out_of_line = decoder.next_out_of_line();
44786 let handles_before = decoder.remaining_handles();
44787 let (ordinal, inlined, num_bytes, num_handles) =
44788 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44789
44790 let member_inline_size = match ordinal {
44791 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44792 2 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44793 _ => return Err(fidl::Error::UnknownUnionTag),
44794 };
44795
44796 if inlined != (member_inline_size <= 4) {
44797 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44798 }
44799 let _inner_offset;
44800 if inlined {
44801 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44802 _inner_offset = offset + 8;
44803 } else {
44804 depth.increment()?;
44805 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44806 }
44807 match ordinal {
44808 1 => {
44809 #[allow(irrefutable_let_patterns)]
44810 if let Uint8Union::Uint8Value(_) = self {
44811 } else {
44813 *self = Uint8Union::Uint8Value(fidl::new_empty!(u8, D));
44815 }
44816 #[allow(irrefutable_let_patterns)]
44817 if let Uint8Union::Uint8Value(ref mut val) = self {
44818 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44819 } else {
44820 unreachable!()
44821 }
44822 }
44823 2 => {
44824 #[allow(irrefutable_let_patterns)]
44825 if let Uint8Union::EmptyStruct(_) = self {
44826 } else {
44828 *self = Uint8Union::EmptyStruct(fidl::new_empty!(EmptyStruct, D));
44830 }
44831 #[allow(irrefutable_let_patterns)]
44832 if let Uint8Union::EmptyStruct(ref mut val) = self {
44833 fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
44834 } else {
44835 unreachable!()
44836 }
44837 }
44838 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44839 }
44840 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44841 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44842 }
44843 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44844 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44845 }
44846 Ok(())
44847 }
44848 }
44849
44850 impl fidl::encoding::ValueTypeMarker for UnionAtTheBottom {
44851 type Borrowed<'a> = &'a Self;
44852 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
44853 value
44854 }
44855 }
44856
44857 unsafe impl fidl::encoding::TypeMarker for UnionAtTheBottom {
44858 type Owned = Self;
44859
44860 #[inline(always)]
44861 fn inline_align(_context: fidl::encoding::Context) -> usize {
44862 8
44863 }
44864
44865 #[inline(always)]
44866 fn inline_size(_context: fidl::encoding::Context) -> usize {
44867 16
44868 }
44869 }
44870
44871 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionAtTheBottom, D>
44872 for &UnionAtTheBottom
44873 {
44874 #[inline]
44875 unsafe fn encode(
44876 self,
44877 encoder: &mut fidl::encoding::Encoder<'_, D>,
44878 offset: usize,
44879 _depth: fidl::encoding::Depth,
44880 ) -> fidl::Result<()> {
44881 encoder.debug_check_bounds::<UnionAtTheBottom>(offset);
44882 encoder.write_num::<u64>(self.ordinal(), offset);
44883 match self {
44884 UnionAtTheBottom::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44885 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44886 encoder,
44887 offset + 8,
44888 _depth,
44889 ),
44890 UnionAtTheBottom::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44891 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44892 encoder,
44893 offset + 8,
44894 _depth,
44895 ),
44896 UnionAtTheBottom::Tiny(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
44897 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
44898 encoder,
44899 offset + 8,
44900 _depth,
44901 ),
44902 }
44903 }
44904 }
44905
44906 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionAtTheBottom {
44907 #[inline(always)]
44908 fn new_empty() -> Self {
44909 Self::Unused1(fidl::new_empty!(u8, D))
44910 }
44911
44912 #[inline]
44913 unsafe fn decode(
44914 &mut self,
44915 decoder: &mut fidl::encoding::Decoder<'_, D>,
44916 offset: usize,
44917 mut depth: fidl::encoding::Depth,
44918 ) -> fidl::Result<()> {
44919 decoder.debug_check_bounds::<Self>(offset);
44920 #[allow(unused_variables)]
44921 let next_out_of_line = decoder.next_out_of_line();
44922 let handles_before = decoder.remaining_handles();
44923 let (ordinal, inlined, num_bytes, num_handles) =
44924 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
44925
44926 let member_inline_size = match ordinal {
44927 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44928 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44929 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
44930 _ => return Err(fidl::Error::UnknownUnionTag),
44931 };
44932
44933 if inlined != (member_inline_size <= 4) {
44934 return Err(fidl::Error::InvalidInlineBitInEnvelope);
44935 }
44936 let _inner_offset;
44937 if inlined {
44938 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
44939 _inner_offset = offset + 8;
44940 } else {
44941 depth.increment()?;
44942 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
44943 }
44944 match ordinal {
44945 1 => {
44946 #[allow(irrefutable_let_patterns)]
44947 if let UnionAtTheBottom::Unused1(_) = self {
44948 } else {
44950 *self = UnionAtTheBottom::Unused1(fidl::new_empty!(u8, D));
44952 }
44953 #[allow(irrefutable_let_patterns)]
44954 if let UnionAtTheBottom::Unused1(ref mut val) = self {
44955 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44956 } else {
44957 unreachable!()
44958 }
44959 }
44960 2 => {
44961 #[allow(irrefutable_let_patterns)]
44962 if let UnionAtTheBottom::Unused2(_) = self {
44963 } else {
44965 *self = UnionAtTheBottom::Unused2(fidl::new_empty!(u8, D));
44967 }
44968 #[allow(irrefutable_let_patterns)]
44969 if let UnionAtTheBottom::Unused2(ref mut val) = self {
44970 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44971 } else {
44972 unreachable!()
44973 }
44974 }
44975 3 => {
44976 #[allow(irrefutable_let_patterns)]
44977 if let UnionAtTheBottom::Tiny(_) = self {
44978 } else {
44980 *self = UnionAtTheBottom::Tiny(fidl::new_empty!(u8, D));
44982 }
44983 #[allow(irrefutable_let_patterns)]
44984 if let UnionAtTheBottom::Tiny(ref mut val) = self {
44985 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
44986 } else {
44987 unreachable!()
44988 }
44989 }
44990 ordinal => panic!("unexpected ordinal {:?}", ordinal),
44991 }
44992 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
44993 return Err(fidl::Error::InvalidNumBytesInEnvelope);
44994 }
44995 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
44996 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
44997 }
44998 Ok(())
44999 }
45000 }
45001
45002 impl fidl::encoding::ValueTypeMarker for UnionInlinePadding {
45003 type Borrowed<'a> = &'a Self;
45004 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45005 value
45006 }
45007 }
45008
45009 unsafe impl fidl::encoding::TypeMarker for UnionInlinePadding {
45010 type Owned = Self;
45011
45012 #[inline(always)]
45013 fn inline_align(_context: fidl::encoding::Context) -> usize {
45014 8
45015 }
45016
45017 #[inline(always)]
45018 fn inline_size(_context: fidl::encoding::Context) -> usize {
45019 16
45020 }
45021 }
45022
45023 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionInlinePadding, D>
45024 for &UnionInlinePadding
45025 {
45026 #[inline]
45027 unsafe fn encode(
45028 self,
45029 encoder: &mut fidl::encoding::Encoder<'_, D>,
45030 offset: usize,
45031 _depth: fidl::encoding::Depth,
45032 ) -> fidl::Result<()> {
45033 encoder.debug_check_bounds::<UnionInlinePadding>(offset);
45034 encoder.write_num::<u64>(self.ordinal(), offset);
45035 match self {
45036 UnionInlinePadding::ThreePaddingBytes(ref val) => {
45037 fidl::encoding::encode_in_envelope::<u8, D>(
45038 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45039 encoder,
45040 offset + 8,
45041 _depth,
45042 )
45043 }
45044 UnionInlinePadding::TwoPaddingBytes(ref val) => {
45045 fidl::encoding::encode_in_envelope::<u16, D>(
45046 <u16 as fidl::encoding::ValueTypeMarker>::borrow(val),
45047 encoder,
45048 offset + 8,
45049 _depth,
45050 )
45051 }
45052 UnionInlinePadding::OnePaddingByte(ref val) => {
45053 fidl::encoding::encode_in_envelope::<fidl::encoding::Array<u8, 3>, D>(
45054 <fidl::encoding::Array<u8, 3> as fidl::encoding::ValueTypeMarker>::borrow(
45055 val,
45056 ),
45057 encoder,
45058 offset + 8,
45059 _depth,
45060 )
45061 }
45062 }
45063 }
45064 }
45065
45066 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionInlinePadding {
45067 #[inline(always)]
45068 fn new_empty() -> Self {
45069 Self::ThreePaddingBytes(fidl::new_empty!(u8, D))
45070 }
45071
45072 #[inline]
45073 unsafe fn decode(
45074 &mut self,
45075 decoder: &mut fidl::encoding::Decoder<'_, D>,
45076 offset: usize,
45077 mut depth: fidl::encoding::Depth,
45078 ) -> fidl::Result<()> {
45079 decoder.debug_check_bounds::<Self>(offset);
45080 #[allow(unused_variables)]
45081 let next_out_of_line = decoder.next_out_of_line();
45082 let handles_before = decoder.remaining_handles();
45083 let (ordinal, inlined, num_bytes, num_handles) =
45084 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45085
45086 let member_inline_size = match ordinal {
45087 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45088 2 => <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45089 3 => <fidl::encoding::Array<u8, 3> as fidl::encoding::TypeMarker>::inline_size(
45090 decoder.context,
45091 ),
45092 _ => return Err(fidl::Error::UnknownUnionTag),
45093 };
45094
45095 if inlined != (member_inline_size <= 4) {
45096 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45097 }
45098 let _inner_offset;
45099 if inlined {
45100 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45101 _inner_offset = offset + 8;
45102 } else {
45103 depth.increment()?;
45104 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45105 }
45106 match ordinal {
45107 1 => {
45108 #[allow(irrefutable_let_patterns)]
45109 if let UnionInlinePadding::ThreePaddingBytes(_) = self {
45110 } else {
45112 *self = UnionInlinePadding::ThreePaddingBytes(fidl::new_empty!(u8, D));
45114 }
45115 #[allow(irrefutable_let_patterns)]
45116 if let UnionInlinePadding::ThreePaddingBytes(ref mut val) = self {
45117 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45118 } else {
45119 unreachable!()
45120 }
45121 }
45122 2 => {
45123 #[allow(irrefutable_let_patterns)]
45124 if let UnionInlinePadding::TwoPaddingBytes(_) = self {
45125 } else {
45127 *self = UnionInlinePadding::TwoPaddingBytes(fidl::new_empty!(u16, D));
45129 }
45130 #[allow(irrefutable_let_patterns)]
45131 if let UnionInlinePadding::TwoPaddingBytes(ref mut val) = self {
45132 fidl::decode!(u16, D, val, decoder, _inner_offset, depth)?;
45133 } else {
45134 unreachable!()
45135 }
45136 }
45137 3 => {
45138 #[allow(irrefutable_let_patterns)]
45139 if let UnionInlinePadding::OnePaddingByte(_) = self {
45140 } else {
45142 *self = UnionInlinePadding::OnePaddingByte(
45144 fidl::new_empty!(fidl::encoding::Array<u8, 3>, D),
45145 );
45146 }
45147 #[allow(irrefutable_let_patterns)]
45148 if let UnionInlinePadding::OnePaddingByte(ref mut val) = self {
45149 fidl::decode!(fidl::encoding::Array<u8, 3>, D, val, decoder, _inner_offset, depth)?;
45150 } else {
45151 unreachable!()
45152 }
45153 }
45154 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45155 }
45156 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45157 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45158 }
45159 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45160 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45161 }
45162 Ok(())
45163 }
45164 }
45165
45166 impl fidl::encoding::ValueTypeMarker for UnionOfTable {
45167 type Borrowed<'a> = &'a Self;
45168 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45169 value
45170 }
45171 }
45172
45173 unsafe impl fidl::encoding::TypeMarker for UnionOfTable {
45174 type Owned = Self;
45175
45176 #[inline(always)]
45177 fn inline_align(_context: fidl::encoding::Context) -> usize {
45178 8
45179 }
45180
45181 #[inline(always)]
45182 fn inline_size(_context: fidl::encoding::Context) -> usize {
45183 16
45184 }
45185 }
45186
45187 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionOfTable, D>
45188 for &UnionOfTable
45189 {
45190 #[inline]
45191 unsafe fn encode(
45192 self,
45193 encoder: &mut fidl::encoding::Encoder<'_, D>,
45194 offset: usize,
45195 _depth: fidl::encoding::Depth,
45196 ) -> fidl::Result<()> {
45197 encoder.debug_check_bounds::<UnionOfTable>(offset);
45198 encoder.write_num::<u64>(self.ordinal(), offset);
45199 match self {
45200 UnionOfTable::T(ref val) => fidl::encoding::encode_in_envelope::<SimpleTable, D>(
45201 <SimpleTable as fidl::encoding::ValueTypeMarker>::borrow(val),
45202 encoder,
45203 offset + 8,
45204 _depth,
45205 ),
45206 }
45207 }
45208 }
45209
45210 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionOfTable {
45211 #[inline(always)]
45212 fn new_empty() -> Self {
45213 Self::T(fidl::new_empty!(SimpleTable, D))
45214 }
45215
45216 #[inline]
45217 unsafe fn decode(
45218 &mut self,
45219 decoder: &mut fidl::encoding::Decoder<'_, D>,
45220 offset: usize,
45221 mut depth: fidl::encoding::Depth,
45222 ) -> fidl::Result<()> {
45223 decoder.debug_check_bounds::<Self>(offset);
45224 #[allow(unused_variables)]
45225 let next_out_of_line = decoder.next_out_of_line();
45226 let handles_before = decoder.remaining_handles();
45227 let (ordinal, inlined, num_bytes, num_handles) =
45228 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45229
45230 let member_inline_size = match ordinal {
45231 1 => <SimpleTable as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45232 _ => return Err(fidl::Error::UnknownUnionTag),
45233 };
45234
45235 if inlined != (member_inline_size <= 4) {
45236 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45237 }
45238 let _inner_offset;
45239 if inlined {
45240 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45241 _inner_offset = offset + 8;
45242 } else {
45243 depth.increment()?;
45244 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45245 }
45246 match ordinal {
45247 1 => {
45248 #[allow(irrefutable_let_patterns)]
45249 if let UnionOfTable::T(_) = self {
45250 } else {
45252 *self = UnionOfTable::T(fidl::new_empty!(SimpleTable, D));
45254 }
45255 #[allow(irrefutable_let_patterns)]
45256 if let UnionOfTable::T(ref mut val) = self {
45257 fidl::decode!(SimpleTable, D, val, decoder, _inner_offset, depth)?;
45258 } else {
45259 unreachable!()
45260 }
45261 }
45262 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45263 }
45264 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45265 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45266 }
45267 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45268 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45269 }
45270 Ok(())
45271 }
45272 }
45273
45274 impl fidl::encoding::ValueTypeMarker for UnionOfUnion {
45275 type Borrowed<'a> = &'a Self;
45276 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45277 value
45278 }
45279 }
45280
45281 unsafe impl fidl::encoding::TypeMarker for UnionOfUnion {
45282 type Owned = Self;
45283
45284 #[inline(always)]
45285 fn inline_align(_context: fidl::encoding::Context) -> usize {
45286 8
45287 }
45288
45289 #[inline(always)]
45290 fn inline_size(_context: fidl::encoding::Context) -> usize {
45291 16
45292 }
45293 }
45294
45295 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionOfUnion, D>
45296 for &UnionOfUnion
45297 {
45298 #[inline]
45299 unsafe fn encode(
45300 self,
45301 encoder: &mut fidl::encoding::Encoder<'_, D>,
45302 offset: usize,
45303 _depth: fidl::encoding::Depth,
45304 ) -> fidl::Result<()> {
45305 encoder.debug_check_bounds::<UnionOfUnion>(offset);
45306 encoder.write_num::<u64>(self.ordinal(), offset);
45307 match self {
45308 UnionOfUnion::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45309 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45310 encoder,
45311 offset + 8,
45312 _depth,
45313 ),
45314 UnionOfUnion::Size8align4(ref val) => {
45315 fidl::encoding::encode_in_envelope::<UnionSize8Align4, D>(
45316 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
45317 encoder,
45318 offset + 8,
45319 _depth,
45320 )
45321 }
45322 UnionOfUnion::Size12align4(ref val) => {
45323 fidl::encoding::encode_in_envelope::<UnionSize12Align4, D>(
45324 <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
45325 encoder,
45326 offset + 8,
45327 _depth,
45328 )
45329 }
45330 UnionOfUnion::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45331 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45332 encoder,
45333 offset + 8,
45334 _depth,
45335 ),
45336 UnionOfUnion::Size24align8(ref val) => {
45337 fidl::encoding::encode_in_envelope::<UnionSize24Align8, D>(
45338 <UnionSize24Align8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45339 encoder,
45340 offset + 8,
45341 _depth,
45342 )
45343 }
45344 }
45345 }
45346 }
45347
45348 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionOfUnion {
45349 #[inline(always)]
45350 fn new_empty() -> Self {
45351 Self::Unused1(fidl::new_empty!(u8, D))
45352 }
45353
45354 #[inline]
45355 unsafe fn decode(
45356 &mut self,
45357 decoder: &mut fidl::encoding::Decoder<'_, D>,
45358 offset: usize,
45359 mut depth: fidl::encoding::Depth,
45360 ) -> fidl::Result<()> {
45361 decoder.debug_check_bounds::<Self>(offset);
45362 #[allow(unused_variables)]
45363 let next_out_of_line = decoder.next_out_of_line();
45364 let handles_before = decoder.remaining_handles();
45365 let (ordinal, inlined, num_bytes, num_handles) =
45366 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45367
45368 let member_inline_size = match ordinal {
45369 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45370 2 => <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45371 3 => {
45372 <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
45373 }
45374 4 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45375 5 => {
45376 <UnionSize24Align8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
45377 }
45378 _ => return Err(fidl::Error::UnknownUnionTag),
45379 };
45380
45381 if inlined != (member_inline_size <= 4) {
45382 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45383 }
45384 let _inner_offset;
45385 if inlined {
45386 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45387 _inner_offset = offset + 8;
45388 } else {
45389 depth.increment()?;
45390 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45391 }
45392 match ordinal {
45393 1 => {
45394 #[allow(irrefutable_let_patterns)]
45395 if let UnionOfUnion::Unused1(_) = self {
45396 } else {
45398 *self = UnionOfUnion::Unused1(fidl::new_empty!(u8, D));
45400 }
45401 #[allow(irrefutable_let_patterns)]
45402 if let UnionOfUnion::Unused1(ref mut val) = self {
45403 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45404 } else {
45405 unreachable!()
45406 }
45407 }
45408 2 => {
45409 #[allow(irrefutable_let_patterns)]
45410 if let UnionOfUnion::Size8align4(_) = self {
45411 } else {
45413 *self = UnionOfUnion::Size8align4(fidl::new_empty!(UnionSize8Align4, D));
45415 }
45416 #[allow(irrefutable_let_patterns)]
45417 if let UnionOfUnion::Size8align4(ref mut val) = self {
45418 fidl::decode!(UnionSize8Align4, D, val, decoder, _inner_offset, depth)?;
45419 } else {
45420 unreachable!()
45421 }
45422 }
45423 3 => {
45424 #[allow(irrefutable_let_patterns)]
45425 if let UnionOfUnion::Size12align4(_) = self {
45426 } else {
45428 *self = UnionOfUnion::Size12align4(fidl::new_empty!(UnionSize12Align4, D));
45430 }
45431 #[allow(irrefutable_let_patterns)]
45432 if let UnionOfUnion::Size12align4(ref mut val) = self {
45433 fidl::decode!(UnionSize12Align4, D, val, decoder, _inner_offset, depth)?;
45434 } else {
45435 unreachable!()
45436 }
45437 }
45438 4 => {
45439 #[allow(irrefutable_let_patterns)]
45440 if let UnionOfUnion::Unused2(_) = self {
45441 } else {
45443 *self = UnionOfUnion::Unused2(fidl::new_empty!(u8, D));
45445 }
45446 #[allow(irrefutable_let_patterns)]
45447 if let UnionOfUnion::Unused2(ref mut val) = self {
45448 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45449 } else {
45450 unreachable!()
45451 }
45452 }
45453 5 => {
45454 #[allow(irrefutable_let_patterns)]
45455 if let UnionOfUnion::Size24align8(_) = self {
45456 } else {
45458 *self = UnionOfUnion::Size24align8(fidl::new_empty!(UnionSize24Align8, D));
45460 }
45461 #[allow(irrefutable_let_patterns)]
45462 if let UnionOfUnion::Size24align8(ref mut val) = self {
45463 fidl::decode!(UnionSize24Align8, D, val, decoder, _inner_offset, depth)?;
45464 } else {
45465 unreachable!()
45466 }
45467 }
45468 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45469 }
45470 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45471 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45472 }
45473 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45474 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45475 }
45476 Ok(())
45477 }
45478 }
45479
45480 impl fidl::encoding::ValueTypeMarker for UnionOfXUnionThenTableThenXUnionThenUnion {
45481 type Borrowed<'a> = &'a Self;
45482 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45483 value
45484 }
45485 }
45486
45487 unsafe impl fidl::encoding::TypeMarker for UnionOfXUnionThenTableThenXUnionThenUnion {
45488 type Owned = Self;
45489
45490 #[inline(always)]
45491 fn inline_align(_context: fidl::encoding::Context) -> usize {
45492 8
45493 }
45494
45495 #[inline(always)]
45496 fn inline_size(_context: fidl::encoding::Context) -> usize {
45497 16
45498 }
45499 }
45500
45501 unsafe impl<D: fidl::encoding::ResourceDialect>
45502 fidl::encoding::Encode<UnionOfXUnionThenTableThenXUnionThenUnion, D>
45503 for &UnionOfXUnionThenTableThenXUnionThenUnion
45504 {
45505 #[inline]
45506 unsafe fn encode(
45507 self,
45508 encoder: &mut fidl::encoding::Encoder<'_, D>,
45509 offset: usize,
45510 _depth: fidl::encoding::Depth,
45511 ) -> fidl::Result<()> {
45512 encoder.debug_check_bounds::<UnionOfXUnionThenTableThenXUnionThenUnion>(offset);
45513 encoder.write_num::<u64>(self.ordinal(), offset);
45514 match self {
45515 UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(ref val) => {
45516 fidl::encoding::encode_in_envelope::<u8, D>(
45517 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45518 encoder, offset + 8, _depth
45519 )
45520 }
45521 UnionOfXUnionThenTableThenXUnionThenUnion::Variant(ref val) => {
45522 fidl::encoding::encode_in_envelope::<XUnionOfTableThenXUnionThenUnion, D>(
45523 <XUnionOfTableThenXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
45524 encoder, offset + 8, _depth
45525 )
45526 }
45527 }
45528 }
45529 }
45530
45531 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
45532 for UnionOfXUnionThenTableThenXUnionThenUnion
45533 {
45534 #[inline(always)]
45535 fn new_empty() -> Self {
45536 Self::Unused1(fidl::new_empty!(u8, D))
45537 }
45538
45539 #[inline]
45540 unsafe fn decode(
45541 &mut self,
45542 decoder: &mut fidl::encoding::Decoder<'_, D>,
45543 offset: usize,
45544 mut depth: fidl::encoding::Depth,
45545 ) -> fidl::Result<()> {
45546 decoder.debug_check_bounds::<Self>(offset);
45547 #[allow(unused_variables)]
45548 let next_out_of_line = decoder.next_out_of_line();
45549 let handles_before = decoder.remaining_handles();
45550 let (ordinal, inlined, num_bytes, num_handles) =
45551 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45552
45553 let member_inline_size = match ordinal {
45554 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45555 3 => <XUnionOfTableThenXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(
45556 decoder.context,
45557 ),
45558 _ => return Err(fidl::Error::UnknownUnionTag),
45559 };
45560
45561 if inlined != (member_inline_size <= 4) {
45562 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45563 }
45564 let _inner_offset;
45565 if inlined {
45566 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45567 _inner_offset = offset + 8;
45568 } else {
45569 depth.increment()?;
45570 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45571 }
45572 match ordinal {
45573 1 => {
45574 #[allow(irrefutable_let_patterns)]
45575 if let UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(_) = self {
45576 } else {
45578 *self = UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(
45580 fidl::new_empty!(u8, D),
45581 );
45582 }
45583 #[allow(irrefutable_let_patterns)]
45584 if let UnionOfXUnionThenTableThenXUnionThenUnion::Unused1(ref mut val) = self {
45585 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45586 } else {
45587 unreachable!()
45588 }
45589 }
45590 3 => {
45591 #[allow(irrefutable_let_patterns)]
45592 if let UnionOfXUnionThenTableThenXUnionThenUnion::Variant(_) = self {
45593 } else {
45595 *self = UnionOfXUnionThenTableThenXUnionThenUnion::Variant(
45597 fidl::new_empty!(XUnionOfTableThenXUnionThenUnion, D),
45598 );
45599 }
45600 #[allow(irrefutable_let_patterns)]
45601 if let UnionOfXUnionThenTableThenXUnionThenUnion::Variant(ref mut val) = self {
45602 fidl::decode!(
45603 XUnionOfTableThenXUnionThenUnion,
45604 D,
45605 val,
45606 decoder,
45607 _inner_offset,
45608 depth
45609 )?;
45610 } else {
45611 unreachable!()
45612 }
45613 }
45614 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45615 }
45616 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45617 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45618 }
45619 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45620 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45621 }
45622 Ok(())
45623 }
45624 }
45625
45626 impl fidl::encoding::ValueTypeMarker for UnionSize12Align4 {
45627 type Borrowed<'a> = &'a Self;
45628 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45629 value
45630 }
45631 }
45632
45633 unsafe impl fidl::encoding::TypeMarker for UnionSize12Align4 {
45634 type Owned = Self;
45635
45636 #[inline(always)]
45637 fn inline_align(_context: fidl::encoding::Context) -> usize {
45638 8
45639 }
45640
45641 #[inline(always)]
45642 fn inline_size(_context: fidl::encoding::Context) -> usize {
45643 16
45644 }
45645 }
45646
45647 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize12Align4, D>
45648 for &UnionSize12Align4
45649 {
45650 #[inline]
45651 unsafe fn encode(
45652 self,
45653 encoder: &mut fidl::encoding::Encoder<'_, D>,
45654 offset: usize,
45655 _depth: fidl::encoding::Depth,
45656 ) -> fidl::Result<()> {
45657 encoder.debug_check_bounds::<UnionSize12Align4>(offset);
45658 encoder.write_num::<u64>(self.ordinal(), offset);
45659 match self {
45660 UnionSize12Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45661 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45662 encoder,
45663 offset + 8,
45664 _depth,
45665 ),
45666 UnionSize12Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45667 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45668 encoder,
45669 offset + 8,
45670 _depth,
45671 ),
45672 UnionSize12Align4::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45673 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45674 encoder,
45675 offset + 8,
45676 _depth,
45677 ),
45678 UnionSize12Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<
45679 fidl::encoding::Array<u8, 6>,
45680 D,
45681 >(
45682 <fidl::encoding::Array<u8, 6> as fidl::encoding::ValueTypeMarker>::borrow(val),
45683 encoder,
45684 offset + 8,
45685 _depth,
45686 ),
45687 }
45688 }
45689 }
45690
45691 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize12Align4 {
45692 #[inline(always)]
45693 fn new_empty() -> Self {
45694 Self::Unused1(fidl::new_empty!(u8, D))
45695 }
45696
45697 #[inline]
45698 unsafe fn decode(
45699 &mut self,
45700 decoder: &mut fidl::encoding::Decoder<'_, D>,
45701 offset: usize,
45702 mut depth: fidl::encoding::Depth,
45703 ) -> fidl::Result<()> {
45704 decoder.debug_check_bounds::<Self>(offset);
45705 #[allow(unused_variables)]
45706 let next_out_of_line = decoder.next_out_of_line();
45707 let handles_before = decoder.remaining_handles();
45708 let (ordinal, inlined, num_bytes, num_handles) =
45709 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45710
45711 let member_inline_size = match ordinal {
45712 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45713 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45714 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45715 4 => <fidl::encoding::Array<u8, 6> as fidl::encoding::TypeMarker>::inline_size(
45716 decoder.context,
45717 ),
45718 _ => return Err(fidl::Error::UnknownUnionTag),
45719 };
45720
45721 if inlined != (member_inline_size <= 4) {
45722 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45723 }
45724 let _inner_offset;
45725 if inlined {
45726 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45727 _inner_offset = offset + 8;
45728 } else {
45729 depth.increment()?;
45730 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45731 }
45732 match ordinal {
45733 1 => {
45734 #[allow(irrefutable_let_patterns)]
45735 if let UnionSize12Align4::Unused1(_) = self {
45736 } else {
45738 *self = UnionSize12Align4::Unused1(fidl::new_empty!(u8, D));
45740 }
45741 #[allow(irrefutable_let_patterns)]
45742 if let UnionSize12Align4::Unused1(ref mut val) = self {
45743 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45744 } else {
45745 unreachable!()
45746 }
45747 }
45748 2 => {
45749 #[allow(irrefutable_let_patterns)]
45750 if let UnionSize12Align4::Unused2(_) = self {
45751 } else {
45753 *self = UnionSize12Align4::Unused2(fidl::new_empty!(u8, D));
45755 }
45756 #[allow(irrefutable_let_patterns)]
45757 if let UnionSize12Align4::Unused2(ref mut val) = self {
45758 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45759 } else {
45760 unreachable!()
45761 }
45762 }
45763 3 => {
45764 #[allow(irrefutable_let_patterns)]
45765 if let UnionSize12Align4::Unused3(_) = self {
45766 } else {
45768 *self = UnionSize12Align4::Unused3(fidl::new_empty!(u8, D));
45770 }
45771 #[allow(irrefutable_let_patterns)]
45772 if let UnionSize12Align4::Unused3(ref mut val) = self {
45773 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45774 } else {
45775 unreachable!()
45776 }
45777 }
45778 4 => {
45779 #[allow(irrefutable_let_patterns)]
45780 if let UnionSize12Align4::Variant(_) = self {
45781 } else {
45783 *self = UnionSize12Align4::Variant(
45785 fidl::new_empty!(fidl::encoding::Array<u8, 6>, D),
45786 );
45787 }
45788 #[allow(irrefutable_let_patterns)]
45789 if let UnionSize12Align4::Variant(ref mut val) = self {
45790 fidl::decode!(fidl::encoding::Array<u8, 6>, D, val, decoder, _inner_offset, depth)?;
45791 } else {
45792 unreachable!()
45793 }
45794 }
45795 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45796 }
45797 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45798 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45799 }
45800 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45801 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45802 }
45803 Ok(())
45804 }
45805 }
45806
45807 impl fidl::encoding::ValueTypeMarker for UnionSize24Align8 {
45808 type Borrowed<'a> = &'a Self;
45809 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45810 value
45811 }
45812 }
45813
45814 unsafe impl fidl::encoding::TypeMarker for UnionSize24Align8 {
45815 type Owned = Self;
45816
45817 #[inline(always)]
45818 fn inline_align(_context: fidl::encoding::Context) -> usize {
45819 8
45820 }
45821
45822 #[inline(always)]
45823 fn inline_size(_context: fidl::encoding::Context) -> usize {
45824 16
45825 }
45826 }
45827
45828 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize24Align8, D>
45829 for &UnionSize24Align8
45830 {
45831 #[inline]
45832 unsafe fn encode(
45833 self,
45834 encoder: &mut fidl::encoding::Encoder<'_, D>,
45835 offset: usize,
45836 _depth: fidl::encoding::Depth,
45837 ) -> fidl::Result<()> {
45838 encoder.debug_check_bounds::<UnionSize24Align8>(offset);
45839 encoder.write_num::<u64>(self.ordinal(), offset);
45840 match self {
45841 UnionSize24Align8::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45842 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45843 encoder,
45844 offset + 8,
45845 _depth,
45846 ),
45847 UnionSize24Align8::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45848 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45849 encoder,
45850 offset + 8,
45851 _depth,
45852 ),
45853 UnionSize24Align8::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
45854 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45855 encoder,
45856 offset + 8,
45857 _depth,
45858 ),
45859 UnionSize24Align8::Variant(ref val) => {
45860 fidl::encoding::encode_in_envelope::<StructSize16Align8, D>(
45861 <StructSize16Align8 as fidl::encoding::ValueTypeMarker>::borrow(val),
45862 encoder,
45863 offset + 8,
45864 _depth,
45865 )
45866 }
45867 }
45868 }
45869 }
45870
45871 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize24Align8 {
45872 #[inline(always)]
45873 fn new_empty() -> Self {
45874 Self::Unused1(fidl::new_empty!(u8, D))
45875 }
45876
45877 #[inline]
45878 unsafe fn decode(
45879 &mut self,
45880 decoder: &mut fidl::encoding::Decoder<'_, D>,
45881 offset: usize,
45882 mut depth: fidl::encoding::Depth,
45883 ) -> fidl::Result<()> {
45884 decoder.debug_check_bounds::<Self>(offset);
45885 #[allow(unused_variables)]
45886 let next_out_of_line = decoder.next_out_of_line();
45887 let handles_before = decoder.remaining_handles();
45888 let (ordinal, inlined, num_bytes, num_handles) =
45889 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
45890
45891 let member_inline_size = match ordinal {
45892 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45893 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45894 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
45895 4 => {
45896 <StructSize16Align8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
45897 }
45898 _ => return Err(fidl::Error::UnknownUnionTag),
45899 };
45900
45901 if inlined != (member_inline_size <= 4) {
45902 return Err(fidl::Error::InvalidInlineBitInEnvelope);
45903 }
45904 let _inner_offset;
45905 if inlined {
45906 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
45907 _inner_offset = offset + 8;
45908 } else {
45909 depth.increment()?;
45910 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
45911 }
45912 match ordinal {
45913 1 => {
45914 #[allow(irrefutable_let_patterns)]
45915 if let UnionSize24Align8::Unused1(_) = self {
45916 } else {
45918 *self = UnionSize24Align8::Unused1(fidl::new_empty!(u8, D));
45920 }
45921 #[allow(irrefutable_let_patterns)]
45922 if let UnionSize24Align8::Unused1(ref mut val) = self {
45923 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45924 } else {
45925 unreachable!()
45926 }
45927 }
45928 2 => {
45929 #[allow(irrefutable_let_patterns)]
45930 if let UnionSize24Align8::Unused2(_) = self {
45931 } else {
45933 *self = UnionSize24Align8::Unused2(fidl::new_empty!(u8, D));
45935 }
45936 #[allow(irrefutable_let_patterns)]
45937 if let UnionSize24Align8::Unused2(ref mut val) = self {
45938 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45939 } else {
45940 unreachable!()
45941 }
45942 }
45943 3 => {
45944 #[allow(irrefutable_let_patterns)]
45945 if let UnionSize24Align8::Unused3(_) = self {
45946 } else {
45948 *self = UnionSize24Align8::Unused3(fidl::new_empty!(u8, D));
45950 }
45951 #[allow(irrefutable_let_patterns)]
45952 if let UnionSize24Align8::Unused3(ref mut val) = self {
45953 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
45954 } else {
45955 unreachable!()
45956 }
45957 }
45958 4 => {
45959 #[allow(irrefutable_let_patterns)]
45960 if let UnionSize24Align8::Variant(_) = self {
45961 } else {
45963 *self = UnionSize24Align8::Variant(fidl::new_empty!(StructSize16Align8, D));
45965 }
45966 #[allow(irrefutable_let_patterns)]
45967 if let UnionSize24Align8::Variant(ref mut val) = self {
45968 fidl::decode!(StructSize16Align8, D, val, decoder, _inner_offset, depth)?;
45969 } else {
45970 unreachable!()
45971 }
45972 }
45973 ordinal => panic!("unexpected ordinal {:?}", ordinal),
45974 }
45975 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
45976 return Err(fidl::Error::InvalidNumBytesInEnvelope);
45977 }
45978 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
45979 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
45980 }
45981 Ok(())
45982 }
45983 }
45984
45985 impl fidl::encoding::ValueTypeMarker for UnionSize36Align4 {
45986 type Borrowed<'a> = &'a Self;
45987 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
45988 value
45989 }
45990 }
45991
45992 unsafe impl fidl::encoding::TypeMarker for UnionSize36Align4 {
45993 type Owned = Self;
45994
45995 #[inline(always)]
45996 fn inline_align(_context: fidl::encoding::Context) -> usize {
45997 8
45998 }
45999
46000 #[inline(always)]
46001 fn inline_size(_context: fidl::encoding::Context) -> usize {
46002 16
46003 }
46004 }
46005
46006 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize36Align4, D>
46007 for &UnionSize36Align4
46008 {
46009 #[inline]
46010 unsafe fn encode(
46011 self,
46012 encoder: &mut fidl::encoding::Encoder<'_, D>,
46013 offset: usize,
46014 _depth: fidl::encoding::Depth,
46015 ) -> fidl::Result<()> {
46016 encoder.debug_check_bounds::<UnionSize36Align4>(offset);
46017 encoder.write_num::<u64>(self.ordinal(), offset);
46018 match self {
46019 UnionSize36Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46020 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46021 encoder,
46022 offset + 8,
46023 _depth,
46024 ),
46025 UnionSize36Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46026 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46027 encoder,
46028 offset + 8,
46029 _depth,
46030 ),
46031 UnionSize36Align4::Unused3(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46032 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46033 encoder,
46034 offset + 8,
46035 _depth,
46036 ),
46037 UnionSize36Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<
46038 fidl::encoding::Array<u8, 32>,
46039 D,
46040 >(
46041 <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(val),
46042 encoder,
46043 offset + 8,
46044 _depth,
46045 ),
46046 }
46047 }
46048 }
46049
46050 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize36Align4 {
46051 #[inline(always)]
46052 fn new_empty() -> Self {
46053 Self::Unused1(fidl::new_empty!(u8, D))
46054 }
46055
46056 #[inline]
46057 unsafe fn decode(
46058 &mut self,
46059 decoder: &mut fidl::encoding::Decoder<'_, D>,
46060 offset: usize,
46061 mut depth: fidl::encoding::Depth,
46062 ) -> fidl::Result<()> {
46063 decoder.debug_check_bounds::<Self>(offset);
46064 #[allow(unused_variables)]
46065 let next_out_of_line = decoder.next_out_of_line();
46066 let handles_before = decoder.remaining_handles();
46067 let (ordinal, inlined, num_bytes, num_handles) =
46068 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46069
46070 let member_inline_size = match ordinal {
46071 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46072 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46073 3 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46074 4 => <fidl::encoding::Array<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
46075 decoder.context,
46076 ),
46077 _ => return Err(fidl::Error::UnknownUnionTag),
46078 };
46079
46080 if inlined != (member_inline_size <= 4) {
46081 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46082 }
46083 let _inner_offset;
46084 if inlined {
46085 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46086 _inner_offset = offset + 8;
46087 } else {
46088 depth.increment()?;
46089 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46090 }
46091 match ordinal {
46092 1 => {
46093 #[allow(irrefutable_let_patterns)]
46094 if let UnionSize36Align4::Unused1(_) = self {
46095 } else {
46097 *self = UnionSize36Align4::Unused1(fidl::new_empty!(u8, D));
46099 }
46100 #[allow(irrefutable_let_patterns)]
46101 if let UnionSize36Align4::Unused1(ref mut val) = self {
46102 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46103 } else {
46104 unreachable!()
46105 }
46106 }
46107 2 => {
46108 #[allow(irrefutable_let_patterns)]
46109 if let UnionSize36Align4::Unused2(_) = self {
46110 } else {
46112 *self = UnionSize36Align4::Unused2(fidl::new_empty!(u8, D));
46114 }
46115 #[allow(irrefutable_let_patterns)]
46116 if let UnionSize36Align4::Unused2(ref mut val) = self {
46117 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46118 } else {
46119 unreachable!()
46120 }
46121 }
46122 3 => {
46123 #[allow(irrefutable_let_patterns)]
46124 if let UnionSize36Align4::Unused3(_) = self {
46125 } else {
46127 *self = UnionSize36Align4::Unused3(fidl::new_empty!(u8, D));
46129 }
46130 #[allow(irrefutable_let_patterns)]
46131 if let UnionSize36Align4::Unused3(ref mut val) = self {
46132 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46133 } else {
46134 unreachable!()
46135 }
46136 }
46137 4 => {
46138 #[allow(irrefutable_let_patterns)]
46139 if let UnionSize36Align4::Variant(_) = self {
46140 } else {
46142 *self = UnionSize36Align4::Variant(
46144 fidl::new_empty!(fidl::encoding::Array<u8, 32>, D),
46145 );
46146 }
46147 #[allow(irrefutable_let_patterns)]
46148 if let UnionSize36Align4::Variant(ref mut val) = self {
46149 fidl::decode!(fidl::encoding::Array<u8, 32>, D, val, decoder, _inner_offset, depth)?;
46150 } else {
46151 unreachable!()
46152 }
46153 }
46154 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46155 }
46156 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46157 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46158 }
46159 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46160 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46161 }
46162 Ok(())
46163 }
46164 }
46165
46166 impl fidl::encoding::ValueTypeMarker for UnionSize8Align4 {
46167 type Borrowed<'a> = &'a Self;
46168 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46169 value
46170 }
46171 }
46172
46173 unsafe impl fidl::encoding::TypeMarker for UnionSize8Align4 {
46174 type Owned = Self;
46175
46176 #[inline(always)]
46177 fn inline_align(_context: fidl::encoding::Context) -> usize {
46178 8
46179 }
46180
46181 #[inline(always)]
46182 fn inline_size(_context: fidl::encoding::Context) -> usize {
46183 16
46184 }
46185 }
46186
46187 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionSize8Align4, D>
46188 for &UnionSize8Align4
46189 {
46190 #[inline]
46191 unsafe fn encode(
46192 self,
46193 encoder: &mut fidl::encoding::Encoder<'_, D>,
46194 offset: usize,
46195 _depth: fidl::encoding::Depth,
46196 ) -> fidl::Result<()> {
46197 encoder.debug_check_bounds::<UnionSize8Align4>(offset);
46198 encoder.write_num::<u64>(self.ordinal(), offset);
46199 match self {
46200 UnionSize8Align4::Unused1(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46201 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46202 encoder,
46203 offset + 8,
46204 _depth,
46205 ),
46206 UnionSize8Align4::Unused2(ref val) => fidl::encoding::encode_in_envelope::<u8, D>(
46207 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46208 encoder,
46209 offset + 8,
46210 _depth,
46211 ),
46212 UnionSize8Align4::Variant(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
46213 <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
46214 encoder,
46215 offset + 8,
46216 _depth,
46217 ),
46218 }
46219 }
46220 }
46221
46222 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionSize8Align4 {
46223 #[inline(always)]
46224 fn new_empty() -> Self {
46225 Self::Unused1(fidl::new_empty!(u8, D))
46226 }
46227
46228 #[inline]
46229 unsafe fn decode(
46230 &mut self,
46231 decoder: &mut fidl::encoding::Decoder<'_, D>,
46232 offset: usize,
46233 mut depth: fidl::encoding::Depth,
46234 ) -> fidl::Result<()> {
46235 decoder.debug_check_bounds::<Self>(offset);
46236 #[allow(unused_variables)]
46237 let next_out_of_line = decoder.next_out_of_line();
46238 let handles_before = decoder.remaining_handles();
46239 let (ordinal, inlined, num_bytes, num_handles) =
46240 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46241
46242 let member_inline_size = match ordinal {
46243 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46244 2 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46245 3 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46246 _ => return Err(fidl::Error::UnknownUnionTag),
46247 };
46248
46249 if inlined != (member_inline_size <= 4) {
46250 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46251 }
46252 let _inner_offset;
46253 if inlined {
46254 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46255 _inner_offset = offset + 8;
46256 } else {
46257 depth.increment()?;
46258 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46259 }
46260 match ordinal {
46261 1 => {
46262 #[allow(irrefutable_let_patterns)]
46263 if let UnionSize8Align4::Unused1(_) = self {
46264 } else {
46266 *self = UnionSize8Align4::Unused1(fidl::new_empty!(u8, D));
46268 }
46269 #[allow(irrefutable_let_patterns)]
46270 if let UnionSize8Align4::Unused1(ref mut val) = self {
46271 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46272 } else {
46273 unreachable!()
46274 }
46275 }
46276 2 => {
46277 #[allow(irrefutable_let_patterns)]
46278 if let UnionSize8Align4::Unused2(_) = self {
46279 } else {
46281 *self = UnionSize8Align4::Unused2(fidl::new_empty!(u8, D));
46283 }
46284 #[allow(irrefutable_let_patterns)]
46285 if let UnionSize8Align4::Unused2(ref mut val) = self {
46286 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46287 } else {
46288 unreachable!()
46289 }
46290 }
46291 3 => {
46292 #[allow(irrefutable_let_patterns)]
46293 if let UnionSize8Align4::Variant(_) = self {
46294 } else {
46296 *self = UnionSize8Align4::Variant(fidl::new_empty!(u32, D));
46298 }
46299 #[allow(irrefutable_let_patterns)]
46300 if let UnionSize8Align4::Variant(ref mut val) = self {
46301 fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
46302 } else {
46303 unreachable!()
46304 }
46305 }
46306 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46307 }
46308 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46309 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46310 }
46311 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46312 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46313 }
46314 Ok(())
46315 }
46316 }
46317
46318 impl fidl::encoding::ValueTypeMarker for UnionWithBoundString {
46319 type Borrowed<'a> = &'a Self;
46320 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46321 value
46322 }
46323 }
46324
46325 unsafe impl fidl::encoding::TypeMarker for UnionWithBoundString {
46326 type Owned = Self;
46327
46328 #[inline(always)]
46329 fn inline_align(_context: fidl::encoding::Context) -> usize {
46330 8
46331 }
46332
46333 #[inline(always)]
46334 fn inline_size(_context: fidl::encoding::Context) -> usize {
46335 16
46336 }
46337 }
46338
46339 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionWithBoundString, D>
46340 for &UnionWithBoundString
46341 {
46342 #[inline]
46343 unsafe fn encode(
46344 self,
46345 encoder: &mut fidl::encoding::Encoder<'_, D>,
46346 offset: usize,
46347 _depth: fidl::encoding::Depth,
46348 ) -> fidl::Result<()> {
46349 encoder.debug_check_bounds::<UnionWithBoundString>(offset);
46350 encoder.write_num::<u64>(self.ordinal(), offset);
46351 match self {
46352 UnionWithBoundString::BoundFiveStr(ref val) => fidl::encoding::encode_in_envelope::<
46353 fidl::encoding::BoundedString<5>,
46354 D,
46355 >(
46356 <fidl::encoding::BoundedString<5> as fidl::encoding::ValueTypeMarker>::borrow(
46357 val,
46358 ),
46359 encoder,
46360 offset + 8,
46361 _depth,
46362 ),
46363 }
46364 }
46365 }
46366
46367 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionWithBoundString {
46368 #[inline(always)]
46369 fn new_empty() -> Self {
46370 Self::BoundFiveStr(fidl::new_empty!(fidl::encoding::BoundedString<5>, D))
46371 }
46372
46373 #[inline]
46374 unsafe fn decode(
46375 &mut self,
46376 decoder: &mut fidl::encoding::Decoder<'_, D>,
46377 offset: usize,
46378 mut depth: fidl::encoding::Depth,
46379 ) -> fidl::Result<()> {
46380 decoder.debug_check_bounds::<Self>(offset);
46381 #[allow(unused_variables)]
46382 let next_out_of_line = decoder.next_out_of_line();
46383 let handles_before = decoder.remaining_handles();
46384 let (ordinal, inlined, num_bytes, num_handles) =
46385 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46386
46387 let member_inline_size = match ordinal {
46388 1 => <fidl::encoding::BoundedString<5> as fidl::encoding::TypeMarker>::inline_size(
46389 decoder.context,
46390 ),
46391 _ => return Err(fidl::Error::UnknownUnionTag),
46392 };
46393
46394 if inlined != (member_inline_size <= 4) {
46395 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46396 }
46397 let _inner_offset;
46398 if inlined {
46399 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46400 _inner_offset = offset + 8;
46401 } else {
46402 depth.increment()?;
46403 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46404 }
46405 match ordinal {
46406 1 => {
46407 #[allow(irrefutable_let_patterns)]
46408 if let UnionWithBoundString::BoundFiveStr(_) = self {
46409 } else {
46411 *self = UnionWithBoundString::BoundFiveStr(fidl::new_empty!(
46413 fidl::encoding::BoundedString<5>,
46414 D
46415 ));
46416 }
46417 #[allow(irrefutable_let_patterns)]
46418 if let UnionWithBoundString::BoundFiveStr(ref mut val) = self {
46419 fidl::decode!(
46420 fidl::encoding::BoundedString<5>,
46421 D,
46422 val,
46423 decoder,
46424 _inner_offset,
46425 depth
46426 )?;
46427 } else {
46428 unreachable!()
46429 }
46430 }
46431 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46432 }
46433 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46434 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46435 }
46436 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46437 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46438 }
46439 Ok(())
46440 }
46441 }
46442
46443 impl fidl::encoding::ValueTypeMarker for UnionWithEmptyStruct {
46444 type Borrowed<'a> = &'a Self;
46445 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46446 value
46447 }
46448 }
46449
46450 unsafe impl fidl::encoding::TypeMarker for UnionWithEmptyStruct {
46451 type Owned = Self;
46452
46453 #[inline(always)]
46454 fn inline_align(_context: fidl::encoding::Context) -> usize {
46455 8
46456 }
46457
46458 #[inline(always)]
46459 fn inline_size(_context: fidl::encoding::Context) -> usize {
46460 16
46461 }
46462 }
46463
46464 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<UnionWithEmptyStruct, D>
46465 for &UnionWithEmptyStruct
46466 {
46467 #[inline]
46468 unsafe fn encode(
46469 self,
46470 encoder: &mut fidl::encoding::Encoder<'_, D>,
46471 offset: usize,
46472 _depth: fidl::encoding::Depth,
46473 ) -> fidl::Result<()> {
46474 encoder.debug_check_bounds::<UnionWithEmptyStruct>(offset);
46475 encoder.write_num::<u64>(self.ordinal(), offset);
46476 match self {
46477 UnionWithEmptyStruct::S(ref val) => {
46478 fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
46479 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
46480 encoder,
46481 offset + 8,
46482 _depth,
46483 )
46484 }
46485 UnionWithEmptyStruct::ForceAlignmentOf8(ref val) => {
46486 fidl::encoding::encode_in_envelope::<u64, D>(
46487 <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
46488 encoder,
46489 offset + 8,
46490 _depth,
46491 )
46492 }
46493 }
46494 }
46495 }
46496
46497 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnionWithEmptyStruct {
46498 #[inline(always)]
46499 fn new_empty() -> Self {
46500 Self::S(fidl::new_empty!(EmptyStruct, D))
46501 }
46502
46503 #[inline]
46504 unsafe fn decode(
46505 &mut self,
46506 decoder: &mut fidl::encoding::Decoder<'_, D>,
46507 offset: usize,
46508 mut depth: fidl::encoding::Depth,
46509 ) -> fidl::Result<()> {
46510 decoder.debug_check_bounds::<Self>(offset);
46511 #[allow(unused_variables)]
46512 let next_out_of_line = decoder.next_out_of_line();
46513 let handles_before = decoder.remaining_handles();
46514 let (ordinal, inlined, num_bytes, num_handles) =
46515 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46516
46517 let member_inline_size = match ordinal {
46518 1 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46519 2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46520 _ => return Err(fidl::Error::UnknownUnionTag),
46521 };
46522
46523 if inlined != (member_inline_size <= 4) {
46524 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46525 }
46526 let _inner_offset;
46527 if inlined {
46528 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46529 _inner_offset = offset + 8;
46530 } else {
46531 depth.increment()?;
46532 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46533 }
46534 match ordinal {
46535 1 => {
46536 #[allow(irrefutable_let_patterns)]
46537 if let UnionWithEmptyStruct::S(_) = self {
46538 } else {
46540 *self = UnionWithEmptyStruct::S(fidl::new_empty!(EmptyStruct, D));
46542 }
46543 #[allow(irrefutable_let_patterns)]
46544 if let UnionWithEmptyStruct::S(ref mut val) = self {
46545 fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
46546 } else {
46547 unreachable!()
46548 }
46549 }
46550 2 => {
46551 #[allow(irrefutable_let_patterns)]
46552 if let UnionWithEmptyStruct::ForceAlignmentOf8(_) = self {
46553 } else {
46555 *self = UnionWithEmptyStruct::ForceAlignmentOf8(fidl::new_empty!(u64, D));
46557 }
46558 #[allow(irrefutable_let_patterns)]
46559 if let UnionWithEmptyStruct::ForceAlignmentOf8(ref mut val) = self {
46560 fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
46561 } else {
46562 unreachable!()
46563 }
46564 }
46565 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46566 }
46567 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46568 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46569 }
46570 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46571 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46572 }
46573 Ok(())
46574 }
46575 }
46576
46577 impl fidl::encoding::ValueTypeMarker for UnionWithRegression10Table {
46578 type Borrowed<'a> = &'a Self;
46579 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46580 value
46581 }
46582 }
46583
46584 unsafe impl fidl::encoding::TypeMarker for UnionWithRegression10Table {
46585 type Owned = Self;
46586
46587 #[inline(always)]
46588 fn inline_align(_context: fidl::encoding::Context) -> usize {
46589 8
46590 }
46591
46592 #[inline(always)]
46593 fn inline_size(_context: fidl::encoding::Context) -> usize {
46594 16
46595 }
46596 }
46597
46598 unsafe impl<D: fidl::encoding::ResourceDialect>
46599 fidl::encoding::Encode<UnionWithRegression10Table, D> for &UnionWithRegression10Table
46600 {
46601 #[inline]
46602 unsafe fn encode(
46603 self,
46604 encoder: &mut fidl::encoding::Encoder<'_, D>,
46605 offset: usize,
46606 _depth: fidl::encoding::Depth,
46607 ) -> fidl::Result<()> {
46608 encoder.debug_check_bounds::<UnionWithRegression10Table>(offset);
46609 encoder.write_num::<u64>(self.ordinal(), offset);
46610 match self {
46611 UnionWithRegression10Table::Unused(ref val) => {
46612 fidl::encoding::encode_in_envelope::<u8, D>(
46613 <u8 as fidl::encoding::ValueTypeMarker>::borrow(val),
46614 encoder,
46615 offset + 8,
46616 _depth,
46617 )
46618 }
46619 UnionWithRegression10Table::AtV2(ref val) => {
46620 fidl::encoding::encode_in_envelope::<Regression10TableV2, D>(
46621 <Regression10TableV2 as fidl::encoding::ValueTypeMarker>::borrow(val),
46622 encoder,
46623 offset + 8,
46624 _depth,
46625 )
46626 }
46627 }
46628 }
46629 }
46630
46631 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
46632 for UnionWithRegression10Table
46633 {
46634 #[inline(always)]
46635 fn new_empty() -> Self {
46636 Self::Unused(fidl::new_empty!(u8, D))
46637 }
46638
46639 #[inline]
46640 unsafe fn decode(
46641 &mut self,
46642 decoder: &mut fidl::encoding::Decoder<'_, D>,
46643 offset: usize,
46644 mut depth: fidl::encoding::Depth,
46645 ) -> fidl::Result<()> {
46646 decoder.debug_check_bounds::<Self>(offset);
46647 #[allow(unused_variables)]
46648 let next_out_of_line = decoder.next_out_of_line();
46649 let handles_before = decoder.remaining_handles();
46650 let (ordinal, inlined, num_bytes, num_handles) =
46651 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46652
46653 let member_inline_size = match ordinal {
46654 1 => <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46655 3 => <Regression10TableV2 as fidl::encoding::TypeMarker>::inline_size(
46656 decoder.context,
46657 ),
46658 _ => return Err(fidl::Error::UnknownUnionTag),
46659 };
46660
46661 if inlined != (member_inline_size <= 4) {
46662 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46663 }
46664 let _inner_offset;
46665 if inlined {
46666 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46667 _inner_offset = offset + 8;
46668 } else {
46669 depth.increment()?;
46670 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46671 }
46672 match ordinal {
46673 1 => {
46674 #[allow(irrefutable_let_patterns)]
46675 if let UnionWithRegression10Table::Unused(_) = self {
46676 } else {
46678 *self = UnionWithRegression10Table::Unused(fidl::new_empty!(u8, D));
46680 }
46681 #[allow(irrefutable_let_patterns)]
46682 if let UnionWithRegression10Table::Unused(ref mut val) = self {
46683 fidl::decode!(u8, D, val, decoder, _inner_offset, depth)?;
46684 } else {
46685 unreachable!()
46686 }
46687 }
46688 3 => {
46689 #[allow(irrefutable_let_patterns)]
46690 if let UnionWithRegression10Table::AtV2(_) = self {
46691 } else {
46693 *self = UnionWithRegression10Table::AtV2(fidl::new_empty!(
46695 Regression10TableV2,
46696 D
46697 ));
46698 }
46699 #[allow(irrefutable_let_patterns)]
46700 if let UnionWithRegression10Table::AtV2(ref mut val) = self {
46701 fidl::decode!(Regression10TableV2, D, val, decoder, _inner_offset, depth)?;
46702 } else {
46703 unreachable!()
46704 }
46705 }
46706 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46707 }
46708 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46709 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46710 }
46711 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46712 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46713 }
46714 Ok(())
46715 }
46716 }
46717
46718 impl fidl::encoding::ValueTypeMarker for UnionWithVectorOfVectors {
46719 type Borrowed<'a> = &'a Self;
46720 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46721 value
46722 }
46723 }
46724
46725 unsafe impl fidl::encoding::TypeMarker for UnionWithVectorOfVectors {
46726 type Owned = Self;
46727
46728 #[inline(always)]
46729 fn inline_align(_context: fidl::encoding::Context) -> usize {
46730 8
46731 }
46732
46733 #[inline(always)]
46734 fn inline_size(_context: fidl::encoding::Context) -> usize {
46735 16
46736 }
46737 }
46738
46739 unsafe impl<D: fidl::encoding::ResourceDialect>
46740 fidl::encoding::Encode<UnionWithVectorOfVectors, D> for &UnionWithVectorOfVectors
46741 {
46742 #[inline]
46743 unsafe fn encode(
46744 self,
46745 encoder: &mut fidl::encoding::Encoder<'_, D>,
46746 offset: usize,
46747 _depth: fidl::encoding::Depth,
46748 ) -> fidl::Result<()> {
46749 encoder.debug_check_bounds::<UnionWithVectorOfVectors>(offset);
46750 encoder.write_num::<u64>(self.ordinal(), offset);
46751 match self {
46752 UnionWithVectorOfVectors::V(ref val) => fidl::encoding::encode_in_envelope::<
46753 fidl::encoding::UnboundedVector<
46754 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
46755 >,
46756 D,
46757 >(
46758 <fidl::encoding::UnboundedVector<
46759 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
46760 > as fidl::encoding::ValueTypeMarker>::borrow(val),
46761 encoder,
46762 offset + 8,
46763 _depth,
46764 ),
46765 }
46766 }
46767 }
46768
46769 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
46770 for UnionWithVectorOfVectors
46771 {
46772 #[inline(always)]
46773 fn new_empty() -> Self {
46774 Self::V(fidl::new_empty!(
46775 fidl::encoding::UnboundedVector<
46776 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
46777 >,
46778 D
46779 ))
46780 }
46781
46782 #[inline]
46783 unsafe fn decode(
46784 &mut self,
46785 decoder: &mut fidl::encoding::Decoder<'_, D>,
46786 offset: usize,
46787 mut depth: fidl::encoding::Depth,
46788 ) -> fidl::Result<()> {
46789 decoder.debug_check_bounds::<Self>(offset);
46790 #[allow(unused_variables)]
46791 let next_out_of_line = decoder.next_out_of_line();
46792 let handles_before = decoder.remaining_handles();
46793 let (ordinal, inlined, num_bytes, num_handles) =
46794 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46795
46796 let member_inline_size = match ordinal {
46797 1 => <fidl::encoding::UnboundedVector<
46798 fidl::encoding::UnboundedVector<fidl::encoding::Boxed<StructSize3Align1>>,
46799 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
46800 _ => return Err(fidl::Error::UnknownUnionTag),
46801 };
46802
46803 if inlined != (member_inline_size <= 4) {
46804 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46805 }
46806 let _inner_offset;
46807 if inlined {
46808 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46809 _inner_offset = offset + 8;
46810 } else {
46811 depth.increment()?;
46812 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46813 }
46814 match ordinal {
46815 1 => {
46816 #[allow(irrefutable_let_patterns)]
46817 if let UnionWithVectorOfVectors::V(_) = self {
46818 } else {
46820 *self = UnionWithVectorOfVectors::V(fidl::new_empty!(
46822 fidl::encoding::UnboundedVector<
46823 fidl::encoding::UnboundedVector<
46824 fidl::encoding::Boxed<StructSize3Align1>,
46825 >,
46826 >,
46827 D
46828 ));
46829 }
46830 #[allow(irrefutable_let_patterns)]
46831 if let UnionWithVectorOfVectors::V(ref mut val) = self {
46832 fidl::decode!(
46833 fidl::encoding::UnboundedVector<
46834 fidl::encoding::UnboundedVector<
46835 fidl::encoding::Boxed<StructSize3Align1>,
46836 >,
46837 >,
46838 D,
46839 val,
46840 decoder,
46841 _inner_offset,
46842 depth
46843 )?;
46844 } else {
46845 unreachable!()
46846 }
46847 }
46848 ordinal => panic!("unexpected ordinal {:?}", ordinal),
46849 }
46850 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46851 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46852 }
46853 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46854 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46855 }
46856 Ok(())
46857 }
46858 }
46859
46860 impl fidl::encoding::ValueTypeMarker for XUnionOfTableThenXUnionThenUnion {
46861 type Borrowed<'a> = &'a Self;
46862 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
46863 value
46864 }
46865 }
46866
46867 unsafe impl fidl::encoding::TypeMarker for XUnionOfTableThenXUnionThenUnion {
46868 type Owned = Self;
46869
46870 #[inline(always)]
46871 fn inline_align(_context: fidl::encoding::Context) -> usize {
46872 8
46873 }
46874
46875 #[inline(always)]
46876 fn inline_size(_context: fidl::encoding::Context) -> usize {
46877 16
46878 }
46879 }
46880
46881 unsafe impl<D: fidl::encoding::ResourceDialect>
46882 fidl::encoding::Encode<XUnionOfTableThenXUnionThenUnion, D>
46883 for &XUnionOfTableThenXUnionThenUnion
46884 {
46885 #[inline]
46886 unsafe fn encode(
46887 self,
46888 encoder: &mut fidl::encoding::Encoder<'_, D>,
46889 offset: usize,
46890 _depth: fidl::encoding::Depth,
46891 ) -> fidl::Result<()> {
46892 encoder.debug_check_bounds::<XUnionOfTableThenXUnionThenUnion>(offset);
46893 encoder.write_num::<u64>(self.ordinal(), offset);
46894 match self {
46895 XUnionOfTableThenXUnionThenUnion::Variant(ref val) => {
46896 fidl::encoding::encode_in_envelope::<TableOfXUnionThenUnion, D>(
46897 <TableOfXUnionThenUnion as fidl::encoding::ValueTypeMarker>::borrow(val),
46898 encoder,
46899 offset + 8,
46900 _depth,
46901 )
46902 }
46903 XUnionOfTableThenXUnionThenUnion::__SourceBreaking { .. } => {
46904 Err(fidl::Error::UnknownUnionTag)
46905 }
46906 }
46907 }
46908 }
46909
46910 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
46911 for XUnionOfTableThenXUnionThenUnion
46912 {
46913 #[inline(always)]
46914 fn new_empty() -> Self {
46915 Self::__SourceBreaking { unknown_ordinal: 0 }
46916 }
46917
46918 #[inline]
46919 unsafe fn decode(
46920 &mut self,
46921 decoder: &mut fidl::encoding::Decoder<'_, D>,
46922 offset: usize,
46923 mut depth: fidl::encoding::Depth,
46924 ) -> fidl::Result<()> {
46925 decoder.debug_check_bounds::<Self>(offset);
46926 #[allow(unused_variables)]
46927 let next_out_of_line = decoder.next_out_of_line();
46928 let handles_before = decoder.remaining_handles();
46929 let (ordinal, inlined, num_bytes, num_handles) =
46930 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
46931
46932 let member_inline_size = match ordinal {
46933 1 => <TableOfXUnionThenUnion as fidl::encoding::TypeMarker>::inline_size(
46934 decoder.context,
46935 ),
46936 0 => return Err(fidl::Error::UnknownUnionTag),
46937 _ => num_bytes as usize,
46938 };
46939
46940 if inlined != (member_inline_size <= 4) {
46941 return Err(fidl::Error::InvalidInlineBitInEnvelope);
46942 }
46943 let _inner_offset;
46944 if inlined {
46945 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
46946 _inner_offset = offset + 8;
46947 } else {
46948 depth.increment()?;
46949 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
46950 }
46951 match ordinal {
46952 1 => {
46953 #[allow(irrefutable_let_patterns)]
46954 if let XUnionOfTableThenXUnionThenUnion::Variant(_) = self {
46955 } else {
46957 *self = XUnionOfTableThenXUnionThenUnion::Variant(fidl::new_empty!(
46959 TableOfXUnionThenUnion,
46960 D
46961 ));
46962 }
46963 #[allow(irrefutable_let_patterns)]
46964 if let XUnionOfTableThenXUnionThenUnion::Variant(ref mut val) = self {
46965 fidl::decode!(
46966 TableOfXUnionThenUnion,
46967 D,
46968 val,
46969 decoder,
46970 _inner_offset,
46971 depth
46972 )?;
46973 } else {
46974 unreachable!()
46975 }
46976 }
46977 #[allow(deprecated)]
46978 ordinal => {
46979 for _ in 0..num_handles {
46980 decoder.drop_next_handle()?;
46981 }
46982 *self = XUnionOfTableThenXUnionThenUnion::__SourceBreaking {
46983 unknown_ordinal: ordinal,
46984 };
46985 }
46986 }
46987 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
46988 return Err(fidl::Error::InvalidNumBytesInEnvelope);
46989 }
46990 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
46991 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
46992 }
46993 Ok(())
46994 }
46995 }
46996
46997 impl fidl::encoding::ValueTypeMarker for XUnionOfUnion {
46998 type Borrowed<'a> = &'a Self;
46999 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47000 value
47001 }
47002 }
47003
47004 unsafe impl fidl::encoding::TypeMarker for XUnionOfUnion {
47005 type Owned = Self;
47006
47007 #[inline(always)]
47008 fn inline_align(_context: fidl::encoding::Context) -> usize {
47009 8
47010 }
47011
47012 #[inline(always)]
47013 fn inline_size(_context: fidl::encoding::Context) -> usize {
47014 16
47015 }
47016 }
47017
47018 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionOfUnion, D>
47019 for &XUnionOfUnion
47020 {
47021 #[inline]
47022 unsafe fn encode(
47023 self,
47024 encoder: &mut fidl::encoding::Encoder<'_, D>,
47025 offset: usize,
47026 _depth: fidl::encoding::Depth,
47027 ) -> fidl::Result<()> {
47028 encoder.debug_check_bounds::<XUnionOfUnion>(offset);
47029 encoder.write_num::<u64>(self.ordinal(), offset);
47030 match self {
47031 XUnionOfUnion::Variant(ref val) => {
47032 fidl::encoding::encode_in_envelope::<UnionAtTheBottom, D>(
47033 <UnionAtTheBottom as fidl::encoding::ValueTypeMarker>::borrow(val),
47034 encoder,
47035 offset + 8,
47036 _depth,
47037 )
47038 }
47039 XUnionOfUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47040 }
47041 }
47042 }
47043
47044 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionOfUnion {
47045 #[inline(always)]
47046 fn new_empty() -> Self {
47047 Self::__SourceBreaking { unknown_ordinal: 0 }
47048 }
47049
47050 #[inline]
47051 unsafe fn decode(
47052 &mut self,
47053 decoder: &mut fidl::encoding::Decoder<'_, D>,
47054 offset: usize,
47055 mut depth: fidl::encoding::Depth,
47056 ) -> fidl::Result<()> {
47057 decoder.debug_check_bounds::<Self>(offset);
47058 #[allow(unused_variables)]
47059 let next_out_of_line = decoder.next_out_of_line();
47060 let handles_before = decoder.remaining_handles();
47061 let (ordinal, inlined, num_bytes, num_handles) =
47062 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47063
47064 let member_inline_size = match ordinal {
47065 1 => <UnionAtTheBottom as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47066 0 => return Err(fidl::Error::UnknownUnionTag),
47067 _ => num_bytes as usize,
47068 };
47069
47070 if inlined != (member_inline_size <= 4) {
47071 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47072 }
47073 let _inner_offset;
47074 if inlined {
47075 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47076 _inner_offset = offset + 8;
47077 } else {
47078 depth.increment()?;
47079 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47080 }
47081 match ordinal {
47082 1 => {
47083 #[allow(irrefutable_let_patterns)]
47084 if let XUnionOfUnion::Variant(_) = self {
47085 } else {
47087 *self = XUnionOfUnion::Variant(fidl::new_empty!(UnionAtTheBottom, D));
47089 }
47090 #[allow(irrefutable_let_patterns)]
47091 if let XUnionOfUnion::Variant(ref mut val) = self {
47092 fidl::decode!(UnionAtTheBottom, D, val, decoder, _inner_offset, depth)?;
47093 } else {
47094 unreachable!()
47095 }
47096 }
47097 #[allow(deprecated)]
47098 ordinal => {
47099 for _ in 0..num_handles {
47100 decoder.drop_next_handle()?;
47101 }
47102 *self = XUnionOfUnion::__SourceBreaking { unknown_ordinal: ordinal };
47103 }
47104 }
47105 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47106 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47107 }
47108 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47109 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47110 }
47111 Ok(())
47112 }
47113 }
47114
47115 impl fidl::encoding::ValueTypeMarker for XUnionWithEmptyStruct {
47116 type Borrowed<'a> = &'a Self;
47117 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47118 value
47119 }
47120 }
47121
47122 unsafe impl fidl::encoding::TypeMarker for XUnionWithEmptyStruct {
47123 type Owned = Self;
47124
47125 #[inline(always)]
47126 fn inline_align(_context: fidl::encoding::Context) -> usize {
47127 8
47128 }
47129
47130 #[inline(always)]
47131 fn inline_size(_context: fidl::encoding::Context) -> usize {
47132 16
47133 }
47134 }
47135
47136 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithEmptyStruct, D>
47137 for &XUnionWithEmptyStruct
47138 {
47139 #[inline]
47140 unsafe fn encode(
47141 self,
47142 encoder: &mut fidl::encoding::Encoder<'_, D>,
47143 offset: usize,
47144 _depth: fidl::encoding::Depth,
47145 ) -> fidl::Result<()> {
47146 encoder.debug_check_bounds::<XUnionWithEmptyStruct>(offset);
47147 encoder.write_num::<u64>(self.ordinal(), offset);
47148 match self {
47149 XUnionWithEmptyStruct::S(ref val) => {
47150 fidl::encoding::encode_in_envelope::<EmptyStruct, D>(
47151 <EmptyStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
47152 encoder,
47153 offset + 8,
47154 _depth,
47155 )
47156 }
47157 XUnionWithEmptyStruct::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47158 }
47159 }
47160 }
47161
47162 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithEmptyStruct {
47163 #[inline(always)]
47164 fn new_empty() -> Self {
47165 Self::__SourceBreaking { unknown_ordinal: 0 }
47166 }
47167
47168 #[inline]
47169 unsafe fn decode(
47170 &mut self,
47171 decoder: &mut fidl::encoding::Decoder<'_, D>,
47172 offset: usize,
47173 mut depth: fidl::encoding::Depth,
47174 ) -> fidl::Result<()> {
47175 decoder.debug_check_bounds::<Self>(offset);
47176 #[allow(unused_variables)]
47177 let next_out_of_line = decoder.next_out_of_line();
47178 let handles_before = decoder.remaining_handles();
47179 let (ordinal, inlined, num_bytes, num_handles) =
47180 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47181
47182 let member_inline_size = match ordinal {
47183 1 => <EmptyStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47184 0 => return Err(fidl::Error::UnknownUnionTag),
47185 _ => num_bytes as usize,
47186 };
47187
47188 if inlined != (member_inline_size <= 4) {
47189 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47190 }
47191 let _inner_offset;
47192 if inlined {
47193 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47194 _inner_offset = offset + 8;
47195 } else {
47196 depth.increment()?;
47197 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47198 }
47199 match ordinal {
47200 1 => {
47201 #[allow(irrefutable_let_patterns)]
47202 if let XUnionWithEmptyStruct::S(_) = self {
47203 } else {
47205 *self = XUnionWithEmptyStruct::S(fidl::new_empty!(EmptyStruct, D));
47207 }
47208 #[allow(irrefutable_let_patterns)]
47209 if let XUnionWithEmptyStruct::S(ref mut val) = self {
47210 fidl::decode!(EmptyStruct, D, val, decoder, _inner_offset, depth)?;
47211 } else {
47212 unreachable!()
47213 }
47214 }
47215 #[allow(deprecated)]
47216 ordinal => {
47217 for _ in 0..num_handles {
47218 decoder.drop_next_handle()?;
47219 }
47220 *self = XUnionWithEmptyStruct::__SourceBreaking { unknown_ordinal: ordinal };
47221 }
47222 }
47223 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47224 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47225 }
47226 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47227 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47228 }
47229 Ok(())
47230 }
47231 }
47232
47233 impl fidl::encoding::ValueTypeMarker for XUnionWithStruct {
47234 type Borrowed<'a> = &'a Self;
47235 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47236 value
47237 }
47238 }
47239
47240 unsafe impl fidl::encoding::TypeMarker for XUnionWithStruct {
47241 type Owned = Self;
47242
47243 #[inline(always)]
47244 fn inline_align(_context: fidl::encoding::Context) -> usize {
47245 8
47246 }
47247
47248 #[inline(always)]
47249 fn inline_size(_context: fidl::encoding::Context) -> usize {
47250 16
47251 }
47252 }
47253
47254 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithStruct, D>
47255 for &XUnionWithStruct
47256 {
47257 #[inline]
47258 unsafe fn encode(
47259 self,
47260 encoder: &mut fidl::encoding::Encoder<'_, D>,
47261 offset: usize,
47262 _depth: fidl::encoding::Depth,
47263 ) -> fidl::Result<()> {
47264 encoder.debug_check_bounds::<XUnionWithStruct>(offset);
47265 encoder.write_num::<u64>(self.ordinal(), offset);
47266 match self {
47267 XUnionWithStruct::S(ref val) => {
47268 fidl::encoding::encode_in_envelope::<StructSize3Align1, D>(
47269 <StructSize3Align1 as fidl::encoding::ValueTypeMarker>::borrow(val),
47270 encoder,
47271 offset + 8,
47272 _depth,
47273 )
47274 }
47275 XUnionWithStruct::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47276 }
47277 }
47278 }
47279
47280 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithStruct {
47281 #[inline(always)]
47282 fn new_empty() -> Self {
47283 Self::__SourceBreaking { unknown_ordinal: 0 }
47284 }
47285
47286 #[inline]
47287 unsafe fn decode(
47288 &mut self,
47289 decoder: &mut fidl::encoding::Decoder<'_, D>,
47290 offset: usize,
47291 mut depth: fidl::encoding::Depth,
47292 ) -> fidl::Result<()> {
47293 decoder.debug_check_bounds::<Self>(offset);
47294 #[allow(unused_variables)]
47295 let next_out_of_line = decoder.next_out_of_line();
47296 let handles_before = decoder.remaining_handles();
47297 let (ordinal, inlined, num_bytes, num_handles) =
47298 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47299
47300 let member_inline_size = match ordinal {
47301 1 => {
47302 <StructSize3Align1 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
47303 }
47304 0 => return Err(fidl::Error::UnknownUnionTag),
47305 _ => num_bytes as usize,
47306 };
47307
47308 if inlined != (member_inline_size <= 4) {
47309 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47310 }
47311 let _inner_offset;
47312 if inlined {
47313 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47314 _inner_offset = offset + 8;
47315 } else {
47316 depth.increment()?;
47317 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47318 }
47319 match ordinal {
47320 1 => {
47321 #[allow(irrefutable_let_patterns)]
47322 if let XUnionWithStruct::S(_) = self {
47323 } else {
47325 *self = XUnionWithStruct::S(fidl::new_empty!(StructSize3Align1, D));
47327 }
47328 #[allow(irrefutable_let_patterns)]
47329 if let XUnionWithStruct::S(ref mut val) = self {
47330 fidl::decode!(StructSize3Align1, D, val, decoder, _inner_offset, depth)?;
47331 } else {
47332 unreachable!()
47333 }
47334 }
47335 #[allow(deprecated)]
47336 ordinal => {
47337 for _ in 0..num_handles {
47338 decoder.drop_next_handle()?;
47339 }
47340 *self = XUnionWithStruct::__SourceBreaking { unknown_ordinal: ordinal };
47341 }
47342 }
47343 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47344 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47345 }
47346 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47347 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47348 }
47349 Ok(())
47350 }
47351 }
47352
47353 impl fidl::encoding::ValueTypeMarker for XUnionWithUnions {
47354 type Borrowed<'a> = &'a Self;
47355 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47356 value
47357 }
47358 }
47359
47360 unsafe impl fidl::encoding::TypeMarker for XUnionWithUnions {
47361 type Owned = Self;
47362
47363 #[inline(always)]
47364 fn inline_align(_context: fidl::encoding::Context) -> usize {
47365 8
47366 }
47367
47368 #[inline(always)]
47369 fn inline_size(_context: fidl::encoding::Context) -> usize {
47370 16
47371 }
47372 }
47373
47374 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithUnions, D>
47375 for &XUnionWithUnions
47376 {
47377 #[inline]
47378 unsafe fn encode(
47379 self,
47380 encoder: &mut fidl::encoding::Encoder<'_, D>,
47381 offset: usize,
47382 _depth: fidl::encoding::Depth,
47383 ) -> fidl::Result<()> {
47384 encoder.debug_check_bounds::<XUnionWithUnions>(offset);
47385 encoder.write_num::<u64>(self.ordinal(), offset);
47386 match self {
47387 XUnionWithUnions::U1(ref val) => {
47388 fidl::encoding::encode_in_envelope::<UnionSize8Align4, D>(
47389 <UnionSize8Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
47390 encoder,
47391 offset + 8,
47392 _depth,
47393 )
47394 }
47395 XUnionWithUnions::U2(ref val) => {
47396 fidl::encoding::encode_in_envelope::<UnionSize12Align4, D>(
47397 <UnionSize12Align4 as fidl::encoding::ValueTypeMarker>::borrow(val),
47398 encoder,
47399 offset + 8,
47400 _depth,
47401 )
47402 }
47403 XUnionWithUnions::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47404 }
47405 }
47406 }
47407
47408 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithUnions {
47409 #[inline(always)]
47410 fn new_empty() -> Self {
47411 Self::__SourceBreaking { unknown_ordinal: 0 }
47412 }
47413
47414 #[inline]
47415 unsafe fn decode(
47416 &mut self,
47417 decoder: &mut fidl::encoding::Decoder<'_, D>,
47418 offset: usize,
47419 mut depth: fidl::encoding::Depth,
47420 ) -> fidl::Result<()> {
47421 decoder.debug_check_bounds::<Self>(offset);
47422 #[allow(unused_variables)]
47423 let next_out_of_line = decoder.next_out_of_line();
47424 let handles_before = decoder.remaining_handles();
47425 let (ordinal, inlined, num_bytes, num_handles) =
47426 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47427
47428 let member_inline_size = match ordinal {
47429 1 => <UnionSize8Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47430 2 => {
47431 <UnionSize12Align4 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
47432 }
47433 0 => return Err(fidl::Error::UnknownUnionTag),
47434 _ => num_bytes as usize,
47435 };
47436
47437 if inlined != (member_inline_size <= 4) {
47438 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47439 }
47440 let _inner_offset;
47441 if inlined {
47442 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47443 _inner_offset = offset + 8;
47444 } else {
47445 depth.increment()?;
47446 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47447 }
47448 match ordinal {
47449 1 => {
47450 #[allow(irrefutable_let_patterns)]
47451 if let XUnionWithUnions::U1(_) = self {
47452 } else {
47454 *self = XUnionWithUnions::U1(fidl::new_empty!(UnionSize8Align4, D));
47456 }
47457 #[allow(irrefutable_let_patterns)]
47458 if let XUnionWithUnions::U1(ref mut val) = self {
47459 fidl::decode!(UnionSize8Align4, D, val, decoder, _inner_offset, depth)?;
47460 } else {
47461 unreachable!()
47462 }
47463 }
47464 2 => {
47465 #[allow(irrefutable_let_patterns)]
47466 if let XUnionWithUnions::U2(_) = self {
47467 } else {
47469 *self = XUnionWithUnions::U2(fidl::new_empty!(UnionSize12Align4, D));
47471 }
47472 #[allow(irrefutable_let_patterns)]
47473 if let XUnionWithUnions::U2(ref mut val) = self {
47474 fidl::decode!(UnionSize12Align4, D, val, decoder, _inner_offset, depth)?;
47475 } else {
47476 unreachable!()
47477 }
47478 }
47479 #[allow(deprecated)]
47480 ordinal => {
47481 for _ in 0..num_handles {
47482 decoder.drop_next_handle()?;
47483 }
47484 *self = XUnionWithUnions::__SourceBreaking { unknown_ordinal: ordinal };
47485 }
47486 }
47487 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47488 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47489 }
47490 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47491 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47492 }
47493 Ok(())
47494 }
47495 }
47496
47497 impl fidl::encoding::ValueTypeMarker for XUnionWithXUnion {
47498 type Borrowed<'a> = &'a Self;
47499 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
47500 value
47501 }
47502 }
47503
47504 unsafe impl fidl::encoding::TypeMarker for XUnionWithXUnion {
47505 type Owned = Self;
47506
47507 #[inline(always)]
47508 fn inline_align(_context: fidl::encoding::Context) -> usize {
47509 8
47510 }
47511
47512 #[inline(always)]
47513 fn inline_size(_context: fidl::encoding::Context) -> usize {
47514 16
47515 }
47516 }
47517
47518 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<XUnionWithXUnion, D>
47519 for &XUnionWithXUnion
47520 {
47521 #[inline]
47522 unsafe fn encode(
47523 self,
47524 encoder: &mut fidl::encoding::Encoder<'_, D>,
47525 offset: usize,
47526 _depth: fidl::encoding::Depth,
47527 ) -> fidl::Result<()> {
47528 encoder.debug_check_bounds::<XUnionWithXUnion>(offset);
47529 encoder.write_num::<u64>(self.ordinal(), offset);
47530 match self {
47531 XUnionWithXUnion::Xu(ref val) => {
47532 fidl::encoding::encode_in_envelope::<XUnionWithStruct, D>(
47533 <XUnionWithStruct as fidl::encoding::ValueTypeMarker>::borrow(val),
47534 encoder,
47535 offset + 8,
47536 _depth,
47537 )
47538 }
47539 XUnionWithXUnion::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
47540 }
47541 }
47542 }
47543
47544 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for XUnionWithXUnion {
47545 #[inline(always)]
47546 fn new_empty() -> Self {
47547 Self::__SourceBreaking { unknown_ordinal: 0 }
47548 }
47549
47550 #[inline]
47551 unsafe fn decode(
47552 &mut self,
47553 decoder: &mut fidl::encoding::Decoder<'_, D>,
47554 offset: usize,
47555 mut depth: fidl::encoding::Depth,
47556 ) -> fidl::Result<()> {
47557 decoder.debug_check_bounds::<Self>(offset);
47558 #[allow(unused_variables)]
47559 let next_out_of_line = decoder.next_out_of_line();
47560 let handles_before = decoder.remaining_handles();
47561 let (ordinal, inlined, num_bytes, num_handles) =
47562 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
47563
47564 let member_inline_size = match ordinal {
47565 1 => <XUnionWithStruct as fidl::encoding::TypeMarker>::inline_size(decoder.context),
47566 0 => return Err(fidl::Error::UnknownUnionTag),
47567 _ => num_bytes as usize,
47568 };
47569
47570 if inlined != (member_inline_size <= 4) {
47571 return Err(fidl::Error::InvalidInlineBitInEnvelope);
47572 }
47573 let _inner_offset;
47574 if inlined {
47575 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
47576 _inner_offset = offset + 8;
47577 } else {
47578 depth.increment()?;
47579 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
47580 }
47581 match ordinal {
47582 1 => {
47583 #[allow(irrefutable_let_patterns)]
47584 if let XUnionWithXUnion::Xu(_) = self {
47585 } else {
47587 *self = XUnionWithXUnion::Xu(fidl::new_empty!(XUnionWithStruct, D));
47589 }
47590 #[allow(irrefutable_let_patterns)]
47591 if let XUnionWithXUnion::Xu(ref mut val) = self {
47592 fidl::decode!(XUnionWithStruct, D, val, decoder, _inner_offset, depth)?;
47593 } else {
47594 unreachable!()
47595 }
47596 }
47597 #[allow(deprecated)]
47598 ordinal => {
47599 for _ in 0..num_handles {
47600 decoder.drop_next_handle()?;
47601 }
47602 *self = XUnionWithXUnion::__SourceBreaking { unknown_ordinal: ordinal };
47603 }
47604 }
47605 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
47606 return Err(fidl::Error::InvalidNumBytesInEnvelope);
47607 }
47608 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
47609 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
47610 }
47611 Ok(())
47612 }
47613 }
47614}