Struct mio_httpc::SimpleCall [−][src]
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]
impl SimpleCall
pub fn is_ref(&self, r: CallRef) -> bool
[src]
pub fn is_ref(&self, r: CallRef) -> bool
pub fn call(&self) -> &Call
[src]
pub fn call(&self) -> &Call
pub fn finish_inplace(&mut self) -> Option<(Response, Vec<u8>)>
[src]
pub fn finish_inplace(&mut self) -> Option<(Response, Vec<u8>)>
Replaces self with an empty SimpleCall and returns result if any.
pub fn finish(self) -> Option<(Response, Vec<u8>)>
[src]
pub fn finish(self) -> Option<(Response, Vec<u8>)>
Consume and return response with body.
pub fn abort_inplace(&mut self, htp: &mut Httpc)
[src]
pub fn abort_inplace(&mut self, htp: &mut Httpc)
Abort and replace self with an empty call.
pub fn abort(self, htp: &mut Httpc)
[src]
pub fn abort(self, htp: &mut Httpc)
Consume and abort call.
pub fn is_call(&self, cid: &Option<CallRef>) -> bool
[src]
pub fn is_call(&self, cid: &Option<CallRef>) -> bool
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]
pub fn is_opt_callid(a: &Option<SimpleCall>, b: &Option<CallRef>) -> bool
If using Option
pub fn is_done(&self) -> bool
[src]
pub fn is_done(&self) -> bool
Is request finished.
pub fn is_receiving(&self) -> bool
[src]
pub fn is_receiving(&self) -> bool
Are we in receiving state
pub fn perform(&mut self, htp: &mut Httpc, poll: &Poll) -> Result<bool>
[src]
pub fn perform(&mut self, htp: &mut Httpc, poll: &Poll) -> Result<bool>
Perform operation. Returns true if request is finished.
pub fn empty() -> SimpleCall
[src]
pub fn empty() -> SimpleCall
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]
pub fn is_empty(&self) -> bool
Trait Implementations
impl From<Call> for SimpleCall
[src]
impl From<Call> for SimpleCall
fn from(v: Call) -> SimpleCall
[src]
fn from(v: Call) -> SimpleCall
Performs the conversion.
Auto Trait Implementations
impl Send for SimpleCall
impl Send for SimpleCall
impl Sync for SimpleCall
impl Sync for SimpleCall