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