Enum rat_widget::event::Outcome
source · pub enum Outcome {
Continue,
Unchanged,
Changed,
}Expand description
The baseline outcome for an event-handler.
A widget can define its own type, if it has more things to report. It would be nice if those types are convertible to/from Outcome.
Variants§
Continue
The given event has not been used at all.
Unchanged
The event has been recognized, but nothing noticeable has changed. Further processing for this event may stop. Rendering the ui is not necessary.
Changed
The event has been recognized and there is some change due to it. Further processing for this event may stop. Rendering the ui is advised.
Trait Implementations§
source§impl ConsumedEvent for Outcome
impl ConsumedEvent for Outcome
source§fn is_consumed(&self) -> bool
fn is_consumed(&self) -> bool
Is this the ‘consumed’ result.
source§fn or_else_try<F, E1>(self, f: F) -> Result<Self, E1>
fn or_else_try<F, E1>(self, f: F) -> Result<Self, E1>
Or-Else chaining with
is_consumed() as the split.source§impl From<ButtonOutcome> for Outcome
impl From<ButtonOutcome> for Outcome
source§fn from(value: ButtonOutcome) -> Self
fn from(value: ButtonOutcome) -> Self
Converts to this type from the input type.
source§impl From<CalOutcome> for Outcome
impl From<CalOutcome> for Outcome
source§fn from(value: CalOutcome) -> Self
fn from(value: CalOutcome) -> Self
Converts to this type from the input type.
source§impl From<DoubleClickOutcome> for Outcome
impl From<DoubleClickOutcome> for Outcome
source§fn from(value: DoubleClickOutcome) -> Outcome
fn from(value: DoubleClickOutcome) -> Outcome
Converts to this type from the input type.
source§impl From<EditOutcome> for Outcome
impl From<EditOutcome> for Outcome
source§fn from(value: EditOutcome) -> Outcome
fn from(value: EditOutcome) -> Outcome
Converts to this type from the input type.
source§impl From<FileOutcome> for Outcome
impl From<FileOutcome> for Outcome
source§fn from(value: FileOutcome) -> Self
fn from(value: FileOutcome) -> Self
Converts to this type from the input type.
source§impl From<MenuOutcome> for Outcome
impl From<MenuOutcome> for Outcome
source§fn from(value: MenuOutcome) -> Self
fn from(value: MenuOutcome) -> Self
Converts to this type from the input type.
source§impl From<Outcome> for CalOutcome
impl From<Outcome> for CalOutcome
source§impl From<Outcome> for DoubleClickOutcome
impl From<Outcome> for DoubleClickOutcome
source§fn from(value: Outcome) -> DoubleClickOutcome
fn from(value: Outcome) -> DoubleClickOutcome
Converts to this type from the input type.
source§impl From<Outcome> for EditOutcome
impl From<Outcome> for EditOutcome
source§fn from(value: Outcome) -> EditOutcome
fn from(value: Outcome) -> EditOutcome
Converts to this type from the input type.
source§impl From<Outcome> for FileOutcome
impl From<Outcome> for FileOutcome
source§impl From<Outcome> for TabbedOutcome
impl From<Outcome> for TabbedOutcome
source§impl From<Outcome> for TextOutcome
impl From<Outcome> for TextOutcome
source§fn from(value: Outcome) -> TextOutcome
fn from(value: Outcome) -> TextOutcome
Converts to this type from the input type.
source§impl From<ScrollOutcome> for Outcome
impl From<ScrollOutcome> for Outcome
source§fn from(value: ScrollOutcome) -> Outcome
fn from(value: ScrollOutcome) -> Outcome
Converts to this type from the input type.
source§impl From<TabbedOutcome> for Outcome
impl From<TabbedOutcome> for Outcome
source§fn from(value: TabbedOutcome) -> Self
fn from(value: TabbedOutcome) -> Self
Converts to this type from the input type.
source§impl From<TextOutcome> for Outcome
impl From<TextOutcome> for Outcome
source§fn from(value: TextOutcome) -> Outcome
fn from(value: TextOutcome) -> Outcome
Converts to this type from the input type.
source§impl From<bool> for Outcome
impl From<bool> for Outcome
Widgets often define functions that return bool to indicate a changed state.
This converts true / false to Outcome::Changed / Outcome::Unchanged.
source§impl<E, Q> HandleEvent<E, Q, Outcome> for ()
impl<E, Q> HandleEvent<E, Q, Outcome> for ()
Catch all event-handler for the null state ().
source§impl HandleEvent<Event, Dialog, Outcome> for MsgDialogState
impl HandleEvent<Event, Dialog, Outcome> for MsgDialogState
source§impl HandleEvent<Event, MouseOnly, Outcome> for ListState<NoSelection>
impl HandleEvent<Event, MouseOnly, Outcome> for ListState<NoSelection>
source§impl HandleEvent<Event, MouseOnly, Outcome> for ListState<RowSelection>
impl HandleEvent<Event, MouseOnly, Outcome> for ListState<RowSelection>
source§impl HandleEvent<Event, MouseOnly, Outcome> for ListState<RowSetSelection>
impl HandleEvent<Event, MouseOnly, Outcome> for ListState<RowSetSelection>
source§impl HandleEvent<Event, MouseOnly, Outcome> for ParagraphState
impl HandleEvent<Event, MouseOnly, Outcome> for ParagraphState
source§impl HandleEvent<Event, MouseOnly, Outcome> for SplitState
impl HandleEvent<Event, MouseOnly, Outcome> for SplitState
source§impl HandleEvent<Event, MouseOnly, Outcome> for TableState<CellSelection>
impl HandleEvent<Event, MouseOnly, Outcome> for TableState<CellSelection>
source§impl HandleEvent<Event, MouseOnly, Outcome> for TableState<NoSelection>
impl HandleEvent<Event, MouseOnly, Outcome> for TableState<NoSelection>
source§impl HandleEvent<Event, MouseOnly, Outcome> for TableState<RowSelection>
impl HandleEvent<Event, MouseOnly, Outcome> for TableState<RowSelection>
source§impl HandleEvent<Event, MouseOnly, Outcome> for TableState<RowSetSelection>
impl HandleEvent<Event, MouseOnly, Outcome> for TableState<RowSetSelection>
source§impl HandleEvent<Event, Regular, Outcome> for ListState<NoSelection>
impl HandleEvent<Event, Regular, Outcome> for ListState<NoSelection>
source§impl HandleEvent<Event, Regular, Outcome> for ListState<RowSelection>
impl HandleEvent<Event, Regular, Outcome> for ListState<RowSelection>
source§impl HandleEvent<Event, Regular, Outcome> for ListState<RowSetSelection>
impl HandleEvent<Event, Regular, Outcome> for ListState<RowSetSelection>
source§impl HandleEvent<Event, Regular, Outcome> for ParagraphState
impl HandleEvent<Event, Regular, Outcome> for ParagraphState
source§impl HandleEvent<Event, Regular, Outcome> for SplitState
impl HandleEvent<Event, Regular, Outcome> for SplitState
source§impl HandleEvent<Event, Regular, Outcome> for TableState<CellSelection>
impl HandleEvent<Event, Regular, Outcome> for TableState<CellSelection>
source§impl HandleEvent<Event, Regular, Outcome> for TableState<NoSelection>
impl HandleEvent<Event, Regular, Outcome> for TableState<NoSelection>
source§impl HandleEvent<Event, Regular, Outcome> for TableState<RowSelection>
impl HandleEvent<Event, Regular, Outcome> for TableState<RowSelection>
source§impl HandleEvent<Event, Regular, Outcome> for TableState<RowSetSelection>
impl HandleEvent<Event, Regular, Outcome> for TableState<RowSetSelection>
source§impl Ord for Outcome
impl Ord for Outcome
source§impl PartialOrd for Outcome
impl PartialOrd for Outcome
impl Copy for Outcome
impl Eq for Outcome
impl StructuralPartialEq for Outcome
Auto Trait Implementations§
impl Freeze for Outcome
impl RefUnwindSafe for Outcome
impl Send for Outcome
impl Sync for Outcome
impl Unpin for Outcome
impl UnwindSafe for Outcome
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