Struct json_ld::loader::RemoteDocument
source · [−]Implementations
sourceimpl<I, M, T> RemoteDocument<I, M, T>
impl<I, M, T> RemoteDocument<I, M, T>
pub fn new(url: Option<I>, document: Meta<T, M>) -> RemoteDocument<I, M, T>
pub fn map<U, N>(
self,
f: impl Fn(Meta<T, M>) -> Meta<U, N>
) -> RemoteDocument<I, N, U>
pub fn try_map<U, N, E>(
self,
f: impl Fn(Meta<T, M>) -> Result<Meta<U, N>, E>
) -> Result<RemoteDocument<I, N, U>, E>
pub fn url(&self) -> Option<&I>
pub fn document(&self) -> &Meta<T, M>
pub fn into_document(self) -> Meta<T, M>
pub fn into_url(self) -> Option<I>
pub fn set_url(&mut self, url: Option<I>)
Trait Implementations
sourceimpl<I, M, T> Clone for RemoteDocument<I, M, T>where
I: Clone,
M: Clone,
T: Clone,
impl<I, M, T> Clone for RemoteDocument<I, M, T>where
I: Clone,
M: Clone,
T: Clone,
sourcefn clone(&self) -> RemoteDocument<I, M, T>
fn clone(&self) -> RemoteDocument<I, M, T>
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T, B, M> Expand<T, B, M> for RemoteDocument<T, M, Value<M>>
impl<T, B, M> Expand<T, B, M> for RemoteDocument<T, M, Value<M>>
Remote document expansion.
The default base URL given to the expansion algorithm is the URL of the remote document.
sourcefn default_base_url(&self) -> Option<&T>
fn default_base_url(&self) -> Option<&T>
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
. Read moresourcefn expand_full<'a, N, C, L>(
&'a self,
vocabulary: &'a mut N,
context: Context<T, B, C, M>,
base_url: Option<&'a T>,
loader: &'a mut L,
options: Options,
warnings_handler: impl Send + WarningHandler<B, N, M> + 'a
) -> Pin<Box<dyn Future<Output = Result<Meta<ExpandedDocument<T, B, M>, M>, Meta<Error<M, <L as ContextLoader<T, M>>::ContextError>, M>>> + Send + 'a, Global>>where
L: Loader<T, M> + ContextLoader<T, M> + Send + Sync,
N: Send + Sync + VocabularyMut<Iri = T, BlankId = B>,
T: Clone + Eq + Hash + Send + Sync,
B: 'a + Clone + Eq + Hash + Send + Sync,
M: 'a + Clone + Send + Sync,
C: 'a + ProcessMeta<T, B, M> + From<Value<M>>,
<L as Loader<T, M>>::Output: Into<Value<M>>,
<L as ContextLoader<T, M>>::Context: Into<C>,
<L as ContextLoader<T, M>>::ContextError: Send,
fn expand_full<'a, N, C, L>(
&'a self,
vocabulary: &'a mut N,
context: Context<T, B, C, M>,
base_url: Option<&'a T>,
loader: &'a mut L,
options: Options,
warnings_handler: impl Send + WarningHandler<B, N, M> + 'a
) -> Pin<Box<dyn Future<Output = Result<Meta<ExpandedDocument<T, B, M>, M>, Meta<Error<M, <L as ContextLoader<T, M>>::ContextError>, M>>> + Send + 'a, Global>>where
L: Loader<T, M> + ContextLoader<T, M> + Send + Sync,
N: Send + Sync + VocabularyMut<Iri = T, BlankId = B>,
T: Clone + Eq + Hash + Send + Sync,
B: 'a + Clone + Eq + Hash + Send + Sync,
M: 'a + Clone + Send + Sync,
C: 'a + ProcessMeta<T, B, M> + From<Value<M>>,
<L as Loader<T, M>>::Output: Into<Value<M>>,
<L as ContextLoader<T, M>>::Context: Into<C>,
<L as ContextLoader<T, M>>::ContextError: Send,
Expand the document with full options. Read more
sourceimpl<I, M> JsonLdProcessor<I, M> for RemoteDocument<I, M, Value<M>>
impl<I, M> JsonLdProcessor<I, M> for RemoteDocument<I, M, Value<M>>
fn compare_full<'a, B, C, N, L>(
&'a self,
other: &'a Self,
vocabulary: &'a mut N,
loader: &'a mut L,
options: Options<I, M, C>,
warnings: impl 'a + Send + WarningHandler<N, M> + WarningHandler<B, N, M>
) -> BoxFuture<'_, CompareResult<I, M, L>>where
I: Clone + Eq + Hash + Send + Sync,
B: 'a + Clone + Eq + Hash + Send + Sync,
C: 'a + ProcessMeta<I, B, M> + From<Value<M>>,
N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>,
M: Clone + Send + Sync,
L: Loader<I, M> + ContextLoader<I, M> + Send + Sync,
L::Output: Into<Value<M>>,
L::Error: Send,
L::Context: Into<C>,
L::ContextError: Send,
fn expand_full<'a, B, C, N, L>(
&'a self,
vocabulary: &'a mut N,
loader: &'a mut L,
options: Options<I, M, C>,
warnings: impl 'a + Send + WarningHandler<N, M> + WarningHandler<B, N, M>
) -> BoxFuture<'_, ExpandResult<I, B, M, L>>where
I: Clone + Eq + Hash + Send + Sync,
B: 'a + Clone + Eq + Hash + Send + Sync,
C: 'a + ProcessMeta<I, B, M> + From<Value<M>>,
N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>,
M: Clone + Send + Sync,
L: Loader<I, M> + ContextLoader<I, M> + Send + Sync,
L::Output: Into<Value<M>>,
L::Error: Send,
L::Context: Into<C>,
L::ContextError: Send,
fn compact_full<'a, B, C, N, L>(
&'a self,
vocabulary: &'a mut N,
context: RemoteDocumentReference<I, M, C>,
loader: &'a mut L,
options: Options<I, M, C>,
warnings: impl 'a + Send + WarningHandler<N, M> + WarningHandler<B, N, M>
) -> BoxFuture<'a, CompactResult<I, M, L>>where
I: Clone + Eq + Hash + Send + Sync,
B: 'a + Clone + Eq + Hash + Send + Sync,
C: 'a + ProcessMeta<I, B, M> + From<Value<M>>,
N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>,
M: Clone + Send + Sync,
L: Loader<I, M> + ContextLoader<I, M> + Send + Sync,
L::Output: Into<Value<M>>,
L::Error: Send,
L::Context: Into<C>,
L::ContextError: Send,
fn flatten_full<'a, B, C, N, L>(
&'a self,
vocabulary: &'a mut N,
generator: &'a mut impl Send + Generator<I, B, M, N>,
context: Option<RemoteDocumentReference<I, M, C>>,
loader: &'a mut L,
options: Options<I, M, C>,
warnings: impl 'a + Send + WarningHandler<N, M> + WarningHandler<B, N, M>
) -> BoxFuture<'a, Result<MetaValue<M>, FlattenError<I, B, M, <L as Loader<I, M>>::Error, <L as ContextLoader<I, M>>::ContextError>>>where
I: Clone + Eq + Hash + Send + Sync,
B: 'a + Clone + Eq + Hash + Send + Sync,
C: 'a + ProcessMeta<I, B, M> + From<Value<M>>,
N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>,
M: Clone + Send + Sync,
L: Loader<I, M> + ContextLoader<I, M> + Send + Sync,
L::Output: Into<Value<M>>,
L::Error: Send,
L::Context: Into<C>,
L::ContextError: Send,
Auto Trait Implementations
impl<I, M, T> RefUnwindSafe for RemoteDocument<I, M, T>where
I: RefUnwindSafe,
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, M, T> Send for RemoteDocument<I, M, T>where
I: Send,
M: Send,
T: Send,
impl<I, M, T> Sync for RemoteDocument<I, M, T>where
I: Sync,
M: Sync,
T: Sync,
impl<I, M, T> Unpin for RemoteDocument<I, M, T>where
I: Unpin,
M: Unpin,
T: Unpin,
impl<I, M, T> UnwindSafe for RemoteDocument<I, M, T>where
I: UnwindSafe,
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more