sift_core/search/request/
mod.rs1use crate::Candidate;
2use crate::search::output::SearchOutput;
3use crate::search::output::style::SearchSeparators;
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq)]
6pub enum LinkTraversal {
7 DoNotFollow,
8 Follow,
9}
10
11#[derive(Debug, Clone, Copy, PartialEq, Eq)]
12pub struct WalkOptions {
13 pub links: LinkTraversal,
14 pub max_depth: Option<usize>,
15 pub max_filesize: Option<u64>,
16 pub one_file_system: bool,
17}
18
19impl Default for WalkOptions {
20 fn default() -> Self {
21 Self {
22 links: LinkTraversal::DoNotFollow,
23 max_depth: None,
24 max_filesize: None,
25 one_file_system: false,
26 }
27 }
28}
29
30#[derive(Clone)]
31pub struct SearchExecution<'a> {
32 pub candidates: Vec<Candidate>,
33 pub output: SearchOutput,
34 pub separators: &'a SearchSeparators,
35 pub collect_stats: bool,
36}