Struct radix_trie::SubTrieMut
source · pub struct SubTrieMut<'a, K: 'a, V: 'a> { /* private fields */ }
Expand description
Mutable view of a sub-tree of a larger trie.
Implementations§
source§impl<'a, K, V> SubTrieMut<'a, K, V>where
K: TrieKey,
impl<'a, K, V> SubTrieMut<'a, K, V>where
K: TrieKey,
sourcepub fn get<Q>(&self, key: &Q) -> SubTrieResult<&V>
pub fn get<Q>(&self, key: &Q) -> SubTrieResult<&V>
Look up the value for the given key, which should be an extension of this subtrie’s key.
The key may be any borrowed form of the trie’s key type, but TrieKey on the borrowed form must match those for the key type
sourcepub fn insert(&mut self, key: K, value: V) -> SubTrieResult<V>
pub fn insert(&mut self, key: K, value: V) -> SubTrieResult<V>
Insert a value in this subtrie. The key should be an extension of this subtrie’s key.
sourcepub fn remove<Q>(&mut self, key: &Q) -> SubTrieResult<V>
pub fn remove<Q>(&mut self, key: &Q) -> SubTrieResult<V>
Remove a value from this subtrie. The key should be an extension of this subtrie’s key.
The key may be any borrowed form of the trie’s key type, but TrieKey on the borrowed form must match those for the key type
Trait Implementations§
source§impl<'a, K, V: 'a> TrieCommon<'a, K, V> for SubTrieMut<'a, K, V>where
K: TrieKey + 'a,
impl<'a, K, V: 'a> TrieCommon<'a, K, V> for SubTrieMut<'a, K, V>where
K: TrieKey + 'a,
source§impl<'a: 'b, 'b, K, V: 'a> TrieCommon<'b, K, V> for &'b SubTrieMut<'a, K, V>where
K: TrieKey + 'a,
impl<'a: 'b, 'b, K, V: 'a> TrieCommon<'b, K, V> for &'b SubTrieMut<'a, K, V>where
K: TrieKey + 'a,
Auto Trait Implementations§
impl<'a, K, V> Freeze for SubTrieMut<'a, K, V>
impl<'a, K, V> RefUnwindSafe for SubTrieMut<'a, K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K, V> Send for SubTrieMut<'a, K, V>
impl<'a, K, V> Sync for SubTrieMut<'a, K, V>
impl<'a, K, V> Unpin for SubTrieMut<'a, K, V>
impl<'a, K, V> !UnwindSafe for SubTrieMut<'a, K, V>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more