RecvDatagramExt

Trait RecvDatagramExt 

Source
pub trait RecvDatagramExt {
    type Buf: Buf;
    type Error: Into<Box<dyn Error>>;

    // Required method
    fn poll_accept_datagram(
        &mut self,
        cx: &mut Context<'_>,
    ) -> Poll<Result<Option<Self::Buf>, Self::Error>>;
}
Expand description

Extends the Connection trait for receiving datagrams

See: https://www.rfc-editor.org/rfc/rfc9297

Required Associated Types§

Source

type Buf: Buf

The type of Buf for raw datagrams (without the stream_id decoded)

Source

type Error: Into<Box<dyn Error>>

The error type that can occur when receiving a datagram

Required Methods§

Source

fn poll_accept_datagram( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<Option<Self::Buf>, Self::Error>>

Poll the connection for incoming datagrams.

Implementors§