pub struct Interpolation<T>{
pub from: T,
pub to: T,
pub time_phase: Phase,
pub playing: bool,
pub looped: bool,
/* private fields */
}
Fields§
§from: T
§to: T
§time_phase: Phase
§playing: bool
§looped: bool
Implementations§
Source§impl<T> Interpolation<T>
impl<T> Interpolation<T>
pub fn new(from: T, to: T, time_phase: Phase) -> Self
pub fn instant(value: T) -> Self
pub fn time(&self) -> Scalar
pub fn start(&mut self)
pub fn end(&mut self)
pub fn set_time(&mut self, time: Scalar)
pub fn in_progress(&self) -> bool
pub fn is_complete(&self) -> bool
pub fn duration(&self) -> Scalar
pub fn value(&self) -> T
pub fn sample(&self, time: Scalar) -> T
pub fn set(&mut self, value: T)
pub fn process(&mut self, delta_time: Scalar)
Trait Implementations§
Source§impl<T> Clone for Interpolation<T>
impl<T> Clone for Interpolation<T>
Source§fn clone(&self) -> Interpolation<T>
fn clone(&self) -> Interpolation<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T> Debug for Interpolation<T>
impl<T> Debug for Interpolation<T>
Source§impl<T> Default for Interpolation<T>
impl<T> Default for Interpolation<T>
Source§fn default() -> Interpolation<T>
fn default() -> Interpolation<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for Interpolation<T>
impl<'de, T> Deserialize<'de> for Interpolation<T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for Interpolation<T>where
T: Freeze,
impl<T> RefUnwindSafe for Interpolation<T>where
T: RefUnwindSafe,
impl<T> Send for Interpolation<T>where
T: Send,
impl<T> Sync for Interpolation<T>where
T: Sync,
impl<T> Unpin for Interpolation<T>where
T: Unpin,
impl<T> UnwindSafe for Interpolation<T>where
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