Enum set_trie::Entry[][src]

pub enum Entry<'a, K, T> where
    K: Ord
{ Created(CreatedEntry<'a, K, T>), Existing(ExistingEntry<'a, K, T>), }

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]

#[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]

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]

impl<'a, K, T> Send for Entry<'a, K, T> where
    K: Send,
    T: Send
[src]

impl<'a, K, T> Sync for Entry<'a, K, T> where
    K: Sync,
    T: Sync
[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.