Struct set_trie::EntryBuilder[][src]

pub struct EntryBuilder<'a, K, T, IK> where
    IK: Iterator<Item = K> + 'a,
    K: Ord
{ /* fields omitted */ }

EntryBuilder for the entry method. Entries are lazily evaluated, thus the builder is used to provide the configuration, while the entry is already evaluated.

Implementations

impl<'a, K, T, IK> EntryBuilder<'a, K, T, IK> where
    IK: Iterator<Item = K> + 'a,
    K: Ord
[src]

pub fn and_extend(self, default: impl IntoIterator<Item = T>) -> Entry<'a, K, T>[src]

Extends the entry, creating it if needed

pub fn and_insert(self, default: T) -> Entry<'a, K, T>[src]

Inserts into the entry, creating it if needed

pub fn or_extend(self, default: impl IntoIterator<Item = T>) -> Entry<'a, K, T>[src]

Finds the entry, and if it does not exist, extends with the provided value.

pub fn or_insert(self, default: T) -> Entry<'a, K, T>[src]

Finds the entry, and if it does not exist, inserts the value.

pub fn or_create(self) -> Entry<'a, K, T>[src]

Finds the entry, and if it does not exist, creates it.

pub fn find(self) -> Option<ExistingEntry<'a, K, T>>[src]

Finds the entry, but does not create one. This method short circuits on the first missing key.

pub fn items(self) -> Option<&'a Vec<T>>[src]

Returns all associated items of an entry.

pub fn items_mut(self) -> Option<&'a mut Vec<T>>[src]

Mutably returns all associated items of an entry.

Auto Trait Implementations

impl<'a, K, T, IK> RefUnwindSafe for EntryBuilder<'a, K, T, IK> where
    IK: RefUnwindSafe,
    K: RefUnwindSafe,
    T: RefUnwindSafe
[src]

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

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

impl<'a, K, T, IK> Unpin for EntryBuilder<'a, K, T, IK> where
    IK: Unpin
[src]

impl<'a, K, T, IK> !UnwindSafe for EntryBuilder<'a, K, T, IK>[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.