pub struct BincodeSerializer;Expand description
Serializer using standard bincode wire encoding and a bounded decode budget.
Trait Implementations§
Source§impl Clone for BincodeSerializer
impl Clone for BincodeSerializer
impl Copy for BincodeSerializer
Source§impl Debug for BincodeSerializer
impl Debug for BincodeSerializer
Source§impl Default for BincodeSerializer
impl Default for BincodeSerializer
Source§impl FrameMetadata for BincodeSerializer
impl FrameMetadata for BincodeSerializer
Source§type Frame = Envelope
type Frame = Envelope
Fully deserialized frame envelope type.
Prefer avoiding unnecessary allocations. Zero‑copy is only possible
when the caller supplies an owned, ref‑counted buffer (e.g.,
Bytes).
With the current &[u8] input, copying the payload is typically required.Source§type Error = DecodeError
type Error = DecodeError
Error produced when parsing the metadata.
impl MessageCompatibilitySerializer for BincodeSerializer
Source§impl Serializer for BincodeSerializer
impl Serializer for BincodeSerializer
Source§fn serialize<M>(
&self,
value: &M,
) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>where
M: EncodeWith<Self>,
fn serialize<M>(
&self,
value: &M,
) -> Result<Vec<u8>, Box<dyn Error + Send + Sync>>where
M: EncodeWith<Self>,
Serialize
value into a byte vector. Read moreSource§fn deserialize<M>(
&self,
bytes: &[u8],
) -> Result<(M, usize), Box<dyn Error + Send + Sync>>where
M: DecodeWith<Self>,
fn deserialize<M>(
&self,
bytes: &[u8],
) -> Result<(M, usize), Box<dyn Error + Send + Sync>>where
M: DecodeWith<Self>,
Deserialize a message from
bytes, returning the message and bytes consumed. Read moreSource§fn deserialize_with_context<M>(
&self,
bytes: &[u8],
context: &DeserializeContext<'_>,
) -> Result<(M, usize), Box<dyn Error + Send + Sync>>where
M: DecodeWith<Self>,
fn deserialize_with_context<M>(
&self,
bytes: &[u8],
context: &DeserializeContext<'_>,
) -> Result<(M, usize), Box<dyn Error + Send + Sync>>where
M: DecodeWith<Self>,
Deserialize a message from
bytes using parsed frame metadata context. Read moreSource§fn should_deserialize_after_parse(&self) -> bool
fn should_deserialize_after_parse(&self) -> bool
Decide whether
Serializer::deserialize_with_context should run after
a successful FrameMetadata::parse call on the inbound path. Read moreAuto Trait Implementations§
impl Forget for BincodeSerializer
impl Freeze for BincodeSerializer
impl Move for BincodeSerializer
impl RefUnwindSafe for BincodeSerializer
impl Send for BincodeSerializer
impl Sync for BincodeSerializer
impl Unpin for BincodeSerializer
impl UnsafeUnpin for BincodeSerializer
impl UnwindSafe for BincodeSerializer
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