pub trait RuleValidator: Send + Sync {
// Required methods
fn validate(
&self,
document: &ParsedDocument,
schema: &GraphQLSchema,
) -> Result<(), ValidationError>;
fn rule(&self) -> ValidationRule;
}Expand description
Rule validator trait
Required Methods§
Sourcefn validate(
&self,
document: &ParsedDocument,
schema: &GraphQLSchema,
) -> Result<(), ValidationError>
fn validate( &self, document: &ParsedDocument, schema: &GraphQLSchema, ) -> Result<(), ValidationError>
Validate the rule
Sourcefn rule(&self) -> ValidationRule
fn rule(&self) -> ValidationRule
Get the rule type