zng_var::animation

Trait Transitionable

Source
pub trait Transitionable: VarValue {
    // Required method
    fn lerp(self, to: &Self, step: EasingStep) -> Self;
}
Expand description

Represents a type that can be animated between two values.

This trait is auto-implemented for all Copy types that can add, subtract and multiply by Factor, Clone only types must implement this trait manually.

Required Methods§

Source

fn lerp(self, to: &Self, step: EasingStep) -> Self

Sample the linear interpolation from self -> to by step.

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§

Source§

impl Transitionable for bool

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for f32

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for f64

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for i8

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for i16

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for i32

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for i64

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for i128

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for isize

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for u8

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for u16

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for u32

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for u64

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for u128

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for usize

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for AngleDegree

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for AngleGradian

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for AngleRadian

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for AngleTurn

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for ByteLength

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for Rgba

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for Factor

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for Dip

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl Transitionable for Px

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for CornerRadius2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Box2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Box3D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Length<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Point2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Point3D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Rect<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for SideOffsets2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Size2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Size3D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Vector2D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Source§

impl<T, U> Transitionable for Vector3D<T, U>
where T: Transitionable, U: Send + Sync + Any,

Source§

fn lerp(self, to: &Self, step: EasingStep) -> Self

Implementors§