Skip to main content

tulpje_framework/
metadata.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Debug, Clone)]
4pub struct Metadata {
5    pub uuid: uuid::Uuid, // used for tracing
6    pub shard: u32,
7}
8
9impl Metadata {
10    pub fn new(shard: u32) -> Self {
11        Self {
12            uuid: uuid::Uuid::now_v7(),
13            shard,
14        }
15    }
16}