Skip to main content

ApiResultExt

Trait ApiResultExt 

Source
pub trait ApiResultExt<T, E> {
Show 38 methods // Required methods fn bad_request<R>(self) -> Result<T, BadRequest<R>> where E: Into<R>; fn unauthorized_err<R>(self) -> Result<T, Unauthorized<R>> where E: Into<R>; fn payment_required_err<R>(self) -> Result<T, PaymentRequired<R>> where E: Into<R>; fn forbidden_err<R>(self) -> Result<T, Forbidden<R>> where E: Into<R>; fn not_found_err<R>(self) -> Result<T, NotFound<R>> where E: Into<R>; fn method_not_allowed_err<R>(self) -> Result<T, MethodNotAllowed<R>> where E: Into<R>; fn not_acceptable_err<R>(self) -> Result<T, NotAcceptable<R>> where E: Into<R>; fn proxy_authentication_required_err<R>( self, ) -> Result<T, ProxyAuthenticationRequired<R>> where E: Into<R>; fn request_timeout_err<R>(self) -> Result<T, RequestTimeout<R>> where E: Into<R>; fn conflict_err<R>(self) -> Result<T, Conflict<R>> where E: Into<R>; fn gone_err<R>(self) -> Result<T, Gone<R>> where E: Into<R>; fn length_required_err<R>(self) -> Result<T, LengthRequired<R>> where E: Into<R>; fn precondition_failed_err<R>(self) -> Result<T, PreconditionFailed<R>> where E: Into<R>; fn uri_too_long_err<R>(self) -> Result<T, UriTooLong<R>> where E: Into<R>; fn unsupported_media_type_err<R>(self) -> Result<T, UnsupportedMediaType<R>> where E: Into<R>; fn range_not_satisfiable_err<R>(self) -> Result<T, RangeNotSatisfiable<R>> where E: Into<R>; fn expectation_failed_err<R>(self) -> Result<T, ExpectationFailed<R>> where E: Into<R>; fn im_a_teapot_err<R>(self) -> Result<T, ImATeapot<R>> where E: Into<R>; fn misdirected_request_err<R>(self) -> Result<T, MisdirectedRequest<R>> where E: Into<R>; fn unprocessable_entity_err<R>(self) -> Result<T, UnprocessableEntity<R>> where E: Into<R>; fn locked_err<R>(self) -> Result<T, Locked<R>> where E: Into<R>; fn failed_dependency_err<R>(self) -> Result<T, FailedDependency<R>> where E: Into<R>; fn upgrade_required_err<R>(self) -> Result<T, UpgradeRequired<R>> where E: Into<R>; fn precondition_required_err<R>(self) -> Result<T, PreconditionRequired<R>> where E: Into<R>; fn too_many_requests_err<R>(self) -> Result<T, TooManyRequests<R>> where E: Into<R>; fn request_header_fields_too_large_err<R>( self, ) -> Result<T, RequestHeaderFieldsTooLarge<R>> where E: Into<R>; fn unavailable_for_legal_reasons_err<R>( self, ) -> Result<T, UnavailableForLegalReasons<R>> where E: Into<R>; fn internal_err<R>(self) -> Result<T, InternalServerError<R>> where E: Into<R>; fn not_implemented_err<R>(self) -> Result<T, NotImplemented<R>> where E: Into<R>; fn bad_gateway_err<R>(self) -> Result<T, BadGateway<R>> where E: Into<R>; fn service_unavailable_err<R>(self) -> Result<T, ServiceUnavailable<R>> where E: Into<R>; fn gateway_timeout_err<R>(self) -> Result<T, GatewayTimeout<R>> where E: Into<R>; fn http_version_not_supported_err<R>( self, ) -> Result<T, HttpVersionNotSupported<R>> where E: Into<R>; fn variant_also_negotiates_err<R>( self, ) -> Result<T, VariantAlsoNegotiates<R>> where E: Into<R>; fn insufficient_storage_err<R>(self) -> Result<T, InsufficientStorage<R>> where E: Into<R>; fn loop_detected_err<R>(self) -> Result<T, LoopDetected<R>> where E: Into<R>; fn not_extended_err<R>(self) -> Result<T, NotExtended<R>> where E: Into<R>; fn network_authentication_required_err<R>( self, ) -> Result<T, NetworkAuthenticationRequired<R>> where E: Into<R>;
}

Required Methods§

Source

fn bad_request<R>(self) -> Result<T, BadRequest<R>>
where E: Into<R>,

Source

fn unauthorized_err<R>(self) -> Result<T, Unauthorized<R>>
where E: Into<R>,

Source

fn payment_required_err<R>(self) -> Result<T, PaymentRequired<R>>
where E: Into<R>,

Source

fn forbidden_err<R>(self) -> Result<T, Forbidden<R>>
where E: Into<R>,

Source

fn not_found_err<R>(self) -> Result<T, NotFound<R>>
where E: Into<R>,

Source

fn method_not_allowed_err<R>(self) -> Result<T, MethodNotAllowed<R>>
where E: Into<R>,

Source

fn not_acceptable_err<R>(self) -> Result<T, NotAcceptable<R>>
where E: Into<R>,

Source

fn proxy_authentication_required_err<R>( self, ) -> Result<T, ProxyAuthenticationRequired<R>>
where E: Into<R>,

Source

fn request_timeout_err<R>(self) -> Result<T, RequestTimeout<R>>
where E: Into<R>,

Source

fn conflict_err<R>(self) -> Result<T, Conflict<R>>
where E: Into<R>,

Source

fn gone_err<R>(self) -> Result<T, Gone<R>>
where E: Into<R>,

Source

fn length_required_err<R>(self) -> Result<T, LengthRequired<R>>
where E: Into<R>,

Source

fn precondition_failed_err<R>(self) -> Result<T, PreconditionFailed<R>>
where E: Into<R>,

Source

fn uri_too_long_err<R>(self) -> Result<T, UriTooLong<R>>
where E: Into<R>,

Source

fn unsupported_media_type_err<R>(self) -> Result<T, UnsupportedMediaType<R>>
where E: Into<R>,

Source

fn range_not_satisfiable_err<R>(self) -> Result<T, RangeNotSatisfiable<R>>
where E: Into<R>,

Source

fn expectation_failed_err<R>(self) -> Result<T, ExpectationFailed<R>>
where E: Into<R>,

Source

fn im_a_teapot_err<R>(self) -> Result<T, ImATeapot<R>>
where E: Into<R>,

Source

fn misdirected_request_err<R>(self) -> Result<T, MisdirectedRequest<R>>
where E: Into<R>,

Source

fn unprocessable_entity_err<R>(self) -> Result<T, UnprocessableEntity<R>>
where E: Into<R>,

Source

fn locked_err<R>(self) -> Result<T, Locked<R>>
where E: Into<R>,

Source

fn failed_dependency_err<R>(self) -> Result<T, FailedDependency<R>>
where E: Into<R>,

Source

fn upgrade_required_err<R>(self) -> Result<T, UpgradeRequired<R>>
where E: Into<R>,

Source

fn precondition_required_err<R>(self) -> Result<T, PreconditionRequired<R>>
where E: Into<R>,

Source

fn too_many_requests_err<R>(self) -> Result<T, TooManyRequests<R>>
where E: Into<R>,

Source

fn request_header_fields_too_large_err<R>( self, ) -> Result<T, RequestHeaderFieldsTooLarge<R>>
where E: Into<R>,

Source

fn internal_err<R>(self) -> Result<T, InternalServerError<R>>
where E: Into<R>,

Source

fn not_implemented_err<R>(self) -> Result<T, NotImplemented<R>>
where E: Into<R>,

Source

fn bad_gateway_err<R>(self) -> Result<T, BadGateway<R>>
where E: Into<R>,

Source

fn service_unavailable_err<R>(self) -> Result<T, ServiceUnavailable<R>>
where E: Into<R>,

Source

fn gateway_timeout_err<R>(self) -> Result<T, GatewayTimeout<R>>
where E: Into<R>,

Source

fn http_version_not_supported_err<R>( self, ) -> Result<T, HttpVersionNotSupported<R>>
where E: Into<R>,

Source

fn variant_also_negotiates_err<R>(self) -> Result<T, VariantAlsoNegotiates<R>>
where E: Into<R>,

Source

fn insufficient_storage_err<R>(self) -> Result<T, InsufficientStorage<R>>
where E: Into<R>,

Source

fn loop_detected_err<R>(self) -> Result<T, LoopDetected<R>>
where E: Into<R>,

Source

fn not_extended_err<R>(self) -> Result<T, NotExtended<R>>
where E: Into<R>,

Source

fn network_authentication_required_err<R>( self, ) -> Result<T, NetworkAuthenticationRequired<R>>
where E: Into<R>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E> ApiResultExt<T, E> for Result<T, E>

Source§

fn bad_request<R>(self) -> Result<T, BadRequest<R>>
where E: Into<R>,

Source§

fn unauthorized_err<R>(self) -> Result<T, Unauthorized<R>>
where E: Into<R>,

Source§

fn payment_required_err<R>(self) -> Result<T, PaymentRequired<R>>
where E: Into<R>,

Source§

fn forbidden_err<R>(self) -> Result<T, Forbidden<R>>
where E: Into<R>,

Source§

fn not_found_err<R>(self) -> Result<T, NotFound<R>>
where E: Into<R>,

Source§

fn method_not_allowed_err<R>(self) -> Result<T, MethodNotAllowed<R>>
where E: Into<R>,

Source§

fn not_acceptable_err<R>(self) -> Result<T, NotAcceptable<R>>
where E: Into<R>,

Source§

fn proxy_authentication_required_err<R>( self, ) -> Result<T, ProxyAuthenticationRequired<R>>
where E: Into<R>,

Source§

fn request_timeout_err<R>(self) -> Result<T, RequestTimeout<R>>
where E: Into<R>,

Source§

fn conflict_err<R>(self) -> Result<T, Conflict<R>>
where E: Into<R>,

Source§

fn gone_err<R>(self) -> Result<T, Gone<R>>
where E: Into<R>,

Source§

fn length_required_err<R>(self) -> Result<T, LengthRequired<R>>
where E: Into<R>,

Source§

fn precondition_failed_err<R>(self) -> Result<T, PreconditionFailed<R>>
where E: Into<R>,

Source§

fn uri_too_long_err<R>(self) -> Result<T, UriTooLong<R>>
where E: Into<R>,

Source§

fn unsupported_media_type_err<R>(self) -> Result<T, UnsupportedMediaType<R>>
where E: Into<R>,

Source§

fn range_not_satisfiable_err<R>(self) -> Result<T, RangeNotSatisfiable<R>>
where E: Into<R>,

Source§

fn expectation_failed_err<R>(self) -> Result<T, ExpectationFailed<R>>
where E: Into<R>,

Source§

fn im_a_teapot_err<R>(self) -> Result<T, ImATeapot<R>>
where E: Into<R>,

Source§

fn misdirected_request_err<R>(self) -> Result<T, MisdirectedRequest<R>>
where E: Into<R>,

Source§

fn unprocessable_entity_err<R>(self) -> Result<T, UnprocessableEntity<R>>
where E: Into<R>,

Source§

fn locked_err<R>(self) -> Result<T, Locked<R>>
where E: Into<R>,

Source§

fn failed_dependency_err<R>(self) -> Result<T, FailedDependency<R>>
where E: Into<R>,

Source§

fn upgrade_required_err<R>(self) -> Result<T, UpgradeRequired<R>>
where E: Into<R>,

Source§

fn precondition_required_err<R>(self) -> Result<T, PreconditionRequired<R>>
where E: Into<R>,

Source§

fn too_many_requests_err<R>(self) -> Result<T, TooManyRequests<R>>
where E: Into<R>,

Source§

fn request_header_fields_too_large_err<R>( self, ) -> Result<T, RequestHeaderFieldsTooLarge<R>>
where E: Into<R>,

Source§

fn internal_err<R>(self) -> Result<T, InternalServerError<R>>
where E: Into<R>,

Source§

fn not_implemented_err<R>(self) -> Result<T, NotImplemented<R>>
where E: Into<R>,

Source§

fn bad_gateway_err<R>(self) -> Result<T, BadGateway<R>>
where E: Into<R>,

Source§

fn service_unavailable_err<R>(self) -> Result<T, ServiceUnavailable<R>>
where E: Into<R>,

Source§

fn gateway_timeout_err<R>(self) -> Result<T, GatewayTimeout<R>>
where E: Into<R>,

Source§

fn http_version_not_supported_err<R>( self, ) -> Result<T, HttpVersionNotSupported<R>>
where E: Into<R>,

Source§

fn variant_also_negotiates_err<R>(self) -> Result<T, VariantAlsoNegotiates<R>>
where E: Into<R>,

Source§

fn insufficient_storage_err<R>(self) -> Result<T, InsufficientStorage<R>>
where E: Into<R>,

Source§

fn loop_detected_err<R>(self) -> Result<T, LoopDetected<R>>
where E: Into<R>,

Source§

fn not_extended_err<R>(self) -> Result<T, NotExtended<R>>
where E: Into<R>,

Source§

fn network_authentication_required_err<R>( self, ) -> Result<T, NetworkAuthenticationRequired<R>>
where E: Into<R>,

Implementors§