Method
call
(&self, req: ServiceRequest)
Source from the content-addressed store, hash-verified
| 30 | } |
| 31 | |
| 32 | fn call(&self, req: ServiceRequest) -> Self::Future { |
| 33 | log::info!("request is passing through the AddMsg middleware"); |
| 34 | |
| 35 | if self.enabled { |
| 36 | // insert data into extensions if enabled |
| 37 | req.extensions_mut() |
| 38 | .insert(Msg("Hello from Middleware!".to_owned())); |
| 39 | } |
| 40 | |
| 41 | self.service.call(req) |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | #[derive(Clone, Debug)] |
Callers
nothing calls this directly
Tested by
no test coverage detected