Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pipelines — overview

hylic-pipeline is a typestate builder over hylic’s lift primitives. Three pipeline types sit behind the same builder surface, distinguished by what they hold:

PipelineSlotsWhen to use
SeedPipeline<D, N, Seed, H, R>grow, seeds_from_node, foldTree is discovered lazily through a Seed → N resolver. Run from a forest of entry seeds.
TreeishPipeline<D, N, H, R>treeish, foldChildren are enumerable directly from the node (N → N*). Run from a known root &N.
OwnedPipeline<N, H, R>treeish, fold (Owned domain)One-shot, by-value, no Clone. Run consumes self.

Each pipeline is Stage 1: it stores its base slots and exposes per-shape reshape sugars (e.g. filter_seeds, map_node_bi, wrap_grow). Calling .lift() flips it into Stage 2, where every method composes a lift onto the chain held in Stage2Pipeline<Base, L>. Stage2Pipeline is one type parameterised over which Stage-1 base is wrapped; the sugar trait body covers both bases through Wrap dispatch.

%3cluster_s1Stage 1  (per-shape reshape)cluster_s2Stage 2  (chain over Wrap::Of<N>)spSeedPipeline<D, N, Seed, H, R>lspStage2Pipeline<  SeedPipeline<…>, L>(chain over SeedNode<N>)sp->lsp.lift()tpTreeishPipeline<D, N, H, R>lpStage2Pipeline<  TreeishPipeline<…>, L>(chain over N)tp->lp.lift()lsp->lsp.then_lift(l)+ Stage-2 sugarsexecExecutor (Fused / Funnel)lsp->exec.run(&exec, root_seeds, entry_heap).run_from_slice(&exec, &[seed], heap)lp->lp.then_lift(l)+ Stage-2 sugarslp->exec.run_from_node(&exec, &root)obOwnedPipeline<N, H, R>ob->exec.run_from_node_once(&exec, &root)

Run methods are owned by the pipeline that defines them: SeedPipeline::run / run_from_slice in Stage 1 — SeedPipeline; PipelineExec::run_from_node in Stage 1 — TreeishPipeline; PipelineExecOnce::run_from_node_once in OwnedPipeline. Stage2Pipeline inherits run from its Stage-1 base.