Trait freya_hooks::AnimatedValue

source ·
pub trait AnimatedValue {
    // Required methods
    fn time(&self) -> Duration;
    fn prepare(&mut self, direction: AnimDirection);
    fn is_finished(&self, index: u128, direction: AnimDirection) -> bool;
    fn advance(&mut self, index: u128, direction: AnimDirection);

    // Provided methods
    fn as_f32(&self) -> f32 { ... }
    fn as_string(&self) -> String { ... }
    fn sub(&self, _index: usize) -> &Box<dyn AnimatedValue> { ... }
}

Required Methods§

source

fn time(&self) -> Duration

source

fn prepare(&mut self, direction: AnimDirection)

source

fn is_finished(&self, index: u128, direction: AnimDirection) -> bool

source

fn advance(&mut self, index: u128, direction: AnimDirection)

Provided Methods§

source

fn as_f32(&self) -> f32

Read the animated value as a f32. Will panic if not supported.

source

fn as_string(&self) -> String

Read the animated value as a String. Will panic if not supported.

source

fn sub(&self, _index: usize) -> &Box<dyn AnimatedValue>

Read the inner animated valued. Will panic if not supported.

Implementors§