Struct tower_http::metrics::InFlightRequestsLayer
source · pub struct InFlightRequestsLayer { /* private fields */ }
Available on crate feature
metrics
only.Expand description
Layer for applying InFlightRequests
which counts the number of in-flight requests.
See the module docs for more details.
Implementations§
source§impl InFlightRequestsLayer
impl InFlightRequestsLayer
sourcepub fn pair() -> (Self, InFlightRequestsCounter)
pub fn pair() -> (Self, InFlightRequestsCounter)
Create a new InFlightRequestsLayer
and its associated counter.
sourcepub fn new(counter: InFlightRequestsCounter) -> Self
pub fn new(counter: InFlightRequestsCounter) -> Self
Create a new InFlightRequestsLayer
that will update the given counter.
Trait Implementations§
source§impl Clone for InFlightRequestsLayer
impl Clone for InFlightRequestsLayer
source§fn clone(&self) -> InFlightRequestsLayer
fn clone(&self) -> InFlightRequestsLayer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more