pub struct IntervalCell { /* private fields */ }Expand description
Reactive periodic interval: projects IntervalCore’s fire count onto a cell
(invalidates only when count changes).
Implementations§
Source§impl IntervalCell
impl IntervalCell
pub fn new(ctx: &Context, period: u64) -> Self
Sourcepub fn tick(&self, ctx: &Context, now: u64) -> bool
pub fn tick(&self, ctx: &Context, now: u64) -> bool
Advance to logical time now; returns whether a boundary fired. The count
cell mirrors the core’s total fire count.
pub fn count_cell(&self) -> Source<u64>
pub fn next_fire(&self) -> Option<u64>
Auto Trait Implementations§
impl !Freeze for IntervalCell
impl !RefUnwindSafe for IntervalCell
impl !Sync for IntervalCell
impl Send for IntervalCell
impl Unpin for IntervalCell
impl UnsafeUnpin for IntervalCell
impl UnwindSafe for IntervalCell
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