AsyncDeserializeResponse

Trait AsyncDeserializeResponse 

Source
pub trait AsyncDeserializeResponse<T, R> {
    // Required methods
    fn accept(runtime: &ConjureRuntime) -> Option<HeaderValue>;
    fn deserialize(
        runtime: &ConjureRuntime,
        response: Response<R>,
    ) -> impl Future<Output = Result<T, Error>> + Send;
}
Expand description

A trait implemented by response deserializers used by custom async Conjure client trait implementations.

Required Methods§

Source

fn accept(runtime: &ConjureRuntime) -> Option<HeaderValue>

Returns the value of the Accept header to be included in the request.

Source

fn deserialize( runtime: &ConjureRuntime, response: Response<R>, ) -> impl Future<Output = Result<T, Error>> + Send

Deserializes the response.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§