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