solvent/
error.rs

1use std::error::Error;
2use std::fmt;
3
4#[derive(Clone, Debug, PartialEq)]
5pub enum SolventError {
6    /// A cycle has been detected
7    CycleDetected,
8    NoSuchNode,
9}
10
11impl fmt::Display for SolventError {
12    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
13        match *self {
14            SolventError::CycleDetected => write!(f, "Cycle Detected"),
15            SolventError::NoSuchNode => write!(f, "No Such Node"),
16        }
17    }
18}
19
20impl Error for SolventError {}