Skip to main content

deep_search

Function deep_search 

Source
pub fn deep_search(
    dir: &Path,
    targets: &[&CatalogEntry],
    phrase: &str,
    opts: &DeepSearchOptions,
    cancel: &Atomic<bool>,
    on_event: &mut dyn FnMut(DeepEvent),
) -> DeepSummary
Expand description

Scan targets (in the given order — pass the current view order so newest sessions report first) for phrase. Hits and progress stream through on_event on the calling thread; set cancel from anywhere to stop (checked per message). A blank phrase returns immediately. Blocking — run it on spawn_blocking and forward events over a channel.