[−][src]Function serde_lexpr::to_writer
pub fn to_writer<T, W>(writer: W, value: &T) -> Result<()> where
T: Serialize,
W: Write,
Serialize an instance of type T
into an S-expression byte vector, using the
default printer options.
use serde_lexpr::to_writer; let mut output = Vec::new(); to_writer(&mut output, &("foo", 1)).unwrap(); assert_eq!(output, r#"#("foo" 1)"#.as_bytes());