use super::nodes::NodeError;
use crate::traits::BipartiteGraph;
#[cfg(feature = "alloc")]
pub mod algorithms;
#[cfg(feature = "alloc")]
pub use algorithms::BipartiteAlgorithmError;
pub mod illegal_graph_states;
pub use illegal_graph_states::IllegalBipartiteGraphState;
#[derive(Debug, thiserror::Error)]
pub enum BipartiteError<G: BipartiteGraph + ?Sized> {
#[error(transparent)]
IllegalGraphState(#[from] IllegalBipartiteGraphState<G>),
#[error(transparent)]
LeftNodeError(NodeError<G::LeftNodes>),
#[error(transparent)]
RightNodeError(NodeError<G::RightNodes>),
#[cfg(feature = "alloc")]
#[error(transparent)]
AlgorithmError(#[from] BipartiteAlgorithmError),
}