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
//! # OTOML - Canonical TOML Serialization
//!
//! This crate provides OTOML serialization functionality and canonical types:
//! - [`OTime`] - UTC timestamp (4 bytes)
//! - [`OCur`] - Currency amount (integer micro-units)
//! - [`OLocation`] - Geographic location (10 bytes)
//! - [`OAddress`] - Planet-scale civic address
//!
//! It also provides serialization functions:
//! - [`dump_otoml`] / [`load_otoml`] - Text serialization
//! - [`dump_obin`] / [`load_obin`] - Binary serialization
//!
//! ## OtomlSerialize Trait
//!
//! The [`OtomlSerialize`] trait provides convenient instance methods for any
//! type that implements `Serialize + DeserializeOwned`:
//!
//! ```rust,ignore
//! use herolib_otoml::OtomlSerialize;
//!
//! let user = User::default();
//!
//! // Instance methods
//! let otoml = user.to_otoml()?;
//! let json = user.to_json()?;
//!
//! // Factory methods
//! let user = User::from_otoml(&otoml)?;
//! let user = User::from_json(&json)?;
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use OLocation;
pub use OTime;
pub use OtomlSerialize;