pub struct LeaseManager { /* private fields */ }Expand description
Phase D: Lease management for capability expiration
Implementations§
Source§impl LeaseManager
impl LeaseManager
pub fn new() -> Self
Sourcepub async fn grant_lease(
&self,
lease_id: u64,
info: LeaseInfo,
) -> Result<(), ConcurError>
pub async fn grant_lease( &self, lease_id: u64, info: LeaseInfo, ) -> Result<(), ConcurError>
Grant lease for resource
Sourcepub async fn check_lease(&self, lease_id: u64) -> Result<LeaseInfo, ConcurError>
pub async fn check_lease(&self, lease_id: u64) -> Result<LeaseInfo, ConcurError>
Check if lease is valid
Sourcepub async fn revoke_lease(&self, lease_id: u64) -> Result<(), ConcurError>
pub async fn revoke_lease(&self, lease_id: u64) -> Result<(), ConcurError>
Revoke lease
Sourcepub async fn renew_lease(
&self,
lease_id: u64,
new_expiry: u64,
) -> Result<(), ConcurError>
pub async fn renew_lease( &self, lease_id: u64, new_expiry: u64, ) -> Result<(), ConcurError>
Renew lease if auto-renew is enabled
Auto Trait Implementations§
impl !RefUnwindSafe for LeaseManager
impl !UnwindSafe for LeaseManager
impl Freeze for LeaseManager
impl Send for LeaseManager
impl Sync for LeaseManager
impl Unpin for LeaseManager
impl UnsafeUnpin for LeaseManager
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