pub trait Validate: Sized {
type Error: Into<ValidationError>;
fn validate_with_config(
&self,
config: &ValidationConfig
) -> Result<(), Self::Error>;
fn validate(&self) -> Result<(), Self::Error> { ... }
}Expand description
Validate an object
This trait is used automatically when inserting an object into a store.
Required Associated Types§
sourcetype Error: Into<ValidationError>
type Error: Into<ValidationError>
The error that validation of the implementing type can result in
Required Methods§
sourcefn validate_with_config(
&self,
config: &ValidationConfig
) -> Result<(), Self::Error>
fn validate_with_config(
&self,
config: &ValidationConfig
) -> Result<(), Self::Error>
Validate the object