pub struct SequenceGenerator { /* private fields */ }Expand description
Per-lifeloop_run_id monotonic sequence counter.
The spec ties sequence to “the strongest available durable
session scope”. For a Lifeloop-synthesized receipt, that scope is
the lifeloop_run_id (= caller’s harness_run_id). The generator
keeps one counter per run id and hands out 1, 2, 3, … within a
run.
Sequence is per run, not global: emitting under run A then run B then run A again produces A=1, B=1, A=2.
When the caller supplies no harness_run_id, the emitter sets
sequence=None rather than inventing a misleading cross-run order
— see the spec’s “required and nullable” rule for sequence.
Implementations§
Trait Implementations§
Source§impl Debug for SequenceGenerator
impl Debug for SequenceGenerator
Source§impl Default for SequenceGenerator
impl Default for SequenceGenerator
Source§fn default() -> SequenceGenerator
fn default() -> SequenceGenerator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SequenceGenerator
impl RefUnwindSafe for SequenceGenerator
impl Send for SequenceGenerator
impl Sync for SequenceGenerator
impl Unpin for SequenceGenerator
impl UnsafeUnpin for SequenceGenerator
impl UnwindSafe for SequenceGenerator
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