pub trait BackendLeaseClient {
// Required methods
fn claim(&self, change_id: &str) -> Result<ClaimResult, BackendError>;
fn release(&self, change_id: &str) -> Result<ReleaseResult, BackendError>;
fn allocate(&self) -> Result<AllocateResult, BackendError>;
}Expand description
Port for backend lease operations (claim, release, allocate).
Implementations handle HTTP communication and token management. The domain layer uses this trait to remain decoupled from transport.
Required Methods§
Sourcefn claim(&self, change_id: &str) -> Result<ClaimResult, BackendError>
fn claim(&self, change_id: &str) -> Result<ClaimResult, BackendError>
Claim a lease on a change.
Sourcefn release(&self, change_id: &str) -> Result<ReleaseResult, BackendError>
fn release(&self, change_id: &str) -> Result<ReleaseResult, BackendError>
Release a held lease.
Sourcefn allocate(&self) -> Result<AllocateResult, BackendError>
fn allocate(&self) -> Result<AllocateResult, BackendError>
Request the backend to allocate the next available change.