1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! # reinhardt-core-serializers
//!
//! Core serialization and deserialization functionality for Reinhardt framework.
//!
//! This crate provides the foundational serialization infrastructure that is
//! ORM-agnostic and can be used across different layers of the framework.
//!
//! ## Features
//!
//! - **Serializer Traits**: Core `Serializer` and `Deserializer` traits
//! - **Field Types**: Django REST Framework-inspired fields (CharField,
//! IntegerField, etc.) with a public
//! [`FieldErrorMessages`](crate::serializers::fields::FieldErrorMessages)
//! member so struct-update construction keeps compiling
//! - **JSON Field Extraction**: Presence-aware scalar coercion that rejects
//! lossy `f64` integer conversions outside the exact `±2^53` range
//! - **Validation**: Field-level and object-level validation support
//! - **Structured Errors**: Field-keyed aggregate validation errors
//! - **Recursive Serialization**: Depth tracking and circular reference detection
//! - **Arena Allocation**: Memory-efficient serialization for deeply nested structures
//!
//! ## Feature Flags
//!
//! - `json` (default): JSON serialization support
//! - `xml`: XML serialization support
//! - `yaml`: YAML serialization support
//!
//! ## Examples
//!
//! ```rust
//! use reinhardt_core::serializers::{Serializer, JsonSerializer};
//! use serde::{Serialize, Deserialize};
//!
//! #[derive(Serialize, Deserialize)]
//! struct User {
//! id: i64,
//! name: String,
//! }
//!
//! let user = User { id: 1, name: "Alice".to_string() };
//! let serializer = JsonSerializer::<User>::new();
//! let json = serializer.serialize(&user).unwrap();
//! ```
// Re-export commonly used types
pub use ;
pub use ;