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§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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)