concision_core/error/
mod.rs1pub use self::prelude::*;
6
7mod err;
8
9pub mod kinds;
10
11pub trait ErrKind {}
12
13macro_rules! impl_error_type {
14 ($($ty:ty),* $(,)*) => {
15 $(impl_error_type!(@impl $ty);)*
16 };
17 (@impl $ty:ty) => {
18 impl ErrKind for $ty {}
19
20 impl_error_type!(@std $ty);
21 };
22 (@std $ty:ty) => {
23
24 #[cfg(feature = "std")]
25 impl std::error::Error for $ty {}
26 };
27}
28
29impl_error_type!(
30 kinds::ErrorKind,
31 kinds::ExternalError,
32 kinds::PredictError,
33 crate::nn::ModelError
34);
35
36pub(crate) mod prelude {
37 pub use super::err::Error;
38 pub use super::kinds::*;
39}