photon_api/models/
signature_info_with_error.rs

1/*
2 * photon-indexer
3 *
4 * Solana indexer for general compression
5 *
6 * The version of the OpenAPI document: 0.50.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct SignatureInfoWithError {
15    /// An Unix timestamp (seconds)
16    #[serde(rename = "blockTime")]
17    pub block_time: u64,
18    #[serde(rename = "error", default, skip_serializing_if = "Option::is_none")]
19    pub error: Option<String>,
20    /// A Solana transaction signature.
21    #[serde(rename = "signature")]
22    pub signature: String,
23    #[serde(rename = "slot")]
24    pub slot: u64,
25}
26
27impl SignatureInfoWithError {
28    pub fn new(block_time: u64, signature: String, slot: u64) -> SignatureInfoWithError {
29        SignatureInfoWithError {
30            block_time,
31            error: None,
32            signature,
33            slot,
34        }
35    }
36}