pub struct Datagram<B> { /* private fields */ }Expand description
HTTP datagram frames See: https://www.rfc-editor.org/rfc/rfc9297#section-2.1
Implementations§
Source§impl<B> Datagram<B>where
B: Buf,
impl<B> Datagram<B>where
B: Buf,
Sourcepub fn decode(buf: B) -> Result<Self, InternalConnectionError>
pub fn decode(buf: B) -> Result<Self, InternalConnectionError>
Decodes a datagram frame from the QUIC datagram
Sourcepub fn encode(self) -> EncodedDatagram<B>
pub fn encode(self) -> EncodedDatagram<B>
Encode the datagram to wire format
Sourcepub fn into_payload(self) -> B
pub fn into_payload(self) -> B
Returns the datagram payload
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Datagram<B>where
B: Freeze,
impl<B> RefUnwindSafe for Datagram<B>where
B: RefUnwindSafe,
impl<B> Send for Datagram<B>where
B: Send,
impl<B> Sync for Datagram<B>where
B: Sync,
impl<B> Unpin for Datagram<B>where
B: Unpin,
impl<B> UnwindSafe for Datagram<B>where
B: UnwindSafe,
Blanket Implementations§
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