just_serve_it 1.0.0

A lightweight and multithreaded backend web-framework for Rust
Documentation
#[derive(Clone, Debug)]
pub enum Method {
    Get,
    Post,
    Put,
    Delete,
    Patch,
}

impl Method {
    pub fn from(method_str: &str) -> Option<Self> {
        let method = match method_str {
            "GET" => Method::Get,
            "POST" => Method::Post,
            "PUT" => Method::Put,
            "DELETE" => Method::Delete,
            "PATCH" => Method::Patch,
            _ => return None,
        };

        Some(method)
    }
}