Unmapped

Struct Unmapped 

Source
pub struct Unmapped<T>(/* private fields */);

Implementations§

Source§

impl<T> Unmapped<T>

Source

pub fn unwrap(self) -> Option<T>

Trait Implementations§

Source§

impl<T> Default for Unmapped<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<T> FromIterator<((), T)> for Unmapped<T>

Source§

fn from_iter<I: IntoIterator<Item = ((), T)>>(iter: I) -> Self

Creates a value from an iterator. Read more
Source§

impl<T> Map<(), T> for Unmapped<T>

Source§

type Iter<'a> = OptionClassIter<'a, T> where T: 'a

Source§

type IntoEntries = OptionClassIntoIter<T>

Source§

fn get(&self, _class: &()) -> Option<&T>

Source§

fn get_mut(&mut self, _class: &()) -> Option<&mut T>

Source§

fn set(&mut self, _class: (), value: T)

Source§

fn iter(&self) -> Self::Iter<'_>

Source§

fn into_entries(self) -> Self::IntoEntries

Source§

fn singleton(class: C, value: T) -> Self

Source§

fn contains(&self, class: &C) -> bool

Source§

fn get_mut_or_insert_with(&mut self, class: &C, f: impl FnOnce() -> T) -> &mut T
where C: Clone,

Source§

fn get_or_try_insert_with<E>( &mut self, class: &C, f: impl FnOnce() -> Result<T, E>, ) -> Result<&T, E>
where C: Clone,

Auto Trait Implementations§

§

impl<T> Freeze for Unmapped<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Unmapped<T>
where T: RefUnwindSafe,

§

impl<T> Send for Unmapped<T>
where T: Send,

§

impl<T> Sync for Unmapped<T>
where T: Sync,

§

impl<T> Unpin for Unmapped<T>
where T: Unpin,

§

impl<T> UnwindSafe for Unmapped<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Borrowed for T

Source§

type Owned = T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.