pub struct Codec { /* private fields */ }Available on crate feature
ws only.Expand description
WebSocket protocol codec.
Implementations§
Trait Implementations§
Source§impl Decoder for Codec
impl Decoder for Codec
Source§type Error = ProtocolError
type Error = ProtocolError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl Forget for Codec
impl Freeze for Codecwhere
InternalBitFlags: Freeze,
impl Move for Codec
impl RefUnwindSafe for Codecwhere
InternalBitFlags: RefUnwindSafe,
impl Send for Codecwhere
InternalBitFlags: Send,
impl Sync for Codecwhere
InternalBitFlags: Sync,
impl Unpin for Codecwhere
InternalBitFlags: Unpin,
impl UnsafeUnpin for Codecwhere
InternalBitFlags: UnsafeUnpin,
impl UnwindSafe for Codecwhere
InternalBitFlags: 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