Struct spl_governance::state::legacy::VoteRecordV1
source · [−]pub struct VoteRecordV1 {
pub account_type: GovernanceAccountType,
pub proposal: Pubkey,
pub governing_token_owner: Pubkey,
pub is_relinquished: bool,
pub vote_weight: VoteWeightV1,
}
Expand description
Proposal VoteRecord
Fields
account_type: GovernanceAccountType
Governance account type
proposal: Pubkey
Proposal account
governing_token_owner: Pubkey
The user who casted this vote This is the Governing Token Owner who deposited governing tokens into the Realm
is_relinquished: bool
Indicates whether the vote was relinquished by voter
vote_weight: VoteWeightV1
Voter’s vote: Yes/No and amount
Trait Implementations
sourceimpl BorshDeserialize for VoteRecordV1 where
GovernanceAccountType: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
bool: BorshDeserialize,
VoteWeightV1: BorshDeserialize,
impl BorshDeserialize for VoteRecordV1 where
GovernanceAccountType: BorshDeserialize,
Pubkey: BorshDeserialize,
Pubkey: BorshDeserialize,
bool: BorshDeserialize,
VoteWeightV1: BorshDeserialize,
sourceimpl BorshSchema for VoteRecordV1 where
GovernanceAccountType: BorshSchema,
Pubkey: BorshSchema,
Pubkey: BorshSchema,
bool: BorshSchema,
VoteWeightV1: BorshSchema,
impl BorshSchema for VoteRecordV1 where
GovernanceAccountType: BorshSchema,
Pubkey: BorshSchema,
Pubkey: BorshSchema,
bool: BorshSchema,
VoteWeightV1: 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 VoteRecordV1 where
GovernanceAccountType: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
bool: BorshSerialize,
VoteWeightV1: BorshSerialize,
impl BorshSerialize for VoteRecordV1 where
GovernanceAccountType: BorshSerialize,
Pubkey: BorshSerialize,
Pubkey: BorshSerialize,
bool: BorshSerialize,
VoteWeightV1: BorshSerialize,
sourceimpl Clone for VoteRecordV1
impl Clone for VoteRecordV1
sourcefn clone(&self) -> VoteRecordV1
fn clone(&self) -> VoteRecordV1
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 VoteRecordV1
impl Debug for VoteRecordV1
sourceimpl IsInitialized for VoteRecordV1
impl IsInitialized for VoteRecordV1
sourcefn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
Is initialized
sourceimpl PartialEq<VoteRecordV1> for VoteRecordV1
impl PartialEq<VoteRecordV1> for VoteRecordV1
sourcefn eq(&self, other: &VoteRecordV1) -> bool
fn eq(&self, other: &VoteRecordV1) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VoteRecordV1) -> bool
fn ne(&self, other: &VoteRecordV1) -> bool
This method tests for !=
.
impl StructuralPartialEq for VoteRecordV1
Auto Trait Implementations
impl RefUnwindSafe for VoteRecordV1
impl Send for VoteRecordV1
impl Sync for VoteRecordV1
impl Unpin for VoteRecordV1
impl UnwindSafe for VoteRecordV1
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more