Trait CollectionCodec

Source
pub trait CollectionCodec<T> {
    // Required methods
    fn encode(&self) -> BuckyResult<Vec<u8>>;
    fn decode(buf: &[u8]) -> BuckyResult<T>;
}

Required Methods§

Source

fn encode(&self) -> BuckyResult<Vec<u8>>

Source

fn decode(buf: &[u8]) -> BuckyResult<T>

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§

Source§

impl<T> CollectionCodec<T> for T
where T: for<'de> RawDecode<'de> + RawEncode,