pub fn and_modify<F>(mut self, modify: F) -> Self
    where
        F: FnOnce(&mut V),
    {
        match self.vacant_key {
            None => {
                modify(self.inner.val_mut());
                Entry {
                    vacant_key: None,
                    ..self
                }
            }
            Some(key) => Entry {
                vacant_key: Some(key),
                ..self
            },
        }
    }
/// Provides in-place mutable access to an occupied entry before any potential inserts into
/// the map.
///
/// # Examples
///
/// ```
/// use bptree::BpTreeMap;
///
/// let mut map = BpTreeMap::new();
///
/// map.entry("Value").and_modify(|v| *v += 1).or_insert(0);
/// assert_eq!(map["Value"], 0);
///
/// map.entry("Value").and_modify(|v| *v += 1).or_insert(0);
/// assert_eq!(map["Value"], 1);
/// ```
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>(mut self, modify: F) -> Self
    where
        F: FnOnce(&mut V),
    {
        match self.vacant_key {
            None => {
                modify(self.inner.val_mut());
                Entry {
                    vacant_key: None,
                    ..self
                }
            }
            Some(key) => Entry {
                vacant_key: Some(key),
                ..self
            },
        }
    }
pub fn and_modify < F > ( mut self , modify : F ) -> Self where F : FnOnce ( & mut V ) , { match self . vacant_key { None => { modify ( self . inner . val_mut ( ) ) ; Entry { vacant_key : None , .. self } } Some ( key ) => Entry { vacant_key : Some ( key ) , .. self } , } }
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 .
mut self
modify
F
mut self
modify
F
examples
```
use bptree::BpTreeMap.

let mut map = BpTreeMap::new().




` ` ` use bptree :: BpTreeMap . let mut map = BpTreeMap :: new () .