pub trait RequestInterceptor:
Send
+ Sync
+ 'static {
// Required methods
fn pre_execute<'a>(
&'a self,
ctx: &'a mut RequestContext,
) -> Pin<Box<dyn Future<Output = Result<(), ExecuteError>> + Send + 'a>>;
fn post_execute<'a>(
&'a self,
ctx: &'a ResponseContext,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>;
}Required Methods§
fn pre_execute<'a>( &'a self, ctx: &'a mut RequestContext, ) -> Pin<Box<dyn Future<Output = Result<(), ExecuteError>> + Send + 'a>>
fn post_execute<'a>( &'a self, ctx: &'a ResponseContext, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".