fireblocks_sdk/models/
execution_step_error.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14///
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum ExecutionStepError {
17    #[serde(rename = "INTERNAL_ERROR")]
18    InternalError,
19    #[serde(rename = "QUOTE_EXPIRED")]
20    QuoteExpired,
21    #[serde(rename = "INSUFFICIENT_OUTPUT_AMOUNT")]
22    InsufficientOutputAmount,
23    #[serde(rename = "INSUFFICIENT_FUNDS")]
24    InsufficientFunds,
25    #[serde(rename = "LAST_TRANSACTION_FAILED")]
26    LastTransactionFailed,
27    #[serde(rename = "SWAP_APPROVAL_FAILED")]
28    SwapApprovalFailed,
29    #[serde(rename = "PROVIDER_EXECUTION_ERROR")]
30    ProviderExecutionError,
31}
32
33impl std::fmt::Display for ExecutionStepError {
34    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
35        match self {
36            Self::InternalError => write!(f, "INTERNAL_ERROR"),
37            Self::QuoteExpired => write!(f, "QUOTE_EXPIRED"),
38            Self::InsufficientOutputAmount => write!(f, "INSUFFICIENT_OUTPUT_AMOUNT"),
39            Self::InsufficientFunds => write!(f, "INSUFFICIENT_FUNDS"),
40            Self::LastTransactionFailed => write!(f, "LAST_TRANSACTION_FAILED"),
41            Self::SwapApprovalFailed => write!(f, "SWAP_APPROVAL_FAILED"),
42            Self::ProviderExecutionError => write!(f, "PROVIDER_EXECUTION_ERROR"),
43        }
44    }
45}
46
47impl Default for ExecutionStepError {
48    fn default() -> ExecutionStepError {
49        Self::InternalError
50    }
51}