pub struct TweenSimulation { /* private fields */ }Expand description
An eased tween from start to end over a fixed duration (seconds) —
see the module docs. Not a port: frust’s own, built from Curve rather
than a Flutter source.
Implementations§
Source§impl TweenSimulation
impl TweenSimulation
Sourcepub fn new(start: f64, end: f64, duration: f64, curve: Curve) -> Self
pub fn new(start: f64, end: f64, duration: f64, curve: Curve) -> Self
A tween from start to end over duration seconds, eased by
curve. A non-positive or non-finite duration (0.0, negative, or
NaN, each a caller mistake this never panics on) collapses to a
simulation that is immediately TweenSimulation::is_done at end —
callers that actually want an instant move should prefer
crate::scroll_controller::ScrollController::jump_to, which never
constructs a simulation at all.
Trait Implementations§
Source§impl Clone for TweenSimulation
impl Clone for TweenSimulation
impl Copy for TweenSimulation
Source§impl Debug for TweenSimulation
impl Debug for TweenSimulation
Auto Trait Implementations§
impl Freeze for TweenSimulation
impl RefUnwindSafe for TweenSimulation
impl Send for TweenSimulation
impl Sync for TweenSimulation
impl Unpin for TweenSimulation
impl UnsafeUnpin for TweenSimulation
impl UnwindSafe for TweenSimulation
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.