Enum mio_httpc::RecvState

source ·
pub enum RecvState {
    Error(Error),
    Response(ResponseResponseBody),
    ReceivedBody(usize),
    DoneWithBody(Vec<u8>),
    Sending,
    Done,
    Wait,
}
Expand description

Used when call is in receive response state.

Variants

Error(Error)

Unrecoverable error has occured and call is finished.

Response(ResponseResponseBody)

HTTP Response and response body size. If there is a body it will follow, otherwise call is done.

ReceivedBody(usize)

How many bytes were received.

DoneWithBody(Vec<u8>)

Request is done with body.

Sending

We are not done sending request yet. State may switch back to sending if we are following redirects or need to send request again due to digest auth.

Done

Request is done, body has been returned or there is no response body.

Wait

Nothing yet to return.

Trait Implementations

Formats the value using the given formatter. Read more

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.