pub trait RunnableContext {
// Required methods
fn run(
&mut self,
data: WafMap,
timeout: Duration,
) -> Result<RunResult, RunError>;
fn run_batches(
&mut self,
data: WafArray,
timeout: Duration,
) -> Result<RunResult, RunError>;
}Expand description
Common waf evaluation interface for Context and Subcontext.
Required Methods§
Sourcefn run(
&mut self,
data: WafMap,
timeout: Duration,
) -> Result<RunResult, RunError>
fn run( &mut self, data: WafMap, timeout: Duration, ) -> Result<RunResult, RunError>
Evaluates the configured ruleset against the provided address data, and returns the result of this evaluation.
§Errors
Returns an error if the WAF encountered an internal error, invalid object, or invalid argument while processing the request.
Sourcefn run_batches(
&mut self,
data: WafArray,
timeout: Duration,
) -> Result<RunResult, RunError>
fn run_batches( &mut self, data: WafArray, timeout: Duration, ) -> Result<RunResult, RunError>
Evaluates multiple batches of address data in sequence, and returns a combined result.
Each element in data must be a WafMap containing address data. Addresses from earlier
batches remain available while later batches are evaluated.
§Errors
Returns an error if the WAF encountered an internal error, invalid object, or invalid argument while processing the request.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".