pub enum RemoteDocumentReference<I = Index, M = Location<I, Span>, T = Value<M>> {
    Iri(I),
    Loaded(RemoteDocument<I, M, T>),
}
Expand description

Remote document, loaded or not.

Either an IRI or the actual document content.

Variants§

§

Iri(I)

IRI to the remote document.

§

Loaded(RemoteDocument<I, M, T>)

Remote document content.

Implementations§

Creates an IRI to a json_syntax::Value<M> JSON document.

This method can replace RemoteDocumentReference::Iri to help the type inference in the case where T = json_syntax::Value<M>.

Creates an IRI to a json_ld_syntax::context::Value<M> JSON-LD context document.

This method can replace RemoteDocumentReference::Iri to help the type inference in the case where T = json_ld_syntax::context::Value<M>.

Loads the remote document with the given vocabulary and loader.

If the document is already Self::Loaded, simply returns the inner RemoteDocument.

Loads the remote document with the given vocabulary and loader.

For Self::Iri returns an owned RemoteDocument with [Mown::Owned]. For Self::Loaded returns a reference to the inner RemoteDocument with [Mown::Borrowed].

Loads the remote context definition with the given vocabulary and loader.

If the document is already Self::Loaded, simply returns the inner RemoteDocument.

Loads the remote context definition with the given vocabulary and loader.

For Self::Iri returns an owned RemoteDocument with [Mown::Owned]. For Self::Loaded returns a reference to the inner RemoteDocument with [Mown::Borrowed].

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Compare this document against other with a custom vocabulary using the given options and warnings handler. Read more
Expand the document with the given vocabulary and loader, using the given options and warning handler. Read more
Compact the document relative to context with the given vocabulary and loader, using the given options and warning handler. Read more
Flatten the document with the given vocabulary, generator and loader, using the given options and warning handler. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Wraps self inside a Meta<Self, M> using the given metadata. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.