pub struct LockBasedElection<L: DistributedLock> { /* private fields */ }Expand description
A standard implementation of leader election using a distributed lock.
Implementations§
Source§impl<L: DistributedLock> LockBasedElection<L>
impl<L: DistributedLock> LockBasedElection<L>
Trait Implementations§
Source§impl<L: DistributedLock> LeaderElection for LockBasedElection<L>
impl<L: DistributedLock> LeaderElection for LockBasedElection<L>
Source§fn try_become_leader<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, DistributedError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn try_become_leader<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, DistributedError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Attempt to become the leader or renew leadership if already the leader.
Auto Trait Implementations§
impl<L> Freeze for LockBasedElection<L>
impl<L> RefUnwindSafe for LockBasedElection<L>where
L: RefUnwindSafe,
impl<L> Send for LockBasedElection<L>
impl<L> Sync for LockBasedElection<L>
impl<L> Unpin for LockBasedElection<L>
impl<L> UnsafeUnpin for LockBasedElection<L>
impl<L> UnwindSafe for LockBasedElection<L>where
L: RefUnwindSafe,
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