How do I convert a Span to a std::time::Duration?
#336
-
|
How is it possible to use jiff types with library functions? For instance, It would be great to have an So my more general question is, how do I convert to and from std::time types? |
Beta Was this translation helpful? Give feedback.
Answered by
BurntSushi
Apr 24, 2025
Replies: 1 comment 1 reply
-
|
A Have you seen these parts of the docs? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
BurntSushi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A
impl From<Span> for std::time::Durationis fundamentally impossible.Have you seen these parts of the docs?
std::time::Durationandjiff::SignedDurationSpan::to_durationimpl TryFrom<jiff::SignedDuration> for std::time::DurationSignedDurationversusSpan?