Expand description
Expression algebra for defining quorum systems.
An Expr describes which sets of nodes form a quorum:
Node: a single nodeOr(a + b): any one child is a quorumAnd(a * b): every child is neededChoose(choose): anykof the children
Or, And, and Choose are always non-empty and Choose always has
1 <= k <= children.len(). Their fields are private so those
invariants cannot be broken after construction.
Structs§
- And
- AND combinator: all children must be satisfied.
- Choose
- CHOOSE combinator: at least
kchildren must be satisfied. - Node
- A node in a quorum system.
- Or
- OR combinator: at least one child must be satisfied.
Enums§
- Expr
- An expression describing which sets of nodes form a quorum.
Traits§
- Element
- Trait for types that can be used as node identifiers in quorum expressions.