Enum rat_widget::event::ScrollOutcome
source · pub enum ScrollOutcome<R> {
NotUsed,
Unchanged,
Changed,
Inner(R),
}Expand description
Result value for event-handling. Used widgets in this crate.
Variants§
NotUsed
The given event was not handled at all.
Unchanged
The event was handled, no repaint necessary.
Changed
The event was handled, repaint necessary.
Inner(R)
Outcome of the inner widget.
Implementations§
source§impl<R> ScrollOutcome<ScrollOutcome<R>>
impl<R> ScrollOutcome<ScrollOutcome<R>>
sourcepub fn flatten(self) -> ScrollOutcome<R>
pub fn flatten(self) -> ScrollOutcome<R>
Compact two layers of Outcome to one.
source§impl<R> ScrollOutcome<ScrollOutcome<ScrollOutcome<R>>>
impl<R> ScrollOutcome<ScrollOutcome<ScrollOutcome<R>>>
sourcepub fn flatten2(self) -> ScrollOutcome<R>
pub fn flatten2(self) -> ScrollOutcome<R>
Compact three layers of Outcome to one.
Trait Implementations§
source§impl<R> Clone for ScrollOutcome<R>where
R: Clone,
impl<R> Clone for ScrollOutcome<R>where
R: Clone,
source§fn clone(&self) -> ScrollOutcome<R>
fn clone(&self) -> ScrollOutcome<R>
Returns a copy 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<R> ConsumedEvent for ScrollOutcome<R>where
R: ConsumedEvent,
impl<R> ConsumedEvent for ScrollOutcome<R>where
R: ConsumedEvent,
source§impl<R> Debug for ScrollOutcome<R>where
R: Debug,
impl<R> Debug for ScrollOutcome<R>where
R: Debug,
source§impl<T> From<ScrollOutcome<T>> for Outcome
impl<T> From<ScrollOutcome<T>> for Outcome
source§fn from(value: ScrollOutcome<T>) -> Outcome
fn from(value: ScrollOutcome<T>) -> Outcome
Converts to this type from the input type.
source§impl<R, WState> HandleEvent<Event, FocusKeys, ScrollOutcome<R>> for ScrolledState<WState>where
WState: ScrollingState + HandleEvent<Event, FocusKeys, R> + HandleEvent<Event, MouseOnly, R>,
R: ConsumedEvent,
impl<R, WState> HandleEvent<Event, FocusKeys, ScrollOutcome<R>> for ScrolledState<WState>where
WState: ScrollingState + HandleEvent<Event, FocusKeys, R> + HandleEvent<Event, MouseOnly, R>,
R: ConsumedEvent,
Handle events or the scrolled widget and forward to the inner widget.
source§impl<R> HandleEvent<Event, FocusKeys, ScrollOutcome<R>> for ViewStatewhere
R: ConsumedEvent,
impl<R> HandleEvent<Event, FocusKeys, ScrollOutcome<R>> for ViewStatewhere
R: ConsumedEvent,
Handle all events. Text events are only processed if focus is true. Mouse events are processed if they are in range.
source§impl<R, S> HandleEvent<Event, FocusKeys, ScrollOutcome<R>> for ViewportState<S>
impl<R, S> HandleEvent<Event, FocusKeys, ScrollOutcome<R>> for ViewportState<S>
Handle events if the widget has the focus.
source§impl<WState, Q, R> HandleEvent<Event, Inner<Q>, ScrollOutcome<R>> for ScrolledState<WState>
impl<WState, Q, R> HandleEvent<Event, Inner<Q>, ScrollOutcome<R>> for ScrolledState<WState>
Forward event-handling to the inner widget.
source§impl<R, WState> HandleEvent<Event, MouseOnly, ScrollOutcome<R>> for ScrolledState<WState>
impl<R, WState> HandleEvent<Event, MouseOnly, ScrollOutcome<R>> for ScrolledState<WState>
Handle events for the Scrolled widget and the scrollbars.
source§impl<R> HandleEvent<Event, MouseOnly, ScrollOutcome<R>> for ViewStatewhere
R: ConsumedEvent,
impl<R> HandleEvent<Event, MouseOnly, ScrollOutcome<R>> for ViewStatewhere
R: ConsumedEvent,
Handle only mouse-events.
source§impl<R, S> HandleEvent<Event, MouseOnly, ScrollOutcome<R>> for ViewportState<S>
impl<R, S> HandleEvent<Event, MouseOnly, ScrollOutcome<R>> for ViewportState<S>
Handle only mouse-events.
source§impl<R> PartialEq for ScrollOutcome<R>where
R: PartialEq,
impl<R> PartialEq for ScrollOutcome<R>where
R: PartialEq,
source§fn eq(&self, other: &ScrollOutcome<R>) -> bool
fn eq(&self, other: &ScrollOutcome<R>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl<R> Copy for ScrollOutcome<R>where
R: Copy,
impl<R> Eq for ScrollOutcome<R>where
R: Eq,
impl<R> StructuralPartialEq for ScrollOutcome<R>
Auto Trait Implementations§
impl<R> Freeze for ScrollOutcome<R>where
R: Freeze,
impl<R> RefUnwindSafe for ScrollOutcome<R>where
R: RefUnwindSafe,
impl<R> Send for ScrollOutcome<R>where
R: Send,
impl<R> Sync for ScrollOutcome<R>where
R: Sync,
impl<R> Unpin for ScrollOutcome<R>where
R: Unpin,
impl<R> UnwindSafe for ScrollOutcome<R>where
R: 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<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