Struct tower::load::pending_requests::PendingRequests[][src]

pub struct PendingRequests<S, C = CompleteOnResponse> { /* fields omitted */ }
This is supported on crate feature load only.

Measures the load of the underlying service using the number of currently-pending requests.


impl<S, C> PendingRequests<S, C>[src]

pub fn new(service: S, completion: C) -> Self[src]

Wraps an S-typed service so that its load is tracked by the number of pending requests.

Trait Implementations

impl<S: Debug, C: Debug> Debug for PendingRequests<S, C>[src]

impl<S, C> Load for PendingRequests<S, C>[src]

type Metric = Count

A comparable load metric. Read more

impl<S, C, Request> Service<Request> for PendingRequests<S, C> where
    S: Service<Request>,
    C: TrackCompletion<Handle, S::Response>, 

type Response = C::Output

Responses given by the service.

type Error = S::Error

Errors produced by the service.

type Future = TrackCompletionFuture<S::Future, C, Handle>

The future response value.

Auto Trait Implementations

impl<S, C> RefUnwindSafe for PendingRequests<S, C> where
    C: RefUnwindSafe,
    S: RefUnwindSafe

impl<S, C> Send for PendingRequests<S, C> where
    C: Send,
    S: Send

impl<S, C> Sync for PendingRequests<S, C> where
    C: Sync,
    S: Sync

impl<S, C> Unpin for PendingRequests<S, C> where
    C: Unpin,
    S: Unpin

impl<S, C> UnwindSafe for PendingRequests<S, C> where
    C: UnwindSafe,
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, Request> ServiceExt<Request> for T where
    T: Service<Request> + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,