Struct shipyard::UniqueStorage
source · pub struct UniqueStorage<T: Unique> { /* private fields */ }
Expand description
Unique storage.
Trait Implementations§
source§impl<T: Unique> Storage for UniqueStorage<T>
impl<T: Unique> 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 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.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