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
sourceimpl BorshDeserialize for ProposalOption where
String: BorshDeserialize,
u64: BorshDeserialize,
OptionVoteResult: BorshDeserialize,
u16: BorshDeserialize,
u16: BorshDeserialize,
u16: BorshDeserialize,
impl BorshDeserialize for ProposalOption where
String: BorshDeserialize,
u64: BorshDeserialize,
OptionVoteResult: BorshDeserialize,
u16: BorshDeserialize,
u16: BorshDeserialize,
u16: BorshDeserialize,
sourceimpl 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,
sourcefn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
sourcefn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
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
sourcefn 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.
fn schema_container() -> BorshSchemaContainer
sourceimpl 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,
sourceimpl Clone for ProposalOption
impl Clone for ProposalOption
sourcefn clone(&self) -> ProposalOption
fn clone(&self) -> ProposalOption
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ProposalOption
impl Debug for ProposalOption
sourceimpl PartialEq<ProposalOption> for ProposalOption
impl PartialEq<ProposalOption> for ProposalOption
sourcefn eq(&self, other: &ProposalOption) -> bool
fn eq(&self, other: &ProposalOption) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ProposalOption) -> bool
fn ne(&self, other: &ProposalOption) -> bool
This method tests for !=
.
impl StructuralPartialEq for ProposalOption
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
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more