Enum tallystick::util::ParsedVote[][src]

pub enum ParsedVote {
    Unranked(Vec<String>),
    Ranked(Vec<(String, u32)>),
}
Expand description

A parsed vote, either ranked or unranked.

Variants

Unranked(Vec<String>)

An unranked vote. Candidates are returned in preferential order, with the most significant selection first.

Ranked(Vec<(String, u32)>)

A ranked vote as (candidate, rank) pairs. Ranks are ordered ascending, so that the most significant rank is rank 0.

Implementations

Convert unranked ParsedVote into a ranked parsed vote. This is a no-op if the vote is already ranked

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.