batch_mode_batch_scribe/http_method.rs
1// ---------------- [ File: batch-mode-batch-scribe/src/http_method.rs ]
2crate::ix!();
3
4/// Enumeration of possible HTTP methods.
5#[derive(Clone,Debug, Serialize, Deserialize)]
6#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
7pub enum HttpMethod {
8 Get,
9 Post,
10}
11
12impl fmt::Display for HttpMethod {
13 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
14 match self {
15 HttpMethod::Get => write!(f, "GET"),
16 HttpMethod::Post => write!(f, "POST"),
17 }
18 }
19}