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