pub struct TypedTimeline { /* private fields */ }Expand description
Kit executor clock around a shared heterogeneous timeline.
Implementations§
Methods from Deref<Target = TypedTimeline>§
Sourcepub fn at<T, const N: usize>(
&mut self,
start: Duration,
initial: T,
clip: TypedAnimation<T, N>,
) -> TrackId<T, N>where
T: MotionData<N>,
pub fn at<T, const N: usize>(
&mut self,
start: Duration,
initial: T,
clip: TypedAnimation<T, N>,
) -> TrackId<T, N>where
T: MotionData<N>,
Adds a typed track at an absolute playhead position, with its initial value.
Sourcepub fn after<T, const N: usize>(
&mut self,
seconds: f64,
initial: T,
clip: TypedAnimation<T, N>,
) -> Result<TrackId<T, N>, AnimationError>where
T: MotionData<N>,
pub fn after<T, const N: usize>(
&mut self,
seconds: f64,
initial: T,
clip: TypedAnimation<T, N>,
) -> Result<TrackId<T, N>, AnimationError>where
T: MotionData<N>,
Adds after the preceding track’s end, with positive delay or negative overlap. Fails without mutation after a forever track or for a negative/invalid time.
Sourcepub fn label(
&mut self,
name: impl Into<String>,
at: Duration,
) -> Result<(), AnimationError>
pub fn label( &mut self, name: impl Into<String>, at: Duration, ) -> Result<(), AnimationError>
Records a unique label at an absolute position.
Sourcepub fn at_label<T, const N: usize>(
&mut self,
name: &str,
seconds: f64,
initial: T,
clip: TypedAnimation<T, N>,
) -> Result<TrackId<T, N>, AnimationError>where
T: MotionData<N>,
pub fn at_label<T, const N: usize>(
&mut self,
name: &str,
seconds: f64,
initial: T,
clip: TypedAnimation<T, N>,
) -> Result<TrackId<T, N>, AnimationError>where
T: MotionData<N>,
Adds at a label with a signed seconds offset; missing labels fail transactionally.
Sourcepub fn sample(&mut self, now: Duration, reduced: bool)
pub fn sample(&mut self, now: Duration, reduced: bool)
Samples all tracks and dispatches completion observers at the end.
Sourcepub fn value<T, const N: usize>(&self, id: TrackId<T, N>) -> Option<T>where
T: MotionData<N>,
pub fn value<T, const N: usize>(&self, id: TrackId<T, N>) -> Option<T>where
T: MotionData<N>,
Reads a sampled typed value; foreign track identities return None.
Sourcepub fn set_speed(
&mut self,
speed: f64,
now: Duration,
) -> Result<(), AnimationError>
pub fn set_speed( &mut self, speed: f64, now: Duration, ) -> Result<(), AnimationError>
Changes speed, including zero and reverse playback.
Sourcepub fn completion(&mut self) -> Completion ⓘ
pub fn completion(&mut self) -> Completion ⓘ
Completion observer for this run. Dropping this timeline cancels observers.
Sourcepub fn is_animating(&self) -> bool
pub fn is_animating(&self) -> bool
Whether another sample is required, including upcoming delayed tracks.
Trait Implementations§
Source§impl Debug for TypedTimeline
impl Debug for TypedTimeline
Source§impl Default for TypedTimeline
impl Default for TypedTimeline
Source§impl Deref for TypedTimeline
impl Deref for TypedTimeline
Auto Trait Implementations§
impl !RefUnwindSafe for TypedTimeline
impl !Send for TypedTimeline
impl !Sync for TypedTimeline
impl !UnwindSafe for TypedTimeline
impl Freeze for TypedTimeline
impl Unpin for TypedTimeline
impl UnsafeUnpin for TypedTimeline
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().