pub trait JsonLdLoader {
// Required method
fn load(&self, url: &Iri) -> Result<JsonLdDocument, JsonLdLoadError>;
// Provided methods
fn as_async_loader(&self) -> &ToAsyncJsonLdLoader<Self> { ... }
fn into_async_loader(self) -> ToAsyncJsonLdLoader<Self>
where Self: Sized { ... }
}Required Methods§
Sourcefn load(&self, url: &Iri) -> Result<JsonLdDocument, JsonLdLoadError>
fn load(&self, url: &Iri) -> Result<JsonLdDocument, JsonLdLoadError>
Loads the document behind the given IRI.
Provided Methods§
Sourcefn as_async_loader(&self) -> &ToAsyncJsonLdLoader<Self>
fn as_async_loader(&self) -> &ToAsyncJsonLdLoader<Self>
Returns this loader as an AsyncJsonLdLoader.
Sourcefn into_async_loader(self) -> ToAsyncJsonLdLoader<Self>where
Self: Sized,
fn into_async_loader(self) -> ToAsyncJsonLdLoader<Self>where
Self: Sized,
Turns this loader into an async loader.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl JsonLdLoader for BTreeMap<IriBuf, JsonLdDocument>
impl JsonLdLoader for BTreeMap<IriBuf, JsonLdDocument>
fn load(&self, url: &Iri) -> Result<JsonLdDocument, JsonLdLoadError>
Source§impl JsonLdLoader for HashMap<IriBuf, JsonLdDocument>
impl JsonLdLoader for HashMap<IriBuf, JsonLdDocument>
fn load(&self, url: &Iri) -> Result<JsonLdDocument, JsonLdLoadError>
Source§impl<L: JsonLdLoader, F: FnOnce() -> L> JsonLdLoader for LazyLock<L, F>
Lazily initialized loader, e.g. a static map of pre-loaded documents.
impl<L: JsonLdLoader, F: FnOnce() -> L> JsonLdLoader for LazyLock<L, F>
Lazily initialized loader, e.g. a static map of pre-loaded documents.