pub struct AppError { /* private fields */ }Implementations§
Source§impl AppError
impl AppError
pub fn usage(message: impl Into<String>) -> Self
pub fn data(message: impl Into<String>) -> Self
pub fn runtime(message: impl Into<String>) -> Self
pub fn db(err: Error) -> Self
pub fn db_open(err: impl Display) -> Self
pub fn db_query(err: Error) -> Self
pub fn db_write(err: Error) -> Self
pub fn invalid_cursor(cursor: &str) -> Self
pub fn invalid_apply_payload( message: impl Into<String>, path: Option<&str>, ) -> Self
pub fn with_code(self, code: impl Into<String>) -> Self
pub fn with_details(self, details: Value) -> Self
pub fn exit_code(&self) -> i32
pub fn code(&self) -> &str
pub fn message(&self) -> &str
pub fn json_error(&self) -> JsonError<'_>
Trait Implementations§
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