Struct mio_httpc::SimpleCall

source ·
pub struct SimpleCall { /* private fields */ }
Expand description

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

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

Consume and return response with body.

Abort and replace self with an empty call.

Consume and abort call.

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

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

Is request finished.

Are we in receiving state

Perform operation. Returns true if request is finished.

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.

Trait Implementations

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.