OrderedExt

Trait OrderedExt 

Source
pub trait OrderedExt<P> {
    // Required methods
    fn quorum(&self) -> u32;
    fn max_faults(&self) -> u32;
    fn key(&self, index: u32) -> Option<&P>;
    fn index(&self, key: &P) -> Option<u32>;
}
Expand description

Extension trait for Ordered participant sets providing quorum and index utilities.

Required Methods§

Source

fn quorum(&self) -> u32

Returns the quorum value (2f+1) for this participant set.

Source

fn max_faults(&self) -> u32

Returns the maximum number of faults (f) tolerated by this participant set.

Source

fn key(&self, index: u32) -> Option<&P>

Returns the participant key at the given index.

Source

fn index(&self, key: &P) -> Option<u32>

Returns the index for the given participant key, if present.

Implementations on Foreign Types§

Source§

impl<P: PublicKey> OrderedExt<P> for Ordered<P>

Source§

fn quorum(&self) -> u32

Source§

fn max_faults(&self) -> u32

Source§

fn index(&self, key: &P) -> Option<u32>

Source§

fn key(&self, index: u32) -> Option<&P>

Implementors§