Skip to main content

fidl_next_common_fuchsia_logger/
fidl_next_common_fuchsia_logger.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8    #[repr(u32)]
9    pub enum InterestChangeError {
10        CalledTwice = 1,
11    }
12    impl ::core::convert::TryFrom<u32> for InterestChangeError {
13        type Error = ::fidl_next::UnknownStrictEnumMemberError;
14        fn try_from(
15            value: u32,
16        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
17            match value {
18                1 => Ok(Self::CalledTwice),
19
20                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
21            }
22        }
23    }
24
25    impl ::std::convert::From<InterestChangeError> for u32 {
26        fn from(value: InterestChangeError) -> Self {
27            match value {
28                InterestChangeError::CalledTwice => 1,
29            }
30        }
31    }
32
33    unsafe impl<___E> ::fidl_next::Encode<crate::wire::InterestChangeError, ___E>
34        for InterestChangeError
35    where
36        ___E: ?Sized,
37    {
38        #[inline]
39        fn encode(
40            self,
41            encoder: &mut ___E,
42            out: &mut ::core::mem::MaybeUninit<crate::wire::InterestChangeError>,
43            _: (),
44        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
45            ::fidl_next::Encode::encode(&self, encoder, out, ())
46        }
47    }
48
49    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::InterestChangeError, ___E>
50        for &'a InterestChangeError
51    where
52        ___E: ?Sized,
53    {
54        #[inline]
55        fn encode(
56            self,
57            encoder: &mut ___E,
58            out: &mut ::core::mem::MaybeUninit<crate::wire::InterestChangeError>,
59            _: (),
60        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
61            ::fidl_next::munge!(let crate::wire::InterestChangeError { value } = out);
62            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
63                InterestChangeError::CalledTwice => 1,
64            }));
65
66            Ok(())
67        }
68    }
69
70    impl ::core::convert::From<crate::wire::InterestChangeError> for InterestChangeError {
71        fn from(wire: crate::wire::InterestChangeError) -> Self {
72            match u32::from(wire.value) {
73                1 => Self::CalledTwice,
74
75                _ => unsafe { ::core::hint::unreachable_unchecked() },
76            }
77        }
78    }
79
80    impl ::fidl_next::FromWire<crate::wire::InterestChangeError> for InterestChangeError {
81        #[inline]
82        fn from_wire(wire: crate::wire::InterestChangeError) -> Self {
83            Self::from(wire)
84        }
85    }
86
87    impl ::fidl_next::FromWireRef<crate::wire::InterestChangeError> for InterestChangeError {
88        #[inline]
89        fn from_wire_ref(wire: &crate::wire::InterestChangeError) -> Self {
90            Self::from(*wire)
91        }
92    }
93
94    #[doc = " Log levels used with log related filtering.\n Filtering uses a heuristic based on a threshold of\n minimum severity level - with any log equal to or\n greater than the threshold being included in the\n printable logs.\n"]
95    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
96    #[repr(i8)]
97    pub enum LogLevelFilter {
98        Trace = 16,
99        Debug = 32,
100        Info = 48,
101        Warn = 64,
102        Error = 80,
103        Fatal = 96,
104        None = 127,
105    }
106    impl ::core::convert::TryFrom<i8> for LogLevelFilter {
107        type Error = ::fidl_next::UnknownStrictEnumMemberError;
108        fn try_from(
109            value: i8,
110        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
111            match value {
112                16 => Ok(Self::Trace),
113                32 => Ok(Self::Debug),
114                48 => Ok(Self::Info),
115                64 => Ok(Self::Warn),
116                80 => Ok(Self::Error),
117                96 => Ok(Self::Fatal),
118                127 => Ok(Self::None),
119
120                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
121            }
122        }
123    }
124
125    impl ::std::convert::From<LogLevelFilter> for i8 {
126        fn from(value: LogLevelFilter) -> Self {
127            match value {
128                LogLevelFilter::Trace => 16,
129                LogLevelFilter::Debug => 32,
130                LogLevelFilter::Info => 48,
131                LogLevelFilter::Warn => 64,
132                LogLevelFilter::Error => 80,
133                LogLevelFilter::Fatal => 96,
134                LogLevelFilter::None => 127,
135            }
136        }
137    }
138
139    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogLevelFilter, ___E> for LogLevelFilter
140    where
141        ___E: ?Sized,
142    {
143        #[inline]
144        fn encode(
145            self,
146            encoder: &mut ___E,
147            out: &mut ::core::mem::MaybeUninit<crate::wire::LogLevelFilter>,
148            _: (),
149        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
150            ::fidl_next::Encode::encode(&self, encoder, out, ())
151        }
152    }
153
154    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LogLevelFilter, ___E> for &'a LogLevelFilter
155    where
156        ___E: ?Sized,
157    {
158        #[inline]
159        fn encode(
160            self,
161            encoder: &mut ___E,
162            out: &mut ::core::mem::MaybeUninit<crate::wire::LogLevelFilter>,
163            _: (),
164        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
165            ::fidl_next::munge!(let crate::wire::LogLevelFilter { value } = out);
166            let _ = value.write(i8::from(match *self {
167                LogLevelFilter::Trace => 16,
168
169                LogLevelFilter::Debug => 32,
170
171                LogLevelFilter::Info => 48,
172
173                LogLevelFilter::Warn => 64,
174
175                LogLevelFilter::Error => 80,
176
177                LogLevelFilter::Fatal => 96,
178
179                LogLevelFilter::None => 127,
180            }));
181
182            Ok(())
183        }
184    }
185
186    impl ::core::convert::From<crate::wire::LogLevelFilter> for LogLevelFilter {
187        fn from(wire: crate::wire::LogLevelFilter) -> Self {
188            match i8::from(wire.value) {
189                16 => Self::Trace,
190
191                32 => Self::Debug,
192
193                48 => Self::Info,
194
195                64 => Self::Warn,
196
197                80 => Self::Error,
198
199                96 => Self::Fatal,
200
201                127 => Self::None,
202
203                _ => unsafe { ::core::hint::unreachable_unchecked() },
204            }
205        }
206    }
207
208    impl ::fidl_next::FromWire<crate::wire::LogLevelFilter> for LogLevelFilter {
209        #[inline]
210        fn from_wire(wire: crate::wire::LogLevelFilter) -> Self {
211            Self::from(wire)
212        }
213    }
214
215    impl ::fidl_next::FromWireRef<crate::wire::LogLevelFilter> for LogLevelFilter {
216        #[inline]
217        fn from_wire_ref(wire: &crate::wire::LogLevelFilter) -> Self {
218            Self::from(*wire)
219        }
220    }
221
222    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
223    pub struct LogFilterOptions {
224        pub filter_by_pid: bool,
225
226        pub pid: u64,
227
228        pub filter_by_tid: bool,
229
230        pub tid: u64,
231
232        pub verbosity: u8,
233
234        pub min_severity: crate::natural::LogLevelFilter,
235
236        pub tags: ::std::vec::Vec<::std::string::String>,
237    }
238
239    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogFilterOptions<'static>, ___E>
240        for LogFilterOptions
241    where
242        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
243        ___E: ::fidl_next::Encoder,
244    {
245        #[inline]
246        fn encode(
247            self,
248            encoder_: &mut ___E,
249            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogFilterOptions<'static>>,
250            _: (),
251        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
252            ::fidl_next::munge! {
253                let crate::wire::LogFilterOptions {
254                    filter_by_pid,
255                    pid,
256                    filter_by_tid,
257                    tid,
258                    verbosity,
259                    min_severity,
260                    tags,
261
262                } = out_;
263            }
264
265            ::fidl_next::Encode::encode(self.filter_by_pid, encoder_, filter_by_pid, ())?;
266
267            let mut _field =
268                unsafe { ::fidl_next::Slot::new_unchecked(filter_by_pid.as_mut_ptr()) };
269
270            ::fidl_next::Encode::encode(self.pid, encoder_, pid, ())?;
271
272            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pid.as_mut_ptr()) };
273
274            ::fidl_next::Encode::encode(self.filter_by_tid, encoder_, filter_by_tid, ())?;
275
276            let mut _field =
277                unsafe { ::fidl_next::Slot::new_unchecked(filter_by_tid.as_mut_ptr()) };
278
279            ::fidl_next::Encode::encode(self.tid, encoder_, tid, ())?;
280
281            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tid.as_mut_ptr()) };
282
283            ::fidl_next::Encode::encode(self.verbosity, encoder_, verbosity, ())?;
284
285            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(verbosity.as_mut_ptr()) };
286
287            ::fidl_next::Encode::encode(self.min_severity, encoder_, min_severity, ())?;
288
289            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(min_severity.as_mut_ptr()) };
290
291            ::fidl_next::Encode::encode(self.tags, encoder_, tags, (16, 63))?;
292
293            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tags.as_mut_ptr()) };
294            ::fidl_next::Constrained::validate(_field, (16, 63))?;
295
296            Ok(())
297        }
298    }
299
300    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LogFilterOptions<'static>, ___E>
301        for &'a LogFilterOptions
302    where
303        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
304        ___E: ::fidl_next::Encoder,
305    {
306        #[inline]
307        fn encode(
308            self,
309            encoder_: &mut ___E,
310            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogFilterOptions<'static>>,
311            _: (),
312        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
313            ::fidl_next::munge! {
314                let crate::wire::LogFilterOptions {
315                    filter_by_pid,
316                    pid,
317                    filter_by_tid,
318                    tid,
319                    verbosity,
320                    min_severity,
321                    tags,
322
323                } = out_;
324            }
325
326            ::fidl_next::Encode::encode(&self.filter_by_pid, encoder_, filter_by_pid, ())?;
327
328            let mut _field =
329                unsafe { ::fidl_next::Slot::new_unchecked(filter_by_pid.as_mut_ptr()) };
330
331            ::fidl_next::Encode::encode(&self.pid, encoder_, pid, ())?;
332
333            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pid.as_mut_ptr()) };
334
335            ::fidl_next::Encode::encode(&self.filter_by_tid, encoder_, filter_by_tid, ())?;
336
337            let mut _field =
338                unsafe { ::fidl_next::Slot::new_unchecked(filter_by_tid.as_mut_ptr()) };
339
340            ::fidl_next::Encode::encode(&self.tid, encoder_, tid, ())?;
341
342            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tid.as_mut_ptr()) };
343
344            ::fidl_next::Encode::encode(&self.verbosity, encoder_, verbosity, ())?;
345
346            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(verbosity.as_mut_ptr()) };
347
348            ::fidl_next::Encode::encode(&self.min_severity, encoder_, min_severity, ())?;
349
350            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(min_severity.as_mut_ptr()) };
351
352            ::fidl_next::Encode::encode(&self.tags, encoder_, tags, (16, 63))?;
353
354            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tags.as_mut_ptr()) };
355            ::fidl_next::Constrained::validate(_field, (16, 63))?;
356
357            Ok(())
358        }
359    }
360
361    unsafe impl<___E>
362        ::fidl_next::EncodeOption<
363            ::fidl_next::wire::Box<'static, crate::wire::LogFilterOptions<'static>>,
364            ___E,
365        > for LogFilterOptions
366    where
367        ___E: ::fidl_next::Encoder + ?Sized,
368        LogFilterOptions: ::fidl_next::Encode<crate::wire::LogFilterOptions<'static>, ___E>,
369    {
370        #[inline]
371        fn encode_option(
372            this: ::core::option::Option<Self>,
373            encoder: &mut ___E,
374            out: &mut ::core::mem::MaybeUninit<
375                ::fidl_next::wire::Box<'static, crate::wire::LogFilterOptions<'static>>,
376            >,
377            _: (),
378        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
379            if let Some(inner) = this {
380                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
381                ::fidl_next::wire::Box::encode_present(out);
382            } else {
383                ::fidl_next::wire::Box::encode_absent(out);
384            }
385
386            Ok(())
387        }
388    }
389
390    unsafe impl<'a, ___E>
391        ::fidl_next::EncodeOption<
392            ::fidl_next::wire::Box<'static, crate::wire::LogFilterOptions<'static>>,
393            ___E,
394        > for &'a LogFilterOptions
395    where
396        ___E: ::fidl_next::Encoder + ?Sized,
397        &'a LogFilterOptions: ::fidl_next::Encode<crate::wire::LogFilterOptions<'static>, ___E>,
398    {
399        #[inline]
400        fn encode_option(
401            this: ::core::option::Option<Self>,
402            encoder: &mut ___E,
403            out: &mut ::core::mem::MaybeUninit<
404                ::fidl_next::wire::Box<'static, crate::wire::LogFilterOptions<'static>>,
405            >,
406            _: (),
407        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
408            if let Some(inner) = this {
409                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
410                ::fidl_next::wire::Box::encode_present(out);
411            } else {
412                ::fidl_next::wire::Box::encode_absent(out);
413            }
414
415            Ok(())
416        }
417    }
418
419    impl<'de> ::fidl_next::FromWire<crate::wire::LogFilterOptions<'de>> for LogFilterOptions {
420        #[inline]
421        fn from_wire(wire: crate::wire::LogFilterOptions<'de>) -> Self {
422            Self {
423                filter_by_pid: ::fidl_next::FromWire::from_wire(wire.filter_by_pid),
424
425                pid: ::fidl_next::FromWire::from_wire(wire.pid),
426
427                filter_by_tid: ::fidl_next::FromWire::from_wire(wire.filter_by_tid),
428
429                tid: ::fidl_next::FromWire::from_wire(wire.tid),
430
431                verbosity: ::fidl_next::FromWire::from_wire(wire.verbosity),
432
433                min_severity: ::fidl_next::FromWire::from_wire(wire.min_severity),
434
435                tags: ::fidl_next::FromWire::from_wire(wire.tags),
436            }
437        }
438    }
439
440    impl<'de> ::fidl_next::FromWireRef<crate::wire::LogFilterOptions<'de>> for LogFilterOptions {
441        #[inline]
442        fn from_wire_ref(wire: &crate::wire::LogFilterOptions<'de>) -> Self {
443            Self {
444                filter_by_pid: ::fidl_next::FromWireRef::from_wire_ref(&wire.filter_by_pid),
445
446                pid: ::fidl_next::FromWireRef::from_wire_ref(&wire.pid),
447
448                filter_by_tid: ::fidl_next::FromWireRef::from_wire_ref(&wire.filter_by_tid),
449
450                tid: ::fidl_next::FromWireRef::from_wire_ref(&wire.tid),
451
452                verbosity: ::fidl_next::FromWireRef::from_wire_ref(&wire.verbosity),
453
454                min_severity: ::fidl_next::FromWireRef::from_wire_ref(&wire.min_severity),
455
456                tags: ::fidl_next::FromWireRef::from_wire_ref(&wire.tags),
457            }
458        }
459    }
460
461    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
462    pub struct LogMessage {
463        pub pid: u64,
464
465        pub tid: u64,
466
467        pub time: i64,
468
469        pub severity: i32,
470
471        pub dropped_logs: u32,
472
473        pub tags: ::std::vec::Vec<::std::string::String>,
474
475        pub msg: ::std::string::String,
476    }
477
478    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogMessage<'static>, ___E> for LogMessage
479    where
480        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
481        ___E: ::fidl_next::Encoder,
482    {
483        #[inline]
484        fn encode(
485            self,
486            encoder_: &mut ___E,
487            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogMessage<'static>>,
488            _: (),
489        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
490            ::fidl_next::munge! {
491                let crate::wire::LogMessage {
492                    pid,
493                    tid,
494                    time,
495                    severity,
496                    dropped_logs,
497                    tags,
498                    msg,
499
500                } = out_;
501            }
502
503            ::fidl_next::Encode::encode(self.pid, encoder_, pid, ())?;
504
505            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pid.as_mut_ptr()) };
506
507            ::fidl_next::Encode::encode(self.tid, encoder_, tid, ())?;
508
509            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tid.as_mut_ptr()) };
510
511            ::fidl_next::Encode::encode(self.time, encoder_, time, ())?;
512
513            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(time.as_mut_ptr()) };
514
515            ::fidl_next::Encode::encode(self.severity, encoder_, severity, ())?;
516
517            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(severity.as_mut_ptr()) };
518
519            ::fidl_next::Encode::encode(self.dropped_logs, encoder_, dropped_logs, ())?;
520
521            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dropped_logs.as_mut_ptr()) };
522
523            ::fidl_next::Encode::encode(self.tags, encoder_, tags, (5, 63))?;
524
525            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tags.as_mut_ptr()) };
526            ::fidl_next::Constrained::validate(_field, (5, 63))?;
527
528            ::fidl_next::Encode::encode(self.msg, encoder_, msg, 32768)?;
529
530            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(msg.as_mut_ptr()) };
531            ::fidl_next::Constrained::validate(_field, 32768)?;
532
533            Ok(())
534        }
535    }
536
537    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LogMessage<'static>, ___E> for &'a LogMessage
538    where
539        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
540        ___E: ::fidl_next::Encoder,
541    {
542        #[inline]
543        fn encode(
544            self,
545            encoder_: &mut ___E,
546            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogMessage<'static>>,
547            _: (),
548        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
549            ::fidl_next::munge! {
550                let crate::wire::LogMessage {
551                    pid,
552                    tid,
553                    time,
554                    severity,
555                    dropped_logs,
556                    tags,
557                    msg,
558
559                } = out_;
560            }
561
562            ::fidl_next::Encode::encode(&self.pid, encoder_, pid, ())?;
563
564            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pid.as_mut_ptr()) };
565
566            ::fidl_next::Encode::encode(&self.tid, encoder_, tid, ())?;
567
568            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tid.as_mut_ptr()) };
569
570            ::fidl_next::Encode::encode(&self.time, encoder_, time, ())?;
571
572            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(time.as_mut_ptr()) };
573
574            ::fidl_next::Encode::encode(&self.severity, encoder_, severity, ())?;
575
576            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(severity.as_mut_ptr()) };
577
578            ::fidl_next::Encode::encode(&self.dropped_logs, encoder_, dropped_logs, ())?;
579
580            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dropped_logs.as_mut_ptr()) };
581
582            ::fidl_next::Encode::encode(&self.tags, encoder_, tags, (5, 63))?;
583
584            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(tags.as_mut_ptr()) };
585            ::fidl_next::Constrained::validate(_field, (5, 63))?;
586
587            ::fidl_next::Encode::encode(&self.msg, encoder_, msg, 32768)?;
588
589            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(msg.as_mut_ptr()) };
590            ::fidl_next::Constrained::validate(_field, 32768)?;
591
592            Ok(())
593        }
594    }
595
596    unsafe impl<___E>
597        ::fidl_next::EncodeOption<
598            ::fidl_next::wire::Box<'static, crate::wire::LogMessage<'static>>,
599            ___E,
600        > for LogMessage
601    where
602        ___E: ::fidl_next::Encoder + ?Sized,
603        LogMessage: ::fidl_next::Encode<crate::wire::LogMessage<'static>, ___E>,
604    {
605        #[inline]
606        fn encode_option(
607            this: ::core::option::Option<Self>,
608            encoder: &mut ___E,
609            out: &mut ::core::mem::MaybeUninit<
610                ::fidl_next::wire::Box<'static, crate::wire::LogMessage<'static>>,
611            >,
612            _: (),
613        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
614            if let Some(inner) = this {
615                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
616                ::fidl_next::wire::Box::encode_present(out);
617            } else {
618                ::fidl_next::wire::Box::encode_absent(out);
619            }
620
621            Ok(())
622        }
623    }
624
625    unsafe impl<'a, ___E>
626        ::fidl_next::EncodeOption<
627            ::fidl_next::wire::Box<'static, crate::wire::LogMessage<'static>>,
628            ___E,
629        > for &'a LogMessage
630    where
631        ___E: ::fidl_next::Encoder + ?Sized,
632        &'a LogMessage: ::fidl_next::Encode<crate::wire::LogMessage<'static>, ___E>,
633    {
634        #[inline]
635        fn encode_option(
636            this: ::core::option::Option<Self>,
637            encoder: &mut ___E,
638            out: &mut ::core::mem::MaybeUninit<
639                ::fidl_next::wire::Box<'static, crate::wire::LogMessage<'static>>,
640            >,
641            _: (),
642        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
643            if let Some(inner) = this {
644                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
645                ::fidl_next::wire::Box::encode_present(out);
646            } else {
647                ::fidl_next::wire::Box::encode_absent(out);
648            }
649
650            Ok(())
651        }
652    }
653
654    impl<'de> ::fidl_next::FromWire<crate::wire::LogMessage<'de>> for LogMessage {
655        #[inline]
656        fn from_wire(wire: crate::wire::LogMessage<'de>) -> Self {
657            Self {
658                pid: ::fidl_next::FromWire::from_wire(wire.pid),
659
660                tid: ::fidl_next::FromWire::from_wire(wire.tid),
661
662                time: ::fidl_next::FromWire::from_wire(wire.time),
663
664                severity: ::fidl_next::FromWire::from_wire(wire.severity),
665
666                dropped_logs: ::fidl_next::FromWire::from_wire(wire.dropped_logs),
667
668                tags: ::fidl_next::FromWire::from_wire(wire.tags),
669
670                msg: ::fidl_next::FromWire::from_wire(wire.msg),
671            }
672        }
673    }
674
675    impl<'de> ::fidl_next::FromWireRef<crate::wire::LogMessage<'de>> for LogMessage {
676        #[inline]
677        fn from_wire_ref(wire: &crate::wire::LogMessage<'de>) -> Self {
678            Self {
679                pid: ::fidl_next::FromWireRef::from_wire_ref(&wire.pid),
680
681                tid: ::fidl_next::FromWireRef::from_wire_ref(&wire.tid),
682
683                time: ::fidl_next::FromWireRef::from_wire_ref(&wire.time),
684
685                severity: ::fidl_next::FromWireRef::from_wire_ref(&wire.severity),
686
687                dropped_logs: ::fidl_next::FromWireRef::from_wire_ref(&wire.dropped_logs),
688
689                tags: ::fidl_next::FromWireRef::from_wire_ref(&wire.tags),
690
691                msg: ::fidl_next::FromWireRef::from_wire_ref(&wire.msg),
692            }
693        }
694    }
695
696    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
697    pub struct LogListenerSafeLogRequest {
698        pub log: crate::natural::LogMessage,
699    }
700
701    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogListenerSafeLogRequest<'static>, ___E>
702        for LogListenerSafeLogRequest
703    where
704        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
705        ___E: ::fidl_next::Encoder,
706    {
707        #[inline]
708        fn encode(
709            self,
710            encoder_: &mut ___E,
711            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogListenerSafeLogRequest<'static>>,
712            _: (),
713        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
714            ::fidl_next::munge! {
715                let crate::wire::LogListenerSafeLogRequest {
716                    log,
717
718                } = out_;
719            }
720
721            ::fidl_next::Encode::encode(self.log, encoder_, log, ())?;
722
723            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(log.as_mut_ptr()) };
724
725            Ok(())
726        }
727    }
728
729    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::LogListenerSafeLogRequest<'static>, ___E>
730        for &'a LogListenerSafeLogRequest
731    where
732        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
733        ___E: ::fidl_next::Encoder,
734    {
735        #[inline]
736        fn encode(
737            self,
738            encoder_: &mut ___E,
739            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogListenerSafeLogRequest<'static>>,
740            _: (),
741        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
742            ::fidl_next::munge! {
743                let crate::wire::LogListenerSafeLogRequest {
744                    log,
745
746                } = out_;
747            }
748
749            ::fidl_next::Encode::encode(&self.log, encoder_, log, ())?;
750
751            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(log.as_mut_ptr()) };
752
753            Ok(())
754        }
755    }
756
757    unsafe impl<___E>
758        ::fidl_next::EncodeOption<
759            ::fidl_next::wire::Box<'static, crate::wire::LogListenerSafeLogRequest<'static>>,
760            ___E,
761        > for LogListenerSafeLogRequest
762    where
763        ___E: ::fidl_next::Encoder + ?Sized,
764        LogListenerSafeLogRequest:
765            ::fidl_next::Encode<crate::wire::LogListenerSafeLogRequest<'static>, ___E>,
766    {
767        #[inline]
768        fn encode_option(
769            this: ::core::option::Option<Self>,
770            encoder: &mut ___E,
771            out: &mut ::core::mem::MaybeUninit<
772                ::fidl_next::wire::Box<'static, crate::wire::LogListenerSafeLogRequest<'static>>,
773            >,
774            _: (),
775        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
776            if let Some(inner) = this {
777                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
778                ::fidl_next::wire::Box::encode_present(out);
779            } else {
780                ::fidl_next::wire::Box::encode_absent(out);
781            }
782
783            Ok(())
784        }
785    }
786
787    unsafe impl<'a, ___E>
788        ::fidl_next::EncodeOption<
789            ::fidl_next::wire::Box<'static, crate::wire::LogListenerSafeLogRequest<'static>>,
790            ___E,
791        > for &'a LogListenerSafeLogRequest
792    where
793        ___E: ::fidl_next::Encoder + ?Sized,
794        &'a LogListenerSafeLogRequest:
795            ::fidl_next::Encode<crate::wire::LogListenerSafeLogRequest<'static>, ___E>,
796    {
797        #[inline]
798        fn encode_option(
799            this: ::core::option::Option<Self>,
800            encoder: &mut ___E,
801            out: &mut ::core::mem::MaybeUninit<
802                ::fidl_next::wire::Box<'static, crate::wire::LogListenerSafeLogRequest<'static>>,
803            >,
804            _: (),
805        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
806            if let Some(inner) = this {
807                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
808                ::fidl_next::wire::Box::encode_present(out);
809            } else {
810                ::fidl_next::wire::Box::encode_absent(out);
811            }
812
813            Ok(())
814        }
815    }
816
817    impl<'de> ::fidl_next::FromWire<crate::wire::LogListenerSafeLogRequest<'de>>
818        for LogListenerSafeLogRequest
819    {
820        #[inline]
821        fn from_wire(wire: crate::wire::LogListenerSafeLogRequest<'de>) -> Self {
822            Self { log: ::fidl_next::FromWire::from_wire(wire.log) }
823        }
824    }
825
826    impl<'de> ::fidl_next::FromWireRef<crate::wire::LogListenerSafeLogRequest<'de>>
827        for LogListenerSafeLogRequest
828    {
829        #[inline]
830        fn from_wire_ref(wire: &crate::wire::LogListenerSafeLogRequest<'de>) -> Self {
831            Self { log: ::fidl_next::FromWireRef::from_wire_ref(&wire.log) }
832        }
833    }
834
835    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
836    pub struct LogListenerSafeLogManyRequest {
837        pub log: ::std::vec::Vec<crate::natural::LogMessage>,
838    }
839
840    unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogListenerSafeLogManyRequest<'static>, ___E>
841        for LogListenerSafeLogManyRequest
842    where
843        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
844        ___E: ::fidl_next::Encoder,
845    {
846        #[inline]
847        fn encode(
848            self,
849            encoder_: &mut ___E,
850            out_: &mut ::core::mem::MaybeUninit<
851                crate::wire::LogListenerSafeLogManyRequest<'static>,
852            >,
853            _: (),
854        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
855            ::fidl_next::munge! {
856                let crate::wire::LogListenerSafeLogManyRequest {
857                    log,
858
859                } = out_;
860            }
861
862            ::fidl_next::Encode::encode(self.log, encoder_, log, (4294967295, ()))?;
863
864            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(log.as_mut_ptr()) };
865            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
866
867            Ok(())
868        }
869    }
870
871    unsafe impl<'a, ___E>
872        ::fidl_next::Encode<crate::wire::LogListenerSafeLogManyRequest<'static>, ___E>
873        for &'a LogListenerSafeLogManyRequest
874    where
875        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
876        ___E: ::fidl_next::Encoder,
877    {
878        #[inline]
879        fn encode(
880            self,
881            encoder_: &mut ___E,
882            out_: &mut ::core::mem::MaybeUninit<
883                crate::wire::LogListenerSafeLogManyRequest<'static>,
884            >,
885            _: (),
886        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
887            ::fidl_next::munge! {
888                let crate::wire::LogListenerSafeLogManyRequest {
889                    log,
890
891                } = out_;
892            }
893
894            ::fidl_next::Encode::encode(&self.log, encoder_, log, (4294967295, ()))?;
895
896            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(log.as_mut_ptr()) };
897            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
898
899            Ok(())
900        }
901    }
902
903    unsafe impl<___E>
904        ::fidl_next::EncodeOption<
905            ::fidl_next::wire::Box<'static, crate::wire::LogListenerSafeLogManyRequest<'static>>,
906            ___E,
907        > for LogListenerSafeLogManyRequest
908    where
909        ___E: ::fidl_next::Encoder + ?Sized,
910        LogListenerSafeLogManyRequest:
911            ::fidl_next::Encode<crate::wire::LogListenerSafeLogManyRequest<'static>, ___E>,
912    {
913        #[inline]
914        fn encode_option(
915            this: ::core::option::Option<Self>,
916            encoder: &mut ___E,
917            out: &mut ::core::mem::MaybeUninit<
918                ::fidl_next::wire::Box<
919                    'static,
920                    crate::wire::LogListenerSafeLogManyRequest<'static>,
921                >,
922            >,
923            _: (),
924        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
925            if let Some(inner) = this {
926                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
927                ::fidl_next::wire::Box::encode_present(out);
928            } else {
929                ::fidl_next::wire::Box::encode_absent(out);
930            }
931
932            Ok(())
933        }
934    }
935
936    unsafe impl<'a, ___E>
937        ::fidl_next::EncodeOption<
938            ::fidl_next::wire::Box<'static, crate::wire::LogListenerSafeLogManyRequest<'static>>,
939            ___E,
940        > for &'a LogListenerSafeLogManyRequest
941    where
942        ___E: ::fidl_next::Encoder + ?Sized,
943        &'a LogListenerSafeLogManyRequest:
944            ::fidl_next::Encode<crate::wire::LogListenerSafeLogManyRequest<'static>, ___E>,
945    {
946        #[inline]
947        fn encode_option(
948            this: ::core::option::Option<Self>,
949            encoder: &mut ___E,
950            out: &mut ::core::mem::MaybeUninit<
951                ::fidl_next::wire::Box<
952                    'static,
953                    crate::wire::LogListenerSafeLogManyRequest<'static>,
954                >,
955            >,
956            _: (),
957        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
958            if let Some(inner) = this {
959                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
960                ::fidl_next::wire::Box::encode_present(out);
961            } else {
962                ::fidl_next::wire::Box::encode_absent(out);
963            }
964
965            Ok(())
966        }
967    }
968
969    impl<'de> ::fidl_next::FromWire<crate::wire::LogListenerSafeLogManyRequest<'de>>
970        for LogListenerSafeLogManyRequest
971    {
972        #[inline]
973        fn from_wire(wire: crate::wire::LogListenerSafeLogManyRequest<'de>) -> Self {
974            Self { log: ::fidl_next::FromWire::from_wire(wire.log) }
975        }
976    }
977
978    impl<'de> ::fidl_next::FromWireRef<crate::wire::LogListenerSafeLogManyRequest<'de>>
979        for LogListenerSafeLogManyRequest
980    {
981        #[inline]
982        fn from_wire_ref(wire: &crate::wire::LogListenerSafeLogManyRequest<'de>) -> Self {
983            Self { log: ::fidl_next::FromWireRef::from_wire_ref(&wire.log) }
984        }
985    }
986
987    #[derive(Debug, Clone, PartialEq)]
988    pub struct LogSinkWaitForInterestChangeResponse {
989        pub data: ::fidl_next_common_fuchsia_diagnostics_types::natural::Interest,
990    }
991
992    unsafe impl<___E>
993        ::fidl_next::Encode<crate::wire::LogSinkWaitForInterestChangeResponse<'static>, ___E>
994        for LogSinkWaitForInterestChangeResponse
995    where
996        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
997        ___E: ::fidl_next::Encoder,
998    {
999        #[inline]
1000        fn encode(
1001            self,
1002            encoder_: &mut ___E,
1003            out_: &mut ::core::mem::MaybeUninit<
1004                crate::wire::LogSinkWaitForInterestChangeResponse<'static>,
1005            >,
1006            _: (),
1007        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1008            ::fidl_next::munge! {
1009                let crate::wire::LogSinkWaitForInterestChangeResponse {
1010                    data,
1011
1012                } = out_;
1013            }
1014
1015            ::fidl_next::Encode::encode(self.data, encoder_, data, ())?;
1016
1017            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
1018
1019            Ok(())
1020        }
1021    }
1022
1023    unsafe impl<'a, ___E>
1024        ::fidl_next::Encode<crate::wire::LogSinkWaitForInterestChangeResponse<'static>, ___E>
1025        for &'a LogSinkWaitForInterestChangeResponse
1026    where
1027        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1028        ___E: ::fidl_next::Encoder,
1029    {
1030        #[inline]
1031        fn encode(
1032            self,
1033            encoder_: &mut ___E,
1034            out_: &mut ::core::mem::MaybeUninit<
1035                crate::wire::LogSinkWaitForInterestChangeResponse<'static>,
1036            >,
1037            _: (),
1038        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1039            ::fidl_next::munge! {
1040                let crate::wire::LogSinkWaitForInterestChangeResponse {
1041                    data,
1042
1043                } = out_;
1044            }
1045
1046            ::fidl_next::Encode::encode(&self.data, encoder_, data, ())?;
1047
1048            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(data.as_mut_ptr()) };
1049
1050            Ok(())
1051        }
1052    }
1053
1054    unsafe impl<___E>
1055        ::fidl_next::EncodeOption<
1056            ::fidl_next::wire::Box<
1057                'static,
1058                crate::wire::LogSinkWaitForInterestChangeResponse<'static>,
1059            >,
1060            ___E,
1061        > for LogSinkWaitForInterestChangeResponse
1062    where
1063        ___E: ::fidl_next::Encoder + ?Sized,
1064        LogSinkWaitForInterestChangeResponse:
1065            ::fidl_next::Encode<crate::wire::LogSinkWaitForInterestChangeResponse<'static>, ___E>,
1066    {
1067        #[inline]
1068        fn encode_option(
1069            this: ::core::option::Option<Self>,
1070            encoder: &mut ___E,
1071            out: &mut ::core::mem::MaybeUninit<
1072                ::fidl_next::wire::Box<
1073                    'static,
1074                    crate::wire::LogSinkWaitForInterestChangeResponse<'static>,
1075                >,
1076            >,
1077            _: (),
1078        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1079            if let Some(inner) = this {
1080                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1081                ::fidl_next::wire::Box::encode_present(out);
1082            } else {
1083                ::fidl_next::wire::Box::encode_absent(out);
1084            }
1085
1086            Ok(())
1087        }
1088    }
1089
1090    unsafe impl<'a, ___E>
1091        ::fidl_next::EncodeOption<
1092            ::fidl_next::wire::Box<
1093                'static,
1094                crate::wire::LogSinkWaitForInterestChangeResponse<'static>,
1095            >,
1096            ___E,
1097        > for &'a LogSinkWaitForInterestChangeResponse
1098    where
1099        ___E: ::fidl_next::Encoder + ?Sized,
1100        &'a LogSinkWaitForInterestChangeResponse:
1101            ::fidl_next::Encode<crate::wire::LogSinkWaitForInterestChangeResponse<'static>, ___E>,
1102    {
1103        #[inline]
1104        fn encode_option(
1105            this: ::core::option::Option<Self>,
1106            encoder: &mut ___E,
1107            out: &mut ::core::mem::MaybeUninit<
1108                ::fidl_next::wire::Box<
1109                    'static,
1110                    crate::wire::LogSinkWaitForInterestChangeResponse<'static>,
1111                >,
1112            >,
1113            _: (),
1114        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1115            if let Some(inner) = this {
1116                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1117                ::fidl_next::wire::Box::encode_present(out);
1118            } else {
1119                ::fidl_next::wire::Box::encode_absent(out);
1120            }
1121
1122            Ok(())
1123        }
1124    }
1125
1126    impl<'de> ::fidl_next::FromWire<crate::wire::LogSinkWaitForInterestChangeResponse<'de>>
1127        for LogSinkWaitForInterestChangeResponse
1128    {
1129        #[inline]
1130        fn from_wire(wire: crate::wire::LogSinkWaitForInterestChangeResponse<'de>) -> Self {
1131            Self { data: ::fidl_next::FromWire::from_wire(wire.data) }
1132        }
1133    }
1134
1135    impl<'de> ::fidl_next::FromWireRef<crate::wire::LogSinkWaitForInterestChangeResponse<'de>>
1136        for LogSinkWaitForInterestChangeResponse
1137    {
1138        #[inline]
1139        fn from_wire_ref(wire: &crate::wire::LogSinkWaitForInterestChangeResponse<'de>) -> Self {
1140            Self { data: ::fidl_next::FromWireRef::from_wire_ref(&wire.data) }
1141        }
1142    }
1143}
1144
1145pub mod wire {
1146
1147    /// The wire type corresponding to [`InterestChangeError`].
1148    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1149    #[repr(transparent)]
1150    pub struct InterestChangeError {
1151        pub(crate) value: ::fidl_next::wire::Uint32,
1152    }
1153
1154    impl ::fidl_next::Constrained for InterestChangeError {
1155        type Constraint = ();
1156
1157        fn validate(
1158            _: ::fidl_next::Slot<'_, Self>,
1159            _: Self::Constraint,
1160        ) -> Result<(), ::fidl_next::ValidationError> {
1161            Ok(())
1162        }
1163    }
1164
1165    unsafe impl ::fidl_next::Wire for InterestChangeError {
1166        type Narrowed<'de> = Self;
1167
1168        #[inline]
1169        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1170            // Wire enums have no padding
1171        }
1172    }
1173
1174    impl InterestChangeError {
1175        pub const CALLED_TWICE: InterestChangeError =
1176            InterestChangeError { value: ::fidl_next::wire::Uint32(1) };
1177    }
1178
1179    unsafe impl<___D> ::fidl_next::Decode<___D> for InterestChangeError
1180    where
1181        ___D: ?Sized,
1182    {
1183        fn decode(
1184            slot: ::fidl_next::Slot<'_, Self>,
1185            _: &mut ___D,
1186            _: (),
1187        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1188            ::fidl_next::munge!(let Self { value } = slot);
1189
1190            match u32::from(*value) {
1191                1 => (),
1192                unknown => {
1193                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
1194                }
1195            }
1196
1197            Ok(())
1198        }
1199    }
1200
1201    impl ::core::convert::From<crate::natural::InterestChangeError> for InterestChangeError {
1202        fn from(natural: crate::natural::InterestChangeError) -> Self {
1203            match natural {
1204                crate::natural::InterestChangeError::CalledTwice => {
1205                    InterestChangeError::CALLED_TWICE
1206                }
1207            }
1208        }
1209    }
1210
1211    impl ::fidl_next::IntoNatural for InterestChangeError {
1212        type Natural = crate::natural::InterestChangeError;
1213    }
1214
1215    /// The wire type corresponding to [`LogLevelFilter`].
1216    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1217    #[repr(transparent)]
1218    pub struct LogLevelFilter {
1219        pub(crate) value: i8,
1220    }
1221
1222    impl ::fidl_next::Constrained for LogLevelFilter {
1223        type Constraint = ();
1224
1225        fn validate(
1226            _: ::fidl_next::Slot<'_, Self>,
1227            _: Self::Constraint,
1228        ) -> Result<(), ::fidl_next::ValidationError> {
1229            Ok(())
1230        }
1231    }
1232
1233    unsafe impl ::fidl_next::Wire for LogLevelFilter {
1234        type Narrowed<'de> = Self;
1235
1236        #[inline]
1237        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1238            // Wire enums have no padding
1239        }
1240    }
1241
1242    impl LogLevelFilter {
1243        pub const TRACE: LogLevelFilter = LogLevelFilter { value: 16 };
1244
1245        pub const DEBUG: LogLevelFilter = LogLevelFilter { value: 32 };
1246
1247        pub const INFO: LogLevelFilter = LogLevelFilter { value: 48 };
1248
1249        pub const WARN: LogLevelFilter = LogLevelFilter { value: 64 };
1250
1251        pub const ERROR: LogLevelFilter = LogLevelFilter { value: 80 };
1252
1253        pub const FATAL: LogLevelFilter = LogLevelFilter { value: 96 };
1254
1255        pub const NONE: LogLevelFilter = LogLevelFilter { value: 127 };
1256    }
1257
1258    unsafe impl<___D> ::fidl_next::Decode<___D> for LogLevelFilter
1259    where
1260        ___D: ?Sized,
1261    {
1262        fn decode(
1263            slot: ::fidl_next::Slot<'_, Self>,
1264            _: &mut ___D,
1265            _: (),
1266        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1267            ::fidl_next::munge!(let Self { value } = slot);
1268
1269            match i8::from(*value) {
1270                16 | 32 | 48 | 64 | 80 | 96 | 127 => (),
1271                unknown => {
1272                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
1273                }
1274            }
1275
1276            Ok(())
1277        }
1278    }
1279
1280    impl ::core::convert::From<crate::natural::LogLevelFilter> for LogLevelFilter {
1281        fn from(natural: crate::natural::LogLevelFilter) -> Self {
1282            match natural {
1283                crate::natural::LogLevelFilter::Trace => LogLevelFilter::TRACE,
1284
1285                crate::natural::LogLevelFilter::Debug => LogLevelFilter::DEBUG,
1286
1287                crate::natural::LogLevelFilter::Info => LogLevelFilter::INFO,
1288
1289                crate::natural::LogLevelFilter::Warn => LogLevelFilter::WARN,
1290
1291                crate::natural::LogLevelFilter::Error => LogLevelFilter::ERROR,
1292
1293                crate::natural::LogLevelFilter::Fatal => LogLevelFilter::FATAL,
1294
1295                crate::natural::LogLevelFilter::None => LogLevelFilter::NONE,
1296            }
1297        }
1298    }
1299
1300    impl ::fidl_next::IntoNatural for LogLevelFilter {
1301        type Natural = crate::natural::LogLevelFilter;
1302    }
1303
1304    /// The wire type corresponding to [`LogFilterOptions`].
1305    #[derive(Debug)]
1306    #[repr(C)]
1307    pub struct LogFilterOptions<'de> {
1308        pub filter_by_pid: bool,
1309
1310        pub pid: ::fidl_next::wire::Uint64,
1311
1312        pub filter_by_tid: bool,
1313
1314        pub tid: ::fidl_next::wire::Uint64,
1315
1316        pub verbosity: u8,
1317
1318        pub min_severity: crate::wire::LogLevelFilter,
1319
1320        pub tags: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
1321    }
1322
1323    static_assertions::const_assert_eq!(std::mem::size_of::<LogFilterOptions<'_>>(), 56);
1324    static_assertions::const_assert_eq!(std::mem::align_of::<LogFilterOptions<'_>>(), 8);
1325
1326    static_assertions::const_assert_eq!(
1327        std::mem::offset_of!(LogFilterOptions<'_>, filter_by_pid),
1328        0
1329    );
1330
1331    static_assertions::const_assert_eq!(std::mem::offset_of!(LogFilterOptions<'_>, pid), 8);
1332
1333    static_assertions::const_assert_eq!(
1334        std::mem::offset_of!(LogFilterOptions<'_>, filter_by_tid),
1335        16
1336    );
1337
1338    static_assertions::const_assert_eq!(std::mem::offset_of!(LogFilterOptions<'_>, tid), 24);
1339
1340    static_assertions::const_assert_eq!(std::mem::offset_of!(LogFilterOptions<'_>, verbosity), 32);
1341
1342    static_assertions::const_assert_eq!(
1343        std::mem::offset_of!(LogFilterOptions<'_>, min_severity),
1344        33
1345    );
1346
1347    static_assertions::const_assert_eq!(std::mem::offset_of!(LogFilterOptions<'_>, tags), 40);
1348
1349    impl ::fidl_next::Constrained for LogFilterOptions<'_> {
1350        type Constraint = ();
1351
1352        fn validate(
1353            _: ::fidl_next::Slot<'_, Self>,
1354            _: Self::Constraint,
1355        ) -> Result<(), ::fidl_next::ValidationError> {
1356            Ok(())
1357        }
1358    }
1359
1360    unsafe impl ::fidl_next::Wire for LogFilterOptions<'static> {
1361        type Narrowed<'de> = LogFilterOptions<'de>;
1362
1363        #[inline]
1364        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1365            ::fidl_next::munge! {
1366                let Self {
1367                    filter_by_pid,
1368                    pid,
1369                    filter_by_tid,
1370                    tid,
1371                    verbosity,
1372                    min_severity,
1373                    tags,
1374
1375                } = &mut *out_;
1376            }
1377
1378            ::fidl_next::Wire::zero_padding(filter_by_pid);
1379
1380            ::fidl_next::Wire::zero_padding(pid);
1381
1382            ::fidl_next::Wire::zero_padding(filter_by_tid);
1383
1384            ::fidl_next::Wire::zero_padding(tid);
1385
1386            ::fidl_next::Wire::zero_padding(verbosity);
1387
1388            ::fidl_next::Wire::zero_padding(min_severity);
1389
1390            ::fidl_next::Wire::zero_padding(tags);
1391
1392            unsafe {
1393                out_.as_mut_ptr().cast::<u8>().add(34).write_bytes(0, 6);
1394            }
1395
1396            unsafe {
1397                out_.as_mut_ptr().cast::<u8>().add(17).write_bytes(0, 7);
1398            }
1399
1400            unsafe {
1401                out_.as_mut_ptr().cast::<u8>().add(1).write_bytes(0, 7);
1402            }
1403        }
1404    }
1405
1406    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogFilterOptions<'de>
1407    where
1408        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1409        ___D: ::fidl_next::Decoder<'de>,
1410    {
1411        fn decode(
1412            slot_: ::fidl_next::Slot<'_, Self>,
1413            decoder_: &mut ___D,
1414            _: (),
1415        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1416            if slot_.as_bytes()[34..40] != [0u8; 6] {
1417                return Err(::fidl_next::DecodeError::InvalidPadding);
1418            }
1419
1420            if slot_.as_bytes()[17..24] != [0u8; 7] {
1421                return Err(::fidl_next::DecodeError::InvalidPadding);
1422            }
1423
1424            if slot_.as_bytes()[1..8] != [0u8; 7] {
1425                return Err(::fidl_next::DecodeError::InvalidPadding);
1426            }
1427
1428            ::fidl_next::munge! {
1429                let Self {
1430                    mut filter_by_pid,
1431                    mut pid,
1432                    mut filter_by_tid,
1433                    mut tid,
1434                    mut verbosity,
1435                    mut min_severity,
1436                    mut tags,
1437
1438                } = slot_;
1439            }
1440
1441            let _field = filter_by_pid.as_mut();
1442
1443            ::fidl_next::Decode::decode(filter_by_pid.as_mut(), decoder_, ())?;
1444
1445            let _field = pid.as_mut();
1446
1447            ::fidl_next::Decode::decode(pid.as_mut(), decoder_, ())?;
1448
1449            let _field = filter_by_tid.as_mut();
1450
1451            ::fidl_next::Decode::decode(filter_by_tid.as_mut(), decoder_, ())?;
1452
1453            let _field = tid.as_mut();
1454
1455            ::fidl_next::Decode::decode(tid.as_mut(), decoder_, ())?;
1456
1457            let _field = verbosity.as_mut();
1458
1459            ::fidl_next::Decode::decode(verbosity.as_mut(), decoder_, ())?;
1460
1461            let _field = min_severity.as_mut();
1462
1463            ::fidl_next::Decode::decode(min_severity.as_mut(), decoder_, ())?;
1464
1465            let _field = tags.as_mut();
1466            ::fidl_next::Constrained::validate(_field, (16, 63))?;
1467            ::fidl_next::Decode::decode(tags.as_mut(), decoder_, (16, 63))?;
1468
1469            let tags = unsafe { tags.deref_unchecked() };
1470
1471            if tags.len() > 16 {
1472                return Err(::fidl_next::DecodeError::VectorTooLong {
1473                    size: tags.len() as u64,
1474                    limit: 16,
1475                });
1476            }
1477
1478            Ok(())
1479        }
1480    }
1481
1482    impl<'de> ::fidl_next::IntoNatural for LogFilterOptions<'de> {
1483        type Natural = crate::natural::LogFilterOptions;
1484    }
1485
1486    /// The wire type corresponding to [`LogMessage`].
1487    #[derive(Debug)]
1488    #[repr(C)]
1489    pub struct LogMessage<'de> {
1490        pub pid: ::fidl_next::wire::Uint64,
1491
1492        pub tid: ::fidl_next::wire::Uint64,
1493
1494        pub time: ::fidl_next::wire::Int64,
1495
1496        pub severity: ::fidl_next::wire::Int32,
1497
1498        pub dropped_logs: ::fidl_next::wire::Uint32,
1499
1500        pub tags: ::fidl_next::wire::Vector<'de, ::fidl_next::wire::String<'de>>,
1501
1502        pub msg: ::fidl_next::wire::String<'de>,
1503    }
1504
1505    static_assertions::const_assert_eq!(std::mem::size_of::<LogMessage<'_>>(), 64);
1506    static_assertions::const_assert_eq!(std::mem::align_of::<LogMessage<'_>>(), 8);
1507
1508    static_assertions::const_assert_eq!(std::mem::offset_of!(LogMessage<'_>, pid), 0);
1509
1510    static_assertions::const_assert_eq!(std::mem::offset_of!(LogMessage<'_>, tid), 8);
1511
1512    static_assertions::const_assert_eq!(std::mem::offset_of!(LogMessage<'_>, time), 16);
1513
1514    static_assertions::const_assert_eq!(std::mem::offset_of!(LogMessage<'_>, severity), 24);
1515
1516    static_assertions::const_assert_eq!(std::mem::offset_of!(LogMessage<'_>, dropped_logs), 28);
1517
1518    static_assertions::const_assert_eq!(std::mem::offset_of!(LogMessage<'_>, tags), 32);
1519
1520    static_assertions::const_assert_eq!(std::mem::offset_of!(LogMessage<'_>, msg), 48);
1521
1522    impl ::fidl_next::Constrained for LogMessage<'_> {
1523        type Constraint = ();
1524
1525        fn validate(
1526            _: ::fidl_next::Slot<'_, Self>,
1527            _: Self::Constraint,
1528        ) -> Result<(), ::fidl_next::ValidationError> {
1529            Ok(())
1530        }
1531    }
1532
1533    unsafe impl ::fidl_next::Wire for LogMessage<'static> {
1534        type Narrowed<'de> = LogMessage<'de>;
1535
1536        #[inline]
1537        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1538            ::fidl_next::munge! {
1539                let Self {
1540                    pid,
1541                    tid,
1542                    time,
1543                    severity,
1544                    dropped_logs,
1545                    tags,
1546                    msg,
1547
1548                } = &mut *out_;
1549            }
1550
1551            ::fidl_next::Wire::zero_padding(pid);
1552
1553            ::fidl_next::Wire::zero_padding(tid);
1554
1555            ::fidl_next::Wire::zero_padding(time);
1556
1557            ::fidl_next::Wire::zero_padding(severity);
1558
1559            ::fidl_next::Wire::zero_padding(dropped_logs);
1560
1561            ::fidl_next::Wire::zero_padding(tags);
1562
1563            ::fidl_next::Wire::zero_padding(msg);
1564        }
1565    }
1566
1567    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogMessage<'de>
1568    where
1569        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1570        ___D: ::fidl_next::Decoder<'de>,
1571    {
1572        fn decode(
1573            slot_: ::fidl_next::Slot<'_, Self>,
1574            decoder_: &mut ___D,
1575            _: (),
1576        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1577            ::fidl_next::munge! {
1578                let Self {
1579                    mut pid,
1580                    mut tid,
1581                    mut time,
1582                    mut severity,
1583                    mut dropped_logs,
1584                    mut tags,
1585                    mut msg,
1586
1587                } = slot_;
1588            }
1589
1590            let _field = pid.as_mut();
1591
1592            ::fidl_next::Decode::decode(pid.as_mut(), decoder_, ())?;
1593
1594            let _field = tid.as_mut();
1595
1596            ::fidl_next::Decode::decode(tid.as_mut(), decoder_, ())?;
1597
1598            let _field = time.as_mut();
1599
1600            ::fidl_next::Decode::decode(time.as_mut(), decoder_, ())?;
1601
1602            let _field = severity.as_mut();
1603
1604            ::fidl_next::Decode::decode(severity.as_mut(), decoder_, ())?;
1605
1606            let _field = dropped_logs.as_mut();
1607
1608            ::fidl_next::Decode::decode(dropped_logs.as_mut(), decoder_, ())?;
1609
1610            let _field = tags.as_mut();
1611            ::fidl_next::Constrained::validate(_field, (5, 63))?;
1612            ::fidl_next::Decode::decode(tags.as_mut(), decoder_, (5, 63))?;
1613
1614            let tags = unsafe { tags.deref_unchecked() };
1615
1616            if tags.len() > 5 {
1617                return Err(::fidl_next::DecodeError::VectorTooLong {
1618                    size: tags.len() as u64,
1619                    limit: 5,
1620                });
1621            }
1622
1623            let _field = msg.as_mut();
1624            ::fidl_next::Constrained::validate(_field, 32768)?;
1625            ::fidl_next::Decode::decode(msg.as_mut(), decoder_, 32768)?;
1626
1627            let msg = unsafe { msg.deref_unchecked() };
1628
1629            if msg.len() > 32768 {
1630                return Err(::fidl_next::DecodeError::VectorTooLong {
1631                    size: msg.len() as u64,
1632                    limit: 32768,
1633                });
1634            }
1635
1636            Ok(())
1637        }
1638    }
1639
1640    impl<'de> ::fidl_next::IntoNatural for LogMessage<'de> {
1641        type Natural = crate::natural::LogMessage;
1642    }
1643
1644    /// The wire type corresponding to [`LogListenerSafeLogRequest`].
1645    #[derive(Debug)]
1646    #[repr(C)]
1647    pub struct LogListenerSafeLogRequest<'de> {
1648        pub log: crate::wire::LogMessage<'de>,
1649    }
1650
1651    static_assertions::const_assert_eq!(std::mem::size_of::<LogListenerSafeLogRequest<'_>>(), 64);
1652    static_assertions::const_assert_eq!(std::mem::align_of::<LogListenerSafeLogRequest<'_>>(), 8);
1653
1654    static_assertions::const_assert_eq!(
1655        std::mem::offset_of!(LogListenerSafeLogRequest<'_>, log),
1656        0
1657    );
1658
1659    impl ::fidl_next::Constrained for LogListenerSafeLogRequest<'_> {
1660        type Constraint = ();
1661
1662        fn validate(
1663            _: ::fidl_next::Slot<'_, Self>,
1664            _: Self::Constraint,
1665        ) -> Result<(), ::fidl_next::ValidationError> {
1666            Ok(())
1667        }
1668    }
1669
1670    unsafe impl ::fidl_next::Wire for LogListenerSafeLogRequest<'static> {
1671        type Narrowed<'de> = LogListenerSafeLogRequest<'de>;
1672
1673        #[inline]
1674        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1675            ::fidl_next::munge! {
1676                let Self {
1677                    log,
1678
1679                } = &mut *out_;
1680            }
1681
1682            ::fidl_next::Wire::zero_padding(log);
1683        }
1684    }
1685
1686    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogListenerSafeLogRequest<'de>
1687    where
1688        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1689        ___D: ::fidl_next::Decoder<'de>,
1690    {
1691        fn decode(
1692            slot_: ::fidl_next::Slot<'_, Self>,
1693            decoder_: &mut ___D,
1694            _: (),
1695        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1696            ::fidl_next::munge! {
1697                let Self {
1698                    mut log,
1699
1700                } = slot_;
1701            }
1702
1703            let _field = log.as_mut();
1704
1705            ::fidl_next::Decode::decode(log.as_mut(), decoder_, ())?;
1706
1707            Ok(())
1708        }
1709    }
1710
1711    impl<'de> ::fidl_next::IntoNatural for LogListenerSafeLogRequest<'de> {
1712        type Natural = crate::natural::LogListenerSafeLogRequest;
1713    }
1714
1715    /// The wire type corresponding to [`LogListenerSafeLogManyRequest`].
1716    #[derive(Debug)]
1717    #[repr(C)]
1718    pub struct LogListenerSafeLogManyRequest<'de> {
1719        pub log: ::fidl_next::wire::Vector<'de, crate::wire::LogMessage<'de>>,
1720    }
1721
1722    static_assertions::const_assert_eq!(
1723        std::mem::size_of::<LogListenerSafeLogManyRequest<'_>>(),
1724        16
1725    );
1726    static_assertions::const_assert_eq!(
1727        std::mem::align_of::<LogListenerSafeLogManyRequest<'_>>(),
1728        8
1729    );
1730
1731    static_assertions::const_assert_eq!(
1732        std::mem::offset_of!(LogListenerSafeLogManyRequest<'_>, log),
1733        0
1734    );
1735
1736    impl ::fidl_next::Constrained for LogListenerSafeLogManyRequest<'_> {
1737        type Constraint = ();
1738
1739        fn validate(
1740            _: ::fidl_next::Slot<'_, Self>,
1741            _: Self::Constraint,
1742        ) -> Result<(), ::fidl_next::ValidationError> {
1743            Ok(())
1744        }
1745    }
1746
1747    unsafe impl ::fidl_next::Wire for LogListenerSafeLogManyRequest<'static> {
1748        type Narrowed<'de> = LogListenerSafeLogManyRequest<'de>;
1749
1750        #[inline]
1751        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1752            ::fidl_next::munge! {
1753                let Self {
1754                    log,
1755
1756                } = &mut *out_;
1757            }
1758
1759            ::fidl_next::Wire::zero_padding(log);
1760        }
1761    }
1762
1763    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogListenerSafeLogManyRequest<'de>
1764    where
1765        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1766        ___D: ::fidl_next::Decoder<'de>,
1767    {
1768        fn decode(
1769            slot_: ::fidl_next::Slot<'_, Self>,
1770            decoder_: &mut ___D,
1771            _: (),
1772        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1773            ::fidl_next::munge! {
1774                let Self {
1775                    mut log,
1776
1777                } = slot_;
1778            }
1779
1780            let _field = log.as_mut();
1781            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1782            ::fidl_next::Decode::decode(log.as_mut(), decoder_, (4294967295, ()))?;
1783
1784            Ok(())
1785        }
1786    }
1787
1788    impl<'de> ::fidl_next::IntoNatural for LogListenerSafeLogManyRequest<'de> {
1789        type Natural = crate::natural::LogListenerSafeLogManyRequest;
1790    }
1791
1792    /// The wire type corresponding to [`LogSinkWaitForInterestChangeResponse`].
1793    #[derive(Debug)]
1794    #[repr(C)]
1795    pub struct LogSinkWaitForInterestChangeResponse<'de> {
1796        pub data: ::fidl_next_common_fuchsia_diagnostics_types::wire::Interest<'de>,
1797    }
1798
1799    static_assertions::const_assert_eq!(
1800        std::mem::size_of::<LogSinkWaitForInterestChangeResponse<'_>>(),
1801        16
1802    );
1803    static_assertions::const_assert_eq!(
1804        std::mem::align_of::<LogSinkWaitForInterestChangeResponse<'_>>(),
1805        8
1806    );
1807
1808    static_assertions::const_assert_eq!(
1809        std::mem::offset_of!(LogSinkWaitForInterestChangeResponse<'_>, data),
1810        0
1811    );
1812
1813    impl ::fidl_next::Constrained for LogSinkWaitForInterestChangeResponse<'_> {
1814        type Constraint = ();
1815
1816        fn validate(
1817            _: ::fidl_next::Slot<'_, Self>,
1818            _: Self::Constraint,
1819        ) -> Result<(), ::fidl_next::ValidationError> {
1820            Ok(())
1821        }
1822    }
1823
1824    unsafe impl ::fidl_next::Wire for LogSinkWaitForInterestChangeResponse<'static> {
1825        type Narrowed<'de> = LogSinkWaitForInterestChangeResponse<'de>;
1826
1827        #[inline]
1828        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1829            ::fidl_next::munge! {
1830                let Self {
1831                    data,
1832
1833                } = &mut *out_;
1834            }
1835
1836            ::fidl_next::Wire::zero_padding(data);
1837        }
1838    }
1839
1840    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogSinkWaitForInterestChangeResponse<'de>
1841    where
1842        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1843        ___D: ::fidl_next::Decoder<'de>,
1844    {
1845        fn decode(
1846            slot_: ::fidl_next::Slot<'_, Self>,
1847            decoder_: &mut ___D,
1848            _: (),
1849        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1850            ::fidl_next::munge! {
1851                let Self {
1852                    mut data,
1853
1854                } = slot_;
1855            }
1856
1857            let _field = data.as_mut();
1858
1859            ::fidl_next::Decode::decode(data.as_mut(), decoder_, ())?;
1860
1861            Ok(())
1862        }
1863    }
1864
1865    impl<'de> ::fidl_next::IntoNatural for LogSinkWaitForInterestChangeResponse<'de> {
1866        type Natural = crate::natural::LogSinkWaitForInterestChangeResponse;
1867    }
1868}
1869
1870pub mod wire_optional {}
1871
1872pub mod generic {
1873
1874    /// The generic type corresponding to [`LogFilterOptions`].
1875    pub struct LogFilterOptions<T0, T1, T2, T3, T4, T5, T6> {
1876        pub filter_by_pid: T0,
1877
1878        pub pid: T1,
1879
1880        pub filter_by_tid: T2,
1881
1882        pub tid: T3,
1883
1884        pub verbosity: T4,
1885
1886        pub min_severity: T5,
1887
1888        pub tags: T6,
1889    }
1890
1891    unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
1892        ::fidl_next::Encode<crate::wire::LogFilterOptions<'static>, ___E>
1893        for LogFilterOptions<T0, T1, T2, T3, T4, T5, T6>
1894    where
1895        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1896        ___E: ::fidl_next::Encoder,
1897        T0: ::fidl_next::Encode<bool, ___E>,
1898        T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
1899        T2: ::fidl_next::Encode<bool, ___E>,
1900        T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
1901        T4: ::fidl_next::Encode<u8, ___E>,
1902        T5: ::fidl_next::Encode<crate::wire::LogLevelFilter, ___E>,
1903        T6: ::fidl_next::Encode<
1904                ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
1905                ___E,
1906            >,
1907    {
1908        #[inline]
1909        fn encode(
1910            self,
1911            encoder_: &mut ___E,
1912            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogFilterOptions<'static>>,
1913            _: (),
1914        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1915            ::fidl_next::munge! {
1916                let crate::wire::LogFilterOptions {
1917                    filter_by_pid,
1918                    pid,
1919                    filter_by_tid,
1920                    tid,
1921                    verbosity,
1922                    min_severity,
1923                    tags,
1924
1925                } = out_;
1926            }
1927
1928            ::fidl_next::Encode::encode(self.filter_by_pid, encoder_, filter_by_pid, ())?;
1929
1930            ::fidl_next::Encode::encode(self.pid, encoder_, pid, ())?;
1931
1932            ::fidl_next::Encode::encode(self.filter_by_tid, encoder_, filter_by_tid, ())?;
1933
1934            ::fidl_next::Encode::encode(self.tid, encoder_, tid, ())?;
1935
1936            ::fidl_next::Encode::encode(self.verbosity, encoder_, verbosity, ())?;
1937
1938            ::fidl_next::Encode::encode(self.min_severity, encoder_, min_severity, ())?;
1939
1940            ::fidl_next::Encode::encode(self.tags, encoder_, tags, (16, 63))?;
1941
1942            Ok(())
1943        }
1944    }
1945
1946    /// The generic type corresponding to [`LogMessage`].
1947    pub struct LogMessage<T0, T1, T2, T3, T4, T5, T6> {
1948        pub pid: T0,
1949
1950        pub tid: T1,
1951
1952        pub time: T2,
1953
1954        pub severity: T3,
1955
1956        pub dropped_logs: T4,
1957
1958        pub tags: T5,
1959
1960        pub msg: T6,
1961    }
1962
1963    unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6>
1964        ::fidl_next::Encode<crate::wire::LogMessage<'static>, ___E>
1965        for LogMessage<T0, T1, T2, T3, T4, T5, T6>
1966    where
1967        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1968        ___E: ::fidl_next::Encoder,
1969        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
1970        T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
1971        T2: ::fidl_next::Encode<::fidl_next::wire::Int64, ___E>,
1972        T3: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
1973        T4: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
1974        T5: ::fidl_next::Encode<
1975                ::fidl_next::wire::Vector<'static, ::fidl_next::wire::String<'static>>,
1976                ___E,
1977            >,
1978        T6: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
1979    {
1980        #[inline]
1981        fn encode(
1982            self,
1983            encoder_: &mut ___E,
1984            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogMessage<'static>>,
1985            _: (),
1986        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1987            ::fidl_next::munge! {
1988                let crate::wire::LogMessage {
1989                    pid,
1990                    tid,
1991                    time,
1992                    severity,
1993                    dropped_logs,
1994                    tags,
1995                    msg,
1996
1997                } = out_;
1998            }
1999
2000            ::fidl_next::Encode::encode(self.pid, encoder_, pid, ())?;
2001
2002            ::fidl_next::Encode::encode(self.tid, encoder_, tid, ())?;
2003
2004            ::fidl_next::Encode::encode(self.time, encoder_, time, ())?;
2005
2006            ::fidl_next::Encode::encode(self.severity, encoder_, severity, ())?;
2007
2008            ::fidl_next::Encode::encode(self.dropped_logs, encoder_, dropped_logs, ())?;
2009
2010            ::fidl_next::Encode::encode(self.tags, encoder_, tags, (5, 63))?;
2011
2012            ::fidl_next::Encode::encode(self.msg, encoder_, msg, 32768)?;
2013
2014            Ok(())
2015        }
2016    }
2017
2018    /// The generic type corresponding to [`LogListenerSafeLogRequest`].
2019    pub struct LogListenerSafeLogRequest<T0> {
2020        pub log: T0,
2021    }
2022
2023    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LogListenerSafeLogRequest<'static>, ___E>
2024        for LogListenerSafeLogRequest<T0>
2025    where
2026        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2027        ___E: ::fidl_next::Encoder,
2028        T0: ::fidl_next::Encode<crate::wire::LogMessage<'static>, ___E>,
2029    {
2030        #[inline]
2031        fn encode(
2032            self,
2033            encoder_: &mut ___E,
2034            out_: &mut ::core::mem::MaybeUninit<crate::wire::LogListenerSafeLogRequest<'static>>,
2035            _: (),
2036        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2037            ::fidl_next::munge! {
2038                let crate::wire::LogListenerSafeLogRequest {
2039                    log,
2040
2041                } = out_;
2042            }
2043
2044            ::fidl_next::Encode::encode(self.log, encoder_, log, ())?;
2045
2046            Ok(())
2047        }
2048    }
2049
2050    /// The generic type corresponding to [`LogListenerSafeLogManyRequest`].
2051    pub struct LogListenerSafeLogManyRequest<T0> {
2052        pub log: T0,
2053    }
2054
2055    unsafe impl<___E, T0>
2056        ::fidl_next::Encode<crate::wire::LogListenerSafeLogManyRequest<'static>, ___E>
2057        for LogListenerSafeLogManyRequest<T0>
2058    where
2059        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2060        ___E: ::fidl_next::Encoder,
2061        T0: ::fidl_next::Encode<
2062                ::fidl_next::wire::Vector<'static, crate::wire::LogMessage<'static>>,
2063                ___E,
2064            >,
2065    {
2066        #[inline]
2067        fn encode(
2068            self,
2069            encoder_: &mut ___E,
2070            out_: &mut ::core::mem::MaybeUninit<
2071                crate::wire::LogListenerSafeLogManyRequest<'static>,
2072            >,
2073            _: (),
2074        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2075            ::fidl_next::munge! {
2076                let crate::wire::LogListenerSafeLogManyRequest {
2077                    log,
2078
2079                } = out_;
2080            }
2081
2082            ::fidl_next::Encode::encode(self.log, encoder_, log, (4294967295, ()))?;
2083
2084            Ok(())
2085        }
2086    }
2087
2088    /// The generic type corresponding to [`LogSinkWaitForInterestChangeResponse`].
2089    pub struct LogSinkWaitForInterestChangeResponse<T0> {
2090        pub data: T0,
2091    }
2092
2093    unsafe impl<___E, T0>
2094        ::fidl_next::Encode<crate::wire::LogSinkWaitForInterestChangeResponse<'static>, ___E>
2095        for LogSinkWaitForInterestChangeResponse<T0>
2096    where
2097        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2098        ___E: ::fidl_next::Encoder,
2099        T0: ::fidl_next::Encode<
2100                ::fidl_next_common_fuchsia_diagnostics_types::wire::Interest<'static>,
2101                ___E,
2102            >,
2103    {
2104        #[inline]
2105        fn encode(
2106            self,
2107            encoder_: &mut ___E,
2108            out_: &mut ::core::mem::MaybeUninit<
2109                crate::wire::LogSinkWaitForInterestChangeResponse<'static>,
2110            >,
2111            _: (),
2112        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2113            ::fidl_next::munge! {
2114                let crate::wire::LogSinkWaitForInterestChangeResponse {
2115                    data,
2116
2117                } = out_;
2118            }
2119
2120            ::fidl_next::Encode::encode(self.data, encoder_, data, ())?;
2121
2122            Ok(())
2123        }
2124    }
2125}
2126
2127pub use self::natural::*;
2128
2129#[doc = " Default log level used to initialize loggers.\n"]
2130pub const LOG_LEVEL_DEFAULT: crate::natural::LogLevelFilter = crate::natural::LogLevelFilter::Info;
2131
2132#[doc = " Maximum available log severity.\n"]
2133pub const LOG_SEVERITY_MAX_STEP: u8 = 6 as u8;
2134
2135#[doc = " The interval between discrete log severity levels\n"]
2136pub const LOG_SEVERITY_STEP_SIZE: u8 = 16 as u8;
2137
2138#[doc = " The interval between discrete log verbosity levels\n"]
2139pub const LOG_VERBOSITY_STEP_SIZE: u8 = 1 as u8;
2140
2141#[doc = " Max tag length that can be passed to filter by listener.\n"]
2142pub const MAX_TAG_LEN_BYTES: u8 = 63 as u8;
2143
2144#[doc = " Max number of tags that can be passed to filter by listener.\n"]
2145pub const MAX_TAGS: u8 = 16 as u8;
2146
2147#[doc = " Max tags that will be attached to a LogMessage.\n"]
2148pub const MAX_TAGS_PER_LOG_MESSAGE: u8 = 5 as u8;
2149
2150#[doc = " Max byte size for message payload.\n"]
2151pub const MAX_DATAGRAM_LEN_BYTES: u32 = 32768 as u32;
2152
2153/// The type corresponding to the LogListenerSafe protocol.
2154#[doc = " A listener who will notify the `Log` of the receipt of each message.\n"]
2155#[derive(PartialEq, Debug)]
2156pub struct LogListenerSafe;
2157
2158#[cfg(target_os = "fuchsia")]
2159impl ::fidl_next::HasTransport for LogListenerSafe {
2160    type Transport = ::fidl_next::fuchsia::zx::Channel;
2161}
2162
2163pub mod log_listener_safe {
2164    pub mod prelude {
2165        pub use crate::{
2166            LogListenerSafe, LogListenerSafeClientHandler, LogListenerSafeLocalClientHandler,
2167            LogListenerSafeLocalServerHandler, LogListenerSafeServerHandler, log_listener_safe,
2168        };
2169
2170        pub use crate::natural::LogListenerSafeLogManyRequest;
2171
2172        pub use crate::natural::LogListenerSafeLogRequest;
2173    }
2174
2175    pub struct Log;
2176
2177    impl ::fidl_next::Method for Log {
2178        const ORDINAL: u64 = 5882719137999207690;
2179        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2180            ::fidl_next::protocol::Flexibility::Strict;
2181
2182        type Protocol = crate::LogListenerSafe;
2183
2184        type Request = crate::wire::LogListenerSafeLogRequest<'static>;
2185    }
2186
2187    impl ::fidl_next::TwoWayMethod for Log {
2188        type Response = ::fidl_next::wire::Strict<::fidl_next::wire::EmptyMessageBody>;
2189    }
2190
2191    impl<___R> ::fidl_next::Respond<___R> for Log {
2192        type Output = ::fidl_next::Strict<___R>;
2193
2194        fn respond(response: ___R) -> Self::Output {
2195            ::fidl_next::Strict(response)
2196        }
2197    }
2198
2199    pub struct LogMany;
2200
2201    impl ::fidl_next::Method for LogMany {
2202        const ORDINAL: u64 = 139706434677727850;
2203        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2204            ::fidl_next::protocol::Flexibility::Strict;
2205
2206        type Protocol = crate::LogListenerSafe;
2207
2208        type Request = crate::wire::LogListenerSafeLogManyRequest<'static>;
2209    }
2210
2211    impl ::fidl_next::TwoWayMethod for LogMany {
2212        type Response = ::fidl_next::wire::Strict<::fidl_next::wire::EmptyMessageBody>;
2213    }
2214
2215    impl<___R> ::fidl_next::Respond<___R> for LogMany {
2216        type Output = ::fidl_next::Strict<___R>;
2217
2218        fn respond(response: ___R) -> Self::Output {
2219            ::fidl_next::Strict(response)
2220        }
2221    }
2222
2223    pub struct Done;
2224
2225    impl ::fidl_next::Method for Done {
2226        const ORDINAL: u64 = 3789886091192272056;
2227        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2228            ::fidl_next::protocol::Flexibility::Strict;
2229
2230        type Protocol = crate::LogListenerSafe;
2231
2232        type Request = ::fidl_next::wire::EmptyMessageBody;
2233    }
2234
2235    mod ___detail {
2236        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::LogListenerSafe
2237        where
2238            ___T: ::fidl_next::Transport,
2239        {
2240            type Client = LogListenerSafeClient<___T>;
2241            type Server = LogListenerSafeServer<___T>;
2242        }
2243
2244        /// The client for the `LogListenerSafe` protocol.
2245        #[repr(transparent)]
2246        pub struct LogListenerSafeClient<___T: ::fidl_next::Transport> {
2247            #[allow(dead_code)]
2248            client: ::fidl_next::protocol::Client<___T>,
2249        }
2250
2251        impl<___T> LogListenerSafeClient<___T>
2252        where
2253            ___T: ::fidl_next::Transport,
2254        {
2255            #[doc = " Called for single messages.\n\n The return value is used for flow control, and implementers should acknowledge receipt of\n each message in order to continue receiving future messages.\n"]
2256            pub fn log(
2257                &self,
2258
2259                log: impl ::fidl_next::Encode<
2260                    crate::wire::LogMessage<'static>,
2261                    <___T as ::fidl_next::Transport>::SendBuffer,
2262                >,
2263            ) -> ::fidl_next::TwoWayFuture<'_, super::Log, ___T>
2264            where
2265                <___T as ::fidl_next::Transport>::SendBuffer:
2266                    ::fidl_next::encoder::InternalHandleEncoder,
2267                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2268            {
2269                self.log_with(crate::generic::LogListenerSafeLogRequest { log })
2270            }
2271
2272            #[doc = " Called for single messages.\n\n The return value is used for flow control, and implementers should acknowledge receipt of\n each message in order to continue receiving future messages.\n"]
2273            pub fn log_with<___R>(
2274                &self,
2275                request: ___R,
2276            ) -> ::fidl_next::TwoWayFuture<'_, super::Log, ___T>
2277            where
2278                ___R: ::fidl_next::Encode<
2279                        crate::wire::LogListenerSafeLogRequest<'static>,
2280                        <___T as ::fidl_next::Transport>::SendBuffer,
2281                    >,
2282            {
2283                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2284                    5882719137999207690,
2285                    <super::Log as ::fidl_next::Method>::FLEXIBILITY,
2286                    request,
2287                ))
2288            }
2289
2290            #[doc = " Called when serving cached logs.\n\n Max logs size per call is `MAX_LOG_MANY_SIZE_BYTES` bytes.\n\n The return value is used for flow control, and implementers should acknowledge receipt of\n each batch in order to continue receiving future messages.\n"]
2291            pub fn log_many(
2292                &self,
2293
2294                log: impl ::fidl_next::Encode<
2295                    ::fidl_next::wire::Vector<'static, crate::wire::LogMessage<'static>>,
2296                    <___T as ::fidl_next::Transport>::SendBuffer,
2297                >,
2298            ) -> ::fidl_next::TwoWayFuture<'_, super::LogMany, ___T>
2299            where
2300                <___T as ::fidl_next::Transport>::SendBuffer:
2301                    ::fidl_next::encoder::InternalHandleEncoder,
2302                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2303            {
2304                self.log_many_with(crate::generic::LogListenerSafeLogManyRequest { log })
2305            }
2306
2307            #[doc = " Called when serving cached logs.\n\n Max logs size per call is `MAX_LOG_MANY_SIZE_BYTES` bytes.\n\n The return value is used for flow control, and implementers should acknowledge receipt of\n each batch in order to continue receiving future messages.\n"]
2308            pub fn log_many_with<___R>(
2309                &self,
2310                request: ___R,
2311            ) -> ::fidl_next::TwoWayFuture<'_, super::LogMany, ___T>
2312            where
2313                ___R: ::fidl_next::Encode<
2314                        crate::wire::LogListenerSafeLogManyRequest<'static>,
2315                        <___T as ::fidl_next::Transport>::SendBuffer,
2316                    >,
2317            {
2318                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2319                    139706434677727850,
2320                    <super::LogMany as ::fidl_next::Method>::FLEXIBILITY,
2321                    request,
2322                ))
2323            }
2324
2325            #[doc = " Called when this listener was passed to `DumpLogsSafe()` and all cached logs have been sent.\n"]
2326            pub fn done(&self) -> ::fidl_next::SendFuture<'_, ___T> {
2327                ::fidl_next::SendFuture::from_untyped(
2328                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
2329                        3789886091192272056,
2330                        <super::Done as ::fidl_next::Method>::FLEXIBILITY,
2331                        (),
2332                    ),
2333                )
2334            }
2335        }
2336
2337        /// The server for the `LogListenerSafe` protocol.
2338        #[repr(transparent)]
2339        pub struct LogListenerSafeServer<___T: ::fidl_next::Transport> {
2340            server: ::fidl_next::protocol::Server<___T>,
2341        }
2342
2343        impl<___T> LogListenerSafeServer<___T> where ___T: ::fidl_next::Transport {}
2344    }
2345}
2346
2347#[diagnostic::on_unimplemented(
2348    note = "If {Self} implements the non-local LogListenerSafeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2349)]
2350
2351/// A client handler for the LogListenerSafe protocol.
2352///
2353/// See [`LogListenerSafe`] for more details.
2354pub trait LogListenerSafeLocalClientHandler<
2355    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2356    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2357>
2358{
2359}
2360
2361impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for LogListenerSafe
2362where
2363    ___H: LogListenerSafeLocalClientHandler<___T>,
2364    ___T: ::fidl_next::Transport,
2365{
2366    async fn on_event(
2367        handler: &mut ___H,
2368        mut message: ::fidl_next::Message<___T>,
2369    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2370        match *message.header().ordinal {
2371            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2372        }
2373    }
2374}
2375
2376#[diagnostic::on_unimplemented(
2377    note = "If {Self} implements the non-local LogListenerSafeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2378)]
2379
2380/// A server handler for the LogListenerSafe protocol.
2381///
2382/// See [`LogListenerSafe`] for more details.
2383pub trait LogListenerSafeLocalServerHandler<
2384    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2385    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2386>
2387{
2388    #[doc = " Called for single messages.\n\n The return value is used for flow control, and implementers should acknowledge receipt of\n each message in order to continue receiving future messages.\n"]
2389    fn log(
2390        &mut self,
2391
2392        request: ::fidl_next::Request<log_listener_safe::Log, ___T>,
2393
2394        responder: ::fidl_next::Responder<log_listener_safe::Log, ___T>,
2395    ) -> impl ::core::future::Future<Output = ()>;
2396
2397    #[doc = " Called when serving cached logs.\n\n Max logs size per call is `MAX_LOG_MANY_SIZE_BYTES` bytes.\n\n The return value is used for flow control, and implementers should acknowledge receipt of\n each batch in order to continue receiving future messages.\n"]
2398    fn log_many(
2399        &mut self,
2400
2401        request: ::fidl_next::Request<log_listener_safe::LogMany, ___T>,
2402
2403        responder: ::fidl_next::Responder<log_listener_safe::LogMany, ___T>,
2404    ) -> impl ::core::future::Future<Output = ()>;
2405
2406    #[doc = " Called when this listener was passed to `DumpLogsSafe()` and all cached logs have been sent.\n"]
2407    fn done(&mut self) -> impl ::core::future::Future<Output = ()>;
2408}
2409
2410impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for LogListenerSafe
2411where
2412    ___H: LogListenerSafeLocalServerHandler<___T>,
2413    ___T: ::fidl_next::Transport,
2414    for<'de> crate::wire::LogListenerSafeLogRequest<'de>: ::fidl_next::Decode<
2415            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2416            Constraint = (),
2417        >,
2418    for<'de> crate::wire::LogListenerSafeLogManyRequest<'de>: ::fidl_next::Decode<
2419            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2420            Constraint = (),
2421        >,
2422{
2423    async fn on_one_way(
2424        handler: &mut ___H,
2425        mut message: ::fidl_next::Message<___T>,
2426    ) -> ::core::result::Result<
2427        (),
2428        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2429    > {
2430        match *message.header().ordinal {
2431            3789886091192272056 => {
2432                handler.done().await;
2433                Ok(())
2434            }
2435
2436            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2437        }
2438    }
2439
2440    async fn on_two_way(
2441        handler: &mut ___H,
2442        mut message: ::fidl_next::Message<___T>,
2443        responder: ::fidl_next::protocol::Responder<___T>,
2444    ) -> ::core::result::Result<
2445        (),
2446        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2447    > {
2448        match *message.header().ordinal {
2449            5882719137999207690 => {
2450                let responder = ::fidl_next::Responder::from_untyped(responder);
2451
2452                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2453                    Ok(decoded) => {
2454                        handler.log(::fidl_next::Request::from_decoded(decoded), responder).await;
2455                        Ok(())
2456                    }
2457                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2458                        ordinal: 5882719137999207690,
2459                        error,
2460                    }),
2461                }
2462            }
2463
2464            139706434677727850 => {
2465                let responder = ::fidl_next::Responder::from_untyped(responder);
2466
2467                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2468                    Ok(decoded) => {
2469                        handler
2470                            .log_many(::fidl_next::Request::from_decoded(decoded), responder)
2471                            .await;
2472                        Ok(())
2473                    }
2474                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2475                        ordinal: 139706434677727850,
2476                        error,
2477                    }),
2478                }
2479            }
2480
2481            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2482        }
2483    }
2484}
2485
2486/// A client handler for the LogListenerSafe protocol.
2487///
2488/// See [`LogListenerSafe`] for more details.
2489pub trait LogListenerSafeClientHandler<
2490    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2491    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2492>
2493{
2494}
2495
2496impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for LogListenerSafe
2497where
2498    ___H: LogListenerSafeClientHandler<___T> + ::core::marker::Send,
2499    ___T: ::fidl_next::Transport,
2500{
2501    async fn on_event(
2502        handler: &mut ___H,
2503        mut message: ::fidl_next::Message<___T>,
2504    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2505        match *message.header().ordinal {
2506            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2507        }
2508    }
2509}
2510
2511/// A server handler for the LogListenerSafe protocol.
2512///
2513/// See [`LogListenerSafe`] for more details.
2514pub trait LogListenerSafeServerHandler<
2515    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2516    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2517>
2518{
2519    #[doc = " Called for single messages.\n\n The return value is used for flow control, and implementers should acknowledge receipt of\n each message in order to continue receiving future messages.\n"]
2520    fn log(
2521        &mut self,
2522
2523        request: ::fidl_next::Request<log_listener_safe::Log, ___T>,
2524
2525        responder: ::fidl_next::Responder<log_listener_safe::Log, ___T>,
2526    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2527
2528    #[doc = " Called when serving cached logs.\n\n Max logs size per call is `MAX_LOG_MANY_SIZE_BYTES` bytes.\n\n The return value is used for flow control, and implementers should acknowledge receipt of\n each batch in order to continue receiving future messages.\n"]
2529    fn log_many(
2530        &mut self,
2531
2532        request: ::fidl_next::Request<log_listener_safe::LogMany, ___T>,
2533
2534        responder: ::fidl_next::Responder<log_listener_safe::LogMany, ___T>,
2535    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2536
2537    #[doc = " Called when this listener was passed to `DumpLogsSafe()` and all cached logs have been sent.\n"]
2538    fn done(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2539}
2540
2541impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for LogListenerSafe
2542where
2543    ___H: LogListenerSafeServerHandler<___T> + ::core::marker::Send,
2544    ___T: ::fidl_next::Transport,
2545    for<'de> crate::wire::LogListenerSafeLogRequest<'de>: ::fidl_next::Decode<
2546            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2547            Constraint = (),
2548        >,
2549    for<'de> crate::wire::LogListenerSafeLogManyRequest<'de>: ::fidl_next::Decode<
2550            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2551            Constraint = (),
2552        >,
2553{
2554    async fn on_one_way(
2555        handler: &mut ___H,
2556        mut message: ::fidl_next::Message<___T>,
2557    ) -> ::core::result::Result<
2558        (),
2559        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2560    > {
2561        match *message.header().ordinal {
2562            3789886091192272056 => {
2563                handler.done().await;
2564                Ok(())
2565            }
2566
2567            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2568        }
2569    }
2570
2571    async fn on_two_way(
2572        handler: &mut ___H,
2573        mut message: ::fidl_next::Message<___T>,
2574        responder: ::fidl_next::protocol::Responder<___T>,
2575    ) -> ::core::result::Result<
2576        (),
2577        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2578    > {
2579        match *message.header().ordinal {
2580            5882719137999207690 => {
2581                let responder = ::fidl_next::Responder::from_untyped(responder);
2582
2583                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2584                    Ok(decoded) => {
2585                        handler.log(::fidl_next::Request::from_decoded(decoded), responder).await;
2586                        Ok(())
2587                    }
2588                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2589                        ordinal: 5882719137999207690,
2590                        error,
2591                    }),
2592                }
2593            }
2594
2595            139706434677727850 => {
2596                let responder = ::fidl_next::Responder::from_untyped(responder);
2597
2598                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2599                    Ok(decoded) => {
2600                        handler
2601                            .log_many(::fidl_next::Request::from_decoded(decoded), responder)
2602                            .await;
2603                        Ok(())
2604                    }
2605                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2606                        ordinal: 139706434677727850,
2607                        error,
2608                    }),
2609                }
2610            }
2611
2612            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2613        }
2614    }
2615}
2616
2617impl<___T> LogListenerSafeClientHandler<___T> for ::fidl_next::IgnoreEvents where
2618    ___T: ::fidl_next::Transport
2619{
2620}
2621
2622impl<___H, ___T> LogListenerSafeLocalClientHandler<___T> for ::fidl_next::Local<___H>
2623where
2624    ___H: LogListenerSafeClientHandler<___T>,
2625    ___T: ::fidl_next::Transport,
2626{
2627}
2628
2629impl<___H, ___T> LogListenerSafeLocalServerHandler<___T> for ::fidl_next::Local<___H>
2630where
2631    ___H: LogListenerSafeServerHandler<___T>,
2632    ___T: ::fidl_next::Transport,
2633{
2634    async fn log(
2635        &mut self,
2636
2637        request: ::fidl_next::Request<log_listener_safe::Log, ___T>,
2638
2639        responder: ::fidl_next::Responder<log_listener_safe::Log, ___T>,
2640    ) {
2641        ___H::log(&mut self.0, request, responder).await
2642    }
2643
2644    async fn log_many(
2645        &mut self,
2646
2647        request: ::fidl_next::Request<log_listener_safe::LogMany, ___T>,
2648
2649        responder: ::fidl_next::Responder<log_listener_safe::LogMany, ___T>,
2650    ) {
2651        ___H::log_many(&mut self.0, request, responder).await
2652    }
2653
2654    async fn done(&mut self) {
2655        ___H::done(&mut self.0).await
2656    }
2657}
2658
2659#[doc = " Max log bytes per call to a listener.\n"]
2660pub const MAX_LOG_MANY_SIZE_BYTES: u64 = 16384 as u64;