use core::cmp::Ordering;
use super::Cut;
use crate::metis::VersionVector;
impl Cut {
#[must_use]
pub fn meet(&self, other: &Self) -> Self {
Self(self.0.meet(&other.0))
}
#[must_use]
pub fn merge(&self, other: &Self) -> Self {
Self(self.0.merge(&other.0))
}
#[must_use]
pub fn restrict(&self, roster: impl IntoIterator<Item = u32>) -> Self {
Self(self.0.restrict(roster))
}
#[must_use]
pub fn difference(&self, other: &Self) -> VersionVector {
self.0.difference(&other.0)
}
}
impl PartialOrd for Cut {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.0.partial_cmp(&other.0)
}
}