#[non_exhaustive]pub enum DialogControl<Event> {
Continue,
Unchanged,
Changed,
Event(Event),
Close(Option<Event>),
ToFront,
Quit,
}
Expand description
Extends rat-salsa::Control with some dialog specific options.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future 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
.
Event(Event)
Return back some application event.
Close(Option<Event>)
Close the dialog
ToFront
Move to front
Quit
Quit
Trait Implementations§
Source§impl<Event: Clone> Clone for DialogControl<Event>
impl<Event: Clone> Clone for DialogControl<Event>
Source§fn clone(&self) -> DialogControl<Event>
fn clone(&self) -> DialogControl<Event>
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<Event> ConsumedEvent for DialogControl<Event>
impl<Event> ConsumedEvent for DialogControl<Event>
Source§fn is_consumed(&self) -> bool
fn is_consumed(&self) -> bool
Is this the ‘consumed’ result.
Source§fn or_else_try<F, E>(self, f: F) -> Result<Self, E>
fn or_else_try<F, E>(self, f: F) -> Result<Self, E>
Or-Else chaining with
is_consumed()
as the split.Source§fn and_then<F>(self, f: F) -> Self
fn and_then<F>(self, f: F) -> Self
And_then-chaining based on is_consumed().
Returns max(self, f()).
Source§fn and_then_try<F, E>(self, f: F) -> Result<Self, E>
fn and_then_try<F, E>(self, f: F) -> Result<Self, E>
And_then-chaining based on is_consumed().
Returns max(self, f()).
Source§impl<Event: Debug> Debug for DialogControl<Event>
impl<Event: Debug> Debug for DialogControl<Event>
Source§impl<Event: Ord> Ord for DialogControl<Event>
impl<Event: Ord> Ord for DialogControl<Event>
Source§fn cmp(&self, other: &DialogControl<Event>) -> Ordering
fn cmp(&self, other: &DialogControl<Event>) -> Ordering
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<Event: PartialEq> PartialEq for DialogControl<Event>
impl<Event: PartialEq> PartialEq for DialogControl<Event>
Source§impl<Event: PartialOrd> PartialOrd for DialogControl<Event>
impl<Event: PartialOrd> PartialOrd for DialogControl<Event>
impl<Event: Copy> Copy for DialogControl<Event>
impl<Event: Eq> Eq for DialogControl<Event>
impl<Event> StructuralPartialEq for DialogControl<Event>
Auto Trait Implementations§
impl<Event> Freeze for DialogControl<Event>where
Event: Freeze,
impl<Event> RefUnwindSafe for DialogControl<Event>where
Event: RefUnwindSafe,
impl<Event> Send for DialogControl<Event>where
Event: Send,
impl<Event> Sync for DialogControl<Event>where
Event: Sync,
impl<Event> Unpin for DialogControl<Event>where
Event: Unpin,
impl<Event> UnwindSafe for DialogControl<Event>where
Event: 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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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