fidl_fuchsia_posix_socket_packet/
fidl_fuchsia_posix_socket_packet.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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_posix_socket_packet_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct ProviderSocketResponse {
16    pub socket: fidl::endpoints::ClientEnd<SocketMarker>,
17}
18
19impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ProviderSocketResponse {}
20
21#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
22pub struct SocketAttachBpfFilterUnsafeRequest {
23    pub code: Vec<u64>,
24}
25
26impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
27    for SocketAttachBpfFilterUnsafeRequest
28{
29}
30
31#[derive(Debug, Default, PartialEq)]
32pub struct SocketDescribeResponse {
33    /// Signals additional information about the state of the socket such as
34    /// readiness or shutdown-ness.
35    pub event: Option<fidl::EventPair>,
36    #[doc(hidden)]
37    pub __source_breaking: fidl::marker::SourceBreaking,
38}
39
40impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SocketDescribeResponse {}
41
42#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
43pub struct ProviderMarker;
44
45impl fidl::endpoints::ProtocolMarker for ProviderMarker {
46    type Proxy = ProviderProxy;
47    type RequestStream = ProviderRequestStream;
48    #[cfg(target_os = "fuchsia")]
49    type SynchronousProxy = ProviderSynchronousProxy;
50
51    const DEBUG_NAME: &'static str = "fuchsia.posix.socket.packet.Provider";
52}
53impl fidl::endpoints::DiscoverableProtocolMarker for ProviderMarker {}
54pub type ProviderSocketResult =
55    Result<fidl::endpoints::ClientEnd<SocketMarker>, fidl_fuchsia_posix::Errno>;
56
57pub trait ProviderProxyInterface: Send + Sync {
58    type SocketResponseFut: std::future::Future<Output = Result<ProviderSocketResult, fidl::Error>>
59        + Send;
60    fn r#socket(&self, kind: Kind) -> Self::SocketResponseFut;
61}
62#[derive(Debug)]
63#[cfg(target_os = "fuchsia")]
64pub struct ProviderSynchronousProxy {
65    client: fidl::client::sync::Client,
66}
67
68#[cfg(target_os = "fuchsia")]
69impl fidl::endpoints::SynchronousProxy for ProviderSynchronousProxy {
70    type Proxy = ProviderProxy;
71    type Protocol = ProviderMarker;
72
73    fn from_channel(inner: fidl::Channel) -> Self {
74        Self::new(inner)
75    }
76
77    fn into_channel(self) -> fidl::Channel {
78        self.client.into_channel()
79    }
80
81    fn as_channel(&self) -> &fidl::Channel {
82        self.client.as_channel()
83    }
84}
85
86#[cfg(target_os = "fuchsia")]
87impl ProviderSynchronousProxy {
88    pub fn new(channel: fidl::Channel) -> Self {
89        let protocol_name = <ProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
90        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
91    }
92
93    pub fn into_channel(self) -> fidl::Channel {
94        self.client.into_channel()
95    }
96
97    /// Waits until an event arrives and returns it. It is safe for other
98    /// threads to make concurrent requests while waiting for an event.
99    pub fn wait_for_event(
100        &self,
101        deadline: zx::MonotonicInstant,
102    ) -> Result<ProviderEvent, fidl::Error> {
103        ProviderEvent::decode(self.client.wait_for_event(deadline)?)
104    }
105
106    /// Requests a packet socket.
107    ///
108    /// + request `kind` the kind of packet socket to create.
109    /// - response `socket` the packet socket.
110    pub fn r#socket(
111        &self,
112        mut kind: Kind,
113        ___deadline: zx::MonotonicInstant,
114    ) -> Result<ProviderSocketResult, fidl::Error> {
115        let _response =
116            self.client.send_query::<ProviderSocketRequest, fidl::encoding::ResultType<
117                ProviderSocketResponse,
118                fidl_fuchsia_posix::Errno,
119            >>(
120                (kind,),
121                0x3aad2da99889858e,
122                fidl::encoding::DynamicFlags::empty(),
123                ___deadline,
124            )?;
125        Ok(_response.map(|x| x.socket))
126    }
127}
128
129#[derive(Debug, Clone)]
130pub struct ProviderProxy {
131    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
132}
133
134impl fidl::endpoints::Proxy for ProviderProxy {
135    type Protocol = ProviderMarker;
136
137    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
138        Self::new(inner)
139    }
140
141    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
142        self.client.into_channel().map_err(|client| Self { client })
143    }
144
145    fn as_channel(&self) -> &::fidl::AsyncChannel {
146        self.client.as_channel()
147    }
148}
149
150impl ProviderProxy {
151    /// Create a new Proxy for fuchsia.posix.socket.packet/Provider.
152    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
153        let protocol_name = <ProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
154        Self { client: fidl::client::Client::new(channel, protocol_name) }
155    }
156
157    /// Get a Stream of events from the remote end of the protocol.
158    ///
159    /// # Panics
160    ///
161    /// Panics if the event stream was already taken.
162    pub fn take_event_stream(&self) -> ProviderEventStream {
163        ProviderEventStream { event_receiver: self.client.take_event_receiver() }
164    }
165
166    /// Requests a packet socket.
167    ///
168    /// + request `kind` the kind of packet socket to create.
169    /// - response `socket` the packet socket.
170    pub fn r#socket(
171        &self,
172        mut kind: Kind,
173    ) -> fidl::client::QueryResponseFut<
174        ProviderSocketResult,
175        fidl::encoding::DefaultFuchsiaResourceDialect,
176    > {
177        ProviderProxyInterface::r#socket(self, kind)
178    }
179}
180
181impl ProviderProxyInterface for ProviderProxy {
182    type SocketResponseFut = fidl::client::QueryResponseFut<
183        ProviderSocketResult,
184        fidl::encoding::DefaultFuchsiaResourceDialect,
185    >;
186    fn r#socket(&self, mut kind: Kind) -> Self::SocketResponseFut {
187        fn _decode(
188            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
189        ) -> Result<ProviderSocketResult, fidl::Error> {
190            let _response = fidl::client::decode_transaction_body::<
191                fidl::encoding::ResultType<ProviderSocketResponse, fidl_fuchsia_posix::Errno>,
192                fidl::encoding::DefaultFuchsiaResourceDialect,
193                0x3aad2da99889858e,
194            >(_buf?)?;
195            Ok(_response.map(|x| x.socket))
196        }
197        self.client.send_query_and_decode::<ProviderSocketRequest, ProviderSocketResult>(
198            (kind,),
199            0x3aad2da99889858e,
200            fidl::encoding::DynamicFlags::empty(),
201            _decode,
202        )
203    }
204}
205
206pub struct ProviderEventStream {
207    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
208}
209
210impl std::marker::Unpin for ProviderEventStream {}
211
212impl futures::stream::FusedStream for ProviderEventStream {
213    fn is_terminated(&self) -> bool {
214        self.event_receiver.is_terminated()
215    }
216}
217
218impl futures::Stream for ProviderEventStream {
219    type Item = Result<ProviderEvent, fidl::Error>;
220
221    fn poll_next(
222        mut self: std::pin::Pin<&mut Self>,
223        cx: &mut std::task::Context<'_>,
224    ) -> std::task::Poll<Option<Self::Item>> {
225        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
226            &mut self.event_receiver,
227            cx
228        )?) {
229            Some(buf) => std::task::Poll::Ready(Some(ProviderEvent::decode(buf))),
230            None => std::task::Poll::Ready(None),
231        }
232    }
233}
234
235#[derive(Debug)]
236pub enum ProviderEvent {}
237
238impl ProviderEvent {
239    /// Decodes a message buffer as a [`ProviderEvent`].
240    fn decode(
241        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
242    ) -> Result<ProviderEvent, fidl::Error> {
243        let (bytes, _handles) = buf.split_mut();
244        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
245        debug_assert_eq!(tx_header.tx_id, 0);
246        match tx_header.ordinal {
247            _ => Err(fidl::Error::UnknownOrdinal {
248                ordinal: tx_header.ordinal,
249                protocol_name: <ProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
250            }),
251        }
252    }
253}
254
255/// A Stream of incoming requests for fuchsia.posix.socket.packet/Provider.
256pub struct ProviderRequestStream {
257    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
258    is_terminated: bool,
259}
260
261impl std::marker::Unpin for ProviderRequestStream {}
262
263impl futures::stream::FusedStream for ProviderRequestStream {
264    fn is_terminated(&self) -> bool {
265        self.is_terminated
266    }
267}
268
269impl fidl::endpoints::RequestStream for ProviderRequestStream {
270    type Protocol = ProviderMarker;
271    type ControlHandle = ProviderControlHandle;
272
273    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
274        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
275    }
276
277    fn control_handle(&self) -> Self::ControlHandle {
278        ProviderControlHandle { inner: self.inner.clone() }
279    }
280
281    fn into_inner(
282        self,
283    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
284    {
285        (self.inner, self.is_terminated)
286    }
287
288    fn from_inner(
289        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
290        is_terminated: bool,
291    ) -> Self {
292        Self { inner, is_terminated }
293    }
294}
295
296impl futures::Stream for ProviderRequestStream {
297    type Item = Result<ProviderRequest, fidl::Error>;
298
299    fn poll_next(
300        mut self: std::pin::Pin<&mut Self>,
301        cx: &mut std::task::Context<'_>,
302    ) -> std::task::Poll<Option<Self::Item>> {
303        let this = &mut *self;
304        if this.inner.check_shutdown(cx) {
305            this.is_terminated = true;
306            return std::task::Poll::Ready(None);
307        }
308        if this.is_terminated {
309            panic!("polled ProviderRequestStream after completion");
310        }
311        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
312            |bytes, handles| {
313                match this.inner.channel().read_etc(cx, bytes, handles) {
314                    std::task::Poll::Ready(Ok(())) => {}
315                    std::task::Poll::Pending => return std::task::Poll::Pending,
316                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
317                        this.is_terminated = true;
318                        return std::task::Poll::Ready(None);
319                    }
320                    std::task::Poll::Ready(Err(e)) => {
321                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
322                            e.into(),
323                        ))))
324                    }
325                }
326
327                // A message has been received from the channel
328                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
329
330                std::task::Poll::Ready(Some(match header.ordinal {
331                    0x3aad2da99889858e => {
332                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
333                        let mut req = fidl::new_empty!(
334                            ProviderSocketRequest,
335                            fidl::encoding::DefaultFuchsiaResourceDialect
336                        );
337                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ProviderSocketRequest>(&header, _body_bytes, handles, &mut req)?;
338                        let control_handle = ProviderControlHandle { inner: this.inner.clone() };
339                        Ok(ProviderRequest::Socket {
340                            kind: req.kind,
341
342                            responder: ProviderSocketResponder {
343                                control_handle: std::mem::ManuallyDrop::new(control_handle),
344                                tx_id: header.tx_id,
345                            },
346                        })
347                    }
348                    _ => Err(fidl::Error::UnknownOrdinal {
349                        ordinal: header.ordinal,
350                        protocol_name:
351                            <ProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
352                    }),
353                }))
354            },
355        )
356    }
357}
358
359/// A packet socket provider.
360#[derive(Debug)]
361pub enum ProviderRequest {
362    /// Requests a packet socket.
363    ///
364    /// + request `kind` the kind of packet socket to create.
365    /// - response `socket` the packet socket.
366    Socket { kind: Kind, responder: ProviderSocketResponder },
367}
368
369impl ProviderRequest {
370    #[allow(irrefutable_let_patterns)]
371    pub fn into_socket(self) -> Option<(Kind, ProviderSocketResponder)> {
372        if let ProviderRequest::Socket { kind, responder } = self {
373            Some((kind, responder))
374        } else {
375            None
376        }
377    }
378
379    /// Name of the method defined in FIDL
380    pub fn method_name(&self) -> &'static str {
381        match *self {
382            ProviderRequest::Socket { .. } => "socket",
383        }
384    }
385}
386
387#[derive(Debug, Clone)]
388pub struct ProviderControlHandle {
389    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
390}
391
392impl fidl::endpoints::ControlHandle for ProviderControlHandle {
393    fn shutdown(&self) {
394        self.inner.shutdown()
395    }
396    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
397        self.inner.shutdown_with_epitaph(status)
398    }
399
400    fn is_closed(&self) -> bool {
401        self.inner.channel().is_closed()
402    }
403    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
404        self.inner.channel().on_closed()
405    }
406
407    #[cfg(target_os = "fuchsia")]
408    fn signal_peer(
409        &self,
410        clear_mask: zx::Signals,
411        set_mask: zx::Signals,
412    ) -> Result<(), zx_status::Status> {
413        use fidl::Peered;
414        self.inner.channel().signal_peer(clear_mask, set_mask)
415    }
416}
417
418impl ProviderControlHandle {}
419
420#[must_use = "FIDL methods require a response to be sent"]
421#[derive(Debug)]
422pub struct ProviderSocketResponder {
423    control_handle: std::mem::ManuallyDrop<ProviderControlHandle>,
424    tx_id: u32,
425}
426
427/// Set the the channel to be shutdown (see [`ProviderControlHandle::shutdown`])
428/// if the responder is dropped without sending a response, so that the client
429/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
430impl std::ops::Drop for ProviderSocketResponder {
431    fn drop(&mut self) {
432        self.control_handle.shutdown();
433        // Safety: drops once, never accessed again
434        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
435    }
436}
437
438impl fidl::endpoints::Responder for ProviderSocketResponder {
439    type ControlHandle = ProviderControlHandle;
440
441    fn control_handle(&self) -> &ProviderControlHandle {
442        &self.control_handle
443    }
444
445    fn drop_without_shutdown(mut self) {
446        // Safety: drops once, never accessed again due to mem::forget
447        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
448        // Prevent Drop from running (which would shut down the channel)
449        std::mem::forget(self);
450    }
451}
452
453impl ProviderSocketResponder {
454    /// Sends a response to the FIDL transaction.
455    ///
456    /// Sets the channel to shutdown if an error occurs.
457    pub fn send(
458        self,
459        mut result: Result<fidl::endpoints::ClientEnd<SocketMarker>, fidl_fuchsia_posix::Errno>,
460    ) -> Result<(), fidl::Error> {
461        let _result = self.send_raw(result);
462        if _result.is_err() {
463            self.control_handle.shutdown();
464        }
465        self.drop_without_shutdown();
466        _result
467    }
468
469    /// Similar to "send" but does not shutdown the channel if an error occurs.
470    pub fn send_no_shutdown_on_err(
471        self,
472        mut result: Result<fidl::endpoints::ClientEnd<SocketMarker>, fidl_fuchsia_posix::Errno>,
473    ) -> Result<(), fidl::Error> {
474        let _result = self.send_raw(result);
475        self.drop_without_shutdown();
476        _result
477    }
478
479    fn send_raw(
480        &self,
481        mut result: Result<fidl::endpoints::ClientEnd<SocketMarker>, fidl_fuchsia_posix::Errno>,
482    ) -> Result<(), fidl::Error> {
483        self.control_handle.inner.send::<fidl::encoding::ResultType<
484            ProviderSocketResponse,
485            fidl_fuchsia_posix::Errno,
486        >>(
487            result.map(|socket| (socket,)),
488            self.tx_id,
489            0x3aad2da99889858e,
490            fidl::encoding::DynamicFlags::empty(),
491        )
492    }
493}
494
495#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
496pub struct SocketMarker;
497
498impl fidl::endpoints::ProtocolMarker for SocketMarker {
499    type Proxy = SocketProxy;
500    type RequestStream = SocketRequestStream;
501    #[cfg(target_os = "fuchsia")]
502    type SynchronousProxy = SocketSynchronousProxy;
503
504    const DEBUG_NAME: &'static str = "fuchsia.posix.socket.packet.Socket";
505}
506impl fidl::endpoints::DiscoverableProtocolMarker for SocketMarker {}
507pub type SocketBindResult = Result<(), fidl_fuchsia_posix::Errno>;
508pub type SocketGetInfoResult =
509    Result<(Kind, Option<Box<ProtocolAssociation>>, BoundInterface), fidl_fuchsia_posix::Errno>;
510pub type SocketRecvMsgResult =
511    Result<(Option<Box<RecvPacketInfo>>, Vec<u8>, RecvControlData, u32), fidl_fuchsia_posix::Errno>;
512pub type SocketSendMsgResult = Result<(), fidl_fuchsia_posix::Errno>;
513pub type SocketAttachBpfFilterUnsafeResult = Result<(), fidl_fuchsia_posix::Errno>;
514
515pub trait SocketProxyInterface: Send + Sync {
516    fn r#clone(
517        &self,
518        request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
519    ) -> Result<(), fidl::Error>;
520    type CloseResponseFut: std::future::Future<
521            Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
522        > + Send;
523    fn r#close(&self) -> Self::CloseResponseFut;
524    type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
525    fn r#query(&self) -> Self::QueryResponseFut;
526    type SetReuseAddressResponseFut: std::future::Future<
527            Output = Result<
528                fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressResult,
529                fidl::Error,
530            >,
531        > + Send;
532    fn r#set_reuse_address(&self, value: bool) -> Self::SetReuseAddressResponseFut;
533    type GetReuseAddressResponseFut: std::future::Future<
534            Output = Result<
535                fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResult,
536                fidl::Error,
537            >,
538        > + Send;
539    fn r#get_reuse_address(&self) -> Self::GetReuseAddressResponseFut;
540    type GetErrorResponseFut: std::future::Future<
541            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetErrorResult, fidl::Error>,
542        > + Send;
543    fn r#get_error(&self) -> Self::GetErrorResponseFut;
544    type SetBroadcastResponseFut: std::future::Future<
545            Output = Result<fidl_fuchsia_posix_socket::BaseSocketSetBroadcastResult, fidl::Error>,
546        > + Send;
547    fn r#set_broadcast(&self, value: bool) -> Self::SetBroadcastResponseFut;
548    type GetBroadcastResponseFut: std::future::Future<
549            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResult, fidl::Error>,
550        > + Send;
551    fn r#get_broadcast(&self) -> Self::GetBroadcastResponseFut;
552    type SetSendBufferResponseFut: std::future::Future<
553            Output = Result<fidl_fuchsia_posix_socket::BaseSocketSetSendBufferResult, fidl::Error>,
554        > + Send;
555    fn r#set_send_buffer(&self, value_bytes: u64) -> Self::SetSendBufferResponseFut;
556    type GetSendBufferResponseFut: std::future::Future<
557            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResult, fidl::Error>,
558        > + Send;
559    fn r#get_send_buffer(&self) -> Self::GetSendBufferResponseFut;
560    type SetReceiveBufferResponseFut: std::future::Future<
561            Output = Result<
562                fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferResult,
563                fidl::Error,
564            >,
565        > + Send;
566    fn r#set_receive_buffer(&self, value_bytes: u64) -> Self::SetReceiveBufferResponseFut;
567    type GetReceiveBufferResponseFut: std::future::Future<
568            Output = Result<
569                fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResult,
570                fidl::Error,
571            >,
572        > + Send;
573    fn r#get_receive_buffer(&self) -> Self::GetReceiveBufferResponseFut;
574    type SetKeepAliveResponseFut: std::future::Future<
575            Output = Result<fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveResult, fidl::Error>,
576        > + Send;
577    fn r#set_keep_alive(&self, value: bool) -> Self::SetKeepAliveResponseFut;
578    type GetKeepAliveResponseFut: std::future::Future<
579            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResult, fidl::Error>,
580        > + Send;
581    fn r#get_keep_alive(&self) -> Self::GetKeepAliveResponseFut;
582    type SetOutOfBandInlineResponseFut: std::future::Future<
583            Output = Result<
584                fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineResult,
585                fidl::Error,
586            >,
587        > + Send;
588    fn r#set_out_of_band_inline(&self, value: bool) -> Self::SetOutOfBandInlineResponseFut;
589    type GetOutOfBandInlineResponseFut: std::future::Future<
590            Output = Result<
591                fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResult,
592                fidl::Error,
593            >,
594        > + Send;
595    fn r#get_out_of_band_inline(&self) -> Self::GetOutOfBandInlineResponseFut;
596    type SetNoCheckResponseFut: std::future::Future<
597            Output = Result<fidl_fuchsia_posix_socket::BaseSocketSetNoCheckResult, fidl::Error>,
598        > + Send;
599    fn r#set_no_check(&self, value: bool) -> Self::SetNoCheckResponseFut;
600    type GetNoCheckResponseFut: std::future::Future<
601            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResult, fidl::Error>,
602        > + Send;
603    fn r#get_no_check(&self) -> Self::GetNoCheckResponseFut;
604    type SetLingerResponseFut: std::future::Future<
605            Output = Result<fidl_fuchsia_posix_socket::BaseSocketSetLingerResult, fidl::Error>,
606        > + Send;
607    fn r#set_linger(&self, linger: bool, length_secs: u32) -> Self::SetLingerResponseFut;
608    type GetLingerResponseFut: std::future::Future<
609            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetLingerResult, fidl::Error>,
610        > + Send;
611    fn r#get_linger(&self) -> Self::GetLingerResponseFut;
612    type SetReusePortResponseFut: std::future::Future<
613            Output = Result<fidl_fuchsia_posix_socket::BaseSocketSetReusePortResult, fidl::Error>,
614        > + Send;
615    fn r#set_reuse_port(&self, value: bool) -> Self::SetReusePortResponseFut;
616    type GetReusePortResponseFut: std::future::Future<
617            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetReusePortResult, fidl::Error>,
618        > + Send;
619    fn r#get_reuse_port(&self) -> Self::GetReusePortResponseFut;
620    type GetAcceptConnResponseFut: std::future::Future<
621            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResult, fidl::Error>,
622        > + Send;
623    fn r#get_accept_conn(&self) -> Self::GetAcceptConnResponseFut;
624    type SetBindToDeviceResponseFut: std::future::Future<
625            Output = Result<
626                fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceResult,
627                fidl::Error,
628            >,
629        > + Send;
630    fn r#set_bind_to_device(&self, value: &str) -> Self::SetBindToDeviceResponseFut;
631    type GetBindToDeviceResponseFut: std::future::Future<
632            Output = Result<
633                fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResult,
634                fidl::Error,
635            >,
636        > + Send;
637    fn r#get_bind_to_device(&self) -> Self::GetBindToDeviceResponseFut;
638    type SetBindToInterfaceIndexResponseFut: std::future::Future<
639            Output = Result<
640                fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexResult,
641                fidl::Error,
642            >,
643        > + Send;
644    fn r#set_bind_to_interface_index(&self, value: u64)
645        -> Self::SetBindToInterfaceIndexResponseFut;
646    type GetBindToInterfaceIndexResponseFut: std::future::Future<
647            Output = Result<
648                fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResult,
649                fidl::Error,
650            >,
651        > + Send;
652    fn r#get_bind_to_interface_index(&self) -> Self::GetBindToInterfaceIndexResponseFut;
653    type SetTimestampResponseFut: std::future::Future<
654            Output = Result<fidl_fuchsia_posix_socket::BaseSocketSetTimestampResult, fidl::Error>,
655        > + Send;
656    fn r#set_timestamp(
657        &self,
658        value: fidl_fuchsia_posix_socket::TimestampOption,
659    ) -> Self::SetTimestampResponseFut;
660    type GetTimestampResponseFut: std::future::Future<
661            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetTimestampResult, fidl::Error>,
662        > + Send;
663    fn r#get_timestamp(&self) -> Self::GetTimestampResponseFut;
664    type SetMarkResponseFut: std::future::Future<
665            Output = Result<fidl_fuchsia_posix_socket::BaseSocketSetMarkResult, fidl::Error>,
666        > + Send;
667    fn r#set_mark(
668        &self,
669        domain: fidl_fuchsia_net::MarkDomain,
670        mark: &fidl_fuchsia_posix_socket::OptionalUint32,
671    ) -> Self::SetMarkResponseFut;
672    type GetMarkResponseFut: std::future::Future<
673            Output = Result<fidl_fuchsia_posix_socket::BaseSocketGetMarkResult, fidl::Error>,
674        > + Send;
675    fn r#get_mark(&self, domain: fidl_fuchsia_net::MarkDomain) -> Self::GetMarkResponseFut;
676    type DescribeResponseFut: std::future::Future<Output = Result<SocketDescribeResponse, fidl::Error>>
677        + Send;
678    fn r#describe(&self) -> Self::DescribeResponseFut;
679    type BindResponseFut: std::future::Future<Output = Result<SocketBindResult, fidl::Error>> + Send;
680    fn r#bind(
681        &self,
682        protocol: Option<&ProtocolAssociation>,
683        bound_interface_id: &BoundInterfaceId,
684    ) -> Self::BindResponseFut;
685    type GetInfoResponseFut: std::future::Future<Output = Result<SocketGetInfoResult, fidl::Error>>
686        + Send;
687    fn r#get_info(&self) -> Self::GetInfoResponseFut;
688    type RecvMsgResponseFut: std::future::Future<Output = Result<SocketRecvMsgResult, fidl::Error>>
689        + Send;
690    fn r#recv_msg(
691        &self,
692        want_packet_info: bool,
693        data_len: u32,
694        want_control: bool,
695        flags: fidl_fuchsia_posix_socket::RecvMsgFlags,
696    ) -> Self::RecvMsgResponseFut;
697    type SendMsgResponseFut: std::future::Future<Output = Result<SocketSendMsgResult, fidl::Error>>
698        + Send;
699    fn r#send_msg(
700        &self,
701        packet_info: Option<&PacketInfo>,
702        data: &[u8],
703        control: &SendControlData,
704        flags: fidl_fuchsia_posix_socket::SendMsgFlags,
705    ) -> Self::SendMsgResponseFut;
706    type AttachBpfFilterUnsafeResponseFut: std::future::Future<Output = Result<SocketAttachBpfFilterUnsafeResult, fidl::Error>>
707        + Send;
708    fn r#attach_bpf_filter_unsafe(&self, code: &[u64]) -> Self::AttachBpfFilterUnsafeResponseFut;
709}
710#[derive(Debug)]
711#[cfg(target_os = "fuchsia")]
712pub struct SocketSynchronousProxy {
713    client: fidl::client::sync::Client,
714}
715
716#[cfg(target_os = "fuchsia")]
717impl fidl::endpoints::SynchronousProxy for SocketSynchronousProxy {
718    type Proxy = SocketProxy;
719    type Protocol = SocketMarker;
720
721    fn from_channel(inner: fidl::Channel) -> Self {
722        Self::new(inner)
723    }
724
725    fn into_channel(self) -> fidl::Channel {
726        self.client.into_channel()
727    }
728
729    fn as_channel(&self) -> &fidl::Channel {
730        self.client.as_channel()
731    }
732}
733
734#[cfg(target_os = "fuchsia")]
735impl SocketSynchronousProxy {
736    pub fn new(channel: fidl::Channel) -> Self {
737        let protocol_name = <SocketMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
738        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
739    }
740
741    pub fn into_channel(self) -> fidl::Channel {
742        self.client.into_channel()
743    }
744
745    /// Waits until an event arrives and returns it. It is safe for other
746    /// threads to make concurrent requests while waiting for an event.
747    pub fn wait_for_event(
748        &self,
749        deadline: zx::MonotonicInstant,
750    ) -> Result<SocketEvent, fidl::Error> {
751        SocketEvent::decode(self.client.wait_for_event(deadline)?)
752    }
753
754    pub fn r#clone(
755        &self,
756        mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
757    ) -> Result<(), fidl::Error> {
758        self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
759            (request,),
760            0x20d8a7aba2168a79,
761            fidl::encoding::DynamicFlags::empty(),
762        )
763    }
764
765    /// Terminates the connection.
766    ///
767    /// After calling `Close`, the client must not send any other requests.
768    ///
769    /// Servers, after sending the status response, should close the connection
770    /// regardless of status and without sending an epitaph.
771    ///
772    /// Closing the client end of the channel should be semantically equivalent
773    /// to calling `Close` without knowing when the close has completed or its
774    /// status.
775    pub fn r#close(
776        &self,
777        ___deadline: zx::MonotonicInstant,
778    ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
779        let _response = self.client.send_query::<
780            fidl::encoding::EmptyPayload,
781            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
782        >(
783            (),
784            0x5ac5d459ad7f657e,
785            fidl::encoding::DynamicFlags::empty(),
786            ___deadline,
787        )?;
788        Ok(_response.map(|x| x))
789    }
790
791    pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
792        let _response = self.client.send_query::<
793            fidl::encoding::EmptyPayload,
794            fidl_fuchsia_unknown::QueryableQueryResponse,
795        >(
796            (),
797            0x2658edee9decfc06,
798            fidl::encoding::DynamicFlags::empty(),
799            ___deadline,
800        )?;
801        Ok(_response.protocol)
802    }
803
804    /// Set `SOL_SOCKET` -> `SO_REUSEADDR`.
805    pub fn r#set_reuse_address(
806        &self,
807        mut value: bool,
808        ___deadline: zx::MonotonicInstant,
809    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressResult, fidl::Error> {
810        let _response = self.client.send_query::<
811            fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressRequest,
812            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
813        >(
814            (value,),
815            0x1fd74ee8b9a4a876,
816            fidl::encoding::DynamicFlags::empty(),
817            ___deadline,
818        )?;
819        Ok(_response.map(|x| x))
820    }
821
822    /// Get `SOL_SOCKET` -> `SO_REUSEADDR`.
823    pub fn r#get_reuse_address(
824        &self,
825        ___deadline: zx::MonotonicInstant,
826    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResult, fidl::Error> {
827        let _response = self
828            .client
829            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
830                fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResponse,
831                fidl_fuchsia_posix::Errno,
832            >>(
833                (), 0x67b7206b8d1bc0a5, fidl::encoding::DynamicFlags::empty(), ___deadline
834            )?;
835        Ok(_response.map(|x| x.value))
836    }
837
838    /// Get `SOL_SOCKET` -> `SO_ERROR`.
839    /// Returns the last error if there is an error set on the socket.
840    pub fn r#get_error(
841        &self,
842        ___deadline: zx::MonotonicInstant,
843    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetErrorResult, fidl::Error> {
844        let _response =
845            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
846                fidl::encoding::EmptyStruct,
847                fidl_fuchsia_posix::Errno,
848            >>(
849                (),
850                0x5aad39b33e5f6ebb,
851                fidl::encoding::DynamicFlags::empty(),
852                ___deadline,
853            )?;
854        Ok(_response.map(|x| x))
855    }
856
857    /// Set `SOL_SOCKET` -> `SO_BROADCAST`.
858    pub fn r#set_broadcast(
859        &self,
860        mut value: bool,
861        ___deadline: zx::MonotonicInstant,
862    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetBroadcastResult, fidl::Error> {
863        let _response = self.client.send_query::<
864            fidl_fuchsia_posix_socket::BaseSocketSetBroadcastRequest,
865            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
866        >(
867            (value,),
868            0x6023e081ce3cd947,
869            fidl::encoding::DynamicFlags::empty(),
870            ___deadline,
871        )?;
872        Ok(_response.map(|x| x))
873    }
874
875    /// Get `SOL_SOCKET` -> `SO_BROADCAST`.
876    pub fn r#get_broadcast(
877        &self,
878        ___deadline: zx::MonotonicInstant,
879    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResult, fidl::Error> {
880        let _response = self
881            .client
882            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
883                fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResponse,
884                fidl_fuchsia_posix::Errno,
885            >>(
886                (), 0x68796fc556f9780d, fidl::encoding::DynamicFlags::empty(), ___deadline
887            )?;
888        Ok(_response.map(|x| x.value))
889    }
890
891    /// Set `SOL_SOCKET` -> `SO_SNDBUF`.
892    pub fn r#set_send_buffer(
893        &self,
894        mut value_bytes: u64,
895        ___deadline: zx::MonotonicInstant,
896    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetSendBufferResult, fidl::Error> {
897        let _response = self.client.send_query::<
898            fidl_fuchsia_posix_socket::BaseSocketSetSendBufferRequest,
899            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
900        >(
901            (value_bytes,),
902            0x756eac32d73a7a70,
903            fidl::encoding::DynamicFlags::empty(),
904            ___deadline,
905        )?;
906        Ok(_response.map(|x| x))
907    }
908
909    /// Get `SOL_SOCKET` -> `SO_SNDBUF`.
910    pub fn r#get_send_buffer(
911        &self,
912        ___deadline: zx::MonotonicInstant,
913    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResult, fidl::Error> {
914        let _response = self
915            .client
916            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
917                fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResponse,
918                fidl_fuchsia_posix::Errno,
919            >>(
920                (), 0x78a52fd9c7b2410b, fidl::encoding::DynamicFlags::empty(), ___deadline
921            )?;
922        Ok(_response.map(|x| x.value_bytes))
923    }
924
925    /// Set `SOL_SOCKET` -> `SO_RCVBUF`.
926    pub fn r#set_receive_buffer(
927        &self,
928        mut value_bytes: u64,
929        ___deadline: zx::MonotonicInstant,
930    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferResult, fidl::Error> {
931        let _response = self.client.send_query::<
932            fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferRequest,
933            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
934        >(
935            (value_bytes,),
936            0x6b0cf2f1919c7001,
937            fidl::encoding::DynamicFlags::empty(),
938            ___deadline,
939        )?;
940        Ok(_response.map(|x| x))
941    }
942
943    /// Get `SOL_SOCKET` -> `SO_RCVBUF`.
944    pub fn r#get_receive_buffer(
945        &self,
946        ___deadline: zx::MonotonicInstant,
947    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResult, fidl::Error> {
948        let _response = self
949            .client
950            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
951                fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResponse,
952                fidl_fuchsia_posix::Errno,
953            >>(
954                (), 0x14c1a4b64f709e5c, fidl::encoding::DynamicFlags::empty(), ___deadline
955            )?;
956        Ok(_response.map(|x| x.value_bytes))
957    }
958
959    /// Set `SOL_SOCKET` -> `SO_KEEPALIVE`.
960    pub fn r#set_keep_alive(
961        &self,
962        mut value: bool,
963        ___deadline: zx::MonotonicInstant,
964    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveResult, fidl::Error> {
965        let _response = self.client.send_query::<
966            fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveRequest,
967            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
968        >(
969            (value,),
970            0x572df8f0b920d2c7,
971            fidl::encoding::DynamicFlags::empty(),
972            ___deadline,
973        )?;
974        Ok(_response.map(|x| x))
975    }
976
977    /// Get `SOL_SOCKET` -> `SO_KEEPALIVE`.
978    pub fn r#get_keep_alive(
979        &self,
980        ___deadline: zx::MonotonicInstant,
981    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResult, fidl::Error> {
982        let _response = self
983            .client
984            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
985                fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResponse,
986                fidl_fuchsia_posix::Errno,
987            >>(
988                (), 0x2dd29d3215f2c9d2, fidl::encoding::DynamicFlags::empty(), ___deadline
989            )?;
990        Ok(_response.map(|x| x.value))
991    }
992
993    /// Set `SOL_SOCKET` -> `SO_OOBINLINE`.
994    pub fn r#set_out_of_band_inline(
995        &self,
996        mut value: bool,
997        ___deadline: zx::MonotonicInstant,
998    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineResult, fidl::Error> {
999        let _response = self.client.send_query::<
1000            fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineRequest,
1001            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1002        >(
1003            (value,),
1004            0x3ecb49968bee439,
1005            fidl::encoding::DynamicFlags::empty(),
1006            ___deadline,
1007        )?;
1008        Ok(_response.map(|x| x))
1009    }
1010
1011    /// Get `SOL_SOCKET` -> `SO_OOBINLINE`.
1012    pub fn r#get_out_of_band_inline(
1013        &self,
1014        ___deadline: zx::MonotonicInstant,
1015    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResult, fidl::Error> {
1016        let _response = self
1017            .client
1018            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1019                fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResponse,
1020                fidl_fuchsia_posix::Errno,
1021            >>(
1022                (), 0x348c1ab3aeca1745, fidl::encoding::DynamicFlags::empty(), ___deadline
1023            )?;
1024        Ok(_response.map(|x| x.value))
1025    }
1026
1027    /// Set `SOL_SOCKET` -> `SO_NO_CHECK`.
1028    pub fn r#set_no_check(
1029        &self,
1030        mut value: bool,
1031        ___deadline: zx::MonotonicInstant,
1032    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetNoCheckResult, fidl::Error> {
1033        let _response = self.client.send_query::<
1034            fidl_fuchsia_posix_socket::BaseSocketSetNoCheckRequest,
1035            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1036        >(
1037            (value,),
1038            0x6bbf00c53a4c78c2,
1039            fidl::encoding::DynamicFlags::empty(),
1040            ___deadline,
1041        )?;
1042        Ok(_response.map(|x| x))
1043    }
1044
1045    /// Get `SOL_SOCKET` -> `SO_NO_CHECK`.
1046    pub fn r#get_no_check(
1047        &self,
1048        ___deadline: zx::MonotonicInstant,
1049    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResult, fidl::Error> {
1050        let _response = self
1051            .client
1052            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1053                fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResponse,
1054                fidl_fuchsia_posix::Errno,
1055            >>(
1056                (), 0x2cd4249286417694, fidl::encoding::DynamicFlags::empty(), ___deadline
1057            )?;
1058        Ok(_response.map(|x| x.value))
1059    }
1060
1061    /// Set `SOL_SOCKET` -> `SO_LINGER`.
1062    pub fn r#set_linger(
1063        &self,
1064        mut linger: bool,
1065        mut length_secs: u32,
1066        ___deadline: zx::MonotonicInstant,
1067    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetLingerResult, fidl::Error> {
1068        let _response = self.client.send_query::<
1069            fidl_fuchsia_posix_socket::BaseSocketSetLingerRequest,
1070            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1071        >(
1072            (linger, length_secs,),
1073            0x45386351246e998e,
1074            fidl::encoding::DynamicFlags::empty(),
1075            ___deadline,
1076        )?;
1077        Ok(_response.map(|x| x))
1078    }
1079
1080    /// Get `SOL_SOCKET` -> `SO_LINGER`.
1081    pub fn r#get_linger(
1082        &self,
1083        ___deadline: zx::MonotonicInstant,
1084    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetLingerResult, fidl::Error> {
1085        let _response = self
1086            .client
1087            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1088                fidl_fuchsia_posix_socket::BaseSocketGetLingerResponse,
1089                fidl_fuchsia_posix::Errno,
1090            >>(
1091                (), 0x48eb20fc5ccb0e45, fidl::encoding::DynamicFlags::empty(), ___deadline
1092            )?;
1093        Ok(_response.map(|x| (x.linger, x.length_secs)))
1094    }
1095
1096    /// Set `SOL_SOCKET` -> `SO_REUSEPORT`.
1097    pub fn r#set_reuse_port(
1098        &self,
1099        mut value: bool,
1100        ___deadline: zx::MonotonicInstant,
1101    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetReusePortResult, fidl::Error> {
1102        let _response = self.client.send_query::<
1103            fidl_fuchsia_posix_socket::BaseSocketSetReusePortRequest,
1104            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1105        >(
1106            (value,),
1107            0x24dd3e5cb36d9ccb,
1108            fidl::encoding::DynamicFlags::empty(),
1109            ___deadline,
1110        )?;
1111        Ok(_response.map(|x| x))
1112    }
1113
1114    /// Get `SOL_SOCKET` -> `SO_REUSEPORT`.
1115    pub fn r#get_reuse_port(
1116        &self,
1117        ___deadline: zx::MonotonicInstant,
1118    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetReusePortResult, fidl::Error> {
1119        let _response = self
1120            .client
1121            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1122                fidl_fuchsia_posix_socket::BaseSocketGetReusePortResponse,
1123                fidl_fuchsia_posix::Errno,
1124            >>(
1125                (), 0x7a112c1ab54ff828, fidl::encoding::DynamicFlags::empty(), ___deadline
1126            )?;
1127        Ok(_response.map(|x| x.value))
1128    }
1129
1130    /// Get `SOL_SOCKET` -> `SO_ACCEPTCONN`.
1131    pub fn r#get_accept_conn(
1132        &self,
1133        ___deadline: zx::MonotonicInstant,
1134    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResult, fidl::Error> {
1135        let _response = self
1136            .client
1137            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1138                fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResponse,
1139                fidl_fuchsia_posix::Errno,
1140            >>(
1141                (), 0x67ce6db6c2ec8966, fidl::encoding::DynamicFlags::empty(), ___deadline
1142            )?;
1143        Ok(_response.map(|x| x.value))
1144    }
1145
1146    /// Set `SOL_SOCKET` -> `SO_BINDTODEVICE`.
1147    pub fn r#set_bind_to_device(
1148        &self,
1149        mut value: &str,
1150        ___deadline: zx::MonotonicInstant,
1151    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceResult, fidl::Error> {
1152        let _response = self.client.send_query::<
1153            fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceRequest,
1154            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1155        >(
1156            (value,),
1157            0x2118b483f28aafc4,
1158            fidl::encoding::DynamicFlags::empty(),
1159            ___deadline,
1160        )?;
1161        Ok(_response.map(|x| x))
1162    }
1163
1164    /// Get `SOL_SOCKET` -> `SO_BINDTODEVICE`.
1165    pub fn r#get_bind_to_device(
1166        &self,
1167        ___deadline: zx::MonotonicInstant,
1168    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResult, fidl::Error> {
1169        let _response = self
1170            .client
1171            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1172                fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResponse,
1173                fidl_fuchsia_posix::Errno,
1174            >>(
1175                (), 0x1ab1fbf0ef7906c8, fidl::encoding::DynamicFlags::empty(), ___deadline
1176            )?;
1177        Ok(_response.map(|x| x.value))
1178    }
1179
1180    /// Set `SOL_SOCKET` -> `SO_BINDTOIFINDEX`.
1181    /// If `value` is 0, this clears the bound interface.
1182    pub fn r#set_bind_to_interface_index(
1183        &self,
1184        mut value: u64,
1185        ___deadline: zx::MonotonicInstant,
1186    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexResult, fidl::Error>
1187    {
1188        let _response = self.client.send_query::<
1189            fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexRequest,
1190            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1191        >(
1192            (value,),
1193            0x6e387a0def00821,
1194            fidl::encoding::DynamicFlags::empty(),
1195            ___deadline,
1196        )?;
1197        Ok(_response.map(|x| x))
1198    }
1199
1200    /// Get `SOL_SOCKET` -> `SO_BINDTOIFINDEX`.
1201    pub fn r#get_bind_to_interface_index(
1202        &self,
1203        ___deadline: zx::MonotonicInstant,
1204    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResult, fidl::Error>
1205    {
1206        let _response = self
1207            .client
1208            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1209                fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResponse,
1210                fidl_fuchsia_posix::Errno,
1211            >>(
1212                (), 0x59c31dd3e3078295, fidl::encoding::DynamicFlags::empty(), ___deadline
1213            )?;
1214        Ok(_response.map(|x| x.value))
1215    }
1216
1217    /// Set `SOL_SOCKET` -> `SO_TIMESTAMP` or `SO_TIMESTAMPNS`.
1218    pub fn r#set_timestamp(
1219        &self,
1220        mut value: fidl_fuchsia_posix_socket::TimestampOption,
1221        ___deadline: zx::MonotonicInstant,
1222    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetTimestampResult, fidl::Error> {
1223        let _response = self.client.send_query::<
1224            fidl_fuchsia_posix_socket::BaseSocketSetTimestampRequest,
1225            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1226        >(
1227            (value,),
1228            0x285d6516c263d839,
1229            fidl::encoding::DynamicFlags::empty(),
1230            ___deadline,
1231        )?;
1232        Ok(_response.map(|x| x))
1233    }
1234
1235    /// Get `SOL_SOCKET` -> `SO_TIMESTAMP` or `SO_TIMESTAMPNS`.
1236    pub fn r#get_timestamp(
1237        &self,
1238        ___deadline: zx::MonotonicInstant,
1239    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetTimestampResult, fidl::Error> {
1240        let _response = self
1241            .client
1242            .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1243                fidl_fuchsia_posix_socket::BaseSocketGetTimestampResponse,
1244                fidl_fuchsia_posix::Errno,
1245            >>(
1246                (), 0x49f2fffbbcc2bd27, fidl::encoding::DynamicFlags::empty(), ___deadline
1247            )?;
1248        Ok(_response.map(|x| x.value))
1249    }
1250
1251    /// Like setting `SOL_SOCKET` -> `SO_MARK`. The major difference is that
1252    /// unlike the standard SO_MARK, this API has multiple mark domains and each
1253    /// mark can be set independently in each domain.
1254    pub fn r#set_mark(
1255        &self,
1256        mut domain: fidl_fuchsia_net::MarkDomain,
1257        mut mark: &fidl_fuchsia_posix_socket::OptionalUint32,
1258        ___deadline: zx::MonotonicInstant,
1259    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetMarkResult, fidl::Error> {
1260        let _response = self.client.send_query::<
1261            fidl_fuchsia_posix_socket::BaseSocketSetMarkRequest,
1262            fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1263        >(
1264            (domain, mark,),
1265            0x6ead6de09f653236,
1266            fidl::encoding::DynamicFlags::empty(),
1267            ___deadline,
1268        )?;
1269        Ok(_response.map(|x| x))
1270    }
1271
1272    /// Like getting `SOL_SOCKET` -> `SO_MARK`. The major difference is that
1273    /// unlike the standard SO_MARK, this API has multiple mark domains and each
1274    /// mark can be retrieved independently in each domain.
1275    pub fn r#get_mark(
1276        &self,
1277        mut domain: fidl_fuchsia_net::MarkDomain,
1278        ___deadline: zx::MonotonicInstant,
1279    ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetMarkResult, fidl::Error> {
1280        let _response = self.client.send_query::<
1281            fidl_fuchsia_posix_socket::BaseSocketGetMarkRequest,
1282            fidl::encoding::ResultType<fidl_fuchsia_posix_socket::BaseSocketGetMarkResponse, fidl_fuchsia_posix::Errno>,
1283        >(
1284            (domain,),
1285            0x57a2752c61d93d47,
1286            fidl::encoding::DynamicFlags::empty(),
1287            ___deadline,
1288        )?;
1289        Ok(_response.map(|x| x.mark))
1290    }
1291
1292    pub fn r#describe(
1293        &self,
1294        ___deadline: zx::MonotonicInstant,
1295    ) -> Result<SocketDescribeResponse, fidl::Error> {
1296        let _response =
1297            self.client.send_query::<fidl::encoding::EmptyPayload, SocketDescribeResponse>(
1298                (),
1299                0x4fd7c08c9c804484,
1300                fidl::encoding::DynamicFlags::empty(),
1301                ___deadline,
1302            )?;
1303        Ok(_response)
1304    }
1305
1306    /// Bind the socket to a protocol and/or interface.
1307    ///
1308    /// + request `protocol` the socket's new protocol association.
1309    /// + request `bound_interface_id` the socket's new interface binding.
1310    pub fn r#bind(
1311        &self,
1312        mut protocol: Option<&ProtocolAssociation>,
1313        mut bound_interface_id: &BoundInterfaceId,
1314        ___deadline: zx::MonotonicInstant,
1315    ) -> Result<SocketBindResult, fidl::Error> {
1316        let _response = self.client.send_query::<SocketBindRequest, fidl::encoding::ResultType<
1317            fidl::encoding::EmptyStruct,
1318            fidl_fuchsia_posix::Errno,
1319        >>(
1320            (protocol, bound_interface_id),
1321            0x6caedb2d31b56db8,
1322            fidl::encoding::DynamicFlags::empty(),
1323            ___deadline,
1324        )?;
1325        Ok(_response.map(|x| x))
1326    }
1327
1328    /// Returns the the socket's properties.
1329    ///
1330    /// - response `kind` the socket's `Kind`.
1331    /// - response `protocol` the socket's protocol association, if associated.
1332    /// - response `bound_interface` properties of the socket's interface
1333    ///   binding.
1334    pub fn r#get_info(
1335        &self,
1336        ___deadline: zx::MonotonicInstant,
1337    ) -> Result<SocketGetInfoResult, fidl::Error> {
1338        let _response =
1339            self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
1340                SocketGetInfoResponse,
1341                fidl_fuchsia_posix::Errno,
1342            >>(
1343                (),
1344                0x7f67457e85c3914c,
1345                fidl::encoding::DynamicFlags::empty(),
1346                ___deadline,
1347            )?;
1348        Ok(_response.map(|x| (x.kind, x.protocol, x.bound_interface)))
1349    }
1350
1351    /// Receives a message from the socket.
1352    ///
1353    /// + request `want_packet_info` request information about the packet to be
1354    ///   returned.
1355    /// + request `data_len` the maximum allowed length of the response data
1356    ///   buffer.
1357    /// + request `want_control` request ancillary data to be returned.
1358    /// + request `flags` flags for the receive request.
1359    /// - response `packet_info` information about the packet, if requested.
1360    /// - response `data` the message.
1361    /// - response `control` control messages, if requested.
1362    /// - response `truncated` indicates whether or not the returned message
1363    ///   was truncated.
1364    pub fn r#recv_msg(
1365        &self,
1366        mut want_packet_info: bool,
1367        mut data_len: u32,
1368        mut want_control: bool,
1369        mut flags: fidl_fuchsia_posix_socket::RecvMsgFlags,
1370        ___deadline: zx::MonotonicInstant,
1371    ) -> Result<SocketRecvMsgResult, fidl::Error> {
1372        let _response = self.client.send_query::<SocketRecvMsgRequest, fidl::encoding::ResultType<
1373            SocketRecvMsgResponse,
1374            fidl_fuchsia_posix::Errno,
1375        >>(
1376            (want_packet_info, data_len, want_control, flags),
1377            0x52b95ba982826a61,
1378            fidl::encoding::DynamicFlags::empty(),
1379            ___deadline,
1380        )?;
1381        Ok(_response.map(|x| (x.packet_info, x.data, x.control, x.truncated)))
1382    }
1383
1384    /// Sends a message on the socket.
1385    ///
1386    /// + request `packet_info` information about the packet.
1387    /// + request `data` the message.
1388    /// + request `control` ancillary data.
1389    /// + request `flags` flags for the send request.
1390    pub fn r#send_msg(
1391        &self,
1392        mut packet_info: Option<&PacketInfo>,
1393        mut data: &[u8],
1394        mut control: &SendControlData,
1395        mut flags: fidl_fuchsia_posix_socket::SendMsgFlags,
1396        ___deadline: zx::MonotonicInstant,
1397    ) -> Result<SocketSendMsgResult, fidl::Error> {
1398        let _response = self.client.send_query::<SocketSendMsgRequest, fidl::encoding::ResultType<
1399            fidl::encoding::EmptyStruct,
1400            fidl_fuchsia_posix::Errno,
1401        >>(
1402            (packet_info, data, control, flags),
1403            0x150c9ff91f944922,
1404            fidl::encoding::DynamicFlags::empty(),
1405            ___deadline,
1406        )?;
1407        Ok(_response.map(|x| x))
1408    }
1409
1410    /// Attaches the specified eBPF filter. The filter is assumed to be verified with 2 arguments
1411    ///  1. Pointer to the packet of size 0, i.e. not accessed directly (only using cBPF packet
1412    ///     load instructions).
1413    ///  2. Packet size (BPF_LOAD).
1414    /// Helper functions and maps are not supported.
1415    pub fn r#attach_bpf_filter_unsafe(
1416        &self,
1417        mut code: &[u64],
1418        ___deadline: zx::MonotonicInstant,
1419    ) -> Result<SocketAttachBpfFilterUnsafeResult, fidl::Error> {
1420        let _response =
1421            self.client
1422                .send_query::<SocketAttachBpfFilterUnsafeRequest, fidl::encoding::ResultType<
1423                    fidl::encoding::EmptyStruct,
1424                    fidl_fuchsia_posix::Errno,
1425                >>(
1426                    (code,),
1427                    0x593998d38670f823,
1428                    fidl::encoding::DynamicFlags::empty(),
1429                    ___deadline,
1430                )?;
1431        Ok(_response.map(|x| x))
1432    }
1433}
1434
1435#[derive(Debug, Clone)]
1436pub struct SocketProxy {
1437    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1438}
1439
1440impl fidl::endpoints::Proxy for SocketProxy {
1441    type Protocol = SocketMarker;
1442
1443    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1444        Self::new(inner)
1445    }
1446
1447    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1448        self.client.into_channel().map_err(|client| Self { client })
1449    }
1450
1451    fn as_channel(&self) -> &::fidl::AsyncChannel {
1452        self.client.as_channel()
1453    }
1454}
1455
1456impl SocketProxy {
1457    /// Create a new Proxy for fuchsia.posix.socket.packet/Socket.
1458    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1459        let protocol_name = <SocketMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1460        Self { client: fidl::client::Client::new(channel, protocol_name) }
1461    }
1462
1463    /// Get a Stream of events from the remote end of the protocol.
1464    ///
1465    /// # Panics
1466    ///
1467    /// Panics if the event stream was already taken.
1468    pub fn take_event_stream(&self) -> SocketEventStream {
1469        SocketEventStream { event_receiver: self.client.take_event_receiver() }
1470    }
1471
1472    pub fn r#clone(
1473        &self,
1474        mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1475    ) -> Result<(), fidl::Error> {
1476        SocketProxyInterface::r#clone(self, request)
1477    }
1478
1479    /// Terminates the connection.
1480    ///
1481    /// After calling `Close`, the client must not send any other requests.
1482    ///
1483    /// Servers, after sending the status response, should close the connection
1484    /// regardless of status and without sending an epitaph.
1485    ///
1486    /// Closing the client end of the channel should be semantically equivalent
1487    /// to calling `Close` without knowing when the close has completed or its
1488    /// status.
1489    pub fn r#close(
1490        &self,
1491    ) -> fidl::client::QueryResponseFut<
1492        fidl_fuchsia_unknown::CloseableCloseResult,
1493        fidl::encoding::DefaultFuchsiaResourceDialect,
1494    > {
1495        SocketProxyInterface::r#close(self)
1496    }
1497
1498    pub fn r#query(
1499        &self,
1500    ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
1501    {
1502        SocketProxyInterface::r#query(self)
1503    }
1504
1505    /// Set `SOL_SOCKET` -> `SO_REUSEADDR`.
1506    pub fn r#set_reuse_address(
1507        &self,
1508        mut value: bool,
1509    ) -> fidl::client::QueryResponseFut<
1510        fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressResult,
1511        fidl::encoding::DefaultFuchsiaResourceDialect,
1512    > {
1513        SocketProxyInterface::r#set_reuse_address(self, value)
1514    }
1515
1516    /// Get `SOL_SOCKET` -> `SO_REUSEADDR`.
1517    pub fn r#get_reuse_address(
1518        &self,
1519    ) -> fidl::client::QueryResponseFut<
1520        fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResult,
1521        fidl::encoding::DefaultFuchsiaResourceDialect,
1522    > {
1523        SocketProxyInterface::r#get_reuse_address(self)
1524    }
1525
1526    /// Get `SOL_SOCKET` -> `SO_ERROR`.
1527    /// Returns the last error if there is an error set on the socket.
1528    pub fn r#get_error(
1529        &self,
1530    ) -> fidl::client::QueryResponseFut<
1531        fidl_fuchsia_posix_socket::BaseSocketGetErrorResult,
1532        fidl::encoding::DefaultFuchsiaResourceDialect,
1533    > {
1534        SocketProxyInterface::r#get_error(self)
1535    }
1536
1537    /// Set `SOL_SOCKET` -> `SO_BROADCAST`.
1538    pub fn r#set_broadcast(
1539        &self,
1540        mut value: bool,
1541    ) -> fidl::client::QueryResponseFut<
1542        fidl_fuchsia_posix_socket::BaseSocketSetBroadcastResult,
1543        fidl::encoding::DefaultFuchsiaResourceDialect,
1544    > {
1545        SocketProxyInterface::r#set_broadcast(self, value)
1546    }
1547
1548    /// Get `SOL_SOCKET` -> `SO_BROADCAST`.
1549    pub fn r#get_broadcast(
1550        &self,
1551    ) -> fidl::client::QueryResponseFut<
1552        fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResult,
1553        fidl::encoding::DefaultFuchsiaResourceDialect,
1554    > {
1555        SocketProxyInterface::r#get_broadcast(self)
1556    }
1557
1558    /// Set `SOL_SOCKET` -> `SO_SNDBUF`.
1559    pub fn r#set_send_buffer(
1560        &self,
1561        mut value_bytes: u64,
1562    ) -> fidl::client::QueryResponseFut<
1563        fidl_fuchsia_posix_socket::BaseSocketSetSendBufferResult,
1564        fidl::encoding::DefaultFuchsiaResourceDialect,
1565    > {
1566        SocketProxyInterface::r#set_send_buffer(self, value_bytes)
1567    }
1568
1569    /// Get `SOL_SOCKET` -> `SO_SNDBUF`.
1570    pub fn r#get_send_buffer(
1571        &self,
1572    ) -> fidl::client::QueryResponseFut<
1573        fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResult,
1574        fidl::encoding::DefaultFuchsiaResourceDialect,
1575    > {
1576        SocketProxyInterface::r#get_send_buffer(self)
1577    }
1578
1579    /// Set `SOL_SOCKET` -> `SO_RCVBUF`.
1580    pub fn r#set_receive_buffer(
1581        &self,
1582        mut value_bytes: u64,
1583    ) -> fidl::client::QueryResponseFut<
1584        fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferResult,
1585        fidl::encoding::DefaultFuchsiaResourceDialect,
1586    > {
1587        SocketProxyInterface::r#set_receive_buffer(self, value_bytes)
1588    }
1589
1590    /// Get `SOL_SOCKET` -> `SO_RCVBUF`.
1591    pub fn r#get_receive_buffer(
1592        &self,
1593    ) -> fidl::client::QueryResponseFut<
1594        fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResult,
1595        fidl::encoding::DefaultFuchsiaResourceDialect,
1596    > {
1597        SocketProxyInterface::r#get_receive_buffer(self)
1598    }
1599
1600    /// Set `SOL_SOCKET` -> `SO_KEEPALIVE`.
1601    pub fn r#set_keep_alive(
1602        &self,
1603        mut value: bool,
1604    ) -> fidl::client::QueryResponseFut<
1605        fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveResult,
1606        fidl::encoding::DefaultFuchsiaResourceDialect,
1607    > {
1608        SocketProxyInterface::r#set_keep_alive(self, value)
1609    }
1610
1611    /// Get `SOL_SOCKET` -> `SO_KEEPALIVE`.
1612    pub fn r#get_keep_alive(
1613        &self,
1614    ) -> fidl::client::QueryResponseFut<
1615        fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResult,
1616        fidl::encoding::DefaultFuchsiaResourceDialect,
1617    > {
1618        SocketProxyInterface::r#get_keep_alive(self)
1619    }
1620
1621    /// Set `SOL_SOCKET` -> `SO_OOBINLINE`.
1622    pub fn r#set_out_of_band_inline(
1623        &self,
1624        mut value: bool,
1625    ) -> fidl::client::QueryResponseFut<
1626        fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineResult,
1627        fidl::encoding::DefaultFuchsiaResourceDialect,
1628    > {
1629        SocketProxyInterface::r#set_out_of_band_inline(self, value)
1630    }
1631
1632    /// Get `SOL_SOCKET` -> `SO_OOBINLINE`.
1633    pub fn r#get_out_of_band_inline(
1634        &self,
1635    ) -> fidl::client::QueryResponseFut<
1636        fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResult,
1637        fidl::encoding::DefaultFuchsiaResourceDialect,
1638    > {
1639        SocketProxyInterface::r#get_out_of_band_inline(self)
1640    }
1641
1642    /// Set `SOL_SOCKET` -> `SO_NO_CHECK`.
1643    pub fn r#set_no_check(
1644        &self,
1645        mut value: bool,
1646    ) -> fidl::client::QueryResponseFut<
1647        fidl_fuchsia_posix_socket::BaseSocketSetNoCheckResult,
1648        fidl::encoding::DefaultFuchsiaResourceDialect,
1649    > {
1650        SocketProxyInterface::r#set_no_check(self, value)
1651    }
1652
1653    /// Get `SOL_SOCKET` -> `SO_NO_CHECK`.
1654    pub fn r#get_no_check(
1655        &self,
1656    ) -> fidl::client::QueryResponseFut<
1657        fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResult,
1658        fidl::encoding::DefaultFuchsiaResourceDialect,
1659    > {
1660        SocketProxyInterface::r#get_no_check(self)
1661    }
1662
1663    /// Set `SOL_SOCKET` -> `SO_LINGER`.
1664    pub fn r#set_linger(
1665        &self,
1666        mut linger: bool,
1667        mut length_secs: u32,
1668    ) -> fidl::client::QueryResponseFut<
1669        fidl_fuchsia_posix_socket::BaseSocketSetLingerResult,
1670        fidl::encoding::DefaultFuchsiaResourceDialect,
1671    > {
1672        SocketProxyInterface::r#set_linger(self, linger, length_secs)
1673    }
1674
1675    /// Get `SOL_SOCKET` -> `SO_LINGER`.
1676    pub fn r#get_linger(
1677        &self,
1678    ) -> fidl::client::QueryResponseFut<
1679        fidl_fuchsia_posix_socket::BaseSocketGetLingerResult,
1680        fidl::encoding::DefaultFuchsiaResourceDialect,
1681    > {
1682        SocketProxyInterface::r#get_linger(self)
1683    }
1684
1685    /// Set `SOL_SOCKET` -> `SO_REUSEPORT`.
1686    pub fn r#set_reuse_port(
1687        &self,
1688        mut value: bool,
1689    ) -> fidl::client::QueryResponseFut<
1690        fidl_fuchsia_posix_socket::BaseSocketSetReusePortResult,
1691        fidl::encoding::DefaultFuchsiaResourceDialect,
1692    > {
1693        SocketProxyInterface::r#set_reuse_port(self, value)
1694    }
1695
1696    /// Get `SOL_SOCKET` -> `SO_REUSEPORT`.
1697    pub fn r#get_reuse_port(
1698        &self,
1699    ) -> fidl::client::QueryResponseFut<
1700        fidl_fuchsia_posix_socket::BaseSocketGetReusePortResult,
1701        fidl::encoding::DefaultFuchsiaResourceDialect,
1702    > {
1703        SocketProxyInterface::r#get_reuse_port(self)
1704    }
1705
1706    /// Get `SOL_SOCKET` -> `SO_ACCEPTCONN`.
1707    pub fn r#get_accept_conn(
1708        &self,
1709    ) -> fidl::client::QueryResponseFut<
1710        fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResult,
1711        fidl::encoding::DefaultFuchsiaResourceDialect,
1712    > {
1713        SocketProxyInterface::r#get_accept_conn(self)
1714    }
1715
1716    /// Set `SOL_SOCKET` -> `SO_BINDTODEVICE`.
1717    pub fn r#set_bind_to_device(
1718        &self,
1719        mut value: &str,
1720    ) -> fidl::client::QueryResponseFut<
1721        fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceResult,
1722        fidl::encoding::DefaultFuchsiaResourceDialect,
1723    > {
1724        SocketProxyInterface::r#set_bind_to_device(self, value)
1725    }
1726
1727    /// Get `SOL_SOCKET` -> `SO_BINDTODEVICE`.
1728    pub fn r#get_bind_to_device(
1729        &self,
1730    ) -> fidl::client::QueryResponseFut<
1731        fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResult,
1732        fidl::encoding::DefaultFuchsiaResourceDialect,
1733    > {
1734        SocketProxyInterface::r#get_bind_to_device(self)
1735    }
1736
1737    /// Set `SOL_SOCKET` -> `SO_BINDTOIFINDEX`.
1738    /// If `value` is 0, this clears the bound interface.
1739    pub fn r#set_bind_to_interface_index(
1740        &self,
1741        mut value: u64,
1742    ) -> fidl::client::QueryResponseFut<
1743        fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexResult,
1744        fidl::encoding::DefaultFuchsiaResourceDialect,
1745    > {
1746        SocketProxyInterface::r#set_bind_to_interface_index(self, value)
1747    }
1748
1749    /// Get `SOL_SOCKET` -> `SO_BINDTOIFINDEX`.
1750    pub fn r#get_bind_to_interface_index(
1751        &self,
1752    ) -> fidl::client::QueryResponseFut<
1753        fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResult,
1754        fidl::encoding::DefaultFuchsiaResourceDialect,
1755    > {
1756        SocketProxyInterface::r#get_bind_to_interface_index(self)
1757    }
1758
1759    /// Set `SOL_SOCKET` -> `SO_TIMESTAMP` or `SO_TIMESTAMPNS`.
1760    pub fn r#set_timestamp(
1761        &self,
1762        mut value: fidl_fuchsia_posix_socket::TimestampOption,
1763    ) -> fidl::client::QueryResponseFut<
1764        fidl_fuchsia_posix_socket::BaseSocketSetTimestampResult,
1765        fidl::encoding::DefaultFuchsiaResourceDialect,
1766    > {
1767        SocketProxyInterface::r#set_timestamp(self, value)
1768    }
1769
1770    /// Get `SOL_SOCKET` -> `SO_TIMESTAMP` or `SO_TIMESTAMPNS`.
1771    pub fn r#get_timestamp(
1772        &self,
1773    ) -> fidl::client::QueryResponseFut<
1774        fidl_fuchsia_posix_socket::BaseSocketGetTimestampResult,
1775        fidl::encoding::DefaultFuchsiaResourceDialect,
1776    > {
1777        SocketProxyInterface::r#get_timestamp(self)
1778    }
1779
1780    /// Like setting `SOL_SOCKET` -> `SO_MARK`. The major difference is that
1781    /// unlike the standard SO_MARK, this API has multiple mark domains and each
1782    /// mark can be set independently in each domain.
1783    pub fn r#set_mark(
1784        &self,
1785        mut domain: fidl_fuchsia_net::MarkDomain,
1786        mut mark: &fidl_fuchsia_posix_socket::OptionalUint32,
1787    ) -> fidl::client::QueryResponseFut<
1788        fidl_fuchsia_posix_socket::BaseSocketSetMarkResult,
1789        fidl::encoding::DefaultFuchsiaResourceDialect,
1790    > {
1791        SocketProxyInterface::r#set_mark(self, domain, mark)
1792    }
1793
1794    /// Like getting `SOL_SOCKET` -> `SO_MARK`. The major difference is that
1795    /// unlike the standard SO_MARK, this API has multiple mark domains and each
1796    /// mark can be retrieved independently in each domain.
1797    pub fn r#get_mark(
1798        &self,
1799        mut domain: fidl_fuchsia_net::MarkDomain,
1800    ) -> fidl::client::QueryResponseFut<
1801        fidl_fuchsia_posix_socket::BaseSocketGetMarkResult,
1802        fidl::encoding::DefaultFuchsiaResourceDialect,
1803    > {
1804        SocketProxyInterface::r#get_mark(self, domain)
1805    }
1806
1807    pub fn r#describe(
1808        &self,
1809    ) -> fidl::client::QueryResponseFut<
1810        SocketDescribeResponse,
1811        fidl::encoding::DefaultFuchsiaResourceDialect,
1812    > {
1813        SocketProxyInterface::r#describe(self)
1814    }
1815
1816    /// Bind the socket to a protocol and/or interface.
1817    ///
1818    /// + request `protocol` the socket's new protocol association.
1819    /// + request `bound_interface_id` the socket's new interface binding.
1820    pub fn r#bind(
1821        &self,
1822        mut protocol: Option<&ProtocolAssociation>,
1823        mut bound_interface_id: &BoundInterfaceId,
1824    ) -> fidl::client::QueryResponseFut<
1825        SocketBindResult,
1826        fidl::encoding::DefaultFuchsiaResourceDialect,
1827    > {
1828        SocketProxyInterface::r#bind(self, protocol, bound_interface_id)
1829    }
1830
1831    /// Returns the the socket's properties.
1832    ///
1833    /// - response `kind` the socket's `Kind`.
1834    /// - response `protocol` the socket's protocol association, if associated.
1835    /// - response `bound_interface` properties of the socket's interface
1836    ///   binding.
1837    pub fn r#get_info(
1838        &self,
1839    ) -> fidl::client::QueryResponseFut<
1840        SocketGetInfoResult,
1841        fidl::encoding::DefaultFuchsiaResourceDialect,
1842    > {
1843        SocketProxyInterface::r#get_info(self)
1844    }
1845
1846    /// Receives a message from the socket.
1847    ///
1848    /// + request `want_packet_info` request information about the packet to be
1849    ///   returned.
1850    /// + request `data_len` the maximum allowed length of the response data
1851    ///   buffer.
1852    /// + request `want_control` request ancillary data to be returned.
1853    /// + request `flags` flags for the receive request.
1854    /// - response `packet_info` information about the packet, if requested.
1855    /// - response `data` the message.
1856    /// - response `control` control messages, if requested.
1857    /// - response `truncated` indicates whether or not the returned message
1858    ///   was truncated.
1859    pub fn r#recv_msg(
1860        &self,
1861        mut want_packet_info: bool,
1862        mut data_len: u32,
1863        mut want_control: bool,
1864        mut flags: fidl_fuchsia_posix_socket::RecvMsgFlags,
1865    ) -> fidl::client::QueryResponseFut<
1866        SocketRecvMsgResult,
1867        fidl::encoding::DefaultFuchsiaResourceDialect,
1868    > {
1869        SocketProxyInterface::r#recv_msg(self, want_packet_info, data_len, want_control, flags)
1870    }
1871
1872    /// Sends a message on the socket.
1873    ///
1874    /// + request `packet_info` information about the packet.
1875    /// + request `data` the message.
1876    /// + request `control` ancillary data.
1877    /// + request `flags` flags for the send request.
1878    pub fn r#send_msg(
1879        &self,
1880        mut packet_info: Option<&PacketInfo>,
1881        mut data: &[u8],
1882        mut control: &SendControlData,
1883        mut flags: fidl_fuchsia_posix_socket::SendMsgFlags,
1884    ) -> fidl::client::QueryResponseFut<
1885        SocketSendMsgResult,
1886        fidl::encoding::DefaultFuchsiaResourceDialect,
1887    > {
1888        SocketProxyInterface::r#send_msg(self, packet_info, data, control, flags)
1889    }
1890
1891    /// Attaches the specified eBPF filter. The filter is assumed to be verified with 2 arguments
1892    ///  1. Pointer to the packet of size 0, i.e. not accessed directly (only using cBPF packet
1893    ///     load instructions).
1894    ///  2. Packet size (BPF_LOAD).
1895    /// Helper functions and maps are not supported.
1896    pub fn r#attach_bpf_filter_unsafe(
1897        &self,
1898        mut code: &[u64],
1899    ) -> fidl::client::QueryResponseFut<
1900        SocketAttachBpfFilterUnsafeResult,
1901        fidl::encoding::DefaultFuchsiaResourceDialect,
1902    > {
1903        SocketProxyInterface::r#attach_bpf_filter_unsafe(self, code)
1904    }
1905}
1906
1907impl SocketProxyInterface for SocketProxy {
1908    fn r#clone(
1909        &self,
1910        mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1911    ) -> Result<(), fidl::Error> {
1912        self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
1913            (request,),
1914            0x20d8a7aba2168a79,
1915            fidl::encoding::DynamicFlags::empty(),
1916        )
1917    }
1918
1919    type CloseResponseFut = fidl::client::QueryResponseFut<
1920        fidl_fuchsia_unknown::CloseableCloseResult,
1921        fidl::encoding::DefaultFuchsiaResourceDialect,
1922    >;
1923    fn r#close(&self) -> Self::CloseResponseFut {
1924        fn _decode(
1925            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1926        ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1927            let _response = fidl::client::decode_transaction_body::<
1928                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1929                fidl::encoding::DefaultFuchsiaResourceDialect,
1930                0x5ac5d459ad7f657e,
1931            >(_buf?)?;
1932            Ok(_response.map(|x| x))
1933        }
1934        self.client.send_query_and_decode::<
1935            fidl::encoding::EmptyPayload,
1936            fidl_fuchsia_unknown::CloseableCloseResult,
1937        >(
1938            (),
1939            0x5ac5d459ad7f657e,
1940            fidl::encoding::DynamicFlags::empty(),
1941            _decode,
1942        )
1943    }
1944
1945    type QueryResponseFut =
1946        fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
1947    fn r#query(&self) -> Self::QueryResponseFut {
1948        fn _decode(
1949            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1950        ) -> Result<Vec<u8>, fidl::Error> {
1951            let _response = fidl::client::decode_transaction_body::<
1952                fidl_fuchsia_unknown::QueryableQueryResponse,
1953                fidl::encoding::DefaultFuchsiaResourceDialect,
1954                0x2658edee9decfc06,
1955            >(_buf?)?;
1956            Ok(_response.protocol)
1957        }
1958        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
1959            (),
1960            0x2658edee9decfc06,
1961            fidl::encoding::DynamicFlags::empty(),
1962            _decode,
1963        )
1964    }
1965
1966    type SetReuseAddressResponseFut = fidl::client::QueryResponseFut<
1967        fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressResult,
1968        fidl::encoding::DefaultFuchsiaResourceDialect,
1969    >;
1970    fn r#set_reuse_address(&self, mut value: bool) -> Self::SetReuseAddressResponseFut {
1971        fn _decode(
1972            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1973        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressResult, fidl::Error>
1974        {
1975            let _response = fidl::client::decode_transaction_body::<
1976                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
1977                fidl::encoding::DefaultFuchsiaResourceDialect,
1978                0x1fd74ee8b9a4a876,
1979            >(_buf?)?;
1980            Ok(_response.map(|x| x))
1981        }
1982        self.client.send_query_and_decode::<
1983            fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressRequest,
1984            fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressResult,
1985        >(
1986            (value,),
1987            0x1fd74ee8b9a4a876,
1988            fidl::encoding::DynamicFlags::empty(),
1989            _decode,
1990        )
1991    }
1992
1993    type GetReuseAddressResponseFut = fidl::client::QueryResponseFut<
1994        fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResult,
1995        fidl::encoding::DefaultFuchsiaResourceDialect,
1996    >;
1997    fn r#get_reuse_address(&self) -> Self::GetReuseAddressResponseFut {
1998        fn _decode(
1999            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2000        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResult, fidl::Error>
2001        {
2002            let _response = fidl::client::decode_transaction_body::<
2003                fidl::encoding::ResultType<
2004                    fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResponse,
2005                    fidl_fuchsia_posix::Errno,
2006                >,
2007                fidl::encoding::DefaultFuchsiaResourceDialect,
2008                0x67b7206b8d1bc0a5,
2009            >(_buf?)?;
2010            Ok(_response.map(|x| x.value))
2011        }
2012        self.client.send_query_and_decode::<
2013            fidl::encoding::EmptyPayload,
2014            fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResult,
2015        >(
2016            (),
2017            0x67b7206b8d1bc0a5,
2018            fidl::encoding::DynamicFlags::empty(),
2019            _decode,
2020        )
2021    }
2022
2023    type GetErrorResponseFut = fidl::client::QueryResponseFut<
2024        fidl_fuchsia_posix_socket::BaseSocketGetErrorResult,
2025        fidl::encoding::DefaultFuchsiaResourceDialect,
2026    >;
2027    fn r#get_error(&self) -> Self::GetErrorResponseFut {
2028        fn _decode(
2029            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2030        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetErrorResult, fidl::Error> {
2031            let _response = fidl::client::decode_transaction_body::<
2032                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2033                fidl::encoding::DefaultFuchsiaResourceDialect,
2034                0x5aad39b33e5f6ebb,
2035            >(_buf?)?;
2036            Ok(_response.map(|x| x))
2037        }
2038        self.client.send_query_and_decode::<
2039            fidl::encoding::EmptyPayload,
2040            fidl_fuchsia_posix_socket::BaseSocketGetErrorResult,
2041        >(
2042            (),
2043            0x5aad39b33e5f6ebb,
2044            fidl::encoding::DynamicFlags::empty(),
2045            _decode,
2046        )
2047    }
2048
2049    type SetBroadcastResponseFut = fidl::client::QueryResponseFut<
2050        fidl_fuchsia_posix_socket::BaseSocketSetBroadcastResult,
2051        fidl::encoding::DefaultFuchsiaResourceDialect,
2052    >;
2053    fn r#set_broadcast(&self, mut value: bool) -> Self::SetBroadcastResponseFut {
2054        fn _decode(
2055            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2056        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetBroadcastResult, fidl::Error> {
2057            let _response = fidl::client::decode_transaction_body::<
2058                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2059                fidl::encoding::DefaultFuchsiaResourceDialect,
2060                0x6023e081ce3cd947,
2061            >(_buf?)?;
2062            Ok(_response.map(|x| x))
2063        }
2064        self.client.send_query_and_decode::<
2065            fidl_fuchsia_posix_socket::BaseSocketSetBroadcastRequest,
2066            fidl_fuchsia_posix_socket::BaseSocketSetBroadcastResult,
2067        >(
2068            (value,),
2069            0x6023e081ce3cd947,
2070            fidl::encoding::DynamicFlags::empty(),
2071            _decode,
2072        )
2073    }
2074
2075    type GetBroadcastResponseFut = fidl::client::QueryResponseFut<
2076        fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResult,
2077        fidl::encoding::DefaultFuchsiaResourceDialect,
2078    >;
2079    fn r#get_broadcast(&self) -> Self::GetBroadcastResponseFut {
2080        fn _decode(
2081            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2082        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResult, fidl::Error> {
2083            let _response = fidl::client::decode_transaction_body::<
2084                fidl::encoding::ResultType<
2085                    fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResponse,
2086                    fidl_fuchsia_posix::Errno,
2087                >,
2088                fidl::encoding::DefaultFuchsiaResourceDialect,
2089                0x68796fc556f9780d,
2090            >(_buf?)?;
2091            Ok(_response.map(|x| x.value))
2092        }
2093        self.client.send_query_and_decode::<
2094            fidl::encoding::EmptyPayload,
2095            fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResult,
2096        >(
2097            (),
2098            0x68796fc556f9780d,
2099            fidl::encoding::DynamicFlags::empty(),
2100            _decode,
2101        )
2102    }
2103
2104    type SetSendBufferResponseFut = fidl::client::QueryResponseFut<
2105        fidl_fuchsia_posix_socket::BaseSocketSetSendBufferResult,
2106        fidl::encoding::DefaultFuchsiaResourceDialect,
2107    >;
2108    fn r#set_send_buffer(&self, mut value_bytes: u64) -> Self::SetSendBufferResponseFut {
2109        fn _decode(
2110            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2111        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetSendBufferResult, fidl::Error> {
2112            let _response = fidl::client::decode_transaction_body::<
2113                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2114                fidl::encoding::DefaultFuchsiaResourceDialect,
2115                0x756eac32d73a7a70,
2116            >(_buf?)?;
2117            Ok(_response.map(|x| x))
2118        }
2119        self.client.send_query_and_decode::<
2120            fidl_fuchsia_posix_socket::BaseSocketSetSendBufferRequest,
2121            fidl_fuchsia_posix_socket::BaseSocketSetSendBufferResult,
2122        >(
2123            (value_bytes,),
2124            0x756eac32d73a7a70,
2125            fidl::encoding::DynamicFlags::empty(),
2126            _decode,
2127        )
2128    }
2129
2130    type GetSendBufferResponseFut = fidl::client::QueryResponseFut<
2131        fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResult,
2132        fidl::encoding::DefaultFuchsiaResourceDialect,
2133    >;
2134    fn r#get_send_buffer(&self) -> Self::GetSendBufferResponseFut {
2135        fn _decode(
2136            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2137        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResult, fidl::Error> {
2138            let _response = fidl::client::decode_transaction_body::<
2139                fidl::encoding::ResultType<
2140                    fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResponse,
2141                    fidl_fuchsia_posix::Errno,
2142                >,
2143                fidl::encoding::DefaultFuchsiaResourceDialect,
2144                0x78a52fd9c7b2410b,
2145            >(_buf?)?;
2146            Ok(_response.map(|x| x.value_bytes))
2147        }
2148        self.client.send_query_and_decode::<
2149            fidl::encoding::EmptyPayload,
2150            fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResult,
2151        >(
2152            (),
2153            0x78a52fd9c7b2410b,
2154            fidl::encoding::DynamicFlags::empty(),
2155            _decode,
2156        )
2157    }
2158
2159    type SetReceiveBufferResponseFut = fidl::client::QueryResponseFut<
2160        fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferResult,
2161        fidl::encoding::DefaultFuchsiaResourceDialect,
2162    >;
2163    fn r#set_receive_buffer(&self, mut value_bytes: u64) -> Self::SetReceiveBufferResponseFut {
2164        fn _decode(
2165            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2166        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferResult, fidl::Error>
2167        {
2168            let _response = fidl::client::decode_transaction_body::<
2169                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2170                fidl::encoding::DefaultFuchsiaResourceDialect,
2171                0x6b0cf2f1919c7001,
2172            >(_buf?)?;
2173            Ok(_response.map(|x| x))
2174        }
2175        self.client.send_query_and_decode::<
2176            fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferRequest,
2177            fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferResult,
2178        >(
2179            (value_bytes,),
2180            0x6b0cf2f1919c7001,
2181            fidl::encoding::DynamicFlags::empty(),
2182            _decode,
2183        )
2184    }
2185
2186    type GetReceiveBufferResponseFut = fidl::client::QueryResponseFut<
2187        fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResult,
2188        fidl::encoding::DefaultFuchsiaResourceDialect,
2189    >;
2190    fn r#get_receive_buffer(&self) -> Self::GetReceiveBufferResponseFut {
2191        fn _decode(
2192            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2193        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResult, fidl::Error>
2194        {
2195            let _response = fidl::client::decode_transaction_body::<
2196                fidl::encoding::ResultType<
2197                    fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResponse,
2198                    fidl_fuchsia_posix::Errno,
2199                >,
2200                fidl::encoding::DefaultFuchsiaResourceDialect,
2201                0x14c1a4b64f709e5c,
2202            >(_buf?)?;
2203            Ok(_response.map(|x| x.value_bytes))
2204        }
2205        self.client.send_query_and_decode::<
2206            fidl::encoding::EmptyPayload,
2207            fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResult,
2208        >(
2209            (),
2210            0x14c1a4b64f709e5c,
2211            fidl::encoding::DynamicFlags::empty(),
2212            _decode,
2213        )
2214    }
2215
2216    type SetKeepAliveResponseFut = fidl::client::QueryResponseFut<
2217        fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveResult,
2218        fidl::encoding::DefaultFuchsiaResourceDialect,
2219    >;
2220    fn r#set_keep_alive(&self, mut value: bool) -> Self::SetKeepAliveResponseFut {
2221        fn _decode(
2222            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2223        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveResult, fidl::Error> {
2224            let _response = fidl::client::decode_transaction_body::<
2225                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2226                fidl::encoding::DefaultFuchsiaResourceDialect,
2227                0x572df8f0b920d2c7,
2228            >(_buf?)?;
2229            Ok(_response.map(|x| x))
2230        }
2231        self.client.send_query_and_decode::<
2232            fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveRequest,
2233            fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveResult,
2234        >(
2235            (value,),
2236            0x572df8f0b920d2c7,
2237            fidl::encoding::DynamicFlags::empty(),
2238            _decode,
2239        )
2240    }
2241
2242    type GetKeepAliveResponseFut = fidl::client::QueryResponseFut<
2243        fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResult,
2244        fidl::encoding::DefaultFuchsiaResourceDialect,
2245    >;
2246    fn r#get_keep_alive(&self) -> Self::GetKeepAliveResponseFut {
2247        fn _decode(
2248            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2249        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResult, fidl::Error> {
2250            let _response = fidl::client::decode_transaction_body::<
2251                fidl::encoding::ResultType<
2252                    fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResponse,
2253                    fidl_fuchsia_posix::Errno,
2254                >,
2255                fidl::encoding::DefaultFuchsiaResourceDialect,
2256                0x2dd29d3215f2c9d2,
2257            >(_buf?)?;
2258            Ok(_response.map(|x| x.value))
2259        }
2260        self.client.send_query_and_decode::<
2261            fidl::encoding::EmptyPayload,
2262            fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResult,
2263        >(
2264            (),
2265            0x2dd29d3215f2c9d2,
2266            fidl::encoding::DynamicFlags::empty(),
2267            _decode,
2268        )
2269    }
2270
2271    type SetOutOfBandInlineResponseFut = fidl::client::QueryResponseFut<
2272        fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineResult,
2273        fidl::encoding::DefaultFuchsiaResourceDialect,
2274    >;
2275    fn r#set_out_of_band_inline(&self, mut value: bool) -> Self::SetOutOfBandInlineResponseFut {
2276        fn _decode(
2277            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2278        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineResult, fidl::Error>
2279        {
2280            let _response = fidl::client::decode_transaction_body::<
2281                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2282                fidl::encoding::DefaultFuchsiaResourceDialect,
2283                0x3ecb49968bee439,
2284            >(_buf?)?;
2285            Ok(_response.map(|x| x))
2286        }
2287        self.client.send_query_and_decode::<
2288            fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineRequest,
2289            fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineResult,
2290        >(
2291            (value,),
2292            0x3ecb49968bee439,
2293            fidl::encoding::DynamicFlags::empty(),
2294            _decode,
2295        )
2296    }
2297
2298    type GetOutOfBandInlineResponseFut = fidl::client::QueryResponseFut<
2299        fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResult,
2300        fidl::encoding::DefaultFuchsiaResourceDialect,
2301    >;
2302    fn r#get_out_of_band_inline(&self) -> Self::GetOutOfBandInlineResponseFut {
2303        fn _decode(
2304            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2305        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResult, fidl::Error>
2306        {
2307            let _response = fidl::client::decode_transaction_body::<
2308                fidl::encoding::ResultType<
2309                    fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResponse,
2310                    fidl_fuchsia_posix::Errno,
2311                >,
2312                fidl::encoding::DefaultFuchsiaResourceDialect,
2313                0x348c1ab3aeca1745,
2314            >(_buf?)?;
2315            Ok(_response.map(|x| x.value))
2316        }
2317        self.client.send_query_and_decode::<
2318            fidl::encoding::EmptyPayload,
2319            fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResult,
2320        >(
2321            (),
2322            0x348c1ab3aeca1745,
2323            fidl::encoding::DynamicFlags::empty(),
2324            _decode,
2325        )
2326    }
2327
2328    type SetNoCheckResponseFut = fidl::client::QueryResponseFut<
2329        fidl_fuchsia_posix_socket::BaseSocketSetNoCheckResult,
2330        fidl::encoding::DefaultFuchsiaResourceDialect,
2331    >;
2332    fn r#set_no_check(&self, mut value: bool) -> Self::SetNoCheckResponseFut {
2333        fn _decode(
2334            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2335        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetNoCheckResult, fidl::Error> {
2336            let _response = fidl::client::decode_transaction_body::<
2337                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2338                fidl::encoding::DefaultFuchsiaResourceDialect,
2339                0x6bbf00c53a4c78c2,
2340            >(_buf?)?;
2341            Ok(_response.map(|x| x))
2342        }
2343        self.client.send_query_and_decode::<
2344            fidl_fuchsia_posix_socket::BaseSocketSetNoCheckRequest,
2345            fidl_fuchsia_posix_socket::BaseSocketSetNoCheckResult,
2346        >(
2347            (value,),
2348            0x6bbf00c53a4c78c2,
2349            fidl::encoding::DynamicFlags::empty(),
2350            _decode,
2351        )
2352    }
2353
2354    type GetNoCheckResponseFut = fidl::client::QueryResponseFut<
2355        fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResult,
2356        fidl::encoding::DefaultFuchsiaResourceDialect,
2357    >;
2358    fn r#get_no_check(&self) -> Self::GetNoCheckResponseFut {
2359        fn _decode(
2360            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2361        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResult, fidl::Error> {
2362            let _response = fidl::client::decode_transaction_body::<
2363                fidl::encoding::ResultType<
2364                    fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResponse,
2365                    fidl_fuchsia_posix::Errno,
2366                >,
2367                fidl::encoding::DefaultFuchsiaResourceDialect,
2368                0x2cd4249286417694,
2369            >(_buf?)?;
2370            Ok(_response.map(|x| x.value))
2371        }
2372        self.client.send_query_and_decode::<
2373            fidl::encoding::EmptyPayload,
2374            fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResult,
2375        >(
2376            (),
2377            0x2cd4249286417694,
2378            fidl::encoding::DynamicFlags::empty(),
2379            _decode,
2380        )
2381    }
2382
2383    type SetLingerResponseFut = fidl::client::QueryResponseFut<
2384        fidl_fuchsia_posix_socket::BaseSocketSetLingerResult,
2385        fidl::encoding::DefaultFuchsiaResourceDialect,
2386    >;
2387    fn r#set_linger(&self, mut linger: bool, mut length_secs: u32) -> Self::SetLingerResponseFut {
2388        fn _decode(
2389            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2390        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetLingerResult, fidl::Error> {
2391            let _response = fidl::client::decode_transaction_body::<
2392                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2393                fidl::encoding::DefaultFuchsiaResourceDialect,
2394                0x45386351246e998e,
2395            >(_buf?)?;
2396            Ok(_response.map(|x| x))
2397        }
2398        self.client.send_query_and_decode::<
2399            fidl_fuchsia_posix_socket::BaseSocketSetLingerRequest,
2400            fidl_fuchsia_posix_socket::BaseSocketSetLingerResult,
2401        >(
2402            (linger, length_secs,),
2403            0x45386351246e998e,
2404            fidl::encoding::DynamicFlags::empty(),
2405            _decode,
2406        )
2407    }
2408
2409    type GetLingerResponseFut = fidl::client::QueryResponseFut<
2410        fidl_fuchsia_posix_socket::BaseSocketGetLingerResult,
2411        fidl::encoding::DefaultFuchsiaResourceDialect,
2412    >;
2413    fn r#get_linger(&self) -> Self::GetLingerResponseFut {
2414        fn _decode(
2415            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2416        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetLingerResult, fidl::Error> {
2417            let _response = fidl::client::decode_transaction_body::<
2418                fidl::encoding::ResultType<
2419                    fidl_fuchsia_posix_socket::BaseSocketGetLingerResponse,
2420                    fidl_fuchsia_posix::Errno,
2421                >,
2422                fidl::encoding::DefaultFuchsiaResourceDialect,
2423                0x48eb20fc5ccb0e45,
2424            >(_buf?)?;
2425            Ok(_response.map(|x| (x.linger, x.length_secs)))
2426        }
2427        self.client.send_query_and_decode::<
2428            fidl::encoding::EmptyPayload,
2429            fidl_fuchsia_posix_socket::BaseSocketGetLingerResult,
2430        >(
2431            (),
2432            0x48eb20fc5ccb0e45,
2433            fidl::encoding::DynamicFlags::empty(),
2434            _decode,
2435        )
2436    }
2437
2438    type SetReusePortResponseFut = fidl::client::QueryResponseFut<
2439        fidl_fuchsia_posix_socket::BaseSocketSetReusePortResult,
2440        fidl::encoding::DefaultFuchsiaResourceDialect,
2441    >;
2442    fn r#set_reuse_port(&self, mut value: bool) -> Self::SetReusePortResponseFut {
2443        fn _decode(
2444            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2445        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetReusePortResult, fidl::Error> {
2446            let _response = fidl::client::decode_transaction_body::<
2447                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2448                fidl::encoding::DefaultFuchsiaResourceDialect,
2449                0x24dd3e5cb36d9ccb,
2450            >(_buf?)?;
2451            Ok(_response.map(|x| x))
2452        }
2453        self.client.send_query_and_decode::<
2454            fidl_fuchsia_posix_socket::BaseSocketSetReusePortRequest,
2455            fidl_fuchsia_posix_socket::BaseSocketSetReusePortResult,
2456        >(
2457            (value,),
2458            0x24dd3e5cb36d9ccb,
2459            fidl::encoding::DynamicFlags::empty(),
2460            _decode,
2461        )
2462    }
2463
2464    type GetReusePortResponseFut = fidl::client::QueryResponseFut<
2465        fidl_fuchsia_posix_socket::BaseSocketGetReusePortResult,
2466        fidl::encoding::DefaultFuchsiaResourceDialect,
2467    >;
2468    fn r#get_reuse_port(&self) -> Self::GetReusePortResponseFut {
2469        fn _decode(
2470            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2471        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetReusePortResult, fidl::Error> {
2472            let _response = fidl::client::decode_transaction_body::<
2473                fidl::encoding::ResultType<
2474                    fidl_fuchsia_posix_socket::BaseSocketGetReusePortResponse,
2475                    fidl_fuchsia_posix::Errno,
2476                >,
2477                fidl::encoding::DefaultFuchsiaResourceDialect,
2478                0x7a112c1ab54ff828,
2479            >(_buf?)?;
2480            Ok(_response.map(|x| x.value))
2481        }
2482        self.client.send_query_and_decode::<
2483            fidl::encoding::EmptyPayload,
2484            fidl_fuchsia_posix_socket::BaseSocketGetReusePortResult,
2485        >(
2486            (),
2487            0x7a112c1ab54ff828,
2488            fidl::encoding::DynamicFlags::empty(),
2489            _decode,
2490        )
2491    }
2492
2493    type GetAcceptConnResponseFut = fidl::client::QueryResponseFut<
2494        fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResult,
2495        fidl::encoding::DefaultFuchsiaResourceDialect,
2496    >;
2497    fn r#get_accept_conn(&self) -> Self::GetAcceptConnResponseFut {
2498        fn _decode(
2499            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2500        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResult, fidl::Error> {
2501            let _response = fidl::client::decode_transaction_body::<
2502                fidl::encoding::ResultType<
2503                    fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResponse,
2504                    fidl_fuchsia_posix::Errno,
2505                >,
2506                fidl::encoding::DefaultFuchsiaResourceDialect,
2507                0x67ce6db6c2ec8966,
2508            >(_buf?)?;
2509            Ok(_response.map(|x| x.value))
2510        }
2511        self.client.send_query_and_decode::<
2512            fidl::encoding::EmptyPayload,
2513            fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResult,
2514        >(
2515            (),
2516            0x67ce6db6c2ec8966,
2517            fidl::encoding::DynamicFlags::empty(),
2518            _decode,
2519        )
2520    }
2521
2522    type SetBindToDeviceResponseFut = fidl::client::QueryResponseFut<
2523        fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceResult,
2524        fidl::encoding::DefaultFuchsiaResourceDialect,
2525    >;
2526    fn r#set_bind_to_device(&self, mut value: &str) -> Self::SetBindToDeviceResponseFut {
2527        fn _decode(
2528            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2529        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceResult, fidl::Error>
2530        {
2531            let _response = fidl::client::decode_transaction_body::<
2532                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2533                fidl::encoding::DefaultFuchsiaResourceDialect,
2534                0x2118b483f28aafc4,
2535            >(_buf?)?;
2536            Ok(_response.map(|x| x))
2537        }
2538        self.client.send_query_and_decode::<
2539            fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceRequest,
2540            fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceResult,
2541        >(
2542            (value,),
2543            0x2118b483f28aafc4,
2544            fidl::encoding::DynamicFlags::empty(),
2545            _decode,
2546        )
2547    }
2548
2549    type GetBindToDeviceResponseFut = fidl::client::QueryResponseFut<
2550        fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResult,
2551        fidl::encoding::DefaultFuchsiaResourceDialect,
2552    >;
2553    fn r#get_bind_to_device(&self) -> Self::GetBindToDeviceResponseFut {
2554        fn _decode(
2555            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2556        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResult, fidl::Error>
2557        {
2558            let _response = fidl::client::decode_transaction_body::<
2559                fidl::encoding::ResultType<
2560                    fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResponse,
2561                    fidl_fuchsia_posix::Errno,
2562                >,
2563                fidl::encoding::DefaultFuchsiaResourceDialect,
2564                0x1ab1fbf0ef7906c8,
2565            >(_buf?)?;
2566            Ok(_response.map(|x| x.value))
2567        }
2568        self.client.send_query_and_decode::<
2569            fidl::encoding::EmptyPayload,
2570            fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResult,
2571        >(
2572            (),
2573            0x1ab1fbf0ef7906c8,
2574            fidl::encoding::DynamicFlags::empty(),
2575            _decode,
2576        )
2577    }
2578
2579    type SetBindToInterfaceIndexResponseFut = fidl::client::QueryResponseFut<
2580        fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexResult,
2581        fidl::encoding::DefaultFuchsiaResourceDialect,
2582    >;
2583    fn r#set_bind_to_interface_index(
2584        &self,
2585        mut value: u64,
2586    ) -> Self::SetBindToInterfaceIndexResponseFut {
2587        fn _decode(
2588            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2589        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexResult, fidl::Error>
2590        {
2591            let _response = fidl::client::decode_transaction_body::<
2592                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2593                fidl::encoding::DefaultFuchsiaResourceDialect,
2594                0x6e387a0def00821,
2595            >(_buf?)?;
2596            Ok(_response.map(|x| x))
2597        }
2598        self.client.send_query_and_decode::<
2599            fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexRequest,
2600            fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexResult,
2601        >(
2602            (value,),
2603            0x6e387a0def00821,
2604            fidl::encoding::DynamicFlags::empty(),
2605            _decode,
2606        )
2607    }
2608
2609    type GetBindToInterfaceIndexResponseFut = fidl::client::QueryResponseFut<
2610        fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResult,
2611        fidl::encoding::DefaultFuchsiaResourceDialect,
2612    >;
2613    fn r#get_bind_to_interface_index(&self) -> Self::GetBindToInterfaceIndexResponseFut {
2614        fn _decode(
2615            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2616        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResult, fidl::Error>
2617        {
2618            let _response = fidl::client::decode_transaction_body::<
2619                fidl::encoding::ResultType<
2620                    fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResponse,
2621                    fidl_fuchsia_posix::Errno,
2622                >,
2623                fidl::encoding::DefaultFuchsiaResourceDialect,
2624                0x59c31dd3e3078295,
2625            >(_buf?)?;
2626            Ok(_response.map(|x| x.value))
2627        }
2628        self.client.send_query_and_decode::<
2629            fidl::encoding::EmptyPayload,
2630            fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResult,
2631        >(
2632            (),
2633            0x59c31dd3e3078295,
2634            fidl::encoding::DynamicFlags::empty(),
2635            _decode,
2636        )
2637    }
2638
2639    type SetTimestampResponseFut = fidl::client::QueryResponseFut<
2640        fidl_fuchsia_posix_socket::BaseSocketSetTimestampResult,
2641        fidl::encoding::DefaultFuchsiaResourceDialect,
2642    >;
2643    fn r#set_timestamp(
2644        &self,
2645        mut value: fidl_fuchsia_posix_socket::TimestampOption,
2646    ) -> Self::SetTimestampResponseFut {
2647        fn _decode(
2648            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2649        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetTimestampResult, fidl::Error> {
2650            let _response = fidl::client::decode_transaction_body::<
2651                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2652                fidl::encoding::DefaultFuchsiaResourceDialect,
2653                0x285d6516c263d839,
2654            >(_buf?)?;
2655            Ok(_response.map(|x| x))
2656        }
2657        self.client.send_query_and_decode::<
2658            fidl_fuchsia_posix_socket::BaseSocketSetTimestampRequest,
2659            fidl_fuchsia_posix_socket::BaseSocketSetTimestampResult,
2660        >(
2661            (value,),
2662            0x285d6516c263d839,
2663            fidl::encoding::DynamicFlags::empty(),
2664            _decode,
2665        )
2666    }
2667
2668    type GetTimestampResponseFut = fidl::client::QueryResponseFut<
2669        fidl_fuchsia_posix_socket::BaseSocketGetTimestampResult,
2670        fidl::encoding::DefaultFuchsiaResourceDialect,
2671    >;
2672    fn r#get_timestamp(&self) -> Self::GetTimestampResponseFut {
2673        fn _decode(
2674            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2675        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetTimestampResult, fidl::Error> {
2676            let _response = fidl::client::decode_transaction_body::<
2677                fidl::encoding::ResultType<
2678                    fidl_fuchsia_posix_socket::BaseSocketGetTimestampResponse,
2679                    fidl_fuchsia_posix::Errno,
2680                >,
2681                fidl::encoding::DefaultFuchsiaResourceDialect,
2682                0x49f2fffbbcc2bd27,
2683            >(_buf?)?;
2684            Ok(_response.map(|x| x.value))
2685        }
2686        self.client.send_query_and_decode::<
2687            fidl::encoding::EmptyPayload,
2688            fidl_fuchsia_posix_socket::BaseSocketGetTimestampResult,
2689        >(
2690            (),
2691            0x49f2fffbbcc2bd27,
2692            fidl::encoding::DynamicFlags::empty(),
2693            _decode,
2694        )
2695    }
2696
2697    type SetMarkResponseFut = fidl::client::QueryResponseFut<
2698        fidl_fuchsia_posix_socket::BaseSocketSetMarkResult,
2699        fidl::encoding::DefaultFuchsiaResourceDialect,
2700    >;
2701    fn r#set_mark(
2702        &self,
2703        mut domain: fidl_fuchsia_net::MarkDomain,
2704        mut mark: &fidl_fuchsia_posix_socket::OptionalUint32,
2705    ) -> Self::SetMarkResponseFut {
2706        fn _decode(
2707            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2708        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketSetMarkResult, fidl::Error> {
2709            let _response = fidl::client::decode_transaction_body::<
2710                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2711                fidl::encoding::DefaultFuchsiaResourceDialect,
2712                0x6ead6de09f653236,
2713            >(_buf?)?;
2714            Ok(_response.map(|x| x))
2715        }
2716        self.client.send_query_and_decode::<
2717            fidl_fuchsia_posix_socket::BaseSocketSetMarkRequest,
2718            fidl_fuchsia_posix_socket::BaseSocketSetMarkResult,
2719        >(
2720            (domain, mark,),
2721            0x6ead6de09f653236,
2722            fidl::encoding::DynamicFlags::empty(),
2723            _decode,
2724        )
2725    }
2726
2727    type GetMarkResponseFut = fidl::client::QueryResponseFut<
2728        fidl_fuchsia_posix_socket::BaseSocketGetMarkResult,
2729        fidl::encoding::DefaultFuchsiaResourceDialect,
2730    >;
2731    fn r#get_mark(&self, mut domain: fidl_fuchsia_net::MarkDomain) -> Self::GetMarkResponseFut {
2732        fn _decode(
2733            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2734        ) -> Result<fidl_fuchsia_posix_socket::BaseSocketGetMarkResult, fidl::Error> {
2735            let _response = fidl::client::decode_transaction_body::<
2736                fidl::encoding::ResultType<
2737                    fidl_fuchsia_posix_socket::BaseSocketGetMarkResponse,
2738                    fidl_fuchsia_posix::Errno,
2739                >,
2740                fidl::encoding::DefaultFuchsiaResourceDialect,
2741                0x57a2752c61d93d47,
2742            >(_buf?)?;
2743            Ok(_response.map(|x| x.mark))
2744        }
2745        self.client.send_query_and_decode::<
2746            fidl_fuchsia_posix_socket::BaseSocketGetMarkRequest,
2747            fidl_fuchsia_posix_socket::BaseSocketGetMarkResult,
2748        >(
2749            (domain,),
2750            0x57a2752c61d93d47,
2751            fidl::encoding::DynamicFlags::empty(),
2752            _decode,
2753        )
2754    }
2755
2756    type DescribeResponseFut = fidl::client::QueryResponseFut<
2757        SocketDescribeResponse,
2758        fidl::encoding::DefaultFuchsiaResourceDialect,
2759    >;
2760    fn r#describe(&self) -> Self::DescribeResponseFut {
2761        fn _decode(
2762            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2763        ) -> Result<SocketDescribeResponse, fidl::Error> {
2764            let _response = fidl::client::decode_transaction_body::<
2765                SocketDescribeResponse,
2766                fidl::encoding::DefaultFuchsiaResourceDialect,
2767                0x4fd7c08c9c804484,
2768            >(_buf?)?;
2769            Ok(_response)
2770        }
2771        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SocketDescribeResponse>(
2772            (),
2773            0x4fd7c08c9c804484,
2774            fidl::encoding::DynamicFlags::empty(),
2775            _decode,
2776        )
2777    }
2778
2779    type BindResponseFut = fidl::client::QueryResponseFut<
2780        SocketBindResult,
2781        fidl::encoding::DefaultFuchsiaResourceDialect,
2782    >;
2783    fn r#bind(
2784        &self,
2785        mut protocol: Option<&ProtocolAssociation>,
2786        mut bound_interface_id: &BoundInterfaceId,
2787    ) -> Self::BindResponseFut {
2788        fn _decode(
2789            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2790        ) -> Result<SocketBindResult, fidl::Error> {
2791            let _response = fidl::client::decode_transaction_body::<
2792                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2793                fidl::encoding::DefaultFuchsiaResourceDialect,
2794                0x6caedb2d31b56db8,
2795            >(_buf?)?;
2796            Ok(_response.map(|x| x))
2797        }
2798        self.client.send_query_and_decode::<SocketBindRequest, SocketBindResult>(
2799            (protocol, bound_interface_id),
2800            0x6caedb2d31b56db8,
2801            fidl::encoding::DynamicFlags::empty(),
2802            _decode,
2803        )
2804    }
2805
2806    type GetInfoResponseFut = fidl::client::QueryResponseFut<
2807        SocketGetInfoResult,
2808        fidl::encoding::DefaultFuchsiaResourceDialect,
2809    >;
2810    fn r#get_info(&self) -> Self::GetInfoResponseFut {
2811        fn _decode(
2812            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2813        ) -> Result<SocketGetInfoResult, fidl::Error> {
2814            let _response = fidl::client::decode_transaction_body::<
2815                fidl::encoding::ResultType<SocketGetInfoResponse, fidl_fuchsia_posix::Errno>,
2816                fidl::encoding::DefaultFuchsiaResourceDialect,
2817                0x7f67457e85c3914c,
2818            >(_buf?)?;
2819            Ok(_response.map(|x| (x.kind, x.protocol, x.bound_interface)))
2820        }
2821        self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SocketGetInfoResult>(
2822            (),
2823            0x7f67457e85c3914c,
2824            fidl::encoding::DynamicFlags::empty(),
2825            _decode,
2826        )
2827    }
2828
2829    type RecvMsgResponseFut = fidl::client::QueryResponseFut<
2830        SocketRecvMsgResult,
2831        fidl::encoding::DefaultFuchsiaResourceDialect,
2832    >;
2833    fn r#recv_msg(
2834        &self,
2835        mut want_packet_info: bool,
2836        mut data_len: u32,
2837        mut want_control: bool,
2838        mut flags: fidl_fuchsia_posix_socket::RecvMsgFlags,
2839    ) -> Self::RecvMsgResponseFut {
2840        fn _decode(
2841            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2842        ) -> Result<SocketRecvMsgResult, fidl::Error> {
2843            let _response = fidl::client::decode_transaction_body::<
2844                fidl::encoding::ResultType<SocketRecvMsgResponse, fidl_fuchsia_posix::Errno>,
2845                fidl::encoding::DefaultFuchsiaResourceDialect,
2846                0x52b95ba982826a61,
2847            >(_buf?)?;
2848            Ok(_response.map(|x| (x.packet_info, x.data, x.control, x.truncated)))
2849        }
2850        self.client.send_query_and_decode::<SocketRecvMsgRequest, SocketRecvMsgResult>(
2851            (want_packet_info, data_len, want_control, flags),
2852            0x52b95ba982826a61,
2853            fidl::encoding::DynamicFlags::empty(),
2854            _decode,
2855        )
2856    }
2857
2858    type SendMsgResponseFut = fidl::client::QueryResponseFut<
2859        SocketSendMsgResult,
2860        fidl::encoding::DefaultFuchsiaResourceDialect,
2861    >;
2862    fn r#send_msg(
2863        &self,
2864        mut packet_info: Option<&PacketInfo>,
2865        mut data: &[u8],
2866        mut control: &SendControlData,
2867        mut flags: fidl_fuchsia_posix_socket::SendMsgFlags,
2868    ) -> Self::SendMsgResponseFut {
2869        fn _decode(
2870            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2871        ) -> Result<SocketSendMsgResult, fidl::Error> {
2872            let _response = fidl::client::decode_transaction_body::<
2873                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2874                fidl::encoding::DefaultFuchsiaResourceDialect,
2875                0x150c9ff91f944922,
2876            >(_buf?)?;
2877            Ok(_response.map(|x| x))
2878        }
2879        self.client.send_query_and_decode::<SocketSendMsgRequest, SocketSendMsgResult>(
2880            (packet_info, data, control, flags),
2881            0x150c9ff91f944922,
2882            fidl::encoding::DynamicFlags::empty(),
2883            _decode,
2884        )
2885    }
2886
2887    type AttachBpfFilterUnsafeResponseFut = fidl::client::QueryResponseFut<
2888        SocketAttachBpfFilterUnsafeResult,
2889        fidl::encoding::DefaultFuchsiaResourceDialect,
2890    >;
2891    fn r#attach_bpf_filter_unsafe(
2892        &self,
2893        mut code: &[u64],
2894    ) -> Self::AttachBpfFilterUnsafeResponseFut {
2895        fn _decode(
2896            mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2897        ) -> Result<SocketAttachBpfFilterUnsafeResult, fidl::Error> {
2898            let _response = fidl::client::decode_transaction_body::<
2899                fidl::encoding::ResultType<fidl::encoding::EmptyStruct, fidl_fuchsia_posix::Errno>,
2900                fidl::encoding::DefaultFuchsiaResourceDialect,
2901                0x593998d38670f823,
2902            >(_buf?)?;
2903            Ok(_response.map(|x| x))
2904        }
2905        self.client.send_query_and_decode::<
2906            SocketAttachBpfFilterUnsafeRequest,
2907            SocketAttachBpfFilterUnsafeResult,
2908        >(
2909            (code,),
2910            0x593998d38670f823,
2911            fidl::encoding::DynamicFlags::empty(),
2912            _decode,
2913        )
2914    }
2915}
2916
2917pub struct SocketEventStream {
2918    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2919}
2920
2921impl std::marker::Unpin for SocketEventStream {}
2922
2923impl futures::stream::FusedStream for SocketEventStream {
2924    fn is_terminated(&self) -> bool {
2925        self.event_receiver.is_terminated()
2926    }
2927}
2928
2929impl futures::Stream for SocketEventStream {
2930    type Item = Result<SocketEvent, fidl::Error>;
2931
2932    fn poll_next(
2933        mut self: std::pin::Pin<&mut Self>,
2934        cx: &mut std::task::Context<'_>,
2935    ) -> std::task::Poll<Option<Self::Item>> {
2936        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2937            &mut self.event_receiver,
2938            cx
2939        )?) {
2940            Some(buf) => std::task::Poll::Ready(Some(SocketEvent::decode(buf))),
2941            None => std::task::Poll::Ready(None),
2942        }
2943    }
2944}
2945
2946#[derive(Debug)]
2947pub enum SocketEvent {}
2948
2949impl SocketEvent {
2950    /// Decodes a message buffer as a [`SocketEvent`].
2951    fn decode(
2952        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2953    ) -> Result<SocketEvent, fidl::Error> {
2954        let (bytes, _handles) = buf.split_mut();
2955        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2956        debug_assert_eq!(tx_header.tx_id, 0);
2957        match tx_header.ordinal {
2958            _ => Err(fidl::Error::UnknownOrdinal {
2959                ordinal: tx_header.ordinal,
2960                protocol_name: <SocketMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2961            }),
2962        }
2963    }
2964}
2965
2966/// A Stream of incoming requests for fuchsia.posix.socket.packet/Socket.
2967pub struct SocketRequestStream {
2968    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2969    is_terminated: bool,
2970}
2971
2972impl std::marker::Unpin for SocketRequestStream {}
2973
2974impl futures::stream::FusedStream for SocketRequestStream {
2975    fn is_terminated(&self) -> bool {
2976        self.is_terminated
2977    }
2978}
2979
2980impl fidl::endpoints::RequestStream for SocketRequestStream {
2981    type Protocol = SocketMarker;
2982    type ControlHandle = SocketControlHandle;
2983
2984    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2985        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2986    }
2987
2988    fn control_handle(&self) -> Self::ControlHandle {
2989        SocketControlHandle { inner: self.inner.clone() }
2990    }
2991
2992    fn into_inner(
2993        self,
2994    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2995    {
2996        (self.inner, self.is_terminated)
2997    }
2998
2999    fn from_inner(
3000        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3001        is_terminated: bool,
3002    ) -> Self {
3003        Self { inner, is_terminated }
3004    }
3005}
3006
3007impl futures::Stream for SocketRequestStream {
3008    type Item = Result<SocketRequest, fidl::Error>;
3009
3010    fn poll_next(
3011        mut self: std::pin::Pin<&mut Self>,
3012        cx: &mut std::task::Context<'_>,
3013    ) -> std::task::Poll<Option<Self::Item>> {
3014        let this = &mut *self;
3015        if this.inner.check_shutdown(cx) {
3016            this.is_terminated = true;
3017            return std::task::Poll::Ready(None);
3018        }
3019        if this.is_terminated {
3020            panic!("polled SocketRequestStream after completion");
3021        }
3022        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3023            |bytes, handles| {
3024                match this.inner.channel().read_etc(cx, bytes, handles) {
3025                    std::task::Poll::Ready(Ok(())) => {}
3026                    std::task::Poll::Pending => return std::task::Poll::Pending,
3027                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3028                        this.is_terminated = true;
3029                        return std::task::Poll::Ready(None);
3030                    }
3031                    std::task::Poll::Ready(Err(e)) => {
3032                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3033                            e.into(),
3034                        ))))
3035                    }
3036                }
3037
3038                // A message has been received from the channel
3039                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3040
3041                std::task::Poll::Ready(Some(match header.ordinal {
3042                    0x20d8a7aba2168a79 => {
3043                        header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3044                        let mut req = fidl::new_empty!(
3045                            fidl_fuchsia_unknown::CloneableCloneRequest,
3046                            fidl::encoding::DefaultFuchsiaResourceDialect
3047                        );
3048                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3049                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3050                        Ok(SocketRequest::Clone { request: req.request, control_handle })
3051                    }
3052                    0x5ac5d459ad7f657e => {
3053                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3054                        let mut req = fidl::new_empty!(
3055                            fidl::encoding::EmptyPayload,
3056                            fidl::encoding::DefaultFuchsiaResourceDialect
3057                        );
3058                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3059                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3060                        Ok(SocketRequest::Close {
3061                            responder: SocketCloseResponder {
3062                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3063                                tx_id: header.tx_id,
3064                            },
3065                        })
3066                    }
3067                    0x2658edee9decfc06 => {
3068                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3069                        let mut req = fidl::new_empty!(
3070                            fidl::encoding::EmptyPayload,
3071                            fidl::encoding::DefaultFuchsiaResourceDialect
3072                        );
3073                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3074                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3075                        Ok(SocketRequest::Query {
3076                            responder: SocketQueryResponder {
3077                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3078                                tx_id: header.tx_id,
3079                            },
3080                        })
3081                    }
3082                    0x1fd74ee8b9a4a876 => {
3083                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3084                        let mut req = fidl::new_empty!(
3085                            fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressRequest,
3086                            fidl::encoding::DefaultFuchsiaResourceDialect
3087                        );
3088                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetReuseAddressRequest>(&header, _body_bytes, handles, &mut req)?;
3089                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3090                        Ok(SocketRequest::SetReuseAddress {
3091                            value: req.value,
3092
3093                            responder: SocketSetReuseAddressResponder {
3094                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3095                                tx_id: header.tx_id,
3096                            },
3097                        })
3098                    }
3099                    0x67b7206b8d1bc0a5 => {
3100                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3101                        let mut req = fidl::new_empty!(
3102                            fidl::encoding::EmptyPayload,
3103                            fidl::encoding::DefaultFuchsiaResourceDialect
3104                        );
3105                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3106                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3107                        Ok(SocketRequest::GetReuseAddress {
3108                            responder: SocketGetReuseAddressResponder {
3109                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3110                                tx_id: header.tx_id,
3111                            },
3112                        })
3113                    }
3114                    0x5aad39b33e5f6ebb => {
3115                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3116                        let mut req = fidl::new_empty!(
3117                            fidl::encoding::EmptyPayload,
3118                            fidl::encoding::DefaultFuchsiaResourceDialect
3119                        );
3120                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3121                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3122                        Ok(SocketRequest::GetError {
3123                            responder: SocketGetErrorResponder {
3124                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3125                                tx_id: header.tx_id,
3126                            },
3127                        })
3128                    }
3129                    0x6023e081ce3cd947 => {
3130                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3131                        let mut req = fidl::new_empty!(
3132                            fidl_fuchsia_posix_socket::BaseSocketSetBroadcastRequest,
3133                            fidl::encoding::DefaultFuchsiaResourceDialect
3134                        );
3135                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetBroadcastRequest>(&header, _body_bytes, handles, &mut req)?;
3136                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3137                        Ok(SocketRequest::SetBroadcast {
3138                            value: req.value,
3139
3140                            responder: SocketSetBroadcastResponder {
3141                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3142                                tx_id: header.tx_id,
3143                            },
3144                        })
3145                    }
3146                    0x68796fc556f9780d => {
3147                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3148                        let mut req = fidl::new_empty!(
3149                            fidl::encoding::EmptyPayload,
3150                            fidl::encoding::DefaultFuchsiaResourceDialect
3151                        );
3152                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3153                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3154                        Ok(SocketRequest::GetBroadcast {
3155                            responder: SocketGetBroadcastResponder {
3156                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3157                                tx_id: header.tx_id,
3158                            },
3159                        })
3160                    }
3161                    0x756eac32d73a7a70 => {
3162                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3163                        let mut req = fidl::new_empty!(
3164                            fidl_fuchsia_posix_socket::BaseSocketSetSendBufferRequest,
3165                            fidl::encoding::DefaultFuchsiaResourceDialect
3166                        );
3167                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetSendBufferRequest>(&header, _body_bytes, handles, &mut req)?;
3168                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3169                        Ok(SocketRequest::SetSendBuffer {
3170                            value_bytes: req.value_bytes,
3171
3172                            responder: SocketSetSendBufferResponder {
3173                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3174                                tx_id: header.tx_id,
3175                            },
3176                        })
3177                    }
3178                    0x78a52fd9c7b2410b => {
3179                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3180                        let mut req = fidl::new_empty!(
3181                            fidl::encoding::EmptyPayload,
3182                            fidl::encoding::DefaultFuchsiaResourceDialect
3183                        );
3184                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3185                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3186                        Ok(SocketRequest::GetSendBuffer {
3187                            responder: SocketGetSendBufferResponder {
3188                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3189                                tx_id: header.tx_id,
3190                            },
3191                        })
3192                    }
3193                    0x6b0cf2f1919c7001 => {
3194                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3195                        let mut req = fidl::new_empty!(
3196                            fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferRequest,
3197                            fidl::encoding::DefaultFuchsiaResourceDialect
3198                        );
3199                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetReceiveBufferRequest>(&header, _body_bytes, handles, &mut req)?;
3200                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3201                        Ok(SocketRequest::SetReceiveBuffer {
3202                            value_bytes: req.value_bytes,
3203
3204                            responder: SocketSetReceiveBufferResponder {
3205                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3206                                tx_id: header.tx_id,
3207                            },
3208                        })
3209                    }
3210                    0x14c1a4b64f709e5c => {
3211                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3212                        let mut req = fidl::new_empty!(
3213                            fidl::encoding::EmptyPayload,
3214                            fidl::encoding::DefaultFuchsiaResourceDialect
3215                        );
3216                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3217                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3218                        Ok(SocketRequest::GetReceiveBuffer {
3219                            responder: SocketGetReceiveBufferResponder {
3220                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3221                                tx_id: header.tx_id,
3222                            },
3223                        })
3224                    }
3225                    0x572df8f0b920d2c7 => {
3226                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3227                        let mut req = fidl::new_empty!(
3228                            fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveRequest,
3229                            fidl::encoding::DefaultFuchsiaResourceDialect
3230                        );
3231                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetKeepAliveRequest>(&header, _body_bytes, handles, &mut req)?;
3232                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3233                        Ok(SocketRequest::SetKeepAlive {
3234                            value: req.value,
3235
3236                            responder: SocketSetKeepAliveResponder {
3237                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3238                                tx_id: header.tx_id,
3239                            },
3240                        })
3241                    }
3242                    0x2dd29d3215f2c9d2 => {
3243                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3244                        let mut req = fidl::new_empty!(
3245                            fidl::encoding::EmptyPayload,
3246                            fidl::encoding::DefaultFuchsiaResourceDialect
3247                        );
3248                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3249                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3250                        Ok(SocketRequest::GetKeepAlive {
3251                            responder: SocketGetKeepAliveResponder {
3252                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3253                                tx_id: header.tx_id,
3254                            },
3255                        })
3256                    }
3257                    0x3ecb49968bee439 => {
3258                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3259                        let mut req = fidl::new_empty!(
3260                            fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineRequest,
3261                            fidl::encoding::DefaultFuchsiaResourceDialect
3262                        );
3263                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetOutOfBandInlineRequest>(&header, _body_bytes, handles, &mut req)?;
3264                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3265                        Ok(SocketRequest::SetOutOfBandInline {
3266                            value: req.value,
3267
3268                            responder: SocketSetOutOfBandInlineResponder {
3269                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3270                                tx_id: header.tx_id,
3271                            },
3272                        })
3273                    }
3274                    0x348c1ab3aeca1745 => {
3275                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3276                        let mut req = fidl::new_empty!(
3277                            fidl::encoding::EmptyPayload,
3278                            fidl::encoding::DefaultFuchsiaResourceDialect
3279                        );
3280                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3281                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3282                        Ok(SocketRequest::GetOutOfBandInline {
3283                            responder: SocketGetOutOfBandInlineResponder {
3284                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3285                                tx_id: header.tx_id,
3286                            },
3287                        })
3288                    }
3289                    0x6bbf00c53a4c78c2 => {
3290                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3291                        let mut req = fidl::new_empty!(
3292                            fidl_fuchsia_posix_socket::BaseSocketSetNoCheckRequest,
3293                            fidl::encoding::DefaultFuchsiaResourceDialect
3294                        );
3295                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetNoCheckRequest>(&header, _body_bytes, handles, &mut req)?;
3296                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3297                        Ok(SocketRequest::SetNoCheck {
3298                            value: req.value,
3299
3300                            responder: SocketSetNoCheckResponder {
3301                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3302                                tx_id: header.tx_id,
3303                            },
3304                        })
3305                    }
3306                    0x2cd4249286417694 => {
3307                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3308                        let mut req = fidl::new_empty!(
3309                            fidl::encoding::EmptyPayload,
3310                            fidl::encoding::DefaultFuchsiaResourceDialect
3311                        );
3312                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3313                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3314                        Ok(SocketRequest::GetNoCheck {
3315                            responder: SocketGetNoCheckResponder {
3316                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3317                                tx_id: header.tx_id,
3318                            },
3319                        })
3320                    }
3321                    0x45386351246e998e => {
3322                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3323                        let mut req = fidl::new_empty!(
3324                            fidl_fuchsia_posix_socket::BaseSocketSetLingerRequest,
3325                            fidl::encoding::DefaultFuchsiaResourceDialect
3326                        );
3327                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetLingerRequest>(&header, _body_bytes, handles, &mut req)?;
3328                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3329                        Ok(SocketRequest::SetLinger {
3330                            linger: req.linger,
3331                            length_secs: req.length_secs,
3332
3333                            responder: SocketSetLingerResponder {
3334                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3335                                tx_id: header.tx_id,
3336                            },
3337                        })
3338                    }
3339                    0x48eb20fc5ccb0e45 => {
3340                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3341                        let mut req = fidl::new_empty!(
3342                            fidl::encoding::EmptyPayload,
3343                            fidl::encoding::DefaultFuchsiaResourceDialect
3344                        );
3345                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3346                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3347                        Ok(SocketRequest::GetLinger {
3348                            responder: SocketGetLingerResponder {
3349                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3350                                tx_id: header.tx_id,
3351                            },
3352                        })
3353                    }
3354                    0x24dd3e5cb36d9ccb => {
3355                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3356                        let mut req = fidl::new_empty!(
3357                            fidl_fuchsia_posix_socket::BaseSocketSetReusePortRequest,
3358                            fidl::encoding::DefaultFuchsiaResourceDialect
3359                        );
3360                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetReusePortRequest>(&header, _body_bytes, handles, &mut req)?;
3361                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3362                        Ok(SocketRequest::SetReusePort {
3363                            value: req.value,
3364
3365                            responder: SocketSetReusePortResponder {
3366                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3367                                tx_id: header.tx_id,
3368                            },
3369                        })
3370                    }
3371                    0x7a112c1ab54ff828 => {
3372                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3373                        let mut req = fidl::new_empty!(
3374                            fidl::encoding::EmptyPayload,
3375                            fidl::encoding::DefaultFuchsiaResourceDialect
3376                        );
3377                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3378                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3379                        Ok(SocketRequest::GetReusePort {
3380                            responder: SocketGetReusePortResponder {
3381                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3382                                tx_id: header.tx_id,
3383                            },
3384                        })
3385                    }
3386                    0x67ce6db6c2ec8966 => {
3387                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3388                        let mut req = fidl::new_empty!(
3389                            fidl::encoding::EmptyPayload,
3390                            fidl::encoding::DefaultFuchsiaResourceDialect
3391                        );
3392                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3393                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3394                        Ok(SocketRequest::GetAcceptConn {
3395                            responder: SocketGetAcceptConnResponder {
3396                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3397                                tx_id: header.tx_id,
3398                            },
3399                        })
3400                    }
3401                    0x2118b483f28aafc4 => {
3402                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3403                        let mut req = fidl::new_empty!(
3404                            fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceRequest,
3405                            fidl::encoding::DefaultFuchsiaResourceDialect
3406                        );
3407                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetBindToDeviceRequest>(&header, _body_bytes, handles, &mut req)?;
3408                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3409                        Ok(SocketRequest::SetBindToDevice {
3410                            value: req.value,
3411
3412                            responder: SocketSetBindToDeviceResponder {
3413                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3414                                tx_id: header.tx_id,
3415                            },
3416                        })
3417                    }
3418                    0x1ab1fbf0ef7906c8 => {
3419                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3420                        let mut req = fidl::new_empty!(
3421                            fidl::encoding::EmptyPayload,
3422                            fidl::encoding::DefaultFuchsiaResourceDialect
3423                        );
3424                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3425                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3426                        Ok(SocketRequest::GetBindToDevice {
3427                            responder: SocketGetBindToDeviceResponder {
3428                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3429                                tx_id: header.tx_id,
3430                            },
3431                        })
3432                    }
3433                    0x6e387a0def00821 => {
3434                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3435                        let mut req = fidl::new_empty!(
3436                            fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexRequest,
3437                            fidl::encoding::DefaultFuchsiaResourceDialect
3438                        );
3439                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetBindToInterfaceIndexRequest>(&header, _body_bytes, handles, &mut req)?;
3440                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3441                        Ok(SocketRequest::SetBindToInterfaceIndex {
3442                            value: req.value,
3443
3444                            responder: SocketSetBindToInterfaceIndexResponder {
3445                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3446                                tx_id: header.tx_id,
3447                            },
3448                        })
3449                    }
3450                    0x59c31dd3e3078295 => {
3451                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3452                        let mut req = fidl::new_empty!(
3453                            fidl::encoding::EmptyPayload,
3454                            fidl::encoding::DefaultFuchsiaResourceDialect
3455                        );
3456                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3457                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3458                        Ok(SocketRequest::GetBindToInterfaceIndex {
3459                            responder: SocketGetBindToInterfaceIndexResponder {
3460                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3461                                tx_id: header.tx_id,
3462                            },
3463                        })
3464                    }
3465                    0x285d6516c263d839 => {
3466                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3467                        let mut req = fidl::new_empty!(
3468                            fidl_fuchsia_posix_socket::BaseSocketSetTimestampRequest,
3469                            fidl::encoding::DefaultFuchsiaResourceDialect
3470                        );
3471                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetTimestampRequest>(&header, _body_bytes, handles, &mut req)?;
3472                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3473                        Ok(SocketRequest::SetTimestamp {
3474                            value: req.value,
3475
3476                            responder: SocketSetTimestampResponder {
3477                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3478                                tx_id: header.tx_id,
3479                            },
3480                        })
3481                    }
3482                    0x49f2fffbbcc2bd27 => {
3483                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3484                        let mut req = fidl::new_empty!(
3485                            fidl::encoding::EmptyPayload,
3486                            fidl::encoding::DefaultFuchsiaResourceDialect
3487                        );
3488                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3489                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3490                        Ok(SocketRequest::GetTimestamp {
3491                            responder: SocketGetTimestampResponder {
3492                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3493                                tx_id: header.tx_id,
3494                            },
3495                        })
3496                    }
3497                    0x6ead6de09f653236 => {
3498                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3499                        let mut req = fidl::new_empty!(
3500                            fidl_fuchsia_posix_socket::BaseSocketSetMarkRequest,
3501                            fidl::encoding::DefaultFuchsiaResourceDialect
3502                        );
3503                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketSetMarkRequest>(&header, _body_bytes, handles, &mut req)?;
3504                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3505                        Ok(SocketRequest::SetMark {
3506                            domain: req.domain,
3507                            mark: req.mark,
3508
3509                            responder: SocketSetMarkResponder {
3510                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3511                                tx_id: header.tx_id,
3512                            },
3513                        })
3514                    }
3515                    0x57a2752c61d93d47 => {
3516                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3517                        let mut req = fidl::new_empty!(
3518                            fidl_fuchsia_posix_socket::BaseSocketGetMarkRequest,
3519                            fidl::encoding::DefaultFuchsiaResourceDialect
3520                        );
3521                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_posix_socket::BaseSocketGetMarkRequest>(&header, _body_bytes, handles, &mut req)?;
3522                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3523                        Ok(SocketRequest::GetMark {
3524                            domain: req.domain,
3525
3526                            responder: SocketGetMarkResponder {
3527                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3528                                tx_id: header.tx_id,
3529                            },
3530                        })
3531                    }
3532                    0x4fd7c08c9c804484 => {
3533                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3534                        let mut req = fidl::new_empty!(
3535                            fidl::encoding::EmptyPayload,
3536                            fidl::encoding::DefaultFuchsiaResourceDialect
3537                        );
3538                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3539                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3540                        Ok(SocketRequest::Describe {
3541                            responder: SocketDescribeResponder {
3542                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3543                                tx_id: header.tx_id,
3544                            },
3545                        })
3546                    }
3547                    0x6caedb2d31b56db8 => {
3548                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3549                        let mut req = fidl::new_empty!(
3550                            SocketBindRequest,
3551                            fidl::encoding::DefaultFuchsiaResourceDialect
3552                        );
3553                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SocketBindRequest>(&header, _body_bytes, handles, &mut req)?;
3554                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3555                        Ok(SocketRequest::Bind {
3556                            protocol: req.protocol,
3557                            bound_interface_id: req.bound_interface_id,
3558
3559                            responder: SocketBindResponder {
3560                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3561                                tx_id: header.tx_id,
3562                            },
3563                        })
3564                    }
3565                    0x7f67457e85c3914c => {
3566                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3567                        let mut req = fidl::new_empty!(
3568                            fidl::encoding::EmptyPayload,
3569                            fidl::encoding::DefaultFuchsiaResourceDialect
3570                        );
3571                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3572                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3573                        Ok(SocketRequest::GetInfo {
3574                            responder: SocketGetInfoResponder {
3575                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3576                                tx_id: header.tx_id,
3577                            },
3578                        })
3579                    }
3580                    0x52b95ba982826a61 => {
3581                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3582                        let mut req = fidl::new_empty!(
3583                            SocketRecvMsgRequest,
3584                            fidl::encoding::DefaultFuchsiaResourceDialect
3585                        );
3586                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SocketRecvMsgRequest>(&header, _body_bytes, handles, &mut req)?;
3587                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3588                        Ok(SocketRequest::RecvMsg {
3589                            want_packet_info: req.want_packet_info,
3590                            data_len: req.data_len,
3591                            want_control: req.want_control,
3592                            flags: req.flags,
3593
3594                            responder: SocketRecvMsgResponder {
3595                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3596                                tx_id: header.tx_id,
3597                            },
3598                        })
3599                    }
3600                    0x150c9ff91f944922 => {
3601                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3602                        let mut req = fidl::new_empty!(
3603                            SocketSendMsgRequest,
3604                            fidl::encoding::DefaultFuchsiaResourceDialect
3605                        );
3606                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SocketSendMsgRequest>(&header, _body_bytes, handles, &mut req)?;
3607                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3608                        Ok(SocketRequest::SendMsg {
3609                            packet_info: req.packet_info,
3610                            data: req.data,
3611                            control: req.control,
3612                            flags: req.flags,
3613
3614                            responder: SocketSendMsgResponder {
3615                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3616                                tx_id: header.tx_id,
3617                            },
3618                        })
3619                    }
3620                    0x593998d38670f823 => {
3621                        header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3622                        let mut req = fidl::new_empty!(
3623                            SocketAttachBpfFilterUnsafeRequest,
3624                            fidl::encoding::DefaultFuchsiaResourceDialect
3625                        );
3626                        fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SocketAttachBpfFilterUnsafeRequest>(&header, _body_bytes, handles, &mut req)?;
3627                        let control_handle = SocketControlHandle { inner: this.inner.clone() };
3628                        Ok(SocketRequest::AttachBpfFilterUnsafe {
3629                            code: req.code,
3630
3631                            responder: SocketAttachBpfFilterUnsafeResponder {
3632                                control_handle: std::mem::ManuallyDrop::new(control_handle),
3633                                tx_id: header.tx_id,
3634                            },
3635                        })
3636                    }
3637                    _ => Err(fidl::Error::UnknownOrdinal {
3638                        ordinal: header.ordinal,
3639                        protocol_name:
3640                            <SocketMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3641                    }),
3642                }))
3643            },
3644        )
3645    }
3646}
3647
3648/// A packet socket.
3649///
3650/// This interface is essentially POSIX.
3651///
3652/// All methods on this type are nonblocking; their exact behaviors match their
3653/// Linux counterparts.
3654///
3655/// *Warning:* This protocol is not yet ready for direct use by clients.
3656/// Instead, clients should use the BSD sockets API to interact with sockets.
3657/// We plan to change this protocol substantially and clients that couple
3658/// directly to this protocol will make those changes more difficult.
3659#[derive(Debug)]
3660pub enum SocketRequest {
3661    Clone {
3662        request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
3663        control_handle: SocketControlHandle,
3664    },
3665    /// Terminates the connection.
3666    ///
3667    /// After calling `Close`, the client must not send any other requests.
3668    ///
3669    /// Servers, after sending the status response, should close the connection
3670    /// regardless of status and without sending an epitaph.
3671    ///
3672    /// Closing the client end of the channel should be semantically equivalent
3673    /// to calling `Close` without knowing when the close has completed or its
3674    /// status.
3675    Close {
3676        responder: SocketCloseResponder,
3677    },
3678    Query {
3679        responder: SocketQueryResponder,
3680    },
3681    /// Set `SOL_SOCKET` -> `SO_REUSEADDR`.
3682    SetReuseAddress {
3683        value: bool,
3684        responder: SocketSetReuseAddressResponder,
3685    },
3686    /// Get `SOL_SOCKET` -> `SO_REUSEADDR`.
3687    GetReuseAddress {
3688        responder: SocketGetReuseAddressResponder,
3689    },
3690    /// Get `SOL_SOCKET` -> `SO_ERROR`.
3691    /// Returns the last error if there is an error set on the socket.
3692    GetError {
3693        responder: SocketGetErrorResponder,
3694    },
3695    /// Set `SOL_SOCKET` -> `SO_BROADCAST`.
3696    SetBroadcast {
3697        value: bool,
3698        responder: SocketSetBroadcastResponder,
3699    },
3700    /// Get `SOL_SOCKET` -> `SO_BROADCAST`.
3701    GetBroadcast {
3702        responder: SocketGetBroadcastResponder,
3703    },
3704    /// Set `SOL_SOCKET` -> `SO_SNDBUF`.
3705    SetSendBuffer {
3706        value_bytes: u64,
3707        responder: SocketSetSendBufferResponder,
3708    },
3709    /// Get `SOL_SOCKET` -> `SO_SNDBUF`.
3710    GetSendBuffer {
3711        responder: SocketGetSendBufferResponder,
3712    },
3713    /// Set `SOL_SOCKET` -> `SO_RCVBUF`.
3714    SetReceiveBuffer {
3715        value_bytes: u64,
3716        responder: SocketSetReceiveBufferResponder,
3717    },
3718    /// Get `SOL_SOCKET` -> `SO_RCVBUF`.
3719    GetReceiveBuffer {
3720        responder: SocketGetReceiveBufferResponder,
3721    },
3722    /// Set `SOL_SOCKET` -> `SO_KEEPALIVE`.
3723    SetKeepAlive {
3724        value: bool,
3725        responder: SocketSetKeepAliveResponder,
3726    },
3727    /// Get `SOL_SOCKET` -> `SO_KEEPALIVE`.
3728    GetKeepAlive {
3729        responder: SocketGetKeepAliveResponder,
3730    },
3731    /// Set `SOL_SOCKET` -> `SO_OOBINLINE`.
3732    SetOutOfBandInline {
3733        value: bool,
3734        responder: SocketSetOutOfBandInlineResponder,
3735    },
3736    /// Get `SOL_SOCKET` -> `SO_OOBINLINE`.
3737    GetOutOfBandInline {
3738        responder: SocketGetOutOfBandInlineResponder,
3739    },
3740    /// Set `SOL_SOCKET` -> `SO_NO_CHECK`.
3741    SetNoCheck {
3742        value: bool,
3743        responder: SocketSetNoCheckResponder,
3744    },
3745    /// Get `SOL_SOCKET` -> `SO_NO_CHECK`.
3746    GetNoCheck {
3747        responder: SocketGetNoCheckResponder,
3748    },
3749    /// Set `SOL_SOCKET` -> `SO_LINGER`.
3750    SetLinger {
3751        linger: bool,
3752        length_secs: u32,
3753        responder: SocketSetLingerResponder,
3754    },
3755    /// Get `SOL_SOCKET` -> `SO_LINGER`.
3756    GetLinger {
3757        responder: SocketGetLingerResponder,
3758    },
3759    /// Set `SOL_SOCKET` -> `SO_REUSEPORT`.
3760    SetReusePort {
3761        value: bool,
3762        responder: SocketSetReusePortResponder,
3763    },
3764    /// Get `SOL_SOCKET` -> `SO_REUSEPORT`.
3765    GetReusePort {
3766        responder: SocketGetReusePortResponder,
3767    },
3768    /// Get `SOL_SOCKET` -> `SO_ACCEPTCONN`.
3769    GetAcceptConn {
3770        responder: SocketGetAcceptConnResponder,
3771    },
3772    /// Set `SOL_SOCKET` -> `SO_BINDTODEVICE`.
3773    SetBindToDevice {
3774        value: String,
3775        responder: SocketSetBindToDeviceResponder,
3776    },
3777    /// Get `SOL_SOCKET` -> `SO_BINDTODEVICE`.
3778    GetBindToDevice {
3779        responder: SocketGetBindToDeviceResponder,
3780    },
3781    /// Set `SOL_SOCKET` -> `SO_BINDTOIFINDEX`.
3782    /// If `value` is 0, this clears the bound interface.
3783    SetBindToInterfaceIndex {
3784        value: u64,
3785        responder: SocketSetBindToInterfaceIndexResponder,
3786    },
3787    /// Get `SOL_SOCKET` -> `SO_BINDTOIFINDEX`.
3788    GetBindToInterfaceIndex {
3789        responder: SocketGetBindToInterfaceIndexResponder,
3790    },
3791    /// Set `SOL_SOCKET` -> `SO_TIMESTAMP` or `SO_TIMESTAMPNS`.
3792    SetTimestamp {
3793        value: fidl_fuchsia_posix_socket::TimestampOption,
3794        responder: SocketSetTimestampResponder,
3795    },
3796    /// Get `SOL_SOCKET` -> `SO_TIMESTAMP` or `SO_TIMESTAMPNS`.
3797    GetTimestamp {
3798        responder: SocketGetTimestampResponder,
3799    },
3800    /// Like setting `SOL_SOCKET` -> `SO_MARK`. The major difference is that
3801    /// unlike the standard SO_MARK, this API has multiple mark domains and each
3802    /// mark can be set independently in each domain.
3803    SetMark {
3804        domain: fidl_fuchsia_net::MarkDomain,
3805        mark: fidl_fuchsia_posix_socket::OptionalUint32,
3806        responder: SocketSetMarkResponder,
3807    },
3808    /// Like getting `SOL_SOCKET` -> `SO_MARK`. The major difference is that
3809    /// unlike the standard SO_MARK, this API has multiple mark domains and each
3810    /// mark can be retrieved independently in each domain.
3811    GetMark {
3812        domain: fidl_fuchsia_net::MarkDomain,
3813        responder: SocketGetMarkResponder,
3814    },
3815    Describe {
3816        responder: SocketDescribeResponder,
3817    },
3818    /// Bind the socket to a protocol and/or interface.
3819    ///
3820    /// + request `protocol` the socket's new protocol association.
3821    /// + request `bound_interface_id` the socket's new interface binding.
3822    Bind {
3823        protocol: Option<Box<ProtocolAssociation>>,
3824        bound_interface_id: BoundInterfaceId,
3825        responder: SocketBindResponder,
3826    },
3827    /// Returns the the socket's properties.
3828    ///
3829    /// - response `kind` the socket's `Kind`.
3830    /// - response `protocol` the socket's protocol association, if associated.
3831    /// - response `bound_interface` properties of the socket's interface
3832    ///   binding.
3833    GetInfo {
3834        responder: SocketGetInfoResponder,
3835    },
3836    /// Receives a message from the socket.
3837    ///
3838    /// + request `want_packet_info` request information about the packet to be
3839    ///   returned.
3840    /// + request `data_len` the maximum allowed length of the response data
3841    ///   buffer.
3842    /// + request `want_control` request ancillary data to be returned.
3843    /// + request `flags` flags for the receive request.
3844    /// - response `packet_info` information about the packet, if requested.
3845    /// - response `data` the message.
3846    /// - response `control` control messages, if requested.
3847    /// - response `truncated` indicates whether or not the returned message
3848    ///   was truncated.
3849    RecvMsg {
3850        want_packet_info: bool,
3851        data_len: u32,
3852        want_control: bool,
3853        flags: fidl_fuchsia_posix_socket::RecvMsgFlags,
3854        responder: SocketRecvMsgResponder,
3855    },
3856    /// Sends a message on the socket.
3857    ///
3858    /// + request `packet_info` information about the packet.
3859    /// + request `data` the message.
3860    /// + request `control` ancillary data.
3861    /// + request `flags` flags for the send request.
3862    SendMsg {
3863        packet_info: Option<Box<PacketInfo>>,
3864        data: Vec<u8>,
3865        control: SendControlData,
3866        flags: fidl_fuchsia_posix_socket::SendMsgFlags,
3867        responder: SocketSendMsgResponder,
3868    },
3869    /// Attaches the specified eBPF filter. The filter is assumed to be verified with 2 arguments
3870    ///  1. Pointer to the packet of size 0, i.e. not accessed directly (only using cBPF packet
3871    ///     load instructions).
3872    ///  2. Packet size (BPF_LOAD).
3873    /// Helper functions and maps are not supported.
3874    AttachBpfFilterUnsafe {
3875        code: Vec<u64>,
3876        responder: SocketAttachBpfFilterUnsafeResponder,
3877    },
3878}
3879
3880impl SocketRequest {
3881    #[allow(irrefutable_let_patterns)]
3882    pub fn into_clone(
3883        self,
3884    ) -> Option<(
3885        fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
3886        SocketControlHandle,
3887    )> {
3888        if let SocketRequest::Clone { request, control_handle } = self {
3889            Some((request, control_handle))
3890        } else {
3891            None
3892        }
3893    }
3894
3895    #[allow(irrefutable_let_patterns)]
3896    pub fn into_close(self) -> Option<(SocketCloseResponder)> {
3897        if let SocketRequest::Close { responder } = self {
3898            Some((responder))
3899        } else {
3900            None
3901        }
3902    }
3903
3904    #[allow(irrefutable_let_patterns)]
3905    pub fn into_query(self) -> Option<(SocketQueryResponder)> {
3906        if let SocketRequest::Query { responder } = self {
3907            Some((responder))
3908        } else {
3909            None
3910        }
3911    }
3912
3913    #[allow(irrefutable_let_patterns)]
3914    pub fn into_set_reuse_address(self) -> Option<(bool, SocketSetReuseAddressResponder)> {
3915        if let SocketRequest::SetReuseAddress { value, responder } = self {
3916            Some((value, responder))
3917        } else {
3918            None
3919        }
3920    }
3921
3922    #[allow(irrefutable_let_patterns)]
3923    pub fn into_get_reuse_address(self) -> Option<(SocketGetReuseAddressResponder)> {
3924        if let SocketRequest::GetReuseAddress { responder } = self {
3925            Some((responder))
3926        } else {
3927            None
3928        }
3929    }
3930
3931    #[allow(irrefutable_let_patterns)]
3932    pub fn into_get_error(self) -> Option<(SocketGetErrorResponder)> {
3933        if let SocketRequest::GetError { responder } = self {
3934            Some((responder))
3935        } else {
3936            None
3937        }
3938    }
3939
3940    #[allow(irrefutable_let_patterns)]
3941    pub fn into_set_broadcast(self) -> Option<(bool, SocketSetBroadcastResponder)> {
3942        if let SocketRequest::SetBroadcast { value, responder } = self {
3943            Some((value, responder))
3944        } else {
3945            None
3946        }
3947    }
3948
3949    #[allow(irrefutable_let_patterns)]
3950    pub fn into_get_broadcast(self) -> Option<(SocketGetBroadcastResponder)> {
3951        if let SocketRequest::GetBroadcast { responder } = self {
3952            Some((responder))
3953        } else {
3954            None
3955        }
3956    }
3957
3958    #[allow(irrefutable_let_patterns)]
3959    pub fn into_set_send_buffer(self) -> Option<(u64, SocketSetSendBufferResponder)> {
3960        if let SocketRequest::SetSendBuffer { value_bytes, responder } = self {
3961            Some((value_bytes, responder))
3962        } else {
3963            None
3964        }
3965    }
3966
3967    #[allow(irrefutable_let_patterns)]
3968    pub fn into_get_send_buffer(self) -> Option<(SocketGetSendBufferResponder)> {
3969        if let SocketRequest::GetSendBuffer { responder } = self {
3970            Some((responder))
3971        } else {
3972            None
3973        }
3974    }
3975
3976    #[allow(irrefutable_let_patterns)]
3977    pub fn into_set_receive_buffer(self) -> Option<(u64, SocketSetReceiveBufferResponder)> {
3978        if let SocketRequest::SetReceiveBuffer { value_bytes, responder } = self {
3979            Some((value_bytes, responder))
3980        } else {
3981            None
3982        }
3983    }
3984
3985    #[allow(irrefutable_let_patterns)]
3986    pub fn into_get_receive_buffer(self) -> Option<(SocketGetReceiveBufferResponder)> {
3987        if let SocketRequest::GetReceiveBuffer { responder } = self {
3988            Some((responder))
3989        } else {
3990            None
3991        }
3992    }
3993
3994    #[allow(irrefutable_let_patterns)]
3995    pub fn into_set_keep_alive(self) -> Option<(bool, SocketSetKeepAliveResponder)> {
3996        if let SocketRequest::SetKeepAlive { value, responder } = self {
3997            Some((value, responder))
3998        } else {
3999            None
4000        }
4001    }
4002
4003    #[allow(irrefutable_let_patterns)]
4004    pub fn into_get_keep_alive(self) -> Option<(SocketGetKeepAliveResponder)> {
4005        if let SocketRequest::GetKeepAlive { responder } = self {
4006            Some((responder))
4007        } else {
4008            None
4009        }
4010    }
4011
4012    #[allow(irrefutable_let_patterns)]
4013    pub fn into_set_out_of_band_inline(self) -> Option<(bool, SocketSetOutOfBandInlineResponder)> {
4014        if let SocketRequest::SetOutOfBandInline { value, responder } = self {
4015            Some((value, responder))
4016        } else {
4017            None
4018        }
4019    }
4020
4021    #[allow(irrefutable_let_patterns)]
4022    pub fn into_get_out_of_band_inline(self) -> Option<(SocketGetOutOfBandInlineResponder)> {
4023        if let SocketRequest::GetOutOfBandInline { responder } = self {
4024            Some((responder))
4025        } else {
4026            None
4027        }
4028    }
4029
4030    #[allow(irrefutable_let_patterns)]
4031    pub fn into_set_no_check(self) -> Option<(bool, SocketSetNoCheckResponder)> {
4032        if let SocketRequest::SetNoCheck { value, responder } = self {
4033            Some((value, responder))
4034        } else {
4035            None
4036        }
4037    }
4038
4039    #[allow(irrefutable_let_patterns)]
4040    pub fn into_get_no_check(self) -> Option<(SocketGetNoCheckResponder)> {
4041        if let SocketRequest::GetNoCheck { responder } = self {
4042            Some((responder))
4043        } else {
4044            None
4045        }
4046    }
4047
4048    #[allow(irrefutable_let_patterns)]
4049    pub fn into_set_linger(self) -> Option<(bool, u32, SocketSetLingerResponder)> {
4050        if let SocketRequest::SetLinger { linger, length_secs, responder } = self {
4051            Some((linger, length_secs, responder))
4052        } else {
4053            None
4054        }
4055    }
4056
4057    #[allow(irrefutable_let_patterns)]
4058    pub fn into_get_linger(self) -> Option<(SocketGetLingerResponder)> {
4059        if let SocketRequest::GetLinger { responder } = self {
4060            Some((responder))
4061        } else {
4062            None
4063        }
4064    }
4065
4066    #[allow(irrefutable_let_patterns)]
4067    pub fn into_set_reuse_port(self) -> Option<(bool, SocketSetReusePortResponder)> {
4068        if let SocketRequest::SetReusePort { value, responder } = self {
4069            Some((value, responder))
4070        } else {
4071            None
4072        }
4073    }
4074
4075    #[allow(irrefutable_let_patterns)]
4076    pub fn into_get_reuse_port(self) -> Option<(SocketGetReusePortResponder)> {
4077        if let SocketRequest::GetReusePort { responder } = self {
4078            Some((responder))
4079        } else {
4080            None
4081        }
4082    }
4083
4084    #[allow(irrefutable_let_patterns)]
4085    pub fn into_get_accept_conn(self) -> Option<(SocketGetAcceptConnResponder)> {
4086        if let SocketRequest::GetAcceptConn { responder } = self {
4087            Some((responder))
4088        } else {
4089            None
4090        }
4091    }
4092
4093    #[allow(irrefutable_let_patterns)]
4094    pub fn into_set_bind_to_device(self) -> Option<(String, SocketSetBindToDeviceResponder)> {
4095        if let SocketRequest::SetBindToDevice { value, responder } = self {
4096            Some((value, responder))
4097        } else {
4098            None
4099        }
4100    }
4101
4102    #[allow(irrefutable_let_patterns)]
4103    pub fn into_get_bind_to_device(self) -> Option<(SocketGetBindToDeviceResponder)> {
4104        if let SocketRequest::GetBindToDevice { responder } = self {
4105            Some((responder))
4106        } else {
4107            None
4108        }
4109    }
4110
4111    #[allow(irrefutable_let_patterns)]
4112    pub fn into_set_bind_to_interface_index(
4113        self,
4114    ) -> Option<(u64, SocketSetBindToInterfaceIndexResponder)> {
4115        if let SocketRequest::SetBindToInterfaceIndex { value, responder } = self {
4116            Some((value, responder))
4117        } else {
4118            None
4119        }
4120    }
4121
4122    #[allow(irrefutable_let_patterns)]
4123    pub fn into_get_bind_to_interface_index(
4124        self,
4125    ) -> Option<(SocketGetBindToInterfaceIndexResponder)> {
4126        if let SocketRequest::GetBindToInterfaceIndex { responder } = self {
4127            Some((responder))
4128        } else {
4129            None
4130        }
4131    }
4132
4133    #[allow(irrefutable_let_patterns)]
4134    pub fn into_set_timestamp(
4135        self,
4136    ) -> Option<(fidl_fuchsia_posix_socket::TimestampOption, SocketSetTimestampResponder)> {
4137        if let SocketRequest::SetTimestamp { value, responder } = self {
4138            Some((value, responder))
4139        } else {
4140            None
4141        }
4142    }
4143
4144    #[allow(irrefutable_let_patterns)]
4145    pub fn into_get_timestamp(self) -> Option<(SocketGetTimestampResponder)> {
4146        if let SocketRequest::GetTimestamp { responder } = self {
4147            Some((responder))
4148        } else {
4149            None
4150        }
4151    }
4152
4153    #[allow(irrefutable_let_patterns)]
4154    pub fn into_set_mark(
4155        self,
4156    ) -> Option<(
4157        fidl_fuchsia_net::MarkDomain,
4158        fidl_fuchsia_posix_socket::OptionalUint32,
4159        SocketSetMarkResponder,
4160    )> {
4161        if let SocketRequest::SetMark { domain, mark, responder } = self {
4162            Some((domain, mark, responder))
4163        } else {
4164            None
4165        }
4166    }
4167
4168    #[allow(irrefutable_let_patterns)]
4169    pub fn into_get_mark(self) -> Option<(fidl_fuchsia_net::MarkDomain, SocketGetMarkResponder)> {
4170        if let SocketRequest::GetMark { domain, responder } = self {
4171            Some((domain, responder))
4172        } else {
4173            None
4174        }
4175    }
4176
4177    #[allow(irrefutable_let_patterns)]
4178    pub fn into_describe(self) -> Option<(SocketDescribeResponder)> {
4179        if let SocketRequest::Describe { responder } = self {
4180            Some((responder))
4181        } else {
4182            None
4183        }
4184    }
4185
4186    #[allow(irrefutable_let_patterns)]
4187    pub fn into_bind(
4188        self,
4189    ) -> Option<(Option<Box<ProtocolAssociation>>, BoundInterfaceId, SocketBindResponder)> {
4190        if let SocketRequest::Bind { protocol, bound_interface_id, responder } = self {
4191            Some((protocol, bound_interface_id, responder))
4192        } else {
4193            None
4194        }
4195    }
4196
4197    #[allow(irrefutable_let_patterns)]
4198    pub fn into_get_info(self) -> Option<(SocketGetInfoResponder)> {
4199        if let SocketRequest::GetInfo { responder } = self {
4200            Some((responder))
4201        } else {
4202            None
4203        }
4204    }
4205
4206    #[allow(irrefutable_let_patterns)]
4207    pub fn into_recv_msg(
4208        self,
4209    ) -> Option<(bool, u32, bool, fidl_fuchsia_posix_socket::RecvMsgFlags, SocketRecvMsgResponder)>
4210    {
4211        if let SocketRequest::RecvMsg {
4212            want_packet_info,
4213            data_len,
4214            want_control,
4215            flags,
4216            responder,
4217        } = self
4218        {
4219            Some((want_packet_info, data_len, want_control, flags, responder))
4220        } else {
4221            None
4222        }
4223    }
4224
4225    #[allow(irrefutable_let_patterns)]
4226    pub fn into_send_msg(
4227        self,
4228    ) -> Option<(
4229        Option<Box<PacketInfo>>,
4230        Vec<u8>,
4231        SendControlData,
4232        fidl_fuchsia_posix_socket::SendMsgFlags,
4233        SocketSendMsgResponder,
4234    )> {
4235        if let SocketRequest::SendMsg { packet_info, data, control, flags, responder } = self {
4236            Some((packet_info, data, control, flags, responder))
4237        } else {
4238            None
4239        }
4240    }
4241
4242    #[allow(irrefutable_let_patterns)]
4243    pub fn into_attach_bpf_filter_unsafe(
4244        self,
4245    ) -> Option<(Vec<u64>, SocketAttachBpfFilterUnsafeResponder)> {
4246        if let SocketRequest::AttachBpfFilterUnsafe { code, responder } = self {
4247            Some((code, responder))
4248        } else {
4249            None
4250        }
4251    }
4252
4253    /// Name of the method defined in FIDL
4254    pub fn method_name(&self) -> &'static str {
4255        match *self {
4256            SocketRequest::Clone { .. } => "clone",
4257            SocketRequest::Close { .. } => "close",
4258            SocketRequest::Query { .. } => "query",
4259            SocketRequest::SetReuseAddress { .. } => "set_reuse_address",
4260            SocketRequest::GetReuseAddress { .. } => "get_reuse_address",
4261            SocketRequest::GetError { .. } => "get_error",
4262            SocketRequest::SetBroadcast { .. } => "set_broadcast",
4263            SocketRequest::GetBroadcast { .. } => "get_broadcast",
4264            SocketRequest::SetSendBuffer { .. } => "set_send_buffer",
4265            SocketRequest::GetSendBuffer { .. } => "get_send_buffer",
4266            SocketRequest::SetReceiveBuffer { .. } => "set_receive_buffer",
4267            SocketRequest::GetReceiveBuffer { .. } => "get_receive_buffer",
4268            SocketRequest::SetKeepAlive { .. } => "set_keep_alive",
4269            SocketRequest::GetKeepAlive { .. } => "get_keep_alive",
4270            SocketRequest::SetOutOfBandInline { .. } => "set_out_of_band_inline",
4271            SocketRequest::GetOutOfBandInline { .. } => "get_out_of_band_inline",
4272            SocketRequest::SetNoCheck { .. } => "set_no_check",
4273            SocketRequest::GetNoCheck { .. } => "get_no_check",
4274            SocketRequest::SetLinger { .. } => "set_linger",
4275            SocketRequest::GetLinger { .. } => "get_linger",
4276            SocketRequest::SetReusePort { .. } => "set_reuse_port",
4277            SocketRequest::GetReusePort { .. } => "get_reuse_port",
4278            SocketRequest::GetAcceptConn { .. } => "get_accept_conn",
4279            SocketRequest::SetBindToDevice { .. } => "set_bind_to_device",
4280            SocketRequest::GetBindToDevice { .. } => "get_bind_to_device",
4281            SocketRequest::SetBindToInterfaceIndex { .. } => "set_bind_to_interface_index",
4282            SocketRequest::GetBindToInterfaceIndex { .. } => "get_bind_to_interface_index",
4283            SocketRequest::SetTimestamp { .. } => "set_timestamp",
4284            SocketRequest::GetTimestamp { .. } => "get_timestamp",
4285            SocketRequest::SetMark { .. } => "set_mark",
4286            SocketRequest::GetMark { .. } => "get_mark",
4287            SocketRequest::Describe { .. } => "describe",
4288            SocketRequest::Bind { .. } => "bind",
4289            SocketRequest::GetInfo { .. } => "get_info",
4290            SocketRequest::RecvMsg { .. } => "recv_msg",
4291            SocketRequest::SendMsg { .. } => "send_msg",
4292            SocketRequest::AttachBpfFilterUnsafe { .. } => "attach_bpf_filter_unsafe",
4293        }
4294    }
4295}
4296
4297#[derive(Debug, Clone)]
4298pub struct SocketControlHandle {
4299    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4300}
4301
4302impl fidl::endpoints::ControlHandle for SocketControlHandle {
4303    fn shutdown(&self) {
4304        self.inner.shutdown()
4305    }
4306    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4307        self.inner.shutdown_with_epitaph(status)
4308    }
4309
4310    fn is_closed(&self) -> bool {
4311        self.inner.channel().is_closed()
4312    }
4313    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4314        self.inner.channel().on_closed()
4315    }
4316
4317    #[cfg(target_os = "fuchsia")]
4318    fn signal_peer(
4319        &self,
4320        clear_mask: zx::Signals,
4321        set_mask: zx::Signals,
4322    ) -> Result<(), zx_status::Status> {
4323        use fidl::Peered;
4324        self.inner.channel().signal_peer(clear_mask, set_mask)
4325    }
4326}
4327
4328impl SocketControlHandle {}
4329
4330#[must_use = "FIDL methods require a response to be sent"]
4331#[derive(Debug)]
4332pub struct SocketCloseResponder {
4333    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4334    tx_id: u32,
4335}
4336
4337/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4338/// if the responder is dropped without sending a response, so that the client
4339/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4340impl std::ops::Drop for SocketCloseResponder {
4341    fn drop(&mut self) {
4342        self.control_handle.shutdown();
4343        // Safety: drops once, never accessed again
4344        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4345    }
4346}
4347
4348impl fidl::endpoints::Responder for SocketCloseResponder {
4349    type ControlHandle = SocketControlHandle;
4350
4351    fn control_handle(&self) -> &SocketControlHandle {
4352        &self.control_handle
4353    }
4354
4355    fn drop_without_shutdown(mut self) {
4356        // Safety: drops once, never accessed again due to mem::forget
4357        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4358        // Prevent Drop from running (which would shut down the channel)
4359        std::mem::forget(self);
4360    }
4361}
4362
4363impl SocketCloseResponder {
4364    /// Sends a response to the FIDL transaction.
4365    ///
4366    /// Sets the channel to shutdown if an error occurs.
4367    pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4368        let _result = self.send_raw(result);
4369        if _result.is_err() {
4370            self.control_handle.shutdown();
4371        }
4372        self.drop_without_shutdown();
4373        _result
4374    }
4375
4376    /// Similar to "send" but does not shutdown the channel if an error occurs.
4377    pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4378        let _result = self.send_raw(result);
4379        self.drop_without_shutdown();
4380        _result
4381    }
4382
4383    fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4384        self.control_handle
4385            .inner
4386            .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4387                result,
4388                self.tx_id,
4389                0x5ac5d459ad7f657e,
4390                fidl::encoding::DynamicFlags::empty(),
4391            )
4392    }
4393}
4394
4395#[must_use = "FIDL methods require a response to be sent"]
4396#[derive(Debug)]
4397pub struct SocketQueryResponder {
4398    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4399    tx_id: u32,
4400}
4401
4402/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4403/// if the responder is dropped without sending a response, so that the client
4404/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4405impl std::ops::Drop for SocketQueryResponder {
4406    fn drop(&mut self) {
4407        self.control_handle.shutdown();
4408        // Safety: drops once, never accessed again
4409        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4410    }
4411}
4412
4413impl fidl::endpoints::Responder for SocketQueryResponder {
4414    type ControlHandle = SocketControlHandle;
4415
4416    fn control_handle(&self) -> &SocketControlHandle {
4417        &self.control_handle
4418    }
4419
4420    fn drop_without_shutdown(mut self) {
4421        // Safety: drops once, never accessed again due to mem::forget
4422        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4423        // Prevent Drop from running (which would shut down the channel)
4424        std::mem::forget(self);
4425    }
4426}
4427
4428impl SocketQueryResponder {
4429    /// Sends a response to the FIDL transaction.
4430    ///
4431    /// Sets the channel to shutdown if an error occurs.
4432    pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4433        let _result = self.send_raw(protocol);
4434        if _result.is_err() {
4435            self.control_handle.shutdown();
4436        }
4437        self.drop_without_shutdown();
4438        _result
4439    }
4440
4441    /// Similar to "send" but does not shutdown the channel if an error occurs.
4442    pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4443        let _result = self.send_raw(protocol);
4444        self.drop_without_shutdown();
4445        _result
4446    }
4447
4448    fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4449        self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
4450            (protocol,),
4451            self.tx_id,
4452            0x2658edee9decfc06,
4453            fidl::encoding::DynamicFlags::empty(),
4454        )
4455    }
4456}
4457
4458#[must_use = "FIDL methods require a response to be sent"]
4459#[derive(Debug)]
4460pub struct SocketSetReuseAddressResponder {
4461    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4462    tx_id: u32,
4463}
4464
4465/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4466/// if the responder is dropped without sending a response, so that the client
4467/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4468impl std::ops::Drop for SocketSetReuseAddressResponder {
4469    fn drop(&mut self) {
4470        self.control_handle.shutdown();
4471        // Safety: drops once, never accessed again
4472        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4473    }
4474}
4475
4476impl fidl::endpoints::Responder for SocketSetReuseAddressResponder {
4477    type ControlHandle = SocketControlHandle;
4478
4479    fn control_handle(&self) -> &SocketControlHandle {
4480        &self.control_handle
4481    }
4482
4483    fn drop_without_shutdown(mut self) {
4484        // Safety: drops once, never accessed again due to mem::forget
4485        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4486        // Prevent Drop from running (which would shut down the channel)
4487        std::mem::forget(self);
4488    }
4489}
4490
4491impl SocketSetReuseAddressResponder {
4492    /// Sends a response to the FIDL transaction.
4493    ///
4494    /// Sets the channel to shutdown if an error occurs.
4495    pub fn send(
4496        self,
4497        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4498    ) -> Result<(), fidl::Error> {
4499        let _result = self.send_raw(result);
4500        if _result.is_err() {
4501            self.control_handle.shutdown();
4502        }
4503        self.drop_without_shutdown();
4504        _result
4505    }
4506
4507    /// Similar to "send" but does not shutdown the channel if an error occurs.
4508    pub fn send_no_shutdown_on_err(
4509        self,
4510        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4511    ) -> Result<(), fidl::Error> {
4512        let _result = self.send_raw(result);
4513        self.drop_without_shutdown();
4514        _result
4515    }
4516
4517    fn send_raw(
4518        &self,
4519        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4520    ) -> Result<(), fidl::Error> {
4521        self.control_handle.inner.send::<fidl::encoding::ResultType<
4522            fidl::encoding::EmptyStruct,
4523            fidl_fuchsia_posix::Errno,
4524        >>(
4525            result,
4526            self.tx_id,
4527            0x1fd74ee8b9a4a876,
4528            fidl::encoding::DynamicFlags::empty(),
4529        )
4530    }
4531}
4532
4533#[must_use = "FIDL methods require a response to be sent"]
4534#[derive(Debug)]
4535pub struct SocketGetReuseAddressResponder {
4536    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4537    tx_id: u32,
4538}
4539
4540/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4541/// if the responder is dropped without sending a response, so that the client
4542/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4543impl std::ops::Drop for SocketGetReuseAddressResponder {
4544    fn drop(&mut self) {
4545        self.control_handle.shutdown();
4546        // Safety: drops once, never accessed again
4547        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4548    }
4549}
4550
4551impl fidl::endpoints::Responder for SocketGetReuseAddressResponder {
4552    type ControlHandle = SocketControlHandle;
4553
4554    fn control_handle(&self) -> &SocketControlHandle {
4555        &self.control_handle
4556    }
4557
4558    fn drop_without_shutdown(mut self) {
4559        // Safety: drops once, never accessed again due to mem::forget
4560        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4561        // Prevent Drop from running (which would shut down the channel)
4562        std::mem::forget(self);
4563    }
4564}
4565
4566impl SocketGetReuseAddressResponder {
4567    /// Sends a response to the FIDL transaction.
4568    ///
4569    /// Sets the channel to shutdown if an error occurs.
4570    pub fn send(
4571        self,
4572        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
4573    ) -> Result<(), fidl::Error> {
4574        let _result = self.send_raw(result);
4575        if _result.is_err() {
4576            self.control_handle.shutdown();
4577        }
4578        self.drop_without_shutdown();
4579        _result
4580    }
4581
4582    /// Similar to "send" but does not shutdown the channel if an error occurs.
4583    pub fn send_no_shutdown_on_err(
4584        self,
4585        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
4586    ) -> Result<(), fidl::Error> {
4587        let _result = self.send_raw(result);
4588        self.drop_without_shutdown();
4589        _result
4590    }
4591
4592    fn send_raw(
4593        &self,
4594        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
4595    ) -> Result<(), fidl::Error> {
4596        self.control_handle.inner.send::<fidl::encoding::ResultType<
4597            fidl_fuchsia_posix_socket::BaseSocketGetReuseAddressResponse,
4598            fidl_fuchsia_posix::Errno,
4599        >>(
4600            result.map(|value| (value,)),
4601            self.tx_id,
4602            0x67b7206b8d1bc0a5,
4603            fidl::encoding::DynamicFlags::empty(),
4604        )
4605    }
4606}
4607
4608#[must_use = "FIDL methods require a response to be sent"]
4609#[derive(Debug)]
4610pub struct SocketGetErrorResponder {
4611    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4612    tx_id: u32,
4613}
4614
4615/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4616/// if the responder is dropped without sending a response, so that the client
4617/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4618impl std::ops::Drop for SocketGetErrorResponder {
4619    fn drop(&mut self) {
4620        self.control_handle.shutdown();
4621        // Safety: drops once, never accessed again
4622        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4623    }
4624}
4625
4626impl fidl::endpoints::Responder for SocketGetErrorResponder {
4627    type ControlHandle = SocketControlHandle;
4628
4629    fn control_handle(&self) -> &SocketControlHandle {
4630        &self.control_handle
4631    }
4632
4633    fn drop_without_shutdown(mut self) {
4634        // Safety: drops once, never accessed again due to mem::forget
4635        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4636        // Prevent Drop from running (which would shut down the channel)
4637        std::mem::forget(self);
4638    }
4639}
4640
4641impl SocketGetErrorResponder {
4642    /// Sends a response to the FIDL transaction.
4643    ///
4644    /// Sets the channel to shutdown if an error occurs.
4645    pub fn send(
4646        self,
4647        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4648    ) -> Result<(), fidl::Error> {
4649        let _result = self.send_raw(result);
4650        if _result.is_err() {
4651            self.control_handle.shutdown();
4652        }
4653        self.drop_without_shutdown();
4654        _result
4655    }
4656
4657    /// Similar to "send" but does not shutdown the channel if an error occurs.
4658    pub fn send_no_shutdown_on_err(
4659        self,
4660        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4661    ) -> Result<(), fidl::Error> {
4662        let _result = self.send_raw(result);
4663        self.drop_without_shutdown();
4664        _result
4665    }
4666
4667    fn send_raw(
4668        &self,
4669        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4670    ) -> Result<(), fidl::Error> {
4671        self.control_handle.inner.send::<fidl::encoding::ResultType<
4672            fidl::encoding::EmptyStruct,
4673            fidl_fuchsia_posix::Errno,
4674        >>(
4675            result,
4676            self.tx_id,
4677            0x5aad39b33e5f6ebb,
4678            fidl::encoding::DynamicFlags::empty(),
4679        )
4680    }
4681}
4682
4683#[must_use = "FIDL methods require a response to be sent"]
4684#[derive(Debug)]
4685pub struct SocketSetBroadcastResponder {
4686    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4687    tx_id: u32,
4688}
4689
4690/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4691/// if the responder is dropped without sending a response, so that the client
4692/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4693impl std::ops::Drop for SocketSetBroadcastResponder {
4694    fn drop(&mut self) {
4695        self.control_handle.shutdown();
4696        // Safety: drops once, never accessed again
4697        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4698    }
4699}
4700
4701impl fidl::endpoints::Responder for SocketSetBroadcastResponder {
4702    type ControlHandle = SocketControlHandle;
4703
4704    fn control_handle(&self) -> &SocketControlHandle {
4705        &self.control_handle
4706    }
4707
4708    fn drop_without_shutdown(mut self) {
4709        // Safety: drops once, never accessed again due to mem::forget
4710        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4711        // Prevent Drop from running (which would shut down the channel)
4712        std::mem::forget(self);
4713    }
4714}
4715
4716impl SocketSetBroadcastResponder {
4717    /// Sends a response to the FIDL transaction.
4718    ///
4719    /// Sets the channel to shutdown if an error occurs.
4720    pub fn send(
4721        self,
4722        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4723    ) -> Result<(), fidl::Error> {
4724        let _result = self.send_raw(result);
4725        if _result.is_err() {
4726            self.control_handle.shutdown();
4727        }
4728        self.drop_without_shutdown();
4729        _result
4730    }
4731
4732    /// Similar to "send" but does not shutdown the channel if an error occurs.
4733    pub fn send_no_shutdown_on_err(
4734        self,
4735        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4736    ) -> Result<(), fidl::Error> {
4737        let _result = self.send_raw(result);
4738        self.drop_without_shutdown();
4739        _result
4740    }
4741
4742    fn send_raw(
4743        &self,
4744        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4745    ) -> Result<(), fidl::Error> {
4746        self.control_handle.inner.send::<fidl::encoding::ResultType<
4747            fidl::encoding::EmptyStruct,
4748            fidl_fuchsia_posix::Errno,
4749        >>(
4750            result,
4751            self.tx_id,
4752            0x6023e081ce3cd947,
4753            fidl::encoding::DynamicFlags::empty(),
4754        )
4755    }
4756}
4757
4758#[must_use = "FIDL methods require a response to be sent"]
4759#[derive(Debug)]
4760pub struct SocketGetBroadcastResponder {
4761    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4762    tx_id: u32,
4763}
4764
4765/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4766/// if the responder is dropped without sending a response, so that the client
4767/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4768impl std::ops::Drop for SocketGetBroadcastResponder {
4769    fn drop(&mut self) {
4770        self.control_handle.shutdown();
4771        // Safety: drops once, never accessed again
4772        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4773    }
4774}
4775
4776impl fidl::endpoints::Responder for SocketGetBroadcastResponder {
4777    type ControlHandle = SocketControlHandle;
4778
4779    fn control_handle(&self) -> &SocketControlHandle {
4780        &self.control_handle
4781    }
4782
4783    fn drop_without_shutdown(mut self) {
4784        // Safety: drops once, never accessed again due to mem::forget
4785        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4786        // Prevent Drop from running (which would shut down the channel)
4787        std::mem::forget(self);
4788    }
4789}
4790
4791impl SocketGetBroadcastResponder {
4792    /// Sends a response to the FIDL transaction.
4793    ///
4794    /// Sets the channel to shutdown if an error occurs.
4795    pub fn send(
4796        self,
4797        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
4798    ) -> Result<(), fidl::Error> {
4799        let _result = self.send_raw(result);
4800        if _result.is_err() {
4801            self.control_handle.shutdown();
4802        }
4803        self.drop_without_shutdown();
4804        _result
4805    }
4806
4807    /// Similar to "send" but does not shutdown the channel if an error occurs.
4808    pub fn send_no_shutdown_on_err(
4809        self,
4810        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
4811    ) -> Result<(), fidl::Error> {
4812        let _result = self.send_raw(result);
4813        self.drop_without_shutdown();
4814        _result
4815    }
4816
4817    fn send_raw(
4818        &self,
4819        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
4820    ) -> Result<(), fidl::Error> {
4821        self.control_handle.inner.send::<fidl::encoding::ResultType<
4822            fidl_fuchsia_posix_socket::BaseSocketGetBroadcastResponse,
4823            fidl_fuchsia_posix::Errno,
4824        >>(
4825            result.map(|value| (value,)),
4826            self.tx_id,
4827            0x68796fc556f9780d,
4828            fidl::encoding::DynamicFlags::empty(),
4829        )
4830    }
4831}
4832
4833#[must_use = "FIDL methods require a response to be sent"]
4834#[derive(Debug)]
4835pub struct SocketSetSendBufferResponder {
4836    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4837    tx_id: u32,
4838}
4839
4840/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4841/// if the responder is dropped without sending a response, so that the client
4842/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4843impl std::ops::Drop for SocketSetSendBufferResponder {
4844    fn drop(&mut self) {
4845        self.control_handle.shutdown();
4846        // Safety: drops once, never accessed again
4847        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4848    }
4849}
4850
4851impl fidl::endpoints::Responder for SocketSetSendBufferResponder {
4852    type ControlHandle = SocketControlHandle;
4853
4854    fn control_handle(&self) -> &SocketControlHandle {
4855        &self.control_handle
4856    }
4857
4858    fn drop_without_shutdown(mut self) {
4859        // Safety: drops once, never accessed again due to mem::forget
4860        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4861        // Prevent Drop from running (which would shut down the channel)
4862        std::mem::forget(self);
4863    }
4864}
4865
4866impl SocketSetSendBufferResponder {
4867    /// Sends a response to the FIDL transaction.
4868    ///
4869    /// Sets the channel to shutdown if an error occurs.
4870    pub fn send(
4871        self,
4872        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4873    ) -> Result<(), fidl::Error> {
4874        let _result = self.send_raw(result);
4875        if _result.is_err() {
4876            self.control_handle.shutdown();
4877        }
4878        self.drop_without_shutdown();
4879        _result
4880    }
4881
4882    /// Similar to "send" but does not shutdown the channel if an error occurs.
4883    pub fn send_no_shutdown_on_err(
4884        self,
4885        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4886    ) -> Result<(), fidl::Error> {
4887        let _result = self.send_raw(result);
4888        self.drop_without_shutdown();
4889        _result
4890    }
4891
4892    fn send_raw(
4893        &self,
4894        mut result: Result<(), fidl_fuchsia_posix::Errno>,
4895    ) -> Result<(), fidl::Error> {
4896        self.control_handle.inner.send::<fidl::encoding::ResultType<
4897            fidl::encoding::EmptyStruct,
4898            fidl_fuchsia_posix::Errno,
4899        >>(
4900            result,
4901            self.tx_id,
4902            0x756eac32d73a7a70,
4903            fidl::encoding::DynamicFlags::empty(),
4904        )
4905    }
4906}
4907
4908#[must_use = "FIDL methods require a response to be sent"]
4909#[derive(Debug)]
4910pub struct SocketGetSendBufferResponder {
4911    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4912    tx_id: u32,
4913}
4914
4915/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4916/// if the responder is dropped without sending a response, so that the client
4917/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4918impl std::ops::Drop for SocketGetSendBufferResponder {
4919    fn drop(&mut self) {
4920        self.control_handle.shutdown();
4921        // Safety: drops once, never accessed again
4922        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4923    }
4924}
4925
4926impl fidl::endpoints::Responder for SocketGetSendBufferResponder {
4927    type ControlHandle = SocketControlHandle;
4928
4929    fn control_handle(&self) -> &SocketControlHandle {
4930        &self.control_handle
4931    }
4932
4933    fn drop_without_shutdown(mut self) {
4934        // Safety: drops once, never accessed again due to mem::forget
4935        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4936        // Prevent Drop from running (which would shut down the channel)
4937        std::mem::forget(self);
4938    }
4939}
4940
4941impl SocketGetSendBufferResponder {
4942    /// Sends a response to the FIDL transaction.
4943    ///
4944    /// Sets the channel to shutdown if an error occurs.
4945    pub fn send(
4946        self,
4947        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
4948    ) -> Result<(), fidl::Error> {
4949        let _result = self.send_raw(result);
4950        if _result.is_err() {
4951            self.control_handle.shutdown();
4952        }
4953        self.drop_without_shutdown();
4954        _result
4955    }
4956
4957    /// Similar to "send" but does not shutdown the channel if an error occurs.
4958    pub fn send_no_shutdown_on_err(
4959        self,
4960        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
4961    ) -> Result<(), fidl::Error> {
4962        let _result = self.send_raw(result);
4963        self.drop_without_shutdown();
4964        _result
4965    }
4966
4967    fn send_raw(
4968        &self,
4969        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
4970    ) -> Result<(), fidl::Error> {
4971        self.control_handle.inner.send::<fidl::encoding::ResultType<
4972            fidl_fuchsia_posix_socket::BaseSocketGetSendBufferResponse,
4973            fidl_fuchsia_posix::Errno,
4974        >>(
4975            result.map(|value_bytes| (value_bytes,)),
4976            self.tx_id,
4977            0x78a52fd9c7b2410b,
4978            fidl::encoding::DynamicFlags::empty(),
4979        )
4980    }
4981}
4982
4983#[must_use = "FIDL methods require a response to be sent"]
4984#[derive(Debug)]
4985pub struct SocketSetReceiveBufferResponder {
4986    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
4987    tx_id: u32,
4988}
4989
4990/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
4991/// if the responder is dropped without sending a response, so that the client
4992/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
4993impl std::ops::Drop for SocketSetReceiveBufferResponder {
4994    fn drop(&mut self) {
4995        self.control_handle.shutdown();
4996        // Safety: drops once, never accessed again
4997        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4998    }
4999}
5000
5001impl fidl::endpoints::Responder for SocketSetReceiveBufferResponder {
5002    type ControlHandle = SocketControlHandle;
5003
5004    fn control_handle(&self) -> &SocketControlHandle {
5005        &self.control_handle
5006    }
5007
5008    fn drop_without_shutdown(mut self) {
5009        // Safety: drops once, never accessed again due to mem::forget
5010        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5011        // Prevent Drop from running (which would shut down the channel)
5012        std::mem::forget(self);
5013    }
5014}
5015
5016impl SocketSetReceiveBufferResponder {
5017    /// Sends a response to the FIDL transaction.
5018    ///
5019    /// Sets the channel to shutdown if an error occurs.
5020    pub fn send(
5021        self,
5022        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5023    ) -> Result<(), fidl::Error> {
5024        let _result = self.send_raw(result);
5025        if _result.is_err() {
5026            self.control_handle.shutdown();
5027        }
5028        self.drop_without_shutdown();
5029        _result
5030    }
5031
5032    /// Similar to "send" but does not shutdown the channel if an error occurs.
5033    pub fn send_no_shutdown_on_err(
5034        self,
5035        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5036    ) -> Result<(), fidl::Error> {
5037        let _result = self.send_raw(result);
5038        self.drop_without_shutdown();
5039        _result
5040    }
5041
5042    fn send_raw(
5043        &self,
5044        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5045    ) -> Result<(), fidl::Error> {
5046        self.control_handle.inner.send::<fidl::encoding::ResultType<
5047            fidl::encoding::EmptyStruct,
5048            fidl_fuchsia_posix::Errno,
5049        >>(
5050            result,
5051            self.tx_id,
5052            0x6b0cf2f1919c7001,
5053            fidl::encoding::DynamicFlags::empty(),
5054        )
5055    }
5056}
5057
5058#[must_use = "FIDL methods require a response to be sent"]
5059#[derive(Debug)]
5060pub struct SocketGetReceiveBufferResponder {
5061    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5062    tx_id: u32,
5063}
5064
5065/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5066/// if the responder is dropped without sending a response, so that the client
5067/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5068impl std::ops::Drop for SocketGetReceiveBufferResponder {
5069    fn drop(&mut self) {
5070        self.control_handle.shutdown();
5071        // Safety: drops once, never accessed again
5072        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5073    }
5074}
5075
5076impl fidl::endpoints::Responder for SocketGetReceiveBufferResponder {
5077    type ControlHandle = SocketControlHandle;
5078
5079    fn control_handle(&self) -> &SocketControlHandle {
5080        &self.control_handle
5081    }
5082
5083    fn drop_without_shutdown(mut self) {
5084        // Safety: drops once, never accessed again due to mem::forget
5085        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5086        // Prevent Drop from running (which would shut down the channel)
5087        std::mem::forget(self);
5088    }
5089}
5090
5091impl SocketGetReceiveBufferResponder {
5092    /// Sends a response to the FIDL transaction.
5093    ///
5094    /// Sets the channel to shutdown if an error occurs.
5095    pub fn send(
5096        self,
5097        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
5098    ) -> Result<(), fidl::Error> {
5099        let _result = self.send_raw(result);
5100        if _result.is_err() {
5101            self.control_handle.shutdown();
5102        }
5103        self.drop_without_shutdown();
5104        _result
5105    }
5106
5107    /// Similar to "send" but does not shutdown the channel if an error occurs.
5108    pub fn send_no_shutdown_on_err(
5109        self,
5110        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
5111    ) -> Result<(), fidl::Error> {
5112        let _result = self.send_raw(result);
5113        self.drop_without_shutdown();
5114        _result
5115    }
5116
5117    fn send_raw(
5118        &self,
5119        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
5120    ) -> Result<(), fidl::Error> {
5121        self.control_handle.inner.send::<fidl::encoding::ResultType<
5122            fidl_fuchsia_posix_socket::BaseSocketGetReceiveBufferResponse,
5123            fidl_fuchsia_posix::Errno,
5124        >>(
5125            result.map(|value_bytes| (value_bytes,)),
5126            self.tx_id,
5127            0x14c1a4b64f709e5c,
5128            fidl::encoding::DynamicFlags::empty(),
5129        )
5130    }
5131}
5132
5133#[must_use = "FIDL methods require a response to be sent"]
5134#[derive(Debug)]
5135pub struct SocketSetKeepAliveResponder {
5136    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5137    tx_id: u32,
5138}
5139
5140/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5141/// if the responder is dropped without sending a response, so that the client
5142/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5143impl std::ops::Drop for SocketSetKeepAliveResponder {
5144    fn drop(&mut self) {
5145        self.control_handle.shutdown();
5146        // Safety: drops once, never accessed again
5147        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5148    }
5149}
5150
5151impl fidl::endpoints::Responder for SocketSetKeepAliveResponder {
5152    type ControlHandle = SocketControlHandle;
5153
5154    fn control_handle(&self) -> &SocketControlHandle {
5155        &self.control_handle
5156    }
5157
5158    fn drop_without_shutdown(mut self) {
5159        // Safety: drops once, never accessed again due to mem::forget
5160        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5161        // Prevent Drop from running (which would shut down the channel)
5162        std::mem::forget(self);
5163    }
5164}
5165
5166impl SocketSetKeepAliveResponder {
5167    /// Sends a response to the FIDL transaction.
5168    ///
5169    /// Sets the channel to shutdown if an error occurs.
5170    pub fn send(
5171        self,
5172        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5173    ) -> Result<(), fidl::Error> {
5174        let _result = self.send_raw(result);
5175        if _result.is_err() {
5176            self.control_handle.shutdown();
5177        }
5178        self.drop_without_shutdown();
5179        _result
5180    }
5181
5182    /// Similar to "send" but does not shutdown the channel if an error occurs.
5183    pub fn send_no_shutdown_on_err(
5184        self,
5185        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5186    ) -> Result<(), fidl::Error> {
5187        let _result = self.send_raw(result);
5188        self.drop_without_shutdown();
5189        _result
5190    }
5191
5192    fn send_raw(
5193        &self,
5194        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5195    ) -> Result<(), fidl::Error> {
5196        self.control_handle.inner.send::<fidl::encoding::ResultType<
5197            fidl::encoding::EmptyStruct,
5198            fidl_fuchsia_posix::Errno,
5199        >>(
5200            result,
5201            self.tx_id,
5202            0x572df8f0b920d2c7,
5203            fidl::encoding::DynamicFlags::empty(),
5204        )
5205    }
5206}
5207
5208#[must_use = "FIDL methods require a response to be sent"]
5209#[derive(Debug)]
5210pub struct SocketGetKeepAliveResponder {
5211    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5212    tx_id: u32,
5213}
5214
5215/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5216/// if the responder is dropped without sending a response, so that the client
5217/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5218impl std::ops::Drop for SocketGetKeepAliveResponder {
5219    fn drop(&mut self) {
5220        self.control_handle.shutdown();
5221        // Safety: drops once, never accessed again
5222        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5223    }
5224}
5225
5226impl fidl::endpoints::Responder for SocketGetKeepAliveResponder {
5227    type ControlHandle = SocketControlHandle;
5228
5229    fn control_handle(&self) -> &SocketControlHandle {
5230        &self.control_handle
5231    }
5232
5233    fn drop_without_shutdown(mut self) {
5234        // Safety: drops once, never accessed again due to mem::forget
5235        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5236        // Prevent Drop from running (which would shut down the channel)
5237        std::mem::forget(self);
5238    }
5239}
5240
5241impl SocketGetKeepAliveResponder {
5242    /// Sends a response to the FIDL transaction.
5243    ///
5244    /// Sets the channel to shutdown if an error occurs.
5245    pub fn send(
5246        self,
5247        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5248    ) -> Result<(), fidl::Error> {
5249        let _result = self.send_raw(result);
5250        if _result.is_err() {
5251            self.control_handle.shutdown();
5252        }
5253        self.drop_without_shutdown();
5254        _result
5255    }
5256
5257    /// Similar to "send" but does not shutdown the channel if an error occurs.
5258    pub fn send_no_shutdown_on_err(
5259        self,
5260        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5261    ) -> Result<(), fidl::Error> {
5262        let _result = self.send_raw(result);
5263        self.drop_without_shutdown();
5264        _result
5265    }
5266
5267    fn send_raw(
5268        &self,
5269        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5270    ) -> Result<(), fidl::Error> {
5271        self.control_handle.inner.send::<fidl::encoding::ResultType<
5272            fidl_fuchsia_posix_socket::BaseSocketGetKeepAliveResponse,
5273            fidl_fuchsia_posix::Errno,
5274        >>(
5275            result.map(|value| (value,)),
5276            self.tx_id,
5277            0x2dd29d3215f2c9d2,
5278            fidl::encoding::DynamicFlags::empty(),
5279        )
5280    }
5281}
5282
5283#[must_use = "FIDL methods require a response to be sent"]
5284#[derive(Debug)]
5285pub struct SocketSetOutOfBandInlineResponder {
5286    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5287    tx_id: u32,
5288}
5289
5290/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5291/// if the responder is dropped without sending a response, so that the client
5292/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5293impl std::ops::Drop for SocketSetOutOfBandInlineResponder {
5294    fn drop(&mut self) {
5295        self.control_handle.shutdown();
5296        // Safety: drops once, never accessed again
5297        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5298    }
5299}
5300
5301impl fidl::endpoints::Responder for SocketSetOutOfBandInlineResponder {
5302    type ControlHandle = SocketControlHandle;
5303
5304    fn control_handle(&self) -> &SocketControlHandle {
5305        &self.control_handle
5306    }
5307
5308    fn drop_without_shutdown(mut self) {
5309        // Safety: drops once, never accessed again due to mem::forget
5310        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5311        // Prevent Drop from running (which would shut down the channel)
5312        std::mem::forget(self);
5313    }
5314}
5315
5316impl SocketSetOutOfBandInlineResponder {
5317    /// Sends a response to the FIDL transaction.
5318    ///
5319    /// Sets the channel to shutdown if an error occurs.
5320    pub fn send(
5321        self,
5322        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5323    ) -> Result<(), fidl::Error> {
5324        let _result = self.send_raw(result);
5325        if _result.is_err() {
5326            self.control_handle.shutdown();
5327        }
5328        self.drop_without_shutdown();
5329        _result
5330    }
5331
5332    /// Similar to "send" but does not shutdown the channel if an error occurs.
5333    pub fn send_no_shutdown_on_err(
5334        self,
5335        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5336    ) -> Result<(), fidl::Error> {
5337        let _result = self.send_raw(result);
5338        self.drop_without_shutdown();
5339        _result
5340    }
5341
5342    fn send_raw(
5343        &self,
5344        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5345    ) -> Result<(), fidl::Error> {
5346        self.control_handle.inner.send::<fidl::encoding::ResultType<
5347            fidl::encoding::EmptyStruct,
5348            fidl_fuchsia_posix::Errno,
5349        >>(
5350            result,
5351            self.tx_id,
5352            0x3ecb49968bee439,
5353            fidl::encoding::DynamicFlags::empty(),
5354        )
5355    }
5356}
5357
5358#[must_use = "FIDL methods require a response to be sent"]
5359#[derive(Debug)]
5360pub struct SocketGetOutOfBandInlineResponder {
5361    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5362    tx_id: u32,
5363}
5364
5365/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5366/// if the responder is dropped without sending a response, so that the client
5367/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5368impl std::ops::Drop for SocketGetOutOfBandInlineResponder {
5369    fn drop(&mut self) {
5370        self.control_handle.shutdown();
5371        // Safety: drops once, never accessed again
5372        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5373    }
5374}
5375
5376impl fidl::endpoints::Responder for SocketGetOutOfBandInlineResponder {
5377    type ControlHandle = SocketControlHandle;
5378
5379    fn control_handle(&self) -> &SocketControlHandle {
5380        &self.control_handle
5381    }
5382
5383    fn drop_without_shutdown(mut self) {
5384        // Safety: drops once, never accessed again due to mem::forget
5385        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5386        // Prevent Drop from running (which would shut down the channel)
5387        std::mem::forget(self);
5388    }
5389}
5390
5391impl SocketGetOutOfBandInlineResponder {
5392    /// Sends a response to the FIDL transaction.
5393    ///
5394    /// Sets the channel to shutdown if an error occurs.
5395    pub fn send(
5396        self,
5397        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5398    ) -> Result<(), fidl::Error> {
5399        let _result = self.send_raw(result);
5400        if _result.is_err() {
5401            self.control_handle.shutdown();
5402        }
5403        self.drop_without_shutdown();
5404        _result
5405    }
5406
5407    /// Similar to "send" but does not shutdown the channel if an error occurs.
5408    pub fn send_no_shutdown_on_err(
5409        self,
5410        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5411    ) -> Result<(), fidl::Error> {
5412        let _result = self.send_raw(result);
5413        self.drop_without_shutdown();
5414        _result
5415    }
5416
5417    fn send_raw(
5418        &self,
5419        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5420    ) -> Result<(), fidl::Error> {
5421        self.control_handle.inner.send::<fidl::encoding::ResultType<
5422            fidl_fuchsia_posix_socket::BaseSocketGetOutOfBandInlineResponse,
5423            fidl_fuchsia_posix::Errno,
5424        >>(
5425            result.map(|value| (value,)),
5426            self.tx_id,
5427            0x348c1ab3aeca1745,
5428            fidl::encoding::DynamicFlags::empty(),
5429        )
5430    }
5431}
5432
5433#[must_use = "FIDL methods require a response to be sent"]
5434#[derive(Debug)]
5435pub struct SocketSetNoCheckResponder {
5436    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5437    tx_id: u32,
5438}
5439
5440/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5441/// if the responder is dropped without sending a response, so that the client
5442/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5443impl std::ops::Drop for SocketSetNoCheckResponder {
5444    fn drop(&mut self) {
5445        self.control_handle.shutdown();
5446        // Safety: drops once, never accessed again
5447        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5448    }
5449}
5450
5451impl fidl::endpoints::Responder for SocketSetNoCheckResponder {
5452    type ControlHandle = SocketControlHandle;
5453
5454    fn control_handle(&self) -> &SocketControlHandle {
5455        &self.control_handle
5456    }
5457
5458    fn drop_without_shutdown(mut self) {
5459        // Safety: drops once, never accessed again due to mem::forget
5460        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5461        // Prevent Drop from running (which would shut down the channel)
5462        std::mem::forget(self);
5463    }
5464}
5465
5466impl SocketSetNoCheckResponder {
5467    /// Sends a response to the FIDL transaction.
5468    ///
5469    /// Sets the channel to shutdown if an error occurs.
5470    pub fn send(
5471        self,
5472        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5473    ) -> Result<(), fidl::Error> {
5474        let _result = self.send_raw(result);
5475        if _result.is_err() {
5476            self.control_handle.shutdown();
5477        }
5478        self.drop_without_shutdown();
5479        _result
5480    }
5481
5482    /// Similar to "send" but does not shutdown the channel if an error occurs.
5483    pub fn send_no_shutdown_on_err(
5484        self,
5485        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5486    ) -> Result<(), fidl::Error> {
5487        let _result = self.send_raw(result);
5488        self.drop_without_shutdown();
5489        _result
5490    }
5491
5492    fn send_raw(
5493        &self,
5494        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5495    ) -> Result<(), fidl::Error> {
5496        self.control_handle.inner.send::<fidl::encoding::ResultType<
5497            fidl::encoding::EmptyStruct,
5498            fidl_fuchsia_posix::Errno,
5499        >>(
5500            result,
5501            self.tx_id,
5502            0x6bbf00c53a4c78c2,
5503            fidl::encoding::DynamicFlags::empty(),
5504        )
5505    }
5506}
5507
5508#[must_use = "FIDL methods require a response to be sent"]
5509#[derive(Debug)]
5510pub struct SocketGetNoCheckResponder {
5511    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5512    tx_id: u32,
5513}
5514
5515/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5516/// if the responder is dropped without sending a response, so that the client
5517/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5518impl std::ops::Drop for SocketGetNoCheckResponder {
5519    fn drop(&mut self) {
5520        self.control_handle.shutdown();
5521        // Safety: drops once, never accessed again
5522        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5523    }
5524}
5525
5526impl fidl::endpoints::Responder for SocketGetNoCheckResponder {
5527    type ControlHandle = SocketControlHandle;
5528
5529    fn control_handle(&self) -> &SocketControlHandle {
5530        &self.control_handle
5531    }
5532
5533    fn drop_without_shutdown(mut self) {
5534        // Safety: drops once, never accessed again due to mem::forget
5535        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5536        // Prevent Drop from running (which would shut down the channel)
5537        std::mem::forget(self);
5538    }
5539}
5540
5541impl SocketGetNoCheckResponder {
5542    /// Sends a response to the FIDL transaction.
5543    ///
5544    /// Sets the channel to shutdown if an error occurs.
5545    pub fn send(
5546        self,
5547        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5548    ) -> Result<(), fidl::Error> {
5549        let _result = self.send_raw(result);
5550        if _result.is_err() {
5551            self.control_handle.shutdown();
5552        }
5553        self.drop_without_shutdown();
5554        _result
5555    }
5556
5557    /// Similar to "send" but does not shutdown the channel if an error occurs.
5558    pub fn send_no_shutdown_on_err(
5559        self,
5560        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5561    ) -> Result<(), fidl::Error> {
5562        let _result = self.send_raw(result);
5563        self.drop_without_shutdown();
5564        _result
5565    }
5566
5567    fn send_raw(
5568        &self,
5569        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5570    ) -> Result<(), fidl::Error> {
5571        self.control_handle.inner.send::<fidl::encoding::ResultType<
5572            fidl_fuchsia_posix_socket::BaseSocketGetNoCheckResponse,
5573            fidl_fuchsia_posix::Errno,
5574        >>(
5575            result.map(|value| (value,)),
5576            self.tx_id,
5577            0x2cd4249286417694,
5578            fidl::encoding::DynamicFlags::empty(),
5579        )
5580    }
5581}
5582
5583#[must_use = "FIDL methods require a response to be sent"]
5584#[derive(Debug)]
5585pub struct SocketSetLingerResponder {
5586    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5587    tx_id: u32,
5588}
5589
5590/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5591/// if the responder is dropped without sending a response, so that the client
5592/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5593impl std::ops::Drop for SocketSetLingerResponder {
5594    fn drop(&mut self) {
5595        self.control_handle.shutdown();
5596        // Safety: drops once, never accessed again
5597        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5598    }
5599}
5600
5601impl fidl::endpoints::Responder for SocketSetLingerResponder {
5602    type ControlHandle = SocketControlHandle;
5603
5604    fn control_handle(&self) -> &SocketControlHandle {
5605        &self.control_handle
5606    }
5607
5608    fn drop_without_shutdown(mut self) {
5609        // Safety: drops once, never accessed again due to mem::forget
5610        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5611        // Prevent Drop from running (which would shut down the channel)
5612        std::mem::forget(self);
5613    }
5614}
5615
5616impl SocketSetLingerResponder {
5617    /// Sends a response to the FIDL transaction.
5618    ///
5619    /// Sets the channel to shutdown if an error occurs.
5620    pub fn send(
5621        self,
5622        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5623    ) -> Result<(), fidl::Error> {
5624        let _result = self.send_raw(result);
5625        if _result.is_err() {
5626            self.control_handle.shutdown();
5627        }
5628        self.drop_without_shutdown();
5629        _result
5630    }
5631
5632    /// Similar to "send" but does not shutdown the channel if an error occurs.
5633    pub fn send_no_shutdown_on_err(
5634        self,
5635        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5636    ) -> Result<(), fidl::Error> {
5637        let _result = self.send_raw(result);
5638        self.drop_without_shutdown();
5639        _result
5640    }
5641
5642    fn send_raw(
5643        &self,
5644        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5645    ) -> Result<(), fidl::Error> {
5646        self.control_handle.inner.send::<fidl::encoding::ResultType<
5647            fidl::encoding::EmptyStruct,
5648            fidl_fuchsia_posix::Errno,
5649        >>(
5650            result,
5651            self.tx_id,
5652            0x45386351246e998e,
5653            fidl::encoding::DynamicFlags::empty(),
5654        )
5655    }
5656}
5657
5658#[must_use = "FIDL methods require a response to be sent"]
5659#[derive(Debug)]
5660pub struct SocketGetLingerResponder {
5661    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5662    tx_id: u32,
5663}
5664
5665/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5666/// if the responder is dropped without sending a response, so that the client
5667/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5668impl std::ops::Drop for SocketGetLingerResponder {
5669    fn drop(&mut self) {
5670        self.control_handle.shutdown();
5671        // Safety: drops once, never accessed again
5672        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5673    }
5674}
5675
5676impl fidl::endpoints::Responder for SocketGetLingerResponder {
5677    type ControlHandle = SocketControlHandle;
5678
5679    fn control_handle(&self) -> &SocketControlHandle {
5680        &self.control_handle
5681    }
5682
5683    fn drop_without_shutdown(mut self) {
5684        // Safety: drops once, never accessed again due to mem::forget
5685        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5686        // Prevent Drop from running (which would shut down the channel)
5687        std::mem::forget(self);
5688    }
5689}
5690
5691impl SocketGetLingerResponder {
5692    /// Sends a response to the FIDL transaction.
5693    ///
5694    /// Sets the channel to shutdown if an error occurs.
5695    pub fn send(
5696        self,
5697        mut result: Result<(bool, u32), fidl_fuchsia_posix::Errno>,
5698    ) -> Result<(), fidl::Error> {
5699        let _result = self.send_raw(result);
5700        if _result.is_err() {
5701            self.control_handle.shutdown();
5702        }
5703        self.drop_without_shutdown();
5704        _result
5705    }
5706
5707    /// Similar to "send" but does not shutdown the channel if an error occurs.
5708    pub fn send_no_shutdown_on_err(
5709        self,
5710        mut result: Result<(bool, u32), fidl_fuchsia_posix::Errno>,
5711    ) -> Result<(), fidl::Error> {
5712        let _result = self.send_raw(result);
5713        self.drop_without_shutdown();
5714        _result
5715    }
5716
5717    fn send_raw(
5718        &self,
5719        mut result: Result<(bool, u32), fidl_fuchsia_posix::Errno>,
5720    ) -> Result<(), fidl::Error> {
5721        self.control_handle.inner.send::<fidl::encoding::ResultType<
5722            fidl_fuchsia_posix_socket::BaseSocketGetLingerResponse,
5723            fidl_fuchsia_posix::Errno,
5724        >>(
5725            result,
5726            self.tx_id,
5727            0x48eb20fc5ccb0e45,
5728            fidl::encoding::DynamicFlags::empty(),
5729        )
5730    }
5731}
5732
5733#[must_use = "FIDL methods require a response to be sent"]
5734#[derive(Debug)]
5735pub struct SocketSetReusePortResponder {
5736    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5737    tx_id: u32,
5738}
5739
5740/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5741/// if the responder is dropped without sending a response, so that the client
5742/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5743impl std::ops::Drop for SocketSetReusePortResponder {
5744    fn drop(&mut self) {
5745        self.control_handle.shutdown();
5746        // Safety: drops once, never accessed again
5747        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5748    }
5749}
5750
5751impl fidl::endpoints::Responder for SocketSetReusePortResponder {
5752    type ControlHandle = SocketControlHandle;
5753
5754    fn control_handle(&self) -> &SocketControlHandle {
5755        &self.control_handle
5756    }
5757
5758    fn drop_without_shutdown(mut self) {
5759        // Safety: drops once, never accessed again due to mem::forget
5760        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5761        // Prevent Drop from running (which would shut down the channel)
5762        std::mem::forget(self);
5763    }
5764}
5765
5766impl SocketSetReusePortResponder {
5767    /// Sends a response to the FIDL transaction.
5768    ///
5769    /// Sets the channel to shutdown if an error occurs.
5770    pub fn send(
5771        self,
5772        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5773    ) -> Result<(), fidl::Error> {
5774        let _result = self.send_raw(result);
5775        if _result.is_err() {
5776            self.control_handle.shutdown();
5777        }
5778        self.drop_without_shutdown();
5779        _result
5780    }
5781
5782    /// Similar to "send" but does not shutdown the channel if an error occurs.
5783    pub fn send_no_shutdown_on_err(
5784        self,
5785        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5786    ) -> Result<(), fidl::Error> {
5787        let _result = self.send_raw(result);
5788        self.drop_without_shutdown();
5789        _result
5790    }
5791
5792    fn send_raw(
5793        &self,
5794        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5795    ) -> Result<(), fidl::Error> {
5796        self.control_handle.inner.send::<fidl::encoding::ResultType<
5797            fidl::encoding::EmptyStruct,
5798            fidl_fuchsia_posix::Errno,
5799        >>(
5800            result,
5801            self.tx_id,
5802            0x24dd3e5cb36d9ccb,
5803            fidl::encoding::DynamicFlags::empty(),
5804        )
5805    }
5806}
5807
5808#[must_use = "FIDL methods require a response to be sent"]
5809#[derive(Debug)]
5810pub struct SocketGetReusePortResponder {
5811    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5812    tx_id: u32,
5813}
5814
5815/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5816/// if the responder is dropped without sending a response, so that the client
5817/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5818impl std::ops::Drop for SocketGetReusePortResponder {
5819    fn drop(&mut self) {
5820        self.control_handle.shutdown();
5821        // Safety: drops once, never accessed again
5822        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5823    }
5824}
5825
5826impl fidl::endpoints::Responder for SocketGetReusePortResponder {
5827    type ControlHandle = SocketControlHandle;
5828
5829    fn control_handle(&self) -> &SocketControlHandle {
5830        &self.control_handle
5831    }
5832
5833    fn drop_without_shutdown(mut self) {
5834        // Safety: drops once, never accessed again due to mem::forget
5835        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5836        // Prevent Drop from running (which would shut down the channel)
5837        std::mem::forget(self);
5838    }
5839}
5840
5841impl SocketGetReusePortResponder {
5842    /// Sends a response to the FIDL transaction.
5843    ///
5844    /// Sets the channel to shutdown if an error occurs.
5845    pub fn send(
5846        self,
5847        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5848    ) -> Result<(), fidl::Error> {
5849        let _result = self.send_raw(result);
5850        if _result.is_err() {
5851            self.control_handle.shutdown();
5852        }
5853        self.drop_without_shutdown();
5854        _result
5855    }
5856
5857    /// Similar to "send" but does not shutdown the channel if an error occurs.
5858    pub fn send_no_shutdown_on_err(
5859        self,
5860        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5861    ) -> Result<(), fidl::Error> {
5862        let _result = self.send_raw(result);
5863        self.drop_without_shutdown();
5864        _result
5865    }
5866
5867    fn send_raw(
5868        &self,
5869        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5870    ) -> Result<(), fidl::Error> {
5871        self.control_handle.inner.send::<fidl::encoding::ResultType<
5872            fidl_fuchsia_posix_socket::BaseSocketGetReusePortResponse,
5873            fidl_fuchsia_posix::Errno,
5874        >>(
5875            result.map(|value| (value,)),
5876            self.tx_id,
5877            0x7a112c1ab54ff828,
5878            fidl::encoding::DynamicFlags::empty(),
5879        )
5880    }
5881}
5882
5883#[must_use = "FIDL methods require a response to be sent"]
5884#[derive(Debug)]
5885pub struct SocketGetAcceptConnResponder {
5886    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5887    tx_id: u32,
5888}
5889
5890/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5891/// if the responder is dropped without sending a response, so that the client
5892/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5893impl std::ops::Drop for SocketGetAcceptConnResponder {
5894    fn drop(&mut self) {
5895        self.control_handle.shutdown();
5896        // Safety: drops once, never accessed again
5897        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5898    }
5899}
5900
5901impl fidl::endpoints::Responder for SocketGetAcceptConnResponder {
5902    type ControlHandle = SocketControlHandle;
5903
5904    fn control_handle(&self) -> &SocketControlHandle {
5905        &self.control_handle
5906    }
5907
5908    fn drop_without_shutdown(mut self) {
5909        // Safety: drops once, never accessed again due to mem::forget
5910        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5911        // Prevent Drop from running (which would shut down the channel)
5912        std::mem::forget(self);
5913    }
5914}
5915
5916impl SocketGetAcceptConnResponder {
5917    /// Sends a response to the FIDL transaction.
5918    ///
5919    /// Sets the channel to shutdown if an error occurs.
5920    pub fn send(
5921        self,
5922        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5923    ) -> Result<(), fidl::Error> {
5924        let _result = self.send_raw(result);
5925        if _result.is_err() {
5926            self.control_handle.shutdown();
5927        }
5928        self.drop_without_shutdown();
5929        _result
5930    }
5931
5932    /// Similar to "send" but does not shutdown the channel if an error occurs.
5933    pub fn send_no_shutdown_on_err(
5934        self,
5935        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5936    ) -> Result<(), fidl::Error> {
5937        let _result = self.send_raw(result);
5938        self.drop_without_shutdown();
5939        _result
5940    }
5941
5942    fn send_raw(
5943        &self,
5944        mut result: Result<bool, fidl_fuchsia_posix::Errno>,
5945    ) -> Result<(), fidl::Error> {
5946        self.control_handle.inner.send::<fidl::encoding::ResultType<
5947            fidl_fuchsia_posix_socket::BaseSocketGetAcceptConnResponse,
5948            fidl_fuchsia_posix::Errno,
5949        >>(
5950            result.map(|value| (value,)),
5951            self.tx_id,
5952            0x67ce6db6c2ec8966,
5953            fidl::encoding::DynamicFlags::empty(),
5954        )
5955    }
5956}
5957
5958#[must_use = "FIDL methods require a response to be sent"]
5959#[derive(Debug)]
5960pub struct SocketSetBindToDeviceResponder {
5961    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
5962    tx_id: u32,
5963}
5964
5965/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
5966/// if the responder is dropped without sending a response, so that the client
5967/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
5968impl std::ops::Drop for SocketSetBindToDeviceResponder {
5969    fn drop(&mut self) {
5970        self.control_handle.shutdown();
5971        // Safety: drops once, never accessed again
5972        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5973    }
5974}
5975
5976impl fidl::endpoints::Responder for SocketSetBindToDeviceResponder {
5977    type ControlHandle = SocketControlHandle;
5978
5979    fn control_handle(&self) -> &SocketControlHandle {
5980        &self.control_handle
5981    }
5982
5983    fn drop_without_shutdown(mut self) {
5984        // Safety: drops once, never accessed again due to mem::forget
5985        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5986        // Prevent Drop from running (which would shut down the channel)
5987        std::mem::forget(self);
5988    }
5989}
5990
5991impl SocketSetBindToDeviceResponder {
5992    /// Sends a response to the FIDL transaction.
5993    ///
5994    /// Sets the channel to shutdown if an error occurs.
5995    pub fn send(
5996        self,
5997        mut result: Result<(), fidl_fuchsia_posix::Errno>,
5998    ) -> Result<(), fidl::Error> {
5999        let _result = self.send_raw(result);
6000        if _result.is_err() {
6001            self.control_handle.shutdown();
6002        }
6003        self.drop_without_shutdown();
6004        _result
6005    }
6006
6007    /// Similar to "send" but does not shutdown the channel if an error occurs.
6008    pub fn send_no_shutdown_on_err(
6009        self,
6010        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6011    ) -> Result<(), fidl::Error> {
6012        let _result = self.send_raw(result);
6013        self.drop_without_shutdown();
6014        _result
6015    }
6016
6017    fn send_raw(
6018        &self,
6019        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6020    ) -> Result<(), fidl::Error> {
6021        self.control_handle.inner.send::<fidl::encoding::ResultType<
6022            fidl::encoding::EmptyStruct,
6023            fidl_fuchsia_posix::Errno,
6024        >>(
6025            result,
6026            self.tx_id,
6027            0x2118b483f28aafc4,
6028            fidl::encoding::DynamicFlags::empty(),
6029        )
6030    }
6031}
6032
6033#[must_use = "FIDL methods require a response to be sent"]
6034#[derive(Debug)]
6035pub struct SocketGetBindToDeviceResponder {
6036    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6037    tx_id: u32,
6038}
6039
6040/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6041/// if the responder is dropped without sending a response, so that the client
6042/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6043impl std::ops::Drop for SocketGetBindToDeviceResponder {
6044    fn drop(&mut self) {
6045        self.control_handle.shutdown();
6046        // Safety: drops once, never accessed again
6047        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6048    }
6049}
6050
6051impl fidl::endpoints::Responder for SocketGetBindToDeviceResponder {
6052    type ControlHandle = SocketControlHandle;
6053
6054    fn control_handle(&self) -> &SocketControlHandle {
6055        &self.control_handle
6056    }
6057
6058    fn drop_without_shutdown(mut self) {
6059        // Safety: drops once, never accessed again due to mem::forget
6060        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6061        // Prevent Drop from running (which would shut down the channel)
6062        std::mem::forget(self);
6063    }
6064}
6065
6066impl SocketGetBindToDeviceResponder {
6067    /// Sends a response to the FIDL transaction.
6068    ///
6069    /// Sets the channel to shutdown if an error occurs.
6070    pub fn send(
6071        self,
6072        mut result: Result<&str, fidl_fuchsia_posix::Errno>,
6073    ) -> Result<(), fidl::Error> {
6074        let _result = self.send_raw(result);
6075        if _result.is_err() {
6076            self.control_handle.shutdown();
6077        }
6078        self.drop_without_shutdown();
6079        _result
6080    }
6081
6082    /// Similar to "send" but does not shutdown the channel if an error occurs.
6083    pub fn send_no_shutdown_on_err(
6084        self,
6085        mut result: Result<&str, fidl_fuchsia_posix::Errno>,
6086    ) -> Result<(), fidl::Error> {
6087        let _result = self.send_raw(result);
6088        self.drop_without_shutdown();
6089        _result
6090    }
6091
6092    fn send_raw(
6093        &self,
6094        mut result: Result<&str, fidl_fuchsia_posix::Errno>,
6095    ) -> Result<(), fidl::Error> {
6096        self.control_handle.inner.send::<fidl::encoding::ResultType<
6097            fidl_fuchsia_posix_socket::BaseSocketGetBindToDeviceResponse,
6098            fidl_fuchsia_posix::Errno,
6099        >>(
6100            result.map(|value| (value,)),
6101            self.tx_id,
6102            0x1ab1fbf0ef7906c8,
6103            fidl::encoding::DynamicFlags::empty(),
6104        )
6105    }
6106}
6107
6108#[must_use = "FIDL methods require a response to be sent"]
6109#[derive(Debug)]
6110pub struct SocketSetBindToInterfaceIndexResponder {
6111    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6112    tx_id: u32,
6113}
6114
6115/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6116/// if the responder is dropped without sending a response, so that the client
6117/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6118impl std::ops::Drop for SocketSetBindToInterfaceIndexResponder {
6119    fn drop(&mut self) {
6120        self.control_handle.shutdown();
6121        // Safety: drops once, never accessed again
6122        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6123    }
6124}
6125
6126impl fidl::endpoints::Responder for SocketSetBindToInterfaceIndexResponder {
6127    type ControlHandle = SocketControlHandle;
6128
6129    fn control_handle(&self) -> &SocketControlHandle {
6130        &self.control_handle
6131    }
6132
6133    fn drop_without_shutdown(mut self) {
6134        // Safety: drops once, never accessed again due to mem::forget
6135        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6136        // Prevent Drop from running (which would shut down the channel)
6137        std::mem::forget(self);
6138    }
6139}
6140
6141impl SocketSetBindToInterfaceIndexResponder {
6142    /// Sends a response to the FIDL transaction.
6143    ///
6144    /// Sets the channel to shutdown if an error occurs.
6145    pub fn send(
6146        self,
6147        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6148    ) -> Result<(), fidl::Error> {
6149        let _result = self.send_raw(result);
6150        if _result.is_err() {
6151            self.control_handle.shutdown();
6152        }
6153        self.drop_without_shutdown();
6154        _result
6155    }
6156
6157    /// Similar to "send" but does not shutdown the channel if an error occurs.
6158    pub fn send_no_shutdown_on_err(
6159        self,
6160        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6161    ) -> Result<(), fidl::Error> {
6162        let _result = self.send_raw(result);
6163        self.drop_without_shutdown();
6164        _result
6165    }
6166
6167    fn send_raw(
6168        &self,
6169        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6170    ) -> Result<(), fidl::Error> {
6171        self.control_handle.inner.send::<fidl::encoding::ResultType<
6172            fidl::encoding::EmptyStruct,
6173            fidl_fuchsia_posix::Errno,
6174        >>(
6175            result,
6176            self.tx_id,
6177            0x6e387a0def00821,
6178            fidl::encoding::DynamicFlags::empty(),
6179        )
6180    }
6181}
6182
6183#[must_use = "FIDL methods require a response to be sent"]
6184#[derive(Debug)]
6185pub struct SocketGetBindToInterfaceIndexResponder {
6186    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6187    tx_id: u32,
6188}
6189
6190/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6191/// if the responder is dropped without sending a response, so that the client
6192/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6193impl std::ops::Drop for SocketGetBindToInterfaceIndexResponder {
6194    fn drop(&mut self) {
6195        self.control_handle.shutdown();
6196        // Safety: drops once, never accessed again
6197        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6198    }
6199}
6200
6201impl fidl::endpoints::Responder for SocketGetBindToInterfaceIndexResponder {
6202    type ControlHandle = SocketControlHandle;
6203
6204    fn control_handle(&self) -> &SocketControlHandle {
6205        &self.control_handle
6206    }
6207
6208    fn drop_without_shutdown(mut self) {
6209        // Safety: drops once, never accessed again due to mem::forget
6210        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6211        // Prevent Drop from running (which would shut down the channel)
6212        std::mem::forget(self);
6213    }
6214}
6215
6216impl SocketGetBindToInterfaceIndexResponder {
6217    /// Sends a response to the FIDL transaction.
6218    ///
6219    /// Sets the channel to shutdown if an error occurs.
6220    pub fn send(
6221        self,
6222        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
6223    ) -> Result<(), fidl::Error> {
6224        let _result = self.send_raw(result);
6225        if _result.is_err() {
6226            self.control_handle.shutdown();
6227        }
6228        self.drop_without_shutdown();
6229        _result
6230    }
6231
6232    /// Similar to "send" but does not shutdown the channel if an error occurs.
6233    pub fn send_no_shutdown_on_err(
6234        self,
6235        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
6236    ) -> Result<(), fidl::Error> {
6237        let _result = self.send_raw(result);
6238        self.drop_without_shutdown();
6239        _result
6240    }
6241
6242    fn send_raw(
6243        &self,
6244        mut result: Result<u64, fidl_fuchsia_posix::Errno>,
6245    ) -> Result<(), fidl::Error> {
6246        self.control_handle.inner.send::<fidl::encoding::ResultType<
6247            fidl_fuchsia_posix_socket::BaseSocketGetBindToInterfaceIndexResponse,
6248            fidl_fuchsia_posix::Errno,
6249        >>(
6250            result.map(|value| (value,)),
6251            self.tx_id,
6252            0x59c31dd3e3078295,
6253            fidl::encoding::DynamicFlags::empty(),
6254        )
6255    }
6256}
6257
6258#[must_use = "FIDL methods require a response to be sent"]
6259#[derive(Debug)]
6260pub struct SocketSetTimestampResponder {
6261    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6262    tx_id: u32,
6263}
6264
6265/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6266/// if the responder is dropped without sending a response, so that the client
6267/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6268impl std::ops::Drop for SocketSetTimestampResponder {
6269    fn drop(&mut self) {
6270        self.control_handle.shutdown();
6271        // Safety: drops once, never accessed again
6272        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6273    }
6274}
6275
6276impl fidl::endpoints::Responder for SocketSetTimestampResponder {
6277    type ControlHandle = SocketControlHandle;
6278
6279    fn control_handle(&self) -> &SocketControlHandle {
6280        &self.control_handle
6281    }
6282
6283    fn drop_without_shutdown(mut self) {
6284        // Safety: drops once, never accessed again due to mem::forget
6285        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6286        // Prevent Drop from running (which would shut down the channel)
6287        std::mem::forget(self);
6288    }
6289}
6290
6291impl SocketSetTimestampResponder {
6292    /// Sends a response to the FIDL transaction.
6293    ///
6294    /// Sets the channel to shutdown if an error occurs.
6295    pub fn send(
6296        self,
6297        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6298    ) -> Result<(), fidl::Error> {
6299        let _result = self.send_raw(result);
6300        if _result.is_err() {
6301            self.control_handle.shutdown();
6302        }
6303        self.drop_without_shutdown();
6304        _result
6305    }
6306
6307    /// Similar to "send" but does not shutdown the channel if an error occurs.
6308    pub fn send_no_shutdown_on_err(
6309        self,
6310        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6311    ) -> Result<(), fidl::Error> {
6312        let _result = self.send_raw(result);
6313        self.drop_without_shutdown();
6314        _result
6315    }
6316
6317    fn send_raw(
6318        &self,
6319        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6320    ) -> Result<(), fidl::Error> {
6321        self.control_handle.inner.send::<fidl::encoding::ResultType<
6322            fidl::encoding::EmptyStruct,
6323            fidl_fuchsia_posix::Errno,
6324        >>(
6325            result,
6326            self.tx_id,
6327            0x285d6516c263d839,
6328            fidl::encoding::DynamicFlags::empty(),
6329        )
6330    }
6331}
6332
6333#[must_use = "FIDL methods require a response to be sent"]
6334#[derive(Debug)]
6335pub struct SocketGetTimestampResponder {
6336    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6337    tx_id: u32,
6338}
6339
6340/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6341/// if the responder is dropped without sending a response, so that the client
6342/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6343impl std::ops::Drop for SocketGetTimestampResponder {
6344    fn drop(&mut self) {
6345        self.control_handle.shutdown();
6346        // Safety: drops once, never accessed again
6347        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6348    }
6349}
6350
6351impl fidl::endpoints::Responder for SocketGetTimestampResponder {
6352    type ControlHandle = SocketControlHandle;
6353
6354    fn control_handle(&self) -> &SocketControlHandle {
6355        &self.control_handle
6356    }
6357
6358    fn drop_without_shutdown(mut self) {
6359        // Safety: drops once, never accessed again due to mem::forget
6360        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6361        // Prevent Drop from running (which would shut down the channel)
6362        std::mem::forget(self);
6363    }
6364}
6365
6366impl SocketGetTimestampResponder {
6367    /// Sends a response to the FIDL transaction.
6368    ///
6369    /// Sets the channel to shutdown if an error occurs.
6370    pub fn send(
6371        self,
6372        mut result: Result<fidl_fuchsia_posix_socket::TimestampOption, fidl_fuchsia_posix::Errno>,
6373    ) -> Result<(), fidl::Error> {
6374        let _result = self.send_raw(result);
6375        if _result.is_err() {
6376            self.control_handle.shutdown();
6377        }
6378        self.drop_without_shutdown();
6379        _result
6380    }
6381
6382    /// Similar to "send" but does not shutdown the channel if an error occurs.
6383    pub fn send_no_shutdown_on_err(
6384        self,
6385        mut result: Result<fidl_fuchsia_posix_socket::TimestampOption, fidl_fuchsia_posix::Errno>,
6386    ) -> Result<(), fidl::Error> {
6387        let _result = self.send_raw(result);
6388        self.drop_without_shutdown();
6389        _result
6390    }
6391
6392    fn send_raw(
6393        &self,
6394        mut result: Result<fidl_fuchsia_posix_socket::TimestampOption, fidl_fuchsia_posix::Errno>,
6395    ) -> Result<(), fidl::Error> {
6396        self.control_handle.inner.send::<fidl::encoding::ResultType<
6397            fidl_fuchsia_posix_socket::BaseSocketGetTimestampResponse,
6398            fidl_fuchsia_posix::Errno,
6399        >>(
6400            result.map(|value| (value,)),
6401            self.tx_id,
6402            0x49f2fffbbcc2bd27,
6403            fidl::encoding::DynamicFlags::empty(),
6404        )
6405    }
6406}
6407
6408#[must_use = "FIDL methods require a response to be sent"]
6409#[derive(Debug)]
6410pub struct SocketSetMarkResponder {
6411    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6412    tx_id: u32,
6413}
6414
6415/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6416/// if the responder is dropped without sending a response, so that the client
6417/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6418impl std::ops::Drop for SocketSetMarkResponder {
6419    fn drop(&mut self) {
6420        self.control_handle.shutdown();
6421        // Safety: drops once, never accessed again
6422        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6423    }
6424}
6425
6426impl fidl::endpoints::Responder for SocketSetMarkResponder {
6427    type ControlHandle = SocketControlHandle;
6428
6429    fn control_handle(&self) -> &SocketControlHandle {
6430        &self.control_handle
6431    }
6432
6433    fn drop_without_shutdown(mut self) {
6434        // Safety: drops once, never accessed again due to mem::forget
6435        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6436        // Prevent Drop from running (which would shut down the channel)
6437        std::mem::forget(self);
6438    }
6439}
6440
6441impl SocketSetMarkResponder {
6442    /// Sends a response to the FIDL transaction.
6443    ///
6444    /// Sets the channel to shutdown if an error occurs.
6445    pub fn send(
6446        self,
6447        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6448    ) -> Result<(), fidl::Error> {
6449        let _result = self.send_raw(result);
6450        if _result.is_err() {
6451            self.control_handle.shutdown();
6452        }
6453        self.drop_without_shutdown();
6454        _result
6455    }
6456
6457    /// Similar to "send" but does not shutdown the channel if an error occurs.
6458    pub fn send_no_shutdown_on_err(
6459        self,
6460        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6461    ) -> Result<(), fidl::Error> {
6462        let _result = self.send_raw(result);
6463        self.drop_without_shutdown();
6464        _result
6465    }
6466
6467    fn send_raw(
6468        &self,
6469        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6470    ) -> Result<(), fidl::Error> {
6471        self.control_handle.inner.send::<fidl::encoding::ResultType<
6472            fidl::encoding::EmptyStruct,
6473            fidl_fuchsia_posix::Errno,
6474        >>(
6475            result,
6476            self.tx_id,
6477            0x6ead6de09f653236,
6478            fidl::encoding::DynamicFlags::empty(),
6479        )
6480    }
6481}
6482
6483#[must_use = "FIDL methods require a response to be sent"]
6484#[derive(Debug)]
6485pub struct SocketGetMarkResponder {
6486    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6487    tx_id: u32,
6488}
6489
6490/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6491/// if the responder is dropped without sending a response, so that the client
6492/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6493impl std::ops::Drop for SocketGetMarkResponder {
6494    fn drop(&mut self) {
6495        self.control_handle.shutdown();
6496        // Safety: drops once, never accessed again
6497        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6498    }
6499}
6500
6501impl fidl::endpoints::Responder for SocketGetMarkResponder {
6502    type ControlHandle = SocketControlHandle;
6503
6504    fn control_handle(&self) -> &SocketControlHandle {
6505        &self.control_handle
6506    }
6507
6508    fn drop_without_shutdown(mut self) {
6509        // Safety: drops once, never accessed again due to mem::forget
6510        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6511        // Prevent Drop from running (which would shut down the channel)
6512        std::mem::forget(self);
6513    }
6514}
6515
6516impl SocketGetMarkResponder {
6517    /// Sends a response to the FIDL transaction.
6518    ///
6519    /// Sets the channel to shutdown if an error occurs.
6520    pub fn send(
6521        self,
6522        mut result: Result<&fidl_fuchsia_posix_socket::OptionalUint32, fidl_fuchsia_posix::Errno>,
6523    ) -> Result<(), fidl::Error> {
6524        let _result = self.send_raw(result);
6525        if _result.is_err() {
6526            self.control_handle.shutdown();
6527        }
6528        self.drop_without_shutdown();
6529        _result
6530    }
6531
6532    /// Similar to "send" but does not shutdown the channel if an error occurs.
6533    pub fn send_no_shutdown_on_err(
6534        self,
6535        mut result: Result<&fidl_fuchsia_posix_socket::OptionalUint32, fidl_fuchsia_posix::Errno>,
6536    ) -> Result<(), fidl::Error> {
6537        let _result = self.send_raw(result);
6538        self.drop_without_shutdown();
6539        _result
6540    }
6541
6542    fn send_raw(
6543        &self,
6544        mut result: Result<&fidl_fuchsia_posix_socket::OptionalUint32, fidl_fuchsia_posix::Errno>,
6545    ) -> Result<(), fidl::Error> {
6546        self.control_handle.inner.send::<fidl::encoding::ResultType<
6547            fidl_fuchsia_posix_socket::BaseSocketGetMarkResponse,
6548            fidl_fuchsia_posix::Errno,
6549        >>(
6550            result.map(|mark| (mark,)),
6551            self.tx_id,
6552            0x57a2752c61d93d47,
6553            fidl::encoding::DynamicFlags::empty(),
6554        )
6555    }
6556}
6557
6558#[must_use = "FIDL methods require a response to be sent"]
6559#[derive(Debug)]
6560pub struct SocketDescribeResponder {
6561    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6562    tx_id: u32,
6563}
6564
6565/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6566/// if the responder is dropped without sending a response, so that the client
6567/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6568impl std::ops::Drop for SocketDescribeResponder {
6569    fn drop(&mut self) {
6570        self.control_handle.shutdown();
6571        // Safety: drops once, never accessed again
6572        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6573    }
6574}
6575
6576impl fidl::endpoints::Responder for SocketDescribeResponder {
6577    type ControlHandle = SocketControlHandle;
6578
6579    fn control_handle(&self) -> &SocketControlHandle {
6580        &self.control_handle
6581    }
6582
6583    fn drop_without_shutdown(mut self) {
6584        // Safety: drops once, never accessed again due to mem::forget
6585        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6586        // Prevent Drop from running (which would shut down the channel)
6587        std::mem::forget(self);
6588    }
6589}
6590
6591impl SocketDescribeResponder {
6592    /// Sends a response to the FIDL transaction.
6593    ///
6594    /// Sets the channel to shutdown if an error occurs.
6595    pub fn send(self, mut payload: SocketDescribeResponse) -> Result<(), fidl::Error> {
6596        let _result = self.send_raw(payload);
6597        if _result.is_err() {
6598            self.control_handle.shutdown();
6599        }
6600        self.drop_without_shutdown();
6601        _result
6602    }
6603
6604    /// Similar to "send" but does not shutdown the channel if an error occurs.
6605    pub fn send_no_shutdown_on_err(
6606        self,
6607        mut payload: SocketDescribeResponse,
6608    ) -> Result<(), fidl::Error> {
6609        let _result = self.send_raw(payload);
6610        self.drop_without_shutdown();
6611        _result
6612    }
6613
6614    fn send_raw(&self, mut payload: SocketDescribeResponse) -> Result<(), fidl::Error> {
6615        self.control_handle.inner.send::<SocketDescribeResponse>(
6616            &mut payload,
6617            self.tx_id,
6618            0x4fd7c08c9c804484,
6619            fidl::encoding::DynamicFlags::empty(),
6620        )
6621    }
6622}
6623
6624#[must_use = "FIDL methods require a response to be sent"]
6625#[derive(Debug)]
6626pub struct SocketBindResponder {
6627    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6628    tx_id: u32,
6629}
6630
6631/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6632/// if the responder is dropped without sending a response, so that the client
6633/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6634impl std::ops::Drop for SocketBindResponder {
6635    fn drop(&mut self) {
6636        self.control_handle.shutdown();
6637        // Safety: drops once, never accessed again
6638        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6639    }
6640}
6641
6642impl fidl::endpoints::Responder for SocketBindResponder {
6643    type ControlHandle = SocketControlHandle;
6644
6645    fn control_handle(&self) -> &SocketControlHandle {
6646        &self.control_handle
6647    }
6648
6649    fn drop_without_shutdown(mut self) {
6650        // Safety: drops once, never accessed again due to mem::forget
6651        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6652        // Prevent Drop from running (which would shut down the channel)
6653        std::mem::forget(self);
6654    }
6655}
6656
6657impl SocketBindResponder {
6658    /// Sends a response to the FIDL transaction.
6659    ///
6660    /// Sets the channel to shutdown if an error occurs.
6661    pub fn send(
6662        self,
6663        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6664    ) -> Result<(), fidl::Error> {
6665        let _result = self.send_raw(result);
6666        if _result.is_err() {
6667            self.control_handle.shutdown();
6668        }
6669        self.drop_without_shutdown();
6670        _result
6671    }
6672
6673    /// Similar to "send" but does not shutdown the channel if an error occurs.
6674    pub fn send_no_shutdown_on_err(
6675        self,
6676        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6677    ) -> Result<(), fidl::Error> {
6678        let _result = self.send_raw(result);
6679        self.drop_without_shutdown();
6680        _result
6681    }
6682
6683    fn send_raw(
6684        &self,
6685        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6686    ) -> Result<(), fidl::Error> {
6687        self.control_handle.inner.send::<fidl::encoding::ResultType<
6688            fidl::encoding::EmptyStruct,
6689            fidl_fuchsia_posix::Errno,
6690        >>(
6691            result,
6692            self.tx_id,
6693            0x6caedb2d31b56db8,
6694            fidl::encoding::DynamicFlags::empty(),
6695        )
6696    }
6697}
6698
6699#[must_use = "FIDL methods require a response to be sent"]
6700#[derive(Debug)]
6701pub struct SocketGetInfoResponder {
6702    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6703    tx_id: u32,
6704}
6705
6706/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6707/// if the responder is dropped without sending a response, so that the client
6708/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6709impl std::ops::Drop for SocketGetInfoResponder {
6710    fn drop(&mut self) {
6711        self.control_handle.shutdown();
6712        // Safety: drops once, never accessed again
6713        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6714    }
6715}
6716
6717impl fidl::endpoints::Responder for SocketGetInfoResponder {
6718    type ControlHandle = SocketControlHandle;
6719
6720    fn control_handle(&self) -> &SocketControlHandle {
6721        &self.control_handle
6722    }
6723
6724    fn drop_without_shutdown(mut self) {
6725        // Safety: drops once, never accessed again due to mem::forget
6726        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6727        // Prevent Drop from running (which would shut down the channel)
6728        std::mem::forget(self);
6729    }
6730}
6731
6732impl SocketGetInfoResponder {
6733    /// Sends a response to the FIDL transaction.
6734    ///
6735    /// Sets the channel to shutdown if an error occurs.
6736    pub fn send(
6737        self,
6738        mut result: Result<
6739            (Kind, Option<&ProtocolAssociation>, &BoundInterface),
6740            fidl_fuchsia_posix::Errno,
6741        >,
6742    ) -> Result<(), fidl::Error> {
6743        let _result = self.send_raw(result);
6744        if _result.is_err() {
6745            self.control_handle.shutdown();
6746        }
6747        self.drop_without_shutdown();
6748        _result
6749    }
6750
6751    /// Similar to "send" but does not shutdown the channel if an error occurs.
6752    pub fn send_no_shutdown_on_err(
6753        self,
6754        mut result: Result<
6755            (Kind, Option<&ProtocolAssociation>, &BoundInterface),
6756            fidl_fuchsia_posix::Errno,
6757        >,
6758    ) -> Result<(), fidl::Error> {
6759        let _result = self.send_raw(result);
6760        self.drop_without_shutdown();
6761        _result
6762    }
6763
6764    fn send_raw(
6765        &self,
6766        mut result: Result<
6767            (Kind, Option<&ProtocolAssociation>, &BoundInterface),
6768            fidl_fuchsia_posix::Errno,
6769        >,
6770    ) -> Result<(), fidl::Error> {
6771        self.control_handle.inner.send::<fidl::encoding::ResultType<
6772            SocketGetInfoResponse,
6773            fidl_fuchsia_posix::Errno,
6774        >>(
6775            result,
6776            self.tx_id,
6777            0x7f67457e85c3914c,
6778            fidl::encoding::DynamicFlags::empty(),
6779        )
6780    }
6781}
6782
6783#[must_use = "FIDL methods require a response to be sent"]
6784#[derive(Debug)]
6785pub struct SocketRecvMsgResponder {
6786    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6787    tx_id: u32,
6788}
6789
6790/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6791/// if the responder is dropped without sending a response, so that the client
6792/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6793impl std::ops::Drop for SocketRecvMsgResponder {
6794    fn drop(&mut self) {
6795        self.control_handle.shutdown();
6796        // Safety: drops once, never accessed again
6797        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6798    }
6799}
6800
6801impl fidl::endpoints::Responder for SocketRecvMsgResponder {
6802    type ControlHandle = SocketControlHandle;
6803
6804    fn control_handle(&self) -> &SocketControlHandle {
6805        &self.control_handle
6806    }
6807
6808    fn drop_without_shutdown(mut self) {
6809        // Safety: drops once, never accessed again due to mem::forget
6810        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6811        // Prevent Drop from running (which would shut down the channel)
6812        std::mem::forget(self);
6813    }
6814}
6815
6816impl SocketRecvMsgResponder {
6817    /// Sends a response to the FIDL transaction.
6818    ///
6819    /// Sets the channel to shutdown if an error occurs.
6820    pub fn send(
6821        self,
6822        mut result: Result<
6823            (Option<&RecvPacketInfo>, &[u8], &RecvControlData, u32),
6824            fidl_fuchsia_posix::Errno,
6825        >,
6826    ) -> Result<(), fidl::Error> {
6827        let _result = self.send_raw(result);
6828        if _result.is_err() {
6829            self.control_handle.shutdown();
6830        }
6831        self.drop_without_shutdown();
6832        _result
6833    }
6834
6835    /// Similar to "send" but does not shutdown the channel if an error occurs.
6836    pub fn send_no_shutdown_on_err(
6837        self,
6838        mut result: Result<
6839            (Option<&RecvPacketInfo>, &[u8], &RecvControlData, u32),
6840            fidl_fuchsia_posix::Errno,
6841        >,
6842    ) -> Result<(), fidl::Error> {
6843        let _result = self.send_raw(result);
6844        self.drop_without_shutdown();
6845        _result
6846    }
6847
6848    fn send_raw(
6849        &self,
6850        mut result: Result<
6851            (Option<&RecvPacketInfo>, &[u8], &RecvControlData, u32),
6852            fidl_fuchsia_posix::Errno,
6853        >,
6854    ) -> Result<(), fidl::Error> {
6855        self.control_handle.inner.send::<fidl::encoding::ResultType<
6856            SocketRecvMsgResponse,
6857            fidl_fuchsia_posix::Errno,
6858        >>(
6859            result,
6860            self.tx_id,
6861            0x52b95ba982826a61,
6862            fidl::encoding::DynamicFlags::empty(),
6863        )
6864    }
6865}
6866
6867#[must_use = "FIDL methods require a response to be sent"]
6868#[derive(Debug)]
6869pub struct SocketSendMsgResponder {
6870    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6871    tx_id: u32,
6872}
6873
6874/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6875/// if the responder is dropped without sending a response, so that the client
6876/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6877impl std::ops::Drop for SocketSendMsgResponder {
6878    fn drop(&mut self) {
6879        self.control_handle.shutdown();
6880        // Safety: drops once, never accessed again
6881        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6882    }
6883}
6884
6885impl fidl::endpoints::Responder for SocketSendMsgResponder {
6886    type ControlHandle = SocketControlHandle;
6887
6888    fn control_handle(&self) -> &SocketControlHandle {
6889        &self.control_handle
6890    }
6891
6892    fn drop_without_shutdown(mut self) {
6893        // Safety: drops once, never accessed again due to mem::forget
6894        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6895        // Prevent Drop from running (which would shut down the channel)
6896        std::mem::forget(self);
6897    }
6898}
6899
6900impl SocketSendMsgResponder {
6901    /// Sends a response to the FIDL transaction.
6902    ///
6903    /// Sets the channel to shutdown if an error occurs.
6904    pub fn send(
6905        self,
6906        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6907    ) -> Result<(), fidl::Error> {
6908        let _result = self.send_raw(result);
6909        if _result.is_err() {
6910            self.control_handle.shutdown();
6911        }
6912        self.drop_without_shutdown();
6913        _result
6914    }
6915
6916    /// Similar to "send" but does not shutdown the channel if an error occurs.
6917    pub fn send_no_shutdown_on_err(
6918        self,
6919        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6920    ) -> Result<(), fidl::Error> {
6921        let _result = self.send_raw(result);
6922        self.drop_without_shutdown();
6923        _result
6924    }
6925
6926    fn send_raw(
6927        &self,
6928        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6929    ) -> Result<(), fidl::Error> {
6930        self.control_handle.inner.send::<fidl::encoding::ResultType<
6931            fidl::encoding::EmptyStruct,
6932            fidl_fuchsia_posix::Errno,
6933        >>(
6934            result,
6935            self.tx_id,
6936            0x150c9ff91f944922,
6937            fidl::encoding::DynamicFlags::empty(),
6938        )
6939    }
6940}
6941
6942#[must_use = "FIDL methods require a response to be sent"]
6943#[derive(Debug)]
6944pub struct SocketAttachBpfFilterUnsafeResponder {
6945    control_handle: std::mem::ManuallyDrop<SocketControlHandle>,
6946    tx_id: u32,
6947}
6948
6949/// Set the the channel to be shutdown (see [`SocketControlHandle::shutdown`])
6950/// if the responder is dropped without sending a response, so that the client
6951/// doesn't hang. To prevent this behavior, call `drop_without_shutdown`.
6952impl std::ops::Drop for SocketAttachBpfFilterUnsafeResponder {
6953    fn drop(&mut self) {
6954        self.control_handle.shutdown();
6955        // Safety: drops once, never accessed again
6956        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6957    }
6958}
6959
6960impl fidl::endpoints::Responder for SocketAttachBpfFilterUnsafeResponder {
6961    type ControlHandle = SocketControlHandle;
6962
6963    fn control_handle(&self) -> &SocketControlHandle {
6964        &self.control_handle
6965    }
6966
6967    fn drop_without_shutdown(mut self) {
6968        // Safety: drops once, never accessed again due to mem::forget
6969        unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6970        // Prevent Drop from running (which would shut down the channel)
6971        std::mem::forget(self);
6972    }
6973}
6974
6975impl SocketAttachBpfFilterUnsafeResponder {
6976    /// Sends a response to the FIDL transaction.
6977    ///
6978    /// Sets the channel to shutdown if an error occurs.
6979    pub fn send(
6980        self,
6981        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6982    ) -> Result<(), fidl::Error> {
6983        let _result = self.send_raw(result);
6984        if _result.is_err() {
6985            self.control_handle.shutdown();
6986        }
6987        self.drop_without_shutdown();
6988        _result
6989    }
6990
6991    /// Similar to "send" but does not shutdown the channel if an error occurs.
6992    pub fn send_no_shutdown_on_err(
6993        self,
6994        mut result: Result<(), fidl_fuchsia_posix::Errno>,
6995    ) -> Result<(), fidl::Error> {
6996        let _result = self.send_raw(result);
6997        self.drop_without_shutdown();
6998        _result
6999    }
7000
7001    fn send_raw(
7002        &self,
7003        mut result: Result<(), fidl_fuchsia_posix::Errno>,
7004    ) -> Result<(), fidl::Error> {
7005        self.control_handle.inner.send::<fidl::encoding::ResultType<
7006            fidl::encoding::EmptyStruct,
7007            fidl_fuchsia_posix::Errno,
7008        >>(
7009            result,
7010            self.tx_id,
7011            0x593998d38670f823,
7012            fidl::encoding::DynamicFlags::empty(),
7013        )
7014    }
7015}
7016
7017mod internal {
7018    use super::*;
7019
7020    impl fidl::encoding::ResourceTypeMarker for ProviderSocketResponse {
7021        type Borrowed<'a> = &'a mut Self;
7022        fn take_or_borrow<'a>(
7023            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7024        ) -> Self::Borrowed<'a> {
7025            value
7026        }
7027    }
7028
7029    unsafe impl fidl::encoding::TypeMarker for ProviderSocketResponse {
7030        type Owned = Self;
7031
7032        #[inline(always)]
7033        fn inline_align(_context: fidl::encoding::Context) -> usize {
7034            4
7035        }
7036
7037        #[inline(always)]
7038        fn inline_size(_context: fidl::encoding::Context) -> usize {
7039            4
7040        }
7041    }
7042
7043    unsafe impl
7044        fidl::encoding::Encode<
7045            ProviderSocketResponse,
7046            fidl::encoding::DefaultFuchsiaResourceDialect,
7047        > for &mut ProviderSocketResponse
7048    {
7049        #[inline]
7050        unsafe fn encode(
7051            self,
7052            encoder: &mut fidl::encoding::Encoder<
7053                '_,
7054                fidl::encoding::DefaultFuchsiaResourceDialect,
7055            >,
7056            offset: usize,
7057            _depth: fidl::encoding::Depth,
7058        ) -> fidl::Result<()> {
7059            encoder.debug_check_bounds::<ProviderSocketResponse>(offset);
7060            // Delegate to tuple encoding.
7061            fidl::encoding::Encode::<ProviderSocketResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7062                (
7063                    <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<SocketMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.socket),
7064                ),
7065                encoder, offset, _depth
7066            )
7067        }
7068    }
7069    unsafe impl<
7070            T0: fidl::encoding::Encode<
7071                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<SocketMarker>>,
7072                fidl::encoding::DefaultFuchsiaResourceDialect,
7073            >,
7074        >
7075        fidl::encoding::Encode<
7076            ProviderSocketResponse,
7077            fidl::encoding::DefaultFuchsiaResourceDialect,
7078        > for (T0,)
7079    {
7080        #[inline]
7081        unsafe fn encode(
7082            self,
7083            encoder: &mut fidl::encoding::Encoder<
7084                '_,
7085                fidl::encoding::DefaultFuchsiaResourceDialect,
7086            >,
7087            offset: usize,
7088            depth: fidl::encoding::Depth,
7089        ) -> fidl::Result<()> {
7090            encoder.debug_check_bounds::<ProviderSocketResponse>(offset);
7091            // Zero out padding regions. There's no need to apply masks
7092            // because the unmasked parts will be overwritten by fields.
7093            // Write the fields.
7094            self.0.encode(encoder, offset + 0, depth)?;
7095            Ok(())
7096        }
7097    }
7098
7099    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7100        for ProviderSocketResponse
7101    {
7102        #[inline(always)]
7103        fn new_empty() -> Self {
7104            Self {
7105                socket: fidl::new_empty!(
7106                    fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<SocketMarker>>,
7107                    fidl::encoding::DefaultFuchsiaResourceDialect
7108                ),
7109            }
7110        }
7111
7112        #[inline]
7113        unsafe fn decode(
7114            &mut self,
7115            decoder: &mut fidl::encoding::Decoder<
7116                '_,
7117                fidl::encoding::DefaultFuchsiaResourceDialect,
7118            >,
7119            offset: usize,
7120            _depth: fidl::encoding::Depth,
7121        ) -> fidl::Result<()> {
7122            decoder.debug_check_bounds::<Self>(offset);
7123            // Verify that padding bytes are zero.
7124            fidl::decode!(
7125                fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<SocketMarker>>,
7126                fidl::encoding::DefaultFuchsiaResourceDialect,
7127                &mut self.socket,
7128                decoder,
7129                offset + 0,
7130                _depth
7131            )?;
7132            Ok(())
7133        }
7134    }
7135
7136    impl fidl::encoding::ResourceTypeMarker for SocketAttachBpfFilterUnsafeRequest {
7137        type Borrowed<'a> = &'a mut Self;
7138        fn take_or_borrow<'a>(
7139            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7140        ) -> Self::Borrowed<'a> {
7141            value
7142        }
7143    }
7144
7145    unsafe impl fidl::encoding::TypeMarker for SocketAttachBpfFilterUnsafeRequest {
7146        type Owned = Self;
7147
7148        #[inline(always)]
7149        fn inline_align(_context: fidl::encoding::Context) -> usize {
7150            8
7151        }
7152
7153        #[inline(always)]
7154        fn inline_size(_context: fidl::encoding::Context) -> usize {
7155            16
7156        }
7157    }
7158
7159    unsafe impl
7160        fidl::encoding::Encode<
7161            SocketAttachBpfFilterUnsafeRequest,
7162            fidl::encoding::DefaultFuchsiaResourceDialect,
7163        > for &mut SocketAttachBpfFilterUnsafeRequest
7164    {
7165        #[inline]
7166        unsafe fn encode(
7167            self,
7168            encoder: &mut fidl::encoding::Encoder<
7169                '_,
7170                fidl::encoding::DefaultFuchsiaResourceDialect,
7171            >,
7172            offset: usize,
7173            _depth: fidl::encoding::Depth,
7174        ) -> fidl::Result<()> {
7175            encoder.debug_check_bounds::<SocketAttachBpfFilterUnsafeRequest>(offset);
7176            // Delegate to tuple encoding.
7177            fidl::encoding::Encode::<
7178                SocketAttachBpfFilterUnsafeRequest,
7179                fidl::encoding::DefaultFuchsiaResourceDialect,
7180            >::encode(
7181                (<fidl::encoding::Vector<u64, 4096> as fidl::encoding::ValueTypeMarker>::borrow(
7182                    &self.code,
7183                ),),
7184                encoder,
7185                offset,
7186                _depth,
7187            )
7188        }
7189    }
7190    unsafe impl<
7191            T0: fidl::encoding::Encode<
7192                fidl::encoding::Vector<u64, 4096>,
7193                fidl::encoding::DefaultFuchsiaResourceDialect,
7194            >,
7195        >
7196        fidl::encoding::Encode<
7197            SocketAttachBpfFilterUnsafeRequest,
7198            fidl::encoding::DefaultFuchsiaResourceDialect,
7199        > for (T0,)
7200    {
7201        #[inline]
7202        unsafe fn encode(
7203            self,
7204            encoder: &mut fidl::encoding::Encoder<
7205                '_,
7206                fidl::encoding::DefaultFuchsiaResourceDialect,
7207            >,
7208            offset: usize,
7209            depth: fidl::encoding::Depth,
7210        ) -> fidl::Result<()> {
7211            encoder.debug_check_bounds::<SocketAttachBpfFilterUnsafeRequest>(offset);
7212            // Zero out padding regions. There's no need to apply masks
7213            // because the unmasked parts will be overwritten by fields.
7214            // Write the fields.
7215            self.0.encode(encoder, offset + 0, depth)?;
7216            Ok(())
7217        }
7218    }
7219
7220    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7221        for SocketAttachBpfFilterUnsafeRequest
7222    {
7223        #[inline(always)]
7224        fn new_empty() -> Self {
7225            Self {
7226                code: fidl::new_empty!(fidl::encoding::Vector<u64, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect),
7227            }
7228        }
7229
7230        #[inline]
7231        unsafe fn decode(
7232            &mut self,
7233            decoder: &mut fidl::encoding::Decoder<
7234                '_,
7235                fidl::encoding::DefaultFuchsiaResourceDialect,
7236            >,
7237            offset: usize,
7238            _depth: fidl::encoding::Depth,
7239        ) -> fidl::Result<()> {
7240            decoder.debug_check_bounds::<Self>(offset);
7241            // Verify that padding bytes are zero.
7242            fidl::decode!(fidl::encoding::Vector<u64, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.code, decoder, offset + 0, _depth)?;
7243            Ok(())
7244        }
7245    }
7246
7247    impl SocketDescribeResponse {
7248        #[inline(always)]
7249        fn max_ordinal_present(&self) -> u64 {
7250            if let Some(_) = self.event {
7251                return 1;
7252            }
7253            0
7254        }
7255    }
7256
7257    impl fidl::encoding::ResourceTypeMarker for SocketDescribeResponse {
7258        type Borrowed<'a> = &'a mut Self;
7259        fn take_or_borrow<'a>(
7260            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7261        ) -> Self::Borrowed<'a> {
7262            value
7263        }
7264    }
7265
7266    unsafe impl fidl::encoding::TypeMarker for SocketDescribeResponse {
7267        type Owned = Self;
7268
7269        #[inline(always)]
7270        fn inline_align(_context: fidl::encoding::Context) -> usize {
7271            8
7272        }
7273
7274        #[inline(always)]
7275        fn inline_size(_context: fidl::encoding::Context) -> usize {
7276            16
7277        }
7278    }
7279
7280    unsafe impl
7281        fidl::encoding::Encode<
7282            SocketDescribeResponse,
7283            fidl::encoding::DefaultFuchsiaResourceDialect,
7284        > for &mut SocketDescribeResponse
7285    {
7286        unsafe fn encode(
7287            self,
7288            encoder: &mut fidl::encoding::Encoder<
7289                '_,
7290                fidl::encoding::DefaultFuchsiaResourceDialect,
7291            >,
7292            offset: usize,
7293            mut depth: fidl::encoding::Depth,
7294        ) -> fidl::Result<()> {
7295            encoder.debug_check_bounds::<SocketDescribeResponse>(offset);
7296            // Vector header
7297            let max_ordinal: u64 = self.max_ordinal_present();
7298            encoder.write_num(max_ordinal, offset);
7299            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7300            // Calling encoder.out_of_line_offset(0) is not allowed.
7301            if max_ordinal == 0 {
7302                return Ok(());
7303            }
7304            depth.increment()?;
7305            let envelope_size = 8;
7306            let bytes_len = max_ordinal as usize * envelope_size;
7307            #[allow(unused_variables)]
7308            let offset = encoder.out_of_line_offset(bytes_len);
7309            let mut _prev_end_offset: usize = 0;
7310            if 1 > max_ordinal {
7311                return Ok(());
7312            }
7313
7314            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7315            // are envelope_size bytes.
7316            let cur_offset: usize = (1 - 1) * envelope_size;
7317
7318            // Zero reserved fields.
7319            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7320
7321            // Safety:
7322            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7323            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7324            //   envelope_size bytes, there is always sufficient room.
7325            fidl::encoding::encode_in_envelope_optional::<
7326                fidl::encoding::HandleType<
7327                    fidl::EventPair,
7328                    { fidl::ObjectType::EVENTPAIR.into_raw() },
7329                    2147483648,
7330                >,
7331                fidl::encoding::DefaultFuchsiaResourceDialect,
7332            >(
7333                self.event.as_mut().map(
7334                    <fidl::encoding::HandleType<
7335                        fidl::EventPair,
7336                        { fidl::ObjectType::EVENTPAIR.into_raw() },
7337                        2147483648,
7338                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
7339                ),
7340                encoder,
7341                offset + cur_offset,
7342                depth,
7343            )?;
7344
7345            _prev_end_offset = cur_offset + envelope_size;
7346
7347            Ok(())
7348        }
7349    }
7350
7351    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7352        for SocketDescribeResponse
7353    {
7354        #[inline(always)]
7355        fn new_empty() -> Self {
7356            Self::default()
7357        }
7358
7359        unsafe fn decode(
7360            &mut self,
7361            decoder: &mut fidl::encoding::Decoder<
7362                '_,
7363                fidl::encoding::DefaultFuchsiaResourceDialect,
7364            >,
7365            offset: usize,
7366            mut depth: fidl::encoding::Depth,
7367        ) -> fidl::Result<()> {
7368            decoder.debug_check_bounds::<Self>(offset);
7369            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7370                None => return Err(fidl::Error::NotNullable),
7371                Some(len) => len,
7372            };
7373            // Calling decoder.out_of_line_offset(0) is not allowed.
7374            if len == 0 {
7375                return Ok(());
7376            };
7377            depth.increment()?;
7378            let envelope_size = 8;
7379            let bytes_len = len * envelope_size;
7380            let offset = decoder.out_of_line_offset(bytes_len)?;
7381            // Decode the envelope for each type.
7382            let mut _next_ordinal_to_read = 0;
7383            let mut next_offset = offset;
7384            let end_offset = offset + bytes_len;
7385            _next_ordinal_to_read += 1;
7386            if next_offset >= end_offset {
7387                return Ok(());
7388            }
7389
7390            // Decode unknown envelopes for gaps in ordinals.
7391            while _next_ordinal_to_read < 1 {
7392                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7393                _next_ordinal_to_read += 1;
7394                next_offset += envelope_size;
7395            }
7396
7397            let next_out_of_line = decoder.next_out_of_line();
7398            let handles_before = decoder.remaining_handles();
7399            if let Some((inlined, num_bytes, num_handles)) =
7400                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7401            {
7402                let member_inline_size = <fidl::encoding::HandleType<
7403                    fidl::EventPair,
7404                    { fidl::ObjectType::EVENTPAIR.into_raw() },
7405                    2147483648,
7406                > as fidl::encoding::TypeMarker>::inline_size(
7407                    decoder.context
7408                );
7409                if inlined != (member_inline_size <= 4) {
7410                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7411                }
7412                let inner_offset;
7413                let mut inner_depth = depth.clone();
7414                if inlined {
7415                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7416                    inner_offset = next_offset;
7417                } else {
7418                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7419                    inner_depth.increment()?;
7420                }
7421                let val_ref =
7422                self.event.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
7423                fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
7424                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7425                {
7426                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7427                }
7428                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7429                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7430                }
7431            }
7432
7433            next_offset += envelope_size;
7434
7435            // Decode the remaining unknown envelopes.
7436            while next_offset < end_offset {
7437                _next_ordinal_to_read += 1;
7438                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7439                next_offset += envelope_size;
7440            }
7441
7442            Ok(())
7443        }
7444    }
7445}