#[non_exhaustive]pub struct ConnectionAcquisitionTelemetry { /* private fields */ }Available on crate feature
client only.Expand description
Timing and reuse state for the connection selected by one request attempt.
Implementations§
Source§impl ConnectionAcquisitionTelemetry
impl ConnectionAcquisitionTelemetry
Sourcepub fn new(duration: Duration, usage: ConnectionUsage) -> Self
pub fn new(duration: Duration, usage: ConnectionUsage) -> Self
Creates a completed connection-acquisition observation.
Sourcepub fn from_interval(
started_at: SystemTime,
completed_at: SystemTime,
usage: ConnectionUsage,
) -> Self
pub fn from_interval( started_at: SystemTime, completed_at: SystemTime, usage: ConnectionUsage, ) -> Self
Creates an observation from acquisition start and completion times.
The duration is absent when completed_at precedes started_at. The
selected connection and its reuse state remain valid observations.
Sourcepub fn duration(&self) -> Option<Duration>
pub fn duration(&self) -> Option<Duration>
Returns elapsed time until the selected connection accepted the request.
This is absent when the HTTP client’s clock did not produce a valid interval.
Sourcepub fn usage(&self) -> ConnectionUsage
pub fn usage(&self) -> ConnectionUsage
Returns whether the selected connection had accepted an earlier request.
Trait Implementations§
impl Copy for ConnectionAcquisitionTelemetry
impl Eq for ConnectionAcquisitionTelemetry
impl StructuralPartialEq for ConnectionAcquisitionTelemetry
Auto Trait Implementations§
impl Freeze for ConnectionAcquisitionTelemetry
impl RefUnwindSafe for ConnectionAcquisitionTelemetry
impl Send for ConnectionAcquisitionTelemetry
impl Sync for ConnectionAcquisitionTelemetry
impl Unpin for ConnectionAcquisitionTelemetry
impl UnsafeUnpin for ConnectionAcquisitionTelemetry
impl UnwindSafe for ConnectionAcquisitionTelemetry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.