Trait viz_core::Middleware [−][src]
A handle trait for asynchronous context pipeline.
Associated Types
Loading content...Required methods
#[must_use]pub fn call(
&'a self,
cx: &'a mut Context
) -> Pin<Box<dyn Future<Output = Self::Output> + 'a + Send, Global>>
[src]
&'a self,
cx: &'a mut Context
) -> Pin<Box<dyn Future<Output = Self::Output> + 'a + Send, Global>>
Invokes the handler within the given Context
and then returns Output
Implementors
impl<'a, Context, Output, F, Fut> Handle<'a, Context> for F where
Context: 'a,
F: Send + Sync + 'static + Fn(&'a mut Context) -> Fut,
Fut: Future<Output = Output> + Send + 'a,
[src]
Context: 'a,
F: Send + Sync + 'static + Fn(&'a mut Context) -> Fut,
Fut: Future<Output = Output> + Send + 'a,
type Output = Output
pub fn call(
&'a self,
cx: &'a mut Context
) -> Pin<Box<dyn Future<Output = <F as Handle<'a, Context>>::Output> + 'a + Send, Global>>
[src]
&'a self,
cx: &'a mut Context
) -> Pin<Box<dyn Future<Output = <F as Handle<'a, Context>>::Output> + 'a + Send, Global>>
impl<'a, F, T> Handle<'a, Context> for HandlerSuper<F, T> where
F: for<'h> HandlerCamp<'h, T> + Send + Sync + 'static,
T: Extract + Send + Sync + 'static,
T::Error: Into<Response> + Send,
[src]
F: for<'h> HandlerCamp<'h, T> + Send + Sync + 'static,
T: Extract + Send + Sync + 'static,
T::Error: Into<Response> + Send,
type Output = Result<Response>
fn call(&'a self, cx: &'a mut Context) -> BoxFuture<'a, Self::Output>
[src]
impl<'a, F, T> Handle<'a, Context> for HandlerWrapper<F, T> where
F: HandlerBase<T> + Send + Sync + 'static,
T: Extract + Send + Sync + 'static,
T::Error: Into<Response> + Send,
[src]
F: HandlerBase<T> + Send + Sync + 'static,
T: Extract + Send + Sync + 'static,
T::Error: Into<Response> + Send,