pub trait Encoding<T> {
// Required methods
fn encode(t: &T) -> Result<Vec<u8>>;
fn decode(slice: &[u8]) -> Result<T>;
}
Expand description
The Encoding trait
By implementing this trait, a custom data format can be used to store information in Sled
Required Methods§
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.