[][src]Trait pui_arena::ArenaKey

pub trait ArenaKey<I, V: Version> {
    pub fn index(&self) -> usize;
pub fn version(&self) -> Option<V::Save>; pub fn validate_ident<'a>(
        &self,
        ident: &'a I,
        validator: Validator<'a>
    ) -> CompleteValidator<'a> { ... } }

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

Loading content...

Provided methods

pub fn validate_ident<'a>(
    &self,
    ident: &'a I,
    validator: Validator<'a>
) -> CompleteValidator<'a>
[src]

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

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

impl<'scope, V: Version> ArenaKey<Scoped<'scope>, V> for ScopedKey<'scope, V::Save>[src]

impl<I, V: Version> ArenaKey<I, V> for Key<TrustedIndex, 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]

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]

impl<K: ?Sized + ArenaKey<I, V>, I, V: Version> ArenaKey<I, V> for &K[src]

Loading content...