[−][src]Trait pui_arena::ArenaKey
A trait to access elements of an Arena
Required methods
pub fn index(&self) -> usize
[src]
The index of this key
pub fn version(&self) -> Option<V::Save>
[src]
The version of this key
Provided methods
pub fn validate_ident<'a>(
&self,
ident: &'a I,
validator: Validator<'a>
) -> CompleteValidator<'a>
[src]
&self,
ident: &'a I,
validator: Validator<'a>
) -> CompleteValidator<'a>
An optimization that allows you to construct an unchecked index into the Arena
It is only safe to call Validator::unchecked_index
if the next call to Self::index
is guarnteed to be in bounds
for the arena with the identifier ident
Implementations on Foreign Types
impl<I: OneShotIdentifier, V: Version> ArenaKey<I, V> for Id<I::Token>
[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]
Implementors
impl<'scope, V: Version> ArenaKey<Scoped<'scope>, V> for ScopedKey<'scope, V::Save>
[src]
pub fn validate_ident<'a>(
&self,
ident: &'a Scoped<'scope>,
validator: Validator<'a>
) -> CompleteValidator<'a>
[src]
&self,
ident: &'a Scoped<'scope>,
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<I, V: Version> ArenaKey<I, V> for Key<usize, V::Save>
[src]
impl<I, V: Version> ArenaKey<I, V> for TrustedIndex
[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 usize
[src]
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<K: ?Sized + ArenaKey<I, V>, I, V: Version> ArenaKey<I, V> for &K
[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>