//! This file provides the `CompilableTo<T>` trait.
use Issue;
/// 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.