pub trait Codec:
Send
+ Sync
+ Copy {
// Required methods
fn decode_slice<'a, T>(&self, v: &'a [u8]) -> Result<T>
where T: Deserialize<'a>;
fn encode_to_vec<T>(&self, value: &T) -> Result<Vec<u8>>
where T: ?Sized + Serialize;
}Required Methods§
fn decode_slice<'a, T>(&self, v: &'a [u8]) -> Result<T>where
T: Deserialize<'a>,
fn encode_to_vec<T>(&self, value: &T) -> Result<Vec<u8>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.