Struct git_config::file::MutableMultiValue[][src]

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

An intermediate representation of a mutable multivar 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 values. This is computed each time this is called.

Errors

Returns an error if the lookup failed.

Returns the size of values the multivar has.

Returns if the multivar has any values. This might occur if the value was deleted but not set with a new value.

Sets the value at the given index.

Safety

This will panic if the index is out of range.

Sets the value at the given index.

Safety

This will panic if the index is out of range.

Sets the value at the given index.

Safety

This will panic if the index is out of range.

Sets all values to the provided values. Note that this follows zip logic: if the number of values in the input is less than the number of values currently existing, then only the first n values are modified. If more values are provided than there currently are, then the remaining values are ignored.

Sets all values in this multivar to the provided one by copying the input for all values.

Sets all values in this multivar to the provided one by copying the input bytes for all values.

Sets all values in this multivar to the provided one without owning the provided input. Note that this requires input to last longer than GitConfig. Consider using Self::set_owned_values_all or Self::set_str_all unless you have a strict performance or memory need for a more ergonomic interface.

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

Safety

This will panic if the index is out of range.

Removes all values. Does nothing when called multiple times in succession.

Trait Implementations

Formats the value using the given formatter. Read more

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

This method tests for !=.

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.