Struct id_vec::id::Id[][src]

pub struct Id<T> { /* fields omitted */ }

Used as a key to access an instance inside a IdVec. Internally, this is only an integer index (but with greater type safety).

Methods

impl<T> Id<T>
[src]

Convenience function which allows writing the index first, and the IdVec afterwards. Example: the_selected_entity.of(entities) Panics when calling on an invalid id

Convenience function which allows writing the index first, and the IdVec afterwards. Example: the_selected_entity.of_mut(entities) Panics when calling on an invalid id

Convenience function which allows writing the index first, and the IdVec afterwards. Example: the_selected_entity.try_of(entities)

Convenience function which allows writing the index first, and the IdVec afterwards. Example: the_selected_entity.try_of_mut(entities)

The actual integer value for this Id.

Trait Implementations

impl<T> Index<Id<T>> for IdVec<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T> IndexMut<Id<T>> for IdVec<T>
[src]

Performs the mutable indexing (container[index]) operation.

impl<T> Eq for Id<T>
[src]

impl<T> PartialEq for Id<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T> Copy for Id<T>
[src]

impl<T> Clone for Id<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Hash for Id<T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T> Debug for Id<T>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T> Send for Id<T> where
    T: Send

impl<T> Sync for Id<T> where
    T: Sync