Attribute Macro stage

Source
#[stage]
Expand description

A macro that wraps a function with the standardized interface: fn fn_name(&mut DataMap, &DataMap) -> Result

Example usage:

#[stage(lazy, transparent)]
fn add_numbers(a: i32, b: i32) -> i32 {
    a + b
}

Multiple outputs are also supported with this syntax: #[stage(out(arg1_name: String, arg2_name: Vec))] fn output_things() -> directed::NodeOutput { let some_string = String::from(“Hello Graph!”); let some_vec = vec![1, 2, 3, 4, 5];

// This builds an output type directed::output!{ arg1_name: some_string, arg2_name: some_vec } }