hcl::format

Function to_writer

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

Format the given value as HCL into the IO stream.

If you need to serialize custom data structures implementing serde::Serialize use hcl::to_writer instead.

ยงErrors

Formatting fails if any operation on the writer fails.