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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! # BO4E - Business Objects for Energy
//!
//! Rust implementation of the BO4E standard for data exchange in the
//! German energy industry.
//!
//! ## Quick Start
//!
//! ```rust
//! use bo4e::prelude::*;
//!
//! // Create a meter
//! let meter = Meter {
//! meter_number: Some("1EMH0012345678".to_string()),
//! division: Some(Division::Electricity),
//! meter_type: Some(MeterType::ModernMeasuringDevice),
//! ..Default::default()
//! };
//!
//! // Serialize to German JSON (BO4E standard)
//! let json = to_json_german(&meter).unwrap();
//! println!("{}", json);
//!
//! // Deserialize
//! let mut bytes = json.into_bytes();
//! let parsed: Meter = from_json(&mut bytes).unwrap();
//! assert_eq!(parsed.meter_number, Some("1EMH0012345678".to_string()));
//! ```
//!
//! ## Crate Structure
//!
//! - [`bo`] - Business Objects (Meter, MarketLocation, Contract, etc.)
//! - [`com`] - Components (Address, Price, MeterReading, etc.)
//! - [`enums`] - Enumerations (Division, MeterType, ContractStatus, etc.)
//!
//! ## Serialization
//!
//! BO4E uses German field names in JSON by default to maintain compatibility
//! with the standard. Use [`to_json_english`] for English field names.
//!
//! ```rust
//! use bo4e::prelude::*;
//!
//! let meter = Meter::default();
//!
//! // German (standard)
//! let german = to_json_german(&meter).unwrap();
//!
//! // English
//! let english = to_json_english(&meter).unwrap();
//! ```
//!
//! ## Performance
//!
//! This crate uses [simd-json](https://github.com/simd-lite/simd-json) for
//! SIMD-accelerated JSON parsing. For best performance, use [`from_json`]
//! with a mutable byte slice.
//!
//! ## Related Projects
//!
//! - [BO4E-Python](https://github.com/Hochfrequenz/BO4E-python) - Python implementation
//! - [BO4E-Schemas](https://github.com/bo4e/BO4E-Schemas) - JSON schemas
//! - [bo4e.de](https://www.bo4e.de/) - Official website
// Re-export core types
pub use bo;
pub use com;
pub use enums;
pub use traits;
pub use ;
// Re-export serialization
pub use ;
pub use ;
/// Prelude for convenient imports.