11mod private
22{
3+
4+ // xxx : write setters and default
35 /// Options for configuring a graph search.
46 #[ derive( Debug ) ]
5- pub struct Options < ' a , Method , NodeId , Node , Visit >
7+ pub struct Options < ' a , Method , Graph , Visit >
68 where
7- NodeId : crate :: abs:: NodeId ,
8- Node : crate :: abs:: Node + ' a ,
9- Visit : FnMut ( & ' a Node ) ,
9+ Graph : crate :: abs:: GraphDirected < ' a > + ?Sized ,
10+ // NodeId : Graph::NodeId,
11+ // Node : Graph::Node + 'a,
12+ Visit : FnMut ( & ' a Graph :: Node ) ,
1013 Method : super :: Method ,
1114 {
1215 /// Starting node ID for the search.
13- pub start_id : NodeId ,
16+ pub start_id : Graph :: NodeId ,
1417 /// Function to call on each visited node.
1518 pub visit : Visit ,
1619 /// Additional options specific to the search method.
1720 pub _extra : Method :: ExtraOptions ,
1821 /// Phantom data to associate types and lifetimes.
19- pub _phantom : std:: marker:: PhantomData < ( Method , Node , & ' a ( ) ) > ,
22+ pub _phantom : std:: marker:: PhantomData < ( Method , Graph :: Node , & ' a ( ) ) > ,
2023 }
2124
2225 /// Trait for performing searches on directed graphs.
@@ -26,7 +29,7 @@ mod private
2629 fn search < Visit , Method >
2730 (
2831 & ' a self ,
29- o : Options < ' a , Method , Self :: NodeId , Self :: Node , Visit > ,
32+ o : Options < ' a , Method , Self , Visit > ,
3033 )
3134 where
3235 Visit : FnMut ( & ' a Self :: Node ) ,
@@ -52,7 +55,7 @@ mod private
5255 fn _search < ' a , Graph , Visit >
5356 (
5457 graph : & ' a Graph ,
55- o : Options < ' a , Self , Graph :: NodeId , Graph :: Node , Visit > ,
58+ o : Options < ' a , Self , Graph , Visit > ,
5659 )
5760 where
5861 Visit : FnMut ( & ' a Graph :: Node ) ,
@@ -72,7 +75,7 @@ mod private
7275 fn _search < ' a , Graph , Visit >
7376 (
7477 graph : & ' a Graph ,
75- mut o : Options < ' a , Self , Graph :: NodeId , Graph :: Node , Visit > ,
78+ mut o : Options < ' a , Self , Graph , Visit > ,
7679 )
7780 where
7881 Visit : FnMut ( & ' a Graph :: Node ) ,
@@ -109,7 +112,7 @@ mod private
109112 fn _search < ' a , Graph , Visit >
110113 (
111114 graph : & ' a Graph ,
112- mut o : Options < ' a , Self , Graph :: NodeId , Graph :: Node , Visit > ,
115+ mut o : Options < ' a , Self , Graph , Visit > ,
113116 )
114117 where
115118 Visit : FnMut ( & ' a Graph :: Node ) ,
@@ -133,6 +136,7 @@ mod private
133136 }
134137 }
135138 }
139+
136140}
137141
138142crate :: mod_interface!
0 commit comments