pub struct JetroEngine { /* private fields */ }Expand description
Long-lived multi-document query engine with an explicit plan cache. Use when the same process evaluates many expressions over many documents — parse/lower/compile work is amortised by this object, not hidden in thread-local state.
Implementations§
Source§impl JetroEngine
impl JetroEngine
Sourcepub fn with_plan_cache_limit(plan_cache_limit: usize) -> Self
pub fn with_plan_cache_limit(plan_cache_limit: usize) -> Self
Create a JetroEngine with an explicit plan-cache capacity.
Set plan_cache_limit to 0 to disable caching entirely.
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Discard all cached query plans and the engine’s key-intern cache, forcing re-compilation and re-interning on the next call.
Sourcepub fn parse_value(&self, document: Value) -> Jetro
pub fn parse_value(&self, document: Value) -> Jetro
Build a Jetro document from a serde_json::Value with object keys
interned into this engine’s key cache. Use this in place of
Jetro::from(...) / the From<serde_json::Value> impl when
per-engine key isolation is required.
Sourcepub fn parse_bytes(&self, bytes: Vec<u8>) -> Result<Jetro, JetroEngineError>
pub fn parse_bytes(&self, bytes: Vec<u8>) -> Result<Jetro, JetroEngineError>
Parse raw JSON bytes into a Jetro document with object keys
interned into this engine’s key cache. With simd-json, the tape
is materialised eagerly so interning happens once at parse time
(subsequent collect calls reuse the cached Val tree).
Sourcepub fn collect<S: AsRef<str>>(
&self,
document: &Jetro,
expr: S,
) -> Result<Value, EvalError>
pub fn collect<S: AsRef<str>>( &self, document: &Jetro, expr: S, ) -> Result<Value, EvalError>
Evaluate a Jetro expression against an already-constructed Jetro document,
using the engine’s shared plan cache and VM.
Sourcepub fn collect_value<S: AsRef<str>>(
&self,
document: Value,
expr: S,
) -> Result<Value, EvalError>
pub fn collect_value<S: AsRef<str>>( &self, document: Value, expr: S, ) -> Result<Value, EvalError>
Convenience wrapper: wrap a serde_json::Value in a Jetro and evaluate expr.
Routes through JetroEngine::parse_value so the document’s object keys are
interned into this engine’s key cache.
Sourcepub fn collect_bytes<S: AsRef<str>>(
&self,
bytes: Vec<u8>,
expr: S,
) -> Result<Value, JetroEngineError>
pub fn collect_bytes<S: AsRef<str>>( &self, bytes: Vec<u8>, expr: S, ) -> Result<Value, JetroEngineError>
Parse raw JSON bytes into a Jetro document and evaluate expr,
returning a JetroEngineError on either parse or evaluation failure.
Routes through JetroEngine::parse_bytes so the document’s object keys
are interned into this engine’s key cache.
Sourcepub fn run_ndjson<R, W>(
&self,
reader: R,
query: &str,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson<R, W>( &self, reader: R, query: &str, writer: W, ) -> Result<usize, JetroEngineError>
Evaluate query independently for every non-empty NDJSON row and write
one JSON result per output line.
Sourcepub fn run_ndjson_file<P, W>(
&self,
path: P,
query: &str,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_file<P, W>( &self, path: P, query: &str, writer: W, ) -> Result<usize, JetroEngineError>
Open an NDJSON file and evaluate query independently for every
non-empty row, writing one JSON result per output line.
Sourcepub fn run_ndjson_file_with_options<P, W>(
&self,
path: P,
query: &str,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_file_with_options<P, W>( &self, path: P, query: &str, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_file with explicit NDJSON reader options.
Sourcepub fn run_ndjson_file_limit<P, W>(
&self,
path: P,
query: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_file_limit<P, W>( &self, path: P, query: &str, limit: usize, writer: W, ) -> Result<usize, JetroEngineError>
Open an NDJSON file, write at most limit query results, and stop reading.
Sourcepub fn run_ndjson_file_limit_with_options<P, W>(
&self,
path: P,
query: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_file_limit_with_options<P, W>( &self, path: P, query: &str, limit: usize, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_file_limit with explicit NDJSON reader options.
Sourcepub fn run_ndjson_source<W>(
&self,
source: NdjsonSource,
query: &str,
writer: W,
) -> Result<usize, JetroEngineError>where
W: Write,
pub fn run_ndjson_source<W>(
&self,
source: NdjsonSource,
query: &str,
writer: W,
) -> Result<usize, JetroEngineError>where
W: Write,
Evaluate query independently for every row from an io::NdjsonSource.
Sourcepub fn run_ndjson_source_with_options<W>(
&self,
source: NdjsonSource,
query: &str,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>where
W: Write,
pub fn run_ndjson_source_with_options<W>(
&self,
source: NdjsonSource,
query: &str,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>where
W: Write,
Like JetroEngine::run_ndjson_source with explicit NDJSON reader options.
Sourcepub fn run_ndjson_source_limit<W>(
&self,
source: NdjsonSource,
query: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>where
W: Write,
pub fn run_ndjson_source_limit<W>(
&self,
source: NdjsonSource,
query: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>where
W: Write,
Evaluate query for rows from an io::NdjsonSource, write at most
limit results, and stop reading.
Sourcepub fn run_ndjson_source_limit_with_options<W>(
&self,
source: NdjsonSource,
query: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>where
W: Write,
pub fn run_ndjson_source_limit_with_options<W>(
&self,
source: NdjsonSource,
query: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>where
W: Write,
Like JetroEngine::run_ndjson_source_limit with explicit NDJSON reader options.
Sourcepub fn run_ndjson_rev<P, W>(
&self,
path: P,
query: &str,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_rev<P, W>( &self, path: P, query: &str, writer: W, ) -> Result<usize, JetroEngineError>
Read an NDJSON file from tail to head and write one query result per row.
Sourcepub fn run_ndjson_rev_with_options<P, W>(
&self,
path: P,
query: &str,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_rev_with_options<P, W>( &self, path: P, query: &str, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_rev with explicit NDJSON reader options.
Sourcepub fn run_ndjson_rev_limit<P, W>(
&self,
path: P,
query: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_rev_limit<P, W>( &self, path: P, query: &str, limit: usize, writer: W, ) -> Result<usize, JetroEngineError>
Read an NDJSON file from tail to head, write at most limit query
results, and stop reading.
Sourcepub fn run_ndjson_rev_limit_with_options<P, W>(
&self,
path: P,
query: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_rev_limit_with_options<P, W>( &self, path: P, query: &str, limit: usize, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_rev_limit with explicit NDJSON reader options.
Sourcepub fn run_ndjson_rev_distinct_by<P, W>(
&self,
path: P,
key_query: &str,
query: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_rev_distinct_by<P, W>( &self, path: P, key_query: &str, query: &str, limit: usize, writer: W, ) -> Result<usize, JetroEngineError>
Read an NDJSON file from tail to head, keep only the first row seen for
each key_query result in that reverse stream order, write query for
retained rows, and stop after limit retained rows.
Sourcepub fn run_ndjson_rev_distinct_by_with_options<P, W>(
&self,
path: P,
key_query: &str,
query: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_rev_distinct_by_with_options<P, W>( &self, path: P, key_query: &str, query: &str, limit: usize, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_rev_distinct_by with explicit NDJSON
reader options.
Sourcepub fn run_ndjson_rev_distinct_by_with_stats<P, W>(
&self,
path: P,
key_query: &str,
query: &str,
limit: usize,
writer: W,
) -> Result<NdjsonRevDistinctStats, JetroEngineError>
pub fn run_ndjson_rev_distinct_by_with_stats<P, W>( &self, path: P, key_query: &str, query: &str, limit: usize, writer: W, ) -> Result<NdjsonRevDistinctStats, JetroEngineError>
Like JetroEngine::run_ndjson_rev_distinct_by, returning execution
counters for path-selection and duplicate-drop observability.
Sourcepub fn run_ndjson_rev_distinct_by_with_stats_and_options<P, W>(
&self,
path: P,
key_query: &str,
query: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<NdjsonRevDistinctStats, JetroEngineError>
pub fn run_ndjson_rev_distinct_by_with_stats_and_options<P, W>( &self, path: P, key_query: &str, query: &str, limit: usize, writer: W, options: NdjsonOptions, ) -> Result<NdjsonRevDistinctStats, JetroEngineError>
Like JetroEngine::run_ndjson_rev_distinct_by_with_stats with explicit
NDJSON reader options.
Sourcepub fn run_ndjson_with_options<R, W>(
&self,
reader: R,
query: &str,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_with_options<R, W>( &self, reader: R, query: &str, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson with explicit NDJSON reader options.
Sourcepub fn run_ndjson_limit<R, W>(
&self,
reader: R,
query: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_limit<R, W>( &self, reader: R, query: &str, limit: usize, writer: W, ) -> Result<usize, JetroEngineError>
Evaluate query for NDJSON rows, write at most limit results, and stop reading.
Sourcepub fn run_ndjson_limit_with_options<R, W>(
&self,
reader: R,
query: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_limit_with_options<R, W>( &self, reader: R, query: &str, limit: usize, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_limit with explicit NDJSON reader options.
Sourcepub fn run_ndjson_matches<R, W>(
&self,
reader: R,
predicate: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_matches<R, W>( &self, reader: R, predicate: &str, limit: usize, writer: W, ) -> Result<usize, JetroEngineError>
Evaluate predicate for each NDJSON row, write matching original rows,
and stop after limit matches.
Sourcepub fn run_ndjson_matches_with_options<R, W>(
&self,
reader: R,
predicate: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_matches_with_options<R, W>( &self, reader: R, predicate: &str, limit: usize, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_matches with explicit NDJSON reader options.
Sourcepub fn run_ndjson_matches_file<P, W>(
&self,
path: P,
predicate: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_matches_file<P, W>( &self, path: P, predicate: &str, limit: usize, writer: W, ) -> Result<usize, JetroEngineError>
Open an NDJSON file, write matching original rows, and stop after limit matches.
Sourcepub fn run_ndjson_matches_file_with_options<P, W>(
&self,
path: P,
predicate: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_matches_file_with_options<P, W>( &self, path: P, predicate: &str, limit: usize, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_matches_file with explicit NDJSON reader options.
Sourcepub fn run_ndjson_matches_source<W>(
&self,
source: NdjsonSource,
predicate: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>where
W: Write,
pub fn run_ndjson_matches_source<W>(
&self,
source: NdjsonSource,
predicate: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>where
W: Write,
Evaluate predicate against each row from an io::NdjsonSource, write
matching original rows, and stop after limit matches.
Sourcepub fn run_ndjson_matches_source_with_options<W>(
&self,
source: NdjsonSource,
predicate: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>where
W: Write,
pub fn run_ndjson_matches_source_with_options<W>(
&self,
source: NdjsonSource,
predicate: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>where
W: Write,
Like JetroEngine::run_ndjson_matches_source with explicit NDJSON reader options.
Sourcepub fn run_ndjson_rev_matches<P, W>(
&self,
path: P,
predicate: &str,
limit: usize,
writer: W,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_rev_matches<P, W>( &self, path: P, predicate: &str, limit: usize, writer: W, ) -> Result<usize, JetroEngineError>
Read an NDJSON file from tail to head, write matching original rows, and
stop after limit matches.
Sourcepub fn run_ndjson_rev_matches_with_options<P, W>(
&self,
path: P,
predicate: &str,
limit: usize,
writer: W,
options: NdjsonOptions,
) -> Result<usize, JetroEngineError>
pub fn run_ndjson_rev_matches_with_options<P, W>( &self, path: P, predicate: &str, limit: usize, writer: W, options: NdjsonOptions, ) -> Result<usize, JetroEngineError>
Like JetroEngine::run_ndjson_rev_matches with explicit NDJSON reader options.
Sourcepub fn collect_ndjson<R>(
&self,
reader: R,
query: &str,
) -> Result<Vec<Value>, JetroEngineError>where
R: BufRead,
pub fn collect_ndjson<R>(
&self,
reader: R,
query: &str,
) -> Result<Vec<Value>, JetroEngineError>where
R: BufRead,
Evaluate query independently for every non-empty NDJSON row and collect
the per-row results.
Sourcepub fn collect_ndjson_file<P>(
&self,
path: P,
query: &str,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_file<P>( &self, path: P, query: &str, ) -> Result<Vec<Value>, JetroEngineError>
Open an NDJSON file and collect per-row query results.
Sourcepub fn collect_ndjson_file_with_options<P>(
&self,
path: P,
query: &str,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_file_with_options<P>( &self, path: P, query: &str, options: NdjsonOptions, ) -> Result<Vec<Value>, JetroEngineError>
Like JetroEngine::collect_ndjson_file with explicit NDJSON reader options.
Sourcepub fn collect_ndjson_source(
&self,
source: NdjsonSource,
query: &str,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_source( &self, source: NdjsonSource, query: &str, ) -> Result<Vec<Value>, JetroEngineError>
Collect per-row query results from an io::NdjsonSource.
Sourcepub fn collect_ndjson_source_with_options(
&self,
source: NdjsonSource,
query: &str,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_source_with_options( &self, source: NdjsonSource, query: &str, options: NdjsonOptions, ) -> Result<Vec<Value>, JetroEngineError>
Like JetroEngine::collect_ndjson_source with explicit NDJSON reader options.
Sourcepub fn collect_ndjson_rev<P>(
&self,
path: P,
query: &str,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_rev<P>( &self, path: P, query: &str, ) -> Result<Vec<Value>, JetroEngineError>
Read an NDJSON file from tail to head and collect per-row query results.
Sourcepub fn collect_ndjson_rev_with_options<P>(
&self,
path: P,
query: &str,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_rev_with_options<P>( &self, path: P, query: &str, options: NdjsonOptions, ) -> Result<Vec<Value>, JetroEngineError>
Like JetroEngine::collect_ndjson_rev with explicit NDJSON reader options.
Sourcepub fn for_each_ndjson_rev<P, F>(
&self,
path: P,
query: &str,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_rev<P, F>( &self, path: P, query: &str, f: F, ) -> Result<usize, JetroEngineError>
Read an NDJSON file from tail to head and call f with each query result
as it is produced.
Sourcepub fn for_each_ndjson_rev_until<P, F>(
&self,
path: P,
query: &str,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_rev_until<P, F>( &self, path: P, query: &str, f: F, ) -> Result<usize, JetroEngineError>
Read an NDJSON file from tail to head and call f until it returns
io::NdjsonControl::Stop or input is exhausted.
Sourcepub fn for_each_ndjson_rev_until_with_options<P, F>(
&self,
path: P,
query: &str,
options: NdjsonOptions,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_rev_until_with_options<P, F>( &self, path: P, query: &str, options: NdjsonOptions, f: F, ) -> Result<usize, JetroEngineError>
Like JetroEngine::for_each_ndjson_rev_until with explicit NDJSON reader options.
Sourcepub fn for_each_ndjson_rev_with_options<P, F>(
&self,
path: P,
query: &str,
options: NdjsonOptions,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_rev_with_options<P, F>( &self, path: P, query: &str, options: NdjsonOptions, f: F, ) -> Result<usize, JetroEngineError>
Like JetroEngine::for_each_ndjson_rev with explicit NDJSON reader options.
Sourcepub fn collect_ndjson_with_options<R>(
&self,
reader: R,
query: &str,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>where
R: BufRead,
pub fn collect_ndjson_with_options<R>(
&self,
reader: R,
query: &str,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>where
R: BufRead,
Like JetroEngine::collect_ndjson with explicit NDJSON reader options.
Sourcepub fn collect_ndjson_matches<R>(
&self,
reader: R,
predicate: &str,
limit: usize,
) -> Result<Vec<Value>, JetroEngineError>where
R: BufRead,
pub fn collect_ndjson_matches<R>(
&self,
reader: R,
predicate: &str,
limit: usize,
) -> Result<Vec<Value>, JetroEngineError>where
R: BufRead,
Evaluate predicate for each NDJSON row, collect matching original
rows, and stop after limit matches.
Sourcepub fn collect_ndjson_matches_with_options<R>(
&self,
reader: R,
predicate: &str,
limit: usize,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>where
R: BufRead,
pub fn collect_ndjson_matches_with_options<R>(
&self,
reader: R,
predicate: &str,
limit: usize,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>where
R: BufRead,
Like JetroEngine::collect_ndjson_matches with explicit NDJSON reader options.
Sourcepub fn collect_ndjson_matches_file<P>(
&self,
path: P,
predicate: &str,
limit: usize,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_matches_file<P>( &self, path: P, predicate: &str, limit: usize, ) -> Result<Vec<Value>, JetroEngineError>
Open an NDJSON file, collect matching original rows, and stop after limit matches.
Sourcepub fn collect_ndjson_matches_file_with_options<P>(
&self,
path: P,
predicate: &str,
limit: usize,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_matches_file_with_options<P>( &self, path: P, predicate: &str, limit: usize, options: NdjsonOptions, ) -> Result<Vec<Value>, JetroEngineError>
Like JetroEngine::collect_ndjson_matches_file with explicit NDJSON reader options.
Sourcepub fn collect_ndjson_matches_source(
&self,
source: NdjsonSource,
predicate: &str,
limit: usize,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_matches_source( &self, source: NdjsonSource, predicate: &str, limit: usize, ) -> Result<Vec<Value>, JetroEngineError>
Evaluate predicate against each row from an io::NdjsonSource,
collect matching original rows, and stop after limit matches.
Sourcepub fn collect_ndjson_matches_source_with_options(
&self,
source: NdjsonSource,
predicate: &str,
limit: usize,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_matches_source_with_options( &self, source: NdjsonSource, predicate: &str, limit: usize, options: NdjsonOptions, ) -> Result<Vec<Value>, JetroEngineError>
Like JetroEngine::collect_ndjson_matches_source with explicit NDJSON reader options.
Sourcepub fn collect_ndjson_rev_matches<P>(
&self,
path: P,
predicate: &str,
limit: usize,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_rev_matches<P>( &self, path: P, predicate: &str, limit: usize, ) -> Result<Vec<Value>, JetroEngineError>
Read an NDJSON file from tail to head, collect matching original rows,
and stop after limit matches.
Sourcepub fn collect_ndjson_rev_matches_with_options<P>(
&self,
path: P,
predicate: &str,
limit: usize,
options: NdjsonOptions,
) -> Result<Vec<Value>, JetroEngineError>
pub fn collect_ndjson_rev_matches_with_options<P>( &self, path: P, predicate: &str, limit: usize, options: NdjsonOptions, ) -> Result<Vec<Value>, JetroEngineError>
Like JetroEngine::collect_ndjson_rev_matches with explicit NDJSON reader options.
Sourcepub fn for_each_ndjson<R, F>(
&self,
reader: R,
query: &str,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson<R, F>( &self, reader: R, query: &str, f: F, ) -> Result<usize, JetroEngineError>
Evaluate query independently for every non-empty NDJSON row and call
f with each result as it is produced.
Sourcepub fn for_each_ndjson_until<R, F>(
&self,
reader: R,
query: &str,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_until<R, F>( &self, reader: R, query: &str, f: F, ) -> Result<usize, JetroEngineError>
Evaluate query independently for every non-empty NDJSON row and call
f until it returns io::NdjsonControl::Stop or input is exhausted.
Sourcepub fn for_each_ndjson_source<F>(
&self,
source: NdjsonSource,
query: &str,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_source<F>( &self, source: NdjsonSource, query: &str, f: F, ) -> Result<usize, JetroEngineError>
Evaluate query for every row from an io::NdjsonSource and call
f with each result as it is produced.
Sourcepub fn for_each_ndjson_source_until<F>(
&self,
source: NdjsonSource,
query: &str,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_source_until<F>( &self, source: NdjsonSource, query: &str, f: F, ) -> Result<usize, JetroEngineError>
Evaluate query for every row from an io::NdjsonSource and call
f until it returns io::NdjsonControl::Stop or input is exhausted.
Sourcepub fn for_each_ndjson_source_until_with_options<F>(
&self,
source: NdjsonSource,
query: &str,
options: NdjsonOptions,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_source_until_with_options<F>( &self, source: NdjsonSource, query: &str, options: NdjsonOptions, f: F, ) -> Result<usize, JetroEngineError>
Like JetroEngine::for_each_ndjson_source_until with explicit NDJSON reader options.
Sourcepub fn for_each_ndjson_source_with_options<F>(
&self,
source: NdjsonSource,
query: &str,
options: NdjsonOptions,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_source_with_options<F>( &self, source: NdjsonSource, query: &str, options: NdjsonOptions, f: F, ) -> Result<usize, JetroEngineError>
Like JetroEngine::for_each_ndjson_source with explicit NDJSON reader options.
Sourcepub fn for_each_ndjson_with_options<R, F>(
&self,
reader: R,
query: &str,
options: NdjsonOptions,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_with_options<R, F>( &self, reader: R, query: &str, options: NdjsonOptions, f: F, ) -> Result<usize, JetroEngineError>
Like JetroEngine::for_each_ndjson with explicit NDJSON reader options.
Sourcepub fn for_each_ndjson_until_with_options<R, F>(
&self,
reader: R,
query: &str,
options: NdjsonOptions,
f: F,
) -> Result<usize, JetroEngineError>
pub fn for_each_ndjson_until_with_options<R, F>( &self, reader: R, query: &str, options: NdjsonOptions, f: F, ) -> Result<usize, JetroEngineError>
Like JetroEngine::for_each_ndjson_until with explicit NDJSON reader options.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for JetroEngine
impl RefUnwindSafe for JetroEngine
impl Send for JetroEngine
impl Sync for JetroEngine
impl Unpin for JetroEngine
impl UnsafeUnpin for JetroEngine
impl UnwindSafe for JetroEngine
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more