pub struct UniqueStorage<T: Unique> { /* private fields */ }Expand description
Unique storage.
Trait Implementations§
Source§impl<T: Unique + Send + Sync> Storage for UniqueStorage<T>
impl<T: Unique + Send + Sync> Storage for UniqueStorage<T>
Source§fn memory_usage(&self) -> Option<StorageMemoryUsage>
fn memory_usage(&self) -> Option<StorageMemoryUsage>
Returns how much memory this storage uses.
Source§fn clear_all_inserted(&mut self, current: TrackingTimestamp)
fn clear_all_inserted(&mut self, current: TrackingTimestamp)
Clear all insertion tracking data.
Source§fn clear_all_modified(&mut self, current: TrackingTimestamp)
fn clear_all_modified(&mut self, current: TrackingTimestamp)
Clear all modification tracking data.
Source§fn try_clone(&self, other_current: TrackingTimestamp) -> Option<SBoxBuilder>
fn try_clone(&self, other_current: TrackingTimestamp) -> Option<SBoxBuilder>
Attempts to clone the entire storage.
Source§fn delete(&mut self, entity: EntityId, current: TrackingTimestamp)
fn delete(&mut self, entity: EntityId, current: TrackingTimestamp)
Deletes an entity from this storage.
Source§fn clear(&mut self, current: TrackingTimestamp)
fn clear(&mut self, current: TrackingTimestamp)
Deletes all components of this storage.
Source§fn sparse_array(&self) -> Option<&SparseArray<EntityId, 32>>
fn sparse_array(&self) -> Option<&SparseArray<EntityId, 32>>
Returns a
SparseSet’s internal SparseArray.Source§fn clear_all_removed_and_deleted(&mut self)
fn clear_all_removed_and_deleted(&mut self)
Clear all deletion and removal tracking data.
Source§fn clear_all_removed_and_deleted_older_than_timestamp(
&mut self,
timestamp: TrackingTimestamp,
)
fn clear_all_removed_and_deleted_older_than_timestamp( &mut self, timestamp: TrackingTimestamp, )
Clear all deletion and removal tracking data older than some timestamp.
Source§fn move_component_from(
&mut self,
other_all_storages: &mut AllStorages,
from: EntityId,
to: EntityId,
current: TrackingTimestamp,
other_current: TrackingTimestamp,
)
fn move_component_from( &mut self, other_all_storages: &mut AllStorages, from: EntityId, to: EntityId, current: TrackingTimestamp, other_current: TrackingTimestamp, )
Moves a component from a
World to another.Source§fn clone_component_to(
&self,
other_all_storages: &mut AllStorages,
from: EntityId,
to: EntityId,
other_current: TrackingTimestamp,
)
fn clone_component_to( &self, other_all_storages: &mut AllStorages, from: EntityId, to: EntityId, other_current: TrackingTimestamp, )
Clones a component from a
World to another.Auto Trait Implementations§
impl<T> Freeze for UniqueStorage<T>where
T: Freeze,
impl<T> RefUnwindSafe for UniqueStorage<T>where
T: RefUnwindSafe,
impl<T> Send for UniqueStorage<T>where
T: Send,
impl<T> Sync for UniqueStorage<T>where
T: Sync,
impl<T> Unpin for UniqueStorage<T>where
T: Unpin,
impl<T> UnwindSafe for UniqueStorage<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more