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.
source§impl<'a, W> Serializer<'a, W>where
W: Write + AsMut<Vec<u8>>,
impl<'a, W> Serializer<'a, W>where W: Write + AsMut<Vec<u8>>,
Auto Trait Implementations§
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