Struct ajars_actix_web::actix_web::Error [−][src]
pub struct Error { /* fields omitted */ }
Expand description
General purpose actix web error.
An actix web error is used to carry errors from std::error
through actix in a convenient way. It can be created through
converting errors with into()
.
Whenever it is created from an external object a response error is created
for it that can be used to create an HTTP response from it this means that
if you have access to an actix Error
you can always get a
ResponseError
reference from it.
Implementations
Returns the reference to the underlying ResponseError
.
Similar to as_response_error
but downcasts.
pub fn error_response(&self) -> HttpResponse<AnyBody>ⓘNotable traits for HttpResponse<AnyBody>impl Future for HttpResponse<AnyBody> type Output = Result<Response<AnyBody>, Error>;
pub fn error_response(&self) -> HttpResponse<AnyBody>ⓘNotable traits for HttpResponse<AnyBody>impl Future for HttpResponse<AnyBody> type Output = Result<Response<AnyBody>, Error>;
Notable traits for HttpResponse<AnyBody>
impl Future for HttpResponse<AnyBody> type Output = Result<Response<AnyBody>, Error>;
Shortcut for creating an HttpResponse
.
Trait Implementations
Performs the conversion.
pub fn from(err: Error) -> HttpResponse<AnyBody>ⓘNotable traits for HttpResponse<AnyBody>impl Future for HttpResponse<AnyBody> type Output = Result<Response<AnyBody>, Error>;
pub fn from(err: Error) -> HttpResponse<AnyBody>ⓘNotable traits for HttpResponse<AnyBody>impl Future for HttpResponse<AnyBody> type Output = Result<Response<AnyBody>, Error>;
Notable traits for HttpResponse<AnyBody>
impl Future for HttpResponse<AnyBody> type Output = Result<Response<AnyBody>, Error>;
Performs the conversion.
Performs the conversion.