Skip to main content

xsd/
lib.rs

1// This is free and unencumbered software released into the public domain.
2
3//! ```rust
4//! use xsd::{Type, Value};
5//! use xsd::primitive::{Boolean, Date, DateTime, Decimal, Double, Duration, Float, Time};
6//! ```
7
8#![no_std]
9#![deny(unsafe_code)]
10
11#[cfg(feature = "alloc")]
12extern crate alloc;
13
14/// The XSD namespace base URI (`http://www.w3.org/2001/XMLSchema#`).
15pub const BASE_URI: &'static str = "http://www.w3.org/2001/XMLSchema#";
16
17/// Rust types for representing values of XSD primitive datatypes.
18#[allow(unused_imports)]
19pub mod primitive {
20    mod boolean;
21    pub use boolean::*;
22
23    mod date;
24    pub use date::*;
25
26    mod datetime;
27    pub use datetime::*;
28
29    mod decimal;
30    pub use decimal::*;
31
32    mod double;
33    pub use double::*;
34
35    mod duration;
36    pub use duration::*;
37
38    mod float;
39    pub use float::*;
40
41    mod gday;
42    pub use gday::*;
43
44    mod gmonth;
45    pub use gmonth::*;
46
47    mod gmonthday;
48    pub use gmonthday::*;
49
50    mod gyear;
51    pub use gyear::*;
52
53    mod gyearmonth;
54    pub use gyearmonth::*;
55
56    mod string;
57    pub use string::*;
58
59    mod time;
60    pub use time::*;
61}
62
63/// Rust types for representing values of XSD derived datatypes.
64pub mod derived {
65    // TODO
66}
67
68mod decimal_type;
69pub use decimal_type::*;
70
71mod decimal_value;
72pub use decimal_value::*;
73
74mod parse;
75pub use parse::*;
76
77mod parse_error;
78pub use parse_error::*;
79
80mod primitive_type;
81pub use primitive_type::*;
82
83mod primitive_value;
84pub use primitive_value::*;
85
86mod r#type;
87pub use r#type::*;
88
89mod value;
90pub use value::*;
91
92#[doc = include_str!("../README.md")]
93#[cfg(doctest)]
94pub struct ReadmeDoctests;