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§
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§
sourcefn as_string(&self) -> String
fn as_string(&self) -> String
Read the animated value as a String. Will panic if not supported.
sourcefn sub(&self, _index: usize) -> &Box<dyn AnimatedValue>
fn sub(&self, _index: usize) -> &Box<dyn AnimatedValue>
Read the inner animated valued. Will panic if not supported.