Crate oxsdatatypessource ·
oxsdatatypes is an implementation of some XML Schema Definition Language Datatypes. Its main aim is to ease the implementation of SPARQL and XPath.
use std::str::FromStr; use oxsdatatypes::Decimal; assert!(Decimal::from_str("22.2").unwrap() > Decimal::from_str("21").unwrap());
Each datatype is represented by a Rust struct.
Each datatype provides:
FromStrimplementation to parse a datatype string serialization following its lexical mapping.
Displayimplementation to serialize a datatype following its canonical mapping.
is_identical_withmethod following its identity relation.
Eqif possible, implementations following its equality relation.
Ordif possible, implementations following its order relation.
TryFromimplementations to implement XPath casting.
- Various methods implementing XPath functions.
to_be_bytesmethods for serialization.
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or
- MIT license (LICENSE-MIT or
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.