KeyframeBuilder

Trait KeyframeBuilder 

Source
pub trait KeyframeBuilder {
    type Data: Clone + Debug;

    // Required methods
    fn build(&self) -> Keyframe<Self::Data>;
    fn easing(self, easing: Easing) -> Self;
}
Expand description

Builder interface for creating a typed Keyframe.

Implementations will normally expose additional builder-type methods to configure the animation property values; this trait only encapsulates the behavior common to all keyframes.

Required Associated Types§

Source

type Data: Clone + Debug

Data type (animation properties) that the keyframe will hold.

Required Methods§

Source

fn build(&self) -> Keyframe<Self::Data>

Creates a Keyframe from this builder.

Source

fn easing(self, easing: Easing) -> Self

Configures the easing that will be used starting from the beginning of this keyframe, and applying to all subsequent keyframes until another one specifies its own easing.

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.

Implementors§