pub enum Transition<G>where
G: GameData,{
None,
Push(Box<dyn Screen<G>>),
Pop,
PopWith(ScreenResult),
Replace(Box<dyn Screen<G>>),
Quit,
}Expand description
What a screen asks the stack to do after an update.
Variants§
None
Stay on this screen.
Push(Box<dyn Screen<G>>)
Put a new screen on top of this one.
Pop
Remove this screen, returning to the one below (or quitting if it was the last).
PopWith(ScreenResult)
Pop, handing a value to the screen below
(Screen::uncovered). Transition::pop_with makes one.
Replace(Box<dyn Screen<G>>)
Swap this screen for another.
Quit
Quit the game.
Implementations§
Source§impl<G> Transition<G>where
G: GameData,
impl<G> Transition<G>where
G: GameData,
Sourcepub fn pop_with<T>(value: T) -> Transition<G>where
T: Any,
pub fn pop_with<T>(value: T) -> Transition<G>where
T: Any,
Transition::PopWith value.
Trait Implementations§
Auto Trait Implementations§
impl<G> !RefUnwindSafe for Transition<G>
impl<G> !Send for Transition<G>
impl<G> !Sync for Transition<G>
impl<G> !UnwindSafe for Transition<G>
impl<G> Freeze for Transition<G>
impl<G> Unpin for Transition<G>
impl<G> UnsafeUnpin for Transition<G>
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