Struct git_config::file::MutableValue[][src]

pub struct MutableValue<'borrow, 'lookup, 'event> { /* fields omitted */ }
Expand description

An intermediate representation of a mutable value obtained from GitConfig.

This holds a mutable reference to the underlying data structure of GitConfig, and thus guarantees through Rust’s borrower checker that multiple mutable references to GitConfig cannot be owned at the same time.

Implementations

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.

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.

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.

Removes the value. Does nothing when called multiple times in succession.

Trait Implementations

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.