rosetta_types/
operation_status.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/// OperationStatus : OperationStatus is utilized to indicate which Operation status are considered successful.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct OperationStatus {
15    /// The status is the network-specific status of the operation.
16    #[serde(rename = "status")]
17    pub status: String,
18    /// An Operation is considered successful if the Operation.Amount should affect the Operation.Account. Some blockchains (like Bitcoin) only include successful operations in blocks but other blockchains (like Ethereum) include unsuccessful operations that incur a fee.  To reconcile the computed balance from the stream of Operations, it is critical to understand which Operation.Status indicate an Operation is successful and should affect an Account.
19    #[serde(rename = "successful")]
20    pub successful: bool,
21}
22
23impl OperationStatus {
24    /// OperationStatus is utilized to indicate which Operation status are considered successful.
25    pub fn new(status: String, successful: bool) -> OperationStatus {
26        OperationStatus { status, successful }
27    }
28}