hcl

Function to_vec

Source
pub fn to_vec<T>(value: &T) -> Result<Vec<u8>>
where T: ?Sized + Serialize,
Expand description

Serialize the given value as an HCL byte vector.

If you want to serialize the data structures provided by this crate (e.g. Body) consider using hcl::format::to_vec instead because it is more efficient.

ยงErrors

Serialization fails if the type cannot be represented as HCL.