Add Copy to IncidenceCursor trait
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@ use crate::maps::{EdgeMap, VertexMap};
|
|||||||
pub trait GraphTopology {
|
pub trait GraphTopology {
|
||||||
type Vertex: Copy + Eq;
|
type Vertex: Copy + Eq;
|
||||||
type Edge: Copy + Eq;
|
type Edge: Copy + Eq;
|
||||||
type IncidenceCursor: IncidenceCursor<Self> + Copy;
|
type IncidenceCursor: IncidenceCursor<Self>;
|
||||||
|
|
||||||
fn vertex_count(&self) -> usize;
|
fn vertex_count(&self) -> usize;
|
||||||
fn vertex_capacity(&self) -> usize;
|
fn vertex_capacity(&self) -> usize;
|
||||||
@@ -31,6 +31,6 @@ pub trait GraphTopologyDeletion: GraphTopology {
|
|||||||
fn delete_edge(&mut self, e: Self::Edge);
|
fn delete_edge(&mut self, e: Self::Edge);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait IncidenceCursor<G: GraphTopology + ?Sized> {
|
pub trait IncidenceCursor<G: GraphTopology + ?Sized>: Copy {
|
||||||
fn next(&mut self, graph: &G) -> Option<(G::Vertex, G::Edge)>;
|
fn next(&mut self, graph: &G) -> Option<(G::Vertex, G::Edge)>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user