Struct gitconfig::map::Map
[−]
[src]
pub struct Map<K, V> { /* fields omitted */ }
Represents a git config key/value type.
Methods
impl Map<String, Value>
[src]
fn new() -> Self
[src]
Makes a new empty Map.
fn get<Q: ?Sized>(&self, key: &Q) -> Option<&Value> where
String: Borrow<Q>,
Q: Ord + Eq + Hash,
[src]
String: Borrow<Q>,
Q: Ord + Eq + Hash,
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map's key type, but the ordering on the borrowed form must match the ordering on the key type.
fn insert(&mut self, k: String, v: Value) -> Option<Value>
[src]
Inserts a key-value pair into the map.
If the map did not have this key present, None
is returned.
If the map did have this key present, the value is updated, and the old
value is returned. The key is not updated, though; this matters for
types that can be ==
without being identical.
fn entry<S>(&mut self, key: S) -> Entry where
S: Into<String>,
[src]
S: Into<String>,
Gets the given key's corresponding entry in the map for in-place manipulation.
Trait Implementations
impl<K: PartialEq, V: PartialEq> PartialEq for Map<K, V>
[src]
fn eq(&self, __arg_0: &Map<K, V>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Map<K, V>) -> bool
[src]
This method tests for !=
.
impl<K: Clone, V: Clone> Clone for Map<K, V>
[src]
fn clone(&self) -> Map<K, V>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more