eulumdat/
validation.rs

1//! Validation types for Python bindings
2
3use pyo3::prelude::*;
4
5/// Validation warning from the EULUMDAT specification.
6#[pyclass]
7#[derive(Clone)]
8pub struct ValidationWarning {
9    /// Warning code (e.g., "W001").
10    #[pyo3(get)]
11    pub code: String,
12    /// Warning message.
13    #[pyo3(get)]
14    pub message: String,
15}
16
17#[pymethods]
18impl ValidationWarning {
19    fn __repr__(&self) -> String {
20        format!("[{}] {}", self.code, self.message)
21    }
22}