Skip to main content

graph_section

Function graph_section 

Source
pub fn graph_section<F>(
    engine: &Engine,
    parallel_group: Option<u32>,
    f: F,
) -> Result<(), Box<dyn Error>>
where F: FnMut() -> Result<(), Box<dyn Error>>,
Expand description

The section annotation: eager mode runs the closure verbatim; build mode wraps it in a stream capture on engine’s stream and records the child. Sections sharing a parallel_group id fork from the same predecessor set and merge together. The closure must be capture-safe (raw copies at cross-context seams, no host syncs, no events).