mod result_ext;
#[doc(inline)]
pub use result_ext::*;
#[derive(Debug, thiserror::Error)]
pub enum BunsenError {
#[error("{0}")]
ResourceNotFound(String),
#[error("{0}")]
ParseError(String),
#[error("{0}")]
Invalid(String),
#[error("{0}")]
External(String),
}
impl BunsenError {
pub fn external<E>(e: E) -> Self
where
E: std::error::Error,
{
BunsenError::External(e.to_string())
}
}
pub type BunsenResult<T> = core::result::Result<T, BunsenError>;