Skip to main content

Crate rdf_model

Crate rdf_model 

Source
Expand description

RDF.rs is a Rust framework for working with RDF knowledge graphs.

§Features

With defaults disabled, generic terms, triples/quads, and pattern types need neither this crate’s alloc nor std feature. alloc exposes HeapTerm, CowTerm, datatypes, and boxed iterator/source abstractions. serde and borsh imply alloc; ecosystem integrations (oxrdf, bson, json-ld, rudof, sophia) imply std. datetime and decimal forward XSD features. Pattern matching uses borrowed, explicitly comparable terms and works without alloc. In graph patterns, None is a wildcard and DEFAULT_GRAPH selects the default graph.

§Examples

use rdf_model::*;

Modules§

interop
Interoperability with other Rust libraries.

Structs§

AnyStatement
AnyTerm
DefaultGraph
An allocation-free singleton denoting the default graph.
Quad
A quad statement.
QuadPattern
A quad statement pattern.
Triple
A triple statement.
TriplePattern
A triple statement pattern.

Enums§

BaseDirection
A base direction for directional language-tagged strings.
Cow
A clone-on-write smart pointer.
CowTermalloc
A clone-on-write term.
Datatypealloc
A datatype.
HeapTermalloc
A heap-allocated term.
StatementSlot
A slot in a statement (subject, predicate, object, or context).
TermKind
The kind of an RDF term or the distinguished default-graph marker.

Constants§

DEFAULT_GRAPH
The singleton default-graph marker.
DEFAULT_GRAPH_URN
The reserved default-graph identifier for term-only external protocols.
QUAD_SLOTS
RDFS_LABELalloc
RDF_TYPEalloc
SAMPLE_LITERALalloc
A sample plain literal term.
SAMPLE_QUADalloc
A sample quad.
SAMPLE_RESOURCEalloc
A sample resource term.
SAMPLE_TRIPLEalloc
A sample triple.
TRIPLE_SLOTS

Statics§

EMPTY_COW_QUAD_PATTERNalloc
EMPTY_COW_TRIPLE_PATTERNalloc
EMPTY_HEAP_QUAD_PATTERNalloc
EMPTY_HEAP_TRIPLE_PATTERNalloc
FEATURES
The set of features that are enabled in this build of the crate.

Traits§

Countable
A trait for collections that are countable.
Datasetalloc
An RDF dataset.
Documentalloc
An RDF document.
Enumerablealloc
Graphalloc
An RDF graph.
MaybeCountable
Optional collection counts, available without alloc or std.
MaybeDurable
MaybeIndexed
MaybeMutable
Queryablealloc
Sourcealloc
An RDF source.
Statement
An RDF statement.
StatementPattern
An RDF statement pattern.
Term
An RDF term or the distinguished default-graph marker used in graph slots.
ToOwned
A generalization of Clone to borrowed data.
Vocabulary
An RDF vocabulary.

Type Aliases§

AnyQuad
AnyTriple
CowQuadalloc
A clone-on-write quad statement.
CowQuadPatternalloc
A clone-on-write quad statement pattern.
CowQuadSetalloc
A heap-allocated set of quad statements.
CowTriplealloc
A clone-on-write triple statement.
CowTriplePatternalloc
A clone-on-write triple statement pattern.
CowTripleSetalloc
A heap-allocated set of triple statements.
HeapQuadalloc
A heap-allocated quad statement.
HeapQuadPatternalloc
A heap-allocated quad statement pattern.
HeapQuadSetalloc
A heap-allocated set of quad statements.
HeapTriplealloc
A heap-allocated triple statement.
HeapTriplePatternalloc
A heap-allocated triple statement pattern.
HeapTripleSetalloc
A heap-allocated set of triple statements.
QuadSlot
TripleSlot