diff options
Diffstat (limited to 'src/handler.rs')
| -rw-r--r-- | src/handler.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/handler.rs b/src/handler.rs index f854aea..b1e6afe 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -22,6 +22,9 @@ pub type RouteResponse = fn(RouteContext<'_>) -> Response<'_>; pub type ErrorResponse = Box< dyn FnMut(crate::returnable::ErrorContext<'_>) -> Response<'_> + Send + Sync, >; -pub type Callback = - fn(&tokio::net::TcpStream, &url::Url, Option<&matchit::Params<'_, '_>>); +pub type Callback = Box< + dyn FnMut(&tokio::net::TcpStream, &url::Url, Option<&matchit::Params<'_, '_>>) + + Send + + Sync, +>; pub type Partial = fn(RouteContext<'_>) -> String; |