pub struct RouteMetricsView {
pub route: String,
pub method: String,
pub count: u64,
pub avg_duration_ms: f64,
pub min_duration_ms: Option<u64>,
pub max_duration_ms: u64,
pub error_count: u64,
pub error_rate: f64,
}Expand description
View of route metrics for serialization (includes computed avg)
Fields§
§route: StringRoute pattern (e.g., “/users/{id}”).
method: StringHTTP method (e.g., “GET”, “POST”).
count: u64Total number of requests for this route.
avg_duration_ms: f64Average response time in milliseconds.
min_duration_ms: Option<u64>Minimum response time in ms, or None if no requests recorded.
max_duration_ms: u64Maximum response time in milliseconds.
error_count: u64Number of error responses (4xx and 5xx).
error_rate: f64Ratio of error responses to total requests (0.0–1.0).
Trait Implementations§
Source§impl Debug for RouteMetricsView
impl Debug for RouteMetricsView
Auto Trait Implementations§
impl Freeze for RouteMetricsView
impl RefUnwindSafe for RouteMetricsView
impl Send for RouteMetricsView
impl Sync for RouteMetricsView
impl Unpin for RouteMetricsView
impl UnsafeUnpin for RouteMetricsView
impl UnwindSafe for RouteMetricsView
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> 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 more