pub struct ConsensusState {
pub holonomy: f64,
pub peer_agreement: f64,
pub crdt_version: BTreeMap<u64, u64>,
}Expand description
Consensus state captures cycle coherence via holonomy integral and peer agreement with a CRDT version vector.
Fields§
§holonomy: f64Cycle integral (0 = coherent)
peer_agreement: f64Fraction of agreeing peers (0-1)
crdt_version: BTreeMap<u64, u64>State vector clock (agent_id -> version)
Implementations§
Trait Implementations§
Source§impl Clone for ConsensusState
impl Clone for ConsensusState
Source§fn clone(&self) -> ConsensusState
fn clone(&self) -> ConsensusState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConsensusState
impl Debug for ConsensusState
Source§impl<'de> Deserialize<'de> for ConsensusState
impl<'de> Deserialize<'de> for ConsensusState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConsensusState
impl PartialEq for ConsensusState
Source§fn eq(&self, other: &ConsensusState) -> bool
fn eq(&self, other: &ConsensusState) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ConsensusState
impl Serialize for ConsensusState
impl StructuralPartialEq for ConsensusState
Auto Trait Implementations§
impl Freeze for ConsensusState
impl RefUnwindSafe for ConsensusState
impl Send for ConsensusState
impl Sync for ConsensusState
impl Unpin for ConsensusState
impl UnsafeUnpin for ConsensusState
impl UnwindSafe for ConsensusState
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