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