Enum typemap_rev::Entry

source ·
pub enum Entry<'a, K, S: ?Sized = DefaultStorage>where
    K: TypeMapKey,
{ Occupied(OccupiedEntry<'a, K, S>), Vacant(VacantEntry<'a, K, S>), }
Expand description

A view into a single entry in the TypeMap, which may either be vacant or occupied.

This heavily mirrors the official Entry API in the standard library, but not all of it is provided due to implementation restrictions. Please refer to its documentations.

Variants

Occupied(OccupiedEntry<'a, K, S>)

Vacant(VacantEntry<'a, K, S>)

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.