[][src]Struct elastic_responses::parsing::MaybeOkResponse

pub struct MaybeOkResponse<B> where
    B: ResponseBody
{ /* fields omitted */ }

A response that might be successful or an ApiError.

Methods

impl<B> MaybeOkResponse<B> where
    B: ResponseBody
[src]

pub fn new<I>(ok: bool, res: I) -> Self where
    I: Into<MaybeBufferedResponse<B>>, 
[src]

Create a new response that indicates where or not the body is successful or an ApiError.

pub fn ok<I>(res: I) -> Self where
    I: Into<MaybeBufferedResponse<B>>, 
[src]

Create a response where the body is successful.

pub fn err<I>(res: I) -> Self where
    I: Into<MaybeBufferedResponse<B>>, 
[src]

Create a resposne where the body is an error.

Auto Trait Implementations

impl<B> Send for MaybeOkResponse<B> where
    B: Send,
    <B as ResponseBody>::Buffered: Send

impl<B> Sync for MaybeOkResponse<B> where
    B: Sync,
    <B as ResponseBody>::Buffered: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.