Skip to main content

SchemaRule

Trait SchemaRule 

Source
pub trait SchemaRule:
    Send
    + Sync
    + Debug {
    // Required methods
    fn name(&self) -> &str;
    fn description(&self) -> &str;

    // Provided methods
    fn validate_schema(
        &self,
        _schema: &DFSchema,
    ) -> Result<bool, ValidationError> { ... }
    fn validate_schema_with_ruleset(
        &self,
        schema: &DFSchema,
        _rule_set: &RuleSet,
    ) -> Result<bool, ValidationError> { ... }
}
Expand description

Trait for schema-level rules

Required Methods§

Source

fn name(&self) -> &str

Get the name of the rule

Source

fn description(&self) -> &str

Get the description of the rule

Provided Methods§

Source

fn validate_schema(&self, _schema: &DFSchema) -> Result<bool, ValidationError>

Validate the schema

Source

fn validate_schema_with_ruleset( &self, schema: &DFSchema, _rule_set: &RuleSet, ) -> Result<bool, ValidationError>

Validate the schema with access to the RuleSet

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§