pub enum BodyEvent {
ByteCount {
at: Timestamp,
total: usize,
},
Finished {
at: Timestamp,
},
Failed {
at: Timestamp,
reason: String,
},
}Expand description
BodyEvents are generated by a [CountingBody] and describe the number
of total bytes seen or that the body has finished.
Variants§
ByteCount
The number of bytes sent by the wrapped body at the given Timestamp.
Finished
The [CountingBody] has finished sending the body it wraps.
Failed
The transfer terminated early with an error and will produce no further bytes.
Emitted either by the [CountingBody] itself when the wrapped body
yields an error, or by the client when the request fails or the server
rejects it (e.g. an HTTP 413 on an upload). Consumers must treat this as
terminal: the transfer did not complete.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BodyEvent
impl RefUnwindSafe for BodyEvent
impl Send for BodyEvent
impl Sync for BodyEvent
impl Unpin for BodyEvent
impl UnsafeUnpin for BodyEvent
impl UnwindSafe for BodyEvent
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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