Clarify comment
This commit is contained in:
parent
e4c21fa26d
commit
b76ed55a39
1 changed files with 2 additions and 1 deletions
|
|
@ -6,7 +6,8 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||||
///
|
///
|
||||||
/// The id consists of 8 bytes. The first 5 bytes are an epoch timestamp in
|
/// The id consists of 8 bytes. The first 5 bytes are an epoch timestamp in
|
||||||
/// seconds, while the remaining 3 bytes are a random number, meant to avoid
|
/// seconds, while the remaining 3 bytes are a random number, meant to avoid
|
||||||
/// collisions when two ids are created at the same time on different devices.
|
/// collisions when two ids are created during the same second, possibly even on
|
||||||
|
/// different devices.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
struct TimestampId(u64);
|
struct TimestampId(u64);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue