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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
// This is free and unencumbered software released into the public domain.
//! XML Schema (XSD) datatypes for Rust.
//!
//! # Features
//!
//! Disable defaults for `no_std`. Numeric values and datatype identifiers are
//! available without this crate's `alloc` feature; `alloc` enables owned strings
//! and allocation-dependent helpers. `datetime` (also exposed as `jiff`) enables
//! date/time values without requiring `std`. `serde` and `borsh` imply `alloc`;
//! `bson`, `oxrdf`, and `rudof` require `std`. Defaults enable `all` and `std`.
//! Dependency features are forwarded explicitly; enabling serialization does
//! not implicitly enable date/time support.
//!
//! ```rust
//! use xsd::{Type, Value};
//! use xsd::primitive::{Boolean, Decimal, Double, Duration, Float};
//! # #[cfg(feature = "jiff")]
//! use xsd::primitive::{Date, DateTime, Time};
//! ```
//!
//! ## Sophia interoperability
//!
//! The `sophia` feature is currently an empty compatibility placeholder. It
//! enables no dependencies, trait implementations, or conversion APIs in this
//! crate, and does not enable `alloc` or `std`. In particular, enabling it does
//! not make [`Value`] or [`PrimitiveValue`] implement Sophia term traits.
//! Applications integrating with Sophia must provide their own term conversion,
//! retaining RDF lexical forms and datatype identifiers outside parsed values.
//!
//! ## JSON-LD interoperability
//!
//! The `json-ld` feature is currently an empty compatibility placeholder. It
//! enables no dependencies, JSON-LD processing, or conversion APIs, and does not
//! enable `alloc`, `std`, or `serde`. Explicit JSON conversion methods on values
//! require the separate `serde` feature. Those methods produce JSON values,
//! not JSON-LD value objects carrying `@value` and `@type`; they do not provide
//! JSON-LD expansion, compaction, or RDF datatype-preserving round trips.
//!
//! ## Rudof interoperability
//!
//! The `rudof` feature enables `std` (and thus `alloc`) and the optional
//! `oxsdatatypes` dependency. It currently provides no dedicated Rudof or
//! `oxsdatatypes` conversion API, trait implementations, or public re-exports.
//! It also does not enable `datetime` or change which datatypes [`parse`]
//! supports. Applications using `oxsdatatypes` directly must declare their own
//! dependency and handle conversion and representation limits explicitly.
//!
//! ## Borsh interoperability
//!
//! The `borsh` feature enables `BorshSerialize` and `BorshDeserialize` for
//! [`Type`], [`PrimitiveType`], [`DecimalType`], [`DecimalValue`], and
//! [`TimezoneOffset`]. It also
//! forwards Borsh support to the numeric backend and enables `alloc`, without
//! requiring `std`.
//! With `jiff` as well, `primitive::Date`, `primitive::Time`, and
//! `primitive::DateTime` support versioned, validated type-local encodings
//! documented on those types. `primitive::GMonth`, `primitive::GDay`,
//! `primitive::GMonthDay`, and `primitive::GYearMonth` have
//! versioned, validated encodings available without date/time features; see
//! their migration notes.
//!
//! [`Value`] and [`PrimitiveValue`] do **not** implement Borsh serialization or
//! deserialization, even with `borsh` enabled. Wrapping a supported numeric
//! value in either enum does not make that wrapper serializable.
//!
//! The supported enums use structural binary encodings, not XSD lexical strings.
//! Round trips preserve their variants and stored data; they cannot recover
//! original lexical spelling that was discarded during parsing. This feature
//! does not define a versioned, cross-release interchange format.
extern crate alloc;
/// The XSD namespace base URI (`http://www.w3.org/2001/XMLSchema#`).
pub const BASE_URI: &'static str = "http://www.w3.org/2001/XMLSchema#";
/// Rust types for representing values of XSD primitive datatypes.
/// Rust types for representing values of XSD derived datatypes.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use r#type::*;
pub use *;
;