pub struct ErrorSet<T, E> { /* private fields */ }Expand description
An error defined by a set of possible status codes.
The parameter T is the actual value of the error, and must implement
IntoResponseWith.
The parameter E is a type-level set of possible status codes that this error
can have. e.g. (NotFound, InternalServerError) means that this error can either
be a 404 or a 500.
Implementations§
Source§impl<T, E> ErrorSet<T, E>
impl<T, E> ErrorSet<T, E>
Sourcepub fn new_with<R: StatusWrapper>(value: T) -> Selfwhere
E: Contains<R>,
pub fn new_with<R: StatusWrapper>(value: T) -> Selfwhere
E: Contains<R>,
Create a new [ApiError] with the given wrapper-type.
Checks at compile time that the status code is part of the set E.
Sourcepub fn new<R: StatusWrapper>(value: R) -> Self
pub fn new<R: StatusWrapper>(value: R) -> Self
Create a new [ApiError] with the given wrapper from a type that implements
StatusWrapper. (e.g. NotFound<YourValue>)
Checks at compile time that the status code is part of the set E.
Sourcepub fn new_unchecked(value: T, code: StatusCode) -> Self
pub fn new_unchecked(value: T, code: StatusCode) -> Self
Create a new [ApiError] with the given value and status code.
This does not check that the status code is part of the set E. Be careful when
using this method, as it can lead to invalid [ApiError]s.
Sourcepub fn into_parts(self) -> (T, StatusCode)
pub fn into_parts(self) -> (T, StatusCode)
Convert this [ApiError] into a tuple of the value and the status code.
Sourcepub fn into_superset<E2>(self) -> ErrorSet<T, E2>where
E2: SupersetOf<E>,
pub fn into_superset<E2>(self) -> ErrorSet<T, E2>where
E2: SupersetOf<E>,
Convert this [ApiError] into a new [ApiError] with a superset of the original
set of status codes.
Sourcepub fn map_value<F, U>(self, f: F) -> ErrorSet<U, E>where
F: FnOnce(T) -> U,
pub fn map_value<F, U>(self, f: F) -> ErrorSet<U, E>where
F: FnOnce(T) -> U,
Convert this [ApiError] into a new [ApiError] with a different value type.
Sourcepub fn status_code(&self) -> StatusCode
pub fn status_code(&self) -> StatusCode
Get the status code of this [ApiError].
Trait Implementations§
impl<T: Eq, R> Eq for ErrorSet<T, R>
Source§impl<T, R, S> From<BadGateway<R>> for ErrorSet<S, T>
impl<T, R, S> From<BadGateway<R>> for ErrorSet<S, T>
Source§fn from(err: BadGateway<R>) -> Self
fn from(err: BadGateway<R>) -> Self
Source§impl<T, R, S> From<BadRequest<R>> for ErrorSet<S, T>
impl<T, R, S> From<BadRequest<R>> for ErrorSet<S, T>
Source§fn from(err: BadRequest<R>) -> Self
fn from(err: BadRequest<R>) -> Self
Source§impl<T, R, S> From<ExpectationFailed<R>> for ErrorSet<S, T>
impl<T, R, S> From<ExpectationFailed<R>> for ErrorSet<S, T>
Source§fn from(err: ExpectationFailed<R>) -> Self
fn from(err: ExpectationFailed<R>) -> Self
Source§impl<T, R, S> From<FailedDependency<R>> for ErrorSet<S, T>
impl<T, R, S> From<FailedDependency<R>> for ErrorSet<S, T>
Source§fn from(err: FailedDependency<R>) -> Self
fn from(err: FailedDependency<R>) -> Self
Source§impl<T, R, S> From<GatewayTimeout<R>> for ErrorSet<S, T>
impl<T, R, S> From<GatewayTimeout<R>> for ErrorSet<S, T>
Source§fn from(err: GatewayTimeout<R>) -> Self
fn from(err: GatewayTimeout<R>) -> Self
Source§impl<T, R, S> From<HttpVersionNotSupported<R>> for ErrorSet<S, T>
impl<T, R, S> From<HttpVersionNotSupported<R>> for ErrorSet<S, T>
Source§fn from(err: HttpVersionNotSupported<R>) -> Self
fn from(err: HttpVersionNotSupported<R>) -> Self
Source§impl<T, R, S> From<InsufficientStorage<R>> for ErrorSet<S, T>
impl<T, R, S> From<InsufficientStorage<R>> for ErrorSet<S, T>
Source§fn from(err: InsufficientStorage<R>) -> Self
fn from(err: InsufficientStorage<R>) -> Self
Source§impl<T, R, S> From<InternalServerError<R>> for ErrorSet<S, T>
impl<T, R, S> From<InternalServerError<R>> for ErrorSet<S, T>
Source§fn from(err: InternalServerError<R>) -> Self
fn from(err: InternalServerError<R>) -> Self
Source§impl<T, R, S> From<LengthRequired<R>> for ErrorSet<S, T>
impl<T, R, S> From<LengthRequired<R>> for ErrorSet<S, T>
Source§fn from(err: LengthRequired<R>) -> Self
fn from(err: LengthRequired<R>) -> Self
Source§impl<T, R, S> From<LoopDetected<R>> for ErrorSet<S, T>
impl<T, R, S> From<LoopDetected<R>> for ErrorSet<S, T>
Source§fn from(err: LoopDetected<R>) -> Self
fn from(err: LoopDetected<R>) -> Self
Source§impl<T, R, S> From<MethodNotAllowed<R>> for ErrorSet<S, T>
impl<T, R, S> From<MethodNotAllowed<R>> for ErrorSet<S, T>
Source§fn from(err: MethodNotAllowed<R>) -> Self
fn from(err: MethodNotAllowed<R>) -> Self
Source§impl<T, R, S> From<MisdirectedRequest<R>> for ErrorSet<S, T>
impl<T, R, S> From<MisdirectedRequest<R>> for ErrorSet<S, T>
Source§fn from(err: MisdirectedRequest<R>) -> Self
fn from(err: MisdirectedRequest<R>) -> Self
Source§impl<T, R, S> From<NetworkAuthenticationRequired<R>> for ErrorSet<S, T>
impl<T, R, S> From<NetworkAuthenticationRequired<R>> for ErrorSet<S, T>
Source§fn from(err: NetworkAuthenticationRequired<R>) -> Self
fn from(err: NetworkAuthenticationRequired<R>) -> Self
Source§impl<T, R, S> From<NotAcceptable<R>> for ErrorSet<S, T>
impl<T, R, S> From<NotAcceptable<R>> for ErrorSet<S, T>
Source§fn from(err: NotAcceptable<R>) -> Self
fn from(err: NotAcceptable<R>) -> Self
Source§impl<T, R, S> From<NotExtended<R>> for ErrorSet<S, T>
impl<T, R, S> From<NotExtended<R>> for ErrorSet<S, T>
Source§fn from(err: NotExtended<R>) -> Self
fn from(err: NotExtended<R>) -> Self
Source§impl<T, R, S> From<NotImplemented<R>> for ErrorSet<S, T>
impl<T, R, S> From<NotImplemented<R>> for ErrorSet<S, T>
Source§fn from(err: NotImplemented<R>) -> Self
fn from(err: NotImplemented<R>) -> Self
Source§impl<T, R, S> From<PaymentRequired<R>> for ErrorSet<S, T>
impl<T, R, S> From<PaymentRequired<R>> for ErrorSet<S, T>
Source§fn from(err: PaymentRequired<R>) -> Self
fn from(err: PaymentRequired<R>) -> Self
Source§impl<T, R, S> From<PreconditionFailed<R>> for ErrorSet<S, T>
impl<T, R, S> From<PreconditionFailed<R>> for ErrorSet<S, T>
Source§fn from(err: PreconditionFailed<R>) -> Self
fn from(err: PreconditionFailed<R>) -> Self
Source§impl<T, R, S> From<PreconditionRequired<R>> for ErrorSet<S, T>
impl<T, R, S> From<PreconditionRequired<R>> for ErrorSet<S, T>
Source§fn from(err: PreconditionRequired<R>) -> Self
fn from(err: PreconditionRequired<R>) -> Self
Source§impl<T, R, S> From<ProxyAuthenticationRequired<R>> for ErrorSet<S, T>
impl<T, R, S> From<ProxyAuthenticationRequired<R>> for ErrorSet<S, T>
Source§fn from(err: ProxyAuthenticationRequired<R>) -> Self
fn from(err: ProxyAuthenticationRequired<R>) -> Self
Source§impl<T, R, S> From<RangeNotSatisfiable<R>> for ErrorSet<S, T>
impl<T, R, S> From<RangeNotSatisfiable<R>> for ErrorSet<S, T>
Source§fn from(err: RangeNotSatisfiable<R>) -> Self
fn from(err: RangeNotSatisfiable<R>) -> Self
Source§impl<T, R, S> From<RequestHeaderFieldsTooLarge<R>> for ErrorSet<S, T>
impl<T, R, S> From<RequestHeaderFieldsTooLarge<R>> for ErrorSet<S, T>
Source§fn from(err: RequestHeaderFieldsTooLarge<R>) -> Self
fn from(err: RequestHeaderFieldsTooLarge<R>) -> Self
Source§impl<T, R, S> From<RequestTimeout<R>> for ErrorSet<S, T>
impl<T, R, S> From<RequestTimeout<R>> for ErrorSet<S, T>
Source§fn from(err: RequestTimeout<R>) -> Self
fn from(err: RequestTimeout<R>) -> Self
Source§fn from(err: ServiceUnavailable<R>) -> Self
fn from(err: ServiceUnavailable<R>) -> Self
Source§impl<T, R, S> From<TooManyRequests<R>> for ErrorSet<S, T>
impl<T, R, S> From<TooManyRequests<R>> for ErrorSet<S, T>
Source§fn from(err: TooManyRequests<R>) -> Self
fn from(err: TooManyRequests<R>) -> Self
Source§fn from(err: Unauthorized<R>) -> Self
fn from(err: Unauthorized<R>) -> Self
Source§fn from(err: UnavailableForLegalReasons<R>) -> Self
fn from(err: UnavailableForLegalReasons<R>) -> Self
Source§impl<T, R, S> From<UnprocessableEntity<R>> for ErrorSet<S, T>
impl<T, R, S> From<UnprocessableEntity<R>> for ErrorSet<S, T>
Source§fn from(err: UnprocessableEntity<R>) -> Self
fn from(err: UnprocessableEntity<R>) -> Self
Source§impl<T, R, S> From<UnsupportedMediaType<R>> for ErrorSet<S, T>
impl<T, R, S> From<UnsupportedMediaType<R>> for ErrorSet<S, T>
Source§fn from(err: UnsupportedMediaType<R>) -> Self
fn from(err: UnsupportedMediaType<R>) -> Self
Source§impl<T, R, S> From<UpgradeRequired<R>> for ErrorSet<S, T>
impl<T, R, S> From<UpgradeRequired<R>> for ErrorSet<S, T>
Source§fn from(err: UpgradeRequired<R>) -> Self
fn from(err: UpgradeRequired<R>) -> Self
Source§impl<T, R, S> From<UriTooLong<R>> for ErrorSet<S, T>
impl<T, R, S> From<UriTooLong<R>> for ErrorSet<S, T>
Source§fn from(err: UriTooLong<R>) -> Self
fn from(err: UriTooLong<R>) -> Self
Source§impl<T, R, S> From<VariantAlsoNegotiates<R>> for ErrorSet<S, T>
impl<T, R, S> From<VariantAlsoNegotiates<R>> for ErrorSet<S, T>
Source§fn from(err: VariantAlsoNegotiates<R>) -> Self
fn from(err: VariantAlsoNegotiates<R>) -> Self
Source§impl<T: IntoResponseWith, R> IntoResponse for ErrorSet<T, R>
impl<T: IntoResponseWith, R> IntoResponse for ErrorSet<T, R>
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Source§impl<R, E1> IntoResponses for ErrorSet<R, (E1,)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
impl<R, E1> IntoResponses for ErrorSet<R, (E1,)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
Source§impl<R, E1, E2> IntoResponses for ErrorSet<R, (E1, E2)>
impl<R, E1, E2> IntoResponses for ErrorSet<R, (E1, E2)>
Source§impl<R, E1, E2, E3> IntoResponses for ErrorSet<R, (E1, E2, E3)>
impl<R, E1, E2, E3> IntoResponses for ErrorSet<R, (E1, E2, E3)>
Source§impl<R, E1, E2, E3, E4> IntoResponses for ErrorSet<R, (E1, E2, E3, E4)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
impl<R, E1, E2, E3, E4> IntoResponses for ErrorSet<R, (E1, E2, E3, E4)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
Source§impl<R, E1, E2, E3, E4, E5> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
impl<R, E1, E2, E3, E4, E5> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
Source§impl<R, E1, E2, E3, E4, E5, E6> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
Source§impl<R, E1, E2, E3, E4, E5, E6, E7> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
E11: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
E11: StatusWrapper,
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
E11: StatusWrapper,
E12: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12> IntoResponses for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12)>where
R: UtoipaResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
E11: StatusWrapper,
E12: StatusWrapper,
Source§impl<R> IntoResponses for ErrorSet<R, ()>where
R: UtoipaResponseFor,
impl<R> IntoResponses for ErrorSet<R, ()>where
R: UtoipaResponseFor,
Source§impl<R, E1> OperationOutput for ErrorSet<R, (E1,)>where
R: AideResponseFor,
E1: StatusWrapper,
impl<R, E1> OperationOutput for ErrorSet<R, (E1,)>where
R: AideResponseFor,
E1: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2> OperationOutput for ErrorSet<R, (E1, E2)>
impl<R, E1, E2> OperationOutput for ErrorSet<R, (E1, E2)>
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3> OperationOutput for ErrorSet<R, (E1, E2, E3)>
impl<R, E1, E2, E3> OperationOutput for ErrorSet<R, (E1, E2, E3)>
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4> OperationOutput for ErrorSet<R, (E1, E2, E3, E4)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
impl<R, E1, E2, E3, E4> OperationOutput for ErrorSet<R, (E1, E2, E3, E4)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4, E5> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
impl<R, E1, E2, E3, E4, E5> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4, E5, E6> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4, E5, E6, E7> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
E11: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
E11: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
E11: StatusWrapper,
E12: StatusWrapper,
impl<R, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12> OperationOutput for ErrorSet<R, (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12)>where
R: AideResponseFor,
E1: StatusWrapper,
E2: StatusWrapper,
E3: StatusWrapper,
E4: StatusWrapper,
E5: StatusWrapper,
E6: StatusWrapper,
E7: StatusWrapper,
E8: StatusWrapper,
E9: StatusWrapper,
E10: StatusWrapper,
E11: StatusWrapper,
E12: StatusWrapper,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
ctx: &mut GenContext,
operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( ctx: &mut GenContext, operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Source§impl<R> OperationOutput for ErrorSet<R, ()>where
R: AideResponseFor,
impl<R> OperationOutput for ErrorSet<R, ()>where
R: AideResponseFor,
Source§fn operation_response(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Option<Response>
fn operation_response( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Option<Response>
Source§fn inferred_responses(
_ctx: &mut GenContext,
_operation: &mut Operation,
) -> Vec<(Option<u16>, Response)>
fn inferred_responses( _ctx: &mut GenContext, _operation: &mut Operation, ) -> Vec<(Option<u16>, Response)>
Auto Trait Implementations§
impl<T, E> Freeze for ErrorSet<T, E>
impl<T, E> RefUnwindSafe for ErrorSet<T, E>
impl<T, E> Send for ErrorSet<T, E>
impl<T, E> Sync for ErrorSet<T, E>
impl<T, E> Unpin for ErrorSet<T, E>
impl<T, E> UnsafeUnpin for ErrorSet<T, E>
impl<T, E> UnwindSafe for ErrorSet<T, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T, S> Handler<IntoResponseHandler, S> for T
impl<T, S> Handler<IntoResponseHandler, S> for T
Source§fn call(
self,
_req: Request<Body>,
_state: S,
) -> <T as Handler<IntoResponseHandler, S>>::Future
fn call( self, _req: Request<Body>, _state: S, ) -> <T as Handler<IntoResponseHandler, S>>::Future
Source§fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
tower::Layer to the handler. Read moreSource§fn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Service by providing the stateSource§impl<H, T> HandlerWithoutStateExt<T> for H
impl<H, T> HandlerWithoutStateExt<T> for H
Source§fn into_service(self) -> HandlerService<H, T, ()>
fn into_service(self) -> HandlerService<H, T, ()>
Service and no state.Source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
MakeService and no state. Read moreSource§fn into_make_service_with_connect_info<C>(
self,
) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
fn into_make_service_with_connect_info<C>( self, ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
MakeService which stores information
about the incoming connection and has no state. Read more