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>

source

pub fn new() -> Self

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn objects(&self) -> &HashSet<StrippedIndexedObject<T, B, M>>

source

pub fn into_objects(self) -> HashSet<StrippedIndexedObject<T, B, M>>

source

pub fn iter(&self) -> Iter<'_, StrippedIndexedObject<T, B, 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: 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.

source

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.

source

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.

source

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.

source

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.

source

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.

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>where B: Eq + Hash,

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

source§

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

source

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>

source

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>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

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)

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: Clone + Eq + Hash, B: Clone + Eq + Hash, M: Clone> FlattenMeta<I, B, M> for ExpandedDocument<I, B, M>

source§

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

source§

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>

source§

fn from(set: HashSet<StrippedIndexedObject<T, B, M>>) -> Self

Converts to this type from the input type.
source§

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

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) -> Self::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) -> Self::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: Eq + Hash, B: Eq + Hash, M> PartialEq<ExpandedDocument<T, B, M>> for ExpandedDocument<T, B, M>

source§

fn eq(&self, other: &Self) -> 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: Vocabulary<Iri = T, BlankId = B>> PrecomputeSizeWithContext<N> for ExpandedDocument<T, B, M>

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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>

source§

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>

source§

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>

source§

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

source§

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

source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · 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

source§

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

source§

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

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> 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.
const: unstable · source§

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

Performs the conversion.
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.
const: unstable · source§

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

Performs the conversion.
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>