wip: refactoring all the structure and improve error messages

This commit is contained in:
Jun Kurihara 2023-11-22 22:48:14 +09:00
commit de91c7a68f
No known key found for this signature in database
GPG key ID: 6D3FEE70E498C15B
10 changed files with 268 additions and 56 deletions

View file

@ -1,8 +1,11 @@
pub use anyhow::{anyhow, bail, ensure, Context};
use thiserror::Error;
pub type Result<T> = std::result::Result<T, RpxyError>;
pub type RpxyResult<T> = std::result::Result<T, RpxyError>;
/// Describes things that can go wrong in the Rpxy
#[derive(Debug, Error)]
pub enum RpxyError {}
pub enum RpxyError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
}