Skip to main content

to_fmt_writer

Function to_fmt_writer 

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

Serialize a Rust value to YAML and write into a core::fmt::Write sink — the no_std-friendly counterpart to to_writer.

§Errors

  • Error::Serialize — the destination’s write_str returned fmt::Error, propagated through Error::Serialize.
  • All variants documented on to_string.