1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use crate::http::structs::{Response, Verb};

use super::ParamsHandler;

#[derive(PartialEq, Eq)]
pub struct Route{
    pub verb  : Verb,
    pub route:  String,
    pub  method : fn(ParamsHandler) -> Response
}

impl Clone for Route {
    fn clone(&self) -> Self {
        Route { route: self.route.clone(), ..*self }
    }
}


pub type Routes = Vec<Route>;