pub struct Stepping { /* private fields */ }
Expand description
Resource for controlling system stepping behavior
Implementations§
Source§impl Stepping
impl Stepping
Sourcepub fn begin_frame(stepping: Option<ResMut<'_, Self>>)
pub fn begin_frame(stepping: Option<ResMut<'_, Self>>)
System to call denoting that a new render frame has begun
Note: This system is automatically added to the default MainSchedule
.
Sourcepub fn schedules(&self) -> Result<&Vec<InternedScheduleLabel>, NotReady>
pub fn schedules(&self) -> Result<&Vec<InternedScheduleLabel>, NotReady>
Return the list of schedules with stepping enabled in the order they are executed in.
Sourcepub fn cursor(&self) -> Option<(InternedScheduleLabel, NodeId)>
pub fn cursor(&self) -> Option<(InternedScheduleLabel, NodeId)>
Return our current position within the stepping frame
NOTE: This function will return None
during normal execution with
stepping enabled. This can happen at the end of the stepping frame
after the last system has been run, but before the start of the next
render frame.
Sourcepub fn add_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
pub fn add_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
Enable stepping for the provided schedule
Sourcepub fn remove_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
pub fn remove_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
Disable stepping for the provided schedule
NOTE: This function will also clear any system-specific behaviors that may have been configured.
Sourcepub fn clear_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
pub fn clear_schedule(&mut self, schedule: impl ScheduleLabel) -> &mut Self
Clear behavior set for all systems in the provided Schedule
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if stepping is enabled
Sourcepub fn step_frame(&mut self) -> &mut Self
pub fn step_frame(&mut self) -> &mut Self
Run the next system during the next render frame
NOTE: This will have no impact unless stepping has been enabled
Sourcepub fn continue_frame(&mut self) -> &mut Self
pub fn continue_frame(&mut self) -> &mut Self
Run all remaining systems in the stepping frame during the next render frame
NOTE: This will have no impact unless stepping has been enabled
Sourcepub fn always_run<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>,
) -> &mut Self
pub fn always_run<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker>, ) -> &mut Self
Ensure this system always runs when stepping is enabled
Note: if the system is run multiple times in the Schedule
, this
will apply for all instances of the system.
Sourcepub fn always_run_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId,
) -> &mut Self
pub fn always_run_node( &mut self, schedule: impl ScheduleLabel, node: NodeId, ) -> &mut Self
Ensure this system instance always runs when stepping is enabled
Sourcepub fn never_run<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>,
) -> &mut Self
pub fn never_run<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker>, ) -> &mut Self
Ensure this system never runs when stepping is enabled
Sourcepub fn never_run_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId,
) -> &mut Self
pub fn never_run_node( &mut self, schedule: impl ScheduleLabel, node: NodeId, ) -> &mut Self
Ensure this system instance never runs when stepping is enabled
Sourcepub fn set_breakpoint<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>,
) -> &mut Self
pub fn set_breakpoint<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker>, ) -> &mut Self
Add a breakpoint for system
Sourcepub fn set_breakpoint_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId,
) -> &mut Self
pub fn set_breakpoint_node( &mut self, schedule: impl ScheduleLabel, node: NodeId, ) -> &mut Self
Add a breakpoint for system instance
Sourcepub fn clear_breakpoint<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>,
) -> &mut Self
pub fn clear_breakpoint<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker>, ) -> &mut Self
Clear a breakpoint for the system
Sourcepub fn clear_breakpoint_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId,
) -> &mut Self
pub fn clear_breakpoint_node( &mut self, schedule: impl ScheduleLabel, node: NodeId, ) -> &mut Self
clear a breakpoint for system instance
Sourcepub fn clear_system<Marker>(
&mut self,
schedule: impl ScheduleLabel,
system: impl IntoSystem<(), (), Marker>,
) -> &mut Self
pub fn clear_system<Marker>( &mut self, schedule: impl ScheduleLabel, system: impl IntoSystem<(), (), Marker>, ) -> &mut Self
Clear any behavior set for the system
Sourcepub fn clear_node(
&mut self,
schedule: impl ScheduleLabel,
node: NodeId,
) -> &mut Self
pub fn clear_node( &mut self, schedule: impl ScheduleLabel, node: NodeId, ) -> &mut Self
clear a breakpoint for system instance
Sourcepub fn skipped_systems(&mut self, schedule: &Schedule) -> Option<FixedBitSet>
pub fn skipped_systems(&mut self, schedule: &Schedule) -> Option<FixedBitSet>
get the list of systems this schedule should skip for this render frame
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stepping
impl !RefUnwindSafe for Stepping
impl Send for Stepping
impl Sync for Stepping
impl Unpin for Stepping
impl !UnwindSafe for Stepping
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given World
.