pub struct Lease { /* private fields */ }Expand description
Active lease for a specific run.
Implementations§
Source§impl Lease
impl Lease
Sourcepub fn new(run_id: RunId, owner: LeaseOwner, expiry: LeaseExpiry) -> Self
pub fn new(run_id: RunId, owner: LeaseOwner, expiry: LeaseExpiry) -> Self
Creates a new lease value.
Sourcepub fn owner(&self) -> &LeaseOwner
pub fn owner(&self) -> &LeaseOwner
Returns the worker currently holding the lease.
Sourcepub fn expiry(&self) -> LeaseExpiry
pub fn expiry(&self) -> LeaseExpiry
Returns the lease expiry.
Trait Implementations§
impl Eq for Lease
impl StructuralPartialEq for Lease
Auto Trait Implementations§
impl Freeze for Lease
impl RefUnwindSafe for Lease
impl Send for Lease
impl Sync for Lease
impl Unpin for Lease
impl UnsafeUnpin for Lease
impl UnwindSafe for Lease
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more