chitey-server 0.3.2

chitey framework on this chitey-server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use http::Method;

#[derive(Debug, Clone, PartialEq)]
pub enum Guard {
    Get = 0,
    Post = 1,
}

// Implement <Method> == <Guard> comparisons
impl PartialEq<Method> for Guard {
    fn eq(&self, other: &Method) -> bool {
        (*self == Guard::Get && other == Method::GET) ||
        (*self == Guard::Post && other == Method::POST)
    }
}