pub struct Interval { /* private fields */ }Expand description
A curve that is 0.0 until begin, then curved (according
to curve) from 0.0 at begin to 1.0
at end, then remains 1.0 past end.
An Interval can be used to delay an animation. For example, a six second
animation that uses an Interval with its begin set
to 0.5 and its end set to 1.0 will essentially become a
three-second animation that starts three seconds later.
Implementations§
Source§impl Interval
impl Interval
Sourcepub fn new(begin: f64, end: f64, curve: Rc<dyn Curve>) -> Interval
pub fn new(begin: f64, end: f64, curve: Rc<dyn Curve>) -> Interval
Creates an interval curve.
Dart defaults curve to Curves::linear.
Sourcepub const fn begin(&self) -> f64
pub const fn begin(&self) -> f64
The largest value for which this interval is 0.0.
From t=0.0 to t=begin, the interval’s value is 0.0.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Interval
impl !Send for Interval
impl !Sync for Interval
impl !UnwindSafe for Interval
impl Forget for Interval
impl Freeze for Interval
impl Move for Interval
impl Unpin for Interval
impl UnsafeUnpin for Intervalwhere
*const RcInner<dyn Curve> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Curve>>: 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