RDFtk: IRI
Another implementation of the IRI and URI specifications.
As with the rest of the RDFtk project the aim of this crate is usability over optimization and so it may perform
more clones than necessary and parse more slowly than could be the case. For the most part clients should use the
IRIRef type that is an Arc reference and so can be reused without cloning the whole IRI value.
Example
The most common use is the parsing of an IRI value from a string.
use IRI;
use from_str;
let result = IRIfrom_str;
The builder module allows for more programmatic construction of IRIs.
use ;
use IriBuilder;
let mut builder = default;
let result: = builder
.scheme
.user_name
.host?
.port
.path_str?
.query_str?
.fragment_str?
.try_into;
Note also the use of Scheme::https(), both the Scheme and Port types include associated functions
to construct well-known values.
Features
The following features are present in this crate.
builder[default] -- include thebuildermodule, which in turn includes theIriBuildertype.path_iri[default] -- provides an implementation ofTryFrom<&PathBuf>andTryFrom<PathBuf>forIRI.uuid_iri[default] -- provides an implementation ofTryFrom<&Uuid>andTryFrom<Uuid>forIRI.
Changes
Version 0.1.2
- Mostly documentation additions.
- Adding test cases where possible.
- Added helper functions and API shortcuts where they make sense.
- Added
path_irianduuid_irifeatures.
Version 0.1.1
- Added
IRIReftype.
Version 0.1.0
- First release.