pub struct Reasoner { /* private fields */ }std only.Expand description
An external reasoner that consumes an RDF dataset and emits entailed RDF.
Inference rules and the relationship between input and output graphs are
determined by the external program. This wrapper transports JSONL lines using
the concurrent streaming behavior described in crate::programs.
Implementations§
Source§impl Reasoner
impl Reasoner
Sourcepub fn new(
program: impl AsRef<OsStr>,
input: GraphInput,
output: GraphOutput,
options: ReasonerOptions,
) -> Self
pub fn new( program: impl AsRef<OsStr>, input: GraphInput, output: GraphOutput, options: ReasonerOptions, ) -> Self
Configures a reasoner 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) -> ReasonerResult
pub async fn execute(&mut self) -> ReasonerResult
Starts a child and returns its live JSONL inference 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 Reasoner
impl Reasoner
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.