titan_core

Trait Handler

Source
pub trait Handler<Args>: Send + 'static {
    type Output;
    type Future: Future<Output = Self::Output>;

    // Required method
    fn call(&self, req: Args) -> Self::Future;
}

Required Associated Types§

Source

type Output

Source

type Future: Future<Output = Self::Output>

Required Methods§

Source

fn call(&self, req: Args) -> Self::Future

Implementors§

Source§

impl<Func, Fut> Handler<()> for Func
where Func: Fn() -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A> Handler<(A,)> for Func
where Func: Fn(A) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B> Handler<(A, B)> for Func
where Func: Fn(A, B) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C> Handler<(A, B, C)> for Func
where Func: Fn(A, B, C) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D> Handler<(A, B, C, D)> for Func
where Func: Fn(A, B, C, D) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E> Handler<(A, B, C, D, E)> for Func
where Func: Fn(A, B, C, D, E) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F> Handler<(A, B, C, D, E, F)> for Func
where Func: Fn(A, B, C, D, E, F) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F, I> Handler<(A, B, C, D, E, F, I)> for Func
where Func: Fn(A, B, C, D, E, F, I) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F, I, J> Handler<(A, B, C, D, E, F, I, J)> for Func
where Func: Fn(A, B, C, D, E, F, I, J) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F, I, J, K> Handler<(A, B, C, D, E, F, I, J, K)> for Func
where Func: Fn(A, B, C, D, E, F, I, J, K) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F, I, J, K, L> Handler<(A, B, C, D, E, F, I, J, K, L)> for Func
where Func: Fn(A, B, C, D, E, F, I, J, K, L) -> Fut + Send + 'static, Fut: Future + Send,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut