Struct bones_ecs::components::ComponentStores
source · pub struct ComponentStores { /* private fields */ }
Expand description
A collection of ComponentStore<T>
.
ComponentStores
is used to in World
to store all component types that have been
initialized for that world.
Implementations§
source§impl ComponentStores
impl ComponentStores
sourcepub fn get_cell<T: HasSchema>(&self) -> AtomicComponentStore<T>
pub fn get_cell<T: HasSchema>(&self) -> AtomicComponentStore<T>
Get the components of a certain type
sourcepub fn get<T: HasSchema>(&self) -> &AtomicCell<ComponentStore<T>>
pub fn get<T: HasSchema>(&self) -> &AtomicCell<ComponentStore<T>>
sourcepub fn get_by_schema(
&self,
schema: &'static Schema,
) -> &AtomicCell<UntypedComponentStore>
pub fn get_by_schema( &self, schema: &'static Schema, ) -> &AtomicCell<UntypedComponentStore>
Get the untyped component storage by the component’s SchemaId
.
sourcepub fn get_cell_by_schema(
&self,
schema: &'static Schema,
) -> Arc<AtomicCell<UntypedComponentStore>>
pub fn get_cell_by_schema( &self, schema: &'static Schema, ) -> Arc<AtomicCell<UntypedComponentStore>>
Get the untyped component storage by the component’s SchemaId
.
Trait Implementations§
source§impl Clone for ComponentStores
impl Clone for ComponentStores
source§impl Default for ComponentStores
impl Default for ComponentStores
source§fn default() -> ComponentStores
fn default() -> ComponentStores
Returns the “default value” for a type. Read more
impl Send for ComponentStores
impl Sync for ComponentStores
Auto Trait Implementations§
impl Freeze for ComponentStores
impl !RefUnwindSafe for ComponentStores
impl Unpin for ComponentStores
impl !UnwindSafe for ComponentStores
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
source§fn from_world(_world: &World) -> T
fn from_world(_world: &World) -> T
Creates
Self
using data from the given World
.