#[non_exhaustive]pub enum Transition {
Instant,
Tween {
duration: f32,
easing: Easing,
},
Spring(Spring),
}Expand description
How a value travels to a new target.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Instant
No animation.
Tween
A fixed duration along a curve.
Spring(Spring)
A spring, which takes as long as it takes and keeps velocity when redirected.
Implementations§
Source§impl Transition
impl Transition
Sourcepub const fn draw_in() -> Self
pub const fn draw_in() -> Self
Data drawing in the first time a chart is painted (the duration-draw token):
long, and fast at first, so the shape reads at once and settles softly.
Sourcepub const fn without_bounce(self) -> Self
pub const fn without_bounce(self) -> Self
The version of this transition for properties that stay animated under reduced motion (color, opacity): a spring becomes a short fade.
Trait Implementations§
Source§impl Clone for Transition
impl Clone for Transition
Source§fn clone(&self) -> Transition
fn clone(&self) -> Transition
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 Transition
Source§impl Debug for Transition
impl Debug for Transition
Source§impl PartialEq for Transition
impl PartialEq for Transition
impl StructuralPartialEq for Transition
Auto Trait Implementations§
impl Freeze for Transition
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnsafeUnpin for Transition
impl UnwindSafe for Transition
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