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