pub struct GrepInput {
pub pattern: String,
pub path: Option<String>,
pub glob: Option<String>,
pub file_type: Option<String>,
pub output_mode: Option<OutputMode>,
pub case_insensitive: Option<bool>,
pub line_numbers: Option<bool>,
pub context_before: Option<u32>,
pub context_after: Option<u32>,
pub context_around: Option<u32>,
pub head_limit: Option<usize>,
pub multiline: Option<bool>,
}Fields§
§pattern: StringThe regular expression pattern to search for in file contents
path: Option<String>Absolute path to a file or directory to search in. Defaults to the current working directory.
glob: Option<String>Glob pattern to filter files (e.g. “.js”, “.{ts,tsx}”)
file_type: Option<String>File type to search (e.g. “js”, “py”, “rust”). More efficient than glob for standard file types.
output_mode: Option<OutputMode>Output mode: “content” (default, shows matching lines), “filesWithMatches” (file paths only), or “count” (match counts per file)
case_insensitive: Option<bool>Case insensitive search
line_numbers: Option<bool>Show line numbers in output (content mode only). Defaults to true.
context_before: Option<u32>Number of lines to show before each match (content mode only)
context_after: Option<u32>Number of lines to show after each match (content mode only)
context_around: Option<u32>Number of lines to show before and after each match (content mode only). Overrides contextBefore/contextAfter.
head_limit: Option<usize>Limit output to first N entries. In content mode limits match lines, in filesWithMatches mode limits file paths, in count mode limits file entries.
multiline: Option<bool>Enable multiline mode where . matches newlines and patterns can span lines
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GrepInput
impl<'de> Deserialize<'de> for GrepInput
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>,
Source§impl JsonSchema for GrepInput
impl JsonSchema for GrepInput
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more