[][src]Struct slots::Key

pub struct Key<IT, N> { /* fields omitted */ }

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]

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

impl<IT, N> Sync for Key<IT, N> where
    IT: Sync,
    N: Sync

impl<IT, N> Unpin for Key<IT, N> where
    IT: Unpin,
    N: Unpin

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

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.