pub trait RectTweenObject: 'static {
// Required methods
fn begin(&self, app: &App) -> Option<Rect>;
fn end(&self, app: &App) -> Option<Rect>;
fn lerp(&self, app: &App, t: f64) -> Option<Rect>;
// Provided methods
fn transform(&self, app: &App, t: f64) -> Option<Rect> { ... }
fn evaluate(&self, app: &App, animation: AnyAnimation<f64>) -> Option<Rect> { ... }
}Expand description
Dart’s Tween<Rect?>: the tween a CreateRectTween returns and a hero flight animates
the hero’s bounds with.
Rust has no subtyping, so a flight holds this as Rc<dyn RectTweenObject>; waft-animation’s
RectTween — Dart’s default — implements it, and so does any tween a caller supplies.
Required Methods§
Sourcefn begin(&self, app: &App) -> Option<Rect>
fn begin(&self, app: &App) -> Option<Rect>
The value this variable has at the beginning of the animation.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".