Trait viz::prelude::Middleware [−]
pub trait Middleware<'a, Context>: Send + Sync + 'static { type Output; fn call(
&'a self,
cx: &'a mut Context
) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a, Global>>; }
Expand description
A handle trait for asynchronous context pipeline.
Associated Types
type Output
type Output
Returns Output
Required methods
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,