Enum typedmap::entry::Entry[][src]

pub enum Entry<'a, K, Marker> where
    K: 'static + TypedMapKey<Marker>, 
{ Occupied(OccupiedEntry<'a, K, Marker>), Vacant(VacantEntry<'a, K, Marker>), }

Variants

Occupied(OccupiedEntry<'a, K, Marker>)
Vacant(VacantEntry<'a, K, Marker>)

Implementations

impl<'a, Marker, K: 'static + TypedMapKey<Marker>> Entry<'a, K, Marker>[src]

pub fn or_insert(self, default: K::Value) -> &'a mut K::Value[src]

pub fn or_insert_with<F: FnOnce() -> K::Value>(
    self,
    default: F
) -> &'a mut K::Value
[src]

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

pub fn and_modify<F>(self, f: F) -> Self where
    F: FnOnce(&mut K::Value), 
[src]

impl<'a, Marker, K: 'static + TypedMapKey<Marker>> Entry<'a, K, Marker> where
    K::Value: Default
[src]

pub fn or_default(self) -> &'a mut K::Value[src]

Auto Trait Implementations

impl<'a, K, Marker> !RefUnwindSafe for Entry<'a, K, Marker>

impl<'a, K, Marker> !Send for Entry<'a, K, Marker>

impl<'a, K, Marker> !Sync for Entry<'a, K, Marker>

impl<'a, K, Marker> !Unpin for Entry<'a, K, Marker>

impl<'a, K, Marker> !UnwindSafe for Entry<'a, K, Marker>

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.