Function hcl::to_writer

source ·
pub fn to_writer<W, T>(writer: W, value: &T) -> Result<()>where
    W: Write,
    T: ?Sized + Serialize,
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.