Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrono::Duration (chrono::TimeDelta) not supported even with chrono feature #357

Open
doivosevic opened this issue Dec 4, 2024 · 0 comments

Comments

@doivosevic
Copy link

I'm on chrono 0.4.38 and schemars 0.8.21.
I have chrono feature enabled for schemars.
The compiler is complaining that JsonSchema is not implemented for TimeDelta. Is this expected?

the trait bound `TimeDelta: JsonSchema` is not satisfied
the following other types implement trait `JsonSchema`:
  &'a T
  &'a mut T
  ()
  (T0, T1)
  (T0, T1, T2)
  (T0, T1, T2, T3)
  (T0, T1, T2, T3, T4)
  (T0, T1, T2, T3, T4, T5)
and 278 others
required for `(NaiveTime, TimeDelta)` to implement `JsonSchema`
1 redundant requirement hidden
required for `std::vec::Vec<(NaiveTime, TimeDelta)>` to implement `JsonSchema`rustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic message [0]?0#file:///git/qwe.rs)
_private.rs(126, 43): required by a bound in `insert_object_property
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant