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>

source

pub fn new() -> ExpandedDocument<T, B, M>

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn objects( &self ) -> &HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, RandomState>

source

pub fn into_objects( self ) -> HashSet<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, RandomState>

source

pub fn iter(&self) -> Iter<'_, Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>

source

pub fn traverse(&self) -> Traverse<'_, T, B, M>

source

pub fn count(&self, f: impl FnMut(&FragmentRef<'_, T, B, M>) -> bool) -> usize

source

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.

source

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.

source

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.

source

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.

source

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.

source

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.

source

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

pub fn canonicalize(&mut self)where T: Eq + Hash, B: Eq + Hash,

Puts this document literals into canonical form.

source

pub fn blank_ids(&self) -> HashSet<&B, RandomState>where B: Eq + Hash,

Returns the set of all blank identifiers in the given document.

source§

impl<T, B, M> ExpandedDocument<T, B, M>where T: Hash + Eq, B: Hash + Eq,

source

pub fn insert(&mut self, object: Meta<Indexed<Object<T, B, M>, M>, M>) -> bool

source§

impl<T, B, M> ExpandedDocument<T, B, M>where T: Clone + Eq + Hash, B: Clone + Eq + Hash, M: Clone,

source

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>

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>,

Compacts the input document with full options.
source§

impl<T, B, M> Default for ExpandedDocument<T, B, M>

source§

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,

source§

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)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

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,

source§

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>,

source§

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>

source§

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,

source§

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>

§

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>>

The type of the elements being iterated over.
source§

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>

§

type IntoIter = IntoIter<T, B, M>

Which kind of iterator are we turning this into?
§

type Item = Meta<Indexed<Object<T, B, M>, M>, M>

The type of the elements being iterated over.
source§

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>

source§

fn quads(&self) -> Quads<'_, 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,

source§

fn eq(&self, other: &ExpandedDocument<T, B, M>) -> bool

Comparison between two expanded documents.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T, B, M, N> PrecomputeSizeWithContext<N> for ExpandedDocument<T, B, M>where N: Vocabulary<Iri = T, BlankId = B>,

source§

fn contextual_pre_compute_size( &self, vocabulary: &N, options: &Options, sizes: &mut Vec<Size, Global> ) -> Size

source§

impl<T, B, M, N> PrintWithContext<N> for ExpandedDocument<T, B, M>where N: Vocabulary<Iri = T, BlankId = B>,

source§

fn contextual_fmt_with( &self, vocabulary: &N, f: &mut Formatter<'_>, options: &Options, indent: usize ) -> Result<(), Error>

source§

impl<T, B, M, N> PrintWithSizeAndContext<N> for ExpandedDocument<T, B, M>where N: Vocabulary<Iri = T, BlankId = B>,

source§

fn contextual_fmt_with_size( &self, vocabulary: &N, f: &mut Formatter<'_>, options: &Options, indent: usize, sizes: &[Size], index: &mut usize ) -> Result<(), Error>

source§

impl<T, B, M> RdfQuads<T, B, M> for ExpandedDocument<T, B, M>

source§

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>,

source§

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,

source§

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,

source§

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>>

source§

impl<T, B, M> Eq for ExpandedDocument<T, B, M>where T: Eq + Hash, B: Eq + Hash,

source§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> At for T

source§

fn at<M>(self, metadata: M) -> Meta<T, M>

Wraps self inside a Meta<Self, M> using the given metadata. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> BorrowStripped for T

source§

fn stripped(&self) -> &Stripped<T>

source§

impl<T> BorrowUnordered for T

source§

fn unordered(&self) -> &Unordered<T>

source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, C> FromWithContext<T, C> for T

source§

fn from_with(value: T, _context: &C) -> T

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U, C> IntoWithContext<U, C> for Twhere U: FromWithContext<T, C>,

source§

fn into_with(self, context: &C) -> U

§

impl<T> ToOwned for T

§

type Owned = T

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U, C> TryFromWithContext<U, C> for Twhere U: IntoWithContext<T, C>,

§

type Error = Infallible

source§

fn try_from_with( value: U, context: &C ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T, U, C> TryIntoWithContext<U, C> for Twhere U: TryFromWithContext<T, C>,

§

type Error = <U as TryFromWithContext<T, C>>::Error

source§

fn try_into_with( self, context: &C ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

source§

impl<T> WithContext for Twhere T: ?Sized,

source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

source§

fn into_with<C>(self, context: C) -> Contextual<T, C>