pub enum ExecutionPhase {
Boot,
Menu,
Simulation,
Background,
}Expand description
The high-level workload state of the engine.
Variants§
Boot
Engine is starting up and loading assets.
Menu
User is in an interactive menu.
Simulation
Full simulation is running (gameplay).
Background
Application is minimized or lost focus.
Implementations§
Source§impl ExecutionPhase
impl ExecutionPhase
Sourcepub fn can_transition_to(&self, target: ExecutionPhase) -> bool
pub fn can_transition_to(&self, target: ExecutionPhase) -> bool
Returns true if the transition from self to target is valid.
Valid transitions:
- Boot → Menu, Simulation
- Menu → Simulation, Background
- Simulation → Menu, Background
- Background → Menu, Simulation
Trait Implementations§
Source§impl Clone for ExecutionPhase
impl Clone for ExecutionPhase
Source§fn clone(&self) -> ExecutionPhase
fn clone(&self) -> ExecutionPhase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionPhase
impl Debug for ExecutionPhase
Source§impl Default for ExecutionPhase
impl Default for ExecutionPhase
Source§fn default() -> ExecutionPhase
fn default() -> ExecutionPhase
Returns the “default value” for a type. Read more
Source§impl PartialEq for ExecutionPhase
impl PartialEq for ExecutionPhase
impl Copy for ExecutionPhase
impl Eq for ExecutionPhase
impl StructuralPartialEq for ExecutionPhase
Auto Trait Implementations§
impl Freeze for ExecutionPhase
impl RefUnwindSafe for ExecutionPhase
impl Send for ExecutionPhase
impl Sync for ExecutionPhase
impl Unpin for ExecutionPhase
impl UnwindSafe for ExecutionPhase
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