pub struct KeyFrame<T> {
pub value: T,
pub key_time: KeyTime,
/* private fields */
}
Expand description
key-frame
Fields§
§value: T
value of key-frame
key_time: KeyTime
key-time of key-frame
Implementations§
Source§impl<T> KeyFrame<T>
impl<T> KeyFrame<T>
Sourcepub fn new_with_key_time(value: T, key_time: KeyTime) -> Self
pub fn new_with_key_time(value: T, key_time: KeyTime) -> Self
create key-frame
Sourcepub fn by_percent(self, percent: f32) -> Self
pub fn by_percent(self, percent: f32) -> Self
set key time
panics if percent<0 or percent>1
Sourcepub fn by_duration(self, duration: Duration) -> Self
pub fn by_duration(self, duration: Duration) -> Self
set key time
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for KeyFrame<T>where
T: Freeze,
impl<T> !RefUnwindSafe for KeyFrame<T>
impl<T> !Send for KeyFrame<T>
impl<T> !Sync for KeyFrame<T>
impl<T> Unpin for KeyFrame<T>where
T: Unpin,
impl<T> !UnwindSafe for KeyFrame<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