Struct specs::saveload::U64MarkerAllocator
[−]
[src]
pub struct U64MarkerAllocator { /* fields omitted */ }
Basic marker allocator
Methods
impl U64MarkerAllocator
[src]
Trait Implementations
impl Clone for U64MarkerAllocator
[src]
fn clone(&self) -> U64MarkerAllocator
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for U64MarkerAllocator
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Default for U64MarkerAllocator
[src]
impl MarkerAllocator<U64Marker> for U64MarkerAllocator
[src]
fn allocate(&mut self, entity: Entity, id: Option<u64>) -> U64Marker
[src]
Allocates a new marker for a given entity. If you don't pass an id, a new unique id will be created. Read more
fn retrieve_entity_internal(&self, id: u64) -> Option<Entity>
[src]
Get an Entity
by a marker identifier. This function only accepts an id; it does not update the marker data. Read more
fn maintain(&mut self, entities: &EntitiesRes, storage: &ReadStorage<U64Marker>)
[src]
Maintain internal data. Cleanup if necessary.
fn retrieve_entity(
&mut self,
marker: M,
storage: &mut WriteStorage<M>,
entities: &EntitiesRes
) -> Entity
[src]
&mut self,
marker: M,
storage: &mut WriteStorage<M>,
entities: &EntitiesRes
) -> Entity
Tries to retrieve an entity by the id of the marker; if no entity has a marker with the same id, a new entity will be created and marker
will be inserted for it. Read more
fn mark<'m>(
&mut self,
entity: Entity,
storage: &'m mut WriteStorage<M>
) -> Option<(&'m M, bool)>
[src]
&mut self,
entity: Entity,
storage: &'m mut WriteStorage<M>
) -> Option<(&'m M, bool)>
Create new unique marker M
and attach it to entity. Or get old marker if this entity is already marked. If entity is dead then this will return None
. Read more