pub trait AnimationTarget:
Sized
+ Send
+ Sync {
type Running: AnimateTarget;
// Required method
fn begin(self) -> Self::Running;
// Provided methods
fn over(self, duration: Duration) -> Animation<Self, Linear> { ... }
fn immediately(self) -> Animation<Self, Linear> { ... }
}
Expand description
A target for a timed Animation
.
Required Associated Types§
Sourcetype Running: AnimateTarget
type Running: AnimateTarget
The type that can linearly interpolate this target.
Required Methods§
Provided Methods§
Sourcefn over(self, duration: Duration) -> Animation<Self, Linear>
fn over(self, duration: Duration) -> Animation<Self, Linear>
Returns a pending animation that linearly transitions self
over
duration
.
A different Easing
can be used by calling
with_easing
on the result of this function.
Sourcefn immediately(self) -> Animation<Self, Linear>
fn immediately(self) -> Animation<Self, Linear>
Returns a pending animation that transitions to the target values after no delay.
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.