Trait libre_pvz_animation::curve::builder::AnyCurveBuilder

source ·
pub trait AnyCurveBuilder {
    // Required methods
    fn push_keyframe(&mut self, k: u16, x: &mut dyn Any);
    fn finish_boxed(self: Box<Self>) -> Option<Box<dyn AnyCurve>>;
}
Expand description

An alternative dynamic interface for CurveBuilder.

Required Methods§

source

fn push_keyframe(&mut self, k: u16, x: &mut dyn Any)

Push one keyframe into this curve.

Note: The value is expected to be of type Option<T>, where T is the actual value type for this curve. So effectively the parameter x has type &mut Option<T>, and a successful invoking of this method will take from this argument.

source

fn finish_boxed(self: Box<Self>) -> Option<Box<dyn AnyCurve>>

Finish building this curve. Prefer CurveBuilder::finish whenever possible.

Implementors§