pub struct PlaybackEngine {
pub state: PlaybackState,
pub current_time: f32,
pub duration: f32,
pub playback_rate: f32,
pub loop_enabled: bool,
pub loop_start: f32,
pub loop_end: f32,
pub frame_rate: f32,
pub audio_sync: bool,
}Fields§
§state: PlaybackState§current_time: f32§duration: f32§playback_rate: f32§loop_enabled: bool§loop_start: f32§loop_end: f32§frame_rate: f32§audio_sync: boolImplementations§
Source§impl PlaybackEngine
impl PlaybackEngine
pub fn new(duration: f32, fps: f32) -> Self
pub fn play(&mut self)
pub fn pause(&mut self)
pub fn stop(&mut self)
pub fn seek(&mut self, t: f32)
pub fn advance(&mut self, dt: f32)
pub fn current_frame(&self) -> u32
pub fn progress(&self) -> f32
pub fn time_remaining(&self) -> f32
Trait Implementations§
Source§impl Clone for PlaybackEngine
impl Clone for PlaybackEngine
Auto Trait Implementations§
impl Freeze for PlaybackEngine
impl RefUnwindSafe for PlaybackEngine
impl Send for PlaybackEngine
impl Sync for PlaybackEngine
impl Unpin for PlaybackEngine
impl UnsafeUnpin for PlaybackEngine
impl UnwindSafe for PlaybackEngine
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
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.