pub struct ParametersGovernance {
acceptance_criteria_per_action: Hamt<DefaultHasher, ParametersGovernanceActionType, GovernanceAcceptanceCriteria>,
default_acceptance_criteria: GovernanceAcceptanceCriteria,
logs: Vec<ParametersGovernanceAction>,
}
Fields§
§acceptance_criteria_per_action: Hamt<DefaultHasher, ParametersGovernanceActionType, GovernanceAcceptanceCriteria>
§default_acceptance_criteria: GovernanceAcceptanceCriteria
§logs: Vec<ParametersGovernanceAction>
Implementations§
source§impl ParametersGovernance
impl ParametersGovernance
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: ParametersGovernanceActionType, criteria: GovernanceAcceptanceCriteria )
pub fn acceptance_criteria_for( &self, action: ParametersGovernanceActionType ) -> &GovernanceAcceptanceCriteria
pub fn logs(&self) -> impl Iterator<Item = &ParametersGovernanceAction>
pub fn logs_clear(&mut self)
sourcepub fn logs_register(&mut self, action: ParametersGovernanceAction)
pub fn logs_register(&mut self, action: ParametersGovernanceAction)
register a new action
Trait Implementations§
source§impl Clone for ParametersGovernance
impl Clone for ParametersGovernance
source§fn clone(&self) -> ParametersGovernance
fn clone(&self) -> ParametersGovernance
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 ParametersGovernance
impl Default for ParametersGovernance
source§fn default() -> ParametersGovernance
fn default() -> ParametersGovernance
Returns the “default value” for a type. Read more
source§impl PartialEq<ParametersGovernance> for ParametersGovernance
impl PartialEq<ParametersGovernance> for ParametersGovernance
source§fn eq(&self, other: &ParametersGovernance) -> bool
fn eq(&self, other: &ParametersGovernance) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ParametersGovernance
impl StructuralEq for ParametersGovernance
impl StructuralPartialEq for ParametersGovernance
Auto Trait Implementations§
impl RefUnwindSafe for ParametersGovernance
impl Send for ParametersGovernance
impl Sync for ParametersGovernance
impl Unpin for ParametersGovernance
impl UnwindSafe for ParametersGovernance
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