1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Ballot types and the [`Ballot`] trait.
//!
//! This crate provides [`PairwiseBallot`] for explicit pairwise preferences
//! and [`RankedBallot`] for ranked ballots. Users may also implement the
//! [`Ballot`] trait for custom ballot types.
pub use PairwiseBallot;
pub use RankedBallot;
use crateCandidate;
/// A voter's pairwise preference between two candidates.
/// A ballot that can be queried for pairwise preferences.
///
/// Implementations define both the number of candidates the ballot refers to
/// and the voter's preference for any ordered pair. Users may implement this
/// trait for custom ballot types; the library only requires that the returned
/// preferences be consistent with the ballot's own semantics.