pub struct TopiqCodec { /* private fields */ }Expand description
Codec for encoding/decoding Frame values on the wire.
Wire format: [4B frame body length (big-endian)][1B version][N bytes msgpack Frame]
The 4-byte length covers the version byte + msgpack body.
Implementations§
Trait Implementations§
Source§impl Decoder for TopiqCodec
impl Decoder for TopiqCodec
Source§type Error = TopiqError
type Error = TopiqError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Frame>, TopiqError>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Frame>, TopiqError>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl Freeze for TopiqCodec
impl RefUnwindSafe for TopiqCodec
impl Send for TopiqCodec
impl Sync for TopiqCodec
impl Unpin for TopiqCodec
impl UnsafeUnpin for TopiqCodec
impl UnwindSafe for TopiqCodec
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