diff --git a/src/naive/mod.rs b/src/naive/mod.rs index c8c281b00e..4fd25b1b80 100644 --- a/src/naive/mod.rs +++ b/src/naive/mod.rs @@ -25,14 +25,18 @@ pub use self::time::NaiveTime; #[doc(hidden)] pub use self::internals::YearFlags as __BenchYearFlags; -/// Serialization/Deserialization of naive types in alternate formats +/// Serialization/Deserialization of naive types in alternate formats. /// -/// 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. +/// The various modules in here are intended to be used to serialize as something other than the +/// default ISO 8601 format. /// -/// [1]: https://serde.rs/attributes.html#field-attributes -/// [2]: https://tools.ietf.org/html/rfc3339 +/// They can be used by combining the module name with serde's [`with` annotation]. +/// Alternatively the individual `serialize` and `deserialize` functions in each module can be used +/// with serde's [`serialize_with`] and [`deserialize_with`] annotations. +/// +/// [`with` annotation]: https://serde.rs/attributes.html#field-attributes +/// [`serialize_with`]: https://serde.rs/field-attrs.html#serialize_with +/// [`deserialize_with`]: https://serde.rs/field-attrs.html#deserialize_with #[cfg(feature = "serde")] pub mod serde { pub use super::datetime::serde::*; diff --git a/src/serde.rs b/src/serde.rs index 89305808b1..a24946504a 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -1,12 +1,19 @@ //! Serialization/Deserialization with serde. //! -//! This module provides default implementations for `DateTime` using the [RFC 3339][1] format and -//! various alternatives for use with serde's [`with` annotation][2]. +//! This module provides default implementations for [`DateTime`] using the [RFC 3339] format and +//! various alternatives. +//! +//! The alternatives are for use with serde's [`with` annotation] combined with the module name. +//! Alternatively the individual `serialize` and `deserialize` functions in each module can be used +//! with serde's [`serialize_with`] and [`deserialize_with`] annotations. //! //! *Available on crate feature 'serde' only.* //! -//! [1]: https://tools.ietf.org/html/rfc3339 -//! [2]: https://serde.rs/field-attrs.html#with +//! [`DateTime`]: crate::DateTime +//! [RFC 3339]: https://tools.ietf.org/html/rfc3339 +//! [`with` annotation]: https://serde.rs/field-attrs.html#with +//! [`serialize_with`]: https://serde.rs/field-attrs.html#serialize_with +//! [`deserialize_with`]: https://serde.rs/field-attrs.html#deserialize_with use core::fmt; use serde::de;