pub fn and_modify<F: FnOnce(&mut V)>(self, f: F) -> Entry<'a, K, V, N> {
        match self {
            Entry::Occupied(mut entry) => {
                f(entry.get_mut());
                Entry::Occupied(entry)
            }
            Entry::Vacant(entry) => Entry::Vacant(entry),
        }
    }
/// Provides in-place mutable access to an occupied entry before any
/// potential inserts into the map.
///
/// # Examples
///
/// ```
/// use scapegoat::SgMap;
///
/// let mut map = SgMap::<&str, usize, 10>::new();
///
/// map.entry("poneyland")
///    .and_modify(|e| { *e += 1 })
///    .or_insert(42);
/// assert_eq!(map["poneyland"], 42);
///
/// map.entry("poneyland")
///    .and_modify(|e| { *e += 1 })
///    .or_insert(42);
/// assert_eq!(map["poneyland"], 43);
/// ```
Provides in-place mutable access to an occupied entry before any
potential inserts into the map.
Provides in - place mutable access to an occupied entry before any potential inserts into the map .
pub fn and_modify<F: FnOnce(&mut V)>(self, f: F) -> Entry<'a, K, V, N> {
        match self {
            Entry::Occupied(mut entry) => {
                f(entry.get_mut());
                Entry::Occupied(entry)
            }
            Entry::Vacant(entry) => Entry::Vacant(entry),
        }
    }
pub fn and_modify < F : FnOnce ( & mut V ) > ( self , f : F ) -> Entry < ' a , K , V , N > { match self { Entry :: Occupied ( mut entry ) => { f ( entry . get_mut ( ) ) ; Entry :: Occupied ( entry ) } Entry :: Vacant ( entry ) => Entry :: Vacant ( entry ) , } }
Provides in-place mutable access to an occupied entry before any
potential inserts into the map.
Provides in - place mutable access to an occupied entry before any potential inserts into the map .
self
f
F
self
f
F
examples
```
use scapegoat::SgMap.






` ` ` use scapegoat :: SgMap .