pub struct Motion {
pub animation: Animation,
pub properties: MotionProps,
pub restart: bool,
pub delay: f32,
pub lift: Option<Id>,
}Expand description
applies an animation to selected layout properties
Fields§
§animation: Animation§properties: MotionProps§restart: booldiscards carried velocity when retargeting
delay: f32seconds to hold the current layout before moving toward a new one from rest ignored by zero duration animations
lift: Option<Id>while moving to a new parent or anchor, paints above everything under this target, which is ignored unless it was built before the node
Implementations§
Source§impl Motion
impl Motion
Sourcepub fn animation(self, value: impl Into<Animation>) -> Self
pub fn animation(self, value: impl Into<Animation>) -> Self
sets Self::animation
Sourcepub fn properties(self, value: MotionProps) -> Self
pub fn properties(self, value: MotionProps) -> Self
sets Self::properties
Sourcepub fn restart(self, value: bool) -> Self
pub fn restart(self, value: bool) -> Self
sets Self::restart
Sourcepub fn delay(self, value: f32) -> Self
pub fn delay(self, value: f32) -> Self
sets Self::delay
Trait Implementations§
impl Copy for Motion
impl StructuralPartialEq for Motion
Auto Trait Implementations§
impl Forget for Motion
impl Freeze for Motion
impl Move for Motion
impl RefUnwindSafe for Motion
impl Send for Motion
impl Sync for Motion
impl Unpin for Motion
impl UnsafeUnpin for Motionwhere
NonZeroU32Inner: UnsafeUnpin,
impl UnwindSafe for Motion
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