pub struct Timing { /* private fields */ }timeline only.Expand description
Where timed steps sit along a track, from 0 at its start to 1 at its end.
Implementations§
Source§impl Timing
impl Timing
Sourcepub fn new(
times: &[Duration],
end: Option<Duration>,
compress: Option<Duration>,
) -> Self
pub fn new( times: &[Duration], end: Option<Duration>, compress: Option<Duration>, ) -> Self
Places one step at each of times, the moment it began. A time
earlier than the one before it is taken as that one. The track runs
from the first time to end, or to the last time when end is
earlier or None. Gaps longer than compress are drawn as long as
compress, each with a Break.
Time runs evenly along the track, so the ruler stays linear. Only steps too close to pick apart, such as several at one moment, are nudged a little apart; the ruler does not move with them. When no time passes at all the steps sit evenly.
Sourcepub fn place(&self, time: Duration) -> f32
pub fn place(&self, time: Duration) -> f32
Where time falls along the track, 0 to 1, between the steps either
side of it. Times outside the track go to its ends.
Sourcepub fn extent(&self, span: Span) -> (f32, f32)
pub fn extent(&self, span: Span) -> (f32, f32)
The edges of span, 0 to 1: halfway to the steps either side of it,
or the ends of the track.
Trait Implementations§
impl StructuralPartialEq for Timing
Auto Trait Implementations§
impl Forget for Timing
impl Freeze for Timingwhere
*const u8 is !null: Freeze,
PhantomData<f32>: Freeze,
PhantomData<(Duration, f32)>: Freeze,
PhantomData<Duration>: Freeze,
PhantomData<Break>: Freeze,
impl Move for Timing
impl RefUnwindSafe for Timing
impl Send for Timingwhere
RawVecInner: Send,
impl Sync for Timingwhere
RawVecInner: Sync,
impl Unpin for Timing
impl UnsafeUnpin for Timingwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<f32>: UnsafeUnpin,
PhantomData<(Duration, f32)>: UnsafeUnpin,
PhantomData<Duration>: UnsafeUnpin,
PhantomData<Break>: UnsafeUnpin,
impl UnwindSafe for Timingwhere
RawVecInner: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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)
&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)
&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> DowncastSync for T
impl<T> DowncastSync for T
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<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.