You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/project/src/project_search.rs
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -40,21 +40,26 @@ pub struct Search {
40
40
kind:SearchKind,
41
41
}
42
42
43
+
/// Represents search setup, before it is actually kicked off with Search::into_results
43
44
enumSearchKind{
45
+
/// Search for candidates by inspecting file contents on file system, avoiding loading the buffer unless we know that a given file contains a match.
44
46
Local{
45
47
fs:Arc<dynFs>,
46
48
worktrees:Vec<Entity<Worktree>>,
47
49
},
50
+
/// Query remote host for candidates. As of writing, the host runs a local search in "buffers with matches only" mode.
48
51
Remote{
49
52
client:AnyProtoClient,
50
53
remote_id:u64,
51
54
models:Arc<Mutex<RemotelyCreatedModels>>,
52
55
},
56
+
/// Run search against a known set of candidates. Even when working with a remote host, this won't round-trip to host.
53
57
OpenBuffersOnly,
54
58
}
55
59
56
60
/// Represents results of project search and allows one to either obtain match positions OR
57
-
/// just the handles to buffers that may match the search.
61
+
/// just the handles to buffers that may match the search. Grabbing the handles is cheaper than obtaining full match positions, because in that case we'll look for
0 commit comments