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§
Sourcefn production_id(&self) -> ProductionId
fn production_id(&self) -> ProductionId
Returns the production scope without a credential.
Sourcefn state(&self) -> Result<JobLeaseState>
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.
Sourcefn export_token(&self) -> Result<String>
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".