pub struct Motion {
pub kind: MotionKind,
pub duration: Option<f64>,
pub easing: Option<EasingChoice>,
pub direction: Option<Direction>,
pub distance: Option<f32>,
pub size: Option<f32>,
pub fade: Option<bool>,
}Expand description
An entrance or exit, timed from the node’s own start or back from its own end.
Fields§
§kind: MotionKindWhat moves: fade (opacity alone), rise (a slide up), slide (toward direction) or
scale (from size times its size). rise, slide and scale fade too unless fade
is false.
duration: Option<f64>Length in seconds; 0 is no motion. Default: the theme’s fade length.
easing: Option<EasingChoice>The timing curve. Default linear.
direction: Option<Direction>Which way a slide travels, entering into place and leaving out of it. Default up.
distance: Option<f32>How far a rise or slide travels, in pixels. Default: the theme’s margin.
size: Option<f32>The size a scale enters from or exits to, as a multiple of its own. Default 0.
fade: Option<bool>Whether a rise, slide or scale also fades. Default true.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Motion
impl<'de> Deserialize<'de> for Motion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 Motionwhere
RawVecInner: Send,
impl Sync for Motionwhere
RawVecInner: Sync,
impl Unpin for Motion
impl UnsafeUnpin for Motionwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<EasingPoint>: UnsafeUnpin,
impl UnwindSafe for Motionwhere
RawVecInner: UnwindSafe,
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