pub struct Parallel<T: Animatable> { /* private fields */ }Expand description
Runs child animations together and composes their output values.
Implementations§
Source§impl<T: Animatable> Parallel<T>
impl<T: Animatable> Parallel<T>
Sourcepub fn new(initial: T, compose: impl Fn(&[T]) -> T + 'static) -> Self
pub fn new(initial: T, compose: impl Fn(&[T]) -> T + 'static) -> Self
Creates an empty parallel animation with an output compositor.
Sourcepub fn with(self, animation: impl Animation<T>) -> Self
pub fn with(self, animation: impl Animation<T>) -> Self
Appends an animation and returns the updated parallel composition.
Trait Implementations§
Source§impl<T: Animatable> Animation<T> for Parallel<T>
impl<T: Animatable> Animation<T> for Parallel<T>
Source§fn state(&self) -> AnimationState
fn state(&self) -> AnimationState
Returns the animation’s lifecycle state.
Source§fn duration(&self) -> Option<Duration>
fn duration(&self) -> Option<Duration>
Returns the total duration when it is finite and known.
Source§fn advance(&mut self, delta: Duration) -> Duration
fn advance(&mut self, delta: Duration) -> Duration
Advances the animation and returns any unconsumed duration.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Parallel<T>
impl<T> !Send for Parallel<T>
impl<T> !Sync for Parallel<T>
impl<T> !UnwindSafe for Parallel<T>
impl<T> Freeze for Parallel<T>where
T: Freeze,
impl<T> Unpin for Parallel<T>where
T: Unpin,
impl<T> UnsafeUnpin for Parallel<T>where
T: UnsafeUnpin,
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