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.
Object Safety§
This trait is not object safe.