Skip to main content

EvalExt

Trait EvalExt 

Source
pub trait EvalExt: Eval + Sized {
    // Provided methods
    fn apply_alpha_to(self, item: &mut Self::Output, alpha: f64) -> Self { ... }
    fn apply_to(self, item: &mut Self::Output) -> Self { ... }
}
Expand description

Build-time conveniences over Eval, split out so Eval stays a single primitive (eval_alpha).

The only consumers today are the built-in pure-animation families, which use apply_to to write an item’s end state (or apply_alpha_to to write an arbitrary progress state) while constructing the animation.

Provided Methods§

Source

fn apply_alpha_to(self, item: &mut Self::Output, alpha: f64) -> Self

Write the state at progress alpha into item and return this evaluator (defined through eval_alpha).

Source

fn apply_to(self, item: &mut Self::Output) -> Self

Write the end state (alpha == 1.0) into item and return this evaluator (defined through EvalExt::apply_alpha_to).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<E: Eval + Sized> EvalExt for E