Struct spl_governance::state::vote_record::VoteChoice
source · [−]Expand description
Voter choice for a proposal option In the current version only 1) Single choice and 2) Multiple choices proposals are supported In the future versions we can add support for 1) Quadratic voting, 2) Ranked choice voting and 3) Weighted voting
Fields
rank: u8
The rank given to the choice by voter Note: The filed is not used in the current version
weight_percentage: u8
The voter’s weight percentage given by the voter to the choice
Implementations
Returns the choice weight given the voter’s weight
Trait Implementations
Get the name of the type without brackets.
Recursively, using DFS, add type definitions required for this type. For primitive types this is an empty map. Type definition explains how to serialize/deserialize a type. Read more
fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
Helper method to add a single type definition to the map.
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 RefUnwindSafe for VoteChoice
impl Send for VoteChoice
impl Sync for VoteChoice
impl Unpin for VoteChoice
impl UnwindSafe for VoteChoice
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more