use thiserror::Error;
#[derive(Error, Debug, Clone)]
#[allow(missing_copy_implementations)]
pub enum GraphError {
#[error("Cycle detected")]
CycleDetected,
#[error("Badly formed graph")]
BadlyFormedGraph,
#[error("No root node found")]
NoRootNode,
#[error("Multiple root nodes found")]
MultipleRootNodes,
#[error("Node not found in graph")]
NodeNotFound,
#[error("Requested trim nodes not found in graph")]
InvalidTrimNodes,
#[error(transparent)]
ReducerError(#[from] ReducerError),
}
#[derive(Error, Debug, Clone)]
#[allow(missing_copy_implementations)]
pub enum ReducerError {
#[error("Could not perform reducer function: {0}")]
Custom(String),
}