[][src]Trait conjure_http::server::VisitResponse

pub trait VisitResponse {
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
;
fn visit_binary<T>(self, body: T) -> Result<Self::Output, Error>
    where
        T: WriteBody<Self::BinaryWriter> + 'static
; }

A visitor over 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, 

Visits a serializable body.

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

Visits a streaming binary body.

Loading content...

Implementors

Loading content...