pub struct Zip<First, Second> { /* private fields */ }Expand description
Parallel sampling produced by Animation::zip.
Trait Implementations§
Source§impl<FirstValue, SecondValue, First, Second> Animation<(FirstValue, SecondValue)> for Zip<First, Second>
impl<FirstValue, SecondValue, First, Second> Animation<(FirstValue, SecondValue)> for Zip<First, Second>
Source§fn sample(&self, time: Time) -> (FirstValue, SecondValue)
fn sample(&self, time: Time) -> (FirstValue, SecondValue)
Samples without advancing a clock or changing playback state.
Source§fn duration(&self) -> Option<Duration>
fn duration(&self) -> Option<Duration>
Returns the finite duration, or
None for an unbounded signal.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.
Source§fn zip<OtherValue, Other>(self, other: Other) -> Zip<Self, Other>
fn zip<OtherValue, Other>(self, other: Other) -> Zip<Self, Other>
Samples in parallel; the duration is infinite if either input is infinite.
Source§fn delay(self, offset: Duration) -> Delay<Self>where
Self: Sized,
fn delay(self, offset: Duration) -> Delay<Self>where
Self: Sized,
Delays a finite animation, holding its initial value before the offset.
Infinite signals shift their signed time instead. Negative offsets and
finite duration overflow panic at construction.
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 finite animation becomes
instantaneous. Invalid factors and unrepresentable durations panic.
Source§fn then<Next: Animation<Value>>(self, next: Next) -> Then<Self, Next>where
Self: Sized,
fn then<Next: Animation<Value>>(self, next: Next) -> Then<Self, Next>where
Self: Sized,
Runs two finite animations in sequence. The second owns their shared
boundary. Infinite sources or duration overflow panic at construction.
Source§fn reverse(self) -> Reverse<Self>where
Self: Sized,
fn reverse(self) -> Reverse<Self>where
Self: Sized,
Reverses a finite animation. Infinite sources panic at construction.
Source§fn repeat(self, count: u32) -> Repeat<Self>where
Self: Sized,
fn repeat(self, count: u32) -> Repeat<Self>where
Self: Sized,
Plays a finite animation
count times. Intermediate boundaries restart;
the final boundary holds the target. Zero repeats hold the initial value.
Infinite sources or duration overflow panic at construction.Auto Trait Implementations§
impl<First, Second> Forget for Zip<First, Second>
impl<First, Second> Freeze for Zip<First, Second>
impl<First, Second> RefUnwindSafe for Zip<First, Second>where
First: RefUnwindSafe,
Second: RefUnwindSafe,
impl<First, Second> Send for Zip<First, Second>
impl<First, Second> Sync for Zip<First, Second>
impl<First, Second> Unpin for Zip<First, Second>
impl<First, Second> UnsafeUnpin for Zip<First, Second>where
First: UnsafeUnpin,
Second: UnsafeUnpin,
impl<First, Second> UnwindSafe for Zip<First, Second>where
First: UnwindSafe,
Second: 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