Adds a functionality to easily convert between toml_datetime
's and
chrono
's/time
's types.
Both with the serde
derive macros:
```rust
struct SomeDateTimes {
#[serde(with = "tomldatetimecompat")]
chrononaivedate: chrono::NaiveDate,
#[serde(with = "tomldatetimecompat")]
chrononaivetime: chrono::NaiveTime,
#[serde(with = "tomldatetimecompat")]
chrononaivedatetime: chrono::NaiveDateTime,
#[serde(with = "tomldatetimecompat")]
chronodatetimeutc: chrono::DateTime
And by introducing a new trait ToFromToml
that adds to_toml
and from_toml
functions to the relevant structs from chrono
and time
.