Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/caspervonb/serde_nanos


https://github.com/caspervonb/serde_nanos

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

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.

# Example

```rust
use std::time::Duration;

pub struct Message {
#[serde(with = "serde_nanos")]
expires_in: Duration,
}
```