Struct tallystick::RankedCandidate [−][src]
Expand description
A RankedCandidate is candidate in an election, ranked ascending (starting from zero). A ranked-candidate with a lower rank beats a ranked-candidate with a higher rank. Ranked-candidates with the same rank are tied.
Fields
candidate: T
The Candidate
rank: usize
Candidate rank. A lower rank beats a higher rank. A rank of zero is the best a candidate can get.
Trait Implementations
Returns the “default value” for a type. Read more
impl<'de, T: Clone + Eq + PartialEq> Deserialize<'de> for RankedCandidate<T> where
T: Deserialize<'de>,
impl<'de, T: Clone + Eq + PartialEq> Deserialize<'de> for RankedCandidate<T> where
T: Deserialize<'de>,
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<T> RefUnwindSafe for RankedCandidate<T> where
T: RefUnwindSafe,
impl<T> Send for RankedCandidate<T> where
T: Send,
impl<T> Sync for RankedCandidate<T> where
T: Sync,
impl<T> Unpin for RankedCandidate<T> where
T: Unpin,
impl<T> UnwindSafe for RankedCandidate<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.