rosetta_types/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
11/// 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.
12
13/// 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.
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum ExemptionType {
16 #[serde(rename = "greater_or_equal")]
17 GreaterOrEqual,
18 #[serde(rename = "less_or_equal")]
19 LessOrEqual,
20 #[serde(rename = "dynamic")]
21 Dynamic,
22}
23
24impl ToString for ExemptionType {
25 fn to_string(&self) -> String {
26 match self {
27 Self::GreaterOrEqual => String::from("greater_or_equal"),
28 Self::LessOrEqual => String::from("less_or_equal"),
29 Self::Dynamic => String::from("dynamic"),
30 }
31 }
32}
33
34impl Default for ExemptionType {
35 fn default() -> ExemptionType {
36 Self::GreaterOrEqual
37 }
38}