[][src]Struct small_ord_set::OccupiedEntry

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

A view into an occupied entry in a SmallOrdSet. It is part of the Entry enum.

Implementations

impl<'a, A> OccupiedEntry<'a, A> where
    A: Array
[src]

pub fn get_entry(&self) -> &A::Item[src]

Gets a reference to the the entry.

pub fn remove_entry(self) -> A::Item[src]

Take the ownership of the element from the set.

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

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

Gets a reference to the key in the entry.

pub fn get(&self) -> &V[src]

Gets a reference to the value in the entry.

pub fn get_mut(&mut self) -> &mut V[src]

Gets a mutable reference to the value in the entry.

If you need a reference to the OccupiedEntry which may outlive the destruction of the Entry value, see into_mut.

pub fn into_mut(self) -> &'a mut V[src]

Converts the OccupiedEntry into a mutable reference to the value in the entry with a lifetime bound to the map itself.

If you need multiple references to the OccupiedEntry, see get_mut.

Trait Implementations

impl<A> Debug for OccupiedEntry<'_, A> where
    A: Array,
    A::Item: Debug
[src]

Auto Trait Implementations

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

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

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

impl<'a, A> Unpin for OccupiedEntry<'a, A>[src]

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