pub trait HasAnimationData: Any {
// Required methods
fn animation_name(&self) -> String;
fn pseudo_element(&self) -> String;
fn elapsed_time(&self) -> f32;
fn as_any(&self) -> &dyn Any;
}Expand description
A trait for any object that has the data for an animation event
Required Methods§
Sourcefn animation_name(&self) -> String
fn animation_name(&self) -> String
The name of the animation
Sourcefn pseudo_element(&self) -> String
fn pseudo_element(&self) -> String
The name of the pseudo-element the animation runs on
Sourcefn elapsed_time(&self) -> f32
fn elapsed_time(&self) -> f32
The amount of time the animation has been running
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl HasAnimationData for SerializedAnimationData
Available on crate feature
serialize only.