pub struct TcpCodec;Expand description
Finds RFC 4571 frames: a 2 bytes length prefix, then the payload.
Trait Implementations§
Source§impl FrameCodec for TcpCodec
impl FrameCodec for TcpCodec
type Frame = TcpFrame
type Error = FrameTooLargeError
Source§fn try_decode(unread: &[u8]) -> Decoded<TcpFrame, FrameTooLargeError>
fn try_decode(unread: &[u8]) -> Decoded<TcpFrame, FrameTooLargeError>
Decodes the first frame of
unread.Auto Trait Implementations§
impl Freeze for TcpCodec
impl RefUnwindSafe for TcpCodec
impl Send for TcpCodec
impl Sync for TcpCodec
impl Unpin for TcpCodec
impl UnsafeUnpin for TcpCodec
impl UnwindSafe for TcpCodec
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