diff options
author | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-12 23:24:33 -0600 |
---|---|---|
committer | Melody Horn / boringcactus <melody@boringcactus.com> | 2021-06-12 23:24:33 -0600 |
commit | 4c8940569e5729213b7eee6f3d5be39b745b697b (patch) | |
tree | 20935676f7a14ad12752ec98b65db9f067fba239 /src/urls | |
parent | 582124d59afa438e2cb88cc024d6b19232236e1e (diff) | |
download | tosin-4c8940569e5729213b7eee6f3d5be39b745b697b.tar.gz tosin-4c8940569e5729213b7eee6f3d5be39b745b697b.zip |
actually implement the easy example
Diffstat (limited to 'src/urls')
-rw-r--r-- | src/urls/mod.rs | 17 |
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,)>; |