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.
Source§impl<'a, W> Serializer<'a, W>
impl<'a, W> Serializer<'a, W>
Auto Trait Implementations§
impl<'a, W> Freeze for Serializer<'a, W>where
W: Freeze,
impl<'a, W> RefUnwindSafe for Serializer<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for Serializer<'a, W>where
W: Send,
impl<'a, W> Sync for Serializer<'a, W>where
W: Sync,
impl<'a, W> Unpin for Serializer<'a, W>where
W: Unpin,
impl<'a, W> UnwindSafe for Serializer<'a, W>where
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more