[−][src]Trait sophia::graph::inmem::GraphWrapper
A graph wrapper wraps a Graph
and overrides some of its methods.
This trait mimmics the interface of the Graph
trait,
with all methods having a default implementation
that delegates to the corresponding method of the wrapped graph.
Implementation of this trait may however expected to override
some of the methods.
Conversely, the impl_graph_for_wrapper!
macro can be used to derive
the Graph implementation for any implementation of GraphWrapper.
Associated Types
Loading content...Required methods
fn get_wrapped(&self) -> &Self::Wrapped
Borrow the wrapped graph.
fn get_wrapped_mut(&mut self) -> &mut Self::Wrapped
Borrow the wrapped graph mutably.
Provided methods
fn gw_triples(&self) -> GTripleSource<'_, Self::Wrapped>
Mimmic the iter
method.
fn gw_triples_with_s<'s, TS: ?Sized>(
&'s self,
s: &'s TS
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
&'s self,
s: &'s TS
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
Mimmic the triples_with_s
method.
fn gw_triples_with_p<'s, TP: ?Sized>(
&'s self,
p: &'s TP
) -> GTripleSource<'s, Self::Wrapped> where
TP: TTerm,
&'s self,
p: &'s TP
) -> GTripleSource<'s, Self::Wrapped> where
TP: TTerm,
Mimmic the triples_with_p
method.
fn gw_triples_with_o<'s, TO: ?Sized>(
&'s self,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TO: TTerm,
&'s self,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TO: TTerm,
Mimmic the triples_with_o
method.
fn gw_triples_with_sp<'s, TS: ?Sized, TP: ?Sized>(
&'s self,
s: &'s TS,
p: &'s TP
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
TP: TTerm,
&'s self,
s: &'s TS,
p: &'s TP
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
TP: TTerm,
Mimmic the triples_with_sp
method.
fn gw_triples_with_so<'s, TS: ?Sized, TO: ?Sized>(
&'s self,
s: &'s TS,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
TO: TTerm,
&'s self,
s: &'s TS,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
TO: TTerm,
Mimmic the triples_with_so
method.
fn gw_triples_with_po<'s, TP: ?Sized, TO: ?Sized>(
&'s self,
p: &'s TP,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TP: TTerm,
TO: TTerm,
&'s self,
p: &'s TP,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TP: TTerm,
TO: TTerm,
Mimmic the triples_with_po
method.
fn gw_triples_with_spo<'s, TS: ?Sized, TP: ?Sized, TO: ?Sized>(
&'s self,
s: &'s TS,
p: &'s TP,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
TP: TTerm,
TO: TTerm,
&'s self,
s: &'s TS,
p: &'s TP,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
TP: TTerm,
TO: TTerm,
Mimmic the triples_with_spo
method.
fn gw_contains<TS: ?Sized, TP: ?Sized, TO: ?Sized>(
&self,
s: &TS,
p: &TP,
o: &TO
) -> GResult<Self::Wrapped, bool> where
TS: TTerm,
TP: TTerm,
TO: TTerm,
&self,
s: &TS,
p: &TP,
o: &TO
) -> GResult<Self::Wrapped, bool> where
TS: TTerm,
TP: TTerm,
TO: TTerm,
Mimmic the contains
method.
fn gw_subjects(&self) -> GResultTermSet<Self::Wrapped> where
GTerm<Self::Wrapped>: Clone + Eq + Hash,
GTerm<Self::Wrapped>: Clone + Eq + Hash,
Mimmic the subjects
method.
fn gw_predicates(&self) -> GResultTermSet<Self::Wrapped> where
GTerm<Self::Wrapped>: Clone + Eq + Hash,
GTerm<Self::Wrapped>: Clone + Eq + Hash,
Mimmic the predicates
method.
fn gw_objects(&self) -> GResultTermSet<Self::Wrapped> where
GTerm<Self::Wrapped>: Clone + Eq + Hash,
GTerm<Self::Wrapped>: Clone + Eq + Hash,
Mimmic the objects
method.
fn gw_iris(&self) -> GResultTermSet<Self::Wrapped> where
GTerm<Self::Wrapped>: Clone + Eq + Hash,
GTerm<Self::Wrapped>: Clone + Eq + Hash,
Mimmic the iris
method.
fn gw_bnodes(&self) -> GResultTermSet<Self::Wrapped> where
GTerm<Self::Wrapped>: Clone + Eq + Hash,
GTerm<Self::Wrapped>: Clone + Eq + Hash,
Mimmic the bnodes
method.
fn gw_literals(&self) -> GResultTermSet<Self::Wrapped> where
GTerm<Self::Wrapped>: Clone + Eq + Hash,
GTerm<Self::Wrapped>: Clone + Eq + Hash,
Mimmic the literals
method.
fn gw_variables(&self) -> GResultTermSet<Self::Wrapped> where
GTerm<Self::Wrapped>: Clone + Eq + Hash,
GTerm<Self::Wrapped>: Clone + Eq + Hash,
Mimmic the variables
method.
Implementors
impl<T> GraphWrapper for OpsWrapper<T> where
T: IndexedGraph + Graph<Triple = ByTermRefs<Term<<T as IndexedGraph>::TermData>>>,
[src]
T: IndexedGraph + Graph<Triple = ByTermRefs<Term<<T as IndexedGraph>::TermData>>>,
type Wrapped = T
fn get_wrapped(&self) -> &T
[src]
fn get_wrapped_mut(&mut self) -> &mut T
[src]
fn gw_triples_with_o<'s, TO: ?Sized>(
&'s self,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TO: TTerm,
[src]
&'s self,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TO: TTerm,
fn gw_triples_with_po<'s, TP: ?Sized, TO: ?Sized>(
&'s self,
p: &'s TP,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TP: TTerm,
TO: TTerm,
[src]
&'s self,
p: &'s TP,
o: &'s TO
) -> GTripleSource<'s, Self::Wrapped> where
TP: TTerm,
TO: TTerm,
fn gw_objects(&self) -> GResultTermSet<Self::Wrapped>
[src]
impl<T> GraphWrapper for SpoWrapper<T> where
T: IndexedGraph + Graph<Triple = ByTermRefs<Term<<T as IndexedGraph>::TermData>>>,
[src]
T: IndexedGraph + Graph<Triple = ByTermRefs<Term<<T as IndexedGraph>::TermData>>>,
type Wrapped = T
fn get_wrapped(&self) -> &T
[src]
fn get_wrapped_mut(&mut self) -> &mut T
[src]
fn gw_triples_with_s<'s, TS: ?Sized>(
&'s self,
s: &'s TS
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
[src]
&'s self,
s: &'s TS
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
fn gw_triples_with_sp<'s, TS: ?Sized, TP: ?Sized>(
&'s self,
s: &'s TS,
p: &'s TP
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
TP: TTerm,
[src]
&'s self,
s: &'s TS,
p: &'s TP
) -> GTripleSource<'s, Self::Wrapped> where
TS: TTerm,
TP: TTerm,