pub struct LoopScheduler { /* private fields */ }Expand description
Ticks registered loops on their cadence.
Implementations§
Source§impl LoopScheduler
impl LoopScheduler
pub fn new() -> Self
Sourcepub fn with_tick(self, d: Duration) -> Self
pub fn with_tick(self, d: Duration) -> Self
How often the scheduler wakes to check for due loops. A loop never fires more often than this, regardless of its cadence.
pub fn with_sink(self, s: Arc<dyn LoopSink>) -> Self
Sourcepub fn register(self, engine: LoopEngine) -> Self
pub fn register(self, engine: LoopEngine) -> Self
Register a loop. Its spec().cadence is parsed into a schedule; an
unparseable cadence is rejected so the problem surfaces at wiring
time rather than silently never firing.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LoopScheduler
impl !UnwindSafe for LoopScheduler
impl Freeze for LoopScheduler
impl Send for LoopScheduler
impl Sync for LoopScheduler
impl Unpin for LoopScheduler
impl UnsafeUnpin for LoopScheduler
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