pub struct ScrollSpringSimulation { /* private fields */ }Expand description
A SpringSimulation that reports exactly end once settled, rather
than the residual sub-tolerance displacement the closed form still carries.
The scroll surfaces’ spring: a bounce-back must leave the position on the edge value it was springing to, not a fraction of a pixel off it, or the next gesture starts from a technically-overscrolled position.
Implementations§
Source§impl ScrollSpringSimulation
impl ScrollSpringSimulation
Sourcepub fn new(
spring: SpringDescription,
start: f64,
end: f64,
velocity: f64,
tolerance: Tolerance,
) -> Self
pub fn new( spring: SpringDescription, start: f64, end: f64, velocity: f64, tolerance: Tolerance, ) -> Self
A spring released at start moving velocity px/s, pulling toward
end, snapping onto end once settled.
Sourcepub fn spring_type(&self) -> SpringType
pub fn spring_type(&self) -> SpringType
Which solution class the spring’s parameters resolved to.
Trait Implementations§
Source§impl Clone for ScrollSpringSimulation
impl Clone for ScrollSpringSimulation
Source§impl Debug for ScrollSpringSimulation
impl Debug for ScrollSpringSimulation
Source§impl Simulation for ScrollSpringSimulation
impl Simulation for ScrollSpringSimulation
Auto Trait Implementations§
impl Freeze for ScrollSpringSimulation
impl RefUnwindSafe for ScrollSpringSimulation
impl Send for ScrollSpringSimulation
impl Sync for ScrollSpringSimulation
impl Unpin for ScrollSpringSimulation
impl UnsafeUnpin for ScrollSpringSimulation
impl UnwindSafe for ScrollSpringSimulation
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.