Trait json_ld_compaction::EmbedContext
source · [−]pub trait EmbedContext<I, B, C, M> {
fn embed_context<N>(
&mut self,
vocabulary: &N,
context: ProcessedRef<'_, '_, I, B, C, M>,
options: Options
) -> Result<(), Meta<IriConfusedWithPrefix, M>>
where
N: Vocabulary<Iri = I, BlankId = B>,
I: Clone + Hash + Eq,
B: Clone + Hash + Eq,
M: Clone,
C: Clone + IntoJsonMeta<M>;
}Expand description
Context embeding method.
This trait provides the embed_context method that can be used
to include a JSON-LD context to a JSON-LD document.
It is used at the end of compaction algorithm to embed to
context used to compact the document into the compacted output.
Required Methods
sourcefn embed_context<N>(
&mut self,
vocabulary: &N,
context: ProcessedRef<'_, '_, I, B, C, M>,
options: Options
) -> Result<(), Meta<IriConfusedWithPrefix, M>>where
N: Vocabulary<Iri = I, BlankId = B>,
I: Clone + Hash + Eq,
B: Clone + Hash + Eq,
M: Clone,
C: Clone + IntoJsonMeta<M>,
fn embed_context<N>(
&mut self,
vocabulary: &N,
context: ProcessedRef<'_, '_, I, B, C, M>,
options: Options
) -> Result<(), Meta<IriConfusedWithPrefix, M>>where
N: Vocabulary<Iri = I, BlankId = B>,
I: Clone + Hash + Eq,
B: Clone + Hash + Eq,
M: Clone,
C: Clone + IntoJsonMeta<M>,
Embeds the given context into the document.