pub struct AnalyzerCodeAction {
pub title: String,
pub kind: CodeActionKind,
pub assist_id: Option<String>,
pub edits: Vec<TextEdit>,
pub file: PathBuf,
pub is_preferred: bool,
}Expand description
A code action from rust-analyzer
Fields§
§title: StringAction title (human readable)
kind: CodeActionKindAction kind
assist_id: Option<String>rust-analyzer assist ID (e.g., “fill_match_arms”)
edits: Vec<TextEdit>Text edits to apply
file: PathBufFile this action applies to
is_preferred: boolWhether this action is preferred
Implementations§
Source§impl AnalyzerCodeAction
impl AnalyzerCodeAction
Sourcepub fn has_mutation(&self) -> bool
pub fn has_mutation(&self) -> bool
Check if this action can be converted to a Mutation.
In v0.1.0 no CodeAction → Mutation mappings ship; the previous
fill_match_arms / add_missing_fields / add_explicit_type
derivations were removed because they require type-inference
infrastructure that is not yet wired through ASTRegApply.
Always returns false until those Mutations are reintroduced.
Trait Implementations§
Source§impl Clone for AnalyzerCodeAction
impl Clone for AnalyzerCodeAction
Source§fn clone(&self) -> AnalyzerCodeAction
fn clone(&self) -> AnalyzerCodeAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnalyzerCodeAction
impl Debug for AnalyzerCodeAction
Source§impl<'de> Deserialize<'de> for AnalyzerCodeAction
impl<'de> Deserialize<'de> for AnalyzerCodeAction
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AnalyzerCodeAction
impl RefUnwindSafe for AnalyzerCodeAction
impl Send for AnalyzerCodeAction
impl Sync for AnalyzerCodeAction
impl Unpin for AnalyzerCodeAction
impl UnsafeUnpin for AnalyzerCodeAction
impl UnwindSafe for AnalyzerCodeAction
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
Mutably borrows from an owned value. Read more