pub struct ValueMut<'borrow, 'lookup, 'event> { /* private fields */ }
Expand description
An intermediate representation of a mutable value obtained from a File
.
Implementations
sourceimpl<'borrow, 'lookup, 'event> ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> ValueMut<'borrow, 'lookup, 'event>
sourcepub fn get(&self) -> Result<Cow<'_, BStr>, Error>
pub fn get(&self) -> Result<Cow<'_, BStr>, Error>
Returns the actual value. This is computed each time this is called requiring an allocation for multi-line values.
sourcepub fn set_string(&mut self, input: impl AsRef<str>)
pub fn set_string(&mut self, input: impl AsRef<str>)
Update the value to the provided one. This modifies the value such that the Value event(s) are replaced with a single new event containing the new value.
sourcepub fn set<'a>(&mut self, input: impl Into<&'a BStr>)
pub fn set<'a>(&mut self, input: impl Into<&'a BStr>)
Update the value to the provided one. This modifies the value such that the Value event(s) are replaced with a single new event containing the new value.
sourcepub fn delete(&mut self)
pub fn delete(&mut self)
Removes the value. Does nothing when called multiple times in succession.
sourcepub fn into_section_mut(self) -> SectionMut<'borrow, 'event>
pub fn into_section_mut(self) -> SectionMut<'borrow, 'event>
Convert this value into its owning mutable section.
Trait Implementations
sourceimpl<'borrow, 'lookup, 'event> Ord for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Ord for ValueMut<'borrow, 'lookup, 'event>
sourceimpl<'borrow, 'lookup, 'event> PartialEq<ValueMut<'borrow, 'lookup, 'event>> for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> PartialEq<ValueMut<'borrow, 'lookup, 'event>> for ValueMut<'borrow, 'lookup, 'event>
sourceimpl<'borrow, 'lookup, 'event> PartialOrd<ValueMut<'borrow, 'lookup, 'event>> for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> PartialOrd<ValueMut<'borrow, 'lookup, 'event>> for ValueMut<'borrow, 'lookup, 'event>
sourcefn partial_cmp(
&self,
other: &ValueMut<'borrow, 'lookup, 'event>
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &ValueMut<'borrow, 'lookup, 'event>
) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'borrow, 'lookup, 'event> Eq for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> StructuralEq for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> StructuralPartialEq for ValueMut<'borrow, 'lookup, 'event>
Auto Trait Implementations
impl<'borrow, 'lookup, 'event> RefUnwindSafe for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Send for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Sync for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Unpin for ValueMut<'borrow, 'lookup, 'event> where
'event: 'borrow,
impl<'borrow, 'lookup, 'event> !UnwindSafe for ValueMut<'borrow, 'lookup, 'event>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more