Struct elastic_responses::parsing::Parse
[−]
[src]
pub struct Parse<T> { /* fields omitted */ }
A parser that separates taking a response type from the readable body type.
Methods
impl<T: IsOk + DeserializeOwned> Parse<T>
[src]
fn from_slice<B: AsRef<[u8]>, H: Into<HttpResponseHead>>(
self,
head: H,
body: B
) -> Result<T, ResponseError>
self,
head: H,
body: B
) -> Result<T, ResponseError>
Try parse a contiguous slice of bytes into a concrete response.
fn from_reader<B: Read, H: Into<HttpResponseHead>>(
self,
head: H,
body: B
) -> Result<T, ResponseError>
self,
head: H,
body: B
) -> Result<T, ResponseError>
Try parse an arbitrary reader into a concrete response.