Skip to main content

PushdownRule

Trait PushdownRule 

Source
pub trait PushdownRule: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn try_convert(
        &self,
        expr: &Expression,
        ctx: &PushdownContext<'_>,
    ) -> PushdownResult;
}
Expand description

Trait for pushdown rules

Each rule is responsible for:

  1. Checking if it can handle an expression
  2. Converting the expression to a storage expression

Required Methods§

Source

fn name(&self) -> &'static str

Rule name for debugging and logging

Source

fn try_convert( &self, expr: &Expression, ctx: &PushdownContext<'_>, ) -> PushdownResult

Try to convert an expression to a storage expression.

Returns:

  • Converted(expr) if successfully converted
  • NotApplicable if this rule doesn’t handle this expression type
  • CannotPush if the expression matches but cannot be pushed down

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§