Validate

Trait Validate 

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§