Skip to main content

kagami/
error.rs

1use std::error::Error;
2use std::fmt::{Display, Formatter};
3
4#[derive(Debug)]
5pub enum KagamiError {
6    OptionalGuard(String),
7}
8
9impl Display for KagamiError {
10    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
11        match self {
12            KagamiError::OptionalGuard(s) => {
13                write!(f, "`{}` must not be None value.", s)
14            }
15        }
16    }
17}
18
19impl Error for KagamiError {}