Struct isahc::Metrics [−][src]
An object that holds status updates and progress statistics on a particular
request. A Metrics
can be shared between threads, which allows an agent
thread to post updates to the object while consumers can read from the
object simultaneously.
Reading stats is not always guaranteed to be up-to-date.
Implementations
impl Metrics
[src]
pub fn upload_progress(&self) -> (u64, u64)
[src]
Number of bytes uploaded / estimated total.
pub fn upload_speed(&self) -> f64
[src]
Average upload speed so far in bytes/second.
pub fn download_progress(&self) -> (u64, u64)
[src]
Number of bytes downloaded / estimated total.
pub fn download_speed(&self) -> f64
[src]
Average download speed so far in bytes/second.
pub fn name_lookup_time(&self) -> Duration
[src]
Get the 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.
pub fn connect_time(&self) -> Duration
[src]
Get the 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.
pub fn secure_connect_time(&self) -> Duration
[src]
Get the amount of time spent on TLS handshakes.
When a redirect is followed, the time from each request is added together.
pub fn transfer_start_time(&self) -> Duration
[src]
Get the 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.
pub fn transfer_time(&self) -> Duration
[src]
Get the 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.
pub fn total_time(&self) -> Duration
[src]
Get the 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.
pub fn redirect_time(&self) -> Duration
[src]
If automatic redirect following is enabled, gets the total time taken for all redirection steps including name lookup, connect, pretransfer and transfer before final transaction was started.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Metrics
[src]
impl Send for Metrics
[src]
impl Sync for Metrics
[src]
impl Unpin for Metrics
[src]
impl UnwindSafe for Metrics
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,