DistributedBorrow

Trait DistributedBorrow 

Source
pub trait DistributedBorrow<T> {
    // Required method
    fn try_hire(
        &self,
        candidate_id: u128,
        term: Duration,
    ) -> Result<Lease<T>, LeaseError>;
}
Expand description

Trait for distributed borrow operations.

Required Methods§

Source

fn try_hire( &self, candidate_id: u128, term: Duration, ) -> Result<Lease<T>, LeaseError>

Attempt to acquire a lease on the resource.

Implementors§