pub struct Engine { /* private fields */ }Expand description
Stores and provides access to user-defined SystemGroups.
The general shape of SystemGroups, as well as the order in which they are invoked, is
specifically left to the caller. When deciding which group a System should belong to,
consider if there are dependencies between Systems that would encourage one to run before or
after another.
Note: When processing a SystemGroup, Systems are invoked sequentially in the order they are
registered.
Implementations§
Source§impl Engine
impl Engine
pub fn new() -> Self
Sourcepub fn register_system_group(&mut self, group: SystemGroup) -> u32
pub fn register_system_group(&mut self, group: SystemGroup) -> u32
Registeres a provided SystemGroup. Returns a u32 representing the id of the provided
SystemGroup, for reference during execution.
Sourcepub fn deregister_system_group(&mut self, group_id: u32)
pub fn deregister_system_group(&mut self, group_id: u32)
Deregistered a SystemGroup given its id.
Sourcepub fn execute_group(&mut self, group_id: u32, params: SystemParamAccessor<'_>)
pub fn execute_group(&mut self, group_id: u32, params: SystemParamAccessor<'_>)
Executes a SystemGroup registered under the provided group_id, passing the SystemParams
registered in the SystemParamAccessor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Engine
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnwindSafe for Engine
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> 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