Module prefix

Source
Expand description

RDF-related languages (e.g. Turtle, SPARQL) often use prefixes to shorten IRIs. This crate provides generic traits and types to handle prefix maps.

Structs§

InvalidPrefix
This error is raised when trying to parse an invalid IRI.
Prefix
See Prefix::new.

Traits§

AsPrefix
Automatic trait for IsPrefix, providing cheap conversion to Prefix.
IsPrefix
Marker trait guaranteeing that the underlying str is a valid Turtle/SPARQL prefix.
PrefixMap
A prefix map associates prefixes to namespaces.

Functions§

is_valid_prefix
Check whether a str is a valid Turtle/SPARQL prefix (matches ON_PREFIX)

Type Aliases§

PrefixMapPair
Type alias for the return type of PrefixMap::to_vec.