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