pub struct LeaderElectionState {
pub db_name: String,
pub instance_id: String,
pub is_leader: bool,
pub leader_id: Option<String>,
pub lease_expiry: u64,
pub last_heartbeat: u64,
}Expand description
Leader election state for a database instance
Fields§
§db_name: String§instance_id: String§is_leader: bool§leader_id: Option<String>§lease_expiry: u64§last_heartbeat: u64Trait Implementations§
Source§impl Clone for LeaderElectionState
impl Clone for LeaderElectionState
Source§fn clone(&self) -> LeaderElectionState
fn clone(&self) -> LeaderElectionState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LeaderElectionState
impl RefUnwindSafe for LeaderElectionState
impl Send for LeaderElectionState
impl Sync for LeaderElectionState
impl Unpin for LeaderElectionState
impl UnwindSafe for LeaderElectionState
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