Expand description
Canonical pipeline parsing and execution. Canonical document-first pipeline DSL.
A pipeline is a command followed by zero or more transformation stages
separated by |. The stages transform the rows returned by the command:
"orch task list | F status=running | S created | L 10"
───────────────── ─────────────────────────────────
command pipeline stagesData flow:
raw line
│
▼ parse_pipeline(line)
Pipeline { command: "orch task list",
stages: ["F status=running", "S created", "L 10"] }
│
│ caller dispatches the command and gets rows back
│
▼ apply_pipeline(rows, &stages)
OutputResult ← filtered · sorted · limited rowsThe main public surface:
crate::dsl::parse_pipelineturns a raw line into acrate::dsl::Pipelinevaluecrate::dsl::parse_stageparses one stage when the command has already been split awaycrate::dsl::apply_pipeline/crate::dsl::apply_output_pipelineapply stages to existing rowscrate::dsl::registered_verbsreturns metadata for all supported stage verbscrate::dsl::verb_infolooks up a single verb by name
Choose the smallest entrypoint that matches your starting point:
- if you only need to split
"command | stages"into structured pieces, usecrate::dsl::parse_pipeline - if you already have one raw stage like
"F uid=alice"and need to inspect its verb/spec shape, usecrate::dsl::parse_stage - if your command already produced
Vec<Row>, usecrate::dsl::apply_pipeline - if you already have an
crate::core::output_model::OutputResultand want to preserve its semantic document or render metadata, usecrate::dsl::apply_output_pipeline - if your rows come from an iterator and you want streamable stages to stay
streamable for as long as possible, use
crate::dsl::execute_pipeline_streaming
Common verbs: F (filter), P (project), S (sort), G (group),
A (aggregate), L (limit), V/K (quick search), U (unroll),
JQ (jq expression). See crate::dsl::registered_verbs for the full list
with streaming notes in crate::dsl::VerbStreaming.
Structs§
- Pipeline
- Parsed command line split into a command segment and trailing DSL stages.
- Verb
Info - Static metadata for one registered DSL verb.
Enums§
- Verb
Streaming - Streaming behavior for a DSL verb.
Functions§
- apply_
output_ pipeline - Apply a pipeline to existing output without flattening grouped data first.
- apply_
pipeline - Apply a pipeline to plain row output.
- execute_
pipeline - Execute a pipeline starting from plain rows.
- execute_
pipeline_ streaming - Execute a pipeline from any row iterator.
- is_
registered_ explicit_ verb - Returns whether
verbis a registered non-meta verb. - parse_
pipeline - Split a full command line into its command portion and raw pipe stages.
- parse_
stage - Parse a raw stage string into the structured form the evaluator consumes.
- registered_
verbs - Returns metadata for all registered DSL verbs, including meta-only verbs.
- render_
streaming_ badge - Returns the display badge for a verb’s streaming behavior, if any.
- verb_
info - Returns verb metadata for
verb, matched case-insensitively.