pub enum RecvState {
Error(Error),
Response(Response, ResponseBody),
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(Response, ResponseBody)
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§
Auto Trait Implementations§
impl !RefUnwindSafe for RecvState
impl Send for RecvState
impl Sync for RecvState
impl Unpin for RecvState
impl !UnwindSafe for RecvState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more