photon_api/models/
signature_info_with_error.rs1use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct SignatureInfoWithError {
15 #[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 #[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}