[−][src]Struct trie_map::Trie
Methods
impl<K, V> Trie<K, V> where
K: Hash + Eq,
[src]
K: Hash + Eq,
pub fn new() -> Self
[src]
pub fn insert<Q: ?Sized, I: IntoIterator<Item = K>>(
&mut self,
prefix: I,
value: V
) where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
&mut self,
prefix: I,
value: V
) where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn insert_alt<Q: ?Sized, I: IntoIterator<Item = K>>(
&mut self,
prefix: I,
value: V
) where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
&mut self,
prefix: I,
value: V
) where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn is_empty(&self) -> bool
[src]
pub fn get_ref<Q: ?Sized, I: IntoIterator<Item = K>>(
&self,
prefix: I
) -> Option<&Trie<K, V>> where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
&self,
prefix: I
) -> Option<&Trie<K, V>> where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn get_mut<Q: ?Sized, I: IntoIterator<Item = K>>(
&mut self,
prefix: I
) -> Option<&mut Trie<K, V>> where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
&mut self,
prefix: I
) -> Option<&mut Trie<K, V>> where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn remove<Q: ?Sized, I: IntoIterator<Item = K>>(
&mut self,
prefix: I
) -> Option<V> where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
&mut self,
prefix: I
) -> Option<V> where
K: Borrow<Q>,
Q: Hash + Eq,
pub fn values_vec<'a, Q: ?Sized>(&'a self) -> Vec<&'a V> where
K: Borrow<Q>,
Q: Hash + Eq,
[src]
K: Borrow<Q>,
Q: Hash + Eq,
pub fn values<'a, B, Q: ?Sized>(&'a self) -> B where
B: FromIterator<&'a V>,
K: Borrow<Q>,
Q: Hash + Eq,
[src]
B: FromIterator<&'a V>,
K: Borrow<Q>,
Q: Hash + Eq,
pub fn values_prefix<'a, I, Q: ?Sized>(&'a self, prefix: I) -> Vec<&'a V> where
I: IntoIterator<Item = K>,
V: Debug,
K: Borrow<Q> + Debug,
Q: Hash + Eq,
[src]
I: IntoIterator<Item = K>,
V: Debug,
K: Borrow<Q> + Debug,
Q: Hash + Eq,
ⓘImportant traits for Iter<'a, K, V>pub fn iter<'a>(&'a self) -> Iter<'a, K, V>
[src]
ⓘImportant traits for Iter<'a, K, V>
impl<V> Trie<char, V>
[src]
pub fn insert_str<S: AsRef<str>>(&mut self, prefix: S, value: V)
[src]
pub fn get_ref_str<Q: ?Sized, S: AsRef<str>>(
&self,
prefix: S
) -> Option<&Trie<char, V>> where
Q: Hash + Eq,
[src]
&self,
prefix: S
) -> Option<&Trie<char, V>> where
Q: Hash + Eq,
pub fn get_mut_str<Q: ?Sized, S: AsRef<str>>(
&mut self,
prefix: S
) -> Option<&mut Trie<char, V>> where
Q: Hash + Eq,
[src]
&mut self,
prefix: S
) -> Option<&mut Trie<char, V>> where
Q: Hash + Eq,
pub fn remove_str<Q: ?Sized, S: AsRef<str>>(&mut self, prefix: S) -> Option<V> where
Q: Hash + Eq,
[src]
Q: Hash + Eq,
impl<V> Trie<u8, V>
[src]
pub fn insert_bytes<S>(&mut self, prefix: S, value: V) where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
pub fn get_ref_str<Q: ?Sized, S: AsRef<[u8]>>(&self, prefix: S) -> Option<&Self> where
Q: Hash + Eq,
[src]
Q: Hash + Eq,
pub fn get_mut_str<Q: ?Sized, S: AsRef<[u8]>>(
&mut self,
prefix: S
) -> Option<&mut Self> where
Q: Hash + Eq,
[src]
&mut self,
prefix: S
) -> Option<&mut Self> where
Q: Hash + Eq,
pub fn remove_str<Q: ?Sized, S: AsRef<[u8]>>(&mut self, prefix: S) -> Option<V> where
Q: Hash + Eq,
[src]
Q: Hash + Eq,
Trait Implementations
impl<K, V, P> Extend<(P, V)> for Trie<K, V> where
P: IntoIterator<Item = K>,
K: Eq + Hash,
[src]
P: IntoIterator<Item = K>,
K: Eq + Hash,
fn extend<I: IntoIterator<Item = (P, V)>>(&mut self, iter: I)
[src]
impl<K, V> Default for Trie<K, V> where
K: Eq + Hash,
[src]
K: Eq + Hash,
impl<'a, K, V> IntoIterator for &'a Trie<K, V> where
K: Eq + Hash,
[src]
K: Eq + Hash,
type IntoIter = Iter<'a, K, V>
Which kind of iterator are we turning this into?
type Item = IterItem<'a, K, V>
The type of the elements being iterated over.
fn into_iter(self) -> Self::IntoIter
[src]
impl<K, V, P> Index<P> for Trie<K, V> where
P: IntoIterator<Item = K>,
K: Eq + Hash,
[src]
P: IntoIterator<Item = K>,
K: Eq + Hash,
impl<'a, K, V, P> IndexMut<P> for Trie<K, V> where
P: IntoIterator<Item = K>,
K: Eq + Hash,
[src]
P: IntoIterator<Item = K>,
K: Eq + Hash,
impl<K, V, P> FromIterator<(P, V)> for Trie<K, V> where
P: IntoIterator<Item = K>,
K: Eq + Hash,
[src]
P: IntoIterator<Item = K>,
K: Eq + Hash,
fn from_iter<I: IntoIterator<Item = (P, V)>>(iter: I) -> Self
[src]
Auto Trait Implementations
impl<K, V> Send for Trie<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for Trie<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,