pub struct Planner;Expand description
Stateless query planner that decomposes user input into a QueryPlan.
Implementations§
Source§impl Planner
impl Planner
Sourcepub fn plan(pattern: &str, is_regex: bool) -> QueryPlan
pub fn plan(pattern: &str, is_regex: bool) -> QueryPlan
Plan a literal or regex query with default options (non-unicode,
case-sensitive). See plan_with_options
for full control.
Sourcepub fn plan_with_pool(
pattern: &str,
options: QueryOptions,
pool: &RegexPool,
) -> QueryPlan
pub fn plan_with_pool( pattern: &str, options: QueryOptions, pool: &RegexPool, ) -> QueryPlan
Plan a query using a regex pool to avoid redundant compilation.
Identical to plan_with_options but
sources compiled regexes from pool when available.
Sourcepub fn plan_with_options(pattern: &str, options: QueryOptions) -> QueryPlan
pub fn plan_with_options(pattern: &str, options: QueryOptions) -> QueryPlan
Plan a query with full options.
§Panics
Panics if Regex::new("") fails (which should never happen since an empty
pattern is always valid).
Auto Trait Implementations§
impl Freeze for Planner
impl RefUnwindSafe for Planner
impl Send for Planner
impl Sync for Planner
impl Unpin for Planner
impl UnsafeUnpin for Planner
impl UnwindSafe for Planner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more