pub struct BincodeCodec;Expand description
Bincode codec for efficient binary serialization.
This is the default codec used by quic-reverse. It provides compact binary encoding with good performance.
Implementations§
Source§impl BincodeCodec
impl BincodeCodec
Trait Implementations§
Source§impl Clone for BincodeCodec
impl Clone for BincodeCodec
Source§fn clone(&self) -> BincodeCodec
fn clone(&self) -> BincodeCodec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Codec for BincodeCodec
impl Codec for BincodeCodec
Source§fn encode<T: Serialize>(&self, value: &T) -> Result<Vec<u8>, CodecError>
fn encode<T: Serialize>(&self, value: &T) -> Result<Vec<u8>, CodecError>
Encodes a value to bytes. Read more
Source§fn decode<T: DeserializeOwned>(&self, data: &[u8]) -> Result<T, CodecError>
fn decode<T: DeserializeOwned>(&self, data: &[u8]) -> Result<T, CodecError>
Decodes bytes to a value. Read more
Source§fn encode_message(
&self,
message: &ProtocolMessage,
) -> Result<Vec<u8>, CodecError>
fn encode_message( &self, message: &ProtocolMessage, ) -> Result<Vec<u8>, CodecError>
Encodes a protocol message. Read more
Source§fn decode_message(&self, data: &[u8]) -> Result<ProtocolMessage, CodecError>
fn decode_message(&self, data: &[u8]) -> Result<ProtocolMessage, CodecError>
Decodes a protocol message. Read more
Source§impl Debug for BincodeCodec
impl Debug for BincodeCodec
Source§impl Default for BincodeCodec
impl Default for BincodeCodec
Source§fn default() -> BincodeCodec
fn default() -> BincodeCodec
Returns the “default value” for a type. Read more
impl Copy for BincodeCodec
Auto Trait Implementations§
impl Freeze for BincodeCodec
impl RefUnwindSafe for BincodeCodec
impl Send for BincodeCodec
impl Sync for BincodeCodec
impl Unpin for BincodeCodec
impl UnwindSafe for BincodeCodec
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