pub enum ScrollOutcome {
Continue,
Unchanged,
Changed,
Up(usize),
Down(usize),
Left(usize),
Right(usize),
VPos(usize),
HPos(usize),
}Expand description
Result of event-handling for a scroll.
All values are in terms of offset.
Variants§
Continue
The given event has not been used at all.
Unchanged
The event has been recognized, but the result was nil. Further processing for this event may stop.
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.
Up(usize)
Scroll delta.
Down(usize)
Scroll delta.
Left(usize)
Scroll delta.
Right(usize)
Scroll delta.
VPos(usize)
Absolute position.
HPos(usize)
Absolute position.
Trait Implementations§
Source§impl Clone for ScrollOutcome
impl Clone for ScrollOutcome
Source§fn clone(&self) -> ScrollOutcome
fn clone(&self) -> ScrollOutcome
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 ConsumedEvent for ScrollOutcome
impl ConsumedEvent for ScrollOutcome
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 Debug for ScrollOutcome
impl Debug for ScrollOutcome
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 HandleEvent<Event, MouseOnly, ScrollOutcome> for ScrollAreaState<'_>
Handle scrolling for the whole area spanned by the two scroll-states.
impl HandleEvent<Event, MouseOnly, ScrollOutcome> for ScrollAreaState<'_>
Handle scrolling for the whole area spanned by the two scroll-states.
Source§impl HandleEvent<Event, MouseOnly, ScrollOutcome> for ScrollState
impl HandleEvent<Event, MouseOnly, ScrollOutcome> for ScrollState
Source§impl Ord for ScrollOutcome
impl Ord for ScrollOutcome
Source§fn cmp(&self, other: &ScrollOutcome) -> Ordering
fn cmp(&self, other: &ScrollOutcome) -> 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 PartialEq for ScrollOutcome
impl PartialEq for ScrollOutcome
Source§impl PartialOrd for ScrollOutcome
impl PartialOrd for ScrollOutcome
impl Copy for ScrollOutcome
impl Eq for ScrollOutcome
impl StructuralPartialEq for ScrollOutcome
Auto Trait Implementations§
impl Freeze for ScrollOutcome
impl RefUnwindSafe for ScrollOutcome
impl Send for ScrollOutcome
impl Sync for ScrollOutcome
impl Unpin for ScrollOutcome
impl UnwindSafe for ScrollOutcome
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