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

pub trait Load {
    type Metric: PartialOrd;
    fn load(&self) -> Self::Metric;
}
This is supported on crate feature load only.
Expand description

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[src]

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.

Required methods

fn load(&self) -> Self::Metric[src]

Estimate the service’s current load.

Implementors

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

This is supported on crate feature limit only.

type Metric = S::Metric

fn load(&self) -> Self::Metric[src]

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

This is supported on crate feature limit only.

type Metric = S::Metric

fn load(&self) -> Self::Metric[src]

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

type Metric = Cost

fn load(&self) -> Self::Metric[src]

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

type Metric = Count

fn load(&self) -> Count[src]

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

type Metric = M

fn load(&self) -> M[src]