Move the Date struct into types and implement a get_property_numeric.
This commit is contained in:
@@ -9,6 +9,7 @@ pub enum CustomError<I> {
|
||||
MyError(MyError<&'static str>),
|
||||
Nom(I, ErrorKind),
|
||||
IO(std::io::Error),
|
||||
BoxedError(Box<dyn std::error::Error>),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -36,3 +37,9 @@ impl<I> From<&'static str> for CustomError<I> {
|
||||
CustomError::MyError(MyError(value))
|
||||
}
|
||||
}
|
||||
|
||||
impl<I> From<Box<dyn std::error::Error>> for CustomError<I> {
|
||||
fn from(value: Box<dyn std::error::Error>) -> Self {
|
||||
CustomError::BoxedError(value)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user