pub struct QuorumThreshold {
pub threshold_type: String,
pub value: f64,
}Expand description
Threshold rules for Quorum mode (distinct from QuorumRules used in Decision mode’s voting.quorum).
Fields§
§threshold_type: String§value: f64Implementations§
Source§impl QuorumThreshold
impl QuorumThreshold
Sourcepub fn effective(&self, total_participants: usize) -> EffectiveThreshold
pub fn effective(&self, total_participants: usize) -> EffectiveThreshold
Resolve this threshold against a session with total_participants
declared participants. See EffectiveThreshold for the contract —
both the mode and the policy evaluator must resolve through here.
Rounding is ceiling (0.5 of a participant is a whole participant,
and half a vote cannot approve anything), and the result has a floor of
one approval. That floor is what makes T = 0 unreachable: at T = 0
a session is “ready to commit” with no ballot cast at all, and a
negative commitment then seals with zero approvals (issue #145).
For percentage, RFC-MACP-0012 §4.2 (1.2.0-draft, spec #110) promoted
that rounding direction from a non-normative rationale into normative
text and pinned the arithmetic with it: the effective bar is
ceil(value × declared_participant_count / 100), computed with exact
integer arithmetic — “implementations … MUST NOT use floating-point
division”. The denominator is fixed at SessionStart and does not
shrink as ballots, abstentions included, are cast (§8’s completion note;
RFC-MACP-0011 §5 rule 4a made that arguable).
Trait Implementations§
Source§impl Clone for QuorumThreshold
impl Clone for QuorumThreshold
Source§fn clone(&self) -> QuorumThreshold
fn clone(&self) -> QuorumThreshold
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more