use uuid::Uuid;
use super::types::Type;
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Vertex {
pub id: Uuid,
#[serde(rename = "type")]
pub t: Type,
}
impl Vertex {
pub fn new(id: Uuid, t: Type) -> Vertex {
Vertex { id: id, t: t }
}
}
impl PartialEq for Vertex {
fn eq(&self, other: &Vertex) -> bool {
self.id == other.id
}
}
impl Eq for Vertex {}