pub struct Fix {
pub id: String,
pub name: String,
pub description: String,
pub command: FixCommand,
pub reversible: bool,
pub requires_approval: bool,
}Expand description
A single, idempotent repair with enough metadata for safe auto-application.
Fields§
§id: StringStable machine-readable identifier (e.g. "copy-env-from-example").
name: StringShort human name shown in the fix list (e.g. “Copy .env.example”).
description: StringOne-sentence description of what the fix does.
command: FixCommandThe concrete action to perform.
reversible: boolWhether a failed application can be undone (rollback).
requires_approval: boolWhether the CLI must ask the user before applying this fix.
Implementations§
Source§impl Fix
Renders a before/after preview for a fix against repo_path.
impl Fix
Renders a before/after preview for a fix against repo_path.
use limitless_cli::modules::fixes::kill_ghost_process;
let preview = kill_ghost_process(3000, 9921).preview_fix(".");
assert!(preview.contains("Before:"));
assert!(preview.contains("After:"));This is a thin wrapper over preview_fix for ergonomic chaining.
pub fn preview_fix(&self, repo_path: &str) -> String
Trait Implementations§
impl Eq for Fix
impl StructuralPartialEq for Fix
Auto Trait Implementations§
impl Forget for Fix
impl Freeze for Fix
impl RefUnwindSafe for Fix
impl Send for Fix
impl Sync for Fix
impl Unpin for Fix
impl UnsafeUnpin for Fix
impl UnwindSafe for Fix
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