pub struct AppError {
pub code: &'static str,
pub message: String,
pub details: Value,
pub retryable: bool,
pub suggested_fix: String,
pub exit_code: i32,
}Fields§
§code: &'static str§message: String§details: Value§retryable: bool§suggested_fix: String§exit_code: i32Implementations§
Source§impl AppError
impl AppError
pub fn invalid_argument( message: impl Into<String>, fix: impl Into<String>, ) -> Self
pub fn invalid_input(message: impl Into<String>, fix: impl Into<String>) -> Self
pub fn not_found(message: impl Into<String>, fix: impl Into<String>) -> Self
pub fn ambiguous_id(prefix: &str, candidates: Vec<String>) -> Self
pub fn config(message: impl Into<String>, fix: impl Into<String>) -> Self
pub fn lock_timeout(path: &Path) -> Self
pub fn internal(message: impl Into<String>) -> Self
pub fn from_io(error: Error, path: &Path) -> Self
Sourcepub fn from_log_open(error: Error, path: &Path) -> Self
pub fn from_log_open(error: Error, path: &Path) -> Self
Error mapping for opening an existing blotter log file. This is the
only place where NotFound is mapped to not_found / 66.
pub fn from_evidence_file(error: Error, path: &Path) -> Self
Trait Implementations§
Source§impl Error for AppError
impl Error for AppError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for AppError
impl RefUnwindSafe for AppError
impl Send for AppError
impl Sync for AppError
impl Unpin for AppError
impl UnsafeUnpin for AppError
impl UnwindSafe for AppError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more