Trait Advice
Source pub trait Advice:
Send
+ Sync
+ 'static {
// Required method
fn pointcut_expr(&self) -> &'static str;
// Provided methods
fn before(&self, req: Request<Body>) -> Request<Body> { ... }
fn after(&self, res: Response<Body>) -> Response<Body> { ... }
fn before_async(
&self,
req: Request<Body>,
) -> BoxFuture<'static, Request<Body>> { ... }
fn after_async(
&self,
res: Response<Body>,
) -> BoxFuture<'static, Response<Body>> { ... }
fn pointcut(&self) -> Pointcut { ... }
}