Struct specs::saveload::U64Marker
[−]
[src]
pub struct U64Marker(_);
Basic marker implementation usable for saving and loading
Trait Implementations
impl Clone for U64Marker
[src]
fn clone(&self) -> U64Marker
[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 Copy for U64Marker
[src]
impl Debug for U64Marker
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Hash for U64Marker
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for U64Marker
[src]
fn eq(&self, __arg_0: &U64Marker) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &U64Marker) -> bool
[src]
This method tests for !=
.
impl Eq for U64Marker
[src]
impl PartialOrd for U64Marker
[src]
fn partial_cmp(&self, __arg_0: &U64Marker) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &U64Marker) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &U64Marker) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &U64Marker) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &U64Marker) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for U64Marker
[src]
fn cmp(&self, __arg_0: &U64Marker) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Component for U64Marker
[src]
type Storage = DenseVecStorage<Self>
Associated storage type for this component.
impl Marker for U64Marker
[src]
type Allocator = U64MarkerAllocator
Allocator for this Marker
type Identifier = u64
Id of the marker
fn id(&self) -> u64
[src]
Get this marker internal id. The value of this method should be constant. Read more
fn update(&mut self, new_revision: Self)
[src]
This gets called when an entity is deserialized by DeserializeEntity
. It can be used to update internal data that is not used for identification. Read more
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