Struct spl_governance::state::proposal::ProposalOption
source · [−]pub struct ProposalOption {
pub label: String,
pub vote_weight: u64,
pub vote_result: OptionVoteResult,
pub transactions_executed_count: u16,
pub transactions_count: u16,
pub transactions_next_index: u16,
}
Expand description
Proposal Option
Fields
label: String
Option label
vote_weight: u64
Vote weight for the option
vote_result: OptionVoteResult
Vote result for the option
transactions_executed_count: u16
The number of the transactions already executed
transactions_count: u16
The number of transactions included in the option
transactions_next_index: u16
The index of the the next transaction to be added
Trait Implementations
impl BorshSchema for ProposalOption where
String: BorshSchema,
u64: BorshSchema,
OptionVoteResult: BorshSchema,
u16: BorshSchema,
u16: BorshSchema,
u16: BorshSchema,
impl BorshSchema for ProposalOption where
String: BorshSchema,
u64: BorshSchema,
OptionVoteResult: BorshSchema,
u16: BorshSchema,
u16: BorshSchema,
u16: BorshSchema,
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.
impl BorshSerialize for ProposalOption where
String: BorshSerialize,
u64: BorshSerialize,
OptionVoteResult: BorshSerialize,
u16: BorshSerialize,
u16: BorshSerialize,
u16: BorshSerialize,
impl BorshSerialize for ProposalOption where
String: BorshSerialize,
u64: BorshSerialize,
OptionVoteResult: BorshSerialize,
u16: BorshSerialize,
u16: BorshSerialize,
u16: BorshSerialize,
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 ProposalOption
impl Send for ProposalOption
impl Sync for ProposalOption
impl Unpin for ProposalOption
impl UnwindSafe for ProposalOption
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more