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§

source

fn validate( &self, config: &ValidationConfig, errors: &mut Vec<ValidationError>, geometry: &Geometry )

Validate the object

Provided Methods§

source

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.

Implementors§