1pub trait Edge: Eq {
2 fn from(&self) -> usize;
3 fn to(&self) -> usize;
4 fn color(&self) -> u8;
5 fn set_color(&mut self, color: u8);
6}
7
8pub trait EdgeConstructor {
9 fn new(from: usize, to: usize) -> Self;
10 fn new_with_colour(from: usize, to: usize, colour: u8) -> Self;
11}