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