Function aid::gen [−][src]
pub fn gen(time: SystemTime) -> Result<String, Box<dyn Error>>
Generate aid.
The aid consists of 8 bytes of milliseconds elapsed since 2000-01-01 00:00:00 UTC and 2 bytes of a random characters.
Arguments
time
- Indicates the current time. It will probably work if you put in a date in the past, but it’s probably best not to.
Exmaple
use aid::gen; use std::time::SystemTime; let aid = gen(SystemTime::now());