[][src]Struct dces::system::SystemStore

pub struct SystemStore<E, C, Ctx> where
    E: EntityStore,
    C: ComponentStore
{ pub priorities: BTreeMap<i32, Vec<u32>>, // some fields omitted }

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]

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]

Registers the cleanup system.

pub fn register_system(
    &mut self,
    system: impl System<E, C, Ctx>,
    system_id: u32
)
[src]

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<E> Component for E where
    E: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.