LaggedAnim

Trait LaggedAnim 

Source
pub trait LaggedAnim<T>: Sized + 'static {
    // Required method
    fn lagged(
        &mut self,
        lag_ratio: f64,
        anim_func: impl FnMut(&mut T) -> AnimationCell<T>,
    ) -> AnimationCell<Vec<T>>;
}
Expand description

The methods to create animations for Group<T>

§Example

let item_group: Group::<VItem> = ...;
let anim_lagged = item_group.lagged(0.5, |x| x.fade_in()); # lagged with ratio of 0.5
let anim_not_lagged = item_group.lagged(0.0, |x| x.fade_in()); # not lagged (anim at the same time)

Required Methods§

Source

fn lagged( &mut self, lag_ratio: f64, anim_func: impl FnMut(&mut T) -> AnimationCell<T>, ) -> AnimationCell<Vec<T>>

Create a Lagged anim.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Clone + 'static, I> LaggedAnim<T> for I
where for<'a> &'a mut I: IntoIterator<Item = &'a mut T>, I: 'static,