[−][src]Trait json_ld::context::Context
JSON-LD active context.
An active context holds all the term definitions used to expand a JSON-LD value.
Associated Types
type LocalContext: Local<T>
The type of local contexts associated to this type of contexts.
Required methods
fn new(base_iri: Option<Iri>) -> Self
Create a newly-initialized active context with the given base IRI.
fn get(&self, term: &str) -> Option<&TermDefinition<T, Self>>
Get the definition of a term.
fn original_base_url(&self) -> Option<Iri>
Original base URL of the context.
fn base_iri(&self) -> Option<Iri>
Current base IRI of the context.
fn vocabulary(&self) -> Option<&Term<T>>
Optional vocabulary mapping.
fn default_language(&self) -> Option<&str>
Optional default language.
fn default_base_direction(&self) -> Option<Direction>
Optional default base direction.
fn previous_context(&self) -> Option<&Self>
Get the previous context.
fn definitions<'a>(
&'a self
) -> Box<dyn Iterator<Item = (&'a String, &'a TermDefinition<T, Self>)> + 'a>
&'a self
) -> Box<dyn Iterator<Item = (&'a String, &'a TermDefinition<T, Self>)> + 'a>
Provided methods
fn get_opt(&self, term: Option<&str>) -> Option<&TermDefinition<T, Self>>
Implementors
impl<T: Id> Context<T> for JsonContext<T>
[src]
type LocalContext = JsonValue
fn new(base_iri: Option<Iri>) -> JsonContext<T>
[src]
fn get(&self, term: &str) -> Option<&TermDefinition<T, Self>>
[src]
fn original_base_url(&self) -> Option<Iri>
[src]
fn base_iri(&self) -> Option<Iri>
[src]
fn vocabulary(&self) -> Option<&Term<T>>
[src]
fn default_language(&self) -> Option<&str>
[src]
fn default_base_direction(&self) -> Option<Direction>
[src]
fn previous_context(&self) -> Option<&Self>
[src]
fn definitions<'a>(
&'a self
) -> Box<dyn Iterator<Item = (&'a String, &'a TermDefinition<T, Self>)> + 'a>
[src]
&'a self
) -> Box<dyn Iterator<Item = (&'a String, &'a TermDefinition<T, Self>)> + 'a>