pub trait Interceptor:
Send
+ Sync
+ 'static {
// Provided methods
fn before(
&self,
_context: ExecutionContext,
) -> BoxFuture<'static, Result<()>> { ... }
fn after(
&self,
_context: ExecutionContext,
response: BootResponse,
) -> BoxFuture<'static, Result<BootResponse>> { ... }
}Expand description
Runs around the handler for cross-cutting behavior.
Provided Methods§
fn before(&self, _context: ExecutionContext) -> BoxFuture<'static, Result<()>>
fn after( &self, _context: ExecutionContext, response: BootResponse, ) -> BoxFuture<'static, Result<BootResponse>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".