Skip to main content

eval_with_storage

Function eval_with_storage 

Source
pub fn eval_with_storage<D>(
    node: &Node,
    ctx: &dyn CtxStorage,
    dispatcher: &D,
) -> Result<(), EvalError>
where D: Dispatcher,
Expand description

Storage-backed sync evaluator — CtxStorage 経由で ctx を touch する正本。

各 Node 評価開始時に ctx.snapshot() で Expr eval 用の pure view を取り、 write は ctx.write(path, value) 経由。 これにより同じ Arc<dyn CtxStorage> を共有する外部 task が、 Step 間 (sync の場合は 1 Step 評価内では touch しないが) や eval 間で ctx state を変更できる。