Trait json_ld_compaction::EmbedContext

source ·
pub trait EmbedContext {
    // Required method
    fn embed_context<N>(
        &mut self,
        vocabulary: &N,
        context: ProcessedRef<'_, '_, N::Iri, N::BlankId>,
        options: Options,
    ) -> Result<(), IriConfusedWithPrefix>
       where N: Vocabulary,
             N::Iri: Clone + Hash + Eq,
             N::BlankId: Clone + Hash + Eq;
}
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§

source

fn embed_context<N>( &mut self, vocabulary: &N, context: ProcessedRef<'_, '_, N::Iri, N::BlankId>, options: Options, ) -> Result<(), IriConfusedWithPrefix>
where N: Vocabulary, N::Iri: Clone + Hash + Eq, N::BlankId: Clone + Hash + Eq,

Embeds the given context into the document.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl EmbedContext for Value

source§

fn embed_context<N>( &mut self, vocabulary: &N, context: ProcessedRef<'_, '_, N::Iri, N::BlankId>, options: Options, ) -> Result<(), IriConfusedWithPrefix>
where N: Vocabulary, N::Iri: Clone + Hash + Eq, N::BlankId: Clone + Hash + Eq,

Implementors§