Struct thread_local_object::OccupiedEntry
[−]
[src]
pub struct OccupiedEntry<'a, T: 'static>(_, _);
A view into a thread's slot in a ThreadLocal
which is occupied.
Methods
impl<'a, T: 'static> OccupiedEntry<'a, T>
[src]
fn get(&self) -> &T
Returns a reference to the value in the entry.
fn get_mut(&mut self) -> &mut T
Returns a mutable reference to the value in the entry.
fn into_mut(self) -> &'a mut T
Converts an OccupiedEntry
into a mutable reference to the value in the entry with a
lifetime bound of the slot itself.
fn insert(&mut self, value: T) -> T
Sets the value of the entry, and returns the entry's old value.
fn remove(self) -> T
Takes the value out of the entry, and returns it.