Struct type_map::OccupiedEntry [−][src]
A view into an occupied entry in a TypeMap
.
Implementations
impl<'a, T: 'static> OccupiedEntry<'a, T>
[src]
pub fn get(&self) -> &T
[src]
Gets a reference to the value in the entry.
pub fn get_mut(&mut self) -> &mut T
[src]
Gets a mutable reference to the value in the entry.
pub fn into_mut(self) -> &'a mut T
[src]
Converts the OccupiedEntry
into a mutable reference to the value in the entry
with a lifetime bound to the map 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.
Trait Implementations
impl<'a, T: Debug> Debug for OccupiedEntry<'a, T>
[src]
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for OccupiedEntry<'a, T>
[src]
impl<'a, T> !Send for OccupiedEntry<'a, T>
[src]
impl<'a, T> !Sync for OccupiedEntry<'a, T>
[src]
impl<'a, T> Unpin for OccupiedEntry<'a, T>
[src]
impl<'a, T> !UnwindSafe for OccupiedEntry<'a, T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,