coinbase_mesh/models/
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
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 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. 
15/// 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. 
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum Operator {
18    #[serde(rename = "or")]
19    Or,
20    #[serde(rename = "and")]
21    And,
22
23}
24
25impl std::fmt::Display for Operator {
26    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Self::Or => write!(f, "or"),
29            Self::And => write!(f, "and"),
30        }
31    }
32}
33
34impl Default for Operator {
35    fn default() -> Operator {
36        Self::Or
37    }
38}
39