pub struct Partition { /* private fields */ }Expand description
A partition of premises into A-side and B-side.
Implementations§
Source§impl Partition
impl Partition
Sourcepub fn new(
a_premises: impl IntoIterator<Item = PremiseId>,
b_premises: impl IntoIterator<Item = PremiseId>,
) -> Self
pub fn new( a_premises: impl IntoIterator<Item = PremiseId>, b_premises: impl IntoIterator<Item = PremiseId>, ) -> Self
Create a new partition.
Sourcepub fn is_a_premise(&self, premise: PremiseId) -> bool
pub fn is_a_premise(&self, premise: PremiseId) -> bool
Check if a premise is in the A partition.
Sourcepub fn is_b_premise(&self, premise: PremiseId) -> bool
pub fn is_b_premise(&self, premise: PremiseId) -> bool
Check if a premise is in the B partition.
Sourcepub fn a_premises(&self) -> &FxHashSet<PremiseId>
pub fn a_premises(&self) -> &FxHashSet<PremiseId>
Get all A premises.
Sourcepub fn b_premises(&self) -> &FxHashSet<PremiseId>
pub fn b_premises(&self) -> &FxHashSet<PremiseId>
Get all B premises.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Partition
impl RefUnwindSafe for Partition
impl Send for Partition
impl Sync for Partition
impl Unpin for Partition
impl UnsafeUnpin for Partition
impl UnwindSafe for Partition
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