#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Method {
Get,
Post,
Put,
Patch,
Delete,
Head,
Options,
}
impl std::fmt::Display for Method {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Method::Get => write!(f, "GET"),
Method::Post => write!(f, "POST"),
Method::Put => write!(f, "PUT"),
Method::Patch => write!(f, "PATCH"),
Method::Delete => write!(f, "DELETE"),
Method::Head => write!(f, "HEAD"),
Method::Options => write!(f, "OPTIONS"),
}
}
}