Enum typemap::Entry [] [src]

pub enum Entry<'a, K, A: ?Sized + UnsafeAnyExt + 'a = UnsafeAny> {
    Occupied(OccupiedEntry<'a, K, A>),
    Vacant(VacantEntry<'a, K, A>),
}

A view onto an entry in a TypeMap.

Variants

A view onto an occupied entry in a TypeMap.

A view onto an unoccupied entry in a TypeMap.

Methods

impl<'a, K: Key, A: ?Sized + UnsafeAnyExt + 'a = UnsafeAny> Entry<'a, K, A>
[src]

Ensures a value is in the entry by inserting the default if empty, and returns a mutable reference to the value in the entry.

Ensures a value is in the entry by inserting the result of the default function if empty, and returns a mutable reference to the value in the entry.