Allow to define custom expectation message for type with #[serde(expecting = "...")]

Closes #1883
This commit is contained in:
Mingun
2020-10-23 00:54:13 +05:00
parent 23c14e5f33
commit 104ad9a7dd
6 changed files with 287 additions and 5 deletions
+1
View File
@@ -35,6 +35,7 @@ pub const TRY_FROM: Symbol = Symbol("try_from");
pub const UNTAGGED: Symbol = Symbol("untagged");
pub const VARIANT_IDENTIFIER: Symbol = Symbol("variant_identifier");
pub const WITH: Symbol = Symbol("with");
pub const EXPECTING: Symbol = Symbol("expecting");
impl PartialEq<Symbol> for Ident {
fn eq(&self, word: &Symbol) -> bool {