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