This crate provides a more flexible guard function for the [actix-web
] framework.
The [Guard
] acts as a gatekeeper for a specific scope and governs over which request is allowed to pass.
Guards can accept application state as well as types that implement the [FromReqeust
] trait as parameters.
They can also execute asynchrones code inside them.
```rust
pub struct CounterError();
impl Display for CounterError { fn fmt(&self, f: &mut std::fmt::Formatter<'>) -> std::fmt::Result { f.writestr("Error: Counter is over 100") } }
impl ResponseError for CounterError {}
async fn count(counter: web::Data
async fn main() -> Result<(), Box
License: MIT