eure_json/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Clone, Error, PartialEq)]
4pub enum EureToJsonError {
5    #[error("Hole (uninitialized value) is not supported in JSON")]
6    HoleNotSupported,
7
8    #[error("BigInt value is out of range for JSON number")]
9    BigIntOutOfRange,
10
11    #[error("Non-finite floating point value (NaN or Infinity) is not supported in JSON")]
12    NonFiniteFloat,
13
14    #[error("Variant content already contains tag field '{tag}' in Internal representation")]
15    VariantTagConflict { tag: String },
16
17    #[error("Variant content already contains field '{field}' in Adjacent representation")]
18    VariantAdjacentConflict { field: String },
19}
20
21/// Errors that can occur when converting JSON to Eure.
22/// Currently this is infallible, but the error type is provided for future extensibility
23/// and API consistency.
24#[derive(Debug, Error, PartialEq)]
25pub enum JsonToEureError {
26    // Currently no error cases - JSON to Eure conversion is infallible.
27    // This enum is provided for:
28    // 1. API consistency with EureToJsonError
29    // 2. Future extensibility (e.g., schema-guided conversion constraints)
30}