Struct hcl_edit::structure::AttributeMut
source · pub struct AttributeMut<'a> { /* private fields */ }
Expand description
Allows mutable access to the value and surrounding Decor
of an Attribute
but not to its key.
This type wraps the attribute returned by
Body::get_attribute_mut
and in the iterator
returned by Body::attributes_mut
.
Implementations§
source§impl<'a> AttributeMut<'a>
impl<'a> AttributeMut<'a>
sourcepub fn key_decor_mut(&mut self) -> &mut Decor
pub fn key_decor_mut(&mut self) -> &mut Decor
Returns a mutable reference to the wrapped Attribute
’s key’s decor.
sourcepub fn value_mut(&mut self) -> &mut Expression
pub fn value_mut(&mut self) -> &mut Expression
Returns a mutable reference to the wrapped Attribute
’s value.
Methods from Deref<Target = Attribute>§
Trait Implementations§
source§impl<'a> Decorate for AttributeMut<'a>
impl<'a> Decorate for AttributeMut<'a>
source§impl<'a> Deref for AttributeMut<'a>
impl<'a> Deref for AttributeMut<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for AttributeMut<'a>
impl<'a> Send for AttributeMut<'a>
impl<'a> Sync for AttributeMut<'a>
impl<'a> Unpin for AttributeMut<'a>
impl<'a> !UnwindSafe for AttributeMut<'a>
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