Struct json_ld_context_processing::Context
source · [−]pub struct Context<T, B, L, M> { /* private fields */ }
Expand description
JSON-LD context.
Implementations
sourceimpl<T, B, L, M> Context<T, B, L, M>
impl<T, B, L, M> Context<T, B, L, M>
pub fn new(base_iri: Option<T>) -> Context<T, B, L, M>where
T: Clone,
pub fn get<Q>(&self, term: &Q) -> Option<TermDefinitionRef<'_, T, B, L, M>>where
Key: Borrow<Q>,
KeywordType: Borrow<Q>,
Q: Hash + Eq + ?Sized,
pub fn get_normal<Q>(
&self,
term: &Q
) -> Option<&NormalTermDefinition<T, B, L, M>>where
Key: Borrow<Q>,
Q: Hash + Eq + ?Sized,
pub fn get_type(&self) -> Option<&TypeTermDefinition>
pub fn contains_key<Q>(&self, term: &Q) -> boolwhere
Key: Borrow<Q>,
KeywordType: Borrow<Q>,
Q: Hash + Eq + ?Sized,
pub fn original_base_url(&self) -> Option<&T>
pub fn base_iri(&self) -> Option<&T>
pub fn vocabulary(&self) -> Option<&Term<T, B>>
pub fn default_language(&self) -> Option<LenientLanguageTag<'_>>
pub fn default_base_direction(&self) -> Option<Direction>
pub fn previous_context(&self) -> Option<&Context<T, B, L, M>>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn definitions(&self) -> &Definitions<T, B, L, M>
sourcepub fn has_protected_items(&self) -> bool
pub fn has_protected_items(&self) -> bool
Checks if the context has a protected definition.
pub fn inverse(&self) -> &InverseContext<T, B>where
T: Clone + Hash + Eq,
B: Clone + Hash + Eq,
pub fn set_normal(
&mut self,
key: Key,
definition: Option<NormalTermDefinition<T, B, L, M>>
) -> Option<NormalTermDefinition<T, B, L, M>>
pub fn set_type(
&mut self,
type_: Option<TypeTermDefinition>
) -> Option<TypeTermDefinition>
pub fn set_base_iri(&mut self, iri: Option<T>)
pub fn set_vocabulary(&mut self, vocab: Option<Term<T, B>>)
pub fn set_default_language(&mut self, lang: Option<LenientLanguageTagBuf>)
pub fn set_default_base_direction(&mut self, dir: Option<Direction>)
pub fn set_previous_context(&mut self, previous: Context<T, B, L, M>)
pub fn into_syntax_definition(
self,
vocabulary: &impl Vocabulary<Iri = T, BlankId = B>,
meta: M
) -> Meta<Definition<M, Value<M>>, M>where
L: IntoSyntax<T, B, M>,
M: Clone,
Trait Implementations
sourceimpl<T, B, M, L> IntoSyntax<T, B, M> for Context<T, B, L, M>where
M: Clone,
L: IntoSyntax<T, B, M>,
impl<T, B, M, L> IntoSyntax<T, B, M> for Context<T, B, L, M>where
M: Clone,
L: IntoSyntax<T, B, M>,
fn into_syntax(
self,
vocabulary: &impl Vocabulary<Iri = T, BlankId = B>,
meta: M
) -> Value<M>
Auto Trait Implementations
impl<T, B, L, M> RefUnwindSafe for Context<T, B, L, M>where
B: UnwindSafe + RefUnwindSafe,
L: RefUnwindSafe,
M: RefUnwindSafe,
T: UnwindSafe + RefUnwindSafe,
impl<T, B, L, M> Send for Context<T, B, L, M>where
B: Send,
L: Send,
M: Send,
T: Send,
impl<T, B, L, M> Sync for Context<T, B, L, M>where
B: Send + Sync,
L: Sync,
M: Sync,
T: Send + Sync,
impl<T, B, L, M> Unpin for Context<T, B, L, M>where
B: Unpin,
L: Unpin,
M: Unpin,
T: Unpin,
impl<T, B, L, M> UnwindSafe for Context<T, B, L, M>where
B: UnwindSafe,
L: UnwindSafe,
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more