pub enum FetchEvent {
BodyWanted,
Head(HttpHead),
Data(Vec<u8>),
End,
Failed(String),
}Expand description
What happens to a request, in order: (for a streamed body) any number
of BodyWanted; then Head, Data… and End — or Failed at any
point.
Variants§
BodyWanted
A streamed body’s next chunk is wanted: first when the stack is ready to send, then each time the last chunk was handed on.
Head(HttpHead)
The response’s status and headers arrived.
Data(Vec<u8>)
Bytes of the response body, in order.
End
The body is complete.
Failed(String)
The request failed (no response, or the body broke off).
Trait Implementations§
Source§impl Clone for FetchEvent
impl Clone for FetchEvent
Source§impl Debug for FetchEvent
impl Debug for FetchEvent
impl Eq for FetchEvent
Source§impl PartialEq for FetchEvent
impl PartialEq for FetchEvent
impl StructuralPartialEq for FetchEvent
Auto Trait Implementations§
impl Forget for FetchEvent
impl Freeze for FetchEvent
impl Move for FetchEvent
impl RefUnwindSafe for FetchEvent
impl Send for FetchEventwhere
RawVecInner: Send,
impl Sync for FetchEventwhere
RawVecInner: Sync,
impl Unpin for FetchEvent
impl UnsafeUnpin for FetchEventwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for FetchEventwhere
RawVecInner: UnwindSafe,
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