pub enum HttpTask {
Header(Box<ResponseHeader>, bool),
Body(Option<Bytes>, bool),
Trailer(Option<Box<HeaderMap>>),
Done,
Failed(BError),
}
Expand description
An enum to hold all possible HTTP response events.
Variants§
Header(Box<ResponseHeader>, bool)
the response header and the boolean end of response flag
Body(Option<Bytes>, bool)
A piece of response header and the end of response boolean flag
Trailer(Option<Box<HeaderMap>>)
HTTP response trailer
Done
Signal that the response is already finished
Failed(BError)
Signal that the reading of the response encountered errors.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HttpTask
impl !RefUnwindSafe for HttpTask
impl Send for HttpTask
impl Sync for HttpTask
impl Unpin for HttpTask
impl !UnwindSafe for HttpTask
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