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]
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> !RefUnwindSafe for Datagrams<'a, S>impl<'a, S> !UnwindSafe for Datagrams<'a, S>
impl<'a, S> !UnwindSafe for Datagrams<'a, S>Blanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,