RDFtk: IRI

iri This crate provides an implementation of the IRI and URI specifications.

crates.io docs.rs

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.

```rust use field33rdftkiritemporaryfork::IRI; use std::convert::from_str;

let result = IRI::from_str( "https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top", ); ```

The builder module allows for more programmatic construction of IRIs.

```rust use field33rdftkiritemporaryfork::{IRI, Scheme}; use field33rdftkiritemporaryfork::builder::IriBuilder;

let mut builder = IriBuilder::default(); let result: IriResult = builder .scheme(&Scheme::https()) .username("john.doe") .host("www.example.com")? .port(123.into()) .pathstr("/forum/questions/")? .querystr("tag=networking&order=newest")? .fragmentstr("top")? .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.

Changes

Version 0.1.9

Version 0.1.8

Version 0.1.7

Version 0.1.6

Version 0.1.5

Version 0.1.4

Version 0.1.3

Version 0.1.2

Version 0.1.1

Version 0.1.0

TODO

  1. Complete IRI normalization
  2. Complete IRI resolver
  3. Complete IRI relativizer

RDF