Added support basic deserialization in derive

This commit is contained in:
Jan Michael Auer
2018-03-15 15:49:40 +01:00
committed by Armin Ronacher
parent 5ae06bba49
commit 6627540dd6
4 changed files with 48 additions and 20 deletions
+7
View File
@@ -255,6 +255,13 @@ macro_rules! declare_error_trait {
}
}
/// Raised when a `Deserialize` struct type recieved a field with an
/// unrecognized name but the names are not actually known because of
/// flattening.
fn unknow_field_in_flattened_structure(field: &str) -> Self {
Error::custom(format_args!("unknown field `{}`", field))
}
/// Raised when a `Deserialize` struct type expected to receive a required
/// field with a particular name but that field was not present in the
/// input.
-1
View File
@@ -13,7 +13,6 @@ pub use lib::fmt::{self, Formatter};
pub use lib::marker::PhantomData;
pub use lib::option::Option::{self, None, Some};
pub use lib::result::Result::{self, Err, Ok};
pub use lib::iter::once;
pub use self::string::from_utf8_lossy;