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
sourceimpl<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>ⓘNotable traits for Traverse<'a, T, B, M>impl<'a, T, B, M> Iterator for Traverse<'a, T, B, M> type Item = FragmentRef<'a, T, B, M>;
pub fn count(&self, f: impl FnMut(&FragmentRef<'_, T, B, M>) -> bool) -> usize
pub fn identify_all_with<N, G>(&mut self, vocabulary: &mut N, generator: &mut G)where
G: MetaGenerator<T, B, N, M>,
M: Clone,
T: Eq + Hash,
B: Eq + Hash,
pub fn identify_all<G>(&mut self, generator: &mut G)where
G: MetaGenerator<T, B, (), M>,
M: Clone,
T: Eq + Hash,
B: Eq + Hash,
sourceimpl<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<N, G>(
&self,
vocabulary: &mut N,
generator: G
) -> Result<NodeMap<T, B, M>, ConflictingIndexes<T, B, M>>where
G: MetaGenerator<T, B, N, M>,
Trait Implementations
sourceimpl<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>
sourcefn compact_full_meta<N, C, L>(
&'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 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.
sourceimpl<T, B, M> Default for ExpandedDocument<T, B, M>
impl<T, B, M> Default for ExpandedDocument<T, B, M>
sourcefn default() -> ExpandedDocument<T, B, M>
fn default() -> ExpandedDocument<T, B, M>
Returns the “default value” for a type. Read more
sourceimpl<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,
sourcefn 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
sourcefn 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.
sourcefn 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
sourceimpl<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<N, G>(
self,
meta: M,
vocabulary: &mut N,
generator: G,
ordered: bool
) -> Result<Meta<Vec<Meta<Indexed<Node<I, B, M>, M>, M>, Global>, M>, ConflictingIndexes<I, B, M>>where
G: MetaGenerator<I, B, N, M>,
N: Vocabulary<Iri = I, BlankId = B>,
fn flatten_unordered_meta<N, G>(
self,
meta: M,
vocabulary: &mut N,
generator: G
) -> Result<Meta<HashSet<Stripped<Meta<Indexed<Node<I, B, M>, M>, M>>, RandomState>, M>, ConflictingIndexes<I, B, M>>where
G: MetaGenerator<I, B, N, M>,
sourceimpl<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>
sourcefn 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.
sourceimpl<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,
sourcefn 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
sourceimpl<'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.
sourcefn 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
sourceimpl<T, B, M> IntoIterator for ExpandedDocument<T, B, M>
impl<T, B, M> IntoIterator for ExpandedDocument<T, B, M>
sourceimpl<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>
sourceimpl<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,
sourcefn eq(&self, other: &ExpandedDocument<T, B, M>) -> bool
fn eq(&self, other: &ExpandedDocument<T, B, M>) -> bool
Comparison between two expanded documents.
sourceimpl<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>,
sourceimpl<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>,
sourceimpl<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>,
sourceimpl<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<N, G>(
&self,
vocabulary: &'n mut N,
generator: &'g mut G,
rdf_direction: Option<RdfDirection>
) -> Quads<'_, 'n, 'g, T, B, N, M, G>ⓘNotable traits for Quads<'a, 'n, 'g, T, B, N, M, G>impl<'a, 'n, 'g, T, B, N, M, G> Iterator for Quads<'a, 'n, 'g, T, B, N, M, G>where
T: Clone,
B: Clone,
N: IriVocabularyMut<Iri = T>,
G: MetaGenerator<T, B, N, M>, type Item = Quad<Cow<'a, Subject<T, B>>, Cow<'a, Subject<T, B>>, Value<T, B>, &'a Subject<T, B>>;
where
G: MetaGenerator<T, B, N, M>,
T: Clone,
B: Clone,
N: IriVocabularyMut<Iri = T>,
G: MetaGenerator<T, B, N, M>, type Item = Quad<Cow<'a, Subject<T, B>>, Cow<'a, Subject<T, B>>, Value<T, B>, &'a Subject<T, B>>;
fn rdf_quads<G>(
&self,
generator: &'g mut G,
rdf_direction: Option<RdfDirection>
) -> Quads<'_, 'static, 'g, T, B, (), M, G>ⓘNotable traits for Quads<'a, 'n, 'g, T, B, N, M, G>impl<'a, 'n, 'g, T, B, N, M, G> Iterator for Quads<'a, 'n, 'g, T, B, N, M, G>where
T: Clone,
B: Clone,
N: IriVocabularyMut<Iri = T>,
G: MetaGenerator<T, B, N, M>, type Item = Quad<Cow<'a, Subject<T, B>>, Cow<'a, Subject<T, B>>, Value<T, B>, &'a Subject<T, B>>;
where
G: MetaGenerator<T, B, (), M>,
T: Clone,
B: Clone,
N: IriVocabularyMut<Iri = T>,
G: MetaGenerator<T, B, N, M>, type Item = Quad<Cow<'a, Subject<T, B>>, Cow<'a, Subject<T, B>>, Value<T, B>, &'a Subject<T, B>>;
sourceimpl<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,
sourcefn stripped_eq(&self, other: &ExpandedDocument<T, B, M>) -> bool
fn stripped_eq(&self, other: &ExpandedDocument<T, B, M>) -> bool
Comparison between two expanded documents.
sourceimpl<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
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
sourceimpl<T> BorrowStripped for T
impl<T> BorrowStripped for T
sourceimpl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
sourceimpl<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
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.