Clarify serde module contains defaults too in docs (#777)

Makes it more clear the serde module isn't *only* for alternatives it
is also required for the default implementations.
This commit is contained in:
Alexander Tesfamichael 2022-08-15 10:01:42 +02:00 committed by GitHub
parent 8275b13941
commit a383abf30e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -506,14 +506,15 @@ pub use traits::{Datelike, Timelike};
#[doc(hidden)]
pub use naive::__BenchYearFlags;
/// Serialization/Deserialization in alternate formats
/// Serialization/Deserialization with serde.
///
/// The various modules in here are intended to be used with serde's [`with`
/// annotation][1] to serialize as something other than the default [RFC
/// 3339][2] format.
/// This module provides default implementations for `DateTime` using the [RFC 3339][1] format and various
/// alternatives for use with serde's [`with` annotation][1].
///
/// [1]: https://serde.rs/attributes.html#field-attributes
/// [2]: https://tools.ietf.org/html/rfc3339
/// *Available on crate feature 'serde' only.*
///
/// [1]: https://tools.ietf.org/html/rfc3339
/// [2]: https://serde.rs/attributes.html#field-attributes
#[cfg(feature = "serde")]
pub mod serde {
pub use super::datetime::serde::*;