windmark 0.5.0

An elegant and highly performant async Gemini server framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::context::HookContext;

#[allow(clippy::module_name_repetitions)]
pub trait PreRouteHook: Send + Sync {
  fn call(&self, context: &HookContext);
}

impl<T> PreRouteHook for T
where T: Fn(&HookContext) + Send + Sync
{
  fn call(&self, context: &HookContext) { (*self)(context) }
}