mod types;
mod traits;
#[derive(Debug, Eq, PartialEq, PartialOrd, Ord, Clone, Hash)]
pub struct PolymathError {
pub error_kind: PolymathErrorKind,
pub error: String,
}
impl PolymathError {
pub fn new(error_kind: PolymathErrorKind, error: &str) -> Self {
return Self { error_kind, error: error.to_string() };
}
pub fn other(error: &str) -> Self {
return Self::new(PolymathErrorKind::Other, error);
}
}
#[derive(Debug, Eq, PartialEq, PartialOrd, Ord, Clone, Hash)]
pub enum PolymathErrorKind {
Other,
OutOfBounds,
}
pub mod prelude {
pub use super::types::*;
pub use super::traits::*;
}