pub struct BallotRules {
pub mode: PollMode,
pub max_ranks: Option<u16>,
pub max_choices: Option<u16>,
pub option_count: usize,
}Expand description
What a ballot in one poll may say: its mode, its limits, and how many options it has
Fields§
§mode: PollMode§max_ranks: Option<u16>§max_choices: Option<u16>§option_count: usizeImplementations§
Source§impl BallotRules
impl BallotRules
Sourcepub fn check(
&self,
order: &[PollOptionPosition],
ballot: &[PollOptionNumber],
) -> Result<Vec<PollOptionPosition>, BallotError>
pub fn check( &self, order: &[PollOptionPosition], ballot: &[PollOptionNumber], ) -> Result<Vec<PollOptionPosition>, BallotError>
The canonical positions an agent’s ballot names, in its order,
through order (that agent’s display_order); or why it is not a
ballot in this poll
Trait Implementations§
Source§impl Clone for BallotRules
impl Clone for BallotRules
impl Copy for BallotRules
Auto Trait Implementations§
impl Freeze for BallotRules
impl RefUnwindSafe for BallotRules
impl Send for BallotRules
impl Sync for BallotRules
impl Unpin for BallotRules
impl UnsafeUnpin for BallotRules
impl UnwindSafe for BallotRules
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more