Move the Date struct into types and implement a get_property_numeric.

This commit is contained in:
Tom Alexander
2023-10-02 15:49:51 -04:00
parent 10ae36a419
commit e7ec23af3d
7 changed files with 203 additions and 112 deletions

View File

@@ -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)
}
}