Skip to main content

oanda_v20_openapi/models/
date_time_format.rs

1/*
2 * OANDA v20 API
3 *
4 * The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
5 *
6 * The version of the OpenAPI document: 0.2.1
7 * Contact: jmicoud02@gmail.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// DateTimeFormat : Types of accepted and handled datetime formats
15/// Types of accepted and handled datetime formats
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum DateTimeFormat {
18    #[serde(rename = "UNIX")]
19    Unix,
20    #[serde(rename = "RFC3339")]
21    Rfc3339,
22
23}
24
25impl std::fmt::Display for DateTimeFormat {
26    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Self::Unix => write!(f, "UNIX"),
29            Self::Rfc3339 => write!(f, "RFC3339"),
30        }
31    }
32}
33
34impl Default for DateTimeFormat {
35    fn default() -> DateTimeFormat {
36        Self::Unix
37    }
38}
39