pub struct SrgnInput {Show 20 fields
pub path: String,
pub scope: Option<String>,
pub replacement: Option<String>,
pub language_scope: Option<String>,
pub action: SrgnAction,
pub literal_string: bool,
pub dry_run: bool,
pub invert: bool,
pub custom_query: Option<String>,
pub custom_query_file: Option<String>,
pub flags: Option<Vec<String>>,
pub fail_any: bool,
pub fail_none: bool,
pub join_language_scopes: bool,
pub hidden: bool,
pub gitignored: bool,
pub sorted: bool,
pub threads: Option<usize>,
pub fail_no_files: bool,
pub german_options: Option<GermanOptions>,
}
Expand description
Input structure for srgn operations
Fields§
§path: String
File path or glob pattern to operate on
scope: Option<String>
Scope pattern (regex or literal string)
replacement: Option<String>
Replacement string (for replace operations)
language_scope: Option<String>
Language-specific scope (e.g., “rust fn”, “python class”)
action: SrgnAction
Action to perform
literal_string: bool
Whether to use literal string matching instead of regex
dry_run: bool
Whether to perform a dry run (show changes without applying)
invert: bool
Whether to invert the operation (where applicable)
custom_query: Option<String>
Custom tree-sitter query (for advanced users)
custom_query_file: Option<String>
Custom tree-sitter query from file
flags: Option<Vec<String>>
Additional srgn flags
fail_any: bool
Fail if anything matches (for linting/checking)
fail_none: bool
Fail if nothing matches
join_language_scopes: bool
Join multiple language scopes with OR instead of AND
Ignore hidden files and directories
gitignored: bool
Don’t ignore .gitignored files
sorted: bool
Process files in sorted order
threads: Option<usize>
Number of threads to use (0 = auto)
fail_no_files: bool
Whether to fail if no files are found
german_options: Option<GermanOptions>
German-specific options