Skip to main content

StyleInterpolatable

Trait StyleInterpolatable 

Source
pub trait StyleInterpolatable: Clone + FromFeatureStateProperty {
    // Required method
    fn interpolate(a: &Self, b: &Self, t: f32) -> Self;
}
Expand description

Interpolation behaviour for style values.

Implementors must also provide FromFeatureStateProperty so that feature-state-driven StyleValue::FeatureState variants can attempt conversion from PropertyValue during evaluation.

Required Methods§

Source

fn interpolate(a: &Self, b: &Self, t: f32) -> Self

Sample between two stop values.

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 StyleInterpolatable for bool

Source§

fn interpolate(a: &Self, b: &Self, t: f32) -> Self

Source§

impl StyleInterpolatable for f32

Source§

fn interpolate(a: &Self, b: &Self, t: f32) -> Self

Source§

impl StyleInterpolatable for String

Source§

fn interpolate(a: &Self, b: &Self, t: f32) -> Self

Source§

impl StyleInterpolatable for [f32; 4]

Source§

fn interpolate(a: &Self, b: &Self, t: f32) -> Self

Implementors§