pub trait MultiCodec: Sized {
// Required methods
fn to_codec_and_bytes(&self) -> (u64, Cow<'_, [u8]>);
fn from_codec_and_bytes(codec: u64, bytes: &[u8]) -> Result<Self, Error>;
}Required Methods§
fn to_codec_and_bytes(&self) -> (u64, Cow<'_, [u8]>)
fn from_codec_and_bytes(codec: u64, bytes: &[u8]) -> Result<Self, Error>
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.