fidl_diagnostics_validate__common/
fidl_diagnostics_validate__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11/// The data in the VMO is tree-structured, and
12/// ROOT_ID identifies the (virtual) root node.
13pub const ROOT_ID: u32 = 0;
14
15/// Indicate the preferred DiffType on failed tests.
16#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
17pub enum DiffType {
18    /// Get the full rendering of both trees.
19    Full,
20    /// Get the diff between the trees.
21    Diff,
22    /// Get both the full rendering of both trees, and their diff.
23    Both,
24    #[doc(hidden)]
25    __SourceBreaking { unknown_ordinal: u32 },
26}
27
28/// Pattern that matches an unknown `DiffType` member.
29#[macro_export]
30macro_rules! DiffTypeUnknown {
31    () => {
32        _
33    };
34}
35
36impl DiffType {
37    #[inline]
38    pub fn from_primitive(prim: u32) -> Option<Self> {
39        match prim {
40            0 => Some(Self::Full),
41            1 => Some(Self::Diff),
42            2 => Some(Self::Both),
43            _ => None,
44        }
45    }
46
47    #[inline]
48    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
49        match prim {
50            0 => Self::Full,
51            1 => Self::Diff,
52            2 => Self::Both,
53            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
54        }
55    }
56
57    #[inline]
58    pub fn unknown() -> Self {
59        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
60    }
61
62    #[inline]
63    pub const fn into_primitive(self) -> u32 {
64        match self {
65            Self::Full => 0,
66            Self::Diff => 1,
67            Self::Both => 2,
68            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
69        }
70    }
71
72    #[inline]
73    pub fn is_unknown(&self) -> bool {
74        match self {
75            Self::__SourceBreaking { unknown_ordinal: _ } => true,
76            _ => false,
77        }
78    }
79}
80
81#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
82#[repr(u32)]
83pub enum LinkDisposition {
84    Child = 0,
85    Inline = 1,
86}
87
88impl LinkDisposition {
89    #[inline]
90    pub fn from_primitive(prim: u32) -> Option<Self> {
91        match prim {
92            0 => Some(Self::Child),
93            1 => Some(Self::Inline),
94            _ => None,
95        }
96    }
97
98    #[inline]
99    pub const fn into_primitive(self) -> u32 {
100        self as u32
101    }
102}
103
104/// TestResult tells the result of executing an Initialize or Act command.
105#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
106pub enum TestResult {
107    /// The function call completed without error.
108    Ok,
109    /// The Inspect library doesn't implement a requested feature.
110    Unimplemented,
111    /// The Inspect library reported a failure executing the function.
112    Failed,
113    /// The driver and/or puppet-wrapper was in an illegal state.
114    Illegal,
115    #[doc(hidden)]
116    __SourceBreaking { unknown_ordinal: u32 },
117}
118
119/// Pattern that matches an unknown `TestResult` member.
120#[macro_export]
121macro_rules! TestResultUnknown {
122    () => {
123        _
124    };
125}
126
127impl TestResult {
128    #[inline]
129    pub fn from_primitive(prim: u32) -> Option<Self> {
130        match prim {
131            0 => Some(Self::Ok),
132            1 => Some(Self::Unimplemented),
133            2 => Some(Self::Failed),
134            3 => Some(Self::Illegal),
135            _ => None,
136        }
137    }
138
139    #[inline]
140    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
141        match prim {
142            0 => Self::Ok,
143            1 => Self::Unimplemented,
144            2 => Self::Failed,
145            3 => Self::Illegal,
146            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
147        }
148    }
149
150    #[inline]
151    pub fn unknown() -> Self {
152        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
153    }
154
155    #[inline]
156    pub const fn into_primitive(self) -> u32 {
157        match self {
158            Self::Ok => 0,
159            Self::Unimplemented => 1,
160            Self::Failed => 2,
161            Self::Illegal => 3,
162            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
163        }
164    }
165
166    #[inline]
167    pub fn is_unknown(&self) -> bool {
168        match self {
169            Self::__SourceBreaking { unknown_ordinal: _ } => true,
170            _ => false,
171        }
172    }
173}
174
175#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
176pub enum ValueType {
177    Int,
178    Uint,
179    Double,
180    String,
181    #[doc(hidden)]
182    __SourceBreaking {
183        unknown_ordinal: u8,
184    },
185}
186
187/// Pattern that matches an unknown `ValueType` member.
188#[macro_export]
189macro_rules! ValueTypeUnknown {
190    () => {
191        _
192    };
193}
194
195impl ValueType {
196    #[inline]
197    pub fn from_primitive(prim: u8) -> Option<Self> {
198        match prim {
199            1 => Some(Self::Int),
200            2 => Some(Self::Uint),
201            3 => Some(Self::Double),
202            4 => Some(Self::String),
203            _ => None,
204        }
205    }
206
207    #[inline]
208    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
209        match prim {
210            1 => Self::Int,
211            2 => Self::Uint,
212            3 => Self::Double,
213            4 => Self::String,
214            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
215        }
216    }
217
218    #[inline]
219    pub fn unknown() -> Self {
220        Self::__SourceBreaking { unknown_ordinal: 0xff }
221    }
222
223    #[inline]
224    pub const fn into_primitive(self) -> u8 {
225        match self {
226            Self::Int => 1,
227            Self::Uint => 2,
228            Self::Double => 3,
229            Self::String => 4,
230            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
231        }
232    }
233
234    #[inline]
235    pub fn is_unknown(&self) -> bool {
236        match self {
237            Self::__SourceBreaking { unknown_ordinal: _ } => true,
238            _ => false,
239        }
240    }
241}
242
243#[derive(Clone, Debug, PartialEq)]
244pub struct AddNumber {
245    pub id: u32,
246    pub value: Value,
247}
248
249impl fidl::Persistable for AddNumber {}
250
251#[derive(Clone, Debug, PartialEq)]
252pub struct ArrayAdd {
253    pub id: u32,
254    pub index: u64,
255    pub value: Value,
256}
257
258impl fidl::Persistable for ArrayAdd {}
259
260#[derive(Clone, Debug, PartialEq)]
261pub struct ArraySet {
262    pub id: u32,
263    pub index: u64,
264    pub value: Value,
265}
266
267impl fidl::Persistable for ArraySet {}
268
269#[derive(Clone, Debug, PartialEq)]
270pub struct ArraySubtract {
271    pub id: u32,
272    pub index: u64,
273    pub value: Value,
274}
275
276impl fidl::Persistable for ArraySubtract {}
277
278#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
279pub struct CreateArrayProperty {
280    pub parent: u32,
281    pub id: u32,
282    pub name: String,
283    pub slots: u64,
284    pub value_type: ValueType,
285}
286
287impl fidl::Persistable for CreateArrayProperty {}
288
289/// Tells the puppet to create a property with the given bool value.
290#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
291pub struct CreateBoolProperty {
292    pub parent: u32,
293    pub id: u32,
294    pub name: String,
295    pub value: bool,
296}
297
298impl fidl::Persistable for CreateBoolProperty {}
299
300/// Tells the puppet to create a property with the given byte array value.
301#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
302pub struct CreateBytesProperty {
303    pub parent: u32,
304    pub id: u32,
305    pub name: String,
306    pub value: Vec<u8>,
307}
308
309impl fidl::Persistable for CreateBytesProperty {}
310
311#[derive(Clone, Debug, PartialEq)]
312pub struct CreateExponentialHistogram {
313    pub parent: u32,
314    pub id: u32,
315    pub name: String,
316    pub floor: Value,
317    pub initial_step: Value,
318    pub step_multiplier: Value,
319    pub buckets: u64,
320}
321
322impl fidl::Persistable for CreateExponentialHistogram {}
323
324#[derive(Clone, Debug, PartialEq)]
325pub struct CreateLazyNode {
326    pub parent: u32,
327    pub id: u32,
328    pub name: String,
329    pub disposition: LinkDisposition,
330    pub actions: Vec<Action>,
331}
332
333impl fidl::Persistable for CreateLazyNode {}
334
335#[derive(Clone, Debug, PartialEq)]
336pub struct CreateLinearHistogram {
337    pub parent: u32,
338    pub id: u32,
339    pub name: String,
340    pub floor: Value,
341    pub step_size: Value,
342    pub buckets: u64,
343}
344
345impl fidl::Persistable for CreateLinearHistogram {}
346
347/// Tells the puppet to create a Node with the given name, parentage, and ID
348/// (the id is specified so other nodes can later be created under it).
349#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
350pub struct CreateNode {
351    pub parent: u32,
352    pub id: u32,
353    pub name: String,
354}
355
356impl fidl::Persistable for CreateNode {}
357
358/// Tells the puppet to create a property with the given numeric value.
359#[derive(Clone, Debug, PartialEq)]
360pub struct CreateNumericProperty {
361    pub parent: u32,
362    pub id: u32,
363    pub name: String,
364    pub value: Value,
365}
366
367impl fidl::Persistable for CreateNumericProperty {}
368
369/// Tells the puppet to create a property with the given string value.
370#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
371pub struct CreateStringProperty {
372    pub parent: u32,
373    pub id: u32,
374    pub name: String,
375    pub value: String,
376}
377
378impl fidl::Persistable for CreateStringProperty {}
379
380#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
381#[repr(C)]
382pub struct DeleteLazyNode {
383    pub id: u32,
384}
385
386impl fidl::Persistable for DeleteLazyNode {}
387
388/// Tells the puppet to delete the given node.
389#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
390#[repr(C)]
391pub struct DeleteNode {
392    pub id: u32,
393}
394
395impl fidl::Persistable for DeleteNode {}
396
397/// Tells the puppet to delete an existing property.
398#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
399#[repr(C)]
400pub struct DeleteProperty {
401    pub id: u32,
402}
403
404impl fidl::Persistable for DeleteProperty {}
405
406#[derive(Clone, Debug, PartialEq)]
407pub struct Insert {
408    pub id: u32,
409    pub value: Value,
410}
411
412impl fidl::Persistable for Insert {}
413
414#[derive(Clone, Debug, PartialEq)]
415pub struct InsertMultiple {
416    pub id: u32,
417    pub value: Value,
418    pub count: u64,
419}
420
421impl fidl::Persistable for InsertMultiple {}
422
423#[derive(Clone, Debug, PartialEq)]
424pub struct InspectPuppetActLazyRequest {
425    pub lazy_action: LazyAction,
426}
427
428impl fidl::Persistable for InspectPuppetActLazyRequest {}
429
430#[derive(Clone, Debug, PartialEq)]
431pub struct InspectPuppetActRequest {
432    pub action: Action,
433}
434
435impl fidl::Persistable for InspectPuppetActRequest {}
436
437#[derive(Clone, Debug, PartialEq)]
438pub struct InspectPuppetInitializeRequest {
439    pub params: InitializationParams,
440}
441
442impl fidl::Persistable for InspectPuppetInitializeRequest {}
443
444#[derive(Clone, Debug, PartialEq)]
445pub struct InspectPuppetInitializeTreeRequest {
446    pub params: InitializationParams,
447}
448
449impl fidl::Persistable for InspectPuppetInitializeTreeRequest {}
450
451#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
452pub struct InspectPuppetActLazyResponse {
453    pub result: TestResult,
454}
455
456impl fidl::Persistable for InspectPuppetActLazyResponse {}
457
458#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
459pub struct InspectPuppetActResponse {
460    pub result: TestResult,
461}
462
463impl fidl::Persistable for InspectPuppetActResponse {}
464
465#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
466pub struct InspectPuppetPublishResponse {
467    pub result: TestResult,
468}
469
470impl fidl::Persistable for InspectPuppetPublishResponse {}
471
472#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
473pub struct SetBool {
474    pub id: u32,
475    pub value: bool,
476}
477
478impl fidl::Persistable for SetBool {}
479
480#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
481pub struct SetBytes {
482    pub id: u32,
483    pub value: Vec<u8>,
484}
485
486impl fidl::Persistable for SetBytes {}
487
488#[derive(Clone, Debug, PartialEq)]
489pub struct SetNumber {
490    pub id: u32,
491    pub value: Value,
492}
493
494impl fidl::Persistable for SetNumber {}
495
496#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
497pub struct SetString {
498    pub id: u32,
499    pub value: String,
500}
501
502impl fidl::Persistable for SetString {}
503
504#[derive(Clone, Debug, PartialEq)]
505pub struct SubtractNumber {
506    pub id: u32,
507    pub value: Value,
508}
509
510impl fidl::Persistable for SubtractNumber {}
511
512/// InitializationParams tells how to initialize the Inspect library.
513#[derive(Clone, Debug, Default, PartialEq)]
514pub struct InitializationParams {
515    pub vmo_size: Option<u64>,
516    #[doc(hidden)]
517    pub __source_breaking: fidl::marker::SourceBreaking,
518}
519
520impl fidl::Persistable for InitializationParams {}
521
522/// Tells the puppet to do something to modify the VMO.
523#[derive(Clone, Debug)]
524pub enum Action {
525    CreateNode(CreateNode),
526    DeleteNode(DeleteNode),
527    CreateNumericProperty(CreateNumericProperty),
528    CreateBytesProperty(CreateBytesProperty),
529    CreateStringProperty(CreateStringProperty),
530    DeleteProperty(DeleteProperty),
531    SetNumber(SetNumber),
532    SetString(SetString),
533    SetBytes(SetBytes),
534    AddNumber(AddNumber),
535    SubtractNumber(SubtractNumber),
536    CreateArrayProperty(CreateArrayProperty),
537    ArraySet(ArraySet),
538    ArrayAdd(ArrayAdd),
539    ArraySubtract(ArraySubtract),
540    CreateLinearHistogram(CreateLinearHistogram),
541    CreateExponentialHistogram(CreateExponentialHistogram),
542    Insert(Insert),
543    InsertMultiple(InsertMultiple),
544    CreateBoolProperty(CreateBoolProperty),
545    SetBool(SetBool),
546    #[doc(hidden)]
547    __SourceBreaking {
548        unknown_ordinal: u64,
549    },
550}
551
552/// Pattern that matches an unknown `Action` member.
553#[macro_export]
554macro_rules! ActionUnknown {
555    () => {
556        _
557    };
558}
559
560// Custom PartialEq so that unknown variants are not equal to themselves.
561impl PartialEq for Action {
562    fn eq(&self, other: &Self) -> bool {
563        match (self, other) {
564            (Self::CreateNode(x), Self::CreateNode(y)) => *x == *y,
565            (Self::DeleteNode(x), Self::DeleteNode(y)) => *x == *y,
566            (Self::CreateNumericProperty(x), Self::CreateNumericProperty(y)) => *x == *y,
567            (Self::CreateBytesProperty(x), Self::CreateBytesProperty(y)) => *x == *y,
568            (Self::CreateStringProperty(x), Self::CreateStringProperty(y)) => *x == *y,
569            (Self::DeleteProperty(x), Self::DeleteProperty(y)) => *x == *y,
570            (Self::SetNumber(x), Self::SetNumber(y)) => *x == *y,
571            (Self::SetString(x), Self::SetString(y)) => *x == *y,
572            (Self::SetBytes(x), Self::SetBytes(y)) => *x == *y,
573            (Self::AddNumber(x), Self::AddNumber(y)) => *x == *y,
574            (Self::SubtractNumber(x), Self::SubtractNumber(y)) => *x == *y,
575            (Self::CreateArrayProperty(x), Self::CreateArrayProperty(y)) => *x == *y,
576            (Self::ArraySet(x), Self::ArraySet(y)) => *x == *y,
577            (Self::ArrayAdd(x), Self::ArrayAdd(y)) => *x == *y,
578            (Self::ArraySubtract(x), Self::ArraySubtract(y)) => *x == *y,
579            (Self::CreateLinearHistogram(x), Self::CreateLinearHistogram(y)) => *x == *y,
580            (Self::CreateExponentialHistogram(x), Self::CreateExponentialHistogram(y)) => *x == *y,
581            (Self::Insert(x), Self::Insert(y)) => *x == *y,
582            (Self::InsertMultiple(x), Self::InsertMultiple(y)) => *x == *y,
583            (Self::CreateBoolProperty(x), Self::CreateBoolProperty(y)) => *x == *y,
584            (Self::SetBool(x), Self::SetBool(y)) => *x == *y,
585            _ => false,
586        }
587    }
588}
589
590impl Action {
591    #[inline]
592    pub fn ordinal(&self) -> u64 {
593        match *self {
594            Self::CreateNode(_) => 1,
595            Self::DeleteNode(_) => 2,
596            Self::CreateNumericProperty(_) => 3,
597            Self::CreateBytesProperty(_) => 4,
598            Self::CreateStringProperty(_) => 5,
599            Self::DeleteProperty(_) => 6,
600            Self::SetNumber(_) => 7,
601            Self::SetString(_) => 8,
602            Self::SetBytes(_) => 9,
603            Self::AddNumber(_) => 10,
604            Self::SubtractNumber(_) => 11,
605            Self::CreateArrayProperty(_) => 12,
606            Self::ArraySet(_) => 13,
607            Self::ArrayAdd(_) => 14,
608            Self::ArraySubtract(_) => 15,
609            Self::CreateLinearHistogram(_) => 16,
610            Self::CreateExponentialHistogram(_) => 17,
611            Self::Insert(_) => 18,
612            Self::InsertMultiple(_) => 19,
613            Self::CreateBoolProperty(_) => 20,
614            Self::SetBool(_) => 21,
615            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
616        }
617    }
618
619    #[inline]
620    pub fn unknown_variant_for_testing() -> Self {
621        Self::__SourceBreaking { unknown_ordinal: 0 }
622    }
623
624    #[inline]
625    pub fn is_unknown(&self) -> bool {
626        match self {
627            Self::__SourceBreaking { .. } => true,
628            _ => false,
629        }
630    }
631}
632
633impl fidl::Persistable for Action {}
634
635/// Tells the puppet to do something to modify a lazy node.
636#[derive(Clone, Debug)]
637pub enum LazyAction {
638    CreateLazyNode(CreateLazyNode),
639    DeleteLazyNode(DeleteLazyNode),
640    #[doc(hidden)]
641    __SourceBreaking {
642        unknown_ordinal: u64,
643    },
644}
645
646/// Pattern that matches an unknown `LazyAction` member.
647#[macro_export]
648macro_rules! LazyActionUnknown {
649    () => {
650        _
651    };
652}
653
654// Custom PartialEq so that unknown variants are not equal to themselves.
655impl PartialEq for LazyAction {
656    fn eq(&self, other: &Self) -> bool {
657        match (self, other) {
658            (Self::CreateLazyNode(x), Self::CreateLazyNode(y)) => *x == *y,
659            (Self::DeleteLazyNode(x), Self::DeleteLazyNode(y)) => *x == *y,
660            _ => false,
661        }
662    }
663}
664
665impl LazyAction {
666    #[inline]
667    pub fn ordinal(&self) -> u64 {
668        match *self {
669            Self::CreateLazyNode(_) => 1,
670            Self::DeleteLazyNode(_) => 2,
671            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
672        }
673    }
674
675    #[inline]
676    pub fn unknown_variant_for_testing() -> Self {
677        Self::__SourceBreaking { unknown_ordinal: 0 }
678    }
679
680    #[inline]
681    pub fn is_unknown(&self) -> bool {
682        match self {
683            Self::__SourceBreaking { .. } => true,
684            _ => false,
685        }
686    }
687}
688
689impl fidl::Persistable for LazyAction {}
690
691#[derive(Clone, Debug)]
692pub enum Value {
693    IntT(i64),
694    UintT(u64),
695    DoubleT(f64),
696    StringT(String),
697    #[doc(hidden)]
698    __SourceBreaking {
699        unknown_ordinal: u64,
700    },
701}
702
703/// Pattern that matches an unknown `Value` member.
704#[macro_export]
705macro_rules! ValueUnknown {
706    () => {
707        _
708    };
709}
710
711// Custom PartialEq so that unknown variants are not equal to themselves.
712impl PartialEq for Value {
713    fn eq(&self, other: &Self) -> bool {
714        match (self, other) {
715            (Self::IntT(x), Self::IntT(y)) => *x == *y,
716            (Self::UintT(x), Self::UintT(y)) => *x == *y,
717            (Self::DoubleT(x), Self::DoubleT(y)) => *x == *y,
718            (Self::StringT(x), Self::StringT(y)) => *x == *y,
719            _ => false,
720        }
721    }
722}
723
724impl Value {
725    #[inline]
726    pub fn ordinal(&self) -> u64 {
727        match *self {
728            Self::IntT(_) => 1,
729            Self::UintT(_) => 2,
730            Self::DoubleT(_) => 3,
731            Self::StringT(_) => 4,
732            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
733        }
734    }
735
736    #[inline]
737    pub fn unknown_variant_for_testing() -> Self {
738        Self::__SourceBreaking { unknown_ordinal: 0 }
739    }
740
741    #[inline]
742    pub fn is_unknown(&self) -> bool {
743        match self {
744            Self::__SourceBreaking { .. } => true,
745            _ => false,
746        }
747    }
748}
749
750impl fidl::Persistable for Value {}
751
752mod internal {
753    use super::*;
754    unsafe impl fidl::encoding::TypeMarker for DiffType {
755        type Owned = Self;
756
757        #[inline(always)]
758        fn inline_align(_context: fidl::encoding::Context) -> usize {
759            std::mem::align_of::<u32>()
760        }
761
762        #[inline(always)]
763        fn inline_size(_context: fidl::encoding::Context) -> usize {
764            std::mem::size_of::<u32>()
765        }
766
767        #[inline(always)]
768        fn encode_is_copy() -> bool {
769            false
770        }
771
772        #[inline(always)]
773        fn decode_is_copy() -> bool {
774            false
775        }
776    }
777
778    impl fidl::encoding::ValueTypeMarker for DiffType {
779        type Borrowed<'a> = Self;
780        #[inline(always)]
781        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
782            *value
783        }
784    }
785
786    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DiffType {
787        #[inline]
788        unsafe fn encode(
789            self,
790            encoder: &mut fidl::encoding::Encoder<'_, D>,
791            offset: usize,
792            _depth: fidl::encoding::Depth,
793        ) -> fidl::Result<()> {
794            encoder.debug_check_bounds::<Self>(offset);
795            encoder.write_num(self.into_primitive(), offset);
796            Ok(())
797        }
798    }
799
800    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DiffType {
801        #[inline(always)]
802        fn new_empty() -> Self {
803            Self::unknown()
804        }
805
806        #[inline]
807        unsafe fn decode(
808            &mut self,
809            decoder: &mut fidl::encoding::Decoder<'_, D>,
810            offset: usize,
811            _depth: fidl::encoding::Depth,
812        ) -> fidl::Result<()> {
813            decoder.debug_check_bounds::<Self>(offset);
814            let prim = decoder.read_num::<u32>(offset);
815
816            *self = Self::from_primitive_allow_unknown(prim);
817            Ok(())
818        }
819    }
820    unsafe impl fidl::encoding::TypeMarker for LinkDisposition {
821        type Owned = Self;
822
823        #[inline(always)]
824        fn inline_align(_context: fidl::encoding::Context) -> usize {
825            std::mem::align_of::<u32>()
826        }
827
828        #[inline(always)]
829        fn inline_size(_context: fidl::encoding::Context) -> usize {
830            std::mem::size_of::<u32>()
831        }
832
833        #[inline(always)]
834        fn encode_is_copy() -> bool {
835            true
836        }
837
838        #[inline(always)]
839        fn decode_is_copy() -> bool {
840            false
841        }
842    }
843
844    impl fidl::encoding::ValueTypeMarker for LinkDisposition {
845        type Borrowed<'a> = Self;
846        #[inline(always)]
847        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
848            *value
849        }
850    }
851
852    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
853        for LinkDisposition
854    {
855        #[inline]
856        unsafe fn encode(
857            self,
858            encoder: &mut fidl::encoding::Encoder<'_, D>,
859            offset: usize,
860            _depth: fidl::encoding::Depth,
861        ) -> fidl::Result<()> {
862            encoder.debug_check_bounds::<Self>(offset);
863            encoder.write_num(self.into_primitive(), offset);
864            Ok(())
865        }
866    }
867
868    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LinkDisposition {
869        #[inline(always)]
870        fn new_empty() -> Self {
871            Self::Child
872        }
873
874        #[inline]
875        unsafe fn decode(
876            &mut self,
877            decoder: &mut fidl::encoding::Decoder<'_, D>,
878            offset: usize,
879            _depth: fidl::encoding::Depth,
880        ) -> fidl::Result<()> {
881            decoder.debug_check_bounds::<Self>(offset);
882            let prim = decoder.read_num::<u32>(offset);
883
884            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
885            Ok(())
886        }
887    }
888    unsafe impl fidl::encoding::TypeMarker for TestResult {
889        type Owned = Self;
890
891        #[inline(always)]
892        fn inline_align(_context: fidl::encoding::Context) -> usize {
893            std::mem::align_of::<u32>()
894        }
895
896        #[inline(always)]
897        fn inline_size(_context: fidl::encoding::Context) -> usize {
898            std::mem::size_of::<u32>()
899        }
900
901        #[inline(always)]
902        fn encode_is_copy() -> bool {
903            false
904        }
905
906        #[inline(always)]
907        fn decode_is_copy() -> bool {
908            false
909        }
910    }
911
912    impl fidl::encoding::ValueTypeMarker for TestResult {
913        type Borrowed<'a> = Self;
914        #[inline(always)]
915        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
916            *value
917        }
918    }
919
920    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for TestResult {
921        #[inline]
922        unsafe fn encode(
923            self,
924            encoder: &mut fidl::encoding::Encoder<'_, D>,
925            offset: usize,
926            _depth: fidl::encoding::Depth,
927        ) -> fidl::Result<()> {
928            encoder.debug_check_bounds::<Self>(offset);
929            encoder.write_num(self.into_primitive(), offset);
930            Ok(())
931        }
932    }
933
934    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestResult {
935        #[inline(always)]
936        fn new_empty() -> Self {
937            Self::unknown()
938        }
939
940        #[inline]
941        unsafe fn decode(
942            &mut self,
943            decoder: &mut fidl::encoding::Decoder<'_, D>,
944            offset: usize,
945            _depth: fidl::encoding::Depth,
946        ) -> fidl::Result<()> {
947            decoder.debug_check_bounds::<Self>(offset);
948            let prim = decoder.read_num::<u32>(offset);
949
950            *self = Self::from_primitive_allow_unknown(prim);
951            Ok(())
952        }
953    }
954    unsafe impl fidl::encoding::TypeMarker for ValueType {
955        type Owned = Self;
956
957        #[inline(always)]
958        fn inline_align(_context: fidl::encoding::Context) -> usize {
959            std::mem::align_of::<u8>()
960        }
961
962        #[inline(always)]
963        fn inline_size(_context: fidl::encoding::Context) -> usize {
964            std::mem::size_of::<u8>()
965        }
966
967        #[inline(always)]
968        fn encode_is_copy() -> bool {
969            false
970        }
971
972        #[inline(always)]
973        fn decode_is_copy() -> bool {
974            false
975        }
976    }
977
978    impl fidl::encoding::ValueTypeMarker for ValueType {
979        type Borrowed<'a> = Self;
980        #[inline(always)]
981        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
982            *value
983        }
984    }
985
986    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ValueType {
987        #[inline]
988        unsafe fn encode(
989            self,
990            encoder: &mut fidl::encoding::Encoder<'_, D>,
991            offset: usize,
992            _depth: fidl::encoding::Depth,
993        ) -> fidl::Result<()> {
994            encoder.debug_check_bounds::<Self>(offset);
995            encoder.write_num(self.into_primitive(), offset);
996            Ok(())
997        }
998    }
999
1000    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ValueType {
1001        #[inline(always)]
1002        fn new_empty() -> Self {
1003            Self::unknown()
1004        }
1005
1006        #[inline]
1007        unsafe fn decode(
1008            &mut self,
1009            decoder: &mut fidl::encoding::Decoder<'_, D>,
1010            offset: usize,
1011            _depth: fidl::encoding::Depth,
1012        ) -> fidl::Result<()> {
1013            decoder.debug_check_bounds::<Self>(offset);
1014            let prim = decoder.read_num::<u8>(offset);
1015
1016            *self = Self::from_primitive_allow_unknown(prim);
1017            Ok(())
1018        }
1019    }
1020
1021    impl fidl::encoding::ValueTypeMarker for AddNumber {
1022        type Borrowed<'a> = &'a Self;
1023        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1024            value
1025        }
1026    }
1027
1028    unsafe impl fidl::encoding::TypeMarker for AddNumber {
1029        type Owned = Self;
1030
1031        #[inline(always)]
1032        fn inline_align(_context: fidl::encoding::Context) -> usize {
1033            8
1034        }
1035
1036        #[inline(always)]
1037        fn inline_size(_context: fidl::encoding::Context) -> usize {
1038            24
1039        }
1040    }
1041
1042    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddNumber, D>
1043        for &AddNumber
1044    {
1045        #[inline]
1046        unsafe fn encode(
1047            self,
1048            encoder: &mut fidl::encoding::Encoder<'_, D>,
1049            offset: usize,
1050            _depth: fidl::encoding::Depth,
1051        ) -> fidl::Result<()> {
1052            encoder.debug_check_bounds::<AddNumber>(offset);
1053            // Delegate to tuple encoding.
1054            fidl::encoding::Encode::<AddNumber, D>::encode(
1055                (
1056                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1057                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
1058                ),
1059                encoder,
1060                offset,
1061                _depth,
1062            )
1063        }
1064    }
1065    unsafe impl<
1066            D: fidl::encoding::ResourceDialect,
1067            T0: fidl::encoding::Encode<u32, D>,
1068            T1: fidl::encoding::Encode<Value, D>,
1069        > fidl::encoding::Encode<AddNumber, D> for (T0, T1)
1070    {
1071        #[inline]
1072        unsafe fn encode(
1073            self,
1074            encoder: &mut fidl::encoding::Encoder<'_, D>,
1075            offset: usize,
1076            depth: fidl::encoding::Depth,
1077        ) -> fidl::Result<()> {
1078            encoder.debug_check_bounds::<AddNumber>(offset);
1079            // Zero out padding regions. There's no need to apply masks
1080            // because the unmasked parts will be overwritten by fields.
1081            unsafe {
1082                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1083                (ptr as *mut u64).write_unaligned(0);
1084            }
1085            // Write the fields.
1086            self.0.encode(encoder, offset + 0, depth)?;
1087            self.1.encode(encoder, offset + 8, depth)?;
1088            Ok(())
1089        }
1090    }
1091
1092    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddNumber {
1093        #[inline(always)]
1094        fn new_empty() -> Self {
1095            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Value, D) }
1096        }
1097
1098        #[inline]
1099        unsafe fn decode(
1100            &mut self,
1101            decoder: &mut fidl::encoding::Decoder<'_, D>,
1102            offset: usize,
1103            _depth: fidl::encoding::Depth,
1104        ) -> fidl::Result<()> {
1105            decoder.debug_check_bounds::<Self>(offset);
1106            // Verify that padding bytes are zero.
1107            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1108            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1109            let mask = 0xffffffff00000000u64;
1110            let maskedval = padval & mask;
1111            if maskedval != 0 {
1112                return Err(fidl::Error::NonZeroPadding {
1113                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1114                });
1115            }
1116            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
1117            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
1118            Ok(())
1119        }
1120    }
1121
1122    impl fidl::encoding::ValueTypeMarker for ArrayAdd {
1123        type Borrowed<'a> = &'a Self;
1124        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1125            value
1126        }
1127    }
1128
1129    unsafe impl fidl::encoding::TypeMarker for ArrayAdd {
1130        type Owned = Self;
1131
1132        #[inline(always)]
1133        fn inline_align(_context: fidl::encoding::Context) -> usize {
1134            8
1135        }
1136
1137        #[inline(always)]
1138        fn inline_size(_context: fidl::encoding::Context) -> usize {
1139            32
1140        }
1141    }
1142
1143    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArrayAdd, D> for &ArrayAdd {
1144        #[inline]
1145        unsafe fn encode(
1146            self,
1147            encoder: &mut fidl::encoding::Encoder<'_, D>,
1148            offset: usize,
1149            _depth: fidl::encoding::Depth,
1150        ) -> fidl::Result<()> {
1151            encoder.debug_check_bounds::<ArrayAdd>(offset);
1152            // Delegate to tuple encoding.
1153            fidl::encoding::Encode::<ArrayAdd, D>::encode(
1154                (
1155                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1156                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.index),
1157                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
1158                ),
1159                encoder,
1160                offset,
1161                _depth,
1162            )
1163        }
1164    }
1165    unsafe impl<
1166            D: fidl::encoding::ResourceDialect,
1167            T0: fidl::encoding::Encode<u32, D>,
1168            T1: fidl::encoding::Encode<u64, D>,
1169            T2: fidl::encoding::Encode<Value, D>,
1170        > fidl::encoding::Encode<ArrayAdd, D> for (T0, T1, T2)
1171    {
1172        #[inline]
1173        unsafe fn encode(
1174            self,
1175            encoder: &mut fidl::encoding::Encoder<'_, D>,
1176            offset: usize,
1177            depth: fidl::encoding::Depth,
1178        ) -> fidl::Result<()> {
1179            encoder.debug_check_bounds::<ArrayAdd>(offset);
1180            // Zero out padding regions. There's no need to apply masks
1181            // because the unmasked parts will be overwritten by fields.
1182            unsafe {
1183                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1184                (ptr as *mut u64).write_unaligned(0);
1185            }
1186            // Write the fields.
1187            self.0.encode(encoder, offset + 0, depth)?;
1188            self.1.encode(encoder, offset + 8, depth)?;
1189            self.2.encode(encoder, offset + 16, depth)?;
1190            Ok(())
1191        }
1192    }
1193
1194    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArrayAdd {
1195        #[inline(always)]
1196        fn new_empty() -> Self {
1197            Self {
1198                id: fidl::new_empty!(u32, D),
1199                index: fidl::new_empty!(u64, D),
1200                value: fidl::new_empty!(Value, D),
1201            }
1202        }
1203
1204        #[inline]
1205        unsafe fn decode(
1206            &mut self,
1207            decoder: &mut fidl::encoding::Decoder<'_, D>,
1208            offset: usize,
1209            _depth: fidl::encoding::Depth,
1210        ) -> fidl::Result<()> {
1211            decoder.debug_check_bounds::<Self>(offset);
1212            // Verify that padding bytes are zero.
1213            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1214            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1215            let mask = 0xffffffff00000000u64;
1216            let maskedval = padval & mask;
1217            if maskedval != 0 {
1218                return Err(fidl::Error::NonZeroPadding {
1219                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1220                });
1221            }
1222            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
1223            fidl::decode!(u64, D, &mut self.index, decoder, offset + 8, _depth)?;
1224            fidl::decode!(Value, D, &mut self.value, decoder, offset + 16, _depth)?;
1225            Ok(())
1226        }
1227    }
1228
1229    impl fidl::encoding::ValueTypeMarker for ArraySet {
1230        type Borrowed<'a> = &'a Self;
1231        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1232            value
1233        }
1234    }
1235
1236    unsafe impl fidl::encoding::TypeMarker for ArraySet {
1237        type Owned = Self;
1238
1239        #[inline(always)]
1240        fn inline_align(_context: fidl::encoding::Context) -> usize {
1241            8
1242        }
1243
1244        #[inline(always)]
1245        fn inline_size(_context: fidl::encoding::Context) -> usize {
1246            32
1247        }
1248    }
1249
1250    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArraySet, D> for &ArraySet {
1251        #[inline]
1252        unsafe fn encode(
1253            self,
1254            encoder: &mut fidl::encoding::Encoder<'_, D>,
1255            offset: usize,
1256            _depth: fidl::encoding::Depth,
1257        ) -> fidl::Result<()> {
1258            encoder.debug_check_bounds::<ArraySet>(offset);
1259            // Delegate to tuple encoding.
1260            fidl::encoding::Encode::<ArraySet, D>::encode(
1261                (
1262                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1263                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.index),
1264                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
1265                ),
1266                encoder,
1267                offset,
1268                _depth,
1269            )
1270        }
1271    }
1272    unsafe impl<
1273            D: fidl::encoding::ResourceDialect,
1274            T0: fidl::encoding::Encode<u32, D>,
1275            T1: fidl::encoding::Encode<u64, D>,
1276            T2: fidl::encoding::Encode<Value, D>,
1277        > fidl::encoding::Encode<ArraySet, D> for (T0, T1, T2)
1278    {
1279        #[inline]
1280        unsafe fn encode(
1281            self,
1282            encoder: &mut fidl::encoding::Encoder<'_, D>,
1283            offset: usize,
1284            depth: fidl::encoding::Depth,
1285        ) -> fidl::Result<()> {
1286            encoder.debug_check_bounds::<ArraySet>(offset);
1287            // Zero out padding regions. There's no need to apply masks
1288            // because the unmasked parts will be overwritten by fields.
1289            unsafe {
1290                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1291                (ptr as *mut u64).write_unaligned(0);
1292            }
1293            // Write the fields.
1294            self.0.encode(encoder, offset + 0, depth)?;
1295            self.1.encode(encoder, offset + 8, depth)?;
1296            self.2.encode(encoder, offset + 16, depth)?;
1297            Ok(())
1298        }
1299    }
1300
1301    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArraySet {
1302        #[inline(always)]
1303        fn new_empty() -> Self {
1304            Self {
1305                id: fidl::new_empty!(u32, D),
1306                index: fidl::new_empty!(u64, D),
1307                value: fidl::new_empty!(Value, D),
1308            }
1309        }
1310
1311        #[inline]
1312        unsafe fn decode(
1313            &mut self,
1314            decoder: &mut fidl::encoding::Decoder<'_, D>,
1315            offset: usize,
1316            _depth: fidl::encoding::Depth,
1317        ) -> fidl::Result<()> {
1318            decoder.debug_check_bounds::<Self>(offset);
1319            // Verify that padding bytes are zero.
1320            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1321            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1322            let mask = 0xffffffff00000000u64;
1323            let maskedval = padval & mask;
1324            if maskedval != 0 {
1325                return Err(fidl::Error::NonZeroPadding {
1326                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1327                });
1328            }
1329            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
1330            fidl::decode!(u64, D, &mut self.index, decoder, offset + 8, _depth)?;
1331            fidl::decode!(Value, D, &mut self.value, decoder, offset + 16, _depth)?;
1332            Ok(())
1333        }
1334    }
1335
1336    impl fidl::encoding::ValueTypeMarker for ArraySubtract {
1337        type Borrowed<'a> = &'a Self;
1338        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1339            value
1340        }
1341    }
1342
1343    unsafe impl fidl::encoding::TypeMarker for ArraySubtract {
1344        type Owned = Self;
1345
1346        #[inline(always)]
1347        fn inline_align(_context: fidl::encoding::Context) -> usize {
1348            8
1349        }
1350
1351        #[inline(always)]
1352        fn inline_size(_context: fidl::encoding::Context) -> usize {
1353            32
1354        }
1355    }
1356
1357    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArraySubtract, D>
1358        for &ArraySubtract
1359    {
1360        #[inline]
1361        unsafe fn encode(
1362            self,
1363            encoder: &mut fidl::encoding::Encoder<'_, D>,
1364            offset: usize,
1365            _depth: fidl::encoding::Depth,
1366        ) -> fidl::Result<()> {
1367            encoder.debug_check_bounds::<ArraySubtract>(offset);
1368            // Delegate to tuple encoding.
1369            fidl::encoding::Encode::<ArraySubtract, D>::encode(
1370                (
1371                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1372                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.index),
1373                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
1374                ),
1375                encoder,
1376                offset,
1377                _depth,
1378            )
1379        }
1380    }
1381    unsafe impl<
1382            D: fidl::encoding::ResourceDialect,
1383            T0: fidl::encoding::Encode<u32, D>,
1384            T1: fidl::encoding::Encode<u64, D>,
1385            T2: fidl::encoding::Encode<Value, D>,
1386        > fidl::encoding::Encode<ArraySubtract, D> for (T0, T1, T2)
1387    {
1388        #[inline]
1389        unsafe fn encode(
1390            self,
1391            encoder: &mut fidl::encoding::Encoder<'_, D>,
1392            offset: usize,
1393            depth: fidl::encoding::Depth,
1394        ) -> fidl::Result<()> {
1395            encoder.debug_check_bounds::<ArraySubtract>(offset);
1396            // Zero out padding regions. There's no need to apply masks
1397            // because the unmasked parts will be overwritten by fields.
1398            unsafe {
1399                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1400                (ptr as *mut u64).write_unaligned(0);
1401            }
1402            // Write the fields.
1403            self.0.encode(encoder, offset + 0, depth)?;
1404            self.1.encode(encoder, offset + 8, depth)?;
1405            self.2.encode(encoder, offset + 16, depth)?;
1406            Ok(())
1407        }
1408    }
1409
1410    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArraySubtract {
1411        #[inline(always)]
1412        fn new_empty() -> Self {
1413            Self {
1414                id: fidl::new_empty!(u32, D),
1415                index: fidl::new_empty!(u64, D),
1416                value: fidl::new_empty!(Value, D),
1417            }
1418        }
1419
1420        #[inline]
1421        unsafe fn decode(
1422            &mut self,
1423            decoder: &mut fidl::encoding::Decoder<'_, D>,
1424            offset: usize,
1425            _depth: fidl::encoding::Depth,
1426        ) -> fidl::Result<()> {
1427            decoder.debug_check_bounds::<Self>(offset);
1428            // Verify that padding bytes are zero.
1429            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1430            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1431            let mask = 0xffffffff00000000u64;
1432            let maskedval = padval & mask;
1433            if maskedval != 0 {
1434                return Err(fidl::Error::NonZeroPadding {
1435                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1436                });
1437            }
1438            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
1439            fidl::decode!(u64, D, &mut self.index, decoder, offset + 8, _depth)?;
1440            fidl::decode!(Value, D, &mut self.value, decoder, offset + 16, _depth)?;
1441            Ok(())
1442        }
1443    }
1444
1445    impl fidl::encoding::ValueTypeMarker for CreateArrayProperty {
1446        type Borrowed<'a> = &'a Self;
1447        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1448            value
1449        }
1450    }
1451
1452    unsafe impl fidl::encoding::TypeMarker for CreateArrayProperty {
1453        type Owned = Self;
1454
1455        #[inline(always)]
1456        fn inline_align(_context: fidl::encoding::Context) -> usize {
1457            8
1458        }
1459
1460        #[inline(always)]
1461        fn inline_size(_context: fidl::encoding::Context) -> usize {
1462            40
1463        }
1464    }
1465
1466    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateArrayProperty, D>
1467        for &CreateArrayProperty
1468    {
1469        #[inline]
1470        unsafe fn encode(
1471            self,
1472            encoder: &mut fidl::encoding::Encoder<'_, D>,
1473            offset: usize,
1474            _depth: fidl::encoding::Depth,
1475        ) -> fidl::Result<()> {
1476            encoder.debug_check_bounds::<CreateArrayProperty>(offset);
1477            // Delegate to tuple encoding.
1478            fidl::encoding::Encode::<CreateArrayProperty, D>::encode(
1479                (
1480                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
1481                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1482                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1483                        &self.name,
1484                    ),
1485                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.slots),
1486                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.value_type),
1487                ),
1488                encoder,
1489                offset,
1490                _depth,
1491            )
1492        }
1493    }
1494    unsafe impl<
1495            D: fidl::encoding::ResourceDialect,
1496            T0: fidl::encoding::Encode<u32, D>,
1497            T1: fidl::encoding::Encode<u32, D>,
1498            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1499            T3: fidl::encoding::Encode<u64, D>,
1500            T4: fidl::encoding::Encode<ValueType, D>,
1501        > fidl::encoding::Encode<CreateArrayProperty, D> for (T0, T1, T2, T3, T4)
1502    {
1503        #[inline]
1504        unsafe fn encode(
1505            self,
1506            encoder: &mut fidl::encoding::Encoder<'_, D>,
1507            offset: usize,
1508            depth: fidl::encoding::Depth,
1509        ) -> fidl::Result<()> {
1510            encoder.debug_check_bounds::<CreateArrayProperty>(offset);
1511            // Zero out padding regions. There's no need to apply masks
1512            // because the unmasked parts will be overwritten by fields.
1513            unsafe {
1514                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
1515                (ptr as *mut u64).write_unaligned(0);
1516            }
1517            // Write the fields.
1518            self.0.encode(encoder, offset + 0, depth)?;
1519            self.1.encode(encoder, offset + 4, depth)?;
1520            self.2.encode(encoder, offset + 8, depth)?;
1521            self.3.encode(encoder, offset + 24, depth)?;
1522            self.4.encode(encoder, offset + 32, depth)?;
1523            Ok(())
1524        }
1525    }
1526
1527    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateArrayProperty {
1528        #[inline(always)]
1529        fn new_empty() -> Self {
1530            Self {
1531                parent: fidl::new_empty!(u32, D),
1532                id: fidl::new_empty!(u32, D),
1533                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
1534                slots: fidl::new_empty!(u64, D),
1535                value_type: fidl::new_empty!(ValueType, D),
1536            }
1537        }
1538
1539        #[inline]
1540        unsafe fn decode(
1541            &mut self,
1542            decoder: &mut fidl::encoding::Decoder<'_, D>,
1543            offset: usize,
1544            _depth: fidl::encoding::Depth,
1545        ) -> fidl::Result<()> {
1546            decoder.debug_check_bounds::<Self>(offset);
1547            // Verify that padding bytes are zero.
1548            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
1549            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1550            let mask = 0xffffffffffffff00u64;
1551            let maskedval = padval & mask;
1552            if maskedval != 0 {
1553                return Err(fidl::Error::NonZeroPadding {
1554                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
1555                });
1556            }
1557            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
1558            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
1559            fidl::decode!(
1560                fidl::encoding::UnboundedString,
1561                D,
1562                &mut self.name,
1563                decoder,
1564                offset + 8,
1565                _depth
1566            )?;
1567            fidl::decode!(u64, D, &mut self.slots, decoder, offset + 24, _depth)?;
1568            fidl::decode!(ValueType, D, &mut self.value_type, decoder, offset + 32, _depth)?;
1569            Ok(())
1570        }
1571    }
1572
1573    impl fidl::encoding::ValueTypeMarker for CreateBoolProperty {
1574        type Borrowed<'a> = &'a Self;
1575        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1576            value
1577        }
1578    }
1579
1580    unsafe impl fidl::encoding::TypeMarker for CreateBoolProperty {
1581        type Owned = Self;
1582
1583        #[inline(always)]
1584        fn inline_align(_context: fidl::encoding::Context) -> usize {
1585            8
1586        }
1587
1588        #[inline(always)]
1589        fn inline_size(_context: fidl::encoding::Context) -> usize {
1590            32
1591        }
1592    }
1593
1594    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateBoolProperty, D>
1595        for &CreateBoolProperty
1596    {
1597        #[inline]
1598        unsafe fn encode(
1599            self,
1600            encoder: &mut fidl::encoding::Encoder<'_, D>,
1601            offset: usize,
1602            _depth: fidl::encoding::Depth,
1603        ) -> fidl::Result<()> {
1604            encoder.debug_check_bounds::<CreateBoolProperty>(offset);
1605            // Delegate to tuple encoding.
1606            fidl::encoding::Encode::<CreateBoolProperty, D>::encode(
1607                (
1608                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
1609                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1610                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1611                        &self.name,
1612                    ),
1613                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
1614                ),
1615                encoder,
1616                offset,
1617                _depth,
1618            )
1619        }
1620    }
1621    unsafe impl<
1622            D: fidl::encoding::ResourceDialect,
1623            T0: fidl::encoding::Encode<u32, D>,
1624            T1: fidl::encoding::Encode<u32, D>,
1625            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1626            T3: fidl::encoding::Encode<bool, D>,
1627        > fidl::encoding::Encode<CreateBoolProperty, D> for (T0, T1, T2, T3)
1628    {
1629        #[inline]
1630        unsafe fn encode(
1631            self,
1632            encoder: &mut fidl::encoding::Encoder<'_, D>,
1633            offset: usize,
1634            depth: fidl::encoding::Depth,
1635        ) -> fidl::Result<()> {
1636            encoder.debug_check_bounds::<CreateBoolProperty>(offset);
1637            // Zero out padding regions. There's no need to apply masks
1638            // because the unmasked parts will be overwritten by fields.
1639            unsafe {
1640                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1641                (ptr as *mut u64).write_unaligned(0);
1642            }
1643            // Write the fields.
1644            self.0.encode(encoder, offset + 0, depth)?;
1645            self.1.encode(encoder, offset + 4, depth)?;
1646            self.2.encode(encoder, offset + 8, depth)?;
1647            self.3.encode(encoder, offset + 24, depth)?;
1648            Ok(())
1649        }
1650    }
1651
1652    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateBoolProperty {
1653        #[inline(always)]
1654        fn new_empty() -> Self {
1655            Self {
1656                parent: fidl::new_empty!(u32, D),
1657                id: fidl::new_empty!(u32, D),
1658                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
1659                value: fidl::new_empty!(bool, D),
1660            }
1661        }
1662
1663        #[inline]
1664        unsafe fn decode(
1665            &mut self,
1666            decoder: &mut fidl::encoding::Decoder<'_, D>,
1667            offset: usize,
1668            _depth: fidl::encoding::Depth,
1669        ) -> fidl::Result<()> {
1670            decoder.debug_check_bounds::<Self>(offset);
1671            // Verify that padding bytes are zero.
1672            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1673            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1674            let mask = 0xffffffffffffff00u64;
1675            let maskedval = padval & mask;
1676            if maskedval != 0 {
1677                return Err(fidl::Error::NonZeroPadding {
1678                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1679                });
1680            }
1681            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
1682            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
1683            fidl::decode!(
1684                fidl::encoding::UnboundedString,
1685                D,
1686                &mut self.name,
1687                decoder,
1688                offset + 8,
1689                _depth
1690            )?;
1691            fidl::decode!(bool, D, &mut self.value, decoder, offset + 24, _depth)?;
1692            Ok(())
1693        }
1694    }
1695
1696    impl fidl::encoding::ValueTypeMarker for CreateBytesProperty {
1697        type Borrowed<'a> = &'a Self;
1698        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1699            value
1700        }
1701    }
1702
1703    unsafe impl fidl::encoding::TypeMarker for CreateBytesProperty {
1704        type Owned = Self;
1705
1706        #[inline(always)]
1707        fn inline_align(_context: fidl::encoding::Context) -> usize {
1708            8
1709        }
1710
1711        #[inline(always)]
1712        fn inline_size(_context: fidl::encoding::Context) -> usize {
1713            40
1714        }
1715    }
1716
1717    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateBytesProperty, D>
1718        for &CreateBytesProperty
1719    {
1720        #[inline]
1721        unsafe fn encode(
1722            self,
1723            encoder: &mut fidl::encoding::Encoder<'_, D>,
1724            offset: usize,
1725            _depth: fidl::encoding::Depth,
1726        ) -> fidl::Result<()> {
1727            encoder.debug_check_bounds::<CreateBytesProperty>(offset);
1728            // Delegate to tuple encoding.
1729            fidl::encoding::Encode::<CreateBytesProperty, D>::encode(
1730                (
1731                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
1732                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1733                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
1734                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
1735                ),
1736                encoder, offset, _depth
1737            )
1738        }
1739    }
1740    unsafe impl<
1741            D: fidl::encoding::ResourceDialect,
1742            T0: fidl::encoding::Encode<u32, D>,
1743            T1: fidl::encoding::Encode<u32, D>,
1744            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1745            T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1746        > fidl::encoding::Encode<CreateBytesProperty, D> for (T0, T1, T2, T3)
1747    {
1748        #[inline]
1749        unsafe fn encode(
1750            self,
1751            encoder: &mut fidl::encoding::Encoder<'_, D>,
1752            offset: usize,
1753            depth: fidl::encoding::Depth,
1754        ) -> fidl::Result<()> {
1755            encoder.debug_check_bounds::<CreateBytesProperty>(offset);
1756            // Zero out padding regions. There's no need to apply masks
1757            // because the unmasked parts will be overwritten by fields.
1758            // Write the fields.
1759            self.0.encode(encoder, offset + 0, depth)?;
1760            self.1.encode(encoder, offset + 4, depth)?;
1761            self.2.encode(encoder, offset + 8, depth)?;
1762            self.3.encode(encoder, offset + 24, depth)?;
1763            Ok(())
1764        }
1765    }
1766
1767    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateBytesProperty {
1768        #[inline(always)]
1769        fn new_empty() -> Self {
1770            Self {
1771                parent: fidl::new_empty!(u32, D),
1772                id: fidl::new_empty!(u32, D),
1773                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
1774                value: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1775            }
1776        }
1777
1778        #[inline]
1779        unsafe fn decode(
1780            &mut self,
1781            decoder: &mut fidl::encoding::Decoder<'_, D>,
1782            offset: usize,
1783            _depth: fidl::encoding::Depth,
1784        ) -> fidl::Result<()> {
1785            decoder.debug_check_bounds::<Self>(offset);
1786            // Verify that padding bytes are zero.
1787            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
1788            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
1789            fidl::decode!(
1790                fidl::encoding::UnboundedString,
1791                D,
1792                &mut self.name,
1793                decoder,
1794                offset + 8,
1795                _depth
1796            )?;
1797            fidl::decode!(
1798                fidl::encoding::UnboundedVector<u8>,
1799                D,
1800                &mut self.value,
1801                decoder,
1802                offset + 24,
1803                _depth
1804            )?;
1805            Ok(())
1806        }
1807    }
1808
1809    impl fidl::encoding::ValueTypeMarker for CreateExponentialHistogram {
1810        type Borrowed<'a> = &'a Self;
1811        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1812            value
1813        }
1814    }
1815
1816    unsafe impl fidl::encoding::TypeMarker for CreateExponentialHistogram {
1817        type Owned = Self;
1818
1819        #[inline(always)]
1820        fn inline_align(_context: fidl::encoding::Context) -> usize {
1821            8
1822        }
1823
1824        #[inline(always)]
1825        fn inline_size(_context: fidl::encoding::Context) -> usize {
1826            80
1827        }
1828    }
1829
1830    unsafe impl<D: fidl::encoding::ResourceDialect>
1831        fidl::encoding::Encode<CreateExponentialHistogram, D> for &CreateExponentialHistogram
1832    {
1833        #[inline]
1834        unsafe fn encode(
1835            self,
1836            encoder: &mut fidl::encoding::Encoder<'_, D>,
1837            offset: usize,
1838            _depth: fidl::encoding::Depth,
1839        ) -> fidl::Result<()> {
1840            encoder.debug_check_bounds::<CreateExponentialHistogram>(offset);
1841            // Delegate to tuple encoding.
1842            fidl::encoding::Encode::<CreateExponentialHistogram, D>::encode(
1843                (
1844                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
1845                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1846                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
1847                        &self.name,
1848                    ),
1849                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.floor),
1850                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.initial_step),
1851                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.step_multiplier),
1852                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.buckets),
1853                ),
1854                encoder,
1855                offset,
1856                _depth,
1857            )
1858        }
1859    }
1860    unsafe impl<
1861            D: fidl::encoding::ResourceDialect,
1862            T0: fidl::encoding::Encode<u32, D>,
1863            T1: fidl::encoding::Encode<u32, D>,
1864            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1865            T3: fidl::encoding::Encode<Value, D>,
1866            T4: fidl::encoding::Encode<Value, D>,
1867            T5: fidl::encoding::Encode<Value, D>,
1868            T6: fidl::encoding::Encode<u64, D>,
1869        > fidl::encoding::Encode<CreateExponentialHistogram, D> for (T0, T1, T2, T3, T4, T5, T6)
1870    {
1871        #[inline]
1872        unsafe fn encode(
1873            self,
1874            encoder: &mut fidl::encoding::Encoder<'_, D>,
1875            offset: usize,
1876            depth: fidl::encoding::Depth,
1877        ) -> fidl::Result<()> {
1878            encoder.debug_check_bounds::<CreateExponentialHistogram>(offset);
1879            // Zero out padding regions. There's no need to apply masks
1880            // because the unmasked parts will be overwritten by fields.
1881            // Write the fields.
1882            self.0.encode(encoder, offset + 0, depth)?;
1883            self.1.encode(encoder, offset + 4, depth)?;
1884            self.2.encode(encoder, offset + 8, depth)?;
1885            self.3.encode(encoder, offset + 24, depth)?;
1886            self.4.encode(encoder, offset + 40, depth)?;
1887            self.5.encode(encoder, offset + 56, depth)?;
1888            self.6.encode(encoder, offset + 72, depth)?;
1889            Ok(())
1890        }
1891    }
1892
1893    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1894        for CreateExponentialHistogram
1895    {
1896        #[inline(always)]
1897        fn new_empty() -> Self {
1898            Self {
1899                parent: fidl::new_empty!(u32, D),
1900                id: fidl::new_empty!(u32, D),
1901                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
1902                floor: fidl::new_empty!(Value, D),
1903                initial_step: fidl::new_empty!(Value, D),
1904                step_multiplier: fidl::new_empty!(Value, D),
1905                buckets: fidl::new_empty!(u64, D),
1906            }
1907        }
1908
1909        #[inline]
1910        unsafe fn decode(
1911            &mut self,
1912            decoder: &mut fidl::encoding::Decoder<'_, D>,
1913            offset: usize,
1914            _depth: fidl::encoding::Depth,
1915        ) -> fidl::Result<()> {
1916            decoder.debug_check_bounds::<Self>(offset);
1917            // Verify that padding bytes are zero.
1918            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
1919            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
1920            fidl::decode!(
1921                fidl::encoding::UnboundedString,
1922                D,
1923                &mut self.name,
1924                decoder,
1925                offset + 8,
1926                _depth
1927            )?;
1928            fidl::decode!(Value, D, &mut self.floor, decoder, offset + 24, _depth)?;
1929            fidl::decode!(Value, D, &mut self.initial_step, decoder, offset + 40, _depth)?;
1930            fidl::decode!(Value, D, &mut self.step_multiplier, decoder, offset + 56, _depth)?;
1931            fidl::decode!(u64, D, &mut self.buckets, decoder, offset + 72, _depth)?;
1932            Ok(())
1933        }
1934    }
1935
1936    impl fidl::encoding::ValueTypeMarker for CreateLazyNode {
1937        type Borrowed<'a> = &'a Self;
1938        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1939            value
1940        }
1941    }
1942
1943    unsafe impl fidl::encoding::TypeMarker for CreateLazyNode {
1944        type Owned = Self;
1945
1946        #[inline(always)]
1947        fn inline_align(_context: fidl::encoding::Context) -> usize {
1948            8
1949        }
1950
1951        #[inline(always)]
1952        fn inline_size(_context: fidl::encoding::Context) -> usize {
1953            48
1954        }
1955    }
1956
1957    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateLazyNode, D>
1958        for &CreateLazyNode
1959    {
1960        #[inline]
1961        unsafe fn encode(
1962            self,
1963            encoder: &mut fidl::encoding::Encoder<'_, D>,
1964            offset: usize,
1965            _depth: fidl::encoding::Depth,
1966        ) -> fidl::Result<()> {
1967            encoder.debug_check_bounds::<CreateLazyNode>(offset);
1968            // Delegate to tuple encoding.
1969            fidl::encoding::Encode::<CreateLazyNode, D>::encode(
1970                (
1971                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
1972                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1973                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
1974                    <LinkDisposition as fidl::encoding::ValueTypeMarker>::borrow(&self.disposition),
1975                    <fidl::encoding::UnboundedVector<Action> as fidl::encoding::ValueTypeMarker>::borrow(&self.actions),
1976                ),
1977                encoder, offset, _depth
1978            )
1979        }
1980    }
1981    unsafe impl<
1982            D: fidl::encoding::ResourceDialect,
1983            T0: fidl::encoding::Encode<u32, D>,
1984            T1: fidl::encoding::Encode<u32, D>,
1985            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
1986            T3: fidl::encoding::Encode<LinkDisposition, D>,
1987            T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Action>, D>,
1988        > fidl::encoding::Encode<CreateLazyNode, D> for (T0, T1, T2, T3, T4)
1989    {
1990        #[inline]
1991        unsafe fn encode(
1992            self,
1993            encoder: &mut fidl::encoding::Encoder<'_, D>,
1994            offset: usize,
1995            depth: fidl::encoding::Depth,
1996        ) -> fidl::Result<()> {
1997            encoder.debug_check_bounds::<CreateLazyNode>(offset);
1998            // Zero out padding regions. There's no need to apply masks
1999            // because the unmasked parts will be overwritten by fields.
2000            unsafe {
2001                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
2002                (ptr as *mut u64).write_unaligned(0);
2003            }
2004            // Write the fields.
2005            self.0.encode(encoder, offset + 0, depth)?;
2006            self.1.encode(encoder, offset + 4, depth)?;
2007            self.2.encode(encoder, offset + 8, depth)?;
2008            self.3.encode(encoder, offset + 24, depth)?;
2009            self.4.encode(encoder, offset + 32, depth)?;
2010            Ok(())
2011        }
2012    }
2013
2014    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateLazyNode {
2015        #[inline(always)]
2016        fn new_empty() -> Self {
2017            Self {
2018                parent: fidl::new_empty!(u32, D),
2019                id: fidl::new_empty!(u32, D),
2020                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2021                disposition: fidl::new_empty!(LinkDisposition, D),
2022                actions: fidl::new_empty!(fidl::encoding::UnboundedVector<Action>, D),
2023            }
2024        }
2025
2026        #[inline]
2027        unsafe fn decode(
2028            &mut self,
2029            decoder: &mut fidl::encoding::Decoder<'_, D>,
2030            offset: usize,
2031            _depth: fidl::encoding::Depth,
2032        ) -> fidl::Result<()> {
2033            decoder.debug_check_bounds::<Self>(offset);
2034            // Verify that padding bytes are zero.
2035            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
2036            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2037            let mask = 0xffffffff00000000u64;
2038            let maskedval = padval & mask;
2039            if maskedval != 0 {
2040                return Err(fidl::Error::NonZeroPadding {
2041                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
2042                });
2043            }
2044            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
2045            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
2046            fidl::decode!(
2047                fidl::encoding::UnboundedString,
2048                D,
2049                &mut self.name,
2050                decoder,
2051                offset + 8,
2052                _depth
2053            )?;
2054            fidl::decode!(LinkDisposition, D, &mut self.disposition, decoder, offset + 24, _depth)?;
2055            fidl::decode!(
2056                fidl::encoding::UnboundedVector<Action>,
2057                D,
2058                &mut self.actions,
2059                decoder,
2060                offset + 32,
2061                _depth
2062            )?;
2063            Ok(())
2064        }
2065    }
2066
2067    impl fidl::encoding::ValueTypeMarker for CreateLinearHistogram {
2068        type Borrowed<'a> = &'a Self;
2069        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2070            value
2071        }
2072    }
2073
2074    unsafe impl fidl::encoding::TypeMarker for CreateLinearHistogram {
2075        type Owned = Self;
2076
2077        #[inline(always)]
2078        fn inline_align(_context: fidl::encoding::Context) -> usize {
2079            8
2080        }
2081
2082        #[inline(always)]
2083        fn inline_size(_context: fidl::encoding::Context) -> usize {
2084            64
2085        }
2086    }
2087
2088    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateLinearHistogram, D>
2089        for &CreateLinearHistogram
2090    {
2091        #[inline]
2092        unsafe fn encode(
2093            self,
2094            encoder: &mut fidl::encoding::Encoder<'_, D>,
2095            offset: usize,
2096            _depth: fidl::encoding::Depth,
2097        ) -> fidl::Result<()> {
2098            encoder.debug_check_bounds::<CreateLinearHistogram>(offset);
2099            // Delegate to tuple encoding.
2100            fidl::encoding::Encode::<CreateLinearHistogram, D>::encode(
2101                (
2102                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
2103                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2104                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2105                        &self.name,
2106                    ),
2107                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.floor),
2108                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.step_size),
2109                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.buckets),
2110                ),
2111                encoder,
2112                offset,
2113                _depth,
2114            )
2115        }
2116    }
2117    unsafe impl<
2118            D: fidl::encoding::ResourceDialect,
2119            T0: fidl::encoding::Encode<u32, D>,
2120            T1: fidl::encoding::Encode<u32, D>,
2121            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2122            T3: fidl::encoding::Encode<Value, D>,
2123            T4: fidl::encoding::Encode<Value, D>,
2124            T5: fidl::encoding::Encode<u64, D>,
2125        > fidl::encoding::Encode<CreateLinearHistogram, D> for (T0, T1, T2, T3, T4, T5)
2126    {
2127        #[inline]
2128        unsafe fn encode(
2129            self,
2130            encoder: &mut fidl::encoding::Encoder<'_, D>,
2131            offset: usize,
2132            depth: fidl::encoding::Depth,
2133        ) -> fidl::Result<()> {
2134            encoder.debug_check_bounds::<CreateLinearHistogram>(offset);
2135            // Zero out padding regions. There's no need to apply masks
2136            // because the unmasked parts will be overwritten by fields.
2137            // Write the fields.
2138            self.0.encode(encoder, offset + 0, depth)?;
2139            self.1.encode(encoder, offset + 4, depth)?;
2140            self.2.encode(encoder, offset + 8, depth)?;
2141            self.3.encode(encoder, offset + 24, depth)?;
2142            self.4.encode(encoder, offset + 40, depth)?;
2143            self.5.encode(encoder, offset + 56, depth)?;
2144            Ok(())
2145        }
2146    }
2147
2148    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateLinearHistogram {
2149        #[inline(always)]
2150        fn new_empty() -> Self {
2151            Self {
2152                parent: fidl::new_empty!(u32, D),
2153                id: fidl::new_empty!(u32, D),
2154                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2155                floor: fidl::new_empty!(Value, D),
2156                step_size: fidl::new_empty!(Value, D),
2157                buckets: fidl::new_empty!(u64, D),
2158            }
2159        }
2160
2161        #[inline]
2162        unsafe fn decode(
2163            &mut self,
2164            decoder: &mut fidl::encoding::Decoder<'_, D>,
2165            offset: usize,
2166            _depth: fidl::encoding::Depth,
2167        ) -> fidl::Result<()> {
2168            decoder.debug_check_bounds::<Self>(offset);
2169            // Verify that padding bytes are zero.
2170            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
2171            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
2172            fidl::decode!(
2173                fidl::encoding::UnboundedString,
2174                D,
2175                &mut self.name,
2176                decoder,
2177                offset + 8,
2178                _depth
2179            )?;
2180            fidl::decode!(Value, D, &mut self.floor, decoder, offset + 24, _depth)?;
2181            fidl::decode!(Value, D, &mut self.step_size, decoder, offset + 40, _depth)?;
2182            fidl::decode!(u64, D, &mut self.buckets, decoder, offset + 56, _depth)?;
2183            Ok(())
2184        }
2185    }
2186
2187    impl fidl::encoding::ValueTypeMarker for CreateNode {
2188        type Borrowed<'a> = &'a Self;
2189        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2190            value
2191        }
2192    }
2193
2194    unsafe impl fidl::encoding::TypeMarker for CreateNode {
2195        type Owned = Self;
2196
2197        #[inline(always)]
2198        fn inline_align(_context: fidl::encoding::Context) -> usize {
2199            8
2200        }
2201
2202        #[inline(always)]
2203        fn inline_size(_context: fidl::encoding::Context) -> usize {
2204            24
2205        }
2206    }
2207
2208    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateNode, D>
2209        for &CreateNode
2210    {
2211        #[inline]
2212        unsafe fn encode(
2213            self,
2214            encoder: &mut fidl::encoding::Encoder<'_, D>,
2215            offset: usize,
2216            _depth: fidl::encoding::Depth,
2217        ) -> fidl::Result<()> {
2218            encoder.debug_check_bounds::<CreateNode>(offset);
2219            // Delegate to tuple encoding.
2220            fidl::encoding::Encode::<CreateNode, D>::encode(
2221                (
2222                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
2223                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2224                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2225                        &self.name,
2226                    ),
2227                ),
2228                encoder,
2229                offset,
2230                _depth,
2231            )
2232        }
2233    }
2234    unsafe impl<
2235            D: fidl::encoding::ResourceDialect,
2236            T0: fidl::encoding::Encode<u32, D>,
2237            T1: fidl::encoding::Encode<u32, D>,
2238            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2239        > fidl::encoding::Encode<CreateNode, D> for (T0, T1, T2)
2240    {
2241        #[inline]
2242        unsafe fn encode(
2243            self,
2244            encoder: &mut fidl::encoding::Encoder<'_, D>,
2245            offset: usize,
2246            depth: fidl::encoding::Depth,
2247        ) -> fidl::Result<()> {
2248            encoder.debug_check_bounds::<CreateNode>(offset);
2249            // Zero out padding regions. There's no need to apply masks
2250            // because the unmasked parts will be overwritten by fields.
2251            // Write the fields.
2252            self.0.encode(encoder, offset + 0, depth)?;
2253            self.1.encode(encoder, offset + 4, depth)?;
2254            self.2.encode(encoder, offset + 8, depth)?;
2255            Ok(())
2256        }
2257    }
2258
2259    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateNode {
2260        #[inline(always)]
2261        fn new_empty() -> Self {
2262            Self {
2263                parent: fidl::new_empty!(u32, D),
2264                id: fidl::new_empty!(u32, D),
2265                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2266            }
2267        }
2268
2269        #[inline]
2270        unsafe fn decode(
2271            &mut self,
2272            decoder: &mut fidl::encoding::Decoder<'_, D>,
2273            offset: usize,
2274            _depth: fidl::encoding::Depth,
2275        ) -> fidl::Result<()> {
2276            decoder.debug_check_bounds::<Self>(offset);
2277            // Verify that padding bytes are zero.
2278            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
2279            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
2280            fidl::decode!(
2281                fidl::encoding::UnboundedString,
2282                D,
2283                &mut self.name,
2284                decoder,
2285                offset + 8,
2286                _depth
2287            )?;
2288            Ok(())
2289        }
2290    }
2291
2292    impl fidl::encoding::ValueTypeMarker for CreateNumericProperty {
2293        type Borrowed<'a> = &'a Self;
2294        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2295            value
2296        }
2297    }
2298
2299    unsafe impl fidl::encoding::TypeMarker for CreateNumericProperty {
2300        type Owned = Self;
2301
2302        #[inline(always)]
2303        fn inline_align(_context: fidl::encoding::Context) -> usize {
2304            8
2305        }
2306
2307        #[inline(always)]
2308        fn inline_size(_context: fidl::encoding::Context) -> usize {
2309            40
2310        }
2311    }
2312
2313    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateNumericProperty, D>
2314        for &CreateNumericProperty
2315    {
2316        #[inline]
2317        unsafe fn encode(
2318            self,
2319            encoder: &mut fidl::encoding::Encoder<'_, D>,
2320            offset: usize,
2321            _depth: fidl::encoding::Depth,
2322        ) -> fidl::Result<()> {
2323            encoder.debug_check_bounds::<CreateNumericProperty>(offset);
2324            // Delegate to tuple encoding.
2325            fidl::encoding::Encode::<CreateNumericProperty, D>::encode(
2326                (
2327                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
2328                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2329                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2330                        &self.name,
2331                    ),
2332                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2333                ),
2334                encoder,
2335                offset,
2336                _depth,
2337            )
2338        }
2339    }
2340    unsafe impl<
2341            D: fidl::encoding::ResourceDialect,
2342            T0: fidl::encoding::Encode<u32, D>,
2343            T1: fidl::encoding::Encode<u32, D>,
2344            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2345            T3: fidl::encoding::Encode<Value, D>,
2346        > fidl::encoding::Encode<CreateNumericProperty, D> for (T0, T1, T2, T3)
2347    {
2348        #[inline]
2349        unsafe fn encode(
2350            self,
2351            encoder: &mut fidl::encoding::Encoder<'_, D>,
2352            offset: usize,
2353            depth: fidl::encoding::Depth,
2354        ) -> fidl::Result<()> {
2355            encoder.debug_check_bounds::<CreateNumericProperty>(offset);
2356            // Zero out padding regions. There's no need to apply masks
2357            // because the unmasked parts will be overwritten by fields.
2358            // Write the fields.
2359            self.0.encode(encoder, offset + 0, depth)?;
2360            self.1.encode(encoder, offset + 4, depth)?;
2361            self.2.encode(encoder, offset + 8, depth)?;
2362            self.3.encode(encoder, offset + 24, depth)?;
2363            Ok(())
2364        }
2365    }
2366
2367    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateNumericProperty {
2368        #[inline(always)]
2369        fn new_empty() -> Self {
2370            Self {
2371                parent: fidl::new_empty!(u32, D),
2372                id: fidl::new_empty!(u32, D),
2373                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2374                value: fidl::new_empty!(Value, D),
2375            }
2376        }
2377
2378        #[inline]
2379        unsafe fn decode(
2380            &mut self,
2381            decoder: &mut fidl::encoding::Decoder<'_, D>,
2382            offset: usize,
2383            _depth: fidl::encoding::Depth,
2384        ) -> fidl::Result<()> {
2385            decoder.debug_check_bounds::<Self>(offset);
2386            // Verify that padding bytes are zero.
2387            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
2388            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
2389            fidl::decode!(
2390                fidl::encoding::UnboundedString,
2391                D,
2392                &mut self.name,
2393                decoder,
2394                offset + 8,
2395                _depth
2396            )?;
2397            fidl::decode!(Value, D, &mut self.value, decoder, offset + 24, _depth)?;
2398            Ok(())
2399        }
2400    }
2401
2402    impl fidl::encoding::ValueTypeMarker for CreateStringProperty {
2403        type Borrowed<'a> = &'a Self;
2404        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2405            value
2406        }
2407    }
2408
2409    unsafe impl fidl::encoding::TypeMarker for CreateStringProperty {
2410        type Owned = Self;
2411
2412        #[inline(always)]
2413        fn inline_align(_context: fidl::encoding::Context) -> usize {
2414            8
2415        }
2416
2417        #[inline(always)]
2418        fn inline_size(_context: fidl::encoding::Context) -> usize {
2419            40
2420        }
2421    }
2422
2423    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateStringProperty, D>
2424        for &CreateStringProperty
2425    {
2426        #[inline]
2427        unsafe fn encode(
2428            self,
2429            encoder: &mut fidl::encoding::Encoder<'_, D>,
2430            offset: usize,
2431            _depth: fidl::encoding::Depth,
2432        ) -> fidl::Result<()> {
2433            encoder.debug_check_bounds::<CreateStringProperty>(offset);
2434            // Delegate to tuple encoding.
2435            fidl::encoding::Encode::<CreateStringProperty, D>::encode(
2436                (
2437                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
2438                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2439                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2440                        &self.name,
2441                    ),
2442                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2443                        &self.value,
2444                    ),
2445                ),
2446                encoder,
2447                offset,
2448                _depth,
2449            )
2450        }
2451    }
2452    unsafe impl<
2453            D: fidl::encoding::ResourceDialect,
2454            T0: fidl::encoding::Encode<u32, D>,
2455            T1: fidl::encoding::Encode<u32, D>,
2456            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2457            T3: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2458        > fidl::encoding::Encode<CreateStringProperty, D> for (T0, T1, T2, T3)
2459    {
2460        #[inline]
2461        unsafe fn encode(
2462            self,
2463            encoder: &mut fidl::encoding::Encoder<'_, D>,
2464            offset: usize,
2465            depth: fidl::encoding::Depth,
2466        ) -> fidl::Result<()> {
2467            encoder.debug_check_bounds::<CreateStringProperty>(offset);
2468            // Zero out padding regions. There's no need to apply masks
2469            // because the unmasked parts will be overwritten by fields.
2470            // Write the fields.
2471            self.0.encode(encoder, offset + 0, depth)?;
2472            self.1.encode(encoder, offset + 4, depth)?;
2473            self.2.encode(encoder, offset + 8, depth)?;
2474            self.3.encode(encoder, offset + 24, depth)?;
2475            Ok(())
2476        }
2477    }
2478
2479    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateStringProperty {
2480        #[inline(always)]
2481        fn new_empty() -> Self {
2482            Self {
2483                parent: fidl::new_empty!(u32, D),
2484                id: fidl::new_empty!(u32, D),
2485                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2486                value: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2487            }
2488        }
2489
2490        #[inline]
2491        unsafe fn decode(
2492            &mut self,
2493            decoder: &mut fidl::encoding::Decoder<'_, D>,
2494            offset: usize,
2495            _depth: fidl::encoding::Depth,
2496        ) -> fidl::Result<()> {
2497            decoder.debug_check_bounds::<Self>(offset);
2498            // Verify that padding bytes are zero.
2499            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
2500            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
2501            fidl::decode!(
2502                fidl::encoding::UnboundedString,
2503                D,
2504                &mut self.name,
2505                decoder,
2506                offset + 8,
2507                _depth
2508            )?;
2509            fidl::decode!(
2510                fidl::encoding::UnboundedString,
2511                D,
2512                &mut self.value,
2513                decoder,
2514                offset + 24,
2515                _depth
2516            )?;
2517            Ok(())
2518        }
2519    }
2520
2521    impl fidl::encoding::ValueTypeMarker for DeleteLazyNode {
2522        type Borrowed<'a> = &'a Self;
2523        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2524            value
2525        }
2526    }
2527
2528    unsafe impl fidl::encoding::TypeMarker for DeleteLazyNode {
2529        type Owned = Self;
2530
2531        #[inline(always)]
2532        fn inline_align(_context: fidl::encoding::Context) -> usize {
2533            4
2534        }
2535
2536        #[inline(always)]
2537        fn inline_size(_context: fidl::encoding::Context) -> usize {
2538            4
2539        }
2540        #[inline(always)]
2541        fn encode_is_copy() -> bool {
2542            true
2543        }
2544
2545        #[inline(always)]
2546        fn decode_is_copy() -> bool {
2547            true
2548        }
2549    }
2550
2551    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteLazyNode, D>
2552        for &DeleteLazyNode
2553    {
2554        #[inline]
2555        unsafe fn encode(
2556            self,
2557            encoder: &mut fidl::encoding::Encoder<'_, D>,
2558            offset: usize,
2559            _depth: fidl::encoding::Depth,
2560        ) -> fidl::Result<()> {
2561            encoder.debug_check_bounds::<DeleteLazyNode>(offset);
2562            unsafe {
2563                // Copy the object into the buffer.
2564                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2565                (buf_ptr as *mut DeleteLazyNode)
2566                    .write_unaligned((self as *const DeleteLazyNode).read());
2567                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2568                // done second because the memcpy will write garbage to these bytes.
2569            }
2570            Ok(())
2571        }
2572    }
2573    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
2574        fidl::encoding::Encode<DeleteLazyNode, D> for (T0,)
2575    {
2576        #[inline]
2577        unsafe fn encode(
2578            self,
2579            encoder: &mut fidl::encoding::Encoder<'_, D>,
2580            offset: usize,
2581            depth: fidl::encoding::Depth,
2582        ) -> fidl::Result<()> {
2583            encoder.debug_check_bounds::<DeleteLazyNode>(offset);
2584            // Zero out padding regions. There's no need to apply masks
2585            // because the unmasked parts will be overwritten by fields.
2586            // Write the fields.
2587            self.0.encode(encoder, offset + 0, depth)?;
2588            Ok(())
2589        }
2590    }
2591
2592    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteLazyNode {
2593        #[inline(always)]
2594        fn new_empty() -> Self {
2595            Self { id: fidl::new_empty!(u32, D) }
2596        }
2597
2598        #[inline]
2599        unsafe fn decode(
2600            &mut self,
2601            decoder: &mut fidl::encoding::Decoder<'_, D>,
2602            offset: usize,
2603            _depth: fidl::encoding::Depth,
2604        ) -> fidl::Result<()> {
2605            decoder.debug_check_bounds::<Self>(offset);
2606            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2607            // Verify that padding bytes are zero.
2608            // Copy from the buffer into the object.
2609            unsafe {
2610                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2611            }
2612            Ok(())
2613        }
2614    }
2615
2616    impl fidl::encoding::ValueTypeMarker for DeleteNode {
2617        type Borrowed<'a> = &'a Self;
2618        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2619            value
2620        }
2621    }
2622
2623    unsafe impl fidl::encoding::TypeMarker for DeleteNode {
2624        type Owned = Self;
2625
2626        #[inline(always)]
2627        fn inline_align(_context: fidl::encoding::Context) -> usize {
2628            4
2629        }
2630
2631        #[inline(always)]
2632        fn inline_size(_context: fidl::encoding::Context) -> usize {
2633            4
2634        }
2635        #[inline(always)]
2636        fn encode_is_copy() -> bool {
2637            true
2638        }
2639
2640        #[inline(always)]
2641        fn decode_is_copy() -> bool {
2642            true
2643        }
2644    }
2645
2646    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteNode, D>
2647        for &DeleteNode
2648    {
2649        #[inline]
2650        unsafe fn encode(
2651            self,
2652            encoder: &mut fidl::encoding::Encoder<'_, D>,
2653            offset: usize,
2654            _depth: fidl::encoding::Depth,
2655        ) -> fidl::Result<()> {
2656            encoder.debug_check_bounds::<DeleteNode>(offset);
2657            unsafe {
2658                // Copy the object into the buffer.
2659                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2660                (buf_ptr as *mut DeleteNode).write_unaligned((self as *const DeleteNode).read());
2661                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2662                // done second because the memcpy will write garbage to these bytes.
2663            }
2664            Ok(())
2665        }
2666    }
2667    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
2668        fidl::encoding::Encode<DeleteNode, D> for (T0,)
2669    {
2670        #[inline]
2671        unsafe fn encode(
2672            self,
2673            encoder: &mut fidl::encoding::Encoder<'_, D>,
2674            offset: usize,
2675            depth: fidl::encoding::Depth,
2676        ) -> fidl::Result<()> {
2677            encoder.debug_check_bounds::<DeleteNode>(offset);
2678            // Zero out padding regions. There's no need to apply masks
2679            // because the unmasked parts will be overwritten by fields.
2680            // Write the fields.
2681            self.0.encode(encoder, offset + 0, depth)?;
2682            Ok(())
2683        }
2684    }
2685
2686    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteNode {
2687        #[inline(always)]
2688        fn new_empty() -> Self {
2689            Self { id: fidl::new_empty!(u32, D) }
2690        }
2691
2692        #[inline]
2693        unsafe fn decode(
2694            &mut self,
2695            decoder: &mut fidl::encoding::Decoder<'_, D>,
2696            offset: usize,
2697            _depth: fidl::encoding::Depth,
2698        ) -> fidl::Result<()> {
2699            decoder.debug_check_bounds::<Self>(offset);
2700            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2701            // Verify that padding bytes are zero.
2702            // Copy from the buffer into the object.
2703            unsafe {
2704                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2705            }
2706            Ok(())
2707        }
2708    }
2709
2710    impl fidl::encoding::ValueTypeMarker for DeleteProperty {
2711        type Borrowed<'a> = &'a Self;
2712        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2713            value
2714        }
2715    }
2716
2717    unsafe impl fidl::encoding::TypeMarker for DeleteProperty {
2718        type Owned = Self;
2719
2720        #[inline(always)]
2721        fn inline_align(_context: fidl::encoding::Context) -> usize {
2722            4
2723        }
2724
2725        #[inline(always)]
2726        fn inline_size(_context: fidl::encoding::Context) -> usize {
2727            4
2728        }
2729        #[inline(always)]
2730        fn encode_is_copy() -> bool {
2731            true
2732        }
2733
2734        #[inline(always)]
2735        fn decode_is_copy() -> bool {
2736            true
2737        }
2738    }
2739
2740    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteProperty, D>
2741        for &DeleteProperty
2742    {
2743        #[inline]
2744        unsafe fn encode(
2745            self,
2746            encoder: &mut fidl::encoding::Encoder<'_, D>,
2747            offset: usize,
2748            _depth: fidl::encoding::Depth,
2749        ) -> fidl::Result<()> {
2750            encoder.debug_check_bounds::<DeleteProperty>(offset);
2751            unsafe {
2752                // Copy the object into the buffer.
2753                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2754                (buf_ptr as *mut DeleteProperty)
2755                    .write_unaligned((self as *const DeleteProperty).read());
2756                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2757                // done second because the memcpy will write garbage to these bytes.
2758            }
2759            Ok(())
2760        }
2761    }
2762    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
2763        fidl::encoding::Encode<DeleteProperty, D> for (T0,)
2764    {
2765        #[inline]
2766        unsafe fn encode(
2767            self,
2768            encoder: &mut fidl::encoding::Encoder<'_, D>,
2769            offset: usize,
2770            depth: fidl::encoding::Depth,
2771        ) -> fidl::Result<()> {
2772            encoder.debug_check_bounds::<DeleteProperty>(offset);
2773            // Zero out padding regions. There's no need to apply masks
2774            // because the unmasked parts will be overwritten by fields.
2775            // Write the fields.
2776            self.0.encode(encoder, offset + 0, depth)?;
2777            Ok(())
2778        }
2779    }
2780
2781    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteProperty {
2782        #[inline(always)]
2783        fn new_empty() -> Self {
2784            Self { id: fidl::new_empty!(u32, D) }
2785        }
2786
2787        #[inline]
2788        unsafe fn decode(
2789            &mut self,
2790            decoder: &mut fidl::encoding::Decoder<'_, D>,
2791            offset: usize,
2792            _depth: fidl::encoding::Depth,
2793        ) -> fidl::Result<()> {
2794            decoder.debug_check_bounds::<Self>(offset);
2795            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2796            // Verify that padding bytes are zero.
2797            // Copy from the buffer into the object.
2798            unsafe {
2799                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2800            }
2801            Ok(())
2802        }
2803    }
2804
2805    impl fidl::encoding::ValueTypeMarker for Insert {
2806        type Borrowed<'a> = &'a Self;
2807        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2808            value
2809        }
2810    }
2811
2812    unsafe impl fidl::encoding::TypeMarker for Insert {
2813        type Owned = Self;
2814
2815        #[inline(always)]
2816        fn inline_align(_context: fidl::encoding::Context) -> usize {
2817            8
2818        }
2819
2820        #[inline(always)]
2821        fn inline_size(_context: fidl::encoding::Context) -> usize {
2822            24
2823        }
2824    }
2825
2826    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Insert, D> for &Insert {
2827        #[inline]
2828        unsafe fn encode(
2829            self,
2830            encoder: &mut fidl::encoding::Encoder<'_, D>,
2831            offset: usize,
2832            _depth: fidl::encoding::Depth,
2833        ) -> fidl::Result<()> {
2834            encoder.debug_check_bounds::<Insert>(offset);
2835            // Delegate to tuple encoding.
2836            fidl::encoding::Encode::<Insert, D>::encode(
2837                (
2838                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2839                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2840                ),
2841                encoder,
2842                offset,
2843                _depth,
2844            )
2845        }
2846    }
2847    unsafe impl<
2848            D: fidl::encoding::ResourceDialect,
2849            T0: fidl::encoding::Encode<u32, D>,
2850            T1: fidl::encoding::Encode<Value, D>,
2851        > fidl::encoding::Encode<Insert, D> for (T0, T1)
2852    {
2853        #[inline]
2854        unsafe fn encode(
2855            self,
2856            encoder: &mut fidl::encoding::Encoder<'_, D>,
2857            offset: usize,
2858            depth: fidl::encoding::Depth,
2859        ) -> fidl::Result<()> {
2860            encoder.debug_check_bounds::<Insert>(offset);
2861            // Zero out padding regions. There's no need to apply masks
2862            // because the unmasked parts will be overwritten by fields.
2863            unsafe {
2864                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2865                (ptr as *mut u64).write_unaligned(0);
2866            }
2867            // Write the fields.
2868            self.0.encode(encoder, offset + 0, depth)?;
2869            self.1.encode(encoder, offset + 8, depth)?;
2870            Ok(())
2871        }
2872    }
2873
2874    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Insert {
2875        #[inline(always)]
2876        fn new_empty() -> Self {
2877            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Value, D) }
2878        }
2879
2880        #[inline]
2881        unsafe fn decode(
2882            &mut self,
2883            decoder: &mut fidl::encoding::Decoder<'_, D>,
2884            offset: usize,
2885            _depth: fidl::encoding::Depth,
2886        ) -> fidl::Result<()> {
2887            decoder.debug_check_bounds::<Self>(offset);
2888            // Verify that padding bytes are zero.
2889            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2890            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2891            let mask = 0xffffffff00000000u64;
2892            let maskedval = padval & mask;
2893            if maskedval != 0 {
2894                return Err(fidl::Error::NonZeroPadding {
2895                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2896                });
2897            }
2898            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
2899            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
2900            Ok(())
2901        }
2902    }
2903
2904    impl fidl::encoding::ValueTypeMarker for InsertMultiple {
2905        type Borrowed<'a> = &'a Self;
2906        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2907            value
2908        }
2909    }
2910
2911    unsafe impl fidl::encoding::TypeMarker for InsertMultiple {
2912        type Owned = Self;
2913
2914        #[inline(always)]
2915        fn inline_align(_context: fidl::encoding::Context) -> usize {
2916            8
2917        }
2918
2919        #[inline(always)]
2920        fn inline_size(_context: fidl::encoding::Context) -> usize {
2921            32
2922        }
2923    }
2924
2925    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InsertMultiple, D>
2926        for &InsertMultiple
2927    {
2928        #[inline]
2929        unsafe fn encode(
2930            self,
2931            encoder: &mut fidl::encoding::Encoder<'_, D>,
2932            offset: usize,
2933            _depth: fidl::encoding::Depth,
2934        ) -> fidl::Result<()> {
2935            encoder.debug_check_bounds::<InsertMultiple>(offset);
2936            // Delegate to tuple encoding.
2937            fidl::encoding::Encode::<InsertMultiple, D>::encode(
2938                (
2939                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2940                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2941                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.count),
2942                ),
2943                encoder,
2944                offset,
2945                _depth,
2946            )
2947        }
2948    }
2949    unsafe impl<
2950            D: fidl::encoding::ResourceDialect,
2951            T0: fidl::encoding::Encode<u32, D>,
2952            T1: fidl::encoding::Encode<Value, D>,
2953            T2: fidl::encoding::Encode<u64, D>,
2954        > fidl::encoding::Encode<InsertMultiple, D> for (T0, T1, T2)
2955    {
2956        #[inline]
2957        unsafe fn encode(
2958            self,
2959            encoder: &mut fidl::encoding::Encoder<'_, D>,
2960            offset: usize,
2961            depth: fidl::encoding::Depth,
2962        ) -> fidl::Result<()> {
2963            encoder.debug_check_bounds::<InsertMultiple>(offset);
2964            // Zero out padding regions. There's no need to apply masks
2965            // because the unmasked parts will be overwritten by fields.
2966            unsafe {
2967                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2968                (ptr as *mut u64).write_unaligned(0);
2969            }
2970            // Write the fields.
2971            self.0.encode(encoder, offset + 0, depth)?;
2972            self.1.encode(encoder, offset + 8, depth)?;
2973            self.2.encode(encoder, offset + 24, depth)?;
2974            Ok(())
2975        }
2976    }
2977
2978    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InsertMultiple {
2979        #[inline(always)]
2980        fn new_empty() -> Self {
2981            Self {
2982                id: fidl::new_empty!(u32, D),
2983                value: fidl::new_empty!(Value, D),
2984                count: fidl::new_empty!(u64, D),
2985            }
2986        }
2987
2988        #[inline]
2989        unsafe fn decode(
2990            &mut self,
2991            decoder: &mut fidl::encoding::Decoder<'_, D>,
2992            offset: usize,
2993            _depth: fidl::encoding::Depth,
2994        ) -> fidl::Result<()> {
2995            decoder.debug_check_bounds::<Self>(offset);
2996            // Verify that padding bytes are zero.
2997            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2998            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2999            let mask = 0xffffffff00000000u64;
3000            let maskedval = padval & mask;
3001            if maskedval != 0 {
3002                return Err(fidl::Error::NonZeroPadding {
3003                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3004                });
3005            }
3006            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
3007            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
3008            fidl::decode!(u64, D, &mut self.count, decoder, offset + 24, _depth)?;
3009            Ok(())
3010        }
3011    }
3012
3013    impl fidl::encoding::ValueTypeMarker for InspectPuppetActLazyRequest {
3014        type Borrowed<'a> = &'a Self;
3015        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3016            value
3017        }
3018    }
3019
3020    unsafe impl fidl::encoding::TypeMarker for InspectPuppetActLazyRequest {
3021        type Owned = Self;
3022
3023        #[inline(always)]
3024        fn inline_align(_context: fidl::encoding::Context) -> usize {
3025            8
3026        }
3027
3028        #[inline(always)]
3029        fn inline_size(_context: fidl::encoding::Context) -> usize {
3030            16
3031        }
3032    }
3033
3034    unsafe impl<D: fidl::encoding::ResourceDialect>
3035        fidl::encoding::Encode<InspectPuppetActLazyRequest, D> for &InspectPuppetActLazyRequest
3036    {
3037        #[inline]
3038        unsafe fn encode(
3039            self,
3040            encoder: &mut fidl::encoding::Encoder<'_, D>,
3041            offset: usize,
3042            _depth: fidl::encoding::Depth,
3043        ) -> fidl::Result<()> {
3044            encoder.debug_check_bounds::<InspectPuppetActLazyRequest>(offset);
3045            // Delegate to tuple encoding.
3046            fidl::encoding::Encode::<InspectPuppetActLazyRequest, D>::encode(
3047                (<LazyAction as fidl::encoding::ValueTypeMarker>::borrow(&self.lazy_action),),
3048                encoder,
3049                offset,
3050                _depth,
3051            )
3052        }
3053    }
3054    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<LazyAction, D>>
3055        fidl::encoding::Encode<InspectPuppetActLazyRequest, D> for (T0,)
3056    {
3057        #[inline]
3058        unsafe fn encode(
3059            self,
3060            encoder: &mut fidl::encoding::Encoder<'_, D>,
3061            offset: usize,
3062            depth: fidl::encoding::Depth,
3063        ) -> fidl::Result<()> {
3064            encoder.debug_check_bounds::<InspectPuppetActLazyRequest>(offset);
3065            // Zero out padding regions. There's no need to apply masks
3066            // because the unmasked parts will be overwritten by fields.
3067            // Write the fields.
3068            self.0.encode(encoder, offset + 0, depth)?;
3069            Ok(())
3070        }
3071    }
3072
3073    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3074        for InspectPuppetActLazyRequest
3075    {
3076        #[inline(always)]
3077        fn new_empty() -> Self {
3078            Self { lazy_action: fidl::new_empty!(LazyAction, D) }
3079        }
3080
3081        #[inline]
3082        unsafe fn decode(
3083            &mut self,
3084            decoder: &mut fidl::encoding::Decoder<'_, D>,
3085            offset: usize,
3086            _depth: fidl::encoding::Depth,
3087        ) -> fidl::Result<()> {
3088            decoder.debug_check_bounds::<Self>(offset);
3089            // Verify that padding bytes are zero.
3090            fidl::decode!(LazyAction, D, &mut self.lazy_action, decoder, offset + 0, _depth)?;
3091            Ok(())
3092        }
3093    }
3094
3095    impl fidl::encoding::ValueTypeMarker for InspectPuppetActRequest {
3096        type Borrowed<'a> = &'a Self;
3097        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3098            value
3099        }
3100    }
3101
3102    unsafe impl fidl::encoding::TypeMarker for InspectPuppetActRequest {
3103        type Owned = Self;
3104
3105        #[inline(always)]
3106        fn inline_align(_context: fidl::encoding::Context) -> usize {
3107            8
3108        }
3109
3110        #[inline(always)]
3111        fn inline_size(_context: fidl::encoding::Context) -> usize {
3112            16
3113        }
3114    }
3115
3116    unsafe impl<D: fidl::encoding::ResourceDialect>
3117        fidl::encoding::Encode<InspectPuppetActRequest, D> for &InspectPuppetActRequest
3118    {
3119        #[inline]
3120        unsafe fn encode(
3121            self,
3122            encoder: &mut fidl::encoding::Encoder<'_, D>,
3123            offset: usize,
3124            _depth: fidl::encoding::Depth,
3125        ) -> fidl::Result<()> {
3126            encoder.debug_check_bounds::<InspectPuppetActRequest>(offset);
3127            // Delegate to tuple encoding.
3128            fidl::encoding::Encode::<InspectPuppetActRequest, D>::encode(
3129                (<Action as fidl::encoding::ValueTypeMarker>::borrow(&self.action),),
3130                encoder,
3131                offset,
3132                _depth,
3133            )
3134        }
3135    }
3136    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Action, D>>
3137        fidl::encoding::Encode<InspectPuppetActRequest, D> for (T0,)
3138    {
3139        #[inline]
3140        unsafe fn encode(
3141            self,
3142            encoder: &mut fidl::encoding::Encoder<'_, D>,
3143            offset: usize,
3144            depth: fidl::encoding::Depth,
3145        ) -> fidl::Result<()> {
3146            encoder.debug_check_bounds::<InspectPuppetActRequest>(offset);
3147            // Zero out padding regions. There's no need to apply masks
3148            // because the unmasked parts will be overwritten by fields.
3149            // Write the fields.
3150            self.0.encode(encoder, offset + 0, depth)?;
3151            Ok(())
3152        }
3153    }
3154
3155    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3156        for InspectPuppetActRequest
3157    {
3158        #[inline(always)]
3159        fn new_empty() -> Self {
3160            Self { action: fidl::new_empty!(Action, D) }
3161        }
3162
3163        #[inline]
3164        unsafe fn decode(
3165            &mut self,
3166            decoder: &mut fidl::encoding::Decoder<'_, D>,
3167            offset: usize,
3168            _depth: fidl::encoding::Depth,
3169        ) -> fidl::Result<()> {
3170            decoder.debug_check_bounds::<Self>(offset);
3171            // Verify that padding bytes are zero.
3172            fidl::decode!(Action, D, &mut self.action, decoder, offset + 0, _depth)?;
3173            Ok(())
3174        }
3175    }
3176
3177    impl fidl::encoding::ValueTypeMarker for InspectPuppetInitializeRequest {
3178        type Borrowed<'a> = &'a Self;
3179        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3180            value
3181        }
3182    }
3183
3184    unsafe impl fidl::encoding::TypeMarker for InspectPuppetInitializeRequest {
3185        type Owned = Self;
3186
3187        #[inline(always)]
3188        fn inline_align(_context: fidl::encoding::Context) -> usize {
3189            8
3190        }
3191
3192        #[inline(always)]
3193        fn inline_size(_context: fidl::encoding::Context) -> usize {
3194            16
3195        }
3196    }
3197
3198    unsafe impl<D: fidl::encoding::ResourceDialect>
3199        fidl::encoding::Encode<InspectPuppetInitializeRequest, D>
3200        for &InspectPuppetInitializeRequest
3201    {
3202        #[inline]
3203        unsafe fn encode(
3204            self,
3205            encoder: &mut fidl::encoding::Encoder<'_, D>,
3206            offset: usize,
3207            _depth: fidl::encoding::Depth,
3208        ) -> fidl::Result<()> {
3209            encoder.debug_check_bounds::<InspectPuppetInitializeRequest>(offset);
3210            // Delegate to tuple encoding.
3211            fidl::encoding::Encode::<InspectPuppetInitializeRequest, D>::encode(
3212                (<InitializationParams as fidl::encoding::ValueTypeMarker>::borrow(&self.params),),
3213                encoder,
3214                offset,
3215                _depth,
3216            )
3217        }
3218    }
3219    unsafe impl<
3220            D: fidl::encoding::ResourceDialect,
3221            T0: fidl::encoding::Encode<InitializationParams, D>,
3222        > fidl::encoding::Encode<InspectPuppetInitializeRequest, D> for (T0,)
3223    {
3224        #[inline]
3225        unsafe fn encode(
3226            self,
3227            encoder: &mut fidl::encoding::Encoder<'_, D>,
3228            offset: usize,
3229            depth: fidl::encoding::Depth,
3230        ) -> fidl::Result<()> {
3231            encoder.debug_check_bounds::<InspectPuppetInitializeRequest>(offset);
3232            // Zero out padding regions. There's no need to apply masks
3233            // because the unmasked parts will be overwritten by fields.
3234            // Write the fields.
3235            self.0.encode(encoder, offset + 0, depth)?;
3236            Ok(())
3237        }
3238    }
3239
3240    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3241        for InspectPuppetInitializeRequest
3242    {
3243        #[inline(always)]
3244        fn new_empty() -> Self {
3245            Self { params: fidl::new_empty!(InitializationParams, D) }
3246        }
3247
3248        #[inline]
3249        unsafe fn decode(
3250            &mut self,
3251            decoder: &mut fidl::encoding::Decoder<'_, D>,
3252            offset: usize,
3253            _depth: fidl::encoding::Depth,
3254        ) -> fidl::Result<()> {
3255            decoder.debug_check_bounds::<Self>(offset);
3256            // Verify that padding bytes are zero.
3257            fidl::decode!(InitializationParams, D, &mut self.params, decoder, offset + 0, _depth)?;
3258            Ok(())
3259        }
3260    }
3261
3262    impl fidl::encoding::ValueTypeMarker for InspectPuppetInitializeTreeRequest {
3263        type Borrowed<'a> = &'a Self;
3264        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3265            value
3266        }
3267    }
3268
3269    unsafe impl fidl::encoding::TypeMarker for InspectPuppetInitializeTreeRequest {
3270        type Owned = Self;
3271
3272        #[inline(always)]
3273        fn inline_align(_context: fidl::encoding::Context) -> usize {
3274            8
3275        }
3276
3277        #[inline(always)]
3278        fn inline_size(_context: fidl::encoding::Context) -> usize {
3279            16
3280        }
3281    }
3282
3283    unsafe impl<D: fidl::encoding::ResourceDialect>
3284        fidl::encoding::Encode<InspectPuppetInitializeTreeRequest, D>
3285        for &InspectPuppetInitializeTreeRequest
3286    {
3287        #[inline]
3288        unsafe fn encode(
3289            self,
3290            encoder: &mut fidl::encoding::Encoder<'_, D>,
3291            offset: usize,
3292            _depth: fidl::encoding::Depth,
3293        ) -> fidl::Result<()> {
3294            encoder.debug_check_bounds::<InspectPuppetInitializeTreeRequest>(offset);
3295            // Delegate to tuple encoding.
3296            fidl::encoding::Encode::<InspectPuppetInitializeTreeRequest, D>::encode(
3297                (<InitializationParams as fidl::encoding::ValueTypeMarker>::borrow(&self.params),),
3298                encoder,
3299                offset,
3300                _depth,
3301            )
3302        }
3303    }
3304    unsafe impl<
3305            D: fidl::encoding::ResourceDialect,
3306            T0: fidl::encoding::Encode<InitializationParams, D>,
3307        > fidl::encoding::Encode<InspectPuppetInitializeTreeRequest, D> for (T0,)
3308    {
3309        #[inline]
3310        unsafe fn encode(
3311            self,
3312            encoder: &mut fidl::encoding::Encoder<'_, D>,
3313            offset: usize,
3314            depth: fidl::encoding::Depth,
3315        ) -> fidl::Result<()> {
3316            encoder.debug_check_bounds::<InspectPuppetInitializeTreeRequest>(offset);
3317            // Zero out padding regions. There's no need to apply masks
3318            // because the unmasked parts will be overwritten by fields.
3319            // Write the fields.
3320            self.0.encode(encoder, offset + 0, depth)?;
3321            Ok(())
3322        }
3323    }
3324
3325    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3326        for InspectPuppetInitializeTreeRequest
3327    {
3328        #[inline(always)]
3329        fn new_empty() -> Self {
3330            Self { params: fidl::new_empty!(InitializationParams, D) }
3331        }
3332
3333        #[inline]
3334        unsafe fn decode(
3335            &mut self,
3336            decoder: &mut fidl::encoding::Decoder<'_, D>,
3337            offset: usize,
3338            _depth: fidl::encoding::Depth,
3339        ) -> fidl::Result<()> {
3340            decoder.debug_check_bounds::<Self>(offset);
3341            // Verify that padding bytes are zero.
3342            fidl::decode!(InitializationParams, D, &mut self.params, decoder, offset + 0, _depth)?;
3343            Ok(())
3344        }
3345    }
3346
3347    impl fidl::encoding::ValueTypeMarker for InspectPuppetActLazyResponse {
3348        type Borrowed<'a> = &'a Self;
3349        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3350            value
3351        }
3352    }
3353
3354    unsafe impl fidl::encoding::TypeMarker for InspectPuppetActLazyResponse {
3355        type Owned = Self;
3356
3357        #[inline(always)]
3358        fn inline_align(_context: fidl::encoding::Context) -> usize {
3359            4
3360        }
3361
3362        #[inline(always)]
3363        fn inline_size(_context: fidl::encoding::Context) -> usize {
3364            4
3365        }
3366    }
3367
3368    unsafe impl<D: fidl::encoding::ResourceDialect>
3369        fidl::encoding::Encode<InspectPuppetActLazyResponse, D> for &InspectPuppetActLazyResponse
3370    {
3371        #[inline]
3372        unsafe fn encode(
3373            self,
3374            encoder: &mut fidl::encoding::Encoder<'_, D>,
3375            offset: usize,
3376            _depth: fidl::encoding::Depth,
3377        ) -> fidl::Result<()> {
3378            encoder.debug_check_bounds::<InspectPuppetActLazyResponse>(offset);
3379            // Delegate to tuple encoding.
3380            fidl::encoding::Encode::<InspectPuppetActLazyResponse, D>::encode(
3381                (<TestResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
3382                encoder,
3383                offset,
3384                _depth,
3385            )
3386        }
3387    }
3388    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TestResult, D>>
3389        fidl::encoding::Encode<InspectPuppetActLazyResponse, D> for (T0,)
3390    {
3391        #[inline]
3392        unsafe fn encode(
3393            self,
3394            encoder: &mut fidl::encoding::Encoder<'_, D>,
3395            offset: usize,
3396            depth: fidl::encoding::Depth,
3397        ) -> fidl::Result<()> {
3398            encoder.debug_check_bounds::<InspectPuppetActLazyResponse>(offset);
3399            // Zero out padding regions. There's no need to apply masks
3400            // because the unmasked parts will be overwritten by fields.
3401            // Write the fields.
3402            self.0.encode(encoder, offset + 0, depth)?;
3403            Ok(())
3404        }
3405    }
3406
3407    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3408        for InspectPuppetActLazyResponse
3409    {
3410        #[inline(always)]
3411        fn new_empty() -> Self {
3412            Self { result: fidl::new_empty!(TestResult, D) }
3413        }
3414
3415        #[inline]
3416        unsafe fn decode(
3417            &mut self,
3418            decoder: &mut fidl::encoding::Decoder<'_, D>,
3419            offset: usize,
3420            _depth: fidl::encoding::Depth,
3421        ) -> fidl::Result<()> {
3422            decoder.debug_check_bounds::<Self>(offset);
3423            // Verify that padding bytes are zero.
3424            fidl::decode!(TestResult, D, &mut self.result, decoder, offset + 0, _depth)?;
3425            Ok(())
3426        }
3427    }
3428
3429    impl fidl::encoding::ValueTypeMarker for InspectPuppetActResponse {
3430        type Borrowed<'a> = &'a Self;
3431        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3432            value
3433        }
3434    }
3435
3436    unsafe impl fidl::encoding::TypeMarker for InspectPuppetActResponse {
3437        type Owned = Self;
3438
3439        #[inline(always)]
3440        fn inline_align(_context: fidl::encoding::Context) -> usize {
3441            4
3442        }
3443
3444        #[inline(always)]
3445        fn inline_size(_context: fidl::encoding::Context) -> usize {
3446            4
3447        }
3448    }
3449
3450    unsafe impl<D: fidl::encoding::ResourceDialect>
3451        fidl::encoding::Encode<InspectPuppetActResponse, D> for &InspectPuppetActResponse
3452    {
3453        #[inline]
3454        unsafe fn encode(
3455            self,
3456            encoder: &mut fidl::encoding::Encoder<'_, D>,
3457            offset: usize,
3458            _depth: fidl::encoding::Depth,
3459        ) -> fidl::Result<()> {
3460            encoder.debug_check_bounds::<InspectPuppetActResponse>(offset);
3461            // Delegate to tuple encoding.
3462            fidl::encoding::Encode::<InspectPuppetActResponse, D>::encode(
3463                (<TestResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
3464                encoder,
3465                offset,
3466                _depth,
3467            )
3468        }
3469    }
3470    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TestResult, D>>
3471        fidl::encoding::Encode<InspectPuppetActResponse, D> for (T0,)
3472    {
3473        #[inline]
3474        unsafe fn encode(
3475            self,
3476            encoder: &mut fidl::encoding::Encoder<'_, D>,
3477            offset: usize,
3478            depth: fidl::encoding::Depth,
3479        ) -> fidl::Result<()> {
3480            encoder.debug_check_bounds::<InspectPuppetActResponse>(offset);
3481            // Zero out padding regions. There's no need to apply masks
3482            // because the unmasked parts will be overwritten by fields.
3483            // Write the fields.
3484            self.0.encode(encoder, offset + 0, depth)?;
3485            Ok(())
3486        }
3487    }
3488
3489    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3490        for InspectPuppetActResponse
3491    {
3492        #[inline(always)]
3493        fn new_empty() -> Self {
3494            Self { result: fidl::new_empty!(TestResult, D) }
3495        }
3496
3497        #[inline]
3498        unsafe fn decode(
3499            &mut self,
3500            decoder: &mut fidl::encoding::Decoder<'_, D>,
3501            offset: usize,
3502            _depth: fidl::encoding::Depth,
3503        ) -> fidl::Result<()> {
3504            decoder.debug_check_bounds::<Self>(offset);
3505            // Verify that padding bytes are zero.
3506            fidl::decode!(TestResult, D, &mut self.result, decoder, offset + 0, _depth)?;
3507            Ok(())
3508        }
3509    }
3510
3511    impl fidl::encoding::ValueTypeMarker for InspectPuppetPublishResponse {
3512        type Borrowed<'a> = &'a Self;
3513        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3514            value
3515        }
3516    }
3517
3518    unsafe impl fidl::encoding::TypeMarker for InspectPuppetPublishResponse {
3519        type Owned = Self;
3520
3521        #[inline(always)]
3522        fn inline_align(_context: fidl::encoding::Context) -> usize {
3523            4
3524        }
3525
3526        #[inline(always)]
3527        fn inline_size(_context: fidl::encoding::Context) -> usize {
3528            4
3529        }
3530    }
3531
3532    unsafe impl<D: fidl::encoding::ResourceDialect>
3533        fidl::encoding::Encode<InspectPuppetPublishResponse, D> for &InspectPuppetPublishResponse
3534    {
3535        #[inline]
3536        unsafe fn encode(
3537            self,
3538            encoder: &mut fidl::encoding::Encoder<'_, D>,
3539            offset: usize,
3540            _depth: fidl::encoding::Depth,
3541        ) -> fidl::Result<()> {
3542            encoder.debug_check_bounds::<InspectPuppetPublishResponse>(offset);
3543            // Delegate to tuple encoding.
3544            fidl::encoding::Encode::<InspectPuppetPublishResponse, D>::encode(
3545                (<TestResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
3546                encoder,
3547                offset,
3548                _depth,
3549            )
3550        }
3551    }
3552    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TestResult, D>>
3553        fidl::encoding::Encode<InspectPuppetPublishResponse, D> for (T0,)
3554    {
3555        #[inline]
3556        unsafe fn encode(
3557            self,
3558            encoder: &mut fidl::encoding::Encoder<'_, D>,
3559            offset: usize,
3560            depth: fidl::encoding::Depth,
3561        ) -> fidl::Result<()> {
3562            encoder.debug_check_bounds::<InspectPuppetPublishResponse>(offset);
3563            // Zero out padding regions. There's no need to apply masks
3564            // because the unmasked parts will be overwritten by fields.
3565            // Write the fields.
3566            self.0.encode(encoder, offset + 0, depth)?;
3567            Ok(())
3568        }
3569    }
3570
3571    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3572        for InspectPuppetPublishResponse
3573    {
3574        #[inline(always)]
3575        fn new_empty() -> Self {
3576            Self { result: fidl::new_empty!(TestResult, D) }
3577        }
3578
3579        #[inline]
3580        unsafe fn decode(
3581            &mut self,
3582            decoder: &mut fidl::encoding::Decoder<'_, D>,
3583            offset: usize,
3584            _depth: fidl::encoding::Depth,
3585        ) -> fidl::Result<()> {
3586            decoder.debug_check_bounds::<Self>(offset);
3587            // Verify that padding bytes are zero.
3588            fidl::decode!(TestResult, D, &mut self.result, decoder, offset + 0, _depth)?;
3589            Ok(())
3590        }
3591    }
3592
3593    impl fidl::encoding::ValueTypeMarker for SetBool {
3594        type Borrowed<'a> = &'a Self;
3595        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3596            value
3597        }
3598    }
3599
3600    unsafe impl fidl::encoding::TypeMarker for SetBool {
3601        type Owned = Self;
3602
3603        #[inline(always)]
3604        fn inline_align(_context: fidl::encoding::Context) -> usize {
3605            4
3606        }
3607
3608        #[inline(always)]
3609        fn inline_size(_context: fidl::encoding::Context) -> usize {
3610            8
3611        }
3612    }
3613
3614    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetBool, D> for &SetBool {
3615        #[inline]
3616        unsafe fn encode(
3617            self,
3618            encoder: &mut fidl::encoding::Encoder<'_, D>,
3619            offset: usize,
3620            _depth: fidl::encoding::Depth,
3621        ) -> fidl::Result<()> {
3622            encoder.debug_check_bounds::<SetBool>(offset);
3623            // Delegate to tuple encoding.
3624            fidl::encoding::Encode::<SetBool, D>::encode(
3625                (
3626                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3627                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
3628                ),
3629                encoder,
3630                offset,
3631                _depth,
3632            )
3633        }
3634    }
3635    unsafe impl<
3636            D: fidl::encoding::ResourceDialect,
3637            T0: fidl::encoding::Encode<u32, D>,
3638            T1: fidl::encoding::Encode<bool, D>,
3639        > fidl::encoding::Encode<SetBool, D> for (T0, T1)
3640    {
3641        #[inline]
3642        unsafe fn encode(
3643            self,
3644            encoder: &mut fidl::encoding::Encoder<'_, D>,
3645            offset: usize,
3646            depth: fidl::encoding::Depth,
3647        ) -> fidl::Result<()> {
3648            encoder.debug_check_bounds::<SetBool>(offset);
3649            // Zero out padding regions. There's no need to apply masks
3650            // because the unmasked parts will be overwritten by fields.
3651            unsafe {
3652                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
3653                (ptr as *mut u32).write_unaligned(0);
3654            }
3655            // Write the fields.
3656            self.0.encode(encoder, offset + 0, depth)?;
3657            self.1.encode(encoder, offset + 4, depth)?;
3658            Ok(())
3659        }
3660    }
3661
3662    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetBool {
3663        #[inline(always)]
3664        fn new_empty() -> Self {
3665            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(bool, D) }
3666        }
3667
3668        #[inline]
3669        unsafe fn decode(
3670            &mut self,
3671            decoder: &mut fidl::encoding::Decoder<'_, D>,
3672            offset: usize,
3673            _depth: fidl::encoding::Depth,
3674        ) -> fidl::Result<()> {
3675            decoder.debug_check_bounds::<Self>(offset);
3676            // Verify that padding bytes are zero.
3677            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
3678            let padval = unsafe { (ptr as *const u32).read_unaligned() };
3679            let mask = 0xffffff00u32;
3680            let maskedval = padval & mask;
3681            if maskedval != 0 {
3682                return Err(fidl::Error::NonZeroPadding {
3683                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
3684                });
3685            }
3686            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
3687            fidl::decode!(bool, D, &mut self.value, decoder, offset + 4, _depth)?;
3688            Ok(())
3689        }
3690    }
3691
3692    impl fidl::encoding::ValueTypeMarker for SetBytes {
3693        type Borrowed<'a> = &'a Self;
3694        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3695            value
3696        }
3697    }
3698
3699    unsafe impl fidl::encoding::TypeMarker for SetBytes {
3700        type Owned = Self;
3701
3702        #[inline(always)]
3703        fn inline_align(_context: fidl::encoding::Context) -> usize {
3704            8
3705        }
3706
3707        #[inline(always)]
3708        fn inline_size(_context: fidl::encoding::Context) -> usize {
3709            24
3710        }
3711    }
3712
3713    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetBytes, D> for &SetBytes {
3714        #[inline]
3715        unsafe fn encode(
3716            self,
3717            encoder: &mut fidl::encoding::Encoder<'_, D>,
3718            offset: usize,
3719            _depth: fidl::encoding::Depth,
3720        ) -> fidl::Result<()> {
3721            encoder.debug_check_bounds::<SetBytes>(offset);
3722            // Delegate to tuple encoding.
3723            fidl::encoding::Encode::<SetBytes, D>::encode(
3724                (
3725                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3726                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
3727                ),
3728                encoder, offset, _depth
3729            )
3730        }
3731    }
3732    unsafe impl<
3733            D: fidl::encoding::ResourceDialect,
3734            T0: fidl::encoding::Encode<u32, D>,
3735            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
3736        > fidl::encoding::Encode<SetBytes, D> for (T0, T1)
3737    {
3738        #[inline]
3739        unsafe fn encode(
3740            self,
3741            encoder: &mut fidl::encoding::Encoder<'_, D>,
3742            offset: usize,
3743            depth: fidl::encoding::Depth,
3744        ) -> fidl::Result<()> {
3745            encoder.debug_check_bounds::<SetBytes>(offset);
3746            // Zero out padding regions. There's no need to apply masks
3747            // because the unmasked parts will be overwritten by fields.
3748            unsafe {
3749                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3750                (ptr as *mut u64).write_unaligned(0);
3751            }
3752            // Write the fields.
3753            self.0.encode(encoder, offset + 0, depth)?;
3754            self.1.encode(encoder, offset + 8, depth)?;
3755            Ok(())
3756        }
3757    }
3758
3759    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetBytes {
3760        #[inline(always)]
3761        fn new_empty() -> Self {
3762            Self {
3763                id: fidl::new_empty!(u32, D),
3764                value: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
3765            }
3766        }
3767
3768        #[inline]
3769        unsafe fn decode(
3770            &mut self,
3771            decoder: &mut fidl::encoding::Decoder<'_, D>,
3772            offset: usize,
3773            _depth: fidl::encoding::Depth,
3774        ) -> fidl::Result<()> {
3775            decoder.debug_check_bounds::<Self>(offset);
3776            // Verify that padding bytes are zero.
3777            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3778            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3779            let mask = 0xffffffff00000000u64;
3780            let maskedval = padval & mask;
3781            if maskedval != 0 {
3782                return Err(fidl::Error::NonZeroPadding {
3783                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3784                });
3785            }
3786            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
3787            fidl::decode!(
3788                fidl::encoding::UnboundedVector<u8>,
3789                D,
3790                &mut self.value,
3791                decoder,
3792                offset + 8,
3793                _depth
3794            )?;
3795            Ok(())
3796        }
3797    }
3798
3799    impl fidl::encoding::ValueTypeMarker for SetNumber {
3800        type Borrowed<'a> = &'a Self;
3801        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3802            value
3803        }
3804    }
3805
3806    unsafe impl fidl::encoding::TypeMarker for SetNumber {
3807        type Owned = Self;
3808
3809        #[inline(always)]
3810        fn inline_align(_context: fidl::encoding::Context) -> usize {
3811            8
3812        }
3813
3814        #[inline(always)]
3815        fn inline_size(_context: fidl::encoding::Context) -> usize {
3816            24
3817        }
3818    }
3819
3820    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetNumber, D>
3821        for &SetNumber
3822    {
3823        #[inline]
3824        unsafe fn encode(
3825            self,
3826            encoder: &mut fidl::encoding::Encoder<'_, D>,
3827            offset: usize,
3828            _depth: fidl::encoding::Depth,
3829        ) -> fidl::Result<()> {
3830            encoder.debug_check_bounds::<SetNumber>(offset);
3831            // Delegate to tuple encoding.
3832            fidl::encoding::Encode::<SetNumber, D>::encode(
3833                (
3834                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3835                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
3836                ),
3837                encoder,
3838                offset,
3839                _depth,
3840            )
3841        }
3842    }
3843    unsafe impl<
3844            D: fidl::encoding::ResourceDialect,
3845            T0: fidl::encoding::Encode<u32, D>,
3846            T1: fidl::encoding::Encode<Value, D>,
3847        > fidl::encoding::Encode<SetNumber, D> for (T0, T1)
3848    {
3849        #[inline]
3850        unsafe fn encode(
3851            self,
3852            encoder: &mut fidl::encoding::Encoder<'_, D>,
3853            offset: usize,
3854            depth: fidl::encoding::Depth,
3855        ) -> fidl::Result<()> {
3856            encoder.debug_check_bounds::<SetNumber>(offset);
3857            // Zero out padding regions. There's no need to apply masks
3858            // because the unmasked parts will be overwritten by fields.
3859            unsafe {
3860                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3861                (ptr as *mut u64).write_unaligned(0);
3862            }
3863            // Write the fields.
3864            self.0.encode(encoder, offset + 0, depth)?;
3865            self.1.encode(encoder, offset + 8, depth)?;
3866            Ok(())
3867        }
3868    }
3869
3870    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetNumber {
3871        #[inline(always)]
3872        fn new_empty() -> Self {
3873            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Value, D) }
3874        }
3875
3876        #[inline]
3877        unsafe fn decode(
3878            &mut self,
3879            decoder: &mut fidl::encoding::Decoder<'_, D>,
3880            offset: usize,
3881            _depth: fidl::encoding::Depth,
3882        ) -> fidl::Result<()> {
3883            decoder.debug_check_bounds::<Self>(offset);
3884            // Verify that padding bytes are zero.
3885            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3886            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3887            let mask = 0xffffffff00000000u64;
3888            let maskedval = padval & mask;
3889            if maskedval != 0 {
3890                return Err(fidl::Error::NonZeroPadding {
3891                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3892                });
3893            }
3894            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
3895            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
3896            Ok(())
3897        }
3898    }
3899
3900    impl fidl::encoding::ValueTypeMarker for SetString {
3901        type Borrowed<'a> = &'a Self;
3902        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3903            value
3904        }
3905    }
3906
3907    unsafe impl fidl::encoding::TypeMarker for SetString {
3908        type Owned = Self;
3909
3910        #[inline(always)]
3911        fn inline_align(_context: fidl::encoding::Context) -> usize {
3912            8
3913        }
3914
3915        #[inline(always)]
3916        fn inline_size(_context: fidl::encoding::Context) -> usize {
3917            24
3918        }
3919    }
3920
3921    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetString, D>
3922        for &SetString
3923    {
3924        #[inline]
3925        unsafe fn encode(
3926            self,
3927            encoder: &mut fidl::encoding::Encoder<'_, D>,
3928            offset: usize,
3929            _depth: fidl::encoding::Depth,
3930        ) -> fidl::Result<()> {
3931            encoder.debug_check_bounds::<SetString>(offset);
3932            // Delegate to tuple encoding.
3933            fidl::encoding::Encode::<SetString, D>::encode(
3934                (
3935                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3936                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3937                        &self.value,
3938                    ),
3939                ),
3940                encoder,
3941                offset,
3942                _depth,
3943            )
3944        }
3945    }
3946    unsafe impl<
3947            D: fidl::encoding::ResourceDialect,
3948            T0: fidl::encoding::Encode<u32, D>,
3949            T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3950        > fidl::encoding::Encode<SetString, D> for (T0, T1)
3951    {
3952        #[inline]
3953        unsafe fn encode(
3954            self,
3955            encoder: &mut fidl::encoding::Encoder<'_, D>,
3956            offset: usize,
3957            depth: fidl::encoding::Depth,
3958        ) -> fidl::Result<()> {
3959            encoder.debug_check_bounds::<SetString>(offset);
3960            // Zero out padding regions. There's no need to apply masks
3961            // because the unmasked parts will be overwritten by fields.
3962            unsafe {
3963                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
3964                (ptr as *mut u64).write_unaligned(0);
3965            }
3966            // Write the fields.
3967            self.0.encode(encoder, offset + 0, depth)?;
3968            self.1.encode(encoder, offset + 8, depth)?;
3969            Ok(())
3970        }
3971    }
3972
3973    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetString {
3974        #[inline(always)]
3975        fn new_empty() -> Self {
3976            Self {
3977                id: fidl::new_empty!(u32, D),
3978                value: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3979            }
3980        }
3981
3982        #[inline]
3983        unsafe fn decode(
3984            &mut self,
3985            decoder: &mut fidl::encoding::Decoder<'_, D>,
3986            offset: usize,
3987            _depth: fidl::encoding::Depth,
3988        ) -> fidl::Result<()> {
3989            decoder.debug_check_bounds::<Self>(offset);
3990            // Verify that padding bytes are zero.
3991            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
3992            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3993            let mask = 0xffffffff00000000u64;
3994            let maskedval = padval & mask;
3995            if maskedval != 0 {
3996                return Err(fidl::Error::NonZeroPadding {
3997                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
3998                });
3999            }
4000            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
4001            fidl::decode!(
4002                fidl::encoding::UnboundedString,
4003                D,
4004                &mut self.value,
4005                decoder,
4006                offset + 8,
4007                _depth
4008            )?;
4009            Ok(())
4010        }
4011    }
4012
4013    impl fidl::encoding::ValueTypeMarker for SubtractNumber {
4014        type Borrowed<'a> = &'a Self;
4015        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4016            value
4017        }
4018    }
4019
4020    unsafe impl fidl::encoding::TypeMarker for SubtractNumber {
4021        type Owned = Self;
4022
4023        #[inline(always)]
4024        fn inline_align(_context: fidl::encoding::Context) -> usize {
4025            8
4026        }
4027
4028        #[inline(always)]
4029        fn inline_size(_context: fidl::encoding::Context) -> usize {
4030            24
4031        }
4032    }
4033
4034    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SubtractNumber, D>
4035        for &SubtractNumber
4036    {
4037        #[inline]
4038        unsafe fn encode(
4039            self,
4040            encoder: &mut fidl::encoding::Encoder<'_, D>,
4041            offset: usize,
4042            _depth: fidl::encoding::Depth,
4043        ) -> fidl::Result<()> {
4044            encoder.debug_check_bounds::<SubtractNumber>(offset);
4045            // Delegate to tuple encoding.
4046            fidl::encoding::Encode::<SubtractNumber, D>::encode(
4047                (
4048                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
4049                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
4050                ),
4051                encoder,
4052                offset,
4053                _depth,
4054            )
4055        }
4056    }
4057    unsafe impl<
4058            D: fidl::encoding::ResourceDialect,
4059            T0: fidl::encoding::Encode<u32, D>,
4060            T1: fidl::encoding::Encode<Value, D>,
4061        > fidl::encoding::Encode<SubtractNumber, D> for (T0, T1)
4062    {
4063        #[inline]
4064        unsafe fn encode(
4065            self,
4066            encoder: &mut fidl::encoding::Encoder<'_, D>,
4067            offset: usize,
4068            depth: fidl::encoding::Depth,
4069        ) -> fidl::Result<()> {
4070            encoder.debug_check_bounds::<SubtractNumber>(offset);
4071            // Zero out padding regions. There's no need to apply masks
4072            // because the unmasked parts will be overwritten by fields.
4073            unsafe {
4074                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
4075                (ptr as *mut u64).write_unaligned(0);
4076            }
4077            // Write the fields.
4078            self.0.encode(encoder, offset + 0, depth)?;
4079            self.1.encode(encoder, offset + 8, depth)?;
4080            Ok(())
4081        }
4082    }
4083
4084    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SubtractNumber {
4085        #[inline(always)]
4086        fn new_empty() -> Self {
4087            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Value, D) }
4088        }
4089
4090        #[inline]
4091        unsafe fn decode(
4092            &mut self,
4093            decoder: &mut fidl::encoding::Decoder<'_, D>,
4094            offset: usize,
4095            _depth: fidl::encoding::Depth,
4096        ) -> fidl::Result<()> {
4097            decoder.debug_check_bounds::<Self>(offset);
4098            // Verify that padding bytes are zero.
4099            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
4100            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4101            let mask = 0xffffffff00000000u64;
4102            let maskedval = padval & mask;
4103            if maskedval != 0 {
4104                return Err(fidl::Error::NonZeroPadding {
4105                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
4106                });
4107            }
4108            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
4109            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
4110            Ok(())
4111        }
4112    }
4113
4114    impl InitializationParams {
4115        #[inline(always)]
4116        fn max_ordinal_present(&self) -> u64 {
4117            if let Some(_) = self.vmo_size {
4118                return 1;
4119            }
4120            0
4121        }
4122    }
4123
4124    impl fidl::encoding::ValueTypeMarker for InitializationParams {
4125        type Borrowed<'a> = &'a Self;
4126        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4127            value
4128        }
4129    }
4130
4131    unsafe impl fidl::encoding::TypeMarker for InitializationParams {
4132        type Owned = Self;
4133
4134        #[inline(always)]
4135        fn inline_align(_context: fidl::encoding::Context) -> usize {
4136            8
4137        }
4138
4139        #[inline(always)]
4140        fn inline_size(_context: fidl::encoding::Context) -> usize {
4141            16
4142        }
4143    }
4144
4145    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InitializationParams, D>
4146        for &InitializationParams
4147    {
4148        unsafe fn encode(
4149            self,
4150            encoder: &mut fidl::encoding::Encoder<'_, D>,
4151            offset: usize,
4152            mut depth: fidl::encoding::Depth,
4153        ) -> fidl::Result<()> {
4154            encoder.debug_check_bounds::<InitializationParams>(offset);
4155            // Vector header
4156            let max_ordinal: u64 = self.max_ordinal_present();
4157            encoder.write_num(max_ordinal, offset);
4158            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4159            // Calling encoder.out_of_line_offset(0) is not allowed.
4160            if max_ordinal == 0 {
4161                return Ok(());
4162            }
4163            depth.increment()?;
4164            let envelope_size = 8;
4165            let bytes_len = max_ordinal as usize * envelope_size;
4166            #[allow(unused_variables)]
4167            let offset = encoder.out_of_line_offset(bytes_len);
4168            let mut _prev_end_offset: usize = 0;
4169            if 1 > max_ordinal {
4170                return Ok(());
4171            }
4172
4173            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4174            // are envelope_size bytes.
4175            let cur_offset: usize = (1 - 1) * envelope_size;
4176
4177            // Zero reserved fields.
4178            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4179
4180            // Safety:
4181            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4182            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4183            //   envelope_size bytes, there is always sufficient room.
4184            fidl::encoding::encode_in_envelope_optional::<u64, D>(
4185                self.vmo_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
4186                encoder,
4187                offset + cur_offset,
4188                depth,
4189            )?;
4190
4191            _prev_end_offset = cur_offset + envelope_size;
4192
4193            Ok(())
4194        }
4195    }
4196
4197    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InitializationParams {
4198        #[inline(always)]
4199        fn new_empty() -> Self {
4200            Self::default()
4201        }
4202
4203        unsafe fn decode(
4204            &mut self,
4205            decoder: &mut fidl::encoding::Decoder<'_, D>,
4206            offset: usize,
4207            mut depth: fidl::encoding::Depth,
4208        ) -> fidl::Result<()> {
4209            decoder.debug_check_bounds::<Self>(offset);
4210            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4211                None => return Err(fidl::Error::NotNullable),
4212                Some(len) => len,
4213            };
4214            // Calling decoder.out_of_line_offset(0) is not allowed.
4215            if len == 0 {
4216                return Ok(());
4217            };
4218            depth.increment()?;
4219            let envelope_size = 8;
4220            let bytes_len = len * envelope_size;
4221            let offset = decoder.out_of_line_offset(bytes_len)?;
4222            // Decode the envelope for each type.
4223            let mut _next_ordinal_to_read = 0;
4224            let mut next_offset = offset;
4225            let end_offset = offset + bytes_len;
4226            _next_ordinal_to_read += 1;
4227            if next_offset >= end_offset {
4228                return Ok(());
4229            }
4230
4231            // Decode unknown envelopes for gaps in ordinals.
4232            while _next_ordinal_to_read < 1 {
4233                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4234                _next_ordinal_to_read += 1;
4235                next_offset += envelope_size;
4236            }
4237
4238            let next_out_of_line = decoder.next_out_of_line();
4239            let handles_before = decoder.remaining_handles();
4240            if let Some((inlined, num_bytes, num_handles)) =
4241                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4242            {
4243                let member_inline_size =
4244                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4245                if inlined != (member_inline_size <= 4) {
4246                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4247                }
4248                let inner_offset;
4249                let mut inner_depth = depth.clone();
4250                if inlined {
4251                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4252                    inner_offset = next_offset;
4253                } else {
4254                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4255                    inner_depth.increment()?;
4256                }
4257                let val_ref = self.vmo_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
4258                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
4259                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4260                {
4261                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4262                }
4263                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4264                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4265                }
4266            }
4267
4268            next_offset += envelope_size;
4269
4270            // Decode the remaining unknown envelopes.
4271            while next_offset < end_offset {
4272                _next_ordinal_to_read += 1;
4273                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4274                next_offset += envelope_size;
4275            }
4276
4277            Ok(())
4278        }
4279    }
4280
4281    impl fidl::encoding::ValueTypeMarker for Action {
4282        type Borrowed<'a> = &'a Self;
4283        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4284            value
4285        }
4286    }
4287
4288    unsafe impl fidl::encoding::TypeMarker for Action {
4289        type Owned = Self;
4290
4291        #[inline(always)]
4292        fn inline_align(_context: fidl::encoding::Context) -> usize {
4293            8
4294        }
4295
4296        #[inline(always)]
4297        fn inline_size(_context: fidl::encoding::Context) -> usize {
4298            16
4299        }
4300    }
4301
4302    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Action, D> for &Action {
4303        #[inline]
4304        unsafe fn encode(
4305            self,
4306            encoder: &mut fidl::encoding::Encoder<'_, D>,
4307            offset: usize,
4308            _depth: fidl::encoding::Depth,
4309        ) -> fidl::Result<()> {
4310            encoder.debug_check_bounds::<Action>(offset);
4311            encoder.write_num::<u64>(self.ordinal(), offset);
4312            match self {
4313                Action::CreateNode(ref val) => fidl::encoding::encode_in_envelope::<CreateNode, D>(
4314                    <CreateNode as fidl::encoding::ValueTypeMarker>::borrow(val),
4315                    encoder,
4316                    offset + 8,
4317                    _depth,
4318                ),
4319                Action::DeleteNode(ref val) => fidl::encoding::encode_in_envelope::<DeleteNode, D>(
4320                    <DeleteNode as fidl::encoding::ValueTypeMarker>::borrow(val),
4321                    encoder,
4322                    offset + 8,
4323                    _depth,
4324                ),
4325                Action::CreateNumericProperty(ref val) => {
4326                    fidl::encoding::encode_in_envelope::<CreateNumericProperty, D>(
4327                        <CreateNumericProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
4328                        encoder,
4329                        offset + 8,
4330                        _depth,
4331                    )
4332                }
4333                Action::CreateBytesProperty(ref val) => {
4334                    fidl::encoding::encode_in_envelope::<CreateBytesProperty, D>(
4335                        <CreateBytesProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
4336                        encoder,
4337                        offset + 8,
4338                        _depth,
4339                    )
4340                }
4341                Action::CreateStringProperty(ref val) => {
4342                    fidl::encoding::encode_in_envelope::<CreateStringProperty, D>(
4343                        <CreateStringProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
4344                        encoder,
4345                        offset + 8,
4346                        _depth,
4347                    )
4348                }
4349                Action::DeleteProperty(ref val) => {
4350                    fidl::encoding::encode_in_envelope::<DeleteProperty, D>(
4351                        <DeleteProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
4352                        encoder,
4353                        offset + 8,
4354                        _depth,
4355                    )
4356                }
4357                Action::SetNumber(ref val) => fidl::encoding::encode_in_envelope::<SetNumber, D>(
4358                    <SetNumber as fidl::encoding::ValueTypeMarker>::borrow(val),
4359                    encoder,
4360                    offset + 8,
4361                    _depth,
4362                ),
4363                Action::SetString(ref val) => fidl::encoding::encode_in_envelope::<SetString, D>(
4364                    <SetString as fidl::encoding::ValueTypeMarker>::borrow(val),
4365                    encoder,
4366                    offset + 8,
4367                    _depth,
4368                ),
4369                Action::SetBytes(ref val) => fidl::encoding::encode_in_envelope::<SetBytes, D>(
4370                    <SetBytes as fidl::encoding::ValueTypeMarker>::borrow(val),
4371                    encoder,
4372                    offset + 8,
4373                    _depth,
4374                ),
4375                Action::AddNumber(ref val) => fidl::encoding::encode_in_envelope::<AddNumber, D>(
4376                    <AddNumber as fidl::encoding::ValueTypeMarker>::borrow(val),
4377                    encoder,
4378                    offset + 8,
4379                    _depth,
4380                ),
4381                Action::SubtractNumber(ref val) => {
4382                    fidl::encoding::encode_in_envelope::<SubtractNumber, D>(
4383                        <SubtractNumber as fidl::encoding::ValueTypeMarker>::borrow(val),
4384                        encoder,
4385                        offset + 8,
4386                        _depth,
4387                    )
4388                }
4389                Action::CreateArrayProperty(ref val) => {
4390                    fidl::encoding::encode_in_envelope::<CreateArrayProperty, D>(
4391                        <CreateArrayProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
4392                        encoder,
4393                        offset + 8,
4394                        _depth,
4395                    )
4396                }
4397                Action::ArraySet(ref val) => fidl::encoding::encode_in_envelope::<ArraySet, D>(
4398                    <ArraySet as fidl::encoding::ValueTypeMarker>::borrow(val),
4399                    encoder,
4400                    offset + 8,
4401                    _depth,
4402                ),
4403                Action::ArrayAdd(ref val) => fidl::encoding::encode_in_envelope::<ArrayAdd, D>(
4404                    <ArrayAdd as fidl::encoding::ValueTypeMarker>::borrow(val),
4405                    encoder,
4406                    offset + 8,
4407                    _depth,
4408                ),
4409                Action::ArraySubtract(ref val) => {
4410                    fidl::encoding::encode_in_envelope::<ArraySubtract, D>(
4411                        <ArraySubtract as fidl::encoding::ValueTypeMarker>::borrow(val),
4412                        encoder,
4413                        offset + 8,
4414                        _depth,
4415                    )
4416                }
4417                Action::CreateLinearHistogram(ref val) => {
4418                    fidl::encoding::encode_in_envelope::<CreateLinearHistogram, D>(
4419                        <CreateLinearHistogram as fidl::encoding::ValueTypeMarker>::borrow(val),
4420                        encoder,
4421                        offset + 8,
4422                        _depth,
4423                    )
4424                }
4425                Action::CreateExponentialHistogram(ref val) => {
4426                    fidl::encoding::encode_in_envelope::<CreateExponentialHistogram, D>(
4427                        <CreateExponentialHistogram as fidl::encoding::ValueTypeMarker>::borrow(
4428                            val,
4429                        ),
4430                        encoder,
4431                        offset + 8,
4432                        _depth,
4433                    )
4434                }
4435                Action::Insert(ref val) => fidl::encoding::encode_in_envelope::<Insert, D>(
4436                    <Insert as fidl::encoding::ValueTypeMarker>::borrow(val),
4437                    encoder,
4438                    offset + 8,
4439                    _depth,
4440                ),
4441                Action::InsertMultiple(ref val) => {
4442                    fidl::encoding::encode_in_envelope::<InsertMultiple, D>(
4443                        <InsertMultiple as fidl::encoding::ValueTypeMarker>::borrow(val),
4444                        encoder,
4445                        offset + 8,
4446                        _depth,
4447                    )
4448                }
4449                Action::CreateBoolProperty(ref val) => {
4450                    fidl::encoding::encode_in_envelope::<CreateBoolProperty, D>(
4451                        <CreateBoolProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
4452                        encoder,
4453                        offset + 8,
4454                        _depth,
4455                    )
4456                }
4457                Action::SetBool(ref val) => fidl::encoding::encode_in_envelope::<SetBool, D>(
4458                    <SetBool as fidl::encoding::ValueTypeMarker>::borrow(val),
4459                    encoder,
4460                    offset + 8,
4461                    _depth,
4462                ),
4463                Action::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
4464            }
4465        }
4466    }
4467
4468    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Action {
4469        #[inline(always)]
4470        fn new_empty() -> Self {
4471            Self::__SourceBreaking { unknown_ordinal: 0 }
4472        }
4473
4474        #[inline]
4475        unsafe fn decode(
4476            &mut self,
4477            decoder: &mut fidl::encoding::Decoder<'_, D>,
4478            offset: usize,
4479            mut depth: fidl::encoding::Depth,
4480        ) -> fidl::Result<()> {
4481            decoder.debug_check_bounds::<Self>(offset);
4482            #[allow(unused_variables)]
4483            let next_out_of_line = decoder.next_out_of_line();
4484            let handles_before = decoder.remaining_handles();
4485            let (ordinal, inlined, num_bytes, num_handles) =
4486                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4487
4488            let member_inline_size = match ordinal {
4489                1 => <CreateNode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4490                2 => <DeleteNode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4491                3 => <CreateNumericProperty as fidl::encoding::TypeMarker>::inline_size(
4492                    decoder.context,
4493                ),
4494                4 => <CreateBytesProperty as fidl::encoding::TypeMarker>::inline_size(
4495                    decoder.context,
4496                ),
4497                5 => <CreateStringProperty as fidl::encoding::TypeMarker>::inline_size(
4498                    decoder.context,
4499                ),
4500                6 => <DeleteProperty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4501                7 => <SetNumber as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4502                8 => <SetString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4503                9 => <SetBytes as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4504                10 => <AddNumber as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4505                11 => <SubtractNumber as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4506                12 => <CreateArrayProperty as fidl::encoding::TypeMarker>::inline_size(
4507                    decoder.context,
4508                ),
4509                13 => <ArraySet as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4510                14 => <ArrayAdd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4511                15 => <ArraySubtract as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4512                16 => <CreateLinearHistogram as fidl::encoding::TypeMarker>::inline_size(
4513                    decoder.context,
4514                ),
4515                17 => <CreateExponentialHistogram as fidl::encoding::TypeMarker>::inline_size(
4516                    decoder.context,
4517                ),
4518                18 => <Insert as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4519                19 => <InsertMultiple as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4520                20 => {
4521                    <CreateBoolProperty as fidl::encoding::TypeMarker>::inline_size(decoder.context)
4522                }
4523                21 => <SetBool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4524                0 => return Err(fidl::Error::UnknownUnionTag),
4525                _ => num_bytes as usize,
4526            };
4527
4528            if inlined != (member_inline_size <= 4) {
4529                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4530            }
4531            let _inner_offset;
4532            if inlined {
4533                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4534                _inner_offset = offset + 8;
4535            } else {
4536                depth.increment()?;
4537                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4538            }
4539            match ordinal {
4540                1 => {
4541                    #[allow(irrefutable_let_patterns)]
4542                    if let Action::CreateNode(_) = self {
4543                        // Do nothing, read the value into the object
4544                    } else {
4545                        // Initialize `self` to the right variant
4546                        *self = Action::CreateNode(fidl::new_empty!(CreateNode, D));
4547                    }
4548                    #[allow(irrefutable_let_patterns)]
4549                    if let Action::CreateNode(ref mut val) = self {
4550                        fidl::decode!(CreateNode, D, val, decoder, _inner_offset, depth)?;
4551                    } else {
4552                        unreachable!()
4553                    }
4554                }
4555                2 => {
4556                    #[allow(irrefutable_let_patterns)]
4557                    if let Action::DeleteNode(_) = self {
4558                        // Do nothing, read the value into the object
4559                    } else {
4560                        // Initialize `self` to the right variant
4561                        *self = Action::DeleteNode(fidl::new_empty!(DeleteNode, D));
4562                    }
4563                    #[allow(irrefutable_let_patterns)]
4564                    if let Action::DeleteNode(ref mut val) = self {
4565                        fidl::decode!(DeleteNode, D, val, decoder, _inner_offset, depth)?;
4566                    } else {
4567                        unreachable!()
4568                    }
4569                }
4570                3 => {
4571                    #[allow(irrefutable_let_patterns)]
4572                    if let Action::CreateNumericProperty(_) = self {
4573                        // Do nothing, read the value into the object
4574                    } else {
4575                        // Initialize `self` to the right variant
4576                        *self = Action::CreateNumericProperty(fidl::new_empty!(
4577                            CreateNumericProperty,
4578                            D
4579                        ));
4580                    }
4581                    #[allow(irrefutable_let_patterns)]
4582                    if let Action::CreateNumericProperty(ref mut val) = self {
4583                        fidl::decode!(
4584                            CreateNumericProperty,
4585                            D,
4586                            val,
4587                            decoder,
4588                            _inner_offset,
4589                            depth
4590                        )?;
4591                    } else {
4592                        unreachable!()
4593                    }
4594                }
4595                4 => {
4596                    #[allow(irrefutable_let_patterns)]
4597                    if let Action::CreateBytesProperty(_) = self {
4598                        // Do nothing, read the value into the object
4599                    } else {
4600                        // Initialize `self` to the right variant
4601                        *self =
4602                            Action::CreateBytesProperty(fidl::new_empty!(CreateBytesProperty, D));
4603                    }
4604                    #[allow(irrefutable_let_patterns)]
4605                    if let Action::CreateBytesProperty(ref mut val) = self {
4606                        fidl::decode!(CreateBytesProperty, D, val, decoder, _inner_offset, depth)?;
4607                    } else {
4608                        unreachable!()
4609                    }
4610                }
4611                5 => {
4612                    #[allow(irrefutable_let_patterns)]
4613                    if let Action::CreateStringProperty(_) = self {
4614                        // Do nothing, read the value into the object
4615                    } else {
4616                        // Initialize `self` to the right variant
4617                        *self =
4618                            Action::CreateStringProperty(fidl::new_empty!(CreateStringProperty, D));
4619                    }
4620                    #[allow(irrefutable_let_patterns)]
4621                    if let Action::CreateStringProperty(ref mut val) = self {
4622                        fidl::decode!(CreateStringProperty, D, val, decoder, _inner_offset, depth)?;
4623                    } else {
4624                        unreachable!()
4625                    }
4626                }
4627                6 => {
4628                    #[allow(irrefutable_let_patterns)]
4629                    if let Action::DeleteProperty(_) = self {
4630                        // Do nothing, read the value into the object
4631                    } else {
4632                        // Initialize `self` to the right variant
4633                        *self = Action::DeleteProperty(fidl::new_empty!(DeleteProperty, D));
4634                    }
4635                    #[allow(irrefutable_let_patterns)]
4636                    if let Action::DeleteProperty(ref mut val) = self {
4637                        fidl::decode!(DeleteProperty, D, val, decoder, _inner_offset, depth)?;
4638                    } else {
4639                        unreachable!()
4640                    }
4641                }
4642                7 => {
4643                    #[allow(irrefutable_let_patterns)]
4644                    if let Action::SetNumber(_) = self {
4645                        // Do nothing, read the value into the object
4646                    } else {
4647                        // Initialize `self` to the right variant
4648                        *self = Action::SetNumber(fidl::new_empty!(SetNumber, D));
4649                    }
4650                    #[allow(irrefutable_let_patterns)]
4651                    if let Action::SetNumber(ref mut val) = self {
4652                        fidl::decode!(SetNumber, D, val, decoder, _inner_offset, depth)?;
4653                    } else {
4654                        unreachable!()
4655                    }
4656                }
4657                8 => {
4658                    #[allow(irrefutable_let_patterns)]
4659                    if let Action::SetString(_) = self {
4660                        // Do nothing, read the value into the object
4661                    } else {
4662                        // Initialize `self` to the right variant
4663                        *self = Action::SetString(fidl::new_empty!(SetString, D));
4664                    }
4665                    #[allow(irrefutable_let_patterns)]
4666                    if let Action::SetString(ref mut val) = self {
4667                        fidl::decode!(SetString, D, val, decoder, _inner_offset, depth)?;
4668                    } else {
4669                        unreachable!()
4670                    }
4671                }
4672                9 => {
4673                    #[allow(irrefutable_let_patterns)]
4674                    if let Action::SetBytes(_) = self {
4675                        // Do nothing, read the value into the object
4676                    } else {
4677                        // Initialize `self` to the right variant
4678                        *self = Action::SetBytes(fidl::new_empty!(SetBytes, D));
4679                    }
4680                    #[allow(irrefutable_let_patterns)]
4681                    if let Action::SetBytes(ref mut val) = self {
4682                        fidl::decode!(SetBytes, D, val, decoder, _inner_offset, depth)?;
4683                    } else {
4684                        unreachable!()
4685                    }
4686                }
4687                10 => {
4688                    #[allow(irrefutable_let_patterns)]
4689                    if let Action::AddNumber(_) = self {
4690                        // Do nothing, read the value into the object
4691                    } else {
4692                        // Initialize `self` to the right variant
4693                        *self = Action::AddNumber(fidl::new_empty!(AddNumber, D));
4694                    }
4695                    #[allow(irrefutable_let_patterns)]
4696                    if let Action::AddNumber(ref mut val) = self {
4697                        fidl::decode!(AddNumber, D, val, decoder, _inner_offset, depth)?;
4698                    } else {
4699                        unreachable!()
4700                    }
4701                }
4702                11 => {
4703                    #[allow(irrefutable_let_patterns)]
4704                    if let Action::SubtractNumber(_) = self {
4705                        // Do nothing, read the value into the object
4706                    } else {
4707                        // Initialize `self` to the right variant
4708                        *self = Action::SubtractNumber(fidl::new_empty!(SubtractNumber, D));
4709                    }
4710                    #[allow(irrefutable_let_patterns)]
4711                    if let Action::SubtractNumber(ref mut val) = self {
4712                        fidl::decode!(SubtractNumber, D, val, decoder, _inner_offset, depth)?;
4713                    } else {
4714                        unreachable!()
4715                    }
4716                }
4717                12 => {
4718                    #[allow(irrefutable_let_patterns)]
4719                    if let Action::CreateArrayProperty(_) = self {
4720                        // Do nothing, read the value into the object
4721                    } else {
4722                        // Initialize `self` to the right variant
4723                        *self =
4724                            Action::CreateArrayProperty(fidl::new_empty!(CreateArrayProperty, D));
4725                    }
4726                    #[allow(irrefutable_let_patterns)]
4727                    if let Action::CreateArrayProperty(ref mut val) = self {
4728                        fidl::decode!(CreateArrayProperty, D, val, decoder, _inner_offset, depth)?;
4729                    } else {
4730                        unreachable!()
4731                    }
4732                }
4733                13 => {
4734                    #[allow(irrefutable_let_patterns)]
4735                    if let Action::ArraySet(_) = self {
4736                        // Do nothing, read the value into the object
4737                    } else {
4738                        // Initialize `self` to the right variant
4739                        *self = Action::ArraySet(fidl::new_empty!(ArraySet, D));
4740                    }
4741                    #[allow(irrefutable_let_patterns)]
4742                    if let Action::ArraySet(ref mut val) = self {
4743                        fidl::decode!(ArraySet, D, val, decoder, _inner_offset, depth)?;
4744                    } else {
4745                        unreachable!()
4746                    }
4747                }
4748                14 => {
4749                    #[allow(irrefutable_let_patterns)]
4750                    if let Action::ArrayAdd(_) = self {
4751                        // Do nothing, read the value into the object
4752                    } else {
4753                        // Initialize `self` to the right variant
4754                        *self = Action::ArrayAdd(fidl::new_empty!(ArrayAdd, D));
4755                    }
4756                    #[allow(irrefutable_let_patterns)]
4757                    if let Action::ArrayAdd(ref mut val) = self {
4758                        fidl::decode!(ArrayAdd, D, val, decoder, _inner_offset, depth)?;
4759                    } else {
4760                        unreachable!()
4761                    }
4762                }
4763                15 => {
4764                    #[allow(irrefutable_let_patterns)]
4765                    if let Action::ArraySubtract(_) = self {
4766                        // Do nothing, read the value into the object
4767                    } else {
4768                        // Initialize `self` to the right variant
4769                        *self = Action::ArraySubtract(fidl::new_empty!(ArraySubtract, D));
4770                    }
4771                    #[allow(irrefutable_let_patterns)]
4772                    if let Action::ArraySubtract(ref mut val) = self {
4773                        fidl::decode!(ArraySubtract, D, val, decoder, _inner_offset, depth)?;
4774                    } else {
4775                        unreachable!()
4776                    }
4777                }
4778                16 => {
4779                    #[allow(irrefutable_let_patterns)]
4780                    if let Action::CreateLinearHistogram(_) = self {
4781                        // Do nothing, read the value into the object
4782                    } else {
4783                        // Initialize `self` to the right variant
4784                        *self = Action::CreateLinearHistogram(fidl::new_empty!(
4785                            CreateLinearHistogram,
4786                            D
4787                        ));
4788                    }
4789                    #[allow(irrefutable_let_patterns)]
4790                    if let Action::CreateLinearHistogram(ref mut val) = self {
4791                        fidl::decode!(
4792                            CreateLinearHistogram,
4793                            D,
4794                            val,
4795                            decoder,
4796                            _inner_offset,
4797                            depth
4798                        )?;
4799                    } else {
4800                        unreachable!()
4801                    }
4802                }
4803                17 => {
4804                    #[allow(irrefutable_let_patterns)]
4805                    if let Action::CreateExponentialHistogram(_) = self {
4806                        // Do nothing, read the value into the object
4807                    } else {
4808                        // Initialize `self` to the right variant
4809                        *self = Action::CreateExponentialHistogram(fidl::new_empty!(
4810                            CreateExponentialHistogram,
4811                            D
4812                        ));
4813                    }
4814                    #[allow(irrefutable_let_patterns)]
4815                    if let Action::CreateExponentialHistogram(ref mut val) = self {
4816                        fidl::decode!(
4817                            CreateExponentialHistogram,
4818                            D,
4819                            val,
4820                            decoder,
4821                            _inner_offset,
4822                            depth
4823                        )?;
4824                    } else {
4825                        unreachable!()
4826                    }
4827                }
4828                18 => {
4829                    #[allow(irrefutable_let_patterns)]
4830                    if let Action::Insert(_) = self {
4831                        // Do nothing, read the value into the object
4832                    } else {
4833                        // Initialize `self` to the right variant
4834                        *self = Action::Insert(fidl::new_empty!(Insert, D));
4835                    }
4836                    #[allow(irrefutable_let_patterns)]
4837                    if let Action::Insert(ref mut val) = self {
4838                        fidl::decode!(Insert, D, val, decoder, _inner_offset, depth)?;
4839                    } else {
4840                        unreachable!()
4841                    }
4842                }
4843                19 => {
4844                    #[allow(irrefutable_let_patterns)]
4845                    if let Action::InsertMultiple(_) = self {
4846                        // Do nothing, read the value into the object
4847                    } else {
4848                        // Initialize `self` to the right variant
4849                        *self = Action::InsertMultiple(fidl::new_empty!(InsertMultiple, D));
4850                    }
4851                    #[allow(irrefutable_let_patterns)]
4852                    if let Action::InsertMultiple(ref mut val) = self {
4853                        fidl::decode!(InsertMultiple, D, val, decoder, _inner_offset, depth)?;
4854                    } else {
4855                        unreachable!()
4856                    }
4857                }
4858                20 => {
4859                    #[allow(irrefutable_let_patterns)]
4860                    if let Action::CreateBoolProperty(_) = self {
4861                        // Do nothing, read the value into the object
4862                    } else {
4863                        // Initialize `self` to the right variant
4864                        *self = Action::CreateBoolProperty(fidl::new_empty!(CreateBoolProperty, D));
4865                    }
4866                    #[allow(irrefutable_let_patterns)]
4867                    if let Action::CreateBoolProperty(ref mut val) = self {
4868                        fidl::decode!(CreateBoolProperty, D, val, decoder, _inner_offset, depth)?;
4869                    } else {
4870                        unreachable!()
4871                    }
4872                }
4873                21 => {
4874                    #[allow(irrefutable_let_patterns)]
4875                    if let Action::SetBool(_) = self {
4876                        // Do nothing, read the value into the object
4877                    } else {
4878                        // Initialize `self` to the right variant
4879                        *self = Action::SetBool(fidl::new_empty!(SetBool, D));
4880                    }
4881                    #[allow(irrefutable_let_patterns)]
4882                    if let Action::SetBool(ref mut val) = self {
4883                        fidl::decode!(SetBool, D, val, decoder, _inner_offset, depth)?;
4884                    } else {
4885                        unreachable!()
4886                    }
4887                }
4888                #[allow(deprecated)]
4889                ordinal => {
4890                    for _ in 0..num_handles {
4891                        decoder.drop_next_handle()?;
4892                    }
4893                    *self = Action::__SourceBreaking { unknown_ordinal: ordinal };
4894                }
4895            }
4896            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4897                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4898            }
4899            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4900                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4901            }
4902            Ok(())
4903        }
4904    }
4905
4906    impl fidl::encoding::ValueTypeMarker for LazyAction {
4907        type Borrowed<'a> = &'a Self;
4908        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4909            value
4910        }
4911    }
4912
4913    unsafe impl fidl::encoding::TypeMarker for LazyAction {
4914        type Owned = Self;
4915
4916        #[inline(always)]
4917        fn inline_align(_context: fidl::encoding::Context) -> usize {
4918            8
4919        }
4920
4921        #[inline(always)]
4922        fn inline_size(_context: fidl::encoding::Context) -> usize {
4923            16
4924        }
4925    }
4926
4927    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LazyAction, D>
4928        for &LazyAction
4929    {
4930        #[inline]
4931        unsafe fn encode(
4932            self,
4933            encoder: &mut fidl::encoding::Encoder<'_, D>,
4934            offset: usize,
4935            _depth: fidl::encoding::Depth,
4936        ) -> fidl::Result<()> {
4937            encoder.debug_check_bounds::<LazyAction>(offset);
4938            encoder.write_num::<u64>(self.ordinal(), offset);
4939            match self {
4940                LazyAction::CreateLazyNode(ref val) => {
4941                    fidl::encoding::encode_in_envelope::<CreateLazyNode, D>(
4942                        <CreateLazyNode as fidl::encoding::ValueTypeMarker>::borrow(val),
4943                        encoder,
4944                        offset + 8,
4945                        _depth,
4946                    )
4947                }
4948                LazyAction::DeleteLazyNode(ref val) => {
4949                    fidl::encoding::encode_in_envelope::<DeleteLazyNode, D>(
4950                        <DeleteLazyNode as fidl::encoding::ValueTypeMarker>::borrow(val),
4951                        encoder,
4952                        offset + 8,
4953                        _depth,
4954                    )
4955                }
4956                LazyAction::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
4957            }
4958        }
4959    }
4960
4961    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LazyAction {
4962        #[inline(always)]
4963        fn new_empty() -> Self {
4964            Self::__SourceBreaking { unknown_ordinal: 0 }
4965        }
4966
4967        #[inline]
4968        unsafe fn decode(
4969            &mut self,
4970            decoder: &mut fidl::encoding::Decoder<'_, D>,
4971            offset: usize,
4972            mut depth: fidl::encoding::Depth,
4973        ) -> fidl::Result<()> {
4974            decoder.debug_check_bounds::<Self>(offset);
4975            #[allow(unused_variables)]
4976            let next_out_of_line = decoder.next_out_of_line();
4977            let handles_before = decoder.remaining_handles();
4978            let (ordinal, inlined, num_bytes, num_handles) =
4979                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4980
4981            let member_inline_size = match ordinal {
4982                1 => <CreateLazyNode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4983                2 => <DeleteLazyNode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4984                0 => return Err(fidl::Error::UnknownUnionTag),
4985                _ => num_bytes as usize,
4986            };
4987
4988            if inlined != (member_inline_size <= 4) {
4989                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4990            }
4991            let _inner_offset;
4992            if inlined {
4993                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4994                _inner_offset = offset + 8;
4995            } else {
4996                depth.increment()?;
4997                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4998            }
4999            match ordinal {
5000                1 => {
5001                    #[allow(irrefutable_let_patterns)]
5002                    if let LazyAction::CreateLazyNode(_) = self {
5003                        // Do nothing, read the value into the object
5004                    } else {
5005                        // Initialize `self` to the right variant
5006                        *self = LazyAction::CreateLazyNode(fidl::new_empty!(CreateLazyNode, D));
5007                    }
5008                    #[allow(irrefutable_let_patterns)]
5009                    if let LazyAction::CreateLazyNode(ref mut val) = self {
5010                        fidl::decode!(CreateLazyNode, D, val, decoder, _inner_offset, depth)?;
5011                    } else {
5012                        unreachable!()
5013                    }
5014                }
5015                2 => {
5016                    #[allow(irrefutable_let_patterns)]
5017                    if let LazyAction::DeleteLazyNode(_) = self {
5018                        // Do nothing, read the value into the object
5019                    } else {
5020                        // Initialize `self` to the right variant
5021                        *self = LazyAction::DeleteLazyNode(fidl::new_empty!(DeleteLazyNode, D));
5022                    }
5023                    #[allow(irrefutable_let_patterns)]
5024                    if let LazyAction::DeleteLazyNode(ref mut val) = self {
5025                        fidl::decode!(DeleteLazyNode, D, val, decoder, _inner_offset, depth)?;
5026                    } else {
5027                        unreachable!()
5028                    }
5029                }
5030                #[allow(deprecated)]
5031                ordinal => {
5032                    for _ in 0..num_handles {
5033                        decoder.drop_next_handle()?;
5034                    }
5035                    *self = LazyAction::__SourceBreaking { unknown_ordinal: ordinal };
5036                }
5037            }
5038            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5039                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5040            }
5041            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5042                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5043            }
5044            Ok(())
5045        }
5046    }
5047
5048    impl fidl::encoding::ValueTypeMarker for Value {
5049        type Borrowed<'a> = &'a Self;
5050        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5051            value
5052        }
5053    }
5054
5055    unsafe impl fidl::encoding::TypeMarker for Value {
5056        type Owned = Self;
5057
5058        #[inline(always)]
5059        fn inline_align(_context: fidl::encoding::Context) -> usize {
5060            8
5061        }
5062
5063        #[inline(always)]
5064        fn inline_size(_context: fidl::encoding::Context) -> usize {
5065            16
5066        }
5067    }
5068
5069    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Value, D> for &Value {
5070        #[inline]
5071        unsafe fn encode(
5072            self,
5073            encoder: &mut fidl::encoding::Encoder<'_, D>,
5074            offset: usize,
5075            _depth: fidl::encoding::Depth,
5076        ) -> fidl::Result<()> {
5077            encoder.debug_check_bounds::<Value>(offset);
5078            encoder.write_num::<u64>(self.ordinal(), offset);
5079            match self {
5080                Value::IntT(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
5081                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
5082                    encoder,
5083                    offset + 8,
5084                    _depth,
5085                ),
5086                Value::UintT(ref val) => fidl::encoding::encode_in_envelope::<u64, D>(
5087                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
5088                    encoder,
5089                    offset + 8,
5090                    _depth,
5091                ),
5092                Value::DoubleT(ref val) => fidl::encoding::encode_in_envelope::<f64, D>(
5093                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(val),
5094                    encoder,
5095                    offset + 8,
5096                    _depth,
5097                ),
5098                Value::StringT(ref val) => fidl::encoding::encode_in_envelope::<
5099                    fidl::encoding::UnboundedString,
5100                    D,
5101                >(
5102                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
5103                        val,
5104                    ),
5105                    encoder,
5106                    offset + 8,
5107                    _depth,
5108                ),
5109                Value::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
5110            }
5111        }
5112    }
5113
5114    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Value {
5115        #[inline(always)]
5116        fn new_empty() -> Self {
5117            Self::__SourceBreaking { unknown_ordinal: 0 }
5118        }
5119
5120        #[inline]
5121        unsafe fn decode(
5122            &mut self,
5123            decoder: &mut fidl::encoding::Decoder<'_, D>,
5124            offset: usize,
5125            mut depth: fidl::encoding::Depth,
5126        ) -> fidl::Result<()> {
5127            decoder.debug_check_bounds::<Self>(offset);
5128            #[allow(unused_variables)]
5129            let next_out_of_line = decoder.next_out_of_line();
5130            let handles_before = decoder.remaining_handles();
5131            let (ordinal, inlined, num_bytes, num_handles) =
5132                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5133
5134            let member_inline_size = match ordinal {
5135                1 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5136                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5137                3 => <f64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
5138                4 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
5139                    decoder.context,
5140                ),
5141                0 => return Err(fidl::Error::UnknownUnionTag),
5142                _ => num_bytes as usize,
5143            };
5144
5145            if inlined != (member_inline_size <= 4) {
5146                return Err(fidl::Error::InvalidInlineBitInEnvelope);
5147            }
5148            let _inner_offset;
5149            if inlined {
5150                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5151                _inner_offset = offset + 8;
5152            } else {
5153                depth.increment()?;
5154                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5155            }
5156            match ordinal {
5157                1 => {
5158                    #[allow(irrefutable_let_patterns)]
5159                    if let Value::IntT(_) = self {
5160                        // Do nothing, read the value into the object
5161                    } else {
5162                        // Initialize `self` to the right variant
5163                        *self = Value::IntT(fidl::new_empty!(i64, D));
5164                    }
5165                    #[allow(irrefutable_let_patterns)]
5166                    if let Value::IntT(ref mut val) = self {
5167                        fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
5168                    } else {
5169                        unreachable!()
5170                    }
5171                }
5172                2 => {
5173                    #[allow(irrefutable_let_patterns)]
5174                    if let Value::UintT(_) = self {
5175                        // Do nothing, read the value into the object
5176                    } else {
5177                        // Initialize `self` to the right variant
5178                        *self = Value::UintT(fidl::new_empty!(u64, D));
5179                    }
5180                    #[allow(irrefutable_let_patterns)]
5181                    if let Value::UintT(ref mut val) = self {
5182                        fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
5183                    } else {
5184                        unreachable!()
5185                    }
5186                }
5187                3 => {
5188                    #[allow(irrefutable_let_patterns)]
5189                    if let Value::DoubleT(_) = self {
5190                        // Do nothing, read the value into the object
5191                    } else {
5192                        // Initialize `self` to the right variant
5193                        *self = Value::DoubleT(fidl::new_empty!(f64, D));
5194                    }
5195                    #[allow(irrefutable_let_patterns)]
5196                    if let Value::DoubleT(ref mut val) = self {
5197                        fidl::decode!(f64, D, val, decoder, _inner_offset, depth)?;
5198                    } else {
5199                        unreachable!()
5200                    }
5201                }
5202                4 => {
5203                    #[allow(irrefutable_let_patterns)]
5204                    if let Value::StringT(_) = self {
5205                        // Do nothing, read the value into the object
5206                    } else {
5207                        // Initialize `self` to the right variant
5208                        *self =
5209                            Value::StringT(fidl::new_empty!(fidl::encoding::UnboundedString, D));
5210                    }
5211                    #[allow(irrefutable_let_patterns)]
5212                    if let Value::StringT(ref mut val) = self {
5213                        fidl::decode!(
5214                            fidl::encoding::UnboundedString,
5215                            D,
5216                            val,
5217                            decoder,
5218                            _inner_offset,
5219                            depth
5220                        )?;
5221                    } else {
5222                        unreachable!()
5223                    }
5224                }
5225                #[allow(deprecated)]
5226                ordinal => {
5227                    for _ in 0..num_handles {
5228                        decoder.drop_next_handle()?;
5229                    }
5230                    *self = Value::__SourceBreaking { unknown_ordinal: ordinal };
5231                }
5232            }
5233            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5234                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5235            }
5236            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5237                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5238            }
5239            Ok(())
5240        }
5241    }
5242}