#[non_exhaustive]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 (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.upload_progress: (ByteLength, ByteLength)Number of bytes uploaded / estimated total.
upload_speed: ByteLengthAverage upload speed so far in bytes/second.
download_progress: (ByteLength, ByteLength)Number of bytes downloaded / estimated total.
download_speed: ByteLengthAverage download speed so far in bytes/second.
name_lookup_time: DurationTotal 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: DurationAmount 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: DurationAmount of time spent on TLS handshakes.
When a redirect is followed, the time from each request is added together.
transfer_start_time: DurationTime 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: DurationAmount 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: DurationTotal 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: DurationIf 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 T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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,
§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
§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