Skip to main content

ObjectFiniteGraph

Trait ObjectFiniteGraph 

Source
pub trait ObjectFiniteGraph: Graph {
    type GraphObjects<'a>: Iterator<Item = &'a Self::Resource>
       where Self: 'a;

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

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

Graph that can enumerate the distinct resources it uses as an object.

Required Associated Types§

Source

type GraphObjects<'a>: Iterator<Item = &'a Self::Resource> where Self: 'a

Objects iterator.

Required Methods§

Source

fn graph_objects(&self) -> Self::GraphObjects<'_>

Returns an iterator over the distinct objects of the graph.

Provided Methods§

Source

fn graph_object_count(&self) -> usize

Returns the number of distinct objects in the graph.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<R> ObjectFiniteGraph for IndexedBTreeGraph<R>

Source§

type GraphObjects<'a> = Objects<'a, R> where R: 'a