pub fn to_writer<W, T>(writer: W, value: &T) -> Result<()>
Expand description
Serialize the given value as HCL into the IO stream.
If you want to serialize the data structures provided by this crate (e.g. Body
) consider
using hcl::format::to_writer
instead because it is more
efficient.
ยงErrors
Serialization fails if any operation on the writer fails or if the type cannot be represented as HCL.