pub struct Error { /* private fields */ }
Expand description
A generic “error” for HTTP connections
This error type is less specific than the error returned from other
functions in this crate, but all other errors can be converted to this
error. Consumers of this crate can typically consume and work with this form
of error for conversions with the ?
operator.
Implementations§
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl From<InvalidHeaderName> for Error
impl From<InvalidHeaderName> for Error
source§fn from(err: InvalidHeaderName) -> Error
fn from(err: InvalidHeaderName) -> Error
Converts to this type from the input type.
source§impl From<InvalidHeaderNameBytes> for Error
impl From<InvalidHeaderNameBytes> for Error
source§fn from(err: InvalidHeaderNameBytes) -> Error
fn from(err: InvalidHeaderNameBytes) -> Error
Converts to this type from the input type.
source§impl From<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
source§fn from(err: InvalidHeaderValue) -> Error
fn from(err: InvalidHeaderValue) -> Error
Converts to this type from the input type.
source§impl From<InvalidHeaderValueBytes> for Error
impl From<InvalidHeaderValueBytes> for Error
source§fn from(err: InvalidHeaderValueBytes) -> Error
fn from(err: InvalidHeaderValueBytes) -> Error
Converts to this type from the input type.
source§impl From<InvalidMethod> for Error
impl From<InvalidMethod> for Error
source§fn from(err: InvalidMethod) -> Error
fn from(err: InvalidMethod) -> Error
Converts to this type from the input type.
source§impl From<InvalidStatusCode> for Error
impl From<InvalidStatusCode> for Error
source§fn from(err: InvalidStatusCode) -> Error
fn from(err: InvalidStatusCode) -> Error
Converts to this type from the input type.
source§impl From<InvalidUri> for Error
impl From<InvalidUri> for Error
source§fn from(err: InvalidUri) -> Error
fn from(err: InvalidUri) -> Error
Converts to this type from the input type.
source§impl From<InvalidUriBytes> for Error
impl From<InvalidUriBytes> for Error
source§fn from(err: InvalidUriBytes) -> Error
fn from(err: InvalidUriBytes) -> Error
Converts to this type from the input type.
source§impl From<InvalidUriParts> for Error
impl From<InvalidUriParts> for Error
source§fn from(err: InvalidUriParts) -> Error
fn from(err: InvalidUriParts) -> Error
Converts to this type from the input type.
source§impl ResponseError for Error
impl ResponseError for Error
Return InternalServerError
for HttpError
,
Response generation can return HttpError
, so it is internal error
source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Create response for error Read more
Auto Trait Implementations§
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
§impl<T> AsFail for Twhere
T: Fail,
impl<T> AsFail for Twhere
T: Fail,
§impl<E> Fail for Ewhere
E: 'static + Error + Send + Sync,
impl<E> Fail for Ewhere
E: 'static + Error + Send + Sync,
§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moresource§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more