[−][src]Struct slots::Key
Access key to a Slots instance
Keys must only be used with the Slots they were generated from; using them for any other access
is a logic error and results in immediate or later panics from the Slot's functions. Erroneous
use is largely caught by type constraints; additional runtime constraints can be enabled using
the verify_owner feature.
Unless verify_owner is used, a Key is pointer-sized.
Keys can only be created by a Slot's store method.
Methods
impl<IT, N> Key<IT, N> where
N: ArrayLength<Entry<IT>> + Unsigned, [src]
N: ArrayLength<Entry<IT>> + Unsigned,
pub fn index(&self) -> usize[src]
The underlying index of the key
A key's index can be used in fallible access using the
try_read() method.
Auto Trait Implementations
impl<IT, N> Send for Key<IT, N> where
IT: Send,
N: Send,
IT: Send,
N: Send,
impl<IT, N> Sync for Key<IT, N> where
IT: Sync,
N: Sync,
IT: Sync,
N: Sync,
impl<IT, N> Unpin for Key<IT, N> where
IT: Unpin,
N: Unpin,
IT: Unpin,
N: Unpin,
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,
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,