Function bonsaidb::core::transmog_pot::pot::to_vec
pub fn to_vec<T>(value: &T) -> Result<Vec<u8, Global>, Error>where
T: Serialize,Expand description
Serialize value using Pot into a Vec<u8>.
let serialized = pot::to_vec(&"hello world").unwrap();
let deserialized = pot::from_slice::<String>(&serialized).unwrap();
assert_eq!(deserialized, "hello world");