[][src]Trait tower::load::Load

pub trait Load {
    type Metric: PartialOrd;
    fn load(&self) -> Self::Metric;
}

Types that implement this trait can give an estimate of how loaded they are.

See the module documentation for more details.

Associated Types

type Metric: PartialOrd

A comparable load metric.

Lesser values indicate that the service is less loaded, and should be preferred for new requests over another service with a higher value.

Loading content...

Required methods

fn load(&self) -> Self::Metric

Estimate the service's current load.

Loading content...

Implementors

impl<S> Load for ConcurrencyLimit<S> where
    S: Load
[src]

type Metric = S::Metric

impl<S> Load for RateLimit<S> where
    S: Load
[src]

type Metric = S::Metric

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

type Metric = Cost

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

type Metric = Count

impl<T, M: Copy + PartialOrd> Load for Constant<T, M>[src]

type Metric = M

Loading content...