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::RouteContext;

#[allow(clippy::module_name_repetitions)]
pub trait Partial: Send + Sync {
  fn call(&self, context: &RouteContext) -> String;
}

impl<T> Partial for T
where T: Fn(&RouteContext) -> String + Send + Sync
{
  fn call(&self, context: &RouteContext) -> String { (*self)(context) }
}