[][src]Struct small_ord_set::VacantEntry

pub struct VacantEntry<'a, A: Array, K> { /* fields omitted */ }

A view into a vacant entry in a HashMap. It is part of the Entry enum.

Implementations

impl<'a, A: Array, K> VacantEntry<'a, A, K>[src]

pub fn key(&self) -> &K[src]

Gets a reference to the key that would be used when inserting a value through the VacantEntry.

pub fn into_key(self) -> K[src]

Take ownership of the key.

pub fn insert_with<F>(self, f: F) -> &'a mut A::Item where
    F: FnOnce(K) -> A::Item
[src]

Insert an element using the given constructor.

The ordering of the computed element must match that of the key.

impl<'a, A, K, V> VacantEntry<'a, A, K> where
    A: Array<Item = KeyValuePair<K, V>>,
    K: Ord + 'a,
    V: 'a, 
[src]

pub fn insert(self, value: V) -> &'a mut V[src]

Sets the value of the entry with the VacantEntry's key, and returns a mutable reference to it.

Trait Implementations

impl<A, K> Debug for VacantEntry<'_, A, K> where
    A: Array,
    K: Debug
[src]

Auto Trait Implementations

impl<'a, A, K> RefUnwindSafe for VacantEntry<'a, A, K> where
    A: RefUnwindSafe,
    K: RefUnwindSafe,
    <A as Array>::Item: RefUnwindSafe
[src]

impl<'a, A, K> Send for VacantEntry<'a, A, K> where
    K: Send,
    <A as Array>::Item: Send
[src]

impl<'a, A, K> Sync for VacantEntry<'a, A, K> where
    A: Sync,
    K: Sync
[src]

impl<'a, A, K> Unpin for VacantEntry<'a, A, K> where
    K: Unpin
[src]

impl<'a, A, K> !UnwindSafe for VacantEntry<'a, A, K>[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.