pub trait Validatable { type Error; // Required method fn validate(&self) -> Result<(), Self::Error>; }
A trait indicating that an entity class can be validated
This trait is used for validating the data of objects.
Validation error type
Validates whether the data of this entity is valid
Ok(()) if the data is valid; otherwise returns Err containing the validation error
Ok(())
Err