aboutsummaryrefslogtreecommitdiff
path: root/src/urls
diff options
context:
space:
mode:
authorMelody Horn / boringcactus <melody@boringcactus.com>2021-06-12 23:24:33 -0600
committerMelody Horn / boringcactus <melody@boringcactus.com>2021-06-12 23:24:33 -0600
commit4c8940569e5729213b7eee6f3d5be39b745b697b (patch)
tree20935676f7a14ad12752ec98b65db9f067fba239 /src/urls
parent582124d59afa438e2cb88cc024d6b19232236e1e (diff)
downloadtosin-4c8940569e5729213b7eee6f3d5be39b745b697b.tar.gz
tosin-4c8940569e5729213b7eee6f3d5be39b745b697b.zip
actually implement the easy example
Diffstat (limited to 'src/urls')
-rw-r--r--src/urls/mod.rs17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/urls/mod.rs b/src/urls/mod.rs
index 1acf186..45720b6 100644
--- a/src/urls/mod.rs
+++ b/src/urls/mod.rs
@@ -1,16 +1,5 @@
-use crate::http::{Request, Response};
+pub use warp::path;
-pub type View = fn(Request) -> Response;
+use crate::http::Response;
-pub enum Path {
- View {
- url: &'static str,
- view: View,
- name: &'static str,
- },
-
- Include {
- url: &'static str,
- content: &'static [Path],
- },
-}
+pub type UrlMap = warp::filters::BoxedFilter<(Response,)>;