Struct aws_sdk_managedblockchain::model::ApprovalThresholdPolicy [−][src]
#[non_exhaustive]pub struct ApprovalThresholdPolicy {
pub threshold_percentage: Option<i32>,
pub proposal_duration_in_hours: Option<i32>,
pub threshold_comparator: Option<ThresholdComparator>,
}
Expand description
A policy type that defines the voting rules for the network. The rules decide if a proposal is approved. Approval may be based on criteria such as the percentage of YES
votes and the duration of the proposal. The policy applies to all proposals and is specified when the network is created.
Applies only to Hyperledger Fabric.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.threshold_percentage: Option<i32>
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.
proposal_duration_in_hours: Option<i32>
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.
threshold_comparator: Option<ThresholdComparator>
Determines whether the vote percentage must be greater than the ThresholdPercentage
or must be greater than or equal to the ThreholdPercentage
to be approved.
Implementations
Creates a new builder-style object to manufacture ApprovalThresholdPolicy
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ApprovalThresholdPolicy
impl Send for ApprovalThresholdPolicy
impl Sync for ApprovalThresholdPolicy
impl Unpin for ApprovalThresholdPolicy
impl UnwindSafe for ApprovalThresholdPolicy
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more