| Crates.io | serde_nanos |
| lib.rs | serde_nanos |
| version | 0.1.4 |
| created_at | 2021-12-01 12:35:36.590905+00 |
| updated_at | 2024-04-04 13:28:51.632423+00 |
| description | Wrapper to process duration and timestamps as nanoseconds |
| homepage | |
| repository | https://github.com/caspervonb/serde_nanos |
| max_upload_size | |
| id | 490233 |
| size | 29,194 |
A serde wrapper that can be used to serialize durations as nanoseconds. It's often useful together with serde_json to communicate with JSON protocols.
use std::time::Duration;
pub struct Message {
#[serde(with = "serde_nanos")]
expires_in: Duration,
}