pub struct SnapshotClock { /* private fields */ }Expand description
Per-recalc snapshotting wrapper around a ClockProvider
(spec formualizer-cycle-semantics-spec.md §7.11).
Excel samples the clock ONCE per recalculation: every NOW() / TODAY()
call within a single recalc — including all iteration passes of an
iterating SCC — observes the same instant, and the sample only advances on
the next recalculation. A raw SystemClock violates this (each call reads
the OS clock, so NOW() drifts between SCC settle passes and even between
two cells of one acyclic pass).
The engine wraps its configured clock in SnapshotClock and calls
SnapshotClock::refresh once at the start of every evaluation request;
builtins then read the frozen sample via the normal ClockProvider API.
Implementations§
Source§impl SnapshotClock
impl SnapshotClock
Trait Implementations§
Source§impl ClockProvider for SnapshotClock
impl ClockProvider for SnapshotClock
Auto Trait Implementations§
impl !Freeze for SnapshotClock
impl !RefUnwindSafe for SnapshotClock
impl !UnwindSafe for SnapshotClock
impl Send for SnapshotClock
impl Sync for SnapshotClock
impl Unpin for SnapshotClock
impl UnsafeUnpin for SnapshotClock
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more