pub struct Motion<T>(/* private fields */);Implementations§
Source§impl<T> Motion<T>
impl<T> Motion<T>
pub fn new(value: T) -> Selfwhere
T: Clone,
pub fn value(&self) -> Twhere
T: Clone,
pub fn target(&self) -> Twhere
T: Clone,
pub fn state(&self) -> MotionState
pub fn is_active(&self) -> bool
pub fn completed_iterations(&self) -> u64
pub fn identity(&self) -> usize
pub fn set(&self, value: T)where
T: Clone,
pub fn cancel(&self)
pub fn finish(&self)where
T: Clone,
pub fn pause(&self)
pub fn resume(&self)
pub fn play(&self, timeline: Timeline<T>)where
T: Clone + Interpolate,
Source§impl<T: MotionValue> Motion<T>
impl<T: MotionValue> Motion<T>
pub fn velocity(&self) -> T
pub fn spring_to( &self, target: T, config: SpringConfig, ) -> Result<(), PhysicsError>
pub fn restart_spring( &self, from: T, target: T, config: SpringConfig, ) -> Result<(), PhysicsError>
pub fn advance_spring(&self, now: Time) -> bool
Trait Implementations§
Source§impl<T> From<Motion<T>> for MotionBinding<T>
impl<T> From<Motion<T>> for MotionBinding<T>
Source§impl<T> MotionTrack for Motion<T>
impl<T> MotionTrack for Motion<T>
Auto Trait Implementations§
impl<T> Freeze for Motion<T>
impl<T> RefUnwindSafe for Motion<T>
impl<T> Send for Motion<T>
impl<T> Sync for Motion<T>
impl<T> Unpin for Motion<T>
impl<T> UnsafeUnpin for Motion<T>
impl<T> UnwindSafe for Motion<T>
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