pub trait Validate2: 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
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