#[repr(u8)]pub enum Easing {
Linear = 0,
EaseIn = 1,
EaseOut = 2,
EaseInOut = 3,
Spring = 4,
EaseOutBack = 5,
Bounce = 6,
Elastic = 7,
}Expand description
动画缓动曲线类型。
Variants§
Linear = 0
线性匀速插值。
EaseIn = 1
三次方渐入(加速)。
EaseOut = 2
三次方渐出(减速,默认)。
EaseInOut = 3
三次方渐入渐出(S 型曲线)。
Spring = 4
欠阻尼弹簧过冲曲线(带约 8% 物理回弹质感)。
EaseOutBack = 5
回拉过冲渐出(easeOutBack,末端约 10% 过冲后回落,适合弹窗/卡片入场)。
Bounce = 6
落地弹跳渐出(easeOutBounce,模拟小球落地多次弹跳,结果不超出 0..=256)。
Elastic = 7
弹性振荡渐出(easeOutElastic,指数衰减正弦振荡,适合提醒/抖动效果)。
Implementations§
Trait Implementations§
impl Copy for Easing
impl Eq for Easing
impl StructuralPartialEq for Easing
Auto Trait Implementations§
impl Forget for Easing
impl Freeze for Easing
impl Move for Easing
impl RefUnwindSafe for Easing
impl Send for Easing
impl Sync for Easing
impl Unpin for Easing
impl UnsafeUnpin for Easing
impl UnwindSafe for Easing
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FluentBuilder for T
impl<T> FluentBuilder for T
Source§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Self
当
condition 为 true 时执行闭包修饰自身,否则原样返回。Source§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Self
fn when_else( self, condition: bool, then: impl FnOnce(Self) -> Self, else_fn: impl FnOnce(Self) -> Self, ) -> Self
根据
condition 在两个修饰分支之间二选一。Source§fn when_some<O>(
self,
option: Option<O>,
then: impl FnOnce(Self, O) -> Self,
) -> Self
fn when_some<O>( self, option: Option<O>, then: impl FnOnce(Self, O) -> Self, ) -> Self
当
option 为 Some(value) 时执行闭包修饰自身,否则原样返回。