Skip to main content

write_line

Function write_line 

Source
pub fn write_line<W, T>(w: &mut W, value: &T) -> Result<(), Error>
where W: Write, T: Serialize,
Expand description

Serialize value as compact JSON plus a trailing \n. Errors if the encoded form contains a newline (it cannot for valid compact JSON, but we assert the invariant the transport relies on).