nutt_web/http/
method.rs

1use std::fmt::{Display, Formatter};
2
3#[derive(Hash, Eq, PartialEq, Clone, Debug)]
4pub enum Method {
5    GET,
6    POST,
7    PUT,
8    DELETE,
9}
10
11impl Display for Method {
12    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
13        write!(
14            f,
15            "{}",
16            match self {
17                Method::GET => "GET",
18                Method::POST => "POST",
19                Method::PUT => "PUT",
20                Method::DELETE => "DELETE",
21            }
22        )
23    }
24}