Registry / serialization / humantime-serde

humantime-serde

JSON →
library1.1.1rscratesunverified

Serde support for the `humantime` crate

# Cargo.toml [dependencies] humantime-serde = "1.1.1"
INSTALL
IMPORT
SIG · HUMANTIME-SERDE
H
humantime-serde
serializationrustv1.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

humantime
✓ use humantime_serde::serde::humantime;

Enables serialization/deserialization of Duration using human-readable strings.

use serde::{Serialize, Deserialize}; use humantime_serde::serde::humantime; #[derive(Serialize, Deserialize)] struct Config { #[serde(with = "humantime")] timeout: std::time::Duration, } let config: Config = toml::from_str("timeout = \"30s\"").unwrap(); println!("{:?}", config.timeout);
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
12
Resources
humantime-serde — cargo add humantime-serde · libregistry