pub struct BothQuorums<R, W> { /* private fields */ }Expand description
A quorum rule that accepts an ID set only when both a read rule and a write rule accept it.
Two read quorums may be disjoint, and so may two write quorums. Every set this rule accepts is
both a read quorum and a write quorum. So when every read quorum intersects every write quorum,
any two accepted sets intersect; verify_intersection checks that condition. A consensus
election can use this rule, so that two candidates cannot both win in one term.
ids() returns the union of the read and write IDs, each ID once.
Implementations§
Source§impl<R, W> BothQuorums<R, W>
impl<R, W> BothQuorums<R, W>
Trait Implementations§
Auto Trait Implementations§
impl<R, W> Freeze for BothQuorums<R, W>
impl<R, W> RefUnwindSafe for BothQuorums<R, W>where
R: RefUnwindSafe,
W: RefUnwindSafe,
impl<R, W> Send for BothQuorums<R, W>
impl<R, W> Sync for BothQuorums<R, W>
impl<R, W> Unpin for BothQuorums<R, W>
impl<R, W> UnsafeUnpin for BothQuorums<R, W>where
R: UnsafeUnpin,
W: UnsafeUnpin,
impl<R, W> UnwindSafe for BothQuorums<R, W>where
R: UnwindSafe,
W: UnwindSafe,
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
Mutably borrows from an owned value. Read more