• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/H03-May-2022-376282

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D14-Sep-202074 65

.gitignoreH A D14-Sep-202030 43

.rustfmt.tomlH A D14-Sep-202015 21

.travis.ymlH A D14-Sep-202064 76

Cargo.tomlH A D14-Sep-20201.1 KiB3430

Cargo.toml.orig-cargoH A D14-Sep-2020501 1916

LICENSE-APACHEH A D14-Sep-202010.6 KiB202169

LICENSE-MITH A D14-Sep-20201.1 KiB2317

README.mdH A D14-Sep-20201.3 KiB4532

README.md

1[![](https://img.shields.io/crates/v/humantime-serde.svg)][crates-io]
2[![](https://docs.rs/humantime-serde/badge.svg)][api-docs]
3[![Apache 2.0 licensed](https://img.shields.io/badge/license-Apache2.0-blue.svg)](./LICENSE-APACHE)
4[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE-MIT)
5
6# humantime-serde
7
8Serde support for the `humantime` crate.
9
10Heavily based on this [fork](https://github.com/tailhook/serde-humantime/tree/serde_wrapper).
11
12## Example
13```rust
14use serde::{Serialize, Deserialize};
15use std::time::{Duration, SystemTime};
16
17#[derive(Serialize, Deserialize)]
18struct Foo {
19    #[serde(with = "humantime_serde")]
20    timeout: Duration,
21    #[serde(default)]
22    #[serde(with = "humantime_serde")]
23    time: Option<SystemTime>,
24}
25```
26
27## License
28
29Licensed under either of
30
31 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
32 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
33
34at your option.
35
36### Contribution
37
38Unless you explicitly state otherwise, any contribution intentionally
39submitted for inclusion in the work by you, as defined in the Apache-2.0
40license, shall be dual licensed as above, without any additional terms or
41conditions.
42
43[crates-io]: https://crates.io/crates/humantime-serde
44[api-docs]: https://docs.rs/humantime-serde
45