Struct typedmap::hashmap::TypedKeyValue[][src]

pub struct TypedKeyValue<Marker> { /* fields omitted */ }

Represents owned pair of key and value.

Implementations

impl<Marker> TypedKeyValue<Marker>[src]

pub fn downcast_key_ref<K: 'static + TypedMapKey<Marker>>(&self) -> Option<&K>[src]

Downcast key to reference of K. Returns None if not possible.

pub fn downcast_key<K: 'static + TypedMapKey<Marker>>(self) -> Result<K, Self>[src]

Downcast key to the owned value of type K. Returns Err(Self) if not possible.

pub fn downcast_value_ref<V: Any>(&self) -> Option<&V>[src]

Downcast key to reference of V. Returns None if not possible.

pub fn downcast_value<V: Any>(self) -> Result<V, Self>[src]

Downcast key to the owned value of type V. Returns Err(Self) if not possible.

pub fn downcast_pair_ref<K: 'static + TypedMapKey<Marker>>(
    &self
) -> Option<(&K, &K::Value)>
[src]

Downcast key to reference of K and value to reference of K::Value. Returns None if not possible.

pub fn downcast_pair<K: 'static + TypedMapKey<Marker>>(
    self
) -> Result<(K, K::Value), Self>
[src]

Downcast key to owned value of type K and value to owned value of type K::Value. Returns Err(Self) if not possible.

Trait Implementations

impl<M> Debug for TypedKeyValue<M>[src]

Auto Trait Implementations

impl<Marker> !RefUnwindSafe for TypedKeyValue<Marker>

impl<Marker> !Send for TypedKeyValue<Marker>

impl<Marker> !Sync for TypedKeyValue<Marker>

impl<Marker> !Unpin for TypedKeyValue<Marker>

impl<Marker> !UnwindSafe for TypedKeyValue<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.