pub enum Control<Message> {
Continue,
Unchanged,
Changed,
Message(Message),
Quit,
}Expand description
Result of event-handling.
The macro rat-event::flow! provides control-flow using this enum.
Variants§
Continue
Continue with event-handling. In the event-loop this waits for the next event.
Unchanged
Break event-handling without repaint. In the event-loop this waits for the next event.
Changed
Break event-handling and repaints/renders the application.
In the event-loop this calls render.
Message(Message)
Handle an application defined event. This calls message
to distribute the message throughout the application.
This helps with interactions between parts of the application.
Quit
Quit the application.
Trait Implementations§
source§impl<Message> ConsumedEvent for Control<Message>
impl<Message> ConsumedEvent for Control<Message>
source§impl<Message> From<ButtonOutcome> for Control<Message>
impl<Message> From<ButtonOutcome> for Control<Message>
source§fn from(value: ButtonOutcome) -> Self
fn from(value: ButtonOutcome) -> Self
Converts to this type from the input type.
source§impl<Message> From<CalOutcome> for Control<Message>
impl<Message> From<CalOutcome> for Control<Message>
source§fn from(value: CalOutcome) -> Self
fn from(value: CalOutcome) -> Self
Converts to this type from the input type.
source§impl<Message> From<DoubleClickOutcome> for Control<Message>
impl<Message> From<DoubleClickOutcome> for Control<Message>
source§fn from(value: DoubleClickOutcome) -> Self
fn from(value: DoubleClickOutcome) -> Self
Converts to this type from the input type.
source§impl<Message> From<EditOutcome> for Control<Message>
impl<Message> From<EditOutcome> for Control<Message>
source§fn from(value: EditOutcome) -> Self
fn from(value: EditOutcome) -> Self
Converts to this type from the input type.
source§impl<Message> From<FileOutcome> for Control<Message>
impl<Message> From<FileOutcome> for Control<Message>
source§fn from(value: FileOutcome) -> Self
fn from(value: FileOutcome) -> Self
Converts to this type from the input type.
source§impl<Message> From<MenuOutcome> for Control<Message>
impl<Message> From<MenuOutcome> for Control<Message>
source§fn from(value: MenuOutcome) -> Self
fn from(value: MenuOutcome) -> Self
Converts to this type from the input type.
source§impl<Message> From<ScrollOutcome> for Control<Message>
impl<Message> From<ScrollOutcome> for Control<Message>
source§fn from(value: ScrollOutcome) -> Self
fn from(value: ScrollOutcome) -> Self
Converts to this type from the input type.
source§impl<Message> From<TabbedOutcome> for Control<Message>
impl<Message> From<TabbedOutcome> for Control<Message>
source§fn from(value: TabbedOutcome) -> Self
fn from(value: TabbedOutcome) -> Self
Converts to this type from the input type.
source§impl<Message> From<TextOutcome> for Control<Message>
impl<Message> From<TextOutcome> for Control<Message>
source§fn from(value: TextOutcome) -> Self
fn from(value: TextOutcome) -> Self
Converts to this type from the input type.
source§impl<Message: Ord> Ord for Control<Message>
impl<Message: Ord> Ord for Control<Message>
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<Message: PartialOrd> PartialOrd for Control<Message>
impl<Message: PartialOrd> PartialOrd for Control<Message>
impl<Message: Copy> Copy for Control<Message>
impl<Message: Eq> Eq for Control<Message>
impl<Message> StructuralPartialEq for Control<Message>
Auto Trait Implementations§
impl<Message> Freeze for Control<Message>where
Message: Freeze,
impl<Message> RefUnwindSafe for Control<Message>where
Message: RefUnwindSafe,
impl<Message> Send for Control<Message>where
Message: Send,
impl<Message> Sync for Control<Message>where
Message: Sync,
impl<Message> Unpin for Control<Message>where
Message: Unpin,
impl<Message> UnwindSafe for Control<Message>where
Message: 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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<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