pub fn from_slice<'a, T>(serialized: &'a [u8]) -> Result<T, Error>where
    T: Deserialize<'a>,
Expand description

Restores a previously Pot-serialized value from a slice.

let serialized = pot::to_vec(&"hello world").unwrap();
let deserialized = pot::from_slice::<String>(&serialized).unwrap();
assert_eq!(deserialized, "hello world");