Skip to main content

Interceptor

Derive Macro Interceptor 

Source
#[derive(Interceptor)]
Expand description

Derive macro for creating interceptors.

Generates implementations for the Interceptor trait.

§Usage

use sword::prelude::*;

#[derive(Interceptor)]
struct MyInterceptor;

// then implement some Interceptor trait variants
// depending on the adapter type (e. g. OnRequest, OnConnect.)