rosetta_types/
block_event_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/// BlockEventType : BlockEventType determines if a BlockEvent represents the addition or removal of a block.
12
13/// BlockEventType determines if a BlockEvent represents the addition or removal of a block.
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
15pub enum BlockEventType {
16    #[serde(rename = "block_added")]
17    Added,
18    #[serde(rename = "block_removed")]
19    Removed,
20}
21
22impl ToString for BlockEventType {
23    fn to_string(&self) -> String {
24        match self {
25            Self::Added => String::from("block_added"),
26            Self::Removed => String::from("block_removed"),
27        }
28    }
29}
30
31impl Default for BlockEventType {
32    fn default() -> BlockEventType {
33        Self::Added
34    }
35}