1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
// Copyright 2019 Octavian Oncescu

use rand::Rng;

#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
pub struct VertexId([u8; 12]);

impl VertexId {
    pub fn random() -> VertexId {
        let bytes = rand::thread_rng().gen::<[u8; 12]>();
        VertexId(bytes)
    }
}