pub struct AgdError { /* private fields */ }Implementations§
Source§impl AgdError
impl AgdError
pub fn new(code: ErrorCode, message: impl Into<String>) -> Self
Sourcepub fn with_context(self, context: &str) -> Self
pub fn with_context(self, context: &str) -> Self
The same error with context: before its message, such as which
of several targets it is about.
pub fn with_current(self, current: Item) -> Self
pub fn with_source( code: ErrorCode, message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
pub fn code(&self) -> ErrorCode
pub fn response(&self) -> &ErrorResponse
pub fn into_response(self) -> ErrorResponse
Trait Implementations§
Source§impl Error for AgdError
impl Error for AgdError
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 !RefUnwindSafe for AgdError
impl !UnwindSafe for AgdError
impl Freeze for AgdError
impl Send for AgdError
impl Sync for AgdError
impl Unpin for AgdError
impl UnsafeUnpin for AgdError
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