Expand description
Core types shared by the JSON-LD processing algorithms.
This crate defines the data model the algorithm crates operate on — the
processed Context, the Object tree an expanded document is made
of, ExpandedDocument and FlattenedDocument, and the Loader
trait used to dereference remote contexts — together with the conversions
to RDF (rdf) and the pretty-printer (print).
Identifiers are generic over the vocabulary that interns them: T is an
IRI handle and B a blank node identifier handle, defaulting to owned
iri_rs::IriBuf and rdfx::BlankIdBuf values.
Most users should depend on the jsonld umbrella crate rather than on
this one directly; it re-exports everything here alongside the algorithms.
Re-exports§
pub use context::Context;pub use context::ContextRef;pub use flattening::Flatten;pub use object::IndexedNode;pub use object::IndexedObject;pub use object::Node;pub use object::NodeParts;pub use object::Nodes;pub use object::Object;pub use object::Objects;pub use object::TryFromJson;pub use object::Value;pub use quad::LdQuads;pub use rdf::RdfQuads;pub use id::*;pub use loader::*;
Modules§
- context
- Context processing algorithm and related types.
- expanded
- Expanded documents.
- flattened
- Flattened documents.
- flattening
- Flattening algorithm and related types.
- id
- Node identifiers, valid or not.
- loader
- Document loaders.
- object
- Nodes, lists and values.
- Pretty-printing of JSON-LD documents. Pretty-printing of expanded documents through a vocabulary.
- quad
- RDF quads of an expanded document.
- rdf
- Conversion of expanded JSON-LD documents to RDF, and the well-known IRI constants the conversion needs.
- utils
- Utility functions.
- warning
- Warnings raised by the algorithms.
Structs§
- Document
- JSON-LD document in both compact and expanded form.
- Environment
- Vocabulary, loader and warning handler an algorithm runs against.
- Expanded
Document - Result of the document expansion algorithm: a set of (indexed) objects.
- Indexed
- Indexed objects.
- Invalid
Lang String - Raised when something tried to build a language string without language tag or direction.
- LangStr
- Language string reference.
- Lang
String - Language string.
- Lenient
Lang Tag - Language tag that may not be well-formed.
- Lenient
Lang TagBuf - Owned language tag that may not be well-formed.
- Missing
Lang Qualifier - Raised when a
LangStringmutation would leave it without both a language tag and a direction. - Unknown
Processing Mode - Error raised when parsing an unknown processing-mode name.
Enums§
- Container
- Container mapping of a term: the combination of
@containervalues it was defined with. - Container
Kind - A single
@containervalue. - Direction
- Internationalized string direction.
- Expanded
Json Text Error - Error reading an expanded document from its JSON text.
- Nullable
- Value that can be
null. - Processing
Mode - Processing mode.
- Serialization
Error - Term
- Identifier, keyword or
@null. - Type
- Object type.
Traits§
- Print methods.
Type Aliases§
- Default
Build Hasher gxhash - Hasher used by the collections of this crate.
- Document
Parts - Remote document paired with its expanded form.
- Flattened
Document - Result of the document flattening algorithm.
- HashMap
- Hash map using
DefaultBuildHasher. - HashSet
- Hash set using
DefaultBuildHasher. - Index
Map - Insertion-ordered map using
DefaultBuildHasher. - Index
Set - Insertion-ordered set using
DefaultBuildHasher.