Operator

Trait Operator 

Source
pub trait Operator: Send + Sync {
    // Required methods
    fn execute(&self, value: &str) -> OperatorResult;
    fn name(&self) -> &'static str;

    // Provided method
    fn supports_capture(&self) -> bool { ... }
}
Expand description

Trait for all operators.

Required Methods§

Source

fn execute(&self, value: &str) -> OperatorResult

Execute the operator against a value.

Source

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

Get the operator name.

Provided Methods§

Source

fn supports_capture(&self) -> bool

Whether this operator supports capture groups.

Implementors§