• d_k_bo@feddit.de
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    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")].