blob: 6bc24b278631d8d327eda7c2fadc528d7e4266e8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
use crate::{context::HookContext, response::Response};
#[allow(clippy::module_name_repetitions)]
pub trait PostRouteHook: Send + Sync {
fn call(&mut self, context: HookContext, response: &mut Response);
}
impl<T> PostRouteHook for T
where T: FnMut(HookContext, &mut Response) + Send + Sync
{
fn call(&mut self, context: HookContext, response: &mut Response) {
(*self)(context, response);
}
}
|