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.45.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: i32,
18    #[serde(
19        rename = "error",
20        default,
21        with = "::serde_with::rust::double_option",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub error: Option<Option<String>>,
25    /// A Solana transaction signature.
26    #[serde(rename = "signature")]
27    pub signature: String,
28    #[serde(rename = "slot")]
29    pub slot: i32,
30}
31
32impl SignatureInfoWithError {
33    pub fn new(block_time: i32, signature: String, slot: i32) -> SignatureInfoWithError {
34        SignatureInfoWithError {
35            block_time,
36            error: None,
37            signature,
38            slot,
39        }
40    }
41}