Enum spl_governance::state::enums::MintMaxVoteWeightSource
source · [−]Expand description
The source of max vote weight used for voting Values below 100% mint supply can be used when the governing token is fully minted but not distributed yet
Variants
SupplyFraction(u64)
Fraction (10^10 precision) of the governing mint supply is used as max vote weight The default is 100% (10^10) to use all available mint supply for voting
Absolute(u64)
Absolute value, irrelevant of the actual mint supply, is used as max vote weight Note: this option is not implemented in the current version
Implementations
sourceimpl MintMaxVoteWeightSource
impl MintMaxVoteWeightSource
sourcepub const SUPPLY_FRACTION_BASE: u64
pub const SUPPLY_FRACTION_BASE: u64
Base for mint supply fraction calculation
sourcepub const FULL_SUPPLY_FRACTION: MintMaxVoteWeightSource
pub const FULL_SUPPLY_FRACTION: MintMaxVoteWeightSource
100% of mint supply
Trait Implementations
sourceimpl BorshDeserialize for MintMaxVoteWeightSource where
u64: BorshDeserialize,
u64: BorshDeserialize,
impl BorshDeserialize for MintMaxVoteWeightSource where
u64: BorshDeserialize,
u64: BorshDeserialize,
sourceimpl BorshSchema for MintMaxVoteWeightSource
impl BorshSchema for MintMaxVoteWeightSource
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 MintMaxVoteWeightSource where
u64: BorshSerialize,
u64: BorshSerialize,
impl BorshSerialize for MintMaxVoteWeightSource where
u64: BorshSerialize,
u64: BorshSerialize,
sourceimpl Clone for MintMaxVoteWeightSource
impl Clone for MintMaxVoteWeightSource
sourcefn clone(&self) -> MintMaxVoteWeightSource
fn clone(&self) -> MintMaxVoteWeightSource
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 MintMaxVoteWeightSource
impl Debug for MintMaxVoteWeightSource
sourceimpl PartialEq<MintMaxVoteWeightSource> for MintMaxVoteWeightSource
impl PartialEq<MintMaxVoteWeightSource> for MintMaxVoteWeightSource
sourcefn eq(&self, other: &MintMaxVoteWeightSource) -> bool
fn eq(&self, other: &MintMaxVoteWeightSource) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MintMaxVoteWeightSource) -> bool
fn ne(&self, other: &MintMaxVoteWeightSource) -> bool
This method tests for !=
.
impl StructuralPartialEq for MintMaxVoteWeightSource
Auto Trait Implementations
impl RefUnwindSafe for MintMaxVoteWeightSource
impl Send for MintMaxVoteWeightSource
impl Sync for MintMaxVoteWeightSource
impl Unpin for MintMaxVoteWeightSource
impl UnwindSafe for MintMaxVoteWeightSource
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