pub struct AnimationCell<T> {
inner: Box<dyn Eval<T>>,
pub info: AnimationInfo,
anim_name: String,
}Expand description
A cell of an animation
Fields§
§inner: Box<dyn Eval<T>>§info: AnimationInfoThe animation info
anim_name: StringImplementations§
Source§impl<T> AnimationCell<T>
impl<T> AnimationCell<T>
Sourcepub fn at(self, at_sec: f64) -> Self
pub fn at(self, at_sec: f64) -> Self
A builder func to modify AnimationInfo::start_sec
Sourcepub fn with_rate_func(self, rate_func: fn(f64) -> f64) -> Self
pub fn with_rate_func(self, rate_func: fn(f64) -> f64) -> Self
A builder func to modify AnimationInfo::rate_func
Sourcepub fn with_duration(self, duration_secs: f64) -> Self
pub fn with_duration(self, duration_secs: f64) -> Self
A builder func to modify AnimationInfo::duration_secs
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
A builder func to modify AnimationInfo::enabled
Sourcepub fn apply_to(self, item: &mut T) -> Self
pub fn apply_to(self, item: &mut T) -> Self
Apply the animation to the item and return the animation itself
Sourcepub fn apply_alpha_to(self, item: &mut T, alpha: f64) -> Self
pub fn apply_alpha_to(self, item: &mut T, alpha: f64) -> Self
Apply the animation to the item at the given alpha and return the animation itself
Trait Implementations§
Source§impl<T: AnyExtractCoreItem> CoreItemAnimation for AnimationCell<T>
impl<T: AnyExtractCoreItem> CoreItemAnimation for AnimationCell<T>
Source§fn anim_info(&self) -> &AnimationInfo
fn anim_info(&self) -> &AnimationInfo
Get the animation info
Source§impl<T> Eval<T> for AnimationCell<T>
impl<T> Eval<T> for AnimationCell<T>
Source§fn eval_alpha(&self, alpha: f64) -> T
fn eval_alpha(&self, alpha: f64) -> T
Evaluates at the given progress value
alpha in range [0, 1].Source§fn into_animation_cell(self) -> AnimationCell<T>where
Self: Sized + 'static,
fn into_animation_cell(self) -> AnimationCell<T>where
Self: Sized + 'static,
Construct an
AnimationCell<T> with default AnimationInfoAuto Trait Implementations§
impl<T> Freeze for AnimationCell<T>
impl<T> !RefUnwindSafe for AnimationCell<T>
impl<T> !Send for AnimationCell<T>
impl<T> !Sync for AnimationCell<T>
impl<T> Unpin for AnimationCell<T>
impl<T> !UnwindSafe for AnimationCell<T>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more