#[non_exhaustive]pub enum ScrollPhase {
Discrete,
Began,
Changed,
Ended,
Momentum,
MomentumEnded,
Fling,
Cancelled,
}Expand description
Where a scroll sits in a continuous gesture.
A wheel notch is Discrete — it has no beginning and no
end — which is why that is the default and why nothing changes for a mouse.
A trackpad gesture and a synthesised touch pan run
Began → Changed* → Ended, optionally followed by Momentum* → MomentumEnded while the content coasts.
#[non_exhaustive]: a rubber-band settle phase is anticipated.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Discrete
A self-contained scroll with no phase structure — a wheel notch. The default, and what every scroll in Teksilo was before the touch programme.
Began
The user’s fingers went down and the gesture began.
Changed
The gesture is in progress.
Ended
The user’s fingers lifted. Any momentum follows separately.
Momentum
The content is coasting after the fingers lifted.
MomentumEnded
The coast finished.
Fling
A one-shot flick with a release velocity, for backends that report a fling rather than a momentum stream.
Cancelled
The gesture was revoked before it ended.
Trait Implementations§
Source§impl Clone for ScrollPhase
impl Clone for ScrollPhase
Source§fn clone(&self) -> ScrollPhase
fn clone(&self) -> ScrollPhase
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more