nomy-data-models 0.2.4

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

use serde::{Deserialize, Serialize};

/// Enum for data quality states.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum DataState {
    #[serde(rename = "empty")]
    EMPTY,
    #[serde(rename = "partial")]
    PARTIAL,
    #[serde(rename = "complete")]
    COMPLETE,
    #[serde(rename = "error")]
    ERROR,
}

impl DataState {
    /// Convert to string representation.
    pub fn as_str(&self) -> &'static str {
        match self {
            DataState::EMPTY => "empty",
            DataState::PARTIAL => "partial",
            DataState::COMPLETE => "complete",
            DataState::ERROR => "error",
        }
    }
}