27 lines
703 B
Rust
27 lines
703 B
Rust
|
|
use isolang::Language;
|
||
|
|
use super::message::{Field, FieldType, Name};
|
||
|
|
use uuid::Uuid;
|
||
|
|
|
||
|
|
#[derive(Clone, Debug)]
|
||
|
|
pub enum MTTError {
|
||
|
|
AdditionMissingField(Name),
|
||
|
|
CannotConvertMessageToRouteID,
|
||
|
|
DocumentAlreadyExists(String),
|
||
|
|
DocumentFieldAlreadyExists(String, Field),
|
||
|
|
DocumentFieldMissing(String),
|
||
|
|
DocumentFieldNotFound(String),
|
||
|
|
DocumentFieldWrongDataType(FieldType, FieldType),
|
||
|
|
DocumentNotFound(String),
|
||
|
|
FieldDuplicate,
|
||
|
|
FieldInvalidType,
|
||
|
|
FieldMissingData,
|
||
|
|
InvalidNone,
|
||
|
|
RecordMismatch,
|
||
|
|
NameDuplicate(Name),
|
||
|
|
NameInvalidID(Uuid),
|
||
|
|
NameMissingTranslation(Language),
|
||
|
|
NameNotFound(Name),
|
||
|
|
QueryCannotChangeData,
|
||
|
|
RouteRequiresDocumentID,
|
||
|
|
}
|