Encode

Trait Encode 

Source
pub trait Encode<D: EncodingSize> {
    type EncodedSize: ArraySize;

    // Required methods
    fn encode(&self) -> Array<u8, Self::EncodedSize>;
    fn decode(enc: &Array<u8, Self::EncodedSize>) -> Self;
}

Required Associated Types§

Required Methods§

Source

fn encode(&self) -> Array<u8, Self::EncodedSize>

Source

fn decode(enc: &Array<u8, Self::EncodedSize>) -> Self

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§