pub trait Quorum {
type Item: Ord;
// Required methods
fn quorum<M: Faults>(&self) -> u32;
fn max_faults<M: Faults>(&self) -> u32;
fn key(&self, index: Participant) -> Option<&Self::Item>;
fn index(&self, key: &Self::Item) -> Option<Participant>;
}Expand description
Extension trait for Set participant sets providing quorum and index utilities.
Required Associated Types§
Required Methods§
Sourcefn quorum<M: Faults>(&self) -> u32
fn quorum<M: Faults>(&self) -> u32
Returns the quorum value for this participant set using the given fault model.
§Panics
Panics if the number of participants exceeds u32::MAX.
Sourcefn max_faults<M: Faults>(&self) -> u32
fn max_faults<M: Faults>(&self) -> u32
Returns the maximum number of faults tolerated by this participant set.
§Panics
Panics if the number of participants exceeds u32::MAX.
Sourcefn key(&self, index: Participant) -> Option<&Self::Item>
fn key(&self, index: Participant) -> Option<&Self::Item>
Returns the participant key at the given index.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".