mirror of
https://github.com/chronotope/chrono.git
synced 2025-10-02 07:21:41 +00:00
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:
parent
8275b13941
commit
a383abf30e
13
src/lib.rs
13
src/lib.rs
@ -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::*;
|
||||
|
Loading…
x
Reference in New Issue
Block a user