ferrum_router/recognizer/
matcher.rs

1use std::collections::BTreeMap;
2use ferrum::Handler;
3
4pub type Params = BTreeMap<String, String>;
5
6pub struct RouteMatch<'a> {
7    pub handler: &'a Box<Handler>,
8    pub params: Params
9}
10
11impl<'a> RouteMatch<'a> {
12    pub fn new(handler: &'a Box<Handler>, params: Params) -> RouteMatch {
13        RouteMatch {
14            handler,
15            params
16        }
17    }
18}