pub struct FrameHeaderCodec;
Expand description
Tokio codec for the low-level header portion of WebSocket frames.
This codec can send and receive FrameHeader
structs.
The frame header is a lower level detail of the WebSocket protocol. At the application level,
use Message
structs and the MessageCodec
.
Trait Implementations§
Source§impl Decoder for FrameHeaderCodec
impl Decoder for FrameHeaderCodec
Source§type Item = FrameHeader
type Item = FrameHeader
The type of decoded frames.
Source§type Error = Box<dyn Error + Sync + Send>
type Error = Box<dyn Error + Sync + Send>
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<FrameHeader>>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<FrameHeader>>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§impl<'a> Encoder<&'a FrameHeader> for FrameHeaderCodec
impl<'a> Encoder<&'a FrameHeader> for FrameHeaderCodec
Auto Trait Implementations§
impl Freeze for FrameHeaderCodec
impl RefUnwindSafe for FrameHeaderCodec
impl Send for FrameHeaderCodec
impl Sync for FrameHeaderCodec
impl Unpin for FrameHeaderCodec
impl UnwindSafe for FrameHeaderCodec
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