pub struct EndpointResult<T: DeserializeOwned + Send + Sync> {
    pub response: Response<Vec<u8>>,
    pub ty: ResponseType,
    /* private fields */
}
Expand description

A response from executing an Endpoint.

All Endpoint executions will result in an EndpointResult which wraps the actual HTTP Response and the final result type. The response can be parsed into the final result type by calling parse() or optionally wrapped by a Wrapper by calling wrap().

Fields

response: Response<Vec<u8>>ty: ResponseType

Implementations

Returns a new EndpointResult.

Parses the response into the final result type.

Returns the raw response body from the HTTP Response.

Parses the response into the final result type and then wraps it in the given Wrapper.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more