pub trait AnimationTarget: Sized + Send + Sync {
    type Running: AnimateTarget;

    // Required method
    fn begin(self) -> Self::Running;

    // Provided methods
    fn over(self, duration: Duration) -> Animation<Self, Linear> { ... }
    fn immediately(self) -> Animation<Self, Linear> { ... }
}
Expand description

A target for a timed Animation.

Required Associated Types§

source

type Running: AnimateTarget

The type that can linearly interpolate this target.

Required Methods§

source

fn begin(self) -> Self::Running

Record the current value of the target, and return a type that can linearly interpolate between the current value and the desired value.

Provided Methods§

source

fn over(self, duration: Duration) -> Animation<Self, Linear>

Returns a pending animation that linearly transitions self over duration.

A different Easing can be used by calling with_easing on the result of this function.

source

fn immediately(self) -> Animation<Self, Linear>

Returns a pending animation that transitions to the target values after no delay.

Implementations on Foreign Types§

source§

impl<T0, T1> AnimationTarget for (T0, T1)where T0: AnimationTarget, T1: AnimationTarget,

§

type Running = (<T0 as AnimationTarget>::Running, <T1 as AnimationTarget>::Running)

source§

fn begin(self) -> Self::Running

source§

impl<T0, T1, T2> AnimationTarget for (T0, T1, T2)where T0: AnimationTarget, T1: AnimationTarget, T2: AnimationTarget,

source§

impl<T0, T1, T2, T3, T4, T5> AnimationTarget for (T0, T1, T2, T3, T4, T5)where T0: AnimationTarget, T1: AnimationTarget, T2: AnimationTarget, T3: AnimationTarget, T4: AnimationTarget, T5: AnimationTarget,

source§

impl<T0, T1, T2, T3> AnimationTarget for (T0, T1, T2, T3)where T0: AnimationTarget, T1: AnimationTarget, T2: AnimationTarget, T3: AnimationTarget,

source§

impl<T0, T1, T2, T3, T4> AnimationTarget for (T0, T1, T2, T3, T4)where T0: AnimationTarget, T1: AnimationTarget, T2: AnimationTarget, T3: AnimationTarget, T4: AnimationTarget,

source§

impl<T0> AnimationTarget for (T0,)where T0: AnimationTarget,

§

type Running = (<T0 as AnimationTarget>::Running,)

source§

fn begin(self) -> Self::Running

Implementors§