nomy-data-models 0.2.3

Data model definitions for Nomy wallet analysis data processing
Documentation
#![allow(clippy::too_many_arguments, unused_imports, non_camel_case_types)]
//! ProcessingState enum definition.
//!
//! This file is generated automatically from the Python enum.
//! Do not edit this file manually.

use serde::{Deserialize, Serialize};

/// Enum for service processing states.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum ProcessingState {
    #[serde(rename = "pending")]
    PENDING,
    #[serde(rename = "running")]
    RUNNING,
    #[serde(rename = "completed")]
    COMPLETED,
    #[serde(rename = "failed")]
    FAILED,
}

impl ProcessingState {
    /// Convert to string representation.
    pub fn as_str(&self) -> &'static str {
        match self {
            ProcessingState::PENDING => "pending",
            ProcessingState::RUNNING => "running",
            ProcessingState::COMPLETED => "completed",
            ProcessingState::FAILED => "failed",
        }
    }
}