Struct git_config::file::MutableValue
source · [−]pub struct MutableValue<'borrow, 'lookup, 'event> { /* private fields */ }
Expand description
Implementations
sourceimpl<'borrow, 'lookup, 'event> MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> MutableValue<'borrow, 'lookup, 'event>
sourcepub fn get(&self) -> Result<Cow<'_, [u8]>, Error>
pub fn get(&self) -> Result<Cow<'_, [u8]>, Error>
Returns the actual value. This is computed each time this is called, so it’s best to reuse this value or own it if an allocation is acceptable.
Errors
Returns an error if the lookup failed.
sourcepub fn set_string(&mut self, input: String)
pub fn set_string(&mut self, input: String)
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.
Trait Implementations
sourceimpl<'borrow, 'lookup, 'event> Debug for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Debug for MutableValue<'borrow, 'lookup, 'event>
sourceimpl<'borrow, 'lookup, 'event> Hash for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Hash for MutableValue<'borrow, 'lookup, 'event>
sourceimpl<'borrow, 'lookup, 'event> Ord for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Ord for MutableValue<'borrow, 'lookup, 'event>
sourceimpl<'borrow, 'lookup, 'event> PartialEq<MutableValue<'borrow, 'lookup, 'event>> for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> PartialEq<MutableValue<'borrow, 'lookup, 'event>> for MutableValue<'borrow, 'lookup, 'event>
sourcefn eq(&self, other: &MutableValue<'borrow, 'lookup, 'event>) -> bool
fn eq(&self, other: &MutableValue<'borrow, 'lookup, 'event>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MutableValue<'borrow, 'lookup, 'event>) -> bool
fn ne(&self, other: &MutableValue<'borrow, 'lookup, 'event>) -> bool
This method tests for !=
.
sourceimpl<'borrow, 'lookup, 'event> PartialOrd<MutableValue<'borrow, 'lookup, 'event>> for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> PartialOrd<MutableValue<'borrow, 'lookup, 'event>> for MutableValue<'borrow, 'lookup, 'event>
sourcefn partial_cmp(
&self,
other: &MutableValue<'borrow, 'lookup, 'event>
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &MutableValue<'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 MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> StructuralEq for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> StructuralPartialEq for MutableValue<'borrow, 'lookup, 'event>
Auto Trait Implementations
impl<'borrow, 'lookup, 'event> RefUnwindSafe for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Send for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Sync for MutableValue<'borrow, 'lookup, 'event>
impl<'borrow, 'lookup, 'event> Unpin for MutableValue<'borrow, 'lookup, 'event> where
'event: 'borrow,
impl<'borrow, 'lookup, 'event> !UnwindSafe for MutableValue<'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