This commit is contained in:
Aleksey Kladov 2018-12-21 15:34:11 +03:00
parent 0ce82516c1
commit 052e20162a

View file

@ -1,3 +1,6 @@
/// `CompletionItem` describes a single completion variant in the editor pop-up.
/// It is basically a POD with various properties. To construct a
/// `CompletionItem`, use `new` method and the `Builder` struct.
#[derive(Debug)] #[derive(Debug)]
pub struct CompletionItem { pub struct CompletionItem {
label: String, label: String,
@ -41,6 +44,7 @@ impl CompletionItem {
} }
} }
/// A helper to make `CompletionItem`s.
#[must_use] #[must_use]
pub(crate) struct Builder { pub(crate) struct Builder {
label: String, label: String,
@ -76,6 +80,7 @@ impl Into<CompletionItem> for Builder {
} }
} }
/// Represents an in-progress set of completions being built.
#[derive(Debug)] #[derive(Debug)]
pub(crate) struct Completions { pub(crate) struct Completions {
buf: Vec<CompletionItem>, buf: Vec<CompletionItem>,