#[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 get_approval_threshold_policy(&self) -> &Option<ApprovalThresholdPolicy>
pub fn get_approval_threshold_policy(&self) -> &Option<ApprovalThresholdPolicy>
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
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
source§impl PartialEq for VotingPolicyBuilder
impl PartialEq for VotingPolicyBuilder
source§fn eq(&self, other: &VotingPolicyBuilder) -> bool
fn eq(&self, other: &VotingPolicyBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for VotingPolicyBuilder
Auto Trait Implementations§
impl Freeze for VotingPolicyBuilder
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more