1
0
mirror of https://github.com/actix/examples synced 2024-12-03 18:22:14 +01:00
examples/middleware/src/simple.rs

14 lines
293 B
Rust
Raw Normal View History

2018-07-09 20:18:31 +02:00
extern crate actix_web;
use actix_web::middleware::{Middleware, Started};
use actix_web::{HttpRequest, Result};
pub struct SayHi;
impl<S> Middleware<S> for SayHi {
fn start(&self, _req: &mut HttpRequest<S>) -> Result<Started> {
println!("Hi");
Ok(Started::Done)
}
}