pub trait Loader {
type Document: Json;
fn id(&self, iri: Iri<'_>) -> Option<Id>;
fn iri(&self, id: Id) -> Option<Iri<'_>>;
fn load<'a>(
&'a mut self,
url: Iri<'_>
) -> BoxFuture<'a, Result<RemoteDocument<Self::Document>, Error>>;
fn id_opt(&self, iri: Option<Iri<'_>>) -> Option<Id> { ... }
}
Expand description
JSON document loader.
Each document is uniquely identified by the loader by a u32
.
Associated Types
Required methods
Returns the unique identifier associated to the given IRI, if any.