pub struct Context {
pub ns: Option<String>,
pub lang: String,
pub prefixes: BTreeMap<String, String>,
pub aliases: BTreeMap<String, String>,
pub container: BTreeMap<String, String>,
}
Expand description
Structure holding the current context to interpret a document with.
An instance of this struct is part of the Processor
, which can be modified to provide an
external context to interpret documents with. Such a custom context can also be created from
JSON using one of the From
implementations.
Fields§
§ns: Option<String>
The default namespace, for properties that are not a keyword, CURIE, or IRI.
lang: String
The Default language for internationalised properties that don’t specify one. The empty string when not defined.
prefixes: BTreeMap<String, String>
Map of defined CURIE prefixes to their base IRIs.
aliases: BTreeMap<String, String>
Map of defined aliases by their literal property names.
container: BTreeMap<String, String>
Map of defined container mappings by their literal property names.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more