pub trait IntoAnimate:
Sized
+ Send
+ Sync {
type Animate: Animate;
// Required method
fn into_animate(self) -> Self::Animate;
// Provided methods
fn to_animate(&self) -> Self::Animate
where Self: Clone { ... }
fn and_then<Other: IntoAnimate>(self, other: Other) -> Chain<Self, Other> { ... }
fn cycle(self) -> Cycle<Self>
where Self: Clone { ... }
fn repeat(self, times: usize) -> Cycle<Self>
where Self: Clone { ... }
fn on_complete<F>(self, on_complete: F) -> OnCompleteAnimation<Self>
where F: FnOnce() + Send + Sync + 'static { ... }
}
Expand description
A type that can be converted into an animation.
Required Associated Types§
Required Methods§
sourcefn into_animate(self) -> Self::Animate
fn into_animate(self) -> Self::Animate
Return this change as a running animation.
Provided Methods§
sourcefn to_animate(&self) -> Self::Animatewhere
Self: Clone,
fn to_animate(&self) -> Self::Animatewhere
Self: Clone,
Returns a clone of this change as a running animation.
sourcefn and_then<Other: IntoAnimate>(self, other: Other) -> Chain<Self, Other>
fn and_then<Other: IntoAnimate>(self, other: Other) -> Chain<Self, Other>
Returns an combined animation that performs self
and other
in
sequence.
sourcefn cycle(self) -> Cycle<Self>where
Self: Clone,
fn cycle(self) -> Cycle<Self>where
Self: Clone,
Returns an animation that repeats self
indefinitely.
sourcefn repeat(self, times: usize) -> Cycle<Self>where
Self: Clone,
fn repeat(self, times: usize) -> Cycle<Self>where
Self: Clone,
Returns an animation that repeats a number of times before completing.
sourcefn on_complete<F>(self, on_complete: F) -> OnCompleteAnimation<Self>
fn on_complete<F>(self, on_complete: F) -> OnCompleteAnimation<Self>
Invokes on_complete
after this animation finishes.
Object Safety§
This trait is not object safe.