blob: b8f405781c287b11c6d9f60a52a3b900909a034b (
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(&mut self, context: RouteContext) -> String;
}
impl<T> Partial for T
where T: FnMut(RouteContext) -> String + Send + Sync
{
fn call(&mut self, context: RouteContext) -> String { (*self)(context) }
}
|