I've migrated Pavex, the web framework I'm working on, to jiff in this commit.
Things went pretty smoothly, the documentation was excellent all around.
There was only one instance that had me thinking "this could be better": this hunk. Graceful shutdown timeouts, time-to-live for sessions—these are all values that must be modelled as positive durations. I have therefore relied on std::time::Duration rather than jiff's SignedDuration.
Nonetheless, I want to give users the possibility to pass these configuration values using a human-readable format (e.g. 2 minutes), a job I used to delegate to the humantime crate.
I wonder: would it possible for jiff to add facilities to parse std::time::Duration in the same way it currently parses SignedDuration?
I'm naively assuming that:
- Most of the parsing logic would be identical, sign aside
- It would show up as an additional module (e.g.
std_duration?) under jiff::fmt::serde.
I've migrated Pavex, the web framework I'm working on, to
jiffin this commit.Things went pretty smoothly, the documentation was excellent all around.
There was only one instance that had me thinking "this could be better": this hunk. Graceful shutdown timeouts, time-to-live for sessions—these are all values that must be modelled as positive durations. I have therefore relied on
std::time::Durationrather thanjiff'sSignedDuration.Nonetheless, I want to give users the possibility to pass these configuration values using a human-readable format (e.g.
2 minutes), a job I used to delegate to thehumantimecrate.I wonder: would it possible for
jiffto add facilities to parsestd::time::Durationin the same way it currently parsesSignedDuration?I'm naively assuming that:
std_duration?) underjiff::fmt::serde.