Trait LocalAsyncDeserializeResponse

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

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

Required Methods§

Source

fn accept() -> Option<HeaderValue>

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

Source

fn deserialize(response: Response<R>) -> impl Future<Output = 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§