cushy::animation

Trait Spawn

source
pub trait Spawn {
    // Required method
    fn spawn(self) -> AnimationHandle;

    // Provided method
    fn launch(self)
       where Self: Sized { ... }
}
Expand description

An animation that can be spawned.

Required Methods§

source

fn spawn(self) -> AnimationHandle

Spawns the animation, returning a handle that tracks the animation.

When the returned handle is dropped, the animation is stopped.

Provided Methods§

source

fn launch(self)
where Self: Sized,

Launches this animation, running it to completion in the background.

Implementations on Foreign Types§

source§

impl Spawn for Box<dyn Animate>

Implementors§

source§

impl<T> Spawn for T
where T: BoxAnimate,