Cargo Features
Dur has no features set by default.
[dependencies]
dur = { version = "0.5.3", features = ["std", "alloc", "clap", "serde"] }
- std clap? = alloc
-
Makes
Error
implement thestd::error::Error
trait. (Automatically enables thealloc
feature). - alloc serde? std?
-
Enables slightly better error messages by adding the offending string to variant
Error::InvalidUnit
- clap = std
-
Enables using Duration directly as an argument in clap.
With error-context and std
- serde = alloc
-
Enables Duration de/serialization through serde.
With alloc