pub struct AnimatedProperty<T> { /* private fields */ }Expand description
An animated property that smoothly transitions between values.
Use this in widget state to animate property changes automatically.
Implementations§
Source§impl<T: Clone> AnimatedProperty<T>
impl<T: Clone> AnimatedProperty<T>
Sourcepub fn with_config(value: T, config: TransitionConfig) -> Self
pub fn with_config(value: T, config: TransitionConfig) -> Self
Create with a custom transition config.
Sourcepub const fn is_animating(&self) -> bool
pub const fn is_animating(&self) -> bool
Check if currently animating.
Sourcepub fn set_immediate(&mut self, value: T)
pub fn set_immediate(&mut self, value: T)
Set value immediately without animation.
Sourcepub fn eased_progress(&self) -> f32
pub fn eased_progress(&self) -> f32
Get eased progress.
Source§impl AnimatedProperty<f32>
impl AnimatedProperty<f32>
Source§impl AnimatedProperty<f64>
impl AnimatedProperty<f64>
Source§impl AnimatedProperty<Color>
impl AnimatedProperty<Color>
Source§impl AnimatedProperty<Point>
impl AnimatedProperty<Point>
Trait Implementations§
Source§impl<T: Clone> Clone for AnimatedProperty<T>
impl<T: Clone> Clone for AnimatedProperty<T>
Source§fn clone(&self) -> AnimatedProperty<T>
fn clone(&self) -> AnimatedProperty<T>
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 moreSource§impl<T: Debug> Debug for AnimatedProperty<T>
impl<T: Debug> Debug for AnimatedProperty<T>
Auto Trait Implementations§
impl<T> Freeze for AnimatedProperty<T>where
T: Freeze,
impl<T> RefUnwindSafe for AnimatedProperty<T>where
T: RefUnwindSafe,
impl<T> Send for AnimatedProperty<T>where
T: Send,
impl<T> Sync for AnimatedProperty<T>where
T: Sync,
impl<T> Unpin for AnimatedProperty<T>where
T: Unpin,
impl<T> UnwindSafe for AnimatedProperty<T>where
T: UnwindSafe,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().