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: FnOnce() + 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: FnOnce() + 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,

source§

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,

source§

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

source§

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

source§

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

source§

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

Implementors§