pub trait Storage: SizedAny {
fn any(&self) -> &dyn Any { ... }
fn any_mut(&mut self) -> &mut dyn Any { ... }
fn delete(&mut self, _entity: EntityId, _current: u32) { ... }
fn clear(&mut self, _current: u32) { ... }
fn memory_usage(&self) -> Option<StorageMemoryUsage> { ... }
fn name(&self) -> Cow<'static, str> { ... }
fn sparse_array(&self) -> Option<&SparseArray<EntityId, 32>> { ... }
fn is_empty(&self) -> bool { ... }
fn clear_all_removed_or_deleted(&mut self) { ... }
fn clear_all_removed_or_deleted_older_than_timestamp(
&mut self,
_timestamp: TrackingTimestamp
) { ... }
}
Expand description
Defines common storage operations.
Provided Methods
fn memory_usage(&self) -> Option<StorageMemoryUsage>
fn memory_usage(&self) -> Option<StorageMemoryUsage>
Returns how much memory this storage uses.
fn sparse_array(&self) -> Option<&SparseArray<EntityId, 32>>
fn sparse_array(&self) -> Option<&SparseArray<EntityId, 32>>
Returns a SparseSet
’s internal SparseArray
.
fn clear_all_removed_or_deleted(&mut self)
fn clear_all_removed_or_deleted(&mut self)
Clear all deletion and removal tracking data.
fn clear_all_removed_or_deleted_older_than_timestamp(
&mut self,
_timestamp: TrackingTimestamp
)
fn clear_all_removed_or_deleted_older_than_timestamp(
&mut self,
_timestamp: TrackingTimestamp
)
Clear all deletion and removal tracking data older than some timestamp.