pub trait Validate: Sized {
// Required method
fn validate(
&self,
config: &ValidationConfig,
errors: &mut Vec<ValidationError>,
geometry: &Geometry
);
// Provided method
fn validate_and_return_first_error(
&self,
geometry: &Geometry
) -> Result<(), ValidationError> { ... }
}
Expand description
Validate an object
This trait is used automatically when inserting an object into a store.
Required Methods§
sourcefn validate(
&self,
config: &ValidationConfig,
errors: &mut Vec<ValidationError>,
geometry: &Geometry
)
fn validate( &self, config: &ValidationConfig, errors: &mut Vec<ValidationError>, geometry: &Geometry )
Validate the object
Provided Methods§
sourcefn validate_and_return_first_error(
&self,
geometry: &Geometry
) -> Result<(), ValidationError>
fn validate_and_return_first_error( &self, geometry: &Geometry ) -> Result<(), ValidationError>
Validate the object using default config and return on first error
Object Safety§
This trait is not object safe.