pub struct AnimatorBase { /* private fields */ }Expand description
The state every animator has: its key frames and its target property.
Implementations§
Source§impl AnimatorBase
impl AnimatorBase
pub fn new() -> Self
Sourcepub fn property(&self) -> Option<&'static FerroProperty>
pub fn property(&self) -> Option<&'static FerroProperty>
The target property.
pub fn set_property(&self, value: Option<&'static FerroProperty>)
Sourcepub fn get(&self, index: usize) -> Ref<AnimatorKeyFrame>
pub fn get(&self, index: usize) -> Ref<AnimatorKeyFrame>
The key frame at index. Panics when out of range.
Sourcepub fn to_vec(&self) -> Vec<Ref<AnimatorKeyFrame>>
pub fn to_vec(&self) -> Vec<Ref<AnimatorKeyFrame>>
A copy of the key frames.
Sourcepub fn styled_property<T: PropertyValue>(&self) -> &'static StyledProperty<T>
pub fn styled_property<T: PropertyValue>(&self) -> &'static StyledProperty<T>
The target property as a styled property of value type T. Panics
when the animator has no property or the property has another type.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AnimatorBase
impl !RefUnwindSafe for AnimatorBase
impl !Send for AnimatorBase
impl !Sync for AnimatorBase
impl !UnwindSafe for AnimatorBase
impl Unpin for AnimatorBase
impl UnsafeUnpin for AnimatorBase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more