pub struct CustomParser {
pub parser_name: String,
pub file_filter: Option<GlobSet>,
pub command: String,
pub timeout_ms: u64,
pub scope_dir: PathBuf,
pub options: Option<Value>,
}Expand description
Custom parser. Runs an external command that receives a JSON options envelope on line 1, then file paths (one per line) on stdin, and emits NDJSON links on stdout.
Fields§
§parser_name: String§file_filter: Option<GlobSet>File routing filter. None = receives all File nodes.
command: String§timeout_ms: u64§scope_dir: PathBuf§options: Option<Value>Parser options from [parsers.<name>.options]. Sent as JSON on stdin line 1.
Trait Implementations§
Source§impl Parser for CustomParser
impl Parser for CustomParser
Source§fn parse(&self, path: &str, _content: &str) -> ParseResult
fn parse(&self, path: &str, _content: &str) -> ParseResult
Parse a file’s content and return discovered links + optional metadata.
Source§fn parse_batch(&self, files: &[(&str, &str)]) -> HashMap<String, ParseResult>
fn parse_batch(&self, files: &[(&str, &str)]) -> HashMap<String, ParseResult>
Parse multiple files in one call. Default falls back to per-file parsing.
Custom parsers override this to spawn one process for all files.
Auto Trait Implementations§
impl Freeze for CustomParser
impl RefUnwindSafe for CustomParser
impl Send for CustomParser
impl Sync for CustomParser
impl Unpin for CustomParser
impl UnsafeUnpin for CustomParser
impl UnwindSafe for CustomParser
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