Skip to main content

FixAction

Struct FixAction 

Source
pub struct FixAction {
    pub kind: FixActionType,
    pub auto_fixable: bool,
    pub description: String,
    pub note: Option<String>,
    pub available_in_catalogs: Option<Vec<String>>,
    pub suggested_target: Option<String>,
}
Expand description

A code-change fix. type is one of the kebab-case identifiers in FixActionType.

Fields§

§kind: FixActionType

Kebab-case identifier for the fix action.

§auto_fixable: bool

Whether fallow fix can apply this fix automatically. Evaluated PER FINDING, not per action type: the same type may carry auto_fixable: true on one finding and auto_fixable: false on another when per-instance guards in the applier discriminate (e.g. remove-catalog-entry flips on hardcoded_consumers and catalog source file, the primary dependency action flips between remove-dependency / move-dependency on used_in_workspaces). Filter on this bool of each individual action, not on type. See the IssueAction enum-level docs for the full list of per-instance flips.

One flip is RUN-level rather than finding-level: a dead-code finding carrying reachability_caveats reports false here, because a file this run never fully read may hold the reference that credits it. Every mutation surface honours the same gate, so a plan built from this flag never expects a write fallow fix, the MCP fix tools, or the LSP quick fix will refuse. The action stays in the array at the same position and names the reason in Self::note.

§description: String

Human-readable description of the fix.

§note: Option<String>

Optional context note. Present on non-auto-fixable actions, and on auto-fixable re-export findings to warn about public API surface.

§available_in_catalogs: Option<Vec<String>>

Only present on update-catalog-reference actions: catalogs in the same workspace that DO declare the package, sorted lexicographically. Lets agents pick the catalog to switch to without re-reading the source.

§suggested_target: Option<String>

Only present on update-catalog-reference actions when exactly one alternative catalog declares the package: the unambiguous switch target. Lets deterministic (non-LLM) agents land the edit without picking from a list. Absent when available_in_catalogs has zero or more than one entry.

Trait Implementations§

Source§

impl Clone for FixAction

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FixAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FixAction

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for FixAction

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.