1
0
mirror of https://github.com/actix/examples synced 2025-06-27 01:27:43 +02:00
This commit is contained in:
Gorm Casper
2018-07-09 20:18:31 +02:00
parent 14baeff358
commit ab7736c790
6 changed files with 51 additions and 0 deletions

13
middleware/src/simple.rs Normal file
View File

@ -0,0 +1,13 @@
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)
}
}