rosetta_types/operator.rs
1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere.
5 *
6 * The version of the OpenAPI document: 1.4.13
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// Operator : Operator is used by query-related endpoints to determine how to apply conditions. If this field is not populated, the default `and` value will be used.
12
13/// Operator is used by query-related endpoints to determine how to apply conditions. If this field is not populated, the default `and` value will be used.
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum Operator {
16 #[serde(rename = "or")]
17 Or,
18 #[serde(rename = "and")]
19 And,
20}
21
22impl ToString for Operator {
23 fn to_string(&self) -> String {
24 match self {
25 Self::Or => String::from("or"),
26 Self::And => String::from("and"),
27 }
28 }
29}
30
31impl Default for Operator {
32 fn default() -> Operator {
33 Self::Or
34 }
35}