Callback

Trait Callback 

Source
pub trait Callback<A> {
    // Required method
    fn invoke(&self, args: A) -> Pin<Box<dyn Future<Output = Response> + Send>>;
}
Expand description

Callback trait, for http callbacks

Required Methods§

Source

fn invoke(&self, args: A) -> Pin<Box<dyn Future<Output = Response> + Send>>

The invoke method should give back a pinned boxed future

Implementors§

Source§

impl<F, R, Z: Into<Response>> Callback<()> for F
where F: Fn() -> R, R: Future<Output = Z> + Send + 'static,

Source§

impl<K, R, Z: Into<Response>, A> Callback<(A,)> for K
where K: Fn(A) -> R, R: Future<Output = Z> + Send + 'static,

Source§

impl<K, R, Z: Into<Response>, A, B> Callback<(A, B)> for K
where K: Fn(A, B) -> R, R: Future<Output = Z> + Send + 'static,

Source§

impl<K, R, Z: Into<Response>, A, B, C> Callback<(A, B, C)> for K
where K: Fn(A, B, C) -> R, R: Future<Output = Z> + Send + 'static,

Source§

impl<K, R, Z: Into<Response>, A, B, C, D> Callback<(A, B, C, D)> for K
where K: Fn(A, B, C, D) -> R, R: Future<Output = Z> + Send + 'static,

Source§

impl<K, R, Z: Into<Response>, A, B, C, D, E> Callback<(A, B, C, D, E)> for K
where K: Fn(A, B, C, D, E) -> R, R: Future<Output = Z> + Send + 'static,

Source§

impl<K, R, Z: Into<Response>, A, B, C, D, E, F> Callback<(A, B, C, D, E, F)> for K
where K: Fn(A, B, C, D, E, F) -> R, R: Future<Output = Z> + Send + 'static,

Source§

impl<K, R, Z: Into<Response>, A, B, C, D, E, F, G> Callback<(A, B, C, D, E, F, G)> for K
where K: Fn(A, B, C, D, E, F, G) -> R, R: Future<Output = Z> + Send + 'static,

Source§

impl<K, R, Z: Into<Response>, A, B, C, D, E, F, G, H> Callback<(A, B, C, D, E, F, G, H)> for K
where K: Fn(A, B, C, D, E, F, G, H) -> R, R: Future<Output = Z> + Send + 'static,