Struct lsp_types::CodeActionKind
source · pub struct CodeActionKind(/* private fields */);
Implementations§
source§impl CodeActionKind
impl CodeActionKind
sourcepub const EMPTY: CodeActionKind = _
pub const EMPTY: CodeActionKind = _
Empty kind.
sourcepub const QUICKFIX: CodeActionKind = _
pub const QUICKFIX: CodeActionKind = _
Base kind for quickfix actions: ‘quickfix’
sourcepub const REFACTOR: CodeActionKind = _
pub const REFACTOR: CodeActionKind = _
Base kind for refactoring actions: ‘refactor’
sourcepub const REFACTOR_EXTRACT: CodeActionKind = _
pub const REFACTOR_EXTRACT: CodeActionKind = _
Base kind for refactoring extraction actions: ‘refactor.extract’
Example extract actions:
- Extract method
- Extract function
- Extract variable
- Extract interface from class
- …
sourcepub const REFACTOR_INLINE: CodeActionKind = _
pub const REFACTOR_INLINE: CodeActionKind = _
Base kind for refactoring inline actions: ‘refactor.inline’
Example inline actions:
- Inline function
- Inline variable
- Inline constant
- …
sourcepub const REFACTOR_REWRITE: CodeActionKind = _
pub const REFACTOR_REWRITE: CodeActionKind = _
Base kind for refactoring rewrite actions: ‘refactor.rewrite’
Example rewrite actions:
- Convert JavaScript function to class
- Add or remove parameter
- Encapsulate field
- Make method static
- Move method to base class
- …
sourcepub const SOURCE: CodeActionKind = _
pub const SOURCE: CodeActionKind = _
Base kind for source actions: source
Source code actions apply to the entire file.
sourcepub const SOURCE_ORGANIZE_IMPORTS: CodeActionKind = _
pub const SOURCE_ORGANIZE_IMPORTS: CodeActionKind = _
Base kind for an organize imports source action: source.organizeImports
sourcepub const SOURCE_FIX_ALL: CodeActionKind = _
pub const SOURCE_FIX_ALL: CodeActionKind = _
Base kind for a ‘fix all’ source action: source.fixAll
.
‘Fix all’ actions automatically fix errors that have a clear fix that do not require user input. They should not suppress errors or perform unsafe fixes such as generating new types or classes.
@since 3.17.0
pub const fn new(tag: &'static str) -> Self
pub fn as_str(&self) -> &str
Trait Implementations§
source§impl Clone for CodeActionKind
impl Clone for CodeActionKind
source§fn clone(&self) -> CodeActionKind
fn clone(&self) -> CodeActionKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CodeActionKind
impl Debug for CodeActionKind
source§impl<'de> Deserialize<'de> for CodeActionKind
impl<'de> Deserialize<'de> for CodeActionKind
source§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>,
source§impl From<&'static str> for CodeActionKind
impl From<&'static str> for CodeActionKind
source§impl From<String> for CodeActionKind
impl From<String> for CodeActionKind
source§impl Hash for CodeActionKind
impl Hash for CodeActionKind
source§impl PartialEq for CodeActionKind
impl PartialEq for CodeActionKind
source§impl PartialOrd for CodeActionKind
impl PartialOrd for CodeActionKind
source§impl Serialize for CodeActionKind
impl Serialize for CodeActionKind
impl Eq for CodeActionKind
impl StructuralPartialEq for CodeActionKind
Auto Trait Implementations§
impl Freeze for CodeActionKind
impl RefUnwindSafe for CodeActionKind
impl Send for CodeActionKind
impl Sync for CodeActionKind
impl Unpin for CodeActionKind
impl UnwindSafe for CodeActionKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.