Skip to content

Commit

Permalink
Merge pull request #153 from ComunidadAylas/master
Browse files Browse the repository at this point in the history
Document `expecting` container attribute
  • Loading branch information
dtolnay committed Aug 5, 2023
2 parents b33520f + 12bb7d4 commit fe8821a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _src/container-attrs.md
Expand Up @@ -114,3 +114,9 @@
Specify a path to the `serde` crate instance to use when referring to Serde
APIs from generated code. This is normally only applicable when invoking
re-exported Serde derives from a public macro in a different crate.

- ##### `#[serde(expecting = "...")]` {#expecting}

Specify a custom type expectation text for deserialization error messages.
This is used by the generated `expecting` method for the container `Visitor`,
and as a fallthrough error message for untagged enums.

0 comments on commit fe8821a

Please sign in to comment.