pub struct SplineBasedDecaySpec { /* private fields */ }Expand description
Spline-based decay animation spec matching Android fling behavior.
Implementations§
Source§impl SplineBasedDecaySpec
impl SplineBasedDecaySpec
Sourcepub fn with_calculator(calculator: FlingCalculator) -> Self
pub fn with_calculator(calculator: FlingCalculator) -> Self
Create a spec with a custom FlingCalculator.
Trait Implementations§
Source§impl Clone for SplineBasedDecaySpec
impl Clone for SplineBasedDecaySpec
Source§fn clone(&self) -> SplineBasedDecaySpec
fn clone(&self) -> SplineBasedDecaySpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SplineBasedDecaySpec
Source§impl Debug for SplineBasedDecaySpec
impl Debug for SplineBasedDecaySpec
Source§impl FloatDecayAnimationSpec for SplineBasedDecaySpec
impl FloatDecayAnimationSpec for SplineBasedDecaySpec
Source§fn abs_velocity_threshold(&self) -> f32
fn abs_velocity_threshold(&self) -> f32
Velocity threshold below which animation is considered finished.
Source§fn get_value_from_nanos(
&self,
play_time_nanos: i64,
initial_value: f32,
initial_velocity: f32,
) -> f32
fn get_value_from_nanos( &self, play_time_nanos: i64, initial_value: f32, initial_velocity: f32, ) -> f32
Get position at a given time.
Source§fn get_velocity_from_nanos(
&self,
play_time_nanos: i64,
_initial_value: f32,
initial_velocity: f32,
) -> f32
fn get_velocity_from_nanos( &self, play_time_nanos: i64, _initial_value: f32, initial_velocity: f32, ) -> f32
Get velocity at a given time.
Auto Trait Implementations§
impl Freeze for SplineBasedDecaySpec
impl RefUnwindSafe for SplineBasedDecaySpec
impl Send for SplineBasedDecaySpec
impl Sync for SplineBasedDecaySpec
impl Unpin for SplineBasedDecaySpec
impl UnsafeUnpin for SplineBasedDecaySpec
impl UnwindSafe for SplineBasedDecaySpec
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