rosetta_types/
block_transaction.rs

1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere.
5 *
6 * The version of the OpenAPI document: 1.4.13
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// BlockTransaction : BlockTransaction contains a populated Transaction and the BlockIdentifier that contains it.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct BlockTransaction {
15    #[serde(rename = "block_identifier")]
16    pub block_identifier: crate::BlockIdentifier,
17    #[serde(rename = "transaction")]
18    pub transaction: crate::Transaction,
19}
20
21impl BlockTransaction {
22    /// BlockTransaction contains a populated Transaction and the BlockIdentifier that contains it.
23    pub fn new(
24        block_identifier: crate::BlockIdentifier,
25        transaction: crate::Transaction,
26    ) -> BlockTransaction {
27        BlockTransaction {
28            block_identifier,
29            transaction,
30        }
31    }
32}