rust-distributed-id 0.1.3

Rust version of the Twitter snowflake algorithm.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use chrono::NaiveDateTime;
use serde::{Deserialize, Serialize};

#[crud_table(table_name:worker_node)]
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct WorkerNode{
    pub id: Option<u64>,
    pub host_name: Option<String>,
    pub port: Option<String>,
    pub worker_type: Option<i8>,
    pub modified: Option<NaiveDateTime>,
    pub created: Option<NaiveDateTime>,
}