Struct json_ld::ExpandedDocument
source · pub struct ExpandedDocument<T = Index, B = Index, M = Location<T, Span>>(_);
Expand description
Result of the document expansion algorithm.
It is just an alias for a set of (indexed) objects.
Implementations§
source§impl<T, B, M> ExpandedDocument<T, B, M>
impl<T, B, M> ExpandedDocument<T, B, M>
pub fn new() -> ExpandedDocument<T, B, M>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn objects( &self ) -> &HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, RandomState>
pub fn into_objects( self ) -> HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, RandomState>
pub fn iter(&self) -> Iter<'_, Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>
pub fn traverse(&self) -> Traverse<'_, T, B, M> ⓘ
pub fn count(&self, f: impl FnMut(&FragmentRef<'_, T, B, M>) -> bool) -> usize
sourcepub fn identify_all_with<V, G>(&mut self, vocabulary: &mut V, generator: &mut G)where
V: Vocabulary<Iri = T, BlankId = B>,
G: MetaGenerator<V, M>,
M: Clone,
T: Eq + Hash,
B: Eq + Hash,
pub fn identify_all_with<V, G>(&mut self, vocabulary: &mut V, generator: &mut G)where V: Vocabulary<Iri = T, BlankId = B>, G: MetaGenerator<V, M>, M: Clone, T: Eq + Hash, B: Eq + Hash,
Give an identifier (@id
) to every nodes using the given generator to
generate fresh identifiers for anonymous nodes.
sourcepub fn identify_all<G>(&mut self, generator: &mut G)where
G: MetaGenerator<(), M>,
M: Clone,
T: Eq + Hash,
B: Eq + Hash,
(): Vocabulary<Iri = T, BlankId = B>,
pub fn identify_all<G>(&mut self, generator: &mut G)where G: MetaGenerator<(), M>, M: Clone, T: Eq + Hash, B: Eq + Hash, (): Vocabulary<Iri = T, BlankId = B>,
Give an identifier (@id
) to every nodes using the given generator to
generate fresh identifiers for anonymous nodes.
sourcepub fn relabel_and_canonicalize_with<V, G>(
&mut self,
vocabulary: &mut V,
generator: &mut G
)where
V: Vocabulary<Iri = T, BlankId = B>,
G: MetaGenerator<V, M>,
M: Clone,
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
pub fn relabel_and_canonicalize_with<V, G>( &mut self, vocabulary: &mut V, generator: &mut G )where V: Vocabulary<Iri = T, BlankId = B>, G: MetaGenerator<V, M>, M: Clone, T: Clone + Eq + Hash, B: Clone + Eq + Hash,
Give an identifier (@id
) to every nodes and canonicalize every
literals using the given generator to generate fresh identifiers for
anonymous nodes.
sourcepub fn relabel_and_canonicalize<G>(&mut self, generator: &mut G)where
G: MetaGenerator<(), M>,
M: Clone,
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
(): Vocabulary<Iri = T, BlankId = B>,
pub fn relabel_and_canonicalize<G>(&mut self, generator: &mut G)where G: MetaGenerator<(), M>, M: Clone, T: Clone + Eq + Hash, B: Clone + Eq + Hash, (): Vocabulary<Iri = T, BlankId = B>,
Give an identifier (@id
) to every nodes and canonicalize every
literals using the given generator to generate fresh identifiers for
anonymous nodes.
sourcepub fn relabel_with<V, G>(&mut self, vocabulary: &mut V, generator: &mut G)where
V: Vocabulary<Iri = T, BlankId = B>,
G: MetaGenerator<V, M>,
M: Clone,
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
pub fn relabel_with<V, G>(&mut self, vocabulary: &mut V, generator: &mut G)where V: Vocabulary<Iri = T, BlankId = B>, G: MetaGenerator<V, M>, M: Clone, T: Clone + Eq + Hash, B: Clone + Eq + Hash,
Relabels nodes.
sourcepub fn relabel<G>(&mut self, generator: &mut G)where
G: MetaGenerator<(), M>,
M: Clone,
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
(): Vocabulary<Iri = T, BlankId = B>,
pub fn relabel<G>(&mut self, generator: &mut G)where G: MetaGenerator<(), M>, M: Clone, T: Clone + Eq + Hash, B: Clone + Eq + Hash, (): Vocabulary<Iri = T, BlankId = B>,
Relabels nodes.
sourcepub fn canonicalize_with(&mut self, buffer: &mut Buffer)where
T: Eq + Hash,
B: Eq + Hash,
pub fn canonicalize_with(&mut self, buffer: &mut Buffer)where T: Eq + Hash, B: Eq + Hash,
Puts this document literals into canonical form using the given
buffer
.
The buffer is used to compute the canonical form of numbers.
source§impl<T, B, M> ExpandedDocument<T, B, M>where
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
M: Clone,
impl<T, B, M> ExpandedDocument<T, B, M>where T: Clone + Eq + Hash, B: Clone + Eq + Hash, M: Clone,
pub fn generate_node_map_with<V, G>( &self, vocabulary: &mut V, generator: G ) -> Result<NodeMap<T, B, M>, ConflictingIndexes<T, B, M>>where V: Vocabulary<Iri = T, BlankId = B>, G: MetaGenerator<V, M>,
Trait Implementations§
source§impl<I, B, M> CompactMeta<I, B, M> for ExpandedDocument<I, B, M>
impl<I, B, M> CompactMeta<I, B, M> for ExpandedDocument<I, B, M>
source§fn compact_full_meta<N, C, L, 'a>(
&'a self,
meta: &'a M,
vocabulary: &'a mut N,
context: ProcessedRef<'a, 'a, I, B, C, M>,
loader: &'a mut L,
options: Options
) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>where
L: Loader<I, M> + ContextLoader<I, M> + Send + Sync,
N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>,
I: Clone + Hash + Eq + Send + Sync,
B: Clone + Hash + Eq + Send + Sync,
M: Clone + Send + Sync,
C: Clone + ProcessMeta<I, B, M> + AnyValue<M>,
<L as ContextLoader<I, M>>::Context: Into<C>,
fn compact_full_meta<N, C, L, 'a>( &'a self, meta: &'a M, vocabulary: &'a mut N, context: ProcessedRef<'a, 'a, I, B, C, M>, loader: &'a mut L, options: Options ) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>where L: Loader<I, M> + ContextLoader<I, M> + Send + Sync, N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq + Send + Sync, B: Clone + Hash + Eq + Send + Sync, M: Clone + Send + Sync, C: Clone + ProcessMeta<I, B, M> + AnyValue<M>, <L as ContextLoader<I, M>>::Context: Into<C>,
source§impl<T, B, M> Default for ExpandedDocument<T, B, M>
impl<T, B, M> Default for ExpandedDocument<T, B, M>
source§fn default() -> ExpandedDocument<T, B, M>
fn default() -> ExpandedDocument<T, B, M>
source§impl<T, B, M> Extend<Meta<Indexed<Object<T, B, M>, M>, M>> for ExpandedDocument<T, B, M>where
T: Hash + Eq,
B: Hash + Eq,
impl<T, B, M> Extend<Meta<Indexed<Object<T, B, M>, M>, M>> for ExpandedDocument<T, B, M>where T: Hash + Eq, B: Hash + Eq,
source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
fn extend<I>(&mut self, iter: I)where I: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl<I, B, M> FlattenMeta<I, B, M> for ExpandedDocument<I, B, M>where
I: Clone + Eq + Hash,
B: Clone + Eq + Hash,
M: Clone,
impl<I, B, M> FlattenMeta<I, B, M> for ExpandedDocument<I, B, M>where I: Clone + Eq + Hash, B: Clone + Eq + Hash, M: Clone,
fn flatten_meta<V, G>( self, meta: M, vocabulary: &mut V, generator: G, ordered: bool ) -> Result<Meta<Vec<Meta<Indexed<Node<I, B, M>, M>, M>, Global>, M>, ConflictingIndexes<I, B, M>>where G: MetaGenerator<V, M>, V: Vocabulary<Iri = I, BlankId = B>,
fn flatten_unordered_meta<V, G>( self, meta: M, vocabulary: &mut V, generator: G ) -> Result<Meta<HashSet<Stripped<Meta<Indexed<Node<I, B, M>, M>, M>>, RandomState>, M>, ConflictingIndexes<I, B, M>>where G: MetaGenerator<V, M>, V: Vocabulary<Iri = I, BlankId = B>,
source§impl<T, B, M> From<HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, RandomState>> for ExpandedDocument<T, B, M>
impl<T, B, M> From<HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, RandomState>> for ExpandedDocument<T, B, M>
source§fn from(
set: HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, RandomState>
) -> ExpandedDocument<T, B, M>
fn from( set: HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, RandomState> ) -> ExpandedDocument<T, B, M>
source§impl<T, B, M> FromIterator<Meta<Indexed<Object<T, B, M>, M>, M>> for ExpandedDocument<T, B, M>where
T: Hash + Eq,
B: Hash + Eq,
impl<T, B, M> FromIterator<Meta<Indexed<Object<T, B, M>, M>, M>> for ExpandedDocument<T, B, M>where T: Hash + Eq, B: Hash + Eq,
source§fn from_iter<I>(iter: I) -> ExpandedDocument<T, B, M>where
I: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
fn from_iter<I>(iter: I) -> ExpandedDocument<T, B, M>where I: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
source§impl<'a, T, B, M> IntoIterator for &'a ExpandedDocument<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a ExpandedDocument<T, B, M>
§type IntoIter = Iter<'a, Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>
type IntoIter = Iter<'a, Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>
§type Item = &'a Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>
type Item = &'a Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>
source§fn into_iter(self) -> <&'a ExpandedDocument<T, B, M> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a ExpandedDocument<T, B, M> as IntoIterator>::IntoIter
source§impl<T, B, M> IntoIterator for ExpandedDocument<T, B, M>
impl<T, B, M> IntoIterator for ExpandedDocument<T, B, M>
source§fn into_iter(self) -> <ExpandedDocument<T, B, M> as IntoIterator>::IntoIter
fn into_iter(self) -> <ExpandedDocument<T, B, M> as IntoIterator>::IntoIter
source§impl<T, B, M> LdQuads<T, B, M> for ExpandedDocument<T, B, M>
impl<T, B, M> LdQuads<T, B, M> for ExpandedDocument<T, B, M>
source§impl<T, B, M> PartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> PartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>where T: Eq + Hash, B: Eq + Hash,
source§impl<T, B, M, N> PrecomputeSizeWithContext<N> for ExpandedDocument<T, B, M>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, M, N> PrecomputeSizeWithContext<N> for ExpandedDocument<T, B, M>where N: Vocabulary<Iri = T, BlankId = B>,
source§impl<T, B, M, N> PrintWithContext<N> for ExpandedDocument<T, B, M>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, M, N> PrintWithContext<N> for ExpandedDocument<T, B, M>where N: Vocabulary<Iri = T, BlankId = B>,
source§impl<T, B, M, N> PrintWithSizeAndContext<N> for ExpandedDocument<T, B, M>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, M, N> PrintWithSizeAndContext<N> for ExpandedDocument<T, B, M>where N: Vocabulary<Iri = T, BlankId = B>,
source§impl<T, B, M> RdfQuads<T, B, M> for ExpandedDocument<T, B, M>
impl<T, B, M> RdfQuads<T, B, M> for ExpandedDocument<T, B, M>
fn rdf_quads_full<V, G, 'n, 'g>( &self, vocabulary: &'n mut V, generator: &'g mut G, rdf_direction: Option<RdfDirection>, produce_generalized_rdf: bool ) -> Quads<'_, 'n, 'g, V, M, G> ⓘwhere V: Vocabulary<Iri = T, BlankId = B>, G: MetaGenerator<V, M>,
fn rdf_quads_with<V, G, 'n, 'g>( &self, vocabulary: &'n mut V, generator: &'g mut G, rdf_direction: Option<RdfDirection> ) -> Quads<'_, 'n, 'g, V, M, G> ⓘwhere V: Vocabulary<Iri = T, BlankId = B>, G: MetaGenerator<V, M>,
source§impl<T, B, M> StrippedPartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> StrippedPartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>where T: Eq + Hash, B: Eq + Hash,
source§fn stripped_eq(&self, other: &ExpandedDocument<T, B, M>) -> bool
fn stripped_eq(&self, other: &ExpandedDocument<T, B, M>) -> bool
Comparison between two expanded documents.
source§impl<T, B, M> TryFromJson<T, B, M> for ExpandedDocument<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> TryFromJson<T, B, M> for ExpandedDocument<T, B, M>where T: Eq + Hash, B: Eq + Hash,
fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, _: Meta<Value<M>, M> ) -> Result<Meta<ExpandedDocument<T, B, M>, M>, Meta<InvalidExpandedJson<M>, M>>
impl<T, B, M> Eq for ExpandedDocument<T, B, M>where T: Eq + Hash, B: Eq + Hash,
impl<T, B, M> StrippedEq for ExpandedDocument<T, B, M>where T: Eq + Hash, B: Eq + Hash,
Auto Trait Implementations§
impl<T, B, M> RefUnwindSafe for ExpandedDocument<T, B, M>where B: RefUnwindSafe, M: RefUnwindSafe, T: RefUnwindSafe,
impl<T, B, M> Send for ExpandedDocument<T, B, M>where B: Send, M: Send, T: Send,
impl<T, B, M> Sync for ExpandedDocument<T, B, M>where B: Sync, M: Sync, T: Sync,
impl<T, B, M> Unpin for ExpandedDocument<T, B, M>where M: Unpin, T: Unpin,
impl<T, B, M> UnwindSafe for ExpandedDocument<T, B, M>where B: UnwindSafe, M: 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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.