use crate::traits::KahnError;
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
pub enum InformationContentError {
#[error("The graph is not a DAG")]
NotDag,
#[error("Received an occurrence vector with {found} entries but expected {expected} entries")]
UnequalOccurrenceSize {
expected: usize,
found: usize,
},
#[error("Found a Sink Node with a 0 Occurrence")]
SinkNodeZeroOccurrence,
}
impl From<KahnError> for InformationContentError {
#[inline]
fn from(value: KahnError) -> Self {
match value {
KahnError::Cycle => Self::NotDag,
}
}
}