review the internal schema to allow to create schema without identifier; fix #513

This commit is contained in:
qdequele
2020-03-05 18:29:10 +01:00
parent 16a99aa95e
commit 86c3482cbd
11 changed files with 312 additions and 129 deletions

View File

@ -6,6 +6,7 @@ pub type SResult<T> = Result<T, Error>;
#[derive(Debug)]
pub enum Error {
FieldNameNotFound(String),
IdentifierAlreadyPresent,
MaxFieldsLimitExceeded,
}
@ -14,6 +15,7 @@ impl fmt::Display for Error {
use self::Error::*;
match self {
FieldNameNotFound(field) => write!(f, "The field {:?} doesn't exist", field),
IdentifierAlreadyPresent => write!(f, "The schema already have an identifier. It's impossible to update it"),
MaxFieldsLimitExceeded => write!(f, "The maximum of possible reattributed field id has been reached"),
}
}