#[repr(transparent)]
pub struct SimpleMarker<T: ?Sized>(_, _);
Expand description

Basic marker implementation usable for saving and loading, uses u64 as identifier

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Associated storage type for this component.

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

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

Allocator for this Marker

Id of the marker

Get this marker internal id. The value of this method should be constant. Read more

This gets called when an entity is deserialized by DeserializeComponents. It can be used to update internal data that is not used for identification. Read more

Allocates a new marker for a given entity. If you don’t pass an id, a new unique id will be created. Read more

Get an Entity by a marker identifier. This function only accepts an id; it does not update the marker data. Read more

Maintain internal data. Cleanup if necessary.

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

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

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

(De)Serializable data representation for data type

Error may occur during serialization or deserialization of component

Convert this data type into serializable form (Data) using entity to marker mapping function Read more

Convert this data from a deserializable form (Data) using entity to marker mapping function Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.