pub struct Decor { /* private fields */ }
Expand description
Represents the whitespace and comments before (the “prefix”) or after (the “suffix”) a HCL value.
Implementations§
Source§impl Decor
impl Decor
Sourcepub fn new(prefix: impl Into<RawString>, suffix: impl Into<RawString>) -> Decor
pub fn new(prefix: impl Into<RawString>, suffix: impl Into<RawString>) -> Decor
Creates a new Decor
for a prefix and a suffix.
Sourcepub fn set_prefix(&mut self, prefix: impl Into<RawString>)
pub fn set_prefix(&mut self, prefix: impl Into<RawString>)
Sets the decor prefix.
Sourcepub fn set_suffix(&mut self, suffix: impl Into<RawString>)
pub fn set_suffix(&mut self, suffix: impl Into<RawString>)
Sets the decor suffix.
Sourcepub fn prefix(&self) -> Option<&RawString>
pub fn prefix(&self) -> Option<&RawString>
Returns a reference to the decor prefix, if one is present, None
otherwise.
Trait Implementations§
impl Eq for Decor
impl StructuralPartialEq for Decor
Auto Trait Implementations§
impl Freeze for Decor
impl RefUnwindSafe for Decor
impl Send for Decor
impl Sync for Decor
impl Unpin for Decor
impl UnwindSafe for Decor
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