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> !UnwindSafe for SubTrieMut<'a, K, V>
impl<'a, K, V> Freeze for SubTrieMut<'a, K, V>where
&'a mut TrieNode<K, V>: Freeze,
impl<'a, K, V> RefUnwindSafe for SubTrieMut<'a, K, V>where
&'a mut TrieNode<K, V>: RefUnwindSafe,
impl<'a, K, V> Send for SubTrieMut<'a, K, V>where
&'a mut TrieNode<K, V>: Send,
impl<'a, K, V> Sync for SubTrieMut<'a, K, V>where
&'a mut TrieNode<K, V>: Sync,
impl<'a, K, V> Unpin for SubTrieMut<'a, K, V>where
&'a mut TrieNode<K, V>: Unpin,
impl<'a, K, V> UnsafeUnpin for SubTrieMut<'a, K, V>where
&'a mut TrieNode<K, V>: UnsafeUnpin,
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