pub trait BlockEncoded<C>: Serialize + DeserializeOwnedwhere
C: Codec<Self>,{
// Provided methods
fn encode(&self) -> Result<Vec<u8>, CodecError> { ... }
fn decode(data: &[u8]) -> Result<Self, CodecError> { ... }
fn codec(&self) -> u64 { ... }
}Provided Methods§
fn encode(&self) -> Result<Vec<u8>, CodecError>
fn decode(data: &[u8]) -> Result<Self, CodecError>
fn codec(&self) -> u64
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.