[−][src]Enum widgetry::Transition
When a state responds to an event, it can specify some way to manipulate the stack of states.
Variants
Don't do anything, keep the current state as the active one
Keep the current state as the active one, but immediately call event
again with a mouse
moved event
Destroy the current state, and resume from the previous one
If a state needs to pass data back to its parent, use this. In the callback, you have to downcast the previous state to populate it with data.
ReplaceWithData(Box<dyn FnOnce(Box<dyn State<A>>, &mut EventCtx<'_>, &mut A) -> Vec<Box<dyn State<A>>>>)
Push a new active state on the top of the stack.
Replace the current state with a new one. Equivalent to Pop, then Push.
Replace the entire stack of states with this stack.
Multi(Vec<Transition<A>>)
Execute a sequence of transitions in order.
Auto Trait Implementations
impl<A> !RefUnwindSafe for Transition<A>
impl<A> !Send for Transition<A>
impl<A> !Sync for Transition<A>
impl<A> Unpin for Transition<A>
impl<A> !UnwindSafe for Transition<A>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,