Enum set_trie::Entry [−][src]
A view into a node of a SetTrie
, either created or already existing.
Variants
Created(CreatedEntry<'a, K, T>)
Indicates that the entry was created.
Existing(ExistingEntry<'a, K, T>)
Indicates that the entry already existed.
Implementations
impl<'a, K, T> Entry<'a, K, T> where
K: Ord,
[src]
K: Ord,
#[must_use]pub fn items(&self) -> &Vec<T>
[src]
Returns all associated items of an entry.
#[must_use]pub fn items_mut(&mut self) -> &mut Vec<T>
[src]
Mutably returns all associated items of an entry.
#[must_use]pub fn entry<IK: IntoIterator<Item = K>>(
self,
keys: IK
) -> EntryBuilder<'a, K, T, IK::IntoIter>
[src]
self,
keys: IK
) -> EntryBuilder<'a, K, T, IK::IntoIter>
Provides a view into a child of the entry. If you are sequentially inserting longer keys, reusing the entry is more efficient than starting from the root.
// Equivalent to first inserting 0..1, then 0..2 etc. let mut trie = set_trie::SetTrie::new(); let mut current = trie.entry(0..1).or_insert(0); for i in 1..5000 { current = { current.entry(i-1..i).or_insert(i) } }
Auto Trait Implementations
impl<'a, K, T> RefUnwindSafe for Entry<'a, K, T> where
K: RefUnwindSafe,
T: RefUnwindSafe,
[src]
K: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, K, T> Send for Entry<'a, K, T> where
K: Send,
T: Send,
[src]
K: Send,
T: Send,
impl<'a, K, T> Sync for Entry<'a, K, T> where
K: Sync,
T: Sync,
[src]
K: Sync,
T: Sync,
impl<'a, K, T> Unpin for Entry<'a, K, T>
[src]
impl<'a, K, T> !UnwindSafe for Entry<'a, K, T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,