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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.