this post was submitted on 26 Oct 2023
10 points (91.7% liked)

Rust

6005 readers
5 users here now

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

Wormhole

!performance@programming.dev

Credits

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

founded 1 year ago
MODERATORS
top 1 comments
sorted by: hot top controversial new old
[–] d_k_bo@feddit.de 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")].