pub struct ValueMut<'borrow, 'lookup, 'event> { /* private fields */ }
Expand description
An intermediate representation of a mutable value obtained from a File
.
Implementations§
source§impl<'borrow, 'event> ValueMut<'borrow, '_, 'event>
impl<'borrow, 'event> ValueMut<'borrow, '_, '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§
source§impl<'borrow, 'lookup, 'event> Ord for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Ord for ValueMut<'borrow, 'lookup, 'event>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'borrow, 'lookup, 'event> PartialEq for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> PartialEq for ValueMut<'borrow, 'lookup, 'event>
source§impl<'borrow, 'lookup, 'event> PartialOrd for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> PartialOrd for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Eq for ValueMut<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> StructuralPartialEq for ValueMut<'borrow, 'lookup, 'event>
Auto Trait Implementations§
impl<'borrow, 'lookup, 'event> Freeze for ValueMut<'borrow, 'lookup, 'event>
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>
impl<'borrow, 'lookup, 'event> !UnwindSafe for ValueMut<'borrow, 'lookup, 'event>
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