wechat_pay_rust_sdk/
request.rs

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