Skip to main content

rcflib/
errors.rs

1use std::error;
2use std::fmt;
3
4/// Errors that can be returned by RCF operations.
5#[derive(Debug, PartialEq)]
6pub enum RCFError {
7    InvalidArgument { msg: &'static str },
8}
9
10impl error::Error for RCFError {}
11
12impl fmt::Display for RCFError {
13    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
14        match *self {
15            RCFError::InvalidArgument { msg } => write!(f, "{}", msg),
16        }
17    }
18}