Skip to main content

JobLease

Trait JobLease 

Source
pub trait JobLease {
    // Required methods
    fn production_id(&self) -> ProductionId;
    fn job_id(&self) -> JobId;
    fn state(&self) -> Result<JobLeaseState>;
    fn export_token(&self) -> Result<String>;
}
Expand description

Backend-owned, production-bound worker capability; never a claim-ID pair.

Implementations keep credentials private and omit them from diagnostics. Dropping ownership never renews, releases or writes a claim.

Required Methods§

Source

fn production_id(&self) -> ProductionId

Returns the production scope without a credential.

Source

fn job_id(&self) -> JobId

Returns the claimed job without a credential.

Source

fn state(&self) -> Result<JobLeaseState>

Returns cached local ownership; transitions always recheck the store.

§Errors

Returns an ownership-state error when local state cannot be read.

Source

fn export_token(&self) -> Result<String>

Explicitly exports a bounded versioned credential for file/pipe transport.

§Errors

Rejects pending or closed ownership. Import revalidates current authority.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§