1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_logger::natural::*;
8
9 #[derive(Debug, PartialEq)]
10 pub struct LogListenSafeRequest {
11 pub log_listener:
12 ::fidl_next::ClientEnd<crate::LogListenerSafe, ::fidl_next::fuchsia::zx::Channel>,
13
14 pub options: ::core::option::Option<::std::boxed::Box<crate::natural::LogFilterOptions>>,
15 }
16
17 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogListenSafeRequest<'static>, ___E>
18 for LogListenSafeRequest
19 where
20 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21 ___E: ::fidl_next::Encoder,
22 ___E: ::fidl_next::fuchsia::HandleEncoder,
23 {
24 #[inline]
25 fn encode(
26 self,
27 encoder_: &mut ___E,
28 out_: &mut ::core::mem::MaybeUninit<crate::wire::LogListenSafeRequest<'static>>,
29 _: (),
30 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
31 ::fidl_next::munge! {
32 let crate::wire::LogListenSafeRequest {
33 log_listener,
34 options,
35
36 } = out_;
37 }
38
39 ::fidl_next::Encode::encode(self.log_listener, encoder_, log_listener, ())?;
40
41 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(log_listener.as_mut_ptr()) };
42
43 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
44
45 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
46
47 Ok(())
48 }
49 }
50
51 unsafe impl<___E>
52 ::fidl_next::EncodeOption<
53 ::fidl_next::wire::Box<'static, crate::wire::LogListenSafeRequest<'static>>,
54 ___E,
55 > for LogListenSafeRequest
56 where
57 ___E: ::fidl_next::Encoder + ?Sized,
58 LogListenSafeRequest: ::fidl_next::Encode<crate::wire::LogListenSafeRequest<'static>, ___E>,
59 {
60 #[inline]
61 fn encode_option(
62 this: ::core::option::Option<Self>,
63 encoder: &mut ___E,
64 out: &mut ::core::mem::MaybeUninit<
65 ::fidl_next::wire::Box<'static, crate::wire::LogListenSafeRequest<'static>>,
66 >,
67 _: (),
68 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
69 if let Some(inner) = this {
70 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
71 ::fidl_next::wire::Box::encode_present(out);
72 } else {
73 ::fidl_next::wire::Box::encode_absent(out);
74 }
75
76 Ok(())
77 }
78 }
79
80 impl<'de> ::fidl_next::FromWire<crate::wire::LogListenSafeRequest<'de>> for LogListenSafeRequest {
81 #[inline]
82 fn from_wire(wire: crate::wire::LogListenSafeRequest<'de>) -> Self {
83 Self {
84 log_listener: ::fidl_next::FromWire::from_wire(wire.log_listener),
85
86 options: ::fidl_next::FromWire::from_wire(wire.options),
87 }
88 }
89 }
90
91 #[derive(Debug, Default, PartialEq)]
92 pub struct LogSinkOnInitRequest {
93 pub buffer: ::core::option::Option<::fidl_next::fuchsia::zx::Iob>,
94
95 pub interest:
96 ::core::option::Option<::fidl_next_fuchsia_diagnostics_types::natural::Interest>,
97 }
98
99 impl LogSinkOnInitRequest {
100 fn __max_ordinal(&self) -> usize {
101 if self.interest.is_some() {
102 return 2;
103 }
104
105 if self.buffer.is_some() {
106 return 1;
107 }
108
109 0
110 }
111 }
112
113 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogSinkOnInitRequest<'static>, ___E>
114 for LogSinkOnInitRequest
115 where
116 ___E: ::fidl_next::Encoder + ?Sized,
117 ___E: ::fidl_next::fuchsia::HandleEncoder,
118 {
119 #[inline]
120 fn encode(
121 mut self,
122 encoder: &mut ___E,
123 out: &mut ::core::mem::MaybeUninit<crate::wire::LogSinkOnInitRequest<'static>>,
124 _: (),
125 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
126 ::fidl_next::munge!(let crate::wire::LogSinkOnInitRequest { table } = out);
127
128 let max_ord = self.__max_ordinal();
129
130 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
131 ::fidl_next::Wire::zero_padding(&mut out);
132
133 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
134 ::fidl_next::wire::Envelope,
135 >(encoder, max_ord);
136
137 for i in 1..=max_ord {
138 match i {
139 2 => {
140 if let Some(value) = self.interest.take() {
141 ::fidl_next::wire::Envelope::encode_value::<
142 ::fidl_next_fuchsia_diagnostics_types::wire::Interest<'static>,
143 ___E,
144 >(
145 value, preallocated.encoder, &mut out, ()
146 )?;
147 } else {
148 ::fidl_next::wire::Envelope::encode_zero(&mut out)
149 }
150 }
151
152 1 => {
153 if let Some(value) = self.buffer.take() {
154 ::fidl_next::wire::Envelope::encode_value::<
155 ::fidl_next::wire::fuchsia::Iob,
156 ___E,
157 >(
158 value, preallocated.encoder, &mut out, ()
159 )?;
160 } else {
161 ::fidl_next::wire::Envelope::encode_zero(&mut out)
162 }
163 }
164
165 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
166 }
167 unsafe {
168 preallocated.write_next(out.assume_init_ref());
169 }
170 }
171
172 ::fidl_next::wire::Table::encode_len(table, max_ord);
173
174 Ok(())
175 }
176 }
177
178 impl<'de> ::fidl_next::FromWire<crate::wire::LogSinkOnInitRequest<'de>> for LogSinkOnInitRequest {
179 #[inline]
180 fn from_wire(wire_: crate::wire::LogSinkOnInitRequest<'de>) -> Self {
181 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
182
183 let buffer = wire_.table.get(1);
184
185 let interest = wire_.table.get(2);
186
187 Self {
188
189
190 buffer: buffer.map(|envelope| ::fidl_next::FromWire::from_wire(
191 unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Iob>() }
192 )),
193
194
195 interest: interest.map(|envelope| ::fidl_next::FromWire::from_wire(
196 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_diagnostics_types::wire::Interest<'de>>() }
197 )),
198
199 }
200 }
201 }
202
203 #[derive(Debug, PartialEq)]
204 #[repr(C)]
205 pub struct LogSinkConnectStructuredRequest {
206 pub socket: ::fidl_next::fuchsia::zx::Socket,
207 }
208
209 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LogSinkConnectStructuredRequest, ___E>
210 for LogSinkConnectStructuredRequest
211 where
212 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
213 ___E: ::fidl_next::fuchsia::HandleEncoder,
214 {
215 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
216 Self,
217 crate::wire::LogSinkConnectStructuredRequest,
218 > = unsafe {
219 ::fidl_next::CopyOptimization::enable_if(
220 true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::Encode<
221 ::fidl_next::wire::fuchsia::Socket,
222 ___E,
223 >>::COPY_OPTIMIZATION
224 .is_enabled(),
225 )
226 };
227
228 #[inline]
229 fn encode(
230 self,
231 encoder_: &mut ___E,
232 out_: &mut ::core::mem::MaybeUninit<crate::wire::LogSinkConnectStructuredRequest>,
233 _: (),
234 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
235 ::fidl_next::munge! {
236 let crate::wire::LogSinkConnectStructuredRequest {
237 socket,
238
239 } = out_;
240 }
241
242 ::fidl_next::Encode::encode(self.socket, encoder_, socket, ())?;
243
244 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(socket.as_mut_ptr()) };
245
246 Ok(())
247 }
248 }
249
250 unsafe impl<___E>
251 ::fidl_next::EncodeOption<
252 ::fidl_next::wire::Box<'static, crate::wire::LogSinkConnectStructuredRequest>,
253 ___E,
254 > for LogSinkConnectStructuredRequest
255 where
256 ___E: ::fidl_next::Encoder + ?Sized,
257 LogSinkConnectStructuredRequest:
258 ::fidl_next::Encode<crate::wire::LogSinkConnectStructuredRequest, ___E>,
259 {
260 #[inline]
261 fn encode_option(
262 this: ::core::option::Option<Self>,
263 encoder: &mut ___E,
264 out: &mut ::core::mem::MaybeUninit<
265 ::fidl_next::wire::Box<'static, crate::wire::LogSinkConnectStructuredRequest>,
266 >,
267 _: (),
268 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
269 if let Some(inner) = this {
270 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
271 ::fidl_next::wire::Box::encode_present(out);
272 } else {
273 ::fidl_next::wire::Box::encode_absent(out);
274 }
275
276 Ok(())
277 }
278 }
279
280 impl ::fidl_next::FromWire<crate::wire::LogSinkConnectStructuredRequest>
281 for LogSinkConnectStructuredRequest
282 {
283 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
284 crate::wire::LogSinkConnectStructuredRequest,
285 Self,
286 > = unsafe {
287 ::fidl_next::CopyOptimization::enable_if(
288 true && <::fidl_next::fuchsia::zx::Socket as ::fidl_next::FromWire<
289 ::fidl_next::wire::fuchsia::Socket,
290 >>::COPY_OPTIMIZATION
291 .is_enabled(),
292 )
293 };
294
295 #[inline]
296 fn from_wire(wire: crate::wire::LogSinkConnectStructuredRequest) -> Self {
297 Self { socket: ::fidl_next::FromWire::from_wire(wire.socket) }
298 }
299 }
300}
301
302pub mod wire {
303
304 pub use fidl_next_common_fuchsia_logger::wire::*;
305
306 #[derive(Debug)]
308 #[repr(C)]
309 pub struct LogListenSafeRequest<'de> {
310 pub log_listener:
311 ::fidl_next::ClientEnd<crate::LogListenerSafe, ::fidl_next::wire::fuchsia::Channel>,
312
313 pub options: ::fidl_next::wire::Box<'de, crate::wire::LogFilterOptions<'de>>,
314 }
315
316 static_assertions::const_assert_eq!(std::mem::size_of::<LogListenSafeRequest<'_>>(), 16);
317 static_assertions::const_assert_eq!(std::mem::align_of::<LogListenSafeRequest<'_>>(), 8);
318
319 static_assertions::const_assert_eq!(
320 std::mem::offset_of!(LogListenSafeRequest<'_>, log_listener),
321 0
322 );
323
324 static_assertions::const_assert_eq!(std::mem::offset_of!(LogListenSafeRequest<'_>, options), 8);
325
326 impl ::fidl_next::Constrained for LogListenSafeRequest<'_> {
327 type Constraint = ();
328
329 fn validate(
330 _: ::fidl_next::Slot<'_, Self>,
331 _: Self::Constraint,
332 ) -> Result<(), ::fidl_next::ValidationError> {
333 Ok(())
334 }
335 }
336
337 unsafe impl ::fidl_next::Wire for LogListenSafeRequest<'static> {
338 type Narrowed<'de> = LogListenSafeRequest<'de>;
339
340 #[inline]
341 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
342 ::fidl_next::munge! {
343 let Self {
344
345 log_listener,
346 options,
347
348 } = &mut *out_;
349 }
350
351 ::fidl_next::Wire::zero_padding(log_listener);
352
353 ::fidl_next::Wire::zero_padding(options);
354
355 unsafe {
356 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
357 }
358 }
359 }
360
361 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogListenSafeRequest<'de>
362 where
363 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
364 ___D: ::fidl_next::Decoder<'de>,
365 ___D: ::fidl_next::fuchsia::HandleDecoder,
366 {
367 fn decode(
368 slot_: ::fidl_next::Slot<'_, Self>,
369 decoder_: &mut ___D,
370 _: (),
371 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
372 if slot_.as_bytes()[4..8] != [0u8; 4] {
373 return Err(::fidl_next::DecodeError::InvalidPadding);
374 }
375
376 ::fidl_next::munge! {
377 let Self {
378
379 mut log_listener,
380 mut options,
381
382 } = slot_;
383 }
384
385 let _field = log_listener.as_mut();
386
387 ::fidl_next::Decode::decode(log_listener.as_mut(), decoder_, ())?;
388
389 let _field = options.as_mut();
390
391 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
392
393 Ok(())
394 }
395 }
396
397 impl<'de> ::fidl_next::IntoNatural for LogListenSafeRequest<'de> {
398 type Natural = crate::natural::LogListenSafeRequest;
399 }
400
401 #[repr(C)]
403 pub struct LogSinkOnInitRequest<'de> {
404 pub(crate) table: ::fidl_next::wire::Table<'de>,
405 }
406
407 impl<'de> Drop for LogSinkOnInitRequest<'de> {
408 fn drop(&mut self) {
409 let _ = self.table.get(1).map(|envelope| unsafe {
410 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Iob>()
411 });
412
413 let _ = self.table.get(2)
414 .map(|envelope| unsafe {
415 envelope.read_unchecked::<::fidl_next_fuchsia_diagnostics_types::wire::Interest<'de>>()
416 });
417 }
418 }
419
420 impl ::fidl_next::Constrained for LogSinkOnInitRequest<'_> {
421 type Constraint = ();
422
423 fn validate(
424 _: ::fidl_next::Slot<'_, Self>,
425 _: Self::Constraint,
426 ) -> Result<(), ::fidl_next::ValidationError> {
427 Ok(())
428 }
429 }
430
431 unsafe impl ::fidl_next::Wire for LogSinkOnInitRequest<'static> {
432 type Narrowed<'de> = LogSinkOnInitRequest<'de>;
433
434 #[inline]
435 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
436 ::fidl_next::munge!(let Self { table } = out);
437 ::fidl_next::wire::Table::zero_padding(table);
438 }
439 }
440
441 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LogSinkOnInitRequest<'de>
442 where
443 ___D: ::fidl_next::Decoder<'de> + ?Sized,
444 ___D: ::fidl_next::fuchsia::HandleDecoder,
445 {
446 fn decode(
447 slot: ::fidl_next::Slot<'_, Self>,
448 decoder: &mut ___D,
449 _: (),
450 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
451 ::fidl_next::munge!(let Self { table } = slot);
452
453 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
454 match ordinal {
455 0 => unsafe { ::core::hint::unreachable_unchecked() },
456
457 1 => {
458 ::fidl_next::wire::Envelope::decode_as::<
459 ___D,
460 ::fidl_next::wire::fuchsia::Iob,
461 >(slot.as_mut(), decoder, ())?;
462
463 Ok(())
464 }
465
466 2 => {
467 ::fidl_next::wire::Envelope::decode_as::<
468 ___D,
469 ::fidl_next_fuchsia_diagnostics_types::wire::Interest<'de>,
470 >(slot.as_mut(), decoder, ())?;
471
472 Ok(())
473 }
474
475 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
476 }
477 })
478 }
479 }
480
481 impl<'de> LogSinkOnInitRequest<'de> {
482 pub fn buffer(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Iob> {
483 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
484 }
485
486 pub fn interest(
487 &self,
488 ) -> ::core::option::Option<&::fidl_next_fuchsia_diagnostics_types::wire::Interest<'de>>
489 {
490 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
491 }
492 }
493
494 impl<'de> ::core::fmt::Debug for LogSinkOnInitRequest<'de> {
495 fn fmt(
496 &self,
497 f: &mut ::core::fmt::Formatter<'_>,
498 ) -> ::core::result::Result<(), ::core::fmt::Error> {
499 f.debug_struct("LogSinkOnInitRequest")
500 .field("buffer", &self.buffer())
501 .field("interest", &self.interest())
502 .finish()
503 }
504 }
505
506 impl<'de> ::fidl_next::IntoNatural for LogSinkOnInitRequest<'de> {
507 type Natural = crate::natural::LogSinkOnInitRequest;
508 }
509
510 #[derive(Debug)]
512 #[repr(C)]
513 pub struct LogSinkConnectStructuredRequest {
514 pub socket: ::fidl_next::wire::fuchsia::Socket,
515 }
516
517 static_assertions::const_assert_eq!(std::mem::size_of::<LogSinkConnectStructuredRequest>(), 4);
518 static_assertions::const_assert_eq!(std::mem::align_of::<LogSinkConnectStructuredRequest>(), 4);
519
520 static_assertions::const_assert_eq!(
521 std::mem::offset_of!(LogSinkConnectStructuredRequest, socket),
522 0
523 );
524
525 impl ::fidl_next::Constrained for LogSinkConnectStructuredRequest {
526 type Constraint = ();
527
528 fn validate(
529 _: ::fidl_next::Slot<'_, Self>,
530 _: Self::Constraint,
531 ) -> Result<(), ::fidl_next::ValidationError> {
532 Ok(())
533 }
534 }
535
536 unsafe impl ::fidl_next::Wire for LogSinkConnectStructuredRequest {
537 type Narrowed<'de> = LogSinkConnectStructuredRequest;
538
539 #[inline]
540 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
541 ::fidl_next::munge! {
542 let Self {
543
544 socket,
545
546 } = &mut *out_;
547 }
548
549 ::fidl_next::Wire::zero_padding(socket);
550 }
551 }
552
553 unsafe impl<___D> ::fidl_next::Decode<___D> for LogSinkConnectStructuredRequest
554 where
555 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
556 ___D: ::fidl_next::fuchsia::HandleDecoder,
557 {
558 fn decode(
559 slot_: ::fidl_next::Slot<'_, Self>,
560 decoder_: &mut ___D,
561 _: (),
562 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
563 ::fidl_next::munge! {
564 let Self {
565
566 mut socket,
567
568 } = slot_;
569 }
570
571 let _field = socket.as_mut();
572
573 ::fidl_next::Decode::decode(socket.as_mut(), decoder_, ())?;
574
575 Ok(())
576 }
577 }
578
579 impl ::fidl_next::IntoNatural for LogSinkConnectStructuredRequest {
580 type Natural = crate::natural::LogSinkConnectStructuredRequest;
581 }
582}
583
584pub mod wire_optional {
585
586 pub use fidl_next_common_fuchsia_logger::wire_optional::*;
587}
588
589pub mod generic {
590
591 pub use fidl_next_common_fuchsia_logger::generic::*;
592
593 pub struct LogListenSafeRequest<T0, T1> {
594 pub log_listener: T0,
595
596 pub options: T1,
597 }
598
599 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::LogListenSafeRequest<'static>, ___E>
600 for LogListenSafeRequest<T0, T1>
601 where
602 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
603 ___E: ::fidl_next::Encoder,
604 ___E: ::fidl_next::fuchsia::HandleEncoder,
605 T0: ::fidl_next::Encode<
606 ::fidl_next::ClientEnd<crate::LogListenerSafe, ::fidl_next::wire::fuchsia::Channel>,
607 ___E,
608 >,
609 T1: ::fidl_next::Encode<
610 ::fidl_next::wire::Box<'static, crate::wire::LogFilterOptions<'static>>,
611 ___E,
612 >,
613 {
614 #[inline]
615 fn encode(
616 self,
617 encoder_: &mut ___E,
618 out_: &mut ::core::mem::MaybeUninit<crate::wire::LogListenSafeRequest<'static>>,
619 _: (),
620 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
621 ::fidl_next::munge! {
622 let crate::wire::LogListenSafeRequest {
623
624 log_listener,
625 options,
626
627 } = out_;
628 }
629
630 ::fidl_next::Encode::encode(self.log_listener, encoder_, log_listener, ())?;
631
632 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
633
634 Ok(())
635 }
636 }
637
638 pub struct LogSinkConnectStructuredRequest<T0> {
639 pub socket: T0,
640 }
641
642 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::LogSinkConnectStructuredRequest, ___E>
643 for LogSinkConnectStructuredRequest<T0>
644 where
645 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
646 ___E: ::fidl_next::fuchsia::HandleEncoder,
647 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Socket, ___E>,
648 {
649 #[inline]
650 fn encode(
651 self,
652 encoder_: &mut ___E,
653 out_: &mut ::core::mem::MaybeUninit<crate::wire::LogSinkConnectStructuredRequest>,
654 _: (),
655 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
656 ::fidl_next::munge! {
657 let crate::wire::LogSinkConnectStructuredRequest {
658
659 socket,
660
661 } = out_;
662 }
663
664 ::fidl_next::Encode::encode(self.socket, encoder_, socket, ())?;
665
666 Ok(())
667 }
668 }
669}
670
671pub use self::natural::*;
672
673#[doc = " Interface for LogListenerSafe to register to listen to logs.\n"]
675#[derive(PartialEq, Debug)]
676pub struct Log;
677
678impl ::fidl_next::Discoverable for Log {
679 const PROTOCOL_NAME: &'static str = "fuchsia.logger.Log";
680}
681
682#[cfg(target_os = "fuchsia")]
683impl ::fidl_next::HasTransport for Log {
684 type Transport = ::fidl_next::fuchsia::zx::Channel;
685}
686
687pub mod log {
688 pub mod prelude {
689 pub use crate::{Log, LogClientHandler, LogServerHandler, log};
690
691 pub use crate::natural::LogListenSafeRequest;
692 }
693
694 pub struct ListenSafe;
695
696 impl ::fidl_next::Method for ListenSafe {
697 const ORDINAL: u64 = 5643638173917143473;
698 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
699 ::fidl_next::protocol::Flexibility::Strict;
700
701 type Protocol = crate::Log;
702
703 type Request = crate::wire::LogListenSafeRequest<'static>;
704 }
705
706 mod ___detail {
707 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Log
708 where
709 ___T: ::fidl_next::Transport,
710 {
711 type Client = LogClient<___T>;
712 type Server = LogServer<___T>;
713 }
714
715 #[repr(transparent)]
717 pub struct LogClient<___T: ::fidl_next::Transport> {
718 #[allow(dead_code)]
719 client: ::fidl_next::protocol::Client<___T>,
720 }
721
722 impl<___T> LogClient<___T>
723 where
724 ___T: ::fidl_next::Transport,
725 {
726 #[doc = " Dumps all cached logs by calling LogMany() in batches followed by Log() for each new log\n message.\n A null `options` indicates no filtering is requested.\n"]
727 pub fn listen_safe(
728 &self,
729
730 log_listener: impl ::fidl_next::Encode<
731 ::fidl_next::ClientEnd<
732 crate::LogListenerSafe,
733 ::fidl_next::wire::fuchsia::Channel,
734 >,
735 <___T as ::fidl_next::Transport>::SendBuffer,
736 >,
737
738 options: impl ::fidl_next::Encode<
739 ::fidl_next::wire::Box<'static, crate::wire::LogFilterOptions<'static>>,
740 <___T as ::fidl_next::Transport>::SendBuffer,
741 >,
742 ) -> ::fidl_next::SendFuture<'_, ___T>
743 where
744 <___T as ::fidl_next::Transport>::SendBuffer:
745 ::fidl_next::encoder::InternalHandleEncoder,
746 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
747 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
748 {
749 self.listen_safe_with(crate::generic::LogListenSafeRequest {
750 log_listener,
751
752 options,
753 })
754 }
755
756 #[doc = " Dumps all cached logs by calling LogMany() in batches followed by Log() for each new log\n message.\n A null `options` indicates no filtering is requested.\n"]
757 pub fn listen_safe_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
758 where
759 ___R: ::fidl_next::Encode<
760 crate::wire::LogListenSafeRequest<'static>,
761 <___T as ::fidl_next::Transport>::SendBuffer,
762 >,
763 {
764 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
765 5643638173917143473,
766 <super::ListenSafe as ::fidl_next::Method>::FLEXIBILITY,
767 request,
768 ))
769 }
770 }
771
772 #[repr(transparent)]
774 pub struct LogServer<___T: ::fidl_next::Transport> {
775 server: ::fidl_next::protocol::Server<___T>,
776 }
777
778 impl<___T> LogServer<___T> where ___T: ::fidl_next::Transport {}
779 }
780}
781
782pub trait LogClientHandler<
786 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
787 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
788>
789{
790}
791
792impl<___T> LogClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
793
794impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Log
795where
796 ___H: LogClientHandler<___T> + ::core::marker::Send,
797 ___T: ::fidl_next::Transport,
798{
799 async fn on_event(
800 handler: &mut ___H,
801 ordinal: u64,
802 flexibility: ::fidl_next::protocol::Flexibility,
803 body: ::fidl_next::Body<___T>,
804 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
805 match ordinal {
806 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
807 }
808 }
809}
810
811pub trait LogServerHandler<
815 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
816 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
817>
818{
819 #[doc = " Dumps all cached logs by calling LogMany() in batches followed by Log() for each new log\n message.\n A null `options` indicates no filtering is requested.\n"]
820 fn listen_safe(
821 &mut self,
822
823 request: ::fidl_next::Request<log::ListenSafe, ___T>,
824 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
825}
826
827impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Log
828where
829 ___H: LogServerHandler<___T> + ::core::marker::Send,
830 ___T: ::fidl_next::Transport,
831 for<'de> crate::wire::LogListenSafeRequest<'de>: ::fidl_next::Decode<
832 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
833 Constraint = (),
834 >,
835{
836 async fn on_one_way(
837 handler: &mut ___H,
838 ordinal: u64,
839 flexibility: ::fidl_next::protocol::Flexibility,
840 body: ::fidl_next::Body<___T>,
841 ) -> ::core::result::Result<
842 (),
843 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
844 > {
845 match ordinal {
846 5643638173917143473 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
847 Ok(decoded) => {
848 handler.listen_safe(::fidl_next::Request::from_decoded(decoded)).await;
849 Ok(())
850 }
851 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
852 ordinal: 5643638173917143473,
853 error,
854 }),
855 },
856
857 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
858 }
859 }
860
861 async fn on_two_way(
862 handler: &mut ___H,
863 ordinal: u64,
864 flexibility: ::fidl_next::protocol::Flexibility,
865 body: ::fidl_next::Body<___T>,
866 responder: ::fidl_next::protocol::Responder<___T>,
867 ) -> ::core::result::Result<
868 (),
869 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
870 > {
871 match ordinal {
872 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
873 }
874 }
875}
876
877#[doc = " Drains a program\'s logs.\n"]
879#[derive(PartialEq, Debug)]
880pub struct LogSink;
881
882impl ::fidl_next::Discoverable for LogSink {
883 const PROTOCOL_NAME: &'static str = "fuchsia.logger.LogSink";
884}
885
886#[cfg(target_os = "fuchsia")]
887impl ::fidl_next::HasTransport for LogSink {
888 type Transport = ::fidl_next::fuchsia::zx::Channel;
889}
890
891pub mod log_sink {
892 pub mod prelude {
893 pub use crate::{LogSink, LogSinkClientHandler, LogSinkServerHandler, log_sink};
894
895 pub use crate::natural::InterestChangeError;
896
897 pub use crate::natural::LogSinkConnectStructuredRequest;
898
899 pub use crate::natural::LogSinkOnInitRequest;
900
901 pub use crate::natural::LogSinkWaitForInterestChangeResponse;
902 }
903
904 pub struct OnInit;
905
906 impl ::fidl_next::Method for OnInit {
907 const ORDINAL: u64 = 7052827292487084730;
908 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
909 ::fidl_next::protocol::Flexibility::Flexible;
910
911 type Protocol = crate::LogSink;
912
913 type Request = crate::wire::LogSinkOnInitRequest<'static>;
914 }
915
916 pub struct WaitForInterestChange;
917
918 impl ::fidl_next::Method for WaitForInterestChange {
919 const ORDINAL: u64 = 2138400952013124162;
920 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
921 ::fidl_next::protocol::Flexibility::Strict;
922
923 type Protocol = crate::LogSink;
924
925 type Request = ();
926 }
927
928 impl ::fidl_next::TwoWayMethod for WaitForInterestChange {
929 type Response = ::fidl_next::wire::Result<
930 'static,
931 crate::wire::LogSinkWaitForInterestChangeResponse<'static>,
932 crate::wire::InterestChangeError,
933 >;
934 }
935
936 impl<___R> ::fidl_next::Respond<___R> for WaitForInterestChange {
937 type Output = ::core::result::Result<
938 crate::generic::LogSinkWaitForInterestChangeResponse<___R>,
939 ::fidl_next::util::Never,
940 >;
941
942 fn respond(response: ___R) -> Self::Output {
943 ::core::result::Result::Ok(crate::generic::LogSinkWaitForInterestChangeResponse {
944 data: response,
945 })
946 }
947 }
948
949 impl<___R> ::fidl_next::RespondErr<___R> for WaitForInterestChange {
950 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
951
952 fn respond_err(response: ___R) -> Self::Output {
953 ::core::result::Result::Err(response)
954 }
955 }
956
957 pub struct ConnectStructured;
958
959 impl ::fidl_next::Method for ConnectStructured {
960 const ORDINAL: u64 = 7157386067685058380;
961 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
962 ::fidl_next::protocol::Flexibility::Strict;
963
964 type Protocol = crate::LogSink;
965
966 type Request = crate::wire::LogSinkConnectStructuredRequest;
967 }
968
969 mod ___detail {
970 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::LogSink
971 where
972 ___T: ::fidl_next::Transport,
973 {
974 type Client = LogSinkClient<___T>;
975 type Server = LogSinkServer<___T>;
976 }
977
978 #[repr(transparent)]
980 pub struct LogSinkClient<___T: ::fidl_next::Transport> {
981 #[allow(dead_code)]
982 client: ::fidl_next::protocol::Client<___T>,
983 }
984
985 impl<___T> LogSinkClient<___T>
986 where
987 ___T: ::fidl_next::Transport,
988 {
989 #[doc = " LogSink implementers will return to this hanging-get whenever the scope of\n their interest changes. Clients are expected to emit messages based on\n the registered Interest. In the event that an empty interest is\n conveyed, clients should emit messages based on their default\n e.g. compile time configuration. Each client may only poll this once at a time.\n Invoking WaitForInterestChange a second time before the first call returns will\n result in an error being returned.\n"]
990 pub fn wait_for_interest_change(
991 &self,
992 ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForInterestChange, ___T> {
993 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
994 2138400952013124162,
995 <super::WaitForInterestChange as ::fidl_next::Method>::FLEXIBILITY,
996 (),
997 ))
998 }
999
1000 #[doc = " Send this socket to be drained, using the structured logs format.\n\n See [Encoding structured records](https://fuchsia.dev/fuchsia-src/reference/platform-spec/diagnostics/logs-encoding)\n for what is expected to be received over the socket.\n"]
1001 pub fn connect_structured(
1002 &self,
1003
1004 socket: impl ::fidl_next::Encode<
1005 ::fidl_next::wire::fuchsia::Socket,
1006 <___T as ::fidl_next::Transport>::SendBuffer,
1007 >,
1008 ) -> ::fidl_next::SendFuture<'_, ___T>
1009 where
1010 <___T as ::fidl_next::Transport>::SendBuffer:
1011 ::fidl_next::encoder::InternalHandleEncoder,
1012 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1013 {
1014 self.connect_structured_with(crate::generic::LogSinkConnectStructuredRequest {
1015 socket,
1016 })
1017 }
1018
1019 #[doc = " Send this socket to be drained, using the structured logs format.\n\n See [Encoding structured records](https://fuchsia.dev/fuchsia-src/reference/platform-spec/diagnostics/logs-encoding)\n for what is expected to be received over the socket.\n"]
1020 pub fn connect_structured_with<___R>(
1021 &self,
1022 request: ___R,
1023 ) -> ::fidl_next::SendFuture<'_, ___T>
1024 where
1025 ___R: ::fidl_next::Encode<
1026 crate::wire::LogSinkConnectStructuredRequest,
1027 <___T as ::fidl_next::Transport>::SendBuffer,
1028 >,
1029 {
1030 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
1031 7157386067685058380,
1032 <super::ConnectStructured as ::fidl_next::Method>::FLEXIBILITY,
1033 request,
1034 ))
1035 }
1036 }
1037
1038 #[repr(transparent)]
1040 pub struct LogSinkServer<___T: ::fidl_next::Transport> {
1041 server: ::fidl_next::protocol::Server<___T>,
1042 }
1043
1044 impl<___T> LogSinkServer<___T>
1045 where
1046 ___T: ::fidl_next::Transport,
1047 {
1048 #[doc = " This event is sent whenever Archivist accepts a new connection. Clients may use\n the returned IOBuffer to write logs.\n"]
1049
1050 pub fn on_init_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
1051 where
1052 ___R: ::fidl_next::Encode<
1053 <super::OnInit as ::fidl_next::Method>::Request,
1054 <___T as ::fidl_next::Transport>::SendBuffer,
1055 >,
1056 {
1057 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
1058 7052827292487084730,
1059 <super::OnInit as ::fidl_next::Method>::FLEXIBILITY,
1060 request,
1061 ))
1062 }
1063 }
1064 }
1065}
1066
1067pub trait LogSinkClientHandler<
1071 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1072 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1073>
1074{
1075 #[doc = " This event is sent whenever Archivist accepts a new connection. Clients may use\n the returned IOBuffer to write logs.\n"]
1076 fn on_init(
1077 &mut self,
1078
1079 request: ::fidl_next::Request<log_sink::OnInit, ___T>,
1080 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1081
1082 fn on_unknown_interaction(
1083 &mut self,
1084 ordinal: u64,
1085 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1086 ::core::future::ready(())
1087 }
1088}
1089
1090impl<___T> LogSinkClientHandler<___T> for ::fidl_next::IgnoreEvents
1091where
1092 ___T: ::fidl_next::Transport,
1093{
1094 async fn on_init(&mut self, _: ::fidl_next::Request<log_sink::OnInit, ___T>) {}
1095
1096 async fn on_unknown_interaction(&mut self, _: u64) {}
1097}
1098
1099impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for LogSink
1100where
1101 ___H: LogSinkClientHandler<___T> + ::core::marker::Send,
1102 ___T: ::fidl_next::Transport,
1103 for<'de> crate::wire::LogSinkOnInitRequest<'de>: ::fidl_next::Decode<
1104 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1105 Constraint = (),
1106 >,
1107{
1108 async fn on_event(
1109 handler: &mut ___H,
1110 ordinal: u64,
1111 flexibility: ::fidl_next::protocol::Flexibility,
1112 body: ::fidl_next::Body<___T>,
1113 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1114 match ordinal {
1115 7052827292487084730 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
1116 Ok(decoded) => {
1117 handler.on_init(::fidl_next::Request::from_decoded(decoded)).await;
1118 Ok(())
1119 }
1120 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1121 ordinal: 7052827292487084730,
1122 error,
1123 }),
1124 },
1125
1126 ordinal => {
1127 handler.on_unknown_interaction(ordinal).await;
1128 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1129 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1130 } else {
1131 Ok(())
1132 }
1133 }
1134 }
1135 }
1136}
1137
1138pub trait LogSinkServerHandler<
1142 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1143 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1144>
1145{
1146 #[doc = " LogSink implementers will return to this hanging-get whenever the scope of\n their interest changes. Clients are expected to emit messages based on\n the registered Interest. In the event that an empty interest is\n conveyed, clients should emit messages based on their default\n e.g. compile time configuration. Each client may only poll this once at a time.\n Invoking WaitForInterestChange a second time before the first call returns will\n result in an error being returned.\n"]
1147 fn wait_for_interest_change(
1148 &mut self,
1149
1150 responder: ::fidl_next::Responder<log_sink::WaitForInterestChange, ___T>,
1151 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1152
1153 #[doc = " Send this socket to be drained, using the structured logs format.\n\n See [Encoding structured records](https://fuchsia.dev/fuchsia-src/reference/platform-spec/diagnostics/logs-encoding)\n for what is expected to be received over the socket.\n"]
1154 fn connect_structured(
1155 &mut self,
1156
1157 request: ::fidl_next::Request<log_sink::ConnectStructured, ___T>,
1158 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1159
1160 fn on_unknown_interaction(
1161 &mut self,
1162 ordinal: u64,
1163 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1164 ::core::future::ready(())
1165 }
1166}
1167
1168impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for LogSink
1169where
1170 ___H: LogSinkServerHandler<___T> + ::core::marker::Send,
1171 ___T: ::fidl_next::Transport,
1172 for<'de> crate::wire::LogSinkConnectStructuredRequest: ::fidl_next::Decode<
1173 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1174 Constraint = (),
1175 >,
1176{
1177 async fn on_one_way(
1178 handler: &mut ___H,
1179 ordinal: u64,
1180 flexibility: ::fidl_next::protocol::Flexibility,
1181 body: ::fidl_next::Body<___T>,
1182 ) -> ::core::result::Result<
1183 (),
1184 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1185 > {
1186 match ordinal {
1187 7157386067685058380 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
1188 Ok(decoded) => {
1189 handler.connect_structured(::fidl_next::Request::from_decoded(decoded)).await;
1190 Ok(())
1191 }
1192 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1193 ordinal: 7157386067685058380,
1194 error,
1195 }),
1196 },
1197
1198 ordinal => {
1199 handler.on_unknown_interaction(ordinal).await;
1200 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1201 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1202 } else {
1203 Ok(())
1204 }
1205 }
1206 }
1207 }
1208
1209 async fn on_two_way(
1210 handler: &mut ___H,
1211 ordinal: u64,
1212 flexibility: ::fidl_next::protocol::Flexibility,
1213 body: ::fidl_next::Body<___T>,
1214 responder: ::fidl_next::protocol::Responder<___T>,
1215 ) -> ::core::result::Result<
1216 (),
1217 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1218 > {
1219 match ordinal {
1220 2138400952013124162 => {
1221 let responder = ::fidl_next::Responder::from_untyped(responder);
1222
1223 handler.wait_for_interest_change(responder).await;
1224 Ok(())
1225 }
1226
1227 ordinal => {
1228 handler.on_unknown_interaction(ordinal).await;
1229 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
1230 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1231 } else {
1232 responder
1233 .respond(
1234 ordinal,
1235 flexibility,
1236 ::fidl_next::Flexible::<()>::FrameworkErr(
1237 ::fidl_next::FrameworkError::UnknownMethod,
1238 ),
1239 )
1240 .expect("encoding a framework error should never fail")
1241 .await?;
1242 Ok(())
1243 }
1244 }
1245 }
1246 }
1247}
1248
1249pub use fidl_next_common_fuchsia_logger::*;
1250
1251pub mod compat {
1253
1254 pub use fidl_next_common_fuchsia_logger::compat::*;
1255
1256 impl ::fidl_next::CompatFrom<crate::LogListenSafeRequest>
1257 for ::fidl_fuchsia_logger::LogListenSafeRequest
1258 {
1259 #[inline]
1260 fn compat_from(value: crate::LogListenSafeRequest) -> Self {
1261 Self {
1262 log_listener: ::fidl_next::CompatFrom::compat_from(value.log_listener),
1263
1264 options: ::fidl_next::CompatFrom::compat_from(value.options),
1265 }
1266 }
1267 }
1268
1269 impl ::fidl_next::CompatFrom<::fidl_fuchsia_logger::LogListenSafeRequest>
1270 for crate::LogListenSafeRequest
1271 {
1272 #[inline]
1273 fn compat_from(value: ::fidl_fuchsia_logger::LogListenSafeRequest) -> Self {
1274 Self {
1275 log_listener: ::fidl_next::CompatFrom::compat_from(value.log_listener),
1276
1277 options: ::fidl_next::CompatFrom::compat_from(value.options),
1278 }
1279 }
1280 }
1281
1282 #[cfg(target_os = "fuchsia")]
1283 pub type LogProxy = ::fidl_next::Client<crate::Log>;
1286
1287 impl ::fidl_next::CompatFrom<crate::Log> for ::fidl_fuchsia_logger::LogMarker {
1288 fn compat_from(_: crate::Log) -> Self {
1289 Self
1290 }
1291 }
1292
1293 impl ::fidl_next::CompatFrom<::fidl_fuchsia_logger::LogMarker> for crate::Log {
1294 fn compat_from(_: ::fidl_fuchsia_logger::LogMarker) -> Self {
1295 Self
1296 }
1297 }
1298
1299 #[cfg(target_os = "fuchsia")]
1300
1301 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_logger::LogProxy> for crate::Log {
1302 fn client_compat_from(
1303 proxy: ::fidl_fuchsia_logger::LogProxy,
1304 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
1305 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
1306 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
1307 ::fidl_next::ClientDispatcher::new(client_end)
1308 }
1309 }
1310
1311 impl ::fidl_next::CompatFrom<crate::LogSinkOnInitRequest>
1312 for ::fidl_fuchsia_logger::LogSinkOnInitRequest
1313 {
1314 fn compat_from(value: crate::LogSinkOnInitRequest) -> Self {
1315 Self {
1316 buffer: ::fidl_next::CompatFrom::compat_from(value.buffer),
1317
1318 interest: ::fidl_next::CompatFrom::compat_from(value.interest),
1319
1320 __source_breaking: ::fidl::marker::SourceBreaking,
1321 }
1322 }
1323 }
1324
1325 impl ::fidl_next::CompatFrom<::fidl_fuchsia_logger::LogSinkOnInitRequest>
1326 for crate::LogSinkOnInitRequest
1327 {
1328 fn compat_from(value: ::fidl_fuchsia_logger::LogSinkOnInitRequest) -> Self {
1329 Self {
1330 buffer: ::fidl_next::CompatFrom::compat_from(value.buffer),
1331
1332 interest: ::fidl_next::CompatFrom::compat_from(value.interest),
1333 }
1334 }
1335 }
1336
1337 impl ::fidl_next::CompatFrom<crate::LogSinkConnectStructuredRequest>
1338 for ::fidl_fuchsia_logger::LogSinkConnectStructuredRequest
1339 {
1340 #[inline]
1341 fn compat_from(value: crate::LogSinkConnectStructuredRequest) -> Self {
1342 Self { socket: ::fidl_next::CompatFrom::compat_from(value.socket) }
1343 }
1344 }
1345
1346 impl ::fidl_next::CompatFrom<::fidl_fuchsia_logger::LogSinkConnectStructuredRequest>
1347 for crate::LogSinkConnectStructuredRequest
1348 {
1349 #[inline]
1350 fn compat_from(value: ::fidl_fuchsia_logger::LogSinkConnectStructuredRequest) -> Self {
1351 Self { socket: ::fidl_next::CompatFrom::compat_from(value.socket) }
1352 }
1353 }
1354
1355 #[cfg(target_os = "fuchsia")]
1356 pub type LogSinkProxy = ::fidl_next::Client<crate::LogSink>;
1359
1360 impl ::fidl_next::CompatFrom<crate::LogSink> for ::fidl_fuchsia_logger::LogSinkMarker {
1361 fn compat_from(_: crate::LogSink) -> Self {
1362 Self
1363 }
1364 }
1365
1366 impl ::fidl_next::CompatFrom<::fidl_fuchsia_logger::LogSinkMarker> for crate::LogSink {
1367 fn compat_from(_: ::fidl_fuchsia_logger::LogSinkMarker) -> Self {
1368 Self
1369 }
1370 }
1371
1372 #[cfg(target_os = "fuchsia")]
1373
1374 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_logger::LogSinkProxy> for crate::LogSink {
1375 fn client_compat_from(
1376 proxy: ::fidl_fuchsia_logger::LogSinkProxy,
1377 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
1378 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
1379 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
1380 ::fidl_next::ClientDispatcher::new(client_end)
1381 }
1382 }
1383}