hydrate-model 0.0.2

Game asset pipeline and authoring framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use uuid::Uuid;

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)]
pub struct AssetSourceId(Uuid);

impl AssetSourceId {
    pub fn new() -> Self {
        AssetSourceId(Uuid::new_v4())
    }

    pub fn null() -> Self {
        AssetSourceId(Uuid::nil())
    }

    pub fn uuid(&self) -> &Uuid {
        &self.0
    }
}