Skip to main content

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