Struct tower_balance::p2c::BalanceMake[][src]

pub struct BalanceMake<S, Req> { /* fields omitted */ }

Makes Balancers given an inner service that makes Discovers.

Implementations

impl<S, Req> BalanceMake<S, Req>[src]

pub fn from_entropy(make_discover: S) -> Self[src]

Initializes a P2C load balancer from the OS’s entropy source.

Trait Implementations

impl<S: Clone, Req: Clone> Clone for BalanceMake<S, Req>[src]

impl<S: Debug, Req: Debug> Debug for BalanceMake<S, Req>[src]

impl<S, Target, Req> Service<Target> for BalanceMake<S, Req> where
    S: Service<Target>,
    S::Response: Discover,
    <S::Response as Discover>::Service: Service<Req>,
    <<S::Response as Discover>::Service as Service<Req>>::Error: Into<Box<dyn Error + Send + Sync>>, 
[src]

type Response = Balance<S::Response, Req>

Responses given by the service.

type Error = S::Error

Errors produced by the service.

type Future = MakeFuture<S::Future, Req>

The future response value.

Auto Trait Implementations

impl<S, Req> RefUnwindSafe for BalanceMake<S, Req> where
    S: RefUnwindSafe

impl<S, Req> Send for BalanceMake<S, Req> where
    S: Send

impl<S, Req> Sync for BalanceMake<S, Req> where
    S: Sync

impl<S, Req> Unpin for BalanceMake<S, Req> where
    S: Unpin

impl<S, Req> UnwindSafe for BalanceMake<S, Req> where
    S: UnwindSafe

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<M, S, Target, Request> MakeService<Target, Request> for M where
    S: Service<Request>,
    M: Service<Target, Response = S>, 
[src]

type Response = <S as Service<Request>>::Response

Responses given by the service

type Error = <S as Service<Request>>::Error

Errors produced by the service

type Service = S

The Service value created by this factory

type MakeError = <M as Service<Target>>::Error

Errors produced while building a service.

type Future = <M as Service<Target>>::Future

The future of the Service instance.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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