pub struct DeterministicClock { /* private fields */ }Expand description
In-memory deterministic clock fixture for SDK conformance tests. Use it to script deterministic behavior in memory; any transcript or endpoint mutation is documented on the method that performs it.
Implementations§
Source§impl DeterministicClock
impl DeterministicClock
Sourcepub fn new(seed: u64) -> Self
pub fn new(seed: u64) -> Self
Creates a new testing::fakes value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn next_millis(&self) -> u64
pub fn next_millis(&self) -> u64
Builds the next millis value. This is data construction and performs no I/O, journal append, event publication, or process work.
Trait Implementations§
Source§impl Clone for DeterministicClock
impl Clone for DeterministicClock
Source§fn clone(&self) -> DeterministicClock
fn clone(&self) -> DeterministicClock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DeterministicClock
impl !RefUnwindSafe for DeterministicClock
impl Send for DeterministicClock
impl !Sync for DeterministicClock
impl Unpin for DeterministicClock
impl UnsafeUnpin for DeterministicClock
impl UnwindSafe for DeterministicClock
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