#[non_exhaustive]pub struct Builder { /* private fields */ }Expand description
A builder for ApprovalThresholdPolicy
Implementations
sourceimpl Builder
impl Builder
sourcepub fn threshold_percentage(self, input: i32) -> Self
pub fn threshold_percentage(self, input: i32) -> Self
The percentage of votes among all members that must be YES for a proposal to be approved. For example, a ThresholdPercentage value of 50 indicates 50%. The ThresholdComparator determines the precise comparison. If a ThresholdPercentage value of 50 is specified on a network with 10 members, along with a ThresholdComparator value of GREATER_THAN, this indicates that 6 YES votes are required for the proposal to be approved.
sourcepub fn set_threshold_percentage(self, input: Option<i32>) -> Self
pub fn set_threshold_percentage(self, input: Option<i32>) -> Self
The percentage of votes among all members that must be YES for a proposal to be approved. For example, a ThresholdPercentage value of 50 indicates 50%. The ThresholdComparator determines the precise comparison. If a ThresholdPercentage value of 50 is specified on a network with 10 members, along with a ThresholdComparator value of GREATER_THAN, this indicates that 6 YES votes are required for the proposal to be approved.
sourcepub fn proposal_duration_in_hours(self, input: i32) -> Self
pub fn proposal_duration_in_hours(self, input: i32) -> Self
The duration from the time that a proposal is created until it expires. If members cast neither the required number of YES votes to approve the proposal nor the number of NO votes required to reject it before the duration expires, the proposal is EXPIRED and ProposalActions are not carried out.
sourcepub fn set_proposal_duration_in_hours(self, input: Option<i32>) -> Self
pub fn set_proposal_duration_in_hours(self, input: Option<i32>) -> Self
The duration from the time that a proposal is created until it expires. If members cast neither the required number of YES votes to approve the proposal nor the number of NO votes required to reject it before the duration expires, the proposal is EXPIRED and ProposalActions are not carried out.
sourcepub fn threshold_comparator(self, input: ThresholdComparator) -> Self
pub fn threshold_comparator(self, input: ThresholdComparator) -> Self
Determines whether the vote percentage must be greater than the ThresholdPercentage or must be greater than or equal to the ThreholdPercentage to be approved.
sourcepub fn set_threshold_comparator(
self,
input: Option<ThresholdComparator>
) -> Self
pub fn set_threshold_comparator(
self,
input: Option<ThresholdComparator>
) -> Self
Determines whether the vote percentage must be greater than the ThresholdPercentage or must be greater than or equal to the ThreholdPercentage to be approved.
sourcepub fn build(self) -> ApprovalThresholdPolicy
pub fn build(self) -> ApprovalThresholdPolicy
Consumes the builder and constructs a ApprovalThresholdPolicy
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more