coinbase_mesh/models/exemption_type.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/// ExemptionType : ExemptionType is used to indicate if the live balance for an account subject to a BalanceExemption could increase above, decrease below, or equal the computed balance. * greater_or_equal: The live balance may increase above or equal the computed balance. This typically occurs with staking rewards that accrue on each block. * less_or_equal: The live balance may decrease below or equal the computed balance. This typically occurs as balance moves from locked to spendable on a vesting account. * dynamic: The live balance may increase above, decrease below, or equal the computed balance. This typically occurs with tokens that have a dynamic supply.
15/// ExemptionType is used to indicate if the live balance for an account subject to a BalanceExemption could increase above, decrease below, or equal the computed balance. * greater_or_equal: The live balance may increase above or equal the computed balance. This typically occurs with staking rewards that accrue on each block. * less_or_equal: The live balance may decrease below or equal the computed balance. This typically occurs as balance moves from locked to spendable on a vesting account. * dynamic: The live balance may increase above, decrease below, or equal the computed balance. This typically occurs with tokens that have a dynamic supply.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum ExemptionType {
18 #[serde(rename = "greater_or_equal")]
19 GreaterOrEqual,
20 #[serde(rename = "less_or_equal")]
21 LessOrEqual,
22 #[serde(rename = "dynamic")]
23 Dynamic,
24
25}
26
27impl std::fmt::Display for ExemptionType {
28 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
29 match self {
30 Self::GreaterOrEqual => write!(f, "greater_or_equal"),
31 Self::LessOrEqual => write!(f, "less_or_equal"),
32 Self::Dynamic => write!(f, "dynamic"),
33 }
34 }
35}
36
37impl Default for ExemptionType {
38 fn default() -> ExemptionType {
39 Self::GreaterOrEqual
40 }
41}
42