pub struct Metrics {
pub upload_progress: (ByteLength, ByteLength),
pub upload_speed: ByteLength,
pub download_progress: (ByteLength, ByteLength),
pub download_speed: ByteLength,
pub name_lookup_time: Duration,
pub connect_time: Duration,
pub secure_connect_time: Duration,
pub transfer_start_time: Duration,
pub transfer_time: Duration,
pub total_time: Duration,
pub redirect_time: Duration,
}
Expand description
Information about the state of an HTTP request.
Fields§
§upload_progress: (ByteLength, ByteLength)
Number of bytes uploaded / estimated total.
upload_speed: ByteLength
Average upload speed so far in bytes/second.
download_progress: (ByteLength, ByteLength)
Number of bytes downloaded / estimated total.
download_speed: ByteLength
Average download speed so far in bytes/second.
name_lookup_time: Duration
Total time from the start of the request until DNS name resolving was completed.
When a redirect is followed, the time from each request is added together.
connect_time: Duration
Amount of time taken to establish a connection to the server (not including TLS connection time).
When a redirect is followed, the time from each request is added together.
secure_connect_time: Duration
Amount of time spent on TLS handshakes.
When a redirect is followed, the time from each request is added together.
transfer_start_time: Duration
Time it took from the start of the request until the first byte is either sent or received.
When a redirect is followed, the time from each request is added together.
transfer_time: Duration
Amount of time spent performing the actual request transfer. The “transfer” includes both sending the request and receiving the response.
When a redirect is followed, the time from each request is added together.
total_time: Duration
Total time for the entire request. This will continuously increase until the entire response body is consumed and completed.
When a redirect is followed, the time from each request is added together.
redirect_time: Duration
If automatic redirect following is enabled, the total time taken for all redirection steps including name lookup, connect, pre-transfer and transfer before final transaction was started.
Implementations§
Trait Implementations§
impl Eq for Metrics
impl IntoValue<Progress> for Metrics
impl StructuralPartialEq for Metrics
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
Blanket Implementations§
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more