Trait EncodeDecode

Source
pub trait EncodeDecode {
    type Value;
    type Error;

    // Required methods
    fn encode(value: &Self::Value) -> Result<Vec<u8>, Self::Error>;
    fn decode(buff: &[u8]) -> Result<Self::Value, Self::Error>;
}
Expand description

EncodeDecode trait must be implemented for FileStore types

Required Associated Types§

Required Methods§

Source

fn encode(value: &Self::Value) -> Result<Vec<u8>, Self::Error>

Source

fn decode(buff: &[u8]) -> Result<Self::Value, 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.

Implementors§

Source§

impl<V> EncodeDecode for V

Automagic EncodeDecode implementation for serde capable types