pub struct SystemManager {
pub world: World,
/* private fields */
}Expand description
Manages systems for a World in multiple runlevels
Fields§
§world: WorldThe World
Implementations§
Source§impl SystemManager
impl SystemManager
Sourcepub fn new(world: World) -> Self
pub fn new(world: World) -> Self
Create new SystemManager
Sourcepub fn has_runlevel(&self, level: usize) -> bool
pub fn has_runlevel(&self, level: usize) -> bool
Return whether runlevel level exists
Sourcepub fn add_system<S: System>(&mut self, level: usize, system: S) -> usize
pub fn add_system<S: System>(&mut self, level: usize, system: S) -> usize
Add a System to runlevel level, return the system id
Sourcepub fn remove_system<S: System>(&mut self, level: usize, system: usize)
pub fn remove_system<S: System>(&mut self, level: usize, system: usize)
Remove a System from runlevel level
Sourcepub fn run_systems(&mut self, level: usize)
pub fn run_systems(&mut self, level: usize)
Run systems of in runlevel level
Auto Trait Implementations§
impl Freeze for SystemManager
impl !RefUnwindSafe for SystemManager
impl !Send for SystemManager
impl !Sync for SystemManager
impl Unpin for SystemManager
impl UnsafeUnpin for SystemManager
impl !UnwindSafe for SystemManager
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