pub struct Reader { /* private fields */ }std only.Expand description
An external reader that imports input data into an RDF dataset.
This is a program-pattern wrapper, not an implementation of an I/O reader
trait. Input parsing and conversion are performed by the external program.
Execution uses the concurrent streaming behavior described in
crate::programs.
Implementations§
Source§impl Reader
impl Reader
Sourcepub fn new(
program: impl AsRef<OsStr>,
input: AnyInput,
output: GraphOutput,
options: ReaderOptions,
) -> Self
pub fn new( program: impl AsRef<OsStr>, input: AnyInput, output: GraphOutput, options: ReaderOptions, ) -> Self
Configures a reader 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.
Sourcepub async fn execute(&mut self) -> ReaderResult
pub async fn execute(&mut self) -> ReaderResult
Starts a child and returns its live JSONL graph stream.
After successful spawning, input ownership moves into the stream, which feeds it concurrently when polled. Subsequent executions have no source 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 Reader
impl Reader
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.