Trait frame_support::traits::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.

Object Safety§

This trait is not object safe.

Implementors§