Before a process is started, make sure all the necessary information is provided.

In function graph, data types in Resources are inserted by the consumer, separate from the graph.

In Peace, Item::setup is run for each item, which allows data types to be inserted into Resources.

let graph = /* .. */;

let resources = graph.setup(Resources::new()).await?;

// Item1::setup

// Item2::setup

// Item3::setup
// no-op

// Item4::setup

ℹ️ Note: Each initialization parameter should be specified in each item's setup method, even though the parameter is inserted by a predecessor item.

This is because when only a subset of the graph is executed, or if the item is used in a different graph, the parameter should still be inserted.

🚧 A wrapper type should conditionally insert the initialization parameter into Resources