#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct UsageId(String);
impl Default for UsageId {
fn default() -> Self {
Self::new()
}
}
impl UsageId {
pub fn new() -> Self {
Self(uuid::Uuid::new_v4().to_string())
}
pub fn from_string(id: String) -> Self {
Self(id)
}
pub fn as_str(&self) -> &str {
&self.0
}
}