pub struct SearchCtx<'a> {
pub matcher: &'a RegexMatcher,
pub sep: char,
pub globs: Option<&'a Globs>,
pub max_count: Option<u64>,
pub drop_cache: bool,
pub count_mode: bool,
}Expand description
Everything a search needs that is the same for every archive in a run.
Borrowed and shared across the whole scheduler: it is Sync, so one
instance is read by every worker. The per-job values — the path, the
Searcher, the printer, and the inflate strategy — stay as arguments,
because each worker must own its own (Searcher is not Sync) and the
strategy is chosen per file from its size.
Fields§
§matcher: &'a RegexMatcher§sep: char§globs: Option<&'a Globs>§max_count: Option<u64>§drop_cache: boolA request, not a decision: open_decoded_dropping narrows it to
archives, so a plain live logfile is never evicted.
count_mode: boolWhether the run is in -c mode. Not used to choose a printer — cli
already did that — only to decide whether a suppressed count is worth a
note on stderr.
Auto Trait Implementations§
impl<'a> Freeze for SearchCtx<'a>
impl<'a> RefUnwindSafe for SearchCtx<'a>
impl<'a> Send for SearchCtx<'a>
impl<'a> Sync for SearchCtx<'a>
impl<'a> Unpin for SearchCtx<'a>
impl<'a> UnsafeUnpin for SearchCtx<'a>
impl<'a> UnwindSafe for SearchCtx<'a>
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