pub struct PacketCodec;Expand description
Codec for encoding and decoding starpc packets with length-prefix framing.
Implementations§
Source§impl PacketCodec
impl PacketCodec
Trait Implementations§
Source§impl Clone for PacketCodec
impl Clone for PacketCodec
Source§fn clone(&self) -> PacketCodec
fn clone(&self) -> PacketCodec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PacketCodec
impl Debug for PacketCodec
Source§impl Decoder for PacketCodec
impl Decoder for PacketCodec
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§impl Default for PacketCodec
impl Default for PacketCodec
Source§fn default() -> PacketCodec
fn default() -> PacketCodec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PacketCodec
impl RefUnwindSafe for PacketCodec
impl Send for PacketCodec
impl Sync for PacketCodec
impl Unpin for PacketCodec
impl UnsafeUnpin for PacketCodec
impl UnwindSafe for PacketCodec
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