[−][src]Trait grdf::Graph
gRDF graph.
A graph is a collection of RDF triples. It also defines a set of iterator to easily explore the graph.
Associated Types
type Triples: Iterator<Item = Triple<&'a T>>
[src]
Triple iterators.
type Subjects: Iterator<Item = (&'a T, Self::Predicates)>
[src]
Graph subjects iterator.
Each subject is given with its associated predicates (and objects).
type Predicates: Iterator<Item = (&'a T, Self::Objects)>
[src]
Subject predicates iterator.
Iterate through all the predicates associated to a given subject. Each predicate is also given with the associated objects.
type Objects: Iterator<Item = &'a T>
[src]
Objects iterator.
Iterate through a set of objects.
Required methods
pub fn triples<'a>(&'a self) -> Self::Triples where
T: 'a,
[src]
T: 'a,
pub fn subjects<'a>(&'a self) -> Self::Subjects where
T: 'a,
[src]
T: 'a,
Iterate through all the subjects of the graph.
pub fn predicates<'a>(&'a self, subject: &T) -> Self::Predicates where
T: 'a,
[src]
T: 'a,
Iterate through all the predicates associated to the given subject.
pub fn objects<'a>(&'a self, subject: &T, predicate: &T) -> Self::Objects where
T: 'a,
[src]
T: 'a,
Iterate through all the objects associated to the given subject and predicate.
pub fn contains(&self, triple: Triple<&T>) -> bool
[src]
Checks if the given triple is defined in the graph.
Implementors
impl<T: Hash + Eq> Graph<T> for HashGraph<T>
[src]
type Objects = Objects<'a, T>
type Predicates = Predicates<'a, T>
type Subjects = Subjects<'a, T>
type Triples = Iter<'a, T>
pub fn triples<'a>(&'a self) -> Iter<'a, T>ⓘ where
T: 'a,
[src]
T: 'a,
pub fn subjects<'a>(&'a self) -> Subjects<'a, T>ⓘ where
T: 'a,
[src]
T: 'a,
pub fn predicates<'a>(&'a self, subject: &T) -> Predicates<'a, T>ⓘNotable traits for Predicates<'a, T>
impl<'a, T: Hash + Eq> Iterator for Predicates<'a, T> type Item = (&'a T, Objects<'a, T>);
where
T: 'a,
[src]
Notable traits for Predicates<'a, T>
impl<'a, T: Hash + Eq> Iterator for Predicates<'a, T> type Item = (&'a T, Objects<'a, T>);
T: 'a,
pub fn objects<'a>(&'a self, subject: &T, predicate: &T) -> Objects<'a, T>ⓘ where
T: 'a,
[src]
T: 'a,