pub struct Transition {
pub ms: u32,
pub easing: Easing,
}Expand description
How long an animation takes and how it moves. Copy it into styles and constants like a color.
Fields§
§ms: u32The time it takes, in milliseconds. 0 jumps straight to the end.
easing: EasingHow it moves.
Implementations§
Source§impl Transition
impl Transition
Sourcepub const fn new(ms: u32) -> Transition
pub const fn new(ms: u32) -> Transition
A transition of ms milliseconds, easing out.
Sourcepub const fn easing(self, easing: Easing) -> Transition
pub const fn easing(self, easing: Easing) -> Transition
The same transition moving as easing says.
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 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