pub struct BlockLeaseAdapter { /* private fields */ }Expand description
Adapter wrapping a BlockLease as a RenewableLease.
Implementations§
Source§impl BlockLeaseAdapter
impl BlockLeaseAdapter
Sourcepub fn new(lease: BlockLease) -> Self
pub fn new(lease: BlockLease) -> Self
Wrap an existing BlockLease for use with RenewalManager.
Sourcepub fn inner(&self) -> &BlockLease
pub fn inner(&self) -> &BlockLease
Borrow the wrapped lease.
Trait Implementations§
Source§impl RenewableLease for BlockLeaseAdapter
impl RenewableLease for BlockLeaseAdapter
Source§fn expires_at_unix_secs(&self) -> u64
fn expires_at_unix_secs(&self) -> u64
Returns the unix timestamp (seconds) at which the lease expires.
Source§fn renew(&mut self, duration_secs: u64) -> Result<(), FabricError>
fn renew(&mut self, duration_secs: u64) -> Result<(), FabricError>
Attempt to renew the lease for
duration_secs additional seconds.Source§fn status(&self) -> LeaseStatus
fn status(&self) -> LeaseStatus
Query the current lease status.
Auto Trait Implementations§
impl Freeze for BlockLeaseAdapter
impl !RefUnwindSafe for BlockLeaseAdapter
impl !Send for BlockLeaseAdapter
impl !Sync for BlockLeaseAdapter
impl Unpin for BlockLeaseAdapter
impl !UnwindSafe for BlockLeaseAdapter
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