31 lines
755 B
Rust
31 lines
755 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};
|
|
|
|
/// BlocksResponse : Response for blocks by hash endpoint
|
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct BlocksResponse {
|
|
/// List of blocks with their indices
|
|
#[serde(rename = "blocks")]
|
|
pub blocks: Vec<models::BlockInfo>,
|
|
}
|
|
|
|
impl BlocksResponse {
|
|
/// Response for blocks by hash endpoint
|
|
pub fn new(blocks: Vec<models::BlockInfo>) -> BlocksResponse {
|
|
BlocksResponse {
|
|
blocks,
|
|
}
|
|
}
|
|
}
|
|
|