Function bonsaidb::core::transmog_pot::pot::to_writer
pub fn to_writer<T, W>(value: &T, writer: W) -> Result<(), Error>where
T: Serialize,
W: WriteBytesExt,
Expand description
Serialize value
using Pot into writer
.
let mut serialized = Vec::new();
pot::to_writer(&"hello world", &mut serialized).unwrap();
let deserialized = pot::from_reader::<String, _>(&serialized[..]).unwrap();
assert_eq!(deserialized, "hello world");