pub enum Control<Action> {
Continue,
Break,
Repaint,
Action(Action),
Quit,
}Expand description
Result of event-handling.
The macro rat-event::flow_ok! provides control-flow using this enum.
Variants§
Continue
Continue handling the current event. In the event-loop this goes on waiting for a new event.
Break
Break handling the current event. In the event-loop this does nothing and just waits for a new event.
Repaint
Triggers a repaint in the event-loop.
Action(Action)
The event-loop calls out the action-handlers to take care of it.
Quit
Quit the application.
Trait Implementations§
source§impl<Action> ConsumedEvent for Control<Action>
impl<Action> ConsumedEvent for Control<Action>
source§impl<Action> From<ButtonOutcome> for Control<Action>
impl<Action> From<ButtonOutcome> for Control<Action>
source§fn from(value: ButtonOutcome) -> Self
fn from(value: ButtonOutcome) -> Self
Converts to this type from the input type.
source§impl<Action> From<DoubleClickOutcome> for Control<Action>
impl<Action> From<DoubleClickOutcome> for Control<Action>
source§fn from(value: DoubleClickOutcome) -> Self
fn from(value: DoubleClickOutcome) -> Self
Converts to this type from the input type.
source§impl<Action> From<EditOutcome> for Control<Action>
impl<Action> From<EditOutcome> for Control<Action>
source§fn from(value: EditOutcome) -> Self
fn from(value: EditOutcome) -> Self
Converts to this type from the input type.
source§impl<Action> From<MenuOutcome> for Control<Action>
impl<Action> From<MenuOutcome> for Control<Action>
source§fn from(value: MenuOutcome) -> Self
fn from(value: MenuOutcome) -> Self
Converts to this type from the input type.
source§impl<Action> From<ScrollOutcome> for Control<Action>
impl<Action> From<ScrollOutcome> for Control<Action>
source§fn from(value: ScrollOutcome) -> Self
fn from(value: ScrollOutcome) -> Self
Converts to this type from the input type.
source§impl<Action> From<TextOutcome> for Control<Action>
impl<Action> From<TextOutcome> for Control<Action>
source§fn from(value: TextOutcome) -> Self
fn from(value: TextOutcome) -> Self
Converts to this type from the input type.
source§impl<Action: Ord> Ord for Control<Action>
impl<Action: Ord> Ord for Control<Action>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<Action: PartialEq> PartialEq for Control<Action>
impl<Action: PartialEq> PartialEq for Control<Action>
source§impl<Action: PartialOrd> PartialOrd for Control<Action>
impl<Action: PartialOrd> PartialOrd for Control<Action>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<Action: Copy> Copy for Control<Action>
impl<Action: Eq> Eq for Control<Action>
impl<Action> StructuralPartialEq for Control<Action>
Auto Trait Implementations§
impl<Action> Freeze for Control<Action>where
Action: Freeze,
impl<Action> RefUnwindSafe for Control<Action>where
Action: RefUnwindSafe,
impl<Action> Send for Control<Action>where
Action: Send,
impl<Action> Sync for Control<Action>where
Action: Sync,
impl<Action> Unpin for Control<Action>where
Action: Unpin,
impl<Action> UnwindSafe for Control<Action>where
Action: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more