Struct json_ld::RemoteDocument

source ·
pub struct RemoteDocument<I = Index, M = Location<I, Span>, T = Value<M>> { /* private fields */ }
Expand description

Remote document.

Stores the content of a loaded remote document along with its original URL.

Implementations§

Creates a new remote document.

url is the final URL of the loaded document, after eventual redirection. content_type is the HTTP Content-Type header value of the loaded document, exclusive of any optional parameters.

Creates a new remote document.

url is the final URL of the loaded document, after eventual redirection. content_type is the HTTP Content-Type header value of the loaded document, exclusive of any optional parameters. context_url is the value of the HTTP Link Header RFC 8288 using the http://www.w3.org/ns/json-ld#context link relation in the response, if any. profile is the value of any profile parameter retrieved as part of the original contentType.

Maps the content of the remote document.

Tries to map the content of the remote document.

Returns a reference to the final URL of the loaded document, after eventual redirection.

Returns the HTTP Content-Type header value of the loaded document, exclusive of any optional parameters.

Returns the value of the HTTP Link Header RFC 8288 using the http://www.w3.org/ns/json-ld#context link relation in the response, if any.

If the response’s Content-Type is application/ld+json, the HTTP Link Header is ignored. If multiple HTTP Link Headers using the http://www.w3.org/ns/json-ld#context link relation are found, the loader fails with a multiple context link headers error.

Returns a reference to the content of the document.

Drops the original URL and returns the content of the document.

Drops the content and returns the original URL of the document.

Sets the URL of the document.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Remote document expansion.

The default base URL given to the expansion algorithm is the URL of the remote document.

Returns the default base URL passed to the expansion algorithm and used to initialize the default empty context when calling Expand::expand or Expand::expand_with.
Expand the document with full options. 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.