BlockEncoded

Trait BlockEncoded 

Source
pub trait BlockEncoded<C>: Serialize + DeserializeOwned
where 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§

Source

fn encode(&self) -> Result<Vec<u8>, CodecError>

Source

fn decode(data: &[u8]) -> Result<Self, CodecError>

Source

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.

Implementors§