pub struct ActionId(/* private fields */);Expand description
Time in nanoseconds from std::time::UNIX_EPOCH.
Each action will have unique id. If two actions happen at the same time, id must be increased by 1 for second action, to ensure uniqueness of id.
u64 is enough to contain time in nanoseconds at most 584 years
after UNIX_EPOCH (1970-01-01 00:00:00 UTC).
// nano micro milli sec min hour day year
assert_eq!(u64::MAX / 1000 / 1000 / 1000 / 60 / 60 / 24 / 365, 584);Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ActionId
impl<'de> Deserialize<'de> for ActionId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ActionId
impl Ord for ActionId
Source§impl PartialOrd for ActionId
impl PartialOrd for ActionId
impl Copy for ActionId
impl Eq for ActionId
impl StructuralPartialEq for ActionId
Auto Trait Implementations§
impl Freeze for ActionId
impl RefUnwindSafe for ActionId
impl Send for ActionId
impl Sync for ActionId
impl Unpin for ActionId
impl UnwindSafe for ActionId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more