aboutsummaryrefslogtreecommitdiff
path: root/crates/libanalysis/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libanalysis/src/lib.rs')
-rw-r--r--crates/libanalysis/src/lib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/libanalysis/src/lib.rs b/crates/libanalysis/src/lib.rs
index b044fdae8..9ae87d46c 100644
--- a/crates/libanalysis/src/lib.rs
+++ b/crates/libanalysis/src/lib.rs
@@ -68,6 +68,9 @@ impl AnalysisHost {
68 pub fn set_crate_graph(&mut self, graph: CrateGraph) { 68 pub fn set_crate_graph(&mut self, graph: CrateGraph) {
69 self.imp.set_crate_graph(graph) 69 self.imp.set_crate_graph(graph)
70 } 70 }
71 pub fn set_libraries(&mut self, libs: impl Iterator<Item=impl Iterator<Item=(FileId, String)>>) {
72 self.imp.set_libraries(libs)
73 }
71} 74}
72 75
73#[derive(Debug)] 76#[derive(Debug)]
@@ -114,6 +117,7 @@ pub struct Query {
114 query: String, 117 query: String,
115 lowercased: String, 118 lowercased: String,
116 only_types: bool, 119 only_types: bool,
120 libs: bool,
117 exact: bool, 121 exact: bool,
118 limit: usize, 122 limit: usize,
119} 123}
@@ -125,6 +129,7 @@ impl Query {
125 query, 129 query,
126 lowercased, 130 lowercased,
127 only_types: false, 131 only_types: false,
132 libs: false,
128 exact: false, 133 exact: false,
129 limit: usize::max_value() 134 limit: usize::max_value()
130 } 135 }
@@ -132,6 +137,9 @@ impl Query {
132 pub fn only_types(&mut self) { 137 pub fn only_types(&mut self) {
133 self.only_types = true; 138 self.only_types = true;
134 } 139 }
140 pub fn libs(&mut self) {
141 self.libs = true;
142 }
135 pub fn exact(&mut self) { 143 pub fn exact(&mut self) {
136 self.exact = true; 144 self.exact = true;
137 } 145 }