[][src]Trait tarpc_lib::server::Handler

pub trait Handler<C> where
    Self: Sized + Stream<Item = C>,
    C: Channel
{ fn max_channels_per_key<K, KF>(
        self,
        n: u32,
        keymaker: KF
    ) -> ChannelFilter<Self, K, KF>
    where
        K: Display + Eq + Hash + Clone + Unpin,
        KF: Fn(&C) -> K
, { ... }
fn max_concurrent_requests_per_channel(
        self,
        n: usize
    ) -> ThrottlerStream<Self> { ... } }

A utility trait enabling a stream to fluently chain a request handler.

Provided methods

fn max_channels_per_key<K, KF>(
    self,
    n: u32,
    keymaker: KF
) -> ChannelFilter<Self, K, KF> where
    K: Display + Eq + Hash + Clone + Unpin,
    KF: Fn(&C) -> K, 

Enforces channel per-key limits.

fn max_concurrent_requests_per_channel(self, n: usize) -> ThrottlerStream<Self>

Caps the number of concurrent requests per channel.

Loading content...

Implementors

impl<S, C> Handler<C> for S where
    S: Sized + Stream<Item = C>,
    C: Channel
[src]

Loading content...