pub struct PacketCodec;Expand description
Tokio codec for encoding and decoding packets
Trait Implementations§
Source§impl Decoder for PacketCodec
Decoder implementation
impl Decoder for PacketCodec
Decoder implementation
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
Source§impl Encoder<&Packet> for PacketCodec
Encoder implementation for borrowed packets
impl Encoder<&Packet> for PacketCodec
Encoder implementation for borrowed packets
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