pub enum ConsensusAlgorithm {
Majority,
Unanimous,
Weighted,
FirstWins,
HumanReview,
}Expand description
Consensus algorithm type
Choose based on your requirements:
- Majority: >50% agreement wins. Fast, tolerates outliers.
- Unanimous: 100% agreement required. High confidence, may timeout.
- Weighted: Per-agent weights (senior reviewers count more). Balanced expertise.
- FirstWins: First response wins. Fastest, no consensus overhead.
- HumanReview: Flags for human operator decision. High-stakes scenarios.
Variants§
Majority
Simple majority voting (>50% agreement)
Unanimous
Unanimous agreement required (100%)
Weighted
Weighted voting based on agent weights
FirstWins
First response wins (no consensus)
HumanReview
Flags result for human operator review
Trait Implementations§
Source§impl Clone for ConsensusAlgorithm
impl Clone for ConsensusAlgorithm
Source§fn clone(&self) -> ConsensusAlgorithm
fn clone(&self) -> ConsensusAlgorithm
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 moreSource§impl Debug for ConsensusAlgorithm
impl Debug for ConsensusAlgorithm
Source§impl Default for ConsensusAlgorithm
impl Default for ConsensusAlgorithm
Source§fn default() -> ConsensusAlgorithm
fn default() -> ConsensusAlgorithm
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConsensusAlgorithm
impl<'de> Deserialize<'de> for ConsensusAlgorithm
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 ConsensusAlgorithm
impl PartialEq for ConsensusAlgorithm
Source§impl Serialize for ConsensusAlgorithm
impl Serialize for ConsensusAlgorithm
impl Copy for ConsensusAlgorithm
impl Eq for ConsensusAlgorithm
impl StructuralPartialEq for ConsensusAlgorithm
Auto Trait Implementations§
impl Freeze for ConsensusAlgorithm
impl RefUnwindSafe for ConsensusAlgorithm
impl Send for ConsensusAlgorithm
impl Sync for ConsensusAlgorithm
impl Unpin for ConsensusAlgorithm
impl UnwindSafe for ConsensusAlgorithm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.