[][src]Struct resources::OccupiedEntry

pub struct OccupiedEntry<'a, T: Resource> { /* fields omitted */ }

A view into an occupied entry in a Resources container. It is part of the Entry enum.

Implementations

impl<'a, T: Resource> OccupiedEntry<'a, T>[src]

pub fn get(&self) -> Ref<T>[src]

Gets a reference to the value in the entry.

pub fn get_mut(&mut self) -> RefMut<T>[src]

Gets a mutable reference to the value in the entry.

pub fn into_mut(self) -> RefMut<'a, T>[src]

Converts the OccupiedEntry into a mutable reference to the value in the entry with a lifetime bound to the Resources struct itself.

pub fn insert(&mut self, value: T) -> T[src]

Sets the value of the entry, and returns the entry's old value.

pub fn remove(self) -> T[src]

Takes the value out of the entry, and returns it.

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for OccupiedEntry<'a, T>

impl<'a, T> Send for OccupiedEntry<'a, T>

impl<'a, T> Sync for OccupiedEntry<'a, T>

impl<'a, T> Unpin for OccupiedEntry<'a, T> where
    T: Unpin

impl<'a, T> !UnwindSafe for OccupiedEntry<'a, T>

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> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[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.