[−][src]Struct pui_arena::Key
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]
pub fn index(&self) -> usize
[src]
pub fn version(&self) -> Option<V::Save>
[src]
pub fn validate_ident<'a>(
&self,
ident: &'a I,
validator: Validator<'a>
) -> CompleteValidator<'a>
[src]
&self,
ident: &'a I,
validator: Validator<'a>
) -> CompleteValidator<'a>
impl<I: OneShotIdentifier, V: Version> ArenaKey<I, V> for Key<Id<I::Token>, V::Save>
[src]
pub fn validate_ident<'a>(
&self,
ident: &'a I,
validator: Validator<'a>
) -> CompleteValidator<'a>
[src]
&self,
ident: &'a I,
validator: Validator<'a>
) -> CompleteValidator<'a>
pub fn index(&self) -> usize
[src]
pub fn version(&self) -> Option<V::Save>
[src]
impl<I, V: Version> ArenaKey<I, V> for Key<TrustedIndex, V::Save>
[src]
pub fn validate_ident<'a>(
&self,
ident: &'a I,
validator: Validator<'a>
) -> CompleteValidator<'a>
[src]
&self,
ident: &'a I,
validator: Validator<'a>
) -> CompleteValidator<'a>
pub fn index(&self) -> usize
[src]
pub fn version(&self) -> Option<V::Save>
[src]
impl<'scope, V> AsMut<Key<Id<ScopedToken<'scope>>, V>> for ScopedKey<'scope, V>
[src]
pub fn as_mut(&mut self) -> &mut Key<Id<ScopedToken<'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]
pub fn as_ref(&self) -> &Key<Id<ScopedToken<'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]
pub fn borrow(&self) -> &Key<Id<ScopedToken<'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]
pub fn borrow_mut(&mut self) -> &mut Key<Id<ScopedToken<'scope>>, V>
[src]
impl<'scope, V> BorrowMut<ScopedKey<'scope, V>> for Key<Id<ScopedToken<'scope>>, V>
[src]
pub fn borrow_mut(&mut self) -> &mut ScopedKey<'scope, V>
[src]
impl<I, V: Version> BuildArenaKey<I, V> for Key<usize, V::Save>
[src]
pub unsafe fn new_unchecked(index: usize, save: V::Save, ident: &I) -> Self
[src]
impl<I: OneShotIdentifier, V: Version> BuildArenaKey<I, V> for Key<Id<I::Token>, V::Save>
[src]
pub unsafe fn new_unchecked(index: usize, save: V::Save, ident: &I) -> Self
[src]
impl<Id: Clone, V: Clone> Clone for Key<Id, V>
[src]
pub fn clone(&self) -> Key<Id, V>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
pub fn from(key: Key<Id<ScopedToken<'scope>>, V>) -> Self
[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]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Index<Key<usize, SavedDefaultVersion>> for SlotMap<T>
[src]
type Output = T
The returned type after indexing.
pub fn index(&self, key: Key) -> &Self::Output
[src]
impl<T> Index<Key<usize, SavedDefaultVersion>> for SlotMap<T>
[src]
type Output = T
The returned type after indexing.
pub fn index(&self, key: Key) -> &Self::Output
[src]
impl<T> Index<Key<usize, SavedDefaultVersion>> for SlotMap<T>
[src]
type Output = T
The returned type after indexing.
pub fn index(&self, key: Key) -> &Self::Output
[src]
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]
pub fn cmp(&self, other: &Key<Id, V>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[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]
pub fn partial_cmp(&self, other: &Key<Id, V>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Key<Id, V>) -> bool
[src]
pub fn le(&self, other: &Key<Id, V>) -> bool
[src]
pub fn gt(&self, other: &Key<Id, V>) -> bool
[src]
pub fn ge(&self, other: &Key<Id, V>) -> bool
[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]
Id: Send,
V: Send,
impl<Id, V> Sync for Key<Id, V> where
Id: Sync,
V: Sync,
[src]
Id: Sync,
V: Sync,
impl<Id, V> Unpin for Key<Id, V> where
Id: Unpin,
V: Unpin,
[src]
Id: Unpin,
V: 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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,