Struct hcl::ser::Serializer
source · pub struct Serializer<'a, W> { /* private fields */ }
Expand description
A structure for serializing Rust values into HCL.
Implementations§
source§impl<'a, W> Serializer<'a, W>where
W: Write,
impl<'a, W> Serializer<'a, W>where
W: Write,
sourcepub fn new(writer: W) -> Serializer<'a, W>
pub fn new(writer: W) -> Serializer<'a, W>
Creates a new Serializer
which serializes to the provides writer using the default
formatter.
sourcepub fn with_formatter(formatter: Formatter<'a, W>) -> Serializer<'a, W>
pub fn with_formatter(formatter: Formatter<'a, W>) -> Serializer<'a, W>
Creates a new Serializer
which uses the provides formatter to format the serialized HCL.
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Consumes self
and returns the wrapped writer.