pub trait Transform<Args, T, O>:
Send
+ Sync
+ 'static {
// Required method
fn transform<'life0, 'async_trait>(
&'life0 self,
input: T,
) -> Pin<Box<dyn Future<Output = O> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Middleware that transforms around an input to output type.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<Func, Fut, O> Transform<(), (), O> for Func
Middleware implementation for an async function that produces an output
impl<Func, Fut, T, O> Transform<(T, O), T, O> for Func
Middleware implementation for an async function that returns nothing
impl<T, Args, I, O> Transform<(I, O), I, O> for Pied<T, Args, I, O>
impl<T, T2, A, B, C> Transform<(A, C), A, C> for ConvertMiddleware<T, T2, A, B, C>
Implements the transform trait on the conversion middleware (for downstream)