From cf89b4758b584ba2f61f03578fccf850ff3de579 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Tue, 2 Apr 2019 21:16:16 +0200 Subject: [PATCH] Extend documentation a bit --- serde_with_macros/src/lib.rs | 6 +++--- src/lib.rs | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/serde_with_macros/src/lib.rs b/serde_with_macros/src/lib.rs index 1d51a93a..81af895f 100644 --- a/serde_with_macros/src/lib.rs +++ b/serde_with_macros/src/lib.rs @@ -85,9 +85,9 @@ use syn::{ /// The `serialize_always` cannot be used together with a manual `skip_serializing_if` annotations, as these conflict in their meaning. /// A compile error will be generated if this occurs. /// -/// The `skip_serializing_none` only works if the type is called `Option`, `std::option::Option`, or `core::option::Option`. -/// Type aliasing on `Option` and giving it another name, will cause this field to be ignored. -/// This cannot be supported, as proc-macros run before type checking, thus it is not possible to determine if a type alias refers to an `Option`. +/// The `skip_serializing_none` only works if the type is called [`Option`], [`std::option::Option`], or [`core::option::Option`]. +/// Type aliasing an [`Option`] and giving it another name, will cause this field to be ignored. +/// This cannot be supported, as proc-macros run before type checking, thus it is not possible to determine if a type alias refers to an [`Option`]. /// /// ```rust,ignore /// # extern crate serde; diff --git a/src/lib.rs b/src/lib.rs index 0101fcad..c7e50c17 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,6 +74,13 @@ //! //! However, this will prohibit you from applying deserialize on the value returned by serializing a struct. //! +//! # Attributes +//! +//! The crate comes with custom attributes, which futher extend how serde serialization can be customized. +//! They are enabled by default, but can be disabled, by removing the default features from this crate. +//! +//! [The documentation for the custom attributes can be found here.](serde_with_macros) +//! //! [with-annotation]: https://serde.rs/field-attrs.html#serdewith--module //! [serde#553]: https://github.com/serde-rs/serde/issues/553