Struct wybr::outcome::GenericOutcome
source · pub struct GenericOutcome<'a> { /* private fields */ }
Expand description
Multi-winner election outcome
Implementations§
source§impl<'a> GenericOutcome<'a>
impl<'a> GenericOutcome<'a>
pub fn new<I, J>(
winners: I,
withdrawn: J,
candidates: u32,
sealed: bool,
meta: &'a Metadata
) -> GenericOutcome<'a>where
I: IntoIterator<Item = u32>,
J: IntoIterator<Item = u32>,
Trait Implementations§
source§impl<'a> Debug for GenericOutcome<'a>
impl<'a> Debug for GenericOutcome<'a>
source§impl<'a> Display for GenericOutcome<'a>
impl<'a> Display for GenericOutcome<'a>
source§impl<'a> Outcome for GenericOutcome<'a>
impl<'a> Outcome for GenericOutcome<'a>
source§fn deterministic(&self) -> bool
fn deterministic(&self) -> bool
Specify whether the election was deterministic Read more
fn candidate_count(&self) -> usize
fn elected_count(&self) -> usize
source§fn elected(&self) -> CandidateIterator<'_> ⓘ
fn elected(&self) -> CandidateIterator<'_> ⓘ
Return iterator of IDs of elected candidates
source§fn winner(&self) -> Option<u32>
fn winner(&self) -> Option<u32>
Return a single winner ID, if there is one, that is either the election scheme is single
winner one or there is one seat in multi-winner election
fn withdrawn_count(&self) -> usize
source§fn withdrawn(&self) -> CandidateIterator<'_> ⓘ
fn withdrawn(&self) -> CandidateIterator<'_> ⓘ
Return iterator of IDs of withdrawn candidates
source§fn elected_names(&self) -> NamesIterator<'_> ⓘ
fn elected_names(&self) -> NamesIterator<'_> ⓘ
Return iterator of elected candidate names Read more
fn winner_name(&self) -> Option<String>
source§fn withdrawn_names(&self) -> NamesIterator<'_> ⓘ
fn withdrawn_names(&self) -> NamesIterator<'_> ⓘ
Return iterator of names of withdrawn candidates