fidl_fuchsia_paver_common/
fidl_fuchsia_paver_common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11pub const MAX_FIRMWARE_TYPE_LENGTH: u32 = 256;
12
13/// The maximum number of times the firmware will attempt to boot into a `PENDING` configuration.
14///
15/// If the boot attempts are all exhausted without the configuration being updated to `HEALTHY`,
16/// the configuration will switch to `UNBOOTABLE` which will cause the next boot to fall back to
17/// the next usable slot.
18///
19/// `HEALTHY` and `UNBOOTABLE` configurations do not count boot attempts; it is assumed that once a
20/// device is in these states it will remain so until the configuration is manually modified.
21pub const MAX_PENDING_BOOT_ATTEMPTS: u8 = 7;
22
23/// Describes assets which may be updated. Each asset has 3 versions, each tied to a particular
24/// configuration.
25#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
26#[repr(u32)]
27pub enum Asset {
28    /// Zircon Boot Image (ZBI) containing the kernel image as well as bootfs.
29    Kernel = 1,
30    /// Metadata used for verified boot purposes.
31    VerifiedBootMetadata = 2,
32}
33
34impl Asset {
35    #[inline]
36    pub fn from_primitive(prim: u32) -> Option<Self> {
37        match prim {
38            1 => Some(Self::Kernel),
39            2 => Some(Self::VerifiedBootMetadata),
40            _ => None,
41        }
42    }
43
44    #[inline]
45    pub const fn into_primitive(self) -> u32 {
46        self as u32
47    }
48
49    #[deprecated = "Strict enums should not use `is_unknown`"]
50    #[inline]
51    pub fn is_unknown(&self) -> bool {
52        false
53    }
54}
55
56/// Describes the version of an asset.
57#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
58#[repr(u32)]
59pub enum Configuration {
60    A = 1,
61    B = 2,
62    Recovery = 3,
63}
64
65impl Configuration {
66    #[inline]
67    pub fn from_primitive(prim: u32) -> Option<Self> {
68        match prim {
69            1 => Some(Self::A),
70            2 => Some(Self::B),
71            3 => Some(Self::Recovery),
72            _ => None,
73        }
74    }
75
76    #[inline]
77    pub const fn into_primitive(self) -> u32 {
78        self as u32
79    }
80
81    #[deprecated = "Strict enums should not use `is_unknown`"]
82    #[inline]
83    pub fn is_unknown(&self) -> bool {
84        false
85    }
86}
87
88/// Set of states configuration may be in.
89#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
90#[repr(u32)]
91pub enum ConfigurationStatus {
92    /// Bootable and health checked.
93    Healthy = 1,
94    /// Bootable but not yet marked healthy.
95    Pending = 2,
96    /// Unbootable.
97    Unbootable = 3,
98}
99
100impl ConfigurationStatus {
101    #[inline]
102    pub fn from_primitive(prim: u32) -> Option<Self> {
103        match prim {
104            1 => Some(Self::Healthy),
105            2 => Some(Self::Pending),
106            3 => Some(Self::Unbootable),
107            _ => None,
108        }
109    }
110
111    #[inline]
112    pub const fn into_primitive(self) -> u32 {
113        self as u32
114    }
115
116    #[deprecated = "Strict enums should not use `is_unknown`"]
117    #[inline]
118    pub fn is_unknown(&self) -> bool {
119        false
120    }
121}
122
123/// Reasons why a configuration may be marked unbootable.
124#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
125pub enum UnbootableReason {
126    /// No reason known; generally indicates that whatever code wrote the underlying metadata does
127    /// not yet support unbootable reasons.
128    None,
129    /// The configuration ran out of boot attempts without being marked `HEALTHY`.
130    NoMoreTries,
131    /// The OS set the configuration unbootable via `BootManager::SetConfigurationUnbootable`.
132    OsRequested,
133    /// Kernel verification failed.
134    VerificationFailure,
135    #[doc(hidden)]
136    __SourceBreaking { unknown_ordinal: u32 },
137}
138
139/// Pattern that matches an unknown `UnbootableReason` member.
140#[macro_export]
141macro_rules! UnbootableReasonUnknown {
142    () => {
143        _
144    };
145}
146
147impl UnbootableReason {
148    #[inline]
149    pub fn from_primitive(prim: u32) -> Option<Self> {
150        match prim {
151            0 => Some(Self::None),
152            1 => Some(Self::NoMoreTries),
153            2 => Some(Self::OsRequested),
154            3 => Some(Self::VerificationFailure),
155            _ => None,
156        }
157    }
158
159    #[inline]
160    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
161        match prim {
162            0 => Self::None,
163            1 => Self::NoMoreTries,
164            2 => Self::OsRequested,
165            3 => Self::VerificationFailure,
166            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
167        }
168    }
169
170    #[inline]
171    pub fn unknown() -> Self {
172        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
173    }
174
175    #[inline]
176    pub const fn into_primitive(self) -> u32 {
177        match self {
178            Self::None => 0,
179            Self::NoMoreTries => 1,
180            Self::OsRequested => 2,
181            Self::VerificationFailure => 3,
182            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
183        }
184    }
185
186    #[inline]
187    pub fn is_unknown(&self) -> bool {
188        match self {
189            Self::__SourceBreaking { unknown_ordinal: _ } => true,
190            _ => false,
191        }
192    }
193}
194
195#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
196#[repr(C)]
197pub struct BootManagerFlushResponse {
198    pub status: i32,
199}
200
201impl fidl::Persistable for BootManagerFlushResponse {}
202
203#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
204pub struct BootManagerQueryConfigurationStatusAndBootAttemptsRequest {
205    pub configuration: Configuration,
206}
207
208impl fidl::Persistable for BootManagerQueryConfigurationStatusAndBootAttemptsRequest {}
209
210#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
211pub struct BootManagerQueryConfigurationStatusRequest {
212    pub configuration: Configuration,
213}
214
215impl fidl::Persistable for BootManagerQueryConfigurationStatusRequest {}
216
217#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
218pub struct BootManagerSetConfigurationActiveRequest {
219    pub configuration: Configuration,
220}
221
222impl fidl::Persistable for BootManagerSetConfigurationActiveRequest {}
223
224#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
225#[repr(C)]
226pub struct BootManagerSetConfigurationActiveResponse {
227    pub status: i32,
228}
229
230impl fidl::Persistable for BootManagerSetConfigurationActiveResponse {}
231
232#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
233pub struct BootManagerSetConfigurationHealthyRequest {
234    pub configuration: Configuration,
235}
236
237impl fidl::Persistable for BootManagerSetConfigurationHealthyRequest {}
238
239#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
240#[repr(C)]
241pub struct BootManagerSetConfigurationHealthyResponse {
242    pub status: i32,
243}
244
245impl fidl::Persistable for BootManagerSetConfigurationHealthyResponse {}
246
247#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
248pub struct BootManagerSetConfigurationUnbootableRequest {
249    pub configuration: Configuration,
250}
251
252impl fidl::Persistable for BootManagerSetConfigurationUnbootableRequest {}
253
254#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
255#[repr(C)]
256pub struct BootManagerSetConfigurationUnbootableResponse {
257    pub status: i32,
258}
259
260impl fidl::Persistable for BootManagerSetConfigurationUnbootableResponse {}
261
262#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
263pub struct BootManagerQueryActiveConfigurationResponse {
264    pub configuration: Configuration,
265}
266
267impl fidl::Persistable for BootManagerQueryActiveConfigurationResponse {}
268
269#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
270pub struct BootManagerQueryConfigurationLastSetActiveResponse {
271    pub configuration: Configuration,
272}
273
274impl fidl::Persistable for BootManagerQueryConfigurationLastSetActiveResponse {}
275
276#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
277pub struct BootManagerQueryConfigurationStatusResponse {
278    pub status: ConfigurationStatus,
279}
280
281impl fidl::Persistable for BootManagerQueryConfigurationStatusResponse {}
282
283#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
284pub struct BootManagerQueryCurrentConfigurationResponse {
285    pub configuration: Configuration,
286}
287
288impl fidl::Persistable for BootManagerQueryCurrentConfigurationResponse {}
289
290#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
291#[repr(C)]
292pub struct DataSinkFlushResponse {
293    pub status: i32,
294}
295
296impl fidl::Persistable for DataSinkFlushResponse {}
297
298#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
299pub struct DataSinkReadAssetRequest {
300    pub configuration: Configuration,
301    pub asset: Asset,
302}
303
304impl fidl::Persistable for DataSinkReadAssetRequest {}
305
306#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
307#[repr(C)]
308pub struct DataSinkWriteAssetResponse {
309    pub status: i32,
310}
311
312impl fidl::Persistable for DataSinkWriteAssetResponse {}
313
314#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
315pub struct DataSinkWriteFirmwareResponse {
316    pub result: WriteFirmwareResult,
317}
318
319impl fidl::Persistable for DataSinkWriteFirmwareResponse {}
320
321#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
322#[repr(C)]
323pub struct DataSinkWriteVolumesResponse {
324    pub status: i32,
325}
326
327impl fidl::Persistable for DataSinkWriteVolumesResponse {}
328
329#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
330#[repr(C)]
331pub struct DynamicDataSinkInitializePartitionTablesResponse {
332    pub status: i32,
333}
334
335impl fidl::Persistable for DynamicDataSinkInitializePartitionTablesResponse {}
336
337#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
338#[repr(C)]
339pub struct DynamicDataSinkWipePartitionTablesResponse {
340    pub status: i32,
341}
342
343impl fidl::Persistable for DynamicDataSinkWipePartitionTablesResponse {}
344
345#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
346pub struct PayloadStreamReadDataResponse {
347    pub result: ReadResult,
348}
349
350impl fidl::Persistable for PayloadStreamReadDataResponse {}
351
352#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
353#[repr(C)]
354pub struct PayloadStreamRegisterVmoResponse {
355    pub status: i32,
356}
357
358impl fidl::Persistable for PayloadStreamRegisterVmoResponse {}
359
360#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
361#[repr(C)]
362pub struct ReadInfo {
363    /// Offset into VMO where read data starts.
364    pub offset: u64,
365    /// Size of read data.
366    pub size: u64,
367}
368
369impl fidl::Persistable for ReadInfo {}
370
371#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
372#[repr(C)]
373pub struct SysconfigFlushResponse {
374    pub status: i32,
375}
376
377impl fidl::Persistable for SysconfigFlushResponse {}
378
379#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
380#[repr(C)]
381pub struct SysconfigWipeResponse {
382    pub status: i32,
383}
384
385impl fidl::Persistable for SysconfigWipeResponse {}
386
387#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
388#[repr(C)]
389pub struct SysconfigWriteResponse {
390    pub status: i32,
391}
392
393impl fidl::Persistable for SysconfigWriteResponse {}
394
395#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
396#[repr(C)]
397pub struct SysconfigGetPartitionSizeResponse {
398    pub size: u64,
399}
400
401impl fidl::Persistable for SysconfigGetPartitionSizeResponse {}
402
403#[derive(Clone, Debug, Default, PartialEq)]
404pub struct BootManagerQueryConfigurationStatusAndBootAttemptsResponse {
405    pub status: Option<ConfigurationStatus>,
406    pub boot_attempts: Option<u8>,
407    pub unbootable_reason: Option<UnbootableReason>,
408    #[doc(hidden)]
409    pub __source_breaking: fidl::marker::SourceBreaking,
410}
411
412impl fidl::Persistable for BootManagerQueryConfigurationStatusAndBootAttemptsResponse {}
413
414#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
415pub enum ReadResult {
416    /// Error encountered while reading data.
417    Err(i32),
418    /// End of file reached.
419    Eof(bool),
420    /// Information about location of successfully read data within pre-registered VMO.
421    Info(ReadInfo),
422}
423
424impl ReadResult {
425    #[inline]
426    pub fn ordinal(&self) -> u64 {
427        match *self {
428            Self::Err(_) => 1,
429            Self::Eof(_) => 2,
430            Self::Info(_) => 3,
431        }
432    }
433
434    #[deprecated = "Strict unions should not use `is_unknown`"]
435    #[inline]
436    pub fn is_unknown(&self) -> bool {
437        false
438    }
439}
440
441impl fidl::Persistable for ReadResult {}
442
443#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
444pub enum WriteFirmwareResult {
445    /// The result status if a write was attempted.
446    Status(i32),
447    /// True if a write was not attempted due to unsupported firmware. This could
448    /// be either unsupported content type or unsupported A/B configuration.
449    ///
450    /// Callers must not treat this as a fatal error, but instead ignore it and
451    /// continue to update the device. This is important to be able to add new
452    /// items to an update package without breaking updates on older devices.
453    Unsupported(bool),
454}
455
456impl WriteFirmwareResult {
457    #[inline]
458    pub fn ordinal(&self) -> u64 {
459        match *self {
460            Self::Status(_) => 1,
461            Self::Unsupported(_) => 2,
462        }
463    }
464
465    #[deprecated = "Strict unions should not use `is_unknown`"]
466    #[inline]
467    pub fn is_unknown(&self) -> bool {
468        false
469    }
470}
471
472impl fidl::Persistable for WriteFirmwareResult {}
473
474mod internal {
475    use super::*;
476    unsafe impl fidl::encoding::TypeMarker for Asset {
477        type Owned = Self;
478
479        #[inline(always)]
480        fn inline_align(_context: fidl::encoding::Context) -> usize {
481            std::mem::align_of::<u32>()
482        }
483
484        #[inline(always)]
485        fn inline_size(_context: fidl::encoding::Context) -> usize {
486            std::mem::size_of::<u32>()
487        }
488
489        #[inline(always)]
490        fn encode_is_copy() -> bool {
491            true
492        }
493
494        #[inline(always)]
495        fn decode_is_copy() -> bool {
496            false
497        }
498    }
499
500    impl fidl::encoding::ValueTypeMarker for Asset {
501        type Borrowed<'a> = Self;
502        #[inline(always)]
503        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
504            *value
505        }
506    }
507
508    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Asset {
509        #[inline]
510        unsafe fn encode(
511            self,
512            encoder: &mut fidl::encoding::Encoder<'_, D>,
513            offset: usize,
514            _depth: fidl::encoding::Depth,
515        ) -> fidl::Result<()> {
516            encoder.debug_check_bounds::<Self>(offset);
517            encoder.write_num(self.into_primitive(), offset);
518            Ok(())
519        }
520    }
521
522    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Asset {
523        #[inline(always)]
524        fn new_empty() -> Self {
525            Self::Kernel
526        }
527
528        #[inline]
529        unsafe fn decode(
530            &mut self,
531            decoder: &mut fidl::encoding::Decoder<'_, D>,
532            offset: usize,
533            _depth: fidl::encoding::Depth,
534        ) -> fidl::Result<()> {
535            decoder.debug_check_bounds::<Self>(offset);
536            let prim = decoder.read_num::<u32>(offset);
537
538            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
539            Ok(())
540        }
541    }
542    unsafe impl fidl::encoding::TypeMarker for Configuration {
543        type Owned = Self;
544
545        #[inline(always)]
546        fn inline_align(_context: fidl::encoding::Context) -> usize {
547            std::mem::align_of::<u32>()
548        }
549
550        #[inline(always)]
551        fn inline_size(_context: fidl::encoding::Context) -> usize {
552            std::mem::size_of::<u32>()
553        }
554
555        #[inline(always)]
556        fn encode_is_copy() -> bool {
557            true
558        }
559
560        #[inline(always)]
561        fn decode_is_copy() -> bool {
562            false
563        }
564    }
565
566    impl fidl::encoding::ValueTypeMarker for Configuration {
567        type Borrowed<'a> = Self;
568        #[inline(always)]
569        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
570            *value
571        }
572    }
573
574    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Configuration {
575        #[inline]
576        unsafe fn encode(
577            self,
578            encoder: &mut fidl::encoding::Encoder<'_, D>,
579            offset: usize,
580            _depth: fidl::encoding::Depth,
581        ) -> fidl::Result<()> {
582            encoder.debug_check_bounds::<Self>(offset);
583            encoder.write_num(self.into_primitive(), offset);
584            Ok(())
585        }
586    }
587
588    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Configuration {
589        #[inline(always)]
590        fn new_empty() -> Self {
591            Self::A
592        }
593
594        #[inline]
595        unsafe fn decode(
596            &mut self,
597            decoder: &mut fidl::encoding::Decoder<'_, D>,
598            offset: usize,
599            _depth: fidl::encoding::Depth,
600        ) -> fidl::Result<()> {
601            decoder.debug_check_bounds::<Self>(offset);
602            let prim = decoder.read_num::<u32>(offset);
603
604            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
605            Ok(())
606        }
607    }
608    unsafe impl fidl::encoding::TypeMarker for ConfigurationStatus {
609        type Owned = Self;
610
611        #[inline(always)]
612        fn inline_align(_context: fidl::encoding::Context) -> usize {
613            std::mem::align_of::<u32>()
614        }
615
616        #[inline(always)]
617        fn inline_size(_context: fidl::encoding::Context) -> usize {
618            std::mem::size_of::<u32>()
619        }
620
621        #[inline(always)]
622        fn encode_is_copy() -> bool {
623            true
624        }
625
626        #[inline(always)]
627        fn decode_is_copy() -> bool {
628            false
629        }
630    }
631
632    impl fidl::encoding::ValueTypeMarker for ConfigurationStatus {
633        type Borrowed<'a> = Self;
634        #[inline(always)]
635        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
636            *value
637        }
638    }
639
640    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
641        for ConfigurationStatus
642    {
643        #[inline]
644        unsafe fn encode(
645            self,
646            encoder: &mut fidl::encoding::Encoder<'_, D>,
647            offset: usize,
648            _depth: fidl::encoding::Depth,
649        ) -> fidl::Result<()> {
650            encoder.debug_check_bounds::<Self>(offset);
651            encoder.write_num(self.into_primitive(), offset);
652            Ok(())
653        }
654    }
655
656    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConfigurationStatus {
657        #[inline(always)]
658        fn new_empty() -> Self {
659            Self::Healthy
660        }
661
662        #[inline]
663        unsafe fn decode(
664            &mut self,
665            decoder: &mut fidl::encoding::Decoder<'_, D>,
666            offset: usize,
667            _depth: fidl::encoding::Depth,
668        ) -> fidl::Result<()> {
669            decoder.debug_check_bounds::<Self>(offset);
670            let prim = decoder.read_num::<u32>(offset);
671
672            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
673            Ok(())
674        }
675    }
676    unsafe impl fidl::encoding::TypeMarker for UnbootableReason {
677        type Owned = Self;
678
679        #[inline(always)]
680        fn inline_align(_context: fidl::encoding::Context) -> usize {
681            std::mem::align_of::<u32>()
682        }
683
684        #[inline(always)]
685        fn inline_size(_context: fidl::encoding::Context) -> usize {
686            std::mem::size_of::<u32>()
687        }
688
689        #[inline(always)]
690        fn encode_is_copy() -> bool {
691            false
692        }
693
694        #[inline(always)]
695        fn decode_is_copy() -> bool {
696            false
697        }
698    }
699
700    impl fidl::encoding::ValueTypeMarker for UnbootableReason {
701        type Borrowed<'a> = Self;
702        #[inline(always)]
703        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
704            *value
705        }
706    }
707
708    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
709        for UnbootableReason
710    {
711        #[inline]
712        unsafe fn encode(
713            self,
714            encoder: &mut fidl::encoding::Encoder<'_, D>,
715            offset: usize,
716            _depth: fidl::encoding::Depth,
717        ) -> fidl::Result<()> {
718            encoder.debug_check_bounds::<Self>(offset);
719            encoder.write_num(self.into_primitive(), offset);
720            Ok(())
721        }
722    }
723
724    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnbootableReason {
725        #[inline(always)]
726        fn new_empty() -> Self {
727            Self::unknown()
728        }
729
730        #[inline]
731        unsafe fn decode(
732            &mut self,
733            decoder: &mut fidl::encoding::Decoder<'_, D>,
734            offset: usize,
735            _depth: fidl::encoding::Depth,
736        ) -> fidl::Result<()> {
737            decoder.debug_check_bounds::<Self>(offset);
738            let prim = decoder.read_num::<u32>(offset);
739
740            *self = Self::from_primitive_allow_unknown(prim);
741            Ok(())
742        }
743    }
744
745    impl fidl::encoding::ValueTypeMarker for BootManagerFlushResponse {
746        type Borrowed<'a> = &'a Self;
747        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
748            value
749        }
750    }
751
752    unsafe impl fidl::encoding::TypeMarker for BootManagerFlushResponse {
753        type Owned = Self;
754
755        #[inline(always)]
756        fn inline_align(_context: fidl::encoding::Context) -> usize {
757            4
758        }
759
760        #[inline(always)]
761        fn inline_size(_context: fidl::encoding::Context) -> usize {
762            4
763        }
764        #[inline(always)]
765        fn encode_is_copy() -> bool {
766            true
767        }
768
769        #[inline(always)]
770        fn decode_is_copy() -> bool {
771            true
772        }
773    }
774
775    unsafe impl<D: fidl::encoding::ResourceDialect>
776        fidl::encoding::Encode<BootManagerFlushResponse, D> for &BootManagerFlushResponse
777    {
778        #[inline]
779        unsafe fn encode(
780            self,
781            encoder: &mut fidl::encoding::Encoder<'_, D>,
782            offset: usize,
783            _depth: fidl::encoding::Depth,
784        ) -> fidl::Result<()> {
785            encoder.debug_check_bounds::<BootManagerFlushResponse>(offset);
786            unsafe {
787                // Copy the object into the buffer.
788                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
789                (buf_ptr as *mut BootManagerFlushResponse)
790                    .write_unaligned((self as *const BootManagerFlushResponse).read());
791                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
792                // done second because the memcpy will write garbage to these bytes.
793            }
794            Ok(())
795        }
796    }
797    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
798        fidl::encoding::Encode<BootManagerFlushResponse, D> for (T0,)
799    {
800        #[inline]
801        unsafe fn encode(
802            self,
803            encoder: &mut fidl::encoding::Encoder<'_, D>,
804            offset: usize,
805            depth: fidl::encoding::Depth,
806        ) -> fidl::Result<()> {
807            encoder.debug_check_bounds::<BootManagerFlushResponse>(offset);
808            // Zero out padding regions. There's no need to apply masks
809            // because the unmasked parts will be overwritten by fields.
810            // Write the fields.
811            self.0.encode(encoder, offset + 0, depth)?;
812            Ok(())
813        }
814    }
815
816    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
817        for BootManagerFlushResponse
818    {
819        #[inline(always)]
820        fn new_empty() -> Self {
821            Self { status: fidl::new_empty!(i32, D) }
822        }
823
824        #[inline]
825        unsafe fn decode(
826            &mut self,
827            decoder: &mut fidl::encoding::Decoder<'_, D>,
828            offset: usize,
829            _depth: fidl::encoding::Depth,
830        ) -> fidl::Result<()> {
831            decoder.debug_check_bounds::<Self>(offset);
832            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
833            // Verify that padding bytes are zero.
834            // Copy from the buffer into the object.
835            unsafe {
836                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
837            }
838            Ok(())
839        }
840    }
841
842    impl fidl::encoding::ValueTypeMarker for BootManagerQueryConfigurationStatusAndBootAttemptsRequest {
843        type Borrowed<'a> = &'a Self;
844        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
845            value
846        }
847    }
848
849    unsafe impl fidl::encoding::TypeMarker
850        for BootManagerQueryConfigurationStatusAndBootAttemptsRequest
851    {
852        type Owned = Self;
853
854        #[inline(always)]
855        fn inline_align(_context: fidl::encoding::Context) -> usize {
856            4
857        }
858
859        #[inline(always)]
860        fn inline_size(_context: fidl::encoding::Context) -> usize {
861            4
862        }
863    }
864
865    unsafe impl<D: fidl::encoding::ResourceDialect>
866        fidl::encoding::Encode<BootManagerQueryConfigurationStatusAndBootAttemptsRequest, D>
867        for &BootManagerQueryConfigurationStatusAndBootAttemptsRequest
868    {
869        #[inline]
870        unsafe fn encode(
871            self,
872            encoder: &mut fidl::encoding::Encoder<'_, D>,
873            offset: usize,
874            _depth: fidl::encoding::Depth,
875        ) -> fidl::Result<()> {
876            encoder
877                .debug_check_bounds::<BootManagerQueryConfigurationStatusAndBootAttemptsRequest>(
878                    offset,
879                );
880            // Delegate to tuple encoding.
881            fidl::encoding::Encode::<BootManagerQueryConfigurationStatusAndBootAttemptsRequest, D>::encode(
882                (
883                    <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
884                ),
885                encoder, offset, _depth
886            )
887        }
888    }
889    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Configuration, D>>
890        fidl::encoding::Encode<BootManagerQueryConfigurationStatusAndBootAttemptsRequest, D>
891        for (T0,)
892    {
893        #[inline]
894        unsafe fn encode(
895            self,
896            encoder: &mut fidl::encoding::Encoder<'_, D>,
897            offset: usize,
898            depth: fidl::encoding::Depth,
899        ) -> fidl::Result<()> {
900            encoder
901                .debug_check_bounds::<BootManagerQueryConfigurationStatusAndBootAttemptsRequest>(
902                    offset,
903                );
904            // Zero out padding regions. There's no need to apply masks
905            // because the unmasked parts will be overwritten by fields.
906            // Write the fields.
907            self.0.encode(encoder, offset + 0, depth)?;
908            Ok(())
909        }
910    }
911
912    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
913        for BootManagerQueryConfigurationStatusAndBootAttemptsRequest
914    {
915        #[inline(always)]
916        fn new_empty() -> Self {
917            Self { configuration: fidl::new_empty!(Configuration, D) }
918        }
919
920        #[inline]
921        unsafe fn decode(
922            &mut self,
923            decoder: &mut fidl::encoding::Decoder<'_, D>,
924            offset: usize,
925            _depth: fidl::encoding::Depth,
926        ) -> fidl::Result<()> {
927            decoder.debug_check_bounds::<Self>(offset);
928            // Verify that padding bytes are zero.
929            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
930            Ok(())
931        }
932    }
933
934    impl fidl::encoding::ValueTypeMarker for BootManagerQueryConfigurationStatusRequest {
935        type Borrowed<'a> = &'a Self;
936        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
937            value
938        }
939    }
940
941    unsafe impl fidl::encoding::TypeMarker for BootManagerQueryConfigurationStatusRequest {
942        type Owned = Self;
943
944        #[inline(always)]
945        fn inline_align(_context: fidl::encoding::Context) -> usize {
946            4
947        }
948
949        #[inline(always)]
950        fn inline_size(_context: fidl::encoding::Context) -> usize {
951            4
952        }
953    }
954
955    unsafe impl<D: fidl::encoding::ResourceDialect>
956        fidl::encoding::Encode<BootManagerQueryConfigurationStatusRequest, D>
957        for &BootManagerQueryConfigurationStatusRequest
958    {
959        #[inline]
960        unsafe fn encode(
961            self,
962            encoder: &mut fidl::encoding::Encoder<'_, D>,
963            offset: usize,
964            _depth: fidl::encoding::Depth,
965        ) -> fidl::Result<()> {
966            encoder.debug_check_bounds::<BootManagerQueryConfigurationStatusRequest>(offset);
967            // Delegate to tuple encoding.
968            fidl::encoding::Encode::<BootManagerQueryConfigurationStatusRequest, D>::encode(
969                (<Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),),
970                encoder,
971                offset,
972                _depth,
973            )
974        }
975    }
976    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Configuration, D>>
977        fidl::encoding::Encode<BootManagerQueryConfigurationStatusRequest, D> for (T0,)
978    {
979        #[inline]
980        unsafe fn encode(
981            self,
982            encoder: &mut fidl::encoding::Encoder<'_, D>,
983            offset: usize,
984            depth: fidl::encoding::Depth,
985        ) -> fidl::Result<()> {
986            encoder.debug_check_bounds::<BootManagerQueryConfigurationStatusRequest>(offset);
987            // Zero out padding regions. There's no need to apply masks
988            // because the unmasked parts will be overwritten by fields.
989            // Write the fields.
990            self.0.encode(encoder, offset + 0, depth)?;
991            Ok(())
992        }
993    }
994
995    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
996        for BootManagerQueryConfigurationStatusRequest
997    {
998        #[inline(always)]
999        fn new_empty() -> Self {
1000            Self { configuration: fidl::new_empty!(Configuration, D) }
1001        }
1002
1003        #[inline]
1004        unsafe fn decode(
1005            &mut self,
1006            decoder: &mut fidl::encoding::Decoder<'_, D>,
1007            offset: usize,
1008            _depth: fidl::encoding::Depth,
1009        ) -> fidl::Result<()> {
1010            decoder.debug_check_bounds::<Self>(offset);
1011            // Verify that padding bytes are zero.
1012            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
1013            Ok(())
1014        }
1015    }
1016
1017    impl fidl::encoding::ValueTypeMarker for BootManagerSetConfigurationActiveRequest {
1018        type Borrowed<'a> = &'a Self;
1019        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1020            value
1021        }
1022    }
1023
1024    unsafe impl fidl::encoding::TypeMarker for BootManagerSetConfigurationActiveRequest {
1025        type Owned = Self;
1026
1027        #[inline(always)]
1028        fn inline_align(_context: fidl::encoding::Context) -> usize {
1029            4
1030        }
1031
1032        #[inline(always)]
1033        fn inline_size(_context: fidl::encoding::Context) -> usize {
1034            4
1035        }
1036    }
1037
1038    unsafe impl<D: fidl::encoding::ResourceDialect>
1039        fidl::encoding::Encode<BootManagerSetConfigurationActiveRequest, D>
1040        for &BootManagerSetConfigurationActiveRequest
1041    {
1042        #[inline]
1043        unsafe fn encode(
1044            self,
1045            encoder: &mut fidl::encoding::Encoder<'_, D>,
1046            offset: usize,
1047            _depth: fidl::encoding::Depth,
1048        ) -> fidl::Result<()> {
1049            encoder.debug_check_bounds::<BootManagerSetConfigurationActiveRequest>(offset);
1050            // Delegate to tuple encoding.
1051            fidl::encoding::Encode::<BootManagerSetConfigurationActiveRequest, D>::encode(
1052                (<Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),),
1053                encoder,
1054                offset,
1055                _depth,
1056            )
1057        }
1058    }
1059    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Configuration, D>>
1060        fidl::encoding::Encode<BootManagerSetConfigurationActiveRequest, D> for (T0,)
1061    {
1062        #[inline]
1063        unsafe fn encode(
1064            self,
1065            encoder: &mut fidl::encoding::Encoder<'_, D>,
1066            offset: usize,
1067            depth: fidl::encoding::Depth,
1068        ) -> fidl::Result<()> {
1069            encoder.debug_check_bounds::<BootManagerSetConfigurationActiveRequest>(offset);
1070            // Zero out padding regions. There's no need to apply masks
1071            // because the unmasked parts will be overwritten by fields.
1072            // Write the fields.
1073            self.0.encode(encoder, offset + 0, depth)?;
1074            Ok(())
1075        }
1076    }
1077
1078    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1079        for BootManagerSetConfigurationActiveRequest
1080    {
1081        #[inline(always)]
1082        fn new_empty() -> Self {
1083            Self { configuration: fidl::new_empty!(Configuration, D) }
1084        }
1085
1086        #[inline]
1087        unsafe fn decode(
1088            &mut self,
1089            decoder: &mut fidl::encoding::Decoder<'_, D>,
1090            offset: usize,
1091            _depth: fidl::encoding::Depth,
1092        ) -> fidl::Result<()> {
1093            decoder.debug_check_bounds::<Self>(offset);
1094            // Verify that padding bytes are zero.
1095            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
1096            Ok(())
1097        }
1098    }
1099
1100    impl fidl::encoding::ValueTypeMarker for BootManagerSetConfigurationActiveResponse {
1101        type Borrowed<'a> = &'a Self;
1102        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1103            value
1104        }
1105    }
1106
1107    unsafe impl fidl::encoding::TypeMarker for BootManagerSetConfigurationActiveResponse {
1108        type Owned = Self;
1109
1110        #[inline(always)]
1111        fn inline_align(_context: fidl::encoding::Context) -> usize {
1112            4
1113        }
1114
1115        #[inline(always)]
1116        fn inline_size(_context: fidl::encoding::Context) -> usize {
1117            4
1118        }
1119        #[inline(always)]
1120        fn encode_is_copy() -> bool {
1121            true
1122        }
1123
1124        #[inline(always)]
1125        fn decode_is_copy() -> bool {
1126            true
1127        }
1128    }
1129
1130    unsafe impl<D: fidl::encoding::ResourceDialect>
1131        fidl::encoding::Encode<BootManagerSetConfigurationActiveResponse, D>
1132        for &BootManagerSetConfigurationActiveResponse
1133    {
1134        #[inline]
1135        unsafe fn encode(
1136            self,
1137            encoder: &mut fidl::encoding::Encoder<'_, D>,
1138            offset: usize,
1139            _depth: fidl::encoding::Depth,
1140        ) -> fidl::Result<()> {
1141            encoder.debug_check_bounds::<BootManagerSetConfigurationActiveResponse>(offset);
1142            unsafe {
1143                // Copy the object into the buffer.
1144                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1145                (buf_ptr as *mut BootManagerSetConfigurationActiveResponse).write_unaligned(
1146                    (self as *const BootManagerSetConfigurationActiveResponse).read(),
1147                );
1148                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1149                // done second because the memcpy will write garbage to these bytes.
1150            }
1151            Ok(())
1152        }
1153    }
1154    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
1155        fidl::encoding::Encode<BootManagerSetConfigurationActiveResponse, D> for (T0,)
1156    {
1157        #[inline]
1158        unsafe fn encode(
1159            self,
1160            encoder: &mut fidl::encoding::Encoder<'_, D>,
1161            offset: usize,
1162            depth: fidl::encoding::Depth,
1163        ) -> fidl::Result<()> {
1164            encoder.debug_check_bounds::<BootManagerSetConfigurationActiveResponse>(offset);
1165            // Zero out padding regions. There's no need to apply masks
1166            // because the unmasked parts will be overwritten by fields.
1167            // Write the fields.
1168            self.0.encode(encoder, offset + 0, depth)?;
1169            Ok(())
1170        }
1171    }
1172
1173    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1174        for BootManagerSetConfigurationActiveResponse
1175    {
1176        #[inline(always)]
1177        fn new_empty() -> Self {
1178            Self { status: fidl::new_empty!(i32, D) }
1179        }
1180
1181        #[inline]
1182        unsafe fn decode(
1183            &mut self,
1184            decoder: &mut fidl::encoding::Decoder<'_, D>,
1185            offset: usize,
1186            _depth: fidl::encoding::Depth,
1187        ) -> fidl::Result<()> {
1188            decoder.debug_check_bounds::<Self>(offset);
1189            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1190            // Verify that padding bytes are zero.
1191            // Copy from the buffer into the object.
1192            unsafe {
1193                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1194            }
1195            Ok(())
1196        }
1197    }
1198
1199    impl fidl::encoding::ValueTypeMarker for BootManagerSetConfigurationHealthyRequest {
1200        type Borrowed<'a> = &'a Self;
1201        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1202            value
1203        }
1204    }
1205
1206    unsafe impl fidl::encoding::TypeMarker for BootManagerSetConfigurationHealthyRequest {
1207        type Owned = Self;
1208
1209        #[inline(always)]
1210        fn inline_align(_context: fidl::encoding::Context) -> usize {
1211            4
1212        }
1213
1214        #[inline(always)]
1215        fn inline_size(_context: fidl::encoding::Context) -> usize {
1216            4
1217        }
1218    }
1219
1220    unsafe impl<D: fidl::encoding::ResourceDialect>
1221        fidl::encoding::Encode<BootManagerSetConfigurationHealthyRequest, D>
1222        for &BootManagerSetConfigurationHealthyRequest
1223    {
1224        #[inline]
1225        unsafe fn encode(
1226            self,
1227            encoder: &mut fidl::encoding::Encoder<'_, D>,
1228            offset: usize,
1229            _depth: fidl::encoding::Depth,
1230        ) -> fidl::Result<()> {
1231            encoder.debug_check_bounds::<BootManagerSetConfigurationHealthyRequest>(offset);
1232            // Delegate to tuple encoding.
1233            fidl::encoding::Encode::<BootManagerSetConfigurationHealthyRequest, D>::encode(
1234                (<Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),),
1235                encoder,
1236                offset,
1237                _depth,
1238            )
1239        }
1240    }
1241    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Configuration, D>>
1242        fidl::encoding::Encode<BootManagerSetConfigurationHealthyRequest, D> for (T0,)
1243    {
1244        #[inline]
1245        unsafe fn encode(
1246            self,
1247            encoder: &mut fidl::encoding::Encoder<'_, D>,
1248            offset: usize,
1249            depth: fidl::encoding::Depth,
1250        ) -> fidl::Result<()> {
1251            encoder.debug_check_bounds::<BootManagerSetConfigurationHealthyRequest>(offset);
1252            // Zero out padding regions. There's no need to apply masks
1253            // because the unmasked parts will be overwritten by fields.
1254            // Write the fields.
1255            self.0.encode(encoder, offset + 0, depth)?;
1256            Ok(())
1257        }
1258    }
1259
1260    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1261        for BootManagerSetConfigurationHealthyRequest
1262    {
1263        #[inline(always)]
1264        fn new_empty() -> Self {
1265            Self { configuration: fidl::new_empty!(Configuration, D) }
1266        }
1267
1268        #[inline]
1269        unsafe fn decode(
1270            &mut self,
1271            decoder: &mut fidl::encoding::Decoder<'_, D>,
1272            offset: usize,
1273            _depth: fidl::encoding::Depth,
1274        ) -> fidl::Result<()> {
1275            decoder.debug_check_bounds::<Self>(offset);
1276            // Verify that padding bytes are zero.
1277            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
1278            Ok(())
1279        }
1280    }
1281
1282    impl fidl::encoding::ValueTypeMarker for BootManagerSetConfigurationHealthyResponse {
1283        type Borrowed<'a> = &'a Self;
1284        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1285            value
1286        }
1287    }
1288
1289    unsafe impl fidl::encoding::TypeMarker for BootManagerSetConfigurationHealthyResponse {
1290        type Owned = Self;
1291
1292        #[inline(always)]
1293        fn inline_align(_context: fidl::encoding::Context) -> usize {
1294            4
1295        }
1296
1297        #[inline(always)]
1298        fn inline_size(_context: fidl::encoding::Context) -> usize {
1299            4
1300        }
1301        #[inline(always)]
1302        fn encode_is_copy() -> bool {
1303            true
1304        }
1305
1306        #[inline(always)]
1307        fn decode_is_copy() -> bool {
1308            true
1309        }
1310    }
1311
1312    unsafe impl<D: fidl::encoding::ResourceDialect>
1313        fidl::encoding::Encode<BootManagerSetConfigurationHealthyResponse, D>
1314        for &BootManagerSetConfigurationHealthyResponse
1315    {
1316        #[inline]
1317        unsafe fn encode(
1318            self,
1319            encoder: &mut fidl::encoding::Encoder<'_, D>,
1320            offset: usize,
1321            _depth: fidl::encoding::Depth,
1322        ) -> fidl::Result<()> {
1323            encoder.debug_check_bounds::<BootManagerSetConfigurationHealthyResponse>(offset);
1324            unsafe {
1325                // Copy the object into the buffer.
1326                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1327                (buf_ptr as *mut BootManagerSetConfigurationHealthyResponse).write_unaligned(
1328                    (self as *const BootManagerSetConfigurationHealthyResponse).read(),
1329                );
1330                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1331                // done second because the memcpy will write garbage to these bytes.
1332            }
1333            Ok(())
1334        }
1335    }
1336    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
1337        fidl::encoding::Encode<BootManagerSetConfigurationHealthyResponse, D> for (T0,)
1338    {
1339        #[inline]
1340        unsafe fn encode(
1341            self,
1342            encoder: &mut fidl::encoding::Encoder<'_, D>,
1343            offset: usize,
1344            depth: fidl::encoding::Depth,
1345        ) -> fidl::Result<()> {
1346            encoder.debug_check_bounds::<BootManagerSetConfigurationHealthyResponse>(offset);
1347            // Zero out padding regions. There's no need to apply masks
1348            // because the unmasked parts will be overwritten by fields.
1349            // Write the fields.
1350            self.0.encode(encoder, offset + 0, depth)?;
1351            Ok(())
1352        }
1353    }
1354
1355    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1356        for BootManagerSetConfigurationHealthyResponse
1357    {
1358        #[inline(always)]
1359        fn new_empty() -> Self {
1360            Self { status: fidl::new_empty!(i32, D) }
1361        }
1362
1363        #[inline]
1364        unsafe fn decode(
1365            &mut self,
1366            decoder: &mut fidl::encoding::Decoder<'_, D>,
1367            offset: usize,
1368            _depth: fidl::encoding::Depth,
1369        ) -> fidl::Result<()> {
1370            decoder.debug_check_bounds::<Self>(offset);
1371            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1372            // Verify that padding bytes are zero.
1373            // Copy from the buffer into the object.
1374            unsafe {
1375                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1376            }
1377            Ok(())
1378        }
1379    }
1380
1381    impl fidl::encoding::ValueTypeMarker for BootManagerSetConfigurationUnbootableRequest {
1382        type Borrowed<'a> = &'a Self;
1383        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1384            value
1385        }
1386    }
1387
1388    unsafe impl fidl::encoding::TypeMarker for BootManagerSetConfigurationUnbootableRequest {
1389        type Owned = Self;
1390
1391        #[inline(always)]
1392        fn inline_align(_context: fidl::encoding::Context) -> usize {
1393            4
1394        }
1395
1396        #[inline(always)]
1397        fn inline_size(_context: fidl::encoding::Context) -> usize {
1398            4
1399        }
1400    }
1401
1402    unsafe impl<D: fidl::encoding::ResourceDialect>
1403        fidl::encoding::Encode<BootManagerSetConfigurationUnbootableRequest, D>
1404        for &BootManagerSetConfigurationUnbootableRequest
1405    {
1406        #[inline]
1407        unsafe fn encode(
1408            self,
1409            encoder: &mut fidl::encoding::Encoder<'_, D>,
1410            offset: usize,
1411            _depth: fidl::encoding::Depth,
1412        ) -> fidl::Result<()> {
1413            encoder.debug_check_bounds::<BootManagerSetConfigurationUnbootableRequest>(offset);
1414            // Delegate to tuple encoding.
1415            fidl::encoding::Encode::<BootManagerSetConfigurationUnbootableRequest, D>::encode(
1416                (<Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),),
1417                encoder,
1418                offset,
1419                _depth,
1420            )
1421        }
1422    }
1423    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Configuration, D>>
1424        fidl::encoding::Encode<BootManagerSetConfigurationUnbootableRequest, D> for (T0,)
1425    {
1426        #[inline]
1427        unsafe fn encode(
1428            self,
1429            encoder: &mut fidl::encoding::Encoder<'_, D>,
1430            offset: usize,
1431            depth: fidl::encoding::Depth,
1432        ) -> fidl::Result<()> {
1433            encoder.debug_check_bounds::<BootManagerSetConfigurationUnbootableRequest>(offset);
1434            // Zero out padding regions. There's no need to apply masks
1435            // because the unmasked parts will be overwritten by fields.
1436            // Write the fields.
1437            self.0.encode(encoder, offset + 0, depth)?;
1438            Ok(())
1439        }
1440    }
1441
1442    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1443        for BootManagerSetConfigurationUnbootableRequest
1444    {
1445        #[inline(always)]
1446        fn new_empty() -> Self {
1447            Self { configuration: fidl::new_empty!(Configuration, D) }
1448        }
1449
1450        #[inline]
1451        unsafe fn decode(
1452            &mut self,
1453            decoder: &mut fidl::encoding::Decoder<'_, D>,
1454            offset: usize,
1455            _depth: fidl::encoding::Depth,
1456        ) -> fidl::Result<()> {
1457            decoder.debug_check_bounds::<Self>(offset);
1458            // Verify that padding bytes are zero.
1459            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
1460            Ok(())
1461        }
1462    }
1463
1464    impl fidl::encoding::ValueTypeMarker for BootManagerSetConfigurationUnbootableResponse {
1465        type Borrowed<'a> = &'a Self;
1466        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1467            value
1468        }
1469    }
1470
1471    unsafe impl fidl::encoding::TypeMarker for BootManagerSetConfigurationUnbootableResponse {
1472        type Owned = Self;
1473
1474        #[inline(always)]
1475        fn inline_align(_context: fidl::encoding::Context) -> usize {
1476            4
1477        }
1478
1479        #[inline(always)]
1480        fn inline_size(_context: fidl::encoding::Context) -> usize {
1481            4
1482        }
1483        #[inline(always)]
1484        fn encode_is_copy() -> bool {
1485            true
1486        }
1487
1488        #[inline(always)]
1489        fn decode_is_copy() -> bool {
1490            true
1491        }
1492    }
1493
1494    unsafe impl<D: fidl::encoding::ResourceDialect>
1495        fidl::encoding::Encode<BootManagerSetConfigurationUnbootableResponse, D>
1496        for &BootManagerSetConfigurationUnbootableResponse
1497    {
1498        #[inline]
1499        unsafe fn encode(
1500            self,
1501            encoder: &mut fidl::encoding::Encoder<'_, D>,
1502            offset: usize,
1503            _depth: fidl::encoding::Depth,
1504        ) -> fidl::Result<()> {
1505            encoder.debug_check_bounds::<BootManagerSetConfigurationUnbootableResponse>(offset);
1506            unsafe {
1507                // Copy the object into the buffer.
1508                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1509                (buf_ptr as *mut BootManagerSetConfigurationUnbootableResponse).write_unaligned(
1510                    (self as *const BootManagerSetConfigurationUnbootableResponse).read(),
1511                );
1512                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1513                // done second because the memcpy will write garbage to these bytes.
1514            }
1515            Ok(())
1516        }
1517    }
1518    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
1519        fidl::encoding::Encode<BootManagerSetConfigurationUnbootableResponse, D> for (T0,)
1520    {
1521        #[inline]
1522        unsafe fn encode(
1523            self,
1524            encoder: &mut fidl::encoding::Encoder<'_, D>,
1525            offset: usize,
1526            depth: fidl::encoding::Depth,
1527        ) -> fidl::Result<()> {
1528            encoder.debug_check_bounds::<BootManagerSetConfigurationUnbootableResponse>(offset);
1529            // Zero out padding regions. There's no need to apply masks
1530            // because the unmasked parts will be overwritten by fields.
1531            // Write the fields.
1532            self.0.encode(encoder, offset + 0, depth)?;
1533            Ok(())
1534        }
1535    }
1536
1537    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1538        for BootManagerSetConfigurationUnbootableResponse
1539    {
1540        #[inline(always)]
1541        fn new_empty() -> Self {
1542            Self { status: fidl::new_empty!(i32, D) }
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 buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1554            // Verify that padding bytes are zero.
1555            // Copy from the buffer into the object.
1556            unsafe {
1557                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1558            }
1559            Ok(())
1560        }
1561    }
1562
1563    impl fidl::encoding::ValueTypeMarker for BootManagerQueryActiveConfigurationResponse {
1564        type Borrowed<'a> = &'a Self;
1565        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1566            value
1567        }
1568    }
1569
1570    unsafe impl fidl::encoding::TypeMarker for BootManagerQueryActiveConfigurationResponse {
1571        type Owned = Self;
1572
1573        #[inline(always)]
1574        fn inline_align(_context: fidl::encoding::Context) -> usize {
1575            4
1576        }
1577
1578        #[inline(always)]
1579        fn inline_size(_context: fidl::encoding::Context) -> usize {
1580            4
1581        }
1582    }
1583
1584    unsafe impl<D: fidl::encoding::ResourceDialect>
1585        fidl::encoding::Encode<BootManagerQueryActiveConfigurationResponse, D>
1586        for &BootManagerQueryActiveConfigurationResponse
1587    {
1588        #[inline]
1589        unsafe fn encode(
1590            self,
1591            encoder: &mut fidl::encoding::Encoder<'_, D>,
1592            offset: usize,
1593            _depth: fidl::encoding::Depth,
1594        ) -> fidl::Result<()> {
1595            encoder.debug_check_bounds::<BootManagerQueryActiveConfigurationResponse>(offset);
1596            // Delegate to tuple encoding.
1597            fidl::encoding::Encode::<BootManagerQueryActiveConfigurationResponse, D>::encode(
1598                (<Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),),
1599                encoder,
1600                offset,
1601                _depth,
1602            )
1603        }
1604    }
1605    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Configuration, D>>
1606        fidl::encoding::Encode<BootManagerQueryActiveConfigurationResponse, D> for (T0,)
1607    {
1608        #[inline]
1609        unsafe fn encode(
1610            self,
1611            encoder: &mut fidl::encoding::Encoder<'_, D>,
1612            offset: usize,
1613            depth: fidl::encoding::Depth,
1614        ) -> fidl::Result<()> {
1615            encoder.debug_check_bounds::<BootManagerQueryActiveConfigurationResponse>(offset);
1616            // Zero out padding regions. There's no need to apply masks
1617            // because the unmasked parts will be overwritten by fields.
1618            // Write the fields.
1619            self.0.encode(encoder, offset + 0, depth)?;
1620            Ok(())
1621        }
1622    }
1623
1624    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1625        for BootManagerQueryActiveConfigurationResponse
1626    {
1627        #[inline(always)]
1628        fn new_empty() -> Self {
1629            Self { configuration: fidl::new_empty!(Configuration, D) }
1630        }
1631
1632        #[inline]
1633        unsafe fn decode(
1634            &mut self,
1635            decoder: &mut fidl::encoding::Decoder<'_, D>,
1636            offset: usize,
1637            _depth: fidl::encoding::Depth,
1638        ) -> fidl::Result<()> {
1639            decoder.debug_check_bounds::<Self>(offset);
1640            // Verify that padding bytes are zero.
1641            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
1642            Ok(())
1643        }
1644    }
1645
1646    impl fidl::encoding::ValueTypeMarker for BootManagerQueryConfigurationLastSetActiveResponse {
1647        type Borrowed<'a> = &'a Self;
1648        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1649            value
1650        }
1651    }
1652
1653    unsafe impl fidl::encoding::TypeMarker for BootManagerQueryConfigurationLastSetActiveResponse {
1654        type Owned = Self;
1655
1656        #[inline(always)]
1657        fn inline_align(_context: fidl::encoding::Context) -> usize {
1658            4
1659        }
1660
1661        #[inline(always)]
1662        fn inline_size(_context: fidl::encoding::Context) -> usize {
1663            4
1664        }
1665    }
1666
1667    unsafe impl<D: fidl::encoding::ResourceDialect>
1668        fidl::encoding::Encode<BootManagerQueryConfigurationLastSetActiveResponse, D>
1669        for &BootManagerQueryConfigurationLastSetActiveResponse
1670    {
1671        #[inline]
1672        unsafe fn encode(
1673            self,
1674            encoder: &mut fidl::encoding::Encoder<'_, D>,
1675            offset: usize,
1676            _depth: fidl::encoding::Depth,
1677        ) -> fidl::Result<()> {
1678            encoder
1679                .debug_check_bounds::<BootManagerQueryConfigurationLastSetActiveResponse>(offset);
1680            // Delegate to tuple encoding.
1681            fidl::encoding::Encode::<BootManagerQueryConfigurationLastSetActiveResponse, D>::encode(
1682                (<Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),),
1683                encoder,
1684                offset,
1685                _depth,
1686            )
1687        }
1688    }
1689    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Configuration, D>>
1690        fidl::encoding::Encode<BootManagerQueryConfigurationLastSetActiveResponse, D> for (T0,)
1691    {
1692        #[inline]
1693        unsafe fn encode(
1694            self,
1695            encoder: &mut fidl::encoding::Encoder<'_, D>,
1696            offset: usize,
1697            depth: fidl::encoding::Depth,
1698        ) -> fidl::Result<()> {
1699            encoder
1700                .debug_check_bounds::<BootManagerQueryConfigurationLastSetActiveResponse>(offset);
1701            // Zero out padding regions. There's no need to apply masks
1702            // because the unmasked parts will be overwritten by fields.
1703            // Write the fields.
1704            self.0.encode(encoder, offset + 0, depth)?;
1705            Ok(())
1706        }
1707    }
1708
1709    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1710        for BootManagerQueryConfigurationLastSetActiveResponse
1711    {
1712        #[inline(always)]
1713        fn new_empty() -> Self {
1714            Self { configuration: fidl::new_empty!(Configuration, D) }
1715        }
1716
1717        #[inline]
1718        unsafe fn decode(
1719            &mut self,
1720            decoder: &mut fidl::encoding::Decoder<'_, D>,
1721            offset: usize,
1722            _depth: fidl::encoding::Depth,
1723        ) -> fidl::Result<()> {
1724            decoder.debug_check_bounds::<Self>(offset);
1725            // Verify that padding bytes are zero.
1726            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
1727            Ok(())
1728        }
1729    }
1730
1731    impl fidl::encoding::ValueTypeMarker for BootManagerQueryConfigurationStatusResponse {
1732        type Borrowed<'a> = &'a Self;
1733        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1734            value
1735        }
1736    }
1737
1738    unsafe impl fidl::encoding::TypeMarker for BootManagerQueryConfigurationStatusResponse {
1739        type Owned = Self;
1740
1741        #[inline(always)]
1742        fn inline_align(_context: fidl::encoding::Context) -> usize {
1743            4
1744        }
1745
1746        #[inline(always)]
1747        fn inline_size(_context: fidl::encoding::Context) -> usize {
1748            4
1749        }
1750    }
1751
1752    unsafe impl<D: fidl::encoding::ResourceDialect>
1753        fidl::encoding::Encode<BootManagerQueryConfigurationStatusResponse, D>
1754        for &BootManagerQueryConfigurationStatusResponse
1755    {
1756        #[inline]
1757        unsafe fn encode(
1758            self,
1759            encoder: &mut fidl::encoding::Encoder<'_, D>,
1760            offset: usize,
1761            _depth: fidl::encoding::Depth,
1762        ) -> fidl::Result<()> {
1763            encoder.debug_check_bounds::<BootManagerQueryConfigurationStatusResponse>(offset);
1764            // Delegate to tuple encoding.
1765            fidl::encoding::Encode::<BootManagerQueryConfigurationStatusResponse, D>::encode(
1766                (<ConfigurationStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),),
1767                encoder,
1768                offset,
1769                _depth,
1770            )
1771        }
1772    }
1773    unsafe impl<
1774            D: fidl::encoding::ResourceDialect,
1775            T0: fidl::encoding::Encode<ConfigurationStatus, D>,
1776        > fidl::encoding::Encode<BootManagerQueryConfigurationStatusResponse, D> for (T0,)
1777    {
1778        #[inline]
1779        unsafe fn encode(
1780            self,
1781            encoder: &mut fidl::encoding::Encoder<'_, D>,
1782            offset: usize,
1783            depth: fidl::encoding::Depth,
1784        ) -> fidl::Result<()> {
1785            encoder.debug_check_bounds::<BootManagerQueryConfigurationStatusResponse>(offset);
1786            // Zero out padding regions. There's no need to apply masks
1787            // because the unmasked parts will be overwritten by fields.
1788            // Write the fields.
1789            self.0.encode(encoder, offset + 0, depth)?;
1790            Ok(())
1791        }
1792    }
1793
1794    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1795        for BootManagerQueryConfigurationStatusResponse
1796    {
1797        #[inline(always)]
1798        fn new_empty() -> Self {
1799            Self { status: fidl::new_empty!(ConfigurationStatus, D) }
1800        }
1801
1802        #[inline]
1803        unsafe fn decode(
1804            &mut self,
1805            decoder: &mut fidl::encoding::Decoder<'_, D>,
1806            offset: usize,
1807            _depth: fidl::encoding::Depth,
1808        ) -> fidl::Result<()> {
1809            decoder.debug_check_bounds::<Self>(offset);
1810            // Verify that padding bytes are zero.
1811            fidl::decode!(ConfigurationStatus, D, &mut self.status, decoder, offset + 0, _depth)?;
1812            Ok(())
1813        }
1814    }
1815
1816    impl fidl::encoding::ValueTypeMarker for BootManagerQueryCurrentConfigurationResponse {
1817        type Borrowed<'a> = &'a Self;
1818        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1819            value
1820        }
1821    }
1822
1823    unsafe impl fidl::encoding::TypeMarker for BootManagerQueryCurrentConfigurationResponse {
1824        type Owned = Self;
1825
1826        #[inline(always)]
1827        fn inline_align(_context: fidl::encoding::Context) -> usize {
1828            4
1829        }
1830
1831        #[inline(always)]
1832        fn inline_size(_context: fidl::encoding::Context) -> usize {
1833            4
1834        }
1835    }
1836
1837    unsafe impl<D: fidl::encoding::ResourceDialect>
1838        fidl::encoding::Encode<BootManagerQueryCurrentConfigurationResponse, D>
1839        for &BootManagerQueryCurrentConfigurationResponse
1840    {
1841        #[inline]
1842        unsafe fn encode(
1843            self,
1844            encoder: &mut fidl::encoding::Encoder<'_, D>,
1845            offset: usize,
1846            _depth: fidl::encoding::Depth,
1847        ) -> fidl::Result<()> {
1848            encoder.debug_check_bounds::<BootManagerQueryCurrentConfigurationResponse>(offset);
1849            // Delegate to tuple encoding.
1850            fidl::encoding::Encode::<BootManagerQueryCurrentConfigurationResponse, D>::encode(
1851                (<Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),),
1852                encoder,
1853                offset,
1854                _depth,
1855            )
1856        }
1857    }
1858    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Configuration, D>>
1859        fidl::encoding::Encode<BootManagerQueryCurrentConfigurationResponse, D> for (T0,)
1860    {
1861        #[inline]
1862        unsafe fn encode(
1863            self,
1864            encoder: &mut fidl::encoding::Encoder<'_, D>,
1865            offset: usize,
1866            depth: fidl::encoding::Depth,
1867        ) -> fidl::Result<()> {
1868            encoder.debug_check_bounds::<BootManagerQueryCurrentConfigurationResponse>(offset);
1869            // Zero out padding regions. There's no need to apply masks
1870            // because the unmasked parts will be overwritten by fields.
1871            // Write the fields.
1872            self.0.encode(encoder, offset + 0, depth)?;
1873            Ok(())
1874        }
1875    }
1876
1877    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1878        for BootManagerQueryCurrentConfigurationResponse
1879    {
1880        #[inline(always)]
1881        fn new_empty() -> Self {
1882            Self { configuration: fidl::new_empty!(Configuration, D) }
1883        }
1884
1885        #[inline]
1886        unsafe fn decode(
1887            &mut self,
1888            decoder: &mut fidl::encoding::Decoder<'_, D>,
1889            offset: usize,
1890            _depth: fidl::encoding::Depth,
1891        ) -> fidl::Result<()> {
1892            decoder.debug_check_bounds::<Self>(offset);
1893            // Verify that padding bytes are zero.
1894            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
1895            Ok(())
1896        }
1897    }
1898
1899    impl fidl::encoding::ValueTypeMarker for DataSinkFlushResponse {
1900        type Borrowed<'a> = &'a Self;
1901        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1902            value
1903        }
1904    }
1905
1906    unsafe impl fidl::encoding::TypeMarker for DataSinkFlushResponse {
1907        type Owned = Self;
1908
1909        #[inline(always)]
1910        fn inline_align(_context: fidl::encoding::Context) -> usize {
1911            4
1912        }
1913
1914        #[inline(always)]
1915        fn inline_size(_context: fidl::encoding::Context) -> usize {
1916            4
1917        }
1918        #[inline(always)]
1919        fn encode_is_copy() -> bool {
1920            true
1921        }
1922
1923        #[inline(always)]
1924        fn decode_is_copy() -> bool {
1925            true
1926        }
1927    }
1928
1929    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DataSinkFlushResponse, D>
1930        for &DataSinkFlushResponse
1931    {
1932        #[inline]
1933        unsafe fn encode(
1934            self,
1935            encoder: &mut fidl::encoding::Encoder<'_, D>,
1936            offset: usize,
1937            _depth: fidl::encoding::Depth,
1938        ) -> fidl::Result<()> {
1939            encoder.debug_check_bounds::<DataSinkFlushResponse>(offset);
1940            unsafe {
1941                // Copy the object into the buffer.
1942                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1943                (buf_ptr as *mut DataSinkFlushResponse)
1944                    .write_unaligned((self as *const DataSinkFlushResponse).read());
1945                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1946                // done second because the memcpy will write garbage to these bytes.
1947            }
1948            Ok(())
1949        }
1950    }
1951    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
1952        fidl::encoding::Encode<DataSinkFlushResponse, D> for (T0,)
1953    {
1954        #[inline]
1955        unsafe fn encode(
1956            self,
1957            encoder: &mut fidl::encoding::Encoder<'_, D>,
1958            offset: usize,
1959            depth: fidl::encoding::Depth,
1960        ) -> fidl::Result<()> {
1961            encoder.debug_check_bounds::<DataSinkFlushResponse>(offset);
1962            // Zero out padding regions. There's no need to apply masks
1963            // because the unmasked parts will be overwritten by fields.
1964            // Write the fields.
1965            self.0.encode(encoder, offset + 0, depth)?;
1966            Ok(())
1967        }
1968    }
1969
1970    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DataSinkFlushResponse {
1971        #[inline(always)]
1972        fn new_empty() -> Self {
1973            Self { status: fidl::new_empty!(i32, D) }
1974        }
1975
1976        #[inline]
1977        unsafe fn decode(
1978            &mut self,
1979            decoder: &mut fidl::encoding::Decoder<'_, D>,
1980            offset: usize,
1981            _depth: fidl::encoding::Depth,
1982        ) -> fidl::Result<()> {
1983            decoder.debug_check_bounds::<Self>(offset);
1984            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1985            // Verify that padding bytes are zero.
1986            // Copy from the buffer into the object.
1987            unsafe {
1988                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1989            }
1990            Ok(())
1991        }
1992    }
1993
1994    impl fidl::encoding::ValueTypeMarker for DataSinkReadAssetRequest {
1995        type Borrowed<'a> = &'a Self;
1996        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1997            value
1998        }
1999    }
2000
2001    unsafe impl fidl::encoding::TypeMarker for DataSinkReadAssetRequest {
2002        type Owned = Self;
2003
2004        #[inline(always)]
2005        fn inline_align(_context: fidl::encoding::Context) -> usize {
2006            4
2007        }
2008
2009        #[inline(always)]
2010        fn inline_size(_context: fidl::encoding::Context) -> usize {
2011            8
2012        }
2013    }
2014
2015    unsafe impl<D: fidl::encoding::ResourceDialect>
2016        fidl::encoding::Encode<DataSinkReadAssetRequest, D> for &DataSinkReadAssetRequest
2017    {
2018        #[inline]
2019        unsafe fn encode(
2020            self,
2021            encoder: &mut fidl::encoding::Encoder<'_, D>,
2022            offset: usize,
2023            _depth: fidl::encoding::Depth,
2024        ) -> fidl::Result<()> {
2025            encoder.debug_check_bounds::<DataSinkReadAssetRequest>(offset);
2026            // Delegate to tuple encoding.
2027            fidl::encoding::Encode::<DataSinkReadAssetRequest, D>::encode(
2028                (
2029                    <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
2030                    <Asset as fidl::encoding::ValueTypeMarker>::borrow(&self.asset),
2031                ),
2032                encoder,
2033                offset,
2034                _depth,
2035            )
2036        }
2037    }
2038    unsafe impl<
2039            D: fidl::encoding::ResourceDialect,
2040            T0: fidl::encoding::Encode<Configuration, D>,
2041            T1: fidl::encoding::Encode<Asset, D>,
2042        > fidl::encoding::Encode<DataSinkReadAssetRequest, D> for (T0, T1)
2043    {
2044        #[inline]
2045        unsafe fn encode(
2046            self,
2047            encoder: &mut fidl::encoding::Encoder<'_, D>,
2048            offset: usize,
2049            depth: fidl::encoding::Depth,
2050        ) -> fidl::Result<()> {
2051            encoder.debug_check_bounds::<DataSinkReadAssetRequest>(offset);
2052            // Zero out padding regions. There's no need to apply masks
2053            // because the unmasked parts will be overwritten by fields.
2054            // Write the fields.
2055            self.0.encode(encoder, offset + 0, depth)?;
2056            self.1.encode(encoder, offset + 4, depth)?;
2057            Ok(())
2058        }
2059    }
2060
2061    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2062        for DataSinkReadAssetRequest
2063    {
2064        #[inline(always)]
2065        fn new_empty() -> Self {
2066            Self {
2067                configuration: fidl::new_empty!(Configuration, D),
2068                asset: fidl::new_empty!(Asset, D),
2069            }
2070        }
2071
2072        #[inline]
2073        unsafe fn decode(
2074            &mut self,
2075            decoder: &mut fidl::encoding::Decoder<'_, D>,
2076            offset: usize,
2077            _depth: fidl::encoding::Depth,
2078        ) -> fidl::Result<()> {
2079            decoder.debug_check_bounds::<Self>(offset);
2080            // Verify that padding bytes are zero.
2081            fidl::decode!(Configuration, D, &mut self.configuration, decoder, offset + 0, _depth)?;
2082            fidl::decode!(Asset, D, &mut self.asset, decoder, offset + 4, _depth)?;
2083            Ok(())
2084        }
2085    }
2086
2087    impl fidl::encoding::ValueTypeMarker for DataSinkWriteAssetResponse {
2088        type Borrowed<'a> = &'a Self;
2089        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2090            value
2091        }
2092    }
2093
2094    unsafe impl fidl::encoding::TypeMarker for DataSinkWriteAssetResponse {
2095        type Owned = Self;
2096
2097        #[inline(always)]
2098        fn inline_align(_context: fidl::encoding::Context) -> usize {
2099            4
2100        }
2101
2102        #[inline(always)]
2103        fn inline_size(_context: fidl::encoding::Context) -> usize {
2104            4
2105        }
2106        #[inline(always)]
2107        fn encode_is_copy() -> bool {
2108            true
2109        }
2110
2111        #[inline(always)]
2112        fn decode_is_copy() -> bool {
2113            true
2114        }
2115    }
2116
2117    unsafe impl<D: fidl::encoding::ResourceDialect>
2118        fidl::encoding::Encode<DataSinkWriteAssetResponse, D> for &DataSinkWriteAssetResponse
2119    {
2120        #[inline]
2121        unsafe fn encode(
2122            self,
2123            encoder: &mut fidl::encoding::Encoder<'_, D>,
2124            offset: usize,
2125            _depth: fidl::encoding::Depth,
2126        ) -> fidl::Result<()> {
2127            encoder.debug_check_bounds::<DataSinkWriteAssetResponse>(offset);
2128            unsafe {
2129                // Copy the object into the buffer.
2130                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2131                (buf_ptr as *mut DataSinkWriteAssetResponse)
2132                    .write_unaligned((self as *const DataSinkWriteAssetResponse).read());
2133                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2134                // done second because the memcpy will write garbage to these bytes.
2135            }
2136            Ok(())
2137        }
2138    }
2139    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2140        fidl::encoding::Encode<DataSinkWriteAssetResponse, D> for (T0,)
2141    {
2142        #[inline]
2143        unsafe fn encode(
2144            self,
2145            encoder: &mut fidl::encoding::Encoder<'_, D>,
2146            offset: usize,
2147            depth: fidl::encoding::Depth,
2148        ) -> fidl::Result<()> {
2149            encoder.debug_check_bounds::<DataSinkWriteAssetResponse>(offset);
2150            // Zero out padding regions. There's no need to apply masks
2151            // because the unmasked parts will be overwritten by fields.
2152            // Write the fields.
2153            self.0.encode(encoder, offset + 0, depth)?;
2154            Ok(())
2155        }
2156    }
2157
2158    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2159        for DataSinkWriteAssetResponse
2160    {
2161        #[inline(always)]
2162        fn new_empty() -> Self {
2163            Self { status: fidl::new_empty!(i32, D) }
2164        }
2165
2166        #[inline]
2167        unsafe fn decode(
2168            &mut self,
2169            decoder: &mut fidl::encoding::Decoder<'_, D>,
2170            offset: usize,
2171            _depth: fidl::encoding::Depth,
2172        ) -> fidl::Result<()> {
2173            decoder.debug_check_bounds::<Self>(offset);
2174            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2175            // Verify that padding bytes are zero.
2176            // Copy from the buffer into the object.
2177            unsafe {
2178                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2179            }
2180            Ok(())
2181        }
2182    }
2183
2184    impl fidl::encoding::ValueTypeMarker for DataSinkWriteFirmwareResponse {
2185        type Borrowed<'a> = &'a Self;
2186        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2187            value
2188        }
2189    }
2190
2191    unsafe impl fidl::encoding::TypeMarker for DataSinkWriteFirmwareResponse {
2192        type Owned = Self;
2193
2194        #[inline(always)]
2195        fn inline_align(_context: fidl::encoding::Context) -> usize {
2196            8
2197        }
2198
2199        #[inline(always)]
2200        fn inline_size(_context: fidl::encoding::Context) -> usize {
2201            16
2202        }
2203    }
2204
2205    unsafe impl<D: fidl::encoding::ResourceDialect>
2206        fidl::encoding::Encode<DataSinkWriteFirmwareResponse, D>
2207        for &DataSinkWriteFirmwareResponse
2208    {
2209        #[inline]
2210        unsafe fn encode(
2211            self,
2212            encoder: &mut fidl::encoding::Encoder<'_, D>,
2213            offset: usize,
2214            _depth: fidl::encoding::Depth,
2215        ) -> fidl::Result<()> {
2216            encoder.debug_check_bounds::<DataSinkWriteFirmwareResponse>(offset);
2217            // Delegate to tuple encoding.
2218            fidl::encoding::Encode::<DataSinkWriteFirmwareResponse, D>::encode(
2219                (<WriteFirmwareResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
2220                encoder,
2221                offset,
2222                _depth,
2223            )
2224        }
2225    }
2226    unsafe impl<
2227            D: fidl::encoding::ResourceDialect,
2228            T0: fidl::encoding::Encode<WriteFirmwareResult, D>,
2229        > fidl::encoding::Encode<DataSinkWriteFirmwareResponse, D> for (T0,)
2230    {
2231        #[inline]
2232        unsafe fn encode(
2233            self,
2234            encoder: &mut fidl::encoding::Encoder<'_, D>,
2235            offset: usize,
2236            depth: fidl::encoding::Depth,
2237        ) -> fidl::Result<()> {
2238            encoder.debug_check_bounds::<DataSinkWriteFirmwareResponse>(offset);
2239            // Zero out padding regions. There's no need to apply masks
2240            // because the unmasked parts will be overwritten by fields.
2241            // Write the fields.
2242            self.0.encode(encoder, offset + 0, depth)?;
2243            Ok(())
2244        }
2245    }
2246
2247    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2248        for DataSinkWriteFirmwareResponse
2249    {
2250        #[inline(always)]
2251        fn new_empty() -> Self {
2252            Self { result: fidl::new_empty!(WriteFirmwareResult, D) }
2253        }
2254
2255        #[inline]
2256        unsafe fn decode(
2257            &mut self,
2258            decoder: &mut fidl::encoding::Decoder<'_, D>,
2259            offset: usize,
2260            _depth: fidl::encoding::Depth,
2261        ) -> fidl::Result<()> {
2262            decoder.debug_check_bounds::<Self>(offset);
2263            // Verify that padding bytes are zero.
2264            fidl::decode!(WriteFirmwareResult, D, &mut self.result, decoder, offset + 0, _depth)?;
2265            Ok(())
2266        }
2267    }
2268
2269    impl fidl::encoding::ValueTypeMarker for DataSinkWriteVolumesResponse {
2270        type Borrowed<'a> = &'a Self;
2271        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2272            value
2273        }
2274    }
2275
2276    unsafe impl fidl::encoding::TypeMarker for DataSinkWriteVolumesResponse {
2277        type Owned = Self;
2278
2279        #[inline(always)]
2280        fn inline_align(_context: fidl::encoding::Context) -> usize {
2281            4
2282        }
2283
2284        #[inline(always)]
2285        fn inline_size(_context: fidl::encoding::Context) -> usize {
2286            4
2287        }
2288        #[inline(always)]
2289        fn encode_is_copy() -> bool {
2290            true
2291        }
2292
2293        #[inline(always)]
2294        fn decode_is_copy() -> bool {
2295            true
2296        }
2297    }
2298
2299    unsafe impl<D: fidl::encoding::ResourceDialect>
2300        fidl::encoding::Encode<DataSinkWriteVolumesResponse, D> for &DataSinkWriteVolumesResponse
2301    {
2302        #[inline]
2303        unsafe fn encode(
2304            self,
2305            encoder: &mut fidl::encoding::Encoder<'_, D>,
2306            offset: usize,
2307            _depth: fidl::encoding::Depth,
2308        ) -> fidl::Result<()> {
2309            encoder.debug_check_bounds::<DataSinkWriteVolumesResponse>(offset);
2310            unsafe {
2311                // Copy the object into the buffer.
2312                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2313                (buf_ptr as *mut DataSinkWriteVolumesResponse)
2314                    .write_unaligned((self as *const DataSinkWriteVolumesResponse).read());
2315                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2316                // done second because the memcpy will write garbage to these bytes.
2317            }
2318            Ok(())
2319        }
2320    }
2321    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2322        fidl::encoding::Encode<DataSinkWriteVolumesResponse, D> for (T0,)
2323    {
2324        #[inline]
2325        unsafe fn encode(
2326            self,
2327            encoder: &mut fidl::encoding::Encoder<'_, D>,
2328            offset: usize,
2329            depth: fidl::encoding::Depth,
2330        ) -> fidl::Result<()> {
2331            encoder.debug_check_bounds::<DataSinkWriteVolumesResponse>(offset);
2332            // Zero out padding regions. There's no need to apply masks
2333            // because the unmasked parts will be overwritten by fields.
2334            // Write the fields.
2335            self.0.encode(encoder, offset + 0, depth)?;
2336            Ok(())
2337        }
2338    }
2339
2340    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2341        for DataSinkWriteVolumesResponse
2342    {
2343        #[inline(always)]
2344        fn new_empty() -> Self {
2345            Self { status: fidl::new_empty!(i32, D) }
2346        }
2347
2348        #[inline]
2349        unsafe fn decode(
2350            &mut self,
2351            decoder: &mut fidl::encoding::Decoder<'_, D>,
2352            offset: usize,
2353            _depth: fidl::encoding::Depth,
2354        ) -> fidl::Result<()> {
2355            decoder.debug_check_bounds::<Self>(offset);
2356            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2357            // Verify that padding bytes are zero.
2358            // Copy from the buffer into the object.
2359            unsafe {
2360                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2361            }
2362            Ok(())
2363        }
2364    }
2365
2366    impl fidl::encoding::ValueTypeMarker for DynamicDataSinkInitializePartitionTablesResponse {
2367        type Borrowed<'a> = &'a Self;
2368        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2369            value
2370        }
2371    }
2372
2373    unsafe impl fidl::encoding::TypeMarker for DynamicDataSinkInitializePartitionTablesResponse {
2374        type Owned = Self;
2375
2376        #[inline(always)]
2377        fn inline_align(_context: fidl::encoding::Context) -> usize {
2378            4
2379        }
2380
2381        #[inline(always)]
2382        fn inline_size(_context: fidl::encoding::Context) -> usize {
2383            4
2384        }
2385        #[inline(always)]
2386        fn encode_is_copy() -> bool {
2387            true
2388        }
2389
2390        #[inline(always)]
2391        fn decode_is_copy() -> bool {
2392            true
2393        }
2394    }
2395
2396    unsafe impl<D: fidl::encoding::ResourceDialect>
2397        fidl::encoding::Encode<DynamicDataSinkInitializePartitionTablesResponse, D>
2398        for &DynamicDataSinkInitializePartitionTablesResponse
2399    {
2400        #[inline]
2401        unsafe fn encode(
2402            self,
2403            encoder: &mut fidl::encoding::Encoder<'_, D>,
2404            offset: usize,
2405            _depth: fidl::encoding::Depth,
2406        ) -> fidl::Result<()> {
2407            encoder.debug_check_bounds::<DynamicDataSinkInitializePartitionTablesResponse>(offset);
2408            unsafe {
2409                // Copy the object into the buffer.
2410                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2411                (buf_ptr as *mut DynamicDataSinkInitializePartitionTablesResponse).write_unaligned(
2412                    (self as *const DynamicDataSinkInitializePartitionTablesResponse).read(),
2413                );
2414                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2415                // done second because the memcpy will write garbage to these bytes.
2416            }
2417            Ok(())
2418        }
2419    }
2420    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2421        fidl::encoding::Encode<DynamicDataSinkInitializePartitionTablesResponse, D> for (T0,)
2422    {
2423        #[inline]
2424        unsafe fn encode(
2425            self,
2426            encoder: &mut fidl::encoding::Encoder<'_, D>,
2427            offset: usize,
2428            depth: fidl::encoding::Depth,
2429        ) -> fidl::Result<()> {
2430            encoder.debug_check_bounds::<DynamicDataSinkInitializePartitionTablesResponse>(offset);
2431            // Zero out padding regions. There's no need to apply masks
2432            // because the unmasked parts will be overwritten by fields.
2433            // Write the fields.
2434            self.0.encode(encoder, offset + 0, depth)?;
2435            Ok(())
2436        }
2437    }
2438
2439    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2440        for DynamicDataSinkInitializePartitionTablesResponse
2441    {
2442        #[inline(always)]
2443        fn new_empty() -> Self {
2444            Self { status: fidl::new_empty!(i32, D) }
2445        }
2446
2447        #[inline]
2448        unsafe fn decode(
2449            &mut self,
2450            decoder: &mut fidl::encoding::Decoder<'_, D>,
2451            offset: usize,
2452            _depth: fidl::encoding::Depth,
2453        ) -> fidl::Result<()> {
2454            decoder.debug_check_bounds::<Self>(offset);
2455            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2456            // Verify that padding bytes are zero.
2457            // Copy from the buffer into the object.
2458            unsafe {
2459                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2460            }
2461            Ok(())
2462        }
2463    }
2464
2465    impl fidl::encoding::ValueTypeMarker for DynamicDataSinkWipePartitionTablesResponse {
2466        type Borrowed<'a> = &'a Self;
2467        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2468            value
2469        }
2470    }
2471
2472    unsafe impl fidl::encoding::TypeMarker for DynamicDataSinkWipePartitionTablesResponse {
2473        type Owned = Self;
2474
2475        #[inline(always)]
2476        fn inline_align(_context: fidl::encoding::Context) -> usize {
2477            4
2478        }
2479
2480        #[inline(always)]
2481        fn inline_size(_context: fidl::encoding::Context) -> usize {
2482            4
2483        }
2484        #[inline(always)]
2485        fn encode_is_copy() -> bool {
2486            true
2487        }
2488
2489        #[inline(always)]
2490        fn decode_is_copy() -> bool {
2491            true
2492        }
2493    }
2494
2495    unsafe impl<D: fidl::encoding::ResourceDialect>
2496        fidl::encoding::Encode<DynamicDataSinkWipePartitionTablesResponse, D>
2497        for &DynamicDataSinkWipePartitionTablesResponse
2498    {
2499        #[inline]
2500        unsafe fn encode(
2501            self,
2502            encoder: &mut fidl::encoding::Encoder<'_, D>,
2503            offset: usize,
2504            _depth: fidl::encoding::Depth,
2505        ) -> fidl::Result<()> {
2506            encoder.debug_check_bounds::<DynamicDataSinkWipePartitionTablesResponse>(offset);
2507            unsafe {
2508                // Copy the object into the buffer.
2509                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2510                (buf_ptr as *mut DynamicDataSinkWipePartitionTablesResponse).write_unaligned(
2511                    (self as *const DynamicDataSinkWipePartitionTablesResponse).read(),
2512                );
2513                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2514                // done second because the memcpy will write garbage to these bytes.
2515            }
2516            Ok(())
2517        }
2518    }
2519    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2520        fidl::encoding::Encode<DynamicDataSinkWipePartitionTablesResponse, D> for (T0,)
2521    {
2522        #[inline]
2523        unsafe fn encode(
2524            self,
2525            encoder: &mut fidl::encoding::Encoder<'_, D>,
2526            offset: usize,
2527            depth: fidl::encoding::Depth,
2528        ) -> fidl::Result<()> {
2529            encoder.debug_check_bounds::<DynamicDataSinkWipePartitionTablesResponse>(offset);
2530            // Zero out padding regions. There's no need to apply masks
2531            // because the unmasked parts will be overwritten by fields.
2532            // Write the fields.
2533            self.0.encode(encoder, offset + 0, depth)?;
2534            Ok(())
2535        }
2536    }
2537
2538    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2539        for DynamicDataSinkWipePartitionTablesResponse
2540    {
2541        #[inline(always)]
2542        fn new_empty() -> Self {
2543            Self { status: fidl::new_empty!(i32, D) }
2544        }
2545
2546        #[inline]
2547        unsafe fn decode(
2548            &mut self,
2549            decoder: &mut fidl::encoding::Decoder<'_, D>,
2550            offset: usize,
2551            _depth: fidl::encoding::Depth,
2552        ) -> fidl::Result<()> {
2553            decoder.debug_check_bounds::<Self>(offset);
2554            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2555            // Verify that padding bytes are zero.
2556            // Copy from the buffer into the object.
2557            unsafe {
2558                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2559            }
2560            Ok(())
2561        }
2562    }
2563
2564    impl fidl::encoding::ValueTypeMarker for PayloadStreamReadDataResponse {
2565        type Borrowed<'a> = &'a Self;
2566        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2567            value
2568        }
2569    }
2570
2571    unsafe impl fidl::encoding::TypeMarker for PayloadStreamReadDataResponse {
2572        type Owned = Self;
2573
2574        #[inline(always)]
2575        fn inline_align(_context: fidl::encoding::Context) -> usize {
2576            8
2577        }
2578
2579        #[inline(always)]
2580        fn inline_size(_context: fidl::encoding::Context) -> usize {
2581            16
2582        }
2583    }
2584
2585    unsafe impl<D: fidl::encoding::ResourceDialect>
2586        fidl::encoding::Encode<PayloadStreamReadDataResponse, D>
2587        for &PayloadStreamReadDataResponse
2588    {
2589        #[inline]
2590        unsafe fn encode(
2591            self,
2592            encoder: &mut fidl::encoding::Encoder<'_, D>,
2593            offset: usize,
2594            _depth: fidl::encoding::Depth,
2595        ) -> fidl::Result<()> {
2596            encoder.debug_check_bounds::<PayloadStreamReadDataResponse>(offset);
2597            // Delegate to tuple encoding.
2598            fidl::encoding::Encode::<PayloadStreamReadDataResponse, D>::encode(
2599                (<ReadResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
2600                encoder,
2601                offset,
2602                _depth,
2603            )
2604        }
2605    }
2606    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ReadResult, D>>
2607        fidl::encoding::Encode<PayloadStreamReadDataResponse, D> for (T0,)
2608    {
2609        #[inline]
2610        unsafe fn encode(
2611            self,
2612            encoder: &mut fidl::encoding::Encoder<'_, D>,
2613            offset: usize,
2614            depth: fidl::encoding::Depth,
2615        ) -> fidl::Result<()> {
2616            encoder.debug_check_bounds::<PayloadStreamReadDataResponse>(offset);
2617            // Zero out padding regions. There's no need to apply masks
2618            // because the unmasked parts will be overwritten by fields.
2619            // Write the fields.
2620            self.0.encode(encoder, offset + 0, depth)?;
2621            Ok(())
2622        }
2623    }
2624
2625    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2626        for PayloadStreamReadDataResponse
2627    {
2628        #[inline(always)]
2629        fn new_empty() -> Self {
2630            Self { result: fidl::new_empty!(ReadResult, D) }
2631        }
2632
2633        #[inline]
2634        unsafe fn decode(
2635            &mut self,
2636            decoder: &mut fidl::encoding::Decoder<'_, D>,
2637            offset: usize,
2638            _depth: fidl::encoding::Depth,
2639        ) -> fidl::Result<()> {
2640            decoder.debug_check_bounds::<Self>(offset);
2641            // Verify that padding bytes are zero.
2642            fidl::decode!(ReadResult, D, &mut self.result, decoder, offset + 0, _depth)?;
2643            Ok(())
2644        }
2645    }
2646
2647    impl fidl::encoding::ValueTypeMarker for PayloadStreamRegisterVmoResponse {
2648        type Borrowed<'a> = &'a Self;
2649        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2650            value
2651        }
2652    }
2653
2654    unsafe impl fidl::encoding::TypeMarker for PayloadStreamRegisterVmoResponse {
2655        type Owned = Self;
2656
2657        #[inline(always)]
2658        fn inline_align(_context: fidl::encoding::Context) -> usize {
2659            4
2660        }
2661
2662        #[inline(always)]
2663        fn inline_size(_context: fidl::encoding::Context) -> usize {
2664            4
2665        }
2666        #[inline(always)]
2667        fn encode_is_copy() -> bool {
2668            true
2669        }
2670
2671        #[inline(always)]
2672        fn decode_is_copy() -> bool {
2673            true
2674        }
2675    }
2676
2677    unsafe impl<D: fidl::encoding::ResourceDialect>
2678        fidl::encoding::Encode<PayloadStreamRegisterVmoResponse, D>
2679        for &PayloadStreamRegisterVmoResponse
2680    {
2681        #[inline]
2682        unsafe fn encode(
2683            self,
2684            encoder: &mut fidl::encoding::Encoder<'_, D>,
2685            offset: usize,
2686            _depth: fidl::encoding::Depth,
2687        ) -> fidl::Result<()> {
2688            encoder.debug_check_bounds::<PayloadStreamRegisterVmoResponse>(offset);
2689            unsafe {
2690                // Copy the object into the buffer.
2691                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2692                (buf_ptr as *mut PayloadStreamRegisterVmoResponse)
2693                    .write_unaligned((self as *const PayloadStreamRegisterVmoResponse).read());
2694                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2695                // done second because the memcpy will write garbage to these bytes.
2696            }
2697            Ok(())
2698        }
2699    }
2700    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2701        fidl::encoding::Encode<PayloadStreamRegisterVmoResponse, D> for (T0,)
2702    {
2703        #[inline]
2704        unsafe fn encode(
2705            self,
2706            encoder: &mut fidl::encoding::Encoder<'_, D>,
2707            offset: usize,
2708            depth: fidl::encoding::Depth,
2709        ) -> fidl::Result<()> {
2710            encoder.debug_check_bounds::<PayloadStreamRegisterVmoResponse>(offset);
2711            // Zero out padding regions. There's no need to apply masks
2712            // because the unmasked parts will be overwritten by fields.
2713            // Write the fields.
2714            self.0.encode(encoder, offset + 0, depth)?;
2715            Ok(())
2716        }
2717    }
2718
2719    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2720        for PayloadStreamRegisterVmoResponse
2721    {
2722        #[inline(always)]
2723        fn new_empty() -> Self {
2724            Self { status: fidl::new_empty!(i32, D) }
2725        }
2726
2727        #[inline]
2728        unsafe fn decode(
2729            &mut self,
2730            decoder: &mut fidl::encoding::Decoder<'_, D>,
2731            offset: usize,
2732            _depth: fidl::encoding::Depth,
2733        ) -> fidl::Result<()> {
2734            decoder.debug_check_bounds::<Self>(offset);
2735            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2736            // Verify that padding bytes are zero.
2737            // Copy from the buffer into the object.
2738            unsafe {
2739                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2740            }
2741            Ok(())
2742        }
2743    }
2744
2745    impl fidl::encoding::ValueTypeMarker for ReadInfo {
2746        type Borrowed<'a> = &'a Self;
2747        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2748            value
2749        }
2750    }
2751
2752    unsafe impl fidl::encoding::TypeMarker for ReadInfo {
2753        type Owned = Self;
2754
2755        #[inline(always)]
2756        fn inline_align(_context: fidl::encoding::Context) -> usize {
2757            8
2758        }
2759
2760        #[inline(always)]
2761        fn inline_size(_context: fidl::encoding::Context) -> usize {
2762            16
2763        }
2764        #[inline(always)]
2765        fn encode_is_copy() -> bool {
2766            true
2767        }
2768
2769        #[inline(always)]
2770        fn decode_is_copy() -> bool {
2771            true
2772        }
2773    }
2774
2775    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReadInfo, D> for &ReadInfo {
2776        #[inline]
2777        unsafe fn encode(
2778            self,
2779            encoder: &mut fidl::encoding::Encoder<'_, D>,
2780            offset: usize,
2781            _depth: fidl::encoding::Depth,
2782        ) -> fidl::Result<()> {
2783            encoder.debug_check_bounds::<ReadInfo>(offset);
2784            unsafe {
2785                // Copy the object into the buffer.
2786                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2787                (buf_ptr as *mut ReadInfo).write_unaligned((self as *const ReadInfo).read());
2788                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2789                // done second because the memcpy will write garbage to these bytes.
2790            }
2791            Ok(())
2792        }
2793    }
2794    unsafe impl<
2795            D: fidl::encoding::ResourceDialect,
2796            T0: fidl::encoding::Encode<u64, D>,
2797            T1: fidl::encoding::Encode<u64, D>,
2798        > fidl::encoding::Encode<ReadInfo, D> for (T0, T1)
2799    {
2800        #[inline]
2801        unsafe fn encode(
2802            self,
2803            encoder: &mut fidl::encoding::Encoder<'_, D>,
2804            offset: usize,
2805            depth: fidl::encoding::Depth,
2806        ) -> fidl::Result<()> {
2807            encoder.debug_check_bounds::<ReadInfo>(offset);
2808            // Zero out padding regions. There's no need to apply masks
2809            // because the unmasked parts will be overwritten by fields.
2810            // Write the fields.
2811            self.0.encode(encoder, offset + 0, depth)?;
2812            self.1.encode(encoder, offset + 8, depth)?;
2813            Ok(())
2814        }
2815    }
2816
2817    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReadInfo {
2818        #[inline(always)]
2819        fn new_empty() -> Self {
2820            Self { offset: fidl::new_empty!(u64, D), size: fidl::new_empty!(u64, D) }
2821        }
2822
2823        #[inline]
2824        unsafe fn decode(
2825            &mut self,
2826            decoder: &mut fidl::encoding::Decoder<'_, D>,
2827            offset: usize,
2828            _depth: fidl::encoding::Depth,
2829        ) -> fidl::Result<()> {
2830            decoder.debug_check_bounds::<Self>(offset);
2831            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2832            // Verify that padding bytes are zero.
2833            // Copy from the buffer into the object.
2834            unsafe {
2835                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
2836            }
2837            Ok(())
2838        }
2839    }
2840
2841    impl fidl::encoding::ValueTypeMarker for SysconfigFlushResponse {
2842        type Borrowed<'a> = &'a Self;
2843        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2844            value
2845        }
2846    }
2847
2848    unsafe impl fidl::encoding::TypeMarker for SysconfigFlushResponse {
2849        type Owned = Self;
2850
2851        #[inline(always)]
2852        fn inline_align(_context: fidl::encoding::Context) -> usize {
2853            4
2854        }
2855
2856        #[inline(always)]
2857        fn inline_size(_context: fidl::encoding::Context) -> usize {
2858            4
2859        }
2860        #[inline(always)]
2861        fn encode_is_copy() -> bool {
2862            true
2863        }
2864
2865        #[inline(always)]
2866        fn decode_is_copy() -> bool {
2867            true
2868        }
2869    }
2870
2871    unsafe impl<D: fidl::encoding::ResourceDialect>
2872        fidl::encoding::Encode<SysconfigFlushResponse, D> for &SysconfigFlushResponse
2873    {
2874        #[inline]
2875        unsafe fn encode(
2876            self,
2877            encoder: &mut fidl::encoding::Encoder<'_, D>,
2878            offset: usize,
2879            _depth: fidl::encoding::Depth,
2880        ) -> fidl::Result<()> {
2881            encoder.debug_check_bounds::<SysconfigFlushResponse>(offset);
2882            unsafe {
2883                // Copy the object into the buffer.
2884                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2885                (buf_ptr as *mut SysconfigFlushResponse)
2886                    .write_unaligned((self as *const SysconfigFlushResponse).read());
2887                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2888                // done second because the memcpy will write garbage to these bytes.
2889            }
2890            Ok(())
2891        }
2892    }
2893    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2894        fidl::encoding::Encode<SysconfigFlushResponse, D> for (T0,)
2895    {
2896        #[inline]
2897        unsafe fn encode(
2898            self,
2899            encoder: &mut fidl::encoding::Encoder<'_, D>,
2900            offset: usize,
2901            depth: fidl::encoding::Depth,
2902        ) -> fidl::Result<()> {
2903            encoder.debug_check_bounds::<SysconfigFlushResponse>(offset);
2904            // Zero out padding regions. There's no need to apply masks
2905            // because the unmasked parts will be overwritten by fields.
2906            // Write the fields.
2907            self.0.encode(encoder, offset + 0, depth)?;
2908            Ok(())
2909        }
2910    }
2911
2912    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2913        for SysconfigFlushResponse
2914    {
2915        #[inline(always)]
2916        fn new_empty() -> Self {
2917            Self { status: fidl::new_empty!(i32, D) }
2918        }
2919
2920        #[inline]
2921        unsafe fn decode(
2922            &mut self,
2923            decoder: &mut fidl::encoding::Decoder<'_, D>,
2924            offset: usize,
2925            _depth: fidl::encoding::Depth,
2926        ) -> fidl::Result<()> {
2927            decoder.debug_check_bounds::<Self>(offset);
2928            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2929            // Verify that padding bytes are zero.
2930            // Copy from the buffer into the object.
2931            unsafe {
2932                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2933            }
2934            Ok(())
2935        }
2936    }
2937
2938    impl fidl::encoding::ValueTypeMarker for SysconfigWipeResponse {
2939        type Borrowed<'a> = &'a Self;
2940        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2941            value
2942        }
2943    }
2944
2945    unsafe impl fidl::encoding::TypeMarker for SysconfigWipeResponse {
2946        type Owned = Self;
2947
2948        #[inline(always)]
2949        fn inline_align(_context: fidl::encoding::Context) -> usize {
2950            4
2951        }
2952
2953        #[inline(always)]
2954        fn inline_size(_context: fidl::encoding::Context) -> usize {
2955            4
2956        }
2957        #[inline(always)]
2958        fn encode_is_copy() -> bool {
2959            true
2960        }
2961
2962        #[inline(always)]
2963        fn decode_is_copy() -> bool {
2964            true
2965        }
2966    }
2967
2968    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SysconfigWipeResponse, D>
2969        for &SysconfigWipeResponse
2970    {
2971        #[inline]
2972        unsafe fn encode(
2973            self,
2974            encoder: &mut fidl::encoding::Encoder<'_, D>,
2975            offset: usize,
2976            _depth: fidl::encoding::Depth,
2977        ) -> fidl::Result<()> {
2978            encoder.debug_check_bounds::<SysconfigWipeResponse>(offset);
2979            unsafe {
2980                // Copy the object into the buffer.
2981                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2982                (buf_ptr as *mut SysconfigWipeResponse)
2983                    .write_unaligned((self as *const SysconfigWipeResponse).read());
2984                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2985                // done second because the memcpy will write garbage to these bytes.
2986            }
2987            Ok(())
2988        }
2989    }
2990    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
2991        fidl::encoding::Encode<SysconfigWipeResponse, D> for (T0,)
2992    {
2993        #[inline]
2994        unsafe fn encode(
2995            self,
2996            encoder: &mut fidl::encoding::Encoder<'_, D>,
2997            offset: usize,
2998            depth: fidl::encoding::Depth,
2999        ) -> fidl::Result<()> {
3000            encoder.debug_check_bounds::<SysconfigWipeResponse>(offset);
3001            // Zero out padding regions. There's no need to apply masks
3002            // because the unmasked parts will be overwritten by fields.
3003            // Write the fields.
3004            self.0.encode(encoder, offset + 0, depth)?;
3005            Ok(())
3006        }
3007    }
3008
3009    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SysconfigWipeResponse {
3010        #[inline(always)]
3011        fn new_empty() -> Self {
3012            Self { status: fidl::new_empty!(i32, D) }
3013        }
3014
3015        #[inline]
3016        unsafe fn decode(
3017            &mut self,
3018            decoder: &mut fidl::encoding::Decoder<'_, D>,
3019            offset: usize,
3020            _depth: fidl::encoding::Depth,
3021        ) -> fidl::Result<()> {
3022            decoder.debug_check_bounds::<Self>(offset);
3023            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3024            // Verify that padding bytes are zero.
3025            // Copy from the buffer into the object.
3026            unsafe {
3027                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3028            }
3029            Ok(())
3030        }
3031    }
3032
3033    impl fidl::encoding::ValueTypeMarker for SysconfigWriteResponse {
3034        type Borrowed<'a> = &'a Self;
3035        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3036            value
3037        }
3038    }
3039
3040    unsafe impl fidl::encoding::TypeMarker for SysconfigWriteResponse {
3041        type Owned = Self;
3042
3043        #[inline(always)]
3044        fn inline_align(_context: fidl::encoding::Context) -> usize {
3045            4
3046        }
3047
3048        #[inline(always)]
3049        fn inline_size(_context: fidl::encoding::Context) -> usize {
3050            4
3051        }
3052        #[inline(always)]
3053        fn encode_is_copy() -> bool {
3054            true
3055        }
3056
3057        #[inline(always)]
3058        fn decode_is_copy() -> bool {
3059            true
3060        }
3061    }
3062
3063    unsafe impl<D: fidl::encoding::ResourceDialect>
3064        fidl::encoding::Encode<SysconfigWriteResponse, D> for &SysconfigWriteResponse
3065    {
3066        #[inline]
3067        unsafe fn encode(
3068            self,
3069            encoder: &mut fidl::encoding::Encoder<'_, D>,
3070            offset: usize,
3071            _depth: fidl::encoding::Depth,
3072        ) -> fidl::Result<()> {
3073            encoder.debug_check_bounds::<SysconfigWriteResponse>(offset);
3074            unsafe {
3075                // Copy the object into the buffer.
3076                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3077                (buf_ptr as *mut SysconfigWriteResponse)
3078                    .write_unaligned((self as *const SysconfigWriteResponse).read());
3079                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3080                // done second because the memcpy will write garbage to these bytes.
3081            }
3082            Ok(())
3083        }
3084    }
3085    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i32, D>>
3086        fidl::encoding::Encode<SysconfigWriteResponse, D> for (T0,)
3087    {
3088        #[inline]
3089        unsafe fn encode(
3090            self,
3091            encoder: &mut fidl::encoding::Encoder<'_, D>,
3092            offset: usize,
3093            depth: fidl::encoding::Depth,
3094        ) -> fidl::Result<()> {
3095            encoder.debug_check_bounds::<SysconfigWriteResponse>(offset);
3096            // Zero out padding regions. There's no need to apply masks
3097            // because the unmasked parts will be overwritten by fields.
3098            // Write the fields.
3099            self.0.encode(encoder, offset + 0, depth)?;
3100            Ok(())
3101        }
3102    }
3103
3104    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3105        for SysconfigWriteResponse
3106    {
3107        #[inline(always)]
3108        fn new_empty() -> Self {
3109            Self { status: fidl::new_empty!(i32, D) }
3110        }
3111
3112        #[inline]
3113        unsafe fn decode(
3114            &mut self,
3115            decoder: &mut fidl::encoding::Decoder<'_, D>,
3116            offset: usize,
3117            _depth: fidl::encoding::Depth,
3118        ) -> fidl::Result<()> {
3119            decoder.debug_check_bounds::<Self>(offset);
3120            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3121            // Verify that padding bytes are zero.
3122            // Copy from the buffer into the object.
3123            unsafe {
3124                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3125            }
3126            Ok(())
3127        }
3128    }
3129
3130    impl fidl::encoding::ValueTypeMarker for SysconfigGetPartitionSizeResponse {
3131        type Borrowed<'a> = &'a Self;
3132        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3133            value
3134        }
3135    }
3136
3137    unsafe impl fidl::encoding::TypeMarker for SysconfigGetPartitionSizeResponse {
3138        type Owned = Self;
3139
3140        #[inline(always)]
3141        fn inline_align(_context: fidl::encoding::Context) -> usize {
3142            8
3143        }
3144
3145        #[inline(always)]
3146        fn inline_size(_context: fidl::encoding::Context) -> usize {
3147            8
3148        }
3149        #[inline(always)]
3150        fn encode_is_copy() -> bool {
3151            true
3152        }
3153
3154        #[inline(always)]
3155        fn decode_is_copy() -> bool {
3156            true
3157        }
3158    }
3159
3160    unsafe impl<D: fidl::encoding::ResourceDialect>
3161        fidl::encoding::Encode<SysconfigGetPartitionSizeResponse, D>
3162        for &SysconfigGetPartitionSizeResponse
3163    {
3164        #[inline]
3165        unsafe fn encode(
3166            self,
3167            encoder: &mut fidl::encoding::Encoder<'_, D>,
3168            offset: usize,
3169            _depth: fidl::encoding::Depth,
3170        ) -> fidl::Result<()> {
3171            encoder.debug_check_bounds::<SysconfigGetPartitionSizeResponse>(offset);
3172            unsafe {
3173                // Copy the object into the buffer.
3174                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3175                (buf_ptr as *mut SysconfigGetPartitionSizeResponse)
3176                    .write_unaligned((self as *const SysconfigGetPartitionSizeResponse).read());
3177                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3178                // done second because the memcpy will write garbage to these bytes.
3179            }
3180            Ok(())
3181        }
3182    }
3183    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3184        fidl::encoding::Encode<SysconfigGetPartitionSizeResponse, D> for (T0,)
3185    {
3186        #[inline]
3187        unsafe fn encode(
3188            self,
3189            encoder: &mut fidl::encoding::Encoder<'_, D>,
3190            offset: usize,
3191            depth: fidl::encoding::Depth,
3192        ) -> fidl::Result<()> {
3193            encoder.debug_check_bounds::<SysconfigGetPartitionSizeResponse>(offset);
3194            // Zero out padding regions. There's no need to apply masks
3195            // because the unmasked parts will be overwritten by fields.
3196            // Write the fields.
3197            self.0.encode(encoder, offset + 0, depth)?;
3198            Ok(())
3199        }
3200    }
3201
3202    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3203        for SysconfigGetPartitionSizeResponse
3204    {
3205        #[inline(always)]
3206        fn new_empty() -> Self {
3207            Self { size: fidl::new_empty!(u64, D) }
3208        }
3209
3210        #[inline]
3211        unsafe fn decode(
3212            &mut self,
3213            decoder: &mut fidl::encoding::Decoder<'_, D>,
3214            offset: usize,
3215            _depth: fidl::encoding::Depth,
3216        ) -> fidl::Result<()> {
3217            decoder.debug_check_bounds::<Self>(offset);
3218            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3219            // Verify that padding bytes are zero.
3220            // Copy from the buffer into the object.
3221            unsafe {
3222                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3223            }
3224            Ok(())
3225        }
3226    }
3227
3228    impl BootManagerQueryConfigurationStatusAndBootAttemptsResponse {
3229        #[inline(always)]
3230        fn max_ordinal_present(&self) -> u64 {
3231            if let Some(_) = self.unbootable_reason {
3232                return 3;
3233            }
3234            if let Some(_) = self.boot_attempts {
3235                return 2;
3236            }
3237            if let Some(_) = self.status {
3238                return 1;
3239            }
3240            0
3241        }
3242    }
3243
3244    impl fidl::encoding::ValueTypeMarker
3245        for BootManagerQueryConfigurationStatusAndBootAttemptsResponse
3246    {
3247        type Borrowed<'a> = &'a Self;
3248        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3249            value
3250        }
3251    }
3252
3253    unsafe impl fidl::encoding::TypeMarker
3254        for BootManagerQueryConfigurationStatusAndBootAttemptsResponse
3255    {
3256        type Owned = Self;
3257
3258        #[inline(always)]
3259        fn inline_align(_context: fidl::encoding::Context) -> usize {
3260            8
3261        }
3262
3263        #[inline(always)]
3264        fn inline_size(_context: fidl::encoding::Context) -> usize {
3265            16
3266        }
3267    }
3268
3269    unsafe impl<D: fidl::encoding::ResourceDialect>
3270        fidl::encoding::Encode<BootManagerQueryConfigurationStatusAndBootAttemptsResponse, D>
3271        for &BootManagerQueryConfigurationStatusAndBootAttemptsResponse
3272    {
3273        unsafe fn encode(
3274            self,
3275            encoder: &mut fidl::encoding::Encoder<'_, D>,
3276            offset: usize,
3277            mut depth: fidl::encoding::Depth,
3278        ) -> fidl::Result<()> {
3279            encoder
3280                .debug_check_bounds::<BootManagerQueryConfigurationStatusAndBootAttemptsResponse>(
3281                    offset,
3282                );
3283            // Vector header
3284            let max_ordinal: u64 = self.max_ordinal_present();
3285            encoder.write_num(max_ordinal, offset);
3286            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3287            // Calling encoder.out_of_line_offset(0) is not allowed.
3288            if max_ordinal == 0 {
3289                return Ok(());
3290            }
3291            depth.increment()?;
3292            let envelope_size = 8;
3293            let bytes_len = max_ordinal as usize * envelope_size;
3294            #[allow(unused_variables)]
3295            let offset = encoder.out_of_line_offset(bytes_len);
3296            let mut _prev_end_offset: usize = 0;
3297            if 1 > max_ordinal {
3298                return Ok(());
3299            }
3300
3301            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3302            // are envelope_size bytes.
3303            let cur_offset: usize = (1 - 1) * envelope_size;
3304
3305            // Zero reserved fields.
3306            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3307
3308            // Safety:
3309            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3310            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3311            //   envelope_size bytes, there is always sufficient room.
3312            fidl::encoding::encode_in_envelope_optional::<ConfigurationStatus, D>(
3313                self.status
3314                    .as_ref()
3315                    .map(<ConfigurationStatus as fidl::encoding::ValueTypeMarker>::borrow),
3316                encoder,
3317                offset + cur_offset,
3318                depth,
3319            )?;
3320
3321            _prev_end_offset = cur_offset + envelope_size;
3322            if 2 > max_ordinal {
3323                return Ok(());
3324            }
3325
3326            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3327            // are envelope_size bytes.
3328            let cur_offset: usize = (2 - 1) * envelope_size;
3329
3330            // Zero reserved fields.
3331            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3332
3333            // Safety:
3334            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3335            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3336            //   envelope_size bytes, there is always sufficient room.
3337            fidl::encoding::encode_in_envelope_optional::<u8, D>(
3338                self.boot_attempts.as_ref().map(<u8 as fidl::encoding::ValueTypeMarker>::borrow),
3339                encoder,
3340                offset + cur_offset,
3341                depth,
3342            )?;
3343
3344            _prev_end_offset = cur_offset + envelope_size;
3345            if 3 > max_ordinal {
3346                return Ok(());
3347            }
3348
3349            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3350            // are envelope_size bytes.
3351            let cur_offset: usize = (3 - 1) * envelope_size;
3352
3353            // Zero reserved fields.
3354            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3355
3356            // Safety:
3357            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3358            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3359            //   envelope_size bytes, there is always sufficient room.
3360            fidl::encoding::encode_in_envelope_optional::<UnbootableReason, D>(
3361                self.unbootable_reason
3362                    .as_ref()
3363                    .map(<UnbootableReason as fidl::encoding::ValueTypeMarker>::borrow),
3364                encoder,
3365                offset + cur_offset,
3366                depth,
3367            )?;
3368
3369            _prev_end_offset = cur_offset + envelope_size;
3370
3371            Ok(())
3372        }
3373    }
3374
3375    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3376        for BootManagerQueryConfigurationStatusAndBootAttemptsResponse
3377    {
3378        #[inline(always)]
3379        fn new_empty() -> Self {
3380            Self::default()
3381        }
3382
3383        unsafe fn decode(
3384            &mut self,
3385            decoder: &mut fidl::encoding::Decoder<'_, D>,
3386            offset: usize,
3387            mut depth: fidl::encoding::Depth,
3388        ) -> fidl::Result<()> {
3389            decoder.debug_check_bounds::<Self>(offset);
3390            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3391                None => return Err(fidl::Error::NotNullable),
3392                Some(len) => len,
3393            };
3394            // Calling decoder.out_of_line_offset(0) is not allowed.
3395            if len == 0 {
3396                return Ok(());
3397            };
3398            depth.increment()?;
3399            let envelope_size = 8;
3400            let bytes_len = len * envelope_size;
3401            let offset = decoder.out_of_line_offset(bytes_len)?;
3402            // Decode the envelope for each type.
3403            let mut _next_ordinal_to_read = 0;
3404            let mut next_offset = offset;
3405            let end_offset = offset + bytes_len;
3406            _next_ordinal_to_read += 1;
3407            if next_offset >= end_offset {
3408                return Ok(());
3409            }
3410
3411            // Decode unknown envelopes for gaps in ordinals.
3412            while _next_ordinal_to_read < 1 {
3413                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3414                _next_ordinal_to_read += 1;
3415                next_offset += envelope_size;
3416            }
3417
3418            let next_out_of_line = decoder.next_out_of_line();
3419            let handles_before = decoder.remaining_handles();
3420            if let Some((inlined, num_bytes, num_handles)) =
3421                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3422            {
3423                let member_inline_size =
3424                    <ConfigurationStatus as fidl::encoding::TypeMarker>::inline_size(
3425                        decoder.context,
3426                    );
3427                if inlined != (member_inline_size <= 4) {
3428                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3429                }
3430                let inner_offset;
3431                let mut inner_depth = depth.clone();
3432                if inlined {
3433                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3434                    inner_offset = next_offset;
3435                } else {
3436                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3437                    inner_depth.increment()?;
3438                }
3439                let val_ref =
3440                    self.status.get_or_insert_with(|| fidl::new_empty!(ConfigurationStatus, D));
3441                fidl::decode!(ConfigurationStatus, D, val_ref, decoder, inner_offset, inner_depth)?;
3442                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3443                {
3444                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3445                }
3446                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3447                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3448                }
3449            }
3450
3451            next_offset += envelope_size;
3452            _next_ordinal_to_read += 1;
3453            if next_offset >= end_offset {
3454                return Ok(());
3455            }
3456
3457            // Decode unknown envelopes for gaps in ordinals.
3458            while _next_ordinal_to_read < 2 {
3459                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3460                _next_ordinal_to_read += 1;
3461                next_offset += envelope_size;
3462            }
3463
3464            let next_out_of_line = decoder.next_out_of_line();
3465            let handles_before = decoder.remaining_handles();
3466            if let Some((inlined, num_bytes, num_handles)) =
3467                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3468            {
3469                let member_inline_size =
3470                    <u8 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3471                if inlined != (member_inline_size <= 4) {
3472                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3473                }
3474                let inner_offset;
3475                let mut inner_depth = depth.clone();
3476                if inlined {
3477                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3478                    inner_offset = next_offset;
3479                } else {
3480                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3481                    inner_depth.increment()?;
3482                }
3483                let val_ref = self.boot_attempts.get_or_insert_with(|| fidl::new_empty!(u8, D));
3484                fidl::decode!(u8, D, val_ref, decoder, inner_offset, inner_depth)?;
3485                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3486                {
3487                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3488                }
3489                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3490                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3491                }
3492            }
3493
3494            next_offset += envelope_size;
3495            _next_ordinal_to_read += 1;
3496            if next_offset >= end_offset {
3497                return Ok(());
3498            }
3499
3500            // Decode unknown envelopes for gaps in ordinals.
3501            while _next_ordinal_to_read < 3 {
3502                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3503                _next_ordinal_to_read += 1;
3504                next_offset += envelope_size;
3505            }
3506
3507            let next_out_of_line = decoder.next_out_of_line();
3508            let handles_before = decoder.remaining_handles();
3509            if let Some((inlined, num_bytes, num_handles)) =
3510                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3511            {
3512                let member_inline_size =
3513                    <UnbootableReason as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3514                if inlined != (member_inline_size <= 4) {
3515                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3516                }
3517                let inner_offset;
3518                let mut inner_depth = depth.clone();
3519                if inlined {
3520                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3521                    inner_offset = next_offset;
3522                } else {
3523                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3524                    inner_depth.increment()?;
3525                }
3526                let val_ref = self
3527                    .unbootable_reason
3528                    .get_or_insert_with(|| fidl::new_empty!(UnbootableReason, D));
3529                fidl::decode!(UnbootableReason, D, val_ref, decoder, inner_offset, inner_depth)?;
3530                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3531                {
3532                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3533                }
3534                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3535                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3536                }
3537            }
3538
3539            next_offset += envelope_size;
3540
3541            // Decode the remaining unknown envelopes.
3542            while next_offset < end_offset {
3543                _next_ordinal_to_read += 1;
3544                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3545                next_offset += envelope_size;
3546            }
3547
3548            Ok(())
3549        }
3550    }
3551
3552    impl fidl::encoding::ValueTypeMarker for ReadResult {
3553        type Borrowed<'a> = &'a Self;
3554        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3555            value
3556        }
3557    }
3558
3559    unsafe impl fidl::encoding::TypeMarker for ReadResult {
3560        type Owned = Self;
3561
3562        #[inline(always)]
3563        fn inline_align(_context: fidl::encoding::Context) -> usize {
3564            8
3565        }
3566
3567        #[inline(always)]
3568        fn inline_size(_context: fidl::encoding::Context) -> usize {
3569            16
3570        }
3571    }
3572
3573    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReadResult, D>
3574        for &ReadResult
3575    {
3576        #[inline]
3577        unsafe fn encode(
3578            self,
3579            encoder: &mut fidl::encoding::Encoder<'_, D>,
3580            offset: usize,
3581            _depth: fidl::encoding::Depth,
3582        ) -> fidl::Result<()> {
3583            encoder.debug_check_bounds::<ReadResult>(offset);
3584            encoder.write_num::<u64>(self.ordinal(), offset);
3585            match self {
3586                ReadResult::Err(ref val) => fidl::encoding::encode_in_envelope::<i32, D>(
3587                    <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3588                    encoder,
3589                    offset + 8,
3590                    _depth,
3591                ),
3592                ReadResult::Eof(ref val) => fidl::encoding::encode_in_envelope::<bool, D>(
3593                    <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3594                    encoder,
3595                    offset + 8,
3596                    _depth,
3597                ),
3598                ReadResult::Info(ref val) => fidl::encoding::encode_in_envelope::<ReadInfo, D>(
3599                    <ReadInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
3600                    encoder,
3601                    offset + 8,
3602                    _depth,
3603                ),
3604            }
3605        }
3606    }
3607
3608    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReadResult {
3609        #[inline(always)]
3610        fn new_empty() -> Self {
3611            Self::Err(fidl::new_empty!(i32, D))
3612        }
3613
3614        #[inline]
3615        unsafe fn decode(
3616            &mut self,
3617            decoder: &mut fidl::encoding::Decoder<'_, D>,
3618            offset: usize,
3619            mut depth: fidl::encoding::Depth,
3620        ) -> fidl::Result<()> {
3621            decoder.debug_check_bounds::<Self>(offset);
3622            #[allow(unused_variables)]
3623            let next_out_of_line = decoder.next_out_of_line();
3624            let handles_before = decoder.remaining_handles();
3625            let (ordinal, inlined, num_bytes, num_handles) =
3626                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
3627
3628            let member_inline_size = match ordinal {
3629                1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3630                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3631                3 => <ReadInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3632                _ => return Err(fidl::Error::UnknownUnionTag),
3633            };
3634
3635            if inlined != (member_inline_size <= 4) {
3636                return Err(fidl::Error::InvalidInlineBitInEnvelope);
3637            }
3638            let _inner_offset;
3639            if inlined {
3640                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3641                _inner_offset = offset + 8;
3642            } else {
3643                depth.increment()?;
3644                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3645            }
3646            match ordinal {
3647                1 => {
3648                    #[allow(irrefutable_let_patterns)]
3649                    if let ReadResult::Err(_) = self {
3650                        // Do nothing, read the value into the object
3651                    } else {
3652                        // Initialize `self` to the right variant
3653                        *self = ReadResult::Err(fidl::new_empty!(i32, D));
3654                    }
3655                    #[allow(irrefutable_let_patterns)]
3656                    if let ReadResult::Err(ref mut val) = self {
3657                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
3658                    } else {
3659                        unreachable!()
3660                    }
3661                }
3662                2 => {
3663                    #[allow(irrefutable_let_patterns)]
3664                    if let ReadResult::Eof(_) = self {
3665                        // Do nothing, read the value into the object
3666                    } else {
3667                        // Initialize `self` to the right variant
3668                        *self = ReadResult::Eof(fidl::new_empty!(bool, D));
3669                    }
3670                    #[allow(irrefutable_let_patterns)]
3671                    if let ReadResult::Eof(ref mut val) = self {
3672                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
3673                    } else {
3674                        unreachable!()
3675                    }
3676                }
3677                3 => {
3678                    #[allow(irrefutable_let_patterns)]
3679                    if let ReadResult::Info(_) = self {
3680                        // Do nothing, read the value into the object
3681                    } else {
3682                        // Initialize `self` to the right variant
3683                        *self = ReadResult::Info(fidl::new_empty!(ReadInfo, D));
3684                    }
3685                    #[allow(irrefutable_let_patterns)]
3686                    if let ReadResult::Info(ref mut val) = self {
3687                        fidl::decode!(ReadInfo, D, val, decoder, _inner_offset, depth)?;
3688                    } else {
3689                        unreachable!()
3690                    }
3691                }
3692                ordinal => panic!("unexpected ordinal {:?}", ordinal),
3693            }
3694            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
3695                return Err(fidl::Error::InvalidNumBytesInEnvelope);
3696            }
3697            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3698                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3699            }
3700            Ok(())
3701        }
3702    }
3703
3704    impl fidl::encoding::ValueTypeMarker for WriteFirmwareResult {
3705        type Borrowed<'a> = &'a Self;
3706        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3707            value
3708        }
3709    }
3710
3711    unsafe impl fidl::encoding::TypeMarker for WriteFirmwareResult {
3712        type Owned = Self;
3713
3714        #[inline(always)]
3715        fn inline_align(_context: fidl::encoding::Context) -> usize {
3716            8
3717        }
3718
3719        #[inline(always)]
3720        fn inline_size(_context: fidl::encoding::Context) -> usize {
3721            16
3722        }
3723    }
3724
3725    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WriteFirmwareResult, D>
3726        for &WriteFirmwareResult
3727    {
3728        #[inline]
3729        unsafe fn encode(
3730            self,
3731            encoder: &mut fidl::encoding::Encoder<'_, D>,
3732            offset: usize,
3733            _depth: fidl::encoding::Depth,
3734        ) -> fidl::Result<()> {
3735            encoder.debug_check_bounds::<WriteFirmwareResult>(offset);
3736            encoder.write_num::<u64>(self.ordinal(), offset);
3737            match self {
3738                WriteFirmwareResult::Status(ref val) => {
3739                    fidl::encoding::encode_in_envelope::<i32, D>(
3740                        <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
3741                        encoder,
3742                        offset + 8,
3743                        _depth,
3744                    )
3745                }
3746                WriteFirmwareResult::Unsupported(ref val) => {
3747                    fidl::encoding::encode_in_envelope::<bool, D>(
3748                        <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
3749                        encoder,
3750                        offset + 8,
3751                        _depth,
3752                    )
3753                }
3754            }
3755        }
3756    }
3757
3758    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WriteFirmwareResult {
3759        #[inline(always)]
3760        fn new_empty() -> Self {
3761            Self::Status(fidl::new_empty!(i32, D))
3762        }
3763
3764        #[inline]
3765        unsafe fn decode(
3766            &mut self,
3767            decoder: &mut fidl::encoding::Decoder<'_, D>,
3768            offset: usize,
3769            mut depth: fidl::encoding::Depth,
3770        ) -> fidl::Result<()> {
3771            decoder.debug_check_bounds::<Self>(offset);
3772            #[allow(unused_variables)]
3773            let next_out_of_line = decoder.next_out_of_line();
3774            let handles_before = decoder.remaining_handles();
3775            let (ordinal, inlined, num_bytes, num_handles) =
3776                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
3777
3778            let member_inline_size = match ordinal {
3779                1 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3780                2 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3781                _ => return Err(fidl::Error::UnknownUnionTag),
3782            };
3783
3784            if inlined != (member_inline_size <= 4) {
3785                return Err(fidl::Error::InvalidInlineBitInEnvelope);
3786            }
3787            let _inner_offset;
3788            if inlined {
3789                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3790                _inner_offset = offset + 8;
3791            } else {
3792                depth.increment()?;
3793                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3794            }
3795            match ordinal {
3796                1 => {
3797                    #[allow(irrefutable_let_patterns)]
3798                    if let WriteFirmwareResult::Status(_) = self {
3799                        // Do nothing, read the value into the object
3800                    } else {
3801                        // Initialize `self` to the right variant
3802                        *self = WriteFirmwareResult::Status(fidl::new_empty!(i32, D));
3803                    }
3804                    #[allow(irrefutable_let_patterns)]
3805                    if let WriteFirmwareResult::Status(ref mut val) = self {
3806                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
3807                    } else {
3808                        unreachable!()
3809                    }
3810                }
3811                2 => {
3812                    #[allow(irrefutable_let_patterns)]
3813                    if let WriteFirmwareResult::Unsupported(_) = self {
3814                        // Do nothing, read the value into the object
3815                    } else {
3816                        // Initialize `self` to the right variant
3817                        *self = WriteFirmwareResult::Unsupported(fidl::new_empty!(bool, D));
3818                    }
3819                    #[allow(irrefutable_let_patterns)]
3820                    if let WriteFirmwareResult::Unsupported(ref mut val) = self {
3821                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
3822                    } else {
3823                        unreachable!()
3824                    }
3825                }
3826                ordinal => panic!("unexpected ordinal {:?}", ordinal),
3827            }
3828            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
3829                return Err(fidl::Error::InvalidNumBytesInEnvelope);
3830            }
3831            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3832                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3833            }
3834            Ok(())
3835        }
3836    }
3837}