Struct specs::saveload::SimpleMarkerAllocator [−][src]
pub struct SimpleMarkerAllocator<T: ?Sized> { /* fields omitted */ }
Expand description
Basic marker allocator, uses u64
as identifier
Implementations
Trait Implementations
impl<T: ?Sized> MarkerAllocator<SimpleMarker<T>> for SimpleMarkerAllocator<T> where
T: 'static + Send + Sync,
[src]
impl<T: ?Sized> MarkerAllocator<SimpleMarker<T>> for SimpleMarkerAllocator<T> where
T: 'static + Send + Sync,
[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
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.
fn retrieve_entity(
&mut self,
marker: M,
storage: &mut WriteStorage<'_, M>,
entities: &EntitiesRes
) -> Entity
[src]
fn retrieve_entity(
&mut self,
marker: M,
storage: &mut WriteStorage<'_, M>,
entities: &EntitiesRes
) -> Entity
[src]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
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for SimpleMarkerAllocator<T> where
T: RefUnwindSafe,
impl<T: ?Sized> Send for SimpleMarkerAllocator<T> where
T: Send,
impl<T: ?Sized> Sync for SimpleMarkerAllocator<T> where
T: Sync,
impl<T: ?Sized> Unpin for SimpleMarkerAllocator<T> where
T: Unpin,
impl<T: ?Sized> UnwindSafe for SimpleMarkerAllocator<T> where
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: Any,
impl<T> Any for T where
T: Any,
pub fn get_type_id(&self) -> TypeId
Mutably borrows from an owned value. Read more
Tries to create the default.
Calls try_default
and panics on an error case.