#[macro_use] mod macros; mod app; pub mod ui; use std::error::Error; use std::fmt::{Debug, Display}; pub use app::*; pub use app::{App, Command, Opt}; pub type Result = std::result::Result; #[derive(Debug)] pub enum ArkhamError { IO(String), Other(String), } impl Error for ArkhamError {} impl Display for ArkhamError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::Other(v) => f.write_str(v), Self::IO(v) => f.write_str(v), } } } impl From for ArkhamError { fn from(fr: std::io::Error) -> Self { Self::IO(fr.to_string()) } }