Separating elements from their parts.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s

This commit is contained in:
2025-12-24 17:54:25 -05:00
parent 9df6c4db42
commit 44850710df
3 changed files with 49 additions and 29 deletions

26
src/mtterror.rs Normal file
View File

@@ -0,0 +1,26 @@
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,
}