[][src]Trait conjure_http::server::VisitRequestBody

pub trait VisitRequestBody<T>: Sized {
type Output;
    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 request body formats.

Associated Types

type Output

The output type returned by visit methods.

Loading content...

Provided methods

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

Visits an empty body.

The default implementation returns an 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>>, 

Visits a serializable body.

The default implementation returns an error.

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

Visits a streaming binary body.

The default implementation returns an error.

Loading content...

Implementors

Loading content...