pub trait Context<T: Id = IriBuf>: Clone {
    type LocalContext: Local<T>;
    fn new(base_iri: Option<Iri<'_>>) -> Self;
fn get(&self, term: &str) -> Option<&TermDefinition<T, Self>>;
fn original_base_url(&self) -> Option<Iri<'_>>;
fn base_iri(&self) -> Option<Iri<'_>>;
fn vocabulary(&self) -> Option<&Term<T>>;
fn default_language(&self) -> Option<LenientLanguageTag<'_>>;
fn default_base_direction(&self) -> Option<Direction>;
fn previous_context(&self) -> Option<&Self>;
fn definitions<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = (&'a String, &'a TermDefinition<T, Self>)> + 'a>; fn get_opt(&self, term: Option<&str>) -> Option<&TermDefinition<T, Self>> { ... }
fn contains(&self, term: &str) -> bool { ... } }
Expand description

JSON-LD context.

A context holds all the term definitions used to expand a JSON-LD value.

Associated Types

The type of local contexts associated to this type of contexts.

Required methods

Create a newly-initialized active context with the given base IRI.

Get the definition of a term.

Original base URL of the context.

Current base IRI of the context.

Optional vocabulary mapping.

Optional default language.

Optional default base direction.

Get the previous context.

Provided methods

Implementors