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§
Sourcetype GraphObjects<'a>: Iterator<Item = &'a Self::Resource>
where
Self: 'a
type GraphObjects<'a>: Iterator<Item = &'a Self::Resource> where Self: 'a
Objects iterator.
Required Methods§
Sourcefn graph_objects(&self) -> Self::GraphObjects<'_>
fn graph_objects(&self) -> Self::GraphObjects<'_>
Returns an iterator over the distinct objects of the graph.
Provided Methods§
Sourcefn graph_object_count(&self) -> usize
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".