[−][src]Struct slab::Entry
A handle to an occupied slot in the Slab
Methods
impl<'a, T, I: From<usize> + Into<usize>> Entry<'a, T, I>
[src][−]
pub fn replace(&mut self, val: T) -> T
[src][−]
Replace the value stored in the entry
pub fn replace_with<F>(&mut self, f: F) where
F: FnOnce(T) -> T,
[src][−]
F: FnOnce(T) -> T,
Apply the function to the current value, replacing it with the result of the function.
pub fn remove(self) -> T
[src][−]
Remove and return the value stored in the entry
pub fn get(&self) -> &T
[src][−]
Get a reference to the value stored in the entry
pub fn get_mut(&mut self) -> &mut T
[src][−]
Get a mutable reference to the value stored in the entry
pub fn into_mut(self) -> &'a mut T
[src][−]
Convert the entry handle to a mutable reference
pub fn index(&self) -> I
[src][−]
Return the entry index
Auto Trait Implementations
impl<'a, T, I> RefUnwindSafe for Entry<'a, T, I> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, I> Send for Entry<'a, T, I> where
T: Send,
T: Send,
impl<'a, T, I> Sync for Entry<'a, T, I> where
I: Sync,
T: Sync,
I: Sync,
T: Sync,
impl<'a, T, I> Unpin for Entry<'a, T, I>
impl<'a, T, I> !UnwindSafe for Entry<'a, T, I>
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,
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>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,