Trait async_middleware::Middleware
source · [−]pub trait Middleware<I, O>: Send + Sync + 'static {
fn call<'life0, 'async_trait>(
&'life0 self,
input: I
) -> Pin<Box<dyn Future<Output = O> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Middleware that performs an operation.
Required Methods
Implementors
impl<T, Args, I, O> Middleware<I, O> for Pied<T, Args, I, O> where
T: Send + Sync + 'static,
Args: Send + Sync + 'static,
I: Send + Sync + 'static,
O: Send + Sync + 'static,
Implements the middleware trait for the main Pied structure
impl<T, T2, A, B, C> Middleware<A, C> for ConvertMiddleware<T, T2, A, B, C> where
T: Send + Sync + 'static,
T2: Send + Sync + 'static,
A: Send + Sync + 'static,
B: Send + Sync + 'static,
C: Send + Sync + 'static,
Implements the middleware trait on the conversion middleware to make it A -> C