k-snowflake 2.1.1

Simple one-dependency implementation of Twitter`s (X) snowflake in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod snowflake;
pub mod utils;
mod constants;
mod context;

pub use snowflake::Snowflake;
pub use context::{
    set_sequence,
    set_instance,
    set_sequence_autoincrement,
    set_epoch
};
pub use constants::{TWITTER_EPOCH_START, DISCORD_EPOCH_START};

/// Basic creating snowflake using context
pub fn create_snowflake() -> Snowflake {
    Snowflake::from_context()
}