Trait elastic_responses::parsing::ResponseBody [] [src]

pub trait ResponseBody where
    Self: Sized
{ type Buffered: ResponseBody; fn body(self) -> Result<(Value, Self::Buffered), ParseResponseError>;
fn parse_ok<T: DeserializeOwned>(self) -> Result<T, ParseResponseError>;
fn parse_err(self) -> Result<ApiError, ParseResponseError>; }

A http response body that can be buffered into a json value.

Associated Types

The type of a buffered response body.

Required Methods

Buffer the response body to a json value and return a new buffered representation.

Parse the body as a success result.

Parse the body as an API error.

Implementors