EmbedContext

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§