Struct fuel_gql_client::schema::CompletionItem
source · [−]pub struct CompletionItem {
pub label: String,
pub length: Option<i64>,
pub selection_length: Option<i64>,
pub selection_start: Option<i64>,
pub sort_text: Option<String>,
pub start: Option<i64>,
pub text: Option<String>,
pub type_: Option<CompletionItemType>,
}
Expand description
CompletionItems are the suggestions returned from the CompletionsRequest.
Fields
label: String
The label of this completion item. By default this is also the text that is inserted when selecting this completion.
length: Option<i64>
This value determines how many characters are overwritten by the completion text. If missing the value 0 is assumed which results in the completion text being inserted.
selection_length: Option<i64>
Determines the length of the new selection after the text has been inserted (or replaced). The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0.
selection_start: Option<i64>
Determines the start of the new selection after the text has been inserted (or replaced). The start position must in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text.
sort_text: Option<String>
A string that should be used when comparing this item with other items. When falsy
the
label is used.
start: Option<i64>
This value determines the location (in the CompletionsRequest’s ‘text’ attribute) where the completion text is added. If missing the text is added at the location specified by the CompletionsRequest’s ‘column’ attribute.
text: Option<String>
If text is not falsy then it is inserted instead of the label.
type_: Option<CompletionItemType>
The item’s type. Typically the client uses this information to render the item in the UI with an icon.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for CompletionItem
impl Send for CompletionItem
impl Sync for CompletionItem
impl Unpin for CompletionItem
impl UnwindSafe for CompletionItem
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more