rosetta_types/
coin.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/// Coin : Coin contains its unique identifier and the amount it represents.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct Coin {
15    #[serde(rename = "coin_identifier")]
16    pub coin_identifier: crate::CoinIdentifier,
17    #[serde(rename = "amount")]
18    pub amount: crate::Amount,
19}
20
21impl Coin {
22    /// Coin contains its unique identifier and the amount it represents.
23    pub fn new(coin_identifier: crate::CoinIdentifier, amount: crate::Amount) -> Coin {
24        Coin {
25            coin_identifier,
26            amount,
27        }
28    }
29}