forked from ROMEO/nexosim
Merge pull request #19 from us-irs/add-serde-feature
Add optional serde feature
This commit is contained in:
commit
f5f0721663
@ -1,3 +1,7 @@
|
|||||||
|
# unreleased
|
||||||
|
|
||||||
|
- Add `serde` feature and serialization support for `MonotonicTime`.
|
||||||
|
|
||||||
# 0.2.1 (2024-03-06)
|
# 0.2.1 (2024-03-06)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
@ -12,7 +16,6 @@
|
|||||||
|
|
||||||
- Update copyright in MIT license to include contributors.
|
- Update copyright in MIT license to include contributors.
|
||||||
|
|
||||||
|
|
||||||
# 0.2.0 (2023-08-15)
|
# 0.2.0 (2023-08-15)
|
||||||
|
|
||||||
### Added (API-breaking changes)
|
### Added (API-breaking changes)
|
||||||
|
@ -25,6 +25,7 @@ autotests = false
|
|||||||
dev-hooks = []
|
dev-hooks = []
|
||||||
# Logging of performance-related statistics; development only.
|
# Logging of performance-related statistics; development only.
|
||||||
dev-logs = []
|
dev-logs = []
|
||||||
|
serde = ["dep:serde"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-event = "0.1"
|
async-event = "0.1"
|
||||||
@ -39,6 +40,10 @@ slab = "0.4"
|
|||||||
spin_sleep = "1"
|
spin_sleep = "1"
|
||||||
st3 = "0.4"
|
st3 = "0.4"
|
||||||
|
|
||||||
|
[dependencies.serde]
|
||||||
|
version = "1"
|
||||||
|
optional = true
|
||||||
|
|
||||||
[target.'cfg(asynchronix_loom)'.dependencies]
|
[target.'cfg(asynchronix_loom)'.dependencies]
|
||||||
loom = "0.5"
|
loom = "0.5"
|
||||||
waker-fn = "1.1"
|
waker-fn = "1.1"
|
||||||
|
@ -52,6 +52,7 @@ const NANOS_PER_SEC: u32 = 1_000_000_000;
|
|||||||
/// assert_eq!(timestamp.subsec_nanos(), 443_654_321);
|
/// assert_eq!(timestamp.subsec_nanos(), 443_654_321);
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||||
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||||
pub struct MonotonicTime {
|
pub struct MonotonicTime {
|
||||||
/// The number of whole seconds in the future (if positive) or in the past
|
/// The number of whole seconds in the future (if positive) or in the past
|
||||||
/// (if negative) of 1970-01-01 00:00:00 TAI.
|
/// (if negative) of 1970-01-01 00:00:00 TAI.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user