Struct chain_impl_mockchain::ledger::governance::TreasuryGovernance
source · pub struct TreasuryGovernance {
acceptance_criteria_per_action: Hamt<DefaultHasher, TreasuryGovernanceActionType, GovernanceAcceptanceCriteria>,
default_acceptance_criteria: GovernanceAcceptanceCriteria,
}
Fields§
§acceptance_criteria_per_action: Hamt<DefaultHasher, TreasuryGovernanceActionType, GovernanceAcceptanceCriteria>
§default_acceptance_criteria: GovernanceAcceptanceCriteria
Implementations§
source§impl TreasuryGovernance
impl TreasuryGovernance
pub fn new() -> Self
sourcepub fn set_default_acceptance_criteria(
&mut self,
new: GovernanceAcceptanceCriteria
) -> GovernanceAcceptanceCriteria
pub fn set_default_acceptance_criteria( &mut self, new: GovernanceAcceptanceCriteria ) -> GovernanceAcceptanceCriteria
set the new default acceptance criteria
this function does not do any allocation/drop and returns the previous default value.
sourcepub fn default_acceptance_criteria(&self) -> &GovernanceAcceptanceCriteria
pub fn default_acceptance_criteria(&self) -> &GovernanceAcceptanceCriteria
get the default acceptance criteria
This is the default criteria that will be used for any treasury governance action if a specific one is not set for that given governance action.
pub fn set_acceptance_criteria( &mut self, action: TreasuryGovernanceActionType, criteria: GovernanceAcceptanceCriteria )
pub fn acceptance_criteria_for( &self, action: TreasuryGovernanceActionType ) -> &GovernanceAcceptanceCriteria
Trait Implementations§
source§impl Clone for TreasuryGovernance
impl Clone for TreasuryGovernance
source§fn clone(&self) -> TreasuryGovernance
fn clone(&self) -> TreasuryGovernance
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for TreasuryGovernance
impl Default for TreasuryGovernance
source§fn default() -> TreasuryGovernance
fn default() -> TreasuryGovernance
Returns the “default value” for a type. Read more
source§impl PartialEq<TreasuryGovernance> for TreasuryGovernance
impl PartialEq<TreasuryGovernance> for TreasuryGovernance
source§fn eq(&self, other: &TreasuryGovernance) -> bool
fn eq(&self, other: &TreasuryGovernance) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TreasuryGovernance
impl StructuralEq for TreasuryGovernance
impl StructuralPartialEq for TreasuryGovernance
Auto Trait Implementations§
impl RefUnwindSafe for TreasuryGovernance
impl Send for TreasuryGovernance
impl Sync for TreasuryGovernance
impl Unpin for TreasuryGovernance
impl UnwindSafe for TreasuryGovernance
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more