Struct legion::world::LocationMap[][src]

pub struct LocationMap { /* fields omitted */ }

A map of entity IDs to their storage locations.

Implementations

impl LocationMap[src]

pub fn len(&self) -> usize[src]

Returns the number of entities in the map.

pub fn is_empty(&self) -> bool[src]

Returns true if the location map is empty.

pub fn contains(&self, entity: Entity) -> bool[src]

Returns true if the location map contains the given entity.

pub fn insert(
    &mut self,
    ids: &[Entity],
    arch: ArchetypeIndex,
    ComponentIndex: ComponentIndex
) -> Vec<EntityLocation>
[src]

Inserts a collection of adjacent entities into the location map.

pub fn set(&mut self, entity: Entity, location: EntityLocation)[src]

Inserts or updates the location of an entity.

pub fn get(&self, entity: Entity) -> Option<EntityLocation>[src]

Returns the location of an entity.

pub fn remove(&mut self, entity: Entity) -> Option<EntityLocation>[src]

Removes an entity from the location map.

Trait Implementations

impl Clone for LocationMap[src]

impl Debug for LocationMap[src]

impl Default for LocationMap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.