Struct json_ld_core::ExpandedDocument
source · pub struct ExpandedDocument<T = IriIndex, B = BlankIdIndex, M = Location<T>>(/* private fields */);
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
)
pub fn identify_all_with<V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &mut self, vocabulary: &mut V, generator: &mut G )
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)
pub fn identify_all<G: Generator<(), M>>(&mut self, generator: &mut G)
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
)
pub fn relabel_and_canonicalize_with<V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &mut self, vocabulary: &mut V, generator: &mut G )
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
)
pub fn relabel_and_canonicalize<G: Generator<(), M>>( &mut self, generator: &mut G )
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
)
pub fn relabel_with<V: Vocabulary<Iri = T, BlankId = B>, G: Generator<V, M>>( &mut self, vocabulary: &mut V, generator: &mut G )
Relabels nodes.
sourcepub fn canonicalize_with(&mut self, buffer: &mut Buffer)
pub fn canonicalize_with(&mut self, buffer: &mut Buffer)
Puts this document literals into canonical form using the given
buffer
.
The buffer is used to compute the canonical form of numbers.
sourcepub fn canonicalize(&mut self)
pub fn canonicalize(&mut self)
Puts this document literals into canonical form.
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>>>> for ExpandedDocument<T, B, M>
impl<T, B, M> From<HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>> 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, 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 for ExpandedDocument<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> StrippedPartialEq 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>
impl<T, B, M> Send for ExpandedDocument<T, B, M>
impl<T, B, M> Sync for ExpandedDocument<T, B, M>
impl<T, B, M> Unpin for ExpandedDocument<T, B, M>
impl<T, B, M> UnwindSafe for ExpandedDocument<T, B, M>
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 Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.