pub struct TCError { /* private fields */ }
Expand description
A general error description.
Implementations
sourceimpl TCError
impl TCError
sourcepub fn new(code: ErrorType, message: String) -> Self
pub fn new(code: ErrorType, message: String) -> Self
Returns a new error with the given code and message.
sourcepub fn bad_gateway<I: Display>(cause: I) -> Self
pub fn bad_gateway<I: Display>(cause: I) -> Self
Error indicating that the an upstream server send an invalid response.
sourcepub fn bad_request<M: Display, I: Display>(message: M, cause: I) -> Self
pub fn bad_request<M: Display, I: Display>(message: M, cause: I) -> Self
Error indicating that the request is badly-constructed or nonsensical.
sourcepub fn conflict<M: Display>(message: M) -> Self
pub fn conflict<M: Display>(message: M) -> Self
Error indicating that the request depends on a resource which is exclusively locked by another request.
sourcepub fn forbidden<M: Display, I: Display>(message: M, id: I) -> Self
pub fn forbidden<M: Display, I: Display>(message: M, id: I) -> Self
Error indicating that the request actor’s credentials do not authorize access to some request dependencies.
sourcepub fn internal<I: Display>(info: I) -> Self
pub fn internal<I: Display>(info: I) -> Self
A truly unexpected error, for which the calling application cannot define any specific handling behavior.
sourcepub fn method_not_allowed<M: Display, S: Display, P: Display>(
method: M,
subject: S,
path: P
) -> Self
pub fn method_not_allowed<M: Display, S: Display, P: Display>(
method: M,
subject: S,
path: P
) -> Self
Error indicating that the requested resource exists but does not support the request method.
sourcepub fn not_found<I: Display>(locator: I) -> Self
pub fn not_found<I: Display>(locator: I) -> Self
Error indicating that the requested resource does not exist at the specified location.
sourcepub fn not_implemented<F: Display>(feature: F) -> Self
pub fn not_implemented<F: Display>(feature: F) -> Self
Error indicating that a required feature is not yet implemented.
sourcepub fn timeout<I: Display>(info: I) -> Self
pub fn timeout<I: Display>(info: I) -> Self
Error indicating that the request failed to complete in the allotted time.
Error indicating that the user’s credentials are missing or nonsensical.
Error indicating that this host is currently overloaded
sourcepub fn unsupported<I: Display>(info: I) -> Self
pub fn unsupported<I: Display>(info: I) -> Self
Error indicating that the request is badly-constructed or nonsensical.
pub fn code(&self) -> ErrorType
pub fn message(&self) -> &str
pub fn consume<I: Display>(self, info: I) -> Self
Trait Implementations
sourceimpl Error for TCError
impl Error for TCError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<'en> IntoStream<'en> for TCError
impl<'en> IntoStream<'en> for TCError
Auto Trait Implementations
impl RefUnwindSafe for TCError
impl Send for TCError
impl Sync for TCError
impl Unpin for TCError
impl UnwindSafe for TCError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more