fidl_fuchsia_archivist_test_common/
fidl_fuchsia_archivist_test_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 type LogMessage = String;
12
13#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
14pub enum ExitStatus {
15    /// Just wait for a component to stop, but don't care about the exit status.
16    Any,
17    /// Wait for a component to crash.
18    Crash,
19    /// Wait for a component to exit cleanly.
20    Clean,
21    #[doc(hidden)]
22    __SourceBreaking { unknown_ordinal: u32 },
23}
24
25/// Pattern that matches an unknown `ExitStatus` member.
26#[macro_export]
27macro_rules! ExitStatusUnknown {
28    () => {
29        _
30    };
31}
32
33impl ExitStatus {
34    #[inline]
35    pub fn from_primitive(prim: u32) -> Option<Self> {
36        match prim {
37            0 => Some(Self::Any),
38            1 => Some(Self::Crash),
39            2 => Some(Self::Clean),
40            _ => None,
41        }
42    }
43
44    #[inline]
45    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
46        match prim {
47            0 => Self::Any,
48            1 => Self::Crash,
49            2 => Self::Clean,
50            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
51        }
52    }
53
54    #[inline]
55    pub fn unknown() -> Self {
56        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
57    }
58
59    #[inline]
60    pub const fn into_primitive(self) -> u32 {
61        match self {
62            Self::Any => 0,
63            Self::Crash => 1,
64            Self::Clean => 2,
65            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
66        }
67    }
68
69    #[inline]
70    pub fn is_unknown(&self) -> bool {
71        match self {
72            Self::__SourceBreaking { unknown_ordinal: _ } => true,
73            _ => false,
74        }
75    }
76}
77
78#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
79pub struct InspectWriterRecordIntRequest {
80    pub key: String,
81    /// Inspect properties don't distinguish between int8, int16, etc...
82    /// so we accept the maximum width for convenience.
83    pub value: i64,
84}
85
86impl fidl::Persistable for InspectWriterRecordIntRequest {}
87
88#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89pub struct InspectWriterRecordStringRequest {
90    pub key: String,
91    pub value: String,
92}
93
94impl fidl::Persistable for InspectWriterRecordStringRequest {}
95
96#[derive(Clone, Debug, PartialEq)]
97pub struct LazyInspectPuppetCommitRequest {
98    pub options: CommitOptions,
99}
100
101impl fidl::Persistable for LazyInspectPuppetCommitRequest {}
102
103#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
104pub struct LogPuppetEprintlnRequest {
105    pub message: String,
106}
107
108impl fidl::Persistable for LogPuppetEprintlnRequest {}
109
110#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
111pub struct LogPuppetPrintlnRequest {
112    pub message: String,
113}
114
115impl fidl::Persistable for LogPuppetPrintlnRequest {}
116
117#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
118pub struct PuppetCrashRequest {
119    pub message: String,
120}
121
122impl fidl::Persistable for PuppetCrashRequest {}
123
124#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
125pub struct PuppetRecordLazyValuesRequest {
126    pub key: String,
127}
128
129impl fidl::Persistable for PuppetRecordLazyValuesRequest {}
130
131#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
132pub struct StopWatcherWatchComponentRequest {
133    pub moniker: String,
134    pub expected_exit: ExitStatus,
135}
136
137impl fidl::Persistable for StopWatcherWatchComponentRequest {}
138
139/// Subset of Archivist configuration relevant to some test cases.
140#[derive(Clone, Debug, Default, PartialEq)]
141pub struct ArchivistConfig {
142    /// Whether Archivist will be reading the Klog and forwarding it to Syslog
143    /// or not.
144    pub enable_klog: Option<bool>,
145    /// The size of the log buffer that Archivist stores.
146    pub logs_max_cached_original_bytes: Option<u64>,
147    /// The path to the Pipelines configuration in Archivist namespace.
148    pub pipelines_path: Option<String>,
149    /// Initial interests
150    pub initial_interests: Option<Vec<ComponentInitialInterest>>,
151    #[doc(hidden)]
152    pub __source_breaking: fidl::marker::SourceBreaking,
153}
154
155impl fidl::Persistable for ArchivistConfig {}
156
157#[derive(Clone, Debug, Default, PartialEq)]
158pub struct CommitOptions {
159    /// Whether to hang when reporting values.
160    pub hang: Option<bool>,
161    #[doc(hidden)]
162    pub __source_breaking: fidl::marker::SourceBreaking,
163}
164
165impl fidl::Persistable for CommitOptions {}
166
167#[derive(Clone, Debug, Default, PartialEq)]
168pub struct ComponentInitialInterest {
169    /// The moniker to which this interest applies.
170    pub moniker: Option<String>,
171    pub log_severity: Option<fidl_fuchsia_diagnostics_types::Severity>,
172    #[doc(hidden)]
173    pub __source_breaking: fidl::marker::SourceBreaking,
174}
175
176impl fidl::Persistable for ComponentInitialInterest {}
177
178#[derive(Clone, Debug, Default, PartialEq)]
179pub struct InspectPuppetCreateInspectorRequest {
180    pub name: Option<String>,
181    #[doc(hidden)]
182    pub __source_breaking: fidl::marker::SourceBreaking,
183}
184
185impl fidl::Persistable for InspectPuppetCreateInspectorRequest {}
186
187#[derive(Clone, Debug, Default, PartialEq)]
188pub struct InspectWriterEscrowAndExitRequest {
189    pub name: Option<String>,
190    #[doc(hidden)]
191    pub __source_breaking: fidl::marker::SourceBreaking,
192}
193
194impl fidl::Persistable for InspectWriterEscrowAndExitRequest {}
195
196#[derive(Clone, Debug, Default, PartialEq)]
197pub struct LogPuppetLogRequest {
198    /// The message carried by this log.
199    /// Required.
200    pub message: Option<String>,
201    /// The severity of this log.
202    /// Required.
203    pub severity: Option<fidl_fuchsia_diagnostics_types::Severity>,
204    /// Hardcode the time at which log is emitted.
205    /// Optional, defaults to current time.
206    pub time: Option<i64>,
207    #[doc(hidden)]
208    pub __source_breaking: fidl::marker::SourceBreaking,
209}
210
211impl fidl::Persistable for LogPuppetLogRequest {}
212
213#[derive(Clone, Debug, Default, PartialEq)]
214pub struct LogPuppetWaitForInterestChangeResponse {
215    /// The new log interest observed by this component.
216    pub severity: Option<fidl_fuchsia_diagnostics_types::Severity>,
217    #[doc(hidden)]
218    pub __source_breaking: fidl::marker::SourceBreaking,
219}
220
221impl fidl::Persistable for LogPuppetWaitForInterestChangeResponse {}
222
223#[derive(Clone, Debug, Default, PartialEq)]
224pub struct PuppetDecl {
225    /// The child name this puppet should have in the test realm.
226    pub name: Option<String>,
227    #[doc(hidden)]
228    pub __source_breaking: fidl::marker::SourceBreaking,
229}
230
231impl fidl::Persistable for PuppetDecl {}
232
233/// RealmOptions tells the RealmFactory protocol how to create the test realm.
234#[derive(Clone, Debug, Default, PartialEq)]
235pub struct RealmOptions {
236    /// Optional name to give to the realm component.
237    /// This will become part of the realm's component selector.
238    pub realm_name: Option<String>,
239    /// A set of puppets to add to the realm.
240    ///
241    /// When RealmFactory/CreateRealm is called, a puppet component will be added
242    /// to the test realm for each name specified here, but will not be started
243    /// until a client connects to its exposed Puppet protocol.
244    pub puppets: Option<Vec<PuppetDecl>>,
245    /// Selector for which configuration of archivist to use.
246    pub archivist_config: Option<ArchivistConfig>,
247    #[doc(hidden)]
248    pub __source_breaking: fidl::marker::SourceBreaking,
249}
250
251impl fidl::Persistable for RealmOptions {}
252
253mod internal {
254    use super::*;
255    unsafe impl fidl::encoding::TypeMarker for ExitStatus {
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 ExitStatus {
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> for ExitStatus {
288        #[inline]
289        unsafe fn encode(
290            self,
291            encoder: &mut fidl::encoding::Encoder<'_, D>,
292            offset: usize,
293            _depth: fidl::encoding::Depth,
294        ) -> fidl::Result<()> {
295            encoder.debug_check_bounds::<Self>(offset);
296            encoder.write_num(self.into_primitive(), offset);
297            Ok(())
298        }
299    }
300
301    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ExitStatus {
302        #[inline(always)]
303        fn new_empty() -> Self {
304            Self::unknown()
305        }
306
307        #[inline]
308        unsafe fn decode(
309            &mut self,
310            decoder: &mut fidl::encoding::Decoder<'_, D>,
311            offset: usize,
312            _depth: fidl::encoding::Depth,
313        ) -> fidl::Result<()> {
314            decoder.debug_check_bounds::<Self>(offset);
315            let prim = decoder.read_num::<u32>(offset);
316
317            *self = Self::from_primitive_allow_unknown(prim);
318            Ok(())
319        }
320    }
321
322    impl fidl::encoding::ValueTypeMarker for InspectWriterRecordIntRequest {
323        type Borrowed<'a> = &'a Self;
324        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
325            value
326        }
327    }
328
329    unsafe impl fidl::encoding::TypeMarker for InspectWriterRecordIntRequest {
330        type Owned = Self;
331
332        #[inline(always)]
333        fn inline_align(_context: fidl::encoding::Context) -> usize {
334            8
335        }
336
337        #[inline(always)]
338        fn inline_size(_context: fidl::encoding::Context) -> usize {
339            24
340        }
341    }
342
343    unsafe impl<D: fidl::encoding::ResourceDialect>
344        fidl::encoding::Encode<InspectWriterRecordIntRequest, D>
345        for &InspectWriterRecordIntRequest
346    {
347        #[inline]
348        unsafe fn encode(
349            self,
350            encoder: &mut fidl::encoding::Encoder<'_, D>,
351            offset: usize,
352            _depth: fidl::encoding::Depth,
353        ) -> fidl::Result<()> {
354            encoder.debug_check_bounds::<InspectWriterRecordIntRequest>(offset);
355            // Delegate to tuple encoding.
356            fidl::encoding::Encode::<InspectWriterRecordIntRequest, D>::encode(
357                (
358                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
359                        &self.key,
360                    ),
361                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
362                ),
363                encoder,
364                offset,
365                _depth,
366            )
367        }
368    }
369    unsafe impl<
370            D: fidl::encoding::ResourceDialect,
371            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
372            T1: fidl::encoding::Encode<i64, D>,
373        > fidl::encoding::Encode<InspectWriterRecordIntRequest, D> for (T0, T1)
374    {
375        #[inline]
376        unsafe fn encode(
377            self,
378            encoder: &mut fidl::encoding::Encoder<'_, D>,
379            offset: usize,
380            depth: fidl::encoding::Depth,
381        ) -> fidl::Result<()> {
382            encoder.debug_check_bounds::<InspectWriterRecordIntRequest>(offset);
383            // Zero out padding regions. There's no need to apply masks
384            // because the unmasked parts will be overwritten by fields.
385            // Write the fields.
386            self.0.encode(encoder, offset + 0, depth)?;
387            self.1.encode(encoder, offset + 16, depth)?;
388            Ok(())
389        }
390    }
391
392    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
393        for InspectWriterRecordIntRequest
394    {
395        #[inline(always)]
396        fn new_empty() -> Self {
397            Self {
398                key: fidl::new_empty!(fidl::encoding::UnboundedString, D),
399                value: fidl::new_empty!(i64, D),
400            }
401        }
402
403        #[inline]
404        unsafe fn decode(
405            &mut self,
406            decoder: &mut fidl::encoding::Decoder<'_, D>,
407            offset: usize,
408            _depth: fidl::encoding::Depth,
409        ) -> fidl::Result<()> {
410            decoder.debug_check_bounds::<Self>(offset);
411            // Verify that padding bytes are zero.
412            fidl::decode!(
413                fidl::encoding::UnboundedString,
414                D,
415                &mut self.key,
416                decoder,
417                offset + 0,
418                _depth
419            )?;
420            fidl::decode!(i64, D, &mut self.value, decoder, offset + 16, _depth)?;
421            Ok(())
422        }
423    }
424
425    impl fidl::encoding::ValueTypeMarker for InspectWriterRecordStringRequest {
426        type Borrowed<'a> = &'a Self;
427        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
428            value
429        }
430    }
431
432    unsafe impl fidl::encoding::TypeMarker for InspectWriterRecordStringRequest {
433        type Owned = Self;
434
435        #[inline(always)]
436        fn inline_align(_context: fidl::encoding::Context) -> usize {
437            8
438        }
439
440        #[inline(always)]
441        fn inline_size(_context: fidl::encoding::Context) -> usize {
442            32
443        }
444    }
445
446    unsafe impl<D: fidl::encoding::ResourceDialect>
447        fidl::encoding::Encode<InspectWriterRecordStringRequest, D>
448        for &InspectWriterRecordStringRequest
449    {
450        #[inline]
451        unsafe fn encode(
452            self,
453            encoder: &mut fidl::encoding::Encoder<'_, D>,
454            offset: usize,
455            _depth: fidl::encoding::Depth,
456        ) -> fidl::Result<()> {
457            encoder.debug_check_bounds::<InspectWriterRecordStringRequest>(offset);
458            // Delegate to tuple encoding.
459            fidl::encoding::Encode::<InspectWriterRecordStringRequest, D>::encode(
460                (
461                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
462                        &self.key,
463                    ),
464                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
465                        &self.value,
466                    ),
467                ),
468                encoder,
469                offset,
470                _depth,
471            )
472        }
473    }
474    unsafe impl<
475            D: fidl::encoding::ResourceDialect,
476            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
477            T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
478        > fidl::encoding::Encode<InspectWriterRecordStringRequest, D> for (T0, T1)
479    {
480        #[inline]
481        unsafe fn encode(
482            self,
483            encoder: &mut fidl::encoding::Encoder<'_, D>,
484            offset: usize,
485            depth: fidl::encoding::Depth,
486        ) -> fidl::Result<()> {
487            encoder.debug_check_bounds::<InspectWriterRecordStringRequest>(offset);
488            // Zero out padding regions. There's no need to apply masks
489            // because the unmasked parts will be overwritten by fields.
490            // Write the fields.
491            self.0.encode(encoder, offset + 0, depth)?;
492            self.1.encode(encoder, offset + 16, depth)?;
493            Ok(())
494        }
495    }
496
497    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
498        for InspectWriterRecordStringRequest
499    {
500        #[inline(always)]
501        fn new_empty() -> Self {
502            Self {
503                key: fidl::new_empty!(fidl::encoding::UnboundedString, D),
504                value: fidl::new_empty!(fidl::encoding::UnboundedString, D),
505            }
506        }
507
508        #[inline]
509        unsafe fn decode(
510            &mut self,
511            decoder: &mut fidl::encoding::Decoder<'_, D>,
512            offset: usize,
513            _depth: fidl::encoding::Depth,
514        ) -> fidl::Result<()> {
515            decoder.debug_check_bounds::<Self>(offset);
516            // Verify that padding bytes are zero.
517            fidl::decode!(
518                fidl::encoding::UnboundedString,
519                D,
520                &mut self.key,
521                decoder,
522                offset + 0,
523                _depth
524            )?;
525            fidl::decode!(
526                fidl::encoding::UnboundedString,
527                D,
528                &mut self.value,
529                decoder,
530                offset + 16,
531                _depth
532            )?;
533            Ok(())
534        }
535    }
536
537    impl fidl::encoding::ValueTypeMarker for LazyInspectPuppetCommitRequest {
538        type Borrowed<'a> = &'a Self;
539        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
540            value
541        }
542    }
543
544    unsafe impl fidl::encoding::TypeMarker for LazyInspectPuppetCommitRequest {
545        type Owned = Self;
546
547        #[inline(always)]
548        fn inline_align(_context: fidl::encoding::Context) -> usize {
549            8
550        }
551
552        #[inline(always)]
553        fn inline_size(_context: fidl::encoding::Context) -> usize {
554            16
555        }
556    }
557
558    unsafe impl<D: fidl::encoding::ResourceDialect>
559        fidl::encoding::Encode<LazyInspectPuppetCommitRequest, D>
560        for &LazyInspectPuppetCommitRequest
561    {
562        #[inline]
563        unsafe fn encode(
564            self,
565            encoder: &mut fidl::encoding::Encoder<'_, D>,
566            offset: usize,
567            _depth: fidl::encoding::Depth,
568        ) -> fidl::Result<()> {
569            encoder.debug_check_bounds::<LazyInspectPuppetCommitRequest>(offset);
570            // Delegate to tuple encoding.
571            fidl::encoding::Encode::<LazyInspectPuppetCommitRequest, D>::encode(
572                (<CommitOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
573                encoder,
574                offset,
575                _depth,
576            )
577        }
578    }
579    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<CommitOptions, D>>
580        fidl::encoding::Encode<LazyInspectPuppetCommitRequest, D> for (T0,)
581    {
582        #[inline]
583        unsafe fn encode(
584            self,
585            encoder: &mut fidl::encoding::Encoder<'_, D>,
586            offset: usize,
587            depth: fidl::encoding::Depth,
588        ) -> fidl::Result<()> {
589            encoder.debug_check_bounds::<LazyInspectPuppetCommitRequest>(offset);
590            // Zero out padding regions. There's no need to apply masks
591            // because the unmasked parts will be overwritten by fields.
592            // Write the fields.
593            self.0.encode(encoder, offset + 0, depth)?;
594            Ok(())
595        }
596    }
597
598    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
599        for LazyInspectPuppetCommitRequest
600    {
601        #[inline(always)]
602        fn new_empty() -> Self {
603            Self { options: fidl::new_empty!(CommitOptions, D) }
604        }
605
606        #[inline]
607        unsafe fn decode(
608            &mut self,
609            decoder: &mut fidl::encoding::Decoder<'_, D>,
610            offset: usize,
611            _depth: fidl::encoding::Depth,
612        ) -> fidl::Result<()> {
613            decoder.debug_check_bounds::<Self>(offset);
614            // Verify that padding bytes are zero.
615            fidl::decode!(CommitOptions, D, &mut self.options, decoder, offset + 0, _depth)?;
616            Ok(())
617        }
618    }
619
620    impl fidl::encoding::ValueTypeMarker for LogPuppetEprintlnRequest {
621        type Borrowed<'a> = &'a Self;
622        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
623            value
624        }
625    }
626
627    unsafe impl fidl::encoding::TypeMarker for LogPuppetEprintlnRequest {
628        type Owned = Self;
629
630        #[inline(always)]
631        fn inline_align(_context: fidl::encoding::Context) -> usize {
632            8
633        }
634
635        #[inline(always)]
636        fn inline_size(_context: fidl::encoding::Context) -> usize {
637            16
638        }
639    }
640
641    unsafe impl<D: fidl::encoding::ResourceDialect>
642        fidl::encoding::Encode<LogPuppetEprintlnRequest, D> for &LogPuppetEprintlnRequest
643    {
644        #[inline]
645        unsafe fn encode(
646            self,
647            encoder: &mut fidl::encoding::Encoder<'_, D>,
648            offset: usize,
649            _depth: fidl::encoding::Depth,
650        ) -> fidl::Result<()> {
651            encoder.debug_check_bounds::<LogPuppetEprintlnRequest>(offset);
652            // Delegate to tuple encoding.
653            fidl::encoding::Encode::<LogPuppetEprintlnRequest, D>::encode(
654                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
655                    &self.message,
656                ),),
657                encoder,
658                offset,
659                _depth,
660            )
661        }
662    }
663    unsafe impl<
664            D: fidl::encoding::ResourceDialect,
665            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
666        > fidl::encoding::Encode<LogPuppetEprintlnRequest, D> for (T0,)
667    {
668        #[inline]
669        unsafe fn encode(
670            self,
671            encoder: &mut fidl::encoding::Encoder<'_, D>,
672            offset: usize,
673            depth: fidl::encoding::Depth,
674        ) -> fidl::Result<()> {
675            encoder.debug_check_bounds::<LogPuppetEprintlnRequest>(offset);
676            // Zero out padding regions. There's no need to apply masks
677            // because the unmasked parts will be overwritten by fields.
678            // Write the fields.
679            self.0.encode(encoder, offset + 0, depth)?;
680            Ok(())
681        }
682    }
683
684    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
685        for LogPuppetEprintlnRequest
686    {
687        #[inline(always)]
688        fn new_empty() -> Self {
689            Self { message: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
690        }
691
692        #[inline]
693        unsafe fn decode(
694            &mut self,
695            decoder: &mut fidl::encoding::Decoder<'_, D>,
696            offset: usize,
697            _depth: fidl::encoding::Depth,
698        ) -> fidl::Result<()> {
699            decoder.debug_check_bounds::<Self>(offset);
700            // Verify that padding bytes are zero.
701            fidl::decode!(
702                fidl::encoding::UnboundedString,
703                D,
704                &mut self.message,
705                decoder,
706                offset + 0,
707                _depth
708            )?;
709            Ok(())
710        }
711    }
712
713    impl fidl::encoding::ValueTypeMarker for LogPuppetPrintlnRequest {
714        type Borrowed<'a> = &'a Self;
715        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
716            value
717        }
718    }
719
720    unsafe impl fidl::encoding::TypeMarker for LogPuppetPrintlnRequest {
721        type Owned = Self;
722
723        #[inline(always)]
724        fn inline_align(_context: fidl::encoding::Context) -> usize {
725            8
726        }
727
728        #[inline(always)]
729        fn inline_size(_context: fidl::encoding::Context) -> usize {
730            16
731        }
732    }
733
734    unsafe impl<D: fidl::encoding::ResourceDialect>
735        fidl::encoding::Encode<LogPuppetPrintlnRequest, D> for &LogPuppetPrintlnRequest
736    {
737        #[inline]
738        unsafe fn encode(
739            self,
740            encoder: &mut fidl::encoding::Encoder<'_, D>,
741            offset: usize,
742            _depth: fidl::encoding::Depth,
743        ) -> fidl::Result<()> {
744            encoder.debug_check_bounds::<LogPuppetPrintlnRequest>(offset);
745            // Delegate to tuple encoding.
746            fidl::encoding::Encode::<LogPuppetPrintlnRequest, D>::encode(
747                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
748                    &self.message,
749                ),),
750                encoder,
751                offset,
752                _depth,
753            )
754        }
755    }
756    unsafe impl<
757            D: fidl::encoding::ResourceDialect,
758            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
759        > fidl::encoding::Encode<LogPuppetPrintlnRequest, D> for (T0,)
760    {
761        #[inline]
762        unsafe fn encode(
763            self,
764            encoder: &mut fidl::encoding::Encoder<'_, D>,
765            offset: usize,
766            depth: fidl::encoding::Depth,
767        ) -> fidl::Result<()> {
768            encoder.debug_check_bounds::<LogPuppetPrintlnRequest>(offset);
769            // Zero out padding regions. There's no need to apply masks
770            // because the unmasked parts will be overwritten by fields.
771            // Write the fields.
772            self.0.encode(encoder, offset + 0, depth)?;
773            Ok(())
774        }
775    }
776
777    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
778        for LogPuppetPrintlnRequest
779    {
780        #[inline(always)]
781        fn new_empty() -> Self {
782            Self { message: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
783        }
784
785        #[inline]
786        unsafe fn decode(
787            &mut self,
788            decoder: &mut fidl::encoding::Decoder<'_, D>,
789            offset: usize,
790            _depth: fidl::encoding::Depth,
791        ) -> fidl::Result<()> {
792            decoder.debug_check_bounds::<Self>(offset);
793            // Verify that padding bytes are zero.
794            fidl::decode!(
795                fidl::encoding::UnboundedString,
796                D,
797                &mut self.message,
798                decoder,
799                offset + 0,
800                _depth
801            )?;
802            Ok(())
803        }
804    }
805
806    impl fidl::encoding::ValueTypeMarker for PuppetCrashRequest {
807        type Borrowed<'a> = &'a Self;
808        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
809            value
810        }
811    }
812
813    unsafe impl fidl::encoding::TypeMarker for PuppetCrashRequest {
814        type Owned = Self;
815
816        #[inline(always)]
817        fn inline_align(_context: fidl::encoding::Context) -> usize {
818            8
819        }
820
821        #[inline(always)]
822        fn inline_size(_context: fidl::encoding::Context) -> usize {
823            16
824        }
825    }
826
827    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PuppetCrashRequest, D>
828        for &PuppetCrashRequest
829    {
830        #[inline]
831        unsafe fn encode(
832            self,
833            encoder: &mut fidl::encoding::Encoder<'_, D>,
834            offset: usize,
835            _depth: fidl::encoding::Depth,
836        ) -> fidl::Result<()> {
837            encoder.debug_check_bounds::<PuppetCrashRequest>(offset);
838            // Delegate to tuple encoding.
839            fidl::encoding::Encode::<PuppetCrashRequest, D>::encode(
840                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
841                    &self.message,
842                ),),
843                encoder,
844                offset,
845                _depth,
846            )
847        }
848    }
849    unsafe impl<
850            D: fidl::encoding::ResourceDialect,
851            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
852        > fidl::encoding::Encode<PuppetCrashRequest, D> for (T0,)
853    {
854        #[inline]
855        unsafe fn encode(
856            self,
857            encoder: &mut fidl::encoding::Encoder<'_, D>,
858            offset: usize,
859            depth: fidl::encoding::Depth,
860        ) -> fidl::Result<()> {
861            encoder.debug_check_bounds::<PuppetCrashRequest>(offset);
862            // Zero out padding regions. There's no need to apply masks
863            // because the unmasked parts will be overwritten by fields.
864            // Write the fields.
865            self.0.encode(encoder, offset + 0, depth)?;
866            Ok(())
867        }
868    }
869
870    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PuppetCrashRequest {
871        #[inline(always)]
872        fn new_empty() -> Self {
873            Self { message: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
874        }
875
876        #[inline]
877        unsafe fn decode(
878            &mut self,
879            decoder: &mut fidl::encoding::Decoder<'_, D>,
880            offset: usize,
881            _depth: fidl::encoding::Depth,
882        ) -> fidl::Result<()> {
883            decoder.debug_check_bounds::<Self>(offset);
884            // Verify that padding bytes are zero.
885            fidl::decode!(
886                fidl::encoding::UnboundedString,
887                D,
888                &mut self.message,
889                decoder,
890                offset + 0,
891                _depth
892            )?;
893            Ok(())
894        }
895    }
896
897    impl fidl::encoding::ValueTypeMarker for PuppetRecordLazyValuesRequest {
898        type Borrowed<'a> = &'a Self;
899        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
900            value
901        }
902    }
903
904    unsafe impl fidl::encoding::TypeMarker for PuppetRecordLazyValuesRequest {
905        type Owned = Self;
906
907        #[inline(always)]
908        fn inline_align(_context: fidl::encoding::Context) -> usize {
909            8
910        }
911
912        #[inline(always)]
913        fn inline_size(_context: fidl::encoding::Context) -> usize {
914            16
915        }
916    }
917
918    unsafe impl<D: fidl::encoding::ResourceDialect>
919        fidl::encoding::Encode<PuppetRecordLazyValuesRequest, D>
920        for &PuppetRecordLazyValuesRequest
921    {
922        #[inline]
923        unsafe fn encode(
924            self,
925            encoder: &mut fidl::encoding::Encoder<'_, D>,
926            offset: usize,
927            _depth: fidl::encoding::Depth,
928        ) -> fidl::Result<()> {
929            encoder.debug_check_bounds::<PuppetRecordLazyValuesRequest>(offset);
930            // Delegate to tuple encoding.
931            fidl::encoding::Encode::<PuppetRecordLazyValuesRequest, D>::encode(
932                (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
933                    &self.key,
934                ),),
935                encoder,
936                offset,
937                _depth,
938            )
939        }
940    }
941    unsafe impl<
942            D: fidl::encoding::ResourceDialect,
943            T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
944        > fidl::encoding::Encode<PuppetRecordLazyValuesRequest, D> for (T0,)
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::<PuppetRecordLazyValuesRequest>(offset);
954            // Zero out padding regions. There's no need to apply masks
955            // because the unmasked parts will be overwritten by fields.
956            // Write the fields.
957            self.0.encode(encoder, offset + 0, depth)?;
958            Ok(())
959        }
960    }
961
962    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
963        for PuppetRecordLazyValuesRequest
964    {
965        #[inline(always)]
966        fn new_empty() -> Self {
967            Self { key: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
968        }
969
970        #[inline]
971        unsafe fn decode(
972            &mut self,
973            decoder: &mut fidl::encoding::Decoder<'_, D>,
974            offset: usize,
975            _depth: fidl::encoding::Depth,
976        ) -> fidl::Result<()> {
977            decoder.debug_check_bounds::<Self>(offset);
978            // Verify that padding bytes are zero.
979            fidl::decode!(
980                fidl::encoding::UnboundedString,
981                D,
982                &mut self.key,
983                decoder,
984                offset + 0,
985                _depth
986            )?;
987            Ok(())
988        }
989    }
990
991    impl fidl::encoding::ValueTypeMarker for StopWatcherWatchComponentRequest {
992        type Borrowed<'a> = &'a Self;
993        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
994            value
995        }
996    }
997
998    unsafe impl fidl::encoding::TypeMarker for StopWatcherWatchComponentRequest {
999        type Owned = Self;
1000
1001        #[inline(always)]
1002        fn inline_align(_context: fidl::encoding::Context) -> usize {
1003            8
1004        }
1005
1006        #[inline(always)]
1007        fn inline_size(_context: fidl::encoding::Context) -> usize {
1008            24
1009        }
1010    }
1011
1012    unsafe impl<D: fidl::encoding::ResourceDialect>
1013        fidl::encoding::Encode<StopWatcherWatchComponentRequest, D>
1014        for &StopWatcherWatchComponentRequest
1015    {
1016        #[inline]
1017        unsafe fn encode(
1018            self,
1019            encoder: &mut fidl::encoding::Encoder<'_, D>,
1020            offset: usize,
1021            _depth: fidl::encoding::Depth,
1022        ) -> fidl::Result<()> {
1023            encoder.debug_check_bounds::<StopWatcherWatchComponentRequest>(offset);
1024            // Delegate to tuple encoding.
1025            fidl::encoding::Encode::<StopWatcherWatchComponentRequest, D>::encode(
1026                (
1027                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
1028                    <ExitStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.expected_exit),
1029                ),
1030                encoder, offset, _depth
1031            )
1032        }
1033    }
1034    unsafe impl<
1035            D: fidl::encoding::ResourceDialect,
1036            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
1037            T1: fidl::encoding::Encode<ExitStatus, D>,
1038        > fidl::encoding::Encode<StopWatcherWatchComponentRequest, D> for (T0, T1)
1039    {
1040        #[inline]
1041        unsafe fn encode(
1042            self,
1043            encoder: &mut fidl::encoding::Encoder<'_, D>,
1044            offset: usize,
1045            depth: fidl::encoding::Depth,
1046        ) -> fidl::Result<()> {
1047            encoder.debug_check_bounds::<StopWatcherWatchComponentRequest>(offset);
1048            // Zero out padding regions. There's no need to apply masks
1049            // because the unmasked parts will be overwritten by fields.
1050            unsafe {
1051                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1052                (ptr as *mut u64).write_unaligned(0);
1053            }
1054            // Write the fields.
1055            self.0.encode(encoder, offset + 0, depth)?;
1056            self.1.encode(encoder, offset + 16, depth)?;
1057            Ok(())
1058        }
1059    }
1060
1061    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1062        for StopWatcherWatchComponentRequest
1063    {
1064        #[inline(always)]
1065        fn new_empty() -> Self {
1066            Self {
1067                moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
1068                expected_exit: fidl::new_empty!(ExitStatus, D),
1069            }
1070        }
1071
1072        #[inline]
1073        unsafe fn decode(
1074            &mut self,
1075            decoder: &mut fidl::encoding::Decoder<'_, D>,
1076            offset: usize,
1077            _depth: fidl::encoding::Depth,
1078        ) -> fidl::Result<()> {
1079            decoder.debug_check_bounds::<Self>(offset);
1080            // Verify that padding bytes are zero.
1081            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1082            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1083            let mask = 0xffffffff00000000u64;
1084            let maskedval = padval & mask;
1085            if maskedval != 0 {
1086                return Err(fidl::Error::NonZeroPadding {
1087                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1088                });
1089            }
1090            fidl::decode!(
1091                fidl::encoding::BoundedString<4096>,
1092                D,
1093                &mut self.moniker,
1094                decoder,
1095                offset + 0,
1096                _depth
1097            )?;
1098            fidl::decode!(ExitStatus, D, &mut self.expected_exit, decoder, offset + 16, _depth)?;
1099            Ok(())
1100        }
1101    }
1102
1103    impl ArchivistConfig {
1104        #[inline(always)]
1105        fn max_ordinal_present(&self) -> u64 {
1106            if let Some(_) = self.initial_interests {
1107                return 4;
1108            }
1109            if let Some(_) = self.pipelines_path {
1110                return 3;
1111            }
1112            if let Some(_) = self.logs_max_cached_original_bytes {
1113                return 2;
1114            }
1115            if let Some(_) = self.enable_klog {
1116                return 1;
1117            }
1118            0
1119        }
1120    }
1121
1122    impl fidl::encoding::ValueTypeMarker for ArchivistConfig {
1123        type Borrowed<'a> = &'a Self;
1124        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1125            value
1126        }
1127    }
1128
1129    unsafe impl fidl::encoding::TypeMarker for ArchivistConfig {
1130        type Owned = Self;
1131
1132        #[inline(always)]
1133        fn inline_align(_context: fidl::encoding::Context) -> usize {
1134            8
1135        }
1136
1137        #[inline(always)]
1138        fn inline_size(_context: fidl::encoding::Context) -> usize {
1139            16
1140        }
1141    }
1142
1143    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ArchivistConfig, D>
1144        for &ArchivistConfig
1145    {
1146        unsafe fn encode(
1147            self,
1148            encoder: &mut fidl::encoding::Encoder<'_, D>,
1149            offset: usize,
1150            mut depth: fidl::encoding::Depth,
1151        ) -> fidl::Result<()> {
1152            encoder.debug_check_bounds::<ArchivistConfig>(offset);
1153            // Vector header
1154            let max_ordinal: u64 = self.max_ordinal_present();
1155            encoder.write_num(max_ordinal, offset);
1156            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1157            // Calling encoder.out_of_line_offset(0) is not allowed.
1158            if max_ordinal == 0 {
1159                return Ok(());
1160            }
1161            depth.increment()?;
1162            let envelope_size = 8;
1163            let bytes_len = max_ordinal as usize * envelope_size;
1164            #[allow(unused_variables)]
1165            let offset = encoder.out_of_line_offset(bytes_len);
1166            let mut _prev_end_offset: usize = 0;
1167            if 1 > max_ordinal {
1168                return Ok(());
1169            }
1170
1171            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1172            // are envelope_size bytes.
1173            let cur_offset: usize = (1 - 1) * envelope_size;
1174
1175            // Zero reserved fields.
1176            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1177
1178            // Safety:
1179            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1180            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1181            //   envelope_size bytes, there is always sufficient room.
1182            fidl::encoding::encode_in_envelope_optional::<bool, D>(
1183                self.enable_klog.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
1184                encoder,
1185                offset + cur_offset,
1186                depth,
1187            )?;
1188
1189            _prev_end_offset = cur_offset + envelope_size;
1190            if 2 > max_ordinal {
1191                return Ok(());
1192            }
1193
1194            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1195            // are envelope_size bytes.
1196            let cur_offset: usize = (2 - 1) * envelope_size;
1197
1198            // Zero reserved fields.
1199            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1200
1201            // Safety:
1202            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1203            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1204            //   envelope_size bytes, there is always sufficient room.
1205            fidl::encoding::encode_in_envelope_optional::<u64, D>(
1206                self.logs_max_cached_original_bytes
1207                    .as_ref()
1208                    .map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
1209                encoder,
1210                offset + cur_offset,
1211                depth,
1212            )?;
1213
1214            _prev_end_offset = cur_offset + envelope_size;
1215            if 3 > max_ordinal {
1216                return Ok(());
1217            }
1218
1219            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1220            // are envelope_size bytes.
1221            let cur_offset: usize = (3 - 1) * envelope_size;
1222
1223            // Zero reserved fields.
1224            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1225
1226            // Safety:
1227            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1228            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1229            //   envelope_size bytes, there is always sufficient room.
1230            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<256>, D>(
1231                self.pipelines_path.as_ref().map(
1232                    <fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow,
1233                ),
1234                encoder,
1235                offset + cur_offset,
1236                depth,
1237            )?;
1238
1239            _prev_end_offset = cur_offset + envelope_size;
1240            if 4 > max_ordinal {
1241                return Ok(());
1242            }
1243
1244            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1245            // are envelope_size bytes.
1246            let cur_offset: usize = (4 - 1) * envelope_size;
1247
1248            // Zero reserved fields.
1249            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1250
1251            // Safety:
1252            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1253            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1254            //   envelope_size bytes, there is always sufficient room.
1255            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<ComponentInitialInterest>, D>(
1256            self.initial_interests.as_ref().map(<fidl::encoding::UnboundedVector<ComponentInitialInterest> as fidl::encoding::ValueTypeMarker>::borrow),
1257            encoder, offset + cur_offset, depth
1258        )?;
1259
1260            _prev_end_offset = cur_offset + envelope_size;
1261
1262            Ok(())
1263        }
1264    }
1265
1266    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ArchivistConfig {
1267        #[inline(always)]
1268        fn new_empty() -> Self {
1269            Self::default()
1270        }
1271
1272        unsafe fn decode(
1273            &mut self,
1274            decoder: &mut fidl::encoding::Decoder<'_, D>,
1275            offset: usize,
1276            mut depth: fidl::encoding::Depth,
1277        ) -> fidl::Result<()> {
1278            decoder.debug_check_bounds::<Self>(offset);
1279            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1280                None => return Err(fidl::Error::NotNullable),
1281                Some(len) => len,
1282            };
1283            // Calling decoder.out_of_line_offset(0) is not allowed.
1284            if len == 0 {
1285                return Ok(());
1286            };
1287            depth.increment()?;
1288            let envelope_size = 8;
1289            let bytes_len = len * envelope_size;
1290            let offset = decoder.out_of_line_offset(bytes_len)?;
1291            // Decode the envelope for each type.
1292            let mut _next_ordinal_to_read = 0;
1293            let mut next_offset = offset;
1294            let end_offset = offset + bytes_len;
1295            _next_ordinal_to_read += 1;
1296            if next_offset >= end_offset {
1297                return Ok(());
1298            }
1299
1300            // Decode unknown envelopes for gaps in ordinals.
1301            while _next_ordinal_to_read < 1 {
1302                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1303                _next_ordinal_to_read += 1;
1304                next_offset += envelope_size;
1305            }
1306
1307            let next_out_of_line = decoder.next_out_of_line();
1308            let handles_before = decoder.remaining_handles();
1309            if let Some((inlined, num_bytes, num_handles)) =
1310                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1311            {
1312                let member_inline_size =
1313                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1314                if inlined != (member_inline_size <= 4) {
1315                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1316                }
1317                let inner_offset;
1318                let mut inner_depth = depth.clone();
1319                if inlined {
1320                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1321                    inner_offset = next_offset;
1322                } else {
1323                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1324                    inner_depth.increment()?;
1325                }
1326                let val_ref = self.enable_klog.get_or_insert_with(|| fidl::new_empty!(bool, D));
1327                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
1328                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1329                {
1330                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1331                }
1332                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1333                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1334                }
1335            }
1336
1337            next_offset += envelope_size;
1338            _next_ordinal_to_read += 1;
1339            if next_offset >= end_offset {
1340                return Ok(());
1341            }
1342
1343            // Decode unknown envelopes for gaps in ordinals.
1344            while _next_ordinal_to_read < 2 {
1345                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1346                _next_ordinal_to_read += 1;
1347                next_offset += envelope_size;
1348            }
1349
1350            let next_out_of_line = decoder.next_out_of_line();
1351            let handles_before = decoder.remaining_handles();
1352            if let Some((inlined, num_bytes, num_handles)) =
1353                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1354            {
1355                let member_inline_size =
1356                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1357                if inlined != (member_inline_size <= 4) {
1358                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1359                }
1360                let inner_offset;
1361                let mut inner_depth = depth.clone();
1362                if inlined {
1363                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1364                    inner_offset = next_offset;
1365                } else {
1366                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1367                    inner_depth.increment()?;
1368                }
1369                let val_ref = self
1370                    .logs_max_cached_original_bytes
1371                    .get_or_insert_with(|| fidl::new_empty!(u64, D));
1372                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
1373                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1374                {
1375                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1376                }
1377                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1378                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1379                }
1380            }
1381
1382            next_offset += envelope_size;
1383            _next_ordinal_to_read += 1;
1384            if next_offset >= end_offset {
1385                return Ok(());
1386            }
1387
1388            // Decode unknown envelopes for gaps in ordinals.
1389            while _next_ordinal_to_read < 3 {
1390                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1391                _next_ordinal_to_read += 1;
1392                next_offset += envelope_size;
1393            }
1394
1395            let next_out_of_line = decoder.next_out_of_line();
1396            let handles_before = decoder.remaining_handles();
1397            if let Some((inlined, num_bytes, num_handles)) =
1398                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1399            {
1400                let member_inline_size =
1401                    <fidl::encoding::BoundedString<256> as fidl::encoding::TypeMarker>::inline_size(
1402                        decoder.context,
1403                    );
1404                if inlined != (member_inline_size <= 4) {
1405                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1406                }
1407                let inner_offset;
1408                let mut inner_depth = depth.clone();
1409                if inlined {
1410                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1411                    inner_offset = next_offset;
1412                } else {
1413                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1414                    inner_depth.increment()?;
1415                }
1416                let val_ref = self
1417                    .pipelines_path
1418                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<256>, D));
1419                fidl::decode!(
1420                    fidl::encoding::BoundedString<256>,
1421                    D,
1422                    val_ref,
1423                    decoder,
1424                    inner_offset,
1425                    inner_depth
1426                )?;
1427                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1428                {
1429                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1430                }
1431                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1432                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1433                }
1434            }
1435
1436            next_offset += envelope_size;
1437            _next_ordinal_to_read += 1;
1438            if next_offset >= end_offset {
1439                return Ok(());
1440            }
1441
1442            // Decode unknown envelopes for gaps in ordinals.
1443            while _next_ordinal_to_read < 4 {
1444                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1445                _next_ordinal_to_read += 1;
1446                next_offset += envelope_size;
1447            }
1448
1449            let next_out_of_line = decoder.next_out_of_line();
1450            let handles_before = decoder.remaining_handles();
1451            if let Some((inlined, num_bytes, num_handles)) =
1452                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1453            {
1454                let member_inline_size = <fidl::encoding::UnboundedVector<ComponentInitialInterest> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1455                if inlined != (member_inline_size <= 4) {
1456                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1457                }
1458                let inner_offset;
1459                let mut inner_depth = depth.clone();
1460                if inlined {
1461                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1462                    inner_offset = next_offset;
1463                } else {
1464                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1465                    inner_depth.increment()?;
1466                }
1467                let val_ref = self.initial_interests.get_or_insert_with(|| {
1468                    fidl::new_empty!(fidl::encoding::UnboundedVector<ComponentInitialInterest>, D)
1469                });
1470                fidl::decode!(
1471                    fidl::encoding::UnboundedVector<ComponentInitialInterest>,
1472                    D,
1473                    val_ref,
1474                    decoder,
1475                    inner_offset,
1476                    inner_depth
1477                )?;
1478                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1479                {
1480                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1481                }
1482                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1483                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1484                }
1485            }
1486
1487            next_offset += envelope_size;
1488
1489            // Decode the remaining unknown envelopes.
1490            while next_offset < end_offset {
1491                _next_ordinal_to_read += 1;
1492                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1493                next_offset += envelope_size;
1494            }
1495
1496            Ok(())
1497        }
1498    }
1499
1500    impl CommitOptions {
1501        #[inline(always)]
1502        fn max_ordinal_present(&self) -> u64 {
1503            if let Some(_) = self.hang {
1504                return 1;
1505            }
1506            0
1507        }
1508    }
1509
1510    impl fidl::encoding::ValueTypeMarker for CommitOptions {
1511        type Borrowed<'a> = &'a Self;
1512        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1513            value
1514        }
1515    }
1516
1517    unsafe impl fidl::encoding::TypeMarker for CommitOptions {
1518        type Owned = Self;
1519
1520        #[inline(always)]
1521        fn inline_align(_context: fidl::encoding::Context) -> usize {
1522            8
1523        }
1524
1525        #[inline(always)]
1526        fn inline_size(_context: fidl::encoding::Context) -> usize {
1527            16
1528        }
1529    }
1530
1531    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CommitOptions, D>
1532        for &CommitOptions
1533    {
1534        unsafe fn encode(
1535            self,
1536            encoder: &mut fidl::encoding::Encoder<'_, D>,
1537            offset: usize,
1538            mut depth: fidl::encoding::Depth,
1539        ) -> fidl::Result<()> {
1540            encoder.debug_check_bounds::<CommitOptions>(offset);
1541            // Vector header
1542            let max_ordinal: u64 = self.max_ordinal_present();
1543            encoder.write_num(max_ordinal, offset);
1544            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1545            // Calling encoder.out_of_line_offset(0) is not allowed.
1546            if max_ordinal == 0 {
1547                return Ok(());
1548            }
1549            depth.increment()?;
1550            let envelope_size = 8;
1551            let bytes_len = max_ordinal as usize * envelope_size;
1552            #[allow(unused_variables)]
1553            let offset = encoder.out_of_line_offset(bytes_len);
1554            let mut _prev_end_offset: usize = 0;
1555            if 1 > max_ordinal {
1556                return Ok(());
1557            }
1558
1559            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1560            // are envelope_size bytes.
1561            let cur_offset: usize = (1 - 1) * envelope_size;
1562
1563            // Zero reserved fields.
1564            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1565
1566            // Safety:
1567            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1568            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1569            //   envelope_size bytes, there is always sufficient room.
1570            fidl::encoding::encode_in_envelope_optional::<bool, D>(
1571                self.hang.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
1572                encoder,
1573                offset + cur_offset,
1574                depth,
1575            )?;
1576
1577            _prev_end_offset = cur_offset + envelope_size;
1578
1579            Ok(())
1580        }
1581    }
1582
1583    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CommitOptions {
1584        #[inline(always)]
1585        fn new_empty() -> Self {
1586            Self::default()
1587        }
1588
1589        unsafe fn decode(
1590            &mut self,
1591            decoder: &mut fidl::encoding::Decoder<'_, D>,
1592            offset: usize,
1593            mut depth: fidl::encoding::Depth,
1594        ) -> fidl::Result<()> {
1595            decoder.debug_check_bounds::<Self>(offset);
1596            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1597                None => return Err(fidl::Error::NotNullable),
1598                Some(len) => len,
1599            };
1600            // Calling decoder.out_of_line_offset(0) is not allowed.
1601            if len == 0 {
1602                return Ok(());
1603            };
1604            depth.increment()?;
1605            let envelope_size = 8;
1606            let bytes_len = len * envelope_size;
1607            let offset = decoder.out_of_line_offset(bytes_len)?;
1608            // Decode the envelope for each type.
1609            let mut _next_ordinal_to_read = 0;
1610            let mut next_offset = offset;
1611            let end_offset = offset + bytes_len;
1612            _next_ordinal_to_read += 1;
1613            if next_offset >= end_offset {
1614                return Ok(());
1615            }
1616
1617            // Decode unknown envelopes for gaps in ordinals.
1618            while _next_ordinal_to_read < 1 {
1619                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1620                _next_ordinal_to_read += 1;
1621                next_offset += envelope_size;
1622            }
1623
1624            let next_out_of_line = decoder.next_out_of_line();
1625            let handles_before = decoder.remaining_handles();
1626            if let Some((inlined, num_bytes, num_handles)) =
1627                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1628            {
1629                let member_inline_size =
1630                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1631                if inlined != (member_inline_size <= 4) {
1632                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1633                }
1634                let inner_offset;
1635                let mut inner_depth = depth.clone();
1636                if inlined {
1637                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1638                    inner_offset = next_offset;
1639                } else {
1640                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1641                    inner_depth.increment()?;
1642                }
1643                let val_ref = self.hang.get_or_insert_with(|| fidl::new_empty!(bool, D));
1644                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
1645                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1646                {
1647                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1648                }
1649                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1650                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1651                }
1652            }
1653
1654            next_offset += envelope_size;
1655
1656            // Decode the remaining unknown envelopes.
1657            while next_offset < end_offset {
1658                _next_ordinal_to_read += 1;
1659                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1660                next_offset += envelope_size;
1661            }
1662
1663            Ok(())
1664        }
1665    }
1666
1667    impl ComponentInitialInterest {
1668        #[inline(always)]
1669        fn max_ordinal_present(&self) -> u64 {
1670            if let Some(_) = self.log_severity {
1671                return 2;
1672            }
1673            if let Some(_) = self.moniker {
1674                return 1;
1675            }
1676            0
1677        }
1678    }
1679
1680    impl fidl::encoding::ValueTypeMarker for ComponentInitialInterest {
1681        type Borrowed<'a> = &'a Self;
1682        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1683            value
1684        }
1685    }
1686
1687    unsafe impl fidl::encoding::TypeMarker for ComponentInitialInterest {
1688        type Owned = Self;
1689
1690        #[inline(always)]
1691        fn inline_align(_context: fidl::encoding::Context) -> usize {
1692            8
1693        }
1694
1695        #[inline(always)]
1696        fn inline_size(_context: fidl::encoding::Context) -> usize {
1697            16
1698        }
1699    }
1700
1701    unsafe impl<D: fidl::encoding::ResourceDialect>
1702        fidl::encoding::Encode<ComponentInitialInterest, D> for &ComponentInitialInterest
1703    {
1704        unsafe fn encode(
1705            self,
1706            encoder: &mut fidl::encoding::Encoder<'_, D>,
1707            offset: usize,
1708            mut depth: fidl::encoding::Depth,
1709        ) -> fidl::Result<()> {
1710            encoder.debug_check_bounds::<ComponentInitialInterest>(offset);
1711            // Vector header
1712            let max_ordinal: u64 = self.max_ordinal_present();
1713            encoder.write_num(max_ordinal, offset);
1714            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1715            // Calling encoder.out_of_line_offset(0) is not allowed.
1716            if max_ordinal == 0 {
1717                return Ok(());
1718            }
1719            depth.increment()?;
1720            let envelope_size = 8;
1721            let bytes_len = max_ordinal as usize * envelope_size;
1722            #[allow(unused_variables)]
1723            let offset = encoder.out_of_line_offset(bytes_len);
1724            let mut _prev_end_offset: usize = 0;
1725            if 1 > max_ordinal {
1726                return Ok(());
1727            }
1728
1729            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1730            // are envelope_size bytes.
1731            let cur_offset: usize = (1 - 1) * envelope_size;
1732
1733            // Zero reserved fields.
1734            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1735
1736            // Safety:
1737            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1738            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1739            //   envelope_size bytes, there is always sufficient room.
1740            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
1741                self.moniker.as_ref().map(
1742                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
1743                ),
1744                encoder,
1745                offset + cur_offset,
1746                depth,
1747            )?;
1748
1749            _prev_end_offset = cur_offset + envelope_size;
1750            if 2 > max_ordinal {
1751                return Ok(());
1752            }
1753
1754            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1755            // are envelope_size bytes.
1756            let cur_offset: usize = (2 - 1) * envelope_size;
1757
1758            // Zero reserved fields.
1759            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1760
1761            // Safety:
1762            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1763            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1764            //   envelope_size bytes, there is always sufficient room.
1765            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_diagnostics_types::Severity, D>(
1766            self.log_severity.as_ref().map(<fidl_fuchsia_diagnostics_types::Severity as fidl::encoding::ValueTypeMarker>::borrow),
1767            encoder, offset + cur_offset, depth
1768        )?;
1769
1770            _prev_end_offset = cur_offset + envelope_size;
1771
1772            Ok(())
1773        }
1774    }
1775
1776    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1777        for ComponentInitialInterest
1778    {
1779        #[inline(always)]
1780        fn new_empty() -> Self {
1781            Self::default()
1782        }
1783
1784        unsafe fn decode(
1785            &mut self,
1786            decoder: &mut fidl::encoding::Decoder<'_, D>,
1787            offset: usize,
1788            mut depth: fidl::encoding::Depth,
1789        ) -> fidl::Result<()> {
1790            decoder.debug_check_bounds::<Self>(offset);
1791            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1792                None => return Err(fidl::Error::NotNullable),
1793                Some(len) => len,
1794            };
1795            // Calling decoder.out_of_line_offset(0) is not allowed.
1796            if len == 0 {
1797                return Ok(());
1798            };
1799            depth.increment()?;
1800            let envelope_size = 8;
1801            let bytes_len = len * envelope_size;
1802            let offset = decoder.out_of_line_offset(bytes_len)?;
1803            // Decode the envelope for each type.
1804            let mut _next_ordinal_to_read = 0;
1805            let mut next_offset = offset;
1806            let end_offset = offset + bytes_len;
1807            _next_ordinal_to_read += 1;
1808            if next_offset >= end_offset {
1809                return Ok(());
1810            }
1811
1812            // Decode unknown envelopes for gaps in ordinals.
1813            while _next_ordinal_to_read < 1 {
1814                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1815                _next_ordinal_to_read += 1;
1816                next_offset += envelope_size;
1817            }
1818
1819            let next_out_of_line = decoder.next_out_of_line();
1820            let handles_before = decoder.remaining_handles();
1821            if let Some((inlined, num_bytes, num_handles)) =
1822                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1823            {
1824                let member_inline_size =
1825                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
1826                        decoder.context,
1827                    );
1828                if inlined != (member_inline_size <= 4) {
1829                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1830                }
1831                let inner_offset;
1832                let mut inner_depth = depth.clone();
1833                if inlined {
1834                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1835                    inner_offset = next_offset;
1836                } else {
1837                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1838                    inner_depth.increment()?;
1839                }
1840                let val_ref = self
1841                    .moniker
1842                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
1843                fidl::decode!(
1844                    fidl::encoding::UnboundedString,
1845                    D,
1846                    val_ref,
1847                    decoder,
1848                    inner_offset,
1849                    inner_depth
1850                )?;
1851                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1852                {
1853                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1854                }
1855                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1856                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1857                }
1858            }
1859
1860            next_offset += envelope_size;
1861            _next_ordinal_to_read += 1;
1862            if next_offset >= end_offset {
1863                return Ok(());
1864            }
1865
1866            // Decode unknown envelopes for gaps in ordinals.
1867            while _next_ordinal_to_read < 2 {
1868                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1869                _next_ordinal_to_read += 1;
1870                next_offset += envelope_size;
1871            }
1872
1873            let next_out_of_line = decoder.next_out_of_line();
1874            let handles_before = decoder.remaining_handles();
1875            if let Some((inlined, num_bytes, num_handles)) =
1876                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1877            {
1878                let member_inline_size = <fidl_fuchsia_diagnostics_types::Severity as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1879                if inlined != (member_inline_size <= 4) {
1880                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1881                }
1882                let inner_offset;
1883                let mut inner_depth = depth.clone();
1884                if inlined {
1885                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1886                    inner_offset = next_offset;
1887                } else {
1888                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1889                    inner_depth.increment()?;
1890                }
1891                let val_ref = self.log_severity.get_or_insert_with(|| {
1892                    fidl::new_empty!(fidl_fuchsia_diagnostics_types::Severity, D)
1893                });
1894                fidl::decode!(
1895                    fidl_fuchsia_diagnostics_types::Severity,
1896                    D,
1897                    val_ref,
1898                    decoder,
1899                    inner_offset,
1900                    inner_depth
1901                )?;
1902                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1903                {
1904                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1905                }
1906                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1907                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1908                }
1909            }
1910
1911            next_offset += envelope_size;
1912
1913            // Decode the remaining unknown envelopes.
1914            while next_offset < end_offset {
1915                _next_ordinal_to_read += 1;
1916                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1917                next_offset += envelope_size;
1918            }
1919
1920            Ok(())
1921        }
1922    }
1923
1924    impl InspectPuppetCreateInspectorRequest {
1925        #[inline(always)]
1926        fn max_ordinal_present(&self) -> u64 {
1927            if let Some(_) = self.name {
1928                return 1;
1929            }
1930            0
1931        }
1932    }
1933
1934    impl fidl::encoding::ValueTypeMarker for InspectPuppetCreateInspectorRequest {
1935        type Borrowed<'a> = &'a Self;
1936        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1937            value
1938        }
1939    }
1940
1941    unsafe impl fidl::encoding::TypeMarker for InspectPuppetCreateInspectorRequest {
1942        type Owned = Self;
1943
1944        #[inline(always)]
1945        fn inline_align(_context: fidl::encoding::Context) -> usize {
1946            8
1947        }
1948
1949        #[inline(always)]
1950        fn inline_size(_context: fidl::encoding::Context) -> usize {
1951            16
1952        }
1953    }
1954
1955    unsafe impl<D: fidl::encoding::ResourceDialect>
1956        fidl::encoding::Encode<InspectPuppetCreateInspectorRequest, D>
1957        for &InspectPuppetCreateInspectorRequest
1958    {
1959        unsafe fn encode(
1960            self,
1961            encoder: &mut fidl::encoding::Encoder<'_, D>,
1962            offset: usize,
1963            mut depth: fidl::encoding::Depth,
1964        ) -> fidl::Result<()> {
1965            encoder.debug_check_bounds::<InspectPuppetCreateInspectorRequest>(offset);
1966            // Vector header
1967            let max_ordinal: u64 = self.max_ordinal_present();
1968            encoder.write_num(max_ordinal, offset);
1969            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1970            // Calling encoder.out_of_line_offset(0) is not allowed.
1971            if max_ordinal == 0 {
1972                return Ok(());
1973            }
1974            depth.increment()?;
1975            let envelope_size = 8;
1976            let bytes_len = max_ordinal as usize * envelope_size;
1977            #[allow(unused_variables)]
1978            let offset = encoder.out_of_line_offset(bytes_len);
1979            let mut _prev_end_offset: usize = 0;
1980            if 1 > max_ordinal {
1981                return Ok(());
1982            }
1983
1984            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1985            // are envelope_size bytes.
1986            let cur_offset: usize = (1 - 1) * envelope_size;
1987
1988            // Zero reserved fields.
1989            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1990
1991            // Safety:
1992            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1993            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1994            //   envelope_size bytes, there is always sufficient room.
1995            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
1996            self.name.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
1997            encoder, offset + cur_offset, depth
1998        )?;
1999
2000            _prev_end_offset = cur_offset + envelope_size;
2001
2002            Ok(())
2003        }
2004    }
2005
2006    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2007        for InspectPuppetCreateInspectorRequest
2008    {
2009        #[inline(always)]
2010        fn new_empty() -> Self {
2011            Self::default()
2012        }
2013
2014        unsafe fn decode(
2015            &mut self,
2016            decoder: &mut fidl::encoding::Decoder<'_, D>,
2017            offset: usize,
2018            mut depth: fidl::encoding::Depth,
2019        ) -> fidl::Result<()> {
2020            decoder.debug_check_bounds::<Self>(offset);
2021            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2022                None => return Err(fidl::Error::NotNullable),
2023                Some(len) => len,
2024            };
2025            // Calling decoder.out_of_line_offset(0) is not allowed.
2026            if len == 0 {
2027                return Ok(());
2028            };
2029            depth.increment()?;
2030            let envelope_size = 8;
2031            let bytes_len = len * envelope_size;
2032            let offset = decoder.out_of_line_offset(bytes_len)?;
2033            // Decode the envelope for each type.
2034            let mut _next_ordinal_to_read = 0;
2035            let mut next_offset = offset;
2036            let end_offset = offset + bytes_len;
2037            _next_ordinal_to_read += 1;
2038            if next_offset >= end_offset {
2039                return Ok(());
2040            }
2041
2042            // Decode unknown envelopes for gaps in ordinals.
2043            while _next_ordinal_to_read < 1 {
2044                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2045                _next_ordinal_to_read += 1;
2046                next_offset += envelope_size;
2047            }
2048
2049            let next_out_of_line = decoder.next_out_of_line();
2050            let handles_before = decoder.remaining_handles();
2051            if let Some((inlined, num_bytes, num_handles)) =
2052                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2053            {
2054                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2055                if inlined != (member_inline_size <= 4) {
2056                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2057                }
2058                let inner_offset;
2059                let mut inner_depth = depth.clone();
2060                if inlined {
2061                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2062                    inner_offset = next_offset;
2063                } else {
2064                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2065                    inner_depth.increment()?;
2066                }
2067                let val_ref = self.name.get_or_insert_with(|| {
2068                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
2069                });
2070                fidl::decode!(
2071                    fidl::encoding::BoundedString<4096>,
2072                    D,
2073                    val_ref,
2074                    decoder,
2075                    inner_offset,
2076                    inner_depth
2077                )?;
2078                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2079                {
2080                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2081                }
2082                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2083                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2084                }
2085            }
2086
2087            next_offset += envelope_size;
2088
2089            // Decode the remaining unknown envelopes.
2090            while next_offset < end_offset {
2091                _next_ordinal_to_read += 1;
2092                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2093                next_offset += envelope_size;
2094            }
2095
2096            Ok(())
2097        }
2098    }
2099
2100    impl InspectWriterEscrowAndExitRequest {
2101        #[inline(always)]
2102        fn max_ordinal_present(&self) -> u64 {
2103            if let Some(_) = self.name {
2104                return 1;
2105            }
2106            0
2107        }
2108    }
2109
2110    impl fidl::encoding::ValueTypeMarker for InspectWriterEscrowAndExitRequest {
2111        type Borrowed<'a> = &'a Self;
2112        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2113            value
2114        }
2115    }
2116
2117    unsafe impl fidl::encoding::TypeMarker for InspectWriterEscrowAndExitRequest {
2118        type Owned = Self;
2119
2120        #[inline(always)]
2121        fn inline_align(_context: fidl::encoding::Context) -> usize {
2122            8
2123        }
2124
2125        #[inline(always)]
2126        fn inline_size(_context: fidl::encoding::Context) -> usize {
2127            16
2128        }
2129    }
2130
2131    unsafe impl<D: fidl::encoding::ResourceDialect>
2132        fidl::encoding::Encode<InspectWriterEscrowAndExitRequest, D>
2133        for &InspectWriterEscrowAndExitRequest
2134    {
2135        unsafe fn encode(
2136            self,
2137            encoder: &mut fidl::encoding::Encoder<'_, D>,
2138            offset: usize,
2139            mut depth: fidl::encoding::Depth,
2140        ) -> fidl::Result<()> {
2141            encoder.debug_check_bounds::<InspectWriterEscrowAndExitRequest>(offset);
2142            // Vector header
2143            let max_ordinal: u64 = self.max_ordinal_present();
2144            encoder.write_num(max_ordinal, offset);
2145            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2146            // Calling encoder.out_of_line_offset(0) is not allowed.
2147            if max_ordinal == 0 {
2148                return Ok(());
2149            }
2150            depth.increment()?;
2151            let envelope_size = 8;
2152            let bytes_len = max_ordinal as usize * envelope_size;
2153            #[allow(unused_variables)]
2154            let offset = encoder.out_of_line_offset(bytes_len);
2155            let mut _prev_end_offset: usize = 0;
2156            if 1 > max_ordinal {
2157                return Ok(());
2158            }
2159
2160            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2161            // are envelope_size bytes.
2162            let cur_offset: usize = (1 - 1) * envelope_size;
2163
2164            // Zero reserved fields.
2165            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2166
2167            // Safety:
2168            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2169            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2170            //   envelope_size bytes, there is always sufficient room.
2171            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
2172            self.name.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
2173            encoder, offset + cur_offset, depth
2174        )?;
2175
2176            _prev_end_offset = cur_offset + envelope_size;
2177
2178            Ok(())
2179        }
2180    }
2181
2182    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2183        for InspectWriterEscrowAndExitRequest
2184    {
2185        #[inline(always)]
2186        fn new_empty() -> Self {
2187            Self::default()
2188        }
2189
2190        unsafe fn decode(
2191            &mut self,
2192            decoder: &mut fidl::encoding::Decoder<'_, D>,
2193            offset: usize,
2194            mut depth: fidl::encoding::Depth,
2195        ) -> fidl::Result<()> {
2196            decoder.debug_check_bounds::<Self>(offset);
2197            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2198                None => return Err(fidl::Error::NotNullable),
2199                Some(len) => len,
2200            };
2201            // Calling decoder.out_of_line_offset(0) is not allowed.
2202            if len == 0 {
2203                return Ok(());
2204            };
2205            depth.increment()?;
2206            let envelope_size = 8;
2207            let bytes_len = len * envelope_size;
2208            let offset = decoder.out_of_line_offset(bytes_len)?;
2209            // Decode the envelope for each type.
2210            let mut _next_ordinal_to_read = 0;
2211            let mut next_offset = offset;
2212            let end_offset = offset + bytes_len;
2213            _next_ordinal_to_read += 1;
2214            if next_offset >= end_offset {
2215                return Ok(());
2216            }
2217
2218            // Decode unknown envelopes for gaps in ordinals.
2219            while _next_ordinal_to_read < 1 {
2220                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2221                _next_ordinal_to_read += 1;
2222                next_offset += envelope_size;
2223            }
2224
2225            let next_out_of_line = decoder.next_out_of_line();
2226            let handles_before = decoder.remaining_handles();
2227            if let Some((inlined, num_bytes, num_handles)) =
2228                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2229            {
2230                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2231                if inlined != (member_inline_size <= 4) {
2232                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2233                }
2234                let inner_offset;
2235                let mut inner_depth = depth.clone();
2236                if inlined {
2237                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2238                    inner_offset = next_offset;
2239                } else {
2240                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2241                    inner_depth.increment()?;
2242                }
2243                let val_ref = self.name.get_or_insert_with(|| {
2244                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
2245                });
2246                fidl::decode!(
2247                    fidl::encoding::BoundedString<4096>,
2248                    D,
2249                    val_ref,
2250                    decoder,
2251                    inner_offset,
2252                    inner_depth
2253                )?;
2254                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2255                {
2256                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2257                }
2258                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2259                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2260                }
2261            }
2262
2263            next_offset += envelope_size;
2264
2265            // Decode the remaining unknown envelopes.
2266            while next_offset < end_offset {
2267                _next_ordinal_to_read += 1;
2268                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2269                next_offset += envelope_size;
2270            }
2271
2272            Ok(())
2273        }
2274    }
2275
2276    impl LogPuppetLogRequest {
2277        #[inline(always)]
2278        fn max_ordinal_present(&self) -> u64 {
2279            if let Some(_) = self.time {
2280                return 3;
2281            }
2282            if let Some(_) = self.severity {
2283                return 2;
2284            }
2285            if let Some(_) = self.message {
2286                return 1;
2287            }
2288            0
2289        }
2290    }
2291
2292    impl fidl::encoding::ValueTypeMarker for LogPuppetLogRequest {
2293        type Borrowed<'a> = &'a Self;
2294        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2295            value
2296        }
2297    }
2298
2299    unsafe impl fidl::encoding::TypeMarker for LogPuppetLogRequest {
2300        type Owned = Self;
2301
2302        #[inline(always)]
2303        fn inline_align(_context: fidl::encoding::Context) -> usize {
2304            8
2305        }
2306
2307        #[inline(always)]
2308        fn inline_size(_context: fidl::encoding::Context) -> usize {
2309            16
2310        }
2311    }
2312
2313    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LogPuppetLogRequest, D>
2314        for &LogPuppetLogRequest
2315    {
2316        unsafe fn encode(
2317            self,
2318            encoder: &mut fidl::encoding::Encoder<'_, D>,
2319            offset: usize,
2320            mut depth: fidl::encoding::Depth,
2321        ) -> fidl::Result<()> {
2322            encoder.debug_check_bounds::<LogPuppetLogRequest>(offset);
2323            // Vector header
2324            let max_ordinal: u64 = self.max_ordinal_present();
2325            encoder.write_num(max_ordinal, offset);
2326            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2327            // Calling encoder.out_of_line_offset(0) is not allowed.
2328            if max_ordinal == 0 {
2329                return Ok(());
2330            }
2331            depth.increment()?;
2332            let envelope_size = 8;
2333            let bytes_len = max_ordinal as usize * envelope_size;
2334            #[allow(unused_variables)]
2335            let offset = encoder.out_of_line_offset(bytes_len);
2336            let mut _prev_end_offset: usize = 0;
2337            if 1 > max_ordinal {
2338                return Ok(());
2339            }
2340
2341            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2342            // are envelope_size bytes.
2343            let cur_offset: usize = (1 - 1) * envelope_size;
2344
2345            // Zero reserved fields.
2346            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2347
2348            // Safety:
2349            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2350            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2351            //   envelope_size bytes, there is always sufficient room.
2352            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
2353                self.message.as_ref().map(
2354                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
2355                ),
2356                encoder,
2357                offset + cur_offset,
2358                depth,
2359            )?;
2360
2361            _prev_end_offset = cur_offset + envelope_size;
2362            if 2 > max_ordinal {
2363                return Ok(());
2364            }
2365
2366            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2367            // are envelope_size bytes.
2368            let cur_offset: usize = (2 - 1) * envelope_size;
2369
2370            // Zero reserved fields.
2371            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2372
2373            // Safety:
2374            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2375            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2376            //   envelope_size bytes, there is always sufficient room.
2377            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_diagnostics_types::Severity, D>(
2378            self.severity.as_ref().map(<fidl_fuchsia_diagnostics_types::Severity as fidl::encoding::ValueTypeMarker>::borrow),
2379            encoder, offset + cur_offset, depth
2380        )?;
2381
2382            _prev_end_offset = cur_offset + envelope_size;
2383            if 3 > max_ordinal {
2384                return Ok(());
2385            }
2386
2387            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2388            // are envelope_size bytes.
2389            let cur_offset: usize = (3 - 1) * envelope_size;
2390
2391            // Zero reserved fields.
2392            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2393
2394            // Safety:
2395            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2396            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2397            //   envelope_size bytes, there is always sufficient room.
2398            fidl::encoding::encode_in_envelope_optional::<i64, D>(
2399                self.time.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
2400                encoder,
2401                offset + cur_offset,
2402                depth,
2403            )?;
2404
2405            _prev_end_offset = cur_offset + envelope_size;
2406
2407            Ok(())
2408        }
2409    }
2410
2411    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LogPuppetLogRequest {
2412        #[inline(always)]
2413        fn new_empty() -> Self {
2414            Self::default()
2415        }
2416
2417        unsafe fn decode(
2418            &mut self,
2419            decoder: &mut fidl::encoding::Decoder<'_, D>,
2420            offset: usize,
2421            mut depth: fidl::encoding::Depth,
2422        ) -> fidl::Result<()> {
2423            decoder.debug_check_bounds::<Self>(offset);
2424            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2425                None => return Err(fidl::Error::NotNullable),
2426                Some(len) => len,
2427            };
2428            // Calling decoder.out_of_line_offset(0) is not allowed.
2429            if len == 0 {
2430                return Ok(());
2431            };
2432            depth.increment()?;
2433            let envelope_size = 8;
2434            let bytes_len = len * envelope_size;
2435            let offset = decoder.out_of_line_offset(bytes_len)?;
2436            // Decode the envelope for each type.
2437            let mut _next_ordinal_to_read = 0;
2438            let mut next_offset = offset;
2439            let end_offset = offset + bytes_len;
2440            _next_ordinal_to_read += 1;
2441            if next_offset >= end_offset {
2442                return Ok(());
2443            }
2444
2445            // Decode unknown envelopes for gaps in ordinals.
2446            while _next_ordinal_to_read < 1 {
2447                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2448                _next_ordinal_to_read += 1;
2449                next_offset += envelope_size;
2450            }
2451
2452            let next_out_of_line = decoder.next_out_of_line();
2453            let handles_before = decoder.remaining_handles();
2454            if let Some((inlined, num_bytes, num_handles)) =
2455                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2456            {
2457                let member_inline_size =
2458                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
2459                        decoder.context,
2460                    );
2461                if inlined != (member_inline_size <= 4) {
2462                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2463                }
2464                let inner_offset;
2465                let mut inner_depth = depth.clone();
2466                if inlined {
2467                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2468                    inner_offset = next_offset;
2469                } else {
2470                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2471                    inner_depth.increment()?;
2472                }
2473                let val_ref = self
2474                    .message
2475                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
2476                fidl::decode!(
2477                    fidl::encoding::UnboundedString,
2478                    D,
2479                    val_ref,
2480                    decoder,
2481                    inner_offset,
2482                    inner_depth
2483                )?;
2484                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2485                {
2486                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2487                }
2488                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2489                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2490                }
2491            }
2492
2493            next_offset += envelope_size;
2494            _next_ordinal_to_read += 1;
2495            if next_offset >= end_offset {
2496                return Ok(());
2497            }
2498
2499            // Decode unknown envelopes for gaps in ordinals.
2500            while _next_ordinal_to_read < 2 {
2501                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2502                _next_ordinal_to_read += 1;
2503                next_offset += envelope_size;
2504            }
2505
2506            let next_out_of_line = decoder.next_out_of_line();
2507            let handles_before = decoder.remaining_handles();
2508            if let Some((inlined, num_bytes, num_handles)) =
2509                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2510            {
2511                let member_inline_size = <fidl_fuchsia_diagnostics_types::Severity as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2512                if inlined != (member_inline_size <= 4) {
2513                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2514                }
2515                let inner_offset;
2516                let mut inner_depth = depth.clone();
2517                if inlined {
2518                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2519                    inner_offset = next_offset;
2520                } else {
2521                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2522                    inner_depth.increment()?;
2523                }
2524                let val_ref = self.severity.get_or_insert_with(|| {
2525                    fidl::new_empty!(fidl_fuchsia_diagnostics_types::Severity, D)
2526                });
2527                fidl::decode!(
2528                    fidl_fuchsia_diagnostics_types::Severity,
2529                    D,
2530                    val_ref,
2531                    decoder,
2532                    inner_offset,
2533                    inner_depth
2534                )?;
2535                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2536                {
2537                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2538                }
2539                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2540                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2541                }
2542            }
2543
2544            next_offset += envelope_size;
2545            _next_ordinal_to_read += 1;
2546            if next_offset >= end_offset {
2547                return Ok(());
2548            }
2549
2550            // Decode unknown envelopes for gaps in ordinals.
2551            while _next_ordinal_to_read < 3 {
2552                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2553                _next_ordinal_to_read += 1;
2554                next_offset += envelope_size;
2555            }
2556
2557            let next_out_of_line = decoder.next_out_of_line();
2558            let handles_before = decoder.remaining_handles();
2559            if let Some((inlined, num_bytes, num_handles)) =
2560                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2561            {
2562                let member_inline_size =
2563                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2564                if inlined != (member_inline_size <= 4) {
2565                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2566                }
2567                let inner_offset;
2568                let mut inner_depth = depth.clone();
2569                if inlined {
2570                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2571                    inner_offset = next_offset;
2572                } else {
2573                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2574                    inner_depth.increment()?;
2575                }
2576                let val_ref = self.time.get_or_insert_with(|| fidl::new_empty!(i64, D));
2577                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
2578                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2579                {
2580                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2581                }
2582                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2583                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2584                }
2585            }
2586
2587            next_offset += envelope_size;
2588
2589            // Decode the remaining unknown envelopes.
2590            while next_offset < end_offset {
2591                _next_ordinal_to_read += 1;
2592                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2593                next_offset += envelope_size;
2594            }
2595
2596            Ok(())
2597        }
2598    }
2599
2600    impl LogPuppetWaitForInterestChangeResponse {
2601        #[inline(always)]
2602        fn max_ordinal_present(&self) -> u64 {
2603            if let Some(_) = self.severity {
2604                return 1;
2605            }
2606            0
2607        }
2608    }
2609
2610    impl fidl::encoding::ValueTypeMarker for LogPuppetWaitForInterestChangeResponse {
2611        type Borrowed<'a> = &'a Self;
2612        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2613            value
2614        }
2615    }
2616
2617    unsafe impl fidl::encoding::TypeMarker for LogPuppetWaitForInterestChangeResponse {
2618        type Owned = Self;
2619
2620        #[inline(always)]
2621        fn inline_align(_context: fidl::encoding::Context) -> usize {
2622            8
2623        }
2624
2625        #[inline(always)]
2626        fn inline_size(_context: fidl::encoding::Context) -> usize {
2627            16
2628        }
2629    }
2630
2631    unsafe impl<D: fidl::encoding::ResourceDialect>
2632        fidl::encoding::Encode<LogPuppetWaitForInterestChangeResponse, D>
2633        for &LogPuppetWaitForInterestChangeResponse
2634    {
2635        unsafe fn encode(
2636            self,
2637            encoder: &mut fidl::encoding::Encoder<'_, D>,
2638            offset: usize,
2639            mut depth: fidl::encoding::Depth,
2640        ) -> fidl::Result<()> {
2641            encoder.debug_check_bounds::<LogPuppetWaitForInterestChangeResponse>(offset);
2642            // Vector header
2643            let max_ordinal: u64 = self.max_ordinal_present();
2644            encoder.write_num(max_ordinal, offset);
2645            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2646            // Calling encoder.out_of_line_offset(0) is not allowed.
2647            if max_ordinal == 0 {
2648                return Ok(());
2649            }
2650            depth.increment()?;
2651            let envelope_size = 8;
2652            let bytes_len = max_ordinal as usize * envelope_size;
2653            #[allow(unused_variables)]
2654            let offset = encoder.out_of_line_offset(bytes_len);
2655            let mut _prev_end_offset: usize = 0;
2656            if 1 > max_ordinal {
2657                return Ok(());
2658            }
2659
2660            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2661            // are envelope_size bytes.
2662            let cur_offset: usize = (1 - 1) * envelope_size;
2663
2664            // Zero reserved fields.
2665            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2666
2667            // Safety:
2668            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2669            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2670            //   envelope_size bytes, there is always sufficient room.
2671            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_diagnostics_types::Severity, D>(
2672            self.severity.as_ref().map(<fidl_fuchsia_diagnostics_types::Severity as fidl::encoding::ValueTypeMarker>::borrow),
2673            encoder, offset + cur_offset, depth
2674        )?;
2675
2676            _prev_end_offset = cur_offset + envelope_size;
2677
2678            Ok(())
2679        }
2680    }
2681
2682    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2683        for LogPuppetWaitForInterestChangeResponse
2684    {
2685        #[inline(always)]
2686        fn new_empty() -> Self {
2687            Self::default()
2688        }
2689
2690        unsafe fn decode(
2691            &mut self,
2692            decoder: &mut fidl::encoding::Decoder<'_, D>,
2693            offset: usize,
2694            mut depth: fidl::encoding::Depth,
2695        ) -> fidl::Result<()> {
2696            decoder.debug_check_bounds::<Self>(offset);
2697            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2698                None => return Err(fidl::Error::NotNullable),
2699                Some(len) => len,
2700            };
2701            // Calling decoder.out_of_line_offset(0) is not allowed.
2702            if len == 0 {
2703                return Ok(());
2704            };
2705            depth.increment()?;
2706            let envelope_size = 8;
2707            let bytes_len = len * envelope_size;
2708            let offset = decoder.out_of_line_offset(bytes_len)?;
2709            // Decode the envelope for each type.
2710            let mut _next_ordinal_to_read = 0;
2711            let mut next_offset = offset;
2712            let end_offset = offset + bytes_len;
2713            _next_ordinal_to_read += 1;
2714            if next_offset >= end_offset {
2715                return Ok(());
2716            }
2717
2718            // Decode unknown envelopes for gaps in ordinals.
2719            while _next_ordinal_to_read < 1 {
2720                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2721                _next_ordinal_to_read += 1;
2722                next_offset += envelope_size;
2723            }
2724
2725            let next_out_of_line = decoder.next_out_of_line();
2726            let handles_before = decoder.remaining_handles();
2727            if let Some((inlined, num_bytes, num_handles)) =
2728                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2729            {
2730                let member_inline_size = <fidl_fuchsia_diagnostics_types::Severity as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2731                if inlined != (member_inline_size <= 4) {
2732                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2733                }
2734                let inner_offset;
2735                let mut inner_depth = depth.clone();
2736                if inlined {
2737                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2738                    inner_offset = next_offset;
2739                } else {
2740                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2741                    inner_depth.increment()?;
2742                }
2743                let val_ref = self.severity.get_or_insert_with(|| {
2744                    fidl::new_empty!(fidl_fuchsia_diagnostics_types::Severity, D)
2745                });
2746                fidl::decode!(
2747                    fidl_fuchsia_diagnostics_types::Severity,
2748                    D,
2749                    val_ref,
2750                    decoder,
2751                    inner_offset,
2752                    inner_depth
2753                )?;
2754                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2755                {
2756                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2757                }
2758                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2759                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2760                }
2761            }
2762
2763            next_offset += envelope_size;
2764
2765            // Decode the remaining unknown envelopes.
2766            while next_offset < end_offset {
2767                _next_ordinal_to_read += 1;
2768                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2769                next_offset += envelope_size;
2770            }
2771
2772            Ok(())
2773        }
2774    }
2775
2776    impl PuppetDecl {
2777        #[inline(always)]
2778        fn max_ordinal_present(&self) -> u64 {
2779            if let Some(_) = self.name {
2780                return 1;
2781            }
2782            0
2783        }
2784    }
2785
2786    impl fidl::encoding::ValueTypeMarker for PuppetDecl {
2787        type Borrowed<'a> = &'a Self;
2788        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2789            value
2790        }
2791    }
2792
2793    unsafe impl fidl::encoding::TypeMarker for PuppetDecl {
2794        type Owned = Self;
2795
2796        #[inline(always)]
2797        fn inline_align(_context: fidl::encoding::Context) -> usize {
2798            8
2799        }
2800
2801        #[inline(always)]
2802        fn inline_size(_context: fidl::encoding::Context) -> usize {
2803            16
2804        }
2805    }
2806
2807    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PuppetDecl, D>
2808        for &PuppetDecl
2809    {
2810        unsafe fn encode(
2811            self,
2812            encoder: &mut fidl::encoding::Encoder<'_, D>,
2813            offset: usize,
2814            mut depth: fidl::encoding::Depth,
2815        ) -> fidl::Result<()> {
2816            encoder.debug_check_bounds::<PuppetDecl>(offset);
2817            // Vector header
2818            let max_ordinal: u64 = self.max_ordinal_present();
2819            encoder.write_num(max_ordinal, offset);
2820            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2821            // Calling encoder.out_of_line_offset(0) is not allowed.
2822            if max_ordinal == 0 {
2823                return Ok(());
2824            }
2825            depth.increment()?;
2826            let envelope_size = 8;
2827            let bytes_len = max_ordinal as usize * envelope_size;
2828            #[allow(unused_variables)]
2829            let offset = encoder.out_of_line_offset(bytes_len);
2830            let mut _prev_end_offset: usize = 0;
2831            if 1 > max_ordinal {
2832                return Ok(());
2833            }
2834
2835            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2836            // are envelope_size bytes.
2837            let cur_offset: usize = (1 - 1) * envelope_size;
2838
2839            // Zero reserved fields.
2840            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2841
2842            // Safety:
2843            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2844            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2845            //   envelope_size bytes, there is always sufficient room.
2846            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<1024>, D>(
2847            self.name.as_ref().map(<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow),
2848            encoder, offset + cur_offset, depth
2849        )?;
2850
2851            _prev_end_offset = cur_offset + envelope_size;
2852
2853            Ok(())
2854        }
2855    }
2856
2857    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PuppetDecl {
2858        #[inline(always)]
2859        fn new_empty() -> Self {
2860            Self::default()
2861        }
2862
2863        unsafe fn decode(
2864            &mut self,
2865            decoder: &mut fidl::encoding::Decoder<'_, D>,
2866            offset: usize,
2867            mut depth: fidl::encoding::Depth,
2868        ) -> fidl::Result<()> {
2869            decoder.debug_check_bounds::<Self>(offset);
2870            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2871                None => return Err(fidl::Error::NotNullable),
2872                Some(len) => len,
2873            };
2874            // Calling decoder.out_of_line_offset(0) is not allowed.
2875            if len == 0 {
2876                return Ok(());
2877            };
2878            depth.increment()?;
2879            let envelope_size = 8;
2880            let bytes_len = len * envelope_size;
2881            let offset = decoder.out_of_line_offset(bytes_len)?;
2882            // Decode the envelope for each type.
2883            let mut _next_ordinal_to_read = 0;
2884            let mut next_offset = offset;
2885            let end_offset = offset + bytes_len;
2886            _next_ordinal_to_read += 1;
2887            if next_offset >= end_offset {
2888                return Ok(());
2889            }
2890
2891            // Decode unknown envelopes for gaps in ordinals.
2892            while _next_ordinal_to_read < 1 {
2893                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2894                _next_ordinal_to_read += 1;
2895                next_offset += envelope_size;
2896            }
2897
2898            let next_out_of_line = decoder.next_out_of_line();
2899            let handles_before = decoder.remaining_handles();
2900            if let Some((inlined, num_bytes, num_handles)) =
2901                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2902            {
2903                let member_inline_size = <fidl::encoding::BoundedString<1024> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2904                if inlined != (member_inline_size <= 4) {
2905                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2906                }
2907                let inner_offset;
2908                let mut inner_depth = depth.clone();
2909                if inlined {
2910                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2911                    inner_offset = next_offset;
2912                } else {
2913                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2914                    inner_depth.increment()?;
2915                }
2916                let val_ref = self.name.get_or_insert_with(|| {
2917                    fidl::new_empty!(fidl::encoding::BoundedString<1024>, D)
2918                });
2919                fidl::decode!(
2920                    fidl::encoding::BoundedString<1024>,
2921                    D,
2922                    val_ref,
2923                    decoder,
2924                    inner_offset,
2925                    inner_depth
2926                )?;
2927                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2928                {
2929                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2930                }
2931                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2932                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2933                }
2934            }
2935
2936            next_offset += envelope_size;
2937
2938            // Decode the remaining unknown envelopes.
2939            while next_offset < end_offset {
2940                _next_ordinal_to_read += 1;
2941                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2942                next_offset += envelope_size;
2943            }
2944
2945            Ok(())
2946        }
2947    }
2948
2949    impl RealmOptions {
2950        #[inline(always)]
2951        fn max_ordinal_present(&self) -> u64 {
2952            if let Some(_) = self.archivist_config {
2953                return 3;
2954            }
2955            if let Some(_) = self.puppets {
2956                return 2;
2957            }
2958            if let Some(_) = self.realm_name {
2959                return 1;
2960            }
2961            0
2962        }
2963    }
2964
2965    impl fidl::encoding::ValueTypeMarker for RealmOptions {
2966        type Borrowed<'a> = &'a Self;
2967        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2968            value
2969        }
2970    }
2971
2972    unsafe impl fidl::encoding::TypeMarker for RealmOptions {
2973        type Owned = Self;
2974
2975        #[inline(always)]
2976        fn inline_align(_context: fidl::encoding::Context) -> usize {
2977            8
2978        }
2979
2980        #[inline(always)]
2981        fn inline_size(_context: fidl::encoding::Context) -> usize {
2982            16
2983        }
2984    }
2985
2986    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RealmOptions, D>
2987        for &RealmOptions
2988    {
2989        unsafe fn encode(
2990            self,
2991            encoder: &mut fidl::encoding::Encoder<'_, D>,
2992            offset: usize,
2993            mut depth: fidl::encoding::Depth,
2994        ) -> fidl::Result<()> {
2995            encoder.debug_check_bounds::<RealmOptions>(offset);
2996            // Vector header
2997            let max_ordinal: u64 = self.max_ordinal_present();
2998            encoder.write_num(max_ordinal, offset);
2999            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3000            // Calling encoder.out_of_line_offset(0) is not allowed.
3001            if max_ordinal == 0 {
3002                return Ok(());
3003            }
3004            depth.increment()?;
3005            let envelope_size = 8;
3006            let bytes_len = max_ordinal as usize * envelope_size;
3007            #[allow(unused_variables)]
3008            let offset = encoder.out_of_line_offset(bytes_len);
3009            let mut _prev_end_offset: usize = 0;
3010            if 1 > max_ordinal {
3011                return Ok(());
3012            }
3013
3014            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3015            // are envelope_size bytes.
3016            let cur_offset: usize = (1 - 1) * envelope_size;
3017
3018            // Zero reserved fields.
3019            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3020
3021            // Safety:
3022            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3023            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3024            //   envelope_size bytes, there is always sufficient room.
3025            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<255>, D>(
3026                self.realm_name.as_ref().map(
3027                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow,
3028                ),
3029                encoder,
3030                offset + cur_offset,
3031                depth,
3032            )?;
3033
3034            _prev_end_offset = cur_offset + envelope_size;
3035            if 2 > max_ordinal {
3036                return Ok(());
3037            }
3038
3039            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3040            // are envelope_size bytes.
3041            let cur_offset: usize = (2 - 1) * envelope_size;
3042
3043            // Zero reserved fields.
3044            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3045
3046            // Safety:
3047            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3048            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3049            //   envelope_size bytes, there is always sufficient room.
3050            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<PuppetDecl>, D>(
3051            self.puppets.as_ref().map(<fidl::encoding::UnboundedVector<PuppetDecl> as fidl::encoding::ValueTypeMarker>::borrow),
3052            encoder, offset + cur_offset, depth
3053        )?;
3054
3055            _prev_end_offset = cur_offset + envelope_size;
3056            if 3 > max_ordinal {
3057                return Ok(());
3058            }
3059
3060            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3061            // are envelope_size bytes.
3062            let cur_offset: usize = (3 - 1) * envelope_size;
3063
3064            // Zero reserved fields.
3065            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3066
3067            // Safety:
3068            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3069            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3070            //   envelope_size bytes, there is always sufficient room.
3071            fidl::encoding::encode_in_envelope_optional::<ArchivistConfig, D>(
3072                self.archivist_config
3073                    .as_ref()
3074                    .map(<ArchivistConfig as fidl::encoding::ValueTypeMarker>::borrow),
3075                encoder,
3076                offset + cur_offset,
3077                depth,
3078            )?;
3079
3080            _prev_end_offset = cur_offset + envelope_size;
3081
3082            Ok(())
3083        }
3084    }
3085
3086    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RealmOptions {
3087        #[inline(always)]
3088        fn new_empty() -> Self {
3089            Self::default()
3090        }
3091
3092        unsafe fn decode(
3093            &mut self,
3094            decoder: &mut fidl::encoding::Decoder<'_, D>,
3095            offset: usize,
3096            mut depth: fidl::encoding::Depth,
3097        ) -> fidl::Result<()> {
3098            decoder.debug_check_bounds::<Self>(offset);
3099            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3100                None => return Err(fidl::Error::NotNullable),
3101                Some(len) => len,
3102            };
3103            // Calling decoder.out_of_line_offset(0) is not allowed.
3104            if len == 0 {
3105                return Ok(());
3106            };
3107            depth.increment()?;
3108            let envelope_size = 8;
3109            let bytes_len = len * envelope_size;
3110            let offset = decoder.out_of_line_offset(bytes_len)?;
3111            // Decode the envelope for each type.
3112            let mut _next_ordinal_to_read = 0;
3113            let mut next_offset = offset;
3114            let end_offset = offset + bytes_len;
3115            _next_ordinal_to_read += 1;
3116            if next_offset >= end_offset {
3117                return Ok(());
3118            }
3119
3120            // Decode unknown envelopes for gaps in ordinals.
3121            while _next_ordinal_to_read < 1 {
3122                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3123                _next_ordinal_to_read += 1;
3124                next_offset += envelope_size;
3125            }
3126
3127            let next_out_of_line = decoder.next_out_of_line();
3128            let handles_before = decoder.remaining_handles();
3129            if let Some((inlined, num_bytes, num_handles)) =
3130                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3131            {
3132                let member_inline_size =
3133                    <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
3134                        decoder.context,
3135                    );
3136                if inlined != (member_inline_size <= 4) {
3137                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3138                }
3139                let inner_offset;
3140                let mut inner_depth = depth.clone();
3141                if inlined {
3142                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3143                    inner_offset = next_offset;
3144                } else {
3145                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3146                    inner_depth.increment()?;
3147                }
3148                let val_ref = self
3149                    .realm_name
3150                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<255>, D));
3151                fidl::decode!(
3152                    fidl::encoding::BoundedString<255>,
3153                    D,
3154                    val_ref,
3155                    decoder,
3156                    inner_offset,
3157                    inner_depth
3158                )?;
3159                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3160                {
3161                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3162                }
3163                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3164                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3165                }
3166            }
3167
3168            next_offset += envelope_size;
3169            _next_ordinal_to_read += 1;
3170            if next_offset >= end_offset {
3171                return Ok(());
3172            }
3173
3174            // Decode unknown envelopes for gaps in ordinals.
3175            while _next_ordinal_to_read < 2 {
3176                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3177                _next_ordinal_to_read += 1;
3178                next_offset += envelope_size;
3179            }
3180
3181            let next_out_of_line = decoder.next_out_of_line();
3182            let handles_before = decoder.remaining_handles();
3183            if let Some((inlined, num_bytes, num_handles)) =
3184                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3185            {
3186                let member_inline_size = <fidl::encoding::UnboundedVector<PuppetDecl> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3187                if inlined != (member_inline_size <= 4) {
3188                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3189                }
3190                let inner_offset;
3191                let mut inner_depth = depth.clone();
3192                if inlined {
3193                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3194                    inner_offset = next_offset;
3195                } else {
3196                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3197                    inner_depth.increment()?;
3198                }
3199                let val_ref = self.puppets.get_or_insert_with(|| {
3200                    fidl::new_empty!(fidl::encoding::UnboundedVector<PuppetDecl>, D)
3201                });
3202                fidl::decode!(
3203                    fidl::encoding::UnboundedVector<PuppetDecl>,
3204                    D,
3205                    val_ref,
3206                    decoder,
3207                    inner_offset,
3208                    inner_depth
3209                )?;
3210                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3211                {
3212                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3213                }
3214                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3215                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3216                }
3217            }
3218
3219            next_offset += envelope_size;
3220            _next_ordinal_to_read += 1;
3221            if next_offset >= end_offset {
3222                return Ok(());
3223            }
3224
3225            // Decode unknown envelopes for gaps in ordinals.
3226            while _next_ordinal_to_read < 3 {
3227                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3228                _next_ordinal_to_read += 1;
3229                next_offset += envelope_size;
3230            }
3231
3232            let next_out_of_line = decoder.next_out_of_line();
3233            let handles_before = decoder.remaining_handles();
3234            if let Some((inlined, num_bytes, num_handles)) =
3235                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3236            {
3237                let member_inline_size =
3238                    <ArchivistConfig as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3239                if inlined != (member_inline_size <= 4) {
3240                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3241                }
3242                let inner_offset;
3243                let mut inner_depth = depth.clone();
3244                if inlined {
3245                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3246                    inner_offset = next_offset;
3247                } else {
3248                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3249                    inner_depth.increment()?;
3250                }
3251                let val_ref = self
3252                    .archivist_config
3253                    .get_or_insert_with(|| fidl::new_empty!(ArchivistConfig, D));
3254                fidl::decode!(ArchivistConfig, D, val_ref, decoder, inner_offset, inner_depth)?;
3255                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3256                {
3257                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3258                }
3259                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3260                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3261                }
3262            }
3263
3264            next_offset += envelope_size;
3265
3266            // Decode the remaining unknown envelopes.
3267            while next_offset < end_offset {
3268                _next_ordinal_to_read += 1;
3269                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3270                next_offset += envelope_size;
3271            }
3272
3273            Ok(())
3274        }
3275    }
3276}