Struct hcl_edit::expr::ObjectKeyMut
source · pub struct ObjectKeyMut<'k> { /* private fields */ }Expand description
Allows mutable access to the surrounding Decor of an ObjectKey but not to
its value.
This type wraps the object key in the iterator returned by Object::iter_mut.
Implementations§
Methods from Deref<Target = ObjectKey>§
sourcepub fn as_ident(&self) -> Option<&Ident>
pub fn as_ident(&self) -> Option<&Ident>
If the object key is an identifier, returns a reference to it, otherwise None.
sourcepub fn as_expr(&self) -> Option<&Expression>
pub fn as_expr(&self) -> Option<&Expression>
If the object key is an expression, returns a reference to it, otherwise None.
Trait Implementations§
source§impl<'k> Debug for ObjectKeyMut<'k>
impl<'k> Debug for ObjectKeyMut<'k>
source§impl<'k> Decorate for ObjectKeyMut<'k>
impl<'k> Decorate for ObjectKeyMut<'k>
source§impl<'k> Deref for ObjectKeyMut<'k>
impl<'k> Deref for ObjectKeyMut<'k>
source§impl<'k> PartialEq<ObjectKeyMut<'k>> for ObjectKeyMut<'k>
impl<'k> PartialEq<ObjectKeyMut<'k>> for ObjectKeyMut<'k>
source§fn eq(&self, other: &ObjectKeyMut<'k>) -> bool
fn eq(&self, other: &ObjectKeyMut<'k>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<'k> Span for ObjectKeyMut<'k>
impl<'k> Span for ObjectKeyMut<'k>
impl<'k> Eq for ObjectKeyMut<'k>
impl<'k> StructuralEq for ObjectKeyMut<'k>
impl<'k> StructuralPartialEq for ObjectKeyMut<'k>
Auto Trait Implementations§
impl<'k> RefUnwindSafe for ObjectKeyMut<'k>
impl<'k> Send for ObjectKeyMut<'k>
impl<'k> Sync for ObjectKeyMut<'k>
impl<'k> Unpin for ObjectKeyMut<'k>
impl<'k> !UnwindSafe for ObjectKeyMut<'k>
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