fn observe_response_size<F>(f: F, resource: &str, metrics: &XNetEndpointMetrics) -> Response<Body>
where
    F: FnOnce() -> (Response<Body>, usize),
{
    let (response, size) = f();
    metrics
        .response_size
        .with_label_values(&[resource])
        .observe(size as f64);
    response
}
/// Calls through to one of the `*_response` functions and observes the size of
/// the produced response.
Calls through to one of the `*_response` functions and observes the size of
the produced response.
Calls through to one of the ` * _response ` functions and observes the size of the produced response .
fn observe_response_size<F>(f: F, resource: &str, metrics: &XNetEndpointMetrics) -> Response<Body>
where
    F: FnOnce() -> (Response<Body>, usize),
{
    let (response, size) = f();
    metrics
        .response_size
        .with_label_values(&[resource])
        .observe(size as f64);
    response
}
fn observe_response_size < F > ( f : F , resource : & str , metrics : & XNetEndpointMetrics ) -> Response < Body > where F : FnOnce ( ) -> ( Response < Body > , usize ) , { let ( response , size ) = f ( ) ; metrics . response_size . with_label_values ( & [ resource ] ) . observe ( size as f64 ) ; response }
Calls through to one of the `*_response` functions and observes the size of
the produced response.
Calls through to one of the ` * _response ` functions and observes the size of the produced response .
f
F
resource
&str
metrics
&XNetEndpointMetrics
f
F
resource
&str
metrics
&XNetEndpointMetrics