Skip to main content

Program

Trait Program 

Source
pub trait Program: 'static {
    type Value: Copy + 'static;

    // Required methods
    fn go(&mut self, value: Self::Value, now: Instant);
    fn is_animating(&self, now: Instant) -> bool;
}
Expand description

The logic of a Transition.

Required Associated Types§

Source

type Value: Copy + 'static

The type of value that the Program animates.

Required Methods§

Source

fn go(&mut self, value: Self::Value, now: Instant)

Transitions the Program from its current state towards the given value at the given time.

Source

fn is_animating(&self, now: Instant) -> bool

Returns true if the Program is currently in progress.

Implementations on Foreign Types§

Source§

impl<I> Program for Animation<I>
where I: Float + Clone + Copy + PartialEq + 'static,

Source§

type Value = I

Source§

fn go(&mut self, value: Self::Value, now: Instant)

Source§

fn is_animating(&self, now: Instant) -> bool

Implementors§