Skip to main content

SmolUdpSocket

Struct SmolUdpSocket 

Source
pub struct SmolUdpSocket(/* private fields */);
Expand description

Async-io-backed UDP socket for use with QUIC transports.

Trait Implementations§

Source§

impl AsFd for SmolUdpSocket

Available on Unix only.
Source§

fn as_fd(&self) -> BorrowedFd<'_>

Borrows the file descriptor. Read more
Source§

impl Debug for SmolUdpSocket

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl UdpTransport for SmolUdpSocket

Source§

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>

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>>

Poll for read readiness, then attempt a receive operation. Read more
Source§

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>

Attempt a send operation, managing readiness state. Read more
Source§

fn max_transmit_segments(&self) -> usize

Maximum number of datagrams to send in a single syscall (GSO).
Source§

fn max_receive_segments(&self) -> usize

Maximum number of datagrams to receive in a single syscall (GRO).
Source§

fn may_fragment(&self) -> bool

Whether outbound datagrams may be fragmented by the network layer.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsSource for T
where T: AsFd,

Source§

fn source(&self) -> BorrowedFd<'_>

Returns the borrowed file descriptor.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.