1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_diagnostics_host__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, PartialEq)]
15pub struct ArchiveAccessorStreamDiagnosticsRequest {
16 pub parameters: fidl_fuchsia_diagnostics::StreamParameters,
17 pub stream: fidl::Socket,
18}
19
20impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
21 for ArchiveAccessorStreamDiagnosticsRequest
22{
23}
24
25#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
26pub struct ArchiveAccessorMarker;
27
28impl fidl::endpoints::ProtocolMarker for ArchiveAccessorMarker {
29 type Proxy = ArchiveAccessorProxy;
30 type RequestStream = ArchiveAccessorRequestStream;
31 #[cfg(target_os = "fuchsia")]
32 type SynchronousProxy = ArchiveAccessorSynchronousProxy;
33
34 const DEBUG_NAME: &'static str = "fuchsia.diagnostics.host.ArchiveAccessor";
35}
36impl fidl::endpoints::DiscoverableProtocolMarker for ArchiveAccessorMarker {}
37
38pub trait ArchiveAccessorProxyInterface: Send + Sync {
39 type StreamDiagnosticsResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
40 fn r#stream_diagnostics(
41 &self,
42 parameters: &fidl_fuchsia_diagnostics::StreamParameters,
43 stream: fidl::Socket,
44 ) -> Self::StreamDiagnosticsResponseFut;
45}
46#[derive(Debug)]
47#[cfg(target_os = "fuchsia")]
48pub struct ArchiveAccessorSynchronousProxy {
49 client: fidl::client::sync::Client,
50}
51
52#[cfg(target_os = "fuchsia")]
53impl fidl::endpoints::SynchronousProxy for ArchiveAccessorSynchronousProxy {
54 type Proxy = ArchiveAccessorProxy;
55 type Protocol = ArchiveAccessorMarker;
56
57 fn from_channel(inner: fidl::Channel) -> Self {
58 Self::new(inner)
59 }
60
61 fn into_channel(self) -> fidl::Channel {
62 self.client.into_channel()
63 }
64
65 fn as_channel(&self) -> &fidl::Channel {
66 self.client.as_channel()
67 }
68}
69
70#[cfg(target_os = "fuchsia")]
71impl ArchiveAccessorSynchronousProxy {
72 pub fn new(channel: fidl::Channel) -> Self {
73 let protocol_name = <ArchiveAccessorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
74 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
75 }
76
77 pub fn into_channel(self) -> fidl::Channel {
78 self.client.into_channel()
79 }
80
81 pub fn wait_for_event(
84 &self,
85 deadline: zx::MonotonicInstant,
86 ) -> Result<ArchiveAccessorEvent, fidl::Error> {
87 ArchiveAccessorEvent::decode(self.client.wait_for_event(deadline)?)
88 }
89
90 pub fn r#stream_diagnostics(
106 &self,
107 mut parameters: &fidl_fuchsia_diagnostics::StreamParameters,
108 mut stream: fidl::Socket,
109 ___deadline: zx::MonotonicInstant,
110 ) -> Result<(), fidl::Error> {
111 let _response = self.client.send_query::<
112 ArchiveAccessorStreamDiagnosticsRequest,
113 fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
114 >(
115 (parameters, stream,),
116 0x29635237a23c495b,
117 fidl::encoding::DynamicFlags::FLEXIBLE,
118 ___deadline,
119 )?
120 .into_result::<ArchiveAccessorMarker>("stream_diagnostics")?;
121 Ok(_response)
122 }
123}
124
125#[cfg(target_os = "fuchsia")]
126impl From<ArchiveAccessorSynchronousProxy> for zx::NullableHandle {
127 fn from(value: ArchiveAccessorSynchronousProxy) -> Self {
128 value.into_channel().into()
129 }
130}
131
132#[cfg(target_os = "fuchsia")]
133impl From<fidl::Channel> for ArchiveAccessorSynchronousProxy {
134 fn from(value: fidl::Channel) -> Self {
135 Self::new(value)
136 }
137}
138
139#[cfg(target_os = "fuchsia")]
140impl fidl::endpoints::FromClient for ArchiveAccessorSynchronousProxy {
141 type Protocol = ArchiveAccessorMarker;
142
143 fn from_client(value: fidl::endpoints::ClientEnd<ArchiveAccessorMarker>) -> Self {
144 Self::new(value.into_channel())
145 }
146}
147
148#[derive(Debug, Clone)]
149pub struct ArchiveAccessorProxy {
150 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
151}
152
153impl fidl::endpoints::Proxy for ArchiveAccessorProxy {
154 type Protocol = ArchiveAccessorMarker;
155
156 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
157 Self::new(inner)
158 }
159
160 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
161 self.client.into_channel().map_err(|client| Self { client })
162 }
163
164 fn as_channel(&self) -> &::fidl::AsyncChannel {
165 self.client.as_channel()
166 }
167}
168
169impl ArchiveAccessorProxy {
170 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
172 let protocol_name = <ArchiveAccessorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
173 Self { client: fidl::client::Client::new(channel, protocol_name) }
174 }
175
176 pub fn take_event_stream(&self) -> ArchiveAccessorEventStream {
182 ArchiveAccessorEventStream { event_receiver: self.client.take_event_receiver() }
183 }
184
185 pub fn r#stream_diagnostics(
201 &self,
202 mut parameters: &fidl_fuchsia_diagnostics::StreamParameters,
203 mut stream: fidl::Socket,
204 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
205 ArchiveAccessorProxyInterface::r#stream_diagnostics(self, parameters, stream)
206 }
207}
208
209impl ArchiveAccessorProxyInterface for ArchiveAccessorProxy {
210 type StreamDiagnosticsResponseFut =
211 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
212 fn r#stream_diagnostics(
213 &self,
214 mut parameters: &fidl_fuchsia_diagnostics::StreamParameters,
215 mut stream: fidl::Socket,
216 ) -> Self::StreamDiagnosticsResponseFut {
217 fn _decode(
218 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
219 ) -> Result<(), fidl::Error> {
220 let _response = fidl::client::decode_transaction_body::<
221 fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>,
222 fidl::encoding::DefaultFuchsiaResourceDialect,
223 0x29635237a23c495b,
224 >(_buf?)?
225 .into_result::<ArchiveAccessorMarker>("stream_diagnostics")?;
226 Ok(_response)
227 }
228 self.client.send_query_and_decode::<ArchiveAccessorStreamDiagnosticsRequest, ()>(
229 (parameters, stream),
230 0x29635237a23c495b,
231 fidl::encoding::DynamicFlags::FLEXIBLE,
232 _decode,
233 )
234 }
235}
236
237pub struct ArchiveAccessorEventStream {
238 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
239}
240
241impl std::marker::Unpin for ArchiveAccessorEventStream {}
242
243impl futures::stream::FusedStream for ArchiveAccessorEventStream {
244 fn is_terminated(&self) -> bool {
245 self.event_receiver.is_terminated()
246 }
247}
248
249impl futures::Stream for ArchiveAccessorEventStream {
250 type Item = Result<ArchiveAccessorEvent, fidl::Error>;
251
252 fn poll_next(
253 mut self: std::pin::Pin<&mut Self>,
254 cx: &mut std::task::Context<'_>,
255 ) -> std::task::Poll<Option<Self::Item>> {
256 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
257 &mut self.event_receiver,
258 cx
259 )?) {
260 Some(buf) => std::task::Poll::Ready(Some(ArchiveAccessorEvent::decode(buf))),
261 None => std::task::Poll::Ready(None),
262 }
263 }
264}
265
266#[derive(Debug)]
267pub enum ArchiveAccessorEvent {
268 #[non_exhaustive]
269 _UnknownEvent {
270 ordinal: u64,
272 },
273}
274
275impl ArchiveAccessorEvent {
276 fn decode(
278 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
279 ) -> Result<ArchiveAccessorEvent, fidl::Error> {
280 let (bytes, _handles) = buf.split_mut();
281 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
282 debug_assert_eq!(tx_header.tx_id, 0);
283 match tx_header.ordinal {
284 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
285 Ok(ArchiveAccessorEvent::_UnknownEvent { ordinal: tx_header.ordinal })
286 }
287 _ => Err(fidl::Error::UnknownOrdinal {
288 ordinal: tx_header.ordinal,
289 protocol_name:
290 <ArchiveAccessorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
291 }),
292 }
293 }
294}
295
296pub struct ArchiveAccessorRequestStream {
298 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
299 is_terminated: bool,
300}
301
302impl std::marker::Unpin for ArchiveAccessorRequestStream {}
303
304impl futures::stream::FusedStream for ArchiveAccessorRequestStream {
305 fn is_terminated(&self) -> bool {
306 self.is_terminated
307 }
308}
309
310impl fidl::endpoints::RequestStream for ArchiveAccessorRequestStream {
311 type Protocol = ArchiveAccessorMarker;
312 type ControlHandle = ArchiveAccessorControlHandle;
313
314 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
315 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
316 }
317
318 fn control_handle(&self) -> Self::ControlHandle {
319 ArchiveAccessorControlHandle { inner: self.inner.clone() }
320 }
321
322 fn into_inner(
323 self,
324 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
325 {
326 (self.inner, self.is_terminated)
327 }
328
329 fn from_inner(
330 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
331 is_terminated: bool,
332 ) -> Self {
333 Self { inner, is_terminated }
334 }
335}
336
337impl futures::Stream for ArchiveAccessorRequestStream {
338 type Item = Result<ArchiveAccessorRequest, fidl::Error>;
339
340 fn poll_next(
341 mut self: std::pin::Pin<&mut Self>,
342 cx: &mut std::task::Context<'_>,
343 ) -> std::task::Poll<Option<Self::Item>> {
344 let this = &mut *self;
345 if this.inner.check_shutdown(cx) {
346 this.is_terminated = true;
347 return std::task::Poll::Ready(None);
348 }
349 if this.is_terminated {
350 panic!("polled ArchiveAccessorRequestStream after completion");
351 }
352 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
353 |bytes, handles| {
354 match this.inner.channel().read_etc(cx, bytes, handles) {
355 std::task::Poll::Ready(Ok(())) => {}
356 std::task::Poll::Pending => return std::task::Poll::Pending,
357 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
358 this.is_terminated = true;
359 return std::task::Poll::Ready(None);
360 }
361 std::task::Poll::Ready(Err(e)) => {
362 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
363 e.into(),
364 ))));
365 }
366 }
367
368 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
370
371 std::task::Poll::Ready(Some(match header.ordinal {
372 0x29635237a23c495b => {
373 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
374 let mut req = fidl::new_empty!(
375 ArchiveAccessorStreamDiagnosticsRequest,
376 fidl::encoding::DefaultFuchsiaResourceDialect
377 );
378 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArchiveAccessorStreamDiagnosticsRequest>(&header, _body_bytes, handles, &mut req)?;
379 let control_handle =
380 ArchiveAccessorControlHandle { inner: this.inner.clone() };
381 Ok(ArchiveAccessorRequest::StreamDiagnostics {
382 parameters: req.parameters,
383 stream: req.stream,
384
385 responder: ArchiveAccessorStreamDiagnosticsResponder {
386 control_handle: std::mem::ManuallyDrop::new(control_handle),
387 tx_id: header.tx_id,
388 },
389 })
390 }
391 _ if header.tx_id == 0
392 && header
393 .dynamic_flags()
394 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
395 {
396 Ok(ArchiveAccessorRequest::_UnknownMethod {
397 ordinal: header.ordinal,
398 control_handle: ArchiveAccessorControlHandle {
399 inner: this.inner.clone(),
400 },
401 method_type: fidl::MethodType::OneWay,
402 })
403 }
404 _ if header
405 .dynamic_flags()
406 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
407 {
408 this.inner.send_framework_err(
409 fidl::encoding::FrameworkErr::UnknownMethod,
410 header.tx_id,
411 header.ordinal,
412 header.dynamic_flags(),
413 (bytes, handles),
414 )?;
415 Ok(ArchiveAccessorRequest::_UnknownMethod {
416 ordinal: header.ordinal,
417 control_handle: ArchiveAccessorControlHandle {
418 inner: this.inner.clone(),
419 },
420 method_type: fidl::MethodType::TwoWay,
421 })
422 }
423 _ => Err(fidl::Error::UnknownOrdinal {
424 ordinal: header.ordinal,
425 protocol_name:
426 <ArchiveAccessorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
427 }),
428 }))
429 },
430 )
431 }
432}
433
434#[derive(Debug)]
435pub enum ArchiveAccessorRequest {
436 StreamDiagnostics {
452 parameters: fidl_fuchsia_diagnostics::StreamParameters,
453 stream: fidl::Socket,
454 responder: ArchiveAccessorStreamDiagnosticsResponder,
455 },
456 #[non_exhaustive]
458 _UnknownMethod {
459 ordinal: u64,
461 control_handle: ArchiveAccessorControlHandle,
462 method_type: fidl::MethodType,
463 },
464}
465
466impl ArchiveAccessorRequest {
467 #[allow(irrefutable_let_patterns)]
468 pub fn into_stream_diagnostics(
469 self,
470 ) -> Option<(
471 fidl_fuchsia_diagnostics::StreamParameters,
472 fidl::Socket,
473 ArchiveAccessorStreamDiagnosticsResponder,
474 )> {
475 if let ArchiveAccessorRequest::StreamDiagnostics { parameters, stream, responder } = self {
476 Some((parameters, stream, responder))
477 } else {
478 None
479 }
480 }
481
482 pub fn method_name(&self) -> &'static str {
484 match *self {
485 ArchiveAccessorRequest::StreamDiagnostics { .. } => "stream_diagnostics",
486 ArchiveAccessorRequest::_UnknownMethod {
487 method_type: fidl::MethodType::OneWay,
488 ..
489 } => "unknown one-way method",
490 ArchiveAccessorRequest::_UnknownMethod {
491 method_type: fidl::MethodType::TwoWay,
492 ..
493 } => "unknown two-way method",
494 }
495 }
496}
497
498#[derive(Debug, Clone)]
499pub struct ArchiveAccessorControlHandle {
500 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
501}
502
503impl fidl::endpoints::ControlHandle for ArchiveAccessorControlHandle {
504 fn shutdown(&self) {
505 self.inner.shutdown()
506 }
507
508 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
509 self.inner.shutdown_with_epitaph(status)
510 }
511
512 fn is_closed(&self) -> bool {
513 self.inner.channel().is_closed()
514 }
515 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
516 self.inner.channel().on_closed()
517 }
518
519 #[cfg(target_os = "fuchsia")]
520 fn signal_peer(
521 &self,
522 clear_mask: zx::Signals,
523 set_mask: zx::Signals,
524 ) -> Result<(), zx_status::Status> {
525 use fidl::Peered;
526 self.inner.channel().signal_peer(clear_mask, set_mask)
527 }
528}
529
530impl ArchiveAccessorControlHandle {}
531
532#[must_use = "FIDL methods require a response to be sent"]
533#[derive(Debug)]
534pub struct ArchiveAccessorStreamDiagnosticsResponder {
535 control_handle: std::mem::ManuallyDrop<ArchiveAccessorControlHandle>,
536 tx_id: u32,
537}
538
539impl std::ops::Drop for ArchiveAccessorStreamDiagnosticsResponder {
543 fn drop(&mut self) {
544 self.control_handle.shutdown();
545 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
547 }
548}
549
550impl fidl::endpoints::Responder for ArchiveAccessorStreamDiagnosticsResponder {
551 type ControlHandle = ArchiveAccessorControlHandle;
552
553 fn control_handle(&self) -> &ArchiveAccessorControlHandle {
554 &self.control_handle
555 }
556
557 fn drop_without_shutdown(mut self) {
558 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
560 std::mem::forget(self);
562 }
563}
564
565impl ArchiveAccessorStreamDiagnosticsResponder {
566 pub fn send(self) -> Result<(), fidl::Error> {
570 let _result = self.send_raw();
571 if _result.is_err() {
572 self.control_handle.shutdown();
573 }
574 self.drop_without_shutdown();
575 _result
576 }
577
578 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
580 let _result = self.send_raw();
581 self.drop_without_shutdown();
582 _result
583 }
584
585 fn send_raw(&self) -> Result<(), fidl::Error> {
586 self.control_handle.inner.send::<fidl::encoding::FlexibleType<fidl::encoding::EmptyStruct>>(
587 fidl::encoding::Flexible::new(()),
588 self.tx_id,
589 0x29635237a23c495b,
590 fidl::encoding::DynamicFlags::FLEXIBLE,
591 )
592 }
593}
594
595mod internal {
596 use super::*;
597
598 impl fidl::encoding::ResourceTypeMarker for ArchiveAccessorStreamDiagnosticsRequest {
599 type Borrowed<'a> = &'a mut Self;
600 fn take_or_borrow<'a>(
601 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
602 ) -> Self::Borrowed<'a> {
603 value
604 }
605 }
606
607 unsafe impl fidl::encoding::TypeMarker for ArchiveAccessorStreamDiagnosticsRequest {
608 type Owned = Self;
609
610 #[inline(always)]
611 fn inline_align(_context: fidl::encoding::Context) -> usize {
612 8
613 }
614
615 #[inline(always)]
616 fn inline_size(_context: fidl::encoding::Context) -> usize {
617 24
618 }
619 }
620
621 unsafe impl
622 fidl::encoding::Encode<
623 ArchiveAccessorStreamDiagnosticsRequest,
624 fidl::encoding::DefaultFuchsiaResourceDialect,
625 > for &mut ArchiveAccessorStreamDiagnosticsRequest
626 {
627 #[inline]
628 unsafe fn encode(
629 self,
630 encoder: &mut fidl::encoding::Encoder<
631 '_,
632 fidl::encoding::DefaultFuchsiaResourceDialect,
633 >,
634 offset: usize,
635 _depth: fidl::encoding::Depth,
636 ) -> fidl::Result<()> {
637 encoder.debug_check_bounds::<ArchiveAccessorStreamDiagnosticsRequest>(offset);
638 fidl::encoding::Encode::<ArchiveAccessorStreamDiagnosticsRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
640 (
641 <fidl_fuchsia_diagnostics::StreamParameters as fidl::encoding::ValueTypeMarker>::borrow(&self.parameters),
642 <fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 16392> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
643 ),
644 encoder, offset, _depth
645 )
646 }
647 }
648 unsafe impl<
649 T0: fidl::encoding::Encode<
650 fidl_fuchsia_diagnostics::StreamParameters,
651 fidl::encoding::DefaultFuchsiaResourceDialect,
652 >,
653 T1: fidl::encoding::Encode<
654 fidl::encoding::HandleType<
655 fidl::Socket,
656 { fidl::ObjectType::SOCKET.into_raw() },
657 16392,
658 >,
659 fidl::encoding::DefaultFuchsiaResourceDialect,
660 >,
661 >
662 fidl::encoding::Encode<
663 ArchiveAccessorStreamDiagnosticsRequest,
664 fidl::encoding::DefaultFuchsiaResourceDialect,
665 > for (T0, T1)
666 {
667 #[inline]
668 unsafe fn encode(
669 self,
670 encoder: &mut fidl::encoding::Encoder<
671 '_,
672 fidl::encoding::DefaultFuchsiaResourceDialect,
673 >,
674 offset: usize,
675 depth: fidl::encoding::Depth,
676 ) -> fidl::Result<()> {
677 encoder.debug_check_bounds::<ArchiveAccessorStreamDiagnosticsRequest>(offset);
678 unsafe {
681 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
682 (ptr as *mut u64).write_unaligned(0);
683 }
684 self.0.encode(encoder, offset + 0, depth)?;
686 self.1.encode(encoder, offset + 16, depth)?;
687 Ok(())
688 }
689 }
690
691 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
692 for ArchiveAccessorStreamDiagnosticsRequest
693 {
694 #[inline(always)]
695 fn new_empty() -> Self {
696 Self {
697 parameters: fidl::new_empty!(
698 fidl_fuchsia_diagnostics::StreamParameters,
699 fidl::encoding::DefaultFuchsiaResourceDialect
700 ),
701 stream: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 16392>, fidl::encoding::DefaultFuchsiaResourceDialect),
702 }
703 }
704
705 #[inline]
706 unsafe fn decode(
707 &mut self,
708 decoder: &mut fidl::encoding::Decoder<
709 '_,
710 fidl::encoding::DefaultFuchsiaResourceDialect,
711 >,
712 offset: usize,
713 _depth: fidl::encoding::Depth,
714 ) -> fidl::Result<()> {
715 decoder.debug_check_bounds::<Self>(offset);
716 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
718 let padval = unsafe { (ptr as *const u64).read_unaligned() };
719 let mask = 0xffffffff00000000u64;
720 let maskedval = padval & mask;
721 if maskedval != 0 {
722 return Err(fidl::Error::NonZeroPadding {
723 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
724 });
725 }
726 fidl::decode!(
727 fidl_fuchsia_diagnostics::StreamParameters,
728 fidl::encoding::DefaultFuchsiaResourceDialect,
729 &mut self.parameters,
730 decoder,
731 offset + 0,
732 _depth
733 )?;
734 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 16392>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.stream, decoder, offset + 16, _depth)?;
735 Ok(())
736 }
737 }
738}