pub trait Interceptor: Build {
// Provided method
fn register(state: &State) { ... }
}Expand description
Base trait for all interceptors in Sword. Implement this trait to create interceptors that can be automatically registered and built via the dependency injection system.
This means that the interceptor can have dependencies injected into it, and also be stored one time and reused throughout the application lifecycle.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".