pub enum RemoteDocumentReference<I = IriBuf, T = Value> {
Iri(I),
Loaded(RemoteDocument<I, T>),
}Expand description
Remote document, loaded or not.
Either an IRI or the actual document content.
Variants§
Implementations§
source§impl<I, T> RemoteDocumentReference<I, T>
impl<I, T> RemoteDocumentReference<I, T>
source§impl<I> RemoteDocumentReference<I>
impl<I> RemoteDocumentReference<I>
sourcepub async fn load_with<V, L: Loader<I>>(
self,
vocabulary: &mut V,
loader: &mut L
) -> Result<RemoteDocument<I>, L::Error>where
V: IriVocabularyMut<Iri = I>,
pub async fn load_with<V, L: Loader<I>>(
self,
vocabulary: &mut V,
loader: &mut L
) -> Result<RemoteDocument<I>, L::Error>where
V: IriVocabularyMut<Iri = I>,
Loads the remote document with the given vocabulary and loader.
If the document is already Self::Loaded, simply returns the inner
RemoteDocument.
sourcepub async fn loaded_with<V, L: Loader<I>>(
&self,
vocabulary: &mut V,
loader: &mut L
) -> Result<Cow<'_, RemoteDocument<I>>, L::Error>where
V: IriVocabularyMut<Iri = I>,
I: Clone,
pub async fn loaded_with<V, L: Loader<I>>(
&self,
vocabulary: &mut V,
loader: &mut L
) -> Result<Cow<'_, RemoteDocument<I>>, L::Error>where
V: IriVocabularyMut<Iri = I>,
I: Clone,
Loads the remote document with the given vocabulary and loader.
For Self::Iri returns an owned RemoteDocument with
Cow::Owned.
For Self::Loaded returns a reference to the inner RemoteDocument
with Cow::Borrowed.
source§impl<I> RemoteDocumentReference<I, Context>
impl<I> RemoteDocumentReference<I, Context>
sourcepub async fn load_context_with<V, L: Loader<I>>(
self,
vocabulary: &mut V,
loader: &mut L
) -> Result<RemoteContext<I>, ContextLoadError<L::Error>>where
V: IriVocabularyMut<Iri = I>,
pub async fn load_context_with<V, L: Loader<I>>(
self,
vocabulary: &mut V,
loader: &mut L
) -> Result<RemoteContext<I>, ContextLoadError<L::Error>>where
V: IriVocabularyMut<Iri = I>,
Loads the remote context with the given vocabulary and loader.
If the context is already Self::Loaded, simply returns the inner
RemoteContext.
sourcepub async fn loaded_context_with<V, L: Loader<I>>(
&self,
vocabulary: &mut V,
loader: &mut L
) -> Result<Cow<'_, RemoteContext<I>>, ContextLoadError<L::Error>>where
V: IriVocabularyMut<Iri = I>,
I: Clone,
pub async fn loaded_context_with<V, L: Loader<I>>(
&self,
vocabulary: &mut V,
loader: &mut L
) -> Result<Cow<'_, RemoteContext<I>>, ContextLoadError<L::Error>>where
V: IriVocabularyMut<Iri = I>,
I: Clone,
Loads the remote context with the given vocabulary and loader.
For Self::Iri returns an owned RemoteContext with
Cow::Owned.
For Self::Loaded returns a reference to the inner RemoteContext
with Cow::Borrowed.