[−][src]Struct dces::system::SystemStore
The SystemStore represents the main system storage.
Fields
priorities: BTreeMap<i32, Vec<u32>>
Priorities of the systems.
Implementations
impl<E, C, Ctx> SystemStore<E, C, Ctx> where
E: EntityStore,
C: ComponentStore,
[src]
E: EntityStore,
C: ComponentStore,
pub fn new() -> Self
[src]
Creates a new system store with default values.
pub fn register_init_system(&mut self, init_system: impl System<E, C, Ctx>)
[src]
Registers the init system.
pub fn register_cleanup_system(
&mut self,
cleanup_system: impl System<E, C, Ctx>
)
[src]
&mut self,
cleanup_system: impl System<E, C, Ctx>
)
Registers the cleanup system.
pub fn register_system(
&mut self,
system: impl System<E, C, Ctx>,
system_id: u32
)
[src]
&mut self,
system: impl System<E, C, Ctx>,
system_id: u32
)
Registers a new system
.
pub fn remove_system(&mut self, system_id: u32)
[src]
Removes a system from the storage.
pub fn register_priority(&mut self, priority: Priority, system_id: u32)
[src]
Register a priority
for the system with the given system_id
.
pub fn borrow_entity_system(
&self,
entity_system_id: u32
) -> Result<&EntitySystem<E, C, Ctx>, NotFound>
[src]
&self,
entity_system_id: u32
) -> Result<&EntitySystem<E, C, Ctx>, NotFound>
Returns a reference of a entity system. If the entity system does not exists NotFound
will be returned.
pub fn borrow_init_system(&self) -> &Option<EntitySystem<E, C, Ctx>>
[src]
Returns a reference of the init entity system. If the init entity system does not exists None
will be returned.
pub fn borrow_cleanup_system(&self) -> &Option<EntitySystem<E, C, Ctx>>
[src]
Returns a reference of the cleanup entity system. If the init entity system does not exists None
will be returned.
Trait Implementations
impl<E: Default, C: Default, Ctx: Default> Default for SystemStore<E, C, Ctx> where
E: EntityStore,
C: ComponentStore,
[src]
E: EntityStore,
C: ComponentStore,
fn default() -> SystemStore<E, C, Ctx>
[src]
Auto Trait Implementations
impl<E, C, Ctx> !RefUnwindSafe for SystemStore<E, C, Ctx>
impl<E, C, Ctx> !Send for SystemStore<E, C, Ctx>
impl<E, C, Ctx> !Sync for SystemStore<E, C, Ctx>
impl<E, C, Ctx> Unpin for SystemStore<E, C, Ctx>
impl<E, C, Ctx> !UnwindSafe for SystemStore<E, C, Ctx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,