pub struct MacroPlayback { /* private fields */ }Expand description
Deterministic playback scheduler with speed and looping controls.
Invariants:
- Event order is preserved.
elapsedis monotonic for a givenadvancesequence.- No events are emitted without their cumulative delay being satisfied.
Failure modes:
- If total duration is zero and looping is enabled, looping is ignored to
avoid infinite emission within a single
advancecall.
Implementations§
Source§impl MacroPlayback
impl MacroPlayback
Sourcepub fn new(input_macro: InputMacro) -> Self
pub fn new(input_macro: InputMacro) -> Self
Create a new playback scheduler for the given macro.
Sourcepub fn with_speed(self, speed: f64) -> Self
pub fn with_speed(self, speed: f64) -> Self
Fluent speed setter.
Sourcepub fn set_looping(&mut self, looping: bool)
pub fn set_looping(&mut self, looping: bool)
Enable or disable looping.
Sourcepub fn with_looping(self, looping: bool) -> Self
pub fn with_looping(self, looping: bool) -> Self
Fluent looping setter.
Trait Implementations§
Source§impl Clone for MacroPlayback
impl Clone for MacroPlayback
Source§fn clone(&self) -> MacroPlayback
fn clone(&self) -> MacroPlayback
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for MacroPlayback
impl RefUnwindSafe for MacroPlayback
impl Send for MacroPlayback
impl Sync for MacroPlayback
impl Unpin for MacroPlayback
impl UnwindSafe for MacroPlayback
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