Advice

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 { ... }
}

Required Methods§

Source

fn pointcut_expr(&self) -> &'static str

Provided Methods§

Source

fn before(&self, req: Request<Body>) -> Request<Body>

Source

fn after(&self, res: Response<Body>) -> Response<Body>

Source

fn before_async(&self, req: Request<Body>) -> BoxFuture<'static, Request<Body>>

Source

fn after_async(&self, res: Response<Body>) -> BoxFuture<'static, Response<Body>>

Source

fn pointcut(&self) -> Pointcut

Implementors§