AsyncSerializeResponse

Trait AsyncSerializeResponse 

Source
pub trait AsyncSerializeResponse<T, W> {
    // Required method
    fn serialize(
        runtime: &ConjureRuntime,
        request_headers: &HeaderMap,
        value: T,
    ) -> Result<Response<AsyncResponseBody<W>>, Error>;
}
Expand description

A trait implemented by response serializers used by custom async Conjure server trait implementations.

Required Methods§

Source

fn serialize( runtime: &ConjureRuntime, request_headers: &HeaderMap, value: T, ) -> Result<Response<AsyncResponseBody<W>>, Error>

Serializes 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§