diff options
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r-- | crates/ra_analysis/src/completion/completion_item.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/completion/completion_item.rs b/crates/ra_analysis/src/completion/completion_item.rs index 322a7c6be..445d6bf41 100644 --- a/crates/ra_analysis/src/completion/completion_item.rs +++ b/crates/ra_analysis/src/completion/completion_item.rs | |||
@@ -1,3 +1,6 @@ | |||
1 | /// `CompletionItem` describes a single completion variant in the editor pop-up. | ||
2 | /// It is basically a POD with various properties. To construct a | ||
3 | /// `CompletionItem`, use `new` method and the `Builder` struct. | ||
1 | #[derive(Debug)] | 4 | #[derive(Debug)] |
2 | pub struct CompletionItem { | 5 | pub struct CompletionItem { |
3 | label: String, | 6 | label: String, |
@@ -41,6 +44,7 @@ impl CompletionItem { | |||
41 | } | 44 | } |
42 | } | 45 | } |
43 | 46 | ||
47 | /// A helper to make `CompletionItem`s. | ||
44 | #[must_use] | 48 | #[must_use] |
45 | pub(crate) struct Builder { | 49 | pub(crate) struct Builder { |
46 | label: String, | 50 | label: String, |
@@ -76,6 +80,7 @@ impl Into<CompletionItem> for Builder { | |||
76 | } | 80 | } |
77 | } | 81 | } |
78 | 82 | ||
83 | /// Represents an in-progress set of completions being built. | ||
79 | #[derive(Debug)] | 84 | #[derive(Debug)] |
80 | pub(crate) struct Completions { | 85 | pub(crate) struct Completions { |
81 | buf: Vec<CompletionItem>, | 86 | buf: Vec<CompletionItem>, |