idworker 1.3.0

A high-performance distributed ID generator library implementing Snowflake algorithm variants with multiple optimization modes for different performance requirements.
Documentation
1
2
3
4
5
use crate::IdWorkerError;

pub trait IdWorker: Send + Sync {
    fn next_id(&self) -> Result<u64, IdWorkerError>;
}