pub type Make<Args, Out> = fn(&Reader<'_>, &Args) -> GeopResult<Out>;Expand description
What makes a node’s value from its arguments and what it reads. A plain function, not a closure: what it makes may depend only on its arguments, which a reuse compares, and on what it reads, which is recorded. A value captured from outside would be neither, and the node would be reused after it changed:
ⓘ
fn produce(ctx: &mut StepContext, outside: u32) {
let reference = TargetReference::<u32>::new("t");
ctx.produce(&reference, &(), |_, _| Ok(outside));
}For the same reason arguments and values compare by value: arguments
holding an Rc or a closure, compared by address, would make a node
again for arguments alike, and a value compared so would count as
changed when it is not, and could never be checked against a part
built from scratch (testing::assert_incremental).