IronForce is a decentralized network, Degeon is a messenger built on it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
432 B

use alloc::format;
use alloc::string::String;
use core::fmt::Debug;
/// An enum for all errors that may occur
pub enum IFError {
/// An error that was created in some dependency and then converted to `IFError`
General(String),
}
impl<T: Debug> From<T> for IFError {
/// Convert from other error
fn from(e: T) -> Self {
Self::General(format!("{:?}", e))
}
}
pub type IFResult<T> = Result<T, IFError>;