Skip to main content

Dereference

Trait Dereference 

Source
pub trait Dereference: Loader {
    // Required method
    fn dereference<V>(
        &self,
        vocabulary: &mut V,
        url: V::Iri,
    ) -> impl Future<Output = LoadingResult<V::Iri, Self::Error>>
       where V: IriVocabularyMut,
             V::Iri: Clone + Eq + Hash;
}
Expand description

Dereferencing a document through a Loader on sufficient native stack.

Implemented for every loader; an algorithm calls Self::dereference where the JSON-LD 1.1 API invokes the LoadDocumentCallback.

Required Methods§

Source

fn dereference<V>( &self, vocabulary: &mut V, url: V::Iri, ) -> impl Future<Output = LoadingResult<V::Iri, Self::Error>>
where V: IriVocabularyMut, V::Iri: Clone + Eq + Hash,

Loads the document behind url, using vocabulary, polling the loader on at least RED_ZONE of native stack.

§Errors

Returns the loader’s error when the document cannot be fetched or parsed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<L: Loader + ?Sized> Dereference for L