pub fn entry<'a>(&'a mut self, mut key: K) -> Entry<'a, K, V> {
        // same basic logic of `swap` and `pop`, blended together
        let mut stack = stack::PartialSearchStack::new(self);
        loop {
            let result = stack.with(move |pusher, node| {
                match Node::search(node, &key) {
                    Found(handle) => {
                        // Perfect match
                        return Finished(Occupied(OccupiedEntry {
                            stack: pusher.seal(handle)
                        }));
                    },
                    GoDown(handle) => {
                        match pusher.push(handle) {
                            stack::Done(new_stack) => {
                                // Not in the tree, but we've found where it goes
                                return Finished(Vacant(VacantEntry {
                                    stack: new_stack,
                                    key: key,
                                }));
                            }
                            stack::Grew(new_stack) => {
                                // We've found the subtree this key must go in
                                return Continue((new_stack, key));
                            }
                        };
                    }
                }
            });
            match result {
                Finished(finished) => return finished,
                Continue((new_stack, renewed_key)) => {
                    stack = new_stack;
                    key = renewed_key;
                }
            }
        }
    }
/// Gets the given key's corresponding entry in the map for in-place manipulation.
Gets the given key's corresponding entry in the map for in-place manipulation.
Gets the given key ' s corresponding entry in the map for in - place manipulation .
pub fn entry<'a>(&'a mut self, mut key: K) -> Entry<'a, K, V> {
        // same basic logic of `swap` and `pop`, blended together
        let mut stack = stack::PartialSearchStack::new(self);
        loop {
            let result = stack.with(move |pusher, node| {
                match Node::search(node, &key) {
                    Found(handle) => {
                        // Perfect match
                        return Finished(Occupied(OccupiedEntry {
                            stack: pusher.seal(handle)
                        }));
                    },
                    GoDown(handle) => {
                        match pusher.push(handle) {
                            stack::Done(new_stack) => {
                                // Not in the tree, but we've found where it goes
                                return Finished(Vacant(VacantEntry {
                                    stack: new_stack,
                                    key: key,
                                }));
                            }
                            stack::Grew(new_stack) => {
                                // We've found the subtree this key must go in
                                return Continue((new_stack, key));
                            }
                        };
                    }
                }
            });
            match result {
                Finished(finished) => return finished,
                Continue((new_stack, renewed_key)) => {
                    stack = new_stack;
                    key = renewed_key;
                }
            }
        }
    }
pub fn entry < ' a > ( & ' a mut self , mut key : K ) -> Entry < ' a , K , V > { // same basic logic of `swap` and `pop`, blended together let mut stack = stack :: PartialSearchStack :: new ( self ) ; loop { let result = stack . with ( move | pusher , node | { match Node :: search ( node , & key ) { Found ( handle ) => { // Perfect match return Finished ( Occupied ( OccupiedEntry { stack : pusher . seal ( handle ) } ) ) ; } , GoDown ( handle ) => { match pusher . push ( handle ) { stack :: Done ( new_stack ) => { // Not in the tree, but we've found where it goes return Finished ( Vacant ( VacantEntry { stack : new_stack , key : key , } ) ) ; } stack :: Grew ( new_stack ) => { // We've found the subtree this key must go in return Continue ( ( new_stack , key ) ) ; } } ; } } } ) ; match result { Finished ( finished ) => return finished , Continue ( ( new_stack , renewed_key ) ) => { stack = new_stack ; key = renewed_key ; } } } }
Gets the given key's corresponding entry in the map for in-place manipulation.
Gets the given key ' s corresponding entry in the map for in - place manipulation .
&'a mut self
key
K