#[non_exhaustive]pub struct VotingPolicyBuilder { /* private fields */ }
Expand description
A builder for VotingPolicy
.
Implementations§
source§impl VotingPolicyBuilder
impl VotingPolicyBuilder
sourcepub fn approval_threshold_policy(self, input: ApprovalThresholdPolicy) -> Self
pub fn approval_threshold_policy(self, input: ApprovalThresholdPolicy) -> Self
Defines the rules for the network for voting on proposals, such as the percentage of YES
votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created.
sourcepub fn set_approval_threshold_policy(
self,
input: Option<ApprovalThresholdPolicy>
) -> Self
pub fn set_approval_threshold_policy( self, input: Option<ApprovalThresholdPolicy> ) -> Self
Defines the rules for the network for voting on proposals, such as the percentage of YES
votes required for the proposal to be approved and the duration of the proposal. The policy applies to all proposals and is specified when the network is created.
sourcepub fn build(self) -> VotingPolicy
pub fn build(self) -> VotingPolicy
Consumes the builder and constructs a VotingPolicy
.
Trait Implementations§
source§impl Clone for VotingPolicyBuilder
impl Clone for VotingPolicyBuilder
source§fn clone(&self) -> VotingPolicyBuilder
fn clone(&self) -> VotingPolicyBuilder
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 Debug for VotingPolicyBuilder
impl Debug for VotingPolicyBuilder
source§impl Default for VotingPolicyBuilder
impl Default for VotingPolicyBuilder
source§fn default() -> VotingPolicyBuilder
fn default() -> VotingPolicyBuilder
Returns the “default value” for a type. Read more
source§impl PartialEq<VotingPolicyBuilder> for VotingPolicyBuilder
impl PartialEq<VotingPolicyBuilder> for VotingPolicyBuilder
source§fn eq(&self, other: &VotingPolicyBuilder) -> bool
fn eq(&self, other: &VotingPolicyBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for VotingPolicyBuilder
Auto Trait Implementations§
impl RefUnwindSafe for VotingPolicyBuilder
impl Send for VotingPolicyBuilder
impl Sync for VotingPolicyBuilder
impl Unpin for VotingPolicyBuilder
impl UnwindSafe for VotingPolicyBuilder
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