fidl_diagnostics_validate/
fidl_diagnostics_validate.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::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13/// The data in the VMO is tree-structured, and
14/// ROOT_ID identifies the (virtual) root node.
15pub const ROOT_ID: u32 = 0;
16
17/// Indicate the preferred DiffType on failed tests.
18#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
19pub enum DiffType {
20    /// Get the full rendering of both trees.
21    Full,
22    /// Get the diff between the trees.
23    Diff,
24    /// Get both the full rendering of both trees, and their diff.
25    Both,
26    #[doc(hidden)]
27    __SourceBreaking { unknown_ordinal: u32 },
28}
29
30/// Pattern that matches an unknown `DiffType` member.
31#[macro_export]
32macro_rules! DiffTypeUnknown {
33    () => {
34        _
35    };
36}
37
38impl DiffType {
39    #[inline]
40    pub fn from_primitive(prim: u32) -> Option<Self> {
41        match prim {
42            0 => Some(Self::Full),
43            1 => Some(Self::Diff),
44            2 => Some(Self::Both),
45            _ => None,
46        }
47    }
48
49    #[inline]
50    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
51        match prim {
52            0 => Self::Full,
53            1 => Self::Diff,
54            2 => Self::Both,
55            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
56        }
57    }
58
59    #[inline]
60    pub fn unknown() -> Self {
61        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
62    }
63
64    #[inline]
65    pub const fn into_primitive(self) -> u32 {
66        match self {
67            Self::Full => 0,
68            Self::Diff => 1,
69            Self::Both => 2,
70            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
71        }
72    }
73
74    #[inline]
75    pub fn is_unknown(&self) -> bool {
76        match self {
77            Self::__SourceBreaking { unknown_ordinal: _ } => true,
78            _ => false,
79        }
80    }
81}
82
83#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
84#[repr(u32)]
85pub enum LinkDisposition {
86    Child = 0,
87    Inline = 1,
88}
89
90impl LinkDisposition {
91    #[inline]
92    pub fn from_primitive(prim: u32) -> Option<Self> {
93        match prim {
94            0 => Some(Self::Child),
95            1 => Some(Self::Inline),
96            _ => None,
97        }
98    }
99
100    #[inline]
101    pub const fn into_primitive(self) -> u32 {
102        self as u32
103    }
104
105    #[deprecated = "Strict enums should not use `is_unknown`"]
106    #[inline]
107    pub fn is_unknown(&self) -> bool {
108        false
109    }
110}
111
112/// TestResult tells the result of executing an Initialize or Act command.
113#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
114pub enum TestResult {
115    /// The function call completed without error.
116    Ok,
117    /// The Inspect library doesn't implement a requested feature.
118    Unimplemented,
119    /// The Inspect library reported a failure executing the function.
120    Failed,
121    /// The driver and/or puppet-wrapper was in an illegal state.
122    Illegal,
123    #[doc(hidden)]
124    __SourceBreaking { unknown_ordinal: u32 },
125}
126
127/// Pattern that matches an unknown `TestResult` member.
128#[macro_export]
129macro_rules! TestResultUnknown {
130    () => {
131        _
132    };
133}
134
135impl TestResult {
136    #[inline]
137    pub fn from_primitive(prim: u32) -> Option<Self> {
138        match prim {
139            0 => Some(Self::Ok),
140            1 => Some(Self::Unimplemented),
141            2 => Some(Self::Failed),
142            3 => Some(Self::Illegal),
143            _ => None,
144        }
145    }
146
147    #[inline]
148    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
149        match prim {
150            0 => Self::Ok,
151            1 => Self::Unimplemented,
152            2 => Self::Failed,
153            3 => Self::Illegal,
154            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
155        }
156    }
157
158    #[inline]
159    pub fn unknown() -> Self {
160        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
161    }
162
163    #[inline]
164    pub const fn into_primitive(self) -> u32 {
165        match self {
166            Self::Ok => 0,
167            Self::Unimplemented => 1,
168            Self::Failed => 2,
169            Self::Illegal => 3,
170            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
171        }
172    }
173
174    #[inline]
175    pub fn is_unknown(&self) -> bool {
176        match self {
177            Self::__SourceBreaking { unknown_ordinal: _ } => true,
178            _ => false,
179        }
180    }
181}
182
183#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
184pub enum ValueType {
185    Int,
186    Uint,
187    Double,
188    String,
189    #[doc(hidden)]
190    __SourceBreaking {
191        unknown_ordinal: u8,
192    },
193}
194
195/// Pattern that matches an unknown `ValueType` member.
196#[macro_export]
197macro_rules! ValueTypeUnknown {
198    () => {
199        _
200    };
201}
202
203impl ValueType {
204    #[inline]
205    pub fn from_primitive(prim: u8) -> Option<Self> {
206        match prim {
207            1 => Some(Self::Int),
208            2 => Some(Self::Uint),
209            3 => Some(Self::Double),
210            4 => Some(Self::String),
211            _ => None,
212        }
213    }
214
215    #[inline]
216    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
217        match prim {
218            1 => Self::Int,
219            2 => Self::Uint,
220            3 => Self::Double,
221            4 => Self::String,
222            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
223        }
224    }
225
226    #[inline]
227    pub fn unknown() -> Self {
228        Self::__SourceBreaking { unknown_ordinal: 0xff }
229    }
230
231    #[inline]
232    pub const fn into_primitive(self) -> u8 {
233        match self {
234            Self::Int => 1,
235            Self::Uint => 2,
236            Self::Double => 3,
237            Self::String => 4,
238            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
239        }
240    }
241
242    #[inline]
243    pub fn is_unknown(&self) -> bool {
244        match self {
245            Self::__SourceBreaking { unknown_ordinal: _ } => true,
246            _ => false,
247        }
248    }
249}
250
251#[derive(Clone, Debug, PartialEq)]
252pub struct AddNumber {
253    pub id: u32,
254    pub value: Value,
255}
256
257impl fidl::Persistable for AddNumber {}
258
259#[derive(Clone, Debug, PartialEq)]
260pub struct ArrayAdd {
261    pub id: u32,
262    pub index: u64,
263    pub value: Value,
264}
265
266impl fidl::Persistable for ArrayAdd {}
267
268#[derive(Clone, Debug, PartialEq)]
269pub struct ArraySet {
270    pub id: u32,
271    pub index: u64,
272    pub value: Value,
273}
274
275impl fidl::Persistable for ArraySet {}
276
277#[derive(Clone, Debug, PartialEq)]
278pub struct ArraySubtract {
279    pub id: u32,
280    pub index: u64,
281    pub value: Value,
282}
283
284impl fidl::Persistable for ArraySubtract {}
285
286#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
287pub struct CreateArrayProperty {
288    pub parent: u32,
289    pub id: u32,
290    pub name: String,
291    pub slots: u64,
292    pub value_type: ValueType,
293}
294
295impl fidl::Persistable for CreateArrayProperty {}
296
297/// Tells the puppet to create a property with the given bool value.
298#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
299pub struct CreateBoolProperty {
300    pub parent: u32,
301    pub id: u32,
302    pub name: String,
303    pub value: bool,
304}
305
306impl fidl::Persistable for CreateBoolProperty {}
307
308/// Tells the puppet to create a property with the given byte array value.
309#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
310pub struct CreateBytesProperty {
311    pub parent: u32,
312    pub id: u32,
313    pub name: String,
314    pub value: Vec<u8>,
315}
316
317impl fidl::Persistable for CreateBytesProperty {}
318
319#[derive(Clone, Debug, PartialEq)]
320pub struct CreateExponentialHistogram {
321    pub parent: u32,
322    pub id: u32,
323    pub name: String,
324    pub floor: Value,
325    pub initial_step: Value,
326    pub step_multiplier: Value,
327    pub buckets: u64,
328}
329
330impl fidl::Persistable for CreateExponentialHistogram {}
331
332#[derive(Clone, Debug, PartialEq)]
333pub struct CreateLazyNode {
334    pub parent: u32,
335    pub id: u32,
336    pub name: String,
337    pub disposition: LinkDisposition,
338    pub actions: Vec<Action>,
339}
340
341impl fidl::Persistable for CreateLazyNode {}
342
343#[derive(Clone, Debug, PartialEq)]
344pub struct CreateLinearHistogram {
345    pub parent: u32,
346    pub id: u32,
347    pub name: String,
348    pub floor: Value,
349    pub step_size: Value,
350    pub buckets: u64,
351}
352
353impl fidl::Persistable for CreateLinearHistogram {}
354
355/// Tells the puppet to create a Node with the given name, parentage, and ID
356/// (the id is specified so other nodes can later be created under it).
357#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
358pub struct CreateNode {
359    pub parent: u32,
360    pub id: u32,
361    pub name: String,
362}
363
364impl fidl::Persistable for CreateNode {}
365
366/// Tells the puppet to create a property with the given numeric value.
367#[derive(Clone, Debug, PartialEq)]
368pub struct CreateNumericProperty {
369    pub parent: u32,
370    pub id: u32,
371    pub name: String,
372    pub value: Value,
373}
374
375impl fidl::Persistable for CreateNumericProperty {}
376
377/// Tells the puppet to create a property with the given string value.
378#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
379pub struct CreateStringProperty {
380    pub parent: u32,
381    pub id: u32,
382    pub name: String,
383    pub value: String,
384}
385
386impl fidl::Persistable for CreateStringProperty {}
387
388#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
389#[repr(C)]
390pub struct DeleteLazyNode {
391    pub id: u32,
392}
393
394impl fidl::Persistable for DeleteLazyNode {}
395
396/// Tells the puppet to delete the given node.
397#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
398#[repr(C)]
399pub struct DeleteNode {
400    pub id: u32,
401}
402
403impl fidl::Persistable for DeleteNode {}
404
405/// Tells the puppet to delete an existing property.
406#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
407#[repr(C)]
408pub struct DeleteProperty {
409    pub id: u32,
410}
411
412impl fidl::Persistable for DeleteProperty {}
413
414#[derive(Clone, Debug, PartialEq)]
415pub struct Insert {
416    pub id: u32,
417    pub value: Value,
418}
419
420impl fidl::Persistable for Insert {}
421
422#[derive(Clone, Debug, PartialEq)]
423pub struct InsertMultiple {
424    pub id: u32,
425    pub value: Value,
426    pub count: u64,
427}
428
429impl fidl::Persistable for InsertMultiple {}
430
431#[derive(Clone, Debug, PartialEq)]
432pub struct InspectPuppetActLazyRequest {
433    pub lazy_action: LazyAction,
434}
435
436impl fidl::Persistable for InspectPuppetActLazyRequest {}
437
438#[derive(Clone, Debug, PartialEq)]
439pub struct InspectPuppetActRequest {
440    pub action: Action,
441}
442
443impl fidl::Persistable for InspectPuppetActRequest {}
444
445#[derive(Clone, Debug, PartialEq)]
446pub struct InspectPuppetInitializeRequest {
447    pub params: InitializationParams,
448}
449
450impl fidl::Persistable for InspectPuppetInitializeRequest {}
451
452#[derive(Clone, Debug, PartialEq)]
453pub struct InspectPuppetInitializeTreeRequest {
454    pub params: InitializationParams,
455}
456
457impl fidl::Persistable for InspectPuppetInitializeTreeRequest {}
458
459#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
460pub struct InspectPuppetActLazyResponse {
461    pub result: TestResult,
462}
463
464impl fidl::Persistable for InspectPuppetActLazyResponse {}
465
466#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
467pub struct InspectPuppetActResponse {
468    pub result: TestResult,
469}
470
471impl fidl::Persistable for InspectPuppetActResponse {}
472
473#[derive(Debug, PartialEq)]
474pub struct InspectPuppetGetConfigResponse {
475    pub printable_name: String,
476    pub options: Options,
477}
478
479impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
480    for InspectPuppetGetConfigResponse
481{
482}
483
484#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
485pub struct InspectPuppetInitializeTreeResponse {
486    pub tree: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>,
487    pub result: TestResult,
488}
489
490impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
491    for InspectPuppetInitializeTreeResponse
492{
493}
494
495#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
496pub struct InspectPuppetInitializeResponse {
497    pub vmo: Option<fidl::Handle>,
498    pub result: TestResult,
499}
500
501impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
502    for InspectPuppetInitializeResponse
503{
504}
505
506#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
507pub struct InspectPuppetPublishResponse {
508    pub result: TestResult,
509}
510
511impl fidl::Persistable for InspectPuppetPublishResponse {}
512
513#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
514pub struct SetBool {
515    pub id: u32,
516    pub value: bool,
517}
518
519impl fidl::Persistable for SetBool {}
520
521#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
522pub struct SetBytes {
523    pub id: u32,
524    pub value: Vec<u8>,
525}
526
527impl fidl::Persistable for SetBytes {}
528
529#[derive(Clone, Debug, PartialEq)]
530pub struct SetNumber {
531    pub id: u32,
532    pub value: Value,
533}
534
535impl fidl::Persistable for SetNumber {}
536
537#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
538pub struct SetString {
539    pub id: u32,
540    pub value: String,
541}
542
543impl fidl::Persistable for SetString {}
544
545#[derive(Clone, Debug, PartialEq)]
546pub struct SubtractNumber {
547    pub id: u32,
548    pub value: Value,
549}
550
551impl fidl::Persistable for SubtractNumber {}
552
553/// InitializationParams tells how to initialize the Inspect library.
554#[derive(Clone, Debug, Default, PartialEq)]
555pub struct InitializationParams {
556    pub vmo_size: Option<u64>,
557    #[doc(hidden)]
558    pub __source_breaking: fidl::marker::SourceBreaking,
559}
560
561impl fidl::Persistable for InitializationParams {}
562
563#[derive(Debug, Default, PartialEq)]
564pub struct Options {
565    /// Defaults to false
566    pub has_runner_node: Option<bool>,
567    /// Defaults to FULL
568    pub diff_type: Option<DiffType>,
569    #[doc(hidden)]
570    pub __source_breaking: fidl::marker::SourceBreaking,
571}
572
573impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Options {}
574
575/// Tells the puppet to do something to modify the VMO.
576#[derive(Clone, Debug)]
577pub enum Action {
578    CreateNode(CreateNode),
579    DeleteNode(DeleteNode),
580    CreateNumericProperty(CreateNumericProperty),
581    CreateBytesProperty(CreateBytesProperty),
582    CreateStringProperty(CreateStringProperty),
583    DeleteProperty(DeleteProperty),
584    SetNumber(SetNumber),
585    SetString(SetString),
586    SetBytes(SetBytes),
587    AddNumber(AddNumber),
588    SubtractNumber(SubtractNumber),
589    CreateArrayProperty(CreateArrayProperty),
590    ArraySet(ArraySet),
591    ArrayAdd(ArrayAdd),
592    ArraySubtract(ArraySubtract),
593    CreateLinearHistogram(CreateLinearHistogram),
594    CreateExponentialHistogram(CreateExponentialHistogram),
595    Insert(Insert),
596    InsertMultiple(InsertMultiple),
597    CreateBoolProperty(CreateBoolProperty),
598    SetBool(SetBool),
599    #[doc(hidden)]
600    __SourceBreaking {
601        unknown_ordinal: u64,
602    },
603}
604
605/// Pattern that matches an unknown `Action` member.
606#[macro_export]
607macro_rules! ActionUnknown {
608    () => {
609        _
610    };
611}
612
613// Custom PartialEq so that unknown variants are not equal to themselves.
614impl PartialEq for Action {
615    fn eq(&self, other: &Self) -> bool {
616        match (self, other) {
617            (Self::CreateNode(x), Self::CreateNode(y)) => *x == *y,
618            (Self::DeleteNode(x), Self::DeleteNode(y)) => *x == *y,
619            (Self::CreateNumericProperty(x), Self::CreateNumericProperty(y)) => *x == *y,
620            (Self::CreateBytesProperty(x), Self::CreateBytesProperty(y)) => *x == *y,
621            (Self::CreateStringProperty(x), Self::CreateStringProperty(y)) => *x == *y,
622            (Self::DeleteProperty(x), Self::DeleteProperty(y)) => *x == *y,
623            (Self::SetNumber(x), Self::SetNumber(y)) => *x == *y,
624            (Self::SetString(x), Self::SetString(y)) => *x == *y,
625            (Self::SetBytes(x), Self::SetBytes(y)) => *x == *y,
626            (Self::AddNumber(x), Self::AddNumber(y)) => *x == *y,
627            (Self::SubtractNumber(x), Self::SubtractNumber(y)) => *x == *y,
628            (Self::CreateArrayProperty(x), Self::CreateArrayProperty(y)) => *x == *y,
629            (Self::ArraySet(x), Self::ArraySet(y)) => *x == *y,
630            (Self::ArrayAdd(x), Self::ArrayAdd(y)) => *x == *y,
631            (Self::ArraySubtract(x), Self::ArraySubtract(y)) => *x == *y,
632            (Self::CreateLinearHistogram(x), Self::CreateLinearHistogram(y)) => *x == *y,
633            (Self::CreateExponentialHistogram(x), Self::CreateExponentialHistogram(y)) => *x == *y,
634            (Self::Insert(x), Self::Insert(y)) => *x == *y,
635            (Self::InsertMultiple(x), Self::InsertMultiple(y)) => *x == *y,
636            (Self::CreateBoolProperty(x), Self::CreateBoolProperty(y)) => *x == *y,
637            (Self::SetBool(x), Self::SetBool(y)) => *x == *y,
638            _ => false,
639        }
640    }
641}
642
643impl Action {
644    #[inline]
645    pub fn ordinal(&self) -> u64 {
646        match *self {
647            Self::CreateNode(_) => 1,
648            Self::DeleteNode(_) => 2,
649            Self::CreateNumericProperty(_) => 3,
650            Self::CreateBytesProperty(_) => 4,
651            Self::CreateStringProperty(_) => 5,
652            Self::DeleteProperty(_) => 6,
653            Self::SetNumber(_) => 7,
654            Self::SetString(_) => 8,
655            Self::SetBytes(_) => 9,
656            Self::AddNumber(_) => 10,
657            Self::SubtractNumber(_) => 11,
658            Self::CreateArrayProperty(_) => 12,
659            Self::ArraySet(_) => 13,
660            Self::ArrayAdd(_) => 14,
661            Self::ArraySubtract(_) => 15,
662            Self::CreateLinearHistogram(_) => 16,
663            Self::CreateExponentialHistogram(_) => 17,
664            Self::Insert(_) => 18,
665            Self::InsertMultiple(_) => 19,
666            Self::CreateBoolProperty(_) => 20,
667            Self::SetBool(_) => 21,
668            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
669        }
670    }
671
672    #[inline]
673    pub fn unknown_variant_for_testing() -> Self {
674        Self::__SourceBreaking { unknown_ordinal: 0 }
675    }
676
677    #[inline]
678    pub fn is_unknown(&self) -> bool {
679        match self {
680            Self::__SourceBreaking { .. } => true,
681            _ => false,
682        }
683    }
684}
685
686impl fidl::Persistable for Action {}
687
688/// Tells the puppet to do something to modify a lazy node.
689#[derive(Clone, Debug)]
690pub enum LazyAction {
691    CreateLazyNode(CreateLazyNode),
692    DeleteLazyNode(DeleteLazyNode),
693    #[doc(hidden)]
694    __SourceBreaking {
695        unknown_ordinal: u64,
696    },
697}
698
699/// Pattern that matches an unknown `LazyAction` member.
700#[macro_export]
701macro_rules! LazyActionUnknown {
702    () => {
703        _
704    };
705}
706
707// Custom PartialEq so that unknown variants are not equal to themselves.
708impl PartialEq for LazyAction {
709    fn eq(&self, other: &Self) -> bool {
710        match (self, other) {
711            (Self::CreateLazyNode(x), Self::CreateLazyNode(y)) => *x == *y,
712            (Self::DeleteLazyNode(x), Self::DeleteLazyNode(y)) => *x == *y,
713            _ => false,
714        }
715    }
716}
717
718impl LazyAction {
719    #[inline]
720    pub fn ordinal(&self) -> u64 {
721        match *self {
722            Self::CreateLazyNode(_) => 1,
723            Self::DeleteLazyNode(_) => 2,
724            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
725        }
726    }
727
728    #[inline]
729    pub fn unknown_variant_for_testing() -> Self {
730        Self::__SourceBreaking { unknown_ordinal: 0 }
731    }
732
733    #[inline]
734    pub fn is_unknown(&self) -> bool {
735        match self {
736            Self::__SourceBreaking { .. } => true,
737            _ => false,
738        }
739    }
740}
741
742impl fidl::Persistable for LazyAction {}
743
744#[derive(Clone, Debug)]
745pub enum Value {
746    IntT(i64),
747    UintT(u64),
748    DoubleT(f64),
749    StringT(String),
750    #[doc(hidden)]
751    __SourceBreaking {
752        unknown_ordinal: u64,
753    },
754}
755
756/// Pattern that matches an unknown `Value` member.
757#[macro_export]
758macro_rules! ValueUnknown {
759    () => {
760        _
761    };
762}
763
764// Custom PartialEq so that unknown variants are not equal to themselves.
765impl PartialEq for Value {
766    fn eq(&self, other: &Self) -> bool {
767        match (self, other) {
768            (Self::IntT(x), Self::IntT(y)) => *x == *y,
769            (Self::UintT(x), Self::UintT(y)) => *x == *y,
770            (Self::DoubleT(x), Self::DoubleT(y)) => *x == *y,
771            (Self::StringT(x), Self::StringT(y)) => *x == *y,
772            _ => false,
773        }
774    }
775}
776
777impl Value {
778    #[inline]
779    pub fn ordinal(&self) -> u64 {
780        match *self {
781            Self::IntT(_) => 1,
782            Self::UintT(_) => 2,
783            Self::DoubleT(_) => 3,
784            Self::StringT(_) => 4,
785            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
786        }
787    }
788
789    #[inline]
790    pub fn unknown_variant_for_testing() -> Self {
791        Self::__SourceBreaking { unknown_ordinal: 0 }
792    }
793
794    #[inline]
795    pub fn is_unknown(&self) -> bool {
796        match self {
797            Self::__SourceBreaking { .. } => true,
798            _ => false,
799        }
800    }
801}
802
803impl fidl::Persistable for Value {}
804
805#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
806pub struct InspectPuppetMarker;
807
808impl fidl::endpoints::ProtocolMarker for InspectPuppetMarker {
809    type Proxy = InspectPuppetProxy;
810    type RequestStream = InspectPuppetRequestStream;
811    #[cfg(target_os = "fuchsia")]
812    type SynchronousProxy = InspectPuppetSynchronousProxy;
813
814    const DEBUG_NAME: &'static str = "diagnostics.validate.InspectPuppet";
815}
816impl fidl::endpoints::DiscoverableProtocolMarker for InspectPuppetMarker {}
817
818pub trait InspectPuppetProxyInterface: Send + Sync {
819    type InitializeResponseFut: std::future::Future<Output = Result<(Option<fidl::Handle>, TestResult), fidl::Error>>
820        + Send;
821    fn r#initialize(&self, params: &InitializationParams) -> Self::InitializeResponseFut;
822    type GetConfigResponseFut: std::future::Future<Output = Result<(String, Options), fidl::Error>>
823        + Send;
824    fn r#get_config(&self) -> Self::GetConfigResponseFut;
825    type InitializeTreeResponseFut: std::future::Future<
826            Output = Result<
827                (Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>, TestResult),
828                fidl::Error,
829            >,
830        > + Send;
831    fn r#initialize_tree(&self, params: &InitializationParams) -> Self::InitializeTreeResponseFut;
832    type PublishResponseFut: std::future::Future<Output = Result<TestResult, fidl::Error>> + Send;
833    fn r#publish(&self) -> Self::PublishResponseFut;
834    type ActResponseFut: std::future::Future<Output = Result<TestResult, fidl::Error>> + Send;
835    fn r#act(&self, action: &Action) -> Self::ActResponseFut;
836    type ActLazyResponseFut: std::future::Future<Output = Result<TestResult, fidl::Error>> + Send;
837    fn r#act_lazy(&self, lazy_action: &LazyAction) -> Self::ActLazyResponseFut;
838}
839#[derive(Debug)]
840#[cfg(target_os = "fuchsia")]
841pub struct InspectPuppetSynchronousProxy {
842    client: fidl::client::sync::Client,
843}
844
845#[cfg(target_os = "fuchsia")]
846impl fidl::endpoints::SynchronousProxy for InspectPuppetSynchronousProxy {
847    type Proxy = InspectPuppetProxy;
848    type Protocol = InspectPuppetMarker;
849
850    fn from_channel(inner: fidl::Channel) -> Self {
851        Self::new(inner)
852    }
853
854    fn into_channel(self) -> fidl::Channel {
855        self.client.into_channel()
856    }
857
858    fn as_channel(&self) -> &fidl::Channel {
859        self.client.as_channel()
860    }
861}
862
863#[cfg(target_os = "fuchsia")]
864impl InspectPuppetSynchronousProxy {
865    pub fn new(channel: fidl::Channel) -> Self {
866        let protocol_name = <InspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
867        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
868    }
869
870    pub fn into_channel(self) -> fidl::Channel {
871        self.client.into_channel()
872    }
873
874    /// Waits until an event arrives and returns it. It is safe for other
875    /// threads to make concurrent requests while waiting for an event.
876    pub fn wait_for_event(
877        &self,
878        deadline: zx::MonotonicInstant,
879    ) -> Result<InspectPuppetEvent, fidl::Error> {
880        InspectPuppetEvent::decode(self.client.wait_for_event(deadline)?)
881    }
882
883    /// Initializes the Inspect library being tested by the puppet.
884    pub fn r#initialize(
885        &self,
886        mut params: &InitializationParams,
887        ___deadline: zx::MonotonicInstant,
888    ) -> Result<(Option<fidl::Handle>, TestResult), fidl::Error> {
889        let _response = self.client.send_query::<
890            InspectPuppetInitializeRequest,
891            fidl::encoding::FlexibleType<InspectPuppetInitializeResponse>,
892        >(
893            (params,),
894            0x6f6c1f23e5665591,
895            fidl::encoding::DynamicFlags::FLEXIBLE,
896            ___deadline,
897        )?
898        .into_result::<InspectPuppetMarker>("initialize")?;
899        Ok((_response.vmo, _response.result))
900    }
901
902    /// Provides configuration values for the validator.
903    pub fn r#get_config(
904        &self,
905        ___deadline: zx::MonotonicInstant,
906    ) -> Result<(String, Options), fidl::Error> {
907        let _response = self.client.send_query::<
908            fidl::encoding::EmptyPayload,
909            fidl::encoding::FlexibleType<InspectPuppetGetConfigResponse>,
910        >(
911            (),
912            0x61588d76bae449fd,
913            fidl::encoding::DynamicFlags::FLEXIBLE,
914            ___deadline,
915        )?
916        .into_result::<InspectPuppetMarker>("get_config")?;
917        Ok((_response.printable_name, _response.options))
918    }
919
920    /// Use instead of `Initialize` on puppets which support the Tree / Lazy method of getting VMOs.
921    /// The root VMO can be obtained via the returned Tree protocol.
922    pub fn r#initialize_tree(
923        &self,
924        mut params: &InitializationParams,
925        ___deadline: zx::MonotonicInstant,
926    ) -> Result<
927        (Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>, TestResult),
928        fidl::Error,
929    > {
930        let _response = self.client.send_query::<
931            InspectPuppetInitializeTreeRequest,
932            fidl::encoding::FlexibleType<InspectPuppetInitializeTreeResponse>,
933        >(
934            (params,),
935            0x1dba90332d970658,
936            fidl::encoding::DynamicFlags::FLEXIBLE,
937            ___deadline,
938        )?
939        .into_result::<InspectPuppetMarker>("initialize_tree")?;
940        Ok((_response.tree, _response.result))
941    }
942
943    /// Instruct the puppet to publish its current data over InspectSink.
944    ///
945    /// Note: It is an error for more than one Validate connection to
946    /// Publish at once. Unpublish must be called to cleanup.
947    pub fn r#publish(&self, ___deadline: zx::MonotonicInstant) -> Result<TestResult, fidl::Error> {
948        let _response = self.client.send_query::<
949            fidl::encoding::EmptyPayload,
950            fidl::encoding::FlexibleType<InspectPuppetPublishResponse>,
951        >(
952            (),
953            0x2cb88b53aa897dd8,
954            fidl::encoding::DynamicFlags::FLEXIBLE,
955            ___deadline,
956        )?
957        .into_result::<InspectPuppetMarker>("publish")?;
958        Ok(_response.result)
959    }
960
961    /// Modifies the contents of the VMO.
962    pub fn r#act(
963        &self,
964        mut action: &Action,
965        ___deadline: zx::MonotonicInstant,
966    ) -> Result<TestResult, fidl::Error> {
967        let _response = self.client.send_query::<
968            InspectPuppetActRequest,
969            fidl::encoding::FlexibleType<InspectPuppetActResponse>,
970        >(
971            (action,),
972            0x72760753739e292f,
973            fidl::encoding::DynamicFlags::FLEXIBLE,
974            ___deadline,
975        )?
976        .into_result::<InspectPuppetMarker>("act")?;
977        Ok(_response.result)
978    }
979
980    /// Modifies the contents of a lazy node.
981    pub fn r#act_lazy(
982        &self,
983        mut lazy_action: &LazyAction,
984        ___deadline: zx::MonotonicInstant,
985    ) -> Result<TestResult, fidl::Error> {
986        let _response = self.client.send_query::<
987            InspectPuppetActLazyRequest,
988            fidl::encoding::FlexibleType<InspectPuppetActLazyResponse>,
989        >(
990            (lazy_action,),
991            0x2d43263540a22a5f,
992            fidl::encoding::DynamicFlags::FLEXIBLE,
993            ___deadline,
994        )?
995        .into_result::<InspectPuppetMarker>("act_lazy")?;
996        Ok(_response.result)
997    }
998}
999
1000#[derive(Debug, Clone)]
1001pub struct InspectPuppetProxy {
1002    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1003}
1004
1005impl fidl::endpoints::Proxy for InspectPuppetProxy {
1006    type Protocol = InspectPuppetMarker;
1007
1008    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1009        Self::new(inner)
1010    }
1011
1012    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1013        self.client.into_channel().map_err(|client| Self { client })
1014    }
1015
1016    fn as_channel(&self) -> &::fidl::AsyncChannel {
1017        self.client.as_channel()
1018    }
1019}
1020
1021impl InspectPuppetProxy {
1022    /// Create a new Proxy for diagnostics.validate/InspectPuppet.
1023    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1024        let protocol_name = <InspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1025        Self { client: fidl::client::Client::new(channel, protocol_name) }
1026    }
1027
1028    /// Get a Stream of events from the remote end of the protocol.
1029    ///
1030    /// # Panics
1031    ///
1032    /// Panics if the event stream was already taken.
1033    pub fn take_event_stream(&self) -> InspectPuppetEventStream {
1034        InspectPuppetEventStream { event_receiver: self.client.take_event_receiver() }
1035    }
1036
1037    /// Initializes the Inspect library being tested by the puppet.
1038    pub fn r#initialize(
1039        &self,
1040        mut params: &InitializationParams,
1041    ) -> fidl::client::QueryResponseFut<
1042        (Option<fidl::Handle>, TestResult),
1043        fidl::encoding::DefaultFuchsiaResourceDialect,
1044    > {
1045        InspectPuppetProxyInterface::r#initialize(self, params)
1046    }
1047
1048    /// Provides configuration values for the validator.
1049    pub fn r#get_config(
1050        &self,
1051    ) -> fidl::client::QueryResponseFut<
1052        (String, Options),
1053        fidl::encoding::DefaultFuchsiaResourceDialect,
1054    > {
1055        InspectPuppetProxyInterface::r#get_config(self)
1056    }
1057
1058    /// Use instead of `Initialize` on puppets which support the Tree / Lazy method of getting VMOs.
1059    /// The root VMO can be obtained via the returned Tree protocol.
1060    pub fn r#initialize_tree(
1061        &self,
1062        mut params: &InitializationParams,
1063    ) -> fidl::client::QueryResponseFut<
1064        (Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>, TestResult),
1065        fidl::encoding::DefaultFuchsiaResourceDialect,
1066    > {
1067        InspectPuppetProxyInterface::r#initialize_tree(self, params)
1068    }
1069
1070    /// Instruct the puppet to publish its current data over InspectSink.
1071    ///
1072    /// Note: It is an error for more than one Validate connection to
1073    /// Publish at once. Unpublish must be called to cleanup.
1074    pub fn r#publish(
1075        &self,
1076    ) -> fidl::client::QueryResponseFut<TestResult, fidl::encoding::DefaultFuchsiaResourceDialect>
1077    {
1078        InspectPuppetProxyInterface::r#publish(self)
1079    }
1080
1081    /// Modifies the contents of the VMO.
1082    pub fn r#act(
1083        &self,
1084        mut action: &Action,
1085    ) -> fidl::client::QueryResponseFut<TestResult, fidl::encoding::DefaultFuchsiaResourceDialect>
1086    {
1087        InspectPuppetProxyInterface::r#act(self, action)
1088    }
1089
1090    /// Modifies the contents of a lazy node.
1091    pub fn r#act_lazy(
1092        &self,
1093        mut lazy_action: &LazyAction,
1094    ) -> fidl::client::QueryResponseFut<TestResult, fidl::encoding::DefaultFuchsiaResourceDialect>
1095    {
1096        InspectPuppetProxyInterface::r#act_lazy(self, lazy_action)
1097    }
1098}
1099
1100impl InspectPuppetProxyInterface for InspectPuppetProxy {
1101    type InitializeResponseFut = fidl::client::QueryResponseFut<
1102        (Option<fidl::Handle>, TestResult),
1103        fidl::encoding::DefaultFuchsiaResourceDialect,
1104    >;
1105    fn r#initialize(&self, mut params: &InitializationParams) -> Self::InitializeResponseFut {
1106        fn _decode(
1107            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1108        ) -> Result<(Option<fidl::Handle>, TestResult), fidl::Error> {
1109            let _response = fidl::client::decode_transaction_body::<
1110                fidl::encoding::FlexibleType<InspectPuppetInitializeResponse>,
1111                fidl::encoding::DefaultFuchsiaResourceDialect,
1112                0x6f6c1f23e5665591,
1113            >(_buf?)?
1114            .into_result::<InspectPuppetMarker>("initialize")?;
1115            Ok((_response.vmo, _response.result))
1116        }
1117        self.client.send_query_and_decode::<
1118            InspectPuppetInitializeRequest,
1119            (Option<fidl::Handle>, TestResult),
1120        >(
1121            (params,),
1122            0x6f6c1f23e5665591,
1123            fidl::encoding::DynamicFlags::FLEXIBLE,
1124            _decode,
1125        )
1126    }
1127
1128    type GetConfigResponseFut = fidl::client::QueryResponseFut<
1129        (String, Options),
1130        fidl::encoding::DefaultFuchsiaResourceDialect,
1131    >;
1132    fn r#get_config(&self) -> Self::GetConfigResponseFut {
1133        fn _decode(
1134            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1135        ) -> Result<(String, Options), fidl::Error> {
1136            let _response = fidl::client::decode_transaction_body::<
1137                fidl::encoding::FlexibleType<InspectPuppetGetConfigResponse>,
1138                fidl::encoding::DefaultFuchsiaResourceDialect,
1139                0x61588d76bae449fd,
1140            >(_buf?)?
1141            .into_result::<InspectPuppetMarker>("get_config")?;
1142            Ok((_response.printable_name, _response.options))
1143        }
1144        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (String, Options)>(
1145            (),
1146            0x61588d76bae449fd,
1147            fidl::encoding::DynamicFlags::FLEXIBLE,
1148            _decode,
1149        )
1150    }
1151
1152    type InitializeTreeResponseFut = fidl::client::QueryResponseFut<
1153        (Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>, TestResult),
1154        fidl::encoding::DefaultFuchsiaResourceDialect,
1155    >;
1156    fn r#initialize_tree(
1157        &self,
1158        mut params: &InitializationParams,
1159    ) -> Self::InitializeTreeResponseFut {
1160        fn _decode(
1161            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1162        ) -> Result<
1163            (Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>, TestResult),
1164            fidl::Error,
1165        > {
1166            let _response = fidl::client::decode_transaction_body::<
1167                fidl::encoding::FlexibleType<InspectPuppetInitializeTreeResponse>,
1168                fidl::encoding::DefaultFuchsiaResourceDialect,
1169                0x1dba90332d970658,
1170            >(_buf?)?
1171            .into_result::<InspectPuppetMarker>("initialize_tree")?;
1172            Ok((_response.tree, _response.result))
1173        }
1174        self.client.send_query_and_decode::<InspectPuppetInitializeTreeRequest, (
1175            Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>,
1176            TestResult,
1177        )>(
1178            (params,), 0x1dba90332d970658, fidl::encoding::DynamicFlags::FLEXIBLE, _decode
1179        )
1180    }
1181
1182    type PublishResponseFut =
1183        fidl::client::QueryResponseFut<TestResult, fidl::encoding::DefaultFuchsiaResourceDialect>;
1184    fn r#publish(&self) -> Self::PublishResponseFut {
1185        fn _decode(
1186            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1187        ) -> Result<TestResult, fidl::Error> {
1188            let _response = fidl::client::decode_transaction_body::<
1189                fidl::encoding::FlexibleType<InspectPuppetPublishResponse>,
1190                fidl::encoding::DefaultFuchsiaResourceDialect,
1191                0x2cb88b53aa897dd8,
1192            >(_buf?)?
1193            .into_result::<InspectPuppetMarker>("publish")?;
1194            Ok(_response.result)
1195        }
1196        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, TestResult>(
1197            (),
1198            0x2cb88b53aa897dd8,
1199            fidl::encoding::DynamicFlags::FLEXIBLE,
1200            _decode,
1201        )
1202    }
1203
1204    type ActResponseFut =
1205        fidl::client::QueryResponseFut<TestResult, fidl::encoding::DefaultFuchsiaResourceDialect>;
1206    fn r#act(&self, mut action: &Action) -> Self::ActResponseFut {
1207        fn _decode(
1208            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1209        ) -> Result<TestResult, fidl::Error> {
1210            let _response = fidl::client::decode_transaction_body::<
1211                fidl::encoding::FlexibleType<InspectPuppetActResponse>,
1212                fidl::encoding::DefaultFuchsiaResourceDialect,
1213                0x72760753739e292f,
1214            >(_buf?)?
1215            .into_result::<InspectPuppetMarker>("act")?;
1216            Ok(_response.result)
1217        }
1218        self.client.send_query_and_decode::<InspectPuppetActRequest, TestResult>(
1219            (action,),
1220            0x72760753739e292f,
1221            fidl::encoding::DynamicFlags::FLEXIBLE,
1222            _decode,
1223        )
1224    }
1225
1226    type ActLazyResponseFut =
1227        fidl::client::QueryResponseFut<TestResult, fidl::encoding::DefaultFuchsiaResourceDialect>;
1228    fn r#act_lazy(&self, mut lazy_action: &LazyAction) -> Self::ActLazyResponseFut {
1229        fn _decode(
1230            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1231        ) -> Result<TestResult, fidl::Error> {
1232            let _response = fidl::client::decode_transaction_body::<
1233                fidl::encoding::FlexibleType<InspectPuppetActLazyResponse>,
1234                fidl::encoding::DefaultFuchsiaResourceDialect,
1235                0x2d43263540a22a5f,
1236            >(_buf?)?
1237            .into_result::<InspectPuppetMarker>("act_lazy")?;
1238            Ok(_response.result)
1239        }
1240        self.client.send_query_and_decode::<InspectPuppetActLazyRequest, TestResult>(
1241            (lazy_action,),
1242            0x2d43263540a22a5f,
1243            fidl::encoding::DynamicFlags::FLEXIBLE,
1244            _decode,
1245        )
1246    }
1247}
1248
1249pub struct InspectPuppetEventStream {
1250    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1251}
1252
1253impl std::marker::Unpin for InspectPuppetEventStream {}
1254
1255impl futures::stream::FusedStream for InspectPuppetEventStream {
1256    fn is_terminated(&self) -> bool {
1257        self.event_receiver.is_terminated()
1258    }
1259}
1260
1261impl futures::Stream for InspectPuppetEventStream {
1262    type Item = Result<InspectPuppetEvent, fidl::Error>;
1263
1264    fn poll_next(
1265        mut self: std::pin::Pin<&mut Self>,
1266        cx: &mut std::task::Context<'_>,
1267    ) -> std::task::Poll<Option<Self::Item>> {
1268        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1269            &mut self.event_receiver,
1270            cx
1271        )?) {
1272            Some(buf) => std::task::Poll::Ready(Some(InspectPuppetEvent::decode(buf))),
1273            None => std::task::Poll::Ready(None),
1274        }
1275    }
1276}
1277
1278#[derive(Debug)]
1279pub enum InspectPuppetEvent {
1280    #[non_exhaustive]
1281    _UnknownEvent {
1282        /// Ordinal of the event that was sent.
1283        ordinal: u64,
1284    },
1285}
1286
1287impl InspectPuppetEvent {
1288    /// Decodes a message buffer as a [`InspectPuppetEvent`].
1289    fn decode(
1290        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1291    ) -> Result<InspectPuppetEvent, fidl::Error> {
1292        let (bytes, _handles) = buf.split_mut();
1293        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1294        debug_assert_eq!(tx_header.tx_id, 0);
1295        match tx_header.ordinal {
1296            _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1297                Ok(InspectPuppetEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1298            }
1299            _ => Err(fidl::Error::UnknownOrdinal {
1300                ordinal: tx_header.ordinal,
1301                protocol_name: <InspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1302            }),
1303        }
1304    }
1305}
1306
1307/// A Stream of incoming requests for diagnostics.validate/InspectPuppet.
1308pub struct InspectPuppetRequestStream {
1309    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1310    is_terminated: bool,
1311}
1312
1313impl std::marker::Unpin for InspectPuppetRequestStream {}
1314
1315impl futures::stream::FusedStream for InspectPuppetRequestStream {
1316    fn is_terminated(&self) -> bool {
1317        self.is_terminated
1318    }
1319}
1320
1321impl fidl::endpoints::RequestStream for InspectPuppetRequestStream {
1322    type Protocol = InspectPuppetMarker;
1323    type ControlHandle = InspectPuppetControlHandle;
1324
1325    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1326        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1327    }
1328
1329    fn control_handle(&self) -> Self::ControlHandle {
1330        InspectPuppetControlHandle { inner: self.inner.clone() }
1331    }
1332
1333    fn into_inner(
1334        self,
1335    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1336    {
1337        (self.inner, self.is_terminated)
1338    }
1339
1340    fn from_inner(
1341        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1342        is_terminated: bool,
1343    ) -> Self {
1344        Self { inner, is_terminated }
1345    }
1346}
1347
1348impl futures::Stream for InspectPuppetRequestStream {
1349    type Item = Result<InspectPuppetRequest, fidl::Error>;
1350
1351    fn poll_next(
1352        mut self: std::pin::Pin<&mut Self>,
1353        cx: &mut std::task::Context<'_>,
1354    ) -> std::task::Poll<Option<Self::Item>> {
1355        let this = &mut *self;
1356        if this.inner.check_shutdown(cx) {
1357            this.is_terminated = true;
1358            return std::task::Poll::Ready(None);
1359        }
1360        if this.is_terminated {
1361            panic!("polled InspectPuppetRequestStream after completion");
1362        }
1363        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1364            |bytes, handles| {
1365                match this.inner.channel().read_etc(cx, bytes, handles) {
1366                    std::task::Poll::Ready(Ok(())) => {}
1367                    std::task::Poll::Pending => return std::task::Poll::Pending,
1368                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1369                        this.is_terminated = true;
1370                        return std::task::Poll::Ready(None);
1371                    }
1372                    std::task::Poll::Ready(Err(e)) => {
1373                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1374                            e.into(),
1375                        ))))
1376                    }
1377                }
1378
1379                // A message has been received from the channel
1380                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1381
1382                std::task::Poll::Ready(Some(match header.ordinal {
1383                    0x6f6c1f23e5665591 => {
1384                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1385                        let mut req = fidl::new_empty!(
1386                            InspectPuppetInitializeRequest,
1387                            fidl::encoding::DefaultFuchsiaResourceDialect
1388                        );
1389                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<InspectPuppetInitializeRequest>(&header, _body_bytes, handles, &mut req)?;
1390                        let control_handle =
1391                            InspectPuppetControlHandle { inner: this.inner.clone() };
1392                        Ok(InspectPuppetRequest::Initialize {
1393                            params: req.params,
1394
1395                            responder: InspectPuppetInitializeResponder {
1396                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1397                                tx_id: header.tx_id,
1398                            },
1399                        })
1400                    }
1401                    0x61588d76bae449fd => {
1402                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1403                        let mut req = fidl::new_empty!(
1404                            fidl::encoding::EmptyPayload,
1405                            fidl::encoding::DefaultFuchsiaResourceDialect
1406                        );
1407                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1408                        let control_handle =
1409                            InspectPuppetControlHandle { inner: this.inner.clone() };
1410                        Ok(InspectPuppetRequest::GetConfig {
1411                            responder: InspectPuppetGetConfigResponder {
1412                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1413                                tx_id: header.tx_id,
1414                            },
1415                        })
1416                    }
1417                    0x1dba90332d970658 => {
1418                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1419                        let mut req = fidl::new_empty!(
1420                            InspectPuppetInitializeTreeRequest,
1421                            fidl::encoding::DefaultFuchsiaResourceDialect
1422                        );
1423                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<InspectPuppetInitializeTreeRequest>(&header, _body_bytes, handles, &mut req)?;
1424                        let control_handle =
1425                            InspectPuppetControlHandle { inner: this.inner.clone() };
1426                        Ok(InspectPuppetRequest::InitializeTree {
1427                            params: req.params,
1428
1429                            responder: InspectPuppetInitializeTreeResponder {
1430                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1431                                tx_id: header.tx_id,
1432                            },
1433                        })
1434                    }
1435                    0x2cb88b53aa897dd8 => {
1436                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1437                        let mut req = fidl::new_empty!(
1438                            fidl::encoding::EmptyPayload,
1439                            fidl::encoding::DefaultFuchsiaResourceDialect
1440                        );
1441                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1442                        let control_handle =
1443                            InspectPuppetControlHandle { inner: this.inner.clone() };
1444                        Ok(InspectPuppetRequest::Publish {
1445                            responder: InspectPuppetPublishResponder {
1446                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1447                                tx_id: header.tx_id,
1448                            },
1449                        })
1450                    }
1451                    0x72760753739e292f => {
1452                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1453                        let mut req = fidl::new_empty!(
1454                            InspectPuppetActRequest,
1455                            fidl::encoding::DefaultFuchsiaResourceDialect
1456                        );
1457                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<InspectPuppetActRequest>(&header, _body_bytes, handles, &mut req)?;
1458                        let control_handle =
1459                            InspectPuppetControlHandle { inner: this.inner.clone() };
1460                        Ok(InspectPuppetRequest::Act {
1461                            action: req.action,
1462
1463                            responder: InspectPuppetActResponder {
1464                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1465                                tx_id: header.tx_id,
1466                            },
1467                        })
1468                    }
1469                    0x2d43263540a22a5f => {
1470                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1471                        let mut req = fidl::new_empty!(
1472                            InspectPuppetActLazyRequest,
1473                            fidl::encoding::DefaultFuchsiaResourceDialect
1474                        );
1475                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<InspectPuppetActLazyRequest>(&header, _body_bytes, handles, &mut req)?;
1476                        let control_handle =
1477                            InspectPuppetControlHandle { inner: this.inner.clone() };
1478                        Ok(InspectPuppetRequest::ActLazy {
1479                            lazy_action: req.lazy_action,
1480
1481                            responder: InspectPuppetActLazyResponder {
1482                                control_handle: std::mem::ManuallyDrop::new(control_handle),
1483                                tx_id: header.tx_id,
1484                            },
1485                        })
1486                    }
1487                    _ if header.tx_id == 0
1488                        && header
1489                            .dynamic_flags()
1490                            .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1491                    {
1492                        Ok(InspectPuppetRequest::_UnknownMethod {
1493                            ordinal: header.ordinal,
1494                            control_handle: InspectPuppetControlHandle {
1495                                inner: this.inner.clone(),
1496                            },
1497                            method_type: fidl::MethodType::OneWay,
1498                        })
1499                    }
1500                    _ if header
1501                        .dynamic_flags()
1502                        .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1503                    {
1504                        this.inner.send_framework_err(
1505                            fidl::encoding::FrameworkErr::UnknownMethod,
1506                            header.tx_id,
1507                            header.ordinal,
1508                            header.dynamic_flags(),
1509                            (bytes, handles),
1510                        )?;
1511                        Ok(InspectPuppetRequest::_UnknownMethod {
1512                            ordinal: header.ordinal,
1513                            control_handle: InspectPuppetControlHandle {
1514                                inner: this.inner.clone(),
1515                            },
1516                            method_type: fidl::MethodType::TwoWay,
1517                        })
1518                    }
1519                    _ => Err(fidl::Error::UnknownOrdinal {
1520                        ordinal: header.ordinal,
1521                        protocol_name:
1522                            <InspectPuppetMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1523                    }),
1524                }))
1525            },
1526        )
1527    }
1528}
1529
1530#[derive(Debug)]
1531pub enum InspectPuppetRequest {
1532    /// Initializes the Inspect library being tested by the puppet.
1533    Initialize { params: InitializationParams, responder: InspectPuppetInitializeResponder },
1534    /// Provides configuration values for the validator.
1535    GetConfig { responder: InspectPuppetGetConfigResponder },
1536    /// Use instead of `Initialize` on puppets which support the Tree / Lazy method of getting VMOs.
1537    /// The root VMO can be obtained via the returned Tree protocol.
1538    InitializeTree { params: InitializationParams, responder: InspectPuppetInitializeTreeResponder },
1539    /// Instruct the puppet to publish its current data over InspectSink.
1540    ///
1541    /// Note: It is an error for more than one Validate connection to
1542    /// Publish at once. Unpublish must be called to cleanup.
1543    Publish { responder: InspectPuppetPublishResponder },
1544    /// Modifies the contents of the VMO.
1545    Act { action: Action, responder: InspectPuppetActResponder },
1546    /// Modifies the contents of a lazy node.
1547    ActLazy { lazy_action: LazyAction, responder: InspectPuppetActLazyResponder },
1548    /// An interaction was received which does not match any known method.
1549    #[non_exhaustive]
1550    _UnknownMethod {
1551        /// Ordinal of the method that was called.
1552        ordinal: u64,
1553        control_handle: InspectPuppetControlHandle,
1554        method_type: fidl::MethodType,
1555    },
1556}
1557
1558impl InspectPuppetRequest {
1559    #[allow(irrefutable_let_patterns)]
1560    pub fn into_initialize(
1561        self,
1562    ) -> Option<(InitializationParams, InspectPuppetInitializeResponder)> {
1563        if let InspectPuppetRequest::Initialize { params, responder } = self {
1564            Some((params, responder))
1565        } else {
1566            None
1567        }
1568    }
1569
1570    #[allow(irrefutable_let_patterns)]
1571    pub fn into_get_config(self) -> Option<(InspectPuppetGetConfigResponder)> {
1572        if let InspectPuppetRequest::GetConfig { responder } = self {
1573            Some((responder))
1574        } else {
1575            None
1576        }
1577    }
1578
1579    #[allow(irrefutable_let_patterns)]
1580    pub fn into_initialize_tree(
1581        self,
1582    ) -> Option<(InitializationParams, InspectPuppetInitializeTreeResponder)> {
1583        if let InspectPuppetRequest::InitializeTree { params, responder } = self {
1584            Some((params, responder))
1585        } else {
1586            None
1587        }
1588    }
1589
1590    #[allow(irrefutable_let_patterns)]
1591    pub fn into_publish(self) -> Option<(InspectPuppetPublishResponder)> {
1592        if let InspectPuppetRequest::Publish { responder } = self {
1593            Some((responder))
1594        } else {
1595            None
1596        }
1597    }
1598
1599    #[allow(irrefutable_let_patterns)]
1600    pub fn into_act(self) -> Option<(Action, InspectPuppetActResponder)> {
1601        if let InspectPuppetRequest::Act { action, responder } = self {
1602            Some((action, responder))
1603        } else {
1604            None
1605        }
1606    }
1607
1608    #[allow(irrefutable_let_patterns)]
1609    pub fn into_act_lazy(self) -> Option<(LazyAction, InspectPuppetActLazyResponder)> {
1610        if let InspectPuppetRequest::ActLazy { lazy_action, responder } = self {
1611            Some((lazy_action, responder))
1612        } else {
1613            None
1614        }
1615    }
1616
1617    /// Name of the method defined in FIDL
1618    pub fn method_name(&self) -> &'static str {
1619        match *self {
1620            InspectPuppetRequest::Initialize { .. } => "initialize",
1621            InspectPuppetRequest::GetConfig { .. } => "get_config",
1622            InspectPuppetRequest::InitializeTree { .. } => "initialize_tree",
1623            InspectPuppetRequest::Publish { .. } => "publish",
1624            InspectPuppetRequest::Act { .. } => "act",
1625            InspectPuppetRequest::ActLazy { .. } => "act_lazy",
1626            InspectPuppetRequest::_UnknownMethod {
1627                method_type: fidl::MethodType::OneWay, ..
1628            } => "unknown one-way method",
1629            InspectPuppetRequest::_UnknownMethod {
1630                method_type: fidl::MethodType::TwoWay, ..
1631            } => "unknown two-way method",
1632        }
1633    }
1634}
1635
1636#[derive(Debug, Clone)]
1637pub struct InspectPuppetControlHandle {
1638    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1639}
1640
1641impl fidl::endpoints::ControlHandle for InspectPuppetControlHandle {
1642    fn shutdown(&self) {
1643        self.inner.shutdown()
1644    }
1645    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1646        self.inner.shutdown_with_epitaph(status)
1647    }
1648
1649    fn is_closed(&self) -> bool {
1650        self.inner.channel().is_closed()
1651    }
1652    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1653        self.inner.channel().on_closed()
1654    }
1655
1656    #[cfg(target_os = "fuchsia")]
1657    fn signal_peer(
1658        &self,
1659        clear_mask: zx::Signals,
1660        set_mask: zx::Signals,
1661    ) -> Result<(), zx_status::Status> {
1662        use fidl::Peered;
1663        self.inner.channel().signal_peer(clear_mask, set_mask)
1664    }
1665}
1666
1667impl InspectPuppetControlHandle {}
1668
1669#[must_use = "FIDL methods require a response to be sent"]
1670#[derive(Debug)]
1671pub struct InspectPuppetInitializeResponder {
1672    control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
1673    tx_id: u32,
1674}
1675
1676/// Set the the channel to be shutdown (see [`InspectPuppetControlHandle::shutdown`])
1677/// if the responder is dropped without sending a response, so that the client
1678/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1679impl std::ops::Drop for InspectPuppetInitializeResponder {
1680    fn drop(&mut self) {
1681        self.control_handle.shutdown();
1682        // Safety: drops once, never accessed again
1683        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1684    }
1685}
1686
1687impl fidl::endpoints::Responder for InspectPuppetInitializeResponder {
1688    type ControlHandle = InspectPuppetControlHandle;
1689
1690    fn control_handle(&self) -> &InspectPuppetControlHandle {
1691        &self.control_handle
1692    }
1693
1694    fn drop_without_shutdown(mut self) {
1695        // Safety: drops once, never accessed again due to mem::forget
1696        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1697        // Prevent Drop from running (which would shut down the channel)
1698        std::mem::forget(self);
1699    }
1700}
1701
1702impl InspectPuppetInitializeResponder {
1703    /// Sends a response to the FIDL transaction.
1704    ///
1705    /// Sets the channel to shutdown if an error occurs.
1706    pub fn send(
1707        self,
1708        mut vmo: Option<fidl::Handle>,
1709        mut result: TestResult,
1710    ) -> Result<(), fidl::Error> {
1711        let _result = self.send_raw(vmo, result);
1712        if _result.is_err() {
1713            self.control_handle.shutdown();
1714        }
1715        self.drop_without_shutdown();
1716        _result
1717    }
1718
1719    /// Similar to "send" but does not shutdown the channel if an error occurs.
1720    pub fn send_no_shutdown_on_err(
1721        self,
1722        mut vmo: Option<fidl::Handle>,
1723        mut result: TestResult,
1724    ) -> Result<(), fidl::Error> {
1725        let _result = self.send_raw(vmo, result);
1726        self.drop_without_shutdown();
1727        _result
1728    }
1729
1730    fn send_raw(
1731        &self,
1732        mut vmo: Option<fidl::Handle>,
1733        mut result: TestResult,
1734    ) -> Result<(), fidl::Error> {
1735        self.control_handle
1736            .inner
1737            .send::<fidl::encoding::FlexibleType<InspectPuppetInitializeResponse>>(
1738                fidl::encoding::Flexible::new((vmo, result)),
1739                self.tx_id,
1740                0x6f6c1f23e5665591,
1741                fidl::encoding::DynamicFlags::FLEXIBLE,
1742            )
1743    }
1744}
1745
1746#[must_use = "FIDL methods require a response to be sent"]
1747#[derive(Debug)]
1748pub struct InspectPuppetGetConfigResponder {
1749    control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
1750    tx_id: u32,
1751}
1752
1753/// Set the the channel to be shutdown (see [`InspectPuppetControlHandle::shutdown`])
1754/// if the responder is dropped without sending a response, so that the client
1755/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1756impl std::ops::Drop for InspectPuppetGetConfigResponder {
1757    fn drop(&mut self) {
1758        self.control_handle.shutdown();
1759        // Safety: drops once, never accessed again
1760        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1761    }
1762}
1763
1764impl fidl::endpoints::Responder for InspectPuppetGetConfigResponder {
1765    type ControlHandle = InspectPuppetControlHandle;
1766
1767    fn control_handle(&self) -> &InspectPuppetControlHandle {
1768        &self.control_handle
1769    }
1770
1771    fn drop_without_shutdown(mut self) {
1772        // Safety: drops once, never accessed again due to mem::forget
1773        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1774        // Prevent Drop from running (which would shut down the channel)
1775        std::mem::forget(self);
1776    }
1777}
1778
1779impl InspectPuppetGetConfigResponder {
1780    /// Sends a response to the FIDL transaction.
1781    ///
1782    /// Sets the channel to shutdown if an error occurs.
1783    pub fn send(self, mut printable_name: &str, mut options: Options) -> Result<(), fidl::Error> {
1784        let _result = self.send_raw(printable_name, options);
1785        if _result.is_err() {
1786            self.control_handle.shutdown();
1787        }
1788        self.drop_without_shutdown();
1789        _result
1790    }
1791
1792    /// Similar to "send" but does not shutdown the channel if an error occurs.
1793    pub fn send_no_shutdown_on_err(
1794        self,
1795        mut printable_name: &str,
1796        mut options: Options,
1797    ) -> Result<(), fidl::Error> {
1798        let _result = self.send_raw(printable_name, options);
1799        self.drop_without_shutdown();
1800        _result
1801    }
1802
1803    fn send_raw(&self, mut printable_name: &str, mut options: Options) -> Result<(), fidl::Error> {
1804        self.control_handle
1805            .inner
1806            .send::<fidl::encoding::FlexibleType<InspectPuppetGetConfigResponse>>(
1807                fidl::encoding::Flexible::new((printable_name, &mut options)),
1808                self.tx_id,
1809                0x61588d76bae449fd,
1810                fidl::encoding::DynamicFlags::FLEXIBLE,
1811            )
1812    }
1813}
1814
1815#[must_use = "FIDL methods require a response to be sent"]
1816#[derive(Debug)]
1817pub struct InspectPuppetInitializeTreeResponder {
1818    control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
1819    tx_id: u32,
1820}
1821
1822/// Set the the channel to be shutdown (see [`InspectPuppetControlHandle::shutdown`])
1823/// if the responder is dropped without sending a response, so that the client
1824/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1825impl std::ops::Drop for InspectPuppetInitializeTreeResponder {
1826    fn drop(&mut self) {
1827        self.control_handle.shutdown();
1828        // Safety: drops once, never accessed again
1829        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1830    }
1831}
1832
1833impl fidl::endpoints::Responder for InspectPuppetInitializeTreeResponder {
1834    type ControlHandle = InspectPuppetControlHandle;
1835
1836    fn control_handle(&self) -> &InspectPuppetControlHandle {
1837        &self.control_handle
1838    }
1839
1840    fn drop_without_shutdown(mut self) {
1841        // Safety: drops once, never accessed again due to mem::forget
1842        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1843        // Prevent Drop from running (which would shut down the channel)
1844        std::mem::forget(self);
1845    }
1846}
1847
1848impl InspectPuppetInitializeTreeResponder {
1849    /// Sends a response to the FIDL transaction.
1850    ///
1851    /// Sets the channel to shutdown if an error occurs.
1852    pub fn send(
1853        self,
1854        mut tree: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>,
1855        mut result: TestResult,
1856    ) -> Result<(), fidl::Error> {
1857        let _result = self.send_raw(tree, result);
1858        if _result.is_err() {
1859            self.control_handle.shutdown();
1860        }
1861        self.drop_without_shutdown();
1862        _result
1863    }
1864
1865    /// Similar to "send" but does not shutdown the channel if an error occurs.
1866    pub fn send_no_shutdown_on_err(
1867        self,
1868        mut tree: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>,
1869        mut result: TestResult,
1870    ) -> Result<(), fidl::Error> {
1871        let _result = self.send_raw(tree, result);
1872        self.drop_without_shutdown();
1873        _result
1874    }
1875
1876    fn send_raw(
1877        &self,
1878        mut tree: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>>,
1879        mut result: TestResult,
1880    ) -> Result<(), fidl::Error> {
1881        self.control_handle
1882            .inner
1883            .send::<fidl::encoding::FlexibleType<InspectPuppetInitializeTreeResponse>>(
1884                fidl::encoding::Flexible::new((tree, result)),
1885                self.tx_id,
1886                0x1dba90332d970658,
1887                fidl::encoding::DynamicFlags::FLEXIBLE,
1888            )
1889    }
1890}
1891
1892#[must_use = "FIDL methods require a response to be sent"]
1893#[derive(Debug)]
1894pub struct InspectPuppetPublishResponder {
1895    control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
1896    tx_id: u32,
1897}
1898
1899/// Set the the channel to be shutdown (see [`InspectPuppetControlHandle::shutdown`])
1900/// if the responder is dropped without sending a response, so that the client
1901/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1902impl std::ops::Drop for InspectPuppetPublishResponder {
1903    fn drop(&mut self) {
1904        self.control_handle.shutdown();
1905        // Safety: drops once, never accessed again
1906        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1907    }
1908}
1909
1910impl fidl::endpoints::Responder for InspectPuppetPublishResponder {
1911    type ControlHandle = InspectPuppetControlHandle;
1912
1913    fn control_handle(&self) -> &InspectPuppetControlHandle {
1914        &self.control_handle
1915    }
1916
1917    fn drop_without_shutdown(mut self) {
1918        // Safety: drops once, never accessed again due to mem::forget
1919        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1920        // Prevent Drop from running (which would shut down the channel)
1921        std::mem::forget(self);
1922    }
1923}
1924
1925impl InspectPuppetPublishResponder {
1926    /// Sends a response to the FIDL transaction.
1927    ///
1928    /// Sets the channel to shutdown if an error occurs.
1929    pub fn send(self, mut result: TestResult) -> Result<(), fidl::Error> {
1930        let _result = self.send_raw(result);
1931        if _result.is_err() {
1932            self.control_handle.shutdown();
1933        }
1934        self.drop_without_shutdown();
1935        _result
1936    }
1937
1938    /// Similar to "send" but does not shutdown the channel if an error occurs.
1939    pub fn send_no_shutdown_on_err(self, mut result: TestResult) -> Result<(), fidl::Error> {
1940        let _result = self.send_raw(result);
1941        self.drop_without_shutdown();
1942        _result
1943    }
1944
1945    fn send_raw(&self, mut result: TestResult) -> Result<(), fidl::Error> {
1946        self.control_handle
1947            .inner
1948            .send::<fidl::encoding::FlexibleType<InspectPuppetPublishResponse>>(
1949                fidl::encoding::Flexible::new((result,)),
1950                self.tx_id,
1951                0x2cb88b53aa897dd8,
1952                fidl::encoding::DynamicFlags::FLEXIBLE,
1953            )
1954    }
1955}
1956
1957#[must_use = "FIDL methods require a response to be sent"]
1958#[derive(Debug)]
1959pub struct InspectPuppetActResponder {
1960    control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
1961    tx_id: u32,
1962}
1963
1964/// Set the the channel to be shutdown (see [`InspectPuppetControlHandle::shutdown`])
1965/// if the responder is dropped without sending a response, so that the client
1966/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
1967impl std::ops::Drop for InspectPuppetActResponder {
1968    fn drop(&mut self) {
1969        self.control_handle.shutdown();
1970        // Safety: drops once, never accessed again
1971        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1972    }
1973}
1974
1975impl fidl::endpoints::Responder for InspectPuppetActResponder {
1976    type ControlHandle = InspectPuppetControlHandle;
1977
1978    fn control_handle(&self) -> &InspectPuppetControlHandle {
1979        &self.control_handle
1980    }
1981
1982    fn drop_without_shutdown(mut self) {
1983        // Safety: drops once, never accessed again due to mem::forget
1984        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1985        // Prevent Drop from running (which would shut down the channel)
1986        std::mem::forget(self);
1987    }
1988}
1989
1990impl InspectPuppetActResponder {
1991    /// Sends a response to the FIDL transaction.
1992    ///
1993    /// Sets the channel to shutdown if an error occurs.
1994    pub fn send(self, mut result: TestResult) -> Result<(), fidl::Error> {
1995        let _result = self.send_raw(result);
1996        if _result.is_err() {
1997            self.control_handle.shutdown();
1998        }
1999        self.drop_without_shutdown();
2000        _result
2001    }
2002
2003    /// Similar to "send" but does not shutdown the channel if an error occurs.
2004    pub fn send_no_shutdown_on_err(self, mut result: TestResult) -> Result<(), fidl::Error> {
2005        let _result = self.send_raw(result);
2006        self.drop_without_shutdown();
2007        _result
2008    }
2009
2010    fn send_raw(&self, mut result: TestResult) -> Result<(), fidl::Error> {
2011        self.control_handle.inner.send::<fidl::encoding::FlexibleType<InspectPuppetActResponse>>(
2012            fidl::encoding::Flexible::new((result,)),
2013            self.tx_id,
2014            0x72760753739e292f,
2015            fidl::encoding::DynamicFlags::FLEXIBLE,
2016        )
2017    }
2018}
2019
2020#[must_use = "FIDL methods require a response to be sent"]
2021#[derive(Debug)]
2022pub struct InspectPuppetActLazyResponder {
2023    control_handle: std::mem::ManuallyDrop<InspectPuppetControlHandle>,
2024    tx_id: u32,
2025}
2026
2027/// Set the the channel to be shutdown (see [`InspectPuppetControlHandle::shutdown`])
2028/// if the responder is dropped without sending a response, so that the client
2029/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
2030impl std::ops::Drop for InspectPuppetActLazyResponder {
2031    fn drop(&mut self) {
2032        self.control_handle.shutdown();
2033        // Safety: drops once, never accessed again
2034        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2035    }
2036}
2037
2038impl fidl::endpoints::Responder for InspectPuppetActLazyResponder {
2039    type ControlHandle = InspectPuppetControlHandle;
2040
2041    fn control_handle(&self) -> &InspectPuppetControlHandle {
2042        &self.control_handle
2043    }
2044
2045    fn drop_without_shutdown(mut self) {
2046        // Safety: drops once, never accessed again due to mem::forget
2047        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2048        // Prevent Drop from running (which would shut down the channel)
2049        std::mem::forget(self);
2050    }
2051}
2052
2053impl InspectPuppetActLazyResponder {
2054    /// Sends a response to the FIDL transaction.
2055    ///
2056    /// Sets the channel to shutdown if an error occurs.
2057    pub fn send(self, mut result: TestResult) -> Result<(), fidl::Error> {
2058        let _result = self.send_raw(result);
2059        if _result.is_err() {
2060            self.control_handle.shutdown();
2061        }
2062        self.drop_without_shutdown();
2063        _result
2064    }
2065
2066    /// Similar to "send" but does not shutdown the channel if an error occurs.
2067    pub fn send_no_shutdown_on_err(self, mut result: TestResult) -> Result<(), fidl::Error> {
2068        let _result = self.send_raw(result);
2069        self.drop_without_shutdown();
2070        _result
2071    }
2072
2073    fn send_raw(&self, mut result: TestResult) -> Result<(), fidl::Error> {
2074        self.control_handle
2075            .inner
2076            .send::<fidl::encoding::FlexibleType<InspectPuppetActLazyResponse>>(
2077                fidl::encoding::Flexible::new((result,)),
2078                self.tx_id,
2079                0x2d43263540a22a5f,
2080                fidl::encoding::DynamicFlags::FLEXIBLE,
2081            )
2082    }
2083}
2084
2085mod internal {
2086    use super::*;
2087    unsafe impl fidl::encoding::TypeMarker for DiffType {
2088        type Owned = Self;
2089
2090        #[inline(always)]
2091        fn inline_align(_context: fidl::encoding::Context) -> usize {
2092            std::mem::align_of::<u32>()
2093        }
2094
2095        #[inline(always)]
2096        fn inline_size(_context: fidl::encoding::Context) -> usize {
2097            std::mem::size_of::<u32>()
2098        }
2099
2100        #[inline(always)]
2101        fn encode_is_copy() -> bool {
2102            false
2103        }
2104
2105        #[inline(always)]
2106        fn decode_is_copy() -> bool {
2107            false
2108        }
2109    }
2110
2111    impl fidl::encoding::ValueTypeMarker for DiffType {
2112        type Borrowed<'a> = Self;
2113        #[inline(always)]
2114        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2115            *value
2116        }
2117    }
2118
2119    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DiffType {
2120        #[inline]
2121        unsafe fn encode(
2122            self,
2123            encoder: &mut fidl::encoding::Encoder<'_, D>,
2124            offset: usize,
2125            _depth: fidl::encoding::Depth,
2126        ) -> fidl::Result<()> {
2127            encoder.debug_check_bounds::<Self>(offset);
2128            encoder.write_num(self.into_primitive(), offset);
2129            Ok(())
2130        }
2131    }
2132
2133    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DiffType {
2134        #[inline(always)]
2135        fn new_empty() -> Self {
2136            Self::unknown()
2137        }
2138
2139        #[inline]
2140        unsafe fn decode(
2141            &mut self,
2142            decoder: &mut fidl::encoding::Decoder<'_, D>,
2143            offset: usize,
2144            _depth: fidl::encoding::Depth,
2145        ) -> fidl::Result<()> {
2146            decoder.debug_check_bounds::<Self>(offset);
2147            let prim = decoder.read_num::<u32>(offset);
2148
2149            *self = Self::from_primitive_allow_unknown(prim);
2150            Ok(())
2151        }
2152    }
2153    unsafe impl fidl::encoding::TypeMarker for LinkDisposition {
2154        type Owned = Self;
2155
2156        #[inline(always)]
2157        fn inline_align(_context: fidl::encoding::Context) -> usize {
2158            std::mem::align_of::<u32>()
2159        }
2160
2161        #[inline(always)]
2162        fn inline_size(_context: fidl::encoding::Context) -> usize {
2163            std::mem::size_of::<u32>()
2164        }
2165
2166        #[inline(always)]
2167        fn encode_is_copy() -> bool {
2168            true
2169        }
2170
2171        #[inline(always)]
2172        fn decode_is_copy() -> bool {
2173            false
2174        }
2175    }
2176
2177    impl fidl::encoding::ValueTypeMarker for LinkDisposition {
2178        type Borrowed<'a> = Self;
2179        #[inline(always)]
2180        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2181            *value
2182        }
2183    }
2184
2185    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2186        for LinkDisposition
2187    {
2188        #[inline]
2189        unsafe fn encode(
2190            self,
2191            encoder: &mut fidl::encoding::Encoder<'_, D>,
2192            offset: usize,
2193            _depth: fidl::encoding::Depth,
2194        ) -> fidl::Result<()> {
2195            encoder.debug_check_bounds::<Self>(offset);
2196            encoder.write_num(self.into_primitive(), offset);
2197            Ok(())
2198        }
2199    }
2200
2201    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LinkDisposition {
2202        #[inline(always)]
2203        fn new_empty() -> Self {
2204            Self::Child
2205        }
2206
2207        #[inline]
2208        unsafe fn decode(
2209            &mut self,
2210            decoder: &mut fidl::encoding::Decoder<'_, D>,
2211            offset: usize,
2212            _depth: fidl::encoding::Depth,
2213        ) -> fidl::Result<()> {
2214            decoder.debug_check_bounds::<Self>(offset);
2215            let prim = decoder.read_num::<u32>(offset);
2216
2217            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2218            Ok(())
2219        }
2220    }
2221    unsafe impl fidl::encoding::TypeMarker for TestResult {
2222        type Owned = Self;
2223
2224        #[inline(always)]
2225        fn inline_align(_context: fidl::encoding::Context) -> usize {
2226            std::mem::align_of::<u32>()
2227        }
2228
2229        #[inline(always)]
2230        fn inline_size(_context: fidl::encoding::Context) -> usize {
2231            std::mem::size_of::<u32>()
2232        }
2233
2234        #[inline(always)]
2235        fn encode_is_copy() -> bool {
2236            false
2237        }
2238
2239        #[inline(always)]
2240        fn decode_is_copy() -> bool {
2241            false
2242        }
2243    }
2244
2245    impl fidl::encoding::ValueTypeMarker for TestResult {
2246        type Borrowed<'a> = Self;
2247        #[inline(always)]
2248        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2249            *value
2250        }
2251    }
2252
2253    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for TestResult {
2254        #[inline]
2255        unsafe fn encode(
2256            self,
2257            encoder: &mut fidl::encoding::Encoder<'_, D>,
2258            offset: usize,
2259            _depth: fidl::encoding::Depth,
2260        ) -> fidl::Result<()> {
2261            encoder.debug_check_bounds::<Self>(offset);
2262            encoder.write_num(self.into_primitive(), offset);
2263            Ok(())
2264        }
2265    }
2266
2267    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestResult {
2268        #[inline(always)]
2269        fn new_empty() -> Self {
2270            Self::unknown()
2271        }
2272
2273        #[inline]
2274        unsafe fn decode(
2275            &mut self,
2276            decoder: &mut fidl::encoding::Decoder<'_, D>,
2277            offset: usize,
2278            _depth: fidl::encoding::Depth,
2279        ) -> fidl::Result<()> {
2280            decoder.debug_check_bounds::<Self>(offset);
2281            let prim = decoder.read_num::<u32>(offset);
2282
2283            *self = Self::from_primitive_allow_unknown(prim);
2284            Ok(())
2285        }
2286    }
2287    unsafe impl fidl::encoding::TypeMarker for ValueType {
2288        type Owned = Self;
2289
2290        #[inline(always)]
2291        fn inline_align(_context: fidl::encoding::Context) -> usize {
2292            std::mem::align_of::<u8>()
2293        }
2294
2295        #[inline(always)]
2296        fn inline_size(_context: fidl::encoding::Context) -> usize {
2297            std::mem::size_of::<u8>()
2298        }
2299
2300        #[inline(always)]
2301        fn encode_is_copy() -> bool {
2302            false
2303        }
2304
2305        #[inline(always)]
2306        fn decode_is_copy() -> bool {
2307            false
2308        }
2309    }
2310
2311    impl fidl::encoding::ValueTypeMarker for ValueType {
2312        type Borrowed<'a> = Self;
2313        #[inline(always)]
2314        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2315            *value
2316        }
2317    }
2318
2319    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ValueType {
2320        #[inline]
2321        unsafe fn encode(
2322            self,
2323            encoder: &mut fidl::encoding::Encoder<'_, D>,
2324            offset: usize,
2325            _depth: fidl::encoding::Depth,
2326        ) -> fidl::Result<()> {
2327            encoder.debug_check_bounds::<Self>(offset);
2328            encoder.write_num(self.into_primitive(), offset);
2329            Ok(())
2330        }
2331    }
2332
2333    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ValueType {
2334        #[inline(always)]
2335        fn new_empty() -> Self {
2336            Self::unknown()
2337        }
2338
2339        #[inline]
2340        unsafe fn decode(
2341            &mut self,
2342            decoder: &mut fidl::encoding::Decoder<'_, D>,
2343            offset: usize,
2344            _depth: fidl::encoding::Depth,
2345        ) -> fidl::Result<()> {
2346            decoder.debug_check_bounds::<Self>(offset);
2347            let prim = decoder.read_num::<u8>(offset);
2348
2349            *self = Self::from_primitive_allow_unknown(prim);
2350            Ok(())
2351        }
2352    }
2353
2354    impl fidl::encoding::ValueTypeMarker for AddNumber {
2355        type Borrowed<'a> = &'a Self;
2356        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2357            value
2358        }
2359    }
2360
2361    unsafe impl fidl::encoding::TypeMarker for AddNumber {
2362        type Owned = Self;
2363
2364        #[inline(always)]
2365        fn inline_align(_context: fidl::encoding::Context) -> usize {
2366            8
2367        }
2368
2369        #[inline(always)]
2370        fn inline_size(_context: fidl::encoding::Context) -> usize {
2371            24
2372        }
2373    }
2374
2375    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddNumber, D>
2376        for &AddNumber
2377    {
2378        #[inline]
2379        unsafe fn encode(
2380            self,
2381            encoder: &mut fidl::encoding::Encoder<'_, D>,
2382            offset: usize,
2383            _depth: fidl::encoding::Depth,
2384        ) -> fidl::Result<()> {
2385            encoder.debug_check_bounds::<AddNumber>(offset);
2386            // Delegate to tuple encoding.
2387            fidl::encoding::Encode::<AddNumber, D>::encode(
2388                (
2389                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2390                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2391                ),
2392                encoder,
2393                offset,
2394                _depth,
2395            )
2396        }
2397    }
2398    unsafe impl<
2399            D: fidl::encoding::ResourceDialect,
2400            T0: fidl::encoding::Encode<u32, D>,
2401            T1: fidl::encoding::Encode<Value, D>,
2402        > fidl::encoding::Encode<AddNumber, D> for (T0, T1)
2403    {
2404        #[inline]
2405        unsafe fn encode(
2406            self,
2407            encoder: &mut fidl::encoding::Encoder<'_, D>,
2408            offset: usize,
2409            depth: fidl::encoding::Depth,
2410        ) -> fidl::Result<()> {
2411            encoder.debug_check_bounds::<AddNumber>(offset);
2412            // Zero out padding regions. There's no need to apply masks
2413            // because the unmasked parts will be overwritten by fields.
2414            unsafe {
2415                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2416                (ptr as *mut u64).write_unaligned(0);
2417            }
2418            // Write the fields.
2419            self.0.encode(encoder, offset + 0, depth)?;
2420            self.1.encode(encoder, offset + 8, depth)?;
2421            Ok(())
2422        }
2423    }
2424
2425    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddNumber {
2426        #[inline(always)]
2427        fn new_empty() -> Self {
2428            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Value, D) }
2429        }
2430
2431        #[inline]
2432        unsafe fn decode(
2433            &mut self,
2434            decoder: &mut fidl::encoding::Decoder<'_, D>,
2435            offset: usize,
2436            _depth: fidl::encoding::Depth,
2437        ) -> fidl::Result<()> {
2438            decoder.debug_check_bounds::<Self>(offset);
2439            // Verify that padding bytes are zero.
2440            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2441            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2442            let mask = 0xffffffff00000000u64;
2443            let maskedval = padval & mask;
2444            if maskedval != 0 {
2445                return Err(fidl::Error::NonZeroPadding {
2446                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2447                });
2448            }
2449            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
2450            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
2451            Ok(())
2452        }
2453    }
2454
2455    impl fidl::encoding::ValueTypeMarker for ArrayAdd {
2456        type Borrowed<'a> = &'a Self;
2457        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2458            value
2459        }
2460    }
2461
2462    unsafe impl fidl::encoding::TypeMarker for ArrayAdd {
2463        type Owned = Self;
2464
2465        #[inline(always)]
2466        fn inline_align(_context: fidl::encoding::Context) -> usize {
2467            8
2468        }
2469
2470        #[inline(always)]
2471        fn inline_size(_context: fidl::encoding::Context) -> usize {
2472            32
2473        }
2474    }
2475
2476    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArrayAdd, D> for &ArrayAdd {
2477        #[inline]
2478        unsafe fn encode(
2479            self,
2480            encoder: &mut fidl::encoding::Encoder<'_, D>,
2481            offset: usize,
2482            _depth: fidl::encoding::Depth,
2483        ) -> fidl::Result<()> {
2484            encoder.debug_check_bounds::<ArrayAdd>(offset);
2485            // Delegate to tuple encoding.
2486            fidl::encoding::Encode::<ArrayAdd, D>::encode(
2487                (
2488                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2489                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.index),
2490                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2491                ),
2492                encoder,
2493                offset,
2494                _depth,
2495            )
2496        }
2497    }
2498    unsafe impl<
2499            D: fidl::encoding::ResourceDialect,
2500            T0: fidl::encoding::Encode<u32, D>,
2501            T1: fidl::encoding::Encode<u64, D>,
2502            T2: fidl::encoding::Encode<Value, D>,
2503        > fidl::encoding::Encode<ArrayAdd, D> for (T0, T1, T2)
2504    {
2505        #[inline]
2506        unsafe fn encode(
2507            self,
2508            encoder: &mut fidl::encoding::Encoder<'_, D>,
2509            offset: usize,
2510            depth: fidl::encoding::Depth,
2511        ) -> fidl::Result<()> {
2512            encoder.debug_check_bounds::<ArrayAdd>(offset);
2513            // Zero out padding regions. There's no need to apply masks
2514            // because the unmasked parts will be overwritten by fields.
2515            unsafe {
2516                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2517                (ptr as *mut u64).write_unaligned(0);
2518            }
2519            // Write the fields.
2520            self.0.encode(encoder, offset + 0, depth)?;
2521            self.1.encode(encoder, offset + 8, depth)?;
2522            self.2.encode(encoder, offset + 16, depth)?;
2523            Ok(())
2524        }
2525    }
2526
2527    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArrayAdd {
2528        #[inline(always)]
2529        fn new_empty() -> Self {
2530            Self {
2531                id: fidl::new_empty!(u32, D),
2532                index: fidl::new_empty!(u64, D),
2533                value: fidl::new_empty!(Value, D),
2534            }
2535        }
2536
2537        #[inline]
2538        unsafe fn decode(
2539            &mut self,
2540            decoder: &mut fidl::encoding::Decoder<'_, D>,
2541            offset: usize,
2542            _depth: fidl::encoding::Depth,
2543        ) -> fidl::Result<()> {
2544            decoder.debug_check_bounds::<Self>(offset);
2545            // Verify that padding bytes are zero.
2546            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2547            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2548            let mask = 0xffffffff00000000u64;
2549            let maskedval = padval & mask;
2550            if maskedval != 0 {
2551                return Err(fidl::Error::NonZeroPadding {
2552                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2553                });
2554            }
2555            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
2556            fidl::decode!(u64, D, &mut self.index, decoder, offset + 8, _depth)?;
2557            fidl::decode!(Value, D, &mut self.value, decoder, offset + 16, _depth)?;
2558            Ok(())
2559        }
2560    }
2561
2562    impl fidl::encoding::ValueTypeMarker for ArraySet {
2563        type Borrowed<'a> = &'a Self;
2564        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2565            value
2566        }
2567    }
2568
2569    unsafe impl fidl::encoding::TypeMarker for ArraySet {
2570        type Owned = Self;
2571
2572        #[inline(always)]
2573        fn inline_align(_context: fidl::encoding::Context) -> usize {
2574            8
2575        }
2576
2577        #[inline(always)]
2578        fn inline_size(_context: fidl::encoding::Context) -> usize {
2579            32
2580        }
2581    }
2582
2583    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArraySet, D> for &ArraySet {
2584        #[inline]
2585        unsafe fn encode(
2586            self,
2587            encoder: &mut fidl::encoding::Encoder<'_, D>,
2588            offset: usize,
2589            _depth: fidl::encoding::Depth,
2590        ) -> fidl::Result<()> {
2591            encoder.debug_check_bounds::<ArraySet>(offset);
2592            // Delegate to tuple encoding.
2593            fidl::encoding::Encode::<ArraySet, D>::encode(
2594                (
2595                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2596                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.index),
2597                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2598                ),
2599                encoder,
2600                offset,
2601                _depth,
2602            )
2603        }
2604    }
2605    unsafe impl<
2606            D: fidl::encoding::ResourceDialect,
2607            T0: fidl::encoding::Encode<u32, D>,
2608            T1: fidl::encoding::Encode<u64, D>,
2609            T2: fidl::encoding::Encode<Value, D>,
2610        > fidl::encoding::Encode<ArraySet, D> for (T0, T1, T2)
2611    {
2612        #[inline]
2613        unsafe fn encode(
2614            self,
2615            encoder: &mut fidl::encoding::Encoder<'_, D>,
2616            offset: usize,
2617            depth: fidl::encoding::Depth,
2618        ) -> fidl::Result<()> {
2619            encoder.debug_check_bounds::<ArraySet>(offset);
2620            // Zero out padding regions. There's no need to apply masks
2621            // because the unmasked parts will be overwritten by fields.
2622            unsafe {
2623                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2624                (ptr as *mut u64).write_unaligned(0);
2625            }
2626            // Write the fields.
2627            self.0.encode(encoder, offset + 0, depth)?;
2628            self.1.encode(encoder, offset + 8, depth)?;
2629            self.2.encode(encoder, offset + 16, depth)?;
2630            Ok(())
2631        }
2632    }
2633
2634    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArraySet {
2635        #[inline(always)]
2636        fn new_empty() -> Self {
2637            Self {
2638                id: fidl::new_empty!(u32, D),
2639                index: fidl::new_empty!(u64, D),
2640                value: fidl::new_empty!(Value, D),
2641            }
2642        }
2643
2644        #[inline]
2645        unsafe fn decode(
2646            &mut self,
2647            decoder: &mut fidl::encoding::Decoder<'_, D>,
2648            offset: usize,
2649            _depth: fidl::encoding::Depth,
2650        ) -> fidl::Result<()> {
2651            decoder.debug_check_bounds::<Self>(offset);
2652            // Verify that padding bytes are zero.
2653            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2654            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2655            let mask = 0xffffffff00000000u64;
2656            let maskedval = padval & mask;
2657            if maskedval != 0 {
2658                return Err(fidl::Error::NonZeroPadding {
2659                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2660                });
2661            }
2662            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
2663            fidl::decode!(u64, D, &mut self.index, decoder, offset + 8, _depth)?;
2664            fidl::decode!(Value, D, &mut self.value, decoder, offset + 16, _depth)?;
2665            Ok(())
2666        }
2667    }
2668
2669    impl fidl::encoding::ValueTypeMarker for ArraySubtract {
2670        type Borrowed<'a> = &'a Self;
2671        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2672            value
2673        }
2674    }
2675
2676    unsafe impl fidl::encoding::TypeMarker for ArraySubtract {
2677        type Owned = Self;
2678
2679        #[inline(always)]
2680        fn inline_align(_context: fidl::encoding::Context) -> usize {
2681            8
2682        }
2683
2684        #[inline(always)]
2685        fn inline_size(_context: fidl::encoding::Context) -> usize {
2686            32
2687        }
2688    }
2689
2690    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArraySubtract, D>
2691        for &ArraySubtract
2692    {
2693        #[inline]
2694        unsafe fn encode(
2695            self,
2696            encoder: &mut fidl::encoding::Encoder<'_, D>,
2697            offset: usize,
2698            _depth: fidl::encoding::Depth,
2699        ) -> fidl::Result<()> {
2700            encoder.debug_check_bounds::<ArraySubtract>(offset);
2701            // Delegate to tuple encoding.
2702            fidl::encoding::Encode::<ArraySubtract, D>::encode(
2703                (
2704                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2705                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.index),
2706                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2707                ),
2708                encoder,
2709                offset,
2710                _depth,
2711            )
2712        }
2713    }
2714    unsafe impl<
2715            D: fidl::encoding::ResourceDialect,
2716            T0: fidl::encoding::Encode<u32, D>,
2717            T1: fidl::encoding::Encode<u64, D>,
2718            T2: fidl::encoding::Encode<Value, D>,
2719        > fidl::encoding::Encode<ArraySubtract, D> for (T0, T1, T2)
2720    {
2721        #[inline]
2722        unsafe fn encode(
2723            self,
2724            encoder: &mut fidl::encoding::Encoder<'_, D>,
2725            offset: usize,
2726            depth: fidl::encoding::Depth,
2727        ) -> fidl::Result<()> {
2728            encoder.debug_check_bounds::<ArraySubtract>(offset);
2729            // Zero out padding regions. There's no need to apply masks
2730            // because the unmasked parts will be overwritten by fields.
2731            unsafe {
2732                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2733                (ptr as *mut u64).write_unaligned(0);
2734            }
2735            // Write the fields.
2736            self.0.encode(encoder, offset + 0, depth)?;
2737            self.1.encode(encoder, offset + 8, depth)?;
2738            self.2.encode(encoder, offset + 16, depth)?;
2739            Ok(())
2740        }
2741    }
2742
2743    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArraySubtract {
2744        #[inline(always)]
2745        fn new_empty() -> Self {
2746            Self {
2747                id: fidl::new_empty!(u32, D),
2748                index: fidl::new_empty!(u64, D),
2749                value: fidl::new_empty!(Value, D),
2750            }
2751        }
2752
2753        #[inline]
2754        unsafe fn decode(
2755            &mut self,
2756            decoder: &mut fidl::encoding::Decoder<'_, D>,
2757            offset: usize,
2758            _depth: fidl::encoding::Depth,
2759        ) -> fidl::Result<()> {
2760            decoder.debug_check_bounds::<Self>(offset);
2761            // Verify that padding bytes are zero.
2762            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2763            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2764            let mask = 0xffffffff00000000u64;
2765            let maskedval = padval & mask;
2766            if maskedval != 0 {
2767                return Err(fidl::Error::NonZeroPadding {
2768                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2769                });
2770            }
2771            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
2772            fidl::decode!(u64, D, &mut self.index, decoder, offset + 8, _depth)?;
2773            fidl::decode!(Value, D, &mut self.value, decoder, offset + 16, _depth)?;
2774            Ok(())
2775        }
2776    }
2777
2778    impl fidl::encoding::ValueTypeMarker for CreateArrayProperty {
2779        type Borrowed<'a> = &'a Self;
2780        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2781            value
2782        }
2783    }
2784
2785    unsafe impl fidl::encoding::TypeMarker for CreateArrayProperty {
2786        type Owned = Self;
2787
2788        #[inline(always)]
2789        fn inline_align(_context: fidl::encoding::Context) -> usize {
2790            8
2791        }
2792
2793        #[inline(always)]
2794        fn inline_size(_context: fidl::encoding::Context) -> usize {
2795            40
2796        }
2797    }
2798
2799    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateArrayProperty, D>
2800        for &CreateArrayProperty
2801    {
2802        #[inline]
2803        unsafe fn encode(
2804            self,
2805            encoder: &mut fidl::encoding::Encoder<'_, D>,
2806            offset: usize,
2807            _depth: fidl::encoding::Depth,
2808        ) -> fidl::Result<()> {
2809            encoder.debug_check_bounds::<CreateArrayProperty>(offset);
2810            // Delegate to tuple encoding.
2811            fidl::encoding::Encode::<CreateArrayProperty, D>::encode(
2812                (
2813                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
2814                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2815                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2816                        &self.name,
2817                    ),
2818                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.slots),
2819                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.value_type),
2820                ),
2821                encoder,
2822                offset,
2823                _depth,
2824            )
2825        }
2826    }
2827    unsafe impl<
2828            D: fidl::encoding::ResourceDialect,
2829            T0: fidl::encoding::Encode<u32, D>,
2830            T1: fidl::encoding::Encode<u32, D>,
2831            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2832            T3: fidl::encoding::Encode<u64, D>,
2833            T4: fidl::encoding::Encode<ValueType, D>,
2834        > fidl::encoding::Encode<CreateArrayProperty, D> for (T0, T1, T2, T3, T4)
2835    {
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::<CreateArrayProperty>(offset);
2844            // Zero out padding regions. There's no need to apply masks
2845            // because the unmasked parts will be overwritten by fields.
2846            unsafe {
2847                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
2848                (ptr as *mut u64).write_unaligned(0);
2849            }
2850            // Write the fields.
2851            self.0.encode(encoder, offset + 0, depth)?;
2852            self.1.encode(encoder, offset + 4, depth)?;
2853            self.2.encode(encoder, offset + 8, depth)?;
2854            self.3.encode(encoder, offset + 24, depth)?;
2855            self.4.encode(encoder, offset + 32, depth)?;
2856            Ok(())
2857        }
2858    }
2859
2860    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateArrayProperty {
2861        #[inline(always)]
2862        fn new_empty() -> Self {
2863            Self {
2864                parent: fidl::new_empty!(u32, D),
2865                id: fidl::new_empty!(u32, D),
2866                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2867                slots: fidl::new_empty!(u64, D),
2868                value_type: fidl::new_empty!(ValueType, D),
2869            }
2870        }
2871
2872        #[inline]
2873        unsafe fn decode(
2874            &mut self,
2875            decoder: &mut fidl::encoding::Decoder<'_, D>,
2876            offset: usize,
2877            _depth: fidl::encoding::Depth,
2878        ) -> fidl::Result<()> {
2879            decoder.debug_check_bounds::<Self>(offset);
2880            // Verify that padding bytes are zero.
2881            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
2882            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2883            let mask = 0xffffffffffffff00u64;
2884            let maskedval = padval & mask;
2885            if maskedval != 0 {
2886                return Err(fidl::Error::NonZeroPadding {
2887                    padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
2888                });
2889            }
2890            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
2891            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
2892            fidl::decode!(
2893                fidl::encoding::UnboundedString,
2894                D,
2895                &mut self.name,
2896                decoder,
2897                offset + 8,
2898                _depth
2899            )?;
2900            fidl::decode!(u64, D, &mut self.slots, decoder, offset + 24, _depth)?;
2901            fidl::decode!(ValueType, D, &mut self.value_type, decoder, offset + 32, _depth)?;
2902            Ok(())
2903        }
2904    }
2905
2906    impl fidl::encoding::ValueTypeMarker for CreateBoolProperty {
2907        type Borrowed<'a> = &'a Self;
2908        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2909            value
2910        }
2911    }
2912
2913    unsafe impl fidl::encoding::TypeMarker for CreateBoolProperty {
2914        type Owned = Self;
2915
2916        #[inline(always)]
2917        fn inline_align(_context: fidl::encoding::Context) -> usize {
2918            8
2919        }
2920
2921        #[inline(always)]
2922        fn inline_size(_context: fidl::encoding::Context) -> usize {
2923            32
2924        }
2925    }
2926
2927    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateBoolProperty, D>
2928        for &CreateBoolProperty
2929    {
2930        #[inline]
2931        unsafe fn encode(
2932            self,
2933            encoder: &mut fidl::encoding::Encoder<'_, D>,
2934            offset: usize,
2935            _depth: fidl::encoding::Depth,
2936        ) -> fidl::Result<()> {
2937            encoder.debug_check_bounds::<CreateBoolProperty>(offset);
2938            // Delegate to tuple encoding.
2939            fidl::encoding::Encode::<CreateBoolProperty, D>::encode(
2940                (
2941                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
2942                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
2943                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
2944                        &self.name,
2945                    ),
2946                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
2947                ),
2948                encoder,
2949                offset,
2950                _depth,
2951            )
2952        }
2953    }
2954    unsafe impl<
2955            D: fidl::encoding::ResourceDialect,
2956            T0: fidl::encoding::Encode<u32, D>,
2957            T1: fidl::encoding::Encode<u32, D>,
2958            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
2959            T3: fidl::encoding::Encode<bool, D>,
2960        > fidl::encoding::Encode<CreateBoolProperty, D> for (T0, T1, T2, T3)
2961    {
2962        #[inline]
2963        unsafe fn encode(
2964            self,
2965            encoder: &mut fidl::encoding::Encoder<'_, D>,
2966            offset: usize,
2967            depth: fidl::encoding::Depth,
2968        ) -> fidl::Result<()> {
2969            encoder.debug_check_bounds::<CreateBoolProperty>(offset);
2970            // Zero out padding regions. There's no need to apply masks
2971            // because the unmasked parts will be overwritten by fields.
2972            unsafe {
2973                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
2974                (ptr as *mut u64).write_unaligned(0);
2975            }
2976            // Write the fields.
2977            self.0.encode(encoder, offset + 0, depth)?;
2978            self.1.encode(encoder, offset + 4, depth)?;
2979            self.2.encode(encoder, offset + 8, depth)?;
2980            self.3.encode(encoder, offset + 24, depth)?;
2981            Ok(())
2982        }
2983    }
2984
2985    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateBoolProperty {
2986        #[inline(always)]
2987        fn new_empty() -> Self {
2988            Self {
2989                parent: fidl::new_empty!(u32, D),
2990                id: fidl::new_empty!(u32, D),
2991                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
2992                value: fidl::new_empty!(bool, D),
2993            }
2994        }
2995
2996        #[inline]
2997        unsafe fn decode(
2998            &mut self,
2999            decoder: &mut fidl::encoding::Decoder<'_, D>,
3000            offset: usize,
3001            _depth: fidl::encoding::Depth,
3002        ) -> fidl::Result<()> {
3003            decoder.debug_check_bounds::<Self>(offset);
3004            // Verify that padding bytes are zero.
3005            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
3006            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3007            let mask = 0xffffffffffffff00u64;
3008            let maskedval = padval & mask;
3009            if maskedval != 0 {
3010                return Err(fidl::Error::NonZeroPadding {
3011                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
3012                });
3013            }
3014            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
3015            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
3016            fidl::decode!(
3017                fidl::encoding::UnboundedString,
3018                D,
3019                &mut self.name,
3020                decoder,
3021                offset + 8,
3022                _depth
3023            )?;
3024            fidl::decode!(bool, D, &mut self.value, decoder, offset + 24, _depth)?;
3025            Ok(())
3026        }
3027    }
3028
3029    impl fidl::encoding::ValueTypeMarker for CreateBytesProperty {
3030        type Borrowed<'a> = &'a Self;
3031        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3032            value
3033        }
3034    }
3035
3036    unsafe impl fidl::encoding::TypeMarker for CreateBytesProperty {
3037        type Owned = Self;
3038
3039        #[inline(always)]
3040        fn inline_align(_context: fidl::encoding::Context) -> usize {
3041            8
3042        }
3043
3044        #[inline(always)]
3045        fn inline_size(_context: fidl::encoding::Context) -> usize {
3046            40
3047        }
3048    }
3049
3050    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateBytesProperty, D>
3051        for &CreateBytesProperty
3052    {
3053        #[inline]
3054        unsafe fn encode(
3055            self,
3056            encoder: &mut fidl::encoding::Encoder<'_, D>,
3057            offset: usize,
3058            _depth: fidl::encoding::Depth,
3059        ) -> fidl::Result<()> {
3060            encoder.debug_check_bounds::<CreateBytesProperty>(offset);
3061            // Delegate to tuple encoding.
3062            fidl::encoding::Encode::<CreateBytesProperty, D>::encode(
3063                (
3064                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
3065                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3066                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
3067                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
3068                ),
3069                encoder, offset, _depth
3070            )
3071        }
3072    }
3073    unsafe impl<
3074            D: fidl::encoding::ResourceDialect,
3075            T0: fidl::encoding::Encode<u32, D>,
3076            T1: fidl::encoding::Encode<u32, D>,
3077            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3078            T3: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
3079        > fidl::encoding::Encode<CreateBytesProperty, D> for (T0, T1, T2, T3)
3080    {
3081        #[inline]
3082        unsafe fn encode(
3083            self,
3084            encoder: &mut fidl::encoding::Encoder<'_, D>,
3085            offset: usize,
3086            depth: fidl::encoding::Depth,
3087        ) -> fidl::Result<()> {
3088            encoder.debug_check_bounds::<CreateBytesProperty>(offset);
3089            // Zero out padding regions. There's no need to apply masks
3090            // because the unmasked parts will be overwritten by fields.
3091            // Write the fields.
3092            self.0.encode(encoder, offset + 0, depth)?;
3093            self.1.encode(encoder, offset + 4, depth)?;
3094            self.2.encode(encoder, offset + 8, depth)?;
3095            self.3.encode(encoder, offset + 24, depth)?;
3096            Ok(())
3097        }
3098    }
3099
3100    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateBytesProperty {
3101        #[inline(always)]
3102        fn new_empty() -> Self {
3103            Self {
3104                parent: fidl::new_empty!(u32, D),
3105                id: fidl::new_empty!(u32, D),
3106                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3107                value: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
3108            }
3109        }
3110
3111        #[inline]
3112        unsafe fn decode(
3113            &mut self,
3114            decoder: &mut fidl::encoding::Decoder<'_, D>,
3115            offset: usize,
3116            _depth: fidl::encoding::Depth,
3117        ) -> fidl::Result<()> {
3118            decoder.debug_check_bounds::<Self>(offset);
3119            // Verify that padding bytes are zero.
3120            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
3121            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
3122            fidl::decode!(
3123                fidl::encoding::UnboundedString,
3124                D,
3125                &mut self.name,
3126                decoder,
3127                offset + 8,
3128                _depth
3129            )?;
3130            fidl::decode!(
3131                fidl::encoding::UnboundedVector<u8>,
3132                D,
3133                &mut self.value,
3134                decoder,
3135                offset + 24,
3136                _depth
3137            )?;
3138            Ok(())
3139        }
3140    }
3141
3142    impl fidl::encoding::ValueTypeMarker for CreateExponentialHistogram {
3143        type Borrowed<'a> = &'a Self;
3144        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3145            value
3146        }
3147    }
3148
3149    unsafe impl fidl::encoding::TypeMarker for CreateExponentialHistogram {
3150        type Owned = Self;
3151
3152        #[inline(always)]
3153        fn inline_align(_context: fidl::encoding::Context) -> usize {
3154            8
3155        }
3156
3157        #[inline(always)]
3158        fn inline_size(_context: fidl::encoding::Context) -> usize {
3159            80
3160        }
3161    }
3162
3163    unsafe impl<D: fidl::encoding::ResourceDialect>
3164        fidl::encoding::Encode<CreateExponentialHistogram, D> for &CreateExponentialHistogram
3165    {
3166        #[inline]
3167        unsafe fn encode(
3168            self,
3169            encoder: &mut fidl::encoding::Encoder<'_, D>,
3170            offset: usize,
3171            _depth: fidl::encoding::Depth,
3172        ) -> fidl::Result<()> {
3173            encoder.debug_check_bounds::<CreateExponentialHistogram>(offset);
3174            // Delegate to tuple encoding.
3175            fidl::encoding::Encode::<CreateExponentialHistogram, D>::encode(
3176                (
3177                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
3178                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3179                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3180                        &self.name,
3181                    ),
3182                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.floor),
3183                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.initial_step),
3184                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.step_multiplier),
3185                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.buckets),
3186                ),
3187                encoder,
3188                offset,
3189                _depth,
3190            )
3191        }
3192    }
3193    unsafe impl<
3194            D: fidl::encoding::ResourceDialect,
3195            T0: fidl::encoding::Encode<u32, D>,
3196            T1: fidl::encoding::Encode<u32, D>,
3197            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3198            T3: fidl::encoding::Encode<Value, D>,
3199            T4: fidl::encoding::Encode<Value, D>,
3200            T5: fidl::encoding::Encode<Value, D>,
3201            T6: fidl::encoding::Encode<u64, D>,
3202        > fidl::encoding::Encode<CreateExponentialHistogram, D> for (T0, T1, T2, T3, T4, T5, T6)
3203    {
3204        #[inline]
3205        unsafe fn encode(
3206            self,
3207            encoder: &mut fidl::encoding::Encoder<'_, D>,
3208            offset: usize,
3209            depth: fidl::encoding::Depth,
3210        ) -> fidl::Result<()> {
3211            encoder.debug_check_bounds::<CreateExponentialHistogram>(offset);
3212            // Zero out padding regions. There's no need to apply masks
3213            // because the unmasked parts will be overwritten by fields.
3214            // Write the fields.
3215            self.0.encode(encoder, offset + 0, depth)?;
3216            self.1.encode(encoder, offset + 4, depth)?;
3217            self.2.encode(encoder, offset + 8, depth)?;
3218            self.3.encode(encoder, offset + 24, depth)?;
3219            self.4.encode(encoder, offset + 40, depth)?;
3220            self.5.encode(encoder, offset + 56, depth)?;
3221            self.6.encode(encoder, offset + 72, depth)?;
3222            Ok(())
3223        }
3224    }
3225
3226    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3227        for CreateExponentialHistogram
3228    {
3229        #[inline(always)]
3230        fn new_empty() -> Self {
3231            Self {
3232                parent: fidl::new_empty!(u32, D),
3233                id: fidl::new_empty!(u32, D),
3234                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3235                floor: fidl::new_empty!(Value, D),
3236                initial_step: fidl::new_empty!(Value, D),
3237                step_multiplier: fidl::new_empty!(Value, D),
3238                buckets: fidl::new_empty!(u64, D),
3239            }
3240        }
3241
3242        #[inline]
3243        unsafe fn decode(
3244            &mut self,
3245            decoder: &mut fidl::encoding::Decoder<'_, D>,
3246            offset: usize,
3247            _depth: fidl::encoding::Depth,
3248        ) -> fidl::Result<()> {
3249            decoder.debug_check_bounds::<Self>(offset);
3250            // Verify that padding bytes are zero.
3251            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
3252            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
3253            fidl::decode!(
3254                fidl::encoding::UnboundedString,
3255                D,
3256                &mut self.name,
3257                decoder,
3258                offset + 8,
3259                _depth
3260            )?;
3261            fidl::decode!(Value, D, &mut self.floor, decoder, offset + 24, _depth)?;
3262            fidl::decode!(Value, D, &mut self.initial_step, decoder, offset + 40, _depth)?;
3263            fidl::decode!(Value, D, &mut self.step_multiplier, decoder, offset + 56, _depth)?;
3264            fidl::decode!(u64, D, &mut self.buckets, decoder, offset + 72, _depth)?;
3265            Ok(())
3266        }
3267    }
3268
3269    impl fidl::encoding::ValueTypeMarker for CreateLazyNode {
3270        type Borrowed<'a> = &'a Self;
3271        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3272            value
3273        }
3274    }
3275
3276    unsafe impl fidl::encoding::TypeMarker for CreateLazyNode {
3277        type Owned = Self;
3278
3279        #[inline(always)]
3280        fn inline_align(_context: fidl::encoding::Context) -> usize {
3281            8
3282        }
3283
3284        #[inline(always)]
3285        fn inline_size(_context: fidl::encoding::Context) -> usize {
3286            48
3287        }
3288    }
3289
3290    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateLazyNode, D>
3291        for &CreateLazyNode
3292    {
3293        #[inline]
3294        unsafe fn encode(
3295            self,
3296            encoder: &mut fidl::encoding::Encoder<'_, D>,
3297            offset: usize,
3298            _depth: fidl::encoding::Depth,
3299        ) -> fidl::Result<()> {
3300            encoder.debug_check_bounds::<CreateLazyNode>(offset);
3301            // Delegate to tuple encoding.
3302            fidl::encoding::Encode::<CreateLazyNode, D>::encode(
3303                (
3304                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
3305                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3306                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.name),
3307                    <LinkDisposition as fidl::encoding::ValueTypeMarker>::borrow(&self.disposition),
3308                    <fidl::encoding::UnboundedVector<Action> as fidl::encoding::ValueTypeMarker>::borrow(&self.actions),
3309                ),
3310                encoder, offset, _depth
3311            )
3312        }
3313    }
3314    unsafe impl<
3315            D: fidl::encoding::ResourceDialect,
3316            T0: fidl::encoding::Encode<u32, D>,
3317            T1: fidl::encoding::Encode<u32, D>,
3318            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3319            T3: fidl::encoding::Encode<LinkDisposition, D>,
3320            T4: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Action>, D>,
3321        > fidl::encoding::Encode<CreateLazyNode, D> for (T0, T1, T2, T3, T4)
3322    {
3323        #[inline]
3324        unsafe fn encode(
3325            self,
3326            encoder: &mut fidl::encoding::Encoder<'_, D>,
3327            offset: usize,
3328            depth: fidl::encoding::Depth,
3329        ) -> fidl::Result<()> {
3330            encoder.debug_check_bounds::<CreateLazyNode>(offset);
3331            // Zero out padding regions. There's no need to apply masks
3332            // because the unmasked parts will be overwritten by fields.
3333            unsafe {
3334                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
3335                (ptr as *mut u64).write_unaligned(0);
3336            }
3337            // Write the fields.
3338            self.0.encode(encoder, offset + 0, depth)?;
3339            self.1.encode(encoder, offset + 4, depth)?;
3340            self.2.encode(encoder, offset + 8, depth)?;
3341            self.3.encode(encoder, offset + 24, depth)?;
3342            self.4.encode(encoder, offset + 32, depth)?;
3343            Ok(())
3344        }
3345    }
3346
3347    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateLazyNode {
3348        #[inline(always)]
3349        fn new_empty() -> Self {
3350            Self {
3351                parent: fidl::new_empty!(u32, D),
3352                id: fidl::new_empty!(u32, D),
3353                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3354                disposition: fidl::new_empty!(LinkDisposition, D),
3355                actions: fidl::new_empty!(fidl::encoding::UnboundedVector<Action>, D),
3356            }
3357        }
3358
3359        #[inline]
3360        unsafe fn decode(
3361            &mut self,
3362            decoder: &mut fidl::encoding::Decoder<'_, D>,
3363            offset: usize,
3364            _depth: fidl::encoding::Depth,
3365        ) -> fidl::Result<()> {
3366            decoder.debug_check_bounds::<Self>(offset);
3367            // Verify that padding bytes are zero.
3368            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
3369            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3370            let mask = 0xffffffff00000000u64;
3371            let maskedval = padval & mask;
3372            if maskedval != 0 {
3373                return Err(fidl::Error::NonZeroPadding {
3374                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
3375                });
3376            }
3377            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
3378            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
3379            fidl::decode!(
3380                fidl::encoding::UnboundedString,
3381                D,
3382                &mut self.name,
3383                decoder,
3384                offset + 8,
3385                _depth
3386            )?;
3387            fidl::decode!(LinkDisposition, D, &mut self.disposition, decoder, offset + 24, _depth)?;
3388            fidl::decode!(
3389                fidl::encoding::UnboundedVector<Action>,
3390                D,
3391                &mut self.actions,
3392                decoder,
3393                offset + 32,
3394                _depth
3395            )?;
3396            Ok(())
3397        }
3398    }
3399
3400    impl fidl::encoding::ValueTypeMarker for CreateLinearHistogram {
3401        type Borrowed<'a> = &'a Self;
3402        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3403            value
3404        }
3405    }
3406
3407    unsafe impl fidl::encoding::TypeMarker for CreateLinearHistogram {
3408        type Owned = Self;
3409
3410        #[inline(always)]
3411        fn inline_align(_context: fidl::encoding::Context) -> usize {
3412            8
3413        }
3414
3415        #[inline(always)]
3416        fn inline_size(_context: fidl::encoding::Context) -> usize {
3417            64
3418        }
3419    }
3420
3421    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateLinearHistogram, D>
3422        for &CreateLinearHistogram
3423    {
3424        #[inline]
3425        unsafe fn encode(
3426            self,
3427            encoder: &mut fidl::encoding::Encoder<'_, D>,
3428            offset: usize,
3429            _depth: fidl::encoding::Depth,
3430        ) -> fidl::Result<()> {
3431            encoder.debug_check_bounds::<CreateLinearHistogram>(offset);
3432            // Delegate to tuple encoding.
3433            fidl::encoding::Encode::<CreateLinearHistogram, D>::encode(
3434                (
3435                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
3436                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3437                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3438                        &self.name,
3439                    ),
3440                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.floor),
3441                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.step_size),
3442                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.buckets),
3443                ),
3444                encoder,
3445                offset,
3446                _depth,
3447            )
3448        }
3449    }
3450    unsafe impl<
3451            D: fidl::encoding::ResourceDialect,
3452            T0: fidl::encoding::Encode<u32, D>,
3453            T1: fidl::encoding::Encode<u32, D>,
3454            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3455            T3: fidl::encoding::Encode<Value, D>,
3456            T4: fidl::encoding::Encode<Value, D>,
3457            T5: fidl::encoding::Encode<u64, D>,
3458        > fidl::encoding::Encode<CreateLinearHistogram, D> for (T0, T1, T2, T3, T4, T5)
3459    {
3460        #[inline]
3461        unsafe fn encode(
3462            self,
3463            encoder: &mut fidl::encoding::Encoder<'_, D>,
3464            offset: usize,
3465            depth: fidl::encoding::Depth,
3466        ) -> fidl::Result<()> {
3467            encoder.debug_check_bounds::<CreateLinearHistogram>(offset);
3468            // Zero out padding regions. There's no need to apply masks
3469            // because the unmasked parts will be overwritten by fields.
3470            // Write the fields.
3471            self.0.encode(encoder, offset + 0, depth)?;
3472            self.1.encode(encoder, offset + 4, depth)?;
3473            self.2.encode(encoder, offset + 8, depth)?;
3474            self.3.encode(encoder, offset + 24, depth)?;
3475            self.4.encode(encoder, offset + 40, depth)?;
3476            self.5.encode(encoder, offset + 56, depth)?;
3477            Ok(())
3478        }
3479    }
3480
3481    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateLinearHistogram {
3482        #[inline(always)]
3483        fn new_empty() -> Self {
3484            Self {
3485                parent: fidl::new_empty!(u32, D),
3486                id: fidl::new_empty!(u32, D),
3487                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3488                floor: fidl::new_empty!(Value, D),
3489                step_size: fidl::new_empty!(Value, D),
3490                buckets: fidl::new_empty!(u64, D),
3491            }
3492        }
3493
3494        #[inline]
3495        unsafe fn decode(
3496            &mut self,
3497            decoder: &mut fidl::encoding::Decoder<'_, D>,
3498            offset: usize,
3499            _depth: fidl::encoding::Depth,
3500        ) -> fidl::Result<()> {
3501            decoder.debug_check_bounds::<Self>(offset);
3502            // Verify that padding bytes are zero.
3503            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
3504            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
3505            fidl::decode!(
3506                fidl::encoding::UnboundedString,
3507                D,
3508                &mut self.name,
3509                decoder,
3510                offset + 8,
3511                _depth
3512            )?;
3513            fidl::decode!(Value, D, &mut self.floor, decoder, offset + 24, _depth)?;
3514            fidl::decode!(Value, D, &mut self.step_size, decoder, offset + 40, _depth)?;
3515            fidl::decode!(u64, D, &mut self.buckets, decoder, offset + 56, _depth)?;
3516            Ok(())
3517        }
3518    }
3519
3520    impl fidl::encoding::ValueTypeMarker for CreateNode {
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 CreateNode {
3528        type Owned = Self;
3529
3530        #[inline(always)]
3531        fn inline_align(_context: fidl::encoding::Context) -> usize {
3532            8
3533        }
3534
3535        #[inline(always)]
3536        fn inline_size(_context: fidl::encoding::Context) -> usize {
3537            24
3538        }
3539    }
3540
3541    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateNode, D>
3542        for &CreateNode
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::<CreateNode>(offset);
3552            // Delegate to tuple encoding.
3553            fidl::encoding::Encode::<CreateNode, D>::encode(
3554                (
3555                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
3556                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3557                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3558                        &self.name,
3559                    ),
3560                ),
3561                encoder,
3562                offset,
3563                _depth,
3564            )
3565        }
3566    }
3567    unsafe impl<
3568            D: fidl::encoding::ResourceDialect,
3569            T0: fidl::encoding::Encode<u32, D>,
3570            T1: fidl::encoding::Encode<u32, D>,
3571            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3572        > fidl::encoding::Encode<CreateNode, D> for (T0, T1, T2)
3573    {
3574        #[inline]
3575        unsafe fn encode(
3576            self,
3577            encoder: &mut fidl::encoding::Encoder<'_, D>,
3578            offset: usize,
3579            depth: fidl::encoding::Depth,
3580        ) -> fidl::Result<()> {
3581            encoder.debug_check_bounds::<CreateNode>(offset);
3582            // Zero out padding regions. There's no need to apply masks
3583            // because the unmasked parts will be overwritten by fields.
3584            // Write the fields.
3585            self.0.encode(encoder, offset + 0, depth)?;
3586            self.1.encode(encoder, offset + 4, depth)?;
3587            self.2.encode(encoder, offset + 8, depth)?;
3588            Ok(())
3589        }
3590    }
3591
3592    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateNode {
3593        #[inline(always)]
3594        fn new_empty() -> Self {
3595            Self {
3596                parent: fidl::new_empty!(u32, D),
3597                id: fidl::new_empty!(u32, D),
3598                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3599            }
3600        }
3601
3602        #[inline]
3603        unsafe fn decode(
3604            &mut self,
3605            decoder: &mut fidl::encoding::Decoder<'_, D>,
3606            offset: usize,
3607            _depth: fidl::encoding::Depth,
3608        ) -> fidl::Result<()> {
3609            decoder.debug_check_bounds::<Self>(offset);
3610            // Verify that padding bytes are zero.
3611            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
3612            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
3613            fidl::decode!(
3614                fidl::encoding::UnboundedString,
3615                D,
3616                &mut self.name,
3617                decoder,
3618                offset + 8,
3619                _depth
3620            )?;
3621            Ok(())
3622        }
3623    }
3624
3625    impl fidl::encoding::ValueTypeMarker for CreateNumericProperty {
3626        type Borrowed<'a> = &'a Self;
3627        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3628            value
3629        }
3630    }
3631
3632    unsafe impl fidl::encoding::TypeMarker for CreateNumericProperty {
3633        type Owned = Self;
3634
3635        #[inline(always)]
3636        fn inline_align(_context: fidl::encoding::Context) -> usize {
3637            8
3638        }
3639
3640        #[inline(always)]
3641        fn inline_size(_context: fidl::encoding::Context) -> usize {
3642            40
3643        }
3644    }
3645
3646    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateNumericProperty, D>
3647        for &CreateNumericProperty
3648    {
3649        #[inline]
3650        unsafe fn encode(
3651            self,
3652            encoder: &mut fidl::encoding::Encoder<'_, D>,
3653            offset: usize,
3654            _depth: fidl::encoding::Depth,
3655        ) -> fidl::Result<()> {
3656            encoder.debug_check_bounds::<CreateNumericProperty>(offset);
3657            // Delegate to tuple encoding.
3658            fidl::encoding::Encode::<CreateNumericProperty, D>::encode(
3659                (
3660                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
3661                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3662                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3663                        &self.name,
3664                    ),
3665                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
3666                ),
3667                encoder,
3668                offset,
3669                _depth,
3670            )
3671        }
3672    }
3673    unsafe impl<
3674            D: fidl::encoding::ResourceDialect,
3675            T0: fidl::encoding::Encode<u32, D>,
3676            T1: fidl::encoding::Encode<u32, D>,
3677            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3678            T3: fidl::encoding::Encode<Value, D>,
3679        > fidl::encoding::Encode<CreateNumericProperty, D> for (T0, T1, T2, T3)
3680    {
3681        #[inline]
3682        unsafe fn encode(
3683            self,
3684            encoder: &mut fidl::encoding::Encoder<'_, D>,
3685            offset: usize,
3686            depth: fidl::encoding::Depth,
3687        ) -> fidl::Result<()> {
3688            encoder.debug_check_bounds::<CreateNumericProperty>(offset);
3689            // Zero out padding regions. There's no need to apply masks
3690            // because the unmasked parts will be overwritten by fields.
3691            // Write the fields.
3692            self.0.encode(encoder, offset + 0, depth)?;
3693            self.1.encode(encoder, offset + 4, depth)?;
3694            self.2.encode(encoder, offset + 8, depth)?;
3695            self.3.encode(encoder, offset + 24, depth)?;
3696            Ok(())
3697        }
3698    }
3699
3700    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateNumericProperty {
3701        #[inline(always)]
3702        fn new_empty() -> Self {
3703            Self {
3704                parent: fidl::new_empty!(u32, D),
3705                id: fidl::new_empty!(u32, D),
3706                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3707                value: fidl::new_empty!(Value, D),
3708            }
3709        }
3710
3711        #[inline]
3712        unsafe fn decode(
3713            &mut self,
3714            decoder: &mut fidl::encoding::Decoder<'_, D>,
3715            offset: usize,
3716            _depth: fidl::encoding::Depth,
3717        ) -> fidl::Result<()> {
3718            decoder.debug_check_bounds::<Self>(offset);
3719            // Verify that padding bytes are zero.
3720            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
3721            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
3722            fidl::decode!(
3723                fidl::encoding::UnboundedString,
3724                D,
3725                &mut self.name,
3726                decoder,
3727                offset + 8,
3728                _depth
3729            )?;
3730            fidl::decode!(Value, D, &mut self.value, decoder, offset + 24, _depth)?;
3731            Ok(())
3732        }
3733    }
3734
3735    impl fidl::encoding::ValueTypeMarker for CreateStringProperty {
3736        type Borrowed<'a> = &'a Self;
3737        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3738            value
3739        }
3740    }
3741
3742    unsafe impl fidl::encoding::TypeMarker for CreateStringProperty {
3743        type Owned = Self;
3744
3745        #[inline(always)]
3746        fn inline_align(_context: fidl::encoding::Context) -> usize {
3747            8
3748        }
3749
3750        #[inline(always)]
3751        fn inline_size(_context: fidl::encoding::Context) -> usize {
3752            40
3753        }
3754    }
3755
3756    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CreateStringProperty, D>
3757        for &CreateStringProperty
3758    {
3759        #[inline]
3760        unsafe fn encode(
3761            self,
3762            encoder: &mut fidl::encoding::Encoder<'_, D>,
3763            offset: usize,
3764            _depth: fidl::encoding::Depth,
3765        ) -> fidl::Result<()> {
3766            encoder.debug_check_bounds::<CreateStringProperty>(offset);
3767            // Delegate to tuple encoding.
3768            fidl::encoding::Encode::<CreateStringProperty, D>::encode(
3769                (
3770                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
3771                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
3772                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3773                        &self.name,
3774                    ),
3775                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3776                        &self.value,
3777                    ),
3778                ),
3779                encoder,
3780                offset,
3781                _depth,
3782            )
3783        }
3784    }
3785    unsafe impl<
3786            D: fidl::encoding::ResourceDialect,
3787            T0: fidl::encoding::Encode<u32, D>,
3788            T1: fidl::encoding::Encode<u32, D>,
3789            T2: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3790            T3: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3791        > fidl::encoding::Encode<CreateStringProperty, D> for (T0, T1, T2, T3)
3792    {
3793        #[inline]
3794        unsafe fn encode(
3795            self,
3796            encoder: &mut fidl::encoding::Encoder<'_, D>,
3797            offset: usize,
3798            depth: fidl::encoding::Depth,
3799        ) -> fidl::Result<()> {
3800            encoder.debug_check_bounds::<CreateStringProperty>(offset);
3801            // Zero out padding regions. There's no need to apply masks
3802            // because the unmasked parts will be overwritten by fields.
3803            // Write the fields.
3804            self.0.encode(encoder, offset + 0, depth)?;
3805            self.1.encode(encoder, offset + 4, depth)?;
3806            self.2.encode(encoder, offset + 8, depth)?;
3807            self.3.encode(encoder, offset + 24, depth)?;
3808            Ok(())
3809        }
3810    }
3811
3812    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateStringProperty {
3813        #[inline(always)]
3814        fn new_empty() -> Self {
3815            Self {
3816                parent: fidl::new_empty!(u32, D),
3817                id: fidl::new_empty!(u32, D),
3818                name: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3819                value: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3820            }
3821        }
3822
3823        #[inline]
3824        unsafe fn decode(
3825            &mut self,
3826            decoder: &mut fidl::encoding::Decoder<'_, D>,
3827            offset: usize,
3828            _depth: fidl::encoding::Depth,
3829        ) -> fidl::Result<()> {
3830            decoder.debug_check_bounds::<Self>(offset);
3831            // Verify that padding bytes are zero.
3832            fidl::decode!(u32, D, &mut self.parent, decoder, offset + 0, _depth)?;
3833            fidl::decode!(u32, D, &mut self.id, decoder, offset + 4, _depth)?;
3834            fidl::decode!(
3835                fidl::encoding::UnboundedString,
3836                D,
3837                &mut self.name,
3838                decoder,
3839                offset + 8,
3840                _depth
3841            )?;
3842            fidl::decode!(
3843                fidl::encoding::UnboundedString,
3844                D,
3845                &mut self.value,
3846                decoder,
3847                offset + 24,
3848                _depth
3849            )?;
3850            Ok(())
3851        }
3852    }
3853
3854    impl fidl::encoding::ValueTypeMarker for DeleteLazyNode {
3855        type Borrowed<'a> = &'a Self;
3856        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3857            value
3858        }
3859    }
3860
3861    unsafe impl fidl::encoding::TypeMarker for DeleteLazyNode {
3862        type Owned = Self;
3863
3864        #[inline(always)]
3865        fn inline_align(_context: fidl::encoding::Context) -> usize {
3866            4
3867        }
3868
3869        #[inline(always)]
3870        fn inline_size(_context: fidl::encoding::Context) -> usize {
3871            4
3872        }
3873        #[inline(always)]
3874        fn encode_is_copy() -> bool {
3875            true
3876        }
3877
3878        #[inline(always)]
3879        fn decode_is_copy() -> bool {
3880            true
3881        }
3882    }
3883
3884    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteLazyNode, D>
3885        for &DeleteLazyNode
3886    {
3887        #[inline]
3888        unsafe fn encode(
3889            self,
3890            encoder: &mut fidl::encoding::Encoder<'_, D>,
3891            offset: usize,
3892            _depth: fidl::encoding::Depth,
3893        ) -> fidl::Result<()> {
3894            encoder.debug_check_bounds::<DeleteLazyNode>(offset);
3895            unsafe {
3896                // Copy the object into the buffer.
3897                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3898                (buf_ptr as *mut DeleteLazyNode)
3899                    .write_unaligned((self as *const DeleteLazyNode).read());
3900                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3901                // done second because the memcpy will write garbage to these bytes.
3902            }
3903            Ok(())
3904        }
3905    }
3906    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
3907        fidl::encoding::Encode<DeleteLazyNode, D> for (T0,)
3908    {
3909        #[inline]
3910        unsafe fn encode(
3911            self,
3912            encoder: &mut fidl::encoding::Encoder<'_, D>,
3913            offset: usize,
3914            depth: fidl::encoding::Depth,
3915        ) -> fidl::Result<()> {
3916            encoder.debug_check_bounds::<DeleteLazyNode>(offset);
3917            // Zero out padding regions. There's no need to apply masks
3918            // because the unmasked parts will be overwritten by fields.
3919            // Write the fields.
3920            self.0.encode(encoder, offset + 0, depth)?;
3921            Ok(())
3922        }
3923    }
3924
3925    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteLazyNode {
3926        #[inline(always)]
3927        fn new_empty() -> Self {
3928            Self { id: fidl::new_empty!(u32, D) }
3929        }
3930
3931        #[inline]
3932        unsafe fn decode(
3933            &mut self,
3934            decoder: &mut fidl::encoding::Decoder<'_, D>,
3935            offset: usize,
3936            _depth: fidl::encoding::Depth,
3937        ) -> fidl::Result<()> {
3938            decoder.debug_check_bounds::<Self>(offset);
3939            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3940            // Verify that padding bytes are zero.
3941            // Copy from the buffer into the object.
3942            unsafe {
3943                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3944            }
3945            Ok(())
3946        }
3947    }
3948
3949    impl fidl::encoding::ValueTypeMarker for DeleteNode {
3950        type Borrowed<'a> = &'a Self;
3951        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3952            value
3953        }
3954    }
3955
3956    unsafe impl fidl::encoding::TypeMarker for DeleteNode {
3957        type Owned = Self;
3958
3959        #[inline(always)]
3960        fn inline_align(_context: fidl::encoding::Context) -> usize {
3961            4
3962        }
3963
3964        #[inline(always)]
3965        fn inline_size(_context: fidl::encoding::Context) -> usize {
3966            4
3967        }
3968        #[inline(always)]
3969        fn encode_is_copy() -> bool {
3970            true
3971        }
3972
3973        #[inline(always)]
3974        fn decode_is_copy() -> bool {
3975            true
3976        }
3977    }
3978
3979    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteNode, D>
3980        for &DeleteNode
3981    {
3982        #[inline]
3983        unsafe fn encode(
3984            self,
3985            encoder: &mut fidl::encoding::Encoder<'_, D>,
3986            offset: usize,
3987            _depth: fidl::encoding::Depth,
3988        ) -> fidl::Result<()> {
3989            encoder.debug_check_bounds::<DeleteNode>(offset);
3990            unsafe {
3991                // Copy the object into the buffer.
3992                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3993                (buf_ptr as *mut DeleteNode).write_unaligned((self as *const DeleteNode).read());
3994                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3995                // done second because the memcpy will write garbage to these bytes.
3996            }
3997            Ok(())
3998        }
3999    }
4000    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4001        fidl::encoding::Encode<DeleteNode, D> for (T0,)
4002    {
4003        #[inline]
4004        unsafe fn encode(
4005            self,
4006            encoder: &mut fidl::encoding::Encoder<'_, D>,
4007            offset: usize,
4008            depth: fidl::encoding::Depth,
4009        ) -> fidl::Result<()> {
4010            encoder.debug_check_bounds::<DeleteNode>(offset);
4011            // Zero out padding regions. There's no need to apply masks
4012            // because the unmasked parts will be overwritten by fields.
4013            // Write the fields.
4014            self.0.encode(encoder, offset + 0, depth)?;
4015            Ok(())
4016        }
4017    }
4018
4019    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteNode {
4020        #[inline(always)]
4021        fn new_empty() -> Self {
4022            Self { id: fidl::new_empty!(u32, D) }
4023        }
4024
4025        #[inline]
4026        unsafe fn decode(
4027            &mut self,
4028            decoder: &mut fidl::encoding::Decoder<'_, D>,
4029            offset: usize,
4030            _depth: fidl::encoding::Depth,
4031        ) -> fidl::Result<()> {
4032            decoder.debug_check_bounds::<Self>(offset);
4033            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4034            // Verify that padding bytes are zero.
4035            // Copy from the buffer into the object.
4036            unsafe {
4037                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4038            }
4039            Ok(())
4040        }
4041    }
4042
4043    impl fidl::encoding::ValueTypeMarker for DeleteProperty {
4044        type Borrowed<'a> = &'a Self;
4045        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4046            value
4047        }
4048    }
4049
4050    unsafe impl fidl::encoding::TypeMarker for DeleteProperty {
4051        type Owned = Self;
4052
4053        #[inline(always)]
4054        fn inline_align(_context: fidl::encoding::Context) -> usize {
4055            4
4056        }
4057
4058        #[inline(always)]
4059        fn inline_size(_context: fidl::encoding::Context) -> usize {
4060            4
4061        }
4062        #[inline(always)]
4063        fn encode_is_copy() -> bool {
4064            true
4065        }
4066
4067        #[inline(always)]
4068        fn decode_is_copy() -> bool {
4069            true
4070        }
4071    }
4072
4073    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DeleteProperty, D>
4074        for &DeleteProperty
4075    {
4076        #[inline]
4077        unsafe fn encode(
4078            self,
4079            encoder: &mut fidl::encoding::Encoder<'_, D>,
4080            offset: usize,
4081            _depth: fidl::encoding::Depth,
4082        ) -> fidl::Result<()> {
4083            encoder.debug_check_bounds::<DeleteProperty>(offset);
4084            unsafe {
4085                // Copy the object into the buffer.
4086                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4087                (buf_ptr as *mut DeleteProperty)
4088                    .write_unaligned((self as *const DeleteProperty).read());
4089                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4090                // done second because the memcpy will write garbage to these bytes.
4091            }
4092            Ok(())
4093        }
4094    }
4095    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4096        fidl::encoding::Encode<DeleteProperty, D> for (T0,)
4097    {
4098        #[inline]
4099        unsafe fn encode(
4100            self,
4101            encoder: &mut fidl::encoding::Encoder<'_, D>,
4102            offset: usize,
4103            depth: fidl::encoding::Depth,
4104        ) -> fidl::Result<()> {
4105            encoder.debug_check_bounds::<DeleteProperty>(offset);
4106            // Zero out padding regions. There's no need to apply masks
4107            // because the unmasked parts will be overwritten by fields.
4108            // Write the fields.
4109            self.0.encode(encoder, offset + 0, depth)?;
4110            Ok(())
4111        }
4112    }
4113
4114    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteProperty {
4115        #[inline(always)]
4116        fn new_empty() -> Self {
4117            Self { id: fidl::new_empty!(u32, D) }
4118        }
4119
4120        #[inline]
4121        unsafe fn decode(
4122            &mut self,
4123            decoder: &mut fidl::encoding::Decoder<'_, D>,
4124            offset: usize,
4125            _depth: fidl::encoding::Depth,
4126        ) -> fidl::Result<()> {
4127            decoder.debug_check_bounds::<Self>(offset);
4128            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4129            // Verify that padding bytes are zero.
4130            // Copy from the buffer into the object.
4131            unsafe {
4132                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4133            }
4134            Ok(())
4135        }
4136    }
4137
4138    impl fidl::encoding::ValueTypeMarker for Insert {
4139        type Borrowed<'a> = &'a Self;
4140        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4141            value
4142        }
4143    }
4144
4145    unsafe impl fidl::encoding::TypeMarker for Insert {
4146        type Owned = Self;
4147
4148        #[inline(always)]
4149        fn inline_align(_context: fidl::encoding::Context) -> usize {
4150            8
4151        }
4152
4153        #[inline(always)]
4154        fn inline_size(_context: fidl::encoding::Context) -> usize {
4155            24
4156        }
4157    }
4158
4159    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Insert, D> for &Insert {
4160        #[inline]
4161        unsafe fn encode(
4162            self,
4163            encoder: &mut fidl::encoding::Encoder<'_, D>,
4164            offset: usize,
4165            _depth: fidl::encoding::Depth,
4166        ) -> fidl::Result<()> {
4167            encoder.debug_check_bounds::<Insert>(offset);
4168            // Delegate to tuple encoding.
4169            fidl::encoding::Encode::<Insert, D>::encode(
4170                (
4171                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
4172                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
4173                ),
4174                encoder,
4175                offset,
4176                _depth,
4177            )
4178        }
4179    }
4180    unsafe impl<
4181            D: fidl::encoding::ResourceDialect,
4182            T0: fidl::encoding::Encode<u32, D>,
4183            T1: fidl::encoding::Encode<Value, D>,
4184        > fidl::encoding::Encode<Insert, D> for (T0, T1)
4185    {
4186        #[inline]
4187        unsafe fn encode(
4188            self,
4189            encoder: &mut fidl::encoding::Encoder<'_, D>,
4190            offset: usize,
4191            depth: fidl::encoding::Depth,
4192        ) -> fidl::Result<()> {
4193            encoder.debug_check_bounds::<Insert>(offset);
4194            // Zero out padding regions. There's no need to apply masks
4195            // because the unmasked parts will be overwritten by fields.
4196            unsafe {
4197                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
4198                (ptr as *mut u64).write_unaligned(0);
4199            }
4200            // Write the fields.
4201            self.0.encode(encoder, offset + 0, depth)?;
4202            self.1.encode(encoder, offset + 8, depth)?;
4203            Ok(())
4204        }
4205    }
4206
4207    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Insert {
4208        #[inline(always)]
4209        fn new_empty() -> Self {
4210            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Value, D) }
4211        }
4212
4213        #[inline]
4214        unsafe fn decode(
4215            &mut self,
4216            decoder: &mut fidl::encoding::Decoder<'_, D>,
4217            offset: usize,
4218            _depth: fidl::encoding::Depth,
4219        ) -> fidl::Result<()> {
4220            decoder.debug_check_bounds::<Self>(offset);
4221            // Verify that padding bytes are zero.
4222            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
4223            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4224            let mask = 0xffffffff00000000u64;
4225            let maskedval = padval & mask;
4226            if maskedval != 0 {
4227                return Err(fidl::Error::NonZeroPadding {
4228                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
4229                });
4230            }
4231            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
4232            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
4233            Ok(())
4234        }
4235    }
4236
4237    impl fidl::encoding::ValueTypeMarker for InsertMultiple {
4238        type Borrowed<'a> = &'a Self;
4239        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4240            value
4241        }
4242    }
4243
4244    unsafe impl fidl::encoding::TypeMarker for InsertMultiple {
4245        type Owned = Self;
4246
4247        #[inline(always)]
4248        fn inline_align(_context: fidl::encoding::Context) -> usize {
4249            8
4250        }
4251
4252        #[inline(always)]
4253        fn inline_size(_context: fidl::encoding::Context) -> usize {
4254            32
4255        }
4256    }
4257
4258    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InsertMultiple, D>
4259        for &InsertMultiple
4260    {
4261        #[inline]
4262        unsafe fn encode(
4263            self,
4264            encoder: &mut fidl::encoding::Encoder<'_, D>,
4265            offset: usize,
4266            _depth: fidl::encoding::Depth,
4267        ) -> fidl::Result<()> {
4268            encoder.debug_check_bounds::<InsertMultiple>(offset);
4269            // Delegate to tuple encoding.
4270            fidl::encoding::Encode::<InsertMultiple, D>::encode(
4271                (
4272                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
4273                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
4274                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.count),
4275                ),
4276                encoder,
4277                offset,
4278                _depth,
4279            )
4280        }
4281    }
4282    unsafe impl<
4283            D: fidl::encoding::ResourceDialect,
4284            T0: fidl::encoding::Encode<u32, D>,
4285            T1: fidl::encoding::Encode<Value, D>,
4286            T2: fidl::encoding::Encode<u64, D>,
4287        > fidl::encoding::Encode<InsertMultiple, D> for (T0, T1, T2)
4288    {
4289        #[inline]
4290        unsafe fn encode(
4291            self,
4292            encoder: &mut fidl::encoding::Encoder<'_, D>,
4293            offset: usize,
4294            depth: fidl::encoding::Depth,
4295        ) -> fidl::Result<()> {
4296            encoder.debug_check_bounds::<InsertMultiple>(offset);
4297            // Zero out padding regions. There's no need to apply masks
4298            // because the unmasked parts will be overwritten by fields.
4299            unsafe {
4300                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
4301                (ptr as *mut u64).write_unaligned(0);
4302            }
4303            // Write the fields.
4304            self.0.encode(encoder, offset + 0, depth)?;
4305            self.1.encode(encoder, offset + 8, depth)?;
4306            self.2.encode(encoder, offset + 24, depth)?;
4307            Ok(())
4308        }
4309    }
4310
4311    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InsertMultiple {
4312        #[inline(always)]
4313        fn new_empty() -> Self {
4314            Self {
4315                id: fidl::new_empty!(u32, D),
4316                value: fidl::new_empty!(Value, D),
4317                count: fidl::new_empty!(u64, D),
4318            }
4319        }
4320
4321        #[inline]
4322        unsafe fn decode(
4323            &mut self,
4324            decoder: &mut fidl::encoding::Decoder<'_, D>,
4325            offset: usize,
4326            _depth: fidl::encoding::Depth,
4327        ) -> fidl::Result<()> {
4328            decoder.debug_check_bounds::<Self>(offset);
4329            // Verify that padding bytes are zero.
4330            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
4331            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4332            let mask = 0xffffffff00000000u64;
4333            let maskedval = padval & mask;
4334            if maskedval != 0 {
4335                return Err(fidl::Error::NonZeroPadding {
4336                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
4337                });
4338            }
4339            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
4340            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
4341            fidl::decode!(u64, D, &mut self.count, decoder, offset + 24, _depth)?;
4342            Ok(())
4343        }
4344    }
4345
4346    impl fidl::encoding::ValueTypeMarker for InspectPuppetActLazyRequest {
4347        type Borrowed<'a> = &'a Self;
4348        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4349            value
4350        }
4351    }
4352
4353    unsafe impl fidl::encoding::TypeMarker for InspectPuppetActLazyRequest {
4354        type Owned = Self;
4355
4356        #[inline(always)]
4357        fn inline_align(_context: fidl::encoding::Context) -> usize {
4358            8
4359        }
4360
4361        #[inline(always)]
4362        fn inline_size(_context: fidl::encoding::Context) -> usize {
4363            16
4364        }
4365    }
4366
4367    unsafe impl<D: fidl::encoding::ResourceDialect>
4368        fidl::encoding::Encode<InspectPuppetActLazyRequest, D> for &InspectPuppetActLazyRequest
4369    {
4370        #[inline]
4371        unsafe fn encode(
4372            self,
4373            encoder: &mut fidl::encoding::Encoder<'_, D>,
4374            offset: usize,
4375            _depth: fidl::encoding::Depth,
4376        ) -> fidl::Result<()> {
4377            encoder.debug_check_bounds::<InspectPuppetActLazyRequest>(offset);
4378            // Delegate to tuple encoding.
4379            fidl::encoding::Encode::<InspectPuppetActLazyRequest, D>::encode(
4380                (<LazyAction as fidl::encoding::ValueTypeMarker>::borrow(&self.lazy_action),),
4381                encoder,
4382                offset,
4383                _depth,
4384            )
4385        }
4386    }
4387    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<LazyAction, D>>
4388        fidl::encoding::Encode<InspectPuppetActLazyRequest, D> for (T0,)
4389    {
4390        #[inline]
4391        unsafe fn encode(
4392            self,
4393            encoder: &mut fidl::encoding::Encoder<'_, D>,
4394            offset: usize,
4395            depth: fidl::encoding::Depth,
4396        ) -> fidl::Result<()> {
4397            encoder.debug_check_bounds::<InspectPuppetActLazyRequest>(offset);
4398            // Zero out padding regions. There's no need to apply masks
4399            // because the unmasked parts will be overwritten by fields.
4400            // Write the fields.
4401            self.0.encode(encoder, offset + 0, depth)?;
4402            Ok(())
4403        }
4404    }
4405
4406    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4407        for InspectPuppetActLazyRequest
4408    {
4409        #[inline(always)]
4410        fn new_empty() -> Self {
4411            Self { lazy_action: fidl::new_empty!(LazyAction, D) }
4412        }
4413
4414        #[inline]
4415        unsafe fn decode(
4416            &mut self,
4417            decoder: &mut fidl::encoding::Decoder<'_, D>,
4418            offset: usize,
4419            _depth: fidl::encoding::Depth,
4420        ) -> fidl::Result<()> {
4421            decoder.debug_check_bounds::<Self>(offset);
4422            // Verify that padding bytes are zero.
4423            fidl::decode!(LazyAction, D, &mut self.lazy_action, decoder, offset + 0, _depth)?;
4424            Ok(())
4425        }
4426    }
4427
4428    impl fidl::encoding::ValueTypeMarker for InspectPuppetActRequest {
4429        type Borrowed<'a> = &'a Self;
4430        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4431            value
4432        }
4433    }
4434
4435    unsafe impl fidl::encoding::TypeMarker for InspectPuppetActRequest {
4436        type Owned = Self;
4437
4438        #[inline(always)]
4439        fn inline_align(_context: fidl::encoding::Context) -> usize {
4440            8
4441        }
4442
4443        #[inline(always)]
4444        fn inline_size(_context: fidl::encoding::Context) -> usize {
4445            16
4446        }
4447    }
4448
4449    unsafe impl<D: fidl::encoding::ResourceDialect>
4450        fidl::encoding::Encode<InspectPuppetActRequest, D> for &InspectPuppetActRequest
4451    {
4452        #[inline]
4453        unsafe fn encode(
4454            self,
4455            encoder: &mut fidl::encoding::Encoder<'_, D>,
4456            offset: usize,
4457            _depth: fidl::encoding::Depth,
4458        ) -> fidl::Result<()> {
4459            encoder.debug_check_bounds::<InspectPuppetActRequest>(offset);
4460            // Delegate to tuple encoding.
4461            fidl::encoding::Encode::<InspectPuppetActRequest, D>::encode(
4462                (<Action as fidl::encoding::ValueTypeMarker>::borrow(&self.action),),
4463                encoder,
4464                offset,
4465                _depth,
4466            )
4467        }
4468    }
4469    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Action, D>>
4470        fidl::encoding::Encode<InspectPuppetActRequest, D> for (T0,)
4471    {
4472        #[inline]
4473        unsafe fn encode(
4474            self,
4475            encoder: &mut fidl::encoding::Encoder<'_, D>,
4476            offset: usize,
4477            depth: fidl::encoding::Depth,
4478        ) -> fidl::Result<()> {
4479            encoder.debug_check_bounds::<InspectPuppetActRequest>(offset);
4480            // Zero out padding regions. There's no need to apply masks
4481            // because the unmasked parts will be overwritten by fields.
4482            // Write the fields.
4483            self.0.encode(encoder, offset + 0, depth)?;
4484            Ok(())
4485        }
4486    }
4487
4488    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4489        for InspectPuppetActRequest
4490    {
4491        #[inline(always)]
4492        fn new_empty() -> Self {
4493            Self { action: fidl::new_empty!(Action, D) }
4494        }
4495
4496        #[inline]
4497        unsafe fn decode(
4498            &mut self,
4499            decoder: &mut fidl::encoding::Decoder<'_, D>,
4500            offset: usize,
4501            _depth: fidl::encoding::Depth,
4502        ) -> fidl::Result<()> {
4503            decoder.debug_check_bounds::<Self>(offset);
4504            // Verify that padding bytes are zero.
4505            fidl::decode!(Action, D, &mut self.action, decoder, offset + 0, _depth)?;
4506            Ok(())
4507        }
4508    }
4509
4510    impl fidl::encoding::ValueTypeMarker for InspectPuppetInitializeRequest {
4511        type Borrowed<'a> = &'a Self;
4512        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4513            value
4514        }
4515    }
4516
4517    unsafe impl fidl::encoding::TypeMarker for InspectPuppetInitializeRequest {
4518        type Owned = Self;
4519
4520        #[inline(always)]
4521        fn inline_align(_context: fidl::encoding::Context) -> usize {
4522            8
4523        }
4524
4525        #[inline(always)]
4526        fn inline_size(_context: fidl::encoding::Context) -> usize {
4527            16
4528        }
4529    }
4530
4531    unsafe impl<D: fidl::encoding::ResourceDialect>
4532        fidl::encoding::Encode<InspectPuppetInitializeRequest, D>
4533        for &InspectPuppetInitializeRequest
4534    {
4535        #[inline]
4536        unsafe fn encode(
4537            self,
4538            encoder: &mut fidl::encoding::Encoder<'_, D>,
4539            offset: usize,
4540            _depth: fidl::encoding::Depth,
4541        ) -> fidl::Result<()> {
4542            encoder.debug_check_bounds::<InspectPuppetInitializeRequest>(offset);
4543            // Delegate to tuple encoding.
4544            fidl::encoding::Encode::<InspectPuppetInitializeRequest, D>::encode(
4545                (<InitializationParams as fidl::encoding::ValueTypeMarker>::borrow(&self.params),),
4546                encoder,
4547                offset,
4548                _depth,
4549            )
4550        }
4551    }
4552    unsafe impl<
4553            D: fidl::encoding::ResourceDialect,
4554            T0: fidl::encoding::Encode<InitializationParams, D>,
4555        > fidl::encoding::Encode<InspectPuppetInitializeRequest, D> for (T0,)
4556    {
4557        #[inline]
4558        unsafe fn encode(
4559            self,
4560            encoder: &mut fidl::encoding::Encoder<'_, D>,
4561            offset: usize,
4562            depth: fidl::encoding::Depth,
4563        ) -> fidl::Result<()> {
4564            encoder.debug_check_bounds::<InspectPuppetInitializeRequest>(offset);
4565            // Zero out padding regions. There's no need to apply masks
4566            // because the unmasked parts will be overwritten by fields.
4567            // Write the fields.
4568            self.0.encode(encoder, offset + 0, depth)?;
4569            Ok(())
4570        }
4571    }
4572
4573    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4574        for InspectPuppetInitializeRequest
4575    {
4576        #[inline(always)]
4577        fn new_empty() -> Self {
4578            Self { params: fidl::new_empty!(InitializationParams, D) }
4579        }
4580
4581        #[inline]
4582        unsafe fn decode(
4583            &mut self,
4584            decoder: &mut fidl::encoding::Decoder<'_, D>,
4585            offset: usize,
4586            _depth: fidl::encoding::Depth,
4587        ) -> fidl::Result<()> {
4588            decoder.debug_check_bounds::<Self>(offset);
4589            // Verify that padding bytes are zero.
4590            fidl::decode!(InitializationParams, D, &mut self.params, decoder, offset + 0, _depth)?;
4591            Ok(())
4592        }
4593    }
4594
4595    impl fidl::encoding::ValueTypeMarker for InspectPuppetInitializeTreeRequest {
4596        type Borrowed<'a> = &'a Self;
4597        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4598            value
4599        }
4600    }
4601
4602    unsafe impl fidl::encoding::TypeMarker for InspectPuppetInitializeTreeRequest {
4603        type Owned = Self;
4604
4605        #[inline(always)]
4606        fn inline_align(_context: fidl::encoding::Context) -> usize {
4607            8
4608        }
4609
4610        #[inline(always)]
4611        fn inline_size(_context: fidl::encoding::Context) -> usize {
4612            16
4613        }
4614    }
4615
4616    unsafe impl<D: fidl::encoding::ResourceDialect>
4617        fidl::encoding::Encode<InspectPuppetInitializeTreeRequest, D>
4618        for &InspectPuppetInitializeTreeRequest
4619    {
4620        #[inline]
4621        unsafe fn encode(
4622            self,
4623            encoder: &mut fidl::encoding::Encoder<'_, D>,
4624            offset: usize,
4625            _depth: fidl::encoding::Depth,
4626        ) -> fidl::Result<()> {
4627            encoder.debug_check_bounds::<InspectPuppetInitializeTreeRequest>(offset);
4628            // Delegate to tuple encoding.
4629            fidl::encoding::Encode::<InspectPuppetInitializeTreeRequest, D>::encode(
4630                (<InitializationParams as fidl::encoding::ValueTypeMarker>::borrow(&self.params),),
4631                encoder,
4632                offset,
4633                _depth,
4634            )
4635        }
4636    }
4637    unsafe impl<
4638            D: fidl::encoding::ResourceDialect,
4639            T0: fidl::encoding::Encode<InitializationParams, D>,
4640        > fidl::encoding::Encode<InspectPuppetInitializeTreeRequest, D> for (T0,)
4641    {
4642        #[inline]
4643        unsafe fn encode(
4644            self,
4645            encoder: &mut fidl::encoding::Encoder<'_, D>,
4646            offset: usize,
4647            depth: fidl::encoding::Depth,
4648        ) -> fidl::Result<()> {
4649            encoder.debug_check_bounds::<InspectPuppetInitializeTreeRequest>(offset);
4650            // Zero out padding regions. There's no need to apply masks
4651            // because the unmasked parts will be overwritten by fields.
4652            // Write the fields.
4653            self.0.encode(encoder, offset + 0, depth)?;
4654            Ok(())
4655        }
4656    }
4657
4658    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4659        for InspectPuppetInitializeTreeRequest
4660    {
4661        #[inline(always)]
4662        fn new_empty() -> Self {
4663            Self { params: fidl::new_empty!(InitializationParams, D) }
4664        }
4665
4666        #[inline]
4667        unsafe fn decode(
4668            &mut self,
4669            decoder: &mut fidl::encoding::Decoder<'_, D>,
4670            offset: usize,
4671            _depth: fidl::encoding::Depth,
4672        ) -> fidl::Result<()> {
4673            decoder.debug_check_bounds::<Self>(offset);
4674            // Verify that padding bytes are zero.
4675            fidl::decode!(InitializationParams, D, &mut self.params, decoder, offset + 0, _depth)?;
4676            Ok(())
4677        }
4678    }
4679
4680    impl fidl::encoding::ValueTypeMarker for InspectPuppetActLazyResponse {
4681        type Borrowed<'a> = &'a Self;
4682        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4683            value
4684        }
4685    }
4686
4687    unsafe impl fidl::encoding::TypeMarker for InspectPuppetActLazyResponse {
4688        type Owned = Self;
4689
4690        #[inline(always)]
4691        fn inline_align(_context: fidl::encoding::Context) -> usize {
4692            4
4693        }
4694
4695        #[inline(always)]
4696        fn inline_size(_context: fidl::encoding::Context) -> usize {
4697            4
4698        }
4699    }
4700
4701    unsafe impl<D: fidl::encoding::ResourceDialect>
4702        fidl::encoding::Encode<InspectPuppetActLazyResponse, D> for &InspectPuppetActLazyResponse
4703    {
4704        #[inline]
4705        unsafe fn encode(
4706            self,
4707            encoder: &mut fidl::encoding::Encoder<'_, D>,
4708            offset: usize,
4709            _depth: fidl::encoding::Depth,
4710        ) -> fidl::Result<()> {
4711            encoder.debug_check_bounds::<InspectPuppetActLazyResponse>(offset);
4712            // Delegate to tuple encoding.
4713            fidl::encoding::Encode::<InspectPuppetActLazyResponse, D>::encode(
4714                (<TestResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
4715                encoder,
4716                offset,
4717                _depth,
4718            )
4719        }
4720    }
4721    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TestResult, D>>
4722        fidl::encoding::Encode<InspectPuppetActLazyResponse, D> for (T0,)
4723    {
4724        #[inline]
4725        unsafe fn encode(
4726            self,
4727            encoder: &mut fidl::encoding::Encoder<'_, D>,
4728            offset: usize,
4729            depth: fidl::encoding::Depth,
4730        ) -> fidl::Result<()> {
4731            encoder.debug_check_bounds::<InspectPuppetActLazyResponse>(offset);
4732            // Zero out padding regions. There's no need to apply masks
4733            // because the unmasked parts will be overwritten by fields.
4734            // Write the fields.
4735            self.0.encode(encoder, offset + 0, depth)?;
4736            Ok(())
4737        }
4738    }
4739
4740    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4741        for InspectPuppetActLazyResponse
4742    {
4743        #[inline(always)]
4744        fn new_empty() -> Self {
4745            Self { result: fidl::new_empty!(TestResult, D) }
4746        }
4747
4748        #[inline]
4749        unsafe fn decode(
4750            &mut self,
4751            decoder: &mut fidl::encoding::Decoder<'_, D>,
4752            offset: usize,
4753            _depth: fidl::encoding::Depth,
4754        ) -> fidl::Result<()> {
4755            decoder.debug_check_bounds::<Self>(offset);
4756            // Verify that padding bytes are zero.
4757            fidl::decode!(TestResult, D, &mut self.result, decoder, offset + 0, _depth)?;
4758            Ok(())
4759        }
4760    }
4761
4762    impl fidl::encoding::ValueTypeMarker for InspectPuppetActResponse {
4763        type Borrowed<'a> = &'a Self;
4764        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4765            value
4766        }
4767    }
4768
4769    unsafe impl fidl::encoding::TypeMarker for InspectPuppetActResponse {
4770        type Owned = Self;
4771
4772        #[inline(always)]
4773        fn inline_align(_context: fidl::encoding::Context) -> usize {
4774            4
4775        }
4776
4777        #[inline(always)]
4778        fn inline_size(_context: fidl::encoding::Context) -> usize {
4779            4
4780        }
4781    }
4782
4783    unsafe impl<D: fidl::encoding::ResourceDialect>
4784        fidl::encoding::Encode<InspectPuppetActResponse, D> for &InspectPuppetActResponse
4785    {
4786        #[inline]
4787        unsafe fn encode(
4788            self,
4789            encoder: &mut fidl::encoding::Encoder<'_, D>,
4790            offset: usize,
4791            _depth: fidl::encoding::Depth,
4792        ) -> fidl::Result<()> {
4793            encoder.debug_check_bounds::<InspectPuppetActResponse>(offset);
4794            // Delegate to tuple encoding.
4795            fidl::encoding::Encode::<InspectPuppetActResponse, D>::encode(
4796                (<TestResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
4797                encoder,
4798                offset,
4799                _depth,
4800            )
4801        }
4802    }
4803    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TestResult, D>>
4804        fidl::encoding::Encode<InspectPuppetActResponse, D> for (T0,)
4805    {
4806        #[inline]
4807        unsafe fn encode(
4808            self,
4809            encoder: &mut fidl::encoding::Encoder<'_, D>,
4810            offset: usize,
4811            depth: fidl::encoding::Depth,
4812        ) -> fidl::Result<()> {
4813            encoder.debug_check_bounds::<InspectPuppetActResponse>(offset);
4814            // Zero out padding regions. There's no need to apply masks
4815            // because the unmasked parts will be overwritten by fields.
4816            // Write the fields.
4817            self.0.encode(encoder, offset + 0, depth)?;
4818            Ok(())
4819        }
4820    }
4821
4822    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4823        for InspectPuppetActResponse
4824    {
4825        #[inline(always)]
4826        fn new_empty() -> Self {
4827            Self { result: fidl::new_empty!(TestResult, D) }
4828        }
4829
4830        #[inline]
4831        unsafe fn decode(
4832            &mut self,
4833            decoder: &mut fidl::encoding::Decoder<'_, D>,
4834            offset: usize,
4835            _depth: fidl::encoding::Depth,
4836        ) -> fidl::Result<()> {
4837            decoder.debug_check_bounds::<Self>(offset);
4838            // Verify that padding bytes are zero.
4839            fidl::decode!(TestResult, D, &mut self.result, decoder, offset + 0, _depth)?;
4840            Ok(())
4841        }
4842    }
4843
4844    impl fidl::encoding::ResourceTypeMarker for InspectPuppetGetConfigResponse {
4845        type Borrowed<'a> = &'a mut Self;
4846        fn take_or_borrow<'a>(
4847            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4848        ) -> Self::Borrowed<'a> {
4849            value
4850        }
4851    }
4852
4853    unsafe impl fidl::encoding::TypeMarker for InspectPuppetGetConfigResponse {
4854        type Owned = Self;
4855
4856        #[inline(always)]
4857        fn inline_align(_context: fidl::encoding::Context) -> usize {
4858            8
4859        }
4860
4861        #[inline(always)]
4862        fn inline_size(_context: fidl::encoding::Context) -> usize {
4863            32
4864        }
4865    }
4866
4867    unsafe impl
4868        fidl::encoding::Encode<
4869            InspectPuppetGetConfigResponse,
4870            fidl::encoding::DefaultFuchsiaResourceDialect,
4871        > for &mut InspectPuppetGetConfigResponse
4872    {
4873        #[inline]
4874        unsafe fn encode(
4875            self,
4876            encoder: &mut fidl::encoding::Encoder<
4877                '_,
4878                fidl::encoding::DefaultFuchsiaResourceDialect,
4879            >,
4880            offset: usize,
4881            _depth: fidl::encoding::Depth,
4882        ) -> fidl::Result<()> {
4883            encoder.debug_check_bounds::<InspectPuppetGetConfigResponse>(offset);
4884            // Delegate to tuple encoding.
4885            fidl::encoding::Encode::<
4886                InspectPuppetGetConfigResponse,
4887                fidl::encoding::DefaultFuchsiaResourceDialect,
4888            >::encode(
4889                (
4890                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
4891                        &self.printable_name,
4892                    ),
4893                    <Options as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4894                        &mut self.options,
4895                    ),
4896                ),
4897                encoder,
4898                offset,
4899                _depth,
4900            )
4901        }
4902    }
4903    unsafe impl<
4904            T0: fidl::encoding::Encode<
4905                fidl::encoding::UnboundedString,
4906                fidl::encoding::DefaultFuchsiaResourceDialect,
4907            >,
4908            T1: fidl::encoding::Encode<Options, fidl::encoding::DefaultFuchsiaResourceDialect>,
4909        >
4910        fidl::encoding::Encode<
4911            InspectPuppetGetConfigResponse,
4912            fidl::encoding::DefaultFuchsiaResourceDialect,
4913        > for (T0, T1)
4914    {
4915        #[inline]
4916        unsafe fn encode(
4917            self,
4918            encoder: &mut fidl::encoding::Encoder<
4919                '_,
4920                fidl::encoding::DefaultFuchsiaResourceDialect,
4921            >,
4922            offset: usize,
4923            depth: fidl::encoding::Depth,
4924        ) -> fidl::Result<()> {
4925            encoder.debug_check_bounds::<InspectPuppetGetConfigResponse>(offset);
4926            // Zero out padding regions. There's no need to apply masks
4927            // because the unmasked parts will be overwritten by fields.
4928            // Write the fields.
4929            self.0.encode(encoder, offset + 0, depth)?;
4930            self.1.encode(encoder, offset + 16, depth)?;
4931            Ok(())
4932        }
4933    }
4934
4935    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4936        for InspectPuppetGetConfigResponse
4937    {
4938        #[inline(always)]
4939        fn new_empty() -> Self {
4940            Self {
4941                printable_name: fidl::new_empty!(
4942                    fidl::encoding::UnboundedString,
4943                    fidl::encoding::DefaultFuchsiaResourceDialect
4944                ),
4945                options: fidl::new_empty!(Options, fidl::encoding::DefaultFuchsiaResourceDialect),
4946            }
4947        }
4948
4949        #[inline]
4950        unsafe fn decode(
4951            &mut self,
4952            decoder: &mut fidl::encoding::Decoder<
4953                '_,
4954                fidl::encoding::DefaultFuchsiaResourceDialect,
4955            >,
4956            offset: usize,
4957            _depth: fidl::encoding::Depth,
4958        ) -> fidl::Result<()> {
4959            decoder.debug_check_bounds::<Self>(offset);
4960            // Verify that padding bytes are zero.
4961            fidl::decode!(
4962                fidl::encoding::UnboundedString,
4963                fidl::encoding::DefaultFuchsiaResourceDialect,
4964                &mut self.printable_name,
4965                decoder,
4966                offset + 0,
4967                _depth
4968            )?;
4969            fidl::decode!(
4970                Options,
4971                fidl::encoding::DefaultFuchsiaResourceDialect,
4972                &mut self.options,
4973                decoder,
4974                offset + 16,
4975                _depth
4976            )?;
4977            Ok(())
4978        }
4979    }
4980
4981    impl fidl::encoding::ResourceTypeMarker for InspectPuppetInitializeTreeResponse {
4982        type Borrowed<'a> = &'a mut Self;
4983        fn take_or_borrow<'a>(
4984            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4985        ) -> Self::Borrowed<'a> {
4986            value
4987        }
4988    }
4989
4990    unsafe impl fidl::encoding::TypeMarker for InspectPuppetInitializeTreeResponse {
4991        type Owned = Self;
4992
4993        #[inline(always)]
4994        fn inline_align(_context: fidl::encoding::Context) -> usize {
4995            4
4996        }
4997
4998        #[inline(always)]
4999        fn inline_size(_context: fidl::encoding::Context) -> usize {
5000            8
5001        }
5002    }
5003
5004    unsafe impl
5005        fidl::encoding::Encode<
5006            InspectPuppetInitializeTreeResponse,
5007            fidl::encoding::DefaultFuchsiaResourceDialect,
5008        > for &mut InspectPuppetInitializeTreeResponse
5009    {
5010        #[inline]
5011        unsafe fn encode(
5012            self,
5013            encoder: &mut fidl::encoding::Encoder<
5014                '_,
5015                fidl::encoding::DefaultFuchsiaResourceDialect,
5016            >,
5017            offset: usize,
5018            _depth: fidl::encoding::Depth,
5019        ) -> fidl::Result<()> {
5020            encoder.debug_check_bounds::<InspectPuppetInitializeTreeResponse>(offset);
5021            // Delegate to tuple encoding.
5022            fidl::encoding::Encode::<
5023                InspectPuppetInitializeTreeResponse,
5024                fidl::encoding::DefaultFuchsiaResourceDialect,
5025            >::encode(
5026                (
5027                    <fidl::encoding::Optional<
5028                        fidl::encoding::Endpoint<
5029                            fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>,
5030                        >,
5031                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5032                        &mut self.tree
5033                    ),
5034                    <TestResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),
5035                ),
5036                encoder,
5037                offset,
5038                _depth,
5039            )
5040        }
5041    }
5042    unsafe impl<
5043            T0: fidl::encoding::Encode<
5044                fidl::encoding::Optional<
5045                    fidl::encoding::Endpoint<
5046                        fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>,
5047                    >,
5048                >,
5049                fidl::encoding::DefaultFuchsiaResourceDialect,
5050            >,
5051            T1: fidl::encoding::Encode<TestResult, fidl::encoding::DefaultFuchsiaResourceDialect>,
5052        >
5053        fidl::encoding::Encode<
5054            InspectPuppetInitializeTreeResponse,
5055            fidl::encoding::DefaultFuchsiaResourceDialect,
5056        > for (T0, T1)
5057    {
5058        #[inline]
5059        unsafe fn encode(
5060            self,
5061            encoder: &mut fidl::encoding::Encoder<
5062                '_,
5063                fidl::encoding::DefaultFuchsiaResourceDialect,
5064            >,
5065            offset: usize,
5066            depth: fidl::encoding::Depth,
5067        ) -> fidl::Result<()> {
5068            encoder.debug_check_bounds::<InspectPuppetInitializeTreeResponse>(offset);
5069            // Zero out padding regions. There's no need to apply masks
5070            // because the unmasked parts will be overwritten by fields.
5071            // Write the fields.
5072            self.0.encode(encoder, offset + 0, depth)?;
5073            self.1.encode(encoder, offset + 4, depth)?;
5074            Ok(())
5075        }
5076    }
5077
5078    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5079        for InspectPuppetInitializeTreeResponse
5080    {
5081        #[inline(always)]
5082        fn new_empty() -> Self {
5083            Self {
5084                tree: fidl::new_empty!(
5085                    fidl::encoding::Optional<
5086                        fidl::encoding::Endpoint<
5087                            fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>,
5088                        >,
5089                    >,
5090                    fidl::encoding::DefaultFuchsiaResourceDialect
5091                ),
5092                result: fidl::new_empty!(TestResult, fidl::encoding::DefaultFuchsiaResourceDialect),
5093            }
5094        }
5095
5096        #[inline]
5097        unsafe fn decode(
5098            &mut self,
5099            decoder: &mut fidl::encoding::Decoder<
5100                '_,
5101                fidl::encoding::DefaultFuchsiaResourceDialect,
5102            >,
5103            offset: usize,
5104            _depth: fidl::encoding::Depth,
5105        ) -> fidl::Result<()> {
5106            decoder.debug_check_bounds::<Self>(offset);
5107            // Verify that padding bytes are zero.
5108            fidl::decode!(
5109                fidl::encoding::Optional<
5110                    fidl::encoding::Endpoint<
5111                        fidl::endpoints::ClientEnd<fidl_fuchsia_inspect::TreeMarker>,
5112                    >,
5113                >,
5114                fidl::encoding::DefaultFuchsiaResourceDialect,
5115                &mut self.tree,
5116                decoder,
5117                offset + 0,
5118                _depth
5119            )?;
5120            fidl::decode!(
5121                TestResult,
5122                fidl::encoding::DefaultFuchsiaResourceDialect,
5123                &mut self.result,
5124                decoder,
5125                offset + 4,
5126                _depth
5127            )?;
5128            Ok(())
5129        }
5130    }
5131
5132    impl fidl::encoding::ResourceTypeMarker for InspectPuppetInitializeResponse {
5133        type Borrowed<'a> = &'a mut Self;
5134        fn take_or_borrow<'a>(
5135            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5136        ) -> Self::Borrowed<'a> {
5137            value
5138        }
5139    }
5140
5141    unsafe impl fidl::encoding::TypeMarker for InspectPuppetInitializeResponse {
5142        type Owned = Self;
5143
5144        #[inline(always)]
5145        fn inline_align(_context: fidl::encoding::Context) -> usize {
5146            4
5147        }
5148
5149        #[inline(always)]
5150        fn inline_size(_context: fidl::encoding::Context) -> usize {
5151            8
5152        }
5153    }
5154
5155    unsafe impl
5156        fidl::encoding::Encode<
5157            InspectPuppetInitializeResponse,
5158            fidl::encoding::DefaultFuchsiaResourceDialect,
5159        > for &mut InspectPuppetInitializeResponse
5160    {
5161        #[inline]
5162        unsafe fn encode(
5163            self,
5164            encoder: &mut fidl::encoding::Encoder<
5165                '_,
5166                fidl::encoding::DefaultFuchsiaResourceDialect,
5167            >,
5168            offset: usize,
5169            _depth: fidl::encoding::Depth,
5170        ) -> fidl::Result<()> {
5171            encoder.debug_check_bounds::<InspectPuppetInitializeResponse>(offset);
5172            // Delegate to tuple encoding.
5173            fidl::encoding::Encode::<
5174                InspectPuppetInitializeResponse,
5175                fidl::encoding::DefaultFuchsiaResourceDialect,
5176            >::encode(
5177                (
5178                    <fidl::encoding::Optional<
5179                        fidl::encoding::HandleType<
5180                            fidl::Handle,
5181                            { fidl::ObjectType::NONE.into_raw() },
5182                            2147483648,
5183                        >,
5184                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5185                        &mut self.vmo
5186                    ),
5187                    <TestResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),
5188                ),
5189                encoder,
5190                offset,
5191                _depth,
5192            )
5193        }
5194    }
5195    unsafe impl<
5196            T0: fidl::encoding::Encode<
5197                fidl::encoding::Optional<
5198                    fidl::encoding::HandleType<
5199                        fidl::Handle,
5200                        { fidl::ObjectType::NONE.into_raw() },
5201                        2147483648,
5202                    >,
5203                >,
5204                fidl::encoding::DefaultFuchsiaResourceDialect,
5205            >,
5206            T1: fidl::encoding::Encode<TestResult, fidl::encoding::DefaultFuchsiaResourceDialect>,
5207        >
5208        fidl::encoding::Encode<
5209            InspectPuppetInitializeResponse,
5210            fidl::encoding::DefaultFuchsiaResourceDialect,
5211        > for (T0, T1)
5212    {
5213        #[inline]
5214        unsafe fn encode(
5215            self,
5216            encoder: &mut fidl::encoding::Encoder<
5217                '_,
5218                fidl::encoding::DefaultFuchsiaResourceDialect,
5219            >,
5220            offset: usize,
5221            depth: fidl::encoding::Depth,
5222        ) -> fidl::Result<()> {
5223            encoder.debug_check_bounds::<InspectPuppetInitializeResponse>(offset);
5224            // Zero out padding regions. There's no need to apply masks
5225            // because the unmasked parts will be overwritten by fields.
5226            // Write the fields.
5227            self.0.encode(encoder, offset + 0, depth)?;
5228            self.1.encode(encoder, offset + 4, depth)?;
5229            Ok(())
5230        }
5231    }
5232
5233    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5234        for InspectPuppetInitializeResponse
5235    {
5236        #[inline(always)]
5237        fn new_empty() -> Self {
5238            Self {
5239                vmo: fidl::new_empty!(
5240                    fidl::encoding::Optional<
5241                        fidl::encoding::HandleType<
5242                            fidl::Handle,
5243                            { fidl::ObjectType::NONE.into_raw() },
5244                            2147483648,
5245                        >,
5246                    >,
5247                    fidl::encoding::DefaultFuchsiaResourceDialect
5248                ),
5249                result: fidl::new_empty!(TestResult, fidl::encoding::DefaultFuchsiaResourceDialect),
5250            }
5251        }
5252
5253        #[inline]
5254        unsafe fn decode(
5255            &mut self,
5256            decoder: &mut fidl::encoding::Decoder<
5257                '_,
5258                fidl::encoding::DefaultFuchsiaResourceDialect,
5259            >,
5260            offset: usize,
5261            _depth: fidl::encoding::Depth,
5262        ) -> fidl::Result<()> {
5263            decoder.debug_check_bounds::<Self>(offset);
5264            // Verify that padding bytes are zero.
5265            fidl::decode!(
5266                fidl::encoding::Optional<
5267                    fidl::encoding::HandleType<
5268                        fidl::Handle,
5269                        { fidl::ObjectType::NONE.into_raw() },
5270                        2147483648,
5271                    >,
5272                >,
5273                fidl::encoding::DefaultFuchsiaResourceDialect,
5274                &mut self.vmo,
5275                decoder,
5276                offset + 0,
5277                _depth
5278            )?;
5279            fidl::decode!(
5280                TestResult,
5281                fidl::encoding::DefaultFuchsiaResourceDialect,
5282                &mut self.result,
5283                decoder,
5284                offset + 4,
5285                _depth
5286            )?;
5287            Ok(())
5288        }
5289    }
5290
5291    impl fidl::encoding::ValueTypeMarker for InspectPuppetPublishResponse {
5292        type Borrowed<'a> = &'a Self;
5293        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5294            value
5295        }
5296    }
5297
5298    unsafe impl fidl::encoding::TypeMarker for InspectPuppetPublishResponse {
5299        type Owned = Self;
5300
5301        #[inline(always)]
5302        fn inline_align(_context: fidl::encoding::Context) -> usize {
5303            4
5304        }
5305
5306        #[inline(always)]
5307        fn inline_size(_context: fidl::encoding::Context) -> usize {
5308            4
5309        }
5310    }
5311
5312    unsafe impl<D: fidl::encoding::ResourceDialect>
5313        fidl::encoding::Encode<InspectPuppetPublishResponse, D> for &InspectPuppetPublishResponse
5314    {
5315        #[inline]
5316        unsafe fn encode(
5317            self,
5318            encoder: &mut fidl::encoding::Encoder<'_, D>,
5319            offset: usize,
5320            _depth: fidl::encoding::Depth,
5321        ) -> fidl::Result<()> {
5322            encoder.debug_check_bounds::<InspectPuppetPublishResponse>(offset);
5323            // Delegate to tuple encoding.
5324            fidl::encoding::Encode::<InspectPuppetPublishResponse, D>::encode(
5325                (<TestResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
5326                encoder,
5327                offset,
5328                _depth,
5329            )
5330        }
5331    }
5332    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TestResult, D>>
5333        fidl::encoding::Encode<InspectPuppetPublishResponse, D> for (T0,)
5334    {
5335        #[inline]
5336        unsafe fn encode(
5337            self,
5338            encoder: &mut fidl::encoding::Encoder<'_, D>,
5339            offset: usize,
5340            depth: fidl::encoding::Depth,
5341        ) -> fidl::Result<()> {
5342            encoder.debug_check_bounds::<InspectPuppetPublishResponse>(offset);
5343            // Zero out padding regions. There's no need to apply masks
5344            // because the unmasked parts will be overwritten by fields.
5345            // Write the fields.
5346            self.0.encode(encoder, offset + 0, depth)?;
5347            Ok(())
5348        }
5349    }
5350
5351    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5352        for InspectPuppetPublishResponse
5353    {
5354        #[inline(always)]
5355        fn new_empty() -> Self {
5356            Self { result: fidl::new_empty!(TestResult, D) }
5357        }
5358
5359        #[inline]
5360        unsafe fn decode(
5361            &mut self,
5362            decoder: &mut fidl::encoding::Decoder<'_, D>,
5363            offset: usize,
5364            _depth: fidl::encoding::Depth,
5365        ) -> fidl::Result<()> {
5366            decoder.debug_check_bounds::<Self>(offset);
5367            // Verify that padding bytes are zero.
5368            fidl::decode!(TestResult, D, &mut self.result, decoder, offset + 0, _depth)?;
5369            Ok(())
5370        }
5371    }
5372
5373    impl fidl::encoding::ValueTypeMarker for SetBool {
5374        type Borrowed<'a> = &'a Self;
5375        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5376            value
5377        }
5378    }
5379
5380    unsafe impl fidl::encoding::TypeMarker for SetBool {
5381        type Owned = Self;
5382
5383        #[inline(always)]
5384        fn inline_align(_context: fidl::encoding::Context) -> usize {
5385            4
5386        }
5387
5388        #[inline(always)]
5389        fn inline_size(_context: fidl::encoding::Context) -> usize {
5390            8
5391        }
5392    }
5393
5394    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetBool, D> for &SetBool {
5395        #[inline]
5396        unsafe fn encode(
5397            self,
5398            encoder: &mut fidl::encoding::Encoder<'_, D>,
5399            offset: usize,
5400            _depth: fidl::encoding::Depth,
5401        ) -> fidl::Result<()> {
5402            encoder.debug_check_bounds::<SetBool>(offset);
5403            // Delegate to tuple encoding.
5404            fidl::encoding::Encode::<SetBool, D>::encode(
5405                (
5406                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
5407                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5408                ),
5409                encoder,
5410                offset,
5411                _depth,
5412            )
5413        }
5414    }
5415    unsafe impl<
5416            D: fidl::encoding::ResourceDialect,
5417            T0: fidl::encoding::Encode<u32, D>,
5418            T1: fidl::encoding::Encode<bool, D>,
5419        > fidl::encoding::Encode<SetBool, D> for (T0, T1)
5420    {
5421        #[inline]
5422        unsafe fn encode(
5423            self,
5424            encoder: &mut fidl::encoding::Encoder<'_, D>,
5425            offset: usize,
5426            depth: fidl::encoding::Depth,
5427        ) -> fidl::Result<()> {
5428            encoder.debug_check_bounds::<SetBool>(offset);
5429            // Zero out padding regions. There's no need to apply masks
5430            // because the unmasked parts will be overwritten by fields.
5431            unsafe {
5432                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
5433                (ptr as *mut u32).write_unaligned(0);
5434            }
5435            // Write the fields.
5436            self.0.encode(encoder, offset + 0, depth)?;
5437            self.1.encode(encoder, offset + 4, depth)?;
5438            Ok(())
5439        }
5440    }
5441
5442    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetBool {
5443        #[inline(always)]
5444        fn new_empty() -> Self {
5445            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(bool, D) }
5446        }
5447
5448        #[inline]
5449        unsafe fn decode(
5450            &mut self,
5451            decoder: &mut fidl::encoding::Decoder<'_, D>,
5452            offset: usize,
5453            _depth: fidl::encoding::Depth,
5454        ) -> fidl::Result<()> {
5455            decoder.debug_check_bounds::<Self>(offset);
5456            // Verify that padding bytes are zero.
5457            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
5458            let padval = unsafe { (ptr as *const u32).read_unaligned() };
5459            let mask = 0xffffff00u32;
5460            let maskedval = padval & mask;
5461            if maskedval != 0 {
5462                return Err(fidl::Error::NonZeroPadding {
5463                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
5464                });
5465            }
5466            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
5467            fidl::decode!(bool, D, &mut self.value, decoder, offset + 4, _depth)?;
5468            Ok(())
5469        }
5470    }
5471
5472    impl fidl::encoding::ValueTypeMarker for SetBytes {
5473        type Borrowed<'a> = &'a Self;
5474        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5475            value
5476        }
5477    }
5478
5479    unsafe impl fidl::encoding::TypeMarker for SetBytes {
5480        type Owned = Self;
5481
5482        #[inline(always)]
5483        fn inline_align(_context: fidl::encoding::Context) -> usize {
5484            8
5485        }
5486
5487        #[inline(always)]
5488        fn inline_size(_context: fidl::encoding::Context) -> usize {
5489            24
5490        }
5491    }
5492
5493    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetBytes, D> for &SetBytes {
5494        #[inline]
5495        unsafe fn encode(
5496            self,
5497            encoder: &mut fidl::encoding::Encoder<'_, D>,
5498            offset: usize,
5499            _depth: fidl::encoding::Depth,
5500        ) -> fidl::Result<()> {
5501            encoder.debug_check_bounds::<SetBytes>(offset);
5502            // Delegate to tuple encoding.
5503            fidl::encoding::Encode::<SetBytes, D>::encode(
5504                (
5505                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
5506                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5507                ),
5508                encoder, offset, _depth
5509            )
5510        }
5511    }
5512    unsafe impl<
5513            D: fidl::encoding::ResourceDialect,
5514            T0: fidl::encoding::Encode<u32, D>,
5515            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
5516        > fidl::encoding::Encode<SetBytes, D> for (T0, T1)
5517    {
5518        #[inline]
5519        unsafe fn encode(
5520            self,
5521            encoder: &mut fidl::encoding::Encoder<'_, D>,
5522            offset: usize,
5523            depth: fidl::encoding::Depth,
5524        ) -> fidl::Result<()> {
5525            encoder.debug_check_bounds::<SetBytes>(offset);
5526            // Zero out padding regions. There's no need to apply masks
5527            // because the unmasked parts will be overwritten by fields.
5528            unsafe {
5529                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
5530                (ptr as *mut u64).write_unaligned(0);
5531            }
5532            // Write the fields.
5533            self.0.encode(encoder, offset + 0, depth)?;
5534            self.1.encode(encoder, offset + 8, depth)?;
5535            Ok(())
5536        }
5537    }
5538
5539    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetBytes {
5540        #[inline(always)]
5541        fn new_empty() -> Self {
5542            Self {
5543                id: fidl::new_empty!(u32, D),
5544                value: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
5545            }
5546        }
5547
5548        #[inline]
5549        unsafe fn decode(
5550            &mut self,
5551            decoder: &mut fidl::encoding::Decoder<'_, D>,
5552            offset: usize,
5553            _depth: fidl::encoding::Depth,
5554        ) -> fidl::Result<()> {
5555            decoder.debug_check_bounds::<Self>(offset);
5556            // Verify that padding bytes are zero.
5557            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
5558            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5559            let mask = 0xffffffff00000000u64;
5560            let maskedval = padval & mask;
5561            if maskedval != 0 {
5562                return Err(fidl::Error::NonZeroPadding {
5563                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
5564                });
5565            }
5566            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
5567            fidl::decode!(
5568                fidl::encoding::UnboundedVector<u8>,
5569                D,
5570                &mut self.value,
5571                decoder,
5572                offset + 8,
5573                _depth
5574            )?;
5575            Ok(())
5576        }
5577    }
5578
5579    impl fidl::encoding::ValueTypeMarker for SetNumber {
5580        type Borrowed<'a> = &'a Self;
5581        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5582            value
5583        }
5584    }
5585
5586    unsafe impl fidl::encoding::TypeMarker for SetNumber {
5587        type Owned = Self;
5588
5589        #[inline(always)]
5590        fn inline_align(_context: fidl::encoding::Context) -> usize {
5591            8
5592        }
5593
5594        #[inline(always)]
5595        fn inline_size(_context: fidl::encoding::Context) -> usize {
5596            24
5597        }
5598    }
5599
5600    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetNumber, D>
5601        for &SetNumber
5602    {
5603        #[inline]
5604        unsafe fn encode(
5605            self,
5606            encoder: &mut fidl::encoding::Encoder<'_, D>,
5607            offset: usize,
5608            _depth: fidl::encoding::Depth,
5609        ) -> fidl::Result<()> {
5610            encoder.debug_check_bounds::<SetNumber>(offset);
5611            // Delegate to tuple encoding.
5612            fidl::encoding::Encode::<SetNumber, D>::encode(
5613                (
5614                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
5615                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5616                ),
5617                encoder,
5618                offset,
5619                _depth,
5620            )
5621        }
5622    }
5623    unsafe impl<
5624            D: fidl::encoding::ResourceDialect,
5625            T0: fidl::encoding::Encode<u32, D>,
5626            T1: fidl::encoding::Encode<Value, D>,
5627        > fidl::encoding::Encode<SetNumber, D> for (T0, T1)
5628    {
5629        #[inline]
5630        unsafe fn encode(
5631            self,
5632            encoder: &mut fidl::encoding::Encoder<'_, D>,
5633            offset: usize,
5634            depth: fidl::encoding::Depth,
5635        ) -> fidl::Result<()> {
5636            encoder.debug_check_bounds::<SetNumber>(offset);
5637            // Zero out padding regions. There's no need to apply masks
5638            // because the unmasked parts will be overwritten by fields.
5639            unsafe {
5640                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
5641                (ptr as *mut u64).write_unaligned(0);
5642            }
5643            // Write the fields.
5644            self.0.encode(encoder, offset + 0, depth)?;
5645            self.1.encode(encoder, offset + 8, depth)?;
5646            Ok(())
5647        }
5648    }
5649
5650    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetNumber {
5651        #[inline(always)]
5652        fn new_empty() -> Self {
5653            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Value, D) }
5654        }
5655
5656        #[inline]
5657        unsafe fn decode(
5658            &mut self,
5659            decoder: &mut fidl::encoding::Decoder<'_, D>,
5660            offset: usize,
5661            _depth: fidl::encoding::Depth,
5662        ) -> fidl::Result<()> {
5663            decoder.debug_check_bounds::<Self>(offset);
5664            // Verify that padding bytes are zero.
5665            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
5666            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5667            let mask = 0xffffffff00000000u64;
5668            let maskedval = padval & mask;
5669            if maskedval != 0 {
5670                return Err(fidl::Error::NonZeroPadding {
5671                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
5672                });
5673            }
5674            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
5675            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
5676            Ok(())
5677        }
5678    }
5679
5680    impl fidl::encoding::ValueTypeMarker for SetString {
5681        type Borrowed<'a> = &'a Self;
5682        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5683            value
5684        }
5685    }
5686
5687    unsafe impl fidl::encoding::TypeMarker for SetString {
5688        type Owned = Self;
5689
5690        #[inline(always)]
5691        fn inline_align(_context: fidl::encoding::Context) -> usize {
5692            8
5693        }
5694
5695        #[inline(always)]
5696        fn inline_size(_context: fidl::encoding::Context) -> usize {
5697            24
5698        }
5699    }
5700
5701    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetString, D>
5702        for &SetString
5703    {
5704        #[inline]
5705        unsafe fn encode(
5706            self,
5707            encoder: &mut fidl::encoding::Encoder<'_, D>,
5708            offset: usize,
5709            _depth: fidl::encoding::Depth,
5710        ) -> fidl::Result<()> {
5711            encoder.debug_check_bounds::<SetString>(offset);
5712            // Delegate to tuple encoding.
5713            fidl::encoding::Encode::<SetString, D>::encode(
5714                (
5715                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
5716                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
5717                        &self.value,
5718                    ),
5719                ),
5720                encoder,
5721                offset,
5722                _depth,
5723            )
5724        }
5725    }
5726    unsafe impl<
5727            D: fidl::encoding::ResourceDialect,
5728            T0: fidl::encoding::Encode<u32, D>,
5729            T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
5730        > fidl::encoding::Encode<SetString, D> for (T0, T1)
5731    {
5732        #[inline]
5733        unsafe fn encode(
5734            self,
5735            encoder: &mut fidl::encoding::Encoder<'_, D>,
5736            offset: usize,
5737            depth: fidl::encoding::Depth,
5738        ) -> fidl::Result<()> {
5739            encoder.debug_check_bounds::<SetString>(offset);
5740            // Zero out padding regions. There's no need to apply masks
5741            // because the unmasked parts will be overwritten by fields.
5742            unsafe {
5743                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
5744                (ptr as *mut u64).write_unaligned(0);
5745            }
5746            // Write the fields.
5747            self.0.encode(encoder, offset + 0, depth)?;
5748            self.1.encode(encoder, offset + 8, depth)?;
5749            Ok(())
5750        }
5751    }
5752
5753    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetString {
5754        #[inline(always)]
5755        fn new_empty() -> Self {
5756            Self {
5757                id: fidl::new_empty!(u32, D),
5758                value: fidl::new_empty!(fidl::encoding::UnboundedString, D),
5759            }
5760        }
5761
5762        #[inline]
5763        unsafe fn decode(
5764            &mut self,
5765            decoder: &mut fidl::encoding::Decoder<'_, D>,
5766            offset: usize,
5767            _depth: fidl::encoding::Depth,
5768        ) -> fidl::Result<()> {
5769            decoder.debug_check_bounds::<Self>(offset);
5770            // Verify that padding bytes are zero.
5771            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
5772            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5773            let mask = 0xffffffff00000000u64;
5774            let maskedval = padval & mask;
5775            if maskedval != 0 {
5776                return Err(fidl::Error::NonZeroPadding {
5777                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
5778                });
5779            }
5780            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
5781            fidl::decode!(
5782                fidl::encoding::UnboundedString,
5783                D,
5784                &mut self.value,
5785                decoder,
5786                offset + 8,
5787                _depth
5788            )?;
5789            Ok(())
5790        }
5791    }
5792
5793    impl fidl::encoding::ValueTypeMarker for SubtractNumber {
5794        type Borrowed<'a> = &'a Self;
5795        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5796            value
5797        }
5798    }
5799
5800    unsafe impl fidl::encoding::TypeMarker for SubtractNumber {
5801        type Owned = Self;
5802
5803        #[inline(always)]
5804        fn inline_align(_context: fidl::encoding::Context) -> usize {
5805            8
5806        }
5807
5808        #[inline(always)]
5809        fn inline_size(_context: fidl::encoding::Context) -> usize {
5810            24
5811        }
5812    }
5813
5814    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SubtractNumber, D>
5815        for &SubtractNumber
5816    {
5817        #[inline]
5818        unsafe fn encode(
5819            self,
5820            encoder: &mut fidl::encoding::Encoder<'_, D>,
5821            offset: usize,
5822            _depth: fidl::encoding::Depth,
5823        ) -> fidl::Result<()> {
5824            encoder.debug_check_bounds::<SubtractNumber>(offset);
5825            // Delegate to tuple encoding.
5826            fidl::encoding::Encode::<SubtractNumber, D>::encode(
5827                (
5828                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
5829                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5830                ),
5831                encoder,
5832                offset,
5833                _depth,
5834            )
5835        }
5836    }
5837    unsafe impl<
5838            D: fidl::encoding::ResourceDialect,
5839            T0: fidl::encoding::Encode<u32, D>,
5840            T1: fidl::encoding::Encode<Value, D>,
5841        > fidl::encoding::Encode<SubtractNumber, D> for (T0, T1)
5842    {
5843        #[inline]
5844        unsafe fn encode(
5845            self,
5846            encoder: &mut fidl::encoding::Encoder<'_, D>,
5847            offset: usize,
5848            depth: fidl::encoding::Depth,
5849        ) -> fidl::Result<()> {
5850            encoder.debug_check_bounds::<SubtractNumber>(offset);
5851            // Zero out padding regions. There's no need to apply masks
5852            // because the unmasked parts will be overwritten by fields.
5853            unsafe {
5854                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
5855                (ptr as *mut u64).write_unaligned(0);
5856            }
5857            // Write the fields.
5858            self.0.encode(encoder, offset + 0, depth)?;
5859            self.1.encode(encoder, offset + 8, depth)?;
5860            Ok(())
5861        }
5862    }
5863
5864    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SubtractNumber {
5865        #[inline(always)]
5866        fn new_empty() -> Self {
5867            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Value, D) }
5868        }
5869
5870        #[inline]
5871        unsafe fn decode(
5872            &mut self,
5873            decoder: &mut fidl::encoding::Decoder<'_, D>,
5874            offset: usize,
5875            _depth: fidl::encoding::Depth,
5876        ) -> fidl::Result<()> {
5877            decoder.debug_check_bounds::<Self>(offset);
5878            // Verify that padding bytes are zero.
5879            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
5880            let padval = unsafe { (ptr as *const u64).read_unaligned() };
5881            let mask = 0xffffffff00000000u64;
5882            let maskedval = padval & mask;
5883            if maskedval != 0 {
5884                return Err(fidl::Error::NonZeroPadding {
5885                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
5886                });
5887            }
5888            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
5889            fidl::decode!(Value, D, &mut self.value, decoder, offset + 8, _depth)?;
5890            Ok(())
5891        }
5892    }
5893
5894    impl InitializationParams {
5895        #[inline(always)]
5896        fn max_ordinal_present(&self) -> u64 {
5897            if let Some(_) = self.vmo_size {
5898                return 1;
5899            }
5900            0
5901        }
5902    }
5903
5904    impl fidl::encoding::ValueTypeMarker for InitializationParams {
5905        type Borrowed<'a> = &'a Self;
5906        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5907            value
5908        }
5909    }
5910
5911    unsafe impl fidl::encoding::TypeMarker for InitializationParams {
5912        type Owned = Self;
5913
5914        #[inline(always)]
5915        fn inline_align(_context: fidl::encoding::Context) -> usize {
5916            8
5917        }
5918
5919        #[inline(always)]
5920        fn inline_size(_context: fidl::encoding::Context) -> usize {
5921            16
5922        }
5923    }
5924
5925    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InitializationParams, D>
5926        for &InitializationParams
5927    {
5928        unsafe fn encode(
5929            self,
5930            encoder: &mut fidl::encoding::Encoder<'_, D>,
5931            offset: usize,
5932            mut depth: fidl::encoding::Depth,
5933        ) -> fidl::Result<()> {
5934            encoder.debug_check_bounds::<InitializationParams>(offset);
5935            // Vector header
5936            let max_ordinal: u64 = self.max_ordinal_present();
5937            encoder.write_num(max_ordinal, offset);
5938            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5939            // Calling encoder.out_of_line_offset(0) is not allowed.
5940            if max_ordinal == 0 {
5941                return Ok(());
5942            }
5943            depth.increment()?;
5944            let envelope_size = 8;
5945            let bytes_len = max_ordinal as usize * envelope_size;
5946            #[allow(unused_variables)]
5947            let offset = encoder.out_of_line_offset(bytes_len);
5948            let mut _prev_end_offset: usize = 0;
5949            if 1 > max_ordinal {
5950                return Ok(());
5951            }
5952
5953            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5954            // are envelope_size bytes.
5955            let cur_offset: usize = (1 - 1) * envelope_size;
5956
5957            // Zero reserved fields.
5958            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5959
5960            // Safety:
5961            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5962            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5963            //   envelope_size bytes, there is always sufficient room.
5964            fidl::encoding::encode_in_envelope_optional::<u64, D>(
5965                self.vmo_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
5966                encoder,
5967                offset + cur_offset,
5968                depth,
5969            )?;
5970
5971            _prev_end_offset = cur_offset + envelope_size;
5972
5973            Ok(())
5974        }
5975    }
5976
5977    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InitializationParams {
5978        #[inline(always)]
5979        fn new_empty() -> Self {
5980            Self::default()
5981        }
5982
5983        unsafe fn decode(
5984            &mut self,
5985            decoder: &mut fidl::encoding::Decoder<'_, D>,
5986            offset: usize,
5987            mut depth: fidl::encoding::Depth,
5988        ) -> fidl::Result<()> {
5989            decoder.debug_check_bounds::<Self>(offset);
5990            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5991                None => return Err(fidl::Error::NotNullable),
5992                Some(len) => len,
5993            };
5994            // Calling decoder.out_of_line_offset(0) is not allowed.
5995            if len == 0 {
5996                return Ok(());
5997            };
5998            depth.increment()?;
5999            let envelope_size = 8;
6000            let bytes_len = len * envelope_size;
6001            let offset = decoder.out_of_line_offset(bytes_len)?;
6002            // Decode the envelope for each type.
6003            let mut _next_ordinal_to_read = 0;
6004            let mut next_offset = offset;
6005            let end_offset = offset + bytes_len;
6006            _next_ordinal_to_read += 1;
6007            if next_offset >= end_offset {
6008                return Ok(());
6009            }
6010
6011            // Decode unknown envelopes for gaps in ordinals.
6012            while _next_ordinal_to_read < 1 {
6013                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6014                _next_ordinal_to_read += 1;
6015                next_offset += envelope_size;
6016            }
6017
6018            let next_out_of_line = decoder.next_out_of_line();
6019            let handles_before = decoder.remaining_handles();
6020            if let Some((inlined, num_bytes, num_handles)) =
6021                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6022            {
6023                let member_inline_size =
6024                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6025                if inlined != (member_inline_size <= 4) {
6026                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6027                }
6028                let inner_offset;
6029                let mut inner_depth = depth.clone();
6030                if inlined {
6031                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6032                    inner_offset = next_offset;
6033                } else {
6034                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6035                    inner_depth.increment()?;
6036                }
6037                let val_ref = self.vmo_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
6038                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
6039                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6040                {
6041                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6042                }
6043                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6044                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6045                }
6046            }
6047
6048            next_offset += envelope_size;
6049
6050            // Decode the remaining unknown envelopes.
6051            while next_offset < end_offset {
6052                _next_ordinal_to_read += 1;
6053                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6054                next_offset += envelope_size;
6055            }
6056
6057            Ok(())
6058        }
6059    }
6060
6061    impl Options {
6062        #[inline(always)]
6063        fn max_ordinal_present(&self) -> u64 {
6064            if let Some(_) = self.diff_type {
6065                return 2;
6066            }
6067            if let Some(_) = self.has_runner_node {
6068                return 1;
6069            }
6070            0
6071        }
6072    }
6073
6074    impl fidl::encoding::ResourceTypeMarker for Options {
6075        type Borrowed<'a> = &'a mut Self;
6076        fn take_or_borrow<'a>(
6077            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6078        ) -> Self::Borrowed<'a> {
6079            value
6080        }
6081    }
6082
6083    unsafe impl fidl::encoding::TypeMarker for Options {
6084        type Owned = Self;
6085
6086        #[inline(always)]
6087        fn inline_align(_context: fidl::encoding::Context) -> usize {
6088            8
6089        }
6090
6091        #[inline(always)]
6092        fn inline_size(_context: fidl::encoding::Context) -> usize {
6093            16
6094        }
6095    }
6096
6097    unsafe impl fidl::encoding::Encode<Options, fidl::encoding::DefaultFuchsiaResourceDialect>
6098        for &mut Options
6099    {
6100        unsafe fn encode(
6101            self,
6102            encoder: &mut fidl::encoding::Encoder<
6103                '_,
6104                fidl::encoding::DefaultFuchsiaResourceDialect,
6105            >,
6106            offset: usize,
6107            mut depth: fidl::encoding::Depth,
6108        ) -> fidl::Result<()> {
6109            encoder.debug_check_bounds::<Options>(offset);
6110            // Vector header
6111            let max_ordinal: u64 = self.max_ordinal_present();
6112            encoder.write_num(max_ordinal, offset);
6113            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6114            // Calling encoder.out_of_line_offset(0) is not allowed.
6115            if max_ordinal == 0 {
6116                return Ok(());
6117            }
6118            depth.increment()?;
6119            let envelope_size = 8;
6120            let bytes_len = max_ordinal as usize * envelope_size;
6121            #[allow(unused_variables)]
6122            let offset = encoder.out_of_line_offset(bytes_len);
6123            let mut _prev_end_offset: usize = 0;
6124            if 1 > max_ordinal {
6125                return Ok(());
6126            }
6127
6128            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6129            // are envelope_size bytes.
6130            let cur_offset: usize = (1 - 1) * envelope_size;
6131
6132            // Zero reserved fields.
6133            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6134
6135            // Safety:
6136            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6137            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6138            //   envelope_size bytes, there is always sufficient room.
6139            fidl::encoding::encode_in_envelope_optional::<
6140                bool,
6141                fidl::encoding::DefaultFuchsiaResourceDialect,
6142            >(
6143                self.has_runner_node
6144                    .as_ref()
6145                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
6146                encoder,
6147                offset + cur_offset,
6148                depth,
6149            )?;
6150
6151            _prev_end_offset = cur_offset + envelope_size;
6152            if 2 > max_ordinal {
6153                return Ok(());
6154            }
6155
6156            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6157            // are envelope_size bytes.
6158            let cur_offset: usize = (2 - 1) * envelope_size;
6159
6160            // Zero reserved fields.
6161            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6162
6163            // Safety:
6164            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6165            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6166            //   envelope_size bytes, there is always sufficient room.
6167            fidl::encoding::encode_in_envelope_optional::<
6168                DiffType,
6169                fidl::encoding::DefaultFuchsiaResourceDialect,
6170            >(
6171                self.diff_type.as_ref().map(<DiffType as fidl::encoding::ValueTypeMarker>::borrow),
6172                encoder,
6173                offset + cur_offset,
6174                depth,
6175            )?;
6176
6177            _prev_end_offset = cur_offset + envelope_size;
6178
6179            Ok(())
6180        }
6181    }
6182
6183    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Options {
6184        #[inline(always)]
6185        fn new_empty() -> Self {
6186            Self::default()
6187        }
6188
6189        unsafe fn decode(
6190            &mut self,
6191            decoder: &mut fidl::encoding::Decoder<
6192                '_,
6193                fidl::encoding::DefaultFuchsiaResourceDialect,
6194            >,
6195            offset: usize,
6196            mut depth: fidl::encoding::Depth,
6197        ) -> fidl::Result<()> {
6198            decoder.debug_check_bounds::<Self>(offset);
6199            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6200                None => return Err(fidl::Error::NotNullable),
6201                Some(len) => len,
6202            };
6203            // Calling decoder.out_of_line_offset(0) is not allowed.
6204            if len == 0 {
6205                return Ok(());
6206            };
6207            depth.increment()?;
6208            let envelope_size = 8;
6209            let bytes_len = len * envelope_size;
6210            let offset = decoder.out_of_line_offset(bytes_len)?;
6211            // Decode the envelope for each type.
6212            let mut _next_ordinal_to_read = 0;
6213            let mut next_offset = offset;
6214            let end_offset = offset + bytes_len;
6215            _next_ordinal_to_read += 1;
6216            if next_offset >= end_offset {
6217                return Ok(());
6218            }
6219
6220            // Decode unknown envelopes for gaps in ordinals.
6221            while _next_ordinal_to_read < 1 {
6222                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6223                _next_ordinal_to_read += 1;
6224                next_offset += envelope_size;
6225            }
6226
6227            let next_out_of_line = decoder.next_out_of_line();
6228            let handles_before = decoder.remaining_handles();
6229            if let Some((inlined, num_bytes, num_handles)) =
6230                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6231            {
6232                let member_inline_size =
6233                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6234                if inlined != (member_inline_size <= 4) {
6235                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6236                }
6237                let inner_offset;
6238                let mut inner_depth = depth.clone();
6239                if inlined {
6240                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6241                    inner_offset = next_offset;
6242                } else {
6243                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6244                    inner_depth.increment()?;
6245                }
6246                let val_ref = self.has_runner_node.get_or_insert_with(|| {
6247                    fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
6248                });
6249                fidl::decode!(
6250                    bool,
6251                    fidl::encoding::DefaultFuchsiaResourceDialect,
6252                    val_ref,
6253                    decoder,
6254                    inner_offset,
6255                    inner_depth
6256                )?;
6257                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6258                {
6259                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6260                }
6261                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6262                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6263                }
6264            }
6265
6266            next_offset += envelope_size;
6267            _next_ordinal_to_read += 1;
6268            if next_offset >= end_offset {
6269                return Ok(());
6270            }
6271
6272            // Decode unknown envelopes for gaps in ordinals.
6273            while _next_ordinal_to_read < 2 {
6274                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6275                _next_ordinal_to_read += 1;
6276                next_offset += envelope_size;
6277            }
6278
6279            let next_out_of_line = decoder.next_out_of_line();
6280            let handles_before = decoder.remaining_handles();
6281            if let Some((inlined, num_bytes, num_handles)) =
6282                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6283            {
6284                let member_inline_size =
6285                    <DiffType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6286                if inlined != (member_inline_size <= 4) {
6287                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6288                }
6289                let inner_offset;
6290                let mut inner_depth = depth.clone();
6291                if inlined {
6292                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6293                    inner_offset = next_offset;
6294                } else {
6295                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6296                    inner_depth.increment()?;
6297                }
6298                let val_ref = self.diff_type.get_or_insert_with(|| {
6299                    fidl::new_empty!(DiffType, fidl::encoding::DefaultFuchsiaResourceDialect)
6300                });
6301                fidl::decode!(
6302                    DiffType,
6303                    fidl::encoding::DefaultFuchsiaResourceDialect,
6304                    val_ref,
6305                    decoder,
6306                    inner_offset,
6307                    inner_depth
6308                )?;
6309                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6310                {
6311                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6312                }
6313                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6314                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6315                }
6316            }
6317
6318            next_offset += envelope_size;
6319
6320            // Decode the remaining unknown envelopes.
6321            while next_offset < end_offset {
6322                _next_ordinal_to_read += 1;
6323                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6324                next_offset += envelope_size;
6325            }
6326
6327            Ok(())
6328        }
6329    }
6330
6331    impl fidl::encoding::ValueTypeMarker for Action {
6332        type Borrowed<'a> = &'a Self;
6333        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6334            value
6335        }
6336    }
6337
6338    unsafe impl fidl::encoding::TypeMarker for Action {
6339        type Owned = Self;
6340
6341        #[inline(always)]
6342        fn inline_align(_context: fidl::encoding::Context) -> usize {
6343            8
6344        }
6345
6346        #[inline(always)]
6347        fn inline_size(_context: fidl::encoding::Context) -> usize {
6348            16
6349        }
6350    }
6351
6352    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Action, D> for &Action {
6353        #[inline]
6354        unsafe fn encode(
6355            self,
6356            encoder: &mut fidl::encoding::Encoder<'_, D>,
6357            offset: usize,
6358            _depth: fidl::encoding::Depth,
6359        ) -> fidl::Result<()> {
6360            encoder.debug_check_bounds::<Action>(offset);
6361            encoder.write_num::<u64>(self.ordinal(), offset);
6362            match self {
6363                Action::CreateNode(ref val) => fidl::encoding::encode_in_envelope::<CreateNode, D>(
6364                    <CreateNode as fidl::encoding::ValueTypeMarker>::borrow(val),
6365                    encoder,
6366                    offset + 8,
6367                    _depth,
6368                ),
6369                Action::DeleteNode(ref val) => fidl::encoding::encode_in_envelope::<DeleteNode, D>(
6370                    <DeleteNode as fidl::encoding::ValueTypeMarker>::borrow(val),
6371                    encoder,
6372                    offset + 8,
6373                    _depth,
6374                ),
6375                Action::CreateNumericProperty(ref val) => {
6376                    fidl::encoding::encode_in_envelope::<CreateNumericProperty, D>(
6377                        <CreateNumericProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
6378                        encoder,
6379                        offset + 8,
6380                        _depth,
6381                    )
6382                }
6383                Action::CreateBytesProperty(ref val) => {
6384                    fidl::encoding::encode_in_envelope::<CreateBytesProperty, D>(
6385                        <CreateBytesProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
6386                        encoder,
6387                        offset + 8,
6388                        _depth,
6389                    )
6390                }
6391                Action::CreateStringProperty(ref val) => {
6392                    fidl::encoding::encode_in_envelope::<CreateStringProperty, D>(
6393                        <CreateStringProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
6394                        encoder,
6395                        offset + 8,
6396                        _depth,
6397                    )
6398                }
6399                Action::DeleteProperty(ref val) => {
6400                    fidl::encoding::encode_in_envelope::<DeleteProperty, D>(
6401                        <DeleteProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
6402                        encoder,
6403                        offset + 8,
6404                        _depth,
6405                    )
6406                }
6407                Action::SetNumber(ref val) => fidl::encoding::encode_in_envelope::<SetNumber, D>(
6408                    <SetNumber as fidl::encoding::ValueTypeMarker>::borrow(val),
6409                    encoder,
6410                    offset + 8,
6411                    _depth,
6412                ),
6413                Action::SetString(ref val) => fidl::encoding::encode_in_envelope::<SetString, D>(
6414                    <SetString as fidl::encoding::ValueTypeMarker>::borrow(val),
6415                    encoder,
6416                    offset + 8,
6417                    _depth,
6418                ),
6419                Action::SetBytes(ref val) => fidl::encoding::encode_in_envelope::<SetBytes, D>(
6420                    <SetBytes as fidl::encoding::ValueTypeMarker>::borrow(val),
6421                    encoder,
6422                    offset + 8,
6423                    _depth,
6424                ),
6425                Action::AddNumber(ref val) => fidl::encoding::encode_in_envelope::<AddNumber, D>(
6426                    <AddNumber as fidl::encoding::ValueTypeMarker>::borrow(val),
6427                    encoder,
6428                    offset + 8,
6429                    _depth,
6430                ),
6431                Action::SubtractNumber(ref val) => {
6432                    fidl::encoding::encode_in_envelope::<SubtractNumber, D>(
6433                        <SubtractNumber as fidl::encoding::ValueTypeMarker>::borrow(val),
6434                        encoder,
6435                        offset + 8,
6436                        _depth,
6437                    )
6438                }
6439                Action::CreateArrayProperty(ref val) => {
6440                    fidl::encoding::encode_in_envelope::<CreateArrayProperty, D>(
6441                        <CreateArrayProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
6442                        encoder,
6443                        offset + 8,
6444                        _depth,
6445                    )
6446                }
6447                Action::ArraySet(ref val) => fidl::encoding::encode_in_envelope::<ArraySet, D>(
6448                    <ArraySet as fidl::encoding::ValueTypeMarker>::borrow(val),
6449                    encoder,
6450                    offset + 8,
6451                    _depth,
6452                ),
6453                Action::ArrayAdd(ref val) => fidl::encoding::encode_in_envelope::<ArrayAdd, D>(
6454                    <ArrayAdd as fidl::encoding::ValueTypeMarker>::borrow(val),
6455                    encoder,
6456                    offset + 8,
6457                    _depth,
6458                ),
6459                Action::ArraySubtract(ref val) => {
6460                    fidl::encoding::encode_in_envelope::<ArraySubtract, D>(
6461                        <ArraySubtract as fidl::encoding::ValueTypeMarker>::borrow(val),
6462                        encoder,
6463                        offset + 8,
6464                        _depth,
6465                    )
6466                }
6467                Action::CreateLinearHistogram(ref val) => {
6468                    fidl::encoding::encode_in_envelope::<CreateLinearHistogram, D>(
6469                        <CreateLinearHistogram as fidl::encoding::ValueTypeMarker>::borrow(val),
6470                        encoder,
6471                        offset + 8,
6472                        _depth,
6473                    )
6474                }
6475                Action::CreateExponentialHistogram(ref val) => {
6476                    fidl::encoding::encode_in_envelope::<CreateExponentialHistogram, D>(
6477                        <CreateExponentialHistogram as fidl::encoding::ValueTypeMarker>::borrow(
6478                            val,
6479                        ),
6480                        encoder,
6481                        offset + 8,
6482                        _depth,
6483                    )
6484                }
6485                Action::Insert(ref val) => fidl::encoding::encode_in_envelope::<Insert, D>(
6486                    <Insert as fidl::encoding::ValueTypeMarker>::borrow(val),
6487                    encoder,
6488                    offset + 8,
6489                    _depth,
6490                ),
6491                Action::InsertMultiple(ref val) => {
6492                    fidl::encoding::encode_in_envelope::<InsertMultiple, D>(
6493                        <InsertMultiple as fidl::encoding::ValueTypeMarker>::borrow(val),
6494                        encoder,
6495                        offset + 8,
6496                        _depth,
6497                    )
6498                }
6499                Action::CreateBoolProperty(ref val) => {
6500                    fidl::encoding::encode_in_envelope::<CreateBoolProperty, D>(
6501                        <CreateBoolProperty as fidl::encoding::ValueTypeMarker>::borrow(val),
6502                        encoder,
6503                        offset + 8,
6504                        _depth,
6505                    )
6506                }
6507                Action::SetBool(ref val) => fidl::encoding::encode_in_envelope::<SetBool, D>(
6508                    <SetBool as fidl::encoding::ValueTypeMarker>::borrow(val),
6509                    encoder,
6510                    offset + 8,
6511                    _depth,
6512                ),
6513                Action::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
6514            }
6515        }
6516    }
6517
6518    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Action {
6519        #[inline(always)]
6520        fn new_empty() -> Self {
6521            Self::__SourceBreaking { unknown_ordinal: 0 }
6522        }
6523
6524        #[inline]
6525        unsafe fn decode(
6526            &mut self,
6527            decoder: &mut fidl::encoding::Decoder<'_, D>,
6528            offset: usize,
6529            mut depth: fidl::encoding::Depth,
6530        ) -> fidl::Result<()> {
6531            decoder.debug_check_bounds::<Self>(offset);
6532            #[allow(unused_variables)]
6533            let next_out_of_line = decoder.next_out_of_line();
6534            let handles_before = decoder.remaining_handles();
6535            let (ordinal, inlined, num_bytes, num_handles) =
6536                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
6537
6538            let member_inline_size = match ordinal {
6539                1 => <CreateNode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6540                2 => <DeleteNode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6541                3 => <CreateNumericProperty as fidl::encoding::TypeMarker>::inline_size(
6542                    decoder.context,
6543                ),
6544                4 => <CreateBytesProperty as fidl::encoding::TypeMarker>::inline_size(
6545                    decoder.context,
6546                ),
6547                5 => <CreateStringProperty as fidl::encoding::TypeMarker>::inline_size(
6548                    decoder.context,
6549                ),
6550                6 => <DeleteProperty as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6551                7 => <SetNumber as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6552                8 => <SetString as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6553                9 => <SetBytes as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6554                10 => <AddNumber as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6555                11 => <SubtractNumber as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6556                12 => <CreateArrayProperty as fidl::encoding::TypeMarker>::inline_size(
6557                    decoder.context,
6558                ),
6559                13 => <ArraySet as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6560                14 => <ArrayAdd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6561                15 => <ArraySubtract as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6562                16 => <CreateLinearHistogram as fidl::encoding::TypeMarker>::inline_size(
6563                    decoder.context,
6564                ),
6565                17 => <CreateExponentialHistogram as fidl::encoding::TypeMarker>::inline_size(
6566                    decoder.context,
6567                ),
6568                18 => <Insert as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6569                19 => <InsertMultiple as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6570                20 => {
6571                    <CreateBoolProperty as fidl::encoding::TypeMarker>::inline_size(decoder.context)
6572                }
6573                21 => <SetBool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
6574                0 => return Err(fidl::Error::UnknownUnionTag),
6575                _ => num_bytes as usize,
6576            };
6577
6578            if inlined != (member_inline_size <= 4) {
6579                return Err(fidl::Error::InvalidInlineBitInEnvelope);
6580            }
6581            let _inner_offset;
6582            if inlined {
6583                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
6584                _inner_offset = offset + 8;
6585            } else {
6586                depth.increment()?;
6587                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6588            }
6589            match ordinal {
6590                1 => {
6591                    #[allow(irrefutable_let_patterns)]
6592                    if let Action::CreateNode(_) = self {
6593                        // Do nothing, read the value into the object
6594                    } else {
6595                        // Initialize `self` to the right variant
6596                        *self = Action::CreateNode(fidl::new_empty!(CreateNode, D));
6597                    }
6598                    #[allow(irrefutable_let_patterns)]
6599                    if let Action::CreateNode(ref mut val) = self {
6600                        fidl::decode!(CreateNode, D, val, decoder, _inner_offset, depth)?;
6601                    } else {
6602                        unreachable!()
6603                    }
6604                }
6605                2 => {
6606                    #[allow(irrefutable_let_patterns)]
6607                    if let Action::DeleteNode(_) = self {
6608                        // Do nothing, read the value into the object
6609                    } else {
6610                        // Initialize `self` to the right variant
6611                        *self = Action::DeleteNode(fidl::new_empty!(DeleteNode, D));
6612                    }
6613                    #[allow(irrefutable_let_patterns)]
6614                    if let Action::DeleteNode(ref mut val) = self {
6615                        fidl::decode!(DeleteNode, D, val, decoder, _inner_offset, depth)?;
6616                    } else {
6617                        unreachable!()
6618                    }
6619                }
6620                3 => {
6621                    #[allow(irrefutable_let_patterns)]
6622                    if let Action::CreateNumericProperty(_) = self {
6623                        // Do nothing, read the value into the object
6624                    } else {
6625                        // Initialize `self` to the right variant
6626                        *self = Action::CreateNumericProperty(fidl::new_empty!(
6627                            CreateNumericProperty,
6628                            D
6629                        ));
6630                    }
6631                    #[allow(irrefutable_let_patterns)]
6632                    if let Action::CreateNumericProperty(ref mut val) = self {
6633                        fidl::decode!(
6634                            CreateNumericProperty,
6635                            D,
6636                            val,
6637                            decoder,
6638                            _inner_offset,
6639                            depth
6640                        )?;
6641                    } else {
6642                        unreachable!()
6643                    }
6644                }
6645                4 => {
6646                    #[allow(irrefutable_let_patterns)]
6647                    if let Action::CreateBytesProperty(_) = self {
6648                        // Do nothing, read the value into the object
6649                    } else {
6650                        // Initialize `self` to the right variant
6651                        *self =
6652                            Action::CreateBytesProperty(fidl::new_empty!(CreateBytesProperty, D));
6653                    }
6654                    #[allow(irrefutable_let_patterns)]
6655                    if let Action::CreateBytesProperty(ref mut val) = self {
6656                        fidl::decode!(CreateBytesProperty, D, val, decoder, _inner_offset, depth)?;
6657                    } else {
6658                        unreachable!()
6659                    }
6660                }
6661                5 => {
6662                    #[allow(irrefutable_let_patterns)]
6663                    if let Action::CreateStringProperty(_) = self {
6664                        // Do nothing, read the value into the object
6665                    } else {
6666                        // Initialize `self` to the right variant
6667                        *self =
6668                            Action::CreateStringProperty(fidl::new_empty!(CreateStringProperty, D));
6669                    }
6670                    #[allow(irrefutable_let_patterns)]
6671                    if let Action::CreateStringProperty(ref mut val) = self {
6672                        fidl::decode!(CreateStringProperty, D, val, decoder, _inner_offset, depth)?;
6673                    } else {
6674                        unreachable!()
6675                    }
6676                }
6677                6 => {
6678                    #[allow(irrefutable_let_patterns)]
6679                    if let Action::DeleteProperty(_) = self {
6680                        // Do nothing, read the value into the object
6681                    } else {
6682                        // Initialize `self` to the right variant
6683                        *self = Action::DeleteProperty(fidl::new_empty!(DeleteProperty, D));
6684                    }
6685                    #[allow(irrefutable_let_patterns)]
6686                    if let Action::DeleteProperty(ref mut val) = self {
6687                        fidl::decode!(DeleteProperty, D, val, decoder, _inner_offset, depth)?;
6688                    } else {
6689                        unreachable!()
6690                    }
6691                }
6692                7 => {
6693                    #[allow(irrefutable_let_patterns)]
6694                    if let Action::SetNumber(_) = self {
6695                        // Do nothing, read the value into the object
6696                    } else {
6697                        // Initialize `self` to the right variant
6698                        *self = Action::SetNumber(fidl::new_empty!(SetNumber, D));
6699                    }
6700                    #[allow(irrefutable_let_patterns)]
6701                    if let Action::SetNumber(ref mut val) = self {
6702                        fidl::decode!(SetNumber, D, val, decoder, _inner_offset, depth)?;
6703                    } else {
6704                        unreachable!()
6705                    }
6706                }
6707                8 => {
6708                    #[allow(irrefutable_let_patterns)]
6709                    if let Action::SetString(_) = self {
6710                        // Do nothing, read the value into the object
6711                    } else {
6712                        // Initialize `self` to the right variant
6713                        *self = Action::SetString(fidl::new_empty!(SetString, D));
6714                    }
6715                    #[allow(irrefutable_let_patterns)]
6716                    if let Action::SetString(ref mut val) = self {
6717                        fidl::decode!(SetString, D, val, decoder, _inner_offset, depth)?;
6718                    } else {
6719                        unreachable!()
6720                    }
6721                }
6722                9 => {
6723                    #[allow(irrefutable_let_patterns)]
6724                    if let Action::SetBytes(_) = self {
6725                        // Do nothing, read the value into the object
6726                    } else {
6727                        // Initialize `self` to the right variant
6728                        *self = Action::SetBytes(fidl::new_empty!(SetBytes, D));
6729                    }
6730                    #[allow(irrefutable_let_patterns)]
6731                    if let Action::SetBytes(ref mut val) = self {
6732                        fidl::decode!(SetBytes, D, val, decoder, _inner_offset, depth)?;
6733                    } else {
6734                        unreachable!()
6735                    }
6736                }
6737                10 => {
6738                    #[allow(irrefutable_let_patterns)]
6739                    if let Action::AddNumber(_) = self {
6740                        // Do nothing, read the value into the object
6741                    } else {
6742                        // Initialize `self` to the right variant
6743                        *self = Action::AddNumber(fidl::new_empty!(AddNumber, D));
6744                    }
6745                    #[allow(irrefutable_let_patterns)]
6746                    if let Action::AddNumber(ref mut val) = self {
6747                        fidl::decode!(AddNumber, D, val, decoder, _inner_offset, depth)?;
6748                    } else {
6749                        unreachable!()
6750                    }
6751                }
6752                11 => {
6753                    #[allow(irrefutable_let_patterns)]
6754                    if let Action::SubtractNumber(_) = self {
6755                        // Do nothing, read the value into the object
6756                    } else {
6757                        // Initialize `self` to the right variant
6758                        *self = Action::SubtractNumber(fidl::new_empty!(SubtractNumber, D));
6759                    }
6760                    #[allow(irrefutable_let_patterns)]
6761                    if let Action::SubtractNumber(ref mut val) = self {
6762                        fidl::decode!(SubtractNumber, D, val, decoder, _inner_offset, depth)?;
6763                    } else {
6764                        unreachable!()
6765                    }
6766                }
6767                12 => {
6768                    #[allow(irrefutable_let_patterns)]
6769                    if let Action::CreateArrayProperty(_) = self {
6770                        // Do nothing, read the value into the object
6771                    } else {
6772                        // Initialize `self` to the right variant
6773                        *self =
6774                            Action::CreateArrayProperty(fidl::new_empty!(CreateArrayProperty, D));
6775                    }
6776                    #[allow(irrefutable_let_patterns)]
6777                    if let Action::CreateArrayProperty(ref mut val) = self {
6778                        fidl::decode!(CreateArrayProperty, D, val, decoder, _inner_offset, depth)?;
6779                    } else {
6780                        unreachable!()
6781                    }
6782                }
6783                13 => {
6784                    #[allow(irrefutable_let_patterns)]
6785                    if let Action::ArraySet(_) = self {
6786                        // Do nothing, read the value into the object
6787                    } else {
6788                        // Initialize `self` to the right variant
6789                        *self = Action::ArraySet(fidl::new_empty!(ArraySet, D));
6790                    }
6791                    #[allow(irrefutable_let_patterns)]
6792                    if let Action::ArraySet(ref mut val) = self {
6793                        fidl::decode!(ArraySet, D, val, decoder, _inner_offset, depth)?;
6794                    } else {
6795                        unreachable!()
6796                    }
6797                }
6798                14 => {
6799                    #[allow(irrefutable_let_patterns)]
6800                    if let Action::ArrayAdd(_) = self {
6801                        // Do nothing, read the value into the object
6802                    } else {
6803                        // Initialize `self` to the right variant
6804                        *self = Action::ArrayAdd(fidl::new_empty!(ArrayAdd, D));
6805                    }
6806                    #[allow(irrefutable_let_patterns)]
6807                    if let Action::ArrayAdd(ref mut val) = self {
6808                        fidl::decode!(ArrayAdd, D, val, decoder, _inner_offset, depth)?;
6809                    } else {
6810                        unreachable!()
6811                    }
6812                }
6813                15 => {
6814                    #[allow(irrefutable_let_patterns)]
6815                    if let Action::ArraySubtract(_) = self {
6816                        // Do nothing, read the value into the object
6817                    } else {
6818                        // Initialize `self` to the right variant
6819                        *self = Action::ArraySubtract(fidl::new_empty!(ArraySubtract, D));
6820                    }
6821                    #[allow(irrefutable_let_patterns)]
6822                    if let Action::ArraySubtract(ref mut val) = self {
6823                        fidl::decode!(ArraySubtract, D, val, decoder, _inner_offset, depth)?;
6824                    } else {
6825                        unreachable!()
6826                    }
6827                }
6828                16 => {
6829                    #[allow(irrefutable_let_patterns)]
6830                    if let Action::CreateLinearHistogram(_) = self {
6831                        // Do nothing, read the value into the object
6832                    } else {
6833                        // Initialize `self` to the right variant
6834                        *self = Action::CreateLinearHistogram(fidl::new_empty!(
6835                            CreateLinearHistogram,
6836                            D
6837                        ));
6838                    }
6839                    #[allow(irrefutable_let_patterns)]
6840                    if let Action::CreateLinearHistogram(ref mut val) = self {
6841                        fidl::decode!(
6842                            CreateLinearHistogram,
6843                            D,
6844                            val,
6845                            decoder,
6846                            _inner_offset,
6847                            depth
6848                        )?;
6849                    } else {
6850                        unreachable!()
6851                    }
6852                }
6853                17 => {
6854                    #[allow(irrefutable_let_patterns)]
6855                    if let Action::CreateExponentialHistogram(_) = self {
6856                        // Do nothing, read the value into the object
6857                    } else {
6858                        // Initialize `self` to the right variant
6859                        *self = Action::CreateExponentialHistogram(fidl::new_empty!(
6860                            CreateExponentialHistogram,
6861                            D
6862                        ));
6863                    }
6864                    #[allow(irrefutable_let_patterns)]
6865                    if let Action::CreateExponentialHistogram(ref mut val) = self {
6866                        fidl::decode!(
6867                            CreateExponentialHistogram,
6868                            D,
6869                            val,
6870                            decoder,
6871                            _inner_offset,
6872                            depth
6873                        )?;
6874                    } else {
6875                        unreachable!()
6876                    }
6877                }
6878                18 => {
6879                    #[allow(irrefutable_let_patterns)]
6880                    if let Action::Insert(_) = self {
6881                        // Do nothing, read the value into the object
6882                    } else {
6883                        // Initialize `self` to the right variant
6884                        *self = Action::Insert(fidl::new_empty!(Insert, D));
6885                    }
6886                    #[allow(irrefutable_let_patterns)]
6887                    if let Action::Insert(ref mut val) = self {
6888                        fidl::decode!(Insert, D, val, decoder, _inner_offset, depth)?;
6889                    } else {
6890                        unreachable!()
6891                    }
6892                }
6893                19 => {
6894                    #[allow(irrefutable_let_patterns)]
6895                    if let Action::InsertMultiple(_) = self {
6896                        // Do nothing, read the value into the object
6897                    } else {
6898                        // Initialize `self` to the right variant
6899                        *self = Action::InsertMultiple(fidl::new_empty!(InsertMultiple, D));
6900                    }
6901                    #[allow(irrefutable_let_patterns)]
6902                    if let Action::InsertMultiple(ref mut val) = self {
6903                        fidl::decode!(InsertMultiple, D, val, decoder, _inner_offset, depth)?;
6904                    } else {
6905                        unreachable!()
6906                    }
6907                }
6908                20 => {
6909                    #[allow(irrefutable_let_patterns)]
6910                    if let Action::CreateBoolProperty(_) = self {
6911                        // Do nothing, read the value into the object
6912                    } else {
6913                        // Initialize `self` to the right variant
6914                        *self = Action::CreateBoolProperty(fidl::new_empty!(CreateBoolProperty, D));
6915                    }
6916                    #[allow(irrefutable_let_patterns)]
6917                    if let Action::CreateBoolProperty(ref mut val) = self {
6918                        fidl::decode!(CreateBoolProperty, D, val, decoder, _inner_offset, depth)?;
6919                    } else {
6920                        unreachable!()
6921                    }
6922                }
6923                21 => {
6924                    #[allow(irrefutable_let_patterns)]
6925                    if let Action::SetBool(_) = self {
6926                        // Do nothing, read the value into the object
6927                    } else {
6928                        // Initialize `self` to the right variant
6929                        *self = Action::SetBool(fidl::new_empty!(SetBool, D));
6930                    }
6931                    #[allow(irrefutable_let_patterns)]
6932                    if let Action::SetBool(ref mut val) = self {
6933                        fidl::decode!(SetBool, D, val, decoder, _inner_offset, depth)?;
6934                    } else {
6935                        unreachable!()
6936                    }
6937                }
6938                #[allow(deprecated)]
6939                ordinal => {
6940                    for _ in 0..num_handles {
6941                        decoder.drop_next_handle()?;
6942                    }
6943                    *self = Action::__SourceBreaking { unknown_ordinal: ordinal };
6944                }
6945            }
6946            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
6947                return Err(fidl::Error::InvalidNumBytesInEnvelope);
6948            }
6949            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6950                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6951            }
6952            Ok(())
6953        }
6954    }
6955
6956    impl fidl::encoding::ValueTypeMarker for LazyAction {
6957        type Borrowed<'a> = &'a Self;
6958        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6959            value
6960        }
6961    }
6962
6963    unsafe impl fidl::encoding::TypeMarker for LazyAction {
6964        type Owned = Self;
6965
6966        #[inline(always)]
6967        fn inline_align(_context: fidl::encoding::Context) -> usize {
6968            8
6969        }
6970
6971        #[inline(always)]
6972        fn inline_size(_context: fidl::encoding::Context) -> usize {
6973            16
6974        }
6975    }
6976
6977    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LazyAction, D>
6978        for &LazyAction
6979    {
6980        #[inline]
6981        unsafe fn encode(
6982            self,
6983            encoder: &mut fidl::encoding::Encoder<'_, D>,
6984            offset: usize,
6985            _depth: fidl::encoding::Depth,
6986        ) -> fidl::Result<()> {
6987            encoder.debug_check_bounds::<LazyAction>(offset);
6988            encoder.write_num::<u64>(self.ordinal(), offset);
6989            match self {
6990                LazyAction::CreateLazyNode(ref val) => {
6991                    fidl::encoding::encode_in_envelope::<CreateLazyNode, D>(
6992                        <CreateLazyNode as fidl::encoding::ValueTypeMarker>::borrow(val),
6993                        encoder,
6994                        offset + 8,
6995                        _depth,
6996                    )
6997                }
6998                LazyAction::DeleteLazyNode(ref val) => {
6999                    fidl::encoding::encode_in_envelope::<DeleteLazyNode, D>(
7000                        <DeleteLazyNode as fidl::encoding::ValueTypeMarker>::borrow(val),
7001                        encoder,
7002                        offset + 8,
7003                        _depth,
7004                    )
7005                }
7006                LazyAction::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
7007            }
7008        }
7009    }
7010
7011    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LazyAction {
7012        #[inline(always)]
7013        fn new_empty() -> Self {
7014            Self::__SourceBreaking { unknown_ordinal: 0 }
7015        }
7016
7017        #[inline]
7018        unsafe fn decode(
7019            &mut self,
7020            decoder: &mut fidl::encoding::Decoder<'_, D>,
7021            offset: usize,
7022            mut depth: fidl::encoding::Depth,
7023        ) -> fidl::Result<()> {
7024            decoder.debug_check_bounds::<Self>(offset);
7025            #[allow(unused_variables)]
7026            let next_out_of_line = decoder.next_out_of_line();
7027            let handles_before = decoder.remaining_handles();
7028            let (ordinal, inlined, num_bytes, num_handles) =
7029                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
7030
7031            let member_inline_size = match ordinal {
7032                1 => <CreateLazyNode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
7033                2 => <DeleteLazyNode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
7034                0 => return Err(fidl::Error::UnknownUnionTag),
7035                _ => num_bytes as usize,
7036            };
7037
7038            if inlined != (member_inline_size <= 4) {
7039                return Err(fidl::Error::InvalidInlineBitInEnvelope);
7040            }
7041            let _inner_offset;
7042            if inlined {
7043                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
7044                _inner_offset = offset + 8;
7045            } else {
7046                depth.increment()?;
7047                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7048            }
7049            match ordinal {
7050                1 => {
7051                    #[allow(irrefutable_let_patterns)]
7052                    if let LazyAction::CreateLazyNode(_) = self {
7053                        // Do nothing, read the value into the object
7054                    } else {
7055                        // Initialize `self` to the right variant
7056                        *self = LazyAction::CreateLazyNode(fidl::new_empty!(CreateLazyNode, D));
7057                    }
7058                    #[allow(irrefutable_let_patterns)]
7059                    if let LazyAction::CreateLazyNode(ref mut val) = self {
7060                        fidl::decode!(CreateLazyNode, D, val, decoder, _inner_offset, depth)?;
7061                    } else {
7062                        unreachable!()
7063                    }
7064                }
7065                2 => {
7066                    #[allow(irrefutable_let_patterns)]
7067                    if let LazyAction::DeleteLazyNode(_) = self {
7068                        // Do nothing, read the value into the object
7069                    } else {
7070                        // Initialize `self` to the right variant
7071                        *self = LazyAction::DeleteLazyNode(fidl::new_empty!(DeleteLazyNode, D));
7072                    }
7073                    #[allow(irrefutable_let_patterns)]
7074                    if let LazyAction::DeleteLazyNode(ref mut val) = self {
7075                        fidl::decode!(DeleteLazyNode, D, val, decoder, _inner_offset, depth)?;
7076                    } else {
7077                        unreachable!()
7078                    }
7079                }
7080                #[allow(deprecated)]
7081                ordinal => {
7082                    for _ in 0..num_handles {
7083                        decoder.drop_next_handle()?;
7084                    }
7085                    *self = LazyAction::__SourceBreaking { unknown_ordinal: ordinal };
7086                }
7087            }
7088            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
7089                return Err(fidl::Error::InvalidNumBytesInEnvelope);
7090            }
7091            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7092                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7093            }
7094            Ok(())
7095        }
7096    }
7097
7098    impl fidl::encoding::ValueTypeMarker for Value {
7099        type Borrowed<'a> = &'a Self;
7100        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7101            value
7102        }
7103    }
7104
7105    unsafe impl fidl::encoding::TypeMarker for Value {
7106        type Owned = Self;
7107
7108        #[inline(always)]
7109        fn inline_align(_context: fidl::encoding::Context) -> usize {
7110            8
7111        }
7112
7113        #[inline(always)]
7114        fn inline_size(_context: fidl::encoding::Context) -> usize {
7115            16
7116        }
7117    }
7118
7119    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Value, D> for &Value {
7120        #[inline]
7121        unsafe fn encode(
7122            self,
7123            encoder: &mut fidl::encoding::Encoder<'_, D>,
7124            offset: usize,
7125            _depth: fidl::encoding::Depth,
7126        ) -> fidl::Result<()> {
7127            encoder.debug_check_bounds::<Value>(offset);
7128            encoder.write_num::<u64>(self.ordinal(), offset);
7129            match self {
7130                Value::IntT(ref val) => fidl::encoding::encode_in_envelope::<i64, D>(
7131                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(val),
7132                    encoder,
7133                    offset + 8,
7134                    _depth,
7135                ),
7136                Value::UintT(ref val) => fidl::encoding::encode_in_envelope::<u64, D>(
7137                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
7138                    encoder,
7139                    offset + 8,
7140                    _depth,
7141                ),
7142                Value::DoubleT(ref val) => fidl::encoding::encode_in_envelope::<f64, D>(
7143                    <f64 as fidl::encoding::ValueTypeMarker>::borrow(val),
7144                    encoder,
7145                    offset + 8,
7146                    _depth,
7147                ),
7148                Value::StringT(ref val) => fidl::encoding::encode_in_envelope::<
7149                    fidl::encoding::UnboundedString,
7150                    D,
7151                >(
7152                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
7153                        val,
7154                    ),
7155                    encoder,
7156                    offset + 8,
7157                    _depth,
7158                ),
7159                Value::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
7160            }
7161        }
7162    }
7163
7164    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Value {
7165        #[inline(always)]
7166        fn new_empty() -> Self {
7167            Self::__SourceBreaking { unknown_ordinal: 0 }
7168        }
7169
7170        #[inline]
7171        unsafe fn decode(
7172            &mut self,
7173            decoder: &mut fidl::encoding::Decoder<'_, D>,
7174            offset: usize,
7175            mut depth: fidl::encoding::Depth,
7176        ) -> fidl::Result<()> {
7177            decoder.debug_check_bounds::<Self>(offset);
7178            #[allow(unused_variables)]
7179            let next_out_of_line = decoder.next_out_of_line();
7180            let handles_before = decoder.remaining_handles();
7181            let (ordinal, inlined, num_bytes, num_handles) =
7182                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
7183
7184            let member_inline_size = match ordinal {
7185                1 => <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
7186                2 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
7187                3 => <f64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
7188                4 => <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7189                    decoder.context,
7190                ),
7191                0 => return Err(fidl::Error::UnknownUnionTag),
7192                _ => num_bytes as usize,
7193            };
7194
7195            if inlined != (member_inline_size <= 4) {
7196                return Err(fidl::Error::InvalidInlineBitInEnvelope);
7197            }
7198            let _inner_offset;
7199            if inlined {
7200                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
7201                _inner_offset = offset + 8;
7202            } else {
7203                depth.increment()?;
7204                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7205            }
7206            match ordinal {
7207                1 => {
7208                    #[allow(irrefutable_let_patterns)]
7209                    if let Value::IntT(_) = self {
7210                        // Do nothing, read the value into the object
7211                    } else {
7212                        // Initialize `self` to the right variant
7213                        *self = Value::IntT(fidl::new_empty!(i64, D));
7214                    }
7215                    #[allow(irrefutable_let_patterns)]
7216                    if let Value::IntT(ref mut val) = self {
7217                        fidl::decode!(i64, D, val, decoder, _inner_offset, depth)?;
7218                    } else {
7219                        unreachable!()
7220                    }
7221                }
7222                2 => {
7223                    #[allow(irrefutable_let_patterns)]
7224                    if let Value::UintT(_) = self {
7225                        // Do nothing, read the value into the object
7226                    } else {
7227                        // Initialize `self` to the right variant
7228                        *self = Value::UintT(fidl::new_empty!(u64, D));
7229                    }
7230                    #[allow(irrefutable_let_patterns)]
7231                    if let Value::UintT(ref mut val) = self {
7232                        fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
7233                    } else {
7234                        unreachable!()
7235                    }
7236                }
7237                3 => {
7238                    #[allow(irrefutable_let_patterns)]
7239                    if let Value::DoubleT(_) = self {
7240                        // Do nothing, read the value into the object
7241                    } else {
7242                        // Initialize `self` to the right variant
7243                        *self = Value::DoubleT(fidl::new_empty!(f64, D));
7244                    }
7245                    #[allow(irrefutable_let_patterns)]
7246                    if let Value::DoubleT(ref mut val) = self {
7247                        fidl::decode!(f64, D, val, decoder, _inner_offset, depth)?;
7248                    } else {
7249                        unreachable!()
7250                    }
7251                }
7252                4 => {
7253                    #[allow(irrefutable_let_patterns)]
7254                    if let Value::StringT(_) = self {
7255                        // Do nothing, read the value into the object
7256                    } else {
7257                        // Initialize `self` to the right variant
7258                        *self =
7259                            Value::StringT(fidl::new_empty!(fidl::encoding::UnboundedString, D));
7260                    }
7261                    #[allow(irrefutable_let_patterns)]
7262                    if let Value::StringT(ref mut val) = self {
7263                        fidl::decode!(
7264                            fidl::encoding::UnboundedString,
7265                            D,
7266                            val,
7267                            decoder,
7268                            _inner_offset,
7269                            depth
7270                        )?;
7271                    } else {
7272                        unreachable!()
7273                    }
7274                }
7275                #[allow(deprecated)]
7276                ordinal => {
7277                    for _ in 0..num_handles {
7278                        decoder.drop_next_handle()?;
7279                    }
7280                    *self = Value::__SourceBreaking { unknown_ordinal: ordinal };
7281                }
7282            }
7283            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
7284                return Err(fidl::Error::InvalidNumBytesInEnvelope);
7285            }
7286            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7287                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7288            }
7289            Ok(())
7290        }
7291    }
7292}