pub fn remove_entry<Q: ?Sized>(&mut self, key: &Q) -> Option<(K, V)>
    where
        Q: Ord,
        K: Borrow<Q>,
    {
        let self_ptr: *mut _ = self;

        let root_node = self.root.as_mut()?.borrow_mut();
        match root_node.search_tree(key) {
            search::SearchResult::Vacant(_) => None,
            search::SearchResult::Occupied(entry) => node::remove_with_root(entry, self_ptr),
        }
    }
/// Removes and returns the key-value pair from the map according to the given key.
///
/// The key can be any borrowing form of the map's key type, but the ordering on the borrowed
/// form *must* match the ordering on the key type.
///
/// # Examples
///
/// ```
/// use bptree::BpTreeMap;
///
/// let mut map = BpTreeMap::from([(1, "One"), (2, "Two")]);
/// assert_eq!(map.remove_entry(&2), Some((2, "Two")));
/// assert_eq!(map.remove_entry(&2), None);
/// assert_eq!(map.len(), 1);
/// ```
Removes and returns the key-value pair from the map according to the given key.
The key can be any borrowing form of the map's key type, but the ordering on the borrowed
form *must* match the ordering on the key type.
Removes and returns the key - value pair from the map according to the given key . The key can be any borrowing form of the map ' s key type but the ordering on the borrowed form * must * match the ordering on the key type .
pub fn remove_entry<Q: ?Sized>(&mut self, key: &Q) -> Option<(K, V)>
    where
        Q: Ord,
        K: Borrow<Q>,
    {
        let self_ptr: *mut _ = self;
        let root_node = self.root.as_mut()?.borrow_mut();
        match root_node.search_tree(key) {
            search::SearchResult::Vacant(_) => None,
            search::SearchResult::Occupied(entry) => node::remove_with_root(entry, self_ptr),
        }
    }
pub fn remove_entry < Q : ? Sized > ( & mut self , key : & Q ) -> Option < ( K , V ) > where Q : Ord , K : Borrow < Q > , { let self_ptr : * mut _ = self ; let root_node = self . root . as_mut ( ) ? . borrow_mut ( ) ; match root_node . search_tree ( key ) { search :: SearchResult :: Vacant ( _ ) => None , search :: SearchResult :: Occupied ( entry ) => node :: remove_with_root ( entry , self_ptr ) , } }
Removes and returns the key-value pair from the map according to the given key.
Removes and returns the key - value pair from the map according to the given key .
&mut self
key
&Q
&mut self
key
&Q
examples
```
use bptree::BpTreeMap.


` ` ` use bptree :: BpTreeMap .