iri_s

The iri_s crate contains a simple wrapper to work with IRIs (Internationalized Resource Identifiers). The main goal is that we can use a simple interface to work with IRIs without having to deal with the complexity of the underlying implementation. This allows us to easily switch between different IRI implementations if needed.

Usage

For example, we can create IRIs from URLs, Paths or Strings:

#![allow(unused)]
fn main() {
use iri_s::IriS;

let iri2 = IriS::from_str_base("https://example.org/name", None).unwrap();
println!("IRI: {}", iri.as_str());
}

Or extend a base IRI with a suffix:

#![allow(unused)]
fn main() {
use iri_s::IriS;

let iri2 = IriS::from_str_base("https://example.org/name", None).unwrap();
let extended = base.extend("subrecurso").unwrap();
println!("IRI extendido: {}", extended.as_str());
}

Dependents and dependencies

This create depends mostly on the oxiri and oxrdf crates.

This create is also used by other rudof modules that needs IRIs functionality, such as:

Documentation

The crate documentation can be found here.