Skip to main content

fidl_next_common_fuchsia_diagnostics/
fidl_next_common_fuchsia_diagnostics.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    pub type All = ();
8
9    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10    #[repr(u8)]
11    pub enum DataType {
12        Inspect = 1,
13        Logs = 3,
14    }
15    impl ::core::convert::TryFrom<u8> for DataType {
16        type Error = ::fidl_next::UnknownStrictEnumMemberError;
17        fn try_from(
18            value: u8,
19        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
20            match value {
21                1 => Ok(Self::Inspect),
22                3 => Ok(Self::Logs),
23
24                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
25            }
26        }
27    }
28
29    impl ::std::convert::From<DataType> for u8 {
30        fn from(value: DataType) -> Self {
31            match value {
32                DataType::Inspect => 1,
33                DataType::Logs => 3,
34            }
35        }
36    }
37
38    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DataType, ___E> for DataType
39    where
40        ___E: ?Sized,
41    {
42        #[inline]
43        fn encode(
44            self,
45            encoder: &mut ___E,
46            out: &mut ::core::mem::MaybeUninit<crate::wire::DataType>,
47            _: (),
48        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
49            ::fidl_next::Encode::encode(&self, encoder, out, ())
50        }
51    }
52
53    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DataType, ___E> for &'a DataType
54    where
55        ___E: ?Sized,
56    {
57        #[inline]
58        fn encode(
59            self,
60            encoder: &mut ___E,
61            out: &mut ::core::mem::MaybeUninit<crate::wire::DataType>,
62            _: (),
63        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
64            ::fidl_next::munge!(let crate::wire::DataType { value } = out);
65            let _ = value.write(u8::from(match *self {
66                DataType::Inspect => 1,
67
68                DataType::Logs => 3,
69            }));
70
71            Ok(())
72        }
73    }
74
75    impl ::core::convert::From<crate::wire::DataType> for DataType {
76        fn from(wire: crate::wire::DataType) -> Self {
77            match u8::from(wire.value) {
78                1 => Self::Inspect,
79
80                3 => Self::Logs,
81
82                _ => unsafe { ::core::hint::unreachable_unchecked() },
83            }
84        }
85    }
86
87    impl ::fidl_next::FromWire<crate::wire::DataType> for DataType {
88        #[inline]
89        fn from_wire(wire: crate::wire::DataType) -> Self {
90            Self::from(wire)
91        }
92    }
93
94    impl ::fidl_next::FromWireRef<crate::wire::DataType> for DataType {
95        #[inline]
96        fn from_wire_ref(wire: &crate::wire::DataType) -> Self {
97            Self::from(*wire)
98        }
99    }
100
101    #[doc = " Enum specifying the modes by which a user can connect to and stream diagnostics metrics.\n"]
102    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
103    #[repr(u8)]
104    pub enum StreamMode {
105        Snapshot = 1,
106        SnapshotThenSubscribe = 2,
107        Subscribe = 3,
108    }
109    impl ::core::convert::TryFrom<u8> for StreamMode {
110        type Error = ::fidl_next::UnknownStrictEnumMemberError;
111        fn try_from(
112            value: u8,
113        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
114            match value {
115                1 => Ok(Self::Snapshot),
116                2 => Ok(Self::SnapshotThenSubscribe),
117                3 => Ok(Self::Subscribe),
118
119                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
120            }
121        }
122    }
123
124    impl ::std::convert::From<StreamMode> for u8 {
125        fn from(value: StreamMode) -> Self {
126            match value {
127                StreamMode::Snapshot => 1,
128                StreamMode::SnapshotThenSubscribe => 2,
129                StreamMode::Subscribe => 3,
130            }
131        }
132    }
133
134    unsafe impl<___E> ::fidl_next::Encode<crate::wire::StreamMode, ___E> for StreamMode
135    where
136        ___E: ?Sized,
137    {
138        #[inline]
139        fn encode(
140            self,
141            encoder: &mut ___E,
142            out: &mut ::core::mem::MaybeUninit<crate::wire::StreamMode>,
143            _: (),
144        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
145            ::fidl_next::Encode::encode(&self, encoder, out, ())
146        }
147    }
148
149    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StreamMode, ___E> for &'a StreamMode
150    where
151        ___E: ?Sized,
152    {
153        #[inline]
154        fn encode(
155            self,
156            encoder: &mut ___E,
157            out: &mut ::core::mem::MaybeUninit<crate::wire::StreamMode>,
158            _: (),
159        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
160            ::fidl_next::munge!(let crate::wire::StreamMode { value } = out);
161            let _ = value.write(u8::from(match *self {
162                StreamMode::Snapshot => 1,
163
164                StreamMode::SnapshotThenSubscribe => 2,
165
166                StreamMode::Subscribe => 3,
167            }));
168
169            Ok(())
170        }
171    }
172
173    impl ::core::convert::From<crate::wire::StreamMode> for StreamMode {
174        fn from(wire: crate::wire::StreamMode) -> Self {
175            match u8::from(wire.value) {
176                1 => Self::Snapshot,
177
178                2 => Self::SnapshotThenSubscribe,
179
180                3 => Self::Subscribe,
181
182                _ => unsafe { ::core::hint::unreachable_unchecked() },
183            }
184        }
185    }
186
187    impl ::fidl_next::FromWire<crate::wire::StreamMode> for StreamMode {
188        #[inline]
189        fn from_wire(wire: crate::wire::StreamMode) -> Self {
190            Self::from(wire)
191        }
192    }
193
194    impl ::fidl_next::FromWireRef<crate::wire::StreamMode> for StreamMode {
195        #[inline]
196        fn from_wire_ref(wire: &crate::wire::StreamMode) -> Self {
197            Self::from(*wire)
198        }
199    }
200
201    #[doc = " Parameters which configure a diagnostics stream\'s performance properties.\n"]
202    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
203    pub struct PerformanceConfiguration {
204        pub max_aggregate_content_size_bytes: ::core::option::Option<u64>,
205
206        pub batch_retrieval_timeout_seconds: ::core::option::Option<i64>,
207    }
208
209    impl PerformanceConfiguration {
210        fn __max_ordinal(&self) -> usize {
211            if self.batch_retrieval_timeout_seconds.is_some() {
212                return 2;
213            }
214
215            if self.max_aggregate_content_size_bytes.is_some() {
216                return 1;
217            }
218
219            0
220        }
221    }
222
223    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PerformanceConfiguration<'static>, ___E>
224        for PerformanceConfiguration
225    where
226        ___E: ::fidl_next::Encoder + ?Sized,
227    {
228        #[inline]
229        fn encode(
230            mut self,
231            encoder: &mut ___E,
232            out: &mut ::core::mem::MaybeUninit<crate::wire::PerformanceConfiguration<'static>>,
233            _: (),
234        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
235            ::fidl_next::munge!(let crate::wire::PerformanceConfiguration { table } = out);
236
237            let max_ord = self.__max_ordinal();
238
239            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
240            ::fidl_next::Wire::zero_padding(&mut out);
241
242            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
243                ::fidl_next::wire::Envelope,
244            >(encoder, max_ord);
245
246            for i in 1..=max_ord {
247                match i {
248                    2 => {
249                        if let Some(value) = self.batch_retrieval_timeout_seconds.take() {
250                            ::fidl_next::wire::Envelope::encode_value::<
251                                ::fidl_next::wire::Int64,
252                                ___E,
253                            >(
254                                value, preallocated.encoder, &mut out, ()
255                            )?;
256                        } else {
257                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
258                        }
259                    }
260
261                    1 => {
262                        if let Some(value) = self.max_aggregate_content_size_bytes.take() {
263                            ::fidl_next::wire::Envelope::encode_value::<
264                                ::fidl_next::wire::Uint64,
265                                ___E,
266                            >(
267                                value, preallocated.encoder, &mut out, ()
268                            )?;
269                        } else {
270                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
271                        }
272                    }
273
274                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
275                }
276                unsafe {
277                    preallocated.write_next(out.assume_init_ref());
278                }
279            }
280
281            ::fidl_next::wire::Table::encode_len(table, max_ord);
282
283            Ok(())
284        }
285    }
286
287    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PerformanceConfiguration<'static>, ___E>
288        for &'a PerformanceConfiguration
289    where
290        ___E: ::fidl_next::Encoder + ?Sized,
291    {
292        #[inline]
293        fn encode(
294            self,
295            encoder: &mut ___E,
296            out: &mut ::core::mem::MaybeUninit<crate::wire::PerformanceConfiguration<'static>>,
297            _: (),
298        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
299            ::fidl_next::munge!(let crate::wire::PerformanceConfiguration { table } = out);
300
301            let max_ord = self.__max_ordinal();
302
303            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
304            ::fidl_next::Wire::zero_padding(&mut out);
305
306            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
307                ::fidl_next::wire::Envelope,
308            >(encoder, max_ord);
309
310            for i in 1..=max_ord {
311                match i {
312                    2 => {
313                        if let Some(value) = &self.batch_retrieval_timeout_seconds {
314                            ::fidl_next::wire::Envelope::encode_value::<
315                                ::fidl_next::wire::Int64,
316                                ___E,
317                            >(
318                                value, preallocated.encoder, &mut out, ()
319                            )?;
320                        } else {
321                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
322                        }
323                    }
324
325                    1 => {
326                        if let Some(value) = &self.max_aggregate_content_size_bytes {
327                            ::fidl_next::wire::Envelope::encode_value::<
328                                ::fidl_next::wire::Uint64,
329                                ___E,
330                            >(
331                                value, preallocated.encoder, &mut out, ()
332                            )?;
333                        } else {
334                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
335                        }
336                    }
337
338                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
339                }
340                unsafe {
341                    preallocated.write_next(out.assume_init_ref());
342                }
343            }
344
345            ::fidl_next::wire::Table::encode_len(table, max_ord);
346
347            Ok(())
348        }
349    }
350
351    impl<'de> ::fidl_next::FromWire<crate::wire::PerformanceConfiguration<'de>>
352        for PerformanceConfiguration
353    {
354        #[inline]
355        fn from_wire(wire_: crate::wire::PerformanceConfiguration<'de>) -> Self {
356            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
357
358            let max_aggregate_content_size_bytes = wire_.table.get(1);
359
360            let batch_retrieval_timeout_seconds = wire_.table.get(2);
361
362            Self {
363                max_aggregate_content_size_bytes: max_aggregate_content_size_bytes.map(
364                    |envelope| {
365                        ::fidl_next::FromWire::from_wire(unsafe {
366                            envelope.read_unchecked::<::fidl_next::wire::Uint64>()
367                        })
368                    },
369                ),
370
371                batch_retrieval_timeout_seconds: batch_retrieval_timeout_seconds.map(|envelope| {
372                    ::fidl_next::FromWire::from_wire(unsafe {
373                        envelope.read_unchecked::<::fidl_next::wire::Int64>()
374                    })
375                }),
376            }
377        }
378    }
379
380    impl<'de> ::fidl_next::FromWireRef<crate::wire::PerformanceConfiguration<'de>>
381        for PerformanceConfiguration
382    {
383        #[inline]
384        fn from_wire_ref(wire: &crate::wire::PerformanceConfiguration<'de>) -> Self {
385            Self {
386                max_aggregate_content_size_bytes: wire.table.get(1).map(|envelope| {
387                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
388                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
389                    })
390                }),
391
392                batch_retrieval_timeout_seconds: wire.table.get(2).map(|envelope| {
393                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
394                        envelope.deref_unchecked::<::fidl_next::wire::Int64>()
395                    })
396                }),
397            }
398        }
399    }
400
401    #[doc = " StringSelector is an union defining different ways to describe a pattern to match\n strings against.\n"]
402    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
403    pub enum StringSelector {
404        StringPattern(::std::string::String),
405
406        ExactMatch(::std::string::String),
407
408        UnknownOrdinal_(u64),
409    }
410
411    impl StringSelector {
412        pub fn is_unknown(&self) -> bool {
413            #[allow(unreachable_patterns)]
414            match self {
415                Self::UnknownOrdinal_(_) => true,
416                _ => false,
417            }
418        }
419    }
420
421    unsafe impl<___E> ::fidl_next::Encode<crate::wire::StringSelector<'static>, ___E> for StringSelector
422    where
423        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
424        ___E: ::fidl_next::Encoder,
425    {
426        #[inline]
427        fn encode(
428            self,
429            encoder: &mut ___E,
430            out: &mut ::core::mem::MaybeUninit<crate::wire::StringSelector<'static>>,
431            _: (),
432        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
433            ::fidl_next::munge!(let crate::wire::StringSelector { raw, _phantom: _ } = out);
434
435            match self {
436                Self::StringPattern(value) => ::fidl_next::wire::Union::encode_as::<
437                    ___E,
438                    ::fidl_next::wire::String<'static>,
439                >(value, 1, encoder, raw, 1024)?,
440
441                Self::ExactMatch(value) => ::fidl_next::wire::Union::encode_as::<
442                    ___E,
443                    ::fidl_next::wire::String<'static>,
444                >(value, 2, encoder, raw, 1024)?,
445
446                Self::UnknownOrdinal_(ordinal) => {
447                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
448                }
449            }
450
451            Ok(())
452        }
453    }
454
455    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StringSelector<'static>, ___E>
456        for &'a StringSelector
457    where
458        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
459        ___E: ::fidl_next::Encoder,
460    {
461        #[inline]
462        fn encode(
463            self,
464            encoder: &mut ___E,
465            out: &mut ::core::mem::MaybeUninit<crate::wire::StringSelector<'static>>,
466            _: (),
467        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
468            ::fidl_next::munge!(let crate::wire::StringSelector { raw, _phantom: _ } = out);
469
470            match self {
471                StringSelector::StringPattern(value) => {
472                    ::fidl_next::wire::Union::encode_as::<___E, ::fidl_next::wire::String<'static>>(
473                        value, 1, encoder, raw, 1024,
474                    )?
475                }
476
477                StringSelector::ExactMatch(value) => {
478                    ::fidl_next::wire::Union::encode_as::<___E, ::fidl_next::wire::String<'static>>(
479                        value, 2, encoder, raw, 1024,
480                    )?
481                }
482
483                StringSelector::UnknownOrdinal_(ordinal) => {
484                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
485                }
486            }
487
488            Ok(())
489        }
490    }
491
492    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::StringSelector<'static>, ___E>
493        for StringSelector
494    where
495        ___E: ?Sized,
496        StringSelector: ::fidl_next::Encode<crate::wire::StringSelector<'static>, ___E>,
497    {
498        #[inline]
499        fn encode_option(
500            this: ::core::option::Option<Self>,
501            encoder: &mut ___E,
502            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::StringSelector<'static>>,
503            _: (),
504        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
505            ::fidl_next::munge!(let crate::wire_optional::StringSelector { raw, _phantom: _ } = &mut *out);
506
507            if let Some(inner) = this {
508                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
509                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
510            } else {
511                ::fidl_next::wire::Union::encode_absent(raw);
512            }
513
514            Ok(())
515        }
516    }
517
518    unsafe impl<'a, ___E>
519        ::fidl_next::EncodeOption<crate::wire_optional::StringSelector<'static>, ___E>
520        for &'a StringSelector
521    where
522        ___E: ?Sized,
523        &'a StringSelector: ::fidl_next::Encode<crate::wire::StringSelector<'static>, ___E>,
524    {
525        #[inline]
526        fn encode_option(
527            this: ::core::option::Option<Self>,
528            encoder: &mut ___E,
529            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::StringSelector<'static>>,
530            _: (),
531        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
532            ::fidl_next::munge!(let crate::wire_optional::StringSelector { raw, _phantom: _ } = &mut *out);
533
534            if let Some(inner) = this {
535                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
536                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
537            } else {
538                ::fidl_next::wire::Union::encode_absent(raw);
539            }
540
541            Ok(())
542        }
543    }
544
545    impl<'de> ::fidl_next::FromWire<crate::wire::StringSelector<'de>> for StringSelector {
546        #[inline]
547        fn from_wire(wire: crate::wire::StringSelector<'de>) -> Self {
548            let wire = ::core::mem::ManuallyDrop::new(wire);
549            match wire.raw.ordinal() {
550                1 => Self::StringPattern(::fidl_next::FromWire::from_wire(unsafe {
551                    wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
552                })),
553
554                2 => Self::ExactMatch(::fidl_next::FromWire::from_wire(unsafe {
555                    wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
556                })),
557
558                ord => return Self::UnknownOrdinal_(ord as u64),
559            }
560        }
561    }
562
563    impl<'de> ::fidl_next::FromWireRef<crate::wire::StringSelector<'de>> for StringSelector {
564        #[inline]
565        fn from_wire_ref(wire: &crate::wire::StringSelector<'de>) -> Self {
566            match wire.raw.ordinal() {
567                1 => Self::StringPattern(::fidl_next::FromWireRef::from_wire_ref(unsafe {
568                    wire.raw.get().deref_unchecked::<::fidl_next::wire::String<'de>>()
569                })),
570
571                2 => Self::ExactMatch(::fidl_next::FromWireRef::from_wire_ref(unsafe {
572                    wire.raw.get().deref_unchecked::<::fidl_next::wire::String<'de>>()
573                })),
574
575                ord => return Self::UnknownOrdinal_(ord as u64),
576            }
577        }
578    }
579
580    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::StringSelector<'de>>
581        for StringSelector
582    {
583        #[inline]
584        fn from_wire_option(
585            wire: crate::wire_optional::StringSelector<'de>,
586        ) -> ::core::option::Option<Self> {
587            if let Some(inner) = wire.into_option() {
588                Some(::fidl_next::FromWire::from_wire(inner))
589            } else {
590                None
591            }
592        }
593    }
594
595    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::StringSelector<'de>>
596        for Box<StringSelector>
597    {
598        #[inline]
599        fn from_wire_option(
600            wire: crate::wire_optional::StringSelector<'de>,
601        ) -> ::core::option::Option<Self> {
602            <StringSelector as ::fidl_next::FromWireOption<
603                crate::wire_optional::StringSelector<'de>,
604            >>::from_wire_option(wire)
605            .map(Box::new)
606        }
607    }
608
609    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::StringSelector<'de>>
610        for Box<StringSelector>
611    {
612        #[inline]
613        fn from_wire_option_ref(
614            wire: &crate::wire_optional::StringSelector<'de>,
615        ) -> ::core::option::Option<Self> {
616            if let Some(inner) = wire.as_ref() {
617                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
618            } else {
619                None
620            }
621        }
622    }
623
624    #[doc = " Specifies a pattern of component monikers which\n identify components being selected for.\n\n Component selectors support wildcarding, which will glob a single \"level\" of a\n component moniker. eg:\n    core/*/echo\n will match all echo instances running only in realms directly under core, but none\n nested further.\n\n Component selectors also support a recursive wildcard, which will glob multiple\n \"levels\" of a component moniker. eg:\n    core/**\n will match all component instances running under core/ and all descendants of it.\n Note that the wildcard does not select core itself. Clients that wish to choose a\n subtree including the root should pass two selectors, eg:\n    core\n    core/**\n The recursive wildcard is only allowed as the final segment of the selector.\n"]
625    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
626    pub struct ComponentSelector {
627        pub moniker_segments:
628            ::core::option::Option<::std::vec::Vec<crate::natural::StringSelector>>,
629    }
630
631    impl ComponentSelector {
632        fn __max_ordinal(&self) -> usize {
633            if self.moniker_segments.is_some() {
634                return 1;
635            }
636
637            0
638        }
639    }
640
641    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ComponentSelector<'static>, ___E>
642        for ComponentSelector
643    where
644        ___E: ::fidl_next::Encoder + ?Sized,
645    {
646        #[inline]
647        fn encode(
648            mut self,
649            encoder: &mut ___E,
650            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentSelector<'static>>,
651            _: (),
652        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
653            ::fidl_next::munge!(let crate::wire::ComponentSelector { table } = out);
654
655            let max_ord = self.__max_ordinal();
656
657            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
658            ::fidl_next::Wire::zero_padding(&mut out);
659
660            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
661                ::fidl_next::wire::Envelope,
662            >(encoder, max_ord);
663
664            for i in 1..=max_ord {
665                match i {
666                    1 => {
667                        if let Some(value) = self.moniker_segments.take() {
668                            ::fidl_next::wire::Envelope::encode_value::<
669                                ::fidl_next::wire::Vector<
670                                    'static,
671                                    crate::wire::StringSelector<'static>,
672                                >,
673                                ___E,
674                            >(
675                                value, preallocated.encoder, &mut out, (25, ())
676                            )?;
677                        } else {
678                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
679                        }
680                    }
681
682                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
683                }
684                unsafe {
685                    preallocated.write_next(out.assume_init_ref());
686                }
687            }
688
689            ::fidl_next::wire::Table::encode_len(table, max_ord);
690
691            Ok(())
692        }
693    }
694
695    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ComponentSelector<'static>, ___E>
696        for &'a ComponentSelector
697    where
698        ___E: ::fidl_next::Encoder + ?Sized,
699    {
700        #[inline]
701        fn encode(
702            self,
703            encoder: &mut ___E,
704            out: &mut ::core::mem::MaybeUninit<crate::wire::ComponentSelector<'static>>,
705            _: (),
706        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
707            ::fidl_next::munge!(let crate::wire::ComponentSelector { table } = out);
708
709            let max_ord = self.__max_ordinal();
710
711            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
712            ::fidl_next::Wire::zero_padding(&mut out);
713
714            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
715                ::fidl_next::wire::Envelope,
716            >(encoder, max_ord);
717
718            for i in 1..=max_ord {
719                match i {
720                    1 => {
721                        if let Some(value) = &self.moniker_segments {
722                            ::fidl_next::wire::Envelope::encode_value::<
723                                ::fidl_next::wire::Vector<
724                                    'static,
725                                    crate::wire::StringSelector<'static>,
726                                >,
727                                ___E,
728                            >(
729                                value, preallocated.encoder, &mut out, (25, ())
730                            )?;
731                        } else {
732                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
733                        }
734                    }
735
736                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
737                }
738                unsafe {
739                    preallocated.write_next(out.assume_init_ref());
740                }
741            }
742
743            ::fidl_next::wire::Table::encode_len(table, max_ord);
744
745            Ok(())
746        }
747    }
748
749    impl<'de> ::fidl_next::FromWire<crate::wire::ComponentSelector<'de>> for ComponentSelector {
750        #[inline]
751        fn from_wire(wire_: crate::wire::ComponentSelector<'de>) -> Self {
752            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
753
754            let moniker_segments = wire_.table.get(1);
755
756            Self {
757
758
759                moniker_segments: moniker_segments.map(|envelope| ::fidl_next::FromWire::from_wire(
760                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StringSelector<'de>>>() }
761                )),
762
763        }
764        }
765    }
766
767    impl<'de> ::fidl_next::FromWireRef<crate::wire::ComponentSelector<'de>> for ComponentSelector {
768        #[inline]
769        fn from_wire_ref(wire: &crate::wire::ComponentSelector<'de>) -> Self {
770            Self {
771
772
773                moniker_segments: wire.table.get(1)
774                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
775                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StringSelector<'de>>>() }
776                    )),
777
778        }
779        }
780    }
781
782    #[doc = " A selector defining a set of nodes to match, for which the entire subtree including\n those nodes are selected.\n"]
783    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
784    pub struct SubtreeSelector {
785        pub node_path: ::std::vec::Vec<crate::natural::StringSelector>,
786    }
787
788    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SubtreeSelector<'static>, ___E>
789        for SubtreeSelector
790    where
791        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
792        ___E: ::fidl_next::Encoder,
793    {
794        #[inline]
795        fn encode(
796            self,
797            encoder_: &mut ___E,
798            out_: &mut ::core::mem::MaybeUninit<crate::wire::SubtreeSelector<'static>>,
799            _: (),
800        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
801            ::fidl_next::munge! {
802                let crate::wire::SubtreeSelector {
803                    node_path,
804
805                } = out_;
806            }
807
808            ::fidl_next::Encode::encode(self.node_path, encoder_, node_path, (100, ()))?;
809
810            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node_path.as_mut_ptr()) };
811            ::fidl_next::Constrained::validate(_field, (100, ()))?;
812
813            Ok(())
814        }
815    }
816
817    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SubtreeSelector<'static>, ___E>
818        for &'a SubtreeSelector
819    where
820        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
821        ___E: ::fidl_next::Encoder,
822    {
823        #[inline]
824        fn encode(
825            self,
826            encoder_: &mut ___E,
827            out_: &mut ::core::mem::MaybeUninit<crate::wire::SubtreeSelector<'static>>,
828            _: (),
829        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
830            ::fidl_next::munge! {
831                let crate::wire::SubtreeSelector {
832                    node_path,
833
834                } = out_;
835            }
836
837            ::fidl_next::Encode::encode(&self.node_path, encoder_, node_path, (100, ()))?;
838
839            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node_path.as_mut_ptr()) };
840            ::fidl_next::Constrained::validate(_field, (100, ()))?;
841
842            Ok(())
843        }
844    }
845
846    unsafe impl<___E>
847        ::fidl_next::EncodeOption<
848            ::fidl_next::wire::Box<'static, crate::wire::SubtreeSelector<'static>>,
849            ___E,
850        > for SubtreeSelector
851    where
852        ___E: ::fidl_next::Encoder + ?Sized,
853        SubtreeSelector: ::fidl_next::Encode<crate::wire::SubtreeSelector<'static>, ___E>,
854    {
855        #[inline]
856        fn encode_option(
857            this: ::core::option::Option<Self>,
858            encoder: &mut ___E,
859            out: &mut ::core::mem::MaybeUninit<
860                ::fidl_next::wire::Box<'static, crate::wire::SubtreeSelector<'static>>,
861            >,
862            _: (),
863        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
864            if let Some(inner) = this {
865                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
866                ::fidl_next::wire::Box::encode_present(out);
867            } else {
868                ::fidl_next::wire::Box::encode_absent(out);
869            }
870
871            Ok(())
872        }
873    }
874
875    unsafe impl<'a, ___E>
876        ::fidl_next::EncodeOption<
877            ::fidl_next::wire::Box<'static, crate::wire::SubtreeSelector<'static>>,
878            ___E,
879        > for &'a SubtreeSelector
880    where
881        ___E: ::fidl_next::Encoder + ?Sized,
882        &'a SubtreeSelector: ::fidl_next::Encode<crate::wire::SubtreeSelector<'static>, ___E>,
883    {
884        #[inline]
885        fn encode_option(
886            this: ::core::option::Option<Self>,
887            encoder: &mut ___E,
888            out: &mut ::core::mem::MaybeUninit<
889                ::fidl_next::wire::Box<'static, crate::wire::SubtreeSelector<'static>>,
890            >,
891            _: (),
892        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
893            if let Some(inner) = this {
894                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
895                ::fidl_next::wire::Box::encode_present(out);
896            } else {
897                ::fidl_next::wire::Box::encode_absent(out);
898            }
899
900            Ok(())
901        }
902    }
903
904    impl<'de> ::fidl_next::FromWire<crate::wire::SubtreeSelector<'de>> for SubtreeSelector {
905        #[inline]
906        fn from_wire(wire: crate::wire::SubtreeSelector<'de>) -> Self {
907            Self { node_path: ::fidl_next::FromWire::from_wire(wire.node_path) }
908        }
909    }
910
911    impl<'de> ::fidl_next::FromWireRef<crate::wire::SubtreeSelector<'de>> for SubtreeSelector {
912        #[inline]
913        fn from_wire_ref(wire: &crate::wire::SubtreeSelector<'de>) -> Self {
914            Self { node_path: ::fidl_next::FromWireRef::from_wire_ref(&wire.node_path) }
915        }
916    }
917
918    #[doc = " A selector defining a set of nodes to match, and on those matched nodes a set of named\n properties to match.\n"]
919    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
920    pub struct PropertySelector {
921        pub node_path: ::std::vec::Vec<crate::natural::StringSelector>,
922
923        pub target_properties: crate::natural::StringSelector,
924    }
925
926    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PropertySelector<'static>, ___E>
927        for PropertySelector
928    where
929        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
930        ___E: ::fidl_next::Encoder,
931    {
932        #[inline]
933        fn encode(
934            self,
935            encoder_: &mut ___E,
936            out_: &mut ::core::mem::MaybeUninit<crate::wire::PropertySelector<'static>>,
937            _: (),
938        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
939            ::fidl_next::munge! {
940                let crate::wire::PropertySelector {
941                    node_path,
942                    target_properties,
943
944                } = out_;
945            }
946
947            ::fidl_next::Encode::encode(self.node_path, encoder_, node_path, (100, ()))?;
948
949            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node_path.as_mut_ptr()) };
950            ::fidl_next::Constrained::validate(_field, (100, ()))?;
951
952            ::fidl_next::Encode::encode(self.target_properties, encoder_, target_properties, ())?;
953
954            let mut _field =
955                unsafe { ::fidl_next::Slot::new_unchecked(target_properties.as_mut_ptr()) };
956
957            Ok(())
958        }
959    }
960
961    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PropertySelector<'static>, ___E>
962        for &'a PropertySelector
963    where
964        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
965        ___E: ::fidl_next::Encoder,
966    {
967        #[inline]
968        fn encode(
969            self,
970            encoder_: &mut ___E,
971            out_: &mut ::core::mem::MaybeUninit<crate::wire::PropertySelector<'static>>,
972            _: (),
973        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
974            ::fidl_next::munge! {
975                let crate::wire::PropertySelector {
976                    node_path,
977                    target_properties,
978
979                } = out_;
980            }
981
982            ::fidl_next::Encode::encode(&self.node_path, encoder_, node_path, (100, ()))?;
983
984            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node_path.as_mut_ptr()) };
985            ::fidl_next::Constrained::validate(_field, (100, ()))?;
986
987            ::fidl_next::Encode::encode(&self.target_properties, encoder_, target_properties, ())?;
988
989            let mut _field =
990                unsafe { ::fidl_next::Slot::new_unchecked(target_properties.as_mut_ptr()) };
991
992            Ok(())
993        }
994    }
995
996    unsafe impl<___E>
997        ::fidl_next::EncodeOption<
998            ::fidl_next::wire::Box<'static, crate::wire::PropertySelector<'static>>,
999            ___E,
1000        > for PropertySelector
1001    where
1002        ___E: ::fidl_next::Encoder + ?Sized,
1003        PropertySelector: ::fidl_next::Encode<crate::wire::PropertySelector<'static>, ___E>,
1004    {
1005        #[inline]
1006        fn encode_option(
1007            this: ::core::option::Option<Self>,
1008            encoder: &mut ___E,
1009            out: &mut ::core::mem::MaybeUninit<
1010                ::fidl_next::wire::Box<'static, crate::wire::PropertySelector<'static>>,
1011            >,
1012            _: (),
1013        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1014            if let Some(inner) = this {
1015                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1016                ::fidl_next::wire::Box::encode_present(out);
1017            } else {
1018                ::fidl_next::wire::Box::encode_absent(out);
1019            }
1020
1021            Ok(())
1022        }
1023    }
1024
1025    unsafe impl<'a, ___E>
1026        ::fidl_next::EncodeOption<
1027            ::fidl_next::wire::Box<'static, crate::wire::PropertySelector<'static>>,
1028            ___E,
1029        > for &'a PropertySelector
1030    where
1031        ___E: ::fidl_next::Encoder + ?Sized,
1032        &'a PropertySelector: ::fidl_next::Encode<crate::wire::PropertySelector<'static>, ___E>,
1033    {
1034        #[inline]
1035        fn encode_option(
1036            this: ::core::option::Option<Self>,
1037            encoder: &mut ___E,
1038            out: &mut ::core::mem::MaybeUninit<
1039                ::fidl_next::wire::Box<'static, crate::wire::PropertySelector<'static>>,
1040            >,
1041            _: (),
1042        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1043            if let Some(inner) = this {
1044                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1045                ::fidl_next::wire::Box::encode_present(out);
1046            } else {
1047                ::fidl_next::wire::Box::encode_absent(out);
1048            }
1049
1050            Ok(())
1051        }
1052    }
1053
1054    impl<'de> ::fidl_next::FromWire<crate::wire::PropertySelector<'de>> for PropertySelector {
1055        #[inline]
1056        fn from_wire(wire: crate::wire::PropertySelector<'de>) -> Self {
1057            Self {
1058                node_path: ::fidl_next::FromWire::from_wire(wire.node_path),
1059
1060                target_properties: ::fidl_next::FromWire::from_wire(wire.target_properties),
1061            }
1062        }
1063    }
1064
1065    impl<'de> ::fidl_next::FromWireRef<crate::wire::PropertySelector<'de>> for PropertySelector {
1066        #[inline]
1067        fn from_wire_ref(wire: &crate::wire::PropertySelector<'de>) -> Self {
1068            Self {
1069                node_path: ::fidl_next::FromWireRef::from_wire_ref(&wire.node_path),
1070
1071                target_properties: ::fidl_next::FromWireRef::from_wire_ref(&wire.target_properties),
1072            }
1073        }
1074    }
1075
1076    #[doc = " TreeSelector represents a selection request on a hierarchy of named nodes, with\n named properties on those nodes.\n"]
1077    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1078    pub enum TreeSelector {
1079        SubtreeSelector(crate::natural::SubtreeSelector),
1080
1081        PropertySelector(crate::natural::PropertySelector),
1082
1083        UnknownOrdinal_(u64),
1084    }
1085
1086    impl TreeSelector {
1087        pub fn is_unknown(&self) -> bool {
1088            #[allow(unreachable_patterns)]
1089            match self {
1090                Self::UnknownOrdinal_(_) => true,
1091                _ => false,
1092            }
1093        }
1094    }
1095
1096    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TreeSelector<'static>, ___E> for TreeSelector
1097    where
1098        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1099        ___E: ::fidl_next::Encoder,
1100    {
1101        #[inline]
1102        fn encode(
1103            self,
1104            encoder: &mut ___E,
1105            out: &mut ::core::mem::MaybeUninit<crate::wire::TreeSelector<'static>>,
1106            _: (),
1107        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1108            ::fidl_next::munge!(let crate::wire::TreeSelector { raw, _phantom: _ } = out);
1109
1110            match self {
1111                Self::SubtreeSelector(value) => ::fidl_next::wire::Union::encode_as::<
1112                    ___E,
1113                    crate::wire::SubtreeSelector<'static>,
1114                >(value, 1, encoder, raw, ())?,
1115
1116                Self::PropertySelector(value) => ::fidl_next::wire::Union::encode_as::<
1117                    ___E,
1118                    crate::wire::PropertySelector<'static>,
1119                >(value, 2, encoder, raw, ())?,
1120
1121                Self::UnknownOrdinal_(ordinal) => {
1122                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1123                }
1124            }
1125
1126            Ok(())
1127        }
1128    }
1129
1130    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TreeSelector<'static>, ___E>
1131        for &'a TreeSelector
1132    where
1133        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1134        ___E: ::fidl_next::Encoder,
1135    {
1136        #[inline]
1137        fn encode(
1138            self,
1139            encoder: &mut ___E,
1140            out: &mut ::core::mem::MaybeUninit<crate::wire::TreeSelector<'static>>,
1141            _: (),
1142        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1143            ::fidl_next::munge!(let crate::wire::TreeSelector { raw, _phantom: _ } = out);
1144
1145            match self {
1146                TreeSelector::SubtreeSelector(value) => {
1147                    ::fidl_next::wire::Union::encode_as::<
1148                        ___E,
1149                        crate::wire::SubtreeSelector<'static>,
1150                    >(value, 1, encoder, raw, ())?
1151                }
1152
1153                TreeSelector::PropertySelector(value) => {
1154                    ::fidl_next::wire::Union::encode_as::<
1155                        ___E,
1156                        crate::wire::PropertySelector<'static>,
1157                    >(value, 2, encoder, raw, ())?
1158                }
1159
1160                TreeSelector::UnknownOrdinal_(ordinal) => {
1161                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
1162                }
1163            }
1164
1165            Ok(())
1166        }
1167    }
1168
1169    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::TreeSelector<'static>, ___E>
1170        for TreeSelector
1171    where
1172        ___E: ?Sized,
1173        TreeSelector: ::fidl_next::Encode<crate::wire::TreeSelector<'static>, ___E>,
1174    {
1175        #[inline]
1176        fn encode_option(
1177            this: ::core::option::Option<Self>,
1178            encoder: &mut ___E,
1179            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::TreeSelector<'static>>,
1180            _: (),
1181        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1182            ::fidl_next::munge!(let crate::wire_optional::TreeSelector { raw, _phantom: _ } = &mut *out);
1183
1184            if let Some(inner) = this {
1185                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1186                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1187            } else {
1188                ::fidl_next::wire::Union::encode_absent(raw);
1189            }
1190
1191            Ok(())
1192        }
1193    }
1194
1195    unsafe impl<'a, ___E>
1196        ::fidl_next::EncodeOption<crate::wire_optional::TreeSelector<'static>, ___E>
1197        for &'a TreeSelector
1198    where
1199        ___E: ?Sized,
1200        &'a TreeSelector: ::fidl_next::Encode<crate::wire::TreeSelector<'static>, ___E>,
1201    {
1202        #[inline]
1203        fn encode_option(
1204            this: ::core::option::Option<Self>,
1205            encoder: &mut ___E,
1206            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::TreeSelector<'static>>,
1207            _: (),
1208        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1209            ::fidl_next::munge!(let crate::wire_optional::TreeSelector { raw, _phantom: _ } = &mut *out);
1210
1211            if let Some(inner) = this {
1212                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1213                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1214            } else {
1215                ::fidl_next::wire::Union::encode_absent(raw);
1216            }
1217
1218            Ok(())
1219        }
1220    }
1221
1222    impl<'de> ::fidl_next::FromWire<crate::wire::TreeSelector<'de>> for TreeSelector {
1223        #[inline]
1224        fn from_wire(wire: crate::wire::TreeSelector<'de>) -> Self {
1225            let wire = ::core::mem::ManuallyDrop::new(wire);
1226            match wire.raw.ordinal() {
1227                1 => Self::SubtreeSelector(::fidl_next::FromWire::from_wire(unsafe {
1228                    wire.raw.get().read_unchecked::<crate::wire::SubtreeSelector<'de>>()
1229                })),
1230
1231                2 => Self::PropertySelector(::fidl_next::FromWire::from_wire(unsafe {
1232                    wire.raw.get().read_unchecked::<crate::wire::PropertySelector<'de>>()
1233                })),
1234
1235                ord => return Self::UnknownOrdinal_(ord as u64),
1236            }
1237        }
1238    }
1239
1240    impl<'de> ::fidl_next::FromWireRef<crate::wire::TreeSelector<'de>> for TreeSelector {
1241        #[inline]
1242        fn from_wire_ref(wire: &crate::wire::TreeSelector<'de>) -> Self {
1243            match wire.raw.ordinal() {
1244                1 => Self::SubtreeSelector(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1245                    wire.raw.get().deref_unchecked::<crate::wire::SubtreeSelector<'de>>()
1246                })),
1247
1248                2 => Self::PropertySelector(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1249                    wire.raw.get().deref_unchecked::<crate::wire::PropertySelector<'de>>()
1250                })),
1251
1252                ord => return Self::UnknownOrdinal_(ord as u64),
1253            }
1254        }
1255    }
1256
1257    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::TreeSelector<'de>> for TreeSelector {
1258        #[inline]
1259        fn from_wire_option(
1260            wire: crate::wire_optional::TreeSelector<'de>,
1261        ) -> ::core::option::Option<Self> {
1262            if let Some(inner) = wire.into_option() {
1263                Some(::fidl_next::FromWire::from_wire(inner))
1264            } else {
1265                None
1266            }
1267        }
1268    }
1269
1270    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::TreeSelector<'de>>
1271        for Box<TreeSelector>
1272    {
1273        #[inline]
1274        fn from_wire_option(
1275            wire: crate::wire_optional::TreeSelector<'de>,
1276        ) -> ::core::option::Option<Self> {
1277            <
1278            TreeSelector as ::fidl_next::FromWireOption<crate::wire_optional::TreeSelector<'de>>
1279        >::from_wire_option(wire).map(Box::new)
1280        }
1281    }
1282
1283    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::TreeSelector<'de>>
1284        for Box<TreeSelector>
1285    {
1286        #[inline]
1287        fn from_wire_option_ref(
1288            wire: &crate::wire_optional::TreeSelector<'de>,
1289        ) -> ::core::option::Option<Self> {
1290            if let Some(inner) = wire.as_ref() {
1291                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
1292            } else {
1293                None
1294            }
1295        }
1296    }
1297
1298    #[doc = " TreeNames are the set of names of fuchsia.inspect.Trees for a component that\n were parsed out of a selector. The hierarchy and property selector portions\n will only be applied to trees that match this set.\n"]
1299    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1300    pub enum TreeNames {
1301        Some(::std::vec::Vec<::std::string::String>),
1302
1303        All(crate::natural::All),
1304
1305        UnknownOrdinal_(u64),
1306    }
1307
1308    impl TreeNames {
1309        pub fn is_unknown(&self) -> bool {
1310            #[allow(unreachable_patterns)]
1311            match self {
1312                Self::UnknownOrdinal_(_) => true,
1313                _ => false,
1314            }
1315        }
1316    }
1317
1318    unsafe impl<___E> ::fidl_next::Encode<crate::wire::TreeNames<'static>, ___E> for TreeNames
1319    where
1320        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1321        ___E: ::fidl_next::Encoder,
1322    {
1323        #[inline]
1324        fn encode(
1325            self,
1326            encoder: &mut ___E,
1327            out: &mut ::core::mem::MaybeUninit<crate::wire::TreeNames<'static>>,
1328            _: (),
1329        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1330            ::fidl_next::munge!(let crate::wire::TreeNames { raw, _phantom: _ } = out);
1331
1332            match self {
1333                Self::Some(value) => ::fidl_next::wire::Union::encode_as::<
1334                    ___E,
1335                    ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
1336                >(value, 1, encoder, raw, (4294967295, 1024))?,
1337
1338                Self::All(value) => ::fidl_next::wire::Union::encode_as::<___E, crate::wire::All>(
1339                    value,
1340                    2,
1341                    encoder,
1342                    raw,
1343                    (),
1344                )?,
1345
1346                Self::UnknownOrdinal_(ordinal) => {
1347                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1348                }
1349            }
1350
1351            Ok(())
1352        }
1353    }
1354
1355    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::TreeNames<'static>, ___E> for &'a TreeNames
1356    where
1357        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1358        ___E: ::fidl_next::Encoder,
1359    {
1360        #[inline]
1361        fn encode(
1362            self,
1363            encoder: &mut ___E,
1364            out: &mut ::core::mem::MaybeUninit<crate::wire::TreeNames<'static>>,
1365            _: (),
1366        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1367            ::fidl_next::munge!(let crate::wire::TreeNames { raw, _phantom: _ } = out);
1368
1369            match self {
1370                TreeNames::Some(value) => {
1371                    ::fidl_next::wire::Union::encode_as::<
1372                        ___E,
1373                        ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
1374                    >(value, 1, encoder, raw, (4294967295, 1024))?
1375                }
1376
1377                TreeNames::All(value) => ::fidl_next::wire::Union::encode_as::<
1378                    ___E,
1379                    crate::wire::All,
1380                >(value, 2, encoder, raw, ())?,
1381
1382                TreeNames::UnknownOrdinal_(ordinal) => {
1383                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
1384                }
1385            }
1386
1387            Ok(())
1388        }
1389    }
1390
1391    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::TreeNames<'static>, ___E>
1392        for TreeNames
1393    where
1394        ___E: ?Sized,
1395        TreeNames: ::fidl_next::Encode<crate::wire::TreeNames<'static>, ___E>,
1396    {
1397        #[inline]
1398        fn encode_option(
1399            this: ::core::option::Option<Self>,
1400            encoder: &mut ___E,
1401            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::TreeNames<'static>>,
1402            _: (),
1403        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1404            ::fidl_next::munge!(let crate::wire_optional::TreeNames { raw, _phantom: _ } = &mut *out);
1405
1406            if let Some(inner) = this {
1407                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1408                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1409            } else {
1410                ::fidl_next::wire::Union::encode_absent(raw);
1411            }
1412
1413            Ok(())
1414        }
1415    }
1416
1417    unsafe impl<'a, ___E> ::fidl_next::EncodeOption<crate::wire_optional::TreeNames<'static>, ___E>
1418        for &'a TreeNames
1419    where
1420        ___E: ?Sized,
1421        &'a TreeNames: ::fidl_next::Encode<crate::wire::TreeNames<'static>, ___E>,
1422    {
1423        #[inline]
1424        fn encode_option(
1425            this: ::core::option::Option<Self>,
1426            encoder: &mut ___E,
1427            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::TreeNames<'static>>,
1428            _: (),
1429        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1430            ::fidl_next::munge!(let crate::wire_optional::TreeNames { raw, _phantom: _ } = &mut *out);
1431
1432            if let Some(inner) = this {
1433                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1434                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1435            } else {
1436                ::fidl_next::wire::Union::encode_absent(raw);
1437            }
1438
1439            Ok(())
1440        }
1441    }
1442
1443    impl<'de> ::fidl_next::FromWire<crate::wire::TreeNames<'de>> for TreeNames {
1444        #[inline]
1445        fn from_wire(wire: crate::wire::TreeNames<'de>) -> Self {
1446            let wire = ::core::mem::ManuallyDrop::new(wire);
1447            match wire.raw.ordinal() {
1448                1 => Self::Some(::fidl_next::FromWire::from_wire(unsafe {
1449                    wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>()
1450                })),
1451
1452                2 => Self::All(::fidl_next::FromWire::from_wire(unsafe {
1453                    wire.raw.get().read_unchecked::<crate::wire::All>()
1454                })),
1455
1456                ord => return Self::UnknownOrdinal_(ord as u64),
1457            }
1458        }
1459    }
1460
1461    impl<'de> ::fidl_next::FromWireRef<crate::wire::TreeNames<'de>> for TreeNames {
1462        #[inline]
1463        fn from_wire_ref(wire: &crate::wire::TreeNames<'de>) -> Self {
1464            match wire.raw.ordinal() {
1465                1 => Self::Some(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1466                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>()
1467                })),
1468
1469                2 => Self::All(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1470                    wire.raw.get().deref_unchecked::<crate::wire::All>()
1471                })),
1472
1473                ord => return Self::UnknownOrdinal_(ord as u64),
1474            }
1475        }
1476    }
1477
1478    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::TreeNames<'de>> for TreeNames {
1479        #[inline]
1480        fn from_wire_option(
1481            wire: crate::wire_optional::TreeNames<'de>,
1482        ) -> ::core::option::Option<Self> {
1483            if let Some(inner) = wire.into_option() {
1484                Some(::fidl_next::FromWire::from_wire(inner))
1485            } else {
1486                None
1487            }
1488        }
1489    }
1490
1491    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::TreeNames<'de>> for Box<TreeNames> {
1492        #[inline]
1493        fn from_wire_option(
1494            wire: crate::wire_optional::TreeNames<'de>,
1495        ) -> ::core::option::Option<Self> {
1496            <
1497            TreeNames as ::fidl_next::FromWireOption<crate::wire_optional::TreeNames<'de>>
1498        >::from_wire_option(wire).map(Box::new)
1499        }
1500    }
1501
1502    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::TreeNames<'de>> for Box<TreeNames> {
1503        #[inline]
1504        fn from_wire_option_ref(
1505            wire: &crate::wire_optional::TreeNames<'de>,
1506        ) -> ::core::option::Option<Self> {
1507            if let Some(inner) = wire.as_ref() {
1508                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
1509            } else {
1510                None
1511            }
1512        }
1513    }
1514
1515    #[doc = " Structured selector containing all required information for pattern-matching onto\n string-named properties owned by nodes in a data hierarchy, where data hierarchies belong\n to specific components.\n\n These selectors are represented in text form as three segments, colon delimited,\n specifying:\n         <component_moniker>:<node_selector>:<property_selector>\n Examples:\n    Property selection:\n         realm1/realm2/echo:root/active_users:user_count\n\n    Subtree selection:\n         realm1/realm2/echo:root/active_users\n"]
1516    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1517    pub struct Selector {
1518        pub component_selector: ::core::option::Option<crate::natural::ComponentSelector>,
1519
1520        pub tree_selector: ::core::option::Option<crate::natural::TreeSelector>,
1521
1522        pub tree_names: ::core::option::Option<crate::natural::TreeNames>,
1523    }
1524
1525    impl Selector {
1526        fn __max_ordinal(&self) -> usize {
1527            if self.tree_names.is_some() {
1528                return 3;
1529            }
1530
1531            if self.tree_selector.is_some() {
1532                return 2;
1533            }
1534
1535            if self.component_selector.is_some() {
1536                return 1;
1537            }
1538
1539            0
1540        }
1541    }
1542
1543    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Selector<'static>, ___E> for Selector
1544    where
1545        ___E: ::fidl_next::Encoder + ?Sized,
1546    {
1547        #[inline]
1548        fn encode(
1549            mut self,
1550            encoder: &mut ___E,
1551            out: &mut ::core::mem::MaybeUninit<crate::wire::Selector<'static>>,
1552            _: (),
1553        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1554            ::fidl_next::munge!(let crate::wire::Selector { table } = out);
1555
1556            let max_ord = self.__max_ordinal();
1557
1558            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1559            ::fidl_next::Wire::zero_padding(&mut out);
1560
1561            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1562                ::fidl_next::wire::Envelope,
1563            >(encoder, max_ord);
1564
1565            for i in 1..=max_ord {
1566                match i {
1567                    3 => {
1568                        if let Some(value) = self.tree_names.take() {
1569                            ::fidl_next::wire::Envelope::encode_value::<
1570                                crate::wire::TreeNames<'static>,
1571                                ___E,
1572                            >(
1573                                value, preallocated.encoder, &mut out, ()
1574                            )?;
1575                        } else {
1576                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1577                        }
1578                    }
1579
1580                    2 => {
1581                        if let Some(value) = self.tree_selector.take() {
1582                            ::fidl_next::wire::Envelope::encode_value::<
1583                                crate::wire::TreeSelector<'static>,
1584                                ___E,
1585                            >(
1586                                value, preallocated.encoder, &mut out, ()
1587                            )?;
1588                        } else {
1589                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1590                        }
1591                    }
1592
1593                    1 => {
1594                        if let Some(value) = self.component_selector.take() {
1595                            ::fidl_next::wire::Envelope::encode_value::<
1596                                crate::wire::ComponentSelector<'static>,
1597                                ___E,
1598                            >(
1599                                value, preallocated.encoder, &mut out, ()
1600                            )?;
1601                        } else {
1602                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1603                        }
1604                    }
1605
1606                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1607                }
1608                unsafe {
1609                    preallocated.write_next(out.assume_init_ref());
1610                }
1611            }
1612
1613            ::fidl_next::wire::Table::encode_len(table, max_ord);
1614
1615            Ok(())
1616        }
1617    }
1618
1619    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Selector<'static>, ___E> for &'a Selector
1620    where
1621        ___E: ::fidl_next::Encoder + ?Sized,
1622    {
1623        #[inline]
1624        fn encode(
1625            self,
1626            encoder: &mut ___E,
1627            out: &mut ::core::mem::MaybeUninit<crate::wire::Selector<'static>>,
1628            _: (),
1629        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1630            ::fidl_next::munge!(let crate::wire::Selector { table } = out);
1631
1632            let max_ord = self.__max_ordinal();
1633
1634            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1635            ::fidl_next::Wire::zero_padding(&mut out);
1636
1637            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1638                ::fidl_next::wire::Envelope,
1639            >(encoder, max_ord);
1640
1641            for i in 1..=max_ord {
1642                match i {
1643                    3 => {
1644                        if let Some(value) = &self.tree_names {
1645                            ::fidl_next::wire::Envelope::encode_value::<
1646                                crate::wire::TreeNames<'static>,
1647                                ___E,
1648                            >(
1649                                value, preallocated.encoder, &mut out, ()
1650                            )?;
1651                        } else {
1652                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1653                        }
1654                    }
1655
1656                    2 => {
1657                        if let Some(value) = &self.tree_selector {
1658                            ::fidl_next::wire::Envelope::encode_value::<
1659                                crate::wire::TreeSelector<'static>,
1660                                ___E,
1661                            >(
1662                                value, preallocated.encoder, &mut out, ()
1663                            )?;
1664                        } else {
1665                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1666                        }
1667                    }
1668
1669                    1 => {
1670                        if let Some(value) = &self.component_selector {
1671                            ::fidl_next::wire::Envelope::encode_value::<
1672                                crate::wire::ComponentSelector<'static>,
1673                                ___E,
1674                            >(
1675                                value, preallocated.encoder, &mut out, ()
1676                            )?;
1677                        } else {
1678                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1679                        }
1680                    }
1681
1682                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1683                }
1684                unsafe {
1685                    preallocated.write_next(out.assume_init_ref());
1686                }
1687            }
1688
1689            ::fidl_next::wire::Table::encode_len(table, max_ord);
1690
1691            Ok(())
1692        }
1693    }
1694
1695    impl<'de> ::fidl_next::FromWire<crate::wire::Selector<'de>> for Selector {
1696        #[inline]
1697        fn from_wire(wire_: crate::wire::Selector<'de>) -> Self {
1698            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1699
1700            let component_selector = wire_.table.get(1);
1701
1702            let tree_selector = wire_.table.get(2);
1703
1704            let tree_names = wire_.table.get(3);
1705
1706            Self {
1707                component_selector: component_selector.map(|envelope| {
1708                    ::fidl_next::FromWire::from_wire(unsafe {
1709                        envelope.read_unchecked::<crate::wire::ComponentSelector<'de>>()
1710                    })
1711                }),
1712
1713                tree_selector: tree_selector.map(|envelope| {
1714                    ::fidl_next::FromWire::from_wire(unsafe {
1715                        envelope.read_unchecked::<crate::wire::TreeSelector<'de>>()
1716                    })
1717                }),
1718
1719                tree_names: tree_names.map(|envelope| {
1720                    ::fidl_next::FromWire::from_wire(unsafe {
1721                        envelope.read_unchecked::<crate::wire::TreeNames<'de>>()
1722                    })
1723                }),
1724            }
1725        }
1726    }
1727
1728    impl<'de> ::fidl_next::FromWireRef<crate::wire::Selector<'de>> for Selector {
1729        #[inline]
1730        fn from_wire_ref(wire: &crate::wire::Selector<'de>) -> Self {
1731            Self {
1732                component_selector: wire.table.get(1).map(|envelope| {
1733                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1734                        envelope.deref_unchecked::<crate::wire::ComponentSelector<'de>>()
1735                    })
1736                }),
1737
1738                tree_selector: wire.table.get(2).map(|envelope| {
1739                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1740                        envelope.deref_unchecked::<crate::wire::TreeSelector<'de>>()
1741                    })
1742                }),
1743
1744                tree_names: wire.table.get(3).map(|envelope| {
1745                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1746                        envelope.deref_unchecked::<crate::wire::TreeNames<'de>>()
1747                    })
1748                }),
1749            }
1750        }
1751    }
1752
1753    #[doc = " Argument used for Archive selectors, can be either the pre-parsed\n fidl struct or string representation.\n"]
1754    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1755    pub enum SelectorArgument {
1756        StructuredSelector(crate::natural::Selector),
1757
1758        RawSelector(::std::string::String),
1759
1760        UnknownOrdinal_(u64),
1761    }
1762
1763    impl SelectorArgument {
1764        pub fn is_unknown(&self) -> bool {
1765            #[allow(unreachable_patterns)]
1766            match self {
1767                Self::UnknownOrdinal_(_) => true,
1768                _ => false,
1769            }
1770        }
1771    }
1772
1773    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SelectorArgument<'static>, ___E>
1774        for SelectorArgument
1775    where
1776        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1777        ___E: ::fidl_next::Encoder,
1778    {
1779        #[inline]
1780        fn encode(
1781            self,
1782            encoder: &mut ___E,
1783            out: &mut ::core::mem::MaybeUninit<crate::wire::SelectorArgument<'static>>,
1784            _: (),
1785        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1786            ::fidl_next::munge!(let crate::wire::SelectorArgument { raw, _phantom: _ } = out);
1787
1788            match self {
1789                Self::StructuredSelector(value) => ::fidl_next::wire::Union::encode_as::<
1790                    ___E,
1791                    crate::wire::Selector<'static>,
1792                >(value, 1, encoder, raw, ())?,
1793
1794                Self::RawSelector(value) => ::fidl_next::wire::Union::encode_as::<
1795                    ___E,
1796                    ::fidl_next::wire::String<'static>,
1797                >(value, 2, encoder, raw, 1024)?,
1798
1799                Self::UnknownOrdinal_(ordinal) => {
1800                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1801                }
1802            }
1803
1804            Ok(())
1805        }
1806    }
1807
1808    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SelectorArgument<'static>, ___E>
1809        for &'a SelectorArgument
1810    where
1811        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1812        ___E: ::fidl_next::Encoder,
1813    {
1814        #[inline]
1815        fn encode(
1816            self,
1817            encoder: &mut ___E,
1818            out: &mut ::core::mem::MaybeUninit<crate::wire::SelectorArgument<'static>>,
1819            _: (),
1820        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1821            ::fidl_next::munge!(let crate::wire::SelectorArgument { raw, _phantom: _ } = out);
1822
1823            match self {
1824                SelectorArgument::StructuredSelector(value) => {
1825                    ::fidl_next::wire::Union::encode_as::<___E, crate::wire::Selector<'static>>(
1826                        value,
1827                        1,
1828                        encoder,
1829                        raw,
1830                        (),
1831                    )?
1832                }
1833
1834                SelectorArgument::RawSelector(value) => {
1835                    ::fidl_next::wire::Union::encode_as::<___E, ::fidl_next::wire::String<'static>>(
1836                        value, 2, encoder, raw, 1024,
1837                    )?
1838                }
1839
1840                SelectorArgument::UnknownOrdinal_(ordinal) => {
1841                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
1842                }
1843            }
1844
1845            Ok(())
1846        }
1847    }
1848
1849    unsafe impl<___E>
1850        ::fidl_next::EncodeOption<crate::wire_optional::SelectorArgument<'static>, ___E>
1851        for SelectorArgument
1852    where
1853        ___E: ?Sized,
1854        SelectorArgument: ::fidl_next::Encode<crate::wire::SelectorArgument<'static>, ___E>,
1855    {
1856        #[inline]
1857        fn encode_option(
1858            this: ::core::option::Option<Self>,
1859            encoder: &mut ___E,
1860            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelectorArgument<'static>>,
1861            _: (),
1862        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1863            ::fidl_next::munge!(let crate::wire_optional::SelectorArgument { raw, _phantom: _ } = &mut *out);
1864
1865            if let Some(inner) = this {
1866                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1867                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1868            } else {
1869                ::fidl_next::wire::Union::encode_absent(raw);
1870            }
1871
1872            Ok(())
1873        }
1874    }
1875
1876    unsafe impl<'a, ___E>
1877        ::fidl_next::EncodeOption<crate::wire_optional::SelectorArgument<'static>, ___E>
1878        for &'a SelectorArgument
1879    where
1880        ___E: ?Sized,
1881        &'a SelectorArgument: ::fidl_next::Encode<crate::wire::SelectorArgument<'static>, ___E>,
1882    {
1883        #[inline]
1884        fn encode_option(
1885            this: ::core::option::Option<Self>,
1886            encoder: &mut ___E,
1887            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SelectorArgument<'static>>,
1888            _: (),
1889        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1890            ::fidl_next::munge!(let crate::wire_optional::SelectorArgument { raw, _phantom: _ } = &mut *out);
1891
1892            if let Some(inner) = this {
1893                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1894                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1895            } else {
1896                ::fidl_next::wire::Union::encode_absent(raw);
1897            }
1898
1899            Ok(())
1900        }
1901    }
1902
1903    impl<'de> ::fidl_next::FromWire<crate::wire::SelectorArgument<'de>> for SelectorArgument {
1904        #[inline]
1905        fn from_wire(wire: crate::wire::SelectorArgument<'de>) -> Self {
1906            let wire = ::core::mem::ManuallyDrop::new(wire);
1907            match wire.raw.ordinal() {
1908                1 => Self::StructuredSelector(::fidl_next::FromWire::from_wire(unsafe {
1909                    wire.raw.get().read_unchecked::<crate::wire::Selector<'de>>()
1910                })),
1911
1912                2 => Self::RawSelector(::fidl_next::FromWire::from_wire(unsafe {
1913                    wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
1914                })),
1915
1916                ord => return Self::UnknownOrdinal_(ord as u64),
1917            }
1918        }
1919    }
1920
1921    impl<'de> ::fidl_next::FromWireRef<crate::wire::SelectorArgument<'de>> for SelectorArgument {
1922        #[inline]
1923        fn from_wire_ref(wire: &crate::wire::SelectorArgument<'de>) -> Self {
1924            match wire.raw.ordinal() {
1925                1 => Self::StructuredSelector(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1926                    wire.raw.get().deref_unchecked::<crate::wire::Selector<'de>>()
1927                })),
1928
1929                2 => Self::RawSelector(::fidl_next::FromWireRef::from_wire_ref(unsafe {
1930                    wire.raw.get().deref_unchecked::<::fidl_next::wire::String<'de>>()
1931                })),
1932
1933                ord => return Self::UnknownOrdinal_(ord as u64),
1934            }
1935        }
1936    }
1937
1938    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelectorArgument<'de>>
1939        for SelectorArgument
1940    {
1941        #[inline]
1942        fn from_wire_option(
1943            wire: crate::wire_optional::SelectorArgument<'de>,
1944        ) -> ::core::option::Option<Self> {
1945            if let Some(inner) = wire.into_option() {
1946                Some(::fidl_next::FromWire::from_wire(inner))
1947            } else {
1948                None
1949            }
1950        }
1951    }
1952
1953    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::SelectorArgument<'de>>
1954        for Box<SelectorArgument>
1955    {
1956        #[inline]
1957        fn from_wire_option(
1958            wire: crate::wire_optional::SelectorArgument<'de>,
1959        ) -> ::core::option::Option<Self> {
1960            <SelectorArgument as ::fidl_next::FromWireOption<
1961                crate::wire_optional::SelectorArgument<'de>,
1962            >>::from_wire_option(wire)
1963            .map(Box::new)
1964        }
1965    }
1966
1967    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::SelectorArgument<'de>>
1968        for Box<SelectorArgument>
1969    {
1970        #[inline]
1971        fn from_wire_option_ref(
1972            wire: &crate::wire_optional::SelectorArgument<'de>,
1973        ) -> ::core::option::Option<Self> {
1974            if let Some(inner) = wire.as_ref() {
1975                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
1976            } else {
1977                None
1978            }
1979        }
1980    }
1981
1982    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1983    pub enum ClientSelectorConfiguration {
1984        Selectors(::std::vec::Vec<crate::natural::SelectorArgument>),
1985
1986        SelectAll(bool),
1987
1988        UnknownOrdinal_(u64),
1989    }
1990
1991    impl ClientSelectorConfiguration {
1992        pub fn is_unknown(&self) -> bool {
1993            #[allow(unreachable_patterns)]
1994            match self {
1995                Self::UnknownOrdinal_(_) => true,
1996                _ => false,
1997            }
1998        }
1999    }
2000
2001    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ClientSelectorConfiguration<'static>, ___E>
2002        for ClientSelectorConfiguration
2003    where
2004        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2005        ___E: ::fidl_next::Encoder,
2006    {
2007        #[inline]
2008        fn encode(
2009            self,
2010            encoder: &mut ___E,
2011            out: &mut ::core::mem::MaybeUninit<crate::wire::ClientSelectorConfiguration<'static>>,
2012            _: (),
2013        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2014            ::fidl_next::munge!(let crate::wire::ClientSelectorConfiguration { raw, _phantom: _ } = out);
2015
2016            match self {
2017                Self::Selectors(value) => {
2018                    ::fidl_next::wire::Union::encode_as::<
2019                        ___E,
2020                        ::fidl_next::wire::Vector<'static, crate::wire::SelectorArgument<'static>>,
2021                    >(value, 1, encoder, raw, (4294967295, ()))?
2022                }
2023
2024                Self::SelectAll(value) => {
2025                    ::fidl_next::wire::Union::encode_as::<___E, bool>(value, 2, encoder, raw, ())?
2026                }
2027
2028                Self::UnknownOrdinal_(ordinal) => {
2029                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
2030                }
2031            }
2032
2033            Ok(())
2034        }
2035    }
2036
2037    unsafe impl<'a, ___E>
2038        ::fidl_next::Encode<crate::wire::ClientSelectorConfiguration<'static>, ___E>
2039        for &'a ClientSelectorConfiguration
2040    where
2041        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2042        ___E: ::fidl_next::Encoder,
2043    {
2044        #[inline]
2045        fn encode(
2046            self,
2047            encoder: &mut ___E,
2048            out: &mut ::core::mem::MaybeUninit<crate::wire::ClientSelectorConfiguration<'static>>,
2049            _: (),
2050        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2051            ::fidl_next::munge!(let crate::wire::ClientSelectorConfiguration { raw, _phantom: _ } = out);
2052
2053            match self {
2054                ClientSelectorConfiguration::Selectors(value) => {
2055                    ::fidl_next::wire::Union::encode_as::<
2056                        ___E,
2057                        ::fidl_next::wire::Vector<'static, crate::wire::SelectorArgument<'static>>,
2058                    >(value, 1, encoder, raw, (4294967295, ()))?
2059                }
2060
2061                ClientSelectorConfiguration::SelectAll(value) => {
2062                    ::fidl_next::wire::Union::encode_as::<___E, bool>(value, 2, encoder, raw, ())?
2063                }
2064
2065                ClientSelectorConfiguration::UnknownOrdinal_(ordinal) => {
2066                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
2067                }
2068            }
2069
2070            Ok(())
2071        }
2072    }
2073
2074    unsafe impl<___E>
2075        ::fidl_next::EncodeOption<crate::wire_optional::ClientSelectorConfiguration<'static>, ___E>
2076        for ClientSelectorConfiguration
2077    where
2078        ___E: ?Sized,
2079        ClientSelectorConfiguration:
2080            ::fidl_next::Encode<crate::wire::ClientSelectorConfiguration<'static>, ___E>,
2081    {
2082        #[inline]
2083        fn encode_option(
2084            this: ::core::option::Option<Self>,
2085            encoder: &mut ___E,
2086            out: &mut ::core::mem::MaybeUninit<
2087                crate::wire_optional::ClientSelectorConfiguration<'static>,
2088            >,
2089            _: (),
2090        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2091            ::fidl_next::munge!(let crate::wire_optional::ClientSelectorConfiguration { raw, _phantom: _ } = &mut *out);
2092
2093            if let Some(inner) = this {
2094                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2095                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2096            } else {
2097                ::fidl_next::wire::Union::encode_absent(raw);
2098            }
2099
2100            Ok(())
2101        }
2102    }
2103
2104    unsafe impl<'a, ___E>
2105        ::fidl_next::EncodeOption<crate::wire_optional::ClientSelectorConfiguration<'static>, ___E>
2106        for &'a ClientSelectorConfiguration
2107    where
2108        ___E: ?Sized,
2109        &'a ClientSelectorConfiguration:
2110            ::fidl_next::Encode<crate::wire::ClientSelectorConfiguration<'static>, ___E>,
2111    {
2112        #[inline]
2113        fn encode_option(
2114            this: ::core::option::Option<Self>,
2115            encoder: &mut ___E,
2116            out: &mut ::core::mem::MaybeUninit<
2117                crate::wire_optional::ClientSelectorConfiguration<'static>,
2118            >,
2119            _: (),
2120        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2121            ::fidl_next::munge!(let crate::wire_optional::ClientSelectorConfiguration { raw, _phantom: _ } = &mut *out);
2122
2123            if let Some(inner) = this {
2124                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2125                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2126            } else {
2127                ::fidl_next::wire::Union::encode_absent(raw);
2128            }
2129
2130            Ok(())
2131        }
2132    }
2133
2134    impl<'de> ::fidl_next::FromWire<crate::wire::ClientSelectorConfiguration<'de>>
2135        for ClientSelectorConfiguration
2136    {
2137        #[inline]
2138        fn from_wire(wire: crate::wire::ClientSelectorConfiguration<'de>) -> Self {
2139            let wire = ::core::mem::ManuallyDrop::new(wire);
2140            match wire.raw.ordinal() {
2141                1 => Self::Selectors(::fidl_next::FromWire::from_wire(unsafe {
2142                    wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SelectorArgument<'de>>>()
2143                })),
2144
2145                2 => Self::SelectAll(::fidl_next::FromWire::from_wire(unsafe {
2146                    wire.raw.get().read_unchecked::<bool>()
2147                })),
2148
2149                ord => return Self::UnknownOrdinal_(ord as u64),
2150            }
2151        }
2152    }
2153
2154    impl<'de> ::fidl_next::FromWireRef<crate::wire::ClientSelectorConfiguration<'de>>
2155        for ClientSelectorConfiguration
2156    {
2157        #[inline]
2158        fn from_wire_ref(wire: &crate::wire::ClientSelectorConfiguration<'de>) -> Self {
2159            match wire.raw.ordinal() {
2160                1 => Self::Selectors(::fidl_next::FromWireRef::from_wire_ref(unsafe {
2161                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SelectorArgument<'de>>>()
2162                })),
2163
2164                2 => Self::SelectAll(::fidl_next::FromWireRef::from_wire_ref(unsafe {
2165                    wire.raw.get().deref_unchecked::<bool>()
2166                })),
2167
2168                ord => return Self::UnknownOrdinal_(ord as u64),
2169            }
2170        }
2171    }
2172
2173    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ClientSelectorConfiguration<'de>>
2174        for ClientSelectorConfiguration
2175    {
2176        #[inline]
2177        fn from_wire_option(
2178            wire: crate::wire_optional::ClientSelectorConfiguration<'de>,
2179        ) -> ::core::option::Option<Self> {
2180            if let Some(inner) = wire.into_option() {
2181                Some(::fidl_next::FromWire::from_wire(inner))
2182            } else {
2183                None
2184            }
2185        }
2186    }
2187
2188    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ClientSelectorConfiguration<'de>>
2189        for Box<ClientSelectorConfiguration>
2190    {
2191        #[inline]
2192        fn from_wire_option(
2193            wire: crate::wire_optional::ClientSelectorConfiguration<'de>,
2194        ) -> ::core::option::Option<Self> {
2195            <ClientSelectorConfiguration as ::fidl_next::FromWireOption<
2196                crate::wire_optional::ClientSelectorConfiguration<'de>,
2197            >>::from_wire_option(wire)
2198            .map(Box::new)
2199        }
2200    }
2201
2202    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::ClientSelectorConfiguration<'de>>
2203        for Box<ClientSelectorConfiguration>
2204    {
2205        #[inline]
2206        fn from_wire_option_ref(
2207            wire: &crate::wire_optional::ClientSelectorConfiguration<'de>,
2208        ) -> ::core::option::Option<Self> {
2209            if let Some(inner) = wire.as_ref() {
2210                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
2211            } else {
2212                None
2213            }
2214        }
2215    }
2216
2217    #[doc = " Enum used to specify the output format for\n Reader results.\n"]
2218    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2219    #[repr(u32)]
2220    pub enum Format {
2221        Json = 1,
2222        Text = 2,
2223        Cbor = 3,
2224        LegacyFxt = 4,
2225        Fxt = 5,
2226    }
2227    impl ::core::convert::TryFrom<u32> for Format {
2228        type Error = ::fidl_next::UnknownStrictEnumMemberError;
2229        fn try_from(
2230            value: u32,
2231        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
2232            match value {
2233                1 => Ok(Self::Json),
2234                2 => Ok(Self::Text),
2235                3 => Ok(Self::Cbor),
2236                4 => Ok(Self::LegacyFxt),
2237                5 => Ok(Self::Fxt),
2238
2239                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
2240            }
2241        }
2242    }
2243
2244    impl ::std::convert::From<Format> for u32 {
2245        fn from(value: Format) -> Self {
2246            match value {
2247                Format::Json => 1,
2248                Format::Text => 2,
2249                Format::Cbor => 3,
2250                Format::LegacyFxt => 4,
2251                Format::Fxt => 5,
2252            }
2253        }
2254    }
2255
2256    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Format, ___E> for Format
2257    where
2258        ___E: ?Sized,
2259    {
2260        #[inline]
2261        fn encode(
2262            self,
2263            encoder: &mut ___E,
2264            out: &mut ::core::mem::MaybeUninit<crate::wire::Format>,
2265            _: (),
2266        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2267            ::fidl_next::Encode::encode(&self, encoder, out, ())
2268        }
2269    }
2270
2271    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Format, ___E> for &'a Format
2272    where
2273        ___E: ?Sized,
2274    {
2275        #[inline]
2276        fn encode(
2277            self,
2278            encoder: &mut ___E,
2279            out: &mut ::core::mem::MaybeUninit<crate::wire::Format>,
2280            _: (),
2281        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2282            ::fidl_next::munge!(let crate::wire::Format { value } = out);
2283            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2284                Format::Json => 1,
2285
2286                Format::Text => 2,
2287
2288                Format::Cbor => 3,
2289
2290                Format::LegacyFxt => 4,
2291
2292                Format::Fxt => 5,
2293            }));
2294
2295            Ok(())
2296        }
2297    }
2298
2299    impl ::core::convert::From<crate::wire::Format> for Format {
2300        fn from(wire: crate::wire::Format) -> Self {
2301            match u32::from(wire.value) {
2302                1 => Self::Json,
2303
2304                2 => Self::Text,
2305
2306                3 => Self::Cbor,
2307
2308                4 => Self::LegacyFxt,
2309
2310                5 => Self::Fxt,
2311
2312                _ => unsafe { ::core::hint::unreachable_unchecked() },
2313            }
2314        }
2315    }
2316
2317    impl ::fidl_next::FromWire<crate::wire::Format> for Format {
2318        #[inline]
2319        fn from_wire(wire: crate::wire::Format) -> Self {
2320            Self::from(wire)
2321        }
2322    }
2323
2324    impl ::fidl_next::FromWireRef<crate::wire::Format> for Format {
2325        #[inline]
2326        fn from_wire_ref(wire: &crate::wire::Format) -> Self {
2327            Self::from(*wire)
2328        }
2329    }
2330
2331    #[doc = " Parameters needed to configure a stream of diagnostics information.\n"]
2332    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2333    pub struct StreamParameters {
2334        pub data_type: ::core::option::Option<crate::natural::DataType>,
2335
2336        pub stream_mode: ::core::option::Option<crate::natural::StreamMode>,
2337
2338        pub format: ::core::option::Option<crate::natural::Format>,
2339
2340        pub client_selector_configuration:
2341            ::core::option::Option<crate::natural::ClientSelectorConfiguration>,
2342
2343        pub batch_retrieval_timeout_seconds: ::core::option::Option<i64>,
2344
2345        pub performance_configuration:
2346            ::core::option::Option<crate::natural::PerformanceConfiguration>,
2347    }
2348
2349    impl StreamParameters {
2350        fn __max_ordinal(&self) -> usize {
2351            if self.performance_configuration.is_some() {
2352                return 6;
2353            }
2354
2355            if self.batch_retrieval_timeout_seconds.is_some() {
2356                return 5;
2357            }
2358
2359            if self.client_selector_configuration.is_some() {
2360                return 4;
2361            }
2362
2363            if self.format.is_some() {
2364                return 3;
2365            }
2366
2367            if self.stream_mode.is_some() {
2368                return 2;
2369            }
2370
2371            if self.data_type.is_some() {
2372                return 1;
2373            }
2374
2375            0
2376        }
2377    }
2378
2379    unsafe impl<___E> ::fidl_next::Encode<crate::wire::StreamParameters<'static>, ___E>
2380        for StreamParameters
2381    where
2382        ___E: ::fidl_next::Encoder + ?Sized,
2383    {
2384        #[inline]
2385        fn encode(
2386            mut self,
2387            encoder: &mut ___E,
2388            out: &mut ::core::mem::MaybeUninit<crate::wire::StreamParameters<'static>>,
2389            _: (),
2390        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2391            ::fidl_next::munge!(let crate::wire::StreamParameters { table } = out);
2392
2393            let max_ord = self.__max_ordinal();
2394
2395            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2396            ::fidl_next::Wire::zero_padding(&mut out);
2397
2398            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2399                ::fidl_next::wire::Envelope,
2400            >(encoder, max_ord);
2401
2402            for i in 1..=max_ord {
2403                match i {
2404                    6 => {
2405                        if let Some(value) = self.performance_configuration.take() {
2406                            ::fidl_next::wire::Envelope::encode_value::<
2407                                crate::wire::PerformanceConfiguration<'static>,
2408                                ___E,
2409                            >(
2410                                value, preallocated.encoder, &mut out, ()
2411                            )?;
2412                        } else {
2413                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2414                        }
2415                    }
2416
2417                    5 => {
2418                        if let Some(value) = self.batch_retrieval_timeout_seconds.take() {
2419                            ::fidl_next::wire::Envelope::encode_value::<
2420                                ::fidl_next::wire::Int64,
2421                                ___E,
2422                            >(
2423                                value, preallocated.encoder, &mut out, ()
2424                            )?;
2425                        } else {
2426                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2427                        }
2428                    }
2429
2430                    4 => {
2431                        if let Some(value) = self.client_selector_configuration.take() {
2432                            ::fidl_next::wire::Envelope::encode_value::<
2433                                crate::wire::ClientSelectorConfiguration<'static>,
2434                                ___E,
2435                            >(
2436                                value, preallocated.encoder, &mut out, ()
2437                            )?;
2438                        } else {
2439                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2440                        }
2441                    }
2442
2443                    3 => {
2444                        if let Some(value) = self.format.take() {
2445                            ::fidl_next::wire::Envelope::encode_value::<crate::wire::Format, ___E>(
2446                                value,
2447                                preallocated.encoder,
2448                                &mut out,
2449                                (),
2450                            )?;
2451                        } else {
2452                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2453                        }
2454                    }
2455
2456                    2 => {
2457                        if let Some(value) = self.stream_mode.take() {
2458                            ::fidl_next::wire::Envelope::encode_value::<
2459                                crate::wire::StreamMode,
2460                                ___E,
2461                            >(
2462                                value, preallocated.encoder, &mut out, ()
2463                            )?;
2464                        } else {
2465                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2466                        }
2467                    }
2468
2469                    1 => {
2470                        if let Some(value) = self.data_type.take() {
2471                            ::fidl_next::wire::Envelope::encode_value::<crate::wire::DataType, ___E>(
2472                                value,
2473                                preallocated.encoder,
2474                                &mut out,
2475                                (),
2476                            )?;
2477                        } else {
2478                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2479                        }
2480                    }
2481
2482                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2483                }
2484                unsafe {
2485                    preallocated.write_next(out.assume_init_ref());
2486                }
2487            }
2488
2489            ::fidl_next::wire::Table::encode_len(table, max_ord);
2490
2491            Ok(())
2492        }
2493    }
2494
2495    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::StreamParameters<'static>, ___E>
2496        for &'a StreamParameters
2497    where
2498        ___E: ::fidl_next::Encoder + ?Sized,
2499    {
2500        #[inline]
2501        fn encode(
2502            self,
2503            encoder: &mut ___E,
2504            out: &mut ::core::mem::MaybeUninit<crate::wire::StreamParameters<'static>>,
2505            _: (),
2506        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2507            ::fidl_next::munge!(let crate::wire::StreamParameters { table } = out);
2508
2509            let max_ord = self.__max_ordinal();
2510
2511            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2512            ::fidl_next::Wire::zero_padding(&mut out);
2513
2514            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2515                ::fidl_next::wire::Envelope,
2516            >(encoder, max_ord);
2517
2518            for i in 1..=max_ord {
2519                match i {
2520                    6 => {
2521                        if let Some(value) = &self.performance_configuration {
2522                            ::fidl_next::wire::Envelope::encode_value::<
2523                                crate::wire::PerformanceConfiguration<'static>,
2524                                ___E,
2525                            >(
2526                                value, preallocated.encoder, &mut out, ()
2527                            )?;
2528                        } else {
2529                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2530                        }
2531                    }
2532
2533                    5 => {
2534                        if let Some(value) = &self.batch_retrieval_timeout_seconds {
2535                            ::fidl_next::wire::Envelope::encode_value::<
2536                                ::fidl_next::wire::Int64,
2537                                ___E,
2538                            >(
2539                                value, preallocated.encoder, &mut out, ()
2540                            )?;
2541                        } else {
2542                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2543                        }
2544                    }
2545
2546                    4 => {
2547                        if let Some(value) = &self.client_selector_configuration {
2548                            ::fidl_next::wire::Envelope::encode_value::<
2549                                crate::wire::ClientSelectorConfiguration<'static>,
2550                                ___E,
2551                            >(
2552                                value, preallocated.encoder, &mut out, ()
2553                            )?;
2554                        } else {
2555                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2556                        }
2557                    }
2558
2559                    3 => {
2560                        if let Some(value) = &self.format {
2561                            ::fidl_next::wire::Envelope::encode_value::<crate::wire::Format, ___E>(
2562                                value,
2563                                preallocated.encoder,
2564                                &mut out,
2565                                (),
2566                            )?;
2567                        } else {
2568                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2569                        }
2570                    }
2571
2572                    2 => {
2573                        if let Some(value) = &self.stream_mode {
2574                            ::fidl_next::wire::Envelope::encode_value::<
2575                                crate::wire::StreamMode,
2576                                ___E,
2577                            >(
2578                                value, preallocated.encoder, &mut out, ()
2579                            )?;
2580                        } else {
2581                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2582                        }
2583                    }
2584
2585                    1 => {
2586                        if let Some(value) = &self.data_type {
2587                            ::fidl_next::wire::Envelope::encode_value::<crate::wire::DataType, ___E>(
2588                                value,
2589                                preallocated.encoder,
2590                                &mut out,
2591                                (),
2592                            )?;
2593                        } else {
2594                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2595                        }
2596                    }
2597
2598                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2599                }
2600                unsafe {
2601                    preallocated.write_next(out.assume_init_ref());
2602                }
2603            }
2604
2605            ::fidl_next::wire::Table::encode_len(table, max_ord);
2606
2607            Ok(())
2608        }
2609    }
2610
2611    impl<'de> ::fidl_next::FromWire<crate::wire::StreamParameters<'de>> for StreamParameters {
2612        #[inline]
2613        fn from_wire(wire_: crate::wire::StreamParameters<'de>) -> Self {
2614            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2615
2616            let data_type = wire_.table.get(1);
2617
2618            let stream_mode = wire_.table.get(2);
2619
2620            let format = wire_.table.get(3);
2621
2622            let client_selector_configuration = wire_.table.get(4);
2623
2624            let batch_retrieval_timeout_seconds = wire_.table.get(5);
2625
2626            let performance_configuration = wire_.table.get(6);
2627
2628            Self {
2629                data_type: data_type.map(|envelope| {
2630                    ::fidl_next::FromWire::from_wire(unsafe {
2631                        envelope.read_unchecked::<crate::wire::DataType>()
2632                    })
2633                }),
2634
2635                stream_mode: stream_mode.map(|envelope| {
2636                    ::fidl_next::FromWire::from_wire(unsafe {
2637                        envelope.read_unchecked::<crate::wire::StreamMode>()
2638                    })
2639                }),
2640
2641                format: format.map(|envelope| {
2642                    ::fidl_next::FromWire::from_wire(unsafe {
2643                        envelope.read_unchecked::<crate::wire::Format>()
2644                    })
2645                }),
2646
2647                client_selector_configuration: client_selector_configuration.map(|envelope| {
2648                    ::fidl_next::FromWire::from_wire(unsafe {
2649                        envelope.read_unchecked::<crate::wire::ClientSelectorConfiguration<'de>>()
2650                    })
2651                }),
2652
2653                batch_retrieval_timeout_seconds: batch_retrieval_timeout_seconds.map(|envelope| {
2654                    ::fidl_next::FromWire::from_wire(unsafe {
2655                        envelope.read_unchecked::<::fidl_next::wire::Int64>()
2656                    })
2657                }),
2658
2659                performance_configuration: performance_configuration.map(|envelope| {
2660                    ::fidl_next::FromWire::from_wire(unsafe {
2661                        envelope.read_unchecked::<crate::wire::PerformanceConfiguration<'de>>()
2662                    })
2663                }),
2664            }
2665        }
2666    }
2667
2668    impl<'de> ::fidl_next::FromWireRef<crate::wire::StreamParameters<'de>> for StreamParameters {
2669        #[inline]
2670        fn from_wire_ref(wire: &crate::wire::StreamParameters<'de>) -> Self {
2671            Self {
2672                data_type: wire.table.get(1).map(|envelope| {
2673                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2674                        envelope.deref_unchecked::<crate::wire::DataType>()
2675                    })
2676                }),
2677
2678                stream_mode: wire.table.get(2).map(|envelope| {
2679                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2680                        envelope.deref_unchecked::<crate::wire::StreamMode>()
2681                    })
2682                }),
2683
2684                format: wire.table.get(3).map(|envelope| {
2685                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2686                        envelope.deref_unchecked::<crate::wire::Format>()
2687                    })
2688                }),
2689
2690                client_selector_configuration: wire.table.get(4).map(|envelope| {
2691                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2692                        envelope.deref_unchecked::<crate::wire::ClientSelectorConfiguration<'de>>()
2693                    })
2694                }),
2695
2696                batch_retrieval_timeout_seconds: wire.table.get(5).map(|envelope| {
2697                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2698                        envelope.deref_unchecked::<::fidl_next::wire::Int64>()
2699                    })
2700                }),
2701
2702                performance_configuration: wire.table.get(6).map(|envelope| {
2703                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2704                        envelope.deref_unchecked::<crate::wire::PerformanceConfiguration<'de>>()
2705                    })
2706                }),
2707            }
2708        }
2709    }
2710
2711    pub type ArchiveAccessorWaitForReadyResponse = ();
2712
2713    #[doc = " Enum describing the potential failure states of the streaming protocol when serving results\n to the client over the result iterator.\n"]
2714    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2715    #[repr(u32)]
2716    pub enum ReaderError {
2717        Io = 1,
2718    }
2719    impl ::core::convert::TryFrom<u32> for ReaderError {
2720        type Error = ::fidl_next::UnknownStrictEnumMemberError;
2721        fn try_from(
2722            value: u32,
2723        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
2724            match value {
2725                1 => Ok(Self::Io),
2726
2727                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
2728            }
2729        }
2730    }
2731
2732    impl ::std::convert::From<ReaderError> for u32 {
2733        fn from(value: ReaderError) -> Self {
2734            match value {
2735                ReaderError::Io => 1,
2736            }
2737        }
2738    }
2739
2740    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ReaderError, ___E> for ReaderError
2741    where
2742        ___E: ?Sized,
2743    {
2744        #[inline]
2745        fn encode(
2746            self,
2747            encoder: &mut ___E,
2748            out: &mut ::core::mem::MaybeUninit<crate::wire::ReaderError>,
2749            _: (),
2750        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2751            ::fidl_next::Encode::encode(&self, encoder, out, ())
2752        }
2753    }
2754
2755    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ReaderError, ___E> for &'a ReaderError
2756    where
2757        ___E: ?Sized,
2758    {
2759        #[inline]
2760        fn encode(
2761            self,
2762            encoder: &mut ___E,
2763            out: &mut ::core::mem::MaybeUninit<crate::wire::ReaderError>,
2764            _: (),
2765        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2766            ::fidl_next::munge!(let crate::wire::ReaderError { value } = out);
2767            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2768                ReaderError::Io => 1,
2769            }));
2770
2771            Ok(())
2772        }
2773    }
2774
2775    impl ::core::convert::From<crate::wire::ReaderError> for ReaderError {
2776        fn from(wire: crate::wire::ReaderError) -> Self {
2777            match u32::from(wire.value) {
2778                1 => Self::Io,
2779
2780                _ => unsafe { ::core::hint::unreachable_unchecked() },
2781            }
2782        }
2783    }
2784
2785    impl ::fidl_next::FromWire<crate::wire::ReaderError> for ReaderError {
2786        #[inline]
2787        fn from_wire(wire: crate::wire::ReaderError) -> Self {
2788            Self::from(wire)
2789        }
2790    }
2791
2792    impl ::fidl_next::FromWireRef<crate::wire::ReaderError> for ReaderError {
2793        #[inline]
2794        fn from_wire_ref(wire: &crate::wire::ReaderError) -> Self {
2795            Self::from(*wire)
2796        }
2797    }
2798
2799    pub type BatchIteratorWaitForReadyResponse = ();
2800
2801    #[doc = " ConfigurationError indicates a bad setting in `Sample::Set`. This value\n is returned before the first sample is taken.\n"]
2802    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2803    #[repr(u32)]
2804    pub enum ConfigurationError {
2805        SamplePeriodTooSmall = 1,
2806        SampleParametersInvalid = 2,
2807        InvalidSelectors = 3,
2808        UnknownOrdinal_(u32) = 4,
2809    }
2810    impl ::std::convert::From<u32> for ConfigurationError {
2811        fn from(value: u32) -> Self {
2812            match value {
2813                1 => Self::SamplePeriodTooSmall,
2814                2 => Self::SampleParametersInvalid,
2815                3 => Self::InvalidSelectors,
2816
2817                _ => Self::UnknownOrdinal_(value),
2818            }
2819        }
2820    }
2821
2822    impl ::std::convert::From<ConfigurationError> for u32 {
2823        fn from(value: ConfigurationError) -> Self {
2824            match value {
2825                ConfigurationError::SamplePeriodTooSmall => 1,
2826                ConfigurationError::SampleParametersInvalid => 2,
2827                ConfigurationError::InvalidSelectors => 3,
2828
2829                ConfigurationError::UnknownOrdinal_(value) => value,
2830            }
2831        }
2832    }
2833
2834    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ConfigurationError, ___E> for ConfigurationError
2835    where
2836        ___E: ?Sized,
2837    {
2838        #[inline]
2839        fn encode(
2840            self,
2841            encoder: &mut ___E,
2842            out: &mut ::core::mem::MaybeUninit<crate::wire::ConfigurationError>,
2843            _: (),
2844        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2845            ::fidl_next::Encode::encode(&self, encoder, out, ())
2846        }
2847    }
2848
2849    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ConfigurationError, ___E>
2850        for &'a ConfigurationError
2851    where
2852        ___E: ?Sized,
2853    {
2854        #[inline]
2855        fn encode(
2856            self,
2857            encoder: &mut ___E,
2858            out: &mut ::core::mem::MaybeUninit<crate::wire::ConfigurationError>,
2859            _: (),
2860        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2861            ::fidl_next::munge!(let crate::wire::ConfigurationError { value } = out);
2862            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2863                ConfigurationError::SamplePeriodTooSmall => 1,
2864
2865                ConfigurationError::SampleParametersInvalid => 2,
2866
2867                ConfigurationError::InvalidSelectors => 3,
2868
2869                ConfigurationError::UnknownOrdinal_(value) => value,
2870            }));
2871
2872            Ok(())
2873        }
2874    }
2875
2876    impl ::core::convert::From<crate::wire::ConfigurationError> for ConfigurationError {
2877        fn from(wire: crate::wire::ConfigurationError) -> Self {
2878            match u32::from(wire.value) {
2879                1 => Self::SamplePeriodTooSmall,
2880
2881                2 => Self::SampleParametersInvalid,
2882
2883                3 => Self::InvalidSelectors,
2884
2885                value => Self::UnknownOrdinal_(value),
2886            }
2887        }
2888    }
2889
2890    impl ::fidl_next::FromWire<crate::wire::ConfigurationError> for ConfigurationError {
2891        #[inline]
2892        fn from_wire(wire: crate::wire::ConfigurationError) -> Self {
2893            Self::from(wire)
2894        }
2895    }
2896
2897    impl ::fidl_next::FromWireRef<crate::wire::ConfigurationError> for ConfigurationError {
2898        #[inline]
2899        fn from_wire_ref(wire: &crate::wire::ConfigurationError) -> Self {
2900            Self::from(*wire)
2901        }
2902    }
2903
2904    pub type LogFlusherWaitUntilFlushedResponse = ();
2905
2906    #[derive(Debug, Clone, PartialEq)]
2907    pub struct LogInterestSelector {
2908        pub selector: crate::natural::ComponentSelector,
2909
2910        pub interest: ::fidl_next_common_fuchsia_diagnostics_types::natural::Interest,
2911    }
2912
2913    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogInterestSelector<'static>, ___E>
2914        for LogInterestSelector
2915    where
2916        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2917        ___E: ::fidl_next::Encoder,
2918    {
2919        #[inline]
2920        fn encode(
2921            self,
2922            encoder_: &mut ___E,
2923            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogInterestSelector<'static>>,
2924            _: (),
2925        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2926            ::fidl_next::munge! {
2927                let crate::wire::LogInterestSelector {
2928                    selector,
2929                    interest,
2930
2931                } = out_;
2932            }
2933
2934            ::fidl_next::Encode::encode(self.selector, encoder_, selector, ())?;
2935
2936            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(selector.as_mut_ptr()) };
2937
2938            ::fidl_next::Encode::encode(self.interest, encoder_, interest, ())?;
2939
2940            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interest.as_mut_ptr()) };
2941
2942            Ok(())
2943        }
2944    }
2945
2946    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LogInterestSelector<'static>, ___E>
2947        for &'a LogInterestSelector
2948    where
2949        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2950        ___E: ::fidl_next::Encoder,
2951    {
2952        #[inline]
2953        fn encode(
2954            self,
2955            encoder_: &mut ___E,
2956            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogInterestSelector<'static>>,
2957            _: (),
2958        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2959            ::fidl_next::munge! {
2960                let crate::wire::LogInterestSelector {
2961                    selector,
2962                    interest,
2963
2964                } = out_;
2965            }
2966
2967            ::fidl_next::Encode::encode(&self.selector, encoder_, selector, ())?;
2968
2969            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(selector.as_mut_ptr()) };
2970
2971            ::fidl_next::Encode::encode(&self.interest, encoder_, interest, ())?;
2972
2973            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interest.as_mut_ptr()) };
2974
2975            Ok(())
2976        }
2977    }
2978
2979    unsafe impl<___E>
2980        ::fidl_next::EncodeOption<
2981            ::fidl_next::wire::Box<'static, crate::wire::LogInterestSelector<'static>>,
2982            ___E,
2983        > for LogInterestSelector
2984    where
2985        ___E: ::fidl_next::Encoder + ?Sized,
2986        LogInterestSelector: ::fidl_next::Encode<crate::wire::LogInterestSelector<'static>, ___E>,
2987    {
2988        #[inline]
2989        fn encode_option(
2990            this: ::core::option::Option<Self>,
2991            encoder: &mut ___E,
2992            out: &mut ::core::mem::MaybeUninit<
2993                ::fidl_next::wire::Box<'static, crate::wire::LogInterestSelector<'static>>,
2994            >,
2995            _: (),
2996        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2997            if let Some(inner) = this {
2998                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2999                ::fidl_next::wire::Box::encode_present(out);
3000            } else {
3001                ::fidl_next::wire::Box::encode_absent(out);
3002            }
3003
3004            Ok(())
3005        }
3006    }
3007
3008    unsafe impl<'a, ___E>
3009        ::fidl_next::EncodeOption<
3010            ::fidl_next::wire::Box<'static, crate::wire::LogInterestSelector<'static>>,
3011            ___E,
3012        > for &'a LogInterestSelector
3013    where
3014        ___E: ::fidl_next::Encoder + ?Sized,
3015        &'a LogInterestSelector:
3016            ::fidl_next::Encode<crate::wire::LogInterestSelector<'static>, ___E>,
3017    {
3018        #[inline]
3019        fn encode_option(
3020            this: ::core::option::Option<Self>,
3021            encoder: &mut ___E,
3022            out: &mut ::core::mem::MaybeUninit<
3023                ::fidl_next::wire::Box<'static, crate::wire::LogInterestSelector<'static>>,
3024            >,
3025            _: (),
3026        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3027            if let Some(inner) = this {
3028                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3029                ::fidl_next::wire::Box::encode_present(out);
3030            } else {
3031                ::fidl_next::wire::Box::encode_absent(out);
3032            }
3033
3034            Ok(())
3035        }
3036    }
3037
3038    impl<'de> ::fidl_next::FromWire<crate::wire::LogInterestSelector<'de>> for LogInterestSelector {
3039        #[inline]
3040        fn from_wire(wire: crate::wire::LogInterestSelector<'de>) -> Self {
3041            Self {
3042                selector: ::fidl_next::FromWire::from_wire(wire.selector),
3043
3044                interest: ::fidl_next::FromWire::from_wire(wire.interest),
3045            }
3046        }
3047    }
3048
3049    impl<'de> ::fidl_next::FromWireRef<crate::wire::LogInterestSelector<'de>> for LogInterestSelector {
3050        #[inline]
3051        fn from_wire_ref(wire: &crate::wire::LogInterestSelector<'de>) -> Self {
3052            Self {
3053                selector: ::fidl_next::FromWireRef::from_wire_ref(&wire.selector),
3054
3055                interest: ::fidl_next::FromWireRef::from_wire_ref(&wire.interest),
3056            }
3057        }
3058    }
3059
3060    #[derive(Debug, Default, Clone, PartialEq)]
3061    pub struct LogSettingsSetComponentInterestRequest {
3062        pub selectors: ::core::option::Option<::std::vec::Vec<crate::natural::LogInterestSelector>>,
3063
3064        pub persist: ::core::option::Option<bool>,
3065    }
3066
3067    impl LogSettingsSetComponentInterestRequest {
3068        fn __max_ordinal(&self) -> usize {
3069            if self.persist.is_some() {
3070                return 2;
3071            }
3072
3073            if self.selectors.is_some() {
3074                return 1;
3075            }
3076
3077            0
3078        }
3079    }
3080
3081    unsafe impl<___E>
3082        ::fidl_next::Encode<crate::wire::LogSettingsSetComponentInterestRequest<'static>, ___E>
3083        for LogSettingsSetComponentInterestRequest
3084    where
3085        ___E: ::fidl_next::Encoder + ?Sized,
3086    {
3087        #[inline]
3088        fn encode(
3089            mut self,
3090            encoder: &mut ___E,
3091            out: &mut ::core::mem::MaybeUninit<
3092                crate::wire::LogSettingsSetComponentInterestRequest<'static>,
3093            >,
3094            _: (),
3095        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3096            ::fidl_next::munge!(let crate::wire::LogSettingsSetComponentInterestRequest { table } = out);
3097
3098            let max_ord = self.__max_ordinal();
3099
3100            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3101            ::fidl_next::Wire::zero_padding(&mut out);
3102
3103            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3104                ::fidl_next::wire::Envelope,
3105            >(encoder, max_ord);
3106
3107            for i in 1..=max_ord {
3108                match i {
3109                    2 => {
3110                        if let Some(value) = self.persist.take() {
3111                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3112                                value,
3113                                preallocated.encoder,
3114                                &mut out,
3115                                (),
3116                            )?;
3117                        } else {
3118                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3119                        }
3120                    }
3121
3122                    1 => {
3123                        if let Some(value) = self.selectors.take() {
3124                            ::fidl_next::wire::Envelope::encode_value::<
3125                                ::fidl_next::wire::Vector<
3126                                    'static,
3127                                    crate::wire::LogInterestSelector<'static>,
3128                                >,
3129                                ___E,
3130                            >(
3131                                value, preallocated.encoder, &mut out, (64, ())
3132                            )?;
3133                        } else {
3134                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3135                        }
3136                    }
3137
3138                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3139                }
3140                unsafe {
3141                    preallocated.write_next(out.assume_init_ref());
3142                }
3143            }
3144
3145            ::fidl_next::wire::Table::encode_len(table, max_ord);
3146
3147            Ok(())
3148        }
3149    }
3150
3151    unsafe impl<'a, ___E>
3152        ::fidl_next::Encode<crate::wire::LogSettingsSetComponentInterestRequest<'static>, ___E>
3153        for &'a LogSettingsSetComponentInterestRequest
3154    where
3155        ___E: ::fidl_next::Encoder + ?Sized,
3156    {
3157        #[inline]
3158        fn encode(
3159            self,
3160            encoder: &mut ___E,
3161            out: &mut ::core::mem::MaybeUninit<
3162                crate::wire::LogSettingsSetComponentInterestRequest<'static>,
3163            >,
3164            _: (),
3165        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3166            ::fidl_next::munge!(let crate::wire::LogSettingsSetComponentInterestRequest { table } = out);
3167
3168            let max_ord = self.__max_ordinal();
3169
3170            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3171            ::fidl_next::Wire::zero_padding(&mut out);
3172
3173            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3174                ::fidl_next::wire::Envelope,
3175            >(encoder, max_ord);
3176
3177            for i in 1..=max_ord {
3178                match i {
3179                    2 => {
3180                        if let Some(value) = &self.persist {
3181                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3182                                value,
3183                                preallocated.encoder,
3184                                &mut out,
3185                                (),
3186                            )?;
3187                        } else {
3188                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3189                        }
3190                    }
3191
3192                    1 => {
3193                        if let Some(value) = &self.selectors {
3194                            ::fidl_next::wire::Envelope::encode_value::<
3195                                ::fidl_next::wire::Vector<
3196                                    'static,
3197                                    crate::wire::LogInterestSelector<'static>,
3198                                >,
3199                                ___E,
3200                            >(
3201                                value, preallocated.encoder, &mut out, (64, ())
3202                            )?;
3203                        } else {
3204                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3205                        }
3206                    }
3207
3208                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3209                }
3210                unsafe {
3211                    preallocated.write_next(out.assume_init_ref());
3212                }
3213            }
3214
3215            ::fidl_next::wire::Table::encode_len(table, max_ord);
3216
3217            Ok(())
3218        }
3219    }
3220
3221    impl<'de> ::fidl_next::FromWire<crate::wire::LogSettingsSetComponentInterestRequest<'de>>
3222        for LogSettingsSetComponentInterestRequest
3223    {
3224        #[inline]
3225        fn from_wire(wire_: crate::wire::LogSettingsSetComponentInterestRequest<'de>) -> Self {
3226            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3227
3228            let selectors = wire_.table.get(1);
3229
3230            let persist = wire_.table.get(2);
3231
3232            Self {
3233                selectors: selectors.map(|envelope| {
3234                    ::fidl_next::FromWire::from_wire(unsafe {
3235                        envelope.read_unchecked::<::fidl_next::wire::Vector<
3236                                'de,
3237                                crate::wire::LogInterestSelector<'de>,
3238                            >>()
3239                    })
3240                }),
3241
3242                persist: persist.map(|envelope| {
3243                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3244                }),
3245            }
3246        }
3247    }
3248
3249    impl<'de> ::fidl_next::FromWireRef<crate::wire::LogSettingsSetComponentInterestRequest<'de>>
3250        for LogSettingsSetComponentInterestRequest
3251    {
3252        #[inline]
3253        fn from_wire_ref(wire: &crate::wire::LogSettingsSetComponentInterestRequest<'de>) -> Self {
3254            Self {
3255                selectors: wire.table.get(1).map(|envelope| {
3256                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3257                        envelope.deref_unchecked::<::fidl_next::wire::Vector<
3258                                'de,
3259                                crate::wire::LogInterestSelector<'de>,
3260                            >>()
3261                    })
3262                }),
3263
3264                persist: wire.table.get(2).map(|envelope| {
3265                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3266                        envelope.deref_unchecked::<bool>()
3267                    })
3268                }),
3269            }
3270        }
3271    }
3272
3273    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3274    pub struct LogStreamOptions {
3275        pub mode: ::core::option::Option<crate::natural::StreamMode>,
3276
3277        pub include_moniker: ::core::option::Option<bool>,
3278
3279        pub include_component_url: ::core::option::Option<bool>,
3280
3281        pub include_rolled_out: ::core::option::Option<bool>,
3282
3283        pub subscribe_to_manifest: ::core::option::Option<bool>,
3284    }
3285
3286    impl LogStreamOptions {
3287        fn __max_ordinal(&self) -> usize {
3288            if self.subscribe_to_manifest.is_some() {
3289                return 5;
3290            }
3291
3292            if self.include_rolled_out.is_some() {
3293                return 4;
3294            }
3295
3296            if self.include_component_url.is_some() {
3297                return 3;
3298            }
3299
3300            if self.include_moniker.is_some() {
3301                return 2;
3302            }
3303
3304            if self.mode.is_some() {
3305                return 1;
3306            }
3307
3308            0
3309        }
3310    }
3311
3312    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogStreamOptions<'static>, ___E>
3313        for LogStreamOptions
3314    where
3315        ___E: ::fidl_next::Encoder + ?Sized,
3316    {
3317        #[inline]
3318        fn encode(
3319            mut self,
3320            encoder: &mut ___E,
3321            out: &mut ::core::mem::MaybeUninit<crate::wire::LogStreamOptions<'static>>,
3322            _: (),
3323        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3324            ::fidl_next::munge!(let crate::wire::LogStreamOptions { table } = out);
3325
3326            let max_ord = self.__max_ordinal();
3327
3328            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3329            ::fidl_next::Wire::zero_padding(&mut out);
3330
3331            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3332                ::fidl_next::wire::Envelope,
3333            >(encoder, max_ord);
3334
3335            for i in 1..=max_ord {
3336                match i {
3337                    5 => {
3338                        if let Some(value) = self.subscribe_to_manifest.take() {
3339                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3340                                value,
3341                                preallocated.encoder,
3342                                &mut out,
3343                                (),
3344                            )?;
3345                        } else {
3346                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3347                        }
3348                    }
3349
3350                    4 => {
3351                        if let Some(value) = self.include_rolled_out.take() {
3352                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3353                                value,
3354                                preallocated.encoder,
3355                                &mut out,
3356                                (),
3357                            )?;
3358                        } else {
3359                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3360                        }
3361                    }
3362
3363                    3 => {
3364                        if let Some(value) = self.include_component_url.take() {
3365                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3366                                value,
3367                                preallocated.encoder,
3368                                &mut out,
3369                                (),
3370                            )?;
3371                        } else {
3372                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3373                        }
3374                    }
3375
3376                    2 => {
3377                        if let Some(value) = self.include_moniker.take() {
3378                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3379                                value,
3380                                preallocated.encoder,
3381                                &mut out,
3382                                (),
3383                            )?;
3384                        } else {
3385                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3386                        }
3387                    }
3388
3389                    1 => {
3390                        if let Some(value) = self.mode.take() {
3391                            ::fidl_next::wire::Envelope::encode_value::<
3392                                crate::wire::StreamMode,
3393                                ___E,
3394                            >(
3395                                value, preallocated.encoder, &mut out, ()
3396                            )?;
3397                        } else {
3398                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3399                        }
3400                    }
3401
3402                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3403                }
3404                unsafe {
3405                    preallocated.write_next(out.assume_init_ref());
3406                }
3407            }
3408
3409            ::fidl_next::wire::Table::encode_len(table, max_ord);
3410
3411            Ok(())
3412        }
3413    }
3414
3415    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LogStreamOptions<'static>, ___E>
3416        for &'a LogStreamOptions
3417    where
3418        ___E: ::fidl_next::Encoder + ?Sized,
3419    {
3420        #[inline]
3421        fn encode(
3422            self,
3423            encoder: &mut ___E,
3424            out: &mut ::core::mem::MaybeUninit<crate::wire::LogStreamOptions<'static>>,
3425            _: (),
3426        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3427            ::fidl_next::munge!(let crate::wire::LogStreamOptions { table } = out);
3428
3429            let max_ord = self.__max_ordinal();
3430
3431            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3432            ::fidl_next::Wire::zero_padding(&mut out);
3433
3434            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3435                ::fidl_next::wire::Envelope,
3436            >(encoder, max_ord);
3437
3438            for i in 1..=max_ord {
3439                match i {
3440                    5 => {
3441                        if let Some(value) = &self.subscribe_to_manifest {
3442                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3443                                value,
3444                                preallocated.encoder,
3445                                &mut out,
3446                                (),
3447                            )?;
3448                        } else {
3449                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3450                        }
3451                    }
3452
3453                    4 => {
3454                        if let Some(value) = &self.include_rolled_out {
3455                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3456                                value,
3457                                preallocated.encoder,
3458                                &mut out,
3459                                (),
3460                            )?;
3461                        } else {
3462                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3463                        }
3464                    }
3465
3466                    3 => {
3467                        if let Some(value) = &self.include_component_url {
3468                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3469                                value,
3470                                preallocated.encoder,
3471                                &mut out,
3472                                (),
3473                            )?;
3474                        } else {
3475                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3476                        }
3477                    }
3478
3479                    2 => {
3480                        if let Some(value) = &self.include_moniker {
3481                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3482                                value,
3483                                preallocated.encoder,
3484                                &mut out,
3485                                (),
3486                            )?;
3487                        } else {
3488                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3489                        }
3490                    }
3491
3492                    1 => {
3493                        if let Some(value) = &self.mode {
3494                            ::fidl_next::wire::Envelope::encode_value::<
3495                                crate::wire::StreamMode,
3496                                ___E,
3497                            >(
3498                                value, preallocated.encoder, &mut out, ()
3499                            )?;
3500                        } else {
3501                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3502                        }
3503                    }
3504
3505                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3506                }
3507                unsafe {
3508                    preallocated.write_next(out.assume_init_ref());
3509                }
3510            }
3511
3512            ::fidl_next::wire::Table::encode_len(table, max_ord);
3513
3514            Ok(())
3515        }
3516    }
3517
3518    impl<'de> ::fidl_next::FromWire<crate::wire::LogStreamOptions<'de>> for LogStreamOptions {
3519        #[inline]
3520        fn from_wire(wire_: crate::wire::LogStreamOptions<'de>) -> Self {
3521            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3522
3523            let mode = wire_.table.get(1);
3524
3525            let include_moniker = wire_.table.get(2);
3526
3527            let include_component_url = wire_.table.get(3);
3528
3529            let include_rolled_out = wire_.table.get(4);
3530
3531            let subscribe_to_manifest = wire_.table.get(5);
3532
3533            Self {
3534                mode: mode.map(|envelope| {
3535                    ::fidl_next::FromWire::from_wire(unsafe {
3536                        envelope.read_unchecked::<crate::wire::StreamMode>()
3537                    })
3538                }),
3539
3540                include_moniker: include_moniker.map(|envelope| {
3541                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3542                }),
3543
3544                include_component_url: include_component_url.map(|envelope| {
3545                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3546                }),
3547
3548                include_rolled_out: include_rolled_out.map(|envelope| {
3549                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3550                }),
3551
3552                subscribe_to_manifest: subscribe_to_manifest.map(|envelope| {
3553                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3554                }),
3555            }
3556        }
3557    }
3558
3559    impl<'de> ::fidl_next::FromWireRef<crate::wire::LogStreamOptions<'de>> for LogStreamOptions {
3560        #[inline]
3561        fn from_wire_ref(wire: &crate::wire::LogStreamOptions<'de>) -> Self {
3562            Self {
3563                mode: wire.table.get(1).map(|envelope| {
3564                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3565                        envelope.deref_unchecked::<crate::wire::StreamMode>()
3566                    })
3567                }),
3568
3569                include_moniker: wire.table.get(2).map(|envelope| {
3570                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3571                        envelope.deref_unchecked::<bool>()
3572                    })
3573                }),
3574
3575                include_component_url: wire.table.get(3).map(|envelope| {
3576                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3577                        envelope.deref_unchecked::<bool>()
3578                    })
3579                }),
3580
3581                include_rolled_out: wire.table.get(4).map(|envelope| {
3582                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3583                        envelope.deref_unchecked::<bool>()
3584                    })
3585                }),
3586
3587                subscribe_to_manifest: wire.table.get(5).map(|envelope| {
3588                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3589                        envelope.deref_unchecked::<bool>()
3590                    })
3591                }),
3592            }
3593        }
3594    }
3595
3596    #[doc = " `RuntimeError` indicates errors that manifest after the Sample server has\n begun periodically sampling data. Clients can ignore these errors, though\n they could potentially indicate that no `SampleReady` request will ever arrive,\n or that the batch iterator might behave in unexpected ways, such as hanging.\n"]
3597    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3598    #[repr(u32)]
3599    pub enum RuntimeError {
3600        BatchIteratorFailed = 1,
3601        UnknownOrdinal_(u32) = 2,
3602    }
3603    impl ::std::convert::From<u32> for RuntimeError {
3604        fn from(value: u32) -> Self {
3605            match value {
3606                1 => Self::BatchIteratorFailed,
3607
3608                _ => Self::UnknownOrdinal_(value),
3609            }
3610        }
3611    }
3612
3613    impl ::std::convert::From<RuntimeError> for u32 {
3614        fn from(value: RuntimeError) -> Self {
3615            match value {
3616                RuntimeError::BatchIteratorFailed => 1,
3617
3618                RuntimeError::UnknownOrdinal_(value) => value,
3619            }
3620        }
3621    }
3622
3623    unsafe impl<___E> ::fidl_next::Encode<crate::wire::RuntimeError, ___E> for RuntimeError
3624    where
3625        ___E: ?Sized,
3626    {
3627        #[inline]
3628        fn encode(
3629            self,
3630            encoder: &mut ___E,
3631            out: &mut ::core::mem::MaybeUninit<crate::wire::RuntimeError>,
3632            _: (),
3633        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3634            ::fidl_next::Encode::encode(&self, encoder, out, ())
3635        }
3636    }
3637
3638    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RuntimeError, ___E> for &'a RuntimeError
3639    where
3640        ___E: ?Sized,
3641    {
3642        #[inline]
3643        fn encode(
3644            self,
3645            encoder: &mut ___E,
3646            out: &mut ::core::mem::MaybeUninit<crate::wire::RuntimeError>,
3647            _: (),
3648        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3649            ::fidl_next::munge!(let crate::wire::RuntimeError { value } = out);
3650            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
3651                RuntimeError::BatchIteratorFailed => 1,
3652
3653                RuntimeError::UnknownOrdinal_(value) => value,
3654            }));
3655
3656            Ok(())
3657        }
3658    }
3659
3660    impl ::core::convert::From<crate::wire::RuntimeError> for RuntimeError {
3661        fn from(wire: crate::wire::RuntimeError) -> Self {
3662            match u32::from(wire.value) {
3663                1 => Self::BatchIteratorFailed,
3664
3665                value => Self::UnknownOrdinal_(value),
3666            }
3667        }
3668    }
3669
3670    impl ::fidl_next::FromWire<crate::wire::RuntimeError> for RuntimeError {
3671        #[inline]
3672        fn from_wire(wire: crate::wire::RuntimeError) -> Self {
3673            Self::from(wire)
3674        }
3675    }
3676
3677    impl ::fidl_next::FromWireRef<crate::wire::RuntimeError> for RuntimeError {
3678        #[inline]
3679        fn from_wire_ref(wire: &crate::wire::RuntimeError) -> Self {
3680            Self::from(*wire)
3681        }
3682    }
3683
3684    #[doc = " `SampleStrategy` instructs Archivist on the circumstances under which you\n want to receive data for the given `SampleDatum`.\n"]
3685    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3686    #[repr(u8)]
3687    pub enum SampleStrategy {
3688        OnDiff = 1,
3689        Always = 2,
3690        UnknownOrdinal_(u8) = 3,
3691    }
3692    impl ::std::convert::From<u8> for SampleStrategy {
3693        fn from(value: u8) -> Self {
3694            match value {
3695                1 => Self::OnDiff,
3696                2 => Self::Always,
3697
3698                _ => Self::UnknownOrdinal_(value),
3699            }
3700        }
3701    }
3702
3703    impl ::std::convert::From<SampleStrategy> for u8 {
3704        fn from(value: SampleStrategy) -> Self {
3705            match value {
3706                SampleStrategy::OnDiff => 1,
3707                SampleStrategy::Always => 2,
3708
3709                SampleStrategy::UnknownOrdinal_(value) => value,
3710            }
3711        }
3712    }
3713
3714    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleStrategy, ___E> for SampleStrategy
3715    where
3716        ___E: ?Sized,
3717    {
3718        #[inline]
3719        fn encode(
3720            self,
3721            encoder: &mut ___E,
3722            out: &mut ::core::mem::MaybeUninit<crate::wire::SampleStrategy>,
3723            _: (),
3724        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3725            ::fidl_next::Encode::encode(&self, encoder, out, ())
3726        }
3727    }
3728
3729    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SampleStrategy, ___E> for &'a SampleStrategy
3730    where
3731        ___E: ?Sized,
3732    {
3733        #[inline]
3734        fn encode(
3735            self,
3736            encoder: &mut ___E,
3737            out: &mut ::core::mem::MaybeUninit<crate::wire::SampleStrategy>,
3738            _: (),
3739        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3740            ::fidl_next::munge!(let crate::wire::SampleStrategy { value } = out);
3741            let _ = value.write(u8::from(match *self {
3742                SampleStrategy::OnDiff => 1,
3743
3744                SampleStrategy::Always => 2,
3745
3746                SampleStrategy::UnknownOrdinal_(value) => value,
3747            }));
3748
3749            Ok(())
3750        }
3751    }
3752
3753    impl ::core::convert::From<crate::wire::SampleStrategy> for SampleStrategy {
3754        fn from(wire: crate::wire::SampleStrategy) -> Self {
3755            match u8::from(wire.value) {
3756                1 => Self::OnDiff,
3757
3758                2 => Self::Always,
3759
3760                value => Self::UnknownOrdinal_(value),
3761            }
3762        }
3763    }
3764
3765    impl ::fidl_next::FromWire<crate::wire::SampleStrategy> for SampleStrategy {
3766        #[inline]
3767        fn from_wire(wire: crate::wire::SampleStrategy) -> Self {
3768            Self::from(wire)
3769        }
3770    }
3771
3772    impl ::fidl_next::FromWireRef<crate::wire::SampleStrategy> for SampleStrategy {
3773        #[inline]
3774        fn from_wire_ref(wire: &crate::wire::SampleStrategy) -> Self {
3775            Self::from(*wire)
3776        }
3777    }
3778
3779    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3780    pub struct SampleDatum {
3781        pub selector: ::core::option::Option<crate::natural::SelectorArgument>,
3782
3783        pub strategy: ::core::option::Option<crate::natural::SampleStrategy>,
3784
3785        pub interval_secs: ::core::option::Option<i64>,
3786    }
3787
3788    impl SampleDatum {
3789        fn __max_ordinal(&self) -> usize {
3790            if self.interval_secs.is_some() {
3791                return 3;
3792            }
3793
3794            if self.strategy.is_some() {
3795                return 2;
3796            }
3797
3798            if self.selector.is_some() {
3799                return 1;
3800            }
3801
3802            0
3803        }
3804    }
3805
3806    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleDatum<'static>, ___E> for SampleDatum
3807    where
3808        ___E: ::fidl_next::Encoder + ?Sized,
3809    {
3810        #[inline]
3811        fn encode(
3812            mut self,
3813            encoder: &mut ___E,
3814            out: &mut ::core::mem::MaybeUninit<crate::wire::SampleDatum<'static>>,
3815            _: (),
3816        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3817            ::fidl_next::munge!(let crate::wire::SampleDatum { table } = out);
3818
3819            let max_ord = self.__max_ordinal();
3820
3821            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3822            ::fidl_next::Wire::zero_padding(&mut out);
3823
3824            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3825                ::fidl_next::wire::Envelope,
3826            >(encoder, max_ord);
3827
3828            for i in 1..=max_ord {
3829                match i {
3830                    3 => {
3831                        if let Some(value) = self.interval_secs.take() {
3832                            ::fidl_next::wire::Envelope::encode_value::<
3833                                ::fidl_next::wire::Int64,
3834                                ___E,
3835                            >(
3836                                value, preallocated.encoder, &mut out, ()
3837                            )?;
3838                        } else {
3839                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3840                        }
3841                    }
3842
3843                    2 => {
3844                        if let Some(value) = self.strategy.take() {
3845                            ::fidl_next::wire::Envelope::encode_value::<
3846                                crate::wire::SampleStrategy,
3847                                ___E,
3848                            >(
3849                                value, preallocated.encoder, &mut out, ()
3850                            )?;
3851                        } else {
3852                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3853                        }
3854                    }
3855
3856                    1 => {
3857                        if let Some(value) = self.selector.take() {
3858                            ::fidl_next::wire::Envelope::encode_value::<
3859                                crate::wire::SelectorArgument<'static>,
3860                                ___E,
3861                            >(
3862                                value, preallocated.encoder, &mut out, ()
3863                            )?;
3864                        } else {
3865                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3866                        }
3867                    }
3868
3869                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3870                }
3871                unsafe {
3872                    preallocated.write_next(out.assume_init_ref());
3873                }
3874            }
3875
3876            ::fidl_next::wire::Table::encode_len(table, max_ord);
3877
3878            Ok(())
3879        }
3880    }
3881
3882    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SampleDatum<'static>, ___E>
3883        for &'a SampleDatum
3884    where
3885        ___E: ::fidl_next::Encoder + ?Sized,
3886    {
3887        #[inline]
3888        fn encode(
3889            self,
3890            encoder: &mut ___E,
3891            out: &mut ::core::mem::MaybeUninit<crate::wire::SampleDatum<'static>>,
3892            _: (),
3893        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3894            ::fidl_next::munge!(let crate::wire::SampleDatum { table } = out);
3895
3896            let max_ord = self.__max_ordinal();
3897
3898            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3899            ::fidl_next::Wire::zero_padding(&mut out);
3900
3901            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3902                ::fidl_next::wire::Envelope,
3903            >(encoder, max_ord);
3904
3905            for i in 1..=max_ord {
3906                match i {
3907                    3 => {
3908                        if let Some(value) = &self.interval_secs {
3909                            ::fidl_next::wire::Envelope::encode_value::<
3910                                ::fidl_next::wire::Int64,
3911                                ___E,
3912                            >(
3913                                value, preallocated.encoder, &mut out, ()
3914                            )?;
3915                        } else {
3916                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3917                        }
3918                    }
3919
3920                    2 => {
3921                        if let Some(value) = &self.strategy {
3922                            ::fidl_next::wire::Envelope::encode_value::<
3923                                crate::wire::SampleStrategy,
3924                                ___E,
3925                            >(
3926                                value, preallocated.encoder, &mut out, ()
3927                            )?;
3928                        } else {
3929                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3930                        }
3931                    }
3932
3933                    1 => {
3934                        if let Some(value) = &self.selector {
3935                            ::fidl_next::wire::Envelope::encode_value::<
3936                                crate::wire::SelectorArgument<'static>,
3937                                ___E,
3938                            >(
3939                                value, preallocated.encoder, &mut out, ()
3940                            )?;
3941                        } else {
3942                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3943                        }
3944                    }
3945
3946                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3947                }
3948                unsafe {
3949                    preallocated.write_next(out.assume_init_ref());
3950                }
3951            }
3952
3953            ::fidl_next::wire::Table::encode_len(table, max_ord);
3954
3955            Ok(())
3956        }
3957    }
3958
3959    impl<'de> ::fidl_next::FromWire<crate::wire::SampleDatum<'de>> for SampleDatum {
3960        #[inline]
3961        fn from_wire(wire_: crate::wire::SampleDatum<'de>) -> Self {
3962            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3963
3964            let selector = wire_.table.get(1);
3965
3966            let strategy = wire_.table.get(2);
3967
3968            let interval_secs = wire_.table.get(3);
3969
3970            Self {
3971                selector: selector.map(|envelope| {
3972                    ::fidl_next::FromWire::from_wire(unsafe {
3973                        envelope.read_unchecked::<crate::wire::SelectorArgument<'de>>()
3974                    })
3975                }),
3976
3977                strategy: strategy.map(|envelope| {
3978                    ::fidl_next::FromWire::from_wire(unsafe {
3979                        envelope.read_unchecked::<crate::wire::SampleStrategy>()
3980                    })
3981                }),
3982
3983                interval_secs: interval_secs.map(|envelope| {
3984                    ::fidl_next::FromWire::from_wire(unsafe {
3985                        envelope.read_unchecked::<::fidl_next::wire::Int64>()
3986                    })
3987                }),
3988            }
3989        }
3990    }
3991
3992    impl<'de> ::fidl_next::FromWireRef<crate::wire::SampleDatum<'de>> for SampleDatum {
3993        #[inline]
3994        fn from_wire_ref(wire: &crate::wire::SampleDatum<'de>) -> Self {
3995            Self {
3996                selector: wire.table.get(1).map(|envelope| {
3997                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3998                        envelope.deref_unchecked::<crate::wire::SelectorArgument<'de>>()
3999                    })
4000                }),
4001
4002                strategy: wire.table.get(2).map(|envelope| {
4003                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4004                        envelope.deref_unchecked::<crate::wire::SampleStrategy>()
4005                    })
4006                }),
4007
4008                interval_secs: wire.table.get(3).map(|envelope| {
4009                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4010                        envelope.deref_unchecked::<::fidl_next::wire::Int64>()
4011                    })
4012                }),
4013            }
4014        }
4015    }
4016
4017    #[doc = " The data for one Sample server.\n"]
4018    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4019    pub struct SampleParameters {
4020        pub data: ::core::option::Option<::std::vec::Vec<crate::natural::SampleDatum>>,
4021    }
4022
4023    impl SampleParameters {
4024        fn __max_ordinal(&self) -> usize {
4025            if self.data.is_some() {
4026                return 1;
4027            }
4028
4029            0
4030        }
4031    }
4032
4033    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SampleParameters<'static>, ___E>
4034        for SampleParameters
4035    where
4036        ___E: ::fidl_next::Encoder + ?Sized,
4037    {
4038        #[inline]
4039        fn encode(
4040            mut self,
4041            encoder: &mut ___E,
4042            out: &mut ::core::mem::MaybeUninit<crate::wire::SampleParameters<'static>>,
4043            _: (),
4044        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4045            ::fidl_next::munge!(let crate::wire::SampleParameters { table } = out);
4046
4047            let max_ord = self.__max_ordinal();
4048
4049            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4050            ::fidl_next::Wire::zero_padding(&mut out);
4051
4052            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4053                ::fidl_next::wire::Envelope,
4054            >(encoder, max_ord);
4055
4056            for i in 1..=max_ord {
4057                match i {
4058                    1 => {
4059                        if let Some(value) = self.data.take() {
4060                            ::fidl_next::wire::Envelope::encode_value::<
4061                                ::fidl_next::wire::Vector<
4062                                    'static,
4063                                    crate::wire::SampleDatum<'static>,
4064                                >,
4065                                ___E,
4066                            >(
4067                                value, preallocated.encoder, &mut out, (100, ())
4068                            )?;
4069                        } else {
4070                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4071                        }
4072                    }
4073
4074                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4075                }
4076                unsafe {
4077                    preallocated.write_next(out.assume_init_ref());
4078                }
4079            }
4080
4081            ::fidl_next::wire::Table::encode_len(table, max_ord);
4082
4083            Ok(())
4084        }
4085    }
4086
4087    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SampleParameters<'static>, ___E>
4088        for &'a SampleParameters
4089    where
4090        ___E: ::fidl_next::Encoder + ?Sized,
4091    {
4092        #[inline]
4093        fn encode(
4094            self,
4095            encoder: &mut ___E,
4096            out: &mut ::core::mem::MaybeUninit<crate::wire::SampleParameters<'static>>,
4097            _: (),
4098        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4099            ::fidl_next::munge!(let crate::wire::SampleParameters { table } = out);
4100
4101            let max_ord = self.__max_ordinal();
4102
4103            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4104            ::fidl_next::Wire::zero_padding(&mut out);
4105
4106            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4107                ::fidl_next::wire::Envelope,
4108            >(encoder, max_ord);
4109
4110            for i in 1..=max_ord {
4111                match i {
4112                    1 => {
4113                        if let Some(value) = &self.data {
4114                            ::fidl_next::wire::Envelope::encode_value::<
4115                                ::fidl_next::wire::Vector<
4116                                    'static,
4117                                    crate::wire::SampleDatum<'static>,
4118                                >,
4119                                ___E,
4120                            >(
4121                                value, preallocated.encoder, &mut out, (100, ())
4122                            )?;
4123                        } else {
4124                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4125                        }
4126                    }
4127
4128                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4129                }
4130                unsafe {
4131                    preallocated.write_next(out.assume_init_ref());
4132                }
4133            }
4134
4135            ::fidl_next::wire::Table::encode_len(table, max_ord);
4136
4137            Ok(())
4138        }
4139    }
4140
4141    impl<'de> ::fidl_next::FromWire<crate::wire::SampleParameters<'de>> for SampleParameters {
4142        #[inline]
4143        fn from_wire(wire_: crate::wire::SampleParameters<'de>) -> Self {
4144            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4145
4146            let data = wire_.table.get(1);
4147
4148            Self {
4149
4150
4151                data: data.map(|envelope| ::fidl_next::FromWire::from_wire(
4152                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SampleDatum<'de>>>() }
4153                )),
4154
4155        }
4156        }
4157    }
4158
4159    impl<'de> ::fidl_next::FromWireRef<crate::wire::SampleParameters<'de>> for SampleParameters {
4160        #[inline]
4161        fn from_wire_ref(wire: &crate::wire::SampleParameters<'de>) -> Self {
4162            Self {
4163
4164
4165                data: wire.table.get(1)
4166                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
4167                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SampleDatum<'de>>>() }
4168                    )),
4169
4170        }
4171        }
4172    }
4173
4174    pub type SampleCommitResponse = ();
4175}
4176
4177pub mod wire {
4178
4179    /// The wire type corresponding to [`All`].
4180    pub type All = ::fidl_next::wire::Unit;
4181
4182    /// The wire type corresponding to [`DataType`].
4183    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
4184    #[repr(transparent)]
4185    pub struct DataType {
4186        pub(crate) value: u8,
4187    }
4188
4189    impl ::fidl_next::Constrained for DataType {
4190        type Constraint = ();
4191
4192        fn validate(
4193            _: ::fidl_next::Slot<'_, Self>,
4194            _: Self::Constraint,
4195        ) -> Result<(), ::fidl_next::ValidationError> {
4196            Ok(())
4197        }
4198    }
4199
4200    unsafe impl ::fidl_next::Wire for DataType {
4201        type Narrowed<'de> = Self;
4202
4203        #[inline]
4204        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
4205            // Wire enums have no padding
4206        }
4207    }
4208
4209    impl DataType {
4210        pub const INSPECT: DataType = DataType { value: 1 };
4211
4212        pub const LOGS: DataType = DataType { value: 3 };
4213    }
4214
4215    unsafe impl<___D> ::fidl_next::Decode<___D> for DataType
4216    where
4217        ___D: ?Sized,
4218    {
4219        fn decode(
4220            slot: ::fidl_next::Slot<'_, Self>,
4221            _: &mut ___D,
4222            _: (),
4223        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4224            ::fidl_next::munge!(let Self { value } = slot);
4225
4226            match u8::from(*value) {
4227                1 | 3 => (),
4228                unknown => {
4229                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
4230                }
4231            }
4232
4233            Ok(())
4234        }
4235    }
4236
4237    impl ::core::convert::From<crate::natural::DataType> for DataType {
4238        fn from(natural: crate::natural::DataType) -> Self {
4239            match natural {
4240                crate::natural::DataType::Inspect => DataType::INSPECT,
4241
4242                crate::natural::DataType::Logs => DataType::LOGS,
4243            }
4244        }
4245    }
4246
4247    impl ::fidl_next::IntoNatural for DataType {
4248        type Natural = crate::natural::DataType;
4249    }
4250
4251    /// The wire type corresponding to [`StreamMode`].
4252    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
4253    #[repr(transparent)]
4254    pub struct StreamMode {
4255        pub(crate) value: u8,
4256    }
4257
4258    impl ::fidl_next::Constrained for StreamMode {
4259        type Constraint = ();
4260
4261        fn validate(
4262            _: ::fidl_next::Slot<'_, Self>,
4263            _: Self::Constraint,
4264        ) -> Result<(), ::fidl_next::ValidationError> {
4265            Ok(())
4266        }
4267    }
4268
4269    unsafe impl ::fidl_next::Wire for StreamMode {
4270        type Narrowed<'de> = Self;
4271
4272        #[inline]
4273        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
4274            // Wire enums have no padding
4275        }
4276    }
4277
4278    impl StreamMode {
4279        pub const SNAPSHOT: StreamMode = StreamMode { value: 1 };
4280
4281        pub const SNAPSHOT_THEN_SUBSCRIBE: StreamMode = StreamMode { value: 2 };
4282
4283        pub const SUBSCRIBE: StreamMode = StreamMode { value: 3 };
4284    }
4285
4286    unsafe impl<___D> ::fidl_next::Decode<___D> for StreamMode
4287    where
4288        ___D: ?Sized,
4289    {
4290        fn decode(
4291            slot: ::fidl_next::Slot<'_, Self>,
4292            _: &mut ___D,
4293            _: (),
4294        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4295            ::fidl_next::munge!(let Self { value } = slot);
4296
4297            match u8::from(*value) {
4298                1 | 2 | 3 => (),
4299                unknown => {
4300                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
4301                }
4302            }
4303
4304            Ok(())
4305        }
4306    }
4307
4308    impl ::core::convert::From<crate::natural::StreamMode> for StreamMode {
4309        fn from(natural: crate::natural::StreamMode) -> Self {
4310            match natural {
4311                crate::natural::StreamMode::Snapshot => StreamMode::SNAPSHOT,
4312
4313                crate::natural::StreamMode::SnapshotThenSubscribe => {
4314                    StreamMode::SNAPSHOT_THEN_SUBSCRIBE
4315                }
4316
4317                crate::natural::StreamMode::Subscribe => StreamMode::SUBSCRIBE,
4318            }
4319        }
4320    }
4321
4322    impl ::fidl_next::IntoNatural for StreamMode {
4323        type Natural = crate::natural::StreamMode;
4324    }
4325
4326    /// The wire type corresponding to [`PerformanceConfiguration`].
4327    #[repr(C)]
4328    pub struct PerformanceConfiguration<'de> {
4329        pub(crate) table: ::fidl_next::wire::Table<'de>,
4330    }
4331
4332    impl<'de> Drop for PerformanceConfiguration<'de> {
4333        fn drop(&mut self) {
4334            let _ = self
4335                .table
4336                .get(1)
4337                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
4338
4339            let _ = self
4340                .table
4341                .get(2)
4342                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
4343        }
4344    }
4345
4346    impl ::fidl_next::Constrained for PerformanceConfiguration<'_> {
4347        type Constraint = ();
4348
4349        fn validate(
4350            _: ::fidl_next::Slot<'_, Self>,
4351            _: Self::Constraint,
4352        ) -> Result<(), ::fidl_next::ValidationError> {
4353            Ok(())
4354        }
4355    }
4356
4357    unsafe impl ::fidl_next::Wire for PerformanceConfiguration<'static> {
4358        type Narrowed<'de> = PerformanceConfiguration<'de>;
4359
4360        #[inline]
4361        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4362            ::fidl_next::munge!(let Self { table } = out);
4363            ::fidl_next::wire::Table::zero_padding(table);
4364        }
4365    }
4366
4367    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for PerformanceConfiguration<'de>
4368    where
4369        ___D: ::fidl_next::Decoder<'de> + ?Sized,
4370    {
4371        fn decode(
4372            slot: ::fidl_next::Slot<'_, Self>,
4373            decoder: &mut ___D,
4374            _: (),
4375        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4376            ::fidl_next::munge!(let Self { table } = slot);
4377
4378            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4379                match ordinal {
4380                    0 => unsafe { ::core::hint::unreachable_unchecked() },
4381
4382                    1 => {
4383                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
4384                            slot.as_mut(),
4385                            decoder,
4386                            (),
4387                        )?;
4388
4389                        Ok(())
4390                    }
4391
4392                    2 => {
4393                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
4394                            slot.as_mut(),
4395                            decoder,
4396                            (),
4397                        )?;
4398
4399                        Ok(())
4400                    }
4401
4402                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
4403                }
4404            })
4405        }
4406    }
4407
4408    impl<'de> PerformanceConfiguration<'de> {
4409        pub fn max_aggregate_content_size_bytes(
4410            &self,
4411        ) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
4412            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4413        }
4414
4415        pub fn take_max_aggregate_content_size_bytes(
4416            &mut self,
4417        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
4418            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
4419        }
4420
4421        pub fn batch_retrieval_timeout_seconds(
4422            &self,
4423        ) -> ::core::option::Option<&::fidl_next::wire::Int64> {
4424            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4425        }
4426
4427        pub fn take_batch_retrieval_timeout_seconds(
4428            &mut self,
4429        ) -> ::core::option::Option<::fidl_next::wire::Int64> {
4430            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
4431        }
4432    }
4433
4434    impl<'de> ::core::fmt::Debug for PerformanceConfiguration<'de> {
4435        fn fmt(
4436            &self,
4437            f: &mut ::core::fmt::Formatter<'_>,
4438        ) -> ::core::result::Result<(), ::core::fmt::Error> {
4439            f.debug_struct("PerformanceConfiguration")
4440                .field("max_aggregate_content_size_bytes", &self.max_aggregate_content_size_bytes())
4441                .field("batch_retrieval_timeout_seconds", &self.batch_retrieval_timeout_seconds())
4442                .finish()
4443        }
4444    }
4445
4446    impl<'de> ::fidl_next::IntoNatural for PerformanceConfiguration<'de> {
4447        type Natural = crate::natural::PerformanceConfiguration;
4448    }
4449
4450    /// The wire type corresponding to [`StringSelector`].
4451    #[repr(transparent)]
4452    pub struct StringSelector<'de> {
4453        pub(crate) raw: ::fidl_next::wire::Union,
4454        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4455    }
4456
4457    impl<'de> Drop for StringSelector<'de> {
4458        fn drop(&mut self) {
4459            match self.raw.ordinal() {
4460                1 => {
4461                    let _ = unsafe {
4462                        self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
4463                    };
4464                }
4465
4466                2 => {
4467                    let _ = unsafe {
4468                        self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
4469                    };
4470                }
4471
4472                _ => (),
4473            }
4474        }
4475    }
4476
4477    impl ::fidl_next::Constrained for StringSelector<'_> {
4478        type Constraint = ();
4479
4480        fn validate(
4481            _: ::fidl_next::Slot<'_, Self>,
4482            _: Self::Constraint,
4483        ) -> Result<(), ::fidl_next::ValidationError> {
4484            Ok(())
4485        }
4486    }
4487
4488    unsafe impl ::fidl_next::Wire for StringSelector<'static> {
4489        type Narrowed<'de> = StringSelector<'de>;
4490
4491        #[inline]
4492        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4493            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4494            ::fidl_next::wire::Union::zero_padding(raw);
4495        }
4496    }
4497
4498    pub mod string_selector {
4499        pub enum Ref<'de> {
4500            StringPattern(&'de ::fidl_next::wire::String<'de>),
4501
4502            ExactMatch(&'de ::fidl_next::wire::String<'de>),
4503
4504            UnknownOrdinal_(u64),
4505        }
4506
4507        pub enum Value<'de> {
4508            StringPattern(::fidl_next::wire::String<'de>),
4509
4510            ExactMatch(::fidl_next::wire::String<'de>),
4511
4512            UnknownOrdinal_(u64),
4513        }
4514    }
4515
4516    impl<'de> StringSelector<'de> {
4517        pub fn as_ref(&self) -> crate::wire::string_selector::Ref<'_> {
4518            match self.raw.ordinal() {
4519                1 => crate::wire::string_selector::Ref::StringPattern(unsafe {
4520                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
4521                }),
4522
4523                2 => crate::wire::string_selector::Ref::ExactMatch(unsafe {
4524                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
4525                }),
4526
4527                unknown => crate::wire::string_selector::Ref::UnknownOrdinal_(unknown),
4528            }
4529        }
4530
4531        pub fn into_inner(self) -> crate::wire::string_selector::Value<'de> {
4532            let this = ::core::mem::ManuallyDrop::new(self);
4533
4534            match this.raw.ordinal() {
4535                1 => crate::wire::string_selector::Value::StringPattern(unsafe {
4536                    this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
4537                }),
4538
4539                2 => crate::wire::string_selector::Value::ExactMatch(unsafe {
4540                    this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
4541                }),
4542
4543                unknown => crate::wire::string_selector::Value::UnknownOrdinal_(unknown),
4544            }
4545        }
4546    }
4547
4548    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StringSelector<'de>
4549    where
4550        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4551        ___D: ::fidl_next::Decoder<'de>,
4552    {
4553        fn decode(
4554            mut slot: ::fidl_next::Slot<'_, Self>,
4555            decoder: &mut ___D,
4556            _: (),
4557        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4558            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4559            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4560                1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
4561                    raw, decoder, 1024,
4562                )?,
4563
4564                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
4565                    raw, decoder, 1024,
4566                )?,
4567
4568                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4569            }
4570
4571            Ok(())
4572        }
4573    }
4574
4575    impl<'de> ::core::fmt::Debug for StringSelector<'de> {
4576        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4577            match self.raw.ordinal() {
4578                1 => unsafe {
4579                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
4580                },
4581                2 => unsafe {
4582                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
4583                },
4584                _ => unsafe { ::core::hint::unreachable_unchecked() },
4585            }
4586        }
4587    }
4588
4589    impl<'de> ::fidl_next::IntoNatural for StringSelector<'de> {
4590        type Natural = crate::natural::StringSelector;
4591    }
4592
4593    /// The wire type corresponding to [`ComponentSelector`].
4594    #[repr(C)]
4595    pub struct ComponentSelector<'de> {
4596        pub(crate) table: ::fidl_next::wire::Table<'de>,
4597    }
4598
4599    impl<'de> Drop for ComponentSelector<'de> {
4600        fn drop(&mut self) {
4601            let _ = self.table.get(1)
4602                .map(|envelope| unsafe {
4603                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::StringSelector<'de>>>()
4604                });
4605        }
4606    }
4607
4608    impl ::fidl_next::Constrained for ComponentSelector<'_> {
4609        type Constraint = ();
4610
4611        fn validate(
4612            _: ::fidl_next::Slot<'_, Self>,
4613            _: Self::Constraint,
4614        ) -> Result<(), ::fidl_next::ValidationError> {
4615            Ok(())
4616        }
4617    }
4618
4619    unsafe impl ::fidl_next::Wire for ComponentSelector<'static> {
4620        type Narrowed<'de> = ComponentSelector<'de>;
4621
4622        #[inline]
4623        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4624            ::fidl_next::munge!(let Self { table } = out);
4625            ::fidl_next::wire::Table::zero_padding(table);
4626        }
4627    }
4628
4629    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ComponentSelector<'de>
4630    where
4631        ___D: ::fidl_next::Decoder<'de> + ?Sized,
4632    {
4633        fn decode(
4634            slot: ::fidl_next::Slot<'_, Self>,
4635            decoder: &mut ___D,
4636            _: (),
4637        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4638            ::fidl_next::munge!(let Self { table } = slot);
4639
4640            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4641                match ordinal {
4642                    0 => unsafe { ::core::hint::unreachable_unchecked() },
4643
4644                    1 => {
4645                        ::fidl_next::wire::Envelope::decode_as::<
4646                            ___D,
4647                            ::fidl_next::wire::Vector<'de, crate::wire::StringSelector<'de>>,
4648                        >(slot.as_mut(), decoder, (25, ()))?;
4649
4650                        let value = unsafe {
4651                            slot
4652                                            .deref_unchecked()
4653                                            .deref_unchecked::<
4654                                                ::fidl_next::wire::Vector<'_, crate::wire::StringSelector<'_>>
4655                                            >()
4656                        };
4657
4658                        if value.len() > 25 {
4659                            return Err(::fidl_next::DecodeError::VectorTooLong {
4660                                size: value.len() as u64,
4661                                limit: 25,
4662                            });
4663                        }
4664
4665                        Ok(())
4666                    }
4667
4668                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
4669                }
4670            })
4671        }
4672    }
4673
4674    impl<'de> ComponentSelector<'de> {
4675        pub fn moniker_segments(
4676            &self,
4677        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::StringSelector<'de>>>
4678        {
4679            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4680        }
4681
4682        pub fn take_moniker_segments(
4683            &mut self,
4684        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::StringSelector<'de>>>
4685        {
4686            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
4687        }
4688    }
4689
4690    impl<'de> ::core::fmt::Debug for ComponentSelector<'de> {
4691        fn fmt(
4692            &self,
4693            f: &mut ::core::fmt::Formatter<'_>,
4694        ) -> ::core::result::Result<(), ::core::fmt::Error> {
4695            f.debug_struct("ComponentSelector")
4696                .field("moniker_segments", &self.moniker_segments())
4697                .finish()
4698        }
4699    }
4700
4701    impl<'de> ::fidl_next::IntoNatural for ComponentSelector<'de> {
4702        type Natural = crate::natural::ComponentSelector;
4703    }
4704
4705    /// The wire type corresponding to [`SubtreeSelector`].
4706    #[derive(Debug)]
4707    #[repr(C)]
4708    pub struct SubtreeSelector<'de> {
4709        pub node_path: ::fidl_next::wire::Vector<'de, crate::wire::StringSelector<'de>>,
4710    }
4711
4712    static_assertions::const_assert_eq!(std::mem::size_of::<SubtreeSelector<'_>>(), 16);
4713    static_assertions::const_assert_eq!(std::mem::align_of::<SubtreeSelector<'_>>(), 8);
4714
4715    static_assertions::const_assert_eq!(std::mem::offset_of!(SubtreeSelector<'_>, node_path), 0);
4716
4717    impl ::fidl_next::Constrained for SubtreeSelector<'_> {
4718        type Constraint = ();
4719
4720        fn validate(
4721            _: ::fidl_next::Slot<'_, Self>,
4722            _: Self::Constraint,
4723        ) -> Result<(), ::fidl_next::ValidationError> {
4724            Ok(())
4725        }
4726    }
4727
4728    unsafe impl ::fidl_next::Wire for SubtreeSelector<'static> {
4729        type Narrowed<'de> = SubtreeSelector<'de>;
4730
4731        #[inline]
4732        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4733            ::fidl_next::munge! {
4734                let Self {
4735                    node_path,
4736
4737                } = &mut *out_;
4738            }
4739
4740            ::fidl_next::Wire::zero_padding(node_path);
4741        }
4742    }
4743
4744    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SubtreeSelector<'de>
4745    where
4746        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4747        ___D: ::fidl_next::Decoder<'de>,
4748    {
4749        fn decode(
4750            slot_: ::fidl_next::Slot<'_, Self>,
4751            decoder_: &mut ___D,
4752            _: (),
4753        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4754            ::fidl_next::munge! {
4755                let Self {
4756                    mut node_path,
4757
4758                } = slot_;
4759            }
4760
4761            let _field = node_path.as_mut();
4762            ::fidl_next::Constrained::validate(_field, (100, ()))?;
4763            ::fidl_next::Decode::decode(node_path.as_mut(), decoder_, (100, ()))?;
4764
4765            let node_path = unsafe { node_path.deref_unchecked() };
4766
4767            if node_path.len() > 100 {
4768                return Err(::fidl_next::DecodeError::VectorTooLong {
4769                    size: node_path.len() as u64,
4770                    limit: 100,
4771                });
4772            }
4773
4774            Ok(())
4775        }
4776    }
4777
4778    impl<'de> ::fidl_next::IntoNatural for SubtreeSelector<'de> {
4779        type Natural = crate::natural::SubtreeSelector;
4780    }
4781
4782    /// The wire type corresponding to [`PropertySelector`].
4783    #[derive(Debug)]
4784    #[repr(C)]
4785    pub struct PropertySelector<'de> {
4786        pub node_path: ::fidl_next::wire::Vector<'de, crate::wire::StringSelector<'de>>,
4787
4788        pub target_properties: crate::wire::StringSelector<'de>,
4789    }
4790
4791    static_assertions::const_assert_eq!(std::mem::size_of::<PropertySelector<'_>>(), 32);
4792    static_assertions::const_assert_eq!(std::mem::align_of::<PropertySelector<'_>>(), 8);
4793
4794    static_assertions::const_assert_eq!(std::mem::offset_of!(PropertySelector<'_>, node_path), 0);
4795
4796    static_assertions::const_assert_eq!(
4797        std::mem::offset_of!(PropertySelector<'_>, target_properties),
4798        16
4799    );
4800
4801    impl ::fidl_next::Constrained for PropertySelector<'_> {
4802        type Constraint = ();
4803
4804        fn validate(
4805            _: ::fidl_next::Slot<'_, Self>,
4806            _: Self::Constraint,
4807        ) -> Result<(), ::fidl_next::ValidationError> {
4808            Ok(())
4809        }
4810    }
4811
4812    unsafe impl ::fidl_next::Wire for PropertySelector<'static> {
4813        type Narrowed<'de> = PropertySelector<'de>;
4814
4815        #[inline]
4816        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4817            ::fidl_next::munge! {
4818                let Self {
4819                    node_path,
4820                    target_properties,
4821
4822                } = &mut *out_;
4823            }
4824
4825            ::fidl_next::Wire::zero_padding(node_path);
4826
4827            ::fidl_next::Wire::zero_padding(target_properties);
4828        }
4829    }
4830
4831    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for PropertySelector<'de>
4832    where
4833        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4834        ___D: ::fidl_next::Decoder<'de>,
4835    {
4836        fn decode(
4837            slot_: ::fidl_next::Slot<'_, Self>,
4838            decoder_: &mut ___D,
4839            _: (),
4840        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4841            ::fidl_next::munge! {
4842                let Self {
4843                    mut node_path,
4844                    mut target_properties,
4845
4846                } = slot_;
4847            }
4848
4849            let _field = node_path.as_mut();
4850            ::fidl_next::Constrained::validate(_field, (100, ()))?;
4851            ::fidl_next::Decode::decode(node_path.as_mut(), decoder_, (100, ()))?;
4852
4853            let node_path = unsafe { node_path.deref_unchecked() };
4854
4855            if node_path.len() > 100 {
4856                return Err(::fidl_next::DecodeError::VectorTooLong {
4857                    size: node_path.len() as u64,
4858                    limit: 100,
4859                });
4860            }
4861
4862            let _field = target_properties.as_mut();
4863
4864            ::fidl_next::Decode::decode(target_properties.as_mut(), decoder_, ())?;
4865
4866            Ok(())
4867        }
4868    }
4869
4870    impl<'de> ::fidl_next::IntoNatural for PropertySelector<'de> {
4871        type Natural = crate::natural::PropertySelector;
4872    }
4873
4874    /// The wire type corresponding to [`TreeSelector`].
4875    #[repr(transparent)]
4876    pub struct TreeSelector<'de> {
4877        pub(crate) raw: ::fidl_next::wire::Union,
4878        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4879    }
4880
4881    impl<'de> Drop for TreeSelector<'de> {
4882        fn drop(&mut self) {
4883            match self.raw.ordinal() {
4884                1 => {
4885                    let _ = unsafe {
4886                        self.raw.get().read_unchecked::<crate::wire::SubtreeSelector<'de>>()
4887                    };
4888                }
4889
4890                2 => {
4891                    let _ = unsafe {
4892                        self.raw.get().read_unchecked::<crate::wire::PropertySelector<'de>>()
4893                    };
4894                }
4895
4896                _ => (),
4897            }
4898        }
4899    }
4900
4901    impl ::fidl_next::Constrained for TreeSelector<'_> {
4902        type Constraint = ();
4903
4904        fn validate(
4905            _: ::fidl_next::Slot<'_, Self>,
4906            _: Self::Constraint,
4907        ) -> Result<(), ::fidl_next::ValidationError> {
4908            Ok(())
4909        }
4910    }
4911
4912    unsafe impl ::fidl_next::Wire for TreeSelector<'static> {
4913        type Narrowed<'de> = TreeSelector<'de>;
4914
4915        #[inline]
4916        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4917            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4918            ::fidl_next::wire::Union::zero_padding(raw);
4919        }
4920    }
4921
4922    pub mod tree_selector {
4923        pub enum Ref<'de> {
4924            SubtreeSelector(&'de crate::wire::SubtreeSelector<'de>),
4925
4926            PropertySelector(&'de crate::wire::PropertySelector<'de>),
4927
4928            UnknownOrdinal_(u64),
4929        }
4930
4931        pub enum Value<'de> {
4932            SubtreeSelector(crate::wire::SubtreeSelector<'de>),
4933
4934            PropertySelector(crate::wire::PropertySelector<'de>),
4935
4936            UnknownOrdinal_(u64),
4937        }
4938    }
4939
4940    impl<'de> TreeSelector<'de> {
4941        pub fn as_ref(&self) -> crate::wire::tree_selector::Ref<'_> {
4942            match self.raw.ordinal() {
4943                1 => crate::wire::tree_selector::Ref::SubtreeSelector(unsafe {
4944                    self.raw.get().deref_unchecked::<crate::wire::SubtreeSelector<'_>>()
4945                }),
4946
4947                2 => crate::wire::tree_selector::Ref::PropertySelector(unsafe {
4948                    self.raw.get().deref_unchecked::<crate::wire::PropertySelector<'_>>()
4949                }),
4950
4951                unknown => crate::wire::tree_selector::Ref::UnknownOrdinal_(unknown),
4952            }
4953        }
4954
4955        pub fn into_inner(self) -> crate::wire::tree_selector::Value<'de> {
4956            let this = ::core::mem::ManuallyDrop::new(self);
4957
4958            match this.raw.ordinal() {
4959                1 => crate::wire::tree_selector::Value::SubtreeSelector(unsafe {
4960                    this.raw.get().read_unchecked::<crate::wire::SubtreeSelector<'de>>()
4961                }),
4962
4963                2 => crate::wire::tree_selector::Value::PropertySelector(unsafe {
4964                    this.raw.get().read_unchecked::<crate::wire::PropertySelector<'de>>()
4965                }),
4966
4967                unknown => crate::wire::tree_selector::Value::UnknownOrdinal_(unknown),
4968            }
4969        }
4970    }
4971
4972    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TreeSelector<'de>
4973    where
4974        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4975        ___D: ::fidl_next::Decoder<'de>,
4976    {
4977        fn decode(
4978            mut slot: ::fidl_next::Slot<'_, Self>,
4979            decoder: &mut ___D,
4980            _: (),
4981        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4982            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4983            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4984                1 => {
4985                    ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SubtreeSelector<'de>>(
4986                        raw,
4987                        decoder,
4988                        (),
4989                    )?
4990                }
4991
4992                2 => {
4993                    ::fidl_next::wire::Union::decode_as::<___D, crate::wire::PropertySelector<'de>>(
4994                        raw,
4995                        decoder,
4996                        (),
4997                    )?
4998                }
4999
5000                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
5001            }
5002
5003            Ok(())
5004        }
5005    }
5006
5007    impl<'de> ::core::fmt::Debug for TreeSelector<'de> {
5008        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5009            match self.raw.ordinal() {
5010                1 => unsafe {
5011                    self.raw.get().deref_unchecked::<crate::wire::SubtreeSelector<'_>>().fmt(f)
5012                },
5013                2 => unsafe {
5014                    self.raw.get().deref_unchecked::<crate::wire::PropertySelector<'_>>().fmt(f)
5015                },
5016                _ => unsafe { ::core::hint::unreachable_unchecked() },
5017            }
5018        }
5019    }
5020
5021    impl<'de> ::fidl_next::IntoNatural for TreeSelector<'de> {
5022        type Natural = crate::natural::TreeSelector;
5023    }
5024
5025    /// The wire type corresponding to [`TreeNames`].
5026    #[repr(transparent)]
5027    pub struct TreeNames<'de> {
5028        pub(crate) raw: ::fidl_next::wire::Union,
5029        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5030    }
5031
5032    impl<'de> Drop for TreeNames<'de> {
5033        fn drop(&mut self) {
5034            match self.raw.ordinal() {
5035                1 => {
5036                    let _ = unsafe {
5037                        self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>()
5038                    };
5039                }
5040
5041                2 => {
5042                    let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::All>() };
5043                }
5044
5045                _ => (),
5046            }
5047        }
5048    }
5049
5050    impl ::fidl_next::Constrained for TreeNames<'_> {
5051        type Constraint = ();
5052
5053        fn validate(
5054            _: ::fidl_next::Slot<'_, Self>,
5055            _: Self::Constraint,
5056        ) -> Result<(), ::fidl_next::ValidationError> {
5057            Ok(())
5058        }
5059    }
5060
5061    unsafe impl ::fidl_next::Wire for TreeNames<'static> {
5062        type Narrowed<'de> = TreeNames<'de>;
5063
5064        #[inline]
5065        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5066            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5067            ::fidl_next::wire::Union::zero_padding(raw);
5068        }
5069    }
5070
5071    pub mod tree_names {
5072        pub enum Ref<'de> {
5073            Some(&'de ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>),
5074
5075            All(&'de crate::wire::All),
5076
5077            UnknownOrdinal_(u64),
5078        }
5079
5080        pub enum Value<'de> {
5081            Some(::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>),
5082
5083            All(crate::wire::All),
5084
5085            UnknownOrdinal_(u64),
5086        }
5087    }
5088
5089    impl<'de> TreeNames<'de> {
5090        pub fn as_ref(&self) -> crate::wire::tree_names::Ref<'_> {
5091            match self.raw.ordinal() {
5092                1 => crate::wire::tree_names::Ref::Some(unsafe {
5093                    self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, ::fidl_next::wire::String<'_>>>()
5094                }),
5095
5096                2 => crate::wire::tree_names::Ref::All(unsafe {
5097                    self.raw.get().deref_unchecked::<crate::wire::All>()
5098                }),
5099
5100                unknown => crate::wire::tree_names::Ref::UnknownOrdinal_(unknown),
5101            }
5102        }
5103
5104        pub fn into_inner(self) -> crate::wire::tree_names::Value<'de> {
5105            let this = ::core::mem::ManuallyDrop::new(self);
5106
5107            match this.raw.ordinal() {
5108                1 => crate::wire::tree_names::Value::Some(unsafe {
5109                    this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>>()
5110                }),
5111
5112                2 => crate::wire::tree_names::Value::All(unsafe {
5113                    this.raw.get().read_unchecked::<crate::wire::All>()
5114                }),
5115
5116                unknown => crate::wire::tree_names::Value::UnknownOrdinal_(unknown),
5117            }
5118        }
5119    }
5120
5121    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TreeNames<'de>
5122    where
5123        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5124        ___D: ::fidl_next::Decoder<'de>,
5125    {
5126        fn decode(
5127            mut slot: ::fidl_next::Slot<'_, Self>,
5128            decoder: &mut ___D,
5129            _: (),
5130        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5131            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5132            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
5133                1 => ::fidl_next::wire::Union::decode_as::<
5134                    ___D,
5135                    ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
5136                >(raw, decoder, (4294967295, 1024))?,
5137
5138                2 => {
5139                    ::fidl_next::wire::Union::decode_as::<___D, crate::wire::All>(raw, decoder, ())?
5140                }
5141
5142                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
5143            }
5144
5145            Ok(())
5146        }
5147    }
5148
5149    impl<'de> ::core::fmt::Debug for TreeNames<'de> {
5150        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5151            match self.raw.ordinal() {
5152                1 => unsafe {
5153                    self.raw.get().deref_unchecked::<
5154                            ::fidl_next::wire::Vector<'_, ::fidl_next::wire::String<'_>>
5155                        >().fmt(f)
5156                },
5157                2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::All>().fmt(f) },
5158                _ => unsafe { ::core::hint::unreachable_unchecked() },
5159            }
5160        }
5161    }
5162
5163    impl<'de> ::fidl_next::IntoNatural for TreeNames<'de> {
5164        type Natural = crate::natural::TreeNames;
5165    }
5166
5167    /// The wire type corresponding to [`Selector`].
5168    #[repr(C)]
5169    pub struct Selector<'de> {
5170        pub(crate) table: ::fidl_next::wire::Table<'de>,
5171    }
5172
5173    impl<'de> Drop for Selector<'de> {
5174        fn drop(&mut self) {
5175            let _ = self.table.get(1).map(|envelope| unsafe {
5176                envelope.read_unchecked::<crate::wire::ComponentSelector<'de>>()
5177            });
5178
5179            let _ = self.table.get(2).map(|envelope| unsafe {
5180                envelope.read_unchecked::<crate::wire::TreeSelector<'de>>()
5181            });
5182
5183            let _ = self.table.get(3).map(|envelope| unsafe {
5184                envelope.read_unchecked::<crate::wire::TreeNames<'de>>()
5185            });
5186        }
5187    }
5188
5189    impl ::fidl_next::Constrained for Selector<'_> {
5190        type Constraint = ();
5191
5192        fn validate(
5193            _: ::fidl_next::Slot<'_, Self>,
5194            _: Self::Constraint,
5195        ) -> Result<(), ::fidl_next::ValidationError> {
5196            Ok(())
5197        }
5198    }
5199
5200    unsafe impl ::fidl_next::Wire for Selector<'static> {
5201        type Narrowed<'de> = Selector<'de>;
5202
5203        #[inline]
5204        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5205            ::fidl_next::munge!(let Self { table } = out);
5206            ::fidl_next::wire::Table::zero_padding(table);
5207        }
5208    }
5209
5210    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Selector<'de>
5211    where
5212        ___D: ::fidl_next::Decoder<'de> + ?Sized,
5213    {
5214        fn decode(
5215            slot: ::fidl_next::Slot<'_, Self>,
5216            decoder: &mut ___D,
5217            _: (),
5218        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5219            ::fidl_next::munge!(let Self { table } = slot);
5220
5221            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5222                match ordinal {
5223                    0 => unsafe { ::core::hint::unreachable_unchecked() },
5224
5225                    1 => {
5226                        ::fidl_next::wire::Envelope::decode_as::<
5227                            ___D,
5228                            crate::wire::ComponentSelector<'de>,
5229                        >(slot.as_mut(), decoder, ())?;
5230
5231                        Ok(())
5232                    }
5233
5234                    2 => {
5235                        ::fidl_next::wire::Envelope::decode_as::<
5236                            ___D,
5237                            crate::wire::TreeSelector<'de>,
5238                        >(slot.as_mut(), decoder, ())?;
5239
5240                        Ok(())
5241                    }
5242
5243                    3 => {
5244                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::TreeNames<'de>>(
5245                            slot.as_mut(),
5246                            decoder,
5247                            (),
5248                        )?;
5249
5250                        Ok(())
5251                    }
5252
5253                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5254                }
5255            })
5256        }
5257    }
5258
5259    impl<'de> Selector<'de> {
5260        pub fn component_selector(
5261            &self,
5262        ) -> ::core::option::Option<&crate::wire::ComponentSelector<'de>> {
5263            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5264        }
5265
5266        pub fn take_component_selector(
5267            &mut self,
5268        ) -> ::core::option::Option<crate::wire::ComponentSelector<'de>> {
5269            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
5270        }
5271
5272        pub fn tree_selector(&self) -> ::core::option::Option<&crate::wire::TreeSelector<'de>> {
5273            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5274        }
5275
5276        pub fn take_tree_selector(
5277            &mut self,
5278        ) -> ::core::option::Option<crate::wire::TreeSelector<'de>> {
5279            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
5280        }
5281
5282        pub fn tree_names(&self) -> ::core::option::Option<&crate::wire::TreeNames<'de>> {
5283            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
5284        }
5285
5286        pub fn take_tree_names(&mut self) -> ::core::option::Option<crate::wire::TreeNames<'de>> {
5287            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
5288        }
5289    }
5290
5291    impl<'de> ::core::fmt::Debug for Selector<'de> {
5292        fn fmt(
5293            &self,
5294            f: &mut ::core::fmt::Formatter<'_>,
5295        ) -> ::core::result::Result<(), ::core::fmt::Error> {
5296            f.debug_struct("Selector")
5297                .field("component_selector", &self.component_selector())
5298                .field("tree_selector", &self.tree_selector())
5299                .field("tree_names", &self.tree_names())
5300                .finish()
5301        }
5302    }
5303
5304    impl<'de> ::fidl_next::IntoNatural for Selector<'de> {
5305        type Natural = crate::natural::Selector;
5306    }
5307
5308    /// The wire type corresponding to [`SelectorArgument`].
5309    #[repr(transparent)]
5310    pub struct SelectorArgument<'de> {
5311        pub(crate) raw: ::fidl_next::wire::Union,
5312        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5313    }
5314
5315    impl<'de> Drop for SelectorArgument<'de> {
5316        fn drop(&mut self) {
5317            match self.raw.ordinal() {
5318                1 => {
5319                    let _ =
5320                        unsafe { self.raw.get().read_unchecked::<crate::wire::Selector<'de>>() };
5321                }
5322
5323                2 => {
5324                    let _ = unsafe {
5325                        self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
5326                    };
5327                }
5328
5329                _ => (),
5330            }
5331        }
5332    }
5333
5334    impl ::fidl_next::Constrained for SelectorArgument<'_> {
5335        type Constraint = ();
5336
5337        fn validate(
5338            _: ::fidl_next::Slot<'_, Self>,
5339            _: Self::Constraint,
5340        ) -> Result<(), ::fidl_next::ValidationError> {
5341            Ok(())
5342        }
5343    }
5344
5345    unsafe impl ::fidl_next::Wire for SelectorArgument<'static> {
5346        type Narrowed<'de> = SelectorArgument<'de>;
5347
5348        #[inline]
5349        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5350            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5351            ::fidl_next::wire::Union::zero_padding(raw);
5352        }
5353    }
5354
5355    pub mod selector_argument {
5356        pub enum Ref<'de> {
5357            StructuredSelector(&'de crate::wire::Selector<'de>),
5358
5359            RawSelector(&'de ::fidl_next::wire::String<'de>),
5360
5361            UnknownOrdinal_(u64),
5362        }
5363
5364        pub enum Value<'de> {
5365            StructuredSelector(crate::wire::Selector<'de>),
5366
5367            RawSelector(::fidl_next::wire::String<'de>),
5368
5369            UnknownOrdinal_(u64),
5370        }
5371    }
5372
5373    impl<'de> SelectorArgument<'de> {
5374        pub fn as_ref(&self) -> crate::wire::selector_argument::Ref<'_> {
5375            match self.raw.ordinal() {
5376                1 => crate::wire::selector_argument::Ref::StructuredSelector(unsafe {
5377                    self.raw.get().deref_unchecked::<crate::wire::Selector<'_>>()
5378                }),
5379
5380                2 => crate::wire::selector_argument::Ref::RawSelector(unsafe {
5381                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
5382                }),
5383
5384                unknown => crate::wire::selector_argument::Ref::UnknownOrdinal_(unknown),
5385            }
5386        }
5387
5388        pub fn into_inner(self) -> crate::wire::selector_argument::Value<'de> {
5389            let this = ::core::mem::ManuallyDrop::new(self);
5390
5391            match this.raw.ordinal() {
5392                1 => crate::wire::selector_argument::Value::StructuredSelector(unsafe {
5393                    this.raw.get().read_unchecked::<crate::wire::Selector<'de>>()
5394                }),
5395
5396                2 => crate::wire::selector_argument::Value::RawSelector(unsafe {
5397                    this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
5398                }),
5399
5400                unknown => crate::wire::selector_argument::Value::UnknownOrdinal_(unknown),
5401            }
5402        }
5403    }
5404
5405    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SelectorArgument<'de>
5406    where
5407        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5408        ___D: ::fidl_next::Decoder<'de>,
5409    {
5410        fn decode(
5411            mut slot: ::fidl_next::Slot<'_, Self>,
5412            decoder: &mut ___D,
5413            _: (),
5414        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5415            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5416            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
5417                1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Selector<'de>>(
5418                    raw,
5419                    decoder,
5420                    (),
5421                )?,
5422
5423                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
5424                    raw, decoder, 1024,
5425                )?,
5426
5427                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
5428            }
5429
5430            Ok(())
5431        }
5432    }
5433
5434    impl<'de> ::core::fmt::Debug for SelectorArgument<'de> {
5435        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5436            match self.raw.ordinal() {
5437                1 => unsafe {
5438                    self.raw.get().deref_unchecked::<crate::wire::Selector<'_>>().fmt(f)
5439                },
5440                2 => unsafe {
5441                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
5442                },
5443                _ => unsafe { ::core::hint::unreachable_unchecked() },
5444            }
5445        }
5446    }
5447
5448    impl<'de> ::fidl_next::IntoNatural for SelectorArgument<'de> {
5449        type Natural = crate::natural::SelectorArgument;
5450    }
5451
5452    /// The wire type corresponding to [`ClientSelectorConfiguration`].
5453    #[repr(transparent)]
5454    pub struct ClientSelectorConfiguration<'de> {
5455        pub(crate) raw: ::fidl_next::wire::Union,
5456        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5457    }
5458
5459    impl<'de> Drop for ClientSelectorConfiguration<'de> {
5460        fn drop(&mut self) {
5461            match self.raw.ordinal() {
5462                1 => {
5463                    let _ = unsafe {
5464                        self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SelectorArgument<'de>>>()
5465                    };
5466                }
5467
5468                2 => {
5469                    let _ = unsafe { self.raw.get().read_unchecked::<bool>() };
5470                }
5471
5472                _ => (),
5473            }
5474        }
5475    }
5476
5477    impl ::fidl_next::Constrained for ClientSelectorConfiguration<'_> {
5478        type Constraint = ();
5479
5480        fn validate(
5481            _: ::fidl_next::Slot<'_, Self>,
5482            _: Self::Constraint,
5483        ) -> Result<(), ::fidl_next::ValidationError> {
5484            Ok(())
5485        }
5486    }
5487
5488    unsafe impl ::fidl_next::Wire for ClientSelectorConfiguration<'static> {
5489        type Narrowed<'de> = ClientSelectorConfiguration<'de>;
5490
5491        #[inline]
5492        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5493            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5494            ::fidl_next::wire::Union::zero_padding(raw);
5495        }
5496    }
5497
5498    pub mod client_selector_configuration {
5499        pub enum Ref<'de> {
5500            Selectors(&'de ::fidl_next::wire::Vector<'de, crate::wire::SelectorArgument<'de>>),
5501
5502            SelectAll(&'de bool),
5503
5504            UnknownOrdinal_(u64),
5505        }
5506
5507        pub enum Value<'de> {
5508            Selectors(::fidl_next::wire::Vector<'de, crate::wire::SelectorArgument<'de>>),
5509
5510            SelectAll(bool),
5511
5512            UnknownOrdinal_(u64),
5513        }
5514    }
5515
5516    impl<'de> ClientSelectorConfiguration<'de> {
5517        pub fn as_ref(&self) -> crate::wire::client_selector_configuration::Ref<'_> {
5518            match self.raw.ordinal() {
5519                1 => crate::wire::client_selector_configuration::Ref::Selectors(unsafe {
5520                    self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, crate::wire::SelectorArgument<'_>>>()
5521                }),
5522
5523                2 => crate::wire::client_selector_configuration::Ref::SelectAll(unsafe {
5524                    self.raw.get().deref_unchecked::<bool>()
5525                }),
5526
5527                unknown => {
5528                    crate::wire::client_selector_configuration::Ref::UnknownOrdinal_(unknown)
5529                }
5530            }
5531        }
5532
5533        pub fn into_inner(self) -> crate::wire::client_selector_configuration::Value<'de> {
5534            let this = ::core::mem::ManuallyDrop::new(self);
5535
5536            match this.raw.ordinal() {
5537                1 => crate::wire::client_selector_configuration::Value::Selectors(unsafe {
5538                    this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SelectorArgument<'de>>>()
5539                }),
5540
5541                2 => crate::wire::client_selector_configuration::Value::SelectAll(unsafe {
5542                    this.raw.get().read_unchecked::<bool>()
5543                }),
5544
5545                unknown => {
5546                    crate::wire::client_selector_configuration::Value::UnknownOrdinal_(unknown)
5547                }
5548            }
5549        }
5550    }
5551
5552    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ClientSelectorConfiguration<'de>
5553    where
5554        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5555        ___D: ::fidl_next::Decoder<'de>,
5556    {
5557        fn decode(
5558            mut slot: ::fidl_next::Slot<'_, Self>,
5559            decoder: &mut ___D,
5560            _: (),
5561        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5562            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5563            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
5564                1 => ::fidl_next::wire::Union::decode_as::<
5565                    ___D,
5566                    ::fidl_next::wire::Vector<'de, crate::wire::SelectorArgument<'de>>,
5567                >(raw, decoder, (4294967295, ()))?,
5568
5569                2 => ::fidl_next::wire::Union::decode_as::<___D, bool>(raw, decoder, ())?,
5570
5571                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
5572            }
5573
5574            Ok(())
5575        }
5576    }
5577
5578    impl<'de> ::core::fmt::Debug for ClientSelectorConfiguration<'de> {
5579        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5580            match self.raw.ordinal() {
5581                1 => unsafe {
5582                    self.raw.get().deref_unchecked::<
5583                            ::fidl_next::wire::Vector<'_, crate::wire::SelectorArgument<'_>>
5584                        >().fmt(f)
5585                },
5586                2 => unsafe { self.raw.get().deref_unchecked::<bool>().fmt(f) },
5587                _ => unsafe { ::core::hint::unreachable_unchecked() },
5588            }
5589        }
5590    }
5591
5592    impl<'de> ::fidl_next::IntoNatural for ClientSelectorConfiguration<'de> {
5593        type Natural = crate::natural::ClientSelectorConfiguration;
5594    }
5595
5596    /// The wire type corresponding to [`Format`].
5597    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
5598    #[repr(transparent)]
5599    pub struct Format {
5600        pub(crate) value: ::fidl_next::wire::Uint32,
5601    }
5602
5603    impl ::fidl_next::Constrained for Format {
5604        type Constraint = ();
5605
5606        fn validate(
5607            _: ::fidl_next::Slot<'_, Self>,
5608            _: Self::Constraint,
5609        ) -> Result<(), ::fidl_next::ValidationError> {
5610            Ok(())
5611        }
5612    }
5613
5614    unsafe impl ::fidl_next::Wire for Format {
5615        type Narrowed<'de> = Self;
5616
5617        #[inline]
5618        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
5619            // Wire enums have no padding
5620        }
5621    }
5622
5623    impl Format {
5624        pub const JSON: Format = Format { value: ::fidl_next::wire::Uint32(1) };
5625
5626        pub const TEXT: Format = Format { value: ::fidl_next::wire::Uint32(2) };
5627
5628        pub const CBOR: Format = Format { value: ::fidl_next::wire::Uint32(3) };
5629
5630        pub const LEGACY_FXT: Format = Format { value: ::fidl_next::wire::Uint32(4) };
5631
5632        pub const FXT: Format = Format { value: ::fidl_next::wire::Uint32(5) };
5633    }
5634
5635    unsafe impl<___D> ::fidl_next::Decode<___D> for Format
5636    where
5637        ___D: ?Sized,
5638    {
5639        fn decode(
5640            slot: ::fidl_next::Slot<'_, Self>,
5641            _: &mut ___D,
5642            _: (),
5643        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5644            ::fidl_next::munge!(let Self { value } = slot);
5645
5646            match u32::from(*value) {
5647                1 | 2 | 3 | 4 | 5 => (),
5648                unknown => {
5649                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
5650                }
5651            }
5652
5653            Ok(())
5654        }
5655    }
5656
5657    impl ::core::convert::From<crate::natural::Format> for Format {
5658        fn from(natural: crate::natural::Format) -> Self {
5659            match natural {
5660                crate::natural::Format::Json => Format::JSON,
5661
5662                crate::natural::Format::Text => Format::TEXT,
5663
5664                crate::natural::Format::Cbor => Format::CBOR,
5665
5666                crate::natural::Format::LegacyFxt => Format::LEGACY_FXT,
5667
5668                crate::natural::Format::Fxt => Format::FXT,
5669            }
5670        }
5671    }
5672
5673    impl ::fidl_next::IntoNatural for Format {
5674        type Natural = crate::natural::Format;
5675    }
5676
5677    /// The wire type corresponding to [`StreamParameters`].
5678    #[repr(C)]
5679    pub struct StreamParameters<'de> {
5680        pub(crate) table: ::fidl_next::wire::Table<'de>,
5681    }
5682
5683    impl<'de> Drop for StreamParameters<'de> {
5684        fn drop(&mut self) {
5685            let _ = self
5686                .table
5687                .get(1)
5688                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::DataType>() });
5689
5690            let _ = self
5691                .table
5692                .get(2)
5693                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::StreamMode>() });
5694
5695            let _ = self
5696                .table
5697                .get(3)
5698                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Format>() });
5699
5700            let _ = self.table.get(4).map(|envelope| unsafe {
5701                envelope.read_unchecked::<crate::wire::ClientSelectorConfiguration<'de>>()
5702            });
5703
5704            let _ = self
5705                .table
5706                .get(5)
5707                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
5708
5709            let _ = self.table.get(6).map(|envelope| unsafe {
5710                envelope.read_unchecked::<crate::wire::PerformanceConfiguration<'de>>()
5711            });
5712        }
5713    }
5714
5715    impl ::fidl_next::Constrained for StreamParameters<'_> {
5716        type Constraint = ();
5717
5718        fn validate(
5719            _: ::fidl_next::Slot<'_, Self>,
5720            _: Self::Constraint,
5721        ) -> Result<(), ::fidl_next::ValidationError> {
5722            Ok(())
5723        }
5724    }
5725
5726    unsafe impl ::fidl_next::Wire for StreamParameters<'static> {
5727        type Narrowed<'de> = StreamParameters<'de>;
5728
5729        #[inline]
5730        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5731            ::fidl_next::munge!(let Self { table } = out);
5732            ::fidl_next::wire::Table::zero_padding(table);
5733        }
5734    }
5735
5736    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StreamParameters<'de>
5737    where
5738        ___D: ::fidl_next::Decoder<'de> + ?Sized,
5739    {
5740        fn decode(
5741            slot: ::fidl_next::Slot<'_, Self>,
5742            decoder: &mut ___D,
5743            _: (),
5744        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5745            ::fidl_next::munge!(let Self { table } = slot);
5746
5747            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5748                match ordinal {
5749                    0 => unsafe { ::core::hint::unreachable_unchecked() },
5750
5751                    1 => {
5752                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::DataType>(
5753                            slot.as_mut(),
5754                            decoder,
5755                            (),
5756                        )?;
5757
5758                        Ok(())
5759                    }
5760
5761                    2 => {
5762                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::StreamMode>(
5763                            slot.as_mut(),
5764                            decoder,
5765                            (),
5766                        )?;
5767
5768                        Ok(())
5769                    }
5770
5771                    3 => {
5772                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Format>(
5773                            slot.as_mut(),
5774                            decoder,
5775                            (),
5776                        )?;
5777
5778                        Ok(())
5779                    }
5780
5781                    4 => {
5782                        ::fidl_next::wire::Envelope::decode_as::<
5783                            ___D,
5784                            crate::wire::ClientSelectorConfiguration<'de>,
5785                        >(slot.as_mut(), decoder, ())?;
5786
5787                        Ok(())
5788                    }
5789
5790                    5 => {
5791                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
5792                            slot.as_mut(),
5793                            decoder,
5794                            (),
5795                        )?;
5796
5797                        Ok(())
5798                    }
5799
5800                    6 => {
5801                        ::fidl_next::wire::Envelope::decode_as::<
5802                            ___D,
5803                            crate::wire::PerformanceConfiguration<'de>,
5804                        >(slot.as_mut(), decoder, ())?;
5805
5806                        Ok(())
5807                    }
5808
5809                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
5810                }
5811            })
5812        }
5813    }
5814
5815    impl<'de> StreamParameters<'de> {
5816        pub fn data_type(&self) -> ::core::option::Option<&crate::wire::DataType> {
5817            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5818        }
5819
5820        pub fn take_data_type(&mut self) -> ::core::option::Option<crate::wire::DataType> {
5821            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
5822        }
5823
5824        pub fn stream_mode(&self) -> ::core::option::Option<&crate::wire::StreamMode> {
5825            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5826        }
5827
5828        pub fn take_stream_mode(&mut self) -> ::core::option::Option<crate::wire::StreamMode> {
5829            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
5830        }
5831
5832        pub fn format(&self) -> ::core::option::Option<&crate::wire::Format> {
5833            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
5834        }
5835
5836        pub fn take_format(&mut self) -> ::core::option::Option<crate::wire::Format> {
5837            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
5838        }
5839
5840        pub fn client_selector_configuration(
5841            &self,
5842        ) -> ::core::option::Option<&crate::wire::ClientSelectorConfiguration<'de>> {
5843            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
5844        }
5845
5846        pub fn take_client_selector_configuration(
5847            &mut self,
5848        ) -> ::core::option::Option<crate::wire::ClientSelectorConfiguration<'de>> {
5849            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
5850        }
5851
5852        pub fn batch_retrieval_timeout_seconds(
5853            &self,
5854        ) -> ::core::option::Option<&::fidl_next::wire::Int64> {
5855            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
5856        }
5857
5858        pub fn take_batch_retrieval_timeout_seconds(
5859            &mut self,
5860        ) -> ::core::option::Option<::fidl_next::wire::Int64> {
5861            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
5862        }
5863
5864        pub fn performance_configuration(
5865            &self,
5866        ) -> ::core::option::Option<&crate::wire::PerformanceConfiguration<'de>> {
5867            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
5868        }
5869
5870        pub fn take_performance_configuration(
5871            &mut self,
5872        ) -> ::core::option::Option<crate::wire::PerformanceConfiguration<'de>> {
5873            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
5874        }
5875    }
5876
5877    impl<'de> ::core::fmt::Debug for StreamParameters<'de> {
5878        fn fmt(
5879            &self,
5880            f: &mut ::core::fmt::Formatter<'_>,
5881        ) -> ::core::result::Result<(), ::core::fmt::Error> {
5882            f.debug_struct("StreamParameters")
5883                .field("data_type", &self.data_type())
5884                .field("stream_mode", &self.stream_mode())
5885                .field("format", &self.format())
5886                .field("client_selector_configuration", &self.client_selector_configuration())
5887                .field("batch_retrieval_timeout_seconds", &self.batch_retrieval_timeout_seconds())
5888                .field("performance_configuration", &self.performance_configuration())
5889                .finish()
5890        }
5891    }
5892
5893    impl<'de> ::fidl_next::IntoNatural for StreamParameters<'de> {
5894        type Natural = crate::natural::StreamParameters;
5895    }
5896
5897    /// The wire type corresponding to [`ArchiveAccessorWaitForReadyResponse`].
5898    pub type ArchiveAccessorWaitForReadyResponse = ::fidl_next::wire::Unit;
5899
5900    /// The wire type corresponding to [`ReaderError`].
5901    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
5902    #[repr(transparent)]
5903    pub struct ReaderError {
5904        pub(crate) value: ::fidl_next::wire::Uint32,
5905    }
5906
5907    impl ::fidl_next::Constrained for ReaderError {
5908        type Constraint = ();
5909
5910        fn validate(
5911            _: ::fidl_next::Slot<'_, Self>,
5912            _: Self::Constraint,
5913        ) -> Result<(), ::fidl_next::ValidationError> {
5914            Ok(())
5915        }
5916    }
5917
5918    unsafe impl ::fidl_next::Wire for ReaderError {
5919        type Narrowed<'de> = Self;
5920
5921        #[inline]
5922        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
5923            // Wire enums have no padding
5924        }
5925    }
5926
5927    impl ReaderError {
5928        pub const IO: ReaderError = ReaderError { value: ::fidl_next::wire::Uint32(1) };
5929    }
5930
5931    unsafe impl<___D> ::fidl_next::Decode<___D> for ReaderError
5932    where
5933        ___D: ?Sized,
5934    {
5935        fn decode(
5936            slot: ::fidl_next::Slot<'_, Self>,
5937            _: &mut ___D,
5938            _: (),
5939        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5940            ::fidl_next::munge!(let Self { value } = slot);
5941
5942            match u32::from(*value) {
5943                1 => (),
5944                unknown => {
5945                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
5946                }
5947            }
5948
5949            Ok(())
5950        }
5951    }
5952
5953    impl ::core::convert::From<crate::natural::ReaderError> for ReaderError {
5954        fn from(natural: crate::natural::ReaderError) -> Self {
5955            match natural {
5956                crate::natural::ReaderError::Io => ReaderError::IO,
5957            }
5958        }
5959    }
5960
5961    impl ::fidl_next::IntoNatural for ReaderError {
5962        type Natural = crate::natural::ReaderError;
5963    }
5964
5965    /// The wire type corresponding to [`BatchIteratorWaitForReadyResponse`].
5966    pub type BatchIteratorWaitForReadyResponse = ::fidl_next::wire::Unit;
5967
5968    /// The wire type corresponding to [`ConfigurationError`].
5969    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
5970    #[repr(transparent)]
5971    pub struct ConfigurationError {
5972        pub(crate) value: ::fidl_next::wire::Uint32,
5973    }
5974
5975    impl ::fidl_next::Constrained for ConfigurationError {
5976        type Constraint = ();
5977
5978        fn validate(
5979            _: ::fidl_next::Slot<'_, Self>,
5980            _: Self::Constraint,
5981        ) -> Result<(), ::fidl_next::ValidationError> {
5982            Ok(())
5983        }
5984    }
5985
5986    unsafe impl ::fidl_next::Wire for ConfigurationError {
5987        type Narrowed<'de> = Self;
5988
5989        #[inline]
5990        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
5991            // Wire enums have no padding
5992        }
5993    }
5994
5995    impl ConfigurationError {
5996        pub const SAMPLE_PERIOD_TOO_SMALL: ConfigurationError =
5997            ConfigurationError { value: ::fidl_next::wire::Uint32(1) };
5998
5999        pub const SAMPLE_PARAMETERS_INVALID: ConfigurationError =
6000            ConfigurationError { value: ::fidl_next::wire::Uint32(2) };
6001
6002        pub const INVALID_SELECTORS: ConfigurationError =
6003            ConfigurationError { value: ::fidl_next::wire::Uint32(3) };
6004    }
6005
6006    unsafe impl<___D> ::fidl_next::Decode<___D> for ConfigurationError
6007    where
6008        ___D: ?Sized,
6009    {
6010        fn decode(
6011            slot: ::fidl_next::Slot<'_, Self>,
6012            _: &mut ___D,
6013            _: (),
6014        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6015            Ok(())
6016        }
6017    }
6018
6019    impl ::core::convert::From<crate::natural::ConfigurationError> for ConfigurationError {
6020        fn from(natural: crate::natural::ConfigurationError) -> Self {
6021            match natural {
6022                crate::natural::ConfigurationError::SamplePeriodTooSmall => {
6023                    ConfigurationError::SAMPLE_PERIOD_TOO_SMALL
6024                }
6025
6026                crate::natural::ConfigurationError::SampleParametersInvalid => {
6027                    ConfigurationError::SAMPLE_PARAMETERS_INVALID
6028                }
6029
6030                crate::natural::ConfigurationError::InvalidSelectors => {
6031                    ConfigurationError::INVALID_SELECTORS
6032                }
6033
6034                crate::natural::ConfigurationError::UnknownOrdinal_(value) => {
6035                    ConfigurationError { value: ::fidl_next::wire::Uint32::from(value) }
6036                }
6037            }
6038        }
6039    }
6040
6041    impl ::fidl_next::IntoNatural for ConfigurationError {
6042        type Natural = crate::natural::ConfigurationError;
6043    }
6044
6045    /// The wire type corresponding to [`LogFlusherWaitUntilFlushedResponse`].
6046    pub type LogFlusherWaitUntilFlushedResponse = ::fidl_next::wire::Unit;
6047
6048    /// The wire type corresponding to [`LogInterestSelector`].
6049    #[derive(Debug)]
6050    #[repr(C)]
6051    pub struct LogInterestSelector<'de> {
6052        pub selector: crate::wire::ComponentSelector<'de>,
6053
6054        pub interest: ::fidl_next_common_fuchsia_diagnostics_types::wire::Interest<'de>,
6055    }
6056
6057    static_assertions::const_assert_eq!(std::mem::size_of::<LogInterestSelector<'_>>(), 32);
6058    static_assertions::const_assert_eq!(std::mem::align_of::<LogInterestSelector<'_>>(), 8);
6059
6060    static_assertions::const_assert_eq!(std::mem::offset_of!(LogInterestSelector<'_>, selector), 0);
6061
6062    static_assertions::const_assert_eq!(
6063        std::mem::offset_of!(LogInterestSelector<'_>, interest),
6064        16
6065    );
6066
6067    impl ::fidl_next::Constrained for LogInterestSelector<'_> {
6068        type Constraint = ();
6069
6070        fn validate(
6071            _: ::fidl_next::Slot<'_, Self>,
6072            _: Self::Constraint,
6073        ) -> Result<(), ::fidl_next::ValidationError> {
6074            Ok(())
6075        }
6076    }
6077
6078    unsafe impl ::fidl_next::Wire for LogInterestSelector<'static> {
6079        type Narrowed<'de> = LogInterestSelector<'de>;
6080
6081        #[inline]
6082        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6083            ::fidl_next::munge! {
6084                let Self {
6085                    selector,
6086                    interest,
6087
6088                } = &mut *out_;
6089            }
6090
6091            ::fidl_next::Wire::zero_padding(selector);
6092
6093            ::fidl_next::Wire::zero_padding(interest);
6094        }
6095    }
6096
6097    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogInterestSelector<'de>
6098    where
6099        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6100        ___D: ::fidl_next::Decoder<'de>,
6101    {
6102        fn decode(
6103            slot_: ::fidl_next::Slot<'_, Self>,
6104            decoder_: &mut ___D,
6105            _: (),
6106        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6107            ::fidl_next::munge! {
6108                let Self {
6109                    mut selector,
6110                    mut interest,
6111
6112                } = slot_;
6113            }
6114
6115            let _field = selector.as_mut();
6116
6117            ::fidl_next::Decode::decode(selector.as_mut(), decoder_, ())?;
6118
6119            let _field = interest.as_mut();
6120
6121            ::fidl_next::Decode::decode(interest.as_mut(), decoder_, ())?;
6122
6123            Ok(())
6124        }
6125    }
6126
6127    impl<'de> ::fidl_next::IntoNatural for LogInterestSelector<'de> {
6128        type Natural = crate::natural::LogInterestSelector;
6129    }
6130
6131    /// The wire type corresponding to [`LogSettingsSetComponentInterestRequest`].
6132    #[repr(C)]
6133    pub struct LogSettingsSetComponentInterestRequest<'de> {
6134        pub(crate) table: ::fidl_next::wire::Table<'de>,
6135    }
6136
6137    impl<'de> Drop for LogSettingsSetComponentInterestRequest<'de> {
6138        fn drop(&mut self) {
6139            let _ = self.table.get(1)
6140                .map(|envelope| unsafe {
6141                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::LogInterestSelector<'de>>>()
6142                });
6143
6144            let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6145        }
6146    }
6147
6148    impl ::fidl_next::Constrained for LogSettingsSetComponentInterestRequest<'_> {
6149        type Constraint = ();
6150
6151        fn validate(
6152            _: ::fidl_next::Slot<'_, Self>,
6153            _: Self::Constraint,
6154        ) -> Result<(), ::fidl_next::ValidationError> {
6155            Ok(())
6156        }
6157    }
6158
6159    unsafe impl ::fidl_next::Wire for LogSettingsSetComponentInterestRequest<'static> {
6160        type Narrowed<'de> = LogSettingsSetComponentInterestRequest<'de>;
6161
6162        #[inline]
6163        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6164            ::fidl_next::munge!(let Self { table } = out);
6165            ::fidl_next::wire::Table::zero_padding(table);
6166        }
6167    }
6168
6169    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogSettingsSetComponentInterestRequest<'de>
6170    where
6171        ___D: ::fidl_next::Decoder<'de> + ?Sized,
6172    {
6173        fn decode(
6174            slot: ::fidl_next::Slot<'_, Self>,
6175            decoder: &mut ___D,
6176            _: (),
6177        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6178            ::fidl_next::munge!(let Self { table } = slot);
6179
6180            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6181                match ordinal {
6182                    0 => unsafe { ::core::hint::unreachable_unchecked() },
6183
6184                    1 => {
6185                        ::fidl_next::wire::Envelope::decode_as::<
6186                            ___D,
6187                            ::fidl_next::wire::Vector<'de, crate::wire::LogInterestSelector<'de>>,
6188                        >(slot.as_mut(), decoder, (64, ()))?;
6189
6190                        let value = unsafe {
6191                            slot
6192                                            .deref_unchecked()
6193                                            .deref_unchecked::<
6194                                                ::fidl_next::wire::Vector<'_, crate::wire::LogInterestSelector<'_>>
6195                                            >()
6196                        };
6197
6198                        if value.len() > 64 {
6199                            return Err(::fidl_next::DecodeError::VectorTooLong {
6200                                size: value.len() as u64,
6201                                limit: 64,
6202                            });
6203                        }
6204
6205                        Ok(())
6206                    }
6207
6208                    2 => {
6209                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6210                            slot.as_mut(),
6211                            decoder,
6212                            (),
6213                        )?;
6214
6215                        Ok(())
6216                    }
6217
6218                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6219                }
6220            })
6221        }
6222    }
6223
6224    impl<'de> LogSettingsSetComponentInterestRequest<'de> {
6225        pub fn selectors(
6226            &self,
6227        ) -> ::core::option::Option<
6228            &::fidl_next::wire::Vector<'de, crate::wire::LogInterestSelector<'de>>,
6229        > {
6230            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6231        }
6232
6233        pub fn take_selectors(
6234            &mut self,
6235        ) -> ::core::option::Option<
6236            ::fidl_next::wire::Vector<'de, crate::wire::LogInterestSelector<'de>>,
6237        > {
6238            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6239        }
6240
6241        pub fn persist(&self) -> ::core::option::Option<&bool> {
6242            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6243        }
6244
6245        pub fn take_persist(&mut self) -> ::core::option::Option<bool> {
6246            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
6247        }
6248    }
6249
6250    impl<'de> ::core::fmt::Debug for LogSettingsSetComponentInterestRequest<'de> {
6251        fn fmt(
6252            &self,
6253            f: &mut ::core::fmt::Formatter<'_>,
6254        ) -> ::core::result::Result<(), ::core::fmt::Error> {
6255            f.debug_struct("LogSettingsSetComponentInterestRequest")
6256                .field("selectors", &self.selectors())
6257                .field("persist", &self.persist())
6258                .finish()
6259        }
6260    }
6261
6262    impl<'de> ::fidl_next::IntoNatural for LogSettingsSetComponentInterestRequest<'de> {
6263        type Natural = crate::natural::LogSettingsSetComponentInterestRequest;
6264    }
6265
6266    /// The wire type corresponding to [`LogStreamOptions`].
6267    #[repr(C)]
6268    pub struct LogStreamOptions<'de> {
6269        pub(crate) table: ::fidl_next::wire::Table<'de>,
6270    }
6271
6272    impl<'de> Drop for LogStreamOptions<'de> {
6273        fn drop(&mut self) {
6274            let _ = self
6275                .table
6276                .get(1)
6277                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::StreamMode>() });
6278
6279            let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6280
6281            let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6282
6283            let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6284
6285            let _ = self.table.get(5).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
6286        }
6287    }
6288
6289    impl ::fidl_next::Constrained for LogStreamOptions<'_> {
6290        type Constraint = ();
6291
6292        fn validate(
6293            _: ::fidl_next::Slot<'_, Self>,
6294            _: Self::Constraint,
6295        ) -> Result<(), ::fidl_next::ValidationError> {
6296            Ok(())
6297        }
6298    }
6299
6300    unsafe impl ::fidl_next::Wire for LogStreamOptions<'static> {
6301        type Narrowed<'de> = LogStreamOptions<'de>;
6302
6303        #[inline]
6304        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6305            ::fidl_next::munge!(let Self { table } = out);
6306            ::fidl_next::wire::Table::zero_padding(table);
6307        }
6308    }
6309
6310    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogStreamOptions<'de>
6311    where
6312        ___D: ::fidl_next::Decoder<'de> + ?Sized,
6313    {
6314        fn decode(
6315            slot: ::fidl_next::Slot<'_, Self>,
6316            decoder: &mut ___D,
6317            _: (),
6318        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6319            ::fidl_next::munge!(let Self { table } = slot);
6320
6321            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6322                match ordinal {
6323                    0 => unsafe { ::core::hint::unreachable_unchecked() },
6324
6325                    1 => {
6326                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::StreamMode>(
6327                            slot.as_mut(),
6328                            decoder,
6329                            (),
6330                        )?;
6331
6332                        Ok(())
6333                    }
6334
6335                    2 => {
6336                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6337                            slot.as_mut(),
6338                            decoder,
6339                            (),
6340                        )?;
6341
6342                        Ok(())
6343                    }
6344
6345                    3 => {
6346                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6347                            slot.as_mut(),
6348                            decoder,
6349                            (),
6350                        )?;
6351
6352                        Ok(())
6353                    }
6354
6355                    4 => {
6356                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6357                            slot.as_mut(),
6358                            decoder,
6359                            (),
6360                        )?;
6361
6362                        Ok(())
6363                    }
6364
6365                    5 => {
6366                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
6367                            slot.as_mut(),
6368                            decoder,
6369                            (),
6370                        )?;
6371
6372                        Ok(())
6373                    }
6374
6375                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6376                }
6377            })
6378        }
6379    }
6380
6381    impl<'de> LogStreamOptions<'de> {
6382        pub fn mode(&self) -> ::core::option::Option<&crate::wire::StreamMode> {
6383            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6384        }
6385
6386        pub fn take_mode(&mut self) -> ::core::option::Option<crate::wire::StreamMode> {
6387            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6388        }
6389
6390        pub fn include_moniker(&self) -> ::core::option::Option<&bool> {
6391            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6392        }
6393
6394        pub fn take_include_moniker(&mut self) -> ::core::option::Option<bool> {
6395            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
6396        }
6397
6398        pub fn include_component_url(&self) -> ::core::option::Option<&bool> {
6399            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
6400        }
6401
6402        pub fn take_include_component_url(&mut self) -> ::core::option::Option<bool> {
6403            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
6404        }
6405
6406        pub fn include_rolled_out(&self) -> ::core::option::Option<&bool> {
6407            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
6408        }
6409
6410        pub fn take_include_rolled_out(&mut self) -> ::core::option::Option<bool> {
6411            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
6412        }
6413
6414        pub fn subscribe_to_manifest(&self) -> ::core::option::Option<&bool> {
6415            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
6416        }
6417
6418        pub fn take_subscribe_to_manifest(&mut self) -> ::core::option::Option<bool> {
6419            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
6420        }
6421    }
6422
6423    impl<'de> ::core::fmt::Debug for LogStreamOptions<'de> {
6424        fn fmt(
6425            &self,
6426            f: &mut ::core::fmt::Formatter<'_>,
6427        ) -> ::core::result::Result<(), ::core::fmt::Error> {
6428            f.debug_struct("LogStreamOptions")
6429                .field("mode", &self.mode())
6430                .field("include_moniker", &self.include_moniker())
6431                .field("include_component_url", &self.include_component_url())
6432                .field("include_rolled_out", &self.include_rolled_out())
6433                .field("subscribe_to_manifest", &self.subscribe_to_manifest())
6434                .finish()
6435        }
6436    }
6437
6438    impl<'de> ::fidl_next::IntoNatural for LogStreamOptions<'de> {
6439        type Natural = crate::natural::LogStreamOptions;
6440    }
6441
6442    /// The wire type corresponding to [`RuntimeError`].
6443    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6444    #[repr(transparent)]
6445    pub struct RuntimeError {
6446        pub(crate) value: ::fidl_next::wire::Uint32,
6447    }
6448
6449    impl ::fidl_next::Constrained for RuntimeError {
6450        type Constraint = ();
6451
6452        fn validate(
6453            _: ::fidl_next::Slot<'_, Self>,
6454            _: Self::Constraint,
6455        ) -> Result<(), ::fidl_next::ValidationError> {
6456            Ok(())
6457        }
6458    }
6459
6460    unsafe impl ::fidl_next::Wire for RuntimeError {
6461        type Narrowed<'de> = Self;
6462
6463        #[inline]
6464        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6465            // Wire enums have no padding
6466        }
6467    }
6468
6469    impl RuntimeError {
6470        pub const BATCH_ITERATOR_FAILED: RuntimeError =
6471            RuntimeError { value: ::fidl_next::wire::Uint32(1) };
6472    }
6473
6474    unsafe impl<___D> ::fidl_next::Decode<___D> for RuntimeError
6475    where
6476        ___D: ?Sized,
6477    {
6478        fn decode(
6479            slot: ::fidl_next::Slot<'_, Self>,
6480            _: &mut ___D,
6481            _: (),
6482        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6483            Ok(())
6484        }
6485    }
6486
6487    impl ::core::convert::From<crate::natural::RuntimeError> for RuntimeError {
6488        fn from(natural: crate::natural::RuntimeError) -> Self {
6489            match natural {
6490                crate::natural::RuntimeError::BatchIteratorFailed => {
6491                    RuntimeError::BATCH_ITERATOR_FAILED
6492                }
6493
6494                crate::natural::RuntimeError::UnknownOrdinal_(value) => {
6495                    RuntimeError { value: ::fidl_next::wire::Uint32::from(value) }
6496                }
6497            }
6498        }
6499    }
6500
6501    impl ::fidl_next::IntoNatural for RuntimeError {
6502        type Natural = crate::natural::RuntimeError;
6503    }
6504
6505    /// The wire type corresponding to [`SampleStrategy`].
6506    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
6507    #[repr(transparent)]
6508    pub struct SampleStrategy {
6509        pub(crate) value: u8,
6510    }
6511
6512    impl ::fidl_next::Constrained for SampleStrategy {
6513        type Constraint = ();
6514
6515        fn validate(
6516            _: ::fidl_next::Slot<'_, Self>,
6517            _: Self::Constraint,
6518        ) -> Result<(), ::fidl_next::ValidationError> {
6519            Ok(())
6520        }
6521    }
6522
6523    unsafe impl ::fidl_next::Wire for SampleStrategy {
6524        type Narrowed<'de> = Self;
6525
6526        #[inline]
6527        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6528            // Wire enums have no padding
6529        }
6530    }
6531
6532    impl SampleStrategy {
6533        pub const ON_DIFF: SampleStrategy = SampleStrategy { value: 1 };
6534
6535        pub const ALWAYS: SampleStrategy = SampleStrategy { value: 2 };
6536    }
6537
6538    unsafe impl<___D> ::fidl_next::Decode<___D> for SampleStrategy
6539    where
6540        ___D: ?Sized,
6541    {
6542        fn decode(
6543            slot: ::fidl_next::Slot<'_, Self>,
6544            _: &mut ___D,
6545            _: (),
6546        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6547            Ok(())
6548        }
6549    }
6550
6551    impl ::core::convert::From<crate::natural::SampleStrategy> for SampleStrategy {
6552        fn from(natural: crate::natural::SampleStrategy) -> Self {
6553            match natural {
6554                crate::natural::SampleStrategy::OnDiff => SampleStrategy::ON_DIFF,
6555
6556                crate::natural::SampleStrategy::Always => SampleStrategy::ALWAYS,
6557
6558                crate::natural::SampleStrategy::UnknownOrdinal_(value) => {
6559                    SampleStrategy { value: u8::from(value) }
6560                }
6561            }
6562        }
6563    }
6564
6565    impl ::fidl_next::IntoNatural for SampleStrategy {
6566        type Natural = crate::natural::SampleStrategy;
6567    }
6568
6569    /// The wire type corresponding to [`SampleDatum`].
6570    #[repr(C)]
6571    pub struct SampleDatum<'de> {
6572        pub(crate) table: ::fidl_next::wire::Table<'de>,
6573    }
6574
6575    impl<'de> Drop for SampleDatum<'de> {
6576        fn drop(&mut self) {
6577            let _ = self.table.get(1).map(|envelope| unsafe {
6578                envelope.read_unchecked::<crate::wire::SelectorArgument<'de>>()
6579            });
6580
6581            let _ = self.table.get(2).map(|envelope| unsafe {
6582                envelope.read_unchecked::<crate::wire::SampleStrategy>()
6583            });
6584
6585            let _ = self
6586                .table
6587                .get(3)
6588                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
6589        }
6590    }
6591
6592    impl ::fidl_next::Constrained for SampleDatum<'_> {
6593        type Constraint = ();
6594
6595        fn validate(
6596            _: ::fidl_next::Slot<'_, Self>,
6597            _: Self::Constraint,
6598        ) -> Result<(), ::fidl_next::ValidationError> {
6599            Ok(())
6600        }
6601    }
6602
6603    unsafe impl ::fidl_next::Wire for SampleDatum<'static> {
6604        type Narrowed<'de> = SampleDatum<'de>;
6605
6606        #[inline]
6607        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6608            ::fidl_next::munge!(let Self { table } = out);
6609            ::fidl_next::wire::Table::zero_padding(table);
6610        }
6611    }
6612
6613    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleDatum<'de>
6614    where
6615        ___D: ::fidl_next::Decoder<'de> + ?Sized,
6616    {
6617        fn decode(
6618            slot: ::fidl_next::Slot<'_, Self>,
6619            decoder: &mut ___D,
6620            _: (),
6621        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6622            ::fidl_next::munge!(let Self { table } = slot);
6623
6624            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6625                match ordinal {
6626                    0 => unsafe { ::core::hint::unreachable_unchecked() },
6627
6628                    1 => {
6629                        ::fidl_next::wire::Envelope::decode_as::<
6630                            ___D,
6631                            crate::wire::SelectorArgument<'de>,
6632                        >(slot.as_mut(), decoder, ())?;
6633
6634                        Ok(())
6635                    }
6636
6637                    2 => {
6638                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::SampleStrategy>(
6639                            slot.as_mut(),
6640                            decoder,
6641                            (),
6642                        )?;
6643
6644                        Ok(())
6645                    }
6646
6647                    3 => {
6648                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
6649                            slot.as_mut(),
6650                            decoder,
6651                            (),
6652                        )?;
6653
6654                        Ok(())
6655                    }
6656
6657                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6658                }
6659            })
6660        }
6661    }
6662
6663    impl<'de> SampleDatum<'de> {
6664        pub fn selector(&self) -> ::core::option::Option<&crate::wire::SelectorArgument<'de>> {
6665            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6666        }
6667
6668        pub fn take_selector(
6669            &mut self,
6670        ) -> ::core::option::Option<crate::wire::SelectorArgument<'de>> {
6671            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6672        }
6673
6674        pub fn strategy(&self) -> ::core::option::Option<&crate::wire::SampleStrategy> {
6675            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6676        }
6677
6678        pub fn take_strategy(&mut self) -> ::core::option::Option<crate::wire::SampleStrategy> {
6679            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
6680        }
6681
6682        pub fn interval_secs(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
6683            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
6684        }
6685
6686        pub fn take_interval_secs(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
6687            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
6688        }
6689    }
6690
6691    impl<'de> ::core::fmt::Debug for SampleDatum<'de> {
6692        fn fmt(
6693            &self,
6694            f: &mut ::core::fmt::Formatter<'_>,
6695        ) -> ::core::result::Result<(), ::core::fmt::Error> {
6696            f.debug_struct("SampleDatum")
6697                .field("selector", &self.selector())
6698                .field("strategy", &self.strategy())
6699                .field("interval_secs", &self.interval_secs())
6700                .finish()
6701        }
6702    }
6703
6704    impl<'de> ::fidl_next::IntoNatural for SampleDatum<'de> {
6705        type Natural = crate::natural::SampleDatum;
6706    }
6707
6708    /// The wire type corresponding to [`SampleParameters`].
6709    #[repr(C)]
6710    pub struct SampleParameters<'de> {
6711        pub(crate) table: ::fidl_next::wire::Table<'de>,
6712    }
6713
6714    impl<'de> Drop for SampleParameters<'de> {
6715        fn drop(&mut self) {
6716            let _ = self.table.get(1)
6717                .map(|envelope| unsafe {
6718                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SampleDatum<'de>>>()
6719                });
6720        }
6721    }
6722
6723    impl ::fidl_next::Constrained for SampleParameters<'_> {
6724        type Constraint = ();
6725
6726        fn validate(
6727            _: ::fidl_next::Slot<'_, Self>,
6728            _: Self::Constraint,
6729        ) -> Result<(), ::fidl_next::ValidationError> {
6730            Ok(())
6731        }
6732    }
6733
6734    unsafe impl ::fidl_next::Wire for SampleParameters<'static> {
6735        type Narrowed<'de> = SampleParameters<'de>;
6736
6737        #[inline]
6738        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6739            ::fidl_next::munge!(let Self { table } = out);
6740            ::fidl_next::wire::Table::zero_padding(table);
6741        }
6742    }
6743
6744    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SampleParameters<'de>
6745    where
6746        ___D: ::fidl_next::Decoder<'de> + ?Sized,
6747    {
6748        fn decode(
6749            slot: ::fidl_next::Slot<'_, Self>,
6750            decoder: &mut ___D,
6751            _: (),
6752        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6753            ::fidl_next::munge!(let Self { table } = slot);
6754
6755            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6756                match ordinal {
6757                    0 => unsafe { ::core::hint::unreachable_unchecked() },
6758
6759                    1 => {
6760                        ::fidl_next::wire::Envelope::decode_as::<
6761                            ___D,
6762                            ::fidl_next::wire::Vector<'de, crate::wire::SampleDatum<'de>>,
6763                        >(slot.as_mut(), decoder, (100, ()))?;
6764
6765                        let value = unsafe {
6766                            slot
6767                                            .deref_unchecked()
6768                                            .deref_unchecked::<
6769                                                ::fidl_next::wire::Vector<'_, crate::wire::SampleDatum<'_>>
6770                                            >()
6771                        };
6772
6773                        if value.len() > 100 {
6774                            return Err(::fidl_next::DecodeError::VectorTooLong {
6775                                size: value.len() as u64,
6776                                limit: 100,
6777                            });
6778                        }
6779
6780                        Ok(())
6781                    }
6782
6783                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
6784                }
6785            })
6786        }
6787    }
6788
6789    impl<'de> SampleParameters<'de> {
6790        pub fn data(
6791            &self,
6792        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::SampleDatum<'de>>>
6793        {
6794            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6795        }
6796
6797        pub fn take_data(
6798            &mut self,
6799        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::SampleDatum<'de>>>
6800        {
6801            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
6802        }
6803    }
6804
6805    impl<'de> ::core::fmt::Debug for SampleParameters<'de> {
6806        fn fmt(
6807            &self,
6808            f: &mut ::core::fmt::Formatter<'_>,
6809        ) -> ::core::result::Result<(), ::core::fmt::Error> {
6810            f.debug_struct("SampleParameters").field("data", &self.data()).finish()
6811        }
6812    }
6813
6814    impl<'de> ::fidl_next::IntoNatural for SampleParameters<'de> {
6815        type Natural = crate::natural::SampleParameters;
6816    }
6817
6818    /// The wire type corresponding to [`SampleCommitResponse`].
6819    pub type SampleCommitResponse = ::fidl_next::wire::Unit;
6820}
6821
6822pub mod wire_optional {
6823
6824    #[repr(transparent)]
6825    pub struct StringSelector<'de> {
6826        pub(crate) raw: ::fidl_next::wire::Union,
6827        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
6828    }
6829
6830    impl ::fidl_next::Constrained for StringSelector<'_> {
6831        type Constraint = ();
6832
6833        fn validate(
6834            _: ::fidl_next::Slot<'_, Self>,
6835            _: Self::Constraint,
6836        ) -> Result<(), ::fidl_next::ValidationError> {
6837            Ok(())
6838        }
6839    }
6840
6841    unsafe impl ::fidl_next::Wire for StringSelector<'static> {
6842        type Narrowed<'de> = StringSelector<'de>;
6843
6844        #[inline]
6845        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6846            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6847            ::fidl_next::wire::Union::zero_padding(raw);
6848        }
6849    }
6850
6851    impl<'de> StringSelector<'de> {
6852        pub fn is_some(&self) -> bool {
6853            self.raw.is_some()
6854        }
6855
6856        pub fn is_none(&self) -> bool {
6857            self.raw.is_none()
6858        }
6859
6860        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::StringSelector<'de>> {
6861            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
6862        }
6863
6864        pub fn into_option(self) -> ::core::option::Option<crate::wire::StringSelector<'de>> {
6865            if self.is_some() {
6866                Some(crate::wire::StringSelector {
6867                    raw: self.raw,
6868                    _phantom: ::core::marker::PhantomData,
6869                })
6870            } else {
6871                None
6872            }
6873        }
6874    }
6875
6876    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for StringSelector<'de>
6877    where
6878        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6879        ___D: ::fidl_next::Decoder<'de>,
6880    {
6881        fn decode(
6882            mut slot: ::fidl_next::Slot<'_, Self>,
6883            decoder: &mut ___D,
6884            _: (),
6885        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6886            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6887            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6888                1 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
6889                    raw, decoder, 1024,
6890                )?,
6891
6892                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
6893                    raw, decoder, 1024,
6894                )?,
6895
6896                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
6897                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
6898            }
6899
6900            Ok(())
6901        }
6902    }
6903
6904    impl<'de> ::core::fmt::Debug for StringSelector<'de> {
6905        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6906            self.as_ref().fmt(f)
6907        }
6908    }
6909
6910    impl<'de> ::fidl_next::IntoNatural for StringSelector<'de> {
6911        type Natural = ::core::option::Option<crate::natural::StringSelector>;
6912    }
6913
6914    #[repr(transparent)]
6915    pub struct TreeSelector<'de> {
6916        pub(crate) raw: ::fidl_next::wire::Union,
6917        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
6918    }
6919
6920    impl ::fidl_next::Constrained for TreeSelector<'_> {
6921        type Constraint = ();
6922
6923        fn validate(
6924            _: ::fidl_next::Slot<'_, Self>,
6925            _: Self::Constraint,
6926        ) -> Result<(), ::fidl_next::ValidationError> {
6927            Ok(())
6928        }
6929    }
6930
6931    unsafe impl ::fidl_next::Wire for TreeSelector<'static> {
6932        type Narrowed<'de> = TreeSelector<'de>;
6933
6934        #[inline]
6935        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6936            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
6937            ::fidl_next::wire::Union::zero_padding(raw);
6938        }
6939    }
6940
6941    impl<'de> TreeSelector<'de> {
6942        pub fn is_some(&self) -> bool {
6943            self.raw.is_some()
6944        }
6945
6946        pub fn is_none(&self) -> bool {
6947            self.raw.is_none()
6948        }
6949
6950        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::TreeSelector<'de>> {
6951            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
6952        }
6953
6954        pub fn into_option(self) -> ::core::option::Option<crate::wire::TreeSelector<'de>> {
6955            if self.is_some() {
6956                Some(crate::wire::TreeSelector {
6957                    raw: self.raw,
6958                    _phantom: ::core::marker::PhantomData,
6959                })
6960            } else {
6961                None
6962            }
6963        }
6964    }
6965
6966    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TreeSelector<'de>
6967    where
6968        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6969        ___D: ::fidl_next::Decoder<'de>,
6970    {
6971        fn decode(
6972            mut slot: ::fidl_next::Slot<'_, Self>,
6973            decoder: &mut ___D,
6974            _: (),
6975        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6976            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
6977            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
6978                1 => {
6979                    ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SubtreeSelector<'de>>(
6980                        raw,
6981                        decoder,
6982                        (),
6983                    )?
6984                }
6985
6986                2 => {
6987                    ::fidl_next::wire::Union::decode_as::<___D, crate::wire::PropertySelector<'de>>(
6988                        raw,
6989                        decoder,
6990                        (),
6991                    )?
6992                }
6993
6994                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
6995                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
6996            }
6997
6998            Ok(())
6999        }
7000    }
7001
7002    impl<'de> ::core::fmt::Debug for TreeSelector<'de> {
7003        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7004            self.as_ref().fmt(f)
7005        }
7006    }
7007
7008    impl<'de> ::fidl_next::IntoNatural for TreeSelector<'de> {
7009        type Natural = ::core::option::Option<crate::natural::TreeSelector>;
7010    }
7011
7012    #[repr(transparent)]
7013    pub struct TreeNames<'de> {
7014        pub(crate) raw: ::fidl_next::wire::Union,
7015        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7016    }
7017
7018    impl ::fidl_next::Constrained for TreeNames<'_> {
7019        type Constraint = ();
7020
7021        fn validate(
7022            _: ::fidl_next::Slot<'_, Self>,
7023            _: Self::Constraint,
7024        ) -> Result<(), ::fidl_next::ValidationError> {
7025            Ok(())
7026        }
7027    }
7028
7029    unsafe impl ::fidl_next::Wire for TreeNames<'static> {
7030        type Narrowed<'de> = TreeNames<'de>;
7031
7032        #[inline]
7033        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7034            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7035            ::fidl_next::wire::Union::zero_padding(raw);
7036        }
7037    }
7038
7039    impl<'de> TreeNames<'de> {
7040        pub fn is_some(&self) -> bool {
7041            self.raw.is_some()
7042        }
7043
7044        pub fn is_none(&self) -> bool {
7045            self.raw.is_none()
7046        }
7047
7048        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::TreeNames<'de>> {
7049            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7050        }
7051
7052        pub fn into_option(self) -> ::core::option::Option<crate::wire::TreeNames<'de>> {
7053            if self.is_some() {
7054                Some(crate::wire::TreeNames {
7055                    raw: self.raw,
7056                    _phantom: ::core::marker::PhantomData,
7057                })
7058            } else {
7059                None
7060            }
7061        }
7062    }
7063
7064    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for TreeNames<'de>
7065    where
7066        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7067        ___D: ::fidl_next::Decoder<'de>,
7068    {
7069        fn decode(
7070            mut slot: ::fidl_next::Slot<'_, Self>,
7071            decoder: &mut ___D,
7072            _: (),
7073        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7074            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7075            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7076                1 => ::fidl_next::wire::Union::decode_as::<
7077                    ___D,
7078                    ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
7079                >(raw, decoder, (4294967295, 1024))?,
7080
7081                2 => {
7082                    ::fidl_next::wire::Union::decode_as::<___D, crate::wire::All>(raw, decoder, ())?
7083                }
7084
7085                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7086                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7087            }
7088
7089            Ok(())
7090        }
7091    }
7092
7093    impl<'de> ::core::fmt::Debug for TreeNames<'de> {
7094        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7095            self.as_ref().fmt(f)
7096        }
7097    }
7098
7099    impl<'de> ::fidl_next::IntoNatural for TreeNames<'de> {
7100        type Natural = ::core::option::Option<crate::natural::TreeNames>;
7101    }
7102
7103    #[repr(transparent)]
7104    pub struct SelectorArgument<'de> {
7105        pub(crate) raw: ::fidl_next::wire::Union,
7106        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7107    }
7108
7109    impl ::fidl_next::Constrained for SelectorArgument<'_> {
7110        type Constraint = ();
7111
7112        fn validate(
7113            _: ::fidl_next::Slot<'_, Self>,
7114            _: Self::Constraint,
7115        ) -> Result<(), ::fidl_next::ValidationError> {
7116            Ok(())
7117        }
7118    }
7119
7120    unsafe impl ::fidl_next::Wire for SelectorArgument<'static> {
7121        type Narrowed<'de> = SelectorArgument<'de>;
7122
7123        #[inline]
7124        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7125            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7126            ::fidl_next::wire::Union::zero_padding(raw);
7127        }
7128    }
7129
7130    impl<'de> SelectorArgument<'de> {
7131        pub fn is_some(&self) -> bool {
7132            self.raw.is_some()
7133        }
7134
7135        pub fn is_none(&self) -> bool {
7136            self.raw.is_none()
7137        }
7138
7139        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SelectorArgument<'de>> {
7140            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7141        }
7142
7143        pub fn into_option(self) -> ::core::option::Option<crate::wire::SelectorArgument<'de>> {
7144            if self.is_some() {
7145                Some(crate::wire::SelectorArgument {
7146                    raw: self.raw,
7147                    _phantom: ::core::marker::PhantomData,
7148                })
7149            } else {
7150                None
7151            }
7152        }
7153    }
7154
7155    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SelectorArgument<'de>
7156    where
7157        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7158        ___D: ::fidl_next::Decoder<'de>,
7159    {
7160        fn decode(
7161            mut slot: ::fidl_next::Slot<'_, Self>,
7162            decoder: &mut ___D,
7163            _: (),
7164        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7165            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7166            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7167                1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Selector<'de>>(
7168                    raw,
7169                    decoder,
7170                    (),
7171                )?,
7172
7173                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
7174                    raw, decoder, 1024,
7175                )?,
7176
7177                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7178                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7179            }
7180
7181            Ok(())
7182        }
7183    }
7184
7185    impl<'de> ::core::fmt::Debug for SelectorArgument<'de> {
7186        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7187            self.as_ref().fmt(f)
7188        }
7189    }
7190
7191    impl<'de> ::fidl_next::IntoNatural for SelectorArgument<'de> {
7192        type Natural = ::core::option::Option<crate::natural::SelectorArgument>;
7193    }
7194
7195    #[repr(transparent)]
7196    pub struct ClientSelectorConfiguration<'de> {
7197        pub(crate) raw: ::fidl_next::wire::Union,
7198        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
7199    }
7200
7201    impl ::fidl_next::Constrained for ClientSelectorConfiguration<'_> {
7202        type Constraint = ();
7203
7204        fn validate(
7205            _: ::fidl_next::Slot<'_, Self>,
7206            _: Self::Constraint,
7207        ) -> Result<(), ::fidl_next::ValidationError> {
7208            Ok(())
7209        }
7210    }
7211
7212    unsafe impl ::fidl_next::Wire for ClientSelectorConfiguration<'static> {
7213        type Narrowed<'de> = ClientSelectorConfiguration<'de>;
7214
7215        #[inline]
7216        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7217            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
7218            ::fidl_next::wire::Union::zero_padding(raw);
7219        }
7220    }
7221
7222    impl<'de> ClientSelectorConfiguration<'de> {
7223        pub fn is_some(&self) -> bool {
7224            self.raw.is_some()
7225        }
7226
7227        pub fn is_none(&self) -> bool {
7228            self.raw.is_none()
7229        }
7230
7231        pub fn as_ref(
7232            &self,
7233        ) -> ::core::option::Option<&crate::wire::ClientSelectorConfiguration<'de>> {
7234            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
7235        }
7236
7237        pub fn into_option(
7238            self,
7239        ) -> ::core::option::Option<crate::wire::ClientSelectorConfiguration<'de>> {
7240            if self.is_some() {
7241                Some(crate::wire::ClientSelectorConfiguration {
7242                    raw: self.raw,
7243                    _phantom: ::core::marker::PhantomData,
7244                })
7245            } else {
7246                None
7247            }
7248        }
7249    }
7250
7251    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ClientSelectorConfiguration<'de>
7252    where
7253        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7254        ___D: ::fidl_next::Decoder<'de>,
7255    {
7256        fn decode(
7257            mut slot: ::fidl_next::Slot<'_, Self>,
7258            decoder: &mut ___D,
7259            _: (),
7260        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7261            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
7262            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
7263                1 => ::fidl_next::wire::Union::decode_as::<
7264                    ___D,
7265                    ::fidl_next::wire::Vector<'de, crate::wire::SelectorArgument<'de>>,
7266                >(raw, decoder, (4294967295, ()))?,
7267
7268                2 => ::fidl_next::wire::Union::decode_as::<___D, bool>(raw, decoder, ())?,
7269
7270                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
7271                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
7272            }
7273
7274            Ok(())
7275        }
7276    }
7277
7278    impl<'de> ::core::fmt::Debug for ClientSelectorConfiguration<'de> {
7279        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7280            self.as_ref().fmt(f)
7281        }
7282    }
7283
7284    impl<'de> ::fidl_next::IntoNatural for ClientSelectorConfiguration<'de> {
7285        type Natural = ::core::option::Option<crate::natural::ClientSelectorConfiguration>;
7286    }
7287}
7288
7289pub mod generic {
7290
7291    /// The generic type corresponding to [`All`].
7292    pub type All = ();
7293
7294    /// The generic type corresponding to [`SubtreeSelector`].
7295    pub struct SubtreeSelector<T0> {
7296        pub node_path: T0,
7297    }
7298
7299    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SubtreeSelector<'static>, ___E>
7300        for SubtreeSelector<T0>
7301    where
7302        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7303        ___E: ::fidl_next::Encoder,
7304        T0: ::fidl_next::Encode<
7305                ::fidl_next::wire::Vector<'static, crate::wire::StringSelector<'static>>,
7306                ___E,
7307            >,
7308    {
7309        #[inline]
7310        fn encode(
7311            self,
7312            encoder_: &mut ___E,
7313            out_: &mut ::core::mem::MaybeUninit<crate::wire::SubtreeSelector<'static>>,
7314            _: (),
7315        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7316            ::fidl_next::munge! {
7317                let crate::wire::SubtreeSelector {
7318                    node_path,
7319
7320                } = out_;
7321            }
7322
7323            ::fidl_next::Encode::encode(self.node_path, encoder_, node_path, (100, ()))?;
7324
7325            Ok(())
7326        }
7327    }
7328
7329    /// The generic type corresponding to [`PropertySelector`].
7330    pub struct PropertySelector<T0, T1> {
7331        pub node_path: T0,
7332
7333        pub target_properties: T1,
7334    }
7335
7336    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::PropertySelector<'static>, ___E>
7337        for PropertySelector<T0, T1>
7338    where
7339        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7340        ___E: ::fidl_next::Encoder,
7341        T0: ::fidl_next::Encode<
7342                ::fidl_next::wire::Vector<'static, crate::wire::StringSelector<'static>>,
7343                ___E,
7344            >,
7345        T1: ::fidl_next::Encode<crate::wire::StringSelector<'static>, ___E>,
7346    {
7347        #[inline]
7348        fn encode(
7349            self,
7350            encoder_: &mut ___E,
7351            out_: &mut ::core::mem::MaybeUninit<crate::wire::PropertySelector<'static>>,
7352            _: (),
7353        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7354            ::fidl_next::munge! {
7355                let crate::wire::PropertySelector {
7356                    node_path,
7357                    target_properties,
7358
7359                } = out_;
7360            }
7361
7362            ::fidl_next::Encode::encode(self.node_path, encoder_, node_path, (100, ()))?;
7363
7364            ::fidl_next::Encode::encode(self.target_properties, encoder_, target_properties, ())?;
7365
7366            Ok(())
7367        }
7368    }
7369
7370    /// The generic type corresponding to [`ArchiveAccessorWaitForReadyResponse`].
7371    pub type ArchiveAccessorWaitForReadyResponse = ();
7372
7373    /// The generic type corresponding to [`BatchIteratorWaitForReadyResponse`].
7374    pub type BatchIteratorWaitForReadyResponse = ();
7375
7376    /// The generic type corresponding to [`LogFlusherWaitUntilFlushedResponse`].
7377    pub type LogFlusherWaitUntilFlushedResponse = ();
7378
7379    /// The generic type corresponding to [`LogInterestSelector`].
7380    pub struct LogInterestSelector<T0, T1> {
7381        pub selector: T0,
7382
7383        pub interest: T1,
7384    }
7385
7386    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::LogInterestSelector<'static>, ___E>
7387        for LogInterestSelector<T0, T1>
7388    where
7389        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7390        ___E: ::fidl_next::Encoder,
7391        T0: ::fidl_next::Encode<crate::wire::ComponentSelector<'static>, ___E>,
7392        T1: ::fidl_next::Encode<
7393                ::fidl_next_common_fuchsia_diagnostics_types::wire::Interest<'static>,
7394                ___E,
7395            >,
7396    {
7397        #[inline]
7398        fn encode(
7399            self,
7400            encoder_: &mut ___E,
7401            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogInterestSelector<'static>>,
7402            _: (),
7403        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7404            ::fidl_next::munge! {
7405                let crate::wire::LogInterestSelector {
7406                    selector,
7407                    interest,
7408
7409                } = out_;
7410            }
7411
7412            ::fidl_next::Encode::encode(self.selector, encoder_, selector, ())?;
7413
7414            ::fidl_next::Encode::encode(self.interest, encoder_, interest, ())?;
7415
7416            Ok(())
7417        }
7418    }
7419
7420    /// The generic type corresponding to [`SampleCommitResponse`].
7421    pub type SampleCommitResponse = ();
7422}
7423
7424pub use self::natural::*;
7425
7426pub const MAX_MONIKER_SEGMENTS: u16 = 25 as u16;
7427
7428pub const MAX_DATA_HIERARCHY_DEPTH: u16 = 100 as u16;
7429
7430#[doc = "  The size bound of 1024 is a reasonably low size restriction that meets most\n  canonical selectors we\'ve ecountered.\n"]
7431pub const MAXIMUM_RAW_SELECTOR_LENGTH: u16 = 1024 as u16;
7432
7433pub const MAX_STRING_SELECTOR_LENGTH: u16 = 1024 as u16;
7434
7435#[doc = " The size 64 was chosen because entries in batches are handles to\n VMOs and there is a limit of 64 handles per fidl message.\n"]
7436pub const MAXIMUM_ENTRIES_PER_BATCH: u16 = 64 as u16;
7437
7438pub const COMPONENT_URL_ARG_NAME: &str = "$__url";
7439
7440/// The type corresponding to the LogFlusher protocol.
7441#[derive(PartialEq, Debug)]
7442pub struct LogFlusher;
7443
7444impl ::fidl_next::Discoverable for LogFlusher {
7445    const PROTOCOL_NAME: &'static str = "fuchsia.diagnostics.LogFlusher";
7446}
7447
7448#[cfg(target_os = "fuchsia")]
7449impl ::fidl_next::HasTransport for LogFlusher {
7450    type Transport = ::fidl_next::fuchsia::zx::Channel;
7451}
7452
7453pub mod log_flusher {
7454    pub mod prelude {
7455        pub use crate::{
7456            LogFlusher, LogFlusherClientHandler, LogFlusherLocalClientHandler,
7457            LogFlusherLocalServerHandler, LogFlusherServerHandler, log_flusher,
7458        };
7459
7460        pub use crate::natural::LogFlusherWaitUntilFlushedResponse;
7461    }
7462
7463    pub struct WaitUntilFlushed;
7464
7465    impl ::fidl_next::Method for WaitUntilFlushed {
7466        const ORDINAL: u64 = 9062519182019824475;
7467        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7468            ::fidl_next::protocol::Flexibility::Flexible;
7469
7470        type Protocol = crate::LogFlusher;
7471
7472        type Request = ::fidl_next::wire::EmptyMessageBody;
7473    }
7474
7475    impl ::fidl_next::TwoWayMethod for WaitUntilFlushed {
7476        type Response =
7477            ::fidl_next::wire::Flexible<'static, crate::wire::LogFlusherWaitUntilFlushedResponse>;
7478    }
7479
7480    impl<___R> ::fidl_next::Respond<___R> for WaitUntilFlushed {
7481        type Output = ::fidl_next::Flexible<___R>;
7482
7483        fn respond(response: ___R) -> Self::Output {
7484            ::fidl_next::Flexible(response)
7485        }
7486    }
7487
7488    mod ___detail {
7489        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::LogFlusher
7490        where
7491            ___T: ::fidl_next::Transport,
7492        {
7493            type Client = LogFlusherClient<___T>;
7494            type Server = LogFlusherServer<___T>;
7495        }
7496
7497        /// The client for the `LogFlusher` protocol.
7498        #[repr(transparent)]
7499        pub struct LogFlusherClient<___T: ::fidl_next::Transport> {
7500            #[allow(dead_code)]
7501            client: ::fidl_next::protocol::Client<___T>,
7502        }
7503
7504        impl<___T> LogFlusherClient<___T>
7505        where
7506            ___T: ::fidl_next::Transport,
7507        {
7508            #[doc = " Flushes all pending logs through the logging pipeline\n to the serial port. Logs written to sockets prior to\n the call to Flush are guaranteed to be fully written\n to serial when this returns. Logs written to sockets\n after this call has been received by Archivist are\n not guaranteed to be flushed.\n Additionally, sockets must actually be connected to the Archivist\n before this call is made. If a socket hasn\'t been\n received by Archivist yet, those logs may be dropped.\n To ensure that logs are properly flushed, make sure\n to wait for the initial interest when logging.\n Important note: This may be called from the host,\n but host sockets will NOT be flushed by this method.\n If you write data from the host (not on the device,\n there is no guarantee that such logs will ever be printed).\n"]
7509            pub fn wait_until_flushed(
7510                &self,
7511            ) -> ::fidl_next::TwoWayFuture<'_, super::WaitUntilFlushed, ___T> {
7512                ::fidl_next::TwoWayFuture::from_untyped(
7513                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7514                        9062519182019824475,
7515                        <super::WaitUntilFlushed as ::fidl_next::Method>::FLEXIBILITY,
7516                        (),
7517                    ),
7518                )
7519            }
7520        }
7521
7522        /// The server for the `LogFlusher` protocol.
7523        #[repr(transparent)]
7524        pub struct LogFlusherServer<___T: ::fidl_next::Transport> {
7525            server: ::fidl_next::protocol::Server<___T>,
7526        }
7527
7528        impl<___T> LogFlusherServer<___T> where ___T: ::fidl_next::Transport {}
7529    }
7530}
7531
7532#[diagnostic::on_unimplemented(
7533    note = "If {Self} implements the non-local LogFlusherClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
7534)]
7535
7536/// A client handler for the LogFlusher protocol.
7537///
7538/// See [`LogFlusher`] for more details.
7539pub trait LogFlusherLocalClientHandler<
7540    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7541    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7542>
7543{
7544    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7545        ::core::future::ready(())
7546    }
7547}
7548
7549impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for LogFlusher
7550where
7551    ___H: LogFlusherLocalClientHandler<___T>,
7552    ___T: ::fidl_next::Transport,
7553{
7554    async fn on_event(
7555        handler: &mut ___H,
7556        mut message: ::fidl_next::Message<___T>,
7557    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7558        match *message.header().ordinal {
7559            ordinal => {
7560                handler.on_unknown_interaction(ordinal).await;
7561                if ::core::matches!(
7562                    message.header().flexibility(),
7563                    ::fidl_next::protocol::Flexibility::Strict
7564                ) {
7565                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7566                } else {
7567                    Ok(())
7568                }
7569            }
7570        }
7571    }
7572}
7573
7574#[diagnostic::on_unimplemented(
7575    note = "If {Self} implements the non-local LogFlusherServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
7576)]
7577
7578/// A server handler for the LogFlusher protocol.
7579///
7580/// See [`LogFlusher`] for more details.
7581pub trait LogFlusherLocalServerHandler<
7582    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7583    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7584>
7585{
7586    #[doc = " Flushes all pending logs through the logging pipeline\n to the serial port. Logs written to sockets prior to\n the call to Flush are guaranteed to be fully written\n to serial when this returns. Logs written to sockets\n after this call has been received by Archivist are\n not guaranteed to be flushed.\n Additionally, sockets must actually be connected to the Archivist\n before this call is made. If a socket hasn\'t been\n received by Archivist yet, those logs may be dropped.\n To ensure that logs are properly flushed, make sure\n to wait for the initial interest when logging.\n Important note: This may be called from the host,\n but host sockets will NOT be flushed by this method.\n If you write data from the host (not on the device,\n there is no guarantee that such logs will ever be printed).\n"]
7587    fn wait_until_flushed(
7588        &mut self,
7589
7590        responder: ::fidl_next::Responder<log_flusher::WaitUntilFlushed, ___T>,
7591    ) -> impl ::core::future::Future<Output = ()>;
7592
7593    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7594        ::core::future::ready(())
7595    }
7596}
7597
7598impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for LogFlusher
7599where
7600    ___H: LogFlusherLocalServerHandler<___T>,
7601    ___T: ::fidl_next::Transport,
7602{
7603    async fn on_one_way(
7604        handler: &mut ___H,
7605        mut message: ::fidl_next::Message<___T>,
7606    ) -> ::core::result::Result<
7607        (),
7608        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7609    > {
7610        match *message.header().ordinal {
7611            ordinal => {
7612                handler.on_unknown_interaction(ordinal).await;
7613                if ::core::matches!(
7614                    message.header().flexibility(),
7615                    ::fidl_next::protocol::Flexibility::Strict
7616                ) {
7617                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7618                } else {
7619                    Ok(())
7620                }
7621            }
7622        }
7623    }
7624
7625    async fn on_two_way(
7626        handler: &mut ___H,
7627        mut message: ::fidl_next::Message<___T>,
7628        responder: ::fidl_next::protocol::Responder<___T>,
7629    ) -> ::core::result::Result<
7630        (),
7631        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7632    > {
7633        match *message.header().ordinal {
7634            9062519182019824475 => {
7635                let responder = ::fidl_next::Responder::from_untyped(responder);
7636
7637                handler.wait_until_flushed(responder).await;
7638                Ok(())
7639            }
7640
7641            ordinal => {
7642                handler.on_unknown_interaction(ordinal).await;
7643                if ::core::matches!(
7644                    message.header().flexibility(),
7645                    ::fidl_next::protocol::Flexibility::Strict
7646                ) {
7647                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7648                } else {
7649                    responder
7650                        .respond_framework_error(
7651                            ordinal,
7652                            ::fidl_next::FrameworkError::UnknownMethod,
7653                        )
7654                        .expect("encoding a framework error should never fail")
7655                        .await?;
7656                    Ok(())
7657                }
7658            }
7659        }
7660    }
7661}
7662
7663/// A client handler for the LogFlusher protocol.
7664///
7665/// See [`LogFlusher`] for more details.
7666pub trait LogFlusherClientHandler<
7667    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7668    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7669>
7670{
7671    fn on_unknown_interaction(
7672        &mut self,
7673        ordinal: u64,
7674    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7675        ::core::future::ready(())
7676    }
7677}
7678
7679impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for LogFlusher
7680where
7681    ___H: LogFlusherClientHandler<___T> + ::core::marker::Send,
7682    ___T: ::fidl_next::Transport,
7683{
7684    async fn on_event(
7685        handler: &mut ___H,
7686        mut message: ::fidl_next::Message<___T>,
7687    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7688        match *message.header().ordinal {
7689            ordinal => {
7690                handler.on_unknown_interaction(ordinal).await;
7691                if ::core::matches!(
7692                    message.header().flexibility(),
7693                    ::fidl_next::protocol::Flexibility::Strict
7694                ) {
7695                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7696                } else {
7697                    Ok(())
7698                }
7699            }
7700        }
7701    }
7702}
7703
7704/// A server handler for the LogFlusher protocol.
7705///
7706/// See [`LogFlusher`] for more details.
7707pub trait LogFlusherServerHandler<
7708    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7709    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7710>
7711{
7712    #[doc = " Flushes all pending logs through the logging pipeline\n to the serial port. Logs written to sockets prior to\n the call to Flush are guaranteed to be fully written\n to serial when this returns. Logs written to sockets\n after this call has been received by Archivist are\n not guaranteed to be flushed.\n Additionally, sockets must actually be connected to the Archivist\n before this call is made. If a socket hasn\'t been\n received by Archivist yet, those logs may be dropped.\n To ensure that logs are properly flushed, make sure\n to wait for the initial interest when logging.\n Important note: This may be called from the host,\n but host sockets will NOT be flushed by this method.\n If you write data from the host (not on the device,\n there is no guarantee that such logs will ever be printed).\n"]
7713    fn wait_until_flushed(
7714        &mut self,
7715
7716        responder: ::fidl_next::Responder<log_flusher::WaitUntilFlushed, ___T>,
7717    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7718
7719    fn on_unknown_interaction(
7720        &mut self,
7721        ordinal: u64,
7722    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7723        ::core::future::ready(())
7724    }
7725}
7726
7727impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for LogFlusher
7728where
7729    ___H: LogFlusherServerHandler<___T> + ::core::marker::Send,
7730    ___T: ::fidl_next::Transport,
7731{
7732    async fn on_one_way(
7733        handler: &mut ___H,
7734        mut message: ::fidl_next::Message<___T>,
7735    ) -> ::core::result::Result<
7736        (),
7737        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7738    > {
7739        match *message.header().ordinal {
7740            ordinal => {
7741                handler.on_unknown_interaction(ordinal).await;
7742                if ::core::matches!(
7743                    message.header().flexibility(),
7744                    ::fidl_next::protocol::Flexibility::Strict
7745                ) {
7746                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7747                } else {
7748                    Ok(())
7749                }
7750            }
7751        }
7752    }
7753
7754    async fn on_two_way(
7755        handler: &mut ___H,
7756        mut message: ::fidl_next::Message<___T>,
7757        responder: ::fidl_next::protocol::Responder<___T>,
7758    ) -> ::core::result::Result<
7759        (),
7760        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7761    > {
7762        match *message.header().ordinal {
7763            9062519182019824475 => {
7764                let responder = ::fidl_next::Responder::from_untyped(responder);
7765
7766                handler.wait_until_flushed(responder).await;
7767                Ok(())
7768            }
7769
7770            ordinal => {
7771                handler.on_unknown_interaction(ordinal).await;
7772                if ::core::matches!(
7773                    message.header().flexibility(),
7774                    ::fidl_next::protocol::Flexibility::Strict
7775                ) {
7776                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7777                } else {
7778                    responder
7779                        .respond_framework_error(
7780                            ordinal,
7781                            ::fidl_next::FrameworkError::UnknownMethod,
7782                        )
7783                        .expect("encoding a framework error should never fail")
7784                        .await?;
7785                    Ok(())
7786                }
7787            }
7788        }
7789    }
7790}
7791
7792impl<___T> LogFlusherClientHandler<___T> for ::fidl_next::IgnoreEvents
7793where
7794    ___T: ::fidl_next::Transport,
7795{
7796    async fn on_unknown_interaction(&mut self, _: u64) {}
7797}
7798
7799impl<___H, ___T> LogFlusherLocalClientHandler<___T> for ::fidl_next::Local<___H>
7800where
7801    ___H: LogFlusherClientHandler<___T>,
7802    ___T: ::fidl_next::Transport,
7803{
7804    async fn on_unknown_interaction(&mut self, ordinal: u64) {
7805        ___H::on_unknown_interaction(&mut self.0, ordinal).await
7806    }
7807}
7808
7809impl<___H, ___T> LogFlusherLocalServerHandler<___T> for ::fidl_next::Local<___H>
7810where
7811    ___H: LogFlusherServerHandler<___T>,
7812    ___T: ::fidl_next::Transport,
7813{
7814    async fn wait_until_flushed(
7815        &mut self,
7816
7817        responder: ::fidl_next::Responder<log_flusher::WaitUntilFlushed, ___T>,
7818    ) {
7819        ___H::wait_until_flushed(&mut self.0, responder).await
7820    }
7821
7822    async fn on_unknown_interaction(&mut self, ordinal: u64) {
7823        ___H::on_unknown_interaction(&mut self.0, ordinal).await
7824    }
7825}
7826
7827#[doc = " Max number of LogInterestSelectors that can be specified via a listener.\n"]
7828pub const MAX_LOG_SELECTORS: u8 = 64 as u8;
7829
7830/// The type corresponding to the LogSettings protocol.
7831#[doc = " This protocol allows clients to modify the logging behavior of components\n in the system.\n"]
7832#[derive(PartialEq, Debug)]
7833pub struct LogSettings;
7834
7835impl ::fidl_next::Discoverable for LogSettings {
7836    const PROTOCOL_NAME: &'static str = "fuchsia.diagnostics.LogSettings";
7837}
7838
7839#[cfg(target_os = "fuchsia")]
7840impl ::fidl_next::HasTransport for LogSettings {
7841    type Transport = ::fidl_next::fuchsia::zx::Channel;
7842}
7843
7844pub mod log_settings {
7845    pub mod prelude {
7846        pub use crate::{
7847            LogSettings, LogSettingsClientHandler, LogSettingsLocalClientHandler,
7848            LogSettingsLocalServerHandler, LogSettingsServerHandler, log_settings,
7849        };
7850
7851        pub use crate::natural::LogSettingsSetComponentInterestRequest;
7852    }
7853
7854    pub struct SetComponentInterest;
7855
7856    impl ::fidl_next::Method for SetComponentInterest {
7857        const ORDINAL: u64 = 3888577134564210369;
7858        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7859            ::fidl_next::protocol::Flexibility::Strict;
7860
7861        type Protocol = crate::LogSettings;
7862
7863        type Request = crate::wire::LogSettingsSetComponentInterestRequest<'static>;
7864    }
7865
7866    impl ::fidl_next::TwoWayMethod for SetComponentInterest {
7867        type Response = ::fidl_next::wire::Strict<::fidl_next::wire::EmptyMessageBody>;
7868    }
7869
7870    impl<___R> ::fidl_next::Respond<___R> for SetComponentInterest {
7871        type Output = ::fidl_next::Strict<___R>;
7872
7873        fn respond(response: ___R) -> Self::Output {
7874            ::fidl_next::Strict(response)
7875        }
7876    }
7877
7878    mod ___detail {
7879        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::LogSettings
7880        where
7881            ___T: ::fidl_next::Transport,
7882        {
7883            type Client = LogSettingsClient<___T>;
7884            type Server = LogSettingsServer<___T>;
7885        }
7886
7887        /// The client for the `LogSettings` protocol.
7888        #[repr(transparent)]
7889        pub struct LogSettingsClient<___T: ::fidl_next::Transport> {
7890            #[allow(dead_code)]
7891            client: ::fidl_next::protocol::Client<___T>,
7892        }
7893
7894        impl<___T> LogSettingsClient<___T>
7895        where
7896            ___T: ::fidl_next::Transport,
7897        {
7898            #[doc = " Requests a change in interest for the matched components.\n\n Each component holds a set of requested interests.\n\n When a new request on LogSettings#SetComponentInterest is received,\n the sets for matched components receive the new minimum interest.\n If the interest is less than the previous minimum interest, then a\n `SetComponentInterest` request is sent with the new minimum interest.\n\n If a connection to `LogSettings` sends another `SetComponentInterest`\n request, its previous interest request will be undone.\n\n When the connection to `LogSettings` is finished, the interests are\n undone, unless persist is set to true. Each matched component minimum\n interest is updated with the new minimum interest in the set.\n"]
7899            pub fn set_component_interest_with<___R>(
7900                &self,
7901                request: ___R,
7902            ) -> ::fidl_next::TwoWayFuture<'_, super::SetComponentInterest, ___T>
7903            where
7904                ___R: ::fidl_next::Encode<
7905                        crate::wire::LogSettingsSetComponentInterestRequest<'static>,
7906                        <___T as ::fidl_next::Transport>::SendBuffer,
7907                    >,
7908            {
7909                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7910                    3888577134564210369,
7911                    <super::SetComponentInterest as ::fidl_next::Method>::FLEXIBILITY,
7912                    request,
7913                ))
7914            }
7915        }
7916
7917        /// The server for the `LogSettings` protocol.
7918        #[repr(transparent)]
7919        pub struct LogSettingsServer<___T: ::fidl_next::Transport> {
7920            server: ::fidl_next::protocol::Server<___T>,
7921        }
7922
7923        impl<___T> LogSettingsServer<___T> where ___T: ::fidl_next::Transport {}
7924    }
7925}
7926
7927#[diagnostic::on_unimplemented(
7928    note = "If {Self} implements the non-local LogSettingsClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
7929)]
7930
7931/// A client handler for the LogSettings protocol.
7932///
7933/// See [`LogSettings`] for more details.
7934pub trait LogSettingsLocalClientHandler<
7935    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7936    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7937>
7938{
7939}
7940
7941impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for LogSettings
7942where
7943    ___H: LogSettingsLocalClientHandler<___T>,
7944    ___T: ::fidl_next::Transport,
7945{
7946    async fn on_event(
7947        handler: &mut ___H,
7948        mut message: ::fidl_next::Message<___T>,
7949    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7950        match *message.header().ordinal {
7951            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7952        }
7953    }
7954}
7955
7956#[diagnostic::on_unimplemented(
7957    note = "If {Self} implements the non-local LogSettingsServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
7958)]
7959
7960/// A server handler for the LogSettings protocol.
7961///
7962/// See [`LogSettings`] for more details.
7963pub trait LogSettingsLocalServerHandler<
7964    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7965    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7966>
7967{
7968    #[doc = " Requests a change in interest for the matched components.\n\n Each component holds a set of requested interests.\n\n When a new request on LogSettings#SetComponentInterest is received,\n the sets for matched components receive the new minimum interest.\n If the interest is less than the previous minimum interest, then a\n `SetComponentInterest` request is sent with the new minimum interest.\n\n If a connection to `LogSettings` sends another `SetComponentInterest`\n request, its previous interest request will be undone.\n\n When the connection to `LogSettings` is finished, the interests are\n undone, unless persist is set to true. Each matched component minimum\n interest is updated with the new minimum interest in the set.\n"]
7969    fn set_component_interest(
7970        &mut self,
7971
7972        request: ::fidl_next::Request<log_settings::SetComponentInterest, ___T>,
7973
7974        responder: ::fidl_next::Responder<log_settings::SetComponentInterest, ___T>,
7975    ) -> impl ::core::future::Future<Output = ()>;
7976}
7977
7978impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for LogSettings
7979where
7980    ___H: LogSettingsLocalServerHandler<___T>,
7981    ___T: ::fidl_next::Transport,
7982    for<'de> crate::wire::LogSettingsSetComponentInterestRequest<'de>: ::fidl_next::Decode<
7983            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7984            Constraint = (),
7985        >,
7986{
7987    async fn on_one_way(
7988        handler: &mut ___H,
7989        mut message: ::fidl_next::Message<___T>,
7990    ) -> ::core::result::Result<
7991        (),
7992        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7993    > {
7994        match *message.header().ordinal {
7995            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
7996        }
7997    }
7998
7999    async fn on_two_way(
8000        handler: &mut ___H,
8001        mut message: ::fidl_next::Message<___T>,
8002        responder: ::fidl_next::protocol::Responder<___T>,
8003    ) -> ::core::result::Result<
8004        (),
8005        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8006    > {
8007        match *message.header().ordinal {
8008            3888577134564210369 => {
8009                let responder = ::fidl_next::Responder::from_untyped(responder);
8010
8011                match ::fidl_next::AsDecoderExt::into_decoded(message) {
8012                    Ok(decoded) => {
8013                        handler
8014                            .set_component_interest(
8015                                ::fidl_next::Request::from_decoded(decoded),
8016                                responder,
8017                            )
8018                            .await;
8019                        Ok(())
8020                    }
8021                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8022                        ordinal: 3888577134564210369,
8023                        error,
8024                    }),
8025                }
8026            }
8027
8028            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8029        }
8030    }
8031}
8032
8033/// A client handler for the LogSettings protocol.
8034///
8035/// See [`LogSettings`] for more details.
8036pub trait LogSettingsClientHandler<
8037    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8038    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8039>
8040{
8041}
8042
8043impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for LogSettings
8044where
8045    ___H: LogSettingsClientHandler<___T> + ::core::marker::Send,
8046    ___T: ::fidl_next::Transport,
8047{
8048    async fn on_event(
8049        handler: &mut ___H,
8050        mut message: ::fidl_next::Message<___T>,
8051    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8052        match *message.header().ordinal {
8053            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8054        }
8055    }
8056}
8057
8058/// A server handler for the LogSettings protocol.
8059///
8060/// See [`LogSettings`] for more details.
8061pub trait LogSettingsServerHandler<
8062    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8063    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8064>
8065{
8066    #[doc = " Requests a change in interest for the matched components.\n\n Each component holds a set of requested interests.\n\n When a new request on LogSettings#SetComponentInterest is received,\n the sets for matched components receive the new minimum interest.\n If the interest is less than the previous minimum interest, then a\n `SetComponentInterest` request is sent with the new minimum interest.\n\n If a connection to `LogSettings` sends another `SetComponentInterest`\n request, its previous interest request will be undone.\n\n When the connection to `LogSettings` is finished, the interests are\n undone, unless persist is set to true. Each matched component minimum\n interest is updated with the new minimum interest in the set.\n"]
8067    fn set_component_interest(
8068        &mut self,
8069
8070        request: ::fidl_next::Request<log_settings::SetComponentInterest, ___T>,
8071
8072        responder: ::fidl_next::Responder<log_settings::SetComponentInterest, ___T>,
8073    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8074}
8075
8076impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for LogSettings
8077where
8078    ___H: LogSettingsServerHandler<___T> + ::core::marker::Send,
8079    ___T: ::fidl_next::Transport,
8080    for<'de> crate::wire::LogSettingsSetComponentInterestRequest<'de>: ::fidl_next::Decode<
8081            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8082            Constraint = (),
8083        >,
8084{
8085    async fn on_one_way(
8086        handler: &mut ___H,
8087        mut message: ::fidl_next::Message<___T>,
8088    ) -> ::core::result::Result<
8089        (),
8090        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8091    > {
8092        match *message.header().ordinal {
8093            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8094        }
8095    }
8096
8097    async fn on_two_way(
8098        handler: &mut ___H,
8099        mut message: ::fidl_next::Message<___T>,
8100        responder: ::fidl_next::protocol::Responder<___T>,
8101    ) -> ::core::result::Result<
8102        (),
8103        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8104    > {
8105        match *message.header().ordinal {
8106            3888577134564210369 => {
8107                let responder = ::fidl_next::Responder::from_untyped(responder);
8108
8109                match ::fidl_next::AsDecoderExt::into_decoded(message) {
8110                    Ok(decoded) => {
8111                        handler
8112                            .set_component_interest(
8113                                ::fidl_next::Request::from_decoded(decoded),
8114                                responder,
8115                            )
8116                            .await;
8117                        Ok(())
8118                    }
8119                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8120                        ordinal: 3888577134564210369,
8121                        error,
8122                    }),
8123                }
8124            }
8125
8126            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
8127        }
8128    }
8129}
8130
8131impl<___T> LogSettingsClientHandler<___T> for ::fidl_next::IgnoreEvents where
8132    ___T: ::fidl_next::Transport
8133{
8134}
8135
8136impl<___H, ___T> LogSettingsLocalClientHandler<___T> for ::fidl_next::Local<___H>
8137where
8138    ___H: LogSettingsClientHandler<___T>,
8139    ___T: ::fidl_next::Transport,
8140{
8141}
8142
8143impl<___H, ___T> LogSettingsLocalServerHandler<___T> for ::fidl_next::Local<___H>
8144where
8145    ___H: LogSettingsServerHandler<___T>,
8146    ___T: ::fidl_next::Transport,
8147{
8148    async fn set_component_interest(
8149        &mut self,
8150
8151        request: ::fidl_next::Request<log_settings::SetComponentInterest, ___T>,
8152
8153        responder: ::fidl_next::Responder<log_settings::SetComponentInterest, ___T>,
8154    ) {
8155        ___H::set_component_interest(&mut self.0, request, responder).await
8156    }
8157}
8158
8159#[doc = " The maximum number of parameters that can be sent in one `Set` call.\n"]
8160pub const MAX_SAMPLE_PARAMETERS_PER_SET: u64 = 100 as u64;
8161
8162pub const MONIKER_ARG_NAME: &str = "$__moniker";
8163
8164pub const ROLLED_OUT_ARG_NAME: &str = "$__rolled_out";