Skip to main content

AnimationExt

Trait AnimationExt 

Source
pub trait AnimationExt<T>: Sized + Animation<T>
where T: Animatable,
{ // Provided methods fn boxed(self) -> Box<dyn Animation<T>> { ... } fn then(self, next: impl Animation<T>) -> Sequence<T> { ... } fn delay(self, duration: impl Into<Duration>) -> Sequence<T> { ... } }
Expand description

Convenience methods for concrete animation sources.

Provided Methods§

Source

fn boxed(self) -> Box<dyn Animation<T>>

Type-erases this animation for use in transition factories.

Source

fn then(self, next: impl Animation<T>) -> Sequence<T>

Runs this animation followed by next.

Source

fn delay(self, duration: impl Into<Duration>) -> Sequence<T>

Delays the start of this animation while holding its current value.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, A> AnimationExt<T> for A
where T: Animatable, A: Animation<T>,