Skip to content

Commit

Permalink
Extend documentation a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbb committed Apr 2, 2019
1 parent f9d5fa0 commit cf89b47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions serde_with_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf89b47

Please sign in to comment.