mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
docs
This commit is contained in:
@@ -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)]
|
||||
pub struct CompletionItem {
|
||||
label: String,
|
||||
@@ -41,6 +44,7 @@ pub fn insert_text(&self) -> InsertText {
|
||||
}
|
||||
}
|
||||
|
||||
/// A helper to make `CompletionItem`s.
|
||||
#[must_use]
|
||||
pub(crate) struct Builder {
|
||||
label: String,
|
||||
@@ -76,6 +80,7 @@ fn into(self) -> CompletionItem {
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents an in-progress set of completions being built.
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct Completions {
|
||||
buf: Vec<CompletionItem>,
|
||||
|
||||
Reference in New Issue
Block a user