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