DeserializeResponse

Trait DeserializeResponse 

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

A trait implemented by response deserializers used by custom 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>, ) -> Result<T, Error>

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§