blob: a55209618bc7ab5fe33ab29694d167b373ee53b1 (
plain) (
blame)
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) }
}
|