Struct lsp_types::CodeAction [−][src]
Fields
title: StringA short, human-readable, title for this code action.
kind: Option<CodeActionKind>The kind of the code action. Used to filter code actions.
diagnostics: Option<Vec<Diagnostic>>The diagnostics that this code action resolves.
edit: Option<WorkspaceEdit>The workspace edit this code action performs.
command: Option<Command>A command this code action executes. If a code action provides an edit and a command, first the edit is executed and then the command.
is_preferred: Option<bool>Marks this as a preferred action. Preferred actions are used by the auto fix command and can be targeted
by keybindings.
A quick fix should be marked preferred if it properly addresses the underlying error.
A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
since 3.15.0
disabled: Option<CodeActionDisabled>Marks that the code action cannot currently be applied.
Clients should follow the following guidelines regarding disabled code actions:
-
Disabled code actions are not shown in automatic lightbulb code action menu.
-
Disabled actions are shown as faded out in the code action menu when the user request a more specific type of code action, such as refactorings.
-
If the user has a keybinding that auto applies a code action and only a disabled code actions are returned, the client should show the user an error message with
reasonin the editor.
since 3.16.0
data: Option<Value>A data entry field that is preserved on a code action between
a textDocument/codeAction and a codeAction/resolve request.
since 3.16.0
Trait Implementations
impl Clone for CodeAction[src]
fn clone(&self) -> CodeAction[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for CodeAction[src]
impl Default for CodeAction[src]
fn default() -> CodeAction[src]
impl<'de> Deserialize<'de> for CodeAction[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
__D: Deserializer<'de>,
impl From<CodeAction> for CodeActionOrCommand[src]
fn from(action: CodeAction) -> Self[src]
impl PartialEq<CodeAction> for CodeAction[src]
fn eq(&self, other: &CodeAction) -> bool[src]
fn ne(&self, other: &CodeAction) -> bool[src]
impl Serialize for CodeAction[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer, [src]
__S: Serializer,
impl StructuralPartialEq for CodeAction[src]
Auto Trait Implementations
impl RefUnwindSafe for CodeAction[src]
impl Send for CodeAction[src]
impl Sync for CodeAction[src]
impl Unpin for CodeAction[src]
impl UnwindSafe for CodeAction[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,