Trait json_ld_core::loader::ContextLoader
source · pub trait ContextLoader<I, M> {
type Context;
type ContextError;
// Required method
fn load_context_with<'a>(
&'a mut self,
vocabulary: &'a mut impl Send + Sync + IriVocabularyMut<Iri = I>,
url: I
) -> BoxFuture<'a, LoadingResult<I, M, Self::Context, Self::ContextError>>
where I: 'a,
M: 'a;
// Provided method
fn load_context<'a>(
&'a mut self,
url: I
) -> BoxFuture<'a, LoadingResult<I, M, Self::Context, Self::ContextError>>
where I: 'a,
M: 'a,
(): IriVocabulary<Iri = I> { ... }
}
Expand description
Context document loader.
This is a subclass of loaders able to extract a local context from a loaded JSON-LD document.
It is implemented for any loader where the output type implements
ExtractContext
.
Required Associated Types§
sourcetype ContextError
type ContextError
Error type.
Required Methods§
sourcefn load_context_with<'a>(
&'a mut self,
vocabulary: &'a mut impl Send + Sync + IriVocabularyMut<Iri = I>,
url: I
) -> BoxFuture<'a, LoadingResult<I, M, Self::Context, Self::ContextError>>where
I: 'a,
M: 'a,
fn load_context_with<'a>( &'a mut self, vocabulary: &'a mut impl Send + Sync + IriVocabularyMut<Iri = I>, url: I ) -> BoxFuture<'a, LoadingResult<I, M, Self::Context, Self::ContextError>>where I: 'a, M: 'a,
Loads the context behind the given IRI, using the given vocabulary.
Provided Methods§
sourcefn load_context<'a>(
&'a mut self,
url: I
) -> BoxFuture<'a, LoadingResult<I, M, Self::Context, Self::ContextError>>where
I: 'a,
M: 'a,
(): IriVocabulary<Iri = I>,
fn load_context<'a>( &'a mut self, url: I ) -> BoxFuture<'a, LoadingResult<I, M, Self::Context, Self::ContextError>>where I: 'a, M: 'a, (): IriVocabulary<Iri = I>,
Loads the context behind the given IRI.