Skip to main content

fidl_fuchsia_power_cpu__common/
fidl_fuchsia_power_cpu__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
11/// Errors returned by [`fuchsia.power.cpu/DomainController.ClearMaxFrequency`].
12#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
13pub enum ClearMaxFrequencyError {
14    Internal,
15    InvalidArguments,
16    #[doc(hidden)]
17    __SourceBreaking {
18        unknown_ordinal: u32,
19    },
20}
21
22/// Pattern that matches an unknown `ClearMaxFrequencyError` member.
23#[macro_export]
24macro_rules! ClearMaxFrequencyErrorUnknown {
25    () => {
26        _
27    };
28}
29
30impl ClearMaxFrequencyError {
31    #[inline]
32    pub fn from_primitive(prim: u32) -> Option<Self> {
33        match prim {
34            1 => Some(Self::Internal),
35            2 => Some(Self::InvalidArguments),
36            _ => None,
37        }
38    }
39
40    #[inline]
41    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
42        match prim {
43            1 => Self::Internal,
44            2 => Self::InvalidArguments,
45            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
46        }
47    }
48
49    #[inline]
50    pub fn unknown() -> Self {
51        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
52    }
53
54    #[inline]
55    pub const fn into_primitive(self) -> u32 {
56        match self {
57            Self::Internal => 1,
58            Self::InvalidArguments => 2,
59            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
60        }
61    }
62
63    #[inline]
64    pub fn is_unknown(&self) -> bool {
65        match self {
66            Self::__SourceBreaking { unknown_ordinal: _ } => true,
67            _ => false,
68        }
69    }
70}
71
72/// Errors returned by [`fuchsia.power.cpu/DomainController.GetMaxFrequency`].
73#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
74pub enum GetMaxFrequencyError {
75    Internal,
76    InvalidArguments,
77    #[doc(hidden)]
78    __SourceBreaking {
79        unknown_ordinal: u32,
80    },
81}
82
83/// Pattern that matches an unknown `GetMaxFrequencyError` member.
84#[macro_export]
85macro_rules! GetMaxFrequencyErrorUnknown {
86    () => {
87        _
88    };
89}
90
91impl GetMaxFrequencyError {
92    #[inline]
93    pub fn from_primitive(prim: u32) -> Option<Self> {
94        match prim {
95            1 => Some(Self::Internal),
96            2 => Some(Self::InvalidArguments),
97            _ => None,
98        }
99    }
100
101    #[inline]
102    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
103        match prim {
104            1 => Self::Internal,
105            2 => Self::InvalidArguments,
106            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
107        }
108    }
109
110    #[inline]
111    pub fn unknown() -> Self {
112        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
113    }
114
115    #[inline]
116    pub const fn into_primitive(self) -> u32 {
117        match self {
118            Self::Internal => 1,
119            Self::InvalidArguments => 2,
120            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
121        }
122    }
123
124    #[inline]
125    pub fn is_unknown(&self) -> bool {
126        match self {
127            Self::__SourceBreaking { unknown_ordinal: _ } => true,
128            _ => false,
129        }
130    }
131}
132
133/// Errors returned by [`fuchsia.power.cpu/DomainController.SetMaxFrequency`].
134#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
135pub enum SetMaxFrequencyError {
136    Internal,
137    InvalidArguments,
138    #[doc(hidden)]
139    __SourceBreaking {
140        unknown_ordinal: u32,
141    },
142}
143
144/// Pattern that matches an unknown `SetMaxFrequencyError` member.
145#[macro_export]
146macro_rules! SetMaxFrequencyErrorUnknown {
147    () => {
148        _
149    };
150}
151
152impl SetMaxFrequencyError {
153    #[inline]
154    pub fn from_primitive(prim: u32) -> Option<Self> {
155        match prim {
156            1 => Some(Self::Internal),
157            2 => Some(Self::InvalidArguments),
158            _ => None,
159        }
160    }
161
162    #[inline]
163    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
164        match prim {
165            1 => Self::Internal,
166            2 => Self::InvalidArguments,
167            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
168        }
169    }
170
171    #[inline]
172    pub fn unknown() -> Self {
173        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
174    }
175
176    #[inline]
177    pub const fn into_primitive(self) -> u32 {
178        match self {
179            Self::Internal => 1,
180            Self::InvalidArguments => 2,
181            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
182        }
183    }
184
185    #[inline]
186    pub fn is_unknown(&self) -> bool {
187        match self {
188            Self::__SourceBreaking { unknown_ordinal: _ } => true,
189            _ => false,
190        }
191    }
192}
193
194#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
195#[repr(C)]
196pub struct DomainControllerClearMaxFrequencyRequest {
197    pub domain_id: u64,
198}
199
200impl fidl::Persistable for DomainControllerClearMaxFrequencyRequest {}
201
202#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
203#[repr(C)]
204pub struct DomainControllerGetMaxFrequencyRequest {
205    pub domain_id: u64,
206}
207
208impl fidl::Persistable for DomainControllerGetMaxFrequencyRequest {}
209
210#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
211#[repr(C)]
212pub struct DomainControllerSetMaxFrequencyRequest {
213    pub domain_id: u64,
214    pub frequency_index: u64,
215}
216
217impl fidl::Persistable for DomainControllerSetMaxFrequencyRequest {}
218
219#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
220#[repr(C)]
221pub struct DomainControllerGetMaxFrequencyResponse {
222    pub max_frequency_index: u64,
223}
224
225impl fidl::Persistable for DomainControllerGetMaxFrequencyResponse {}
226
227#[derive(Clone, Debug, PartialEq)]
228pub struct DomainControllerListDomainsResponse {
229    pub domains: Vec<DomainInfo>,
230}
231
232impl fidl::Persistable for DomainControllerListDomainsResponse {}
233
234#[derive(Clone, Debug, Default, PartialEq)]
235pub struct DomainInfo {
236    pub id: Option<u64>,
237    pub core_ids: Option<Vec<u64>>,
238    pub available_frequencies_hz: Option<Vec<u64>>,
239    pub name: Option<String>,
240    #[doc(hidden)]
241    pub __source_breaking: fidl::marker::SourceBreaking,
242}
243
244impl fidl::Persistable for DomainInfo {}
245
246pub mod domain_controller_ordinals {
247    pub const LIST_DOMAINS: u64 = 0x3dfa728011b3ee0c;
248    pub const GET_MAX_FREQUENCY: u64 = 0x6c8cc16cbd270f62;
249    pub const SET_MAX_FREQUENCY: u64 = 0x427d7a45e538939e;
250    pub const CLEAR_MAX_FREQUENCY: u64 = 0x738116a31e202ba5;
251}
252
253mod internal {
254    use super::*;
255    unsafe impl fidl::encoding::TypeMarker for ClearMaxFrequencyError {
256        type Owned = Self;
257
258        #[inline(always)]
259        fn inline_align(_context: fidl::encoding::Context) -> usize {
260            std::mem::align_of::<u32>()
261        }
262
263        #[inline(always)]
264        fn inline_size(_context: fidl::encoding::Context) -> usize {
265            std::mem::size_of::<u32>()
266        }
267
268        #[inline(always)]
269        fn encode_is_copy() -> bool {
270            false
271        }
272
273        #[inline(always)]
274        fn decode_is_copy() -> bool {
275            false
276        }
277    }
278
279    impl fidl::encoding::ValueTypeMarker for ClearMaxFrequencyError {
280        type Borrowed<'a> = Self;
281        #[inline(always)]
282        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
283            *value
284        }
285    }
286
287    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
288        for ClearMaxFrequencyError
289    {
290        #[inline]
291        unsafe fn encode(
292            self,
293            encoder: &mut fidl::encoding::Encoder<'_, D>,
294            offset: usize,
295            _depth: fidl::encoding::Depth,
296        ) -> fidl::Result<()> {
297            encoder.debug_check_bounds::<Self>(offset);
298            encoder.write_num(self.into_primitive(), offset);
299            Ok(())
300        }
301    }
302
303    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
304        for ClearMaxFrequencyError
305    {
306        #[inline(always)]
307        fn new_empty() -> Self {
308            Self::unknown()
309        }
310
311        #[inline]
312        unsafe fn decode(
313            &mut self,
314            decoder: &mut fidl::encoding::Decoder<'_, D>,
315            offset: usize,
316            _depth: fidl::encoding::Depth,
317        ) -> fidl::Result<()> {
318            decoder.debug_check_bounds::<Self>(offset);
319            let prim = decoder.read_num::<u32>(offset);
320
321            *self = Self::from_primitive_allow_unknown(prim);
322            Ok(())
323        }
324    }
325    unsafe impl fidl::encoding::TypeMarker for GetMaxFrequencyError {
326        type Owned = Self;
327
328        #[inline(always)]
329        fn inline_align(_context: fidl::encoding::Context) -> usize {
330            std::mem::align_of::<u32>()
331        }
332
333        #[inline(always)]
334        fn inline_size(_context: fidl::encoding::Context) -> usize {
335            std::mem::size_of::<u32>()
336        }
337
338        #[inline(always)]
339        fn encode_is_copy() -> bool {
340            false
341        }
342
343        #[inline(always)]
344        fn decode_is_copy() -> bool {
345            false
346        }
347    }
348
349    impl fidl::encoding::ValueTypeMarker for GetMaxFrequencyError {
350        type Borrowed<'a> = Self;
351        #[inline(always)]
352        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
353            *value
354        }
355    }
356
357    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
358        for GetMaxFrequencyError
359    {
360        #[inline]
361        unsafe fn encode(
362            self,
363            encoder: &mut fidl::encoding::Encoder<'_, D>,
364            offset: usize,
365            _depth: fidl::encoding::Depth,
366        ) -> fidl::Result<()> {
367            encoder.debug_check_bounds::<Self>(offset);
368            encoder.write_num(self.into_primitive(), offset);
369            Ok(())
370        }
371    }
372
373    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetMaxFrequencyError {
374        #[inline(always)]
375        fn new_empty() -> Self {
376            Self::unknown()
377        }
378
379        #[inline]
380        unsafe fn decode(
381            &mut self,
382            decoder: &mut fidl::encoding::Decoder<'_, D>,
383            offset: usize,
384            _depth: fidl::encoding::Depth,
385        ) -> fidl::Result<()> {
386            decoder.debug_check_bounds::<Self>(offset);
387            let prim = decoder.read_num::<u32>(offset);
388
389            *self = Self::from_primitive_allow_unknown(prim);
390            Ok(())
391        }
392    }
393    unsafe impl fidl::encoding::TypeMarker for SetMaxFrequencyError {
394        type Owned = Self;
395
396        #[inline(always)]
397        fn inline_align(_context: fidl::encoding::Context) -> usize {
398            std::mem::align_of::<u32>()
399        }
400
401        #[inline(always)]
402        fn inline_size(_context: fidl::encoding::Context) -> usize {
403            std::mem::size_of::<u32>()
404        }
405
406        #[inline(always)]
407        fn encode_is_copy() -> bool {
408            false
409        }
410
411        #[inline(always)]
412        fn decode_is_copy() -> bool {
413            false
414        }
415    }
416
417    impl fidl::encoding::ValueTypeMarker for SetMaxFrequencyError {
418        type Borrowed<'a> = Self;
419        #[inline(always)]
420        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
421            *value
422        }
423    }
424
425    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
426        for SetMaxFrequencyError
427    {
428        #[inline]
429        unsafe fn encode(
430            self,
431            encoder: &mut fidl::encoding::Encoder<'_, D>,
432            offset: usize,
433            _depth: fidl::encoding::Depth,
434        ) -> fidl::Result<()> {
435            encoder.debug_check_bounds::<Self>(offset);
436            encoder.write_num(self.into_primitive(), offset);
437            Ok(())
438        }
439    }
440
441    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetMaxFrequencyError {
442        #[inline(always)]
443        fn new_empty() -> Self {
444            Self::unknown()
445        }
446
447        #[inline]
448        unsafe fn decode(
449            &mut self,
450            decoder: &mut fidl::encoding::Decoder<'_, D>,
451            offset: usize,
452            _depth: fidl::encoding::Depth,
453        ) -> fidl::Result<()> {
454            decoder.debug_check_bounds::<Self>(offset);
455            let prim = decoder.read_num::<u32>(offset);
456
457            *self = Self::from_primitive_allow_unknown(prim);
458            Ok(())
459        }
460    }
461
462    impl fidl::encoding::ValueTypeMarker for DomainControllerClearMaxFrequencyRequest {
463        type Borrowed<'a> = &'a Self;
464        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
465            value
466        }
467    }
468
469    unsafe impl fidl::encoding::TypeMarker for DomainControllerClearMaxFrequencyRequest {
470        type Owned = Self;
471
472        #[inline(always)]
473        fn inline_align(_context: fidl::encoding::Context) -> usize {
474            8
475        }
476
477        #[inline(always)]
478        fn inline_size(_context: fidl::encoding::Context) -> usize {
479            8
480        }
481        #[inline(always)]
482        fn encode_is_copy() -> bool {
483            true
484        }
485
486        #[inline(always)]
487        fn decode_is_copy() -> bool {
488            true
489        }
490    }
491
492    unsafe impl<D: fidl::encoding::ResourceDialect>
493        fidl::encoding::Encode<DomainControllerClearMaxFrequencyRequest, D>
494        for &DomainControllerClearMaxFrequencyRequest
495    {
496        #[inline]
497        unsafe fn encode(
498            self,
499            encoder: &mut fidl::encoding::Encoder<'_, D>,
500            offset: usize,
501            _depth: fidl::encoding::Depth,
502        ) -> fidl::Result<()> {
503            encoder.debug_check_bounds::<DomainControllerClearMaxFrequencyRequest>(offset);
504            unsafe {
505                // Copy the object into the buffer.
506                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
507                (buf_ptr as *mut DomainControllerClearMaxFrequencyRequest).write_unaligned(
508                    (self as *const DomainControllerClearMaxFrequencyRequest).read(),
509                );
510                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
511                // done second because the memcpy will write garbage to these bytes.
512            }
513            Ok(())
514        }
515    }
516    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
517        fidl::encoding::Encode<DomainControllerClearMaxFrequencyRequest, D> for (T0,)
518    {
519        #[inline]
520        unsafe fn encode(
521            self,
522            encoder: &mut fidl::encoding::Encoder<'_, D>,
523            offset: usize,
524            depth: fidl::encoding::Depth,
525        ) -> fidl::Result<()> {
526            encoder.debug_check_bounds::<DomainControllerClearMaxFrequencyRequest>(offset);
527            // Zero out padding regions. There's no need to apply masks
528            // because the unmasked parts will be overwritten by fields.
529            // Write the fields.
530            self.0.encode(encoder, offset + 0, depth)?;
531            Ok(())
532        }
533    }
534
535    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
536        for DomainControllerClearMaxFrequencyRequest
537    {
538        #[inline(always)]
539        fn new_empty() -> Self {
540            Self { domain_id: fidl::new_empty!(u64, D) }
541        }
542
543        #[inline]
544        unsafe fn decode(
545            &mut self,
546            decoder: &mut fidl::encoding::Decoder<'_, D>,
547            offset: usize,
548            _depth: fidl::encoding::Depth,
549        ) -> fidl::Result<()> {
550            decoder.debug_check_bounds::<Self>(offset);
551            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
552            // Verify that padding bytes are zero.
553            // Copy from the buffer into the object.
554            unsafe {
555                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
556            }
557            Ok(())
558        }
559    }
560
561    impl fidl::encoding::ValueTypeMarker for DomainControllerGetMaxFrequencyRequest {
562        type Borrowed<'a> = &'a Self;
563        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
564            value
565        }
566    }
567
568    unsafe impl fidl::encoding::TypeMarker for DomainControllerGetMaxFrequencyRequest {
569        type Owned = Self;
570
571        #[inline(always)]
572        fn inline_align(_context: fidl::encoding::Context) -> usize {
573            8
574        }
575
576        #[inline(always)]
577        fn inline_size(_context: fidl::encoding::Context) -> usize {
578            8
579        }
580        #[inline(always)]
581        fn encode_is_copy() -> bool {
582            true
583        }
584
585        #[inline(always)]
586        fn decode_is_copy() -> bool {
587            true
588        }
589    }
590
591    unsafe impl<D: fidl::encoding::ResourceDialect>
592        fidl::encoding::Encode<DomainControllerGetMaxFrequencyRequest, D>
593        for &DomainControllerGetMaxFrequencyRequest
594    {
595        #[inline]
596        unsafe fn encode(
597            self,
598            encoder: &mut fidl::encoding::Encoder<'_, D>,
599            offset: usize,
600            _depth: fidl::encoding::Depth,
601        ) -> fidl::Result<()> {
602            encoder.debug_check_bounds::<DomainControllerGetMaxFrequencyRequest>(offset);
603            unsafe {
604                // Copy the object into the buffer.
605                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
606                (buf_ptr as *mut DomainControllerGetMaxFrequencyRequest).write_unaligned(
607                    (self as *const DomainControllerGetMaxFrequencyRequest).read(),
608                );
609                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
610                // done second because the memcpy will write garbage to these bytes.
611            }
612            Ok(())
613        }
614    }
615    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
616        fidl::encoding::Encode<DomainControllerGetMaxFrequencyRequest, D> for (T0,)
617    {
618        #[inline]
619        unsafe fn encode(
620            self,
621            encoder: &mut fidl::encoding::Encoder<'_, D>,
622            offset: usize,
623            depth: fidl::encoding::Depth,
624        ) -> fidl::Result<()> {
625            encoder.debug_check_bounds::<DomainControllerGetMaxFrequencyRequest>(offset);
626            // Zero out padding regions. There's no need to apply masks
627            // because the unmasked parts will be overwritten by fields.
628            // Write the fields.
629            self.0.encode(encoder, offset + 0, depth)?;
630            Ok(())
631        }
632    }
633
634    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
635        for DomainControllerGetMaxFrequencyRequest
636    {
637        #[inline(always)]
638        fn new_empty() -> Self {
639            Self { domain_id: fidl::new_empty!(u64, D) }
640        }
641
642        #[inline]
643        unsafe fn decode(
644            &mut self,
645            decoder: &mut fidl::encoding::Decoder<'_, D>,
646            offset: usize,
647            _depth: fidl::encoding::Depth,
648        ) -> fidl::Result<()> {
649            decoder.debug_check_bounds::<Self>(offset);
650            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
651            // Verify that padding bytes are zero.
652            // Copy from the buffer into the object.
653            unsafe {
654                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
655            }
656            Ok(())
657        }
658    }
659
660    impl fidl::encoding::ValueTypeMarker for DomainControllerSetMaxFrequencyRequest {
661        type Borrowed<'a> = &'a Self;
662        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
663            value
664        }
665    }
666
667    unsafe impl fidl::encoding::TypeMarker for DomainControllerSetMaxFrequencyRequest {
668        type Owned = Self;
669
670        #[inline(always)]
671        fn inline_align(_context: fidl::encoding::Context) -> usize {
672            8
673        }
674
675        #[inline(always)]
676        fn inline_size(_context: fidl::encoding::Context) -> usize {
677            16
678        }
679        #[inline(always)]
680        fn encode_is_copy() -> bool {
681            true
682        }
683
684        #[inline(always)]
685        fn decode_is_copy() -> bool {
686            true
687        }
688    }
689
690    unsafe impl<D: fidl::encoding::ResourceDialect>
691        fidl::encoding::Encode<DomainControllerSetMaxFrequencyRequest, D>
692        for &DomainControllerSetMaxFrequencyRequest
693    {
694        #[inline]
695        unsafe fn encode(
696            self,
697            encoder: &mut fidl::encoding::Encoder<'_, D>,
698            offset: usize,
699            _depth: fidl::encoding::Depth,
700        ) -> fidl::Result<()> {
701            encoder.debug_check_bounds::<DomainControllerSetMaxFrequencyRequest>(offset);
702            unsafe {
703                // Copy the object into the buffer.
704                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
705                (buf_ptr as *mut DomainControllerSetMaxFrequencyRequest).write_unaligned(
706                    (self as *const DomainControllerSetMaxFrequencyRequest).read(),
707                );
708                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
709                // done second because the memcpy will write garbage to these bytes.
710            }
711            Ok(())
712        }
713    }
714    unsafe impl<
715        D: fidl::encoding::ResourceDialect,
716        T0: fidl::encoding::Encode<u64, D>,
717        T1: fidl::encoding::Encode<u64, D>,
718    > fidl::encoding::Encode<DomainControllerSetMaxFrequencyRequest, D> for (T0, T1)
719    {
720        #[inline]
721        unsafe fn encode(
722            self,
723            encoder: &mut fidl::encoding::Encoder<'_, D>,
724            offset: usize,
725            depth: fidl::encoding::Depth,
726        ) -> fidl::Result<()> {
727            encoder.debug_check_bounds::<DomainControllerSetMaxFrequencyRequest>(offset);
728            // Zero out padding regions. There's no need to apply masks
729            // because the unmasked parts will be overwritten by fields.
730            // Write the fields.
731            self.0.encode(encoder, offset + 0, depth)?;
732            self.1.encode(encoder, offset + 8, depth)?;
733            Ok(())
734        }
735    }
736
737    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
738        for DomainControllerSetMaxFrequencyRequest
739    {
740        #[inline(always)]
741        fn new_empty() -> Self {
742            Self { domain_id: fidl::new_empty!(u64, D), frequency_index: fidl::new_empty!(u64, D) }
743        }
744
745        #[inline]
746        unsafe fn decode(
747            &mut self,
748            decoder: &mut fidl::encoding::Decoder<'_, D>,
749            offset: usize,
750            _depth: fidl::encoding::Depth,
751        ) -> fidl::Result<()> {
752            decoder.debug_check_bounds::<Self>(offset);
753            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
754            // Verify that padding bytes are zero.
755            // Copy from the buffer into the object.
756            unsafe {
757                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
758            }
759            Ok(())
760        }
761    }
762
763    impl fidl::encoding::ValueTypeMarker for DomainControllerGetMaxFrequencyResponse {
764        type Borrowed<'a> = &'a Self;
765        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
766            value
767        }
768    }
769
770    unsafe impl fidl::encoding::TypeMarker for DomainControllerGetMaxFrequencyResponse {
771        type Owned = Self;
772
773        #[inline(always)]
774        fn inline_align(_context: fidl::encoding::Context) -> usize {
775            8
776        }
777
778        #[inline(always)]
779        fn inline_size(_context: fidl::encoding::Context) -> usize {
780            8
781        }
782        #[inline(always)]
783        fn encode_is_copy() -> bool {
784            true
785        }
786
787        #[inline(always)]
788        fn decode_is_copy() -> bool {
789            true
790        }
791    }
792
793    unsafe impl<D: fidl::encoding::ResourceDialect>
794        fidl::encoding::Encode<DomainControllerGetMaxFrequencyResponse, D>
795        for &DomainControllerGetMaxFrequencyResponse
796    {
797        #[inline]
798        unsafe fn encode(
799            self,
800            encoder: &mut fidl::encoding::Encoder<'_, D>,
801            offset: usize,
802            _depth: fidl::encoding::Depth,
803        ) -> fidl::Result<()> {
804            encoder.debug_check_bounds::<DomainControllerGetMaxFrequencyResponse>(offset);
805            unsafe {
806                // Copy the object into the buffer.
807                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
808                (buf_ptr as *mut DomainControllerGetMaxFrequencyResponse).write_unaligned(
809                    (self as *const DomainControllerGetMaxFrequencyResponse).read(),
810                );
811                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
812                // done second because the memcpy will write garbage to these bytes.
813            }
814            Ok(())
815        }
816    }
817    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
818        fidl::encoding::Encode<DomainControllerGetMaxFrequencyResponse, D> for (T0,)
819    {
820        #[inline]
821        unsafe fn encode(
822            self,
823            encoder: &mut fidl::encoding::Encoder<'_, D>,
824            offset: usize,
825            depth: fidl::encoding::Depth,
826        ) -> fidl::Result<()> {
827            encoder.debug_check_bounds::<DomainControllerGetMaxFrequencyResponse>(offset);
828            // Zero out padding regions. There's no need to apply masks
829            // because the unmasked parts will be overwritten by fields.
830            // Write the fields.
831            self.0.encode(encoder, offset + 0, depth)?;
832            Ok(())
833        }
834    }
835
836    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
837        for DomainControllerGetMaxFrequencyResponse
838    {
839        #[inline(always)]
840        fn new_empty() -> Self {
841            Self { max_frequency_index: fidl::new_empty!(u64, D) }
842        }
843
844        #[inline]
845        unsafe fn decode(
846            &mut self,
847            decoder: &mut fidl::encoding::Decoder<'_, D>,
848            offset: usize,
849            _depth: fidl::encoding::Depth,
850        ) -> fidl::Result<()> {
851            decoder.debug_check_bounds::<Self>(offset);
852            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
853            // Verify that padding bytes are zero.
854            // Copy from the buffer into the object.
855            unsafe {
856                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
857            }
858            Ok(())
859        }
860    }
861
862    impl fidl::encoding::ValueTypeMarker for DomainControllerListDomainsResponse {
863        type Borrowed<'a> = &'a Self;
864        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
865            value
866        }
867    }
868
869    unsafe impl fidl::encoding::TypeMarker for DomainControllerListDomainsResponse {
870        type Owned = Self;
871
872        #[inline(always)]
873        fn inline_align(_context: fidl::encoding::Context) -> usize {
874            8
875        }
876
877        #[inline(always)]
878        fn inline_size(_context: fidl::encoding::Context) -> usize {
879            16
880        }
881    }
882
883    unsafe impl<D: fidl::encoding::ResourceDialect>
884        fidl::encoding::Encode<DomainControllerListDomainsResponse, D>
885        for &DomainControllerListDomainsResponse
886    {
887        #[inline]
888        unsafe fn encode(
889            self,
890            encoder: &mut fidl::encoding::Encoder<'_, D>,
891            offset: usize,
892            _depth: fidl::encoding::Depth,
893        ) -> fidl::Result<()> {
894            encoder.debug_check_bounds::<DomainControllerListDomainsResponse>(offset);
895            // Delegate to tuple encoding.
896            fidl::encoding::Encode::<DomainControllerListDomainsResponse, D>::encode(
897                (
898                    <fidl::encoding::UnboundedVector<DomainInfo> as fidl::encoding::ValueTypeMarker>::borrow(&self.domains),
899                ),
900                encoder, offset, _depth
901            )
902        }
903    }
904    unsafe impl<
905        D: fidl::encoding::ResourceDialect,
906        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<DomainInfo>, D>,
907    > fidl::encoding::Encode<DomainControllerListDomainsResponse, D> for (T0,)
908    {
909        #[inline]
910        unsafe fn encode(
911            self,
912            encoder: &mut fidl::encoding::Encoder<'_, D>,
913            offset: usize,
914            depth: fidl::encoding::Depth,
915        ) -> fidl::Result<()> {
916            encoder.debug_check_bounds::<DomainControllerListDomainsResponse>(offset);
917            // Zero out padding regions. There's no need to apply masks
918            // because the unmasked parts will be overwritten by fields.
919            // Write the fields.
920            self.0.encode(encoder, offset + 0, depth)?;
921            Ok(())
922        }
923    }
924
925    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
926        for DomainControllerListDomainsResponse
927    {
928        #[inline(always)]
929        fn new_empty() -> Self {
930            Self { domains: fidl::new_empty!(fidl::encoding::UnboundedVector<DomainInfo>, D) }
931        }
932
933        #[inline]
934        unsafe fn decode(
935            &mut self,
936            decoder: &mut fidl::encoding::Decoder<'_, D>,
937            offset: usize,
938            _depth: fidl::encoding::Depth,
939        ) -> fidl::Result<()> {
940            decoder.debug_check_bounds::<Self>(offset);
941            // Verify that padding bytes are zero.
942            fidl::decode!(
943                fidl::encoding::UnboundedVector<DomainInfo>,
944                D,
945                &mut self.domains,
946                decoder,
947                offset + 0,
948                _depth
949            )?;
950            Ok(())
951        }
952    }
953
954    impl DomainInfo {
955        #[inline(always)]
956        fn max_ordinal_present(&self) -> u64 {
957            if let Some(_) = self.name {
958                return 4;
959            }
960            if let Some(_) = self.available_frequencies_hz {
961                return 3;
962            }
963            if let Some(_) = self.core_ids {
964                return 2;
965            }
966            if let Some(_) = self.id {
967                return 1;
968            }
969            0
970        }
971    }
972
973    impl fidl::encoding::ValueTypeMarker for DomainInfo {
974        type Borrowed<'a> = &'a Self;
975        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
976            value
977        }
978    }
979
980    unsafe impl fidl::encoding::TypeMarker for DomainInfo {
981        type Owned = Self;
982
983        #[inline(always)]
984        fn inline_align(_context: fidl::encoding::Context) -> usize {
985            8
986        }
987
988        #[inline(always)]
989        fn inline_size(_context: fidl::encoding::Context) -> usize {
990            16
991        }
992    }
993
994    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DomainInfo, D>
995        for &DomainInfo
996    {
997        unsafe fn encode(
998            self,
999            encoder: &mut fidl::encoding::Encoder<'_, D>,
1000            offset: usize,
1001            mut depth: fidl::encoding::Depth,
1002        ) -> fidl::Result<()> {
1003            encoder.debug_check_bounds::<DomainInfo>(offset);
1004            // Vector header
1005            let max_ordinal: u64 = self.max_ordinal_present();
1006            encoder.write_num(max_ordinal, offset);
1007            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1008            // Calling encoder.out_of_line_offset(0) is not allowed.
1009            if max_ordinal == 0 {
1010                return Ok(());
1011            }
1012            depth.increment()?;
1013            let envelope_size = 8;
1014            let bytes_len = max_ordinal as usize * envelope_size;
1015            #[allow(unused_variables)]
1016            let offset = encoder.out_of_line_offset(bytes_len);
1017            let mut _prev_end_offset: usize = 0;
1018            if 1 > max_ordinal {
1019                return Ok(());
1020            }
1021
1022            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1023            // are envelope_size bytes.
1024            let cur_offset: usize = (1 - 1) * envelope_size;
1025
1026            // Zero reserved fields.
1027            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1028
1029            // Safety:
1030            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1031            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1032            //   envelope_size bytes, there is always sufficient room.
1033            fidl::encoding::encode_in_envelope_optional::<u64, D>(
1034                self.id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
1035                encoder,
1036                offset + cur_offset,
1037                depth,
1038            )?;
1039
1040            _prev_end_offset = cur_offset + envelope_size;
1041            if 2 > max_ordinal {
1042                return Ok(());
1043            }
1044
1045            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1046            // are envelope_size bytes.
1047            let cur_offset: usize = (2 - 1) * envelope_size;
1048
1049            // Zero reserved fields.
1050            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1051
1052            // Safety:
1053            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1054            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1055            //   envelope_size bytes, there is always sufficient room.
1056            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u64>, D>(
1057            self.core_ids.as_ref().map(<fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow),
1058            encoder, offset + cur_offset, depth
1059        )?;
1060
1061            _prev_end_offset = cur_offset + envelope_size;
1062            if 3 > max_ordinal {
1063                return Ok(());
1064            }
1065
1066            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1067            // are envelope_size bytes.
1068            let cur_offset: usize = (3 - 1) * envelope_size;
1069
1070            // Zero reserved fields.
1071            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1072
1073            // Safety:
1074            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1075            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1076            //   envelope_size bytes, there is always sufficient room.
1077            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<u64>, D>(
1078            self.available_frequencies_hz.as_ref().map(<fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow),
1079            encoder, offset + cur_offset, depth
1080        )?;
1081
1082            _prev_end_offset = cur_offset + envelope_size;
1083            if 4 > max_ordinal {
1084                return Ok(());
1085            }
1086
1087            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1088            // are envelope_size bytes.
1089            let cur_offset: usize = (4 - 1) * envelope_size;
1090
1091            // Zero reserved fields.
1092            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1093
1094            // Safety:
1095            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1096            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1097            //   envelope_size bytes, there is always sufficient room.
1098            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
1099                self.name.as_ref().map(
1100                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
1101                ),
1102                encoder,
1103                offset + cur_offset,
1104                depth,
1105            )?;
1106
1107            _prev_end_offset = cur_offset + envelope_size;
1108
1109            Ok(())
1110        }
1111    }
1112
1113    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DomainInfo {
1114        #[inline(always)]
1115        fn new_empty() -> Self {
1116            Self::default()
1117        }
1118
1119        unsafe fn decode(
1120            &mut self,
1121            decoder: &mut fidl::encoding::Decoder<'_, D>,
1122            offset: usize,
1123            mut depth: fidl::encoding::Depth,
1124        ) -> fidl::Result<()> {
1125            decoder.debug_check_bounds::<Self>(offset);
1126            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1127                None => return Err(fidl::Error::NotNullable),
1128                Some(len) => len,
1129            };
1130            // Calling decoder.out_of_line_offset(0) is not allowed.
1131            if len == 0 {
1132                return Ok(());
1133            };
1134            depth.increment()?;
1135            let envelope_size = 8;
1136            let bytes_len = len * envelope_size;
1137            let offset = decoder.out_of_line_offset(bytes_len)?;
1138            // Decode the envelope for each type.
1139            let mut _next_ordinal_to_read = 0;
1140            let mut next_offset = offset;
1141            let end_offset = offset + bytes_len;
1142            _next_ordinal_to_read += 1;
1143            if next_offset >= end_offset {
1144                return Ok(());
1145            }
1146
1147            // Decode unknown envelopes for gaps in ordinals.
1148            while _next_ordinal_to_read < 1 {
1149                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1150                _next_ordinal_to_read += 1;
1151                next_offset += envelope_size;
1152            }
1153
1154            let next_out_of_line = decoder.next_out_of_line();
1155            let handles_before = decoder.remaining_handles();
1156            if let Some((inlined, num_bytes, num_handles)) =
1157                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1158            {
1159                let member_inline_size =
1160                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1161                if inlined != (member_inline_size <= 4) {
1162                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1163                }
1164                let inner_offset;
1165                let mut inner_depth = depth.clone();
1166                if inlined {
1167                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1168                    inner_offset = next_offset;
1169                } else {
1170                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1171                    inner_depth.increment()?;
1172                }
1173                let val_ref = self.id.get_or_insert_with(|| fidl::new_empty!(u64, D));
1174                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
1175                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1176                {
1177                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1178                }
1179                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1180                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1181                }
1182            }
1183
1184            next_offset += envelope_size;
1185            _next_ordinal_to_read += 1;
1186            if next_offset >= end_offset {
1187                return Ok(());
1188            }
1189
1190            // Decode unknown envelopes for gaps in ordinals.
1191            while _next_ordinal_to_read < 2 {
1192                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1193                _next_ordinal_to_read += 1;
1194                next_offset += envelope_size;
1195            }
1196
1197            let next_out_of_line = decoder.next_out_of_line();
1198            let handles_before = decoder.remaining_handles();
1199            if let Some((inlined, num_bytes, num_handles)) =
1200                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1201            {
1202                let member_inline_size = <fidl::encoding::UnboundedVector<u64> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1203                if inlined != (member_inline_size <= 4) {
1204                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1205                }
1206                let inner_offset;
1207                let mut inner_depth = depth.clone();
1208                if inlined {
1209                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1210                    inner_offset = next_offset;
1211                } else {
1212                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1213                    inner_depth.increment()?;
1214                }
1215                let val_ref = self.core_ids.get_or_insert_with(|| {
1216                    fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D)
1217                });
1218                fidl::decode!(
1219                    fidl::encoding::UnboundedVector<u64>,
1220                    D,
1221                    val_ref,
1222                    decoder,
1223                    inner_offset,
1224                    inner_depth
1225                )?;
1226                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1227                {
1228                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1229                }
1230                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1231                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1232                }
1233            }
1234
1235            next_offset += envelope_size;
1236            _next_ordinal_to_read += 1;
1237            if next_offset >= end_offset {
1238                return Ok(());
1239            }
1240
1241            // Decode unknown envelopes for gaps in ordinals.
1242            while _next_ordinal_to_read < 3 {
1243                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1244                _next_ordinal_to_read += 1;
1245                next_offset += envelope_size;
1246            }
1247
1248            let next_out_of_line = decoder.next_out_of_line();
1249            let handles_before = decoder.remaining_handles();
1250            if let Some((inlined, num_bytes, num_handles)) =
1251                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1252            {
1253                let member_inline_size = <fidl::encoding::UnboundedVector<u64> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1254                if inlined != (member_inline_size <= 4) {
1255                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1256                }
1257                let inner_offset;
1258                let mut inner_depth = depth.clone();
1259                if inlined {
1260                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1261                    inner_offset = next_offset;
1262                } else {
1263                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1264                    inner_depth.increment()?;
1265                }
1266                let val_ref = self.available_frequencies_hz.get_or_insert_with(|| {
1267                    fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D)
1268                });
1269                fidl::decode!(
1270                    fidl::encoding::UnboundedVector<u64>,
1271                    D,
1272                    val_ref,
1273                    decoder,
1274                    inner_offset,
1275                    inner_depth
1276                )?;
1277                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1278                {
1279                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1280                }
1281                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1282                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1283                }
1284            }
1285
1286            next_offset += envelope_size;
1287            _next_ordinal_to_read += 1;
1288            if next_offset >= end_offset {
1289                return Ok(());
1290            }
1291
1292            // Decode unknown envelopes for gaps in ordinals.
1293            while _next_ordinal_to_read < 4 {
1294                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1295                _next_ordinal_to_read += 1;
1296                next_offset += envelope_size;
1297            }
1298
1299            let next_out_of_line = decoder.next_out_of_line();
1300            let handles_before = decoder.remaining_handles();
1301            if let Some((inlined, num_bytes, num_handles)) =
1302                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1303            {
1304                let member_inline_size =
1305                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
1306                        decoder.context,
1307                    );
1308                if inlined != (member_inline_size <= 4) {
1309                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1310                }
1311                let inner_offset;
1312                let mut inner_depth = depth.clone();
1313                if inlined {
1314                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1315                    inner_offset = next_offset;
1316                } else {
1317                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1318                    inner_depth.increment()?;
1319                }
1320                let val_ref = self
1321                    .name
1322                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
1323                fidl::decode!(
1324                    fidl::encoding::UnboundedString,
1325                    D,
1326                    val_ref,
1327                    decoder,
1328                    inner_offset,
1329                    inner_depth
1330                )?;
1331                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1332                {
1333                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1334                }
1335                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1336                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1337                }
1338            }
1339
1340            next_offset += envelope_size;
1341
1342            // Decode the remaining unknown envelopes.
1343            while next_offset < end_offset {
1344                _next_ordinal_to_read += 1;
1345                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1346                next_offset += envelope_size;
1347            }
1348
1349            Ok(())
1350        }
1351    }
1352}