pub fn to_string<T>(value: &T) -> Result<String>where
T: ?Sized + Serialize,
Expand description
Serialize the given value as an HCL string.
If you want to serialize the data structures provided by this crate (e.g.
Body
) consider using hcl::format::to_string
instead because it is more efficient.
Errors
Serialization fails if the type cannot be represented as HCL.