#[non_exhaustive]pub enum ScrollSource {
Wheel,
Trackpad,
TouchPan,
Programmatic,
}Expand description
What produced a scroll.
Read by a consumer that must treat a precise pixel stream differently from a notched wheel — the classic case being “one wheel notch = one item” versus “follow the trackpad exactly”.
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.
Wheel
A notched mouse wheel. The default.
Trackpad
A precision trackpad or a free-spinning wheel.
TouchPan
A pan gesture synthesised from a direct pointer dragging the content.
Programmatic
The app scrolled itself (a keyboard command, ensure_visible, an
animation).
Trait Implementations§
Source§impl Clone for ScrollSource
impl Clone for ScrollSource
impl Copy for ScrollSource
Source§impl Debug for ScrollSource
impl Debug for ScrollSource
Source§impl Default for ScrollSource
impl Default for ScrollSource
impl Eq for ScrollSource
Source§impl Hash for ScrollSource
impl Hash for ScrollSource
Source§impl PartialEq for ScrollSource
impl PartialEq for ScrollSource
impl StructuralPartialEq for ScrollSource
Auto Trait Implementations§
impl Freeze for ScrollSource
impl RefUnwindSafe for ScrollSource
impl Send for ScrollSource
impl Sync for ScrollSource
impl Unpin for ScrollSource
impl UnsafeUnpin for ScrollSource
impl UnwindSafe for ScrollSource
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