aboutsummaryrefslogtreecommitdiff
path: root/src/handler.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-27 06:03:33 +0000
committerFuwn <[email protected]>2022-03-27 06:03:33 +0000
commit97884a183f378fd996029cde769df2e974fff1eb (patch)
treebf270166bffb4622e3bb2e027707b71b05e2501d /src/handler.rs
parentrefactor(tokio): reexport main (diff)
downloadwindmark-97884a183f378fd996029cde769df2e974fff1eb.tar.xz
windmark-97884a183f378fd996029cde769df2e974fff1eb.zip
feat(response): respond with file
Diffstat (limited to 'src/handler.rs')
-rw-r--r--src/handler.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/handler.rs b/src/handler.rs
index e945dfc..071926c 100644
--- a/src/handler.rs
+++ b/src/handler.rs
@@ -18,8 +18,9 @@
use crate::{returnable::RouteContext, Response};
-pub type RouteResponse = fn(RouteContext<'_>) -> Response;
-pub type ErrorResponse = fn(crate::returnable::ErrorContext<'_>) -> Response;
+pub type RouteResponse = fn(RouteContext<'_>) -> Response<'_>;
+pub type ErrorResponse =
+ fn(crate::returnable::ErrorContext<'_>) -> Response<'_>;
pub type Callback =
fn(&tokio::net::TcpStream, &url::Url, Option<&matchit::Params<'_, '_>>);
pub type Partial = fn(RouteContext<'_>) -> String;