Expand description
Node trait + per-superstep context + helper closure adapter.
Structs§
- NodeCtx
- Per-superstep context handed to every
Node::executecall. Carries run-correlation metadata and the activeRunnableConfig. The lifetime is the superstep — don’t hold across awaits beyondexecutereturning. - NodeFn
- Closure adapter — wrap any
Fn(&S, &NodeCtx) -> Futureas aNode. - NodeOut
- Output of a node’s
execute: a typed state delta + where to go next. - Node
Retry Policy - Per-task retry policy. The engine wraps
Node::executecalls in a retry loop when the node returns aSomepolicy and the call fails with acognis_core::CognisErrorwhoseis_retryable()is true.
Traits§
- Node
- The unit of computation in a graph. Async, takes a
&Ssnapshot of state
Functions§
- node_fn
- Build a
NodeFnfrom a closure. The closure receives(&S, &NodeCtx)and returnsFuture<Output = Result<NodeOut<S>>>.