Enum json_ld::RemoteDocumentReference 
source · 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>
sourcepub fn iri(iri: I) -> RemoteDocumentReference<I, T>
 
pub fn iri(iri: I) -> RemoteDocumentReference<I, T>
Creates an IRI to a json_syntax::Value JSON document.
This method can replace RemoteDocumentReference::Iri to help the type
inference in the case where T = json_syntax::Value.
source§impl<I> RemoteDocumentReference<I>
 
impl<I> RemoteDocumentReference<I>
sourcepub async fn load_with<V>(
    self,
    vocabulary: &mut V,
    loader: &impl Loader,
) -> Result<RemoteDocument<I>, LoadError>
 
pub async fn load_with<V>( self, vocabulary: &mut V, loader: &impl Loader, ) -> Result<RemoteDocument<I>, LoadError>
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>(
    &self,
    vocabulary: &mut V,
    loader: &impl Loader,
) -> Result<Cow<'_, RemoteDocument<<V as IriVocabulary>::Iri>>, LoadError>
 
pub async fn loaded_with<V>( &self, vocabulary: &mut V, loader: &impl Loader, ) -> Result<Cow<'_, RemoteDocument<<V as IriVocabulary>::Iri>>, LoadError>
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>(
    self,
    vocabulary: &mut V,
    loader: &L,
) -> Result<RemoteDocument<I, Context>, ContextLoadError>
 
pub async fn load_context_with<V, L>( self, vocabulary: &mut V, loader: &L, ) -> Result<RemoteDocument<I, Context>, ContextLoadError>
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>(
    &self,
    vocabulary: &mut V,
    loader: &L,
) -> Result<Cow<'_, RemoteDocument<I, Context>>, ContextLoadError>
 
pub async fn loaded_context_with<V, L>( &self, vocabulary: &mut V, loader: &L, ) -> Result<Cow<'_, RemoteDocument<I, Context>>, ContextLoadError>
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.
Trait Implementations§
source§impl<I, T> Clone for RemoteDocumentReference<I, T>
 
impl<I, T> Clone for RemoteDocumentReference<I, T>
source§fn clone(&self) -> RemoteDocumentReference<I, T>
 
fn clone(&self) -> RemoteDocumentReference<I, T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl<I> JsonLdProcessor<I> for RemoteDocumentReference<I, Value>
 
impl<I> JsonLdProcessor<I> for RemoteDocumentReference<I, Value>
source§async fn compare_full<'a, N>(
    &'a self,
    other: &'a Self,
    vocabulary: &'a mut N,
    loader: &'a impl Loader,
    options: Options<I>,
    warnings: impl 'a + WarningHandler<N> + WarningHandler<N>,
) -> CompareResult
 
async fn compare_full<'a, N>( &'a self, other: &'a Self, vocabulary: &'a mut N, loader: &'a impl Loader, options: Options<I>, warnings: impl 'a + WarningHandler<N> + WarningHandler<N>, ) -> CompareResult
other with a custom vocabulary using the
given options and warnings handler. Read moresource§async fn expand_full<'a, N>(
    &'a self,
    vocabulary: &'a mut N,
    loader: &'a impl Loader,
    options: Options<I>,
    warnings: impl 'a + WarningHandler<N> + WarningHandler<N>,
) -> ExpandResult<I, N::BlankId>
 
async fn expand_full<'a, N>( &'a self, vocabulary: &'a mut N, loader: &'a impl Loader, options: Options<I>, warnings: impl 'a + WarningHandler<N> + WarningHandler<N>, ) -> ExpandResult<I, N::BlankId>
vocabulary and loader, using
the given options and warning handler. Read moreasync fn into_document_full<'a, N>( self, vocabulary: &'a mut N, loader: &'a impl Loader, options: Options<I>, warnings: impl 'a + WarningHandler<N> + WarningHandler<N>, ) -> IntoDocumentResult<I, N::BlankId>
source§async fn compact_full<'a, N>(
    &'a self,
    vocabulary: &'a mut N,
    context: RemoteContextReference<I>,
    loader: &'a impl Loader,
    options: Options<I>,
    warnings: impl 'a + WarningHandler<N> + WarningHandler<N>,
) -> CompactResult
 
async fn compact_full<'a, N>( &'a self, vocabulary: &'a mut N, context: RemoteContextReference<I>, loader: &'a impl Loader, options: Options<I>, warnings: impl 'a + WarningHandler<N> + WarningHandler<N>, ) -> CompactResult
context with the given vocabulary
and loader, using the given options and warning handler. Read moresource§async fn flatten_full<'a, N>(
    &'a self,
    vocabulary: &'a mut N,
    generator: &'a mut impl Generator<N>,
    context: Option<RemoteContextReference<I>>,
    loader: &'a impl Loader,
    options: Options<I>,
    warnings: impl 'a + WarningHandler<N> + WarningHandler<N>,
) -> FlattenResult<I, N::BlankId>
 
async fn flatten_full<'a, N>( &'a self, vocabulary: &'a mut N, generator: &'a mut impl Generator<N>, context: Option<RemoteContextReference<I>>, loader: &'a impl Loader, options: Options<I>, warnings: impl 'a + WarningHandler<N> + WarningHandler<N>, ) -> FlattenResult<I, N::BlankId>
vocabulary, generator
and loader, using the given options and warning handler. Read moreAuto Trait Implementations§
impl<I, T> Freeze for RemoteDocumentReference<I, T>
impl<I, T> RefUnwindSafe for RemoteDocumentReference<I, T>where
    I: RefUnwindSafe,
    T: RefUnwindSafe,
impl<I, T> Send for RemoteDocumentReference<I, T>
impl<I, T> Sync for RemoteDocumentReference<I, T>
impl<I, T> Unpin for RemoteDocumentReference<I, T>
impl<I, T> UnwindSafe for RemoteDocumentReference<I, T>where
    I: UnwindSafe,
    T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
source§impl<T> BorrowUnordered for T
 
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
 
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)