Skip to content

Commit

Permalink
Clarify serde module contains defaults too in docs (#777)
Browse files Browse the repository at this point in the history
Makes it more clear the serde module isn't *only* for alternatives it
is also required for the default implementations.
  • Loading branch information
alextes committed Aug 15, 2022
1 parent 8275b13 commit a383abf
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/lib.rs
Expand Up @@ -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::*;
Expand Down

0 comments on commit a383abf

Please sign in to comment.