35 lines
787 B
Rust
35 lines
787 B
Rust
/*
|
|
* rfs
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 0.2.0
|
|
*
|
|
* Generated by: https://openapi-generator.tech
|
|
*/
|
|
|
|
use crate::models;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
/// BlockInfo : Block information with hash and index
|
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct BlockInfo {
|
|
/// Block hash
|
|
#[serde(rename = "hash")]
|
|
pub hash: String,
|
|
/// Block index within the file
|
|
#[serde(rename = "index")]
|
|
pub index: i64,
|
|
}
|
|
|
|
impl BlockInfo {
|
|
/// Block information with hash and index
|
|
pub fn new(hash: String, index: i64) -> BlockInfo {
|
|
BlockInfo {
|
|
hash,
|
|
index,
|
|
}
|
|
}
|
|
}
|
|
|