[][src]Trait tarpc::rpc::server::Handler

pub trait Handler<C> where
    Self: Sized + Stream<Item = C>,
    C: Channel
{ pub 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
, { ... }
pub fn max_concurrent_requests_per_channel(
        self,
        n: usize
    ) -> ThrottlerStream<Self> { ... }
pub fn respond_with<S>(self, server: S) -> Running<Self, S>

Notable traits for Running<St, Se>

impl<St, C, Se> Future for Running<St, Se> where
    St: Sized + Stream<Item = C>,
    C: Channel + Send + 'static,
    C::Req: Send + 'static,
    C::Resp: Send + 'static,
    Se: Serve<C::Req, Resp = C::Resp> + Send + 'static + Clone,
    Se::Fut: Send + 'static, 
type Output = ();

    where
        S: Serve<C::Req, Resp = C::Resp>
, { ... } }

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

Provided methods

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

Enforces channel per-key limits.

pub fn max_concurrent_requests_per_channel(
    self,
    n: usize
) -> ThrottlerStream<Self>
[src]

Caps the number of concurrent requests per channel.

pub fn respond_with<S>(self, server: S) -> Running<Self, S>

Notable traits for Running<St, Se>

impl<St, C, Se> Future for Running<St, Se> where
    St: Sized + Stream<Item = C>,
    C: Channel + Send + 'static,
    C::Req: Send + 'static,
    C::Resp: Send + 'static,
    Se: Serve<C::Req, Resp = C::Resp> + Send + 'static + Clone,
    Se::Fut: Send + 'static, 
type Output = ();
where
    S: Serve<C::Req, Resp = C::Resp>, 
[src]

This is supported on crate feature tokio1 only.

Responds to all requests with server::serve.

Loading content...

Implementors

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

Loading content...