Struct quinn_proto::generic::Datagrams[][src]

pub struct Datagrams<'a, S: Session> { /* fields omitted */ }

API to control datagram traffic

Implementations

impl<'a, S: Session> Datagrams<'a, S>[src]

pub fn send(&mut self, data: Bytes) -> Result<(), SendDatagramError>[src]

Queue an unreliable, unordered datagram for immediate transmission

Returns Err iff a len-byte datagram cannot currently be sent

pub fn max_size(&self) -> Option<usize>[src]

Compute the maximum size of datagrams that may passed to send_datagram

Returns None if datagrams are unsupported by the peer or disabled locally.

This may change over the lifetime of a connection according to variation in the path MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.

Not necessarily the maximum size of received datagrams.

pub fn recv(&mut self) -> Option<Bytes>[src]

Receive an unreliable, unordered datagram

Auto Trait Implementations

impl<'a, S> !RefUnwindSafe for Datagrams<'a, S>

impl<'a, S> Send for Datagrams<'a, S>

impl<'a, S> !Sync for Datagrams<'a, S>

impl<'a, S> Unpin for Datagrams<'a, S>

impl<'a, S> !UnwindSafe for Datagrams<'a, S>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,