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§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get the description of the rule
Provided Methods§
Sourcefn validate_schema(&self, _schema: &DFSchema) -> Result<bool, ValidationError>
fn validate_schema(&self, _schema: &DFSchema) -> Result<bool, ValidationError>
Validate the schema
Sourcefn validate_schema_with_ruleset(
&self,
schema: &DFSchema,
_rule_set: &RuleSet,
) -> Result<bool, ValidationError>
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".