#[non_exhaustive]pub struct Transition {
pub properties: TransitionProps,
pub duration: f32,
pub delay: f32,
pub easing: [f32; 4],
pub spring: Option<Spring>,
}Expand description
transition*: style changes animate natively instead of jumping.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.properties: TransitionPropsProperties that animate.
duration: f32Milliseconds.
delay: f32Milliseconds before it starts.
easing: [f32; 4]Cubic Bézier x1, y1, x2, y2 (a y outside 0..1 overshoots).
spring: Option<Spring>A spring’s physics it runs on instead of easing
(transitionTimingFunction: "spring(stiffness, damping, mass)"),
released at rest: it times itself, lasting until it settles
(Spring::settle_ms), so
duration is not used, nor the spring’s velocity and
frame_rate. A change that arrives mid-way starts again from what
is on screen, at rest.
Implementations§
Trait Implementations§
Source§impl Clone for Transition
impl Clone for Transition
impl Copy for Transition
Source§impl Debug for Transition
impl Debug for Transition
Source§impl Default for Transition
impl Default for Transition
Source§impl PartialEq for Transition
impl PartialEq for Transition
impl StructuralPartialEq for Transition
Auto Trait Implementations§
impl Forget for Transition
impl Freeze for Transition
impl Move 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