EndpointServiceFn

Trait EndpointServiceFn 

pub trait EndpointServiceFn<T, State>:
    Sealed<T, State>
    + Clone
    + Send
    + Sync
    + 'static { }
Expand description

rama_core::Service implemented for functions taking extractors.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<F, R, O, I, State> EndpointServiceFn<(F, ((), (I,)), (R, O)), State> for F
where F: Fn(I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static,

§

impl<F, R, O, State> EndpointServiceFn<(F, ((), ()), (R, O)), State> for F
where F: Fn() -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static,

§

impl<F, R, O, State, T1> EndpointServiceFn<(F, ((T1,), ()), (R, O)), State> for F
where F: Fn(T1) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, I> EndpointServiceFn<(F, ((T1,), I), (R, O)), State> for F
where F: Fn(T1, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2> EndpointServiceFn<(F, ((T1, T2), ()), (R, O)), State> for F
where F: Fn(T1, T2) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, I> EndpointServiceFn<(F, ((T1, T2), I), (R, O)), State> for F
where F: Fn(T1, T2, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3> EndpointServiceFn<(F, ((T1, T2, T3), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, I> EndpointServiceFn<(F, ((T1, T2, T3), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4> EndpointServiceFn<(F, ((T1, T2, T3, T4), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, I> EndpointServiceFn<(F, ((T1, T2, T3, T4), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, I> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, I> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, I> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, I> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, T9> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8, T9), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>, T9: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, T9, I> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8, T9), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>, T9: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>, T9: FromRequestContextRefPair<State>, T10: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, I> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>, T9: FromRequestContextRefPair<State>, T10: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>, T9: FromRequestContextRefPair<State>, T10: FromRequestContextRefPair<State>, T11: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, I> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>, T9: FromRequestContextRefPair<State>, T10: FromRequestContextRefPair<State>, T11: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), ()), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>, T9: FromRequestContextRefPair<State>, T10: FromRequestContextRefPair<State>, T11: FromRequestContextRefPair<State>, T12: FromRequestContextRefPair<State>,

§

impl<F, R, O, State, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, I> EndpointServiceFn<(F, ((T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), I), (R, O)), State> for F
where F: Fn(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, I) -> R + Send + Sync + Clone + 'static, R: Future<Output = O> + Send + 'static, O: IntoResponse + Send + Sync + 'static, I: FromRequest, State: Send + Sync + 'static, T1: FromRequestContextRefPair<State>, T2: FromRequestContextRefPair<State>, T3: FromRequestContextRefPair<State>, T4: FromRequestContextRefPair<State>, T5: FromRequestContextRefPair<State>, T6: FromRequestContextRefPair<State>, T7: FromRequestContextRefPair<State>, T8: FromRequestContextRefPair<State>, T9: FromRequestContextRefPair<State>, T10: FromRequestContextRefPair<State>, T11: FromRequestContextRefPair<State>, T12: FromRequestContextRefPair<State>,