pub enum Ballistic {
Bouncing(BouncingScrollSimulation),
Clamping(ClampingScrollSimulation),
Spring(SpringSimulation),
}Expand description
The motion a scrollable follows once the finger has let go.
One enum rather than a boxed trait object: it stays Copy, so the runtime can
keep one per axis in a plain map and sample it without an allocation per frame.
Variants§
Bouncing(BouncingScrollSimulation)
Friction then spring-back — the bouncing family.
Clamping(ClampingScrollSimulation)
The platform spline deceleration — the clamping family.
Spring(SpringSimulation)
A plain return to an edge, with no fling.
Trait Implementations§
impl Copy for Ballistic
Auto Trait Implementations§
impl Freeze for Ballistic
impl RefUnwindSafe for Ballistic
impl Send for Ballistic
impl Sync for Ballistic
impl Unpin for Ballistic
impl UnsafeUnpin for Ballistic
impl UnwindSafe for Ballistic
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