this post was submitted on 26 Oct 2023
13 points (93.3% liked)

Rust

6755 readers
36 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Therefore, if you want to define Serialize for OffsetDatetime for example, you need to use a wrapper type as a datetime formatter.

I think this example is a bit misleading because this specific type is usually (de-)serialized using #[serde(with = "time::serde::whatever")].