grafos_tools/vertice.rs
1use std::fmt::Debug;
2
3/**
4The T stands for the id type for the vertice.
5It should be an integer or a String.
6*/
7#[derive(PartialEq, Eq, Hash, Clone, Debug)]
8pub struct Vertice<T: PartialOrd + Debug>(pub T);
9
10impl<T: PartialOrd + Debug> Vertice<T> {
11 pub fn id(&self) -> &T {
12 &self.0
13 }
14}