Struct pareen::AnimWithDur
source · pub struct AnimWithDur<F: Fun>(pub Anim<F>, pub F::T);
Expand description
An Anim
together with the duration that it is intended to be played for.
Explicitly carrying the duration around makes it easier to sequentially compose animations in some places.
Tuple Fields§
§0: Anim<F>
§1: F::T
Implementations§
source§impl<F> AnimWithDur<F>where
F: Fun,
F::T: Clone,
impl<F> AnimWithDur<F>where F: Fun, F::T: Clone,
pub fn as_ref(&self) -> AnimWithDur<&F>
source§impl<F> AnimWithDur<F>where
F: Fun,
impl<F> AnimWithDur<F>where F: Fun,
source§impl<'a, T, X, Y, F> AnimWithDur<F>where
T: 'a + Clone,
X: 'a,
Y: 'a,
F: Fun<T = T, V = (X, Y)>,
impl<'a, T, X, Y, F> AnimWithDur<F>where T: 'a + Clone, X: 'a, Y: 'a, F: Fun<T = T, V = (X, Y)>,
pub fn unzip( &'a self ) -> (AnimWithDur<impl Fun<T = F::T, V = X> + 'a>, AnimWithDur<impl Fun<T = F::T, V = Y> + 'a>)
source§impl<F> AnimWithDur<F>where
F: Fun,
F::T: Copy + PartialOrd + Sub<Output = F::T>,
impl<F> AnimWithDur<F>where F: Fun, F::T: Copy + PartialOrd + Sub<Output = F::T>,
source§impl<F> AnimWithDur<F>where
F: Fun,
F::T: Copy + PartialOrd + Sub<Output = F::T> + Add<Output = F::T>,
impl<F> AnimWithDur<F>where F: Fun, F::T: Copy + PartialOrd + Sub<Output = F::T> + Add<Output = F::T>,
pub fn seq_with_dur<G>( self, next: AnimWithDur<G> ) -> AnimWithDur<impl Fun<T = F::T, V = F::V>>where G: Fun<T = F::T, V = F::V>,
source§impl<F> AnimWithDur<F>where
F: Fun,
F::T: Clone + Mul<Output = F::T> + Div<Output = F::T>,
impl<F> AnimWithDur<F>where F: Fun, F::T: Clone + Mul<Output = F::T> + Div<Output = F::T>,
pub fn scale_time( self, t_scale: F::T ) -> AnimWithDur<impl Fun<T = F::T, V = F::V>>
source§impl<F> AnimWithDur<F>where
F: Fun<T = usize>,
impl<F> AnimWithDur<F>where F: Fun<T = usize>,
Trait Implementations§
Auto Trait Implementations§
impl<F> RefUnwindSafe for AnimWithDur<F>where F: RefUnwindSafe, <F as Fun>::T: RefUnwindSafe,
impl<F> Send for AnimWithDur<F>where F: Send, <F as Fun>::T: Send,
impl<F> Sync for AnimWithDur<F>where F: Sync, <F as Fun>::T: Sync,
impl<F> Unpin for AnimWithDur<F>where F: Unpin, <F as Fun>::T: Unpin,
impl<F> UnwindSafe for AnimWithDur<F>where F: UnwindSafe, <F as Fun>::T: 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