pub struct Matcher { /* private fields */ }std only.Expand description
An external matcher that performs exact or approximate matching on RDF.
Output is RDF describing the matches, rather than necessarily a subset of
the input dataset. Matching rules belong to the external program;
this wrapper passes JSONL lines and command-line options through. Execution
uses the concurrent streaming behavior described in crate::programs.
Implementations§
Source§impl Matcher
impl Matcher
Sourcepub fn new(
program: impl AsRef<OsStr>,
input: GraphInput,
output: GraphOutput,
options: MatcherOptions,
) -> Self
pub fn new( program: impl AsRef<OsStr>, input: GraphInput, output: GraphOutput, options: MatcherOptions, ) -> Self
Configures a matcher without starting it.
Adds any configured --input=<format> and --output=<format> arguments,
followed by options.other. The input and output values select stdin
and stdout; stderr is captured for failure diagnostics.
Byte input is lazily adapted into JSONL batches using GraphInput::into_jsonl.
Sourcepub async fn execute(&mut self) -> MatcherResult
pub async fn execute(&mut self) -> MatcherResult
Starts a child and returns its live JSONL match stream.
After successful spawning, input ownership moves into the stream, which feeds it concurrently when polled. Subsequent executions have no graph input.
§Errors
Spawn failures are returned directly; input, output, wait, and exit failures are stream items. Consume the stream to completion to check process success.
Source§impl Matcher
impl Matcher
Sourcepub fn with_batching(self, options: BatchOptions) -> Self
pub fn with_batching(self, options: BatchOptions) -> Self
Sets batching thresholds for captured JSONL output. This does not change
subprocess arguments, native pipeline edges, or listing limits.
The default policy is crate::BatchOptions::default.