spring_stream::handler

Trait Handler

source
pub trait Handler<T>:
    Clone
    + Send
    + Sized
    + 'static {
    type Future: Future<Output = ()> + Send + 'static;

    // Required method
    fn call(self, msg: SeaMessage<'_>, app: Arc<App>) -> Self::Future;
}

Required Associated Types§

source

type Future: Future<Output = ()> + Send + 'static

The type of future calling this handler returns.

Required Methods§

source

fn call(self, msg: SeaMessage<'_>, app: Arc<App>) -> Self::Future

Call the handler with the given request.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<F, Fut> Handler<()> for F
where F: FnOnce() -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static,

no args handler impl

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1> Handler<(T1,)> for F
where F: FnOnce(T1) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2> Handler<(T1, T2)> for F
where F: FnOnce(T1, T2) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3> Handler<(T1, T2, T3)> for F
where F: FnOnce(T1, T2, T3) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4> Handler<(T1, T2, T3, T4)> for F
where F: FnOnce(T1, T2, T3, T4) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5> Handler<(T1, T2, T3, T4, T5)> for F
where F: FnOnce(T1, T2, T3, T4, T5) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6> Handler<(T1, T2, T3, T4, T5, T6)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7> Handler<(T1, T2, T3, T4, T5, T6, T7)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7, T8> Handler<(T1, T2, T3, T4, T5, T6, T7, T8)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send, T8: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7, T8, T9> Handler<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send, T8: FromMsg + Send, T9: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Handler<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send, T8: FromMsg + Send, T9: FromMsg + Send, T10: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Handler<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send, T8: FromMsg + Send, T9: FromMsg + Send, T10: FromMsg + Send, T11: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Handler<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send, T8: FromMsg + Send, T9: FromMsg + Send, T10: FromMsg + Send, T11: FromMsg + Send, T12: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Handler<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send, T8: FromMsg + Send, T9: FromMsg + Send, T10: FromMsg + Send, T11: FromMsg + Send, T12: FromMsg + Send, T13: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Handler<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send, T8: FromMsg + Send, T9: FromMsg + Send, T10: FromMsg + Send, T11: FromMsg + Send, T12: FromMsg + Send, T13: FromMsg + Send, T14: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>

source§

impl<F, Fut, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Handler<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> for F
where F: FnOnce(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) -> Fut + Clone + Send + 'static, Fut: Future<Output = ()> + Send + 'static, T1: FromMsg + Send, T2: FromMsg + Send, T3: FromMsg + Send, T4: FromMsg + Send, T5: FromMsg + Send, T6: FromMsg + Send, T7: FromMsg + Send, T8: FromMsg + Send, T9: FromMsg + Send, T10: FromMsg + Send, T11: FromMsg + Send, T12: FromMsg + Send, T13: FromMsg + Send, T14: FromMsg + Send, T15: FromMsg + Send,

source§

type Future = Pin<Box<dyn Future<Output = ()> + Send>>