Skip to main content

plan_extract_function

Function plan_extract_function 

Source
pub async fn plan_extract_function(
    ctx: &RefactoringContext,
    file_abs: &Path,
    content: &str,
    start_line: u32,
    end_line: u32,
    function_name: &str,
) -> Result<ExtractFunctionOutcome, String>
Expand description

Build an extract-function plan without touching the filesystem.

file_abs is the absolute path to the file. content is the file’s current text. start_line and end_line are 1-based, inclusive line numbers selecting the region to extract. function_name is the user-provided name for the new function.