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
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SrgnInput
impl<'de> Deserialize<'de> for SrgnInput
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>,
Auto Trait Implementations§
impl Freeze for SrgnInput
impl RefUnwindSafe for SrgnInput
impl Send for SrgnInput
impl Sync for SrgnInput
impl Unpin for SrgnInput
impl UnwindSafe for SrgnInput
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more