pub trait StorageFormat {
type SerializeError;
type DeserializeError;
// Required methods
fn to_vec<T>(value: &T) -> Result<Vec<u8>, Self::SerializeError>
where T: Serialize + ?Sized;
fn from_slice<T>(v: &[u8]) -> Result<T, Self::DeserializeError>
where T: DeserializeOwned;
}Required Associated Types§
Required Methods§
fn to_vec<T>(value: &T) -> Result<Vec<u8>, Self::SerializeError>
fn from_slice<T>(v: &[u8]) -> Result<T, Self::DeserializeError>where
T: DeserializeOwned,
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.