Crates.io | snowflake |
lib.rs | snowflake |
version | 1.3.0 |
source | src |
created_at | 2015-01-31 04:08:44.171208 |
updated_at | 2017-05-13 23:13:44.397655 |
description | A module for generating guaranteed process unique IDs. |
homepage | https://github.com/Stebalien/snowflake |
repository | https://github.com/Stebalien/snowflake |
max_upload_size | |
id | 1316 |
size | 22,471 |
A crate for quickly generating unique IDs with guaranteed properties. This library is completely unrelated to twitter's snowflake library.
This crate currently includes guaranteed process unique IDs but may include new ID types in the future.
API Docs: https://stebalien.github.io/snowflake/snowflake/
Add this to your Cargo.toml:
[dependencies]
snowflake = "1.2"
and this to your create root:
extern create snowflake;
To add support for serialization and deserialization using serde, add this to your Cargo.toml:
[dependences]
snowflake = { version = "1.2", features = ["serde_support"] }
Warning: there is a risk of non-unique IDs if (de)serialization is used to persist IDs, i.e. reading and writing IDs to and from a file.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.