pub struct SequentialIdGenerator { /* private fields */ }Expand description
A thread-safe nonzero identifier sequence suitable for local execution.
The sequence is deterministic for a given call order. A single sequence is shared by all identifier kinds so generated values cannot collide when records are inspected together.
Implementations§
Source§impl SequentialIdGenerator
impl SequentialIdGenerator
Sourcepub const fn new(first: NonZeroU64) -> Self
pub const fn new(first: NonZeroU64) -> Self
Constructs a sequence whose first returned value is first.
Trait Implementations§
Source§impl Debug for SequentialIdGenerator
impl Debug for SequentialIdGenerator
Source§impl IdGenerator for SequentialIdGenerator
impl IdGenerator for SequentialIdGenerator
Source§fn next_job_instance_id(&self) -> Result<JobInstanceId, IdGenerationError>
fn next_job_instance_id(&self) -> Result<JobInstanceId, IdGenerationError>
Returns the next job-instance identifier. Read more
Source§fn next_job_execution_id(&self) -> Result<JobExecutionId, IdGenerationError>
fn next_job_execution_id(&self) -> Result<JobExecutionId, IdGenerationError>
Returns the next job-execution identifier. Read more
Source§fn next_step_execution_id(&self) -> Result<StepExecutionId, IdGenerationError>
fn next_step_execution_id(&self) -> Result<StepExecutionId, IdGenerationError>
Returns the next step-execution identifier. Read more
Source§fn next_failure_id(&self) -> Result<FailureId, IdGenerationError>
fn next_failure_id(&self) -> Result<FailureId, IdGenerationError>
Returns the next opaque failure-correlation identifier. Read more
Auto Trait Implementations§
impl !Freeze for SequentialIdGenerator
impl RefUnwindSafe for SequentialIdGenerator
impl Send for SequentialIdGenerator
impl Sync for SequentialIdGenerator
impl Unpin for SequentialIdGenerator
impl UnsafeUnpin for SequentialIdGenerator
impl UnwindSafe for SequentialIdGenerator
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