pub struct Delay<Source> { /* private fields */ }Expand description
A delayed animation produced by FiniteAnimation::delay.
Trait Implementations§
Source§impl<Value, Source: FiniteAnimation<Value>> FiniteAnimation<Value> for Delay<Source>
impl<Value, Source: FiniteAnimation<Value>> FiniteAnimation<Value> for Delay<Source>
Source§fn delay(self, offset: Duration) -> Delay<Self>where
Self: Sized,
fn delay(self, offset: Duration) -> Delay<Self>where
Self: Sized,
Delays the animation, holding its initial value before the offset. Read more
Source§fn try_delay(self, offset: Duration) -> Result<Delay<Self>, ValidationError>where
Self: Sized,
fn try_delay(self, offset: Duration) -> Result<Delay<Self>, ValidationError>where
Self: Sized,
Delays like
Self::delay, reporting duration overflow.Source§fn speed(self, factor: f64) -> Speed<Self>where
Self: Sized,
fn speed(self, factor: f64) -> Speed<Self>where
Self: Sized,
Changes playback speed by a finite, strictly positive factor.
Durations round to the nearest tick; a collapsed animation becomes
instantaneous. Read more
Source§fn try_speed(self, factor: f64) -> Result<Speed<Self>, ValidationError>where
Self: Sized,
fn try_speed(self, factor: f64) -> Result<Speed<Self>, ValidationError>where
Self: Sized,
Changes speed like
Self::speed, reporting an invalid factor or
unrepresentable duration.Source§fn then<Next: FiniteAnimation<Value>>(self, next: Next) -> Then<Self, Next>where
Self: Sized,
fn then<Next: FiniteAnimation<Value>>(self, next: Next) -> Then<Self, Next>where
Self: Sized,
Runs two animations in sequence. The second owns their shared
boundary. Duration overflow panics at construction.
Source§fn repeat(self, count: u32) -> Repeat<Self>where
Self: Sized,
fn repeat(self, count: u32) -> Repeat<Self>where
Self: Sized,
Plays the animation
count times. Intermediate boundaries restart;
the final boundary holds the target. Zero repeats hold the initial value.
Duration overflow panics at construction.Source§fn ping_pong(self) -> PingPong<Self>where
Self: Sized,
fn ping_pong(self) -> PingPong<Self>where
Self: Sized,
Plays the animation forward then backward, ending at its initial
value. Duration overflow panics at construction.
Source§fn boxed_finite(self) -> Arc<dyn FiniteAnimation<Value>> ⓘwhere
Self: Sized + 'static,
fn boxed_finite(self) -> Arc<dyn FiniteAnimation<Value>> ⓘwhere
Self: Sized + 'static,
Shares a type-erased animation, retaining sampling, duration and combinators.
Source§impl<Value, Source: FiniteAnimation<Value>> Signal<Value> for Delay<Source>
impl<Value, Source: FiniteAnimation<Value>> Signal<Value> for Delay<Source>
Source§fn sample(&self, time: Time) -> Value
fn sample(&self, time: Time) -> Value
Samples without advancing a clock or changing playback state.
Source§fn map<Output, Function>(self, function: Function) -> Map<Self, Function, Value>
fn map<Output, Function>(self, function: Function) -> Map<Self, Function, Value>
Transforms values without changing timing.
Auto Trait Implementations§
impl<Source> Forget for Delay<Source>
impl<Source> Freeze for Delay<Source>where
Source: Freeze,
impl<Source> Move for Delay<Source>
impl<Source> RefUnwindSafe for Delay<Source>where
Source: RefUnwindSafe,
impl<Source> Send for Delay<Source>where
Source: Send,
impl<Source> Sync for Delay<Source>where
Source: Sync,
impl<Source> Unpin for Delay<Source>where
Source: Unpin,
impl<Source> UnsafeUnpin for Delay<Source>where
Source: UnsafeUnpin,
impl<Source> UnwindSafe for Delay<Source>where
Source: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more