[][src]Trait grdf::Graph

pub trait Graph<T = Term> {
    type Iter: Iter<'a, T>;
    fn triples<'a>(&'a self) -> <Self::Iter as Iter<'a, T>>::Triples
    where
        T: 'a
;
fn subjects<'a>(&'a self) -> <Self::Iter as Iter<'a, T>>::Subjects
    where
        T: 'a
;
fn predicates<'a>(
        &'a self,
        subject: &T
    ) -> <Self::Iter as Iter<'a, T>>::Predicates
    where
        T: 'a
;
fn objects<'a>(
        &'a self,
        subject: &T,
        predicate: &T
    ) -> <Self::Iter as Iter<'a, T>>::Objects
    where
        T: 'a
;
fn contains(&self, triple: Triple<&T>) -> bool; }

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 Iter: Iter<'a, T>

Iterators.

Loading content...

Required methods

fn triples<'a>(&'a self) -> <Self::Iter as Iter<'a, T>>::Triples where
    T: 'a, 

fn subjects<'a>(&'a self) -> <Self::Iter as Iter<'a, T>>::Subjects where
    T: 'a, 

Iterate through all the subjects of the graph.

fn predicates<'a>(
    &'a self,
    subject: &T
) -> <Self::Iter as Iter<'a, T>>::Predicates where
    T: 'a, 

Iterate through all the predicates associated to the given subject.

fn objects<'a>(
    &'a self,
    subject: &T,
    predicate: &T
) -> <Self::Iter as Iter<'a, T>>::Objects where
    T: 'a, 

Iterate through all the objects associated to the given subject and predicate.

fn contains(&self, triple: Triple<&T>) -> bool

Checks if the given triple is defined in the graph.

Loading content...

Implementors

impl<T: Hash + Eq> Graph<T> for HashGraph<T>[src]

type Iter = Iterators

Loading content...