[][src]Trait conjure_http::client::VisitResponse

pub trait VisitResponse<T>: Sized {
    type Output;
    fn accept(&self) -> Accept;

    fn visit_empty(self) -> Result<Self::Output, Error> { ... }
fn visit_serializable<'de, D>(
        self,
        deserializer: D
    ) -> Result<Self::Output, Error>
    where
        D: Deserializer<'de>,
        D::Error: Into<Box<dyn Error + Sync + Send>>
, { ... }
fn visit_binary(self, body: T) -> Result<Self::Output, Error> { ... } }

A visitor over HTTP responses.

Associated Types

type Output

The type produced by the visitor.

Loading content...

Required methods

fn accept(&self) -> Accept

Returns the type of response the visitor accepts.

This is used to create the HTTP Accept header.

Loading content...

Provided methods

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

Visits an empty response.

fn visit_serializable<'de, D>(
    self,
    deserializer: D
) -> Result<Self::Output, Error> where
    D: Deserializer<'de>,
    D::Error: Into<Box<dyn Error + Sync + Send>>, 

Visits a serializable response.

fn visit_binary(self, body: T) -> Result<Self::Output, Error>

Visits a streaming binary response.

Loading content...

Implementors

Loading content...