pub struct EasedValue {
pub from: f64,
pub to: f64,
pub duration: f64,
pub elapsed: f64,
pub easing: Easing,
}Expand description
An easing-based animated value.
Fields§
§from: f64Start value
to: f64End value
duration: f64Total duration in seconds
elapsed: f64Elapsed time
easing: EasingEasing function
Implementations§
Source§impl EasedValue
impl EasedValue
Sourcepub fn with_easing(self, easing: Easing) -> Self
pub fn with_easing(self, easing: Easing) -> Self
Set easing function.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether animation is complete.
Trait Implementations§
Source§impl Clone for EasedValue
impl Clone for EasedValue
Source§fn clone(&self) -> EasedValue
fn clone(&self) -> EasedValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EasedValue
impl RefUnwindSafe for EasedValue
impl Send for EasedValue
impl Sync for EasedValue
impl Unpin for EasedValue
impl UnwindSafe for EasedValue
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more