Struct json_ld::expanded::ExpandedDocument
source · 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
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,
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>,
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>,
Compacts the input document with full options.
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>
Returns the “default value” for a type. Read more
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>>,
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
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>
Converts to this type from the input type.
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>>,
Creates a value from an iterator. Read more
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>>>
Which kind of iterator are we turning this into?
§type Item = &'a Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>
type Item = &'a Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>
The type of the elements being iterated over.
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
Creates an iterator from a value. Read more
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
Creates an iterator from a value. Read more
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_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>,
fn rdf_quads<G, 'g>(
&self,
generator: &'g mut G,
rdf_direction: Option<RdfDirection>
) -> Quads<'_, 'static, 'g, (), M, G> ⓘwhere
G: MetaGenerator<(), M>,
(): Vocabulary<Iri = T, BlankId = B>,
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<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
Checks if this value is equivalent to the given key. Read more
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
Compare self to
key
and return true
if they are equal.