pub trait StatusResultExt {
type Ok;
type Err;
// Required methods
fn into_bad_request(self) -> Result<Self::Ok, BadRequest<Self::Err>>;
fn into_unauthorized(self) -> Result<Self::Ok, Unauthorized<Self::Err>>;
fn into_forbidden(self) -> Result<Self::Ok, Forbidden<Self::Err>>;
fn into_not_found(self) -> Result<Self::Ok, NotFound<Self::Err>>;
fn into_conflict(self) -> Result<Self::Ok, Conflict<Self::Err>>;
fn into_unprocessable_entity(
self,
) -> Result<Self::Ok, UnprocessableEntity<Self::Err>>;
fn into_too_many_requests(
self,
) -> Result<Self::Ok, TooManyRequests<Self::Err>>;
fn into_internal(self) -> Result<Self::Ok, InternalServerError<Self::Err>>;
fn into_bad_gateway(self) -> Result<Self::Ok, BadGateway<Self::Err>>;
fn into_service_unavailable(
self,
) -> Result<Self::Ok, ServiceUnavailable<Self::Err>>;
fn into_gateway_timeout(self) -> Result<Self::Ok, GatewayTimeout<Self::Err>>;
}Required Associated Types§
Required Methods§
Sourcefn into_bad_request(self) -> Result<Self::Ok, BadRequest<Self::Err>>
fn into_bad_request(self) -> Result<Self::Ok, BadRequest<Self::Err>>
Converts the error into a 400 Bad Request API error.
Converts the error into a 401 Unauthorized API error.
Sourcefn into_forbidden(self) -> Result<Self::Ok, Forbidden<Self::Err>>
fn into_forbidden(self) -> Result<Self::Ok, Forbidden<Self::Err>>
Converts the error into a 403 Forbidden API error.
Sourcefn into_not_found(self) -> Result<Self::Ok, NotFound<Self::Err>>
fn into_not_found(self) -> Result<Self::Ok, NotFound<Self::Err>>
Converts the error into a 404 Not Found API error.
Sourcefn into_conflict(self) -> Result<Self::Ok, Conflict<Self::Err>>
fn into_conflict(self) -> Result<Self::Ok, Conflict<Self::Err>>
Converts the error into a 409 Conflict API error.
Sourcefn into_unprocessable_entity(
self,
) -> Result<Self::Ok, UnprocessableEntity<Self::Err>>
fn into_unprocessable_entity( self, ) -> Result<Self::Ok, UnprocessableEntity<Self::Err>>
Converts the error into a 422 Unprocessable Entity API error.
Sourcefn into_too_many_requests(self) -> Result<Self::Ok, TooManyRequests<Self::Err>>
fn into_too_many_requests(self) -> Result<Self::Ok, TooManyRequests<Self::Err>>
Converts the error into a 429 Too Many Requests API error.
Sourcefn into_internal(self) -> Result<Self::Ok, InternalServerError<Self::Err>>
fn into_internal(self) -> Result<Self::Ok, InternalServerError<Self::Err>>
Converts the error into a 500 Internal Server Error API error.
Sourcefn into_bad_gateway(self) -> Result<Self::Ok, BadGateway<Self::Err>>
fn into_bad_gateway(self) -> Result<Self::Ok, BadGateway<Self::Err>>
Converts the error into a 502 Bad Gateway API error.
Converts the error into a 503 Service Unavailable API error.
Sourcefn into_gateway_timeout(self) -> Result<Self::Ok, GatewayTimeout<Self::Err>>
fn into_gateway_timeout(self) -> Result<Self::Ok, GatewayTimeout<Self::Err>>
Converts the error into a 504 Gateway Timeout API error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".