[][src]Struct mio_httpc::SimpleCall

pub struct SimpleCall { /* fields omitted */ }

Simplified API for non-streaming requests and responses. If body exists it needs to be provided to Request. If response has a body it is returned in Response.

Methods

impl SimpleCall
[src]

pub fn is_ref(&self, r: CallRef) -> bool
[src]

pub fn call(&self) -> &Call
[src]

pub fn finish_inplace(&mut self) -> Option<(Response, Vec<u8>)>
[src]

Replaces self with an empty SimpleCall and returns result if any.

pub fn finish(self) -> Option<(Response, Vec<u8>)>
[src]

Consume and return response with body.

pub fn abort_inplace(&mut self, htp: &mut Httpc)
[src]

Abort and replace self with an empty call.

pub fn abort(self, htp: &mut Httpc)
[src]

Consume and abort call.

pub fn is_call(&self, cid: &Option<CallRef>) -> bool
[src]

For quick comparison with httpc::event response. If cid is none will return false.

pub fn is_opt_callid(a: &Option<SimpleCall>, b: &Option<CallRef>) -> bool
[src]

If using Option in a struct, you can quickly compare callid from httpc::event. If either is none will return false.

pub fn is_done(&self) -> bool
[src]

Is request finished.

pub fn is_receiving(&self) -> bool
[src]

Are we in receiving state

pub fn perform(&mut self, htp: &mut Httpc, poll: &Poll) -> Result<bool>
[src]

Perform operation. Returns true if request is finished.

pub fn empty() -> SimpleCall
[src]

An empty SimpleCall not associated with a valid mio::Token/CallId. Exists to be overwritten with an actual valid request. Always returns is_done true.

pub fn is_empty(&self) -> bool
[src]

Trait Implementations

impl From<Call> for SimpleCall
[src]

Auto Trait Implementations

impl Send for SimpleCall

impl Sync for SimpleCall

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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