aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-02-16 11:43:59 +0000
committerAleksey Kladov <[email protected]>2019-02-16 12:15:52 +0000
commit2d131d63f92c932d8416367e530bc71300025c16 (patch)
treea5dd0bda4118597e621fff5a93737d42b095e68b
parent13f464edbdb5d9c0c54a84318c1fb81f613f3444 (diff)
document design guideline
-rw-r--r--crates/ra_ide_api/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs
index d77a56ce8..1746b58ae 100644
--- a/crates/ra_ide_api/src/lib.rs
+++ b/crates/ra_ide_api/src/lib.rs
@@ -200,6 +200,12 @@ pub struct Analysis {
200 db: salsa::Snapshot<db::RootDatabase>, 200 db: salsa::Snapshot<db::RootDatabase>,
201} 201}
202 202
203// As a general design guideline, `Analysis` API are intended to be independent
204// from the language server protocol. That is, when exposing some functionality
205// we should think in terms of "what API makes most sense" and not in terms of
206// "what types LSP uses". Although currently LSP is the only consumer of the
207// API, the API should in theory be usable as a library, or via a different
208// protocol.
203impl Analysis { 209impl Analysis {
204 /// Debug info about the current state of the analysis 210 /// Debug info about the current state of the analysis
205 pub fn status(&self) -> String { 211 pub fn status(&self) -> String {