#[derive(Debug, PartialEq, Eq)]
pub enum PosetError {
NoMaxima,
NoMinima,
}
impl std::fmt::Display for PosetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
PosetError::NoMaxima => write!(f, "non-empty poset should have a maximal element"),
PosetError::NoMinima => write!(f, "non-empty poset should have a minimal element"),
}
}
}