Trait Interpolable

pub trait Interpolable {
    // Required method
    fn interpolated(&self, other: Self, ratio: f32) -> Self;
}
Expand description

A type implementing Interpolable can be used with Animated<T>.animate(...)

Required Methods§

fn interpolated(&self, other: Self, ratio: f32) -> Self

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.

Implementations on Foreign Types§

§

impl Interpolable for f32

§

fn interpolated(&self, other: f32, ratio: f32) -> f32

§

impl<T> Interpolable for Option<T>
where T: Interpolable + Copy,

§

fn interpolated(&self, other: Option<T>, ratio: f32) -> Option<T>

Implementors§