pub struct ConfigState {
pub latest: ClusterConfig,
pub committed: ClusterConfig,
pub last_config_index: LogIndex,
}Expand description
The node’s view of cluster membership (section 5.3).
Holds the newest configuration whose entry exists in the log, the newest committed configuration, and the index of the newest config entry. Every quorum decision uses exactly one of these configurations, never a blend (invariant M-05).
Fields§
§latest: ClusterConfigThe newest configuration from the log, committed or not.
committed: ClusterConfigThe newest committed configuration.
last_config_index: LogIndexThe log index of the newest config entry, or 0 when the log holds no config entry (the construction configuration rules).
Implementations§
Source§impl ConfigState
impl ConfigState
Sourcepub fn new(initial: ClusterConfig) -> Self
pub fn new(initial: ClusterConfig) -> Self
A state where the construction configuration is both the latest and the committed configuration.
Trait Implementations§
Source§impl Clone for ConfigState
impl Clone for ConfigState
Source§impl Debug for ConfigState
impl Debug for ConfigState
impl Eq for ConfigState
Source§impl PartialEq for ConfigState
impl PartialEq for ConfigState
impl StructuralPartialEq for ConfigState
Auto Trait Implementations§
impl Forget for ConfigState
impl Freeze for ConfigState
impl Move for ConfigState
impl RefUnwindSafe for ConfigState
impl Send for ConfigState
impl Sync for ConfigState
impl Unpin for ConfigState
impl UnsafeUnpin for ConfigState
impl UnwindSafe for ConfigState
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