Module term

Source
Expand description

I define how RDF terms (such as IRIs, blank nodes and literals) are represented in Sophia.

I provide the main trait Term, and a number of auxiliary types and traits, such as TermKind, FromTerm

Re-exports§

pub use bnode_id::BnodeId;
pub use language_tag::LanguageTag;
pub use var_name::VarName;

Modules§

bnode_id
I define the BnodeId wrapper type, which guarantees that the underlying str satisfies the BLANK_NODE_LABEL rule in Turtle (without the leading _:).
language_tag
I define the LanguageTag wrapper type, which guarantees that the underlying str is a valid BCP47 language tag.
matcher
I define generic traits and default implementations for matchers, objects that can be used to match zero, one or several terms.
var_name
I define the VarName wrapper type, which guarantees that the underlying str satisfies the VARNAME rule in SPARQL.

Structs§

CmpTerm
A wrapper for any term type that ensures comparability

Enums§

SimpleTerm
A straighforward implementation of Term as an enum.
TermKind
The different kinds of terms that a Term can represent.

Traits§

FromTerm
A type that can be built from any term.
Term
A generalized RDF term.
TryFromTerm
A type that can be built from some terms.

Functions§

assert_consistent_term_impl
Test that the given term is consistent in its implementation of the Term trait.
graph_name_eq
Determines if two GraphNames represent the same RDF term.

Type Aliases§

GraphName
A GraphName is an optional Term, used to name a graph in an RDF dataset.
IriRef
This type is aliased from sophia_iri for convenience, as it is required to implement Term.