Skip to main content

to_writer

Function to_writer 

Source
pub fn to_writer<W, T>(writer: W, value: &T) -> Result<()>
where W: Write, T: ?Sized + Serialize,
Expand description

Serialize a Rust value to YAML and write to a std::io::Write sink.

Internally serialises to a String then writes the bytes to writer in a single call.

§Errors

  • Error::Io — the underlying writer returned an I/O error.
  • All variants documented on to_string.