Trait cushy::animation::IntoAnimate

source ·
pub trait IntoAnimate: Sized + Send + Sync {
    type Animate: Animate;

    // Required method
    fn into_animate(self) -> Self::Animate;

    // Provided methods
    fn to_animate(&self) -> Self::Animate
       where Self: Clone { ... }
    fn and_then<Other: IntoAnimate>(self, other: Other) -> Chain<Self, Other> { ... }
    fn cycle(self) -> Cycle<Self>
       where Self: Clone { ... }
    fn repeat(self, times: usize) -> Cycle<Self>
       where Self: Clone { ... }
    fn on_complete<F>(self, on_complete: F) -> OnCompleteAnimation<Self>
       where F: FnMut() + Send + Sync + 'static { ... }
}
Expand description

A type that can be converted into an animation.

Required Associated Types§

source

type Animate: Animate

The running animation type.

Required Methods§

source

fn into_animate(self) -> Self::Animate

Return this change as a running animation.

Provided Methods§

source

fn to_animate(&self) -> Self::Animate
where Self: Clone,

Returns a clone of this change as a running animation.

source

fn and_then<Other: IntoAnimate>(self, other: Other) -> Chain<Self, Other>

Returns an combined animation that performs self and other in sequence.

source

fn cycle(self) -> Cycle<Self>
where Self: Clone,

Returns an animation that repeats self indefinitely.

source

fn repeat(self, times: usize) -> Cycle<Self>
where Self: Clone,

Returns an animation that repeats a number of times before completing.

source

fn on_complete<F>(self, on_complete: F) -> OnCompleteAnimation<Self>
where F: FnMut() + Send + Sync + 'static,

Invokes on_complete after this animation finishes.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoAnimate for Duration

source§

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

§

type Animate = (<T0 as IntoAnimate>::Animate,)

source§

fn into_animate(self) -> Self::Animate

source§

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

§

type Animate = (<T0 as IntoAnimate>::Animate, <T1 as IntoAnimate>::Animate)

source§

fn into_animate(self) -> Self::Animate

source§

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

§

type Animate = (<T0 as IntoAnimate>::Animate, <T1 as IntoAnimate>::Animate, <T2 as IntoAnimate>::Animate)

source§

fn into_animate(self) -> Self::Animate

source§

impl<T0, T1, T2, T3> IntoAnimate for (T0, T1, T2, T3)

§

type Animate = (<T0 as IntoAnimate>::Animate, <T1 as IntoAnimate>::Animate, <T2 as IntoAnimate>::Animate, <T3 as IntoAnimate>::Animate)

source§

fn into_animate(self) -> Self::Animate

source§

impl<T0, T1, T2, T3, T4> IntoAnimate for (T0, T1, T2, T3, T4)

§

type Animate = (<T0 as IntoAnimate>::Animate, <T1 as IntoAnimate>::Animate, <T2 as IntoAnimate>::Animate, <T3 as IntoAnimate>::Animate, <T4 as IntoAnimate>::Animate)

source§

fn into_animate(self) -> Self::Animate

source§

impl<T0, T1, T2, T3, T4, T5> IntoAnimate for (T0, T1, T2, T3, T4, T5)

§

type Animate = (<T0 as IntoAnimate>::Animate, <T1 as IntoAnimate>::Animate, <T2 as IntoAnimate>::Animate, <T3 as IntoAnimate>::Animate, <T4 as IntoAnimate>::Animate, <T5 as IntoAnimate>::Animate)

source§

fn into_animate(self) -> Self::Animate

Implementors§

source§

impl<A> IntoAnimate for Cycle<A>
where A: IntoAnimate + Clone,

§

type Animate = Cycle<A>

source§

impl<A> IntoAnimate for OnCompleteAnimation<A>
where A: IntoAnimate,

source§

impl<A, B> IntoAnimate for Chain<A, B>
where A: IntoAnimate, B: IntoAnimate,

§

type Animate = RunningChain<A, B>

source§

impl<T, Easing> IntoAnimate for Animation<T, Easing>
where T: AnimationTarget, Easing: Easing,