Skip to main content

blockfrost_openapi/models/
network_eras_inner_start.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4/// NetworkErasInnerStart : Start of the blockchain era, relative to the start of the network 
5#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
6pub struct NetworkErasInnerStart {
7    /// Time in seconds relative to the start time of the network
8    #[serde(rename = "time")]
9    pub time: i32,
10    /// Absolute slot number
11    #[serde(rename = "slot")]
12    pub slot: i32,
13    /// Epoch number
14    #[serde(rename = "epoch")]
15    pub epoch: i32,
16}
17
18impl NetworkErasInnerStart {
19    /// Start of the blockchain era, relative to the start of the network 
20    pub fn new(time: i32, slot: i32, epoch: i32) -> NetworkErasInnerStart {
21        NetworkErasInnerStart {
22            time,
23            slot,
24            epoch,
25        }
26    }
27}
28