pub struct Group<ID> {
pub quorum_size: u64,
pub ids: BTreeSet<ID>,
pub groups: BTreeMap<String, Group<ID>>,
}Expand description
One group of a HierarchicalQuorumSet: its members, which are IDs and child groups, and
how many of them a set must reach to reach the group.
A set reaches an ID by holding it, and a child group by reaching enough members of that group in turn. So the groups form a tree whose leaves are IDs, and every level applies the same test.
Fields§
§quorum_size: u64The number of members of the group that an accepted set must reach to reach the group.
ids: BTreeSet<ID>The IDs that the group holds directly.
groups: BTreeMap<String, Group<ID>>The child groups, by name.
Implementations§
Source§impl<ID> Group<ID>
impl<ID> Group<ID>
Sourcepub fn of_ids<I>(quorum_size: u64, ids: I) -> Selfwhere
I: IntoIterator<Item = ID>,
pub fn of_ids<I>(quorum_size: u64, ids: I) -> Selfwhere
I: IntoIterator<Item = ID>,
Returns a group of ids, which a set reaches by holding quorum_size of them.
Trait Implementations§
impl<ID: Eq> Eq for Group<ID>
impl<ID: PartialEq> StructuralPartialEq for Group<ID>
Auto Trait Implementations§
impl<ID> Forget for Group<ID>
impl<ID> Freeze for Group<ID>
impl<ID> RefUnwindSafe for Group<ID>
impl<ID> Send for Group<ID>
impl<ID> Sync for Group<ID>
impl<ID> Unpin for Group<ID>
impl<ID> UnsafeUnpin for Group<ID>
impl<ID> UnwindSafe for Group<ID>
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