Struct bones_lib::prelude::SystemStages
pub struct SystemStages { /* private fields */ }
Expand description
An ordered collection of SystemStage
s.
Implementations§
§impl SystemStages
impl SystemStages
pub fn builder() -> SystemStagesBuilder
pub fn builder() -> SystemStagesBuilder
Create builder for construction of SystemStages
.
pub fn handle_startup(&mut self, world: &mut World)
pub fn handle_startup(&mut self, world: &mut World)
If SessionStarted
resource indicates have not yet started,
perform startup tasks (insert startup resources, run startup systems).
For advanced use cases in which want to only insert startup resources, or run startup systems and split this
behavior, see SystemStages::handle_startup_systems
and [SystemStages::handle_startup_resources
].
While this is used internally by SystemStages::run
, this is also used
for resetting world. This allows world to immediately startup and re-initialize after reset.
§Panics
May panic if resources are borrowed, should not borrow resources when calling.
pub fn handle_startup_resources(&mut self, world: &mut World)
pub fn handle_startup_resources(&mut self, world: &mut World)
If SessionStarted
resource indicates startup resources have not yet been inserted, will do so and update SessionStarted
.
This function contains only half of stage’s startup behavior, see SystemStages::handle_startup
if not intending to split
resource insertion from startup systems (Splitting these is more for advanced special cases).
§Panics
May panic if resources are borrowed, should not borrow resources when calling.
pub fn handle_startup_systems(&mut self, world: &mut World)
pub fn handle_startup_systems(&mut self, world: &mut World)
If SessionStarted
resource indicates startup systems have not yet been executed, will do so and update SessionStarted
.
This function contains only half of stage’s startup behavior, see SystemStages::handle_startup
if not intending to split
startup system execution from startup resource insertion (Splitting these is more for advanced special cases).
§Panics
May panic if resources are borrowed, should not borrow resources when calling.
Trait Implementations§
§impl Debug for SystemStages
impl Debug for SystemStages
§impl Default for SystemStages
impl Default for SystemStages
§fn default() -> SystemStages
fn default() -> SystemStages
Auto Trait Implementations§
impl Freeze for SystemStages
impl !RefUnwindSafe for SystemStages
impl Send for SystemStages
impl Sync for SystemStages
impl Unpin for SystemStages
impl !UnwindSafe for SystemStages
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
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &World) -> T
fn from_world(_world: &World) -> T
Self
using data from the given World
.