Trait VoteTally

Source
pub trait VoteTally<Votes, Class> {
    // Required methods
    fn new(_: Class) -> Self;
    fn ayes(&self, class: Class) -> Votes;
    fn support(&self, class: Class) -> Perbill;
    fn approval(&self, class: Class) -> Perbill;
}

Required Methods§

Source

fn new(_: Class) -> Self

Initializes a new tally.

Source

fn ayes(&self, class: Class) -> Votes

Returns the number of positive votes for the tally.

Source

fn support(&self, class: Class) -> Perbill

Returns the approval ratio (positive to total votes) for the tally, without multipliers (e.g. conviction, ranks, etc.).

Source

fn approval(&self, class: Class) -> Perbill

Returns the approval ratio (positive to total votes) for the tally.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§