Skip to main content

TraversableGraph

Trait TraversableGraph 

Source
pub trait TraversableGraph: Graph {
    type Triples<'a>: Iterator<Item = Triple<&'a Self::Subject, &'a Self::Predicate, &'a Self::Object>>
       where Self: 'a;

    // Required method
    fn triples(&self) -> Self::Triples<'_>;

    // Provided method
    fn triples_count(&self) -> usize { ... }
}
Expand description

Graph whose triples can be enumerated.

Required Associated Types§

Source

type Triples<'a>: Iterator<Item = Triple<&'a Self::Subject, &'a Self::Predicate, &'a Self::Object>> where Self: 'a

Triples iterator.

Required Methods§

Source

fn triples(&self) -> Self::Triples<'_>

Returns an iterator over the triples of this graph.

Provided Methods§

Source

fn triples_count(&self) -> usize

Returns the number of triples in this graph.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R: Resource> TraversableGraph for BTreeGraph<R>

Source§

type Triples<'a> = Triples<'a, R> where R: 'a

Source§

impl<R: Resource> TraversableGraph for HashGraph<R>

Source§

type Triples<'a> = Triples<'a, R> where R: 'a

Source§

impl<R: Resource> TraversableGraph for IndexedBTreeGraph<R>

Source§

type Triples<'a> = Triples<'a, R> where R: 'a

Source§

impl<R: Resource> TraversableGraph for IndexedHashGraph<R>

Source§

type Triples<'a> = Triples<'a, R> where R: 'a