[−][src]Struct mio_httpc::SimpleCall
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]
impl SimpleCall
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
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]
impl From<Call> for SimpleCall
fn from(v: Call) -> SimpleCall | [src] |
Auto Trait Implementations
impl Send for SimpleCall
impl Send for SimpleCall
impl Sync for SimpleCall
impl Sync for SimpleCall
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |