tulpje_framework/
metadata.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Metadata {
    pub uuid: uuid::Uuid, // used for tracing
    pub shard: u32,
}

impl Metadata {
    pub fn new(shard: u32) -> Self {
        Self {
            uuid: uuid::Uuid::now_v7(),
            shard,
        }
    }
}