Struct json_ld_core::ExpandedDocument
source · pub struct ExpandedDocument<T = Index, B = Index, M = Location<T>>(_);
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() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn objects(&self) -> &HashSet<StrippedIndexedObject<T, B, M>>
pub fn into_objects(self) -> HashSet<StrippedIndexedObject<T, B, M>>
pub fn iter(&self) -> Iter<'_, StrippedIndexedObject<T, B, 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: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>(
&mut self,
vocabulary: &mut V,
generator: &mut G
)where
M: Clone,
T: Eq + Hash,
B: Eq + Hash,
pub fn identify_all_with<V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &mut self, vocabulary: &mut V, generator: &mut G )where 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: Generator<(), M>>(&mut self, generator: &mut G)where
M: Clone,
T: Eq + Hash,
B: Eq + Hash,
(): Vocabulary<Iri = T, BlankId = B>,
pub fn identify_all<G: Generator<(), M>>(&mut self, generator: &mut G)where 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: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>(
&mut self,
vocabulary: &mut V,
generator: &mut G
)where
M: Clone,
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
pub fn relabel_and_canonicalize_with<V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &mut self, vocabulary: &mut V, generator: &mut G )where 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: Generator<(), M>>(
&mut self,
generator: &mut G
)where
M: Clone,
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
(): Vocabulary<Iri = T, BlankId = B>,
pub fn relabel_and_canonicalize<G: Generator<(), M>>( &mut self, generator: &mut G )where 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: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>(
&mut self,
vocabulary: &mut V,
generator: &mut G
)where
M: Clone,
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
pub fn relabel_with<V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &mut self, vocabulary: &mut V, generator: &mut G )where M: Clone, T: Clone + Eq + Hash, B: Clone + Eq + Hash,
Relabels nodes.
sourcepub fn relabel<G: Generator<(), M>>(&mut self, generator: &mut G)where
M: Clone,
T: Clone + Eq + Hash,
B: Clone + Eq + Hash,
(): Vocabulary<Iri = T, BlankId = B>,
pub fn relabel<G: Generator<(), M>>(&mut self, generator: &mut G)where 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: Hash + Eq, B: Hash + Eq, M> ExpandedDocument<T, B, M>
impl<T: Hash + Eq, B: Hash + Eq, M> ExpandedDocument<T, B, M>
pub fn insert(&mut self, object: IndexedObject<T, B, M>) -> bool
source§impl<T: Clone + Eq + Hash, B: Clone + Eq + Hash, M: Clone> ExpandedDocument<T, B, M>
impl<T: Clone + Eq + Hash, B: Clone + Eq + Hash, M: Clone> ExpandedDocument<T, B, M>
pub fn generate_node_map_with<V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &self, vocabulary: &mut V, generator: G ) -> Result<NodeMap<T, B, M>, ConflictingIndexes<T, B, M>>
Trait Implementations§
source§impl<T, B, M> Default for ExpandedDocument<T, B, M>
impl<T, B, M> Default for ExpandedDocument<T, B, M>
source§impl<T: Hash + Eq, B: Hash + Eq, M> Extend<Meta<Indexed<Object<T, B, M>, M>, M>> for ExpandedDocument<T, B, M>
impl<T: Hash + Eq, B: Hash + Eq, M> Extend<Meta<Indexed<Object<T, B, M>, M>, M>> for ExpandedDocument<T, B, M>
source§fn extend<I: IntoIterator<Item = IndexedObject<T, B, M>>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = IndexedObject<T, B, M>>>(&mut self, iter: I)
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: Clone + Eq + Hash, B: Clone + Eq + Hash, M: Clone> FlattenMeta<I, B, M> for ExpandedDocument<I, B, M>
impl<I: Clone + Eq + Hash, B: Clone + Eq + Hash, M: Clone> FlattenMeta<I, B, M> for ExpandedDocument<I, B, M>
fn flatten_meta<V, G: Generator<V, M>>( self, meta: M, vocabulary: &mut V, generator: G, ordered: bool ) -> FlattenResult<I, B, M>where V: Vocabulary<Iri = I, BlankId = B>,
fn flatten_unordered_meta<V, G: Generator<V, M>>( self, meta: M, vocabulary: &mut V, generator: G ) -> FlattenUnorderedResult<I, B, M>where 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<StrippedIndexedObject<T, B, M>>) -> Self
fn from(set: HashSet<StrippedIndexedObject<T, B, M>>) -> Self
source§impl<T: Hash + Eq, B: Hash + Eq, M> FromIterator<Meta<Indexed<Object<T, B, M>, M>, M>> for ExpandedDocument<T, B, M>
impl<T: Hash + Eq, B: Hash + Eq, M> FromIterator<Meta<Indexed<Object<T, B, M>, M>, M>> for ExpandedDocument<T, B, M>
source§fn from_iter<I: IntoIterator<Item = IndexedObject<T, B, M>>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = IndexedObject<T, B, M>>>(iter: I) -> Self
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>
source§impl<T, B, M> IntoIterator for ExpandedDocument<T, B, M>
impl<T, B, M> IntoIterator for ExpandedDocument<T, B, M>
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: Eq + Hash, B: Eq + Hash, M> PartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> PartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>
source§impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrecomputeSizeWithContext<N> for ExpandedDocument<T, B, M>
impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrecomputeSizeWithContext<N> for ExpandedDocument<T, B, M>
source§impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrintWithContext<N> for ExpandedDocument<T, B, M>
impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrintWithContext<N> for ExpandedDocument<T, B, M>
source§impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrintWithSizeAndContext<N> for ExpandedDocument<T, B, M>
impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrintWithSizeAndContext<N> for ExpandedDocument<T, B, M>
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<'n, 'g, V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &self, vocabulary: &'n mut V, generator: &'g mut G, rdf_direction: Option<RdfDirection>, produce_generalized_rdf: bool ) -> Quads<'_, 'n, 'g, V, M, G> ⓘ
fn rdf_quads_with<'n, 'g, V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &self, vocabulary: &'n mut V, generator: &'g mut G, rdf_direction: Option<RdfDirection> ) -> Quads<'_, 'n, 'g, V, M, G> ⓘ
source§impl<T: Eq + Hash, B: Eq + Hash, M> StrippedPartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> StrippedPartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>
source§fn stripped_eq(&self, other: &Self) -> bool
fn stripped_eq(&self, other: &Self) -> bool
Comparison between two expanded documents.
source§impl<T: Eq + Hash, B: Eq + Hash, M> TryFromJson<T, B, M> for ExpandedDocument<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> TryFromJson<T, B, M> for ExpandedDocument<T, B, M>
fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, Meta: Meta<Value<M>, M> ) -> Result<Meta<Self, M>, Meta<InvalidExpandedJson<M>, M>>
impl<T: Eq + Hash, B: Eq + Hash, M> Eq for ExpandedDocument<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> StrippedEq for ExpandedDocument<T, B, M>
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<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
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.