#![ cfg_attr( doc, doc = include_str!( concat!( env!( "CARGO_MANIFEST_DIR" ), "/", "readme.md" ) ) ) ]
#![ cfg_attr( not( feature = "enabled" ), allow( unused ) ) ]
#![ warn( missing_docs ) ]
#![ warn( missing_debug_implementations ) ]
pub mod settings_io;
pub mod version;
#[ derive( Debug ) ]
pub enum CoreError
{
IoError( std::io::Error ),
ParseError( String ),
ProcessError( String ),
}
impl core::fmt::Display for CoreError
{
#[ inline ]
fn fmt( &self, f : &mut core::fmt::Formatter< '_ > ) -> core::fmt::Result
{
match self
{
Self::IoError( e ) => write!( f, "io: {e}" ),
Self::ParseError( s ) => write!( f, "parse: {s}" ),
Self::ProcessError( s ) => write!( f, "process: {s}" ),
}
}
}
impl core::error::Error for CoreError
{
#[ inline ]
fn source( &self ) -> Option< &( dyn core::error::Error + 'static ) >
{
match self
{
Self::IoError( e ) => Some( e ),
_ => None,
}
}
}
impl From< std::io::Error > for CoreError
{
#[ inline ]
fn from( e : std::io::Error ) -> Self
{
Self::IoError( e )
}
}