[−][src]Trait ieql::common::compilation::CompilableTo
The CompilableTo<T>
trait specifies the compilation interface for each
of IEQL's compilable internals, including Document
s and Query
groups,
among others.
The fundamental idea of compilation in the Rust IEQL implementation is that
every component of a scan has a certain amount of 'overhead'—that is, logic
that must be repeated. For example, in Pattern
s, the RegEx must be composed
by the RegEx library into something that can be used to scan text. This is a
relatively expensive operation, and therefore it makes no sense to perform it
multiple times.
In essence, compilation performs the repeated expensive logic for various IEQL components ahead of time to save time later.
Required methods
fn compile(&self) -> Result<T, Issue>
Returns a compiled version of self
, without using self.
Importantly, compiling a component will perform a deep clone on that
component. Remember: compilation is expensive!
Implementors
impl CompilableTo<CompiledPattern> for Pattern
[src]
impl CompilableTo<CompiledPattern> for Pattern
fn compile(&self) -> Result<CompiledPattern, Issue> | [src] |
This function compiles the Pattern
into a CompiledPattern
by
escaping the RegEx expression as necessary and then compiling it.
impl CompilableTo<CompiledDocument> for Document
[src]
impl CompilableTo<CompiledDocument> for Document
fn compile(&self) -> Result<CompiledDocument, Issue> | [src] |
impl CompilableTo<CompiledDocumentBatch> for DocumentBatch
[src]
impl CompilableTo<CompiledDocumentBatch> for DocumentBatch
fn compile(&self) -> Result<CompiledDocumentBatch, Issue> | [src] |
impl CompilableTo<CompiledQuery> for Query
[src]
impl CompilableTo<CompiledQuery> for Query
fn compile(&self) -> Result<CompiledQuery, Issue> | [src] |
Compiles the Query
into a CompiledQuery
. Like all compilation
operations, this is expensive.
impl CompilableTo<CompiledQueryGroup> for QueryGroup
[src]
impl CompilableTo<CompiledQueryGroup> for QueryGroup
fn compile(&self) -> Result<CompiledQueryGroup, Issue> | [src] |
Compiles the QueryGroup
into a CompiledQueryGroup
. Like
all compilation operations, this is expensive.
impl CompilableTo<CompiledScope> for Scope
[src]
impl CompilableTo<CompiledScope> for Scope
fn compile(&self) -> Result<CompiledScope, Issue> | [src] |
impl CompilableTo<CompiledTrigger> for Trigger
[src]
impl CompilableTo<CompiledTrigger> for Trigger
fn compile(&self) -> Result<CompiledTrigger, Issue> | [src] |