pub trait StorageFormat {
    type SerializeError;
    type DeserializeError;

    // Required methods
    fn to_vec<T>(value: &T) -> Result<Vec<u8, Global>, Self::SerializeError>
       where T: Serialize + ?Sized;
    fn from_slice<T>(v: &[u8]) -> Result<T, Self::DeserializeError>
       where T: DeserializeOwned;
}

Required Associated Types§

Required Methods§

source

fn to_vec<T>(value: &T) -> Result<Vec<u8, Global>, Self::SerializeError>where T: Serialize + ?Sized,

source

fn from_slice<T>(v: &[u8]) -> Result<T, Self::DeserializeError>where T: DeserializeOwned,

Implementors§