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<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 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