Documentation for serde_test.

This commit is contained in:
Clar Charr
2017-02-27 20:09:31 -05:00
parent f944b453c4
commit 09e467cc4c
5 changed files with 131 additions and 2 deletions
+8
View File
@@ -5,11 +5,19 @@ use serde::{ser, de};
use token::Token;
/// Error returned by the test `Serializer` and `Deserializer`.
#[derive(Clone, PartialEq, Debug)]
pub enum Error {
/// A custom error.
Message(String),
/// `Deserialize` was expecting a struct of one name, and another was found.
InvalidName(&'static str),
/// `Serialize` generated a token that didn't match the test.
UnexpectedToken(Token<'static>),
/// The expected token list was too short.
EndOfTokens,
}