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§
Sourcefn next_job_instance_id(&self) -> Result<JobInstanceId, IdGenerationError>
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.
Sourcefn next_job_execution_id(&self) -> Result<JobExecutionId, IdGenerationError>
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.
Sourcefn next_step_execution_id(&self) -> Result<StepExecutionId, IdGenerationError>
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.
Sourcefn next_failure_id(&self) -> Result<FailureId, IdGenerationError>
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".