Skip to main content

IdGenerator

Trait IdGenerator 

Source
pub trait IdGenerator: Send + Sync {
    // Required methods
    fn next_job_instance_id(&self) -> Result<JobInstanceId, IdGenerationError>;
    fn next_job_execution_id(&self) -> Result<JobExecutionId, IdGenerationError>;
    fn next_step_execution_id(
        &self,
    ) -> Result<StepExecutionId, IdGenerationError>;
    fn next_failure_id(&self) -> Result<FailureId, IdGenerationError>;
}
Expand description

Supplies facade-owned opaque identifiers.

One generator may use a shared sequence for all identifier kinds or independent sequences. Implementations must never return zero.

Required Methods§

Source

fn next_job_instance_id(&self) -> Result<JobInstanceId, IdGenerationError>

Returns the next job-instance identifier.

§Errors

Returns IdGenerationError when the source is exhausted or produces an invalid value.

Source

fn next_job_execution_id(&self) -> Result<JobExecutionId, IdGenerationError>

Returns the next job-execution identifier.

§Errors

Returns IdGenerationError when the source is exhausted or produces an invalid value.

Source

fn next_step_execution_id(&self) -> Result<StepExecutionId, IdGenerationError>

Returns the next step-execution identifier.

§Errors

Returns IdGenerationError when the source is exhausted or produces an invalid value.

Source

fn next_failure_id(&self) -> Result<FailureId, IdGenerationError>

Returns the next opaque failure-correlation identifier.

§Errors

Returns IdGenerationError when the source is exhausted or produces an invalid value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§