XSD.rs: XML Schema for Rust
XSD.rs is a Rust implementation of the XML Schema datatypes.
[!TIP] 🚧 We are building in public. This is presently under heavy construction.
[Features] | [Prerequisites] | [Installation] | [Examples] | [Reference] | [Development]
✨ Features
- 100% pure and safe Rust with minimal dependencies and no bloat.
- Supports
no_stdenvironments from the get-go. - Supports opting out of any feature using comprehensive feature flags.
- Adheres to the Rust API Guidelines in its naming conventions.
- Cuts red tape: 100% free and unencumbered public domain software.
🛠️ Prerequisites
- Rust 1.85+ (2024 edition)
⬇️ Installation
Installation via Cargo
Installation in Cargo.toml
Enable all default features:
[]
= { = "0.3" }
Enable only specific features:
[]
= { = "0.3", = false, = ["alloc"] }
👉 Examples
Importing the Library
use ;
use ;
Parsing XSD Literals
#
Constructing XSD Values
let value: Value = "Hello, world!".into;
let value: Value = true.into;
let value: Value = 3.1415.into;
let value: Value = 42.into;
Matching XSD Values
use *;
let value = parse.unwrap;
match value
Matching XSD Decimals
use *;
let value = parse.unwrap;
match value.as_decimal
📚 Reference
👨💻 Development