hydrate_model/
asset_source_id.rs

1use uuid::Uuid;
2
3#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)]
4pub struct AssetSourceId(Uuid);
5
6impl AssetSourceId {
7    pub fn new() -> Self {
8        AssetSourceId(Uuid::new_v4())
9    }
10
11    pub fn null() -> Self {
12        AssetSourceId(Uuid::nil())
13    }
14
15    pub fn uuid(&self) -> &Uuid {
16        &self.0
17    }
18}