pub struct CompiledQuery { /* private fields */ }Expand description
A compiled search: everything about the query — the source text,
the whole-word flag (*/# fold it in here, so no consumer
re-filters), the case mode (\c/\C), and the program.
Deterministic compilation makes equality source-level: two queries with the same text and whole-word flag are the same query.
Implementations§
Source§impl CompiledQuery
impl CompiledQuery
Sourcepub fn compile(pattern: &str, whole_word: bool) -> Result<Self, QueryError>
pub fn compile(pattern: &str, whole_word: bool) -> Result<Self, QueryError>
Compile pattern in Vim magic syntax. whole_word flanks the
match with word-boundary assertions (the */# search shape).
Sourcepub fn cancellable(&self, cancel: Arc<AtomicBool>) -> Self
pub fn cancellable(&self, cancel: Arc<AtomicBool>) -> Self
Attach only a work owner’s cooperative stop flag. It changes no query semantics and is never serialized with the source-level command.
Sourcepub fn whole_word(&self) -> bool
pub fn whole_word(&self) -> bool
Whether matches are flanked to whole words (render and n/N
ask this instead of re-implementing the filter).
Trait Implementations§
Source§impl Clone for CompiledQuery
impl Clone for CompiledQuery
Source§fn clone(&self) -> CompiledQuery
fn clone(&self) -> CompiledQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompiledQuery
impl Debug for CompiledQuery
Source§impl<'de> Deserialize<'de> for CompiledQuery
impl<'de> Deserialize<'de> for CompiledQuery
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CompiledQuery
Source§impl PartialEq for CompiledQuery
impl PartialEq for CompiledQuery
Auto Trait Implementations§
impl Freeze for CompiledQuery
impl RefUnwindSafe for CompiledQuery
impl Send for CompiledQuery
impl Sync for CompiledQuery
impl Unpin for CompiledQuery
impl UnsafeUnpin for CompiledQuery
impl UnwindSafe for CompiledQuery
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