pub struct AsyncStdUdpSocket(/* private fields */);Expand description
Async-io-backed UDP socket for use with QUIC transports.
Trait Implementations§
Source§impl AsFd for AsyncStdUdpSocket
Available on Unix only.
impl AsFd for AsyncStdUdpSocket
Available on Unix only.
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl Debug for AsyncStdUdpSocket
impl Debug for AsyncStdUdpSocket
Source§impl UdpTransport for AsyncStdUdpSocket
impl UdpTransport for AsyncStdUdpSocket
Source§fn from_std(socket: UdpSocket) -> Result<Self>
fn from_std(socket: UdpSocket) -> Result<Self>
Wrap a bound, non-blocking std UDP socket into this async type.
Source§fn local_addr(&self) -> Result<SocketAddr>
fn local_addr(&self) -> Result<SocketAddr>
The local address this socket is bound to.
Source§fn poll_recv_io<R>(
&self,
cx: &mut Context<'_>,
recv: impl FnMut(&Self) -> Result<R>,
) -> Poll<Result<R>>
fn poll_recv_io<R>( &self, cx: &mut Context<'_>, recv: impl FnMut(&Self) -> Result<R>, ) -> Poll<Result<R>>
Poll for read readiness, then attempt a receive operation. Read more
Source§fn poll_writable(&self, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_writable(&self, cx: &mut Context<'_>) -> Poll<Result<()>>
Poll for write readiness without attempting any I/O. Read more
Source§fn try_send_io<R>(&self, send: impl FnOnce(&Self) -> Result<R>) -> Result<R>
fn try_send_io<R>(&self, send: impl FnOnce(&Self) -> Result<R>) -> Result<R>
Attempt a send operation, managing readiness state. Read more
Source§fn max_transmit_segments(&self) -> usize
fn max_transmit_segments(&self) -> usize
Maximum number of datagrams to send in a single syscall (GSO).
Source§fn max_receive_segments(&self) -> usize
fn max_receive_segments(&self) -> usize
Maximum number of datagrams to receive in a single syscall (GRO).
Source§fn may_fragment(&self) -> bool
fn may_fragment(&self) -> bool
Whether outbound datagrams may be fragmented by the network layer.
Auto Trait Implementations§
impl Freeze for AsyncStdUdpSocket
impl RefUnwindSafe for AsyncStdUdpSocket
impl Send for AsyncStdUdpSocket
impl Sync for AsyncStdUdpSocket
impl Unpin for AsyncStdUdpSocket
impl UnsafeUnpin for AsyncStdUdpSocket
impl UnwindSafe for AsyncStdUdpSocket
Blanket Implementations§
Source§impl<T> AsSource for Twhere
T: AsFd,
impl<T> AsSource for Twhere
T: AsFd,
Source§fn source(&self) -> BorrowedFd<'_>
fn source(&self) -> BorrowedFd<'_>
Returns the borrowed file descriptor.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more