[][src]Struct pui_arena::Key

pub struct Key<Id, V = SavedDefaultVersion> { /* fields omitted */ }

A key into a sparse arena

Implementations

impl<Id, V> Key<Id, V>[src]

pub const fn new(id: Id, version: V) -> Self[src]

Create a new key from an id and version

pub const fn id(&self) -> &Id[src]

The id the given key

pub const fn version(&self) -> &V[src]

The version of the given key

Trait Implementations

impl<I, V: Version> ArenaKey<I, V> for Key<usize, V::Save>[src]

impl<I: OneShotIdentifier, V: Version> ArenaKey<I, V> for Key<Id<I::Token>, V::Save>[src]

impl<I, V: Version> ArenaKey<I, V> for Key<TrustedIndex, V::Save>[src]

impl<'scope, V> AsMut<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>[src]

impl<'scope, V> AsMut<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>[src]

impl<'scope, V> AsRef<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>[src]

impl<'scope, V> AsRef<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>[src]

impl<'scope, V> Borrow<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>[src]

impl<'scope, V> Borrow<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>[src]

impl<'scope, V> BorrowMut<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>[src]

impl<'scope, V> BorrowMut<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>[src]

impl<I, V: Version> BuildArenaKey<I, V> for Key<usize, V::Save>[src]

impl<I: OneShotIdentifier, V: Version> BuildArenaKey<I, V> for Key<Id<I::Token>, V::Save>[src]

impl<Id: Clone, V: Clone> Clone for Key<Id, V>[src]

impl<Id: Copy, V: Copy> Copy for Key<Id, V>[src]

impl<Id: Debug, V: Debug> Debug for Key<Id, V>[src]

impl<Id: Eq, V: Eq> Eq for Key<Id, V>[src]

impl<'scope, V> From<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>[src]

impl<'scope, V> From<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>[src]

impl<Id: Hash, V: Hash> Hash for Key<Id, V>[src]

impl<T> Index<Key<usize, SavedDefaultVersion>> for SlotMap<T>[src]

type Output = T

The returned type after indexing.

impl<T> Index<Key<usize, SavedDefaultVersion>> for SlotMap<T>[src]

type Output = T

The returned type after indexing.

impl<T> Index<Key<usize, SavedDefaultVersion>> for SlotMap<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<Key<usize, SavedDefaultVersion>> for SlotMap<T>[src]

impl<T> IndexMut<Key<usize, SavedDefaultVersion>> for SlotMap<T>[src]

impl<T> IndexMut<Key<usize, SavedDefaultVersion>> for SlotMap<T>[src]

impl<Id: Ord, V: Ord> Ord for Key<Id, V>[src]

impl<Id: PartialEq, V: PartialEq> PartialEq<Key<Id, V>> for Key<Id, V>[src]

impl<Id: PartialOrd, V: PartialOrd> PartialOrd<Key<Id, V>> for Key<Id, V>[src]

impl<Id, V> StructuralEq for Key<Id, V>[src]

impl<Id, V> StructuralPartialEq for Key<Id, V>[src]

Auto Trait Implementations

impl<Id, V> Send for Key<Id, V> where
    Id: Send,
    V: Send
[src]

impl<Id, V> Sync for Key<Id, V> where
    Id: Sync,
    V: Sync
[src]

impl<Id, V> Unpin for Key<Id, V> where
    Id: Unpin,
    V: Unpin
[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.