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§
fn encode(value: &Self::Value) -> Result<Vec<u8>, Self::Error>
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.