AnimationExt

Trait AnimationExt 

Source
pub trait AnimationExt {
    // Provided methods
    fn with_animation(
        self,
        id: impl Into<ElementId>,
        animation: Animation,
        animator: impl Fn(Self, f32) -> Self + 'static,
    ) -> AnimationElement<Self>
       where Self: Sized { ... }
    fn with_animations(
        self,
        id: impl Into<ElementId>,
        animations: Vec<Animation>,
        animator: impl Fn(Self, usize, f32) -> Self + 'static,
    ) -> AnimationElement<Self>
       where Self: Sized { ... }
}
Expand description

An extension trait for adding the animation wrapper to both Elements and Components

Provided Methods§

Source

fn with_animation( self, id: impl Into<ElementId>, animation: Animation, animator: impl Fn(Self, f32) -> Self + 'static, ) -> AnimationElement<Self>
where Self: Sized,

Render this component or element with an animation

Source

fn with_animations( self, id: impl Into<ElementId>, animations: Vec<Animation>, animator: impl Fn(Self, usize, f32) -> Self + 'static, ) -> AnimationElement<Self>
where Self: Sized,

Render this component or element with a chain of animations

Implementors§

Source§

impl<E: IntoElement + 'static> AnimationExt for E