coinbase_mesh/models/
block_identifier.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/// BlockIdentifier : The block_identifier uniquely identifies a block in a particular network. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BlockIdentifier {
17    /// This is also known as the block height. 
18    #[serde(rename = "index")]
19    pub index: i64,
20    /// This should be normalized according to the case specified in the block_hash_case network options. 
21    #[serde(rename = "hash")]
22    pub hash: String,
23}
24
25impl BlockIdentifier {
26    /// The block_identifier uniquely identifies a block in a particular network. 
27    pub fn new(index: i64, hash: String) -> BlockIdentifier {
28        BlockIdentifier {
29            index,
30            hash,
31        }
32    }
33}
34