pub struct HashDataset<S = Term, P = S, O = S, G = S> { /* private fields */ }
Implementations§
Source§impl<S, P, O, G> HashDataset<S, P, O, G>
impl<S, P, O, G> HashDataset<S, P, O, G>
pub fn new() -> Self
pub fn graph<W: ?Sized + Equivalent<G> + Hash>( &self, id: Option<&W>, ) -> Option<&HashGraph<S, P, O>>
pub fn graph_entry<W: ?Sized + Equivalent<G> + Hash>( &self, id: Option<&W>, ) -> Option<(Option<&G>, &HashGraph<S, P, O>)>
pub fn graphs(&self) -> Graphs<'_, S, P, O, G> ⓘ
pub fn quads(&self) -> Quads<'_, S, P, O, G> ⓘ
pub fn graph_mut<W: ?Sized + Equivalent<G> + Hash>( &mut self, id: Option<&W>, ) -> Option<&mut HashGraph<S, P, O>>
pub fn graphs_mut(&mut self) -> GraphsMut<'_, S, P, O, G> ⓘ
pub fn insert_graph( &mut self, id: G, graph: HashGraph<S, P, O>, ) -> Option<HashGraph<S, P, O>>
pub fn into_graph(self, id: Option<&G>) -> Option<HashGraph<S, P, O>>
pub fn into_graphs(self) -> IntoGraphs<S, P, O, G> ⓘ
pub fn into_quads(self) -> IntoQuads<S, P, O, G> ⓘ
Source§impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> HashDataset<S, P, O, G>
impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> HashDataset<S, P, O, G>
pub fn insert(&mut self, quad: Quad<S, P, O, G>) -> bool
pub fn remove<T: ?Sized + Equivalent<S> + Hash, U: ?Sized + Equivalent<P> + Hash, V: ?Sized + Equivalent<O> + Hash, W: ?Sized + Equivalent<G> + Hash>( &mut self, Quad: Quad<&T, &U, &V, &W>, )
pub fn remove_graph<W: ?Sized + Equivalent<G> + Hash>( &mut self, g: &W, ) -> Option<HashGraph<S, P, O>>
pub fn take<T: ?Sized + Equivalent<S> + Hash, U: ?Sized + Equivalent<P> + Hash, V: ?Sized + Equivalent<O> + Hash, W: ?Sized + Equivalent<G> + Hash>( &mut self, Quad: Quad<&T, &U, &V, &W>, ) -> Option<Quad<S, P, O, G>>
pub fn take_match<T: ?Sized + Equivalent<S> + Hash, U: ?Sized + Equivalent<P> + Hash, V: ?Sized + Equivalent<O> + Hash, W: ?Sized + Equivalent<G> + Hash>( &mut self, Quad: Quad<Option<&T>, Option<&U>, Option<&V>, Option<&W>>, ) -> Option<Quad<S, P, O, G>>
pub fn absorb<D: SizedDataset<Subject = S, Predicate = P, Object = O, GraphLabel = G>>(
&mut self,
other: D,
)where
D::Graph: SizedGraph,
Sourcepub fn substitute_blank_ids<B>(self, f: impl Fn(B) -> B) -> Selfwhere
S: Clone + MaybeBlankId<BlankId = B> + IntoBlankId + FromBlankId,
P: Clone + MaybeBlankId<BlankId = B> + IntoBlankId + FromBlankId,
O: MaybeBlankId<BlankId = B> + IntoBlankId + FromBlankId,
G: Clone + MaybeBlankId<BlankId = B> + IntoBlankId + FromBlankId,
pub fn substitute_blank_ids<B>(self, f: impl Fn(B) -> B) -> Selfwhere
S: Clone + MaybeBlankId<BlankId = B> + IntoBlankId + FromBlankId,
P: Clone + MaybeBlankId<BlankId = B> + IntoBlankId + FromBlankId,
O: MaybeBlankId<BlankId = B> + IntoBlankId + FromBlankId,
G: Clone + MaybeBlankId<BlankId = B> + IntoBlankId + FromBlankId,
Substitutes the blank node identifiers in the dataset.
pub fn view<'a, A>( &'a self, graph_label: Option<&'a G>, subject: &'a S, access: A, ) -> View<'a, Self, A>
Source§impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> HashDataset<S, P, O, G>
impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> HashDataset<S, P, O, G>
Sourcepub fn is_isomorphic_to<I, B, L>(&self, other: &Self) -> bool
pub fn is_isomorphic_to<I, B, L>(&self, other: &Self) -> bool
Checks that there is an isomorphism between this dataset and other
.
There is an isomorphism if there exists a blank node identifier bijection
between self
and other
.
This is equivalent to self.find_blank_id_bijection(other).is_some()
.
Sourcepub fn find_blank_id_bijection<'u, 'v, I, B, L>(
&'u self,
other: &'v Self,
) -> Option<HashBijection<'u, 'v, B, B>>
pub fn find_blank_id_bijection<'u, 'v, I, B, L>( &'u self, other: &'v Self, ) -> Option<HashBijection<'u, 'v, B, B>>
Finds a blank node identifier bijection between from self
to other
.
If such bijection exists,
there is an isomorphism between self
and other
.
Source§impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> HashDataset<S, P, O, G>
impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> HashDataset<S, P, O, G>
Sourcepub fn default_graph(&self) -> &<Self as Dataset>::Graph
pub fn default_graph(&self) -> &<Self as Dataset>::Graph
Get the default graph of the dataset.
This is the same as graph(None)
.
Sourcepub fn subjects<'a>(
&'a self,
id: Option<&<Self as Dataset>::GraphLabel>,
) -> Option<<<Self as Dataset>::Graph as Graph>::Subjects<'a>>
pub fn subjects<'a>( &'a self, id: Option<&<Self as Dataset>::GraphLabel>, ) -> Option<<<Self as Dataset>::Graph as Graph>::Subjects<'a>>
Iterate through all the subjects of the given graph.
Sourcepub fn predicates<'a>(
&'a self,
id: Option<&<Self as Dataset>::GraphLabel>,
subject: &<Self as Dataset>::Subject,
) -> Option<<<Self as Dataset>::Graph as Graph>::Predicates<'a>>
pub fn predicates<'a>( &'a self, id: Option<&<Self as Dataset>::GraphLabel>, subject: &<Self as Dataset>::Subject, ) -> Option<<<Self as Dataset>::Graph as Graph>::Predicates<'a>>
Iterate through all the predicates of the given subject of the given graph.
Sourcepub fn objects<'a>(
&'a self,
id: Option<&<Self as Dataset>::GraphLabel>,
subject: &<Self as Dataset>::Subject,
predicate: &<Self as Dataset>::Predicate,
) -> Option<<<Self as Dataset>::Graph as Graph>::Objects<'a>>
pub fn objects<'a>( &'a self, id: Option<&<Self as Dataset>::GraphLabel>, subject: &<Self as Dataset>::Subject, predicate: &<Self as Dataset>::Predicate, ) -> Option<<<Self as Dataset>::Graph as Graph>::Objects<'a>>
Iterate through all the objects of the given subject and predicate of the given graph.
Source§impl<S: Clone + Eq + Hash, P: Clone + Eq + Hash, O: Eq + Hash, G: Clone + Eq + Hash> HashDataset<S, P, O, G>
impl<S: Clone + Eq + Hash, P: Clone + Eq + Hash, O: Eq + Hash, G: Clone + Eq + Hash> HashDataset<S, P, O, G>
Sourcepub fn into_default_graph(self) -> <Self as Dataset>::Graph
pub fn into_default_graph(self) -> <Self as Dataset>::Graph
Consumes the dataset and returns the default graph.
Sourcepub fn into_subjects(
self,
id: Option<&<Self as Dataset>::GraphLabel>,
) -> Option<<<Self as Dataset>::Graph as SizedGraph>::IntoSubjects>
pub fn into_subjects( self, id: Option<&<Self as Dataset>::GraphLabel>, ) -> Option<<<Self as Dataset>::Graph as SizedGraph>::IntoSubjects>
Consumes the dataset and returns an iterator over the subjects of the given graph.
Sourcepub fn into_predicates(
self,
id: Option<&<Self as Dataset>::GraphLabel>,
subject: &<Self as Dataset>::Subject,
) -> Option<<<Self as Dataset>::Graph as SizedGraph>::IntoPredicates>
pub fn into_predicates( self, id: Option<&<Self as Dataset>::GraphLabel>, subject: &<Self as Dataset>::Subject, ) -> Option<<<Self as Dataset>::Graph as SizedGraph>::IntoPredicates>
Consumes the dataset and returns an iterator over the predicates of the given subject of the given graph.
Sourcepub fn into_objects(
self,
id: Option<&<Self as Dataset>::GraphLabel>,
subject: &<Self as Dataset>::Subject,
predicate: &<Self as Dataset>::Predicate,
) -> Option<<<Self as Dataset>::Graph as SizedGraph>::IntoObjects>
pub fn into_objects( self, id: Option<&<Self as Dataset>::GraphLabel>, subject: &<Self as Dataset>::Subject, predicate: &<Self as Dataset>::Predicate, ) -> Option<<<Self as Dataset>::Graph as SizedGraph>::IntoObjects>
Consumes the dataset and returns an iterator over the objects of the given subject and predicate of the given graph.
Trait Implementations§
Source§impl<S: Clone, P: Clone, O: Clone, G: Clone> Clone for HashDataset<S, P, O, G>
impl<S: Clone, P: Clone, O: Clone, G: Clone> Clone for HashDataset<S, P, O, G>
Source§fn clone(&self) -> HashDataset<S, P, O, G>
fn clone(&self) -> HashDataset<S, P, O, G>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> Dataset for HashDataset<S, P, O, G>
impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> Dataset for HashDataset<S, P, O, G>
type Subject = S
type Predicate = P
type Object = O
type GraphLabel = G
Source§type Graphs<'a> = Graphs<'a, S, P, O, G>
where
Self: 'a,
S: 'a,
P: 'a,
O: 'a,
G: 'a
type Graphs<'a> = Graphs<'a, S, P, O, G> where Self: 'a, S: 'a, P: 'a, O: 'a, G: 'a
type PatternMatching<'a, 'p> = PatternMatching<'a, 'p, S, P, O, G> where Self: 'a, S: 'p, P: 'p, O: 'p, G: 'p
Source§fn graph(&self, id: Option<&G>) -> Option<&HashGraph<S, P, O>>
fn graph(&self, id: Option<&G>) -> Option<&HashGraph<S, P, O>>
None
to get the default graph.Source§fn graphs(&self) -> Graphs<'_, S, P, O, G> ⓘ
fn graphs(&self) -> Graphs<'_, S, P, O, G> ⓘ
fn pattern_matching<'p>( &self, Quad: Quad<Option<&'p Self::Subject>, Option<&'p Self::Predicate>, Option<&'p Self::Object>, Option<&'p Self::GraphLabel>>, ) -> Self::PatternMatching<'_, 'p>
Source§fn default_graph(&self) -> &Self::Graph
fn default_graph(&self) -> &Self::Graph
Source§fn subjects<'a>(
&'a self,
id: Option<&Self::GraphLabel>,
) -> Option<<Self::Graph as Graph>::Subjects<'a>>
fn subjects<'a>( &'a self, id: Option<&Self::GraphLabel>, ) -> Option<<Self::Graph as Graph>::Subjects<'a>>
Source§fn view<'a, A>(
&'a self,
graph_label: Option<&'a Self::GraphLabel>,
subject: &'a Self::Subject,
access: A,
) -> View<'_, Self, A>
fn view<'a, A>( &'a self, graph_label: Option<&'a Self::GraphLabel>, subject: &'a Self::Subject, access: A, ) -> View<'_, Self, A>
Source§fn predicates<'a>(
&'a self,
id: Option<&Self::GraphLabel>,
subject: &Self::Subject,
) -> Option<<Self::Graph as Graph>::Predicates<'a>>
fn predicates<'a>( &'a self, id: Option<&Self::GraphLabel>, subject: &Self::Subject, ) -> Option<<Self::Graph as Graph>::Predicates<'a>>
Source§fn objects<'a>(
&'a self,
id: Option<&Self::GraphLabel>,
subject: &Self::Subject,
predicate: &Self::Predicate,
) -> Option<<Self::Graph as Graph>::Objects<'a>>
fn objects<'a>( &'a self, id: Option<&Self::GraphLabel>, subject: &Self::Subject, predicate: &Self::Predicate, ) -> Option<<Self::Graph as Graph>::Objects<'a>>
Source§fn contains(
&self,
Quad: Quad<&Self::Subject, &Self::Predicate, &Self::Object, &Self::GraphLabel>,
) -> bool
fn contains( &self, Quad: Quad<&Self::Subject, &Self::Predicate, &Self::Object, &Self::GraphLabel>, ) -> bool
fn any_match( &self, pattern: Quad<Option<&Self::Subject>, Option<&Self::Predicate>, Option<&Self::Object>, Option<&Self::GraphLabel>>, ) -> Option<Quad<&Self::Subject, &Self::Predicate, &Self::Object, &Self::GraphLabel>>
Source§impl<S, P, O, G> Default for HashDataset<S, P, O, G>
impl<S, P, O, G> Default for HashDataset<S, P, O, G>
Source§impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> Extend<Quad<S, P, O, G>> for HashDataset<S, P, O, G>
impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> Extend<Quad<S, P, O, G>> for HashDataset<S, P, O, G>
Source§fn extend<I: IntoIterator<Item = Quad<S, P, O, G>>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Quad<S, P, O, G>>>(&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<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> FromIterator<Quad<S, P, O, G>> for HashDataset<S, P, O, G>
impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> FromIterator<Quad<S, P, O, G>> for HashDataset<S, P, O, G>
Source§impl<'a, S, P, O, G> IntoIterator for &'a HashDataset<S, P, O, G>
impl<'a, S, P, O, G> IntoIterator for &'a HashDataset<S, P, O, G>
Source§impl<S: Clone, P: Clone, O, G: Clone> IntoIterator for HashDataset<S, P, O, G>
impl<S: Clone, P: Clone, O, G: Clone> IntoIterator for HashDataset<S, P, O, G>
Source§impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> MutableDataset for HashDataset<S, P, O, G>
impl<S: Eq + Hash, P: Eq + Hash, O: Eq + Hash, G: Eq + Hash> MutableDataset for HashDataset<S, P, O, G>
Source§type GraphsMut<'a> = GraphsMut<'a, S, P, O, G>
where
Self: 'a,
S: 'a,
P: 'a,
O: 'a,
G: 'a
type GraphsMut<'a> = GraphsMut<'a, S, P, O, G> where Self: 'a, S: 'a, P: 'a, O: 'a, G: 'a
Source§fn graph_mut(&mut self, id: Option<&G>) -> Option<&mut Self::Graph>
fn graph_mut(&mut self, id: Option<&G>) -> Option<&mut Self::Graph>
Source§fn graphs_mut(&mut self) -> Self::GraphsMut<'_>
fn graphs_mut(&mut self) -> Self::GraphsMut<'_>
Source§fn insert_graph(&mut self, id: G, graph: Self::Graph) -> Option<Self::Graph>
fn insert_graph(&mut self, id: G, graph: Self::Graph) -> Option<Self::Graph>
Source§fn absorb<D: SizedDataset<Subject = S, Predicate = P, Object = O, GraphLabel = G>>(
&mut self,
other: D,
)where
D::Graph: SizedGraph,
fn absorb<D: SizedDataset<Subject = S, Predicate = P, Object = O, GraphLabel = G>>(
&mut self,
other: D,
)where
D::Graph: SizedGraph,
Source§fn default_graph_mut(&mut self) -> &mut Self::Graph
fn default_graph_mut(&mut self) -> &mut Self::Graph
Source§impl<S, P, O, G> PartialEq for HashDataset<S, P, O, G>
impl<S, P, O, G> PartialEq for HashDataset<S, P, O, G>
Source§impl<S: Clone + Eq + Hash, P: Clone + Eq + Hash, O: Eq + Hash, G: Clone + Eq + Hash> SizedDataset for HashDataset<S, P, O, G>
impl<S: Clone + Eq + Hash, P: Clone + Eq + Hash, O: Eq + Hash, G: Clone + Eq + Hash> SizedDataset for HashDataset<S, P, O, G>
Source§type IntoGraphs = IntoGraphs<S, P, O, G>
type IntoGraphs = IntoGraphs<S, P, O, G>
Source§fn into_graph(self, id: Option<&G>) -> Option<Self::Graph>
fn into_graph(self, id: Option<&G>) -> Option<Self::Graph>
Source§fn into_graphs(self) -> Self::IntoGraphs
fn into_graphs(self) -> Self::IntoGraphs
Source§fn into_quads(self) -> Self::IntoQuads
fn into_quads(self) -> Self::IntoQuads
Source§fn into_default_graph(self) -> Self::Graph
fn into_default_graph(self) -> Self::Graph
Source§fn into_subjects(
self,
id: Option<&Self::GraphLabel>,
) -> Option<<Self::Graph as SizedGraph>::IntoSubjects>
fn into_subjects( self, id: Option<&Self::GraphLabel>, ) -> Option<<Self::Graph as SizedGraph>::IntoSubjects>
Source§fn into_predicates(
self,
id: Option<&Self::GraphLabel>,
subject: &Self::Subject,
) -> Option<<Self::Graph as SizedGraph>::IntoPredicates>
fn into_predicates( self, id: Option<&Self::GraphLabel>, subject: &Self::Subject, ) -> Option<<Self::Graph as SizedGraph>::IntoPredicates>
Source§fn into_objects(
self,
id: Option<&Self::GraphLabel>,
subject: &Self::Subject,
predicate: &Self::Predicate,
) -> Option<<Self::Graph as SizedGraph>::IntoObjects>
fn into_objects( self, id: Option<&Self::GraphLabel>, subject: &Self::Subject, predicate: &Self::Predicate, ) -> Option<<Self::Graph as SizedGraph>::IntoObjects>
impl<S, P, O, G> Eq for HashDataset<S, P, O, G>
Auto Trait Implementations§
impl<S, P, O, G> Freeze for HashDataset<S, P, O, G>
impl<S, P, O, G> RefUnwindSafe for HashDataset<S, P, O, G>
impl<S, P, O, G> Send for HashDataset<S, P, O, G>
impl<S, P, O, G> Sync for HashDataset<S, P, O, G>
impl<S, P, O, G> Unpin for HashDataset<S, P, O, G>
impl<S, P, O, G> UnwindSafe for HashDataset<S, P, O, G>
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.