[−][src]Function dumplingh::ops::save_data
pub fn save_data<W: Write, S: Serialize>(
out: &mut W,
val: &S,
compact: bool,
what: &'static str
) -> Result<(), Error>
Write the specified data to the output stream, serialised as JSON.
Examples
let issues = []; let mut out = vec![]; assert_eq!(save_data(&mut out, &issues, false, "issues"), Ok(())); assert_eq!(out, b"[]");