pub struct Key<Id, V = SavedDefaultVersion> { /* private fields */ }Expand description
A key into a sparse arena
Implementations§
Trait Implementations§
Source§impl<I: OneShotIdentifier, V: Version> ArenaKey<I, V> for Key<Id<I::Token>, V::Save>
Available on crate feature pui only.
impl<I: OneShotIdentifier, V: Version> ArenaKey<I, V> for Key<Id<I::Token>, V::Save>
Available on crate feature
pui only.Source§fn validate_ident<'a>(
&self,
ident: &'a I,
validator: Validator<'a>,
) -> CompleteValidator<'a>
fn validate_ident<'a>( &self, ident: &'a I, validator: Validator<'a>, ) -> CompleteValidator<'a>
An optimization that allows you to construct an unchecked index into the
Arena Read moreSource§impl<I, V: Version> ArenaKey<I, V> for Key<TrustedIndex, V::Save>
impl<I, V: Version> ArenaKey<I, V> for Key<TrustedIndex, V::Save>
Source§fn validate_ident<'a>(
&self,
ident: &'a I,
validator: Validator<'a>,
) -> CompleteValidator<'a>
fn validate_ident<'a>( &self, ident: &'a I, validator: Validator<'a>, ) -> CompleteValidator<'a>
An optimization that allows you to construct an unchecked index into the
Arena Read moreSource§impl<I, V: Version> ArenaKey<I, V> for Key<usize, V::Save>
impl<I, V: Version> ArenaKey<I, V> for Key<usize, V::Save>
Source§fn validate_ident<'a>(
&self,
ident: &'a I,
validator: Validator<'a>,
) -> CompleteValidator<'a>
fn validate_ident<'a>( &self, ident: &'a I, validator: Validator<'a>, ) -> CompleteValidator<'a>
An optimization that allows you to construct an unchecked index into the
Arena Read moreSource§impl<'scope, V> AsMut<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature scoped only.
impl<'scope, V> AsMut<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature
scoped only.Source§impl<'scope, V> AsMut<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature scoped only.
impl<'scope, V> AsMut<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature
scoped only.Source§impl<'scope, V> AsRef<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature scoped only.
impl<'scope, V> AsRef<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature
scoped only.Source§impl<'scope, V> AsRef<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature scoped only.
impl<'scope, V> AsRef<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature
scoped only.Source§impl<'scope, V> Borrow<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature scoped only.
impl<'scope, V> Borrow<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature
scoped only.Source§impl<'scope, V> Borrow<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature scoped only.
impl<'scope, V> Borrow<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature
scoped only.Source§impl<'scope, V> BorrowMut<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature scoped only.
impl<'scope, V> BorrowMut<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature
scoped only.Source§fn borrow_mut(&mut self) -> &mut Key<Id<ScopedToken<'scope>>, V>
fn borrow_mut(&mut self) -> &mut Key<Id<ScopedToken<'scope>>, V>
Mutably borrows from an owned value. Read more
Source§impl<'scope, V> BorrowMut<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature scoped only.
impl<'scope, V> BorrowMut<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature
scoped only.Source§fn borrow_mut(&mut self) -> &mut ScopedKey<'scope, V>
fn borrow_mut(&mut self) -> &mut ScopedKey<'scope, V>
Mutably borrows from an owned value. Read more
Source§impl<I: OneShotIdentifier, V: Version> BuildArenaKey<I, V> for Key<Id<I::Token>, V::Save>
Available on crate feature pui only.
impl<I: OneShotIdentifier, V: Version> BuildArenaKey<I, V> for Key<Id<I::Token>, V::Save>
Available on crate feature
pui only.Source§impl<'scope, V> From<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature scoped only.
impl<'scope, V> From<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
Available on crate feature
scoped only.Source§impl<'scope, V> From<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature scoped only.
impl<'scope, V> From<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
Available on crate feature
scoped only.Source§impl<Id: Ord, V: Ord> Ord for Key<Id, V>
impl<Id: Ord, V: Ord> Ord for Key<Id, V>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Id: PartialOrd, V: PartialOrd> PartialOrd for Key<Id, V>
impl<Id: PartialOrd, V: PartialOrd> PartialOrd for Key<Id, V>
impl<Id: Copy, V: Copy> Copy for Key<Id, V>
impl<Id: Eq, V: Eq> Eq for Key<Id, V>
impl<Id, V> StructuralPartialEq for Key<Id, V>
Auto Trait Implementations§
impl<Id, V> Freeze for Key<Id, V>
impl<Id, V> RefUnwindSafe for Key<Id, V>where
Id: RefUnwindSafe,
V: RefUnwindSafe,
impl<Id, V> Send for Key<Id, V>
impl<Id, V> Sync for Key<Id, V>
impl<Id, V> Unpin for Key<Id, V>
impl<Id, V> UnsafeUnpin for Key<Id, V>where
Id: UnsafeUnpin,
V: UnsafeUnpin,
impl<Id, V> UnwindSafe for Key<Id, V>where
Id: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more