pub trait LocalAsyncDeserializeResponse<T, R> {
// Required methods
fn accept(runtime: &ConjureRuntime) -> Option<HeaderValue>;
fn deserialize(
runtime: &ConjureRuntime,
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§
Sourcefn accept(runtime: &ConjureRuntime) -> Option<HeaderValue>
fn accept(runtime: &ConjureRuntime) -> Option<HeaderValue>
Returns the value of the Accept
header to be included in the request.
Sourcefn deserialize(
runtime: &ConjureRuntime,
response: Response<R>,
) -> impl Future<Output = Result<T, Error>>
fn deserialize( runtime: &ConjureRuntime, 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.