[][src]Trait conjure_http::server::AsyncVisitResponse

pub trait AsyncVisitResponse {
    type BinaryWriter;
    type Output;
    fn visit_empty(self) -> Result<Self::Output, Error>;
fn visit_serializable<T>(self, body: T) -> Result<Self::Output, Error>
    where
        T: Serialize + 'static + Send
;
fn visit_binary<T>(self, body: T) -> Result<Self::Output, Error>
    where
        T: AsyncWriteBody<Self::BinaryWriter> + 'static + Send
; }

A visitor over asynchronous response body formats.

Associated Types

type BinaryWriter

The server's binary response body writer type.

type Output

The output type returned by visit methods.

Loading content...

Required methods

fn visit_empty(self) -> Result<Self::Output, Error>

Visits an empty body.

fn visit_serializable<T>(self, body: T) -> Result<Self::Output, Error> where
    T: Serialize + 'static + Send

Visits a serializable body.

fn visit_binary<T>(self, body: T) -> Result<Self::Output, Error> where
    T: AsyncWriteBody<Self::BinaryWriter> + 'static + Send

Visits a streaming binary body.

Loading content...

Implementors

Loading content...