pub trait MiddlewareLike<TLayerCtx>: Clone {
type State: Clone + Send + Sync + 'static;
type NewCtx: Send + 'static;
// Required method
fn handle<TMiddleware: Layer<Self::NewCtx> + 'static>(
&self,
ctx: TLayerCtx,
input: Value,
req: RequestContext,
next: Arc<TMiddleware>,
) -> Result<LayerResult, ExecError>;
}Required Associated Types§
Required Methods§
fn handle<TMiddleware: Layer<Self::NewCtx> + 'static>( &self, ctx: TLayerCtx, input: Value, req: RequestContext, next: Arc<TMiddleware>, ) -> Result<LayerResult, ExecError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.