Skip to content

Commit fe8821a

Browse files
authored
Merge pull request #153 from ComunidadAylas/master
Document `expecting` container attribute
2 parents b33520f + 12bb7d4 commit fe8821a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

_src/container-attrs.md

+6
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,9 @@
114114
Specify a path to the `serde` crate instance to use when referring to Serde
115115
APIs from generated code. This is normally only applicable when invoking
116116
re-exported Serde derives from a public macro in a different crate.
117+
118+
- ##### `#[serde(expecting = "...")]` {#expecting}
119+
120+
Specify a custom type expectation text for deserialization error messages.
121+
This is used by the generated `expecting` method for the container `Visitor`,
122+
and as a fallthrough error message for untagged enums.

0 commit comments

Comments
 (0)