You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib.rs
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,15 @@ mod utils;
8
8
9
9
/// The main macro of this crate.
10
10
/// Use it to define default values of fields in structs you [`Serialize`] or [`Deserialize`].
11
-
/// You do not need to create a extra function to provide the default value, as it is the case in serdes' implementation of default (`#[serde(default = "...")]`).
11
+
/// You do not need to create an extra function to provide the default value, as it is the case in
12
+
/// serdes' implementation of default (`#[serde(default = "...")]`).
12
13
///
13
-
/// Set this macro on a struct where you use [`Serialize`] or [`Deserialize`] and use `#[serde_inline_default(...)]` on the field you want to have a inline default value.
14
-
/// Replace the `...` with the value you want and it will be set as default if serde needs it.
14
+
/// Set this macro on a struct where you use [`Serialize`] or [`Deserialize`] and use
15
+
/// `#[serde_inline_default(...)]` on the field you want to have an inline default value.
16
+
/// Replace the `...` with the value you want, and it will be set as default if serde needs it.
15
17
///
16
-
/// Note that you must set this macro _before_ `#[derive(Serialize)]` / `#[derive(Deserialize)]` as it wouldn't work properly if set after the derive.
18
+
/// Note that you must set this macro _before_ `#[derive(Serialize)]` / `#[derive(Deserialize)]` as
19
+
/// it won't work properly if it's set after the derive.
0 commit comments