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